@ninebone/grid 0.0.153 → 0.0.155
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.
- package/dist/nine-grid.js +269 -269
- package/dist/nine-grid.js.map +1 -1
- package/dist/nine-grid.umd.js +40 -40
- package/dist/nine-grid.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-grid.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var qf=Object.defineProperty;var Mu=de=>{throw TypeError(de)};var Hf=(de,Se,Ue)=>Se in de?qf(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Hf(de,typeof Se!="symbol"?Se+"":Se,Ue),yu=(de,Se,Ue)=>Se.has(de)||Mu("Cannot "+Ue);var f=(de,Se,Ue)=>(yu(de,Se,"read from private field"),Ue?Ue.call(de):Se.get(de)),Y=(de,Se,Ue)=>Se.has(de)?Mu("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(de):Se.set(de,Ue),tt=(de,Se,Ue,ks)=>(yu(de,Se,"write to private field"),ks?ks.call(de,Ue):Se.set(de,Ue),Ue),Ye=(de,Se,Ue)=>(yu(de,Se,"access private method"),Ue);var Iu=(de,Se,Ue,ks)=>({set _(
|
|
1
|
+
(function(de,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("jquery"),require("@ninebone/util")):typeof define=="function"&&define.amd?define(["exports","jquery","@ninebone/util"],Se):(de=typeof globalThis<"u"?globalThis:de||self,Se(de.NineGrid={},de.$,de.util))})(this,(function(de,Se,Ue){"use strict";var qf=Object.defineProperty;var Mu=de=>{throw TypeError(de)};var Hf=(de,Se,Ue)=>Se in de?qf(de,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ue}):de[Se]=Ue;var it=(de,Se,Ue)=>Hf(de,typeof Se!="symbol"?Se+"":Se,Ue),yu=(de,Se,Ue)=>Se.has(de)||Mu("Cannot "+Ue);var f=(de,Se,Ue)=>(yu(de,Se,"read from private field"),Ue?Ue.call(de):Se.get(de)),Y=(de,Se,Ue)=>Se.has(de)?Mu("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(de):Se.set(de,Ue),tt=(de,Se,Ue,ks)=>(yu(de,Se,"write to private field"),ks?ks.call(de,Ue):Se.set(de,Ue),Ue),Ye=(de,Se,Ue)=>(yu(de,Se,"access private method"),Ue);var Iu=(de,Se,Ue,ks)=>({set _(Ti){tt(de,Se,Ti,Ue)},get _(){return f(de,Se,ks)}});var Jn,Qn,to,ls,ql,Cs,Ge,Hl,zl,Ul,Vl,Wt,Wl,Ri,Es,As,Mi,Ts,Ii,eo,Ni,Oi,lr,Nu,Ou,zf,ju,$u,Lu,Uf,Pu,ti,ji,ro,so,io,no,kt,Sr,$i,Xl,oo,Ot,hs,ao,lo,ho,jr,co,uo,dr,fo,Yl,Gl,Kl,Zl,Jl,Ql,po,mo,go,bo,th,eh,Li,yo,Pi,Di,Bi,vo,Fi,qi,ei,Br,wo,Hi,xo,rh,ve,$r,Fr,_o,kr,zi,qr,So,au,ko,lu,Co,Eo,Ui,Vi,Ao,Ie,Cr,Er,Rs,Ms,Hr,Ar,Is,Ns,To,Ro,Mo,hu,Io,sh,No,Wi,Xi,Yi,ri,Gi,ih,ce,si,Lr,Ki,Oo,nh,oh,Zi,De,nr,jo,Os,ii,Ji,ah,lh,hh,ch,cu,$o,Be,js,ni,Qi,uh,Lo,dh,Po,tn,uu,fh,ph,en,Do,rn,oi,sn,Gr,mh,Bo,gh,Fo,bh,zr,qo,yh,vh,wh,Kr,Ho,cs,Ve,Ft,Pe,Tr,ai,$s,nn,zo,on,Uo,Vo,xh,Wo,Xo,an,ln,Yo,Go,Ko,Ne,Zo,hn,us,li,cn,Jo,du,fu,_h,Qo,hr,ta,Sh,kh,un,ds,Ur,fs,Ch,ea,dn,Eh,Ls,fn,Ah,Th,Rh,Mh,Ih,Nh,ra,pn,Oh,sa,Zr,jh,Jr,hi,$h,Ze,ps,Vr,Ps,mn,Qr,Lh,Oe,ci,gn,bn,yn,ui,ts,es,Lt,ia,Ph,Fe,na,oa,Rr,aa,We,rr,Ds,Dh,vn,Bh,di,la,Bs,Pr,Fs,fi,Fh,qh,wn,Hh,sr,cr,pi,zh,He,ha,ca,ua,ms,da,fa,pa,ma,or,gr,mi,Uh,Vh,ga,ba,Wh,fr,rs,ya,br,qs,gi,pu,ss,Xh,Yh,Gh,va,wa,xa,Kh,Zh,Le,pr,Dt,is,me,yr,vr,_n,Sn,bi,Jh,Qh,_a,tc,Sa,ka,kn,Ca,vu,Cn,Je,gs,ae,Wr,Xr,Hs,ec,Ea,rc,Aa,sc,Ta,Ra,En,Xe,ns,Ma,Ia,Na,ic,nc,Gt,oc,Oa,ja,bs,$a,La,Pa,Da,Ba,Fa,qa,yi,Pl,ac,lc,hc,cc,mu,Ha,za,uc,dc,fc,yt,Ke,wr,vi,wi,Ua,Va,Wa,Xa,Ya,pc,mc,gc,An,zs,Us,Qe,Vs,bc,Ga,Tn,Ka,Mr,Za,Ja,yc,vc,wc,xc,Qa,xi,tl,Rn,os,el,rl,_c,ys,Sc,sl,kc,as,Cc,il,Ec,nl,Ws,Xs,vs,Ac,ol,Mn,al,ll,In,hl,cl,Ys,ul,Nn,ws,_i,On,Tc,jn,$n,Rc,dl,fl,Ln,Pn,pl,ml,gl,Mc,Si,Ic,Nc,Du,Dn,Oc,jc,Bu,$c,Lc,bl,Bn,yl,Pc,vl,Fn,wl,qn,xs,ki,Dc,ur,xl,Bc,Hn,Fu,qu,Fc,Dr,qc,Hc,zc,_l,gu,Uc,Ir,Sl,kl,Cl,El,Vc,Al,Ci,Tl,Nr,Dl,wu,xu,Rl,Wc,Ml,Xc,zn,Il,_u,Un,Gs,Su,ku,Yc,Gc,Kc,_s,Zc,Nl,Vn,Ol,jl,Wn,$l;class ks extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
2
2
|
<nx-dialog css-file="nxConfirm.css">
|
|
3
3
|
<div class="msg"></div>
|
|
4
4
|
<buttons class="buttons-confirm">
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
</buttons>
|
|
8
8
|
</nx-dialog>
|
|
9
9
|
`}}it(ks,"confirm",async(E,t,l={})=>{t=t||"Confirm";for(const s in H.options.confirm)l[s]=l[s]||H.options.confirm[s];$("nx-confirm-popup",document.body).remove(),$(document.body).append($(`<nx-confirm-popup class="${l.class} ${l.animation}"></nx-confirm-popup>`));const c=document.body.querySelector("nx-confirm-popup"),o=c.shadowRoot.querySelector(".ok"),r=c.shadowRoot.querySelector(".cancel"),n=c.shadowRoot.querySelector(".close");return $(".title",c.shadowRoot).html(t),$(".msg",c.shadowRoot).html(E.replaceAll(`
|
|
10
|
-
`,"<br/>")),o.innerHTML=l["true-text"],r.innerHTML=l["false-text"],new Promise(function(s,e){$(o).on("click",i=>{s(!0),$(n).trigger("click")}),$(r).on("click",i=>{s(!1),$(n).trigger("click")}),$(".close,.close2",c.shadowRoot).on("click",i=>{s()}),c.shadowRoot.querySelector("dialog").showModal()})});class
|
|
10
|
+
`,"<br/>")),o.innerHTML=l["true-text"],r.innerHTML=l["false-text"],new Promise(function(s,e){$(o).on("click",i=>{s(!0),$(n).trigger("click")}),$(r).on("click",i=>{s(!1),$(n).trigger("click")}),$(".close,.close2",c.shadowRoot).on("click",i=>{s()}),c.shadowRoot.querySelector("dialog").showModal()})});class Ti extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
11
11
|
<nx-dialog css-file="nxAlert.css">
|
|
12
12
|
<div class="msg"></div>
|
|
13
13
|
<buttons class="buttons-confirm">
|
|
14
14
|
<button class="cancel">Close</button>
|
|
15
15
|
</buttons>
|
|
16
16
|
</nx-dialog>
|
|
17
|
-
`}}it(
|
|
17
|
+
`}}it(Ti,"alert",async(E,t="Alert",l={})=>{t=t||"Alert";for(const o in H.options.alert)l[o]=l[o]||H.options.alert[o];$("nx-alert-popup",document.body).remove(),$(document.body).append($(`<nx-alert-popup class="${l.class} ${l.animation}"></nx-alert-popup>`));const c=document.body.querySelector("nx-alert-popup");return $(".title",c.shadowRoot).html(t),$(".msg",c.shadowRoot).html(E),new Promise(function(o){$(".cancel,.close2",c.shadowRoot).on("click",r=>{o(!1),$(".close",c.shadowRoot).trigger("click")}),c.shadowRoot.querySelector("dialog").showModal()})}),customElements.get("nx-confirm-popup")||customElements.define("nx-confirm-popup",ks),customElements.get("nx-alert-popup")||customElements.define("nx-alert-popup",Ti);const St=class St{constructor(){console.log(`welcome nine-grid@${St.version}`,window.location.hostname)}static extendElementPrototype(){"isHidden"in Element.prototype||Object.defineProperty(Element.prototype,"isHidden",{get:function(){const E=window.getComputedStyle(this);return E.display==="none"||E.visibility==="hidden"||E.opacity==="0"}}),"shadow"in Element.prototype||Object.defineProperty(Element.prototype,"shadow",{get:function(){let E=this;return{closest:function(t){var l;for(;E;){if(E.matches(t))return E;E.shadowRoot,E=((l=E.getRootNode())==null?void 0:l.host)||E.parentElement||null}return null},querySelectorAll:t=>{let l=[];return E instanceof NodeList?E.forEach(c=>{t instanceof NodeList?t.forEach(o=>{l.push(...c.querySelectorAll(o))}):t instanceof HTMLElement?l.push(...c.querySelectorAll(t)):l.push(...c.querySelectorAll(t))}):t instanceof HTMLElement?l=[t]:t instanceof NodeList?t.forEach(c=>{l.push(...E.querySelectorAll(c))}):l=E.querySelectorAll(t),l}}}})}static querySelectorAll(E,t=document){const l=[],c=o=>{var r,n,s,e;(n=(r=o.querySelectorAll)==null?void 0:r.call(o,E))==null||n.forEach(i=>{l.includes(i)||l.push(i)}),(e=(s=o.querySelectorAll)==null?void 0:s.call(o,"*"))==null||e.forEach(i=>{i.shadowRoot&&c(i.shadowRoot)})};return c(t.shadowRoot??t),l}static querySelector(E,t=document){var c,o;let l=(c=t.querySelector)==null?void 0:c.call(t,E);if(l||t.shadowRoot&&(l=this.querySelector(E,t.shadowRoot),l))return l;for(const r of((o=t.querySelectorAll)==null?void 0:o.call(t,"*"))??[])if(r.shadowRoot&&(l=this.querySelector(E,r.shadowRoot),l))return l;return null}static confirm(E,t,l){return ks.confirm(E,t,l)}static alert(E,t,l){return Ti.alert(E,t,l)}};it(St,"LOG",{LEVEL:{ALL:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,OFF:9}}),it(St,"EVENT",{LOAD:"load",BUTTON_CLICK:"buttonclick",LINK_CLICK:"linklick",LAYOUT_CHANGED:"layoutchanged",CELL_CLICK:"cellclick",CELL_DBL_CLICK:"celldblclick",HEADCELL_CLICK:"headcellclick",HEADCELL_DBL_CLICK:"headcelldblclick",FOOTCELL_CLICK:"footcellclick",FOOTCELL_DBL_CLICK:"footcelldblclick",CELL_POS_CHANGED:"cellposchanged",ROW_POS_CHANGED:"rowposchanged",DATA_CHANGED:"datachanged",CAN_ROW_MOVE:"canrowmove",ROW_MOVED:"rowmoved",TAB_LOAD:"tabload"}),it(St,"BAND",{BODY:"body",LEFT:"left",RIGHT:"right"}),it(St,"ROW",{ID:0,INDEX:1,ORDER:2,VISIBLE_ROW:3,STATE:4,FILTER:5,PIN:6,EXPAND:7,COLLAPSE:8,VISIBLE:9,PAGING:10,DELETED:11,HEIGHT:12,ORIGIN_ORDER:13,ORIGIN_VALUE:14,EXPAND_CHECK:15}),it(St,"ROW_STATE",{EMPTY:0,NORMAL:1,INSERT:2,UPDATE:4,DELETE:8,GROUP:16}),it(St,"SELECTTYPE",{NONE:"none",ROW:"row",ROWS:"rows",COL:"col",COLS:"cols",CELL:"cell",AREA:"area"}),it(St,"COLINDICATORTYPE",{EXPAND:"expand",COLLAPSE:"collapse"}),it(St,"PAGINGTYPE",{NONE:"none",CLIENT:"client",SERVER:"server"}),it(St,"PAGINGCOUNT",{AUTO:"auto",NUM_1:"1",NUM_5:"5",NUM_10:"10",NUM_20:"20",NUM_30:"30",NUM_50:"50",NUM_100:"100",NUM_1000:"1000",NUM_10000:"10000"}),it(St,"version","6.1429.0"),it(St,"options",{confirm:{class:"classic",animation:"run","true-text":"Yes","false-text":"No"},alert:{class:"classic",animation:"zoom"}}),it(St,"cssPath",null),it(St,"openFileDialog",E=>new Promise((t,l)=>{const c=document.getElementById("ninegridFileInput");c&&c.remove();const o=document.createElement("input");o.type="file",o.accept="*",o.id="ninegridFileInput",o.addEventListener("change",r=>{const n=r.target.files[0];n?t(n):l(new Error("파일이 선택되지 않았습니다."))}),o.click()})),it(St,"getCustomPath",(E,t)=>{if(nine.cssPath)return`@import "${nine.cssPath}/ninegrid/${t}"`;let l,c;return E.tagName=="NINE-GRID"?c=E:(c=E.getRootNode().host,c&&c.tagName!="NINE-GRID"&&(c=c.getRootNode().host)),c&&c.tagName=="NINE-GRID"&&(l=c.getAttribute("css-path")),l||(l=St.cssPath),l?`@import "${l}/${t}";`:""}),it(St,"closest",(E,t)=>{let l=t;for(;l;){if(l.tagName.toLowerCase()===E)return l;l=l.getRootNode().host}return null}),it(St,"waitForInnerHTML",(E,t=3,l=100)=>new Promise((c,o)=>{let r=0;const n=setInterval(()=>{E.innerHTML.trim()!==""?(clearInterval(n),c()):(r++,r>=t&&(clearInterval(n),o("InnerHTML을 확인하지 못했습니다.")))},l)})),it(St,"delayQuerySelector",(E,t=document,l=3,c=100)=>new Promise((o,r)=>{let n=0;const s=setInterval(()=>{const e=St.querySelector(E,t);e?(clearInterval(s),o(e)):(n++,n>=l&&(clearInterval(s),r("Element를 찾지 못했습니다.")))},c)})),it(St,"copyProperty",(E,t,l)=>{Array.isArray(l)||(l=[l]);for(var c in t)l.includes(c)&&(E[c]=t[c])}),it(St,"decode",(...E)=>{const t=E[0];for(let l=1;l<E.length-1;l+=2)if(E[l]===t)return E[l+1];return E.length%2===0?E[E.length-1]:null}),it(St,"isMobile",()=>/(iPhone|iPad|Android|BlackBerry|Windows Phone)/i.test(navigator.userAgent)),it(St,"randomUUID",E=>{E||(E=10);const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let l="";const c=t.length;for(let o=0;o<E;o++)l+=t.charAt(Math.floor(Math.random()*c));return l}),it(St,"isNvl",E=>E==null||E===""),it(St,"isNull",E=>St.isNvl(E)),it(St,"nvl",(E,t)=>St.isNvl(E)?t:E),it(St,"isEllipsis",E=>{const t=window.getComputedStyle(E),l=E.cloneNode(!0);return l.style.fontFamily=t.fontFamily,l.style.fontSize=t.fontSize,l.style.lineHeight=t.lineHeight,l.style.width=t.width,document.body.appendChild(l),console.log(l,E),console.log(l.scrollWidth,E.clientWidth,l.scrollHeight,E.clientHeight),l.scrollWidth>E.clientWidth||l.scrollHeight>E.clientHeight}),it(St,"oppositeColor",(E,t,l)=>{var c=E.charAt(0)==="#"?E.substring(1,7):E,o=parseInt(c.substring(0,2),16),r=parseInt(c.substring(2,4),16),n=parseInt(c.substring(4,6),16),s=[o/255,r/255,n/255],e=s.map(u=>u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4)),i=.2126*e[0]+.7152*e[1]+.0722*e[2];return i>.179?l:t}),it(St,"parseDate",E=>{var t;return/[^0-9]/.test(E)&&(t=new Date(E)),t}),it(St,"parseDate1",(E,t,l)=>{var c=t.toLowerCase(),o=c.split(l),r=E.split(l),n=o.indexOf("mm"),s=o.indexOf("dd"),e=o.indexOf("yyyy"),i=parseInt(r[n]);i-=1;var u=new Date(r[e],i,r[s]);return u}),it(St,"goto",(E,t)=>{const l=document.querySelector(E);if(console.log(l),console.log(E),!!l)return document.querySelectorAll(".list-wrapper.active,[class*='detail-wrapper-'].active").forEach(c=>{c.classList.remove("active")}),l.classList.add("active"),l}),it(St,"context"),it(St,"measureTextSize",(E,t)=>{if(typeof E=="number"&&(E=E+""),!E)return{width:null,height:null};if(E=E.replaceAll(`
|
|
18
18
|
`,"<br>"),!St.context){const r=document.createElement("canvas");St.context=r.getContext("2d")}St.context.font=t;var l=0,c=0;for(var o of E.split("<br>")){o=o.replace(/<(\/)?([a-zA-Z]*)(\s[a-zA-Z]*=[^>]*)?(\s)*(\/)?>/ig,"");const r=St.context.measureText(o);l=Math.max(l,r.width),c+=r.fontBoundingBoxAscent+r.fontBoundingBoxDescent}return{width:l,height:c}}),it(St,"num2ExcelCol",E=>{let l="";for(;E!==-1;)l=String.fromCharCode(65+E%26)+l,E=Math.floor(E/26)-1;return l}),it(St,"move",(E,t,l)=>{E.splice(l,0,E.splice(t,1)[0])}),it(St,"binarySearchValue",(E,t,l,c,o)=>{Array.isArray(l)||(l=[l]);var r=[];for(var n of l){var s=E.map(e=>e[t]).nineBinarySearch(n);r.push(s<0?n:E[s][c])}return r.join(o||",")}),it(St,"removeIf",(E,t)=>{for(var l=0;l<E.length;){if(t(E[l],l))return E.splice(l,1);++l}}),it(St,"sum",(E,t)=>E.map(l=>l[t]).reduce((l,c)=>l+c)),it(St,"avg",(E,t)=>E.length==0?0:(t&&(E=E.getMap(t)),E.reduce((l,c)=>l+c)/E.length)),it(St,"lpad",(E,t,l)=>Array(t-String(E).length+1).join(l||"0")+E),it(St,"rpad",(E,t,l)=>E+Array(t-String(E).length+1).join(l||"0")),it(St,"cut",(E,t)=>{for(var l=E,c=0,o=0;o<l.length;o++)if(c+=l.charCodeAt(o)>128?2:1,c>t)return l.substring(0,o);return l}),it(St,"getByteLength",E=>E.replace(/[\0-\x7f]|([0-\u07ff]|(.))/g,"$&$1$2").length),it(St,"formatDate",(E,t)=>St.toDate(E,t)),it(St,"toDate",(E,t)=>{var l=new Date,c=t.indexOf("yyyy"),o=t.indexOf("mm"),r=t.indexOf("dd"),n=t.indexOf("hh"),s=t.indexOf("mi"),e=t.indexOf("ss"),i=c>-1?E.substr(c,4):l.getFullYear(),u=o>-1?E.substr(o,2)-1:l.getMonth()-1,a=r>-1?E.substr(r,2):l.getDate(),h=n>-1?E.substr(n,2):l.getHours(),p=s>-1?E.substr(s,2):l.getMinutes(),m=e>-1?E.substr(e,2):l.getSeconds();return new Date(i,u,a,h,p,m)}),it(St,"formatString",(E,t,l)=>isNaN(E)?"":(l=l||"en-US",t=t.toLowerCase(),t.replace("yyyy",E.getFullYear()).replace("yy",E.getYear()).replace("mon",E.toLocaleString(l,{month:"short"})).replace("mm",St.lpad(E.getMonth()+1,2)).replace("dd",St.lpad(E.getDate(),2)).replace("hh",St.lpad(E.getHours(),2)).replace("mi",St.lpad(E.getMinutes(),2)).replace("ss",St.lpad(E.getSeconds(),2)))),it(St,"log",{level:window.location.hostname=="localhost"?St.LOG.LEVEL.DEBUG:St.LOG.LEVEL.WARN}),it(St,"debug",(...E)=>{St.log.level<=St.LOG.LEVEL.DEBUG&&console.trace(...E)}),it(St,"info",(...E)=>{St.log.level<=St.LOG.LEVEL.INFO&&console.trace(...E)}),it(St,"warn",(...E)=>{St.log.level<=St.LOG.LEVEL.WARN&&console.warn(...E)}),it(St,"error",(...E)=>{St.log.level<=St.LOG.LEVEL.ERROR&&console.error(...E)}),it(St,"global",{locale:(navigator.language||navigator.userLanguage||"en").toLowerCase().substring(0,2),lang:navigator.language}),it(St,"setOptions",(E,t)=>{for(const l in t)St.options[E][l]&&(St.options[E][l]=t[l])}),it(St,"loading",{show:()=>{let E=document.getElementById("global-loading-overlay");if(!E){E=document.createElement("div"),E.id="global-loading-overlay",E.className="loading-overlay",E.style.position="fixed",E.style.inset="0",E.style.zIndex="9999",E.style.background="rgba(0, 0, 0, 0.4)",E.style.color="white",E.style.display="flex",E.style.justifyContent="center",E.style.alignItems="center",E.style.fontSize="20px",E.style.pointerEvents="all",E.style.backdropFilter="blur(2px)",E.innerHTML=`
|
|
19
19
|
<div style="text-align: center;">
|
|
20
20
|
<div class="loading-spinner"></div>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
to { transform: rotate(360deg); }
|
|
34
34
|
}
|
|
35
35
|
`,document.head.appendChild(t)}E.style.display="flex"},hide:()=>{const E=document.getElementById("global-loading-overlay");E&&(E.style.display="none")}}),it(St,"i18n",{convertArrayToJSON:E=>{let t={};for(const l of E){if(!l)continue;const c=l.indexOf("=");if(c<=0)continue;const o=l.substring(0,c).split("."),r=l.substring(c+1);let n=t;for(let s=0;s<o.length;s++)s===o.length-1?n[o[s]]=r:(n[o[s]]||(n[o[s]]={}),n=n[o[s]])}return t},updateContent:()=>{St.querySelectorAll("nx-i18n,nx-span").forEach(E=>{E.refresh&&E.refresh()}),St.querySelectorAll("nine-grid").forEach(E=>{E.refresh&&E.refreshData()})},addResourceBundle:E=>{let t=Math.floor(E.length/2);for(var l=0;l<E.length&&!(l+1>=E.length);l+=2){const c=E[l],o=E[l+1];$.ajax({url:o,dataType:"text",success:r=>{i18next.addResourceBundle(c,"translation",St.i18n.convertArrayToJSON(r.split(`
|
|
36
|
-
`))),--t==0&&i18next.changeLanguage(St.global.locale)}})}},init:()=>{i18next.init({lng:St.global.locale,debug:window.location.hostname=="localhost",resources:{}},function(E,t){E&&console.error(E)}),i18next.on("languageChanged",()=>{St.i18n.updateContent()})},t:E=>(console.log(i18next),i18next.t(E))}),it(St,"alert",(E,t,l)=>Ai.alert(E,t,l)),it(St,"filter",(E,t)=>{const l=(c,o)=>{const r=c[o.key];if(o.match){const n=o.match;if(n.value!==void 0)return r===n.value;if(n.any&&Array.isArray(n.any))return n.any.includes(r);if(n.all&&Array.isArray(n.all))return Array.isArray(r)?n.all.every(s=>r.includes(s)):!1;if(n.text!==void 0)return typeof r=="string"&&r.includes(n.text)}if(o.range){const n=o.range;return typeof r=="string"&&typeof n.gte=="string"||typeof r=="number"?!(n.gte!==void 0&&r<n.gte||n.gt!==void 0&&r<=n.gt||n.lte!==void 0&&r>n.lte||n.lt!==void 0&&r>=n.lt):!1}return!1};return!E||!Array.isArray(E)?(console.error("첫 번째 인수는 JSON 배열이어야 합니다."),[]):!t||typeof t!="object"?E:E.filter(c=>!(t.must&&!t.must.every(o=>l(c,o))||t.should&&t.should.length>0&&!t.should.some(o=>l(c,o))||(t.should&&t.should.length===0&&(t.must||t.must_not),t.must_not&&t.must_not.some(o=>l(c,o)))))}),it(St,"j",{copyEvents:(E,t)=>{const l=getEventListeners(E);for(const[c,o]of Object.entries(l))o.forEach(r=>{t.addEventListener(c,r.listener,r.options)})},querySelectorAll:(E,t=document)=>{let l=[];return t instanceof NodeList?t.forEach(c=>{E instanceof NodeList?E.forEach(o=>{l.push(...c.querySelectorAll(o))}):E instanceof HTMLElement?l.push(...c.querySelectorAll(E)):l.push(...c.querySelectorAll(E))}):E instanceof HTMLElement?l=[E]:E instanceof NodeList?E.forEach(c=>{l.push(...t.querySelectorAll(c))}):l=t.querySelectorAll(E),{elements:l,elem(){return l[0]},clone(c=!1){const o=[];return l.forEach(r=>{const n=r.cloneNode(!0);c&&St.j.copyEvents(r,n),o.push(n)}),this.elements=o,this},children(){let c=[];return l.forEach(o=>{c.push(...o.children)}),this.elements=c,this},attr(c,o){return o===void 0?l[0]?l[0].getAttribute(c):null:(l.forEach(r=>{o===!1?r.removeAttribute(c):r.setAttribute(c,o===!0?"true":o)}),this)},removeAttr(...c){return c.forEach(o=>{l.forEach(r=>{r.removeAttribute(o)})}),this},css(c,o){return l.forEach(r=>{r.style[c]=o}),this},hasClass(c){return(Array.isArray(l)?l:Array.from(l)).some(r=>r.classList.contains(c))},addClass(c){return l.forEach(o=>{o.classList.add(c)}),this},removeClass(c){return l.forEach(o=>{o.classList.remove(c)}),this},show(){return l.forEach(c=>{c.style.display="",getComputedStyle(c).display==="none"&&(c.style.display="block")}),this},hide(){return l.forEach(c=>{c.style.display="none"}),this}}}}),it(St,"x",{querySelectorAll:(E,t=document)=>{let l=E instanceof HTMLElement?[E]:t.querySelectorAll(E);return{elements:l,elem:function(){return l[0]},attr:function(c,o){return o===void 0?l[0]?l[0].getAttribute(c):null:(l.forEach(r=>{o===!1?r.removeAttribute(c):r.setAttribute(c,o===!0?"true":o)}),this)},css:function(c,o){return l.forEach(r=>{r.style[c]=o}),this},addClass:function(c){return l.forEach(o=>{o.classList.contains(c)||o.classList.add(c)}),this},removeClass:function(c){return l.forEach(o=>{o.classList.contains(c)&&o.classList.remove(c)}),this}}}});let H=St;Array.prototype.nineBinarySearch=function(vt){let E=0,t=this.length-1,l;for(;E<=t;){if(l=parseInt((E+t)/2),vt==this[l])return l;vt<this[l]?t=l-1:E=l+1}return-1};class Hu extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const E=document.createElement("button");E.textContent="클릭하세요!",E.style.padding="10px",E.style.backgroundColor="blue",E.style.color="white",this.shadowRoot.appendChild(E)}}customElements.get("nine-grid4")||customElements.define("nine-grid4",Hu);class zu extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const E=document.createElement("button");E.textContent="클릭하세요!",E.style.padding="10px",E.style.backgroundColor="blue",E.style.color="white",this.shadowRoot.appendChild(E)}}customElements.get("nine-grid2")||customElements.define("nine-grid2",zu);class _r extends HTMLElement{constructor(){super();Y(this,Jn);Y(this,Qn);Y(this,to);Y(this,ls);it(this,"getDisplayText",t=>{if(this.cell)if(this.cell.closest("tbody")){const l=this.cell.closest("tr").data,c=parseInt(this.cell.dataset.row);if(!l)return"";if(H.isNull(this.cell.dataset.expr)){if(!H.isNull(this.cell.dataset.bind))return l[this.cell.dataset.bind]||H.nvl(t,"")}else try{return this.getExprValue(this.cell.dataset.expr,l,c,this.cell)}catch{console.error(this.cell.dataset.expr,l,this.cell.dataset.row)}return H.nvl(t,"")}else try{return this.owner.exprFunction(this.cell.dataset.expr).call(this,null,-1,this.owner.data)}catch{}});it(this,"reset",()=>{var t=parseInt(this.cell.dataset.row),l=this.cell.closest("tr"),c=l.data;if(c||(c=this.owner.data.get(t),this.owner.body.querySelectorAll(`.ng-container tbody tr[data-row="${t}"]`).forEach(i=>{i.data=c})),this.cell.dataset.bind&&this.shadowRoot.querySelector("input,textarea,button")&&(H.j.querySelectorAll(this.cell).removeClass("ng-changed"),c.__ng.o.hasOwnProperty(this.cell.dataset.bind)&&c[this.cell.dataset.bind]!=c.__ng.o[this.cell.dataset.bind]&&H.j.querySelectorAll(this.cell).addClass("ng-changed")),(this.getAttribute("show-icon")||this.cell.getAttribute("show-icon"))=="true"){var e=this.getAttribute("icon-color")||this.cell.getAttribute("icon-color");if(e){var o=this.getExprValue(e,c,t);this.shadowRoot.querySelector("ng-expand-icon").setAttribute("color",o)}var e=this.getAttribute("icon-src")||this.cell.getAttribute("icon-src");if(e){var r=this.getExprValue(e,c,t);this.shadowRoot.querySelector("ng-expand-icon").setAttribute("src",r)}}if(f(this,ls)){var e=this.getAttribute("button-image")||this.cell.getAttribute("button-image");if(e){var r=this.getExprValue(e,c,t);r&&($(f(this,ls)).text(""),$(f(this,ls)).css({border:"none","background-color":"transparent","background-image":r.startsWith("<svg")?`url('data:image/svg+xml;utf8,${r}')`:`url("${r}")`}))}}var e=this.getAttribute("class-expr");if(e){this.classList.forEach(i=>{["aaa"].includes(i)||this.classList.remove(i)});var n=this.getExprValue(e,c,t);n&&this.classList.toggle(n)}var e=this.cell.getAttribute("enable-check");if(e){var s=this.shadowRoot.querySelector("ng-expand-check");s&&s.shadowRoot.querySelector("input").setAttribute("disabled",!this.getExprValue(e,c,t))}var e=this.cell.getAttribute("enable-button");if(e){var s=this.shadowRoot.querySelector("ng-expand-button");s&&s.shadowRoot.querySelector("button").setAttribute("disabled",!this.getExprValue(e,c,t))}var e=this.getAttribute("visible")||this.cell.getAttribute("visible");e?this.getExprValue(e,c,t)?H.j.querySelectorAll(this.cell).removeClass("hidden"):H.j.querySelectorAll(this.cell).addClass("hidden"):H.j.querySelectorAll(this.cell).removeClass("hidden");var e=this.getAttribute("enable")||this.cell.getAttribute("enable");e?H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("disabled",!this.getExprValue(e,c,t)):H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("disabled",!1);var e=this.getAttribute("readonly")||this.cell.getAttribute("readonly");e?H.j.querySelectorAll("input,textarea",this.shadowRoot).attr("readonly",this.getExprValue(e,c,t)):H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("readonly",!1),["color","background-color","class"].forEach(i=>{var u=this.cell.getAttribute(i);u&&$(this.cell).css({[i]:this.getExprValue(u,c,t)})}),$(this.cell).children().each((i,u)=>{var a=u.getAttribute("tooltip");a&&H.j.querySelectorAll(u).attr("title",this.owner.exprFunction(a).call(this,this.cell.closest("tr").data,t))}),f(this,ql).call(this)});Y(this,ql,()=>{if(!(!this.owner||!this.owner.template||!this.cell.closest("tbody.bindable"))){var t=H.j.querySelectorAll(this.cell).attr("suppress");if(t&&(t=parseInt(t)),t&&!isNaN(t)){var l=this.cell.closest("tr"),c=[];$("th,td",l).each((b,g)=>{var S=H.j.querySelectorAll(g).attr("suppress");S&&g.dataset.row&&(S=parseInt(S),!isNaN(S)&&S<=t&&c.push(S))}),c.sort();var o=!1;if(parseInt(l.sectionRowIndex/this.owner.template.length)>0)for(var r of c){if(r>t)break;var n=parseInt(this.cell.dataset.row),s=n-1,e=this.cell.closest("tr").data,i=this.owner.data.get(s);this.cell.dataset.matrixRow;var u=this.owner.body.querySelector(`tbody.bindable [suppress="${r}"][data-matrix-row="${this.cell.dataset.matrixRow}"]`),a=u.dataset.expr?this.getExprValue(u.dataset.expr,e,n):e[u.dataset.bind],h=u.dataset.expr?this.getExprValue(u.dataset.expr,i,s):i[u.dataset.bind];if(a!=h){o=!0;break}}else o=!0;o?H.j.querySelectorAll(this.cell).removeClass("suppress"):H.j.querySelectorAll(this.cell).addClass("suppress"),H.j.querySelectorAll(this.cell).hasClass("hidden")||(o?H.j.querySelectorAll(this.cell).removeClass("hidden"):H.j.querySelectorAll(this.cell).addClass("hidden"));var p=parseInt(this.cell.dataset.matrixRow),m=p-1,d=this.owner.body.querySelector(`tbody.bindable [data-col="${this.cell.dataset.col}"][data-matrix-row="${m}"]`);$(d).hasClass("suppress")&&!H.j.querySelectorAll(this.cell).hasClass("suppress")?H.j.querySelectorAll(d).removeClass("last-none-suppress").addClass("last-suppress"):!$(d).hasClass("suppress")&&H.j.querySelectorAll(this.cell).hasClass("suppress")?H.j.querySelectorAll(d).removeClass("last-suppress").addClass("last-none-suppress"):H.j.querySelectorAll(d).removeClass("last-none-suppress").removeClass("last-suppress")}}});it(this,"getExprValue",(t,l,c,o)=>{if(typeof t<"u")try{c=parseInt(c);const r=t.replace("()","");return this.owner[r]?this.owner[r].call(this,l,c,this.cell):this.owner.exprFunction(t).call(this,l,c,this.owner.data)}catch{return["NG-COMBO"].includes(this.tagName)?"":t}else return t});this.attachShadow({mode:"open"})}connectedCallback(){let t=this.getRootNode().host;if(t&&t.tagName!="NINE-GRID"&&(t=t.getRootNode().host),this.owner=t&&t.tagName=="NINE-GRID"?t:null,this.cell=this.closest("th,td"),this.cell&&this.shadowRoot){tt(this,Jn,this.getAttribute("show-icon")=="true"||this.cell.getAttribute("show-icon")=="true"),tt(this,Qn,this.getAttribute("show-check")=="true"||this.cell.getAttribute("show-check")=="true"),tt(this,to,this.getAttribute("show-button")=="true"||this.cell.getAttribute("show-button")=="true"),this.cell.dataset.bind&&H.j.querySelectorAll(this).addClass(this.cell.dataset.bind);const c=this.shadowRoot.querySelector("style"),o=this.getAttribute("text-align")||this.cell.getAttribute("text-align")||"left";if(H.j.querySelectorAll(this).addClass(`ng-${o}`),f(this,Jn)){const s=this.getAttribute("icon-type")||this.cell.getAttribute("icon-type")||"sphere",e=this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",i=this.getAttribute("icon-width")||this.cell.getAttribute("icon-width")||this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",u=this.getAttribute("icon-height")||this.cell.getAttribute("icon-height")||this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",a=this.getAttribute("icon-color")||this.cell.getAttribute("icon-color")||"gray",h=this.getAttribute("icon-position")||this.cell.getAttribute("icon-position")||"left-first",p=h.startsWith("left"),m=`<ng-expand-icon class="ng-${p?"left":"right"} ng-${h}" type="${s}" size="${e}" width="${i}" height="${u}" color="${a}"></ng-expand-icon>`;p?c?$(c).after(m):$(this.shadowRoot).prepend(m):$(this.shadowRoot).append(m)}if(f(this,Qn)){const s=this.getAttribute("check-position")||this.cell.getAttribute("check-position")||"left-first",e=s.startsWith("left"),i=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}`),u=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-first`),a=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-second`),h=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-third`),p=`<ng-expand-check class="ng-${e?"left":"right"} ng-${s}"></ng-expand-check>`;e?i&&s.endsWith("second")?a||u?$(a||u).after(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):i&&s.endsWith("third")?h||a||u?$(h||a||u).after(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):i&&s.endsWith("first")?u||a||h?$(u||a||h).before(p):$(this.shadowRoot).append(p):i&&s.endsWith("second")?a||h?$(a||h).before(p):$(this.shadowRoot).append(p):$(this.shadowRoot).append(p)}if(f(this,to)){const s=this.getAttribute("button-text")||this.cell.getAttribute("button-text"),e=this.getAttribute("button-width")||this.cell.getAttribute("button-width"),i=this.getAttribute("button-image")||this.cell.getAttribute("button-image"),u=this.getAttribute("button-position")||this.cell.getAttribute("button-position")||"right-third",a=u.startsWith("left"),h=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}`),p=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-first`),m=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-second`),d=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-third`),b=`<ng-expand-button class="ng-${a?"left":"right"} ng-${u}"></ng-expand-button>`;if(a?h&&u.endsWith("second")?m||p?$(m||p).after(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):h&&u.endsWith("third")?d||m||p?$(d||m||p).after(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):h&&u.endsWith("first")?p||m||d?$(p||m||d).before(b):$(this.shadowRoot).append(b):h&&u.endsWith("second")?m||d?$(m||d).before(b):$(this.shadowRoot).append(b):$(this.shadowRoot).append(b),tt(this,ls,this.shadowRoot.querySelector("ng-expand-button").shadowRoot.querySelector("button")),s&&$(f(this,ls)).text(s),e&&$(f(this,ls)).css({width:e}),["NG-INPUT","NG-TEXTAREA"].includes(this.tagName)&&!i){const g=this.shadowRoot.querySelector("input[type=text],textarea").previousElementSibling,S=this.shadowRoot.querySelector("input[type=text],textarea").nextElementSibling;g.tagName=="NG-EXPAND-BUTTON"?(H.j.querySelectorAll(this.shadowRoot.querySelector("input[type=text],textarea")).addClass("border-left-none"),H.j.querySelectorAll(g).addClass("border-right-none")):S.tagName=="NG-EXPAND-BUTTON"&&(H.j.querySelectorAll(this.shadowRoot.querySelector("input[type=text],textarea")).addClass("border-right-none"),H.j.querySelectorAll(S).addClass("border-left-none"))}}const r=this.shadowRoot.querySelectorAll(".ng-left");r.length>0&&H.j.querySelectorAll(r[0]).addClass("ng-first");const n=this.shadowRoot.querySelectorAll(".ng-right");if(n.length>0&&H.j.querySelectorAll(n[n.length-1]).addClass("ng-last"),this.closest("tbody")&&this.cell.dataset.bind){const s=this.shadowRoot.querySelector("ng-expand-check");s&&$("input",s.shadowRoot).on("change",e=>{var i=this.cell.closest("tr").data;i.__ng.c[this.cell.dataset.bind]=!!$(e.target).is(":checked")})}}this.shadowRoot.querySelectorAll("button,ng-expand-button").forEach(c=>{$(c).on("click",o=>{var n,s,e;let r=this.getAttribute("onbuttonclick")||this.getAttribute("onButtonClick")||((n=this.cell)==null?void 0:n.getAttribute("onbuttonclick"))||((s=this.cell)==null?void 0:s.getAttribute("onButtonClick"));if(r&&this.owner){r=r.replace("()","");const i=r.match(/^(\w+)\s*\(/),u=i==null?void 0:i[1];this.owner[u]?this.owner[u].call(this.owner,this.cell.closest("tr").data,parseInt(this.cell.dataset.row),this.cell):this.owner.exprFunction(r).call(this,this.cell.closest("tr").data,parseInt(this.cell.dataset.row))}(e=this.owner)==null||e.dispatchEvent(new CustomEvent(H.EVENT.BUTTON_CLICK,{detail:{target:this.cell,data:this.cell.closest("tr").data,currow:parseInt(this.cell.dataset.row)},bubbles:!0,composed:!0}))})});var l=this.shadowRoot.querySelector(".renderer");if(l){let c=this.getAttribute("onlinkclick")||this.getAttribute("onLinkClick");this.getAttribute("link")=="true"&&(H.j.querySelectorAll(l).addClass("link"),l.addEventListener("click",o=>{if(c){c=c.replace("()","");const r=c.match(/^(\w+)\s*\(/),n=r==null?void 0:r[1];console.log(n),this.owner[n]?this.owner[n].call(this.owner,this.cell.closest("tr").data,parseInt(this.cell.dataset.row),this.cell):this.owner.exprFunction(c).call(this,this.cell.closest("tr").data,parseInt(this.cell.dataset.row))}this.owner.dispatchEvent(new CustomEvent(H.EVENT.LINK_CLICK,{detail:{target:this.cell,data:this.cell.closest("tr").data,currow:parseInt(this.cell.dataset.row)},bubbles:!0,composed:!0}))}))}}get value(){var t=!this.owner||!this.owner.dataManager||!this.cell||!this.cell.dataset||!this.cell.dataset.row||!this.cell.dataset.bind?"":this.cell.closest("tr").data[this.cell.dataset.bind];return t??""}set value(t){var l=parseInt(this.cell.dataset.row);const c=this.getAttribute("update-row-state")!="false";l<0?this.owner.data.setValueNF(parseInt(this.cell.dataset.index),this.cell.dataset.bind,t,c):this.owner.data.setValue(l,this.cell.dataset.bind,t,c)}get row(){return parseInt(this.cell.dataset.row)}get data(){return this.cell.closest("tr").data}}Jn=new WeakMap,Qn=new WeakMap,to=new WeakMap,ls=new WeakMap,ql=new WeakMap;class Qs extends _r{constructor(){super()}connectedCallback(){super.connectedCallback(),$("input,textarea",this.shadowRoot).on("change",E=>{if(this.closest("tbody")){switch(E.target.getAttribute("type")){case"checkbox":this.value=$(E.target).is(":checked")?this.trueValue:this.falseValue;break;case"radio":this.tagName=="NG-CHECKBOX"&&this.selectAll(!1),this.value=$(E.target).val();break;default:var t=this.getAttribute("maxbyte");t&&(t=parseInt(t),H.getByteLength(E.target.value)>=t&&(E.target.value=H.cut(E.target.value,t)));var l=$(E.target).val();this.value=H.j.querySelectorAll(this).attr("type")=="number"?isNaN(l)?"":Number(l):l;break}this.owner.refreshData(this.cell.dataset.row)}})}}class Uu extends _r{constructor(){super();Y(this,Cs);it(this,"dataRefresh",t=>{f(this,Cs).innerHTML=this.getDisplayText(this.getAttribute("text"));var l=parseInt(this.cell.dataset.row);const c=this.cell.closest("tr").data;["color","background","border"].forEach(o=>{var r=f(this,Cs).getAttribute(o);r&&$(f(this,Cs)).css({[o]:this.getExprValue(r,c,l)})}),t||this.reset()})}connectedCallback(){for(var t=[],l=0;l<this.attributes.length;l++)["color","background","border"].includes(this.attributes[l].name)&&t.push(`${this.attributes[l].name}="${this.attributes[l].value}"`);this.shadowRoot.innerHTML=`
|
|
36
|
+
`))),--t==0&&i18next.changeLanguage(St.global.locale)}})}},init:()=>{i18next.init({lng:St.global.locale,debug:window.location.hostname=="localhost",resources:{}},function(E,t){E&&console.error(E)}),i18next.on("languageChanged",()=>{St.i18n.updateContent()})},t:E=>(console.log(i18next),i18next.t(E))}),it(St,"alert",(E,t,l)=>Ti.alert(E,t,l)),it(St,"filter",(E,t)=>{const l=(c,o)=>{const r=c[o.key];if(o.match){const n=o.match;if(n.value!==void 0)return r===n.value;if(n.any&&Array.isArray(n.any))return n.any.includes(r);if(n.all&&Array.isArray(n.all))return Array.isArray(r)?n.all.every(s=>r.includes(s)):!1;if(n.text!==void 0)return typeof r=="string"&&r.includes(n.text)}if(o.range){const n=o.range;return typeof r=="string"&&typeof n.gte=="string"||typeof r=="number"?!(n.gte!==void 0&&r<n.gte||n.gt!==void 0&&r<=n.gt||n.lte!==void 0&&r>n.lte||n.lt!==void 0&&r>=n.lt):!1}return!1};return!E||!Array.isArray(E)?(console.error("첫 번째 인수는 JSON 배열이어야 합니다."),[]):!t||typeof t!="object"?E:E.filter(c=>!(t.must&&!t.must.every(o=>l(c,o))||t.should&&t.should.length>0&&!t.should.some(o=>l(c,o))||(t.should&&t.should.length===0&&(t.must||t.must_not),t.must_not&&t.must_not.some(o=>l(c,o)))))}),it(St,"j",{copyEvents:(E,t)=>{const l=getEventListeners(E);for(const[c,o]of Object.entries(l))o.forEach(r=>{t.addEventListener(c,r.listener,r.options)})},querySelectorAll:(E,t=document)=>{let l=[];return t instanceof NodeList?t.forEach(c=>{E instanceof NodeList?E.forEach(o=>{l.push(...c.querySelectorAll(o))}):E instanceof HTMLElement?l.push(...c.querySelectorAll(E)):l.push(...c.querySelectorAll(E))}):E instanceof HTMLElement?l=[E]:E instanceof NodeList?E.forEach(c=>{l.push(...t.querySelectorAll(c))}):l=t.querySelectorAll(E),{elements:l,elem(){return l[0]},clone(c=!1){const o=[];return l.forEach(r=>{const n=r.cloneNode(!0);c&&St.j.copyEvents(r,n),o.push(n)}),this.elements=o,this},children(){let c=[];return l.forEach(o=>{c.push(...o.children)}),this.elements=c,this},attr(c,o){return o===void 0?l[0]?l[0].getAttribute(c):null:(l.forEach(r=>{o===!1?r.removeAttribute(c):r.setAttribute(c,o===!0?"true":o)}),this)},removeAttr(...c){return c.forEach(o=>{l.forEach(r=>{r.removeAttribute(o)})}),this},css(c,o){return l.forEach(r=>{r.style[c]=o}),this},hasClass(c){return(Array.isArray(l)?l:Array.from(l)).some(r=>r.classList.contains(c))},addClass(c){return l.forEach(o=>{o.classList.add(c)}),this},removeClass(c){return l.forEach(o=>{o.classList.remove(c)}),this},show(){return l.forEach(c=>{c.style.display="",getComputedStyle(c).display==="none"&&(c.style.display="block")}),this},hide(){return l.forEach(c=>{c.style.display="none"}),this}}}}),it(St,"x",{querySelectorAll:(E,t=document)=>{let l=E instanceof HTMLElement?[E]:t.querySelectorAll(E);return{elements:l,elem:function(){return l[0]},attr:function(c,o){return o===void 0?l[0]?l[0].getAttribute(c):null:(l.forEach(r=>{o===!1?r.removeAttribute(c):r.setAttribute(c,o===!0?"true":o)}),this)},css:function(c,o){return l.forEach(r=>{r.style[c]=o}),this},addClass:function(c){return l.forEach(o=>{o.classList.contains(c)||o.classList.add(c)}),this},removeClass:function(c){return l.forEach(o=>{o.classList.contains(c)&&o.classList.remove(c)}),this}}}});let H=St;Array.prototype.nineBinarySearch=function(vt){let E=0,t=this.length-1,l;for(;E<=t;){if(l=parseInt((E+t)/2),vt==this[l])return l;vt<this[l]?t=l-1:E=l+1}return-1};class Hu extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const E=document.createElement("button");E.textContent="클릭하세요!",E.style.padding="10px",E.style.backgroundColor="blue",E.style.color="white",this.shadowRoot.appendChild(E)}}customElements.get("nine-grid4")||customElements.define("nine-grid4",Hu);class zu extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const E=document.createElement("button");E.textContent="클릭하세요!",E.style.padding="10px",E.style.backgroundColor="blue",E.style.color="white",this.shadowRoot.appendChild(E)}}customElements.get("nine-grid2")||customElements.define("nine-grid2",zu);class _r extends HTMLElement{constructor(){super();Y(this,Jn);Y(this,Qn);Y(this,to);Y(this,ls);it(this,"getDisplayText",t=>{if(this.cell)if(this.cell.closest("tbody")){const l=this.cell.closest("tr").data,c=parseInt(this.cell.dataset.row);if(!l)return"";if(H.isNull(this.cell.dataset.expr)){if(!H.isNull(this.cell.dataset.bind))return l[this.cell.dataset.bind]||H.nvl(t,"")}else try{return this.getExprValue(this.cell.dataset.expr,l,c,this.cell)}catch{console.error(this.cell.dataset.expr,l,this.cell.dataset.row)}return H.nvl(t,"")}else try{return this.owner.exprFunction(this.cell.dataset.expr).call(this,null,-1,this.owner.data)}catch{}});it(this,"reset",()=>{var t=parseInt(this.cell.dataset.row),l=this.cell.closest("tr"),c=l.data;if(c||(c=this.owner.data.get(t),this.owner.body.querySelectorAll(`.ng-container tbody tr[data-row="${t}"]`).forEach(i=>{i.data=c})),this.cell.dataset.bind&&this.shadowRoot.querySelector("input,textarea,button")&&(H.j.querySelectorAll(this.cell).removeClass("ng-changed"),c.__ng.o.hasOwnProperty(this.cell.dataset.bind)&&c[this.cell.dataset.bind]!=c.__ng.o[this.cell.dataset.bind]&&H.j.querySelectorAll(this.cell).addClass("ng-changed")),(this.getAttribute("show-icon")||this.cell.getAttribute("show-icon"))=="true"){var e=this.getAttribute("icon-color")||this.cell.getAttribute("icon-color");if(e){var o=this.getExprValue(e,c,t);this.shadowRoot.querySelector("ng-expand-icon").setAttribute("color",o)}var e=this.getAttribute("icon-src")||this.cell.getAttribute("icon-src");if(e){var r=this.getExprValue(e,c,t);this.shadowRoot.querySelector("ng-expand-icon").setAttribute("src",r)}}if(f(this,ls)){var e=this.getAttribute("button-image")||this.cell.getAttribute("button-image");if(e){var r=this.getExprValue(e,c,t);r&&($(f(this,ls)).text(""),$(f(this,ls)).css({border:"none","background-color":"transparent","background-image":r.startsWith("<svg")?`url('data:image/svg+xml;utf8,${r}')`:`url("${r}")`}))}}var e=this.getAttribute("class-expr");if(e){this.classList.forEach(i=>{["aaa"].includes(i)||this.classList.remove(i)});var n=this.getExprValue(e,c,t);n&&this.classList.toggle(n)}var e=this.cell.getAttribute("enable-check");if(e){var s=this.shadowRoot.querySelector("ng-expand-check");s&&s.shadowRoot.querySelector("input").setAttribute("disabled",!this.getExprValue(e,c,t))}var e=this.cell.getAttribute("enable-button");if(e){var s=this.shadowRoot.querySelector("ng-expand-button");s&&s.shadowRoot.querySelector("button").setAttribute("disabled",!this.getExprValue(e,c,t))}var e=this.getAttribute("visible")||this.cell.getAttribute("visible");e?this.getExprValue(e,c,t)?H.j.querySelectorAll(this.cell).removeClass("hidden"):H.j.querySelectorAll(this.cell).addClass("hidden"):H.j.querySelectorAll(this.cell).removeClass("hidden");var e=this.getAttribute("enable")||this.cell.getAttribute("enable");e?H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("disabled",!this.getExprValue(e,c,t)):H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("disabled",!1);var e=this.getAttribute("readonly")||this.cell.getAttribute("readonly");e?H.j.querySelectorAll("input,textarea",this.shadowRoot).attr("readonly",this.getExprValue(e,c,t)):H.j.querySelectorAll("input,textarea,button",this.shadowRoot).attr("readonly",!1),["color","background-color","class"].forEach(i=>{var u=this.cell.getAttribute(i);u&&$(this.cell).css({[i]:this.getExprValue(u,c,t)})}),$(this.cell).children().each((i,u)=>{var a=u.getAttribute("tooltip");a&&H.j.querySelectorAll(u).attr("title",this.owner.exprFunction(a).call(this,this.cell.closest("tr").data,t))}),f(this,ql).call(this)});Y(this,ql,()=>{if(!(!this.owner||!this.owner.template||!this.cell.closest("tbody.bindable"))){var t=H.j.querySelectorAll(this.cell).attr("suppress");if(t&&(t=parseInt(t)),t&&!isNaN(t)){var l=this.cell.closest("tr"),c=[];$("th,td",l).each((b,g)=>{var S=H.j.querySelectorAll(g).attr("suppress");S&&g.dataset.row&&(S=parseInt(S),!isNaN(S)&&S<=t&&c.push(S))}),c.sort();var o=!1;if(parseInt(l.sectionRowIndex/this.owner.template.length)>0)for(var r of c){if(r>t)break;var n=parseInt(this.cell.dataset.row),s=n-1,e=this.cell.closest("tr").data,i=this.owner.data.get(s);this.cell.dataset.matrixRow;var u=this.owner.body.querySelector(`tbody.bindable [suppress="${r}"][data-matrix-row="${this.cell.dataset.matrixRow}"]`),a=u.dataset.expr?this.getExprValue(u.dataset.expr,e,n):e[u.dataset.bind],h=u.dataset.expr?this.getExprValue(u.dataset.expr,i,s):i[u.dataset.bind];if(a!=h){o=!0;break}}else o=!0;o?H.j.querySelectorAll(this.cell).removeClass("suppress"):H.j.querySelectorAll(this.cell).addClass("suppress"),H.j.querySelectorAll(this.cell).hasClass("hidden")||(o?H.j.querySelectorAll(this.cell).removeClass("hidden"):H.j.querySelectorAll(this.cell).addClass("hidden"));var p=parseInt(this.cell.dataset.matrixRow),m=p-1,d=this.owner.body.querySelector(`tbody.bindable [data-col="${this.cell.dataset.col}"][data-matrix-row="${m}"]`);$(d).hasClass("suppress")&&!H.j.querySelectorAll(this.cell).hasClass("suppress")?H.j.querySelectorAll(d).removeClass("last-none-suppress").addClass("last-suppress"):!$(d).hasClass("suppress")&&H.j.querySelectorAll(this.cell).hasClass("suppress")?H.j.querySelectorAll(d).removeClass("last-suppress").addClass("last-none-suppress"):H.j.querySelectorAll(d).removeClass("last-none-suppress").removeClass("last-suppress")}}});it(this,"getExprValue",(t,l,c,o)=>{if(typeof t<"u")try{c=parseInt(c);const r=t.replace("()","");return this.owner[r]?this.owner[r].call(this,l,c,this.cell):this.owner.exprFunction(t).call(this,l,c,this.owner.data)}catch{return["NG-COMBO"].includes(this.tagName)?"":t}else return t});this.attachShadow({mode:"open"})}connectedCallback(){let t=this.getRootNode().host;if(t&&t.tagName!="NINE-GRID"&&(t=t.getRootNode().host),this.owner=t&&t.tagName=="NINE-GRID"?t:null,this.cell=this.closest("th,td"),this.cell&&this.shadowRoot){tt(this,Jn,this.getAttribute("show-icon")=="true"||this.cell.getAttribute("show-icon")=="true"),tt(this,Qn,this.getAttribute("show-check")=="true"||this.cell.getAttribute("show-check")=="true"),tt(this,to,this.getAttribute("show-button")=="true"||this.cell.getAttribute("show-button")=="true"),this.cell.dataset.bind&&H.j.querySelectorAll(this).addClass(this.cell.dataset.bind);const c=this.shadowRoot.querySelector("style"),o=this.getAttribute("text-align")||this.cell.getAttribute("text-align")||"left";if(H.j.querySelectorAll(this).addClass(`ng-${o}`),f(this,Jn)){const s=this.getAttribute("icon-type")||this.cell.getAttribute("icon-type")||"sphere",e=this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",i=this.getAttribute("icon-width")||this.cell.getAttribute("icon-width")||this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",u=this.getAttribute("icon-height")||this.cell.getAttribute("icon-height")||this.getAttribute("icon-size")||this.cell.getAttribute("icon-size")||"8",a=this.getAttribute("icon-color")||this.cell.getAttribute("icon-color")||"gray",h=this.getAttribute("icon-position")||this.cell.getAttribute("icon-position")||"left-first",p=h.startsWith("left"),m=`<ng-expand-icon class="ng-${p?"left":"right"} ng-${h}" type="${s}" size="${e}" width="${i}" height="${u}" color="${a}"></ng-expand-icon>`;p?c?$(c).after(m):$(this.shadowRoot).prepend(m):$(this.shadowRoot).append(m)}if(f(this,Qn)){const s=this.getAttribute("check-position")||this.cell.getAttribute("check-position")||"left-first",e=s.startsWith("left"),i=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}`),u=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-first`),a=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-second`),h=this.shadowRoot.querySelector(`.ng-${e?"left":"right"}-third`),p=`<ng-expand-check class="ng-${e?"left":"right"} ng-${s}"></ng-expand-check>`;e?i&&s.endsWith("second")?a||u?$(a||u).after(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):i&&s.endsWith("third")?h||a||u?$(h||a||u).after(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):c?$(c).after(p):$(this.shadowRoot).prepend(p):i&&s.endsWith("first")?u||a||h?$(u||a||h).before(p):$(this.shadowRoot).append(p):i&&s.endsWith("second")?a||h?$(a||h).before(p):$(this.shadowRoot).append(p):$(this.shadowRoot).append(p)}if(f(this,to)){const s=this.getAttribute("button-text")||this.cell.getAttribute("button-text"),e=this.getAttribute("button-width")||this.cell.getAttribute("button-width"),i=this.getAttribute("button-image")||this.cell.getAttribute("button-image"),u=this.getAttribute("button-position")||this.cell.getAttribute("button-position")||"right-third",a=u.startsWith("left"),h=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}`),p=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-first`),m=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-second`),d=this.shadowRoot.querySelector(`.ng-${a?"left":"right"}-third`),b=`<ng-expand-button class="ng-${a?"left":"right"} ng-${u}"></ng-expand-button>`;if(a?h&&u.endsWith("second")?m||p?$(m||p).after(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):h&&u.endsWith("third")?d||m||p?$(d||m||p).after(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):c?$(c).after(b):$(this.shadowRoot).prepend(b):h&&u.endsWith("first")?p||m||d?$(p||m||d).before(b):$(this.shadowRoot).append(b):h&&u.endsWith("second")?m||d?$(m||d).before(b):$(this.shadowRoot).append(b):$(this.shadowRoot).append(b),tt(this,ls,this.shadowRoot.querySelector("ng-expand-button").shadowRoot.querySelector("button")),s&&$(f(this,ls)).text(s),e&&$(f(this,ls)).css({width:e}),["NG-INPUT","NG-TEXTAREA"].includes(this.tagName)&&!i){const g=this.shadowRoot.querySelector("input[type=text],textarea").previousElementSibling,S=this.shadowRoot.querySelector("input[type=text],textarea").nextElementSibling;g.tagName=="NG-EXPAND-BUTTON"?(H.j.querySelectorAll(this.shadowRoot.querySelector("input[type=text],textarea")).addClass("border-left-none"),H.j.querySelectorAll(g).addClass("border-right-none")):S.tagName=="NG-EXPAND-BUTTON"&&(H.j.querySelectorAll(this.shadowRoot.querySelector("input[type=text],textarea")).addClass("border-right-none"),H.j.querySelectorAll(S).addClass("border-left-none"))}}const r=this.shadowRoot.querySelectorAll(".ng-left");r.length>0&&H.j.querySelectorAll(r[0]).addClass("ng-first");const n=this.shadowRoot.querySelectorAll(".ng-right");if(n.length>0&&H.j.querySelectorAll(n[n.length-1]).addClass("ng-last"),this.closest("tbody")&&this.cell.dataset.bind){const s=this.shadowRoot.querySelector("ng-expand-check");s&&$("input",s.shadowRoot).on("change",e=>{var i=this.cell.closest("tr").data;i.__ng.c[this.cell.dataset.bind]=!!$(e.target).is(":checked")})}}this.shadowRoot.querySelectorAll("button,ng-expand-button").forEach(c=>{$(c).on("click",o=>{var n,s,e;let r=this.getAttribute("onbuttonclick")||this.getAttribute("onButtonClick")||((n=this.cell)==null?void 0:n.getAttribute("onbuttonclick"))||((s=this.cell)==null?void 0:s.getAttribute("onButtonClick"));if(r&&this.owner){r=r.replace("()","");const i=r.match(/^(\w+)\s*\(/),u=i==null?void 0:i[1];this.owner[u]?this.owner[u].call(this.owner,this.cell.closest("tr").data,parseInt(this.cell.dataset.row),this.cell):this.owner.exprFunction(r).call(this,this.cell.closest("tr").data,parseInt(this.cell.dataset.row))}(e=this.owner)==null||e.dispatchEvent(new CustomEvent(H.EVENT.BUTTON_CLICK,{detail:{target:this.cell,data:this.cell.closest("tr").data,currow:parseInt(this.cell.dataset.row)},bubbles:!0,composed:!0}))})});var l=this.shadowRoot.querySelector(".renderer");if(l){let c=this.getAttribute("onlinkclick")||this.getAttribute("onLinkClick");this.getAttribute("link")=="true"&&(H.j.querySelectorAll(l).addClass("link"),l.addEventListener("click",o=>{if(c){c=c.replace("()","");const r=c.match(/^(\w+)\s*\(/),n=r==null?void 0:r[1];console.log(n),this.owner[n]?this.owner[n].call(this.owner,this.cell.closest("tr").data,parseInt(this.cell.dataset.row),this.cell):this.owner.exprFunction(c).call(this,this.cell.closest("tr").data,parseInt(this.cell.dataset.row))}this.owner.dispatchEvent(new CustomEvent(H.EVENT.LINK_CLICK,{detail:{target:this.cell,data:this.cell.closest("tr").data,currow:parseInt(this.cell.dataset.row)},bubbles:!0,composed:!0}))}))}}get value(){var t=!this.owner||!this.owner.dataManager||!this.cell||!this.cell.dataset||!this.cell.dataset.row||!this.cell.dataset.bind?"":this.cell.closest("tr").data[this.cell.dataset.bind];return t??""}set value(t){var l=parseInt(this.cell.dataset.row);const c=this.getAttribute("update-row-state")!="false";l<0?this.owner.data.setValueNF(parseInt(this.cell.dataset.index),this.cell.dataset.bind,t,c):this.owner.data.setValue(l,this.cell.dataset.bind,t,c)}get row(){return parseInt(this.cell.dataset.row)}get data(){return this.cell.closest("tr").data}}Jn=new WeakMap,Qn=new WeakMap,to=new WeakMap,ls=new WeakMap,ql=new WeakMap;class Qs extends _r{constructor(){super()}connectedCallback(){super.connectedCallback(),$("input,textarea",this.shadowRoot).on("change",E=>{if(this.closest("tbody")){switch(E.target.getAttribute("type")){case"checkbox":this.value=$(E.target).is(":checked")?this.trueValue:this.falseValue;break;case"radio":this.tagName=="NG-CHECKBOX"&&this.selectAll(!1),this.value=$(E.target).val();break;default:var t=this.getAttribute("maxbyte");t&&(t=parseInt(t),H.getByteLength(E.target.value)>=t&&(E.target.value=H.cut(E.target.value,t)));var l=$(E.target).val();this.value=H.j.querySelectorAll(this).attr("type")=="number"?isNaN(l)?"":Number(l):l;break}this.owner.refreshData(this.cell.dataset.row)}})}}class Uu extends _r{constructor(){super();Y(this,Cs);it(this,"dataRefresh",t=>{f(this,Cs).innerHTML=this.getDisplayText(this.getAttribute("text"));var l=parseInt(this.cell.dataset.row);const c=this.cell.closest("tr").data;["color","background","border"].forEach(o=>{var r=f(this,Cs).getAttribute(o);r&&$(f(this,Cs)).css({[o]:this.getExprValue(r,c,l)})}),t||this.reset()})}connectedCallback(){for(var t=[],l=0;l<this.attributes.length;l++)["color","background","border"].includes(this.attributes[l].name)&&t.push(`${this.attributes[l].name}="${this.attributes[l].value}"`);this.shadowRoot.innerHTML=`
|
|
37
37
|
<style>
|
|
38
38
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngButton.css";
|
|
39
39
|
${H.getCustomPath(this,"ngButton.css")}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<button class="button" ${t.join(" ")}>${this.getAttribute("text")}</button>
|
|
43
43
|
`,super.connectedCallback(),tt(this,Cs,this.shadowRoot.querySelector("button")),$(this.cell).on("keydown",c=>{c.code=="Enter"&&$(f(this,Cs)).trigger("click")})}}Cs=new WeakMap,customElements.get("ng-button")||customElements.define("ng-button",Uu);class Vu{constructor(E){Y(this,Ge);Y(this,Hl,E=>{!E.ctrlKey&&!E.metaKey||(["C","c"].includes(E.key)?f(this,Ul).call(this):["V","v"].includes(E.key)&&f(this,zl).call(this))});Y(this,zl,()=>{const E=f(this,Ge).cell.currentCell;E&&f(this,Ge).selection.rows[0]&&E.dataset.row==f(this,Ge).selection.rows[0]&&(parseInt(E.dataset.row),parseInt(E.dataset.row),navigator.clipboard.readText().then(t=>{t.split(`
|
|
44
44
|
`).forEach(l=>{l.split(" ").forEach(c=>{})})}).catch(t=>{console.error("Failed to read clipboard contents: ",t)}))});Y(this,Ul,()=>{const E=[];for(var t=f(this,Ge).selection.selected.startRow;t<=f(this,Ge).selection.selected.endRow;t++){for(var l=[],c=f(this,Ge).selection.selected.startCol;c<=f(this,Ge).selection.selected.endCol;c++)l.push(f(this,Vl).call(this,t,c));E.push(l.join(" "))}E.length<=0||navigator.clipboard.writeText(E.join(`
|
|
45
|
-
`)).then(()=>{setTimeout(()=>{H.j.querySelectorAll(".selected",f(this,Ge).body).addClass("copied")}),setTimeout(()=>{H.j.querySelectorAll(".copied",f(this,Ge).body).removeClass("copied")},1e3)}).catch(o=>{console.error("Failed to copy text: ",o)})});Y(this,Vl,(E,t)=>{const l=parseInt(E/f(this,Ge).template.length),o=f(this,Ge).template[E%f(this,Ge).template.length].querySelector(`[data-col="${t}"]`);if(!o||!o.dataset)return"";if(o.dataset.expr)return f(this,Ge).exprFunction(o.dataset.expr).call(this,f(this,Ge).data.get(l),l);if(o.dataset.bind)return f(this,Ge).data.get(l,o.dataset.bind)});tt(this,Ge,E),$(f(this,Ge).body).on("keydown",f(this,Hl))}}Ge=new WeakMap,Hl=new WeakMap,zl=new WeakMap,Ul=new WeakMap,Vl=new WeakMap;class Wu{constructor(E){Y(this,lr);Y(this,Wt);Y(this,Wl);Y(this,Ti);Y(this,Es);Y(this,As);Y(this,Ri);Y(this,Ts);Y(this,Mi);Y(this,eo);Y(this,Ii);Y(this,Ni);it(this,"moveCell",E=>{var t=E.target.closest("th,td")||E.target.getRootNode().host.closest("th,td")||document.activeElement.closest("th,td"),l=t.closest("tr");l.sectionRowIndex;var c=parseInt(t.dataset.col);parseInt(l.dataset.row);var o=parseInt(l.dataset.matrixRow),r,n;switch(E.code){case"Tab":case"ArrowRight":case"ArrowLeft":r=o;break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":n=c;break}switch(E.code){case"Tab":E.preventDefault(),n=E.shiftKey?f(this,ti).call(this,o,c):f(this,Oi).call(this,o,c);break;case"ArrowRight":n=f(this,Oi).call(this,o,c);break;case"ArrowLeft":n=f(this,ti).call(this,o,c);break;case"ArrowDown":if(t.closest("tbody.fixed"))r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1);else{const e=parseInt(t.dataset.row),i=f(this,Wt).view.getVisibleLastRow();f(this,Wt).isLastPage&&e==i-1&&$(".ng-container-body .nodata",f(this,Wt).shadowRoot).height()<=0||!f(this,Wt).isLastPage&&f(this,Wt).lastRowHidden&&e>=i-1||!f(this,Wt).isLastPage&&!f(this,Wt).lastRowHidden&&e>=i?(f(this,Wt).scrollBy(1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1)}break;case"ArrowUp":t.closest("tbody.fixed")?r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1):t.closest("tr").sectionRowIndex==0?f(this,Wt).isFirstPage||(f(this,Wt).scrollBy(-1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1);break;case"PageDown":f(this,Wt).pageDown();break;case"PageUp":f(this,Wt).pageUp();break}if(r!=null&&n!=null&&isFinite(r)){var s=f(this,ro).call(this,r,n);s&&!s.querySelector("ng-row-indicator")&&(this.currentCell=s)}["Tab","ArrowLeft","ArrowRight"].includes(E.code)&&f(this,Wt).body.querySelector("ng-hscrollbar").refresh()});Y(this,ti,(E,t)=>{var l=parseInt(E/f(this,Wt).template.length),c;return $(`tbody tr[data-matrix-row=${E}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ti).call(this,E,r.dataset.col):r.dataset.col,!1}),c==null&&$(`tbody tr[data-row=${l}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ti).call(this,E,r.dataset.col):r.dataset.col,!1}),c});Y(this,Oi,(E,t)=>{var l=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${E}"][data-col="${t}"]`),c=t+(l.colSpan||1),o=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${E}"][data-col="${c}"]`);return H.j.querySelectorAll(o).hasClass("dummy")&&(c=f(this,Oi).call(this,E,c)),c});Y(this,ro,(E,t)=>{var l=parseInt(E/f(this,Wt).template.length),c=$(`[data-matrix-row=${E}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible");return c.length==0&&(c=$(`[data-row=${l}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible")),c[0]});it(this,"refresh",()=>{f(this,Wt).selection.refresh()});Y(this,so,E=>{E.altKey||E.shiftKey||E.ctrlKey||(E.preventDefault(),E.originalEvent.deltaY>0?f(this,Wt).scrollBy(1):f(this,Wt).scrollBy(-1))});Y(this,io,E=>{if(!(E.ctrlKey||E.altKey)&&!(E.target.tagName=="NG-ROW-INDICATOR"&&[H.SELECTTYPE.CELL,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)))if(E.shiftKey){if([H.SELECTTYPE.COLS,H.SELECTTYPE.ROWS,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)){var t=f(this,Wt).selection.getActiveCell();if(t){var l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,Wt).template.length+l.sectionRowIndex%f(this,Wt).template.length,o=parseInt(t.dataset.col),r=E.target.closest("th,td"),n=r.closest("tr"),s=parseInt(r.dataset.row)*f(this,Wt).template.length+n.sectionRowIndex%f(this,Wt).template.length,e=parseInt(r.dataset.col);f(this,Wt).selection.selectArea(c,o,s,e)}}}else{const i=E.target.closest("th,td"),u=f(this,Wt).view.getVisibleLastRow(),a=parseInt(i.closest("tr").dataset.row),h=!!i.closest("tbody.fixed"),p=f(this,Wt).shadowRoot.querySelector(".ng-container-body tr.nodata");if(!h&&$(p).height()<=0&&f(this,Wt).lastRowHidden&&u==a){const m=parseInt(i.closest("tr").dataset.matrixRow),d=parseInt(i.dataset.col);f(this,Wt).scrollBy(1);const b=f(this,ro).call(this,m,d);this.currentCell=b,setTimeout(()=>{b.focus()})}else this.currentCell=i}});Y(this,no,E=>{if(!(E.ctrlKey||E.altKey))if(["TH","TD"].includes(E.target.tagName)){if(["Tab","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(E.code))E.preventDefault(),this.moveCell(E);else if(["Enter"].includes(E.code)){E.preventDefault();const t=E.target.querySelector("ng-input");if(t){const l=t.shadowRoot.querySelector("input[type=text]");l.focus(),l.select()}}}else["NG-INPUT"].includes(E.target.tagName)&&["Enter"].includes(E.code)});it(this,"resetEvent",()=>{document.addEventListener("contextmenu",E=>E.preventDefault()),$(".ng-table tbody.bindable",f(this,Wt).body).off("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).off("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).off("mousedown","th,td",f(this,io)),$(".ng-table tbody.bindable",f(this,Wt).body).on("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).on("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).on("mousedown","th,td",f(this,io)),f(this,Wt).selection&&f(this,Wt).selection.resetEvent()});tt(this,Wt,E),tt(this,Es,-1),tt(this,As,-1),tt(this,Ri,-1),tt(this,Ts,-1),this.resetEvent()}get matrixRow(){return f(this,As)}get col(){return f(this,Ts)}get currentCell(){return f(this,Ti)}set currentCell(E){if(!E)return;tt(this,Wl,f(this,Ti)),tt(this,Ti,E),E.focus();var t=E.closest("tr");tt(this,lr,parseInt(t.dataset.row)*f(this,Wt).template.length+t.sectionRowIndex%f(this,Wt).template.length,Ou),tt(this,lr,parseInt(E.dataset.col),Lu),tt(this,lr,E.cellIndex,ju),tt(this,lr,E.dataset.bind,Pu),t.closest("tbody.fixed")||(f(this,Wt).row.at=E.dataset.row),f(this,Wt).selection.selectCell(f(this,lr,Nu),f(this,lr,$u));const l=E,c=parseInt(l.dataset.row),o=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),r=parseInt(l.dataset.col),n=l.cellIndex,s=parseInt(f(this,Es)/f(this,Wt).template.length),e=parseInt(f(this,Es))%parseInt(f(this,Es)/f(this,Wt).template.length),i=f(this,Ri),u=f(this,eo);if(c!=s||o!=e||r!=i){const a=new CustomEvent(H.EVENT.CELL_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,col:i,row:s,subrow:e,bind:f(this,Ii)},f(this,Wt).dispatchEvent(a)}if(c!=s){const a=new CustomEvent(H.EVENT.ROW_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,row:s,subrow:e,bind:f(this,Ii)},f(this,Wt).dispatchEvent(a)}}}Wt=new WeakMap,Wl=new WeakMap,Ti=new WeakMap,Es=new WeakMap,As=new WeakMap,Ri=new WeakMap,Ts=new WeakMap,Mi=new WeakMap,eo=new WeakMap,Ii=new WeakMap,Ni=new WeakMap,lr=new WeakSet,Nu=function(){return f(this,As)},Ou=function(E){tt(this,Es,f(this,As)),tt(this,As,parseInt(E))},zf=function(){return f(this,Mi)},ju=function(E){tt(this,eo,f(this,Mi)),tt(this,Mi,parseInt(E))},$u=function(){return f(this,Ts)},Lu=function(E){tt(this,Ri,f(this,Ts)),tt(this,Ts,parseInt(E))},Uf=function(){return f(this,Ni)},Pu=function(E){tt(this,Ii,f(this,Ni)),tt(this,Ni,E)},ti=new WeakMap,Oi=new WeakMap,ro=new WeakMap,so=new WeakMap,io=new WeakMap,no=new WeakMap;class Xu{constructor(E){Y(this,kt);Y(this,Sr);Y(this,ji);it(this,"getActiveCell",()=>{var E=this.selected.currentRow,t=this.selected.currentCol,l=parseInt(this.selected.currentMatrixRow%f(this,kt).template.length),c=$(`tbody.bindable [data-row=${E}]`,f(this,kt).body).find(`[data-col=${t}]`).not(".dummy").eq(l);return c.length>0?c[0]:null});it(this,"refresh",()=>{switch(this.type){case H.SELECTTYPE.ROW:this.selected.startRow=parseInt(f(this,kt).row.at*f(this,kt).template.length),this.selected.endRow=this.selected.startRow+f(this,kt).template.length-1;var t=[];$(`tbody tr[data-row=${parseInt(this.selected.startRow/f(this,kt).template.length)}] td`,f(this,kt).body).not(".dummy").not(".first").each((o,r)=>{parseInt(H.j.querySelectorAll(r).attr("tabindex"))>=0&&t.push(Number(r.dataset.col))}),this.selected.startCol=t.length>0?Math.min.apply(null,t):-1,this.selected.endCol=t.length>0?Math.max.apply(null,t):-1;break;case H.SELECTTYPE.ROWS:this.selected.startRow=parseInt(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length,this.selected.endRow=parseInt(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length-1+f(this,kt).template.length,this.selected.startCol=f(this,kt).firstCol,this.selected.endCol=f(this,kt).lastCol;break;case H.SELECTTYPE.COL:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1),this.selected.endCol=this.selected.startCol;var E=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);this.selected.startCol>=s&&this.selected.endCol<=s+e-1&&E.push(n)})});var t=[];E.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.COLS:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1);var E=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);(this.selected.startCol>=s&&this.selected.startCol<=s+e-1||this.selected.endCol>=s&&this.selected.endCol<=s+e-1)&&E.push(n)})});var t=[];E.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.CELL:this.selected.endRow=this.selected.startRow,this.selected.endCol=this.selected.startCol;break;case H.SELECTTYPE.AREA:break;case H.SELECTTYPE.NONE:this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1;break}H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),H.j.querySelectorAll(".selected-current",f(this,kt).body).removeClass("selected-current"),H.j.querySelectorAll(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).addClass("selected-current"),H.j.querySelectorAll(`.col-indicator[data-col="${this.selected.currentCol}"]`,f(this,kt).body).addClass("selected-current"),$(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).closest("th,td").addClass("selected-current");var l=this.getActiveCell();l&&H.j.querySelectorAll(l).addClass("active"),$("tbody th,tbody td",f(this,kt).body).each((o,r)=>{var n=parseInt(r.dataset.col),s=parseInt(r.dataset.row)*f(this,kt).template.length+r.closest("tr").sectionRowIndex%f(this,kt).template.length;s==this.selected.currentMatrixRow&&n==this.selected.currentCol,s+r.rowSpan-1>=this.selected.startRow&&s<=this.selected.endRow&&n+r.colSpan-1>=this.selected.startCol&&n<=this.selected.endCol&&(H.j.querySelectorAll(r).addClass("selected"),this.selected.startRow==this.selected.endRow&&this.selected.startCol==this.selected.endCol?H.j.querySelectorAll(r).addClass("selected-top").addClass("selected-bottom").addClass("selected-left").addClass("selected-right"):(s==this.selected.startRow&&H.j.querySelectorAll(r).addClass("selected-top"),s+r.rowSpan-1==this.selected.endRow&&H.j.querySelectorAll(r).addClass("selected-bottom"),n==this.selected.startCol&&H.j.querySelectorAll(r).addClass("selected-left"),n+r.colSpan-1==this.selected.endCol&&H.j.querySelectorAll(r).addClass("selected-right"),H.j.querySelectorAll(r).addClass("multi-selected")))}),$("tbody.bindable tr",f(this,kt).body).each((o,r)=>{var n=r.querySelector("ng-row-indicator");if(n){n=n.closest("th,td");for(var s=parseInt(n.dataset.row),e=0;e<n.rowSpan;e++){var s=parseInt(n.dataset.row)*f(this,kt).template.length+r.sectionRowIndex%f(this,kt).template.length+e;s>=this.selected.startRow&&s<=this.selected.endRow&&H.j.querySelectorAll(n).addClass("selected-area")}}});for(var c=this.selected.startCol;c<=this.selected.endCol;c++)H.j.querySelectorAll(`.col-indicator[data-col="${c}"]`,f(this,kt).body).addClass("selected-area");(this.selected.oldStartRow!=this.selected.startRow||this.selected.oldEndRow!=this.selected.endRow||this.selected.oldStartCol!=this.selected.startCol||this.selected.oldEndCol!=this.selected.endCol)&&(f(this,Sr).oldStartRow=this.selected.oldStartRow,f(this,Sr).oldEndRow=this.selected.oldEndRow,f(this,Sr).oldStartCol=this.selected.oldStartCol,f(this,Sr).oldEndCol=this.selected.oldEndCol,f(this,Sr).startRow=this.selected.startRow,f(this,Sr).endRow=this.selected.endRow,f(this,Sr).startCol=this.selected.startCol,f(this,Sr).endCol=this.selected.endCol,f(this,kt).dispatchEvent(f(this,Sr))),this.selected.oldStartRow=this.selected.startRow,this.selected.oldEndRow=this.selected.endRow,this.selected.oldStartCol=this.selected.startCol,this.selected.oldEndCol=this.selected.endCol});it(this,"resetEvent",()=>{$(".ng-table tbody.bindable",f(this,kt).body).off("mousedown","th,td",f(this,oo)).on("mousedown","th,td",f(this,oo))});Y(this,Xl,()=>{this.resetEvent()});Y(this,oo,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftKey)return;const t=E.target.closest("th,td"),l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,kt).template.length+l.sectionRowIndex%f(this,kt).template.length,o=parseInt(t.dataset.col);this.selected.currentCol=t.dataset.col,this.selected.currentRow=t.dataset.row,this.selected.currentMatrixRow=parseInt(t.dataset.row*f(this,kt).template.length)+parseInt(t.closest("tr").sectionRowIndex%f(this,kt).template.length);var r={row:-1,col:-1};const n=a=>{const h=a.target.closest("th,td"),p=h.closest("tr");if(p.sectionRowIndex==r.row&&h.dataset.col==r.col||$(h).find("NG-ROW-INDICATOR").length>0)return;const m=parseInt(h.dataset.row)*f(this,kt).template.length+p.sectionRowIndex%f(this,kt).template.length,d=parseInt(h.dataset.col);this.selectArea(c,o,m,d),r={row:p.sectionRowIndex,col:h.dataset.col}},s=a=>{f(this,kt).body.querySelector("ng-vscrollbar").stopScroll(),clearInterval(f(this,ji)),$(".ng-table tbody.bindable",f(this,kt).body).off("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseleave",i),$(document).off("mousemove",u),$(document).off("mouseup",s)},e=a=>{clearInterval(f(this,ji)),$(document).off("mousemove",u)},i=a=>{const h=$(".ng-container-body",f(this,kt).body),p=h.find("thead"),m=h.find("tfoot");var d;parseInt(a.pageY)>=parseInt(h.offset().top+h.height()-m.height())?d=1:parseInt(a.pageY)<=parseInt(h.offset().top+p.height())&&(d=-1),this.selected.col=this.selected.startCol,d&&($(document).on("mousemove",u),tt(this,ji,setInterval(()=>{if(d>0){this.selected.endRow=h.find("tbody.bindable tr:last-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.endRow=Math.floor(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length+f(this,kt).template.length-1),this.selected.endRow>parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1&&(this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1)}else{this.selected.startRow=h.find("tbody.bindable tr:first-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length-f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.startRow=Math.floor(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length),this.selected.startRow<0&&(this.selected.startRow=0)}f(this,kt).scrollBy(d)},500)))},u=a=>{var h;if($(".col-indicator",f(this,kt).body).each((p,m)=>{var d=$(m).offset().left,b=$(m).width();if(a.pageX>d&&a.pageX<d+b)return h=m,!1}),h){let p=parseInt(h.dataset.col);if(f(this,kt).body.querySelector(`tbody.bindable [data-col="${p}"] ng-row-indicator`))return;$("th,td",f(this,kt).template).each((m,d)=>{p>=parseInt(d.dataset.col)&&p<=parseInt(d.dataset.col)+d.colSpan-1&&(p=p>=o?Math.max(p,parseInt(d.dataset.col)+d.colSpan-1):Math.min(p,parseInt(d.dataset.col)))}),p>=this.selected.startCol&&p<=this.selected.endCol?p>this.selected.col?this.selected.endCol=p:p<this.selected.col?this.selected.startCol=p:this.selected.startCol=this.selected.endCol=p:p>this.selected.endCol?this.selected.endCol=p:p<this.selected.startCol&&(this.selected.startCol=p)}};[H.SELECTTYPE.AREA,H.SELECTTYPE.ROWS,H.SELECTTYPE.COLS].includes(this.type)&&($(".ng-table tbody.bindable",f(this,kt).body).on("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseleave",i)),$(document).on("mouseup",s),this.rawIndex=f(this,kt).dataManager.viewRecords.rawIndex});it(this,"selectArea",(E,t,l,c)=>{var o=Math.min(E,l),r=Math.max(E,l),n=Math.min(t,c),s=Math.max(t,c);$("tbody.bindable th,tbody.bindable td",f(this,kt).body).each((e,i)=>{var u=i.closest("tr"),a=parseInt(i.dataset.row)*f(this,kt).template.length+u.sectionRowIndex%f(this,kt).template.length,h=parseInt(i.dataset.col);a+i.rowSpan-1>=o&&a<=r&&h+i.colSpan-1>=n&&h<=s&&(o=Math.min(a,o),n=Math.min(h,n),r=Math.max(a+i.rowSpan-1,r),s=Math.max(h+i.colSpan-1,s))}),this.selected.startRow=o,this.selected.endRow=r,this.selected.startCol=n,this.selected.endCol=s,this.refresh()});it(this,"selectCell",(E,t)=>{this.selected.currentCol=t,this.selected.currentMatrixRow=E,this.selected.currentRow=parseInt(E/f(this,kt).template.length),this.selectArea(E,t,E,t)});it(this,"clear",()=>{this.selected.clear()});tt(this,kt,E),tt(this,Sr,new CustomEvent("selectchanged",{bubbles:!0,detail:{}})),this.selected={currentRow:-1,currentMatrixRow:-1,currentCol:-1,startRow:-1,startCol:-1,endRow:-1,endCol:-1,oldStartRow:-1,oldStartCol:-1,oldEndRow:-1,oldEndCol:-1,clear:()=>{this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1,H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("selected").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right")}},f(this,Xl).call(this)}get type(){return f(this,kt).getAttribute("select-type")}set type(E){if(!Object.values(H.SELECTTYPE).includes(E))throw`invalid select type : ${E}`;Object.values(H.SELECTTYPE).forEach(t=>{H.j.querySelectorAll(".ng-table",f(this,kt).body).removeClass(`select-type-${t}`)}),H.j.querySelectorAll(".ng-table",f(this,kt).body).addClass(`select-type-${E}`),f(this,kt).cell.refresh()}get rows(){const E=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&E.push(parseInt(t/f(this,kt).template.length));return[...new Set(E)]}get subrows(){const E=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&E.push(parseInt(t%f(this,kt).template.length));return[...new Set(E)]}get cols(){const E=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t)$(`[data-col="${l}"]`,f(this,kt).template[c]).length>0&&E.push(l);return[...new Set(E)]}get binds(){const E=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t){const o=$(`[data-col="${l}"]`,f(this,kt).template[c]);o.length>0&&o[0].dataset.bind&&E.push(o[0].dataset.bind)}return[...new Set(E)]}get firstRow(){return parseInt(this.selected.startRow/f(this,kt).template.length)}get lastRow(){return parseInt(this.selected.endRow/f(this,kt).template.length)}get firstCol(){return this.selected.startCol}get lastCol(){return this.selected.endCol}}kt=new WeakMap,Sr=new WeakMap,ji=new WeakMap,Xl=new WeakMap,oo=new WeakMap;class Yu{constructor(E){Y(this,Ot);Y(this,hs);Y(this,ao);Y(this,lo);Y(this,ho);Y(this,jr);Y(this,co);Y(this,uo);Y(this,dr,0);Y(this,fo,E=>{var t;return $(".ng-container-body tbody.bindable tr",f(this,Ot).body).each((l,c)=>{var o=$(c).offset();if(E>=o.top&&E<=o.top+$(c).height())return t=c,!1}),t});Y(this,Yl,E=>{var t=f(this,Kl).call(this,E);if(t>0){t>f(this,Ot).dataManager.viewRecords.rawIndex&&(t=f(this,Ot).dataManager.viewRecords.rawIndex);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleFirstRow();for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i-t+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i-t+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i-t+l,e.before(a.outerHTML)})}return t});Y(this,Gl,E=>{var t=f(this,Zl).call(this,E);if(t>0){f(this,Ot).view.getVisibleLastRow()+t>=f(this,Ot).data.count()&&(t=f(this,Ot).data.count()-f(this,Ot).view.getVisibleLastRow()-1);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleLastRow()+1;for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i+l,e.before(a.outerHTML)})}return t});Y(this,Kl,E=>{const t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,dr)+E;if(t<=0)return 0;for(var c=0,o=0;o<l;)o+=f(this,Ot).view.getRowHeight(t-++c);return c});Y(this,Zl,E=>{const t=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY()+E,l=f(this,Ot).view.getVisibleFirstRow(),c=f(this,Ot).view.getVisibleLastRow();for(var o=0,r=0;o<t;)o+=f(this,Ot).view.getRowHeight(l+r++);return r+1-(c-l+1)});Y(this,Jl,()=>{const E=f(this,Ot).view.getVisibleFirstRow(),t=f(this,Ot).view.getVisibleLastRow();for(var l=E,c=0,o=E;o<t;o++)if(c+=f(this,Ot).view.getRowHeight(o),c>f(this,dr)*-1){c-=f(this,Ot).view.getRowHeight(o),l=o;break}if(l>E){for(var o=E;o<l;o++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${o}"]`).forEach(n=>{$(n).remove()});tt(this,dr,(c*-1-f(this,dr))*-1),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(r=>{r.style.transform=`translateY(${f(this,dr)}px)`})}return l-E});Y(this,Ql,()=>{const E=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY(),t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,Ot).view.getVisibleLastRow();for(var c=f(this,Ot).data.count(),o=0,r=t;r<=l;r++)if(o+=f(this,Ot).view.getRowHeight(r),o>E){c=r+1;break}for(r=c;r<=l;r++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${r}"]`).forEach(n=>{$(n).remove()});return l-c});it(this,"scrollTop",()=>{tt(this,dr,0),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(E=>{E.style.transform=`translateY(${f(this,dr)}px)`})});Y(this,po,E=>{clearInterval(f(this,hs)),tt(this,ao,E.touches[0].pageX),tt(this,lo,E.touches[0].pageX-$(".ng-container-body table",f(this,Ot).body).position().left),tt(this,ho,E.touches[0].pageY),tt(this,jr,E.touches[0].pageY),tt(this,uo,new Date);const t=f(this,fo).call(this,E.touches[0].pageY);t&&tt(this,co,parseInt(t.dataset.row))});Y(this,mo,E=>{if(!(E.touches.length>1||E.changedTouches.length>1)){if(E.preventDefault(),Math.abs(E.changedTouches[0].pageY-f(this,jr))>0){if(E.changedTouches[0].pageY>f(this,jr)){if(f(this,dr)+E.changedTouches[0].pageY-f(this,jr)>0&&f(this,Ot).view.getVisibleFirstRow()!=0){const o=f(this,Yl).call(this,E.changedTouches[0].pageY-f(this,jr));if(o>0){for(var t=f(this,Ot).view.getVisibleFirstRow(),l=t;l<t+o;l++)tt(this,dr,f(this,dr)-f(this,Ot).view.getRowHeight(l));f(this,Ot).dataManager.viewRecords.rawIndex-=o,f(this,Ot).view.redrawV3()}}}else E.changedTouches[0].pageY<f(this,jr)&&f(this,Gl).call(this,f(this,jr)-E.changedTouches[0].pageY)>0&&f(this,Ot).view.redrawV3();tt(this,dr,f(this,dr)+(E.changedTouches[0].pageY-f(this,jr))),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(o=>{o.style.transform=`translateY(${f(this,dr)}px)`}),tt(this,jr,E.changedTouches[0].pageY)}else if(Math.abs(E.changedTouches[0].pageX-f(this,ao))>20){var c=E.changedTouches[0].pageX-f(this,lo);c>0&&(c=0),$(".ng-container-body table",f(this,Ot).body).css({left:c}),f(this,Ot).body.querySelector("ng-hscrollbar").adjustThumb2()}}});Y(this,go,E=>{f(this,Ot).view.getVisibleFirstRow()==0&&f(this,dr)>0&&this.scrollTop();var t=f(this,Jl).call(this);f(this,Ot).dataManager.viewRecords.rawIndex+=t,f(this,Ql).call(this);const l=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY();for(var c=0,o=f(this,Ot).view.getVisibleFirstRow();o<=f(this,Ot).view.getVisibleLastRow();o++)c+=f(this,Ot).view.getRowHeight(o);$(".ng-container tbody.bindable tr.nodata",f(this,Ot).body).height(l-c),f(this,Ot).view.fitPage();const r=f(this,fo).call(this,E.changedTouches[0].pageY);if(!r||f(this,co)==parseInt(r.dataset.row))return;const n=500,s=parseInt(new Date-f(this,uo));if(s>n)return;const e=parseInt((n-s)/1*((f(this,Ot).data.count()-f(this,Ot).dataManager.viewRecords.rawIndex)/1)/(n*1)),i=f(this,Ot).dataManager.viewRecords.rawIndex+e*(E.changedTouches[0].pageY>f(this,ho)?-1:1);clearInterval(f(this,hs)),i>f(this,Ot).dataManager.viewRecords.rawIndex?tt(this,hs,setInterval(()=>{f(this,Ot).scrollBy(1),f(this,Ot).view.getVisibleLastRow()>=i&&clearInterval(f(this,hs))},10)):tt(this,hs,setInterval(()=>{f(this,Ot).scrollBy(-1),f(this,Ot).dataManager.viewRecords.rawIndex<=i&&clearInterval(f(this,hs))},10))});Y(this,bo,E=>{});it(this,"resetEvent",()=>{$("tbody.bindable",f(this,Ot).body).off("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).off("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).off("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).off("touchcancel",f(this,bo)),$("tbody.bindable",f(this,Ot).body).on("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).on("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).on("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).on("touchcancel",f(this,bo))});tt(this,Ot,E),this.resetEvent()}}Ot=new WeakMap,hs=new WeakMap,ao=new WeakMap,lo=new WeakMap,ho=new WeakMap,jr=new WeakMap,co=new WeakMap,uo=new WeakMap,dr=new WeakMap,fo=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,Ql=new WeakMap,po=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class Gu extends _r{constructor(){super();Y(this,th);Y(this,eh);Y(this,$i);Y(this,yo);Y(this,Li);it(this,"dataRefresh",t=>{var l=this.cell.closest("tr").data;for(var c of f(this,Li).data.datasets){var t=l[c["data-bind"]];switch(typeof t){case"string":c.data=t.split(",");break;case"object":Array.isArray(t)&&(c.data=t);break}}$(f(this,$i)).height(28),setTimeout(()=>{f(this,yo).update()}),t||this.reset()})}connectedCallback(){tt(this,th,this.getRootNode().host),tt(this,eh,this.closest("th,td")),this.shadowRoot.innerHTML=`
|
|
45
|
+
`)).then(()=>{setTimeout(()=>{H.j.querySelectorAll(".selected",f(this,Ge).body).addClass("copied")}),setTimeout(()=>{H.j.querySelectorAll(".copied",f(this,Ge).body).removeClass("copied")},1e3)}).catch(o=>{console.error("Failed to copy text: ",o)})});Y(this,Vl,(E,t)=>{const l=parseInt(E/f(this,Ge).template.length),o=f(this,Ge).template[E%f(this,Ge).template.length].querySelector(`[data-col="${t}"]`);if(!o||!o.dataset)return"";if(o.dataset.expr)return f(this,Ge).exprFunction(o.dataset.expr).call(this,f(this,Ge).data.get(l),l);if(o.dataset.bind)return f(this,Ge).data.get(l,o.dataset.bind)});tt(this,Ge,E),$(f(this,Ge).body).on("keydown",f(this,Hl))}}Ge=new WeakMap,Hl=new WeakMap,zl=new WeakMap,Ul=new WeakMap,Vl=new WeakMap;class Wu{constructor(E){Y(this,lr);Y(this,Wt);Y(this,Wl);Y(this,Ri);Y(this,Es);Y(this,As);Y(this,Mi);Y(this,Ts);Y(this,Ii);Y(this,eo);Y(this,Ni);Y(this,Oi);it(this,"moveCell",E=>{var t=E.target.closest("th,td")||E.target.getRootNode().host.closest("th,td")||document.activeElement.closest("th,td"),l=t.closest("tr");l.sectionRowIndex;var c=parseInt(t.dataset.col);parseInt(l.dataset.row);var o=parseInt(l.dataset.matrixRow),r,n;switch(E.code){case"Tab":case"ArrowRight":case"ArrowLeft":r=o;break;case"ArrowDown":case"ArrowUp":case"PageDown":case"PageUp":n=c;break}switch(E.code){case"Tab":E.preventDefault(),n=E.shiftKey?f(this,ti).call(this,o,c):f(this,ji).call(this,o,c);break;case"ArrowRight":n=f(this,ji).call(this,o,c);break;case"ArrowLeft":n=f(this,ti).call(this,o,c);break;case"ArrowDown":if(t.closest("tbody.fixed"))r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1);else{const e=parseInt(t.dataset.row),i=f(this,Wt).view.getVisibleLastRow();f(this,Wt).isLastPage&&e==i-1&&$(".ng-container-body .nodata",f(this,Wt).shadowRoot).height()<=0||!f(this,Wt).isLastPage&&f(this,Wt).lastRowHidden&&e>=i-1||!f(this,Wt).isLastPage&&!f(this,Wt).lastRowHidden&&e>=i?(f(this,Wt).scrollBy(1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)+(t.rowSpan||1)}break;case"ArrowUp":t.closest("tbody.fixed")?r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1):t.closest("tr").sectionRowIndex==0?f(this,Wt).isFirstPage||(f(this,Wt).scrollBy(-1),this.currentCell=t,setTimeout(()=>{t.focus()})):r=parseInt(t.dataset.matrixRow)-(t.rowSpan||1);break;case"PageDown":f(this,Wt).pageDown();break;case"PageUp":f(this,Wt).pageUp();break}if(r!=null&&n!=null&&isFinite(r)){var s=f(this,ro).call(this,r,n);s&&!s.querySelector("ng-row-indicator")&&(this.currentCell=s)}["Tab","ArrowLeft","ArrowRight"].includes(E.code)&&f(this,Wt).body.querySelector("ng-hscrollbar").refresh()});Y(this,ti,(E,t)=>{var l=parseInt(E/f(this,Wt).template.length),c;return $(`tbody tr[data-matrix-row=${E}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ti).call(this,E,r.dataset.col):r.dataset.col,!1}),c==null&&$(`tbody tr[data-row=${l}]`,f(this,Wt).body).find("th,td").each((o,r)=>{var n=parseInt(r.dataset.col);if(t-1>=n&&t-1<=n+r.colSpan-1)return c=H.j.querySelectorAll(r).hasClass("dummy")?f(this,ti).call(this,E,r.dataset.col):r.dataset.col,!1}),c});Y(this,ji,(E,t)=>{var l=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${E}"][data-col="${t}"]`),c=t+(l.colSpan||1),o=f(this,Wt).body.querySelector(`tbody [data-matrix-row="${E}"][data-col="${c}"]`);return H.j.querySelectorAll(o).hasClass("dummy")&&(c=f(this,ji).call(this,E,c)),c});Y(this,ro,(E,t)=>{var l=parseInt(E/f(this,Wt).template.length),c=$(`[data-matrix-row=${E}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible");return c.length==0&&(c=$(`[data-row=${l}][data-col=${t}]`,f(this,Wt).body).not(".dummy").filter(":visible")),c[0]});it(this,"refresh",()=>{f(this,Wt).selection.refresh()});Y(this,so,E=>{E.altKey||E.shiftKey||E.ctrlKey||(E.preventDefault(),E.originalEvent.deltaY>0?f(this,Wt).scrollBy(1):f(this,Wt).scrollBy(-1))});Y(this,io,E=>{if(!(E.ctrlKey||E.altKey)&&!(E.target.tagName=="NG-ROW-INDICATOR"&&[H.SELECTTYPE.CELL,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)))if(E.shiftKey){if([H.SELECTTYPE.COLS,H.SELECTTYPE.ROWS,H.SELECTTYPE.AREA].includes(f(this,Wt).selection.type)){var t=f(this,Wt).selection.getActiveCell();if(t){var l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,Wt).template.length+l.sectionRowIndex%f(this,Wt).template.length,o=parseInt(t.dataset.col),r=E.target.closest("th,td"),n=r.closest("tr"),s=parseInt(r.dataset.row)*f(this,Wt).template.length+n.sectionRowIndex%f(this,Wt).template.length,e=parseInt(r.dataset.col);f(this,Wt).selection.selectArea(c,o,s,e)}}}else{const i=E.target.closest("th,td"),u=f(this,Wt).view.getVisibleLastRow(),a=parseInt(i.closest("tr").dataset.row),h=!!i.closest("tbody.fixed"),p=f(this,Wt).shadowRoot.querySelector(".ng-container-body tr.nodata");if(!h&&$(p).height()<=0&&f(this,Wt).lastRowHidden&&u==a){const m=parseInt(i.closest("tr").dataset.matrixRow),d=parseInt(i.dataset.col);f(this,Wt).scrollBy(1);const b=f(this,ro).call(this,m,d);this.currentCell=b,setTimeout(()=>{b.focus()})}else this.currentCell=i}});Y(this,no,E=>{if(!(E.ctrlKey||E.altKey))if(["TH","TD"].includes(E.target.tagName)){if(["Tab","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(E.code))E.preventDefault(),this.moveCell(E);else if(["Enter"].includes(E.code)){E.preventDefault();const t=E.target.querySelector("ng-input");if(t){const l=t.shadowRoot.querySelector("input[type=text]");l.focus(),l.select()}}}else["NG-INPUT"].includes(E.target.tagName)&&["Enter"].includes(E.code)});it(this,"resetEvent",()=>{document.addEventListener("contextmenu",E=>E.preventDefault()),$(".ng-table tbody.bindable",f(this,Wt).body).off("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).off("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).off("mousedown","th,td",f(this,io)),$(".ng-table tbody.bindable",f(this,Wt).body).on("wheel",f(this,so)),$(".ng-table tbody",f(this,Wt).body).on("keydown","th,td",f(this,no)),$(".ng-table tbody",f(this,Wt).body).on("mousedown","th,td",f(this,io)),f(this,Wt).selection&&f(this,Wt).selection.resetEvent()});tt(this,Wt,E),tt(this,Es,-1),tt(this,As,-1),tt(this,Mi,-1),tt(this,Ts,-1),this.resetEvent()}get matrixRow(){return f(this,As)}get col(){return f(this,Ts)}get currentCell(){return f(this,Ri)}set currentCell(E){if(!E)return;tt(this,Wl,f(this,Ri)),tt(this,Ri,E),E.focus();var t=E.closest("tr");tt(this,lr,parseInt(t.dataset.row)*f(this,Wt).template.length+t.sectionRowIndex%f(this,Wt).template.length,Ou),tt(this,lr,parseInt(E.dataset.col),Lu),tt(this,lr,E.cellIndex,ju),tt(this,lr,E.dataset.bind,Pu),t.closest("tbody.fixed")||(f(this,Wt).row.at=E.dataset.row),f(this,Wt).selection.selectCell(f(this,lr,Nu),f(this,lr,$u));const l=E,c=parseInt(l.dataset.row),o=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),r=parseInt(l.dataset.col),n=l.cellIndex,s=parseInt(f(this,Es)/f(this,Wt).template.length),e=parseInt(f(this,Es))%parseInt(f(this,Es)/f(this,Wt).template.length),i=f(this,Mi),u=f(this,eo);if(c!=s||o!=e||r!=i){const a=new CustomEvent(H.EVENT.CELL_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,col:i,row:s,subrow:e,bind:f(this,Ni)},f(this,Wt).dispatchEvent(a)}if(c!=s){const a=new CustomEvent(H.EVENT.ROW_POS_CHANGED,{bubbles:!0,detail:{}});a.col=r,a.cellIndex=n,a.row=c,a.subrow=o,a.bind=l.dataset.bind,a.prev={col:i,cellIndex:u,row:s,subrow:e,bind:f(this,Ni)},f(this,Wt).dispatchEvent(a)}}}Wt=new WeakMap,Wl=new WeakMap,Ri=new WeakMap,Es=new WeakMap,As=new WeakMap,Mi=new WeakMap,Ts=new WeakMap,Ii=new WeakMap,eo=new WeakMap,Ni=new WeakMap,Oi=new WeakMap,lr=new WeakSet,Nu=function(){return f(this,As)},Ou=function(E){tt(this,Es,f(this,As)),tt(this,As,parseInt(E))},zf=function(){return f(this,Ii)},ju=function(E){tt(this,eo,f(this,Ii)),tt(this,Ii,parseInt(E))},$u=function(){return f(this,Ts)},Lu=function(E){tt(this,Mi,f(this,Ts)),tt(this,Ts,parseInt(E))},Uf=function(){return f(this,Oi)},Pu=function(E){tt(this,Ni,f(this,Oi)),tt(this,Oi,E)},ti=new WeakMap,ji=new WeakMap,ro=new WeakMap,so=new WeakMap,io=new WeakMap,no=new WeakMap;class Xu{constructor(E){Y(this,kt);Y(this,Sr);Y(this,$i);it(this,"getActiveCell",()=>{var E=this.selected.currentRow,t=this.selected.currentCol,l=parseInt(this.selected.currentMatrixRow%f(this,kt).template.length),c=$(`tbody.bindable [data-row=${E}]`,f(this,kt).body).find(`[data-col=${t}]`).not(".dummy").eq(l);return c.length>0?c[0]:null});it(this,"refresh",()=>{switch(this.type){case H.SELECTTYPE.ROW:this.selected.startRow=parseInt(f(this,kt).row.at*f(this,kt).template.length),this.selected.endRow=this.selected.startRow+f(this,kt).template.length-1;var t=[];$(`tbody tr[data-row=${parseInt(this.selected.startRow/f(this,kt).template.length)}] td`,f(this,kt).body).not(".dummy").not(".first").each((o,r)=>{parseInt(H.j.querySelectorAll(r).attr("tabindex"))>=0&&t.push(Number(r.dataset.col))}),this.selected.startCol=t.length>0?Math.min.apply(null,t):-1,this.selected.endCol=t.length>0?Math.max.apply(null,t):-1;break;case H.SELECTTYPE.ROWS:this.selected.startRow=parseInt(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length,this.selected.endRow=parseInt(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length-1+f(this,kt).template.length,this.selected.startCol=f(this,kt).firstCol,this.selected.endCol=f(this,kt).lastCol;break;case H.SELECTTYPE.COL:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1),this.selected.endCol=this.selected.startCol;var E=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);this.selected.startCol>=s&&this.selected.endCol<=s+e-1&&E.push(n)})});var t=[];E.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.COLS:this.selected.startRow=0,this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length-1);var E=[];f(this,kt).template.each((o,r)=>{r.querySelectorAll("th,td").forEach(n=>{const s=parseInt(n.dataset.col),e=parseInt(n.colSpan||1);(this.selected.startCol>=s&&this.selected.startCol<=s+e-1||this.selected.endCol>=s&&this.selected.endCol<=s+e-1)&&E.push(n)})});var t=[];E.forEach(o=>{t.push(parseInt(o.dataset.col)),t.push(parseInt(o.dataset.col)+parseInt(o.colSpan||1)-1)}),this.selected.startCol=Math.min.apply(null,t),this.selected.endCol=Math.max.apply(null,t);break;case H.SELECTTYPE.CELL:this.selected.endRow=this.selected.startRow,this.selected.endCol=this.selected.startCol;break;case H.SELECTTYPE.AREA:break;case H.SELECTTYPE.NONE:this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1;break}H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),H.j.querySelectorAll(".selected-current",f(this,kt).body).removeClass("selected-current"),H.j.querySelectorAll(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).addClass("selected-current"),H.j.querySelectorAll(`.col-indicator[data-col="${this.selected.currentCol}"]`,f(this,kt).body).addClass("selected-current"),$(`tr[data-row="${this.selected.currentRow}"] ng-row-indicator`,f(this,kt).body).closest("th,td").addClass("selected-current");var l=this.getActiveCell();l&&H.j.querySelectorAll(l).addClass("active"),$("tbody th,tbody td",f(this,kt).body).each((o,r)=>{var n=parseInt(r.dataset.col),s=parseInt(r.dataset.row)*f(this,kt).template.length+r.closest("tr").sectionRowIndex%f(this,kt).template.length;s==this.selected.currentMatrixRow&&n==this.selected.currentCol,s+r.rowSpan-1>=this.selected.startRow&&s<=this.selected.endRow&&n+r.colSpan-1>=this.selected.startCol&&n<=this.selected.endCol&&(H.j.querySelectorAll(r).addClass("selected"),this.selected.startRow==this.selected.endRow&&this.selected.startCol==this.selected.endCol?H.j.querySelectorAll(r).addClass("selected-top").addClass("selected-bottom").addClass("selected-left").addClass("selected-right"):(s==this.selected.startRow&&H.j.querySelectorAll(r).addClass("selected-top"),s+r.rowSpan-1==this.selected.endRow&&H.j.querySelectorAll(r).addClass("selected-bottom"),n==this.selected.startCol&&H.j.querySelectorAll(r).addClass("selected-left"),n+r.colSpan-1==this.selected.endCol&&H.j.querySelectorAll(r).addClass("selected-right"),H.j.querySelectorAll(r).addClass("multi-selected")))}),$("tbody.bindable tr",f(this,kt).body).each((o,r)=>{var n=r.querySelector("ng-row-indicator");if(n){n=n.closest("th,td");for(var s=parseInt(n.dataset.row),e=0;e<n.rowSpan;e++){var s=parseInt(n.dataset.row)*f(this,kt).template.length+r.sectionRowIndex%f(this,kt).template.length+e;s>=this.selected.startRow&&s<=this.selected.endRow&&H.j.querySelectorAll(n).addClass("selected-area")}}});for(var c=this.selected.startCol;c<=this.selected.endCol;c++)H.j.querySelectorAll(`.col-indicator[data-col="${c}"]`,f(this,kt).body).addClass("selected-area");(this.selected.oldStartRow!=this.selected.startRow||this.selected.oldEndRow!=this.selected.endRow||this.selected.oldStartCol!=this.selected.startCol||this.selected.oldEndCol!=this.selected.endCol)&&(f(this,Sr).oldStartRow=this.selected.oldStartRow,f(this,Sr).oldEndRow=this.selected.oldEndRow,f(this,Sr).oldStartCol=this.selected.oldStartCol,f(this,Sr).oldEndCol=this.selected.oldEndCol,f(this,Sr).startRow=this.selected.startRow,f(this,Sr).endRow=this.selected.endRow,f(this,Sr).startCol=this.selected.startCol,f(this,Sr).endCol=this.selected.endCol,f(this,kt).dispatchEvent(f(this,Sr))),this.selected.oldStartRow=this.selected.startRow,this.selected.oldEndRow=this.selected.endRow,this.selected.oldStartCol=this.selected.startCol,this.selected.oldEndCol=this.selected.endCol});it(this,"resetEvent",()=>{$(".ng-table tbody.bindable",f(this,kt).body).off("mousedown","th,td",f(this,oo)).on("mousedown","th,td",f(this,oo))});Y(this,Xl,()=>{this.resetEvent()});Y(this,oo,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftKey)return;const t=E.target.closest("th,td"),l=t.closest("tr"),c=parseInt(t.dataset.row)*f(this,kt).template.length+l.sectionRowIndex%f(this,kt).template.length,o=parseInt(t.dataset.col);this.selected.currentCol=t.dataset.col,this.selected.currentRow=t.dataset.row,this.selected.currentMatrixRow=parseInt(t.dataset.row*f(this,kt).template.length)+parseInt(t.closest("tr").sectionRowIndex%f(this,kt).template.length);var r={row:-1,col:-1};const n=a=>{const h=a.target.closest("th,td"),p=h.closest("tr");if(p.sectionRowIndex==r.row&&h.dataset.col==r.col||$(h).find("NG-ROW-INDICATOR").length>0)return;const m=parseInt(h.dataset.row)*f(this,kt).template.length+p.sectionRowIndex%f(this,kt).template.length,d=parseInt(h.dataset.col);this.selectArea(c,o,m,d),r={row:p.sectionRowIndex,col:h.dataset.col}},s=a=>{f(this,kt).body.querySelector("ng-vscrollbar").stopScroll(),clearInterval(f(this,$i)),$(".ng-table tbody.bindable",f(this,kt).body).off("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).off("mouseleave",i),$(document).off("mousemove",u),$(document).off("mouseup",s)},e=a=>{clearInterval(f(this,$i)),$(document).off("mousemove",u)},i=a=>{const h=$(".ng-container-body",f(this,kt).body),p=h.find("thead"),m=h.find("tfoot");var d;parseInt(a.pageY)>=parseInt(h.offset().top+h.height()-m.height())?d=1:parseInt(a.pageY)<=parseInt(h.offset().top+p.height())&&(d=-1),this.selected.col=this.selected.startCol,d&&($(document).on("mousemove",u),tt(this,$i,setInterval(()=>{if(d>0){this.selected.endRow=h.find("tbody.bindable tr:last-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.endRow=Math.floor(this.selected.endRow/f(this,kt).template.length)*f(this,kt).template.length+f(this,kt).template.length-1),this.selected.endRow>parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1&&(this.selected.endRow=parseInt(f(this,kt).data.count()*f(this,kt).template.length)-1)}else{this.selected.startRow=h.find("tbody.bindable tr:first-child")[0].sectionRowIndex+f(this,kt).dataManager.viewRecords.rawIndex*f(this,kt).template.length-f(this,kt).template.length;const b=parseInt(this.selected.startRow/f(this,kt).template.length),g=parseInt(this.selected.endRow/f(this,kt).template.length);b!=g&&(this.selected.startRow=Math.floor(this.selected.startRow/f(this,kt).template.length)*f(this,kt).template.length),this.selected.startRow<0&&(this.selected.startRow=0)}f(this,kt).scrollBy(d)},500)))},u=a=>{var h;if($(".col-indicator",f(this,kt).body).each((p,m)=>{var d=$(m).offset().left,b=$(m).width();if(a.pageX>d&&a.pageX<d+b)return h=m,!1}),h){let p=parseInt(h.dataset.col);if(f(this,kt).body.querySelector(`tbody.bindable [data-col="${p}"] ng-row-indicator`))return;$("th,td",f(this,kt).template).each((m,d)=>{p>=parseInt(d.dataset.col)&&p<=parseInt(d.dataset.col)+d.colSpan-1&&(p=p>=o?Math.max(p,parseInt(d.dataset.col)+d.colSpan-1):Math.min(p,parseInt(d.dataset.col)))}),p>=this.selected.startCol&&p<=this.selected.endCol?p>this.selected.col?this.selected.endCol=p:p<this.selected.col?this.selected.startCol=p:this.selected.startCol=this.selected.endCol=p:p>this.selected.endCol?this.selected.endCol=p:p<this.selected.startCol&&(this.selected.startCol=p)}};[H.SELECTTYPE.AREA,H.SELECTTYPE.ROWS,H.SELECTTYPE.COLS].includes(this.type)&&($(".ng-table tbody.bindable",f(this,kt).body).on("mousemove",n),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseenter",e),$(".ng-table tbody.bindable",f(this,kt).body).on("mouseleave",i)),$(document).on("mouseup",s),this.rawIndex=f(this,kt).dataManager.viewRecords.rawIndex});it(this,"selectArea",(E,t,l,c)=>{var o=Math.min(E,l),r=Math.max(E,l),n=Math.min(t,c),s=Math.max(t,c);$("tbody.bindable th,tbody.bindable td",f(this,kt).body).each((e,i)=>{var u=i.closest("tr"),a=parseInt(i.dataset.row)*f(this,kt).template.length+u.sectionRowIndex%f(this,kt).template.length,h=parseInt(i.dataset.col);a+i.rowSpan-1>=o&&a<=r&&h+i.colSpan-1>=n&&h<=s&&(o=Math.min(a,o),n=Math.min(h,n),r=Math.max(a+i.rowSpan-1,r),s=Math.max(h+i.colSpan-1,s))}),this.selected.startRow=o,this.selected.endRow=r,this.selected.startCol=n,this.selected.endCol=s,this.refresh()});it(this,"selectCell",(E,t)=>{this.selected.currentCol=t,this.selected.currentMatrixRow=E,this.selected.currentRow=parseInt(E/f(this,kt).template.length),this.selectArea(E,t,E,t)});it(this,"clear",()=>{this.selected.clear()});tt(this,kt,E),tt(this,Sr,new CustomEvent("selectchanged",{bubbles:!0,detail:{}})),this.selected={currentRow:-1,currentMatrixRow:-1,currentCol:-1,startRow:-1,startCol:-1,endRow:-1,endCol:-1,oldStartRow:-1,oldStartCol:-1,oldEndRow:-1,oldEndCol:-1,clear:()=>{this.selected.startRow=this.selected.endRow=this.selected.startCol=this.selected.endCol=-1,H.j.querySelectorAll("th,td",f(this,kt).body).removeClass("selected").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right")}},f(this,Xl).call(this)}get type(){return f(this,kt).getAttribute("select-type")}set type(E){if(!Object.values(H.SELECTTYPE).includes(E))throw`invalid select type : ${E}`;Object.values(H.SELECTTYPE).forEach(t=>{H.j.querySelectorAll(".ng-table",f(this,kt).body).removeClass(`select-type-${t}`)}),H.j.querySelectorAll(".ng-table",f(this,kt).body).addClass(`select-type-${E}`),f(this,kt).cell.refresh()}get rows(){const E=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&E.push(parseInt(t/f(this,kt).template.length));return[...new Set(E)]}get subrows(){const E=[];for(var t=this.selected.startRow;t<=this.selected.endRow;t++)t>=0&&E.push(parseInt(t%f(this,kt).template.length));return[...new Set(E)]}get cols(){const E=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t)$(`[data-col="${l}"]`,f(this,kt).template[c]).length>0&&E.push(l);return[...new Set(E)]}get binds(){const E=[],t=this.subrows;for(var l=this.selected.startCol;l<=this.selected.endCol;l++)for(var c of t){const o=$(`[data-col="${l}"]`,f(this,kt).template[c]);o.length>0&&o[0].dataset.bind&&E.push(o[0].dataset.bind)}return[...new Set(E)]}get firstRow(){return parseInt(this.selected.startRow/f(this,kt).template.length)}get lastRow(){return parseInt(this.selected.endRow/f(this,kt).template.length)}get firstCol(){return this.selected.startCol}get lastCol(){return this.selected.endCol}}kt=new WeakMap,Sr=new WeakMap,$i=new WeakMap,Xl=new WeakMap,oo=new WeakMap;class Yu{constructor(E){Y(this,Ot);Y(this,hs);Y(this,ao);Y(this,lo);Y(this,ho);Y(this,jr);Y(this,co);Y(this,uo);Y(this,dr,0);Y(this,fo,E=>{var t;return $(".ng-container-body tbody.bindable tr",f(this,Ot).body).each((l,c)=>{var o=$(c).offset();if(E>=o.top&&E<=o.top+$(c).height())return t=c,!1}),t});Y(this,Yl,E=>{var t=f(this,Kl).call(this,E);if(t>0){t>f(this,Ot).dataManager.viewRecords.rawIndex&&(t=f(this,Ot).dataManager.viewRecords.rawIndex);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tbody.bindable tr:first-child",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleFirstRow();for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i-t+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i-t+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i-t+l,e.before(a.outerHTML)})}return t});Y(this,Gl,E=>{var t=f(this,Zl).call(this,E);if(t>0){f(this,Ot).view.getVisibleLastRow()+t>=f(this,Ot).data.count()&&(t=f(this,Ot).data.count()-f(this,Ot).view.getVisibleLastRow()-1);const c=f(this,Ot).template.clone(),o=c.clone(),r=c.clone();c.find("th,td").not("[fixed=left]").remove(),o.find("th,td").not("[fixed=right]").remove(),r.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const n=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-left")),s=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-right")),e=$("tr.nodata",f(this,Ot).body.querySelector(".ng-container-body")),i=f(this,Ot).view.getVisibleLastRow()+1;for(var l=0;l<t;l++)c.each((u,a)=>{a.dataset.row=i+l,n.before(a.outerHTML)}),o.each((u,a)=>{a.dataset.row=i+l,s.before(a.outerHTML)}),r.each((u,a)=>{a.dataset.row=i+l,e.before(a.outerHTML)})}return t});Y(this,Kl,E=>{const t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,dr)+E;if(t<=0)return 0;for(var c=0,o=0;o<l;)o+=f(this,Ot).view.getRowHeight(t-++c);return c});Y(this,Zl,E=>{const t=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY()+E,l=f(this,Ot).view.getVisibleFirstRow(),c=f(this,Ot).view.getVisibleLastRow();for(var o=0,r=0;o<t;)o+=f(this,Ot).view.getRowHeight(l+r++);return r+1-(c-l+1)});Y(this,Jl,()=>{const E=f(this,Ot).view.getVisibleFirstRow(),t=f(this,Ot).view.getVisibleLastRow();for(var l=E,c=0,o=E;o<t;o++)if(c+=f(this,Ot).view.getRowHeight(o),c>f(this,dr)*-1){c-=f(this,Ot).view.getRowHeight(o),l=o;break}if(l>E){for(var o=E;o<l;o++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${o}"]`).forEach(n=>{$(n).remove()});tt(this,dr,(c*-1-f(this,dr))*-1),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(r=>{r.style.transform=`translateY(${f(this,dr)}px)`})}return l-E});Y(this,Ql,()=>{const E=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY(),t=f(this,Ot).view.getVisibleFirstRow(),l=f(this,Ot).view.getVisibleLastRow();for(var c=f(this,Ot).data.count(),o=0,r=t;r<=l;r++)if(o+=f(this,Ot).view.getRowHeight(r),o>E){c=r+1;break}for(r=c;r<=l;r++)f(this,Ot).body.querySelectorAll(`tbody.bindable tr[data-row="${r}"]`).forEach(n=>{$(n).remove()});return l-c});it(this,"scrollTop",()=>{tt(this,dr,0),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(E=>{E.style.transform=`translateY(${f(this,dr)}px)`})});Y(this,po,E=>{clearInterval(f(this,hs)),tt(this,ao,E.touches[0].pageX),tt(this,lo,E.touches[0].pageX-$(".ng-container-body table",f(this,Ot).body).position().left),tt(this,ho,E.touches[0].pageY),tt(this,jr,E.touches[0].pageY),tt(this,uo,new Date);const t=f(this,fo).call(this,E.touches[0].pageY);t&&tt(this,co,parseInt(t.dataset.row))});Y(this,mo,E=>{if(!(E.touches.length>1||E.changedTouches.length>1)){if(E.preventDefault(),Math.abs(E.changedTouches[0].pageY-f(this,jr))>0){if(E.changedTouches[0].pageY>f(this,jr)){if(f(this,dr)+E.changedTouches[0].pageY-f(this,jr)>0&&f(this,Ot).view.getVisibleFirstRow()!=0){const o=f(this,Yl).call(this,E.changedTouches[0].pageY-f(this,jr));if(o>0){for(var t=f(this,Ot).view.getVisibleFirstRow(),l=t;l<t+o;l++)tt(this,dr,f(this,dr)-f(this,Ot).view.getRowHeight(l));f(this,Ot).dataManager.viewRecords.rawIndex-=o,f(this,Ot).view.redrawV3()}}}else E.changedTouches[0].pageY<f(this,jr)&&f(this,Gl).call(this,f(this,jr)-E.changedTouches[0].pageY)>0&&f(this,Ot).view.redrawV3();tt(this,dr,f(this,dr)+(E.changedTouches[0].pageY-f(this,jr))),f(this,Ot).body.querySelectorAll("tbody.bindable").forEach(o=>{o.style.transform=`translateY(${f(this,dr)}px)`}),tt(this,jr,E.changedTouches[0].pageY)}else if(Math.abs(E.changedTouches[0].pageX-f(this,ao))>20){var c=E.changedTouches[0].pageX-f(this,lo);c>0&&(c=0),$(".ng-container-body table",f(this,Ot).body).css({left:c}),f(this,Ot).body.querySelector("ng-hscrollbar").adjustThumb2()}}});Y(this,go,E=>{f(this,Ot).view.getVisibleFirstRow()==0&&f(this,dr)>0&&this.scrollTop();var t=f(this,Jl).call(this);f(this,Ot).dataManager.viewRecords.rawIndex+=t,f(this,Ql).call(this);const l=f(this,Ot).view.getTotalSpace()-f(this,Ot).view.getTranslateY();for(var c=0,o=f(this,Ot).view.getVisibleFirstRow();o<=f(this,Ot).view.getVisibleLastRow();o++)c+=f(this,Ot).view.getRowHeight(o);$(".ng-container tbody.bindable tr.nodata",f(this,Ot).body).height(l-c),f(this,Ot).view.fitPage();const r=f(this,fo).call(this,E.changedTouches[0].pageY);if(!r||f(this,co)==parseInt(r.dataset.row))return;const n=500,s=parseInt(new Date-f(this,uo));if(s>n)return;const e=parseInt((n-s)/1*((f(this,Ot).data.count()-f(this,Ot).dataManager.viewRecords.rawIndex)/1)/(n*1)),i=f(this,Ot).dataManager.viewRecords.rawIndex+e*(E.changedTouches[0].pageY>f(this,ho)?-1:1);clearInterval(f(this,hs)),i>f(this,Ot).dataManager.viewRecords.rawIndex?tt(this,hs,setInterval(()=>{f(this,Ot).scrollBy(1),f(this,Ot).view.getVisibleLastRow()>=i&&clearInterval(f(this,hs))},10)):tt(this,hs,setInterval(()=>{f(this,Ot).scrollBy(-1),f(this,Ot).dataManager.viewRecords.rawIndex<=i&&clearInterval(f(this,hs))},10))});Y(this,bo,E=>{});it(this,"resetEvent",()=>{$("tbody.bindable",f(this,Ot).body).off("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).off("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).off("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).off("touchcancel",f(this,bo)),$("tbody.bindable",f(this,Ot).body).on("touchstart",f(this,po)),$("tbody.bindable",f(this,Ot).body).on("touchend",f(this,go)),$("tbody.bindable",f(this,Ot).body).on("touchmove",f(this,mo)),$("tbody.bindable",f(this,Ot).body).on("touchcancel",f(this,bo))});tt(this,Ot,E),this.resetEvent()}}Ot=new WeakMap,hs=new WeakMap,ao=new WeakMap,lo=new WeakMap,ho=new WeakMap,jr=new WeakMap,co=new WeakMap,uo=new WeakMap,dr=new WeakMap,fo=new WeakMap,Yl=new WeakMap,Gl=new WeakMap,Kl=new WeakMap,Zl=new WeakMap,Jl=new WeakMap,Ql=new WeakMap,po=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class Gu extends _r{constructor(){super();Y(this,th);Y(this,eh);Y(this,Li);Y(this,yo);Y(this,Pi);it(this,"dataRefresh",t=>{var l=this.cell.closest("tr").data;for(var c of f(this,Pi).data.datasets){var t=l[c["data-bind"]];switch(typeof t){case"string":c.data=t.split(",");break;case"object":Array.isArray(t)&&(c.data=t);break}}$(f(this,Li)).height(28),setTimeout(()=>{f(this,yo).update()}),t||this.reset()})}connectedCallback(){tt(this,th,this.getRootNode().host),tt(this,eh,this.closest("th,td")),this.shadowRoot.innerHTML=`
|
|
46
46
|
<style>
|
|
47
47
|
:host {
|
|
48
48
|
height: 100%;
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
</style>
|
|
72
72
|
<canvas class="chart" width="${$(this).width()}" height="${$(this).height()-4}"></canvas>
|
|
73
|
-
`,super.connectedCallback(),tt(this
|
|
73
|
+
`,super.connectedCallback(),tt(this,Li,this.shadowRoot.querySelector("canvas.chart"));var t=JSON.parse(this.getAttribute("labels")),l=JSON.parse(this.getAttribute("datasets"));for(var c of l)c.data=new Array(t.length);tt(this,Pi,{type:"line",data:{labels:t,datasets:l},options:{responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!1},legend:{display:!1}},scales:{x:{display:!1},y:{display:!1}}}}),tt(this,yo,new Chart(f(this,Li),f(this,Pi)))}}th=new WeakMap,eh=new WeakMap,Li=new WeakMap,yo=new WeakMap,Pi=new WeakMap,customElements.get("ng-line-chart")||customElements.define("ng-line-chart",Gu);class Ku extends Qs{constructor(){super();Y(this,Di);Y(this,Bi);Y(this,vo);Y(this,Fi);Y(this,qi);it(this,"dataRefresh",t=>{this.closest("tbody")&&(H.isNull(this.value)||this.value==this.trueValue||this.value==this.falseValue?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid"),$(f(this,Di)).prop("checked",this.value==this.trueValue),f(this,Bi)&&$(f(this,Bi)).html(this.value==this.trueValue?f(this,Fi):this.value==this.falseValue?f(this,qi):this.value),t||this.reset())});it(this,"selectAll",t=>{var l=this.getAttribute("enable")||this.cell.getAttribute("enable"),c=this.getAttribute("readonly")||this.cell.getAttribute("readonly"),o=this.getAttribute("visible")||this.cell.getAttribute("visible");l&&(l=this.owner.exprFunction2(l)),c&&(c=this.owner.exprFunction2(c)),o&&(o=this.owner.exprFunction2(o));var r=this.owner.data.getValidData();const n=this.owner.fields.indexOf(this.cell.dataset.bind);for(var s=0;s<r.length;s++)l&&l(r[s],s)==!1||c&&c(r[s],s)==!0||o&&o(r[s],s)==!1||(r[s].v[n]=t?this.trueValue:this.falseValue);this.owner.view.redraw()});this.trueValue=this.getAttribute("true-value")||"Y",this.falseValue=this.getAttribute("false-value")||"N",tt(this,Fi,this.getAttribute("true-text")||""),tt(this,qi,this.getAttribute("false-text")||""),tt(this,vo,this.getAttribute("is-radio")=="true")}connectedCallback(){const t=this.closest("th,td").getAttribute("text-align")||"center",l=t=="left"?"flex-start":t=="right"?"flex-end":"center",c=t=="right"?"row-reverse":"unset",o=this.getAttribute("selected-border-color")||"dimgray",r="<label>"+(f(this,vo)?`<input type="radio" value="${this.trueValue}">`:'<input type="checkbox">')+"<span></span></label>";this.shadowRoot.innerHTML=`
|
|
74
74
|
<style>
|
|
75
75
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngCheckBox.css";
|
|
76
76
|
${H.getCustomPath(this,"ngCheckBox.css")}
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
<div class="ng-wrap">
|
|
95
95
|
${r}
|
|
96
96
|
</div>
|
|
97
|
-
`,super.connectedCallback(),tt(this,
|
|
97
|
+
`,super.connectedCallback(),tt(this,Di,this.shadowRoot.querySelector("input")),tt(this,Bi,this.shadowRoot.querySelector("span")),this.closest("thead")&&$(f(this,Di)).on("change",n=>{var s=this.owner.body.querySelector(`.ng-table tbody.bindable [data-col="${this.cell.dataset.col}"]`);s&&s.querySelector("ng-checkbox").selectAll($(n.target).is(":checked"))}),$(this.cell).on("keydown",n=>{switch(n.preventDefault(),n.code){case"Space":this.value=this.value==this.trueValue?this.falseValue:this.trueValue;break}})}get dataSource(){return[{value:this.trueValue,text:f(this,Fi)},{value:this.falseValue,text:f(this,qi)}]}}Di=new WeakMap,Bi=new WeakMap,vo=new WeakMap,Fi=new WeakMap,qi=new WeakMap,customElements.get("ng-checkbox")||customElements.define("ng-checkbox",Ku);class Zu extends HTMLElement{constructor(){super();Y(this,ei);Y(this,Br);Y(this,wo);Y(this,Hi);Y(this,xo,t=>{t.preventDefault(),t.stopPropagation(),H.j.querySelectorAll(this).hasClass("expand")?f(this,rh).call(this):this.expand()});it(this,"expand",()=>{if(H.j.querySelectorAll(this).hasClass("expand"))return;$(this).addClass("expand"),f(this,Br).style.color=f(this,wo);const t=parseInt(f(this,Br).dataset.col),l=f(this,Br).colSpan||1;for(var c=0;c<l;c++)f(this,ei).columns.width(t+c,f(this,Hi)[c])});Y(this,rh,()=>{if(!H.j.querySelectorAll(this).hasClass("expand"))return;$(this).removeClass("expand"),tt(this,wo,f(this,Br).style.color),f(this,Br).style.color="transparent",tt(this,Hi,[]);const t=parseInt(f(this,Br).dataset.col),l=f(this,Br).colSpan||1,c=20/l;for(var o=0;o<l;o++){const r=f(this,ei).body.querySelector(`colgroup col[data-col="${t+o}"]`);f(this,Hi).push(r.getAttribute("width")),f(this,ei).columns.width(t+o,c)}});this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
98
98
|
<style>
|
|
99
99
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngColExpand.css";
|
|
100
100
|
${H.getCustomPath(this,"ngColExpand.css")}
|
|
101
101
|
</style>
|
|
102
|
-
`,tt(this,ei,this.getRootNode().host),tt(this,Br,this.closest("th,td")),H.j.querySelectorAll(this).addClass("expand"),$(this).off("click",f(this,xo)),$(this).on("click",f(this,xo))}}ei=new WeakMap,Br=new WeakMap,wo=new WeakMap,
|
|
102
|
+
`,tt(this,ei,this.getRootNode().host),tt(this,Br,this.closest("th,td")),H.j.querySelectorAll(this).addClass("expand"),$(this).off("click",f(this,xo)),$(this).on("click",f(this,xo))}}ei=new WeakMap,Br=new WeakMap,wo=new WeakMap,Hi=new WeakMap,xo=new WeakMap,rh=new WeakMap,customElements.get("ng-col-expand")||customElements.define("ng-col-expand",Zu);class Ju extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
103
103
|
<style>
|
|
104
104
|
:host {
|
|
105
105
|
position: absolute;
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
</style>
|
|
158
158
|
|
|
159
159
|
<div></div>
|
|
160
|
-
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Ju),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",Qu);class td{constructor(E){Y(this,ve);Y(this,$r);Y(this,Fr);Y(this,_o);Y(this,kr);Y(this,Hi);Y(this,qr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.removeEventListener("click",f(this,So))}),$(document).on("mouseup",f(this,zi)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.addEventListener("click",f(this,So))})});Y(this,So,E=>{if(E.target.closest("ng-filter-button"))return;const t=E.currentTarget||E.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-left")||E.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=E.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});E.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-body")||E.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=E.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});E.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,au,E=>{if(!["INPUT"].includes(E.target.tagName)){var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.buttons=1,f(this,Eo).call(this,E),$(document).on("touchmove",l=>f(this,ko).call(this,l))}});Y(this,ko,E=>{var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.clientX=E.changedTouches[0].clientX,f(this,Ui).call(this,E)});Y(this,lu,E=>{E.clientX=E.changedTouches[0].clientX,f(this,zi).call(this,E)});Y(this,Co,E=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&E.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,Hi,!0),setTimeout(()=>{f(this,Hi)&&f(this,Eo).call(this,E)},500))});Y(this,Eo,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey||["INPUT"].includes(E.target.tagName))return;var t=E.pageX-$(E.target).offset().left;if(t<=3||$(E.target).width()-t<=3)return;E.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=E.target.closest("th,td");tt(this,kr,{col:parseInt(l.dataset.col),row:E.target.closest("tr").sectionRowIndex,target:l}),tt(this,_o,t+f(this,$r)[0].getBoundingClientRect().x);const c=f(this,$r)[0].shadowRoot.querySelector("span");c.innerHTML=$(E.target).html(),$(c).css({font:$(l).css("font")}),f(this,$r).show(),f(this,$r).width($(l).width()),f(this,$r).height($(l).height()),f(this,$r).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Ui)),f(this,Ao).call(this,E.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,Fr).height($(o).height())});Y(this,zi,E=>{if(tt(this,Hi,!1),$(document).off("mousemove",f(this,Ui)),$(document).off("touchmove",f(this,ko)),f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),f(this,kr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,ve).columns.moveColumn(f(this,kr).target,t)}tt(this,qr,null),tt(this,kr,null),f(this,$r).hide(),f(this,Fr).hide()});Y(this,Ui,E=>{if(f(this,kr)!=null){f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),tt(this,qr,{target:E.target,cursor:$(E.target).css("cursor")}),$(E.target).css({cursor:E.target.closest("thead")||E.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);if(t)if(f(this,kr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,kr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,Fr).hide();f(this,Ao).call(this,E.pageX)}});Y(this,Ao,E=>{f(this,$r).offset({left:E-f(this,_o)})});tt(this,ve,E),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,$r,$("ng-col-mover-grip",f(this,ve).body)),tt(this,Fr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,$r=new WeakMap,Fr=new WeakMap,_o=new WeakMap,kr=new WeakMap,Hi=new WeakMap,qr=new WeakMap,So=new WeakMap,au=new WeakMap,ko=new WeakMap,lu=new WeakMap,Co=new WeakMap,Eo=new WeakMap,zi=new WeakMap,Ui=new WeakMap,Ao=new WeakMap;class ed{constructor(E){Y(this,Ie);Y(this,Cr);Y(this,Er);Y(this,Rs);Y(this,Ms);Y(this,Hr);Y(this,Ar);Y(this,Is);Y(this,Ns,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ie).body).off("mousemove",f(this,Mo)).off("mousedown",f(this,Io)).off("dblclick",f(this,To)),$(document).off("mouseup",f(this,Ro)),$(".ng-table > thead",f(this,Ie).body).on("mousemove",f(this,Mo)).on("mousedown",f(this,Io)).on("dblclick",f(this,To)),$(document).on("mouseup",f(this,Ro))});it(this,"autoFit",E=>{if(f(this,Ie).body)if(E){f(this,Ie).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Ns,[]);var t=0;$(".ng-container-body col",f(this,Ie).body).each((c,o)=>{f(this,Ns).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Ns).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ie).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ie).body).width();l!=0&&f(this,Ns).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ie).body).css({width:"0","min-width":"0"}),f(this,Ns).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,To,E=>{E.target.style.cursor=="col-resize"&&f(this,ih).call(this,E)});Y(this,Ro,E=>{tt(this,Ms,!1)});Y(this,Mo,E=>{if(!E.target.closest("ng-info")&&(E.target=E.target.closest("th,td"),!!E.target&&f(this,Ie).getAttribute("col-resizable")=="true"&&!(E.altKey||E.ctrlKey||E.shiftkey)))if(E.preventDefault(),E.offsetX<=2||E.offsetX>=E.target.offsetWidth-2){if(E.offsetX<=2&&f(this,Ie).tableUtils.isFirst(E.target)||E.offsetX>=E.target.offsetWidth-2&&f(this,Ie).tableUtils.isLast(E.target))return;E.target.style.cursor="col-resize"}else E.target.style.cursor="auto"});Y(this,hu,E=>{tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,sh).call(this,E)},500)});Y(this,Io,E=>{const t=E.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,No).call(this,E)},500))});Y(this,sh,E=>{E.target=E.target.closest("th,td");var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.buttons=1,f(this,No).call(this,E),f(this,Cr).is(":visible")?($(E.target).on("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).on("touchend",l=>f(this,Xi).call(this,l))):($(E.target).off("touchmove",l=>f(this,Vi).call(this,l)),$(E.target).off("touchend",l=>f(this,Xi).call(this,l)))});Y(this,No,E=>{if(E.target=E.target.closest("th,td"),!(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey)){if(tt(this,Is,!!E.target.closest(".ng-container-right")),E.pageX-$(E.target).offset().left<=3){var t=$(`.col-indicator[data-col=${E.target.dataset.col}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,f(this,Ie).tableUtils.prev(t)),tt(this,Ar,$(t))}else{if($(E.target).width()-E.offsetX>2)return;var l=parseInt(E.target.dataset.col)+E.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,$(t)),tt(this,Ar,f(this,Ie).tableUtils.next(t))}f(this,Cr).show(),f(this,Er).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top,left:f(this,Ar).offset().left-1}),f(this,Er).height(f(this,Ie).body.querySelector(".ng-container-body").offsetHeight),f(this,Rs).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top}),f(this,Yi).call(this,E.pageX),$(f(this,Cr)).off("mousemove",f(this,Wi)).off("mouseup",f(this,ri)).on("mousemove",f(this,Wi)).on("mouseup",f(this,ri))}});Y(this,Vi,E=>{f(this,Yi).call(this,E.changedTouches[0].pageX)});Y(this,Wi,E=>{f(this,Yi).call(this,E.pageX)});Y(this,Xi,E=>{$(E.target).off("touchmove",t=>f(this,Vi).call(this,t)),$(E.target).off("touchend",t=>f(this,Xi).call(this,t)),f(this,ri).call(this,E)});Y(this,ri,E=>{if(!f(this,Er).is(":visible"))return;var t;f(this,Is)?t=f(this,Ar).offset().left-f(this,Er).offset().left+f(this,Ar).width():t=f(this,Er).offset().left-f(this,Hr).offset().left+1,t<=1&&(t=0);const l=f(this,Is)?f(this,Ar)[0].dataset.col:f(this,Hr)[0].dataset.col;f(this,Ie).columns.width(l,t),$(f(this,Cr)).off("mousemove",f(this,Wi)),$(f(this,Cr)).off("mouseup",f(this,ri)),f(this,Cr).hide()});Y(this,Yi,E=>{!f(this,Is)&&E<f(this,Hr).offset().left&&(E=f(this,Hr).offset().left),f(this,Er).offset({left:E});var t=parseInt(f(this,Er).offset().left),l,c,o;f(this,Is)?(c=f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left)):(c=parseInt(t-f(this,Hr).offset().left),o=c,l=parseInt(t-f(this,Hr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Rs).offset({left:t}),f(this,Rs).width(o),f(this,Rs).find("span").text(l)});Y(this,ih,E=>{var t=E.target.closest("th,td"),l=f(this,Ie).tableUtils.prev(t),c=f(this,Ie).tableUtils.next(t),o=f(this,Ie).getBand(t.dataset.col)==H.BAND.RIGHT?E.offsetX<=2?$(t):c:E.offsetX<=2?l:$(t);f(this,Ie).setColumnWidthFit(o[0].dataset.col)});tt(this,Ie,E),tt(this,Cr,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ie).body).append(f(this,Cr)),tt(this,Er,f(this,Cr).find(".grip")),tt(this,Rs,f(this,Cr).find(".tooltip")),this.resetEvent()}}Ie=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Hr=new WeakMap,Ar=new WeakMap,Is=new WeakMap,Ns=new WeakMap,To=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,hu=new WeakMap,Io=new WeakMap,sh=new WeakMap,No=new WeakMap,Vi=new WeakMap,Wi=new WeakMap,Xi=new WeakMap,ri=new WeakMap,Yi=new WeakMap,ih=new WeakMap;class rd{constructor(E){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",E=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return E?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${E}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,si,(E,t)=>{var l=Array.from(E.querySelectorAll("col"));return l[t]});Y(this,Lr,(E,t,l)=>{var c=[];if(!E)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(E.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Gi,(E,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(E,l):o(E,l)});Y(this,Oo,E=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=E.colSpan||1,c=E.closest("table"),o=parseInt(E.dataset.col),r=E.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Lr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Lr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Lr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Lr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Lr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Lr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Lr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,si).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,si).call(this,n.currentTable,s));return t});Y(this,nh,(E,t,l,c)=>{if(E.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(E.dataset.col),r=E.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(E,t)=>{if(!E||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Oo).call(this,E),o=f(this,Oo).call(this,t),r=t.closest("table"),n=!!(E.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(E.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,nh).call(this,E,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),C=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[C];var u=f(this,Gi).call(this,I,E,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Gi).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(E.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(E.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,si).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,si).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(E,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${E}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${E}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(E==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${E}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,E)}}ce=new WeakMap,si=new WeakMap,Lr=new WeakMap,Gi=new WeakMap,Oo=new WeakMap,nh=new WeakMap;class sd extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const id=new sd;class nd extends Qs{constructor(){super();Y(this,oh,10);Y(this,Ki);Y(this,De);Y(this,nr);Y(this,jo);Y(this,Os);Y(this,ii);Y(this,Zi);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,ah).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Ki).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,ah,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,Os)]);if(c<0)return!1}return!0});Y(this,lh,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,hh,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,oh)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,Os),f(this,Zi));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,jo))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,ch,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,cu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,jo,this.getAttribute("rows")||5),tt(this,Os,this.getAttribute("code")||"code"),tt(this,ii,this.getAttribute("codename")||"codename"),tt(this,Zi,(this.getAttribute("items")||f(this,ii)||"").split(",")),f(this,Zi).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,Os)),e=n.getAttribute(f(this,ii));s&&e&&f(this,nr).push({[f(this,Os)]:s,[f(this,ii)]:e})})),this.shadowRoot.innerHTML=`
|
|
160
|
+
`}}customElements.get("ng-col-mover-grip")||customElements.define("ng-col-mover-grip",Ju),customElements.get("ng-col-mover-indi")||customElements.define("ng-col-mover-indi",Qu);class td{constructor(E){Y(this,ve);Y(this,$r);Y(this,Fr);Y(this,_o);Y(this,kr);Y(this,zi);Y(this,qr);it(this,"resetEvent",()=>{$(document).off("mouseup",f(this,Ui)),$(".ng-table thead",f(this,ve).body).off("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.removeEventListener("click",f(this,So))}),$(document).on("mouseup",f(this,Ui)),$(".ng-table thead",f(this,ve).body).on("mousedown",f(this,Co)),f(this,ve).body.querySelectorAll(".ng-table thead").forEach(E=>{E.addEventListener("click",f(this,So))})});Y(this,So,E=>{if(E.target.closest("ng-filter-button"))return;const t=E.currentTarget||E.target,l=getComputedStyle(t,":before"),c=getComputedStyle(t,":after");if(!(!l&&!c)){if(l){const i=Number(l.getPropertyValue("top").slice(0,-2)),u=6,a=Number(l.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-left")||E.target.closest(".ng-container-body");if(o){var r=o.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)"),n=E.target.closest(".ng-container-left")?f(this,ve).body.querySelector(".ng-container-body"):f(this,ve).body.querySelector(".ng-container-right"),s=n.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child");const p=parseInt(r[r.length-1].dataset.col),m=r[r.length-1].colSpan;for(var e=0;e<m;e++)f(this,ve).body.querySelectorAll(`[data-col="${p+e}"] ng-col-expand:not(.expand)`).forEach(d=>{d.expand()});E.target.closest(".ng-container-body")?f(this,ve).body.querySelectorAll(".ng-container-right colgroup col:not(.dummy)").length==0?f(this,ve).columns.moveColumn(r[r.length-1],s):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s)):(f(this,ve).columns.moveColumn(r[r.length-1],s),f(this,ve).columns.moveColumn(r[r.length-1],s))}}}if(c){const i=Number(c.getPropertyValue("top").slice(0,-2)),u=6,a=Number(c.getPropertyValue("left").slice(0,-2));if(E.layerX>=a&&E.layerX<=a+6&&E.layerY>=i&&E.layerY<=i+u){var o=E.target.closest(".ng-container-body")||E.target.closest(".ng-container-right");if(o){var r=o.querySelector("thead tr:nth-child(2) th:first-child,thead tr:nth-child(2) td:first-child"),n=E.target.closest(".ng-container-body")?f(this,ve).body.querySelector(".ng-container-left"):f(this,ve).body.querySelector(".ng-container-body"),s=n.querySelectorAll("thead tr:nth-child(2) th:not(.dummy),thead tr:nth-child(2) td:not(.dummy)");const g=parseInt(r.dataset.col),S=r.colSpan;for(var e=0;e<S;e++)f(this,ve).body.querySelectorAll(`[data-col="${g+e}"] ng-col-expand:not(.expand)`).forEach(I=>{I.expand()});E.target.closest(".ng-container-right")?(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(s[s.length-1],r)):(f(this,ve).columns.moveColumn(r,s[s.length-1]),f(this,ve).columns.moveColumn(r,s[s.length-1]))}}}}});Y(this,au,E=>{if(!["INPUT"].includes(E.target.tagName)){var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.buttons=1,f(this,Eo).call(this,E),$(document).on("touchmove",l=>f(this,ko).call(this,l))}});Y(this,ko,E=>{var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.pageY=E.changedTouches[0].pageY,E.clientX=E.changedTouches[0].clientX,f(this,Vi).call(this,E)});Y(this,lu,E=>{E.clientX=E.changedTouches[0].clientX,f(this,Ui).call(this,E)});Y(this,Co,E=>{H.j.querySelectorAll(f(this,ve)).attr("col-movable")=="true"&&E.target.tagName!="NG-FILTER-BUTTON"&&(tt(this,zi,!0),setTimeout(()=>{f(this,zi)&&f(this,Eo).call(this,E)},500))});Y(this,Eo,E=>{if(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey||["INPUT"].includes(E.target.tagName))return;var t=E.pageX-$(E.target).offset().left;if(t<=3||$(E.target).width()-t<=3)return;E.target.closest(".ng-container-right")&&f(this,ve).body.querySelector("ng-hscrollbar").scrollToEnd();var l=E.target.closest("th,td");tt(this,kr,{col:parseInt(l.dataset.col),row:E.target.closest("tr").sectionRowIndex,target:l}),tt(this,_o,t+f(this,$r)[0].getBoundingClientRect().x);const c=f(this,$r)[0].shadowRoot.querySelector("span");c.innerHTML=$(E.target).html(),$(c).css({font:$(l).css("font")}),f(this,$r).show(),f(this,$r).width($(l).width()),f(this,$r).height($(l).height()),f(this,$r).offset({top:$(l).offset().top-1}),$(document).on("mousemove",f(this,Vi)),f(this,Ao).call(this,E.pageX);const o=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,Fr).height($(o).height())});Y(this,Ui,E=>{if(tt(this,zi,!1),$(document).off("mousemove",f(this,Vi)),$(document).off("touchmove",f(this,ko)),f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),f(this,kr)){var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);f(this,ve).columns.moveColumn(f(this,kr).target,t)}tt(this,qr,null),tt(this,kr,null),f(this,$r).hide(),f(this,Fr).hide()});Y(this,Vi,E=>{if(f(this,kr)!=null){f(this,qr)&&$(f(this,qr).target).css({cursor:f(this,qr).cursor}),tt(this,qr,{target:E.target,cursor:$(E.target).css("cursor")}),$(E.target).css({cursor:E.target.closest("thead")||E.target.tagName=="ng-col-mover-grip"?"move":"not-allowed"});var t=f(this,ve).tableUtils.getElement("thead",f(this,kr).row,E.clientX);if(t)if(f(this,kr).col>parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left-1),top:l.top})}else if(f(this,kr).col<parseInt(t.dataset.col)){var l=$(t).offset();f(this,Fr).show(),f(this,Fr).offset({left:parseInt(l.left+$(t).width()-1),top:l.top})}else f(this,Fr).hide();f(this,Ao).call(this,E.pageX)}});Y(this,Ao,E=>{f(this,$r).offset({left:E-f(this,_o)})});tt(this,ve,E),$(".ng-container",f(this,ve).body).append($("<ng-col-mover-grip></ng-col-mover-grip>").hide()).append($("<ng-col-mover-indi></ng-col-mover-indi>").hide()),tt(this,$r,$("ng-col-mover-grip",f(this,ve).body)),tt(this,Fr,$("ng-col-mover-indi",f(this,ve).body)),this.resetEvent()}}ve=new WeakMap,$r=new WeakMap,Fr=new WeakMap,_o=new WeakMap,kr=new WeakMap,zi=new WeakMap,qr=new WeakMap,So=new WeakMap,au=new WeakMap,ko=new WeakMap,lu=new WeakMap,Co=new WeakMap,Eo=new WeakMap,Ui=new WeakMap,Vi=new WeakMap,Ao=new WeakMap;class ed{constructor(E){Y(this,Ie);Y(this,Cr);Y(this,Er);Y(this,Rs);Y(this,Ms);Y(this,Hr);Y(this,Ar);Y(this,Is);Y(this,Ns,[]);it(this,"resetEvent",()=>{$(".ng-table > thead",f(this,Ie).body).off("mousemove",f(this,Mo)).off("mousedown",f(this,Io)).off("dblclick",f(this,To)),$(document).off("mouseup",f(this,Ro)),$(".ng-table > thead",f(this,Ie).body).on("mousemove",f(this,Mo)).on("mousedown",f(this,Io)).on("dblclick",f(this,To)),$(document).on("mouseup",f(this,Ro))});it(this,"autoFit",E=>{if(f(this,Ie).body)if(E){f(this,Ie).body.querySelector("ng-hscrollbar").scrollToHome(),tt(this,Ns,[]);var t=0;$(".ng-container-body col",f(this,Ie).body).each((c,o)=>{f(this,Ns).push({col:o,width:parseInt(o.getAttribute("width"))})}),f(this,Ns).forEach(c=>{t+=c.width}),$(".ng-container-body > table",f(this,Ie).body).css({width:"100%","min-width":"100%"});var l=$(".ng-container-body",f(this,Ie).body).width();l!=0&&f(this,Ns).forEach(c=>{var o=c.width*l/t;c.col.setAttribute("width",o)})}else $(".ng-container-body > table",f(this,Ie).body).css({width:"0","min-width":"0"}),f(this,Ns).forEach(c=>{c.col.setAttribute("width",c.width)})});Y(this,To,E=>{E.target.style.cursor=="col-resize"&&f(this,ih).call(this,E)});Y(this,Ro,E=>{tt(this,Ms,!1)});Y(this,Mo,E=>{if(!E.target.closest("ng-info")&&(E.target=E.target.closest("th,td"),!!E.target&&f(this,Ie).getAttribute("col-resizable")=="true"&&!(E.altKey||E.ctrlKey||E.shiftkey)))if(E.preventDefault(),E.offsetX<=2||E.offsetX>=E.target.offsetWidth-2){if(E.offsetX<=2&&f(this,Ie).tableUtils.isFirst(E.target)||E.offsetX>=E.target.offsetWidth-2&&f(this,Ie).tableUtils.isLast(E.target))return;E.target.style.cursor="col-resize"}else E.target.style.cursor="auto"});Y(this,hu,E=>{tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,sh).call(this,E)},500)});Y(this,Io,E=>{const t=E.target.closest("th,td");!t||t.style.cursor!="col-resize"||(tt(this,Ms,!0),setTimeout(()=>{f(this,Ms)&&f(this,No).call(this,E)},500))});Y(this,sh,E=>{E.target=E.target.closest("th,td");var t=E.target.getBoundingClientRect();E.offsetX=E.targetTouches[0].pageX-t.left,E.pageX=E.changedTouches[0].pageX,E.buttons=1,f(this,No).call(this,E),f(this,Cr).is(":visible")?($(E.target).on("touchmove",l=>f(this,Wi).call(this,l)),$(E.target).on("touchend",l=>f(this,Yi).call(this,l))):($(E.target).off("touchmove",l=>f(this,Wi).call(this,l)),$(E.target).off("touchend",l=>f(this,Yi).call(this,l)))});Y(this,No,E=>{if(E.target=E.target.closest("th,td"),!(E.buttons!=1||E.altKey||E.ctrlKey||E.shiftkey)){if(tt(this,Is,!!E.target.closest(".ng-container-right")),E.pageX-$(E.target).offset().left<=3){var t=$(`.col-indicator[data-col=${E.target.dataset.col}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,f(this,Ie).tableUtils.prev(t)),tt(this,Ar,$(t))}else{if($(E.target).width()-E.offsetX>2)return;var l=parseInt(E.target.dataset.col)+E.target.colSpan-1,t=$(`.col-indicator[data-col=${l}]`,f(this,Ie).body).not(".dummy")[0];tt(this,Hr,$(t)),tt(this,Ar,f(this,Ie).tableUtils.next(t))}f(this,Cr).show(),f(this,Er).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top,left:f(this,Ar).offset().left-1}),f(this,Er).height(f(this,Ie).body.querySelector(".ng-container-body").offsetHeight),f(this,Rs).offset({top:$(".ng-container-body",f(this,Ie).body).offset().top}),f(this,Gi).call(this,E.pageX),$(f(this,Cr)).off("mousemove",f(this,Xi)).off("mouseup",f(this,ri)).on("mousemove",f(this,Xi)).on("mouseup",f(this,ri))}});Y(this,Wi,E=>{f(this,Gi).call(this,E.changedTouches[0].pageX)});Y(this,Xi,E=>{f(this,Gi).call(this,E.pageX)});Y(this,Yi,E=>{$(E.target).off("touchmove",t=>f(this,Wi).call(this,t)),$(E.target).off("touchend",t=>f(this,Yi).call(this,t)),f(this,ri).call(this,E)});Y(this,ri,E=>{if(!f(this,Er).is(":visible"))return;var t;f(this,Is)?t=f(this,Ar).offset().left-f(this,Er).offset().left+f(this,Ar).width():t=f(this,Er).offset().left-f(this,Hr).offset().left+1,t<=1&&(t=0);const l=f(this,Is)?f(this,Ar)[0].dataset.col:f(this,Hr)[0].dataset.col;f(this,Ie).columns.width(l,t),$(f(this,Cr)).off("mousemove",f(this,Xi)),$(f(this,Cr)).off("mouseup",f(this,ri)),f(this,Cr).hide()});Y(this,Gi,E=>{!f(this,Is)&&E<f(this,Hr).offset().left&&(E=f(this,Hr).offset().left),f(this,Er).offset({left:E});var t=parseInt(f(this,Er).offset().left),l,c,o;f(this,Is)?(c=f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left,o=c<10?10:c-1,l=parseInt(f(this,Ar).width()+f(this,Ar).offset().left-f(this,Er).offset().left)):(c=parseInt(t-f(this,Hr).offset().left),o=c,l=parseInt(t-f(this,Hr).offset().left+1),t=t-o),l<=1&&(l=0),f(this,Rs).offset({left:t}),f(this,Rs).width(o),f(this,Rs).find("span").text(l)});Y(this,ih,E=>{var t=E.target.closest("th,td"),l=f(this,Ie).tableUtils.prev(t),c=f(this,Ie).tableUtils.next(t),o=f(this,Ie).getBand(t.dataset.col)==H.BAND.RIGHT?E.offsetX<=2?$(t):c:E.offsetX<=2?l:$(t);f(this,Ie).setColumnWidthFit(o[0].dataset.col)});tt(this,Ie,E),tt(this,Cr,$('<div class="resizer-col-panel"><div class="grip"></div><div class="tooltip"><div></div><span></span><div></div></div></div>').hide()),$(f(this,Ie).body).append(f(this,Cr)),tt(this,Er,f(this,Cr).find(".grip")),tt(this,Rs,f(this,Cr).find(".tooltip")),this.resetEvent()}}Ie=new WeakMap,Cr=new WeakMap,Er=new WeakMap,Rs=new WeakMap,Ms=new WeakMap,Hr=new WeakMap,Ar=new WeakMap,Is=new WeakMap,Ns=new WeakMap,To=new WeakMap,Ro=new WeakMap,Mo=new WeakMap,hu=new WeakMap,Io=new WeakMap,sh=new WeakMap,No=new WeakMap,Wi=new WeakMap,Xi=new WeakMap,Yi=new WeakMap,ri=new WeakMap,Gi=new WeakMap,ih=new WeakMap;class rd{constructor(E){Y(this,ce);it(this,"count",()=>f(this,ce).activeTmpl.querySelectorAll("[data-bind]").length);it(this,"info",E=>{const t=l=>{if(!l)return null;const c=f(this,ce).body.querySelectorAll(`thead [data-col="${l.dataset.col}"]`);return{name:l.dataset.bind,type:(l.dataset.type||"string").toLocaleLowerCase(),desc:c.length>0?c[c.length-1].getAttribute("title"):null}};return E?t(f(this,ce).activeTmpl.querySelector(`[data-bind="${E}"]`)):Array.from(f(this,ce).activeTmpl.querySelectorAll("[data-bind]")).filter(l=>l.dataset.bind!=="rowState").map(l=>t(l))});Y(this,si,(E,t)=>{var l=Array.from(E.querySelectorAll("col"));return l[t]});Y(this,Lr,(E,t,l)=>{var c=[];if(!E)return c;for(var o=t;o<=l;o++)c=c.concat(Array.from(E.querySelectorAll(`[data-col="${o}"]:not(.dummy)`)));return c});Y(this,Ki,(E,t,l)=>{const c=(r,n)=>{const s=parseInt(n.dataset.col);return r.closest("thead,tbody,tfoot"),r.querySelector(`[data-col="${s}"]`)},o=(r,n)=>{const s=parseInt(n.dataset.col),e=n.colSpan||1,i=!r.closest("thead,tbody,tfoot");var u=r.querySelectorAll("th:not(.tmp),td:not(.tmp)");for(var a of u)if(parseInt(a.dataset.col)>s+e-1)return a};return parseInt(t.dataset.col)>parseInt(l.dataset.col)?c(E,l):o(E,l)});Y(this,Oo,E=>{const t={org:{thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},cols:[]},thead:{cells:[]},tfoot:{cells:[]},tbody:{cells:[]},fixed:{cells:[]},template:{cells:[]},cols:[]},l=E.colSpan||1,c=E.closest("table"),o=parseInt(E.dataset.col),r=E.closest("tr").sectionRowIndex;$("thead tr",c).each((e,i)=>{if(i.sectionRowIndex<r&&i.sectionRowIndex!=0)return!0;t.thead.cells=t.thead.cells.concat(f(this,Lr).call(this,i,o,o+l-1))}),t.tfoot.cells=f(this,Lr).call(this,c.querySelector("tfoot"),o,o+l-1),t.tbody.cells=f(this,Lr).call(this,c.querySelector("tbody.bindable"),o,o+l-1),t.fixed.cells=f(this,Lr).call(this,c.querySelector("tbody.fixed"),o,o+l-1);const n=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");t.org.thead.cells=f(this,Lr).call(this,n.currentTable.querySelector("thead"),o,o+l-1),t.org.tfoot.cells=f(this,Lr).call(this,n.currentTable.querySelector("tfoot"),o,o+l-1),t.org.tbody.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.bindable"),o,o+l-1),t.org.fixed.cells=f(this,Lr).call(this,n.currentTable.querySelector("tbody.fixed"),o,o+l-1),f(this,ce).template.each((e,i)=>{t.template.cells=t.template.cells.concat(f(this,Lr).call(this,i,o,o+l-1))});for(var s=o;s<=o+l-1;s++)t.cols.push(f(this,si).call(this,f(this,ce).body,s));for(var s=o;s<=o+l-1;s++)t.org.cols.push(f(this,si).call(this,n.currentTable,s));return t});Y(this,nh,(E,t,l,c)=>{if(E.closest("tr").rowIndex!=t.closest("tr").rowIndex)return!1;const o=parseInt(E.dataset.col),r=E.colSpan;parseInt(t.dataset.col),t.colSpan;for(var n of[l.thead.cells,l.tfoot.cells,l.tbody.cells,l.fixed.cells,l.template.cells])for(var s of n){const e=parseInt(s.dataset.col),i=s.colSpan;if(e<o||e+i-1>o+r-1)return!1}return!0});it(this,"moveColumn",(E,t)=>{if(!E||!t)return!1;const l=f(this,ce).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout"),c=f(this,Oo).call(this,E),o=f(this,Oo).call(this,t),r=t.closest("table"),n=!!(E.closest(".ng-container-left")||t.closest(".ng-container-left")),s=!!(E.closest(".ng-container-right")||t.closest(".ng-container-right"));if(!f(this,nh).call(this,E,t,c,o))return!1;for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const b=i.closest("tr").rowIndex,g=r.querySelectorAll("tr")[b];var u=f(this,Ki).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e){H.j.querySelectorAll(i).addClass("tmp");const S=i.closest("table"),C=i.closest("tr").rowIndex,I=S.querySelectorAll("tr")[C];var u=f(this,Ki).call(this,I,E,t);u?I.insertBefore(i,u):I.appendChild(i)}for(var i of c.template.cells){H.j.querySelectorAll(i).addClass("tmp");const g=i.closest("tr");var u=f(this,Ki).call(this,g,E,t);u?g.insertBefore(i,u):g.appendChild(i)}var a;parseInt(E.dataset.col)>parseInt(t.dataset.col)?a=parseInt(t.dataset.col):a=parseInt(t.dataset.col)+(t.colSpan||1)-1+(parseInt(E.dataset.col)>parseInt(t.dataset.col)?0:1);let h=f(this,si).call(this,f(this,ce).body,a);const p=t.closest("table")==h.closest("table");for(var m of c.cols)m&&(p?t.closest("table").querySelector("colgroup").insertBefore(m,h):t.closest("table").querySelector("colgroup").appendChild(m));for(var m of c.org.cols)h=f(this,si).call(this,l.currentTable,a),m&&m.closest("colgroup").insertBefore(m,h);for(var e of[c.thead.cells,c.tfoot.cells,c.tbody.cells,c.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var e of[c.org.thead.cells,c.org.tfoot.cells,c.org.tbody.cells,c.org.fixed.cells])for(var i of e)H.j.querySelectorAll(i).removeClass("tmp");for(var i of c.template.cells)H.j.querySelectorAll(i).removeClass("tmp");if(f(this,ce).body.querySelectorAll(".ng-container-left col").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{b.setAttribute("fixed","left")}),f(this,ce).body.querySelectorAll(".ng-container-right col").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.setAttribute("fixed","right")}),f(this,ce).body.querySelectorAll(".ng-container-body col").forEach(b=>{b.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{b.removeAttribute("fixed")}),l.currentTable.querySelectorAll("colgroup col").forEach(b=>{b.removeAttribute("fixed")}),$("th,td",f(this,ce).template).each((b,g)=>{g.removeAttribute("fixed")}),$("th,td",l.currentTable).each((b,g)=>{g.removeAttribute("fixed")}),f(this,ce).body.querySelectorAll(".ng-container-left .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","left")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","left")}),$("colgroup col",l.currentTable).each((g,S)=>{g<=parseInt(b.dataset.col)&&S.setAttribute("fixed","left")})}),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$(`[data-col="${b.dataset.col}"]`,f(this,ce).template).each((g,S)=>{S.setAttribute("fixed","right")}),$(`[data-col="${b.dataset.col}"]`,l.currentTable).each((g,S)=>{S.setAttribute("fixed","right")})}),f(this,ce).resetTemplate(),f(this,ce).body.querySelectorAll(".ng-container-right .col-indicator").forEach(b=>{$("colgroup col",l.currentTable).each((g,S)=>{g>=parseInt(b.dataset.col)&&S.setAttribute("fixed","right")})}),n){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-left .col-indicator",f(this,ce).body).each((b,g)=>{d+=g.offsetWidth}),$(".ng-container-left",f(this,ce).body).css({width:d,"min-width":d})}if(s){var d=t.closest(".ng-container-body")?-E.offsetWidth:0;$(".ng-container-right .col-indicator",f(this,ce).body).each((g,S)=>{d+=S.offsetWidth}),$(".ng-container-right",f(this,ce).body).css({width:d,"min-width":d})}f(this,ce).refreshData()});it(this,"width",(E,t)=>{t=parseFloat(t);const l=f(this,ce).body.querySelector(`colgroup col[data-col="${E}"]`),c=!!l.closest(".ng-container-left"),o=!!l.closest(".ng-container-right"),r=!!l.closest(".ng-container-body"),n=c?"left":o?"right":"body";if(r)if(f(this,ce).getAttribute("auto-fit-col")=="true"){var s=0;$(".ng-container-body .col-indicator",f(this,ce).body).not(`[data-col=${E}]`).each((u,a)=>{s+=a.offsetWidth});const i=$(".ng-container-body",f(this,ce).body).width();$(".ng-container-body col",f(this,ce).body).each((u,a)=>{var h=parseInt(E==a.dataset.col?t:a.getAttribute("width"))*i/s;a.setAttribute("width",h)})}else l.setAttribute("width",t);else{var e=0;$(`.ng-container-${n} .col-indicator`,f(this,ce).body).not(`[data-col=${E}]`).each((i,u)=>{e+=parseInt(u.offsetWidth)}),$(`.ng-container-${n}`,f(this,ce).body).css({width:parseInt(e+t),"min-width":parseInt(e+t)}),l.setAttribute("width",t)}});tt(this,ce,E)}}ce=new WeakMap,si=new WeakMap,Lr=new WeakMap,Ki=new WeakMap,Oo=new WeakMap,nh=new WeakMap;class sd extends Ue.trace.constructor{constructor(){super(),this.init("nine-grid","green")}}const id=new sd;class nd extends Qs{constructor(){super();Y(this,oh,10);Y(this,Zi);Y(this,De);Y(this,nr);Y(this,jo);Y(this,Os);Y(this,ii);Y(this,Ji);it(this,"dataRefresh",t=>{f(this,nr)&&(f(this,ah).call(this)?H.j.querySelectorAll(this).removeClass("invalid"):H.j.querySelectorAll(this).addClass("invalid")),f(this,Zi).innerHTML=this.getDisplayText()||"Select",t||this.reset()});Y(this,ah,()=>{if(H.isNull(this.value))return!0;var t=this.multi?this.value.split(this.multiSeparator):[this.value];for(var l of t){var c=f(this,nr).findIndex(o=>l==o[f(this,Os)]);if(c<0)return!1}return!0});Y(this,lh,()=>{if(this.owner){if(tt(this,De,this.owner.shadowRoot.querySelector("ng-combo-panel")),this.owner.shadowRoot.querySelectorAll("ng-combo-panel").length>1)throw"too many ng-combo-panel";var t=this.getAttribute("data-source");t&&this.owner&&this.owner.exprFunction}});Y(this,hh,t=>{if(console.log(f(this,nr)),!!f(this,nr)){console.log(f(this,nr)),f(this,De).col=this.cell.dataset.col,f(this,De).row=this.cell.closest("tr").sectionRowIndex,f(this,nr).length>f(this,oh)?H.j.querySelectorAll(f(this,De)).addClass("expand"):H.j.querySelectorAll(f(this,De)).removeClass("expand"),this.multi?H.j.querySelectorAll(f(this,De)).addClass("multi"):H.j.querySelectorAll(f(this,De)).removeClass("multi"),f(this,De).refresh(this,f(this,nr),f(this,Os),f(this,Ji));var l=$(".btn1",this.shadowRoot).offset().left-$(this.owner).offset().left;l+$(f(this,De)).width()>$(this.owner).width()&&(l=$(".btn2",this.shadowRoot).offset().left-$(this.owner).offset().left-$(f(this,De)).width()+8),l<0&&(l=0);var c=Math.min(f(this,nr).length,f(this,jo))*26;this.multi?(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=2,c+=3,c+=25):(H.j.querySelectorAll(f(this,De)).hasClass("expand")&&(c+=12,c+=3,c+=24),c+=3);var o=$(".btn1",this.shadowRoot).offset().top+$(".btn1",this.shadowRoot).height()-$(this.owner).offset().top+3;o+c>$(this.owner).height()&&(o-=c+$(".btn1",this.shadowRoot).height()+6);var r=this.getAttribute("template");r&&console.error("logic error !!!!"),$(f(this,De)).css({left:l,top:o,height:c,"min-height":c}).show(),H.j.querySelectorAll(f(this,De)).hasClass("expand")&&$("div",f(this,De)).eq(0).find("input").focus().val("")}});Y(this,ch,t=>{t.target.closest("ng-combo-panel")||(f(this,De).row=f(this,De).col=-1,$(f(this,De)).hide())});Y(this,cu,()=>"a")}connectedCallback(){this.multi=this.getAttribute("multi")=="true",this.multiSeparator=this.getAttribute("multi-separator")||",",tt(this,jo,this.getAttribute("rows")||5),tt(this,Os,this.getAttribute("code")||"code"),tt(this,ii,this.getAttribute("codename")||"codename"),tt(this,Ji,(this.getAttribute("items")||f(this,ii)||"").split(",")),f(this,Ji).unshift("CHK");var t=this.querySelector("datalist");t&&(tt(this,nr,[]),t.querySelectorAll("option").forEach(n=>{const s=n.getAttribute(f(this,Os)),e=n.getAttribute(f(this,ii));s&&e&&f(this,nr).push({[f(this,Os)]:s,[f(this,ii)]:e})})),this.shadowRoot.innerHTML=`
|
|
161
161
|
<style>
|
|
162
162
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngCombo.css";
|
|
163
163
|
${H.getCustomPath(this,"ngCombo.css")}
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
<button class="btn1" type="button" data-bs-toggle="dropdown" aria-expanded="false" tabindex="-1"></button>
|
|
167
167
|
<button class="btn2" tabindex="-1"></button>
|
|
168
|
-
`,super.connectedCallback();const l=this.closest("th,td"),c=this.getAttribute("data-source");c&&this.owner&&this.owner.exprFunction&&(this.owner[c]?tt(this,nr,this.owner[c]):tt(this,nr,this.owner.exprFunction(c).call(this,this.owner.data.get(this.cell.dataset.row),this.cell.dataset.row))),l&&l.dataset&&f(this,nr)&&!l.dataset.expr&&(l.dataset.expr="comboExpr()"),f(this,lh).call(this),f(this,De),tt(this,
|
|
168
|
+
`,super.connectedCallback();const l=this.closest("th,td"),c=this.getAttribute("data-source");c&&this.owner&&this.owner.exprFunction&&(this.owner[c]?tt(this,nr,this.owner[c]):tt(this,nr,this.owner.exprFunction(c).call(this,this.owner.data.get(this.cell.dataset.row),this.cell.dataset.row))),l&&l.dataset&&f(this,nr)&&!l.dataset.expr&&(l.dataset.expr="comboExpr()"),f(this,lh).call(this),f(this,De),tt(this,Zi,this.shadowRoot.querySelector(".btn1"));var o=this.closest("th,td").dataset.col,r=this.closest("tr").sectionRowIndex;$(this.cell).on("keydown",n=>{n.code=="Enter"&&$(f(this,Zi)).trigger("click")}),$("button",this.shadowRoot).on("click",n=>{f(this,De).row==r&&f(this,De).col==o?f(this,ch).call(this,n):f(this,hh).call(this,n)})}get dataSource(){return f(this,nr)}}oh=new WeakMap,Zi=new WeakMap,De=new WeakMap,nr=new WeakMap,jo=new WeakMap,Os=new WeakMap,ii=new WeakMap,Ji=new WeakMap,ah=new WeakMap,lh=new WeakMap,hh=new WeakMap,ch=new WeakMap,cu=new WeakMap;class od extends HTMLElement{constructor(){super();Y(this,$o);Y(this,Be);Y(this,js);Y(this,ni);Y(this,Qi);Y(this,uh,()=>{$("input[type=checkbox]",this.shadowRoot).on("change",f(this,dh)),$("input[type=text]",this.shadowRoot).on("input",f(this,fh)),$("button#btnOk",this.shadowRoot).on("click",f(this,Po))});Y(this,Lo,t=>{["TH","TD"].includes(t.target.tagName)&&["Enter"].includes(t.code)&&(f(this,Be).multi?f(this,Po).call(this,t):f(this,tn).call(this,t))});Y(this,dh,t=>{var l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK");l.data.getValidData().map(o=>{o.v[c]=$(t.target).prop("checked")?"Y":"N"}),l.refreshData()});Y(this,Po,t=>{var l=this.shadowRoot.querySelector("nine-grid"),c=l.data.getValidData();const o=l.fields.indexOf("CHK"),r=l.fields.indexOf(f(this,js));var n=[];c.forEach(e=>{e.v[o]=="Y"&&n.push(e.v[r])});var s=t.target.closest("th,td");$(s).blur(),f(this,Be).value=n.join(f(this,Be).multiSeparator),$(this).hide(),f(this,Be).getRootNode().host.cell.currentCell=f(this,Be).closest("th,td")});Y(this,tn,t=>{if(t.target.tagName!="NG-CHECKBOX"&&(t.preventDefault(),t.stopPropagation()),!f(this,Be).multi){var l=this.shadowRoot.querySelector("nine-grid"),c=t.target.closest("th,td");$(c).blur(),f(this,Be).value=l.data.get(c.dataset.row)[f(this,js)],this.row=this.col=-1,$(this).hide(),f(this,Be).getRootNode().host.cell.currentCell=f(this,Be).closest("th,td")}});Y(this,uu,t=>{t.preventDefault(),t.stopPropagation(),$(this).hide()});Y(this,fh,t=>{var l=this.shadowRoot.querySelector("nine-grid");H.j.querySelectorAll(l).addClass("loading");var c=l.data.getValidDataNF();c.map(r=>{r.__ng.filtered=!1});var o=$(t.target).val().toLowerCase();c.filter(r=>{for(var n of f(this,Qi)){if(n=="CHK")continue;const s=l.fields.indexOf(n);if((String(r.v[s])||"").toLowerCase().indexOf(o)>=0)return!1}return!0}).map(r=>{r.__ng.filtered=!0}),l.data.resetRecords(),l.data.count()==0&&H.j.querySelectorAll(l).removeClass("loading"),f(this,ni)&&(clearTimeout(f(this,ni)),tt(this,ni,null)),tt(this,ni,setTimeout(()=>{l.dataManager.viewRecords.reset()},200))});it(this,"refresh",(t,l,c,o)=>{var r=this.shadowRoot.querySelector("nine-grid");$(this.shadowRoot).find("input[type=text]").val(""),$("input[type=checkbox]",this).prop("checked",!0),tt(this,Qi,o),$(".ng-table tbody",r.body).off("click","th,td",f(this,tn)),$(".ng-table tbody",r.body).on("click","th,td",f(this,tn)),tt(this,Be,t),tt(this,js,c),$("th,td",r.template).each((i,u)=>{$(u).hide()}),$("thead th",r).each((i,u)=>{$(u).hide()}),o.forEach((i,u)=>{$(`[data-col=${u}]`,r.template).each((a,h)=>{h.dataset.bind=i,$(h).show()}),$(`[data-col=${u}]`,r.body).each((a,h)=>{h.dataset.bind=i,$(h).show()})});const n=["CHK"];if(l.length>0)for(const i in l[0])n.push(i);if(r.fields.add(n),r.data.set(l),f(this,ph).call(this,o),$(".ng-container-left",r.body).css({width:f(this,Be).multi?30:0,"min-width":f(this,Be).multi?30:0}),f(this,Be).multi){var s=f(this,Be).value.split(f(this,Be).multiSeparator);const i=r.fields.indexOf("CHK"),u=r.fields.indexOf(f(this,js));r.data.getValidData().forEach(a=>{a.v[i]=s.includes(a.v[u])?"Y":"N"}),r.row.at=0}else{var e=r.fields.indexOf(f(this,js));r.row.at=r.data.getValidData().findIndex(i=>f(this,Be).value==i.v[e])}setTimeout(()=>{$(`tbody.bindable tr[data-row="${r.row.at}"]`,r.shadowRoot).find("td").eq(0).focus()}),$(".ng-table tbody",r.body).off("keydown","th,td",f(this,Lo)),$(".ng-table tbody",r.body).on("keydown","th,td",f(this,Lo))});Y(this,ph,()=>{var t=this.shadowRoot.querySelector("nine-grid");$("col",t.body).each((o,r)=>{r.setAttribute("width","0")}),$("th",t.body).each((o,r)=>{$(r).html("")}),f(this,Qi).forEach((o,r)=>{t.setColumnWidthFit(r,30,!1)});var l=f(this,Be).getAttribute("template");l&&console.error("logic error !!!!");var c=16+(H.j.querySelectorAll(this).hasClass("expand"),0)+20;H.j.querySelectorAll(this).hasClass("multi")?$("col",t.body).each((o,r)=>{c+=parseInt(r.getAttribute("width"))}):$(".ng-container-body col",t.body).each((o,r)=>{c+=parseInt(r.getAttribute("width"))}),c<$(f(this,Be)).width()&&(c=$(f(this,Be)).width()-8),c>$(f(this,Be).closest("nine-grid")).width()&&(c=$(f(this,Be).closest("nine-grid")).width()),$(this).css({width:c,"min-width":c}),$(".ng-container-body .ng-table",t.body).css({left:0})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,$o,this.getRootNode().host.closest("nine-grid"));const t=f(this,$o).getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
169
169
|
<style>
|
|
170
170
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngComboPanel.css";
|
|
171
171
|
${H.getCustomPath(this,"ngComboPanel.css")}
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
<input id="chkAll" type="checkbox" checked><label for="chkAll">Select All</label>
|
|
213
213
|
<button id="btnOk">OK</button>
|
|
214
214
|
</div>
|
|
215
|
-
`,f(this,uh).call(this)}}$o=new WeakMap,Be=new WeakMap,js=new WeakMap,ni=new WeakMap,
|
|
216
|
-
});it(this,"resetIndex",()=>{f(this,Ft).rawRecords.forEach((E,t)=>{E.__ng.ii=t,E.__ng.rowidx=t,E.__ng.rowidx1=t}),this.getValidData().forEach((E,t)=>{E.__ng.i=t,E.__ng.rowidx=t}),f(this,nn).call(this)});it(this,"resetRecords",()=>{tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),this.resetIndex()});Y(this,Uo,E=>{Array.isArray(E)||(E=[E]);var t=[];return E.forEach(l=>{var c={v:[]};for(const o of f(this,Ve).fields.get())c.v.push(H.nvl(l[o],""));t.push(c)}),t});it(this,"exprFunction",E=>{let t="...args",l="let [data, currow] = args; currow = Number(currow); return "+E+";";return new Function(t,l)});it(this,"__ng",E=>{var t=this.getValidData();if(t.length==0)return null;try{return t[E].__ng}catch(l){console.error(l,t,E)}});it(this,"getValidData",()=>(f(this,Pe).length==0&&tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&E.__ng._[H.ROW.VISIBLE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),f(this,Pe)));it(this,"getValidDataNF",()=>(f(this,Tr).length==0&&tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),f(this,Tr)));it(this,"conv",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"conv2",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"changeRowState",(E,t,l)=>{const c=o=>{[H.ROW_STATE.EMPTY,H.ROW_STATE.NORMAL].includes(E)&&(o.__ng.o={}),o.__ng.rowState=E};E||(E=H.ROW_STATE.EMPTY),!t&&!l&&(t=0,l=this.count()-1),t||(t=0),l||(l=t),l>=this.count()&&(l=this.count()-1),f(this,Pe).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),f(this,Tr).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.getValidDataNF().forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.onRowStateChanged(),f(this,Ft).viewRecords.reset()});it(this,"getCheckedData",E=>this.get().filter(t=>t.__ng.c[E]==!0));it(this,"search",(E,t)=>this.get().filter(l=>l[E]==t));Y(this,Vo,(E,t,l,c)=>{if(l==c)return;const o=new CustomEvent(H.EVENT.DATA_CHANGED,{bubbles:!0,detail:{}});o.row=E,o.bind=t,o.oldvalue=l,o.value=c,o.data=this.get(E),f(this,Ft).owner.dispatchEvent(o)});it(this,"add",(E,t)=>{E==null&&(E={}),t==null&&(t=!0);const l=f(this,Uo).call(this,E);f(this,Ft).rawRecords=f(this,Ft).rawRecords.concat(f(this,zo).call(this,l));const c=f(this,Ft).rawRecords.map(r=>r.__ng._[H.ROW.ORIGIN_ORDER]);if(c.length>0){const r=c.reduce(function(n,s){return n>s?n:s});f(this,Ft).rawRecords.forEach((n,s)=>{n.__ng._[H.ROW.ORIGIN_ORDER]<0&&(n.__ng._[H.ROW.ORIGIN_ORDER]=r+1+s)})}this.resetRecords();const o=this.count()-1;return t||this.changeRowState(H.ROW_STATE.EMPTY,o-l.length+1,o),f(this,Ft).viewRecords.reset(),o});it(this,"insert",(E,t,l)=>{E==null&&(E={}),t==null&&(t=0),l==null&&(l=!0);var c=f(this,Uo).call(this,E);const o=f(this,Ft).rawRecords[t].__ng._[H.ROW.ORIGIN_ORDER];return f(this,Ft).rawRecords.filter(r=>r.__ng._[H.ROW.ORIGIN_ORDER]>=o).forEach(r=>{r.__ng._[H.ROW.ORIGIN_ORDER]+=c.length}),c=f(this,zo).call(this,c),c.forEach((r,n)=>{r.__ng._[H.ROW.ORIGIN_ORDER]=o+n}),f(this,Ft).rawRecords.splice(t,0,...c),this.resetRecords(),l||this.changeRowState(H.ROW_STATE.EMPTY,t,t+c.length-1),f(this,Ft).viewRecords.reset(),t});Y(this,xh,E=>{var t=!1;E.sort((l,c)=>c-l).forEach(l=>{f(this,Pe)[l].__ng.rowState==H.ROW_STATE.INSERT?H.removeIf(f(this,Ft).rawRecords,c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid):(f(this,Ft).rawRecords.filter(c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid).map(c=>{c.__ng.deleted=!0,c.__ng.rowState=H.ROW_STATE.DELETE}),t=!0)}),t&&this.onRowStateChanged(),tt(this,Pe,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted&&!l.__ng.filtered)),tt(this,Tr,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted)),this.getValidDataNF().forEach((l,c)=>{l.__ng.rowidx=c}),this.getValidData().forEach((l,c)=>{l.__ng.rowidx=c}),f(this,Ft).viewRecords.reset()});it(this,"delete",E=>{var t=[];if(Array.isArray(E))t=E;else if(typeof E>"u"){if(f(this,Ft).owner.row.at<0)throw`invalid ${f(this,Ft).owner.row.at}`;t=[f(this,Ft).owner.row.at]}else if(typeof E=="number"||typeof E=="string")t=[E];else if(typeof E=="object"){const l=f(this,Pe).findIndex(c=>c.__ng._[H.ROW.ID]==E.__ng._[H.ROW.ID]);if(l<0)throw new Error(`${E.__ng._[H.ROW.ID]} not found.`);t=[l]}else throw`invalid ${E}`;f(this,xh).call(this,t)});it(this,"deleteFromId",E=>{var t=this.records();const l=t.findIndex(c=>c.__ng._[H.ROW.ID]==E);if(l<0)throw new Error(`${E} not found.`);this.delete(l)});Y(this,Wo,(E,t,l)=>{if(typeof l>"u")l=E.findIndex(e=>e.__ng._[H.ROW.ID]==t.__ng._[H.ROW.ID]);else if(typeof l=="number"||typeof l=="string")l=parseInt(l);else throw`invalid ${l}`;var c=E[l],o=!1;for(const e in t)if(!["__ng","rowState"].includes(e)){var r=f(this,Ve).fields.indexOf(e);if(!(r<0)){var n=c.v[r],s=t[e];c.v[r]=s,n!=s&&(c.__ng.rowState=H.ROW_STATE.UPDATE,o=!0,f(this,Vo).call(this,l,e,n,s))}}o&&this.onRowStateChanged(),f(this,Ft).owner.refreshData()});it(this,"update",(E,t)=>{f(this,Wo).call(this,f(this,Pe),E,t)});it(this,"setValue",(E,t,l,c)=>{f(this,Xo).call(this,E,t,l,c,!1)});it(this,"setValueNF",(E,t,l,c)=>{f(this,Xo).call(this,E,t,l,c,!0)});Y(this,Xo,(E,t,l,c,o)=>{E=parseInt(E),c==null&&(c=!0);const r=f(this,Ve).fields.indexOf(t);if(!(r<0)){var n=o?this.getValidDataNF()[E]:this.getValidData()[E],s=n.v[r];n.v[r]!=l&&n.__ng.rowState!=H.ROW_STATE.INSERT&&(n.__ng.o.hasOwnProperty(t)||(n.__ng.o[t]=s),c&&(n.__ng.rowState=H.ROW_STATE.UPDATE,this.onRowStateChanged())),n.v[r]=l,f(this,Ft).owner.refreshData(E),f(this,Vo).call(this,E,t,s,l)}});it(this,"setRecord",(E,t,l,c)=>{f(this,on).call(this,this.getValidData(),E,t,l,c,!1)});it(this,"setRecordNF",(E,t,l,c)=>{f(this,on).call(this,this.getValidDataNF(),E,t,l,c,!0)});Y(this,on,(E,t,l,c,o)=>{t=parseInt(t),l=parseInt(l),o==null&&(o=!0);var r=E[t];r.v[l],r.v[l]!=c&&r.__ng.rowState!=H.ROW_STATE.INSERT&&o&&(r.__ng.rowState=H.ROW_STATE.UPDATE),r.v[l]=c});it(this,"getChangedData",E=>E?this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==E)):{insert:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT)),update:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.UPDATE)),delete:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.DELETE))});it(this,"isChanged",()=>f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT||t.__ng.rowState==H.ROW_STATE.UPDATE||t.__ng.rowState==H.ROW_STATE.DELETE).length>0);Y(this,an,(E,t,l)=>{if(!(!E||E.length<=0)){if(H.isNull(t))return this.conv2(E);if(t<0||t>=E.length)throw`invalid row : ${t}`;if(l!=null){var c=f(this,Ve).fields.indexOf(l);return c>=0?E[t].v[c]:null}var o=t==null?E:E[t];return this.conv(o)}});it(this,"get",(E,t)=>f(this,an).call(this,this.getValidData(),E,t));it(this,"getNF",(E,t)=>f(this,an).call(this,this.getValidDataNF(),E,t));it(this,"records",E=>H.isNull(E)?this.getValidData():this.getValidData(E));it(this,"recordsNF",E=>H.isNull(E)?this.getValidDataNF():this.getValidDataNF(E));it(this,"getRow",E=>this.getValidData()[E]);it(this,"getRowNF",E=>this.getValidDataNF()[E]);Y(this,Yo,(E,t)=>{var l=f(this,Ve).fields.indexOf(t);return l<0?[]:E.map(c=>c.v[l])});it(this,"getMap",E=>f(this,Yo).call(this,this.getValidData(),E));it(this,"getMapNF",E=>f(this,Yo).call(this,this.getValidDataNF(),E));it(this,"findIndex",E=>f(this,Go).call(this,this.getValidData(),E));it(this,"findIndexNF",E=>f(this,Go).call(this,this.getValidDataNF(),E));Y(this,Go,function(E,t){return this.conv2(E).findIndex(t)});it(this,"findIndex_1",E=>f(this,Ko).call(this,this.getValidData(),E));it(this,"findIndexNF_1",E=>f(this,Ko).call(this,this.getValidDataNF(),E));Y(this,Ko,function(E,t){let l=0,c=E.length-1,o;for(;l<=c;){if(o=parseInt((l+c)/2),t===E[o].__ng._[H.ROW.INDEX])return o;t<E[o].__ng._[H.ROW.INDEX]?c=o-1:l=o+1}return-1});tt(this,Ve,E),tt(this,Ft,t),tt(this,Pe,[]),tt(this,Tr,[]),tt(this,ai,0),this.all={get:(l,c)=>f(this,an).call(this,this.recordsNF(),l,c),records:l=>this.recordsNF(l),count:()=>this.recordsNF().length,setRecord:(l,c,o,r)=>f(this,on).call(this,this.all.records(),l,c,o,r),indexOf:l=>f(this,sn).call(this,this.records(),l,this.recordsNF()),update:(l,c)=>f(this,Wo).call(this,this.records(),l,c)},this.total={indexOf:l=>f(this,sn).call(this,this.records(),l,f(this,Ft).rawRecords)},this.initialize()}get source(){return this.conv2(f(this,Ft).rawRecords)}set source(E){this.clear(),this.add(E,!1)}get nextId(){return++Iu(this,ai)._}get default(){return{rowState:H.ROW_STATE.EMPTY,deleted:!1,filtered:!1,pin:!1,expand:!0,visible:!0,paging:!0,height:f(this,$s).slice(),o:{},c:{},_:[0,0,0,0,H.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,f(this,$s).slice(),-1,{},{}]}}clear(){delete f(this,Ft).rawRecords,tt(this,Pe,[]),tt(this,Tr,[]),f(this,Ft).rawRecords=[],f(this,Ft).viewRecords.reset()}}Ve=new WeakMap,Ft=new WeakMap,Pe=new WeakMap,Tr=new WeakMap,ai=new WeakMap,$s=new WeakMap,sn=new WeakMap,zo=new WeakMap,nn=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,xh=new WeakMap,Wo=new WeakMap,Xo=new WeakMap,on=new WeakMap,an=new WeakMap,Yo=new WeakMap,Go=new WeakMap,Ko=new WeakMap;class dd{constructor(E){this.owner=E,this.row=new cd(this),this.data=new ud(E,this),this.setDataSource=l=>{this.data&&this.data.reset(),this.pageCnt=25,this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.viewRecords.touch=()=>{this.viewRecords.updateCnt=(this.viewRecords.updateCnt||0)+1},this.viewRecords.rawIndex=0,this.viewRecords.setPageCnt=c=>{this.pageCnt=c},this.viewRecords.reset=()=>{this.owner.view&&this.owner.view.redraw()},this.viewRecords.resetV2=()=>{this.owner.view.redrawV2()},this.data.set(l)},this.getRowState=c=>{var c=parseInt(c);if(!(c>=this.data.count()))return this.data.__ng(c).rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=l=>{this.row.at=l},this.pageUp=()=>{if(!this.owner.isFirstPage){var l=$(".ng-container-body",this.owner.body).height()-($(".ng-container-body thead",this.owner.body).height()||0)-($(".ng-container-body tfoot",this.owner.body).height()||0);l-=$(".ng-container-body tbody.fixed",this.owner.body).height();for(var c=0,o=this.viewRecords.rawIndex;c<l;){o--;for(var r=0;r<this.owner.template.length;r++){var n=parseInt(o*this.owner.template.length+r);c+=this.owner.matrix.getHeight(n)}}return this.scrollTo_V1(o+1)}},this.pageDown=()=>{if(this.owner.isLastPage||!$("ng-vscrollbar",this.owner.body).is(":visible"))return;const l=parseInt(Array.from(this.owner.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)")).pop().dataset.row);return this.scrollTo_V1(l)},this.scrollTo_V1=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.reset(),!(l<=0||l>=this.rawRecords.length-1)),this.scrollToV2=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.resetV2(),!(l<=0||l>=this.rawRecords.length-1)),this.exprFunction=l=>{l=l.replaceAll("ninegrid.ROW.ORDER",H.ROW.ORDER);let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.exprFunction2=l=>{this.owner.fields.get().forEach(r=>{const n=this.owner.fields.indexOf(r);l=l.replaceAll(`data.${r}`,`data.v[${n}]`)});let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.getColumn=(l,c)=>this.data.get(l,c),this.setColumn=(l,c,o)=>{l=parseInt(l),this.data.get(l)[c]!=o&&this.data.get(l).__ng.rowState!=H.ROW_STATE.INSERT&&(this.data.get(l).__ng.rowState=H.ROW_STATE.UPDATE,this.data.onRowStateChanged()),this.setColumnSilent(l,c,o)},this.setColumnSilent=(l,c,o)=>{this.data.set(l,c,o)},this.setDataSource([]);for(var t in this.row)["first","last","count","add","insert","move","delete"].includes(t)||(this.data[t]=this.row[t])}}class fd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const E=this.getAttribute("type")||"sphere",t=this.getAttribute("size")||this.getAttribute("width")||this.getAttribute("height")||"8",l=this.getAttribute("width")||this.getAttribute("size")||"8",c=this.getAttribute("height")||this.getAttribute("size")||"8",o=this.getAttribute("color")||"gray";var r="";switch(E){case"sphere":r=`<div class="ng-expand-icon-sphere" style="width: ${t}px; height: ${t}px; background: radial-gradient(circle farthest-corner at 33% 33%, white 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%);" />`;break;case"circle":var n=Number(t)/2,s=this.getAttribute("stroke")||"#666",e=Number(this.getAttribute("stroke-width")||0),i=n+e,u=n+e;r=`
|
|
215
|
+
`,f(this,uh).call(this)}}$o=new WeakMap,Be=new WeakMap,js=new WeakMap,ni=new WeakMap,Qi=new WeakMap,uh=new WeakMap,Lo=new WeakMap,dh=new WeakMap,Po=new WeakMap,tn=new WeakMap,uu=new WeakMap,fh=new WeakMap,ph=new WeakMap,customElements.get("ng-combo")||customElements.define("ng-combo",nd),customElements.get("ng-combo-panel")||customElements.define("ng-combo-panel",od);class ad{constructor(E){Y(this,en);Y(this,Do);Y(this,rn);Y(this,oi);Y(this,sn);Y(this,Gr);it(this,"openMenu",(E,t)=>{var l=$(f(this,Gr)).css("font"),c=150;for(const o of f(this,rn))c=Math.max(c,H.measureTextSize(o.name,l).width+60);$(f(this,Gr)).css({width:c,top:t,left:E}),f(this,Gr).open(),f(this,oi)&&f(this,oi).show&&f(this,oi).show.call(this,{source:f(this,Do)})});Y(this,mh,E=>{tt(this,rn,f(this,Bo).call(this,E.items,0)),tt(this,oi,E.events),tt(this,Gr,$(`<ng-context-menu-panel id="${E.id}"></ng-context-menu-panel>`)[0]),$(f(this,en).shadowRoot).append($(f(this,Gr)).hide()),f(this,Gr).init(f(this,rn)),$("li",f(this,Gr)).on("mousedown",t=>{E.callback&&(t.menuId=t.currentTarget.getAttribute("menu-id"),t.source=f(this,Do),E.callback(t)),$("ng-context-menu-panel",f(this,en).shadowRoot).hide()})});Y(this,Bo,(E,t)=>{tt(this,sn,Math.max(t,f(this,sn))+1),E=f(this,gh).call(this,E);for(const l of E)l.level=t,l.hasOwnProperty("items")&&(l.items=f(this,Bo).call(this,l.items,t+1));return E});Y(this,gh,E=>{if(Array.isArray(E))return E;var t=[];for(const c in E){var l=E[c];l.menuId=c,t.push(l)}return t});tt(this,sn,0),tt(this,en,E.owner),f(this,mh).call(this,E)}}en=new WeakMap,Do=new WeakMap,rn=new WeakMap,oi=new WeakMap,sn=new WeakMap,Gr=new WeakMap,mh=new WeakMap,Bo=new WeakMap,gh=new WeakMap;class ld extends HTMLElement{constructor(){super();it(this,"init",t=>{var l=$("ul",this);$("li",l).remove(),f(this,Fo).call(this,l,t),$("li",this).on("mouseover",f(this,bh)),$("li",this).on("mouseout",c=>{H.j.querySelectorAll(c.currentTarget).removeClass("visible")})});it(this,"open",()=>{$(this).show()});Y(this,Fo,(t,l)=>{for(const n of l){var c=(n.hasOwnProperty("className")?n.className:"")+(n.hasOwnProperty("items")?" submenu":""),o=$(`<li menu-id='${n.menuId}' id="${n.name}" class="${c.trim()}"><span>${n.name}</span></li>`);if(t.append(o),n.hasOwnProperty("items")){var r=$("<ul></ul>");o.append(r),f(this,Fo).call(this,r,n.items)}}});Y(this,bh,t=>{H.j.querySelectorAll(t.currentTarget).addClass("visible");var l=$(this).css("font"),c=150;$("ul > li:visible > span",t.currentTarget).each((o,r)=>{c=Math.max(c,H.measureTextSize($(r).text(),l).width+60)}),$("ul",t.currentTarget).eq(0).css({width:c,top:-9,left:$(t.currentTarget.closest("ul")).width()-8,"z-index":Number($(this).css("z-index"))+1})})}connectedCallback(){this.innerHTML="<ul></ul>"}}Fo=new WeakMap,bh=new WeakMap,customElements.get("ng-context-menu-panel")||customElements.define("ng-context-menu-panel",ld);class hd{constructor(E){Y(this,zr);Y(this,qo,()=>{$(".ng-table tbody",f(this,zr).shadowRoot).on("click","th,td",f(this,yh)),$(".ng-table thead",f(this,zr).shadowRoot).on("click","th,td",f(this,vh)),$(".ng-table tfoot",f(this,zr).shadowRoot).on("click","th,td",f(this,wh))});Y(this,yh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.CELL_CLICK:H.EVENT.CELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,o.row=l.dataset.row,o.subrow=parseInt(l.dataset.matrixRow)%parseInt(l.dataset.row),o.bind=l.dataset.bind,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});Y(this,vh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.HEADCELL_CLICK:H.EVENT.HEADCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});Y(this,wh,E=>{if(![1,2].includes(E.detail))return;const t=["altKey","ctrlKey","shiftKey","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","button","buttons","whitch"],l=E.target.closest("th,td"),c=E.detail==1?H.EVENT.FOOTCELL_CLICK:H.EVENT.FOOTCELL_DBL_CLICK,o=new CustomEvent(c,{bubbles:!0,composed:!0,detail:{target:l}});o.col=l.dataset.col,H.copyProperty(o,E,t),f(this,zr).dispatchEvent(o)});tt(this,zr,E),f(this,qo).call(this),f(this,zr).addEventListener(H.EVENT.LAYOUT_CHANGED,t=>{f(this,qo).call(this)})}}zr=new WeakMap,qo=new WeakMap,yh=new WeakMap,vh=new WeakMap,wh=new WeakMap;class cd{constructor(E){Y(this,Kr);Y(this,Ho);Y(this,cs);it(this,"count",()=>f(this,Kr).rawRecords.length);it(this,"has",E=>f(this,Kr).data.filter(E).length>0);it(this,"first",E=>(f(this,Kr).data.first(E).__ng||{rowidx:-1}).rowidx);it(this,"last",E=>(f(this,Kr).data.last(E).__ng||{rowidx:-1}).rowidx);tt(this,Kr,E),tt(this,Ho,-1),tt(this,cs,-1)}get at(){return f(this,cs)}set at(E){tt(this,Ho,f(this,cs)),tt(this,cs,parseInt(E)),f(this,Kr).owner.body.querySelector(`tbody.bindable tr[data-row="${f(this,cs)}"]`)||setTimeout(()=>{f(this,Kr).owner.scrollTo_V1(f(this,cs))})}}Kr=new WeakMap,Ho=new WeakMap,cs=new WeakMap;class ud{constructor(E,t){Y(this,Ve);Y(this,Ft);Y(this,Pe);Y(this,Tr);Y(this,ai);Y(this,$s);it(this,"initialize",()=>{tt(this,$s,[]),$(f(this,Ve).template).each((E,t)=>{f(this,$s).push($(t).height())}),(f(this,Ft).rawRecords||[]).forEach(E=>{E.__ng.height=f(this,$s).slice()})});it(this,"set",E=>{this.clear(),this.add(E,!1)});it(this,"assign",E=>{this.source=E;for(var t=0;t<E.length;t++)f(this,Pe)[t].__ng._[H.ROW.ID]=E[t].__ng._[H.ROW.ID],tt(this,ai,Math.max(f(this,ai),E[t].__ng.rowid))});it(this,"getId",E=>E.__ng._[H.ROW.ID]);it(this,"reset",()=>{tt(this,Pe,[]),tt(this,Tr,[])});it(this,"refresh",()=>{f(this,Ft).viewRecords.reset()});it(this,"clearFilter",()=>(f(this,Ft).rawRecords.map(E=>{E.__ng.filtered=!1}),tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng.filtered)),f(this,Pe)));it(this,"refreshFilter",()=>(tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng.filtered)),f(this,on).call(this),f(this,Pe)));it(this,"setFilter",E=>{f(this,Ve).filtering.on();let t={};if(Array.isArray(E))for(let c in E[0])console.log(`::::::${c}::::::`),t[c]=Array.from(new Set(E.map(o=>o[c])));else t=E;this.clearFilter();for(let c in t){const o=t[c],r=f(this,Ft).owner.fields.indexOf(c);let n=!1;for(let s of this.getValidData())if(s.v[r]!=null){n=typeof s.v[r]=="number";break}if(n)for(var l=0;l<o.length;l++)o[l]=Number(o[l]);this.getValidData().filter(s=>o.nineBinarySearch(s.v[r]||"")<0).map(s=>{s.__ng.filtered=!0})}this.refreshFilter(),f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(c=>{c.filterOptions.forEach(o=>{o.data=[]})}),Object.entries(t).forEach(([c,o])=>{f(this,Ve).shadowRoot.querySelectorAll("ng-filter-button").forEach(r=>{let n=r.filterOptions;n.forEach(s=>{s.colnm===c&&(s.data=o)}),r.filterOptions=n})}),f(this,Ft).owner.scrollTo_V1(0),f(this,Ft).owner.paging.reset()});it(this,"indexOf",E=>f(this,nn).call(this,this.recordsNF(),E,this.records()));Y(this,nn,(E,t,l)=>{const c=E[t];return l.findIndex(o=>o.__ng._[H.ROW.ID]==c.__ng._[H.ROW.ID])});it(this,"moveRow",(E,t)=>{E!=t&&(H.move(f(this,Ft).rawRecords,this.total.indexOf(E),this.total.indexOf(t)),this.resetRecords(),f(this,Ft).owner.dataManager.viewRecords.reset())});it(this,"filter",E=>f(this,Pe).filter(E));it(this,"max",(E,t)=>{var l=(t?this.filter(t):f(this,Ft).rawRecords).map(c=>c[E]);return l&&l.length>0?l.reduce((c,o)=>c>o?c:o):null});it(this,"min",(E,t)=>{var l=(t?this.filter(t):f(this,Ft).rawRecords).map(c=>c[E]);return l&&l.length>0?l.reduce((c,o)=>c>o?o:c):null});it(this,"first",E=>this.filter(E).first());it(this,"last",E=>this.filter(E).last());it(this,"count",()=>this.getValidData().length);it(this,"countNF",()=>this.getValidDataNF().length);it(this,"onRowStateChanged",()=>{const E=this.getChangedData(),t=$("tbody td[data-bind=rowState]",f(this,Ft).owner.body);if(t.length<=0)return;const l=t.eq(0)[0].dataset.col,c=H.j.querySelectorAll(`thead th[data-col="${l}"]:not(.col-indicator)`,f(this,Ft).owner.body);c.removeClass("deleted").removeClass("added").removeClass("updated"),E.delete.length>0?c.addClass("deleted"):E.insert.length>0?c.addClass("added"):E.update.length>0&&c.addClass("updated"),f(this,Ft).owner.paging.refreshTotal()});Y(this,zo,E=>(Array.isArray(E)||(E=[E]),E.forEach((t,l)=>{t.__ng=this.default,t.__ng.rowid=this.nextId,t.__ng.rowState=H.ROW_STATE.INSERT,t.__ng._[H.ROW.ID]=t.__ng.rowid}),this.onRowStateChanged(),E));it(this,"sort",E=>{f(this,Ft).rawRecords.sort(E),f(this,Tr).sort(E),f(this,Pe).sort(E),f(this,on).call(this),f(this,Ft).owner.refresh()});Y(this,on,()=>{f(this,Ft).rawRecords.forEach((t,l)=>{t.__ng._[H.ROW.INDEX]=l}),f(this,Ft).rawRecords.filter(t=>!t.__ng.deleted&&!t.__ng.filtered&&t.__ng.visible).forEach((t,l)=>{t.__ng._[H.ROW.ORDER]=l+1});const E=f(this,Ft).rawRecords.filter(t=>!t.__ng.deleted&&t.__ng._[H.ROW.PIN]);E.forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=(E.length-l)*-1}),f(this,Pe).forEach((t,l)=>{t.__ng._[H.ROW.VISIBLE_ROW]=l});//!m.__ng.deleted && !m.__ng.pin && !m.__ng._[ninegrid.ROW.PIN] && !m.__ng.filtered && m.__ng.visible && m.__ng.paging;
|
|
216
|
+
});it(this,"resetIndex",()=>{f(this,Ft).rawRecords.forEach((E,t)=>{E.__ng.ii=t,E.__ng.rowidx=t,E.__ng.rowidx1=t}),this.getValidData().forEach((E,t)=>{E.__ng.i=t,E.__ng.rowidx=t}),f(this,on).call(this)});it(this,"resetRecords",()=>{tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),this.resetIndex()});Y(this,Uo,E=>{Array.isArray(E)||(E=[E]);var t=[];return E.forEach(l=>{var c={v:[]};for(const o of f(this,Ve).fields.get())c.v.push(H.nvl(l[o],""));t.push(c)}),t});it(this,"exprFunction",E=>{let t="...args",l="let [data, currow] = args; currow = Number(currow); return "+E+";";return new Function(t,l)});it(this,"__ng",E=>{var t=this.getValidData();if(t.length==0)return null;try{return t[E].__ng}catch(l){console.error(l,t,E)}});it(this,"getValidData",()=>(f(this,Pe).length==0&&tt(this,Pe,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted&&!E.__ng._[H.ROW.PIN]&&!E.__ng._[H.ROW.COLLAPSE]&&E.__ng._[H.ROW.VISIBLE]&&!E.__ng.filtered&&E.__ng.visible&&E.__ng.paging)),f(this,Pe)));it(this,"getValidDataNF",()=>(f(this,Tr).length==0&&tt(this,Tr,f(this,Ft).rawRecords.filter(E=>!E.__ng.deleted)),f(this,Tr)));it(this,"conv",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"conv2",E=>{if(H.isNull(E))return E;if(Array.isArray(E)){var t=[];for(const r of E){for(var l={},c=0;c<f(this,Ve).fields.get().length;c++){const n=f(this,Ve).fields.get()[c];l[n]=r.v[c]}l.__ng=r.__ng,t.push(l)}return t}else{for(var o=E,l={},c=0;c<f(this,Ve).fields.get().length;c++){const s=f(this,Ve).fields.get()[c];l[s]=o.v[c]}return l.__ng=o.__ng,l}});it(this,"changeRowState",(E,t,l)=>{const c=o=>{[H.ROW_STATE.EMPTY,H.ROW_STATE.NORMAL].includes(E)&&(o.__ng.o={}),o.__ng.rowState=E};E||(E=H.ROW_STATE.EMPTY),!t&&!l&&(t=0,l=this.count()-1),t||(t=0),l||(l=t),l>=this.count()&&(l=this.count()-1),f(this,Pe).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),f(this,Tr).forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.getValidDataNF().forEach((o,r)=>{o.__ng.rowidx>=t&&o.__ng.rowidx<=l&&c(o)}),this.onRowStateChanged(),f(this,Ft).viewRecords.reset()});it(this,"getCheckedData",E=>this.get().filter(t=>t.__ng.c[E]==!0));it(this,"search",(E,t)=>this.get().filter(l=>l[E]==t));Y(this,Vo,(E,t,l,c)=>{if(l==c)return;const o=new CustomEvent(H.EVENT.DATA_CHANGED,{bubbles:!0,detail:{}});o.row=E,o.bind=t,o.oldvalue=l,o.value=c,o.data=this.get(E),f(this,Ft).owner.dispatchEvent(o)});it(this,"add",(E,t)=>{E==null&&(E={}),t==null&&(t=!0);const l=f(this,Uo).call(this,E);f(this,Ft).rawRecords=f(this,Ft).rawRecords.concat(f(this,zo).call(this,l));const c=f(this,Ft).rawRecords.map(r=>r.__ng._[H.ROW.ORIGIN_ORDER]);if(c.length>0){const r=c.reduce(function(n,s){return n>s?n:s});f(this,Ft).rawRecords.forEach((n,s)=>{n.__ng._[H.ROW.ORIGIN_ORDER]<0&&(n.__ng._[H.ROW.ORIGIN_ORDER]=r+1+s)})}this.resetRecords();const o=this.count()-1;return t||this.changeRowState(H.ROW_STATE.EMPTY,o-l.length+1,o),f(this,Ft).viewRecords.reset(),o});it(this,"insert",(E,t,l)=>{E==null&&(E={}),t==null&&(t=0),l==null&&(l=!0);var c=f(this,Uo).call(this,E);const o=f(this,Ft).rawRecords[t].__ng._[H.ROW.ORIGIN_ORDER];return f(this,Ft).rawRecords.filter(r=>r.__ng._[H.ROW.ORIGIN_ORDER]>=o).forEach(r=>{r.__ng._[H.ROW.ORIGIN_ORDER]+=c.length}),c=f(this,zo).call(this,c),c.forEach((r,n)=>{r.__ng._[H.ROW.ORIGIN_ORDER]=o+n}),f(this,Ft).rawRecords.splice(t,0,...c),this.resetRecords(),l||this.changeRowState(H.ROW_STATE.EMPTY,t,t+c.length-1),f(this,Ft).viewRecords.reset(),t});Y(this,xh,E=>{var t=!1;E.sort((l,c)=>c-l).forEach(l=>{f(this,Pe)[l].__ng.rowState==H.ROW_STATE.INSERT?H.removeIf(f(this,Ft).rawRecords,c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid):(f(this,Ft).rawRecords.filter(c=>c.__ng.rowid==f(this,Pe)[l].__ng.rowid).map(c=>{c.__ng.deleted=!0,c.__ng.rowState=H.ROW_STATE.DELETE}),t=!0)}),t&&this.onRowStateChanged(),tt(this,Pe,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted&&!l.__ng.filtered)),tt(this,Tr,f(this,Ft).rawRecords.filter(l=>!l.__ng.deleted)),this.getValidDataNF().forEach((l,c)=>{l.__ng.rowidx=c}),this.getValidData().forEach((l,c)=>{l.__ng.rowidx=c}),f(this,Ft).viewRecords.reset()});it(this,"delete",E=>{var t=[];if(Array.isArray(E))t=E;else if(typeof E>"u"){if(f(this,Ft).owner.row.at<0)throw`invalid ${f(this,Ft).owner.row.at}`;t=[f(this,Ft).owner.row.at]}else if(typeof E=="number"||typeof E=="string")t=[E];else if(typeof E=="object"){const l=f(this,Pe).findIndex(c=>c.__ng._[H.ROW.ID]==E.__ng._[H.ROW.ID]);if(l<0)throw new Error(`${E.__ng._[H.ROW.ID]} not found.`);t=[l]}else throw`invalid ${E}`;f(this,xh).call(this,t)});it(this,"deleteFromId",E=>{var t=this.records();const l=t.findIndex(c=>c.__ng._[H.ROW.ID]==E);if(l<0)throw new Error(`${E} not found.`);this.delete(l)});Y(this,Wo,(E,t,l)=>{if(typeof l>"u")l=E.findIndex(e=>e.__ng._[H.ROW.ID]==t.__ng._[H.ROW.ID]);else if(typeof l=="number"||typeof l=="string")l=parseInt(l);else throw`invalid ${l}`;var c=E[l],o=!1;for(const e in t)if(!["__ng","rowState"].includes(e)){var r=f(this,Ve).fields.indexOf(e);if(!(r<0)){var n=c.v[r],s=t[e];c.v[r]=s,n!=s&&(c.__ng.rowState=H.ROW_STATE.UPDATE,o=!0,f(this,Vo).call(this,l,e,n,s))}}o&&this.onRowStateChanged(),f(this,Ft).owner.refreshData()});it(this,"update",(E,t)=>{f(this,Wo).call(this,f(this,Pe),E,t)});it(this,"setValue",(E,t,l,c)=>{f(this,Xo).call(this,E,t,l,c,!1)});it(this,"setValueNF",(E,t,l,c)=>{f(this,Xo).call(this,E,t,l,c,!0)});Y(this,Xo,(E,t,l,c,o)=>{E=parseInt(E),c==null&&(c=!0);const r=f(this,Ve).fields.indexOf(t);if(!(r<0)){var n=o?this.getValidDataNF()[E]:this.getValidData()[E],s=n.v[r];n.v[r]!=l&&n.__ng.rowState!=H.ROW_STATE.INSERT&&(n.__ng.o.hasOwnProperty(t)||(n.__ng.o[t]=s),c&&(n.__ng.rowState=H.ROW_STATE.UPDATE,this.onRowStateChanged())),n.v[r]=l,f(this,Ft).owner.refreshData(E),f(this,Vo).call(this,E,t,s,l)}});it(this,"setRecord",(E,t,l,c)=>{f(this,an).call(this,this.getValidData(),E,t,l,c,!1)});it(this,"setRecordNF",(E,t,l,c)=>{f(this,an).call(this,this.getValidDataNF(),E,t,l,c,!0)});Y(this,an,(E,t,l,c,o)=>{t=parseInt(t),l=parseInt(l),o==null&&(o=!0);var r=E[t];r.v[l],r.v[l]!=c&&r.__ng.rowState!=H.ROW_STATE.INSERT&&o&&(r.__ng.rowState=H.ROW_STATE.UPDATE),r.v[l]=c});it(this,"getChangedData",E=>E?this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==E)):{insert:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT)),update:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.UPDATE)),delete:this.conv2(f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.DELETE))});it(this,"isChanged",()=>f(this,Ft).rawRecords.filter(t=>t.__ng.rowState==H.ROW_STATE.INSERT||t.__ng.rowState==H.ROW_STATE.UPDATE||t.__ng.rowState==H.ROW_STATE.DELETE).length>0);Y(this,ln,(E,t,l)=>{if(!(!E||E.length<=0)){if(H.isNull(t))return this.conv2(E);if(t<0||t>=E.length)throw`invalid row : ${t}`;if(l!=null){var c=f(this,Ve).fields.indexOf(l);return c>=0?E[t].v[c]:null}var o=t==null?E:E[t];return this.conv(o)}});it(this,"get",(E,t)=>f(this,ln).call(this,this.getValidData(),E,t));it(this,"getNF",(E,t)=>f(this,ln).call(this,this.getValidDataNF(),E,t));it(this,"records",E=>H.isNull(E)?this.getValidData():this.getValidData(E));it(this,"recordsNF",E=>H.isNull(E)?this.getValidDataNF():this.getValidDataNF(E));it(this,"getRow",E=>this.getValidData()[E]);it(this,"getRowNF",E=>this.getValidDataNF()[E]);Y(this,Yo,(E,t)=>{var l=f(this,Ve).fields.indexOf(t);return l<0?[]:E.map(c=>c.v[l])});it(this,"getMap",E=>f(this,Yo).call(this,this.getValidData(),E));it(this,"getMapNF",E=>f(this,Yo).call(this,this.getValidDataNF(),E));it(this,"findIndex",E=>f(this,Go).call(this,this.getValidData(),E));it(this,"findIndexNF",E=>f(this,Go).call(this,this.getValidDataNF(),E));Y(this,Go,function(E,t){return this.conv2(E).findIndex(t)});it(this,"findIndex_1",E=>f(this,Ko).call(this,this.getValidData(),E));it(this,"findIndexNF_1",E=>f(this,Ko).call(this,this.getValidDataNF(),E));Y(this,Ko,function(E,t){let l=0,c=E.length-1,o;for(;l<=c;){if(o=parseInt((l+c)/2),t===E[o].__ng._[H.ROW.INDEX])return o;t<E[o].__ng._[H.ROW.INDEX]?c=o-1:l=o+1}return-1});tt(this,Ve,E),tt(this,Ft,t),tt(this,Pe,[]),tt(this,Tr,[]),tt(this,ai,0),this.all={get:(l,c)=>f(this,ln).call(this,this.recordsNF(),l,c),records:l=>this.recordsNF(l),count:()=>this.recordsNF().length,setRecord:(l,c,o,r)=>f(this,an).call(this,this.all.records(),l,c,o,r),indexOf:l=>f(this,nn).call(this,this.records(),l,this.recordsNF()),update:(l,c)=>f(this,Wo).call(this,this.records(),l,c)},this.total={indexOf:l=>f(this,nn).call(this,this.records(),l,f(this,Ft).rawRecords)},this.initialize()}get source(){return this.conv2(f(this,Ft).rawRecords)}set source(E){this.clear(),this.add(E,!1)}get nextId(){return++Iu(this,ai)._}get default(){return{rowState:H.ROW_STATE.EMPTY,deleted:!1,filtered:!1,pin:!1,expand:!0,visible:!0,paging:!0,height:f(this,$s).slice(),o:{},c:{},_:[0,0,0,0,H.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,f(this,$s).slice(),-1,{},{}]}}clear(){delete f(this,Ft).rawRecords,tt(this,Pe,[]),tt(this,Tr,[]),f(this,Ft).rawRecords=[],f(this,Ft).viewRecords.reset()}}Ve=new WeakMap,Ft=new WeakMap,Pe=new WeakMap,Tr=new WeakMap,ai=new WeakMap,$s=new WeakMap,nn=new WeakMap,zo=new WeakMap,on=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,xh=new WeakMap,Wo=new WeakMap,Xo=new WeakMap,an=new WeakMap,ln=new WeakMap,Yo=new WeakMap,Go=new WeakMap,Ko=new WeakMap;class dd{constructor(E){this.owner=E,this.row=new cd(this),this.data=new ud(E,this),this.setDataSource=l=>{this.data&&this.data.reset(),this.pageCnt=25,this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.viewRecords.touch=()=>{this.viewRecords.updateCnt=(this.viewRecords.updateCnt||0)+1},this.viewRecords.rawIndex=0,this.viewRecords.setPageCnt=c=>{this.pageCnt=c},this.viewRecords.reset=()=>{this.owner.view&&this.owner.view.redraw()},this.viewRecords.resetV2=()=>{this.owner.view.redrawV2()},this.data.set(l)},this.getRowState=c=>{var c=parseInt(c);if(!(c>=this.data.count()))return this.data.__ng(c).rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=l=>{this.row.at=l},this.pageUp=()=>{if(!this.owner.isFirstPage){var l=$(".ng-container-body",this.owner.body).height()-($(".ng-container-body thead",this.owner.body).height()||0)-($(".ng-container-body tfoot",this.owner.body).height()||0);l-=$(".ng-container-body tbody.fixed",this.owner.body).height();for(var c=0,o=this.viewRecords.rawIndex;c<l;){o--;for(var r=0;r<this.owner.template.length;r++){var n=parseInt(o*this.owner.template.length+r);c+=this.owner.matrix.getHeight(n)}}return this.scrollTo_V1(o+1)}},this.pageDown=()=>{if(this.owner.isLastPage||!$("ng-vscrollbar",this.owner.body).is(":visible"))return;const l=parseInt(Array.from(this.owner.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)")).pop().dataset.row);return this.scrollTo_V1(l)},this.scrollTo_V1=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.reset(),!(l<=0||l>=this.rawRecords.length-1)),this.scrollToV2=l=>(l<0&&(l=0),l>=this.rawRecords.length&&(l=this.rawRecords.length-1),this.viewRecords.rawIndex=l,this.viewRecords.resetV2(),!(l<=0||l>=this.rawRecords.length-1)),this.exprFunction=l=>{l=l.replaceAll("ninegrid.ROW.ORDER",H.ROW.ORDER);let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.exprFunction2=l=>{this.owner.fields.get().forEach(r=>{const n=this.owner.fields.indexOf(r);l=l.replaceAll(`data.${r}`,`data.v[${n}]`)});let c="...args",o="let [data, currow, all] = args; currow = Number(currow); return "+l+";";return new Function(c,o)},this.getColumn=(l,c)=>this.data.get(l,c),this.setColumn=(l,c,o)=>{l=parseInt(l),this.data.get(l)[c]!=o&&this.data.get(l).__ng.rowState!=H.ROW_STATE.INSERT&&(this.data.get(l).__ng.rowState=H.ROW_STATE.UPDATE,this.data.onRowStateChanged()),this.setColumnSilent(l,c,o)},this.setColumnSilent=(l,c,o)=>{this.data.set(l,c,o)},this.setDataSource([]);for(var t in this.row)["first","last","count","add","insert","move","delete"].includes(t)||(this.data[t]=this.row[t])}}class fd extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const E=this.getAttribute("type")||"sphere",t=this.getAttribute("size")||this.getAttribute("width")||this.getAttribute("height")||"8",l=this.getAttribute("width")||this.getAttribute("size")||"8",c=this.getAttribute("height")||this.getAttribute("size")||"8",o=this.getAttribute("color")||"gray";var r="";switch(E){case"sphere":r=`<div class="ng-expand-icon-sphere" style="width: ${t}px; height: ${t}px; background: radial-gradient(circle farthest-corner at 33% 33%, white 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%);" />`;break;case"circle":var n=Number(t)/2,s=this.getAttribute("stroke")||"#666",e=Number(this.getAttribute("stroke-width")||0),i=n+e,u=n+e;r=`
|
|
217
217
|
<svg class="ng-expand-icon-circle" viewBox="0 0 ${t} ${t}" width="${t}" height="${t}" xmlns="http://www.w3.org/2000/svg">
|
|
218
218
|
<circle fill="${o}" stroke="${s}" stroke-width="${e}" cx="${i}" cy="${u}" r="${n}"/>
|
|
219
219
|
</svg>
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
JSZip uses the library pako released under the MIT license :
|
|
273
273
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
274
274
|
*/(function(h){typeof c=="object"&&l!==void 0?l.exports=h():(typeof window<"u"?window:r!==void 0?r:typeof self<"u"?self:this).JSZip=h()})((function(){return(function h(p,m,d){function b(C,I){if(!m[C]){if(!p[C]){var D=typeof t=="function"&&t;if(!I&&D)return D(C,!0);if(g)return g(C,!0);var z=new Error("Cannot find module '"+C+"'");throw z.code="MODULE_NOT_FOUND",z}var P=m[C]={exports:{}};p[C][0].call(P.exports,(function(B){return b(p[C][1][B]||B)}),P,P.exports,h,p,m,d)}return m[C].exports}for(var g=typeof t=="function"&&t,S=0;S<d.length;S++)b(d[S]);return b})({1:[function(h,p,m){var d=h("./utils"),b=h("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";m.encode=function(S){for(var C,I,D,z,P,B,F,W=[],q=0,A=S.length,M=A,k=d.getTypeOf(S)!=="string";q<S.length;)M=A-q,D=k?(C=S[q++],I=q<A?S[q++]:0,q<A?S[q++]:0):(C=S.charCodeAt(q++),I=q<A?S.charCodeAt(q++):0,q<A?S.charCodeAt(q++):0),z=C>>2,P=(3&C)<<4|I>>4,B=1<M?(15&I)<<2|D>>6:64,F=2<M?63&D:64,W.push(g.charAt(z)+g.charAt(P)+g.charAt(B)+g.charAt(F));return W.join("")},m.decode=function(S){var C,I,D,z,P,B,F=0,W=0,q="data:";if(S.substr(0,q.length)===q)throw new Error("Invalid base64 input, it looks like a data url.");var A,M=3*(S=S.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(S.charAt(S.length-1)===g.charAt(64)&&M--,S.charAt(S.length-2)===g.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(A=b.uint8array?new Uint8Array(0|M):new Array(0|M);F<S.length;)C=g.indexOf(S.charAt(F++))<<2|(z=g.indexOf(S.charAt(F++)))>>4,I=(15&z)<<4|(P=g.indexOf(S.charAt(F++)))>>2,D=(3&P)<<6|(B=g.indexOf(S.charAt(F++))),A[W++]=C,P!==64&&(A[W++]=I),B!==64&&(A[W++]=D);return A}},{"./support":30,"./utils":32}],2:[function(h,p,m){var d=h("./external"),b=h("./stream/DataWorker"),g=h("./stream/Crc32Probe"),S=h("./stream/DataLengthProbe");function C(I,D,z,P,B){this.compressedSize=I,this.uncompressedSize=D,this.crc32=z,this.compression=P,this.compressedContent=B}C.prototype={getContentWorker:function(){var I=new b(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new S("data_length")),D=this;return I.on("end",(function(){if(this.streamInfo.data_length!==D.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),I},getCompressedWorker:function(){return new b(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},C.createWorkerFrom=function(I,D,z){return I.pipe(new g).pipe(new S("uncompressedSize")).pipe(D.compressWorker(z)).pipe(new S("compressedSize")).withStreamInfo("compression",D)},p.exports=C},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(h,p,m){var d=h("./stream/GenericWorker");m.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},m.DEFLATE=h("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(h,p,m){var d=h("./utils"),b=(function(){for(var g,S=[],C=0;C<256;C++){g=C;for(var I=0;I<8;I++)g=1&g?3988292384^g>>>1:g>>>1;S[C]=g}return S})();p.exports=function(g,S){return g!==void 0&&g.length?d.getTypeOf(g)!=="string"?(function(C,I,D,z){var P=b,B=0+D;C^=-1;for(var F=0;F<B;F++)C=C>>>8^P[255&(C^I[F])];return-1^C})(0|S,g,g.length):(function(C,I,D,z){var P=b,B=0+D;C^=-1;for(var F=0;F<B;F++)C=C>>>8^P[255&(C^I.charCodeAt(F))];return-1^C})(0|S,g,g.length):0}},{"./utils":32}],5:[function(h,p,m){m.base64=!1,m.binary=!1,m.dir=!1,m.createFolders=!0,m.date=null,m.compression=null,m.compressionOptions=null,m.comment=null,m.unixPermissions=null,m.dosPermissions=null},{}],6:[function(h,p,m){var d;d=typeof Promise<"u"?Promise:h("lie"),p.exports={Promise:d}},{lie:37}],7:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",b=h("pako"),g=h("./utils"),S=h("./stream/GenericWorker"),C=d?"uint8array":"array";function I(D,z){S.call(this,"FlateWorker/"+D),this._pako=null,this._pakoAction=D,this._pakoOptions=z,this.meta={}}m.magic="\b\0",g.inherits(I,S),I.prototype.processChunk=function(D){this.meta=D.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(C,D.data),!1)},I.prototype.flush=function(){S.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},I.prototype.cleanUp=function(){S.prototype.cleanUp.call(this),this._pako=null},I.prototype._createPako=function(){this._pako=new b[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var D=this;this._pako.onData=function(z){D.push({data:z,meta:D.meta})}},m.compressWorker=function(D){return new I("Deflate",D)},m.uncompressWorker=function(){return new I("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(h,p,m){function d(P,B){var F,W="";for(F=0;F<B;F++)W+=String.fromCharCode(255&P),P>>>=8;return W}function b(P,B,F,W,q,A){var M,k,y=P.file,w=P.compression,x=A!==C.utf8encode,_=g.transformTo("string",A(y.name)),T=g.transformTo("string",C.utf8encode(y.name)),O=y.comment,j=g.transformTo("string",A(O)),V=g.transformTo("string",C.utf8encode(O)),X=T.length!==y.name.length,J=V.length!==O.length,L="",G="",N="",R=y.dir,U=y.date,K={crc32:0,compressedSize:0,uncompressedSize:0};B&&!F||(K.crc32=P.crc32,K.compressedSize=P.compressedSize,K.uncompressedSize=P.uncompressedSize);var rt=0;B&&(rt|=8),x||!X&&!J||(rt|=2048);var Z=0,et=0;R&&(Z|=16),q==="UNIX"?(et=798,Z|=(function(lt,Q){var ot=lt;return lt||(ot=Q?16893:33204),(65535&ot)<<16})(y.unixPermissions,R)):(et=20,Z|=(function(lt){return 63&(lt||0)})(y.dosPermissions)),M=U.getUTCHours(),M<<=6,M|=U.getUTCMinutes(),M<<=5,M|=U.getUTCSeconds()/2,k=U.getUTCFullYear()-1980,k<<=4,k|=U.getUTCMonth()+1,k<<=5,k|=U.getUTCDate(),X&&(G=d(1,1)+d(I(_),4)+T,L+="up"+d(G.length,2)+G),J&&(N=d(1,1)+d(I(j),4)+V,L+="uc"+d(N.length,2)+N);var ht="";return ht+=`
|
|
275
|
-
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),C=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,C){var I=new b(S.streamFiles,C,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),C=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new C);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,C){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(C)}d.inherits(g,b),g.prototype._bindStream=function(S){var C=this;(this._stream=S).pause(),S.on("data",(function(I){C.push({data:I,meta:{percent:0}})})).on("error",(function(I){C.isPaused?this.generatedError=I:C.error(I)})).on("end",(function(){C.isPaused?C._upstreamEnded=!0:C.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,C){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),C&&C(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),C=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new C(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===C&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&C===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,C=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)C=(C<<8)+this.byteAt(S);return this.index+=g,C},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),C=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new C(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var C=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=C+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var C=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){C.dataIsReady=!0,C.data=I,C.max=I&&I.length||0,C.type=d.getTypeOf(I),C.isPaused||C._tickAndRepeat()}),(function(I){C.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,C=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,C);break;case"uint8array":S=this.data.subarray(this.index,C);break;case"array":case"nodebuffer":S=this.data.slice(this.index,C)}return this.index=C,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),C=h("../support"),I=h("../external"),D=null;if(C.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),C=new Array(256),I=0;I<256;I++)C[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}C[254]=C[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=C[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+C[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function C(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:C,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:C,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:C,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:C,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:C},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),C=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=C.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),C=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=C.utf8decode(this.fileName),this.fileCommentStr=C.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),C=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof C&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),C.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof C?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var C=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=C=++C%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],C=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===C||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===C?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=C,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),C=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),C=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(C[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||C[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var C=Array.prototype.slice.call(arguments,1);C.length;){var I=C.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,C){return S.length===C?S:S.subarray?S.subarray(0,C):(S.length=C,S)};var b={arraySet:function(S,C,I,D,z){if(C.subarray&&S.subarray)S.set(C.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){var C,I,D,z,P,B;for(C=D=0,I=S.length;C<I;C++)D+=S[C].length;for(B=new Uint8Array(D),C=z=0,I=S.length;C<I;C++)P=S[C],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,C,I,D,z){for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),C=0;C<256;C++)S[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var C=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(C=C+b[S++]|0)|0,--D;);C%=65521,I%=65521}return C|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var C=0;C<8;C++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,C){var I=d,D=C+S;b^=-1;for(var z=C;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),C=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=C(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=C(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,C,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,C=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<C&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<C?C-S+5:5-(S-C),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),C=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(C(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;C(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=C(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=C(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=C(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],C=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=C,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,C=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(C);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<C;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,qt=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,ke=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,qt<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=ke[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)qt<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<C;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<C;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,C,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,C,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(C=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,C.removeChild(y),y=null},C.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,C=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=C["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=C.Symbol,N=C.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(C,"DataView"),Z=Qt(C,"Map"),et=Qt(C,"Promise"),ht=Qt(C,"Set"),lt=Qt(C,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,ge){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=ge(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Te(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&qt(st,pt,er)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),qt=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),ge=Rt.length;ge--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function ke(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,ge,oe,he,Jt){var Ce=Zt(Et),Ee=Zt(Rt),Me="[object Array]",qe="[object Array]";Ce||(Me=(Me=be(Et))==r?s:Me),Ee||(qe=(qe=be(Rt))==r?s:qe);var ir=Me==s&&!q(Et),mr=qe==s&&!q(Rt),Yr=Me==qe;if(Yr&&!ir)return Jt||(Jt=new Ht),Ce||tr(Et)?je(Et,Rt,ge,oe,he,Jt):(function(Ae,ye,Ks,Ei,Jc,Or,Ss){switch(Ks){case"[object DataView]":if(Ae.byteLength!=ye.byteLength||Ae.byteOffset!=ye.byteOffset)return!1;Ae=Ae.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Ae.byteLength!=ye.byteLength||!Ei(new N(Ae),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Ae,+ye);case"[object Error]":return Ae.name==ye.name&&Ae.message==ye.message;case"[object RegExp]":case"[object String]":return Ae==ye+"";case n:var Zs=A;case e:var Ll=2⩔if(Zs||(Zs=M),Ae.size!=ye.size&&!Ll)return!1;var Qc=Ss.get(Ae);if(Qc)return Qc==ye;Or|=1,Ss.set(Ae,ye);var Kn=je(Zs(Ae),Zs(ye),Ei,Jc,Or,Ss);return Ss.delete(Ae),Kn;case"[object Symbol]":if(gt)return gt.call(Ae)==gt.call(ye)}return!1})(Et,Rt,Me,ge,oe,he,Jt);if(!(2&he)){var Ci=ir&&X.call(Et,"__wrapped__"),Xn=mr&&X.call(Rt,"__wrapped__");if(Ci||Xn){var Yn=Ci?Et.value():Et,Gn=Xn?Rt.value():Rt;return Jt||(Jt=new Ht),ge(Yn,Gn,oe,he,Jt)}}return Yr?(Jt||(Jt=new Ht),(function(Ae,ye,Ks,Ei,Jc,Or){var Ss=2&Jc,Zs=er(Ae),Ll=Zs.length,Qc=er(ye).length;if(Ll!=Qc&&!Ss)return!1;for(var Kn=Ll;Kn--;){var Js=Zs[Kn];if(!(Ss?Js in ye:X.call(ye,Js)))return!1}var Tu=Or.get(Ae);if(Tu&&Or.get(ye))return Tu==ye;var tu=!0;Or.set(Ae,ye),Or.set(ye,Ae);for(var bu=Ss;++Kn<Ll;){Js=Zs[Kn];var eu=Ae[Js],ru=ye[Js];if(Ei)var Ru=Ss?Ei(ru,eu,Js,ye,Ae,Or):Ei(eu,ru,Js,Ae,ye,Or);if(!(Ru===void 0?eu===ru||Ks(eu,ru,Ei,Jc,Or):Ru)){tu=!1;break}bu||(bu=Js=="constructor")}if(tu&&!bu){var su=Ae.constructor,iu=ye.constructor;su==iu||!("constructor"in Ae)||!("constructor"in ye)||typeof su=="function"&&su instanceof su&&typeof iu=="function"&&iu instanceof iu||(tu=!1)}return Or.delete(Ae),Or.delete(ye),tu})(Et,Rt,ge,oe,he,Jt)):!1})(st,pt,ke,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Re(at(_t),Bt):function(Et){var Rt=(function(ge,oe,he){var Jt=ge==null?void 0:Pt(ge,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(ge,oe){return ge!=null&&(function(he,Jt,Ce){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ee,Me=-1,qe=Jt.length;++Me<qe;){var ir=at(Jt[Me]);if(!(Ee=he!=null&&Ce(he,ir)))break;he=he[ir]}return Ee||!!(qe=he?he.length:0)&&re(qe)&&Te(ir,qe)&&(Zt(he)||ee(he))})(ge,oe,fe)})(Et,_t):ke(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=er(Et),ge=Rt.length;ge--;){var oe=Rt[ge],he=Et[oe];Rt[ge]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Re(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,ge,oe,he){var Jt=oe.length,Ce=Jt;if(Rt==null)return!Ce;for(Rt=Object(Rt);Jt--;){var Ee=oe[Jt];if(Ee[2]?Ee[1]!==Rt[Ee[0]]:!(Ee[0]in Rt))return!1}for(;++Jt<Ce;){var Me=(Ee=oe[Jt])[0],qe=Rt[Me],ir=Ee[1];if(Ee[2]){if(qe===void 0&&!(Me in Rt))return!1}else{var mr=new Ht,Yr;if(!(Yr===void 0?ke(ir,qe,he,3,mr):Yr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,ge=st.length,oe=pt.length;if(ge!=oe&&!(Rt&&oe>ge))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ce=!0,Ee=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<ge;){var Me=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Me,Jt,pt,st,Et):_t(Me,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ce=!1;break}if(Ee){if(!W(pt,(function(mr,Yr){if(!Ee.has(Yr)&&(Me===mr||wt(Me,mr,_t,Bt,Et)))return Ee.add(Yr)}))){Ce=!1;break}}else if(Me!==qe&&!wt(Me,qe,_t,Bt,Et)){Ce=!1;break}}return Et.delete(st),Et.delete(pt),Ce}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Te(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Re(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var tr=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function er(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,C=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=C&&C.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Re(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),tr=ze?"[object Array]":Yt(ee),er=($e=$e==r?s:$e)==s,xr=(tr=tr==r?s:tr)==s,st=$e==tr;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,er=!1}if(st&&!er)return re||(re=new It),le||Re(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,ge,oe,he,Jt,Ce){switch(ge){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ee=z;case e:var Me=1&oe;if(Ee||(Ee=P),Et.size!=Rt.size&&!Me)return!1;var qe=Ce.get(Et);if(qe)return qe==Rt;oe|=2,Ce.set(Et,Rt);var ir=$t(Ee(Et),Ee(Rt),oe,he,Jt,Ce);return Ce.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=er&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,ge,oe,he,Jt){var Ce=1&ge,Ee=qt(Et),Me=Ee.length,qe=qt(Rt).length;if(Me!=qe&&!Ce)return!1;for(var ir=Me;ir--;){var mr=Ee[ir];if(!(Ce?mr in Rt:w.call(Rt,mr)))return!1}var Yr=Jt.get(Et);if(Yr&&Jt.get(Rt))return Yr==Rt;var Ci=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Xn=Ce;++ir<Me;){mr=Ee[ir];var Yn=Et[mr],Gn=Rt[mr];if(oe)var Ae=Ce?oe(Gn,Yn,mr,Rt,Et,Jt):oe(Yn,Gn,mr,Et,Rt,Jt);if(!(Ae===void 0?Yn===Gn||he(Yn,Gn,ge,oe,Jt):Ae)){Ci=!1;break}Xn||(Xn=mr=="constructor")}if(Ci&&!Xn){var ye=Et.constructor,Ks=Rt.constructor;ye==Ks||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Ks=="function"&&Ks instanceof Ks||(Ci=!1)}return Jt.delete(Et),Jt.delete(Rt),Ci})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],tr=dt[re];if(Tt)var er=ee?Tt(tr,$e,re,dt,at,Mt):Tt($e,tr,re,at,dt,Mt);if(er!==void 0){if(er)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==tr&&!Kt($e,tr,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function qt(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,ke)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var ke=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Te(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Re=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Te(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Te(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var C=u.call(d);return S&&(b?d[h]=g:delete d[h]),C})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",C=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+C.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return C.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,C,I){return i(m+(d&b|~d&g)+S+C|0,I)+d|0}function a(m,d,b,g,S,C,I){return i(m+(d&g|b&~g)+S+C|0,I)+d|0}function h(m,d,b,g,S,C,I){return i(m+(d^b^g)+S+C|0,I)+d|0}function p(m,d,b,g,S,C,I){return i(m+(b^(d|~g))+S+C|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,C=this._d;b=u(b,g,S,C,m[0],3614090360,7),C=u(C,b,g,S,m[1],3905402710,12),S=u(S,C,b,g,m[2],606105819,17),g=u(g,S,C,b,m[3],3250441966,22),b=u(b,g,S,C,m[4],4118548399,7),C=u(C,b,g,S,m[5],1200080426,12),S=u(S,C,b,g,m[6],2821735955,17),g=u(g,S,C,b,m[7],4249261313,22),b=u(b,g,S,C,m[8],1770035416,7),C=u(C,b,g,S,m[9],2336552879,12),S=u(S,C,b,g,m[10],4294925233,17),g=u(g,S,C,b,m[11],2304563134,22),b=u(b,g,S,C,m[12],1804603682,7),C=u(C,b,g,S,m[13],4254626195,12),S=u(S,C,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,C,b,m[15],1236535329,22),S,C,m[1],4129170786,5),C=a(C,b,g,S,m[6],3225465664,9),S=a(S,C,b,g,m[11],643717713,14),g=a(g,S,C,b,m[0],3921069994,20),b=a(b,g,S,C,m[5],3593408605,5),C=a(C,b,g,S,m[10],38016083,9),S=a(S,C,b,g,m[15],3634488961,14),g=a(g,S,C,b,m[4],3889429448,20),b=a(b,g,S,C,m[9],568446438,5),C=a(C,b,g,S,m[14],3275163606,9),S=a(S,C,b,g,m[3],4107603335,14),g=a(g,S,C,b,m[8],1163531501,20),b=a(b,g,S,C,m[13],2850285829,5),C=a(C,b,g,S,m[2],4243563512,9),S=a(S,C,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,C,b,m[12],2368359562,20),S,C,m[5],4294588738,4),C=h(C,b,g,S,m[8],2272392833,11),S=h(S,C,b,g,m[11],1839030562,16),g=h(g,S,C,b,m[14],4259657740,23),b=h(b,g,S,C,m[1],2763975236,4),C=h(C,b,g,S,m[4],1272893353,11),S=h(S,C,b,g,m[7],4139469664,16),g=h(g,S,C,b,m[10],3200236656,23),b=h(b,g,S,C,m[13],681279174,4),C=h(C,b,g,S,m[0],3936430074,11),S=h(S,C,b,g,m[3],3572445317,16),g=h(g,S,C,b,m[6],76029189,23),b=h(b,g,S,C,m[9],3654602809,4),C=h(C,b,g,S,m[12],3873151461,11),S=h(S,C,b,g,m[15],530742520,16),b=p(b,g=h(g,S,C,b,m[2],3299628645,23),S,C,m[0],4096336452,6),C=p(C,b,g,S,m[7],1126891415,10),S=p(S,C,b,g,m[14],2878612391,15),g=p(g,S,C,b,m[5],4237533241,21),b=p(b,g,S,C,m[12],1700485571,6),C=p(C,b,g,S,m[3],2399980690,10),S=p(S,C,b,g,m[10],4293915773,15),g=p(g,S,C,b,m[1],2240044497,21),b=p(b,g,S,C,m[8],1873313359,6),C=p(C,b,g,S,m[15],4264355552,10),S=p(S,C,b,g,m[6],2734768916,15),g=p(g,S,C,b,m[13],1309151649,21),b=p(b,g,S,C,m[4],4149444226,6),C=p(C,b,g,S,m[11],3174756917,10),S=p(S,C,b,g,m[2],718787259,15),g=p(g,S,C,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+C|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var C=1;C<m;C++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(C===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var C=1;C<p;C++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(C===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,C=[],I=e.createDecipheriv(d,S,b);C.push(I.update(g)),C.push(I.final()),h=i.concat(C)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,C){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(C,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,C,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:C,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,C,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(C,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,C,I,P):u(g,S,C,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,C,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var C=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)C[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);C.copy(z,0,0,S),this.ipad1=z,this.ipad2=C,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var C=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=C.run(D,C.ipad1),q=W,A=1;A<b;A++){q=C.run(q,C.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var C=a.length;C;){for(u=a,a=[];++p<C;)u&&u[p].run();p=-1,C=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,C){this.fun=S,this.array=C}function g(){}n.nextTick=function(S){var C=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)C[I-1]=arguments[I];a.push(new b(S,C)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var C=a.alloc(S-b.length);if(b=a.concat([C,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(C,I){var D=C.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(C,I,D){var z,P=I.length,B=C.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
275
|
+
\0`,ht+=d(rt,2),ht+=w.magic,ht+=d(M,2),ht+=d(k,2),ht+=d(K.crc32,4),ht+=d(K.compressedSize,4),ht+=d(K.uncompressedSize,4),ht+=d(_.length,2),ht+=d(L.length,2),{fileRecord:D.LOCAL_FILE_HEADER+ht+_+L,dirRecord:D.CENTRAL_FILE_HEADER+d(et,2)+ht+d(j.length,2)+"\0\0\0\0"+d(Z,4)+d(W,4)+_+L+j}}var g=h("../utils"),S=h("../stream/GenericWorker"),C=h("../utf8"),I=h("../crc32"),D=h("../signature");function z(P,B,F,W){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=F,this.encodeFileName=W,this.streamFiles=P,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}g.inherits(z,S),z.prototype.push=function(P){var B=P.meta.percent||0,F=this.entriesCount,W=this._sources.length;this.accumulate?this.contentBuffer.push(P):(this.bytesWritten+=P.data.length,S.prototype.push.call(this,{data:P.data,meta:{currentFile:this.currentFile,percent:F?(B+100*(F-W-1))/F:100}}))},z.prototype.openedSource=function(P){this.currentSourceOffset=this.bytesWritten,this.currentFile=P.file.name;var B=this.streamFiles&&!P.file.dir;if(B){var F=b(P,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:F.fileRecord,meta:{percent:0}})}else this.accumulate=!0},z.prototype.closedSource=function(P){this.accumulate=!1;var B=this.streamFiles&&!P.file.dir,F=b(P,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(F.dirRecord),B)this.push({data:(function(W){return D.DATA_DESCRIPTOR+d(W.crc32,4)+d(W.compressedSize,4)+d(W.uncompressedSize,4)})(P),meta:{percent:100}});else for(this.push({data:F.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},z.prototype.flush=function(){for(var P=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var F=this.bytesWritten-P,W=(function(q,A,M,k,y){var w=g.transformTo("string",y(k));return D.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(q,2)+d(q,2)+d(A,4)+d(M,4)+d(w.length,2)+w})(this.dirRecords.length,F,P,this.zipComment,this.encodeFileName);this.push({data:W,meta:{percent:100}})},z.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},z.prototype.registerPrevious=function(P){this._sources.push(P);var B=this;return P.on("data",(function(F){B.processChunk(F)})),P.on("end",(function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()})),P.on("error",(function(F){B.error(F)})),this},z.prototype.resume=function(){return!!S.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},z.prototype.error=function(P){var B=this._sources;if(!S.prototype.error.call(this,P))return!1;for(var F=0;F<B.length;F++)try{B[F].error(P)}catch{}return!0},z.prototype.lock=function(){S.prototype.lock.call(this);for(var P=this._sources,B=0;B<P.length;B++)P[B].lock()},p.exports=z},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,m){var d=h("../compressions"),b=h("./ZipFileWorker");m.generateWorker=function(g,S,C){var I=new b(S.streamFiles,C,S.platform,S.encodeFileName),D=0;try{g.forEach((function(z,P){D++;var B=(function(A,M){var k=A||M,y=d[k];if(!y)throw new Error(k+" is not a valid compression method !");return y})(P.options.compression,S.compression),F=P.options.compressionOptions||S.compressionOptions||{},W=P.dir,q=P.date;P._compressWorker(B,F).withStreamInfo("file",{name:z,dir:W,date:q,comment:P.comment||"",unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions}).pipe(I)})),I.entriesCount=D}catch(z){I.error(z)}return I}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,m){function d(){if(!(this instanceof d))return new d;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var b=new d;for(var g in this)typeof this[g]!="function"&&(b[g]=this[g]);return b}}(d.prototype=h("./object")).loadAsync=h("./load"),d.support=h("./support"),d.defaults=h("./defaults"),d.version="3.10.1",d.loadAsync=function(b,g){return new d().loadAsync(b,g)},d.external=h("./external"),p.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,m){var d=h("./utils"),b=h("./external"),g=h("./utf8"),S=h("./zipEntries"),C=h("./stream/Crc32Probe"),I=h("./nodejsUtils");function D(z){return new b.Promise((function(P,B){var F=z.decompressed.getContentWorker().pipe(new C);F.on("error",(function(W){B(W)})).on("end",(function(){F.streamInfo.crc32!==z.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):P()})).resume()}))}p.exports=function(z,P){var B=this;return P=d.extend(P||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:g.utf8decode}),I.isNode&&I.isStream(z)?b.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",z,!0,P.optimizedBinaryString,P.base64).then((function(F){var W=new S(P);return W.load(F),W})).then((function(F){var W=[b.Promise.resolve(F)],q=F.files;if(P.checkCRC32)for(var A=0;A<q.length;A++)W.push(D(q[A]));return b.Promise.all(W)})).then((function(F){for(var W=F.shift(),q=W.files,A=0;A<q.length;A++){var M=q[A],k=M.fileNameStr,y=d.resolve(M.fileNameStr);B.file(y,M.decompressed,{binary:!0,optimizedBinaryString:!0,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:P.createFolders}),M.dir||(B.file(y).unsafeOriginalName=k)}return W.zipComment.length&&(B.comment=W.zipComment),B}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,m){var d=h("../utils"),b=h("../stream/GenericWorker");function g(S,C){b.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(C)}d.inherits(g,b),g.prototype._bindStream=function(S){var C=this;(this._stream=S).pause(),S.on("data",(function(I){C.push({data:I,meta:{percent:0}})})).on("error",(function(I){C.isPaused?this.generatedError=I:C.error(I)})).on("end",(function(){C.isPaused?C._upstreamEnded=!0:C.end()}))},g.prototype.pause=function(){return!!b.prototype.pause.call(this)&&(this._stream.pause(),!0)},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=g},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,m){var d=h("readable-stream").Readable;function b(g,S,C){d.call(this,S),this._helper=g;var I=this;g.on("data",(function(D,z){I.push(D)||I._helper.pause(),C&&C(z)})).on("error",(function(D){I.emit("error",D)})).on("end",(function(){I.push(null)}))}h("../utils").inherits(b,d),b.prototype._read=function(){this._helper.resume()},p.exports=b},{"../utils":32,"readable-stream":16}],14:[function(h,p,m){p.exports={isNode:n!==void 0,newBufferFrom:function(d,b){if(n.from&&n.from!==Uint8Array.from)return n.from(d,b);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new n(d,b)},allocBuffer:function(d){if(n.alloc)return n.alloc(d);var b=new n(d);return b.fill(0),b},isBuffer:function(d){return n.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(h,p,m){function d(y,w,x){var _,T=g.getTypeOf(w),O=g.extend(x||{},I);O.date=O.date||new Date,O.compression!==null&&(O.compression=O.compression.toUpperCase()),typeof O.unixPermissions=="string"&&(O.unixPermissions=parseInt(O.unixPermissions,8)),O.unixPermissions&&16384&O.unixPermissions&&(O.dir=!0),O.dosPermissions&&16&O.dosPermissions&&(O.dir=!0),O.dir&&(y=q(y)),O.createFolders&&(_=W(y))&&A.call(this,_,!0);var j=T==="string"&&O.binary===!1&&O.base64===!1;x&&x.binary!==void 0||(O.binary=!j),(w instanceof D&&w.uncompressedSize===0||O.dir||!w||w.length===0)&&(O.base64=!1,O.binary=!0,w="",O.compression="STORE",T="string");var V;V=w instanceof D||w instanceof S?w:B.isNode&&B.isStream(w)?new F(y,w):g.prepareContent(y,w,O.binary,O.optimizedBinaryString,O.base64);var X=new z(y,V,O);this.files[y]=X}var b=h("./utf8"),g=h("./utils"),S=h("./stream/GenericWorker"),C=h("./stream/StreamHelper"),I=h("./defaults"),D=h("./compressedObject"),z=h("./zipObject"),P=h("./generate"),B=h("./nodejsUtils"),F=h("./nodejs/NodejsStreamInputAdapter"),W=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var w=y.lastIndexOf("/");return 0<w?y.substring(0,w):""},q=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},A=function(y,w){return w=w!==void 0?w:I.createFolders,y=q(y),this.files[y]||d.call(this,y,null,{dir:!0,createFolders:w}),this.files[y]};function M(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var k={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var w,x,_;for(w in this.files)_=this.files[w],(x=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&y(x,_)},filter:function(y){var w=[];return this.forEach((function(x,_){y(x,_)&&w.push(_)})),w},file:function(y,w,x){if(arguments.length!==1)return y=this.root+y,d.call(this,y,w,x),this;if(M(y)){var _=y;return this.filter((function(O,j){return!j.dir&&_.test(O)}))}var T=this.files[this.root+y];return T&&!T.dir?T:null},folder:function(y){if(!y)return this;if(M(y))return this.filter((function(T,O){return O.dir&&y.test(T)}));var w=this.root+y,x=A.call(this,w),_=this.clone();return _.root=x.name,_},remove:function(y){y=this.root+y;var w=this.files[y];if(w||(y.slice(-1)!=="/"&&(y+="/"),w=this.files[y]),w&&!w.dir)delete this.files[y];else for(var x=this.filter((function(T,O){return O.name.slice(0,y.length)===y})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(y){var w,x={};try{if((x=g.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:b.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";w=P.generateWorker(this,x,_)}catch(T){(w=new S("error")).error(T)}return new C(w,x.type||"string",x.mimeType)},generateAsync:function(y,w){return this.generateInternalStream(y).accumulate(w)},generateNodeStream:function(y,w){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(w)}};p.exports=k},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,m){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g);for(var S=0;S<this.data.length;S++)g[S]=255&g[S]}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data[this.zero+g]},b.prototype.lastIndexOfSignature=function(g){for(var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.length-4;0<=z;--z)if(this.data[z]===S&&this.data[z+1]===C&&this.data[z+2]===I&&this.data[z+3]===D)return z-this.zero;return-1},b.prototype.readAndCheckSignature=function(g){var S=g.charCodeAt(0),C=g.charCodeAt(1),I=g.charCodeAt(2),D=g.charCodeAt(3),z=this.readData(4);return S===z[0]&&C===z[1]&&I===z[2]&&D===z[3]},b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],18:[function(h,p,m){var d=h("../utils");function b(g){this.data=g,this.length=g.length,this.index=0,this.zero=0}b.prototype={checkOffset:function(g){this.checkIndex(this.index+g)},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g},skip:function(g){this.setIndex(this.index+g)},byteAt:function(){},readInt:function(g){var S,C=0;for(this.checkOffset(g),S=this.index+g-1;S>=this.index;S--)C=(C<<8)+this.byteAt(S);return this.index+=g,C},readString:function(g){return d.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},p.exports=b},{"../utils":32}],19:[function(h,p,m){var d=h("./Uint8ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,m){var d=h("./DataReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},b.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},b.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},b.prototype.readData=function(g){this.checkOffset(g);var S=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./DataReader":18}],21:[function(h,p,m){var d=h("./ArrayReader");function b(g){d.call(this,g)}h("../utils").inherits(b,d),b.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,S},p.exports=b},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,m){var d=h("../utils"),b=h("../support"),g=h("./ArrayReader"),S=h("./StringReader"),C=h("./NodeBufferReader"),I=h("./Uint8ArrayReader");p.exports=function(D){var z=d.getTypeOf(D);return d.checkSupport(z),z!=="string"||b.uint8array?z==="nodebuffer"?new C(D):b.uint8array?new I(d.transformTo("uint8array",D)):new g(d.transformTo("array",D)):new S(D)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,m){m.LOCAL_FILE_HEADER="PK",m.CENTRAL_FILE_HEADER="PK",m.CENTRAL_DIRECTORY_END="PK",m.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",m.ZIP64_CENTRAL_DIRECTORY_END="PK",m.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,m){var d=h("./GenericWorker"),b=h("../utils");function g(S){d.call(this,"ConvertWorker to "+S),this.destType=S}b.inherits(g,d),g.prototype.processChunk=function(S){this.push({data:b.transformTo(this.destType,S.data),meta:S.meta})},p.exports=g},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,m){var d=h("./GenericWorker"),b=h("../crc32");function g(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(g,d),g.prototype.processChunk=function(S){this.streamInfo.crc32=b(S.data,this.streamInfo.crc32||0),this.push(S)},p.exports=g},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}d.inherits(g,b),g.prototype.processChunk=function(S){if(S){var C=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=C+S.data.length}b.prototype.processChunk.call(this,S)},p.exports=g},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,m){var d=h("../utils"),b=h("./GenericWorker");function g(S){b.call(this,"DataWorker");var C=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,S.then((function(I){C.dataIsReady=!0,C.data=I,C.max=I&&I.length||0,C.type=d.getTypeOf(I),C.isPaused||C._tickAndRepeat()}),(function(I){C.error(I)}))}d.inherits(g,b),g.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this.data=null},g.prototype.resume=function(){return!!b.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,d.delay(this._tickAndRepeat,[],this)),!0)},g.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var S=null,C=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":S=this.data.substring(this.index,C);break;case"uint8array":S=this.data.subarray(this.index,C);break;case"array":case"nodebuffer":S=this.data.slice(this.index,C)}return this.index=C,this.push({data:S,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=g},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,m){function d(b){this.name=b||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}d.prototype={push:function(b){this.emit("data",b)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(b){this.emit("error",b)}return!0},error:function(b){return!this.isFinished&&(this.isPaused?this.generatedError=b:(this.isFinished=!0,this.emit("error",b),this.previous&&this.previous.error(b),this.cleanUp()),!0)},on:function(b,g){return this._listeners[b].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(b,g){if(this._listeners[b])for(var S=0;S<this._listeners[b].length;S++)this._listeners[b][S].call(this,g)},pipe:function(b){return b.registerPrevious(this)},registerPrevious:function(b){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=b.streamInfo,this.mergeStreamInfo(),this.previous=b;var g=this;return b.on("data",(function(S){g.processChunk(S)})),b.on("end",(function(){g.end()})),b.on("error",(function(S){g.error(S)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var b=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),b=!0),this.previous&&this.previous.resume(),!b},flush:function(){},processChunk:function(b){this.push(b)},withStreamInfo:function(b,g){return this.extraStreamInfo[b]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var b in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,b)&&(this.streamInfo[b]=this.extraStreamInfo[b])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var b="Worker "+this.name;return this.previous?this.previous+" -> "+b:b}},p.exports=d},{}],29:[function(h,p,m){var d=h("../utils"),b=h("./ConvertWorker"),g=h("./GenericWorker"),S=h("../base64"),C=h("../support"),I=h("../external"),D=null;if(C.nodestream)try{D=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function z(P,B,F){var W=B;switch(B){case"blob":case"arraybuffer":W="uint8array";break;case"base64":W="string"}try{this._internalType=W,this._outputType=B,this._mimeType=F,d.checkSupport(W),this._worker=P.pipe(new b(W)),P.lock()}catch(q){this._worker=new g("error"),this._worker.error(q)}}z.prototype={accumulate:function(P){return(function(B,F){return new I.Promise((function(W,q){var A=[],M=B._internalType,k=B._outputType,y=B._mimeType;B.on("data",(function(w,x){A.push(w),F&&F(x)})).on("error",(function(w){A=[],q(w)})).on("end",(function(){try{var w=(function(x,_,T){switch(x){case"blob":return d.newBlob(d.transformTo("arraybuffer",_),T);case"base64":return S.encode(_);default:return d.transformTo(x,_)}})(k,(function(x,_){var T,O=0,j=null,V=0;for(T=0;T<_.length;T++)V+=_[T].length;switch(x){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(j=new Uint8Array(V),T=0;T<_.length;T++)j.set(_[T],O),O+=_[T].length;return j;case"nodebuffer":return n.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,A),y);W(w)}catch(x){q(x)}A=[]})).resume()}))})(this,P)},on:function(P,B){var F=this;return P==="data"?this._worker.on(P,(function(W){B.call(F,W.data,W.meta)})):this._worker.on(P,(function(){d.delay(B,arguments,F)})),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new D(this,{objectMode:this._outputType!=="nodebuffer"},P)}},p.exports=z},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,m){if(m.base64=!0,m.array=!0,m.string=!0,m.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",m.nodebuffer=n!==void 0,m.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")m.blob=!1;else{var d=new ArrayBuffer(0);try{m.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);b.append(d),m.blob=b.getBlob("application/zip").size===0}catch{m.blob=!1}}}try{m.nodestream=!!h("readable-stream").Readable}catch{m.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,m){for(var d=h("./utils"),b=h("./support"),g=h("./nodejsUtils"),S=h("./stream/GenericWorker"),C=new Array(256),I=0;I<256;I++)C[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;function D(){S.call(this,"utf-8 decode"),this.leftOver=null}function z(){S.call(this,"utf-8 encode")}C[254]=C[254]=1,m.utf8encode=function(P){return b.nodebuffer?g.newBufferFrom(P,"utf-8"):(function(B){var F,W,q,A,M,k=B.length,y=0;for(A=0;A<k;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),y+=W<128?1:W<2048?2:W<65536?3:4;for(F=b.uint8array?new Uint8Array(y):new Array(y),A=M=0;M<y;A++)(64512&(W=B.charCodeAt(A)))==55296&&A+1<k&&(64512&(q=B.charCodeAt(A+1)))==56320&&(W=65536+(W-55296<<10)+(q-56320),A++),W<128?F[M++]=W:(W<2048?F[M++]=192|W>>>6:(W<65536?F[M++]=224|W>>>12:(F[M++]=240|W>>>18,F[M++]=128|W>>>12&63),F[M++]=128|W>>>6&63),F[M++]=128|63&W);return F})(P)},m.utf8decode=function(P){return b.nodebuffer?d.transformTo("nodebuffer",P).toString("utf-8"):(function(B){var F,W,q,A,M=B.length,k=new Array(2*M);for(F=W=0;F<M;)if((q=B[F++])<128)k[W++]=q;else if(4<(A=C[q]))k[W++]=65533,F+=A-1;else{for(q&=A===2?31:A===3?15:7;1<A&&F<M;)q=q<<6|63&B[F++],A--;1<A?k[W++]=65533:q<65536?k[W++]=q:(q-=65536,k[W++]=55296|q>>10&1023,k[W++]=56320|1023&q)}return k.length!==W&&(k.subarray?k=k.subarray(0,W):k.length=W),d.applyFromCharCode(k)})(P=d.transformTo(b.uint8array?"uint8array":"array",P))},d.inherits(D,S),D.prototype.processChunk=function(P){var B=d.transformTo(b.uint8array?"uint8array":"array",P.data);if(this.leftOver&&this.leftOver.length){if(b.uint8array){var F=B;(B=new Uint8Array(F.length+this.leftOver.length)).set(this.leftOver,0),B.set(F,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var W=(function(A,M){var k;for((M=M||A.length)>A.length&&(M=A.length),k=M-1;0<=k&&(192&A[k])==128;)k--;return k<0||k===0?M:k+C[A[k]]>M?k:M})(B),q=B;W!==B.length&&(b.uint8array?(q=B.subarray(0,W),this.leftOver=B.subarray(W,B.length)):(q=B.slice(0,W),this.leftOver=B.slice(W,B.length))),this.push({data:m.utf8decode(q),meta:P.meta})},D.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:m.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},m.Utf8DecodeWorker=D,d.inherits(z,S),z.prototype.processChunk=function(P){this.push({data:m.utf8encode(P.data),meta:P.meta})},m.Utf8EncodeWorker=z},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,m){var d=h("./support"),b=h("./base64"),g=h("./nodejsUtils"),S=h("./external");function C(F){return F}function I(F,W){for(var q=0;q<F.length;++q)W[q]=255&F.charCodeAt(q);return W}h("setimmediate"),m.newBlob=function(F,W){m.checkSupport("blob");try{return new Blob([F],{type:W})}catch{try{var q=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return q.append(F),q.getBlob(W)}catch{throw new Error("Bug : can't construct the Blob.")}}};var D={stringifyByChunk:function(F,W,q){var A=[],M=0,k=F.length;if(k<=q)return String.fromCharCode.apply(null,F);for(;M<k;)W==="array"||W==="nodebuffer"?A.push(String.fromCharCode.apply(null,F.slice(M,Math.min(M+q,k)))):A.push(String.fromCharCode.apply(null,F.subarray(M,Math.min(M+q,k)))),M+=q;return A.join("")},stringifyByChar:function(F){for(var W="",q=0;q<F.length;q++)W+=String.fromCharCode(F[q]);return W},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return!1}})()}};function z(F){var W=65536,q=m.getTypeOf(F),A=!0;if(q==="uint8array"?A=D.applyCanBeUsed.uint8array:q==="nodebuffer"&&(A=D.applyCanBeUsed.nodebuffer),A)for(;1<W;)try{return D.stringifyByChunk(F,q,W)}catch{W=Math.floor(W/2)}return D.stringifyByChar(F)}function P(F,W){for(var q=0;q<F.length;q++)W[q]=F[q];return W}m.applyFromCharCode=z;var B={};B.string={string:C,array:function(F){return I(F,new Array(F.length))},arraybuffer:function(F){return B.string.uint8array(F).buffer},uint8array:function(F){return I(F,new Uint8Array(F.length))},nodebuffer:function(F){return I(F,g.allocBuffer(F.length))}},B.array={string:z,array:C,arraybuffer:function(F){return new Uint8Array(F).buffer},uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(F)}},B.arraybuffer={string:function(F){return z(new Uint8Array(F))},array:function(F){return P(new Uint8Array(F),new Array(F.byteLength))},arraybuffer:C,uint8array:function(F){return new Uint8Array(F)},nodebuffer:function(F){return g.newBufferFrom(new Uint8Array(F))}},B.uint8array={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return F.buffer},uint8array:C,nodebuffer:function(F){return g.newBufferFrom(F)}},B.nodebuffer={string:z,array:function(F){return P(F,new Array(F.length))},arraybuffer:function(F){return B.nodebuffer.uint8array(F).buffer},uint8array:function(F){return P(F,new Uint8Array(F.length))},nodebuffer:C},m.transformTo=function(F,W){if(W=W||"",!F)return W;m.checkSupport(F);var q=m.getTypeOf(W);return B[q][F](W)},m.resolve=function(F){for(var W=F.split("/"),q=[],A=0;A<W.length;A++){var M=W[A];M==="."||M===""&&A!==0&&A!==W.length-1||(M===".."?q.pop():q.push(M))}return q.join("/")},m.getTypeOf=function(F){return typeof F=="string"?"string":Object.prototype.toString.call(F)==="[object Array]"?"array":d.nodebuffer&&g.isBuffer(F)?"nodebuffer":d.uint8array&&F instanceof Uint8Array?"uint8array":d.arraybuffer&&F instanceof ArrayBuffer?"arraybuffer":void 0},m.checkSupport=function(F){if(!d[F.toLowerCase()])throw new Error(F+" is not supported by this platform")},m.MAX_VALUE_16BITS=65535,m.MAX_VALUE_32BITS=-1,m.pretty=function(F){var W,q,A="";for(q=0;q<(F||"").length;q++)A+="\\x"+((W=F.charCodeAt(q))<16?"0":"")+W.toString(16).toUpperCase();return A},m.delay=function(F,W,q){a((function(){F.apply(q||null,W||[])}))},m.inherits=function(F,W){function q(){}q.prototype=W.prototype,F.prototype=new q},m.extend=function(){var F,W,q={};for(F=0;F<arguments.length;F++)for(W in arguments[F])Object.prototype.hasOwnProperty.call(arguments[F],W)&&q[W]===void 0&&(q[W]=arguments[F][W]);return q},m.prepareContent=function(F,W,q,A,M){return S.Promise.resolve(W).then((function(k){return d.blob&&(k instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(k))!==-1)&&typeof FileReader<"u"?new S.Promise((function(y,w){var x=new FileReader;x.onload=function(_){y(_.target.result)},x.onerror=function(_){w(_.target.error)},x.readAsArrayBuffer(k)})):k})).then((function(k){var y=m.getTypeOf(k);return y?(y==="arraybuffer"?k=m.transformTo("uint8array",k):y==="string"&&(M?k=b.decode(k):q&&A!==!0&&(k=(function(w){return I(w,d.uint8array?new Uint8Array(w.length):new Array(w.length))})(k))),k):S.Promise.reject(new Error("Can't read the data of '"+F+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./signature"),S=h("./zipEntry"),C=h("./support");function I(D){this.files=[],this.loadOptions=D}I.prototype={checkSignature:function(D){if(!this.reader.readAndCheckSignature(D)){this.reader.index-=4;var z=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+b.pretty(z)+", expected "+b.pretty(D)+")")}},isSignature:function(D,z){var P=this.reader.index;this.reader.setIndex(D);var B=this.reader.readString(4)===z;return this.reader.setIndex(P),B},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var D=this.reader.readData(this.zipCommentLength),z=C.uint8array?"uint8array":"array",P=b.transformTo(z,D);this.zipComment=this.loadOptions.decodeFileName(P)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var D,z,P,B=this.zip64EndOfCentralSize-44;0<B;)D=this.reader.readInt(2),z=this.reader.readInt(4),P=this.reader.readData(z),this.zip64ExtensibleData[D]={id:D,length:z,value:P}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var D,z;for(D=0;D<this.files.length;D++)z=this.files[D],this.reader.setIndex(z.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),z.readLocalPart(this.reader),z.handleUTF8(),z.processAttributes()},readCentralDir:function(){var D;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(D=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(D);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var D=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(D<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(D);var z=D;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===b.MAX_VALUE_16BITS||this.diskWithCentralDirStart===b.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===b.MAX_VALUE_16BITS||this.centralDirRecords===b.MAX_VALUE_16BITS||this.centralDirSize===b.MAX_VALUE_32BITS||this.centralDirOffset===b.MAX_VALUE_32BITS){if(this.zip64=!0,(D=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(D),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var P=this.centralDirOffset+this.centralDirSize;this.zip64&&(P+=20,P+=12+this.zip64EndOfCentralSize);var B=z-P;if(0<B)this.isSignature(z,g.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(D){this.reader=d(D)},load:function(D){this.prepareReader(D),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=I},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,m){var d=h("./reader/readerFor"),b=h("./utils"),g=h("./compressedObject"),S=h("./crc32"),C=h("./utf8"),I=h("./compressions"),D=h("./support");function z(P,B){this.options=P,this.loadOptions=B}z.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(P){var B,F;if(P.skip(22),this.fileNameLength=P.readInt(2),F=P.readInt(2),this.fileName=P.readData(this.fileNameLength),P.skip(F),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((B=(function(W){for(var q in I)if(Object.prototype.hasOwnProperty.call(I,q)&&I[q].magic===W)return I[q];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+b.pretty(this.compressionMethod)+" unknown (inner file : "+b.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,B,P.readData(this.compressedSize))},readCentralPart:function(P){this.versionMadeBy=P.readInt(2),P.skip(2),this.bitFlag=P.readInt(2),this.compressionMethod=P.readString(2),this.date=P.readDate(),this.crc32=P.readInt(4),this.compressedSize=P.readInt(4),this.uncompressedSize=P.readInt(4);var B=P.readInt(2);if(this.extraFieldsLength=P.readInt(2),this.fileCommentLength=P.readInt(2),this.diskNumberStart=P.readInt(2),this.internalFileAttributes=P.readInt(2),this.externalFileAttributes=P.readInt(4),this.localHeaderOffset=P.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");P.skip(B),this.readExtraFields(P),this.parseZIP64ExtraField(P),this.fileComment=P.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var P=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),P==0&&(this.dosPermissions=63&this.externalFileAttributes),P==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var P=d(this.extraFields[1].value);this.uncompressedSize===b.MAX_VALUE_32BITS&&(this.uncompressedSize=P.readInt(8)),this.compressedSize===b.MAX_VALUE_32BITS&&(this.compressedSize=P.readInt(8)),this.localHeaderOffset===b.MAX_VALUE_32BITS&&(this.localHeaderOffset=P.readInt(8)),this.diskNumberStart===b.MAX_VALUE_32BITS&&(this.diskNumberStart=P.readInt(4))}},readExtraFields:function(P){var B,F,W,q=P.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});P.index+4<q;)B=P.readInt(2),F=P.readInt(2),W=P.readData(F),this.extraFields[B]={id:B,length:F,value:W};P.setIndex(q)},handleUTF8:function(){var P=D.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=C.utf8decode(this.fileName),this.fileCommentStr=C.utf8decode(this.fileComment);else{var B=this.findExtraFieldUnicodePath();if(B!==null)this.fileNameStr=B;else{var F=b.transformTo(P,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(F)}var W=this.findExtraFieldUnicodeComment();if(W!==null)this.fileCommentStr=W;else{var q=b.transformTo(P,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(q)}}},findExtraFieldUnicodePath:function(){var P=this.extraFields[28789];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null},findExtraFieldUnicodeComment:function(){var P=this.extraFields[25461];if(P){var B=d(P.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:C.utf8decode(B.readData(P.length-5))}return null}},p.exports=z},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,m){function d(B,F,W){this.name=B,this.dir=W.dir,this.date=W.date,this.comment=W.comment,this.unixPermissions=W.unixPermissions,this.dosPermissions=W.dosPermissions,this._data=F,this._dataBinary=W.binary,this.options={compression:W.compression,compressionOptions:W.compressionOptions}}var b=h("./stream/StreamHelper"),g=h("./stream/DataWorker"),S=h("./utf8"),C=h("./compressedObject"),I=h("./stream/GenericWorker");d.prototype={internalStream:function(B){var F=null,W="string";try{if(!B)throw new Error("No output type specified.");var q=(W=B.toLowerCase())==="string"||W==="text";W!=="binarystring"&&W!=="text"||(W="string"),F=this._decompressWorker();var A=!this._dataBinary;A&&!q&&(F=F.pipe(new S.Utf8EncodeWorker)),!A&&q&&(F=F.pipe(new S.Utf8DecodeWorker))}catch(M){(F=new I("error")).error(M)}return new b(F,W,"")},async:function(B,F){return this.internalStream(B).accumulate(F)},nodeStream:function(B,F){return this.internalStream(B||"nodebuffer").toNodejsStream(F)},_compressWorker:function(B,F){if(this._data instanceof C&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var W=this._decompressWorker();return this._dataBinary||(W=W.pipe(new S.Utf8EncodeWorker)),C.createWorkerFrom(W,B,F)},_decompressWorker:function(){return this._data instanceof C?this._data.getContentWorker():this._data instanceof I?this._data:new g(this._data)}};for(var D=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],z=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},P=0;P<D.length;P++)d.prototype[D[P]]=z;p.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,m){(function(d){var b,g,S=d.MutationObserver||d.WebKitMutationObserver;if(S){var C=0,I=new S(B),D=d.document.createTextNode("");I.observe(D,{characterData:!0}),b=function(){D.data=C=++C%2}}else if(d.setImmediate||d.MessageChannel===void 0)b="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var F=d.document.createElement("script");F.onreadystatechange=function(){B(),F.onreadystatechange=null,F.parentNode.removeChild(F),F=null},d.document.documentElement.appendChild(F)}:function(){setTimeout(B,0)};else{var z=new d.MessageChannel;z.port1.onmessage=B,b=function(){z.port2.postMessage(0)}}var P=[];function B(){var F,W;g=!0;for(var q=P.length;q;){for(W=P,P=[],F=-1;++F<q;)W[F]();q=P.length}g=!1}p.exports=function(F){P.push(F)!==1||g||b()}}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,m){var d=h("immediate");function b(){}var g={},S=["REJECTED"],C=["FULFILLED"],I=["PENDING"];function D(q){if(typeof q!="function")throw new TypeError("resolver must be a function");this.state=I,this.queue=[],this.outcome=void 0,q!==b&&F(this,q)}function z(q,A,M){this.promise=q,typeof A=="function"&&(this.onFulfilled=A,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected)}function P(q,A,M){d((function(){var k;try{k=A(M)}catch(y){return g.reject(q,y)}k===q?g.reject(q,new TypeError("Cannot resolve promise with itself")):g.resolve(q,k)}))}function B(q){var A=q&&q.then;if(q&&(typeof q=="object"||typeof q=="function")&&typeof A=="function")return function(){A.apply(q,arguments)}}function F(q,A){var M=!1;function k(x){M||(M=!0,g.reject(q,x))}function y(x){M||(M=!0,g.resolve(q,x))}var w=W((function(){A(y,k)}));w.status==="error"&&k(w.value)}function W(q,A){var M={};try{M.value=q(A),M.status="success"}catch(k){M.status="error",M.value=k}return M}(p.exports=D).prototype.finally=function(q){if(typeof q!="function")return this;var A=this.constructor;return this.then((function(M){return A.resolve(q()).then((function(){return M}))}),(function(M){return A.resolve(q()).then((function(){throw M}))}))},D.prototype.catch=function(q){return this.then(null,q)},D.prototype.then=function(q,A){if(typeof q!="function"&&this.state===C||typeof A!="function"&&this.state===S)return this;var M=new this.constructor(b);return this.state!==I?P(M,this.state===C?q:A,this.outcome):this.queue.push(new z(M,q,A)),M},z.prototype.callFulfilled=function(q){g.resolve(this.promise,q)},z.prototype.otherCallFulfilled=function(q){P(this.promise,this.onFulfilled,q)},z.prototype.callRejected=function(q){g.reject(this.promise,q)},z.prototype.otherCallRejected=function(q){P(this.promise,this.onRejected,q)},g.resolve=function(q,A){var M=W(B,A);if(M.status==="error")return g.reject(q,M.value);var k=M.value;if(k)F(q,k);else{q.state=C,q.outcome=A;for(var y=-1,w=q.queue.length;++y<w;)q.queue[y].callFulfilled(A)}return q},g.reject=function(q,A){q.state=S,q.outcome=A;for(var M=-1,k=q.queue.length;++M<k;)q.queue[M].callRejected(A);return q},D.resolve=function(q){return q instanceof this?q:g.resolve(new this(b),q)},D.reject=function(q){var A=new this(b);return g.reject(A,q)},D.all=function(q){var A=this;if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=q.length,k=!1;if(!M)return this.resolve([]);for(var y=new Array(M),w=0,x=-1,_=new this(b);++x<M;)T(q[x],x);return _;function T(O,j){A.resolve(O).then((function(V){y[j]=V,++w!==M||k||(k=!0,g.resolve(_,y))}),(function(V){k||(k=!0,g.reject(_,V))}))}},D.race=function(q){if(Object.prototype.toString.call(q)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=q.length,M=!1;if(!A)return this.resolve([]);for(var k,y=-1,w=new this(b);++y<A;)k=q[y],this.resolve(k).then((function(x){M||(M=!0,g.resolve(w,x))}),(function(x){M||(M=!0,g.reject(w,x))}));return w}},{immediate:36}],38:[function(h,p,m){var d={};(0,h("./lib/utils/common").assign)(d,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,m){var d=h("./zlib/deflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/messages"),C=h("./zlib/zstream"),I=Object.prototype.toString;function D(P){if(!(this instanceof D))return new D(P);this.options=b.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var B=this.options;B.raw&&0<B.windowBits?B.windowBits=-B.windowBits:B.gzip&&0<B.windowBits&&B.windowBits<16&&(B.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var F=d.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(F!==0)throw new Error(S[F]);if(B.header&&d.deflateSetHeader(this.strm,B.header),B.dictionary){var W;if(W=typeof B.dictionary=="string"?g.string2buf(B.dictionary):I.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(F=d.deflateSetDictionary(this.strm,W))!==0)throw new Error(S[F]);this._dict_set=!0}}function z(P,B){var F=new D(B);if(F.push(P,!0),F.err)throw F.msg||S[F.err];return F.result}D.prototype.push=function(P,B){var F,W,q=this.strm,A=this.options.chunkSize;if(this.ended)return!1;W=B===~~B?B:B===!0?4:0,typeof P=="string"?q.input=g.string2buf(P):I.call(P)==="[object ArrayBuffer]"?q.input=new Uint8Array(P):q.input=P,q.next_in=0,q.avail_in=q.input.length;do{if(q.avail_out===0&&(q.output=new b.Buf8(A),q.next_out=0,q.avail_out=A),(F=d.deflate(q,W))!==1&&F!==0)return this.onEnd(F),!(this.ended=!0);q.avail_out!==0&&(q.avail_in!==0||W!==4&&W!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(b.shrinkBuf(q.output,q.next_out))):this.onData(b.shrinkBuf(q.output,q.next_out)))}while((0<q.avail_in||q.avail_out===0)&&F!==1);return W===4?(F=d.deflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===0):W!==2||(this.onEnd(0),!(q.avail_out=0))},D.prototype.onData=function(P){this.chunks.push(P)},D.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},m.Deflate=D,m.deflate=z,m.deflateRaw=function(P,B){return(B=B||{}).raw=!0,z(P,B)},m.gzip=function(P,B){return(B=B||{}).gzip=!0,z(P,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,m){var d=h("./zlib/inflate"),b=h("./utils/common"),g=h("./utils/strings"),S=h("./zlib/constants"),C=h("./zlib/messages"),I=h("./zlib/zstream"),D=h("./zlib/gzheader"),z=Object.prototype.toString;function P(F){if(!(this instanceof P))return new P(F);this.options=b.assign({chunkSize:16384,windowBits:0,to:""},F||{});var W=this.options;W.raw&&0<=W.windowBits&&W.windowBits<16&&(W.windowBits=-W.windowBits,W.windowBits===0&&(W.windowBits=-15)),!(0<=W.windowBits&&W.windowBits<16)||F&&F.windowBits||(W.windowBits+=32),15<W.windowBits&&W.windowBits<48&&(15&W.windowBits)==0&&(W.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new I,this.strm.avail_out=0;var q=d.inflateInit2(this.strm,W.windowBits);if(q!==S.Z_OK)throw new Error(C[q]);this.header=new D,d.inflateGetHeader(this.strm,this.header)}function B(F,W){var q=new P(W);if(q.push(F,!0),q.err)throw q.msg||C[q.err];return q.result}P.prototype.push=function(F,W){var q,A,M,k,y,w,x=this.strm,_=this.options.chunkSize,T=this.options.dictionary,O=!1;if(this.ended)return!1;A=W===~~W?W:W===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof F=="string"?x.input=g.binstring2buf(F):z.call(F)==="[object ArrayBuffer]"?x.input=new Uint8Array(F):x.input=F,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new b.Buf8(_),x.next_out=0,x.avail_out=_),(q=d.inflate(x,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&T&&(w=typeof T=="string"?g.string2buf(T):z.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,q=d.inflateSetDictionary(this.strm,w)),q===S.Z_BUF_ERROR&&O===!0&&(q=S.Z_OK,O=!1),q!==S.Z_STREAM_END&&q!==S.Z_OK)return this.onEnd(q),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&q!==S.Z_STREAM_END&&(x.avail_in!==0||A!==S.Z_FINISH&&A!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),k=x.next_out-M,y=g.buf2string(x.output,M),x.next_out=k,x.avail_out=_-k,k&&b.arraySet(x.output,x.output,M,k,0),this.onData(y)):this.onData(b.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(O=!0)}while((0<x.avail_in||x.avail_out===0)&&q!==S.Z_STREAM_END);return q===S.Z_STREAM_END&&(A=S.Z_FINISH),A===S.Z_FINISH?(q=d.inflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===S.Z_OK):A!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(x.avail_out=0))},P.prototype.onData=function(F){this.chunks.push(F)},P.prototype.onEnd=function(F){F===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=b.flattenChunks(this.chunks)),this.chunks=[],this.err=F,this.msg=this.strm.msg},m.Inflate=P,m.inflate=B,m.inflateRaw=function(F,W){return(W=W||{}).raw=!0,B(F,W)},m.ungzip=B},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,m){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";m.assign=function(S){for(var C=Array.prototype.slice.call(arguments,1);C.length;){var I=C.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(var D in I)I.hasOwnProperty(D)&&(S[D]=I[D])}}return S},m.shrinkBuf=function(S,C){return S.length===C?S:S.subarray?S.subarray(0,C):(S.length=C,S)};var b={arraySet:function(S,C,I,D,z){if(C.subarray&&S.subarray)S.set(C.subarray(I,I+D),z);else for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){var C,I,D,z,P,B;for(C=D=0,I=S.length;C<I;C++)D+=S[C].length;for(B=new Uint8Array(D),C=z=0,I=S.length;C<I;C++)P=S[C],B.set(P,z),z+=P.length;return B}},g={arraySet:function(S,C,I,D,z){for(var P=0;P<D;P++)S[z+P]=C[I+P]},flattenChunks:function(S){return[].concat.apply([],S)}};m.setTyped=function(S){S?(m.Buf8=Uint8Array,m.Buf16=Uint16Array,m.Buf32=Int32Array,m.assign(m,b)):(m.Buf8=Array,m.Buf16=Array,m.Buf32=Array,m.assign(m,g))},m.setTyped(d)},{}],42:[function(h,p,m){var d=h("./common"),b=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch{b=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{g=!1}for(var S=new d.Buf8(256),C=0;C<256;C++)S[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;function I(D,z){if(z<65537&&(D.subarray&&g||!D.subarray&&b))return String.fromCharCode.apply(null,d.shrinkBuf(D,z));for(var P="",B=0;B<z;B++)P+=String.fromCharCode(D[B]);return P}S[254]=S[254]=1,m.string2buf=function(D){var z,P,B,F,W,q=D.length,A=0;for(F=0;F<q;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),A+=P<128?1:P<2048?2:P<65536?3:4;for(z=new d.Buf8(A),F=W=0;W<A;F++)(64512&(P=D.charCodeAt(F)))==55296&&F+1<q&&(64512&(B=D.charCodeAt(F+1)))==56320&&(P=65536+(P-55296<<10)+(B-56320),F++),P<128?z[W++]=P:(P<2048?z[W++]=192|P>>>6:(P<65536?z[W++]=224|P>>>12:(z[W++]=240|P>>>18,z[W++]=128|P>>>12&63),z[W++]=128|P>>>6&63),z[W++]=128|63&P);return z},m.buf2binstring=function(D){return I(D,D.length)},m.binstring2buf=function(D){for(var z=new d.Buf8(D.length),P=0,B=z.length;P<B;P++)z[P]=D.charCodeAt(P);return z},m.buf2string=function(D,z){var P,B,F,W,q=z||D.length,A=new Array(2*q);for(P=B=0;P<q;)if((F=D[P++])<128)A[B++]=F;else if(4<(W=S[F]))A[B++]=65533,P+=W-1;else{for(F&=W===2?31:W===3?15:7;1<W&&P<q;)F=F<<6|63&D[P++],W--;1<W?A[B++]=65533:F<65536?A[B++]=F:(F-=65536,A[B++]=55296|F>>10&1023,A[B++]=56320|1023&F)}return I(A,B)},m.utf8border=function(D,z){var P;for((z=z||D.length)>D.length&&(z=D.length),P=z-1;0<=P&&(192&D[P])==128;)P--;return P<0||P===0?z:P+S[D[P]]>z?P:z}},{"./common":41}],43:[function(h,p,m){p.exports=function(d,b,g,S){for(var C=65535&d|0,I=d>>>16&65535|0,D=0;g!==0;){for(g-=D=2e3<g?2e3:g;I=I+(C=C+b[S++]|0)|0,--D;);C%=65521,I%=65521}return C|I<<16|0}},{}],44:[function(h,p,m){p.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(h,p,m){var d=(function(){for(var b,g=[],S=0;S<256;S++){b=S;for(var C=0;C<8;C++)b=1&b?3988292384^b>>>1:b>>>1;g[S]=b}return g})();p.exports=function(b,g,S,C){var I=d,D=C+S;b^=-1;for(var z=C;z<D;z++)b=b>>>8^I[255&(b^g[z])];return-1^b}},{}],46:[function(h,p,m){var d,b=h("../utils/common"),g=h("./trees"),S=h("./adler32"),C=h("./crc32"),I=h("./messages"),D=-2,z=258,P=262,B=113;function F(L,G){return L.msg=I[G],G}function W(L){return(L<<1)-(4<L?9:0)}function q(L){for(var G=L.length;0<=--G;)L[G]=0}function A(L){var G=L.state,N=G.pending;N>L.avail_out&&(N=L.avail_out),N!==0&&(b.arraySet(L.output,G.pending_buf,G.pending_out,N,L.next_out),L.next_out+=N,G.pending_out+=N,L.total_out+=N,L.avail_out-=N,G.pending-=N,G.pending===0&&(G.pending_out=0))}function M(L,G){g._tr_flush_block(L,0<=L.block_start?L.block_start:-1,L.strstart-L.block_start,G),L.block_start=L.strstart,A(L.strm)}function k(L,G){L.pending_buf[L.pending++]=G}function y(L,G){L.pending_buf[L.pending++]=G>>>8&255,L.pending_buf[L.pending++]=255&G}function w(L,G){var N,R,U=L.max_chain_length,K=L.strstart,rt=L.prev_length,Z=L.nice_match,et=L.strstart>L.w_size-P?L.strstart-(L.w_size-P):0,ht=L.window,lt=L.w_mask,Q=L.prev,ot=L.strstart+z,nt=ht[K+rt-1],ut=ht[K+rt];L.prev_length>=L.good_match&&(U>>=2),Z>L.lookahead&&(Z=L.lookahead);do if(ht[(N=G)+rt]===ut&&ht[N+rt-1]===nt&&ht[N]===ht[K]&&ht[++N]===ht[K+1]){K+=2,N++;do;while(ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&ht[++K]===ht[++N]&&K<ot);if(R=z-(ot-K),K=ot-z,rt<R){if(L.match_start=G,Z<=(rt=R))break;nt=ht[K+rt-1],ut=ht[K+rt]}}while((G=Q[G<])>et&&--U!=0);return rt<=L.lookahead?rt:L.lookahead}function x(L){var G,N,R,U,K,rt,Z,et,ht,lt,Q=L.w_size;do{if(U=L.window_size-L.lookahead-L.strstart,L.strstart>=Q+(Q-P)){for(b.arraySet(L.window,L.window,Q,Q,0),L.match_start-=Q,L.strstart-=Q,L.block_start-=Q,G=N=L.hash_size;R=L.head[--G],L.head[G]=Q<=R?R-Q:0,--N;);for(G=N=Q;R=L.prev[--G],L.prev[G]=Q<=R?R-Q:0,--N;);U+=Q}if(L.strm.avail_in===0)break;if(rt=L.strm,Z=L.window,et=L.strstart+L.lookahead,lt=void 0,(ht=U)<(lt=rt.avail_in)&&(lt=ht),N=lt===0?0:(rt.avail_in-=lt,b.arraySet(Z,rt.input,rt.next_in,lt,et),rt.state.wrap===1?rt.adler=S(rt.adler,Z,lt,et):rt.state.wrap===2&&(rt.adler=C(rt.adler,Z,lt,et)),rt.next_in+=lt,rt.total_in+=lt,lt),L.lookahead+=N,L.lookahead+L.insert>=3)for(K=L.strstart-L.insert,L.ins_h=L.window[K],L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+1])&L.hash_mask;L.insert&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[K+3-1])&L.hash_mask,L.prev[K&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=K,K++,L.insert--,!(L.lookahead+L.insert<3)););}while(L.lookahead<P&&L.strm.avail_in!==0)}function _(L,G){for(var N,R;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),N!==0&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N)),L.match_length>=3)if(R=g._tr_tally(L,L.strstart-L.match_start,L.match_length-3),L.lookahead-=L.match_length,L.match_length<=L.max_lazy_match&&L.lookahead>=3){for(L.match_length--;L.strstart++,L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart,--L.match_length!=0;);L.strstart++}else L.strstart+=L.match_length,L.match_length=0,L.ins_h=L.window[L.strstart],L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+1])&L.hash_mask;else R=g._tr_tally(L,0,L.window[L.strstart]),L.lookahead--,L.strstart++;if(R&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function T(L,G){for(var N,R,U;;){if(L.lookahead<P){if(x(L),L.lookahead<P&&G===0)return 1;if(L.lookahead===0)break}if(N=0,L.lookahead>=3&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),L.prev_length=L.match_length,L.prev_match=L.match_start,L.match_length=2,N!==0&&L.prev_length<L.max_lazy_match&&L.strstart-N<=L.w_size-P&&(L.match_length=w(L,N),L.match_length<=5&&(L.strategy===1||L.match_length===3&&4096<L.strstart-L.match_start)&&(L.match_length=2)),L.prev_length>=3&&L.match_length<=L.prev_length){for(U=L.strstart+L.lookahead-3,R=g._tr_tally(L,L.strstart-1-L.prev_match,L.prev_length-3),L.lookahead-=L.prev_length-1,L.prev_length-=2;++L.strstart<=U&&(L.ins_h=(L.ins_h<<L.hash_shift^L.window[L.strstart+3-1])&L.hash_mask,N=L.prev[L.strstart&L.w_mask]=L.head[L.ins_h],L.head[L.ins_h]=L.strstart),--L.prev_length!=0;);if(L.match_available=0,L.match_length=2,L.strstart++,R&&(M(L,!1),L.strm.avail_out===0))return 1}else if(L.match_available){if((R=g._tr_tally(L,0,L.window[L.strstart-1]))&&M(L,!1),L.strstart++,L.lookahead--,L.strm.avail_out===0)return 1}else L.match_available=1,L.strstart++,L.lookahead--}return L.match_available&&(R=g._tr_tally(L,0,L.window[L.strstart-1]),L.match_available=0),L.insert=L.strstart<2?L.strstart:2,G===4?(M(L,!0),L.strm.avail_out===0?3:4):L.last_lit&&(M(L,!1),L.strm.avail_out===0)?1:2}function O(L,G,N,R,U){this.good_length=L,this.max_lazy=G,this.nice_length=N,this.max_chain=R,this.func=U}function j(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new b.Buf16(1146),this.dyn_dtree=new b.Buf16(122),this.bl_tree=new b.Buf16(78),q(this.dyn_ltree),q(this.dyn_dtree),q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new b.Buf16(16),this.heap=new b.Buf16(573),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new b.Buf16(573),q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function V(L){var G;return L&&L.state?(L.total_in=L.total_out=0,L.data_type=2,(G=L.state).pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?42:B,L.adler=G.wrap===2?0:1,G.last_flush=0,g._tr_init(G),0):F(L,D)}function X(L){var G=V(L);return G===0&&(function(N){N.window_size=2*N.w_size,q(N.head),N.max_lazy_match=d[N.level].max_lazy,N.good_match=d[N.level].good_length,N.nice_match=d[N.level].nice_length,N.max_chain_length=d[N.level].max_chain,N.strstart=0,N.block_start=0,N.lookahead=0,N.insert=0,N.match_length=N.prev_length=2,N.match_available=0,N.ins_h=0})(L.state),G}function J(L,G,N,R,U,K){if(!L)return D;var rt=1;if(G===-1&&(G=6),R<0?(rt=0,R=-R):15<R&&(rt=2,R-=16),U<1||9<U||N!==8||R<8||15<R||G<0||9<G||K<0||4<K)return F(L,D);R===8&&(R=9);var Z=new j;return(L.state=Z).strm=L,Z.wrap=rt,Z.gzhead=null,Z.w_bits=R,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=U+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+3-1)/3),Z.window=new b.Buf8(2*Z.w_size),Z.head=new b.Buf16(Z.hash_size),Z.prev=new b.Buf16(Z.w_size),Z.lit_bufsize=1<<U+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new b.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=G,Z.strategy=K,Z.method=N,X(L)}d=[new O(0,0,0,0,(function(L,G){var N=65535;for(N>L.pending_buf_size-5&&(N=L.pending_buf_size-5);;){if(L.lookahead<=1){if(x(L),L.lookahead===0&&G===0)return 1;if(L.lookahead===0)break}L.strstart+=L.lookahead,L.lookahead=0;var R=L.block_start+N;if((L.strstart===0||L.strstart>=R)&&(L.lookahead=L.strstart-R,L.strstart=R,M(L,!1),L.strm.avail_out===0)||L.strstart-L.block_start>=L.w_size-P&&(M(L,!1),L.strm.avail_out===0))return 1}return L.insert=0,G===4?(M(L,!0),L.strm.avail_out===0?3:4):(L.strstart>L.block_start&&(M(L,!1),L.strm.avail_out),1)})),new O(4,4,8,4,_),new O(4,5,16,8,_),new O(4,6,32,32,_),new O(4,4,16,16,T),new O(8,16,32,32,T),new O(8,16,128,128,T),new O(8,32,128,256,T),new O(32,128,258,1024,T),new O(32,258,258,4096,T)],m.deflateInit=function(L,G){return J(L,G,8,15,8,0)},m.deflateInit2=J,m.deflateReset=X,m.deflateResetKeep=V,m.deflateSetHeader=function(L,G){return L&&L.state?L.state.wrap!==2?D:(L.state.gzhead=G,0):D},m.deflate=function(L,G){var N,R,U,K;if(!L||!L.state||5<G||G<0)return L?F(L,D):D;if(R=L.state,!L.output||!L.input&&L.avail_in!==0||R.status===666&&G!==4)return F(L,L.avail_out===0?-5:D);if(R.strm=L,N=R.last_flush,R.last_flush=G,R.status===42)if(R.wrap===2)L.adler=0,k(R,31),k(R,139),k(R,8),R.gzhead?(k(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),k(R,255&R.gzhead.time),k(R,R.gzhead.time>>8&255),k(R,R.gzhead.time>>16&255),k(R,R.gzhead.time>>24&255),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(k(R,255&R.gzhead.extra.length),k(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(L.adler=C(L.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(k(R,0),k(R,0),k(R,0),k(R,0),k(R,0),k(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),k(R,3),R.status=B);else{var rt=8+(R.w_bits-8<<4)<<8;rt|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(rt|=32),rt+=31-rt%31,R.status=B,y(R,rt),R.strstart!==0&&(y(R,L.adler>>>16),y(R,65535&L.adler)),L.adler=1}if(R.status===69)if(R.gzhead.extra){for(U=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending!==R.pending_buf_size));)k(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.name.length?255&R.gzhead.name.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){U=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),A(L),U=R.pending,R.pending===R.pending_buf_size)){K=1;break}K=R.gzindex<R.gzhead.comment.length?255&R.gzhead.comment.charCodeAt(R.gzindex++):0,k(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>U&&(L.adler=C(L.adler,R.pending_buf,R.pending-U,U)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&A(L),R.pending+2<=R.pending_buf_size&&(k(R,255&L.adler),k(R,L.adler>>8&255),L.adler=0,R.status=B)):R.status=B),R.pending!==0){if(A(L),L.avail_out===0)return R.last_flush=-1,0}else if(L.avail_in===0&&W(G)<=W(N)&&G!==4)return F(L,-5);if(R.status===666&&L.avail_in!==0)return F(L,-5);if(L.avail_in!==0||R.lookahead!==0||G!==0&&R.status!==666){var Z=R.strategy===2?(function(et,ht){for(var lt;;){if(et.lookahead===0&&(x(et),et.lookahead===0)){if(ht===0)return 1;break}if(et.match_length=0,lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++,lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):R.strategy===3?(function(et,ht){for(var lt,Q,ot,nt,ut=et.window;;){if(et.lookahead<=z){if(x(et),et.lookahead<=z&&ht===0)return 1;if(et.lookahead===0)break}if(et.match_length=0,et.lookahead>=3&&0<et.strstart&&(Q=ut[ot=et.strstart-1])===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]){nt=et.strstart+z;do;while(Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&Q===ut[++ot]&&ot<nt);et.match_length=z-(nt-ot),et.match_length>et.lookahead&&(et.match_length=et.lookahead)}if(et.match_length>=3?(lt=g._tr_tally(et,1,et.match_length-3),et.lookahead-=et.match_length,et.strstart+=et.match_length,et.match_length=0):(lt=g._tr_tally(et,0,et.window[et.strstart]),et.lookahead--,et.strstart++),lt&&(M(et,!1),et.strm.avail_out===0))return 1}return et.insert=0,ht===4?(M(et,!0),et.strm.avail_out===0?3:4):et.last_lit&&(M(et,!1),et.strm.avail_out===0)?1:2})(R,G):d[R.level].func(R,G);if(Z!==3&&Z!==4||(R.status=666),Z===1||Z===3)return L.avail_out===0&&(R.last_flush=-1),0;if(Z===2&&(G===1?g._tr_align(R):G!==5&&(g._tr_stored_block(R,0,0,!1),G===3&&(q(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),A(L),L.avail_out===0))return R.last_flush=-1,0}return G!==4?0:R.wrap<=0?1:(R.wrap===2?(k(R,255&L.adler),k(R,L.adler>>8&255),k(R,L.adler>>16&255),k(R,L.adler>>24&255),k(R,255&L.total_in),k(R,L.total_in>>8&255),k(R,L.total_in>>16&255),k(R,L.total_in>>24&255)):(y(R,L.adler>>>16),y(R,65535&L.adler)),A(L),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},m.deflateEnd=function(L){var G;return L&&L.state?(G=L.state.status)!==42&&G!==69&&G!==73&&G!==91&&G!==103&&G!==B&&G!==666?F(L,D):(L.state=null,G===B?F(L,-3):0):D},m.deflateSetDictionary=function(L,G){var N,R,U,K,rt,Z,et,ht,lt=G.length;if(!L||!L.state||(K=(N=L.state).wrap)===2||K===1&&N.status!==42||N.lookahead)return D;for(K===1&&(L.adler=S(L.adler,G,lt,0)),N.wrap=0,lt>=N.w_size&&(K===0&&(q(N.head),N.strstart=0,N.block_start=0,N.insert=0),ht=new b.Buf8(N.w_size),b.arraySet(ht,G,lt-N.w_size,N.w_size,0),G=ht,lt=N.w_size),rt=L.avail_in,Z=L.next_in,et=L.input,L.avail_in=lt,L.next_in=0,L.input=G,x(N);N.lookahead>=3;){for(R=N.strstart,U=N.lookahead-2;N.ins_h=(N.ins_h<<N.hash_shift^N.window[R+3-1])&N.hash_mask,N.prev[R&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=R,R++,--U;);N.strstart=R,N.lookahead=2,x(N)}return N.strstart+=N.lookahead,N.block_start=N.strstart,N.insert=N.lookahead,N.lookahead=0,N.match_length=N.prev_length=2,N.match_available=0,L.next_in=Z,L.input=et,L.avail_in=rt,N.wrap=K,0},m.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,m){p.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(h,p,m){p.exports=function(d,b){var g,S,C,I,D,z,P,B,F,W,q,A,M,k,y,w,x,_,T,O,j,V,X,J,L;g=d.state,S=d.next_in,J=d.input,C=S+(d.avail_in-5),I=d.next_out,L=d.output,D=I-(b-d.avail_out),z=I+(d.avail_out-257),P=g.dmax,B=g.wsize,F=g.whave,W=g.wnext,q=g.window,A=g.hold,M=g.bits,k=g.lencode,y=g.distcode,w=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;t:do{M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=k[A&w];e:for(;;){if(A>>>=T=_>>>24,M-=T,(T=_>>>16&255)==0)L[I++]=65535&_;else{if(!(16&T)){if((64&T)==0){_=k[(65535&_)+(A&(1<<T)-1)];continue e}if(32&T){g.mode=12;break t}d.msg="invalid literal/length code",g.mode=30;break t}O=65535&_,(T&=15)&&(M<T&&(A+=J[S++]<<M,M+=8),O+=A&(1<<T)-1,A>>>=T,M-=T),M<15&&(A+=J[S++]<<M,M+=8,A+=J[S++]<<M,M+=8),_=y[A&x];r:for(;;){if(A>>>=T=_>>>24,M-=T,!(16&(T=_>>>16&255))){if((64&T)==0){_=y[(65535&_)+(A&(1<<T)-1)];continue r}d.msg="invalid distance code",g.mode=30;break t}if(j=65535&_,M<(T&=15)&&(A+=J[S++]<<M,(M+=8)<T&&(A+=J[S++]<<M,M+=8)),P<(j+=A&(1<<T)-1)){d.msg="invalid distance too far back",g.mode=30;break t}if(A>>>=T,M-=T,(T=I-D)<j){if(F<(T=j-T)&&g.sane){d.msg="invalid distance too far back",g.mode=30;break t}if(X=q,(V=0)===W){if(V+=B-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}}else if(W<T){if(V+=B+W-T,(T-=W)<O){for(O-=T;L[I++]=q[V++],--T;);if(V=0,W<O){for(O-=T=W;L[I++]=q[V++],--T;);V=I-j,X=L}}}else if(V+=W-T,T<O){for(O-=T;L[I++]=q[V++],--T;);V=I-j,X=L}for(;2<O;)L[I++]=X[V++],L[I++]=X[V++],L[I++]=X[V++],O-=3;O&&(L[I++]=X[V++],1<O&&(L[I++]=X[V++]))}else{for(V=I-j;L[I++]=L[V++],L[I++]=L[V++],L[I++]=L[V++],2<(O-=3););O&&(L[I++]=L[V++],1<O&&(L[I++]=L[V++]))}break}}break}}while(S<C&&I<z);S-=O=M>>3,A&=(1<<(M-=O<<3))-1,d.next_in=S,d.next_out=I,d.avail_in=S<C?C-S+5:5-(S-C),d.avail_out=I<z?z-I+257:257-(I-z),g.hold=A,g.bits=M}},{}],49:[function(h,p,m){var d=h("../utils/common"),b=h("./adler32"),g=h("./crc32"),S=h("./inffast"),C=h("./inftrees"),I=-2;function D(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function z(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function P(w){var x;return w&&w.state?(x=w.state,w.total_in=w.total_out=x.total=0,w.msg="",x.wrap&&(w.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new d.Buf32(852),x.distcode=x.distdyn=new d.Buf32(592),x.sane=1,x.back=-1,0):I}function B(w){var x;return w&&w.state?((x=w.state).wsize=0,x.whave=0,x.wnext=0,P(w)):I}function F(w,x){var _,T;return w&&w.state?(T=w.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?I:(T.window!==null&&T.wbits!==x&&(T.window=null),T.wrap=_,T.wbits=x,B(w))):I}function W(w,x){var _,T;return w?(T=new z,(w.state=T).window=null,(_=F(w,x))!==0&&(w.state=null),_):I}var q,A,M=!0;function k(w){if(M){var x;for(q=new d.Buf32(512),A=new d.Buf32(32),x=0;x<144;)w.lens[x++]=8;for(;x<256;)w.lens[x++]=9;for(;x<280;)w.lens[x++]=7;for(;x<288;)w.lens[x++]=8;for(C(1,w.lens,0,288,q,0,w.work,{bits:9}),x=0;x<32;)w.lens[x++]=5;C(2,w.lens,0,32,A,0,w.work,{bits:5}),M=!1}w.lencode=q,w.lenbits=9,w.distcode=A,w.distbits=5}function y(w,x,_,T){var O,j=w.state;return j.window===null&&(j.wsize=1<<j.wbits,j.wnext=0,j.whave=0,j.window=new d.Buf8(j.wsize)),T>=j.wsize?(d.arraySet(j.window,x,_-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):(T<(O=j.wsize-j.wnext)&&(O=T),d.arraySet(j.window,x,_-T,O,j.wnext),(T-=O)?(d.arraySet(j.window,x,_-T,T,0),j.wnext=T,j.whave=j.wsize):(j.wnext+=O,j.wnext===j.wsize&&(j.wnext=0),j.whave<j.wsize&&(j.whave+=O))),0}m.inflateReset=B,m.inflateReset2=F,m.inflateResetKeep=P,m.inflateInit=function(w){return W(w,15)},m.inflateInit2=W,m.inflate=function(w,x){var _,T,O,j,V,X,J,L,G,N,R,U,K,rt,Z,et,ht,lt,Q,ot,nt,ut,ct,ft,mt=0,gt=new d.Buf8(4),xt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return I;(_=w.state).mode===12&&(_.mode=13),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,N=X,R=J,ut=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(2&_.wrap&&L===35615){gt[_.check=0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0),G=L=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&L)<<8)+(L>>8))%31){w.msg="incorrect header check",_.mode=30;break}if((15&L)!=8){w.msg="unknown compression method",_.mode=30;break}if(G-=4,nt=8+(15&(L>>>=4)),_.wbits===0)_.wbits=nt;else if(nt>_.wbits){w.msg="invalid window size",_.mode=30;break}_.dmax=1<<nt,w.adler=_.check=1,_.mode=512&L?10:12,G=L=0;break;case 2:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.flags=L,(255&_.flags)!=8){w.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){w.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=L>>8&1),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=3;case 3:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.time=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,gt[2]=L>>>16&255,gt[3]=L>>>24&255,_.check=g(_.check,gt,4,0)),G=L=0,_.mode=4;case 4:for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.head&&(_.head.xflags=255&L,_.head.os=L>>8),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0,_.mode=5;case 5:if(1024&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length=L,_.head&&(_.head.extra_len=L),512&_.flags&&(gt[0]=255&L,gt[1]=L>>>8&255,_.check=g(_.check,gt,2,0)),G=L=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(X<(U=_.length)&&(U=X),U&&(_.head&&(nt=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),d.arraySet(_.head.extra,T,j,U,nt)),512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,_.length-=U),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.name+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(X===0)break t;for(U=0;nt=T[j+U++],_.head&&nt&&_.length<65536&&(_.head.comment+=String.fromCharCode(nt)),nt&&U<X;);if(512&_.flags&&(_.check=g(_.check,T,U,j)),X-=U,j+=U,nt)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;G<16;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(65535&_.check)){w.msg="header crc mismatch",_.mode=30;break}G=L=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),w.adler=_.check=0,_.mode=12;break;case 10:for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}w.adler=_.check=D(L),G=L=0,_.mode=11;case 11:if(_.havedict===0)return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,2;w.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break t;case 13:if(_.last){L>>>=7&G,G-=7&G,_.mode=27;break}for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}switch(_.last=1&L,G-=1,3&(L>>>=1)){case 0:_.mode=14;break;case 1:if(k(_),_.mode=20,x!==6)break;L>>>=2,G-=2;break t;case 2:_.mode=17;break;case 3:w.msg="invalid block type",_.mode=30}L>>>=2,G-=2;break;case 14:for(L>>>=7&G,G-=7&G;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((65535&L)!=(L>>>16^65535)){w.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&L,G=L=0,_.mode=15,x===6)break t;case 15:_.mode=16;case 16:if(U=_.length){if(X<U&&(U=X),J<U&&(U=J),U===0)break t;d.arraySet(O,T,j,U,V),X-=U,j+=U,J-=U,V+=U,_.length-=U;break}_.mode=12;break;case 17:for(;G<14;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(_.nlen=257+(31&L),L>>>=5,G-=5,_.ndist=1+(31&L),L>>>=5,G-=5,_.ncode=4+(15&L),L>>>=4,G-=4,286<_.nlen||30<_.ndist){w.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;G<3;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.lens[xt[_.have++]]=7&L,L>>>=3,G-=3}for(;_.have<19;)_.lens[xt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ct={bits:_.lenbits},ut=C(0,_.lens,0,19,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(ht<16)L>>>=Z,G-=Z,_.lens[_.have++]=ht;else{if(ht===16){for(ft=Z+2;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L>>>=Z,G-=Z,_.have===0){w.msg="invalid bit length repeat",_.mode=30;break}nt=_.lens[_.have-1],U=3+(3&L),L>>>=2,G-=2}else if(ht===17){for(ft=Z+3;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=3+(7&(L>>>=Z)),L>>>=3,G-=3}else{for(ft=Z+7;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}G-=Z,nt=0,U=11+(127&(L>>>=Z)),L>>>=7,G-=7}if(_.have+U>_.nlen+_.ndist){w.msg="invalid bit length repeat",_.mode=30;break}for(;U--;)_.lens[_.have++]=nt}}if(_.mode===30)break;if(_.lens[256]===0){w.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ct={bits:_.lenbits},ut=C(1,_.lens,0,_.nlen,_.lencode,0,_.work,ct),_.lenbits=ct.bits,ut){w.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ct={bits:_.distbits},ut=C(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ct),_.distbits=ct.bits,ut){w.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break t;case 20:_.mode=21;case 21:if(6<=X&&258<=J){w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,S(w,R),V=w.next_out,O=w.output,J=w.avail_out,j=w.next_in,T=w.input,X=w.avail_in,L=_.hold,G=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;et=(mt=_.lencode[L&(1<<_.lenbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(et&&(240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.lencode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,_.length=ht,et===0){_.mode=26;break}if(32&et){_.back=-1,_.mode=12;break}if(64&et){w.msg="invalid literal/length code",_.mode=30;break}_.extra=15&et,_.mode=22;case 22:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.length+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;et=(mt=_.distcode[L&(1<<_.distbits)-1])>>>16&255,ht=65535&mt,!((Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if((240&et)==0){for(lt=Z,Q=et,ot=ht;et=(mt=_.distcode[ot+((L&(1<<lt+Q)-1)>>lt)])>>>16&255,ht=65535&mt,!(lt+(Z=mt>>>24)<=G);){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}L>>>=lt,G-=lt,_.back+=lt}if(L>>>=Z,G-=Z,_.back+=Z,64&et){w.msg="invalid distance code",_.mode=30;break}_.offset=ht,_.extra=15&et,_.mode=24;case 24:if(_.extra){for(ft=_.extra;G<ft;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}_.offset+=L&(1<<_.extra)-1,L>>>=_.extra,G-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){w.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(J===0)break t;if(U=R-J,_.offset>U){if((U=_.offset-U)>_.whave&&_.sane){w.msg="invalid distance too far back",_.mode=30;break}K=U>_.wnext?(U-=_.wnext,_.wsize-U):_.wnext-U,U>_.length&&(U=_.length),rt=_.window}else rt=O,K=V-_.offset,U=_.length;for(J<U&&(U=J),J-=U,_.length-=U;O[V++]=rt[K++],--U;);_.length===0&&(_.mode=21);break;case 26:if(J===0)break t;O[V++]=_.length,J--,_.mode=21;break;case 27:if(_.wrap){for(;G<32;){if(X===0)break t;X--,L|=T[j++]<<G,G+=8}if(R-=J,w.total_out+=R,_.total+=R,R&&(w.adler=_.check=_.flags?g(_.check,O,R,V-R):b(_.check,O,R,V-R)),R=J,(_.flags?L:D(L))!==_.check){w.msg="incorrect data check",_.mode=30;break}G=L=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;G<32;){if(X===0)break t;X--,L+=T[j++]<<G,G+=8}if(L!==(4294967295&_.total)){w.msg="incorrect length check",_.mode=30;break}G=L=0}_.mode=29;case 29:ut=1;break t;case 30:ut=-3;break t;case 31:return-4;case 32:default:return I}return w.next_out=V,w.avail_out=J,w.next_in=j,w.avail_in=X,_.hold=L,_.bits=G,(_.wsize||R!==w.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&y(w,w.output,w.next_out,R-w.avail_out)?(_.mode=31,-4):(N-=w.avail_in,R-=w.avail_out,w.total_in+=N,w.total_out+=R,_.total+=R,_.wrap&&R&&(w.adler=_.check=_.flags?g(_.check,O,R,w.next_out-R):b(_.check,O,R,w.next_out-R)),w.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(N==0&&R===0||x===4)&&ut===0&&(ut=-5),ut)},m.inflateEnd=function(w){if(!w||!w.state)return I;var x=w.state;return x.window&&(x.window=null),w.state=null,0},m.inflateGetHeader=function(w,x){var _;return w&&w.state?(2&(_=w.state).wrap)==0?I:((_.head=x).done=!1,0):I},m.inflateSetDictionary=function(w,x){var _,T=x.length;return w&&w.state?(_=w.state).wrap!==0&&_.mode!==11?I:_.mode===11&&b(1,x,T,0)!==_.check?-3:y(w,x,T,T)?(_.mode=31,-4):(_.havedict=1,0):I},m.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,m){var d=h("../utils/common"),b=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],S=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],C=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];p.exports=function(I,D,z,P,B,F,W,q){var A,M,k,y,w,x,_,T,O,j=q.bits,V=0,X=0,J=0,L=0,G=0,N=0,R=0,U=0,K=0,rt=0,Z=null,et=0,ht=new d.Buf16(16),lt=new d.Buf16(16),Q=null,ot=0;for(V=0;V<=15;V++)ht[V]=0;for(X=0;X<P;X++)ht[D[z+X]]++;for(G=j,L=15;1<=L&&ht[L]===0;L--);if(L<G&&(G=L),L===0)return B[F++]=20971520,B[F++]=20971520,q.bits=1,0;for(J=1;J<L&&ht[J]===0;J++);for(G<J&&(G=J),V=U=1;V<=15;V++)if(U<<=1,(U-=ht[V])<0)return-1;if(0<U&&(I===0||L!==1))return-1;for(lt[1]=0,V=1;V<15;V++)lt[V+1]=lt[V]+ht[V];for(X=0;X<P;X++)D[z+X]!==0&&(W[lt[D[z+X]]++]=X);if(x=I===0?(Z=Q=W,19):I===1?(Z=b,et-=257,Q=g,ot-=257,256):(Z=S,Q=C,-1),V=J,w=F,R=X=rt=0,k=-1,y=(K=1<<(N=G))-1,I===1&&852<K||I===2&&592<K)return 1;for(;;){for(_=V-R,O=W[X]<x?(T=0,W[X]):W[X]>x?(T=Q[ot+W[X]],Z[et+W[X]]):(T=96,0),A=1<<V-R,J=M=1<<N;B[w+(rt>>R)+(M-=A)]=_<<24|T<<16|O|0,M!==0;);for(A=1<<V-1;rt&A;)A>>=1;if(A!==0?(rt&=A-1,rt+=A):rt=0,X++,--ht[V]==0){if(V===L)break;V=D[z+W[X]]}if(G<V&&(rt&y)!==k){for(R===0&&(R=G),w+=J,U=1<<(N=V-R);N+R<L&&!((U-=ht[N+R])<=0);)N++,U<<=1;if(K+=1<<N,I===1&&852<K||I===2&&592<K)return 1;B[k=rt&y]=G<<24|N<<16|w-F|0}}return rt!==0&&(B[w+rt]=V-R<<24|64<<16|0),q.bits=G,0}},{"../utils/common":41}],51:[function(h,p,m){p.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(h,p,m){var d=h("../utils/common");function b(Q){for(var ot=Q.length;0<=--ot;)Q[ot]=0}var g=256,S=286,C=30,I=15,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=new Array(576);b(F);var W=new Array(60);b(W);var q=new Array(512);b(q);var A=new Array(256);b(A);var M=new Array(29);b(M);var k,y,w,x=new Array(C);function _(Q,ot,nt,ut,ct){this.static_tree=Q,this.extra_bits=ot,this.extra_base=nt,this.elems=ut,this.max_length=ct,this.has_stree=Q&&Q.length}function T(Q,ot){this.dyn_tree=Q,this.max_code=0,this.stat_desc=ot}function O(Q){return Q<256?q[Q]:q[256+(Q>>>7)]}function j(Q,ot){Q.pending_buf[Q.pending++]=255&ot,Q.pending_buf[Q.pending++]=ot>>>8&255}function V(Q,ot,nt){Q.bi_valid>16-nt?(Q.bi_buf|=ot<<Q.bi_valid&65535,j(Q,Q.bi_buf),Q.bi_buf=ot>>16-Q.bi_valid,Q.bi_valid+=nt-16):(Q.bi_buf|=ot<<Q.bi_valid&65535,Q.bi_valid+=nt)}function X(Q,ot,nt){V(Q,nt[2*ot],nt[2*ot+1])}function J(Q,ot){for(var nt=0;nt|=1&Q,Q>>>=1,nt<<=1,0<--ot;);return nt>>>1}function L(Q,ot,nt){var ut,ct,ft=new Array(16),mt=0;for(ut=1;ut<=I;ut++)ft[ut]=mt=mt+nt[ut-1]<<1;for(ct=0;ct<=ot;ct++){var gt=Q[2*ct+1];gt!==0&&(Q[2*ct]=J(ft[gt]++,gt))}}function G(Q){var ot;for(ot=0;ot<S;ot++)Q.dyn_ltree[2*ot]=0;for(ot=0;ot<C;ot++)Q.dyn_dtree[2*ot]=0;for(ot=0;ot<19;ot++)Q.bl_tree[2*ot]=0;Q.dyn_ltree[512]=1,Q.opt_len=Q.static_len=0,Q.last_lit=Q.matches=0}function N(Q){8<Q.bi_valid?j(Q,Q.bi_buf):0<Q.bi_valid&&(Q.pending_buf[Q.pending++]=Q.bi_buf),Q.bi_buf=0,Q.bi_valid=0}function R(Q,ot,nt,ut){var ct=2*ot,ft=2*nt;return Q[ct]<Q[ft]||Q[ct]===Q[ft]&&ut[ot]<=ut[nt]}function U(Q,ot,nt){for(var ut=Q.heap[nt],ct=nt<<1;ct<=Q.heap_len&&(ct<Q.heap_len&&R(ot,Q.heap[ct+1],Q.heap[ct],Q.depth)&&ct++,!R(ot,ut,Q.heap[ct],Q.depth));)Q.heap[nt]=Q.heap[ct],nt=ct,ct<<=1;Q.heap[nt]=ut}function K(Q,ot,nt){var ut,ct,ft,mt,gt=0;if(Q.last_lit!==0)for(;ut=Q.pending_buf[Q.d_buf+2*gt]<<8|Q.pending_buf[Q.d_buf+2*gt+1],ct=Q.pending_buf[Q.l_buf+gt],gt++,ut===0?X(Q,ct,ot):(X(Q,(ft=A[ct])+g+1,ot),(mt=D[ft])!==0&&V(Q,ct-=M[ft],mt),X(Q,ft=O(--ut),nt),(mt=z[ft])!==0&&V(Q,ut-=x[ft],mt)),gt<Q.last_lit;);X(Q,256,ot)}function rt(Q,ot){var nt,ut,ct,ft=ot.dyn_tree,mt=ot.stat_desc.static_tree,gt=ot.stat_desc.has_stree,xt=ot.stat_desc.elems,Nt=-1;for(Q.heap_len=0,Q.heap_max=573,nt=0;nt<xt;nt++)ft[2*nt]!==0?(Q.heap[++Q.heap_len]=Nt=nt,Q.depth[nt]=0):ft[2*nt+1]=0;for(;Q.heap_len<2;)ft[2*(ct=Q.heap[++Q.heap_len]=Nt<2?++Nt:0)]=1,Q.depth[ct]=0,Q.opt_len--,gt&&(Q.static_len-=mt[2*ct+1]);for(ot.max_code=Nt,nt=Q.heap_len>>1;1<=nt;nt--)U(Q,ft,nt);for(ct=xt;nt=Q.heap[1],Q.heap[1]=Q.heap[Q.heap_len--],U(Q,ft,1),ut=Q.heap[1],Q.heap[--Q.heap_max]=nt,Q.heap[--Q.heap_max]=ut,ft[2*ct]=ft[2*nt]+ft[2*ut],Q.depth[ct]=(Q.depth[nt]>=Q.depth[ut]?Q.depth[nt]:Q.depth[ut])+1,ft[2*nt+1]=ft[2*ut+1]=ct,Q.heap[1]=ct++,U(Q,ft,1),2<=Q.heap_len;);Q.heap[--Q.heap_max]=Q.heap[1],(function(It,At){var Ut,Ht,zt,Xt,jt,Ct,$t=At.dyn_tree,qt=At.max_code,Pt=At.stat_desc.static_tree,fe=At.stat_desc.has_stree,ke=At.stat_desc.extra_bits,Yt=At.stat_desc.extra_base,we=At.stat_desc.max_length,ue=0;for(Xt=0;Xt<=I;Xt++)It.bl_count[Xt]=0;for($t[2*It.heap[It.heap_max]+1]=0,Ut=It.heap_max+1;Ut<573;Ut++)we<(Xt=$t[2*$t[2*(Ht=It.heap[Ut])+1]+1]+1)&&(Xt=we,ue++),$t[2*Ht+1]=Xt,qt<Ht||(It.bl_count[Xt]++,jt=0,Yt<=Ht&&(jt=ke[Ht-Yt]),Ct=$t[2*Ht],It.opt_len+=Ct*(Xt+jt),fe&&(It.static_len+=Ct*(Pt[2*Ht+1]+jt)));if(ue!==0){do{for(Xt=we-1;It.bl_count[Xt]===0;)Xt--;It.bl_count[Xt]--,It.bl_count[Xt+1]+=2,It.bl_count[we]--,ue-=2}while(0<ue);for(Xt=we;Xt!==0;Xt--)for(Ht=It.bl_count[Xt];Ht!==0;)qt<(zt=It.heap[--Ut])||($t[2*zt+1]!==Xt&&(It.opt_len+=(Xt-$t[2*zt+1])*$t[2*zt],$t[2*zt+1]=Xt),Ht--)}})(Q,ot),L(ft,Nt,Q.bl_count)}function Z(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ot[2*(nt+1)+1]=65535,ut=0;ut<=nt;ut++)ct=mt,mt=ot[2*(ut+1)+1],++gt<xt&&ct===mt||(gt<Nt?Q.bl_tree[2*ct]+=gt:ct!==0?(ct!==ft&&Q.bl_tree[2*ct]++,Q.bl_tree[32]++):gt<=10?Q.bl_tree[34]++:Q.bl_tree[36]++,ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4))}function et(Q,ot,nt){var ut,ct,ft=-1,mt=ot[1],gt=0,xt=7,Nt=4;for(mt===0&&(xt=138,Nt=3),ut=0;ut<=nt;ut++)if(ct=mt,mt=ot[2*(ut+1)+1],!(++gt<xt&&ct===mt)){if(gt<Nt)for(;X(Q,ct,Q.bl_tree),--gt!=0;);else ct!==0?(ct!==ft&&(X(Q,ct,Q.bl_tree),gt--),X(Q,16,Q.bl_tree),V(Q,gt-3,2)):gt<=10?(X(Q,17,Q.bl_tree),V(Q,gt-3,3)):(X(Q,18,Q.bl_tree),V(Q,gt-11,7));ft=ct,Nt=(gt=0)===mt?(xt=138,3):ct===mt?(xt=6,3):(xt=7,4)}}b(x);var ht=!1;function lt(Q,ot,nt,ut){V(Q,0+(ut?1:0),3),(function(ct,ft,mt,gt){N(ct),j(ct,mt),j(ct,~mt),d.arraySet(ct.pending_buf,ct.window,ft,mt,ct.pending),ct.pending+=mt})(Q,ot,nt)}m._tr_init=function(Q){ht||((function(){var ot,nt,ut,ct,ft,mt=new Array(16);for(ct=ut=0;ct<28;ct++)for(M[ct]=ut,ot=0;ot<1<<D[ct];ot++)A[ut++]=ct;for(A[ut-1]=ct,ct=ft=0;ct<16;ct++)for(x[ct]=ft,ot=0;ot<1<<z[ct];ot++)q[ft++]=ct;for(ft>>=7;ct<C;ct++)for(x[ct]=ft<<7,ot=0;ot<1<<z[ct]-7;ot++)q[256+ft++]=ct;for(nt=0;nt<=I;nt++)mt[nt]=0;for(ot=0;ot<=143;)F[2*ot+1]=8,ot++,mt[8]++;for(;ot<=255;)F[2*ot+1]=9,ot++,mt[9]++;for(;ot<=279;)F[2*ot+1]=7,ot++,mt[7]++;for(;ot<=287;)F[2*ot+1]=8,ot++,mt[8]++;for(L(F,287,mt),ot=0;ot<C;ot++)W[2*ot+1]=5,W[2*ot]=J(ot,5);k=new _(F,D,257,S,I),y=new _(W,z,0,C,I),w=new _(new Array(0),P,0,19,7)})(),ht=!0),Q.l_desc=new T(Q.dyn_ltree,k),Q.d_desc=new T(Q.dyn_dtree,y),Q.bl_desc=new T(Q.bl_tree,w),Q.bi_buf=0,Q.bi_valid=0,G(Q)},m._tr_stored_block=lt,m._tr_flush_block=function(Q,ot,nt,ut){var ct,ft,mt=0;0<Q.level?(Q.strm.data_type===2&&(Q.strm.data_type=(function(gt){var xt,Nt=4093624447;for(xt=0;xt<=31;xt++,Nt>>>=1)if(1&Nt&>.dyn_ltree[2*xt]!==0)return 0;if(gt.dyn_ltree[18]!==0||gt.dyn_ltree[20]!==0||gt.dyn_ltree[26]!==0)return 1;for(xt=32;xt<g;xt++)if(gt.dyn_ltree[2*xt]!==0)return 1;return 0})(Q)),rt(Q,Q.l_desc),rt(Q,Q.d_desc),mt=(function(gt){var xt;for(Z(gt,gt.dyn_ltree,gt.l_desc.max_code),Z(gt,gt.dyn_dtree,gt.d_desc.max_code),rt(gt,gt.bl_desc),xt=18;3<=xt&>.bl_tree[2*B[xt]+1]===0;xt--);return gt.opt_len+=3*(xt+1)+5+5+4,xt})(Q),ct=Q.opt_len+3+7>>>3,(ft=Q.static_len+3+7>>>3)<=ct&&(ct=ft)):ct=ft=nt+5,nt+4<=ct&&ot!==-1?lt(Q,ot,nt,ut):Q.strategy===4||ft===ct?(V(Q,2+(ut?1:0),3),K(Q,F,W)):(V(Q,4+(ut?1:0),3),(function(gt,xt,Nt,It){var At;for(V(gt,xt-257,5),V(gt,Nt-1,5),V(gt,It-4,4),At=0;At<It;At++)V(gt,gt.bl_tree[2*B[At]+1],3);et(gt,gt.dyn_ltree,xt-1),et(gt,gt.dyn_dtree,Nt-1)})(Q,Q.l_desc.max_code+1,Q.d_desc.max_code+1,mt+1),K(Q,Q.dyn_ltree,Q.dyn_dtree)),G(Q),ut&&N(Q)},m._tr_tally=function(Q,ot,nt){return Q.pending_buf[Q.d_buf+2*Q.last_lit]=ot>>>8&255,Q.pending_buf[Q.d_buf+2*Q.last_lit+1]=255&ot,Q.pending_buf[Q.l_buf+Q.last_lit]=255&nt,Q.last_lit++,ot===0?Q.dyn_ltree[2*nt]++:(Q.matches++,ot--,Q.dyn_ltree[2*(A[nt]+g+1)]++,Q.dyn_dtree[2*O(ot)]++),Q.last_lit===Q.lit_bufsize-1},m._tr_align=function(Q){V(Q,2,3),X(Q,256,F),(function(ot){ot.bi_valid===16?(j(ot,ot.bi_buf),ot.bi_buf=0,ot.bi_valid=0):8<=ot.bi_valid&&(ot.pending_buf[ot.pending++]=255&ot.bi_buf,ot.bi_buf>>=8,ot.bi_valid-=8)})(Q)}},{"../utils/common":41}],53:[function(h,p,m){p.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(h,p,m){(function(d){(function(b,g){if(!b.setImmediate){var S,C,I,D,z=1,P={},B=!1,F=b.document,W=Object.getPrototypeOf&&Object.getPrototypeOf(b);W=W&&W.setTimeout?W:b,S={}.toString.call(b.process)==="[object process]"?function(k){o.nextTick((function(){A(k)}))}:(function(){if(b.postMessage&&!b.importScripts){var k=!0,y=b.onmessage;return b.onmessage=function(){k=!1},b.postMessage("","*"),b.onmessage=y,k}})()?(D="setImmediate$"+Math.random()+"$",b.addEventListener?b.addEventListener("message",M,!1):b.attachEvent("onmessage",M),function(k){b.postMessage(D+k,"*")}):b.MessageChannel?((I=new MessageChannel).port1.onmessage=function(k){A(k.data)},function(k){I.port2.postMessage(k)}):F&&"onreadystatechange"in F.createElement("script")?(C=F.documentElement,function(k){var y=F.createElement("script");y.onreadystatechange=function(){A(k),y.onreadystatechange=null,C.removeChild(y),y=null},C.appendChild(y)}):function(k){setTimeout(A,0,k)},W.setImmediate=function(k){typeof k!="function"&&(k=new Function(""+k));for(var y=new Array(arguments.length-1),w=0;w<y.length;w++)y[w]=arguments[w+1];var x={callback:k,args:y};return P[z]=x,S(z),z++},W.clearImmediate=q}function q(k){delete P[k]}function A(k){if(B)setTimeout(A,0,k);else{var y=P[k];if(y){B=!0;try{(function(w){var x=w.callback,_=w.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_)}})(y)}finally{q(k),B=!1}}}}function M(k){k.source===b&&typeof k.data=="string"&&k.data.indexOf(D)===0&&A(+k.data.slice(D.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,r!==void 0?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],t("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(t,l,c){(function(o){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),s=typeof o=="object"&&o&&o.Object===Object&&o,e=typeof self=="object"&&self&&self.Object===Object&&self,i=s||e||Function("return this")(),u=Object.prototype.toString,a=i.Symbol,h=a?a.prototype:void 0,p=h?h.toString:void 0;function m(d){if(typeof d=="string")return d;if((function(g){return typeof g=="symbol"||(function(S){return!!S&&typeof S=="object"})(g)&&u.call(g)=="[object Symbol]"})(d))return p?p.call(d):"";var b=d+"";return b=="0"&&1/d==-1/0?"-0":b}l.exports=function(d){var b;return(d=(b=d)==null?"":m(b))&&n.test(d)?d.replace(r,"\\$&"):d}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,a=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,m=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[r]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b["[object Function]"]=b[n]=b["[object Number]"]=b[s]=b["[object RegExp]"]=b[e]=b["[object String]"]=b["[object WeakMap]"]=!1;var g=typeof o=="object"&&o&&o.Object===Object&&o,S=typeof self=="object"&&self&&self.Object===Object&&self,C=g||S||Function("return this")(),I=typeof c=="object"&&c&&!c.nodeType&&c,D=I&&typeof l=="object"&&l&&!l.nodeType&&l,z=D&&D.exports===I&&g.process,P=(function(){try{return z&&z.binding("util")}catch{}})(),B=P&&P.isTypedArray;function F(st,pt,wt,_t){for(var Bt=-1,Et=st?st.length:0;++Bt<Et;){var Rt=st[Bt];pt(_t,Rt,wt(Rt),st)}return _t}function W(st,pt){for(var wt=-1,_t=st?st.length:0;++wt<_t;)if(pt(st[wt],wt,st))return!0;return!1}function q(st){var pt=!1;if(st!=null&&typeof st.toString!="function")try{pt=!!(st+"")}catch{}return pt}function A(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t,Bt){wt[++pt]=[Bt,_t]})),wt}function M(st){var pt=-1,wt=Array(st.size);return st.forEach((function(_t){wt[++pt]=_t})),wt}var k,y,w,x=Array.prototype,_=Function.prototype,T=Object.prototype,O=C["__core-js_shared__"],j=(k=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",V=_.toString,X=T.hasOwnProperty,J=T.toString,L=RegExp("^"+V.call(X).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=C.Symbol,N=C.Uint8Array,R=T.propertyIsEnumerable,U=x.splice,K=(y=Object.keys,w=Object,function(st){return y(w(st))}),rt=Qt(C,"DataView"),Z=Qt(C,"Map"),et=Qt(C,"Promise"),ht=Qt(C,"Set"),lt=Qt(C,"WeakMap"),Q=Qt(Object,"create"),ot=dt(rt),nt=dt(Z),ut=dt(et),ct=dt(ht),ft=dt(lt),mt=G?G.prototype:void 0,gt=mt?mt.valueOf:void 0,xt=mt?mt.toString:void 0;function Nt(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function It(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function At(st){var pt=-1,wt=st?st.length:0;for(this.clear();++pt<wt;){var _t=st[pt];this.set(_t[0],_t[1])}}function Ut(st){var pt=-1,wt=st?st.length:0;for(this.__data__=new At;++pt<wt;)this.add(st[pt])}function Ht(st){this.__data__=new It(st)}function zt(st,pt){var wt=Zt(st)||ee(st)?(function(Rt,ge){for(var oe=-1,he=Array(Rt);++oe<Rt;)he[oe]=ge(oe);return he})(st.length,String):[],_t=wt.length,Bt=!!_t;for(var Et in st)!X.call(st,Et)||Bt&&(Et=="length"||Te(Et,_t))||wt.push(Et);return wt}function Xt(st,pt){for(var wt=st.length;wt--;)if(Mt(st[wt][0],pt))return wt;return-1}function jt(st,pt,wt,_t){return $t(st,(function(Bt,Et,Rt){pt(_t,Bt,wt(Bt),Rt)})),_t}Nt.prototype.clear=function(){this.__data__=Q?Q(null):{}},Nt.prototype.delete=function(st){return this.has(st)&&delete this.__data__[st]},Nt.prototype.get=function(st){var pt=this.__data__;if(Q){var wt=pt[st];return wt==="__lodash_hash_undefined__"?void 0:wt}return X.call(pt,st)?pt[st]:void 0},Nt.prototype.has=function(st){var pt=this.__data__;return Q?pt[st]!==void 0:X.call(pt,st)},Nt.prototype.set=function(st,pt){return this.__data__[st]=Q&&pt===void 0?"__lodash_hash_undefined__":pt,this},It.prototype.clear=function(){this.__data__=[]},It.prototype.delete=function(st){var pt=this.__data__,wt=Xt(pt,st);return!(wt<0)&&(wt==pt.length-1?pt.pop():U.call(pt,wt,1),!0)},It.prototype.get=function(st){var pt=this.__data__,wt=Xt(pt,st);return wt<0?void 0:pt[wt][1]},It.prototype.has=function(st){return Xt(this.__data__,st)>-1},It.prototype.set=function(st,pt){var wt=this.__data__,_t=Xt(wt,st);return _t<0?wt.push([st,pt]):wt[_t][1]=pt,this},At.prototype.clear=function(){this.__data__={hash:new Nt,map:new(Z||It),string:new Nt}},At.prototype.delete=function(st){return xe(this,st).delete(st)},At.prototype.get=function(st){return xe(this,st).get(st)},At.prototype.has=function(st){return xe(this,st).has(st)},At.prototype.set=function(st,pt){return xe(this,st).set(st,pt),this},Ut.prototype.add=Ut.prototype.push=function(st){return this.__data__.set(st,"__lodash_hash_undefined__"),this},Ut.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.clear=function(){this.__data__=new It},Ht.prototype.delete=function(st){return this.__data__.delete(st)},Ht.prototype.get=function(st){return this.__data__.get(st)},Ht.prototype.has=function(st){return this.__data__.has(st)},Ht.prototype.set=function(st,pt){var wt=this.__data__;if(wt instanceof It){var _t=wt.__data__;if(!Z||_t.length<199)return _t.push([st,pt]),this;wt=this.__data__=new At(_t)}return wt.set(st,pt),this};var Ct,$t=(Ct=function(st,pt){return st&&qt(st,pt,er)},function(st,pt){if(st==null)return st;if(!Vt(st))return Ct(st,pt);for(var wt=st.length,_t=-1,Bt=Object(st);++_t<wt&&pt(Bt[_t],_t,Bt)!==!1;);return st}),qt=(function(st){return function(pt,wt,_t){for(var Bt=-1,Et=Object(pt),Rt=_t(pt),ge=Rt.length;ge--;){var oe=Rt[++Bt];if(wt(Et[oe],oe,Et)===!1)break}return pt}})();function Pt(st,pt){for(var wt=0,_t=(pt=te(pt,st)?[pt]:se(pt)).length;st!=null&&wt<_t;)st=st[at(pt[wt++])];return wt&&wt==_t?st:void 0}function fe(st,pt){return st!=null&&pt in Object(st)}function ke(st,pt,wt,_t,Bt){return st===pt||(st==null||pt==null||!le(st)&&!ze(pt)?st!=st&&pt!=pt:(function(Et,Rt,ge,oe,he,Jt){var Ce=Zt(Et),Ee=Zt(Rt),Me="[object Array]",qe="[object Array]";Ce||(Me=(Me=be(Et))==r?s:Me),Ee||(qe=(qe=be(Rt))==r?s:qe);var ir=Me==s&&!q(Et),mr=qe==s&&!q(Rt),Yr=Me==qe;if(Yr&&!ir)return Jt||(Jt=new Ht),Ce||tr(Et)?je(Et,Rt,ge,oe,he,Jt):(function(Ae,ye,Ks,Ai,Jc,Or,Ss){switch(Ks){case"[object DataView]":if(Ae.byteLength!=ye.byteLength||Ae.byteOffset!=ye.byteOffset)return!1;Ae=Ae.buffer,ye=ye.buffer;case"[object ArrayBuffer]":return!(Ae.byteLength!=ye.byteLength||!Ai(new N(Ae),new N(ye)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Mt(+Ae,+ye);case"[object Error]":return Ae.name==ye.name&&Ae.message==ye.message;case"[object RegExp]":case"[object String]":return Ae==ye+"";case n:var Zs=A;case e:var Ll=2⩔if(Zs||(Zs=M),Ae.size!=ye.size&&!Ll)return!1;var Qc=Ss.get(Ae);if(Qc)return Qc==ye;Or|=1,Ss.set(Ae,ye);var Kn=je(Zs(Ae),Zs(ye),Ai,Jc,Or,Ss);return Ss.delete(Ae),Kn;case"[object Symbol]":if(gt)return gt.call(Ae)==gt.call(ye)}return!1})(Et,Rt,Me,ge,oe,he,Jt);if(!(2&he)){var Ei=ir&&X.call(Et,"__wrapped__"),Xn=mr&&X.call(Rt,"__wrapped__");if(Ei||Xn){var Yn=Ei?Et.value():Et,Gn=Xn?Rt.value():Rt;return Jt||(Jt=new Ht),ge(Yn,Gn,oe,he,Jt)}}return Yr?(Jt||(Jt=new Ht),(function(Ae,ye,Ks,Ai,Jc,Or){var Ss=2&Jc,Zs=er(Ae),Ll=Zs.length,Qc=er(ye).length;if(Ll!=Qc&&!Ss)return!1;for(var Kn=Ll;Kn--;){var Js=Zs[Kn];if(!(Ss?Js in ye:X.call(ye,Js)))return!1}var Tu=Or.get(Ae);if(Tu&&Or.get(ye))return Tu==ye;var tu=!0;Or.set(Ae,ye),Or.set(ye,Ae);for(var bu=Ss;++Kn<Ll;){Js=Zs[Kn];var eu=Ae[Js],ru=ye[Js];if(Ai)var Ru=Ss?Ai(ru,eu,Js,ye,Ae,Or):Ai(eu,ru,Js,Ae,ye,Or);if(!(Ru===void 0?eu===ru||Ks(eu,ru,Ai,Jc,Or):Ru)){tu=!1;break}bu||(bu=Js=="constructor")}if(tu&&!bu){var su=Ae.constructor,iu=ye.constructor;su==iu||!("constructor"in Ae)||!("constructor"in ye)||typeof su=="function"&&su instanceof su&&typeof iu=="function"&&iu instanceof iu||(tu=!1)}return Or.delete(Ae),Or.delete(ye),tu})(Et,Rt,ge,oe,he,Jt)):!1})(st,pt,ke,wt,_t,Bt))}function Yt(st){return!(!le(st)||(function(pt){return!!j&&j in pt})(st))&&(ie(st)||q(st)?L:m).test(dt(st))}function we(st){return typeof st=="function"?st:st==null?xr:typeof st=="object"?Zt(st)?(function(_t,Bt){return te(_t)&&_e(Bt)?Re(at(_t),Bt):function(Et){var Rt=(function(ge,oe,he){var Jt=ge==null?void 0:Pt(ge,oe);return Jt===void 0?he:Jt})(Et,_t);return Rt===void 0&&Rt===Bt?(function(ge,oe){return ge!=null&&(function(he,Jt,Ce){Jt=te(Jt,he)?[Jt]:se(Jt);for(var Ee,Me=-1,qe=Jt.length;++Me<qe;){var ir=at(Jt[Me]);if(!(Ee=he!=null&&Ce(he,ir)))break;he=he[ir]}return Ee||!!(qe=he?he.length:0)&&re(qe)&&Te(ir,qe)&&(Zt(he)||ee(he))})(ge,oe,fe)})(Et,_t):ke(Bt,Rt,void 0,3)}})(st[0],st[1]):(function(_t){var Bt=(function(Et){for(var Rt=er(Et),ge=Rt.length;ge--;){var oe=Rt[ge],he=Et[oe];Rt[ge]=[oe,he,_e(he)]}return Rt})(_t);return Bt.length==1&&Bt[0][2]?Re(Bt[0][0],Bt[0][1]):function(Et){return Et===_t||(function(Rt,ge,oe,he){var Jt=oe.length,Ce=Jt;if(Rt==null)return!Ce;for(Rt=Object(Rt);Jt--;){var Ee=oe[Jt];if(Ee[2]?Ee[1]!==Rt[Ee[0]]:!(Ee[0]in Rt))return!1}for(;++Jt<Ce;){var Me=(Ee=oe[Jt])[0],qe=Rt[Me],ir=Ee[1];if(Ee[2]){if(qe===void 0&&!(Me in Rt))return!1}else{var mr=new Ht,Yr;if(!(Yr===void 0?ke(ir,qe,he,3,mr):Yr))return!1}}return!0})(Et,_t,Bt)}})(st):te(pt=st)?(wt=at(pt),function(_t){return _t==null?void 0:_t[wt]}):(function(_t){return function(Bt){return Pt(Bt,_t)}})(pt);var pt,wt}function ue(st){if(wt=(pt=st)&&pt.constructor,_t=typeof wt=="function"&&wt.prototype||T,pt!==_t)return K(st);var pt,wt,_t,Bt=[];for(var Et in Object(st))X.call(st,Et)&&Et!="constructor"&&Bt.push(Et);return Bt}function se(st){return Zt(st)?st:ne(st)}function je(st,pt,wt,_t,Bt,Et){var Rt=2&Bt,ge=st.length,oe=pt.length;if(ge!=oe&&!(Rt&&oe>ge))return!1;var he=Et.get(st);if(he&&Et.get(pt))return he==pt;var Jt=-1,Ce=!0,Ee=1&Bt?new Ut:void 0;for(Et.set(st,pt),Et.set(pt,st);++Jt<ge;){var Me=st[Jt],qe=pt[Jt];if(_t)var ir=Rt?_t(qe,Me,Jt,pt,st,Et):_t(Me,qe,Jt,st,pt,Et);if(ir!==void 0){if(ir)continue;Ce=!1;break}if(Ee){if(!W(pt,(function(mr,Yr){if(!Ee.has(Yr)&&(Me===mr||wt(Me,mr,_t,Bt,Et)))return Ee.add(Yr)}))){Ce=!1;break}}else if(Me!==qe&&!wt(Me,qe,_t,Bt,Et)){Ce=!1;break}}return Et.delete(st),Et.delete(pt),Ce}function xe(st,pt){var wt,_t,Bt=st.__data__;return((_t=typeof(wt=pt))=="string"||_t=="number"||_t=="symbol"||_t=="boolean"?wt!=="__proto__":wt===null)?Bt[typeof pt=="string"?"string":"hash"]:Bt.map}function Qt(st,pt){var wt=(function(_t,Bt){return _t==null?void 0:_t[Bt]})(st,pt);return Yt(wt)?wt:void 0}var be=function(st){return J.call(st)};function Te(st,pt){return!!(pt=pt??9007199254740991)&&(typeof st=="number"||d.test(st))&&st>-1&&st%1==0&&st<pt}function te(st,pt){if(Zt(st))return!1;var wt=typeof st;return!(wt!="number"&&wt!="symbol"&&wt!="boolean"&&st!=null&&!$e(st))||u.test(st)||!i.test(st)||pt!=null&&st in Object(pt)}function _e(st){return st==st&&!le(st)}function Re(st,pt){return function(wt){return wt!=null&&wt[st]===pt&&(pt!==void 0||st in Object(wt))}}(rt&&be(new rt(new ArrayBuffer(1)))!="[object DataView]"||Z&&be(new Z)!=n||et&&be(et.resolve())!="[object Promise]"||ht&&be(new ht)!=e||lt&&be(new lt)!="[object WeakMap]")&&(be=function(st){var pt=J.call(st),wt=pt==s?st.constructor:void 0,_t=wt?dt(wt):void 0;if(_t)switch(_t){case ot:return"[object DataView]";case nt:return n;case ut:return"[object Promise]";case ct:return e;case ft:return"[object WeakMap]"}return pt});var ne=Kt((function(st){var pt;st=(pt=st)==null?"":(function(_t){if(typeof _t=="string")return _t;if($e(_t))return xt?xt.call(_t):"";var Bt=_t+"";return Bt=="0"&&1/_t==-1/0?"-0":Bt})(pt);var wt=[];return a.test(st)&&wt.push(""),st.replace(h,(function(_t,Bt,Et,Rt){wt.push(Et?Rt.replace(p,"$1"):Bt||_t)})),wt}));function at(st){if(typeof st=="string"||$e(st))return st;var pt=st+"";return pt=="0"&&1/st==-1/0?"-0":pt}function dt(st){if(st!=null){try{return V.call(st)}catch{}try{return st+""}catch{}}return""}var bt,Tt=(bt=function(st,pt,wt){X.call(st,wt)?st[wt].push(pt):st[wt]=[pt]},function(st,pt){var wt=Zt(st)?F:jt,_t={};return wt(st,bt,we(pt),_t)});function Kt(st,pt){if(typeof st!="function"||pt&&typeof pt!="function")throw new TypeError("Expected a function");var wt=function(){var _t=arguments,Bt=pt?pt.apply(this,_t):_t[0],Et=wt.cache;if(Et.has(Bt))return Et.get(Bt);var Rt=st.apply(this,_t);return wt.cache=Et.set(Bt,Rt),Rt};return wt.cache=new(Kt.Cache||At),wt}function Mt(st,pt){return st===pt||st!=st&&pt!=pt}function ee(st){return(function(pt){return ze(pt)&&Vt(pt)})(st)&&X.call(st,"callee")&&(!R.call(st,"callee")||J.call(st)==r)}Kt.Cache=At;var Zt=Array.isArray;function Vt(st){return st!=null&&re(st.length)&&!ie(st)}function ie(st){var pt=le(st)?J.call(st):"";return pt=="[object Function]"||pt=="[object GeneratorFunction]"}function re(st){return typeof st=="number"&&st>-1&&st%1==0&&st<=9007199254740991}function le(st){var pt=typeof st;return!!st&&(pt=="object"||pt=="function")}function ze(st){return!!st&&typeof st=="object"}function $e(st){return typeof st=="symbol"||ze(st)&&J.call(st)=="[object Symbol]"}var tr=B?(function(st){return function(pt){return st(pt)}})(B):function(st){return ze(st)&&re(st.length)&&!!b[J.call(st)]};function er(st){return Vt(st)?zt(st):ue(st)}function xr(st){return st}l.exports=Tt}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,l,c){var o=Object.prototype.toString;l.exports=function(r){return r===!0||r===!1||(function(n){return!!n&&typeof n=="object"})(r)&&o.call(r)=="[object Boolean]"}},{}],445:[function(t,l,c){(function(o){(function(){var r="[object Arguments]",n="[object Map]",s="[object Object]",e="[object Set]",i=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a[r]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a[n]=a["[object Number]"]=a[s]=a["[object RegExp]"]=a[e]=a["[object String]"]=a["[object WeakMap]"]=!1;var h=typeof o=="object"&&o&&o.Object===Object&&o,p=typeof self=="object"&&self&&self.Object===Object&&self,m=h||p||Function("return this")(),d=typeof c=="object"&&c&&!c.nodeType&&c,b=d&&typeof l=="object"&&l&&!l.nodeType&&l,g=b&&b.exports===d,S=g&&h.process,C=(function(){try{return S&&S.binding&&S.binding("util")}catch{}})(),I=C&&C.isTypedArray;function D(at,dt){for(var bt=-1,Tt=at==null?0:at.length;++bt<Tt;)if(dt(at[bt],bt,at))return!0;return!1}function z(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt,Kt){bt[++dt]=[Kt,Tt]})),bt}function P(at){var dt=-1,bt=Array(at.size);return at.forEach((function(Tt){bt[++dt]=Tt})),bt}var B,F,W,q=Array.prototype,A=Function.prototype,M=Object.prototype,k=m["__core-js_shared__"],y=A.toString,w=M.hasOwnProperty,x=(B=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=M.toString,T=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=g?m.Buffer:void 0,j=m.Symbol,V=m.Uint8Array,X=M.propertyIsEnumerable,J=q.splice,L=j?j.toStringTag:void 0,G=Object.getOwnPropertySymbols,N=O?O.isBuffer:void 0,R=(F=Object.keys,W=Object,function(at){return F(W(at))}),U=fe(m,"DataView"),K=fe(m,"Map"),rt=fe(m,"Promise"),Z=fe(m,"Set"),et=fe(m,"WeakMap"),ht=fe(Object,"create"),lt=ue(U),Q=ue(K),ot=ue(rt),nt=ue(Z),ut=ue(et),ct=j?j.prototype:void 0,ft=ct?ct.valueOf:void 0;function mt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function gt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function xt(at){var dt=-1,bt=at==null?0:at.length;for(this.clear();++dt<bt;){var Tt=at[dt];this.set(Tt[0],Tt[1])}}function Nt(at){var dt=-1,bt=at==null?0:at.length;for(this.__data__=new xt;++dt<bt;)this.add(at[dt])}function It(at){var dt=this.__data__=new gt(at);this.size=dt.size}function At(at,dt){var bt=xe(at),Tt=!bt&&je(at),Kt=!bt&&!Tt&&Qt(at),Mt=!bt&&!Tt&&!Kt&&Re(at),ee=bt||Tt||Kt||Mt,Zt=ee?(function(re,le){for(var ze=-1,$e=Array(re);++ze<re;)$e[ze]=le(ze);return $e})(at.length,String):[],Vt=Zt.length;for(var ie in at)!w.call(at,ie)||ee&&(ie=="length"||Kt&&(ie=="offset"||ie=="parent")||Mt&&(ie=="buffer"||ie=="byteLength"||ie=="byteOffset")||we(ie,Vt))||Zt.push(ie);return Zt}function Ut(at,dt){for(var bt=at.length;bt--;)if(se(at[bt][0],dt))return bt;return-1}function Ht(at){return at==null?at===void 0?"[object Undefined]":"[object Null]":L&&L in Object(at)?(function(dt){var bt=w.call(dt,L),Tt=dt[L];try{dt[L]=void 0;var Kt=!0}catch{}var Mt=_.call(dt);return Kt&&(bt?dt[L]=Tt:delete dt[L]),Mt})(at):(function(dt){return _.call(dt)})(at)}function zt(at){return _e(at)&&Ht(at)==r}function Xt(at,dt,bt,Tt,Kt){return at===dt||(at==null||dt==null||!_e(at)&&!_e(dt)?at!=at&&dt!=dt:(function(Mt,ee,Zt,Vt,ie,re){var le=xe(Mt),ze=xe(ee),$e=le?"[object Array]":Yt(Mt),tr=ze?"[object Array]":Yt(ee),er=($e=$e==r?s:$e)==s,xr=(tr=tr==r?s:tr)==s,st=$e==tr;if(st&&Qt(Mt)){if(!Qt(ee))return!1;le=!0,er=!1}if(st&&!er)return re||(re=new It),le||Re(Mt)?$t(Mt,ee,Zt,Vt,ie,re):(function(Et,Rt,ge,oe,he,Jt,Ce){switch(ge){case"[object DataView]":if(Et.byteLength!=Rt.byteLength||Et.byteOffset!=Rt.byteOffset)return!1;Et=Et.buffer,Rt=Rt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Rt.byteLength||!Jt(new V(Et),new V(Rt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return se(+Et,+Rt);case"[object Error]":return Et.name==Rt.name&&Et.message==Rt.message;case"[object RegExp]":case"[object String]":return Et==Rt+"";case n:var Ee=z;case e:var Me=1&oe;if(Ee||(Ee=P),Et.size!=Rt.size&&!Me)return!1;var qe=Ce.get(Et);if(qe)return qe==Rt;oe|=2,Ce.set(Et,Rt);var ir=$t(Ee(Et),Ee(Rt),oe,he,Jt,Ce);return Ce.delete(Et),ir;case"[object Symbol]":if(ft)return ft.call(Et)==ft.call(Rt)}return!1})(Mt,ee,$e,Zt,Vt,ie,re);if(!(1&Zt)){var pt=er&&w.call(Mt,"__wrapped__"),wt=xr&&w.call(ee,"__wrapped__");if(pt||wt){var _t=pt?Mt.value():Mt,Bt=wt?ee.value():ee;return re||(re=new It),ie(_t,Bt,Zt,Vt,re)}}return st?(re||(re=new It),(function(Et,Rt,ge,oe,he,Jt){var Ce=1&ge,Ee=qt(Et),Me=Ee.length,qe=qt(Rt).length;if(Me!=qe&&!Ce)return!1;for(var ir=Me;ir--;){var mr=Ee[ir];if(!(Ce?mr in Rt:w.call(Rt,mr)))return!1}var Yr=Jt.get(Et);if(Yr&&Jt.get(Rt))return Yr==Rt;var Ei=!0;Jt.set(Et,Rt),Jt.set(Rt,Et);for(var Xn=Ce;++ir<Me;){mr=Ee[ir];var Yn=Et[mr],Gn=Rt[mr];if(oe)var Ae=Ce?oe(Gn,Yn,mr,Rt,Et,Jt):oe(Yn,Gn,mr,Et,Rt,Jt);if(!(Ae===void 0?Yn===Gn||he(Yn,Gn,ge,oe,Jt):Ae)){Ei=!1;break}Xn||(Xn=mr=="constructor")}if(Ei&&!Xn){var ye=Et.constructor,Ks=Rt.constructor;ye==Ks||!("constructor"in Et)||!("constructor"in Rt)||typeof ye=="function"&&ye instanceof ye&&typeof Ks=="function"&&Ks instanceof Ks||(Ei=!1)}return Jt.delete(Et),Jt.delete(Rt),Ei})(Mt,ee,Zt,Vt,ie,re)):!1})(at,dt,bt,Tt,Xt,Kt))}function jt(at){return!(!te(at)||(function(dt){return!!x&&x in dt})(at))&&(be(at)?T:i).test(ue(at))}function Ct(at){if(bt=(dt=at)&&dt.constructor,Tt=typeof bt=="function"&&bt.prototype||M,dt!==Tt)return R(at);var dt,bt,Tt,Kt=[];for(var Mt in Object(at))w.call(at,Mt)&&Mt!="constructor"&&Kt.push(Mt);return Kt}function $t(at,dt,bt,Tt,Kt,Mt){var ee=1&bt,Zt=at.length,Vt=dt.length;if(Zt!=Vt&&!(ee&&Vt>Zt))return!1;var ie=Mt.get(at);if(ie&&Mt.get(dt))return ie==dt;var re=-1,le=!0,ze=2&bt?new Nt:void 0;for(Mt.set(at,dt),Mt.set(dt,at);++re<Zt;){var $e=at[re],tr=dt[re];if(Tt)var er=ee?Tt(tr,$e,re,dt,at,Mt):Tt($e,tr,re,at,dt,Mt);if(er!==void 0){if(er)continue;le=!1;break}if(ze){if(!D(dt,(function(xr,st){if(pt=st,!ze.has(pt)&&($e===xr||Kt($e,xr,bt,Tt,Mt)))return ze.push(st);var pt}))){le=!1;break}}else if($e!==tr&&!Kt($e,tr,bt,Tt,Mt)){le=!1;break}}return Mt.delete(at),Mt.delete(dt),le}function qt(at){return(function(dt,bt,Tt){var Kt=bt(dt);return xe(dt)?Kt:(function(Mt,ee){for(var Zt=-1,Vt=ee.length,ie=Mt.length;++Zt<Vt;)Mt[ie+Zt]=ee[Zt];return Mt})(Kt,Tt(dt))})(at,ne,ke)}function Pt(at,dt){var bt,Tt,Kt=at.__data__;return((Tt=typeof(bt=dt))=="string"||Tt=="number"||Tt=="symbol"||Tt=="boolean"?bt!=="__proto__":bt===null)?Kt[typeof dt=="string"?"string":"hash"]:Kt.map}function fe(at,dt){var bt=(function(Tt,Kt){return Tt==null?void 0:Tt[Kt]})(at,dt);return jt(bt)?bt:void 0}mt.prototype.clear=function(){this.__data__=ht?ht(null):{},this.size=0},mt.prototype.delete=function(at){var dt=this.has(at)&&delete this.__data__[at];return this.size-=dt?1:0,dt},mt.prototype.get=function(at){var dt=this.__data__;if(ht){var bt=dt[at];return bt==="__lodash_hash_undefined__"?void 0:bt}return w.call(dt,at)?dt[at]:void 0},mt.prototype.has=function(at){var dt=this.__data__;return ht?dt[at]!==void 0:w.call(dt,at)},mt.prototype.set=function(at,dt){var bt=this.__data__;return this.size+=this.has(at)?0:1,bt[at]=ht&&dt===void 0?"__lodash_hash_undefined__":dt,this},gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=function(at){var dt=this.__data__,bt=Ut(dt,at);return!(bt<0)&&(bt==dt.length-1?dt.pop():J.call(dt,bt,1),--this.size,!0)},gt.prototype.get=function(at){var dt=this.__data__,bt=Ut(dt,at);return bt<0?void 0:dt[bt][1]},gt.prototype.has=function(at){return Ut(this.__data__,at)>-1},gt.prototype.set=function(at,dt){var bt=this.__data__,Tt=Ut(bt,at);return Tt<0?(++this.size,bt.push([at,dt])):bt[Tt][1]=dt,this},xt.prototype.clear=function(){this.size=0,this.__data__={hash:new mt,map:new(K||gt),string:new mt}},xt.prototype.delete=function(at){var dt=Pt(this,at).delete(at);return this.size-=dt?1:0,dt},xt.prototype.get=function(at){return Pt(this,at).get(at)},xt.prototype.has=function(at){return Pt(this,at).has(at)},xt.prototype.set=function(at,dt){var bt=Pt(this,at),Tt=bt.size;return bt.set(at,dt),this.size+=bt.size==Tt?0:1,this},Nt.prototype.add=Nt.prototype.push=function(at){return this.__data__.set(at,"__lodash_hash_undefined__"),this},Nt.prototype.has=function(at){return this.__data__.has(at)},It.prototype.clear=function(){this.__data__=new gt,this.size=0},It.prototype.delete=function(at){var dt=this.__data__,bt=dt.delete(at);return this.size=dt.size,bt},It.prototype.get=function(at){return this.__data__.get(at)},It.prototype.has=function(at){return this.__data__.has(at)},It.prototype.set=function(at,dt){var bt=this.__data__;if(bt instanceof gt){var Tt=bt.__data__;if(!K||Tt.length<199)return Tt.push([at,dt]),this.size=++bt.size,this;bt=this.__data__=new xt(Tt)}return bt.set(at,dt),this.size=bt.size,this};var ke=G?function(at){return at==null?[]:(at=Object(at),(function(dt,bt){for(var Tt=-1,Kt=dt==null?0:dt.length,Mt=0,ee=[];++Tt<Kt;){var Zt=dt[Tt];bt(Zt,Tt,dt)&&(ee[Mt++]=Zt)}return ee})(G(at),(function(dt){return X.call(at,dt)})))}:function(){return[]},Yt=Ht;function we(at,dt){return!!(dt=dt??9007199254740991)&&(typeof at=="number"||u.test(at))&&at>-1&&at%1==0&&at<dt}function ue(at){if(at!=null){try{return y.call(at)}catch{}try{return at+""}catch{}}return""}function se(at,dt){return at===dt||at!=at&&dt!=dt}(U&&Yt(new U(new ArrayBuffer(1)))!="[object DataView]"||K&&Yt(new K)!=n||rt&&Yt(rt.resolve())!="[object Promise]"||Z&&Yt(new Z)!=e||et&&Yt(new et)!="[object WeakMap]")&&(Yt=function(at){var dt=Ht(at),bt=dt==s?at.constructor:void 0,Tt=bt?ue(bt):"";if(Tt)switch(Tt){case lt:return"[object DataView]";case Q:return n;case ot:return"[object Promise]";case nt:return e;case ut:return"[object WeakMap]"}return dt});var je=zt((function(){return arguments})())?zt:function(at){return _e(at)&&w.call(at,"callee")&&!X.call(at,"callee")},xe=Array.isArray,Qt=N||function(){return!1};function be(at){if(!te(at))return!1;var dt=Ht(at);return dt=="[object Function]"||dt=="[object GeneratorFunction]"||dt=="[object AsyncFunction]"||dt=="[object Proxy]"}function Te(at){return typeof at=="number"&&at>-1&&at%1==0&&at<=9007199254740991}function te(at){var dt=typeof at;return at!=null&&(dt=="object"||dt=="function")}function _e(at){return at!=null&&typeof at=="object"}var Re=I?(function(at){return function(dt){return at(dt)}})(I):function(at){return _e(at)&&Te(at.length)&&!!a[Ht(at)]};function ne(at){return(dt=at)!=null&&Te(dt.length)&&!be(dt)?At(at):Ct(at);var dt}l.exports=function(at,dt){return Xt(at,dt)}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,l,c){(function(o){(function(){var r=typeof o=="object"&&o&&o.Object===Object&&o,n=typeof self=="object"&&self&&self.Object===Object&&self,s=r||n||Function("return this")(),e=Object.prototype,i=e.hasOwnProperty,u=e.toString,a=s.Symbol,h=a?a.toStringTag:void 0;function p(m){return m==null?m===void 0?"[object Undefined]":"[object Null]":h&&h in Object(m)?(function(d){var b=i.call(d,h),g=d[h];try{d[h]=void 0;var S=!0}catch{}var C=u.call(d);return S&&(b?d[h]=g:delete d[h]),C})(m):(function(d){return u.call(d)})(m)}l.exports=function(m){if(!(function(b){var g=typeof b;return b!=null&&(g=="object"||g=="function")})(m))return!1;var d=p(m);return d=="[object Function]"||d=="[object GeneratorFunction]"||d=="[object AsyncFunction]"||d=="[object Proxy]"}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,l,c){l.exports=function(o){return o==null}},{}],448:[function(t,l,c){l.exports=function(o){return o===void 0}},{}],449:[function(t,l,c){(function(o){(function(){var r=/^\[object .+?Constructor\]$/,n=typeof o=="object"&&o&&o.Object===Object&&o,s=typeof self=="object"&&self&&self.Object===Object&&self,e=n||s||Function("return this")();function i(j,V){return!!(j&&j.length)&&(function(X,J,L){if(J!=J)return(function(R,U,K,rt){for(var Z=R.length,et=K+-1;++et<Z;)if(U(R[et],et,R))return et;return-1})(X,u,L);for(var G=L-1,N=X.length;++G<N;)if(X[G]===J)return G;return-1})(j,V,0)>-1}function u(j){return j!=j}function a(j,V){return j.has(V)}function h(j){var V=-1,X=Array(j.size);return j.forEach((function(J){X[++V]=J})),X}var p,m=Array.prototype,d=Function.prototype,b=Object.prototype,g=e["__core-js_shared__"],S=(p=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",C=d.toString,I=b.hasOwnProperty,D=b.toString,z=RegExp("^"+C.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m.splice,B=T(e,"Map"),F=T(e,"Set"),W=T(Object,"create");function q(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function A(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function M(j){var V=-1,X=j?j.length:0;for(this.clear();++V<X;){var J=j[V];this.set(J[0],J[1])}}function k(j){var V=-1,X=j?j.length:0;for(this.__data__=new M;++V<X;)this.add(j[V])}function y(j,V){for(var X,J,L=j.length;L--;)if((X=j[L][0])===(J=V)||X!=X&&J!=J)return L;return-1}function w(j){return!(!O(j)||(V=j,S&&S in V))&&((function(X){var J=O(X)?D.call(X):"";return J=="[object Function]"||J=="[object GeneratorFunction]"})(j)||(function(X){var J=!1;if(X!=null&&typeof X.toString!="function")try{J=!!(X+"")}catch{}return J})(j)?z:r).test((function(X){if(X!=null){try{return C.call(X)}catch{}try{return X+""}catch{}}return""})(j));var V}q.prototype.clear=function(){this.__data__=W?W(null):{}},q.prototype.delete=function(j){return this.has(j)&&delete this.__data__[j]},q.prototype.get=function(j){var V=this.__data__;if(W){var X=V[j];return X==="__lodash_hash_undefined__"?void 0:X}return I.call(V,j)?V[j]:void 0},q.prototype.has=function(j){var V=this.__data__;return W?V[j]!==void 0:I.call(V,j)},q.prototype.set=function(j,V){return this.__data__[j]=W&&V===void 0?"__lodash_hash_undefined__":V,this},A.prototype.clear=function(){this.__data__=[]},A.prototype.delete=function(j){var V=this.__data__,X=y(V,j);return!(X<0)&&(X==V.length-1?V.pop():P.call(V,X,1),!0)},A.prototype.get=function(j){var V=this.__data__,X=y(V,j);return X<0?void 0:V[X][1]},A.prototype.has=function(j){return y(this.__data__,j)>-1},A.prototype.set=function(j,V){var X=this.__data__,J=y(X,j);return J<0?X.push([j,V]):X[J][1]=V,this},M.prototype.clear=function(){this.__data__={hash:new q,map:new(B||A),string:new q}},M.prototype.delete=function(j){return _(this,j).delete(j)},M.prototype.get=function(j){return _(this,j).get(j)},M.prototype.has=function(j){return _(this,j).has(j)},M.prototype.set=function(j,V){return _(this,j).set(j,V),this},k.prototype.add=k.prototype.push=function(j){return this.__data__.set(j,"__lodash_hash_undefined__"),this},k.prototype.has=function(j){return this.__data__.has(j)};var x=F&&1/h(new F([,-0]))[1]==1/0?function(j){return new F(j)}:function(){};function _(j,V){var X,J,L=j.__data__;return((J=typeof(X=V))=="string"||J=="number"||J=="symbol"||J=="boolean"?X!=="__proto__":X===null)?L[typeof V=="string"?"string":"hash"]:L.map}function T(j,V){var X=(function(J,L){return J==null?void 0:J[L]})(j,V);return w(X)?X:void 0}function O(j){var V=typeof j;return!!j&&(V=="object"||V=="function")}l.exports=function(j){return j&&j.length?(function(V,X,J){var L=-1,G=i,N=V.length,R=!0,U=[],K=U;if(N>=200){var rt=x(V);if(rt)return h(rt);R=!1,G=a,K=new k}else K=U;t:for(;++L<N;){var Z=V[L],et=Z;if(Z=Z!==0?Z:0,R&&et==et){for(var ht=K.length;ht--;)if(K[ht]===et)continue t;U.push(Z)}else G(K,et,J)||(K!==U&&K.push(et),U.push(Z))}return U})(j):[]}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,l,c){var o=t("inherits"),r=t("hash-base"),n=t("safe-buffer").Buffer,s=new Array(16);function e(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(m,d){return m<<d|m>>>32-d}function u(m,d,b,g,S,C,I){return i(m+(d&b|~d&g)+S+C|0,I)+d|0}function a(m,d,b,g,S,C,I){return i(m+(d&g|b&~g)+S+C|0,I)+d|0}function h(m,d,b,g,S,C,I){return i(m+(d^b^g)+S+C|0,I)+d|0}function p(m,d,b,g,S,C,I){return i(m+(b^(d|~g))+S+C|0,I)+d|0}o(e,r),e.prototype._update=function(){for(var m=s,d=0;d<16;++d)m[d]=this._block.readInt32LE(4*d);var b=this._a,g=this._b,S=this._c,C=this._d;b=u(b,g,S,C,m[0],3614090360,7),C=u(C,b,g,S,m[1],3905402710,12),S=u(S,C,b,g,m[2],606105819,17),g=u(g,S,C,b,m[3],3250441966,22),b=u(b,g,S,C,m[4],4118548399,7),C=u(C,b,g,S,m[5],1200080426,12),S=u(S,C,b,g,m[6],2821735955,17),g=u(g,S,C,b,m[7],4249261313,22),b=u(b,g,S,C,m[8],1770035416,7),C=u(C,b,g,S,m[9],2336552879,12),S=u(S,C,b,g,m[10],4294925233,17),g=u(g,S,C,b,m[11],2304563134,22),b=u(b,g,S,C,m[12],1804603682,7),C=u(C,b,g,S,m[13],4254626195,12),S=u(S,C,b,g,m[14],2792965006,17),b=a(b,g=u(g,S,C,b,m[15],1236535329,22),S,C,m[1],4129170786,5),C=a(C,b,g,S,m[6],3225465664,9),S=a(S,C,b,g,m[11],643717713,14),g=a(g,S,C,b,m[0],3921069994,20),b=a(b,g,S,C,m[5],3593408605,5),C=a(C,b,g,S,m[10],38016083,9),S=a(S,C,b,g,m[15],3634488961,14),g=a(g,S,C,b,m[4],3889429448,20),b=a(b,g,S,C,m[9],568446438,5),C=a(C,b,g,S,m[14],3275163606,9),S=a(S,C,b,g,m[3],4107603335,14),g=a(g,S,C,b,m[8],1163531501,20),b=a(b,g,S,C,m[13],2850285829,5),C=a(C,b,g,S,m[2],4243563512,9),S=a(S,C,b,g,m[7],1735328473,14),b=h(b,g=a(g,S,C,b,m[12],2368359562,20),S,C,m[5],4294588738,4),C=h(C,b,g,S,m[8],2272392833,11),S=h(S,C,b,g,m[11],1839030562,16),g=h(g,S,C,b,m[14],4259657740,23),b=h(b,g,S,C,m[1],2763975236,4),C=h(C,b,g,S,m[4],1272893353,11),S=h(S,C,b,g,m[7],4139469664,16),g=h(g,S,C,b,m[10],3200236656,23),b=h(b,g,S,C,m[13],681279174,4),C=h(C,b,g,S,m[0],3936430074,11),S=h(S,C,b,g,m[3],3572445317,16),g=h(g,S,C,b,m[6],76029189,23),b=h(b,g,S,C,m[9],3654602809,4),C=h(C,b,g,S,m[12],3873151461,11),S=h(S,C,b,g,m[15],530742520,16),b=p(b,g=h(g,S,C,b,m[2],3299628645,23),S,C,m[0],4096336452,6),C=p(C,b,g,S,m[7],1126891415,10),S=p(S,C,b,g,m[14],2878612391,15),g=p(g,S,C,b,m[5],4237533241,21),b=p(b,g,S,C,m[12],1700485571,6),C=p(C,b,g,S,m[3],2399980690,10),S=p(S,C,b,g,m[10],4293915773,15),g=p(g,S,C,b,m[1],2240044497,21),b=p(b,g,S,C,m[8],1873313359,6),C=p(C,b,g,S,m[15],4264355552,10),S=p(S,C,b,g,m[6],2734768916,15),g=p(g,S,C,b,m[13],1309151649,21),b=p(b,g,S,C,m[4],4149444226,6),C=p(C,b,g,S,m[11],3174756917,10),S=p(S,C,b,g,m[2],718787259,15),g=p(g,S,C,b,m[9],3951481745,21),this._a=this._a+b|0,this._b=this._b+g|0,this._c=this._c+S|0,this._d=this._d+C|0},e.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=n.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},l.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,l,c){var o=t("bn.js"),r=t("brorand");function n(s){this.rand=s||new r.Rand}l.exports=n,n.create=function(s){return new n(s)},n.prototype._randbelow=function(s){var e=s.bitLength(),i=Math.ceil(e/8);do var u=new o(this.rand.generate(i));while(u.cmp(s)>=0);return u},n.prototype._randrange=function(s,e){var i=e.sub(s);return s.add(this._randbelow(i))},n.prototype.test=function(s,e,i){var u=s.bitLength(),a=o.mont(s),h=new o(1).toRed(a);e||(e=Math.max(1,u/48|0));for(var p=s.subn(1),m=0;!p.testn(m);m++);for(var d=s.shrn(m),b=p.toRed(a);e>0;e--){var g=this._randrange(new o(2),p);i&&i(g);var S=g.toRed(a).redPow(d);if(S.cmp(h)!==0&&S.cmp(b)!==0){for(var C=1;C<m;C++){if((S=S.redSqr()).cmp(h)===0)return!1;if(S.cmp(b)===0)break}if(C===m)return!1}}return!0},n.prototype.getDivisor=function(s,e){var i=s.bitLength(),u=o.mont(s),a=new o(1).toRed(u);e||(e=Math.max(1,i/48|0));for(var h=s.subn(1),p=0;!h.testn(p);p++);for(var m=s.shrn(p),d=h.toRed(u);e>0;e--){var b=this._randrange(new o(2),h),g=s.gcd(b);if(g.cmpn(1)!==0)return g;var S=b.toRed(u).redPow(m);if(S.cmp(a)!==0&&S.cmp(d)!==0){for(var C=1;C<p;C++){if((S=S.redSqr()).cmp(a)===0)return S.fromRed().subn(1).gcd(s);if(S.cmp(d)===0)break}if(C===p)return(S=S.redSqr()).fromRed().subn(1).gcd(s)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],453:[function(t,l,c){function o(r,n){if(!r)throw new Error(n||"Assertion failed")}l.exports=o,o.equal=function(r,n,s){if(r!=n)throw new Error(s||"Assertion failed: "+r+" != "+n)}},{}],454:[function(t,l,c){var o=c;function r(s){return s.length===1?"0"+s:s}function n(s){for(var e="",i=0;i<s.length;i++)e+=r(s[i].toString(16));return e}o.toArray=function(s,e){if(Array.isArray(s))return s.slice();if(!s)return[];var i=[];if(typeof s!="string"){for(var u=0;u<s.length;u++)i[u]=0|s[u];return i}if(e==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),u=0;u<s.length;u+=2)i.push(parseInt(s[u]+s[u+1],16));else for(u=0;u<s.length;u++){var a=s.charCodeAt(u),h=a>>8,p=255&a;h?i.push(h,p):i.push(p)}return i},o.zero2=r,o.toHex=n,o.encode=function(s,e){return e==="hex"?n(s):s}},{}],455:[function(t,l,c){l.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(t,l,c){var o=t("asn1.js");c.certificate=t("./certificate");var r=o.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));c.RSAPrivateKey=r;var n=o.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));c.RSAPublicKey=n;var s=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())}));c.PublicKey=s;var e=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),i=o.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())}));c.PrivateKey=i;var u=o.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c.EncryptedPrivateKey=u;var a=o.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));c.DSAPrivateKey=a,c.DSAparam=o.define("DSAparam",(function(){this.int()}));var h=o.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())}));c.ECPrivateKey=h;var p=o.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));c.signature=o.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(t,l,c){var o=t("asn1.js"),r=o.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),n=o.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=o.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),e=o.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),i=o.define("RelativeDistinguishedName",(function(){this.setof(n)})),u=o.define("RDNSequence",(function(){this.seqof(i)})),a=o.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),h=o.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),p=o.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),m=o.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(a),this.key("validity").use(h),this.key("subject").use(a),this.key("subjectPublicKeyInfo").use(e),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())})),d=o.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));l.exports=d},{"asn1.js":170}],458:[function(t,l,c){var o=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=t("evp_bytestokey"),e=t("browserify-aes"),i=t("safe-buffer").Buffer;l.exports=function(u,a){var h,p=u.toString(),m=p.match(o);if(m){var d="aes"+m[1],b=i.from(m[2],"hex"),g=i.from(m[3].replace(/[\r\n]/g,""),"base64"),S=s(a,b.slice(0,8),parseInt(m[1],10)).key,C=[],I=e.createDecipheriv(d,S,b);C.push(I.update(g)),C.push(I.final()),h=i.concat(C)}else{var D=p.match(n);h=i.from(D[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(r)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,l,c){var o=t("./asn1"),r=t("./aesid.json"),n=t("./fixProc"),s=t("browserify-aes"),e=t("pbkdf2"),i=t("safe-buffer").Buffer;function u(a){var h;typeof a!="object"||i.isBuffer(a)||(h=a.passphrase,a=a.key),typeof a=="string"&&(a=i.from(a));var p,m,d=n(a,h),b=d.tag,g=d.data;switch(b){case"CERTIFICATE":m=o.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(m||(m=o.PublicKey.decode(g,"der")),p=m.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPublicKey.decode(m.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return m.subjectPrivateKey=m.subjectPublicKey,{type:"ec",data:m};case"1.2.840.10040.4.1":return m.algorithm.params.pub_key=o.DSAparam.decode(m.subjectPublicKey.data,"der"),{type:"dsa",data:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":g=(function(S,C){var I=S.algorithm.decrypt.kde.kdeparams.salt,D=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),z=r[S.algorithm.decrypt.cipher.algo.join(".")],P=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,F=parseInt(z.split("-")[1],10)/8,W=e.pbkdf2Sync(C,I,D,F,"sha1"),q=s.createDecipheriv(z,W,P),A=[];return A.push(q.update(B)),A.push(q.final()),i.concat(A)})(g=o.EncryptedPrivateKey.decode(g,"der"),h);case"PRIVATE KEY":switch(p=(m=o.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return o.RSAPrivateKey.decode(m.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:m.algorithm.curve,privateKey:o.ECPrivateKey.decode(m.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return m.algorithm.params.priv_key=o.DSAparam.decode(m.subjectPrivateKey,"der"),{type:"dsa",params:m.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return o.RSAPublicKey.decode(g,"der");case"RSA PRIVATE KEY":return o.RSAPrivateKey.decode(g,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:o.DSAPrivateKey.decode(g,"der")};case"EC PRIVATE KEY":return{curve:(g=o.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+b)}}l.exports=u,u.signature=o.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,l,c){c.pbkdf2=t("./lib/async"),c.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,l,c){(function(o){(function(){var r,n,s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./sync"),a=t("./to-buffer"),h=o.crypto&&o.crypto.subtle,p={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function d(){return n||(n=o.process&&o.process.nextTick?o.process.nextTick:o.queueMicrotask?o.queueMicrotask:o.setImmediate?o.setImmediate:o.setTimeout)}function b(g,S,C,I,D){return h.importKey("raw",g,{name:"PBKDF2"},!1,["deriveBits"]).then((function(z){return h.deriveBits({name:"PBKDF2",salt:S,iterations:C,hash:{name:D}},z,I<<3)})).then((function(z){return s.from(z)}))}l.exports=function(g,S,C,I,D,z){typeof D=="function"&&(z=D,D=void 0);var P=p[(D=D||"sha1").toLowerCase()];if(P&&typeof o.Promise=="function"){if(e(C,I),g=a(g,i,"Password"),S=a(S,i,"Salt"),typeof z!="function")throw new Error("No callback provided to pbkdf2");(function(B,F){B.then((function(W){d()((function(){F(null,W)}))}),(function(W){d()((function(){F(W)}))}))})((function(B){if(o.process&&!o.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(m[B]!==void 0)return m[B];var F=b(r=r||s.alloc(8),r,10,128,B).then((function(){return!0})).catch((function(){return!1}));return m[B]=F,F})(P).then((function(B){return B?b(g,S,C,I,P):u(g,S,C,I,D)})),z)}else d()((function(){var B;try{B=u(g,S,C,I,D)}catch(F){return z(F)}z(null,B)}))}}).call(this)}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,l,c){(function(o,r){(function(){var n;r.process&&r.process.browser?n="utf-8":r.process&&r.process.version?n=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":n="utf-8",l.exports=n}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,l,c){var o=Math.pow(2,30)-1;l.exports=function(r,n){if(typeof r!="number")throw new TypeError("Iterations not a number");if(r<0)throw new TypeError("Bad iterations");if(typeof n!="number")throw new TypeError("Key length not a number");if(n<0||n>o||n!=n)throw new TypeError("Bad key length")}},{}],464:[function(t,l,c){var o=t("create-hash/md5"),r=t("ripemd160"),n=t("sha.js"),s=t("safe-buffer").Buffer,e=t("./precondition"),i=t("./default-encoding"),u=t("./to-buffer"),a=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(m,d,b){var g=(function(P){function B(F){return n(P).update(F).digest()}return P==="rmd160"||P==="ripemd160"?function(F){return new r().update(F).digest()}:P==="md5"?o:B})(m),S=m==="sha512"||m==="sha384"?128:64;d.length>S?d=g(d):d.length<S&&(d=s.concat([d,a],S));for(var C=s.allocUnsafe(S+h[m]),I=s.allocUnsafe(S+h[m]),D=0;D<S;D++)C[D]=54^d[D],I[D]=92^d[D];var z=s.allocUnsafe(S+b+4);C.copy(z,0,0,S),this.ipad1=z,this.ipad2=C,this.opad=I,this.alg=m,this.blocksize=S,this.hash=g,this.size=h[m]}p.prototype.run=function(m,d){return m.copy(d,this.blocksize),this.hash(d).copy(this.opad,this.blocksize),this.hash(this.opad)},l.exports=function(m,d,b,g,S){e(b,g);var C=new p(S=S||"sha1",m=u(m,i,"Password"),(d=u(d,i,"Salt")).length),I=s.allocUnsafe(g),D=s.allocUnsafe(d.length+4);d.copy(D,0,0,d.length);for(var z=0,P=h[S],B=Math.ceil(g/P),F=1;F<=B;F++){D.writeUInt32BE(F,d.length);for(var W=C.run(D,C.ipad1),q=W,A=1;A<b;A++){q=C.run(q,C.ipad2);for(var M=0;M<P;M++)W[M]^=q[M]}W.copy(I,z),z+=P}return I}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,l,c){var o=t("safe-buffer").Buffer;l.exports=function(r,n,s){if(o.isBuffer(r))return r;if(typeof r=="string")return o.from(r,n);if(ArrayBuffer.isView(r))return o.from(r.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,l,c){(function(o){(function(){o===void 0||!o.version||o.version.indexOf("v0.")===0||o.version.indexOf("v1.")===0&&o.version.indexOf("v1.8.")!==0?l.exports={nextTick:function(r,n,s,e){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var i,u,a=arguments.length;switch(a){case 0:case 1:return o.nextTick(r);case 2:return o.nextTick((function(){r.call(null,n)}));case 3:return o.nextTick((function(){r.call(null,n,s)}));case 4:return o.nextTick((function(){r.call(null,n,s,e)}));default:for(i=new Array(a-1),u=0;u<i.length;)i[u++]=arguments[u];return o.nextTick((function(){r.apply(null,i)}))}}}:l.exports=o}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,l,c){var o,r,n=l.exports={};function s(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function i(S){if(o===setTimeout)return setTimeout(S,0);if((o===s||!o)&&setTimeout)return o=setTimeout,setTimeout(S,0);try{return o(S,0)}catch{try{return o.call(null,S,0)}catch{return o.call(this,S,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:s}catch{o=s}try{r=typeof clearTimeout=="function"?clearTimeout:e}catch{r=e}})();var u,a=[],h=!1,p=-1;function m(){h&&u&&(h=!1,u.length?a=u.concat(a):p=-1,a.length&&d())}function d(){if(!h){var S=i(m);h=!0;for(var C=a.length;C;){for(u=a,a=[];++p<C;)u&&u[p].run();p=-1,C=a.length}u=null,h=!1,(function(I){if(r===clearTimeout)return clearTimeout(I);if((r===e||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(I);try{r(I)}catch{try{return r.call(null,I)}catch{return r.call(this,I)}}})(S)}}function b(S,C){this.fun=S,this.array=C}function g(){}n.nextTick=function(S){var C=new Array(arguments.length-1);if(arguments.length>1)for(var I=1;I<arguments.length;I++)C[I-1]=arguments[I];a.push(new b(S,C)),a.length!==1||h||i(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=g,n.addListener=g,n.once=g,n.off=g,n.removeListener=g,n.removeAllListeners=g,n.emit=g,n.prependListener=g,n.prependOnceListener=g,n.listeners=function(S){return[]},n.binding=function(S){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(S){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},{}],468:[function(t,l,c){c.publicEncrypt=t("./publicEncrypt"),c.privateDecrypt=t("./privateDecrypt"),c.privateEncrypt=function(o,r){return c.publicEncrypt(o,r,!0)},c.publicDecrypt=function(o,r){return c.privateDecrypt(o,r,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,l,c){var o=t("create-hash"),r=t("safe-buffer").Buffer;function n(s){var e=r.allocUnsafe(4);return e.writeUInt32BE(s,0),e}l.exports=function(s,e){for(var i,u=r.alloc(0),a=0;u.length<e;)i=n(a++),u=r.concat([u,o("sha1").update(s).update(i).digest()]);return u.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,l,c){arguments[4][184][0].apply(c,arguments)},{buffer:188,dup:184}],471:[function(t,l,c){var o=t("parse-asn1"),r=t("./mgf"),n=t("./xor"),s=t("bn.js"),e=t("browserify-rsa"),i=t("create-hash"),u=t("./withPublic"),a=t("safe-buffer").Buffer;l.exports=function(h,p,m){var d;d=h.padding?h.padding:m?1:4;var b,g=o(h),S=g.modulus.byteLength();if(p.length>S||new s(p).cmp(g.modulus)>=0)throw new Error("decryption error");b=m?u(new s(p),g):e(p,g);var C=a.alloc(S-b.length);if(b=a.concat([C,b],S),d===4)return(function(I,D){var z=I.modulus.byteLength(),P=i("sha1").update(a.alloc(0)).digest(),B=P.length;if(D[0]!==0)throw new Error("decryption error");var F=D.slice(1,B+1),W=D.slice(B+1),q=n(F,r(W,B)),A=n(W,r(q,z-B-1));if((function(k,y){k=a.from(k),y=a.from(y);var w=0,x=k.length;k.length!==y.length&&(w++,x=Math.min(k.length,y.length));for(var _=-1;++_<x;)w+=k[_]^y[_];return w})(P,A.slice(0,B)))throw new Error("decryption error");for(var M=B;A[M]===0;)M++;if(A[M++]!==1)throw new Error("decryption error");return A.slice(M)})(g,b);if(d===1)return(function(I,D,z){for(var P=D.slice(0,2),B=2,F=0;D[B++]!==0;)if(B>=D.length){F++;break}var W=D.slice(2,B-1);if((P.toString("hex")!=="0002"&&!z||P.toString("hex")!=="0001"&&z)&&F++,W.length<8&&F++,F)throw new Error("decryption error");return D.slice(B)})(0,b,m);if(d===3)return b;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(t,l,c){var o=t("parse-asn1"),r=t("randombytes"),n=t("create-hash"),s=t("./mgf"),e=t("./xor"),i=t("bn.js"),u=t("./withPublic"),a=t("browserify-rsa"),h=t("safe-buffer").Buffer;l.exports=function(p,m,d){var b;b=p.padding?p.padding:d?1:4;var g,S=o(p);if(b===4)g=(function(C,I){var D=C.modulus.byteLength(),z=I.length,P=n("sha1").update(h.alloc(0)).digest(),B=P.length,F=2*B;if(z>D-F-2)throw new Error("message too long");var W=h.alloc(D-z-F-2),q=D-B-1,A=r(B),M=e(h.concat([P,W,h.alloc(1,1),I],q),s(A,q)),k=e(A,s(M,B));return new i(h.concat([h.alloc(1),k,M],D))})(S,m);else if(b===1)g=(function(C,I,D){var z,P=I.length,B=C.modulus.byteLength();if(P>B-11)throw new Error("message too long");return z=D?h.alloc(B-P-3,255):(function(F){for(var W,q=h.allocUnsafe(F),A=0,M=r(2*F),k=0;A<F;)k===M.length&&(M=r(2*F),k=0),(W=M[k++])&&(q[A++]=W);return q})(B-P-3),new i(h.concat([h.from([0,D?1:2]),z,h.alloc(1),I],B))})(S,m,d);else{if(b!==3)throw new Error("unknown padding");if((g=new i(m)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return d?a(g,S):u(g,S)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(t,l,c){var o=t("bn.js"),r=t("safe-buffer").Buffer;l.exports=function(n,s){return r.from(n.toRed(o.mont(s.modulus)).redPow(new o(s.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,l,c){l.exports=function(o,r){for(var n=o.length,s=-1;++s<n;)o[s]^=r[s];return o}},{}],475:[function(t,l,c){(function(o,r){(function(){var n=t("safe-buffer").Buffer,s=r.crypto||r.msCrypto;s&&s.getRandomValues?l.exports=function(e,i){if(e>4294967295)throw new RangeError("requested too many random bytes");var u=n.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(u.slice(a,a+65536));else s.getRandomValues(u);return typeof i=="function"?o.nextTick((function(){i(null,u)})):u}:l.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
276
276
|
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(t,l,c){(function(o,r){(function(){function n(){throw new Error(`secure random number generation not supported by this browser
|
|
277
277
|
use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("randombytes"),i=s.Buffer,u=s.kMaxLength,a=r.crypto||r.msCrypto,h=Math.pow(2,32)-1;function p(b,g){if(typeof b!="number"||b!=b)throw new TypeError("offset must be a number");if(b>h||b<0)throw new TypeError("offset must be a uint32");if(b>u||b>g)throw new RangeError("offset out of range")}function m(b,g,S){if(typeof b!="number"||b!=b)throw new TypeError("size must be a number");if(b>h||b<0)throw new TypeError("size must be a uint32");if(b+g>S||b>u)throw new RangeError("buffer too small")}function d(b,g,S,C){if(o.browser){var I=b.buffer,D=new Uint8Array(I,g,S);return a.getRandomValues(D),C?void o.nextTick((function(){C(null,b)})):b}if(!C)return e(S).copy(b,g),b;e(S,(function(z,P){if(z)return C(z);P.copy(b,g),C(null,b)}))}a&&a.getRandomValues||!o.browser?(c.randomFill=function(b,g,S,C){if(!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof g=="function")C=g,g=0,S=b.length;else if(typeof S=="function")C=S,S=b.length-g;else if(typeof C!="function")throw new TypeError('"cb" argument must be a function');return p(g,b.length),m(S,g,b.length),d(b,g,S,C)},c.randomFillSync=function(b,g,S){if(g===void 0&&(g=0),!(i.isBuffer(b)||b instanceof r.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return p(g,b.length),S===void 0&&(S=b.length-g),m(S,g,b.length),d(b,g,S)}):(c.randomFill=n,c.randomFillSync=n)}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(t,l,c){var o={};function r(s,e,i){i||(i=Error);var u=(function(a){var h,p;function m(d,b,g){return a.call(this,(function(S,C,I){return typeof e=="string"?e:e(S,C,I)})(d,b,g))||this}return p=a,(h=m).prototype=Object.create(p.prototype),h.prototype.constructor=h,h.__proto__=p,m})(i);u.prototype.name=i.name,u.prototype.code=s,o[s]=u}function n(s,e){if(Array.isArray(s)){var i=s.length;return s=s.map((function(u){return String(u)})),i>2?"one of ".concat(e," ").concat(s.slice(0,i-1).join(", "),", or ")+s[i-1]:i===2?"one of ".concat(e," ").concat(s[0]," or ").concat(s[1]):"of ".concat(e," ").concat(s[0])}return"of ".concat(e," ").concat(String(s))}r("ERR_INVALID_OPT_VALUE",(function(s,e){return'The value "'+e+'" is invalid for option "'+s+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(s,e,i){var u,a,h;if(typeof e=="string"&&(a="not ",e.substr(0,a.length)===a)?(u="must not be",e=e.replace(/^not /,"")):u="must be",(function(m,d,b){return(b===void 0||b>m.length)&&(b=m.length),m.substring(b-d.length,b)===d})(s," argument"))h="The ".concat(s," ").concat(u," ").concat(n(e,"type"));else{var p=(function(m,d,b){return typeof b!="number"&&(b=0),!(b+d.length>m.length)&&m.indexOf(d,b)!==-1})(s,".")?"property":"argument";h='The "'.concat(s,'" ').concat(p," ").concat(u," ").concat(n(e,"type"))}return h+=". Received type ".concat(typeof i)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(s){return"The "+s+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(s){return"Cannot call "+s+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(s){return"Unknown encoding: "+s}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),l.exports.codes=o},{}],478:[function(t,l,c){(function(o){(function(){var r=Object.keys||function(m){var d=[];for(var b in m)d.push(b);return d};l.exports=a;var n=t("./_stream_readable"),s=t("./_stream_writable");t("inherits")(a,n);for(var e=r(s.prototype),i=0;i<e.length;i++){var u=e[i];a.prototype[u]||(a.prototype[u]=s.prototype[u])}function a(m){if(!(this instanceof a))return new a(m);n.call(this,m),s.call(this,m),this.allowHalfOpen=!0,m&&(m.readable===!1&&(this.readable=!1),m.writable===!1&&(this.writable=!1),m.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||o.nextTick(p,this)}function p(m){m.end()}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(m){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=m,this._writableState.destroyed=m)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(t,l,c){l.exports=r;var o=t("./_stream_transform");function r(n){if(!(this instanceof r))return new r(n);o.call(this,n)}t("inherits")(r,o),r.prototype._transform=function(n,s,e){e(null,n)}},{"./_stream_transform":481,inherits:440}],480:[function(t,l,c){(function(o,r){(function(){var n;l.exports=q,q.ReadableState=W,t("events").EventEmitter;var s=function(N,R){return N.listeners(R).length},e=t("./internal/streams/stream"),i=t("buffer").Buffer,u=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},a,h=t("util");a=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m,d,b=t("./internal/streams/buffer_list"),g=t("./internal/streams/destroy"),S=t("./internal/streams/state").getHighWaterMark,C=t("../errors").codes,I=C.ERR_INVALID_ARG_TYPE,D=C.ERR_STREAM_PUSH_AFTER_EOF,z=C.ERR_METHOD_NOT_IMPLEMENTED,P=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(q,e);var B=g.errorOrDestroy,F=["error","close","destroy","pause","resume"];function W(N,R,U){n=n||t("./_stream_duplex"),N=N||{},typeof U!="boolean"&&(U=R instanceof n),this.objectMode=!!N.objectMode,U&&(this.objectMode=this.objectMode||!!N.readableObjectMode),this.highWaterMark=S(this,N,"readableHighWaterMark",U),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=N.emitClose!==!1,this.autoDestroy=!!N.autoDestroy,this.destroyed=!1,this.defaultEncoding=N.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,N.encoding&&(p||(p=t("string_decoder/").StringDecoder),this.decoder=new p(N.encoding),this.encoding=N.encoding)}function q(N){if(n=n||t("./_stream_duplex"),!(this instanceof q))return new q(N);var R=this instanceof n;this._readableState=new W(N,this,R),this.readable=!0,N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy)),e.call(this)}function A(N,R,U,K,rt){a("readableAddChunk",R);var Z,et=N._readableState;if(R===null)et.reading=!1,(function(ht,lt){if(a("onEofChunk"),!lt.ended){if(lt.decoder){var Q=lt.decoder.end();Q&&Q.length&&(lt.buffer.push(Q),lt.length+=lt.objectMode?1:Q.length)}lt.ended=!0,lt.sync?y(ht):(lt.needReadable=!1,lt.emittedReadable||(lt.emittedReadable=!0,w(ht)))}})(N,et);else if(rt||(Z=(function(ht,lt){var Q;ot=lt,i.isBuffer(ot)||ot instanceof u||typeof lt=="string"||lt===void 0||ht.objectMode||(Q=new I("chunk",["string","Buffer","Uint8Array"],lt));var ot;return Q})(et,R)),Z)B(N,Z);else if(et.objectMode||R&&R.length>0)if(typeof R=="string"||et.objectMode||Object.getPrototypeOf(R)===i.prototype||(R=(function(ht){return i.from(ht)})(R)),K)et.endEmitted?B(N,new P):M(N,et,R,!0);else if(et.ended)B(N,new D);else{if(et.destroyed)return!1;et.reading=!1,et.decoder&&!U?(R=et.decoder.write(R),et.objectMode||R.length!==0?M(N,et,R,!1):x(N,et)):M(N,et,R,!1)}else K||(et.reading=!1,x(N,et));return!et.ended&&(et.length<et.highWaterMark||et.length===0)}function M(N,R,U,K){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,N.emit("data",U)):(R.length+=R.objectMode?1:U.length,K?R.buffer.unshift(U):R.buffer.push(U),R.needReadable&&y(N)),x(N,R)}Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(N){this._readableState&&(this._readableState.destroyed=N)}}),q.prototype.destroy=g.destroy,q.prototype._undestroy=g.undestroy,q.prototype._destroy=function(N,R){R(N)},q.prototype.push=function(N,R){var U,K=this._readableState;return K.objectMode?U=!0:typeof N=="string"&&((R=R||K.defaultEncoding)!==K.encoding&&(N=i.from(N,R),R=""),U=!0),A(this,N,R,!1,U)},q.prototype.unshift=function(N){return A(this,N,null,!0,!1)},q.prototype.isPaused=function(){return this._readableState.flowing===!1},q.prototype.setEncoding=function(N){p||(p=t("string_decoder/").StringDecoder);var R=new p(N);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var U=this._readableState.buffer.head,K="";U!==null;)K+=R.write(U.data),U=U.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};function k(N,R){return N<=0||R.length===0&&R.ended?0:R.objectMode?1:N!=N?R.flowing&&R.length?R.buffer.head.data.length:R.length:(N>R.highWaterMark&&(R.highWaterMark=(function(U){return U>=1073741824?U=1073741824:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U})(N)),N<=R.length?N:R.ended?R.length:(R.needReadable=!0,0))}function y(N){var R=N._readableState;a("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(a("emitReadable",R.flowing),R.emittedReadable=!0,o.nextTick(w,N))}function w(N){var R=N._readableState;a("emitReadable_",R.destroyed,R.length,R.ended),R.destroyed||!R.length&&!R.ended||(N.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,V(N)}function x(N,R){R.readingMore||(R.readingMore=!0,o.nextTick(_,N,R))}function _(N,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var U=R.length;if(a("maybeReadMore read 0"),N.read(0),U===R.length)break}R.readingMore=!1}function T(N){var R=N._readableState;R.readableListening=N.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:N.listenerCount("data")>0&&N.resume()}function O(N){a("readable nexttick read 0"),N.read(0)}function j(N,R){a("resume",R.reading),R.reading||N.read(0),R.resumeScheduled=!1,N.emit("resume"),V(N),R.flowing&&!R.reading&&N.read(0)}function V(N){var R=N._readableState;for(a("flow",R.flowing);R.flowing&&N.read()!==null;);}function X(N,R){return R.length===0?null:(R.objectMode?U=R.buffer.shift():!N||N>=R.length?(U=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):U=R.buffer.consume(N,R.decoder),U);var U}function J(N){var R=N._readableState;a("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,o.nextTick(L,R,N))}function L(N,R){if(a("endReadableNT",N.endEmitted,N.length),!N.endEmitted&&N.length===0&&(N.endEmitted=!0,R.readable=!1,R.emit("end"),N.autoDestroy)){var U=R._writableState;(!U||U.autoDestroy&&U.finished)&&R.destroy()}}function G(N,R){for(var U=0,K=N.length;U<K;U++)if(N[U]===R)return U;return-1}q.prototype.read=function(N){a("read",N),N=parseInt(N,10);var R=this._readableState,U=N;if(N!==0&&(R.emittedReadable=!1),N===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return a("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?J(this):y(this),null;if((N=k(N,R))===0&&R.ended)return R.length===0&&J(this),null;var K,rt=R.needReadable;return a("need readable",rt),(R.length===0||R.length-N<R.highWaterMark)&&a("length less than watermark",rt=!0),R.ended||R.reading?a("reading or ended",rt=!1):rt&&(a("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(N=k(U,R))),(K=N>0?X(N,R):null)===null?(R.needReadable=R.length<=R.highWaterMark,N=0):(R.length-=N,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),U!==N&&R.ended&&J(this)),K!==null&&this.emit("data",K),K},q.prototype._read=function(N){B(this,new z("_read()"))},q.prototype.pipe=function(N,R){var U=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=N;break;case 1:K.pipes=[K.pipes,N];break;default:K.pipes.push(N)}K.pipesCount+=1,a("pipe count=%d opts=%j",K.pipesCount,R);var rt=(!R||R.end!==!1)&&N!==o.stdout&&N!==o.stderr?et:ct;function Z(ft,mt){a("onunpipe"),ft===U&&mt&&mt.hasUnpiped===!1&&(mt.hasUnpiped=!0,a("cleanup"),N.removeListener("close",nt),N.removeListener("finish",ut),N.removeListener("drain",ht),N.removeListener("error",ot),N.removeListener("unpipe",Z),U.removeListener("end",et),U.removeListener("end",ct),U.removeListener("data",Q),lt=!0,!K.awaitDrain||N._writableState&&!N._writableState.needDrain||ht())}function et(){a("onend"),N.end()}K.endEmitted?o.nextTick(rt):U.once("end",rt),N.on("unpipe",Z);var ht=(function(ft){return function(){var mt=ft._readableState;a("pipeOnDrain",mt.awaitDrain),mt.awaitDrain&&mt.awaitDrain--,mt.awaitDrain===0&&s(ft,"data")&&(mt.flowing=!0,V(ft))}})(U);N.on("drain",ht);var lt=!1;function Q(ft){a("ondata");var mt=N.write(ft);a("dest.write",mt),mt===!1&&((K.pipesCount===1&&K.pipes===N||K.pipesCount>1&&G(K.pipes,N)!==-1)&&!lt&&(a("false write response, pause",K.awaitDrain),K.awaitDrain++),U.pause())}function ot(ft){a("onerror",ft),ct(),N.removeListener("error",ot),s(N,"error")===0&&B(N,ft)}function nt(){N.removeListener("finish",ut),ct()}function ut(){a("onfinish"),N.removeListener("close",nt),ct()}function ct(){a("unpipe"),U.unpipe(N)}return U.on("data",Q),(function(ft,mt,gt){if(typeof ft.prependListener=="function")return ft.prependListener(mt,gt);ft._events&&ft._events[mt]?Array.isArray(ft._events[mt])?ft._events[mt].unshift(gt):ft._events[mt]=[gt,ft._events[mt]]:ft.on(mt,gt)})(N,"error",ot),N.once("close",nt),N.once("finish",ut),N.emit("pipe",U),K.flowing||(a("pipe resume"),U.resume()),N},q.prototype.unpipe=function(N){var R=this._readableState,U={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return N&&N!==R.pipes||(N||(N=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,N&&N.emit("unpipe",this,U)),this;if(!N){var K=R.pipes,rt=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var Z=0;Z<rt;Z++)K[Z].emit("unpipe",this,{hasUnpiped:!1});return this}var et=G(R.pipes,N);return et===-1||(R.pipes.splice(et,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),N.emit("unpipe",this,U)),this},q.prototype.on=function(N,R){var U=e.prototype.on.call(this,N,R),K=this._readableState;return N==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):N==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,a("on readable",K.length,K.reading),K.length?y(this):K.reading||o.nextTick(O,this))),U},q.prototype.addListener=q.prototype.on,q.prototype.removeListener=function(N,R){var U=e.prototype.removeListener.call(this,N,R);return N==="readable"&&o.nextTick(T,this),U},q.prototype.removeAllListeners=function(N){var R=e.prototype.removeAllListeners.apply(this,arguments);return N!=="readable"&&N!==void 0||o.nextTick(T,this),R},q.prototype.resume=function(){var N=this._readableState;return N.flowing||(a("resume"),N.flowing=!N.readableListening,(function(R,U){U.resumeScheduled||(U.resumeScheduled=!0,o.nextTick(j,R,U))})(this,N)),N.paused=!1,this},q.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},q.prototype.wrap=function(N){var R=this,U=this._readableState,K=!1;for(var rt in N.on("end",(function(){if(a("wrapped end"),U.decoder&&!U.ended){var et=U.decoder.end();et&&et.length&&R.push(et)}R.push(null)})),N.on("data",(function(et){a("wrapped data"),U.decoder&&(et=U.decoder.write(et)),U.objectMode&&et==null||(U.objectMode||et&&et.length)&&(R.push(et)||(K=!0,N.pause()))})),N)this[rt]===void 0&&typeof N[rt]=="function"&&(this[rt]=(function(et){return function(){return N[et].apply(N,arguments)}})(rt));for(var Z=0;Z<F.length;Z++)N.on(F[Z],this.emit.bind(this,F[Z]));return this._read=function(et){a("wrapped _read",et),K&&(K=!1,N.resume())},this},typeof Symbol=="function"&&(q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=t("./internal/streams/async_iterator")),m(this)}),Object.defineProperty(q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}}),q._fromList=X,Object.defineProperty(q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(q.from=function(N,R){return d===void 0&&(d=t("./internal/streams/from")),d(q,N,R)})}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(t,l,c){l.exports=a;var o=t("../errors").codes,r=o.ERR_METHOD_NOT_IMPLEMENTED,n=o.ERR_MULTIPLE_CALLBACK,s=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=o.ERR_TRANSFORM_WITH_LENGTH_0,i=t("./_stream_duplex");function u(m,d){var b=this._transformState;b.transforming=!1;var g=b.writecb;if(g===null)return this.emit("error",new n);b.writechunk=null,b.writecb=null,d!=null&&this.push(d),g(m);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function a(m){if(!(this instanceof a))return new a(m);i.call(this,m),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,m&&(typeof m.transform=="function"&&(this._transform=m.transform),typeof m.flush=="function"&&(this._flush=m.flush)),this.on("prefinish",h)}function h(){var m=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush((function(d,b){p(m,d,b)}))}function p(m,d,b){if(d)return m.emit("error",d);if(b!=null&&m.push(b),m._writableState.length)throw new e;if(m._transformState.transforming)throw new s;return m.push(null)}t("inherits")(a,i),a.prototype.push=function(m,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,m,d)},a.prototype._transform=function(m,d,b){b(new r("_transform()"))},a.prototype._write=function(m,d,b){var g=this._transformState;if(g.writecb=b,g.writechunk=m,g.writeencoding=d,!g.transforming){var S=this._readableState;(g.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},a.prototype._read=function(m){var d=this._transformState;d.writechunk===null||d.transforming?d.needTransform=!0:(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform))},a.prototype._destroy=function(m,d){i.prototype._destroy.call(this,m,(function(b){d(b)}))}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(t,l,c){(function(o,r){(function(){function n(_){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(O,j,V){var X=O.entry;for(O.entry=null;X;){var J=X.callback;j.pendingcb--,J(V),X=X.next}j.corkedRequestsFree.next=O})(T,_)}}var s;l.exports=q,q.WritableState=W;var e={deprecate:t("util-deprecate")},i=t("./internal/streams/stream"),u=t("buffer").Buffer,a=(r!==void 0?r:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h,p=t("./internal/streams/destroy"),m=t("./internal/streams/state").getHighWaterMark,d=t("../errors").codes,b=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,S=d.ERR_MULTIPLE_CALLBACK,C=d.ERR_STREAM_CANNOT_PIPE,I=d.ERR_STREAM_DESTROYED,D=d.ERR_STREAM_NULL_VALUES,z=d.ERR_STREAM_WRITE_AFTER_END,P=d.ERR_UNKNOWN_ENCODING,B=p.errorOrDestroy;function F(){}function W(_,T,O){s=s||t("./_stream_duplex"),_=_||{},typeof O!="boolean"&&(O=T instanceof s),this.objectMode=!!_.objectMode,O&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=m(this,_,"writableHighWaterMark",O),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var j=_.decodeStrings===!1;this.decodeStrings=!j,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(V){(function(X,J){var L=X._writableState,G=L.sync,N=L.writecb;if(typeof N!="function")throw new S;if((function(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0})(L),J)(function(U,K,rt,Z,et){--K.pendingcb,rt?(o.nextTick(et,Z),o.nextTick(x,U,K),U._writableState.errorEmitted=!0,B(U,Z)):(et(Z),U._writableState.errorEmitted=!0,B(U,Z),x(U,K))})(X,L,G,J,N);else{var R=y(L)||X.destroyed;R||L.corked||L.bufferProcessing||!L.bufferedRequest||k(X,L),G?o.nextTick(M,X,L,R,N):M(X,L,R,N)}})(T,V)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=_.emitClose!==!1,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function q(_){var T=this instanceof(s=s||t("./_stream_duplex"));if(!T&&!h.call(q,this))return new q(_);this._writableState=new W(_,this,T),this.writable=!0,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),i.call(this)}function A(_,T,O,j,V,X,J){T.writelen=j,T.writecb=J,T.writing=!0,T.sync=!0,T.destroyed?T.onwrite(new I("write")):O?_._writev(V,T.onwrite):_._write(V,X,T.onwrite),T.sync=!1}function M(_,T,O,j){O||(function(V,X){X.length===0&&X.needDrain&&(X.needDrain=!1,V.emit("drain"))})(_,T),T.pendingcb--,j(),x(_,T)}function k(_,T){T.bufferProcessing=!0;var O=T.bufferedRequest;if(_._writev&&O&&O.next){var j=T.bufferedRequestCount,V=new Array(j),X=T.corkedRequestsFree;X.entry=O;for(var J=0,L=!0;O;)V[J]=O,O.isBuf||(L=!1),O=O.next,J+=1;V.allBuffers=L,A(_,T,!0,T.length,V,"",X.finish),T.pendingcb++,T.lastBufferedRequest=null,X.next?(T.corkedRequestsFree=X.next,X.next=null):T.corkedRequestsFree=new n(T),T.bufferedRequestCount=0}else{for(;O;){var G=O.chunk,N=O.encoding,R=O.callback;if(A(_,T,!1,T.objectMode?1:G.length,G,N,R),O=O.next,T.bufferedRequestCount--,T.writing)break}O===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=O,T.bufferProcessing=!1}function y(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function w(_,T){_._final((function(O){T.pendingcb--,O&&B(_,O),T.prefinished=!0,_.emit("prefinish"),x(_,T)}))}function x(_,T){var O=y(T);if(O&&((function(V,X){X.prefinished||X.finalCalled||(typeof V._final!="function"||X.destroyed?(X.prefinished=!0,V.emit("prefinish")):(X.pendingcb++,X.finalCalled=!0,o.nextTick(w,V,X)))})(_,T),T.pendingcb===0&&(T.finished=!0,_.emit("finish"),T.autoDestroy))){var j=_._readableState;(!j||j.autoDestroy&&j.endEmitted)&&_.destroy()}return O}t("inherits")(q,i),W.prototype.getBuffer=function(){for(var _=this.bufferedRequest,T=[];_;)T.push(_),_=_.next;return T},(function(){try{Object.defineProperty(W.prototype,"buffer",{get:e.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(_){return!!h.call(this,_)||this===q&&_&&_._writableState instanceof W}})):h=function(_){return _ instanceof this},q.prototype.pipe=function(){B(this,new C)},q.prototype.write=function(_,T,O){var j,V=this._writableState,X=!1,J=!V.objectMode&&(j=_,u.isBuffer(j)||j instanceof a);return J&&!u.isBuffer(_)&&(_=(function(L){return u.from(L)})(_)),typeof T=="function"&&(O=T,T=null),J?T="buffer":T||(T=V.defaultEncoding),typeof O!="function"&&(O=F),V.ending?(function(L,G){var N=new z;B(L,N),o.nextTick(G,N)})(this,O):(J||(function(L,G,N,R){var U;return N===null?U=new D:typeof N=="string"||G.objectMode||(U=new b("chunk",["string","Buffer"],N)),!U||(B(L,U),o.nextTick(R,U),!1)})(this,V,_,O))&&(V.pendingcb++,X=(function(L,G,N,R,U,K){if(!N){var rt=(function(lt,Q,ot){return lt.objectMode||lt.decodeStrings===!1||typeof Q!="string"||(Q=u.from(Q,ot)),Q})(G,R,U);R!==rt&&(N=!0,U="buffer",R=rt)}var Z=G.objectMode?1:R.length;G.length+=Z;var et=G.length<G.highWaterMark;if(et||(G.needDrain=!0),G.writing||G.corked){var ht=G.lastBufferedRequest;G.lastBufferedRequest={chunk:R,encoding:U,isBuf:N,callback:K,next:null},ht?ht.next=G.lastBufferedRequest:G.bufferedRequest=G.lastBufferedRequest,G.bufferedRequestCount+=1}else A(L,G,!1,Z,R,U,K);return et})(this,V,J,_,T,O)),X},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||k(this,_))},q.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new P(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),q.prototype._write=function(_,T,O){O(new g("_write()"))},q.prototype._writev=null,q.prototype.end=function(_,T,O){var j=this._writableState;return typeof _=="function"?(O=_,_=null,T=null):typeof T=="function"&&(O=T,T=null),_!=null&&this.write(_,T),j.corked&&(j.corked=1,this.uncork()),j.ending||(function(V,X,J){X.ending=!0,x(V,X),J&&(X.finished?o.nextTick(J):V.once("finish",J)),X.ended=!0,V.writable=!1})(this,j,O),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),q.prototype.destroy=p.destroy,q.prototype._undestroy=p.undestroy,q.prototype._destroy=function(_,T){T(_)}}).call(this)}).call(this,t("_process"),typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(t,l,c){(function(o){(function(){var r;function n(I,D,z){return(D=(function(P){var B=(function(F,W){if(typeof F!="object"||F===null)return F;var q=F[Symbol.toPrimitive];if(q!==void 0){var A=q.call(F,W);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(F)})(P,"string");return typeof B=="symbol"?B:String(B)})(D))in I?Object.defineProperty(I,D,{value:z,enumerable:!0,configurable:!0,writable:!0}):I[D]=z,I}var s=t("./end-of-stream"),e=Symbol("lastResolve"),i=Symbol("lastReject"),u=Symbol("error"),a=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),m=Symbol("stream");function d(I,D){return{value:I,done:D}}function b(I){var D=I[e];if(D!==null){var z=I[m].read();z!==null&&(I[h]=null,I[e]=null,I[i]=null,D(d(z,!1)))}}function g(I){o.nextTick(b,I)}var S=Object.getPrototypeOf((function(){})),C=Object.setPrototypeOf((n(r={get stream(){return this[m]},next:function(){var I=this,D=this[u];if(D!==null)return Promise.reject(D);if(this[a])return Promise.resolve(d(void 0,!0));if(this[m].destroyed)return new Promise((function(F,W){o.nextTick((function(){I[u]?W(I[u]):F(d(void 0,!0))}))}));var z,P=this[h];if(P)z=new Promise((function(F,W){return function(q,A){F.then((function(){W[a]?q(d(void 0,!0)):W[p](q,A)}),A)}})(P,this));else{var B=this[m].read();if(B!==null)return Promise.resolve(d(B,!1));z=new Promise(this[p])}return this[h]=z,z}},Symbol.asyncIterator,(function(){return this})),n(r,"return",(function(){var I=this;return new Promise((function(D,z){I[m].destroy(null,(function(P){P?z(P):D(d(void 0,!0))}))}))})),r),S);l.exports=function(I){var D,z=Object.create(C,(n(D={},m,{value:I,writable:!0}),n(D,e,{value:null,writable:!0}),n(D,i,{value:null,writable:!0}),n(D,u,{value:null,writable:!0}),n(D,a,{value:I._readableState.endEmitted,writable:!0}),n(D,p,{value:function(P,B){var F=z[m].read();F?(z[h]=null,z[e]=null,z[i]=null,P(d(F,!1))):(z[e]=P,z[i]=B)},writable:!0}),D));return z[h]=null,s(I,(function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=z[i];return B!==null&&(z[h]=null,z[e]=null,z[i]=null,B(P)),void(z[u]=P)}var F=z[e];F!==null&&(z[h]=null,z[e]=null,z[i]=null,F(d(void 0,!0))),z[a]=!0})),I.on("readable",g.bind(null,z)),z}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":486,_process:467}],484:[function(t,l,c){function o(h,p){var m=Object.keys(h);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(h);p&&(d=d.filter((function(b){return Object.getOwnPropertyDescriptor(h,b).enumerable}))),m.push.apply(m,d)}return m}function r(h){for(var p=1;p<arguments.length;p++){var m=arguments[p]!=null?arguments[p]:{};p%2?o(Object(m),!0).forEach((function(d){n(h,d,m[d])})):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(m)):o(Object(m)).forEach((function(d){Object.defineProperty(h,d,Object.getOwnPropertyDescriptor(m,d))}))}return h}function n(h,p,m){return(p=e(p))in h?Object.defineProperty(h,p,{value:m,enumerable:!0,configurable:!0,writable:!0}):h[p]=m,h}function s(h,p){for(var m=0;m<p.length;m++){var d=p[m];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,e(d.key),d)}}function e(h){var p=(function(m,d){if(typeof m!="object"||m===null)return m;var b=m[Symbol.toPrimitive];if(b!==void 0){var g=b.call(m,d);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(m)})(h,"string");return typeof p=="symbol"?p:String(p)}var i=t("buffer").Buffer,u=t("util").inspect,a=u&&u.custom||"inspect";l.exports=(function(){function h(){(function(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var p,m;return p=h,(m=[{key:"push",value:function(d){var b={data:d,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(d){var b={data:d,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var d=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,d}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(d){if(this.length===0)return"";for(var b=this.head,g=""+b.data;b=b.next;)g+=d+b.data;return g}},{key:"concat",value:function(d){if(this.length===0)return i.alloc(0);for(var b,g,S,C=i.allocUnsafe(d>>>0),I=this.head,D=0;I;)b=I.data,g=C,S=D,i.prototype.copy.call(b,g,S),D+=I.data.length,I=I.next;return C}},{key:"consume",value:function(d,b){var g;return d<this.head.data.length?(g=this.head.data.slice(0,d),this.head.data=this.head.data.slice(d)):g=d===this.head.data.length?this.shift():b?this._getString(d):this._getBuffer(d),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(d){var b=this.head,g=1,S=b.data;for(d-=S.length;b=b.next;){var C=b.data,I=d>C.length?C.length:d;if(I===C.length?S+=C:S+=C.slice(0,d),(d-=I)==0){I===C.length?(++g,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=C.slice(I));break}++g}return this.length-=g,S}},{key:"_getBuffer",value:function(d){var b=i.allocUnsafe(d),g=this.head,S=1;for(g.data.copy(b),d-=g.data.length;g=g.next;){var C=g.data,I=d>C.length?C.length:d;if(C.copy(b,b.length-d,0,I),(d-=I)==0){I===C.length?(++S,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=C.slice(I));break}++S}return this.length-=S,b}},{key:a,value:function(d,b){return u(this,r(r({},b),{},{depth:0,customInspect:!1}))}}])&&s(p.prototype,m),Object.defineProperty(p,"prototype",{writable:!1}),h})()},{buffer:220,util:188}],485:[function(t,l,c){(function(o){(function(){function r(e,i){s(e,i),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,i){e.emit("error",i)}l.exports={destroy:function(e,i){var u=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(s,this,e)):o.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(p){!i&&p?u._writableState?u._writableState.errorEmitted?o.nextTick(n,u):(u._writableState.errorEmitted=!0,o.nextTick(r,u,p)):o.nextTick(r,u,p):i?(o.nextTick(n,u),i(p)):o.nextTick(n,u)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,i){var u=e._readableState,a=e._writableState;u&&u.autoDestroy||a&&a.autoDestroy?e.destroy(i):e.emit("error",i)}}}).call(this)}).call(this,t("_process"))},{_process:467}],486:[function(t,l,c){var o=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}l.exports=function n(s,e,i){if(typeof e=="function")return n(s,null,e);e||(e={}),i=(function(I){var D=!1;return function(){if(!D){D=!0;for(var z=arguments.length,P=new Array(z),B=0;B<z;B++)P[B]=arguments[B];I.apply(this,P)}}})(i||r);var u=e.readable||e.readable!==!1&&s.readable,a=e.writable||e.writable!==!1&&s.writable,h=function(){s.writable||m()},p=s._writableState&&s._writableState.finished,m=function(){a=!1,p=!0,u||i.call(s)},d=s._readableState&&s._readableState.endEmitted,b=function(){u=!1,d=!0,a||i.call(s)},g=function(I){i.call(s,I)},S=function(){var I;return u&&!d?(s._readableState&&s._readableState.ended||(I=new o),i.call(s,I)):a&&!p?(s._writableState&&s._writableState.ended||(I=new o),i.call(s,I)):void 0},C=function(){s.req.on("finish",m)};return(function(I){return I.setHeader&&typeof I.abort=="function"})(s)?(s.on("complete",m),s.on("abort",S),s.req?C():s.on("request",C)):a&&!s._writableState&&(s.on("end",h),s.on("close",h)),s.on("end",b),s.on("finish",m),e.error!==!1&&s.on("error",g),s.on("close",S),function(){s.removeListener("complete",m),s.removeListener("abort",S),s.removeListener("request",C),s.req&&s.req.removeListener("finish",m),s.removeListener("end",h),s.removeListener("close",h),s.removeListener("finish",m),s.removeListener("end",b),s.removeListener("error",g),s.removeListener("close",S)}}},{"../../../errors":477}],487:[function(t,l,c){l.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(t,l,c){var o,r=t("../../../errors").codes,n=r.ERR_MISSING_ARGS,s=r.ERR_STREAM_DESTROYED;function e(p){if(p)throw p}function i(p,m,d,b){b=(function(C){var I=!1;return function(){I||(I=!0,C.apply(void 0,arguments))}})(b);var g=!1;p.on("close",(function(){g=!0})),o===void 0&&(o=t("./end-of-stream")),o(p,{readable:m,writable:d},(function(C){if(C)return b(C);g=!0,b()}));var S=!1;return function(C){if(!g&&!S)return S=!0,(function(I){return I.setHeader&&typeof I.abort=="function"})(p)?p.abort():typeof p.destroy=="function"?p.destroy():void b(C||new s("pipe"))}}function u(p){p()}function a(p,m){return p.pipe(m)}function h(p){return p.length?typeof p[p.length-1]!="function"?e:p.pop():e}l.exports=function(){for(var p=arguments.length,m=new Array(p),d=0;d<p;d++)m[d]=arguments[d];var b,g=h(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new n("streams");var S=m.map((function(C,I){var D=I<m.length-1;return i(C,D,I>0,(function(z){b||(b=z),z&&S.forEach(u),D||(S.forEach(u),g(b))}))}));return m.reduce(a)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(t,l,c){var o=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;l.exports={getHighWaterMark:function(r,n,s,e){var i=(function(u,a,h){return u.highWaterMark!=null?u.highWaterMark:a?u[h]:null})(n,e,s);if(i!=null){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new o(e?s:"highWaterMark",i);return Math.floor(i)}return r.objectMode?16:16384}}},{"../../../errors":477}],490:[function(t,l,c){l.exports=t("events").EventEmitter},{events:422}],491:[function(t,l,c){(c=l.exports=t("./lib/_stream_readable.js")).Stream=c,c.Readable=c,c.Writable=t("./lib/_stream_writable.js"),c.Duplex=t("./lib/_stream_duplex.js"),c.Transform=t("./lib/_stream_transform.js"),c.PassThrough=t("./lib/_stream_passthrough.js"),c.finished=t("./lib/internal/streams/end-of-stream.js"),c.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(t,l,c){var o=(function(r){var n=Object.prototype,s=n.hasOwnProperty,e=Object.defineProperty||function(x,_,T){x[_]=T.value},i=typeof Symbol=="function"?Symbol:{},u=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",h=i.toStringTag||"@@toStringTag";function p(x,_,T){return Object.defineProperty(x,_,{value:T,enumerable:!0,configurable:!0,writable:!0}),x[_]}try{p({},"")}catch{p=function(_,T,O){return _[T]=O}}function m(x,_,T,O){var j=_&&_.prototype instanceof g?_:g,V=Object.create(j.prototype),X=new k(O||[]);return e(V,"_invoke",{value:W(x,T,X)}),V}function d(x,_,T){try{return{type:"normal",arg:x.call(_,T)}}catch(O){return{type:"throw",arg:O}}}r.wrap=m;var b={};function g(){}function S(){}function C(){}var I={};p(I,u,(function(){return this}));var D=Object.getPrototypeOf,z=D&&D(D(y([])));z&&z!==n&&s.call(z,u)&&(I=z);var P=C.prototype=g.prototype=Object.create(I);function B(x){["next","throw","return"].forEach((function(_){p(x,_,(function(T){return this._invoke(_,T)}))}))}function F(x,_){var T;e(this,"_invoke",{value:function(O,j){function V(){return new _((function(X,J){(function L(G,N,R,U){var K=d(x[G],x,N);if(K.type!=="throw"){var rt=K.arg,Z=rt.value;return Z&&typeof Z=="object"&&s.call(Z,"__await")?_.resolve(Z.__await).then((function(et){L("next",et,R,U)}),(function(et){L("throw",et,R,U)})):_.resolve(Z).then((function(et){rt.value=et,R(rt)}),(function(et){return L("throw",et,R,U)}))}U(K.arg)})(O,j,X,J)}))}return T=T?T.then(V,V):V()}})}function W(x,_,T){var O="suspendedStart";return function(j,V){if(O==="executing")throw new Error("Generator is already running");if(O==="completed"){if(j==="throw")throw V;return w()}for(T.method=j,T.arg=V;;){var X=T.delegate;if(X){var J=q(X,T);if(J){if(J===b)continue;return J}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(O==="suspendedStart")throw O="completed",T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);O="executing";var L=d(x,_,T);if(L.type==="normal"){if(O=T.done?"completed":"suspendedYield",L.arg===b)continue;return{value:L.arg,done:T.done}}L.type==="throw"&&(O="completed",T.method="throw",T.arg=L.arg)}}}function q(x,_){var T=_.method,O=x.iterator[T];if(O===void 0)return _.delegate=null,T==="throw"&&x.iterator.return&&(_.method="return",_.arg=void 0,q(x,_),_.method==="throw")||T!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+T+"' method")),b;var j=d(O,x.iterator,_.arg);if(j.type==="throw")return _.method="throw",_.arg=j.arg,_.delegate=null,b;var V=j.arg;return V?V.done?(_[x.resultName]=V.value,_.next=x.nextLoc,_.method!=="return"&&(_.method="next",_.arg=void 0),_.delegate=null,b):V:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,b)}function A(x){var _={tryLoc:x[0]};1 in x&&(_.catchLoc=x[1]),2 in x&&(_.finallyLoc=x[2],_.afterLoc=x[3]),this.tryEntries.push(_)}function M(x){var _=x.completion||{};_.type="normal",delete _.arg,x.completion=_}function k(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(A,this),this.reset(!0)}function y(x){if(x){var _=x[u];if(_)return _.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var T=-1,O=function j(){for(;++T<x.length;)if(s.call(x,T))return j.value=x[T],j.done=!1,j;return j.value=void 0,j.done=!0,j};return O.next=O}}return{next:w}}function w(){return{value:void 0,done:!0}}return S.prototype=C,e(P,"constructor",{value:C,configurable:!0}),e(C,"constructor",{value:S,configurable:!0}),S.displayName=p(C,h,"GeneratorFunction"),r.isGeneratorFunction=function(x){var _=typeof x=="function"&&x.constructor;return!!_&&(_===S||(_.displayName||_.name)==="GeneratorFunction")},r.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,C):(x.__proto__=C,p(x,h,"GeneratorFunction")),x.prototype=Object.create(P),x},r.awrap=function(x){return{__await:x}},B(F.prototype),p(F.prototype,a,(function(){return this})),r.AsyncIterator=F,r.async=function(x,_,T,O,j){j===void 0&&(j=Promise);var V=new F(m(x,_,T,O),j);return r.isGeneratorFunction(_)?V:V.next().then((function(X){return X.done?X.value:V.next()}))},B(P),p(P,h,"Generator"),p(P,u,(function(){return this})),p(P,"toString",(function(){return"[object Generator]"})),r.keys=function(x){var _=Object(x),T=[];for(var O in _)T.push(O);return T.reverse(),function j(){for(;T.length;){var V=T.pop();if(V in _)return j.value=V,j.done=!1,j}return j.done=!0,j}},r.values=y,k.prototype={constructor:k,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!x)for(var _ in this)_.charAt(0)==="t"&&s.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=void 0)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function T(L,G){return V.type="throw",V.arg=x,_.next=L,G&&(_.method="next",_.arg=void 0),!!G}for(var O=this.tryEntries.length-1;O>=0;--O){var j=this.tryEntries[O],V=j.completion;if(j.tryLoc==="root")return T("end");if(j.tryLoc<=this.prev){var X=s.call(j,"catchLoc"),J=s.call(j,"finallyLoc");if(X&&J){if(this.prev<j.catchLoc)return T(j.catchLoc,!0);if(this.prev<j.finallyLoc)return T(j.finallyLoc)}else if(X){if(this.prev<j.catchLoc)return T(j.catchLoc,!0)}else{if(!J)throw new Error("try statement without catch or finally");if(this.prev<j.finallyLoc)return T(j.finallyLoc)}}}},abrupt:function(x,_){for(var T=this.tryEntries.length-1;T>=0;--T){var O=this.tryEntries[T];if(O.tryLoc<=this.prev&&s.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var j=O;break}}j&&(x==="break"||x==="continue")&&j.tryLoc<=_&&_<=j.finallyLoc&&(j=null);var V=j?j.completion:{};return V.type=x,V.arg=_,j?(this.method="next",this.next=j.finallyLoc,b):this.complete(V)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),b},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.finallyLoc===x)return this.complete(T.completion,T.afterLoc),M(T),b}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var T=this.tryEntries[_];if(T.tryLoc===x){var O=T.completion;if(O.type==="throw"){var j=O.arg;M(T)}return j}}throw new Error("illegal catch attempt")},delegateYield:function(x,_,T){return this.delegate={iterator:y(x),resultName:_,nextLoc:T},this.method==="next"&&(this.arg=void 0),b}},r})(typeof l=="object"?l.exports:{});try{regeneratorRuntime=o}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},{}],493:[function(t,l,c){var o=t("buffer").Buffer,r=t("inherits"),n=t("hash-base"),s=new Array(16),e=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],i=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],a=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function m(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(D,z){return D<<z|D>>>32-z}function b(D,z,P,B,F,W,q,A){return d(D+(z^P^B)+W+q|0,A)+F|0}function g(D,z,P,B,F,W,q,A){return d(D+(z&P|~z&B)+W+q|0,A)+F|0}function S(D,z,P,B,F,W,q,A){return d(D+((z|~P)^B)+W+q|0,A)+F|0}function C(D,z,P,B,F,W,q,A){return d(D+(z&B|P&~B)+W+q|0,A)+F|0}function I(D,z,P,B,F,W,q,A){return d(D+(z^(P|~B))+W+q|0,A)+F|0}r(m,n),m.prototype._update=function(){for(var D=s,z=0;z<16;++z)D[z]=this._block.readInt32LE(4*z);for(var P=0|this._a,B=0|this._b,F=0|this._c,W=0|this._d,q=0|this._e,A=0|this._a,M=0|this._b,k=0|this._c,y=0|this._d,w=0|this._e,x=0;x<80;x+=1){var _,T;x<16?(_=b(P,B,F,W,q,D[e[x]],h[0],u[x]),T=I(A,M,k,y,w,D[i[x]],p[0],a[x])):x<32?(_=g(P,B,F,W,q,D[e[x]],h[1],u[x]),T=C(A,M,k,y,w,D[i[x]],p[1],a[x])):x<48?(_=S(P,B,F,W,q,D[e[x]],h[2],u[x]),T=S(A,M,k,y,w,D[i[x]],p[2],a[x])):x<64?(_=C(P,B,F,W,q,D[e[x]],h[3],u[x]),T=g(A,M,k,y,w,D[i[x]],p[3],a[x])):(_=I(P,B,F,W,q,D[e[x]],h[4],u[x]),T=b(A,M,k,y,w,D[i[x]],p[4],a[x])),P=q,q=W,W=d(F,10),F=B,B=_,A=w,w=y,y=d(k,10),k=M,M=T}var O=this._b+F+y|0;this._b=this._c+W+w|0,this._c=this._d+q+A|0,this._d=this._e+P+M|0,this._e=this._a+B+k|0,this._a=O},m.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var D=o.alloc?o.alloc(20):new o(20);return D.writeInt32LE(this._a,0),D.writeInt32LE(this._b,4),D.writeInt32LE(this._c,8),D.writeInt32LE(this._d,12),D.writeInt32LE(this._e,16),D},l.exports=m},{buffer:220,"hash-base":425,inherits:440}],494:[function(t,l,c){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var o=t("buffer"),r=o.Buffer;function n(e,i){for(var u in e)i[u]=e[u]}function s(e,i,u){return r(e,i,u)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?l.exports=o:(n(o,c),c.Buffer=s),s.prototype=Object.create(r.prototype),n(r,s),s.from=function(e,i,u){if(typeof e=="number")throw new TypeError("Argument must not be a number");return r(e,i,u)},s.alloc=function(e,i,u){if(typeof e!="number")throw new TypeError("Argument must be a number");var a=r(e);return i!==void 0?typeof u=="string"?a.fill(i,u):a.fill(i):a.fill(0),a},s.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return r(e)},s.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:220}],495:[function(t,l,c){(function(o){(function(){var r,n=t("buffer"),s=n.Buffer,e={};for(r in n)n.hasOwnProperty(r)&&r!=="SlowBuffer"&&r!=="Buffer"&&(e[r]=n[r]);var i=e.Buffer={};for(r in s)s.hasOwnProperty(r)&&r!=="allocUnsafe"&&r!=="allocUnsafeSlow"&&(i[r]=s[r]);if(e.Buffer.prototype=s.prototype,i.from&&i.from!==Uint8Array.from||(i.from=function(u,a,h){if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof u);if(u&&u.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);return s(u,a,h)}),i.alloc||(i.alloc=function(u,a,h){if(typeof u!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof u);if(u<0||u>=2*(1<<30))throw new RangeError('The value "'+u+'" is invalid for option "size"');var p=s(u);return a&&a.length!==0?typeof h=="string"?p.fill(a,h):p.fill(a):p.fill(0),p}),!e.kStringMaxLength)try{e.kStringMaxLength=o.binding("buffer").kStringMaxLength}catch{}e.constants||(e.constants={MAX_LENGTH:e.kMaxLength},e.kStringMaxLength&&(e.constants.MAX_STRING_LENGTH=e.kStringMaxLength)),l.exports=e}).call(this)}).call(this,t("_process"))},{_process:467,buffer:220}],496:[function(t,l,c){Object.defineProperty(c,"__esModule",{value:!0});const o=t("xmlchars/xml/1.0/ed5"),r=t("xmlchars/xml/1.1/ed2"),n=t("xmlchars/xmlns/1.0/ed3");var s=o.isS,e=o.isChar,i=o.isNameStartChar,u=o.isNameChar,a=o.S_LIST,h=o.NAME_RE,p=r.isChar,m=n.isNCNameStartChar,d=n.isNCNameChar,b=n.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",C={__proto__:null,xml:g,xmlns:S},I={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},D=y=>y===34||y===39,z=[34,39],P=[...z,91,62],B=[...z,60,93],F=[61,63,...a],W=[...a,62,38,60];function q(y,w,x){switch(w){case"xml":x!==g&&y.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":x!==S&&y.fail(`xmlns prefix must be bound to ${S}.`)}switch(x){case S:y.fail(w===""?`the default namespace may not be set to ${x}.`:`may not assign a prefix (even "xmlns") to the URI ${S}.`);break;case g:switch(w){case"xml":break;case"":y.fail(`the default namespace may not be set to ${x}.`);break;default:y.fail("may not assign the xml namespace to another prefix.")}}}const A=y=>b.test(y),M=y=>h.test(y);c.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const k={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};c.SaxesParser=class{constructor(y){this.opt=y??{},this.fragmentOpt=!!this.opt.fragment;const w=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,w){this.nameStartCheck=m,this.nameCheck=d,this.isName=A,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},C);const x=this.opt.additionalNamespaces;x!=null&&((function(_,T){for(const O of Object.keys(T))q(_,O,T[O])})(this,x),Object.assign(this.ns,x))}else this.nameStartCheck=i,this.nameCheck=u,this.isName=M,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var y;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:w}=this;this.state=w?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=w,this.xmlDeclPossible=!w,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:x}=this.opt;if(x===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");x="1.0"}this.setXMLVersion(x),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(I),(y=this.readyHandler)===null||y===void 0||y.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(y,w){this[k[y]]=w}off(y){this[k[y]]=void 0}makeError(y){var w;let x=(w=this.fileName)!==null&&w!==void 0?w:"";return this.trackPosition&&(x.length>0&&(x+=":"),x+=`${this.line}:${this.column}`),x.length>0&&(x+=": "),new Error(x+y)}fail(y){const w=this.makeError(y),x=this.errorHandler;if(x===void 0)throw w;return x(w),this}write(y){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let w=!1;y===null?(w=!0,y=""):typeof y=="object"&&(y=y.toString()),this.carriedFromPrevious!==void 0&&(y=`${this.carriedFromPrevious}${y}`,this.carriedFromPrevious=void 0);let x=y.length;const _=y.charCodeAt(x-1);!w&&(_===13||_>=55296&&_<=56319)&&(this.carriedFromPrevious=y[x-1],x--,y=y.slice(0,x));const{stateTable:T}=this;for(this.chunk=y,this.i=0;this.i<x;)T[this.state].call(this);return this.chunkPosition+=x,w?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>=32||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return y.charCodeAt(w+1)===10&&(this.i=w+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCode11(){const{chunk:y,i:w}=this;if(this.prevI=w,this.i=w+1,w>=y.length)return-1;const x=y.charCodeAt(w);if(this.column++,x<55296){if(x>31&&x<127||x>159&&x!==8232||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const T=y.charCodeAt(w+1);T!==10&&T!==133||(this.i=w+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const _=65536+1024*(x-55296)+(y.charCodeAt(w+1)-56320);return this.i=w+2,_>1114111&&this.fail("disallowed character."),_}getCodeNorm(){const y=this.getCode();return y===-2?10:y}unget(){this.i=this.prevI,this.column--}captureTo(y){let{i:w}=this;const{chunk:x}=this;for(;;){const _=this.getCode(),T=_===-2,O=T?10:_;if(O===-1||y.includes(O))return this.text+=x.slice(w,this.prevI),O;T&&(this.text+=x.slice(w,this.prevI)+`
|
|
278
278
|
`,w=this.i)}}captureToChar(y){let{i:w}=this;const{chunk:x}=this;for(;;){let _=this.getCode();switch(_){case-2:this.text+=x.slice(w,this.prevI)+`
|
|
@@ -309,7 +309,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
309
309
|
* @author Louis-Dominique Dubeau
|
|
310
310
|
* @license MIT
|
|
311
311
|
* @copyright Louis-Dominique Dubeau
|
|
312
|
-
*/function o(r){return r>=65&&r<=90||r===95||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||r>=65536&&r<=983039}Object.defineProperty(c,"__esModule",{value:!0}),c.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",c.NC_NAME_CHAR="-"+c.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.NC_NAME_START_CHAR_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]$","u"),c.NC_NAME_CHAR_RE=new RegExp("^["+c.NC_NAME_CHAR+"]$","u"),c.NC_NAME_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]["+c.NC_NAME_CHAR+"]*$","u"),c.isNCNameStartChar=o,c.isNCNameChar=function(r){return o(r)||r===45||r===46||r>=48&&r<=57||r===183||r>=768&&r<=879||r>=8255&&r<=8256}},{}]},{},[15])(15)}))})(nu)),nu.exports}var yd=bd();const vd=gd(yd);class wd{constructor(E,t){Y(this,Ne);Y(this,Zo);Y(this,
|
|
312
|
+
*/function o(r){return r>=65&&r<=90||r===95||r>=97&&r<=122||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||r>=65536&&r<=983039}Object.defineProperty(c,"__esModule",{value:!0}),c.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",c.NC_NAME_CHAR="-"+c.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",c.NC_NAME_START_CHAR_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]$","u"),c.NC_NAME_CHAR_RE=new RegExp("^["+c.NC_NAME_CHAR+"]$","u"),c.NC_NAME_RE=new RegExp("^["+c.NC_NAME_START_CHAR+"]["+c.NC_NAME_CHAR+"]*$","u"),c.isNCNameStartChar=o,c.isNCNameChar=function(r){return o(r)||r===45||r===46||r>=48&&r<=57||r===183||r>=768&&r<=879||r>=8255&&r<=8256}},{}]},{},[15])(15)}))})(nu)),nu.exports}var yd=bd();const vd=gd(yd);class wd{constructor(E,t){Y(this,Ne);Y(this,Zo);Y(this,hn);Y(this,us);it(this,"export",()=>{var E={fileName:(f(this,Ne).getAttribute("caption")||"export").replace(/[`~!@#$%^&*|\\\'\";:\/?]/gi,""),afterFunc:()=>{}},t=H.nvl(E.fileName,"temp");const l=async(p,m)=>{console.log("export...."),p.xlsx.writeBuffer().then(d=>{var b=new Blob([d],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});const g=window.URL.createObjectURL(b),S=document.createElement("a");document.body.appendChild(S),S.href=g,S.download=m+".xlsx",S.click(),setTimeout(()=>{window.URL.revokeObjectURL(g),document.body.removeChild(S),console.log("completed")},0)})},c=()=>({type:"pattern",pattern:"solid",fgColor:{argb:"FFCCCCCC"}}),o=()=>({top:{style:"thin",color:{argb:"FF999999"}},left:{style:"thin",color:{argb:"FF999999"}},bottom:{style:"thin",color:{argb:"FF999999"}},right:{style:"thin",color:{argb:"FF999999"}}}),r=p=>{var m=$(".ng-container-body thead tr:not(.col-indicator-rowgroup)",f(this,Ne).body).length+1+f(this,Ne).template.length,d=f(this,Ne).data.get(p);$(f(this,Ne).template).each((b,g)=>{var S=parseInt(p*f(this,Ne).template.length)+m+b;if(b==0){var C=s.getCell(S,1);C.alignment={horizontal:"center",vertical:"middle",wrapText:!0},C.dataValidation={type:"list",allowBlank:!0,formulae:['"NONE,INSERT,UPDATE,DELETE"']},C.fill=c(),C.border=o(),f(this,Ne).template.length>1&&s.mergeCells(S,1,S+f(this,Ne).template.length-1,1)}$("th,td",g).not(".dummy").not(".first").not(".last").each((I,D)=>{var z=parseInt(D.dataset.index),P=s.getCell(S,z),B="";if(H.isNull(D.dataset.expr))H.isNull(D.dataset.bind)||(B=d[D.dataset.bind]||"");else try{B=f(this,Ne).exprFunction(D.dataset.expr).call(this,d,p)}catch(A){console.error(A,p,D.dataset.bind,D.dataset.expr)}P.value=B;var F=D.querySelector("ng-combo");if(F){var W=F.getAttribute("data-source");if(W){const A=F.getAttribute("value");W=f(this,Ne).exprFunction(W).call(this,d,p);const M=[...new Set(W.map(k=>k[A].replaceAll(","," ")))];M.length>0&&(P.dataValidation={type:"list",allowBlank:!0,formulae:['"'+M.join(",")+'"']})}}var q=D.querySelector("ng-radio");if(q){var W=q.getAttribute("data-source");if(W){q.getAttribute("value"),W=f(this,Ne).exprFunction(W).call(this,d,p);const M=[...new Set(W.map(k=>k.value))];M.length>0&&(P.dataValidation={type:"list",allowBlank:!0,formulae:['"'+M.join(",")+'"']})}}P.alignment={horizontal:D.getAttribute("text-align")||"left",vertical:"middle",wrapText:!0},(D.colSpan>1||D.rowSpan>1)&&s.mergeCells(S,z,S+D.rowSpan-1,z+D.colSpan-1)})})};$(f(this,hn)).html("generate..."),f(this,us).setAttribute("max",f(this,Ne).data.count()),f(this,us).setAttribute("value",0);const n=new vd.Workbook,s=n.addWorksheet("Sheet1");var e=0;s.getColumn(++e).width=10,$(".col-indicator-rowgroup .col-indicator:not(.dummy)",f(this,Ne).body).not(".first").not(".last").each((p,m)=>{if(p==0)return!0;m.dataset.index=++e,$(`[data-col="${m.dataset.col}"]`,f(this,Ne).template).each((d,b)=>{b.dataset.index=e}),f(this,Ne).body.querySelectorAll(`thead [data-col="${m.dataset.col}"]`).forEach(d=>{d.dataset.index=e}),s.getColumn(e).width=$(m).width()/7}),$(f(this,Ne).template).each((p,m)=>{var d=p+1;if(p==0){var b=s.getCell(d,1);b.fill=c(),b.border=o(),f(this,Ne).template.length>1&&s.mergeCells(d,1,d+f(this,Ne).template.length-1,1)}$("th:not(.dummy),td:not(.dummy)",m).not(".first").not(".last").each((g,S)=>{var C=parseInt(S.dataset.index),I=s.getCell(d,C);["rowState"].includes(S.dataset.bind)||(I.value=S.dataset.bind),(S.colSpan>1||S.rowSpan>1)&&s.mergeCells(d,C,d+S.rowSpan-1,C+S.colSpan-1),I.font={size:6},I.fill=c(),I.border=o()})}),$("thead tr:not(.col-indicator-rowgroup)",f(this,Ne).body).each((p,m)=>{var d=m.sectionRowIndex+f(this,Ne).template.length;if(p==0){var b=s.getCell(d,1);b.value="CRUD",b.alignment={horizontal:"center",vertical:"middle",wrapText:!0},b.fill=c(),b.border=o(),f(this,Ne).template.length>1&&s.mergeCells(d,1,d+f(this,Ne).template.length-1,1)}$("th:not(.dummy),td:not(.dummy)",m).not(".first").not(".last").each((g,S)=>{var C=parseInt(S.dataset.index),I=s.getCell(d,C);I.value=$(S).text(),(S.colSpan>1||S.rowSpan>1)&&s.mergeCells(d,C,d+S.rowSpan-1,C+S.colSpan-1),I.alignment={horizontal:"center",vertical:"middle",wrapText:!0},I.fill={type:"pattern",pattern:"solid",fgColor:{argb:"FFEEEEEE"}},I.border={top:{style:"thin",color:{argb:"FFCCCCCC"}},left:{style:"thin",color:{argb:"FFCCCCCC"}},bottom:{style:"thin",color:{argb:"FFCCCCCC"}},right:{style:"thin",color:{argb:"FFCCCCCC"}}}})});for(var i=f(this,Ne).data.getValidData(),u=0,a=0;a<i.length;a++)setTimeout(()=>{r(u++),f(this,us).setAttribute("value",u+1),$(f(this,hn)).html(u+1>=i.length?"downloading...":"processing... "+u.toLocaleString()+" / "+i.length.toLocaleString())});var h=setInterval(()=>{parseInt(f(this,us).getAttribute("value"))>=parseInt(f(this,us).getAttribute("max"))&&(clearInterval(h),setTimeout(()=>{l(n,t).then(p=>{}),E.afterFunc&&E.afterFunc.call(f(this,Ne))}),setTimeout(()=>{f(this,Zo).close()}))},500)});it(this,"exportPdf",()=>{console.log("exportPdf")});tt(this,Ne,E),tt(this,Zo,t),tt(this,hn,t.querySelector("#message-box")),tt(this,us,t.querySelector("#progress-bar"))}}Ne=new WeakMap,Zo=new WeakMap,hn=new WeakMap,us=new WeakMap;class Eu extends HTMLElement{constructor(){super();Y(this,li);Y(this,cn);Y(this,Jo);Y(this,du);Y(this,fu,{});Y(this,_h,()=>{});it(this,"exportExcel",()=>{f(this,cn).data.count()>500&&(f(this,li).showModal(),$(".title",f(this,li)).html("Export Excel")),f(this,Jo).export()});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,cn,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
313
313
|
<style>
|
|
314
314
|
@import "https://cdn.jsdelivr.net/npm/ninegrid/ninegrid.css";
|
|
315
315
|
|
|
@@ -349,7 +349,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
349
349
|
</div>
|
|
350
350
|
<progress id="progress-bar" value="0" max="100">50%</progress>
|
|
351
351
|
</nx-dialog>
|
|
352
|
-
`,tt(this,li,this.shadowRoot.querySelector("dialog")),tt(this,Jo,new wd(f(this,
|
|
352
|
+
`,tt(this,li,this.shadowRoot.querySelector("dialog")),tt(this,Jo,new wd(f(this,cn),f(this,li))),f(this,_h).call(this)}}li=new WeakMap,cn=new WeakMap,Jo=new WeakMap,du=new WeakMap,fu=new WeakMap,_h=new WeakMap,customElements.get("ng-export")||customElements.define("ng-export",Eu);class xd{constructor(E){Y(this,Qo);Y(this,hr);it(this,"add",E=>{f(this,hr).push(...E),f(this,ta).call(this)});Y(this,ta,()=>{tt(this,hr,[...new Set(f(this,hr))]),["","__ng"].forEach(E=>{const t=f(this,hr).indexOf(E);t>-1&&f(this,hr).splice(t,1)}),f(this,hr).sort((E,t)=>E.length<t.length?1:-1)});Y(this,Sh,()=>{tt(this,hr,[]);const E=f(this,Qo).shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");if(E){for(const t of E.tables)$("[data-bind]",t).each((l,c)=>{f(this,hr).push(c.dataset.bind)}),["data-expr","background-color","color","tooltip","visible","readonly","enable-button","enable-check","class-expr","icon-color","icon-src"].forEach(l=>{$(`[${l}]`,t).each((c,o)=>{var r=o.getAttribute(l);if(r.indexOf("data.")<0){const n=r.search(/[(]/g);if(n>0)try{r=String(window[r.substring(0,n).trim()])}catch{r=""}}r.split("data.").forEach(n=>{if(n.trim()!=""){const s=n.search(/[^_A-Za-z0-9]/g);s>=0?f(this,hr).push(n.substring(0,s)):r.startsWith("data.")&&f(this,hr).push(n.replace("data.",""))}})})});f(this,ta).call(this)}});tt(this,Qo,E),f(this,Sh).call(this)}get(){return f(this,hr)}indexOf(E){return f(this,hr).indexOf(E)}includes(E){return f(this,hr).includes(E)}}Qo=new WeakMap,hr=new WeakMap,ta=new WeakMap,Sh=new WeakMap;class _d extends HTMLElement{constructor(){super();Y(this,kh);this.attachShadow({mode:"open"})}connectedCallback(){tt(this,kh,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
353
353
|
<style>
|
|
354
354
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngFoot.css";
|
|
355
355
|
${H.getCustomPath(this,"ngFoot.css")}
|
|
@@ -357,7 +357,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
357
357
|
|
|
358
358
|
<ng-layout></ng-layout>
|
|
359
359
|
<ng-paging></ng-paging>
|
|
360
|
-
`}}kh=new WeakMap;class Sd extends HTMLElement{constructor(){super();Y(this,
|
|
360
|
+
`}}kh=new WeakMap;class Sd extends HTMLElement{constructor(){super();Y(this,un);Y(this,ds);Y(this,Ur);Y(this,fs);it(this,"add",t=>{f(this,ds).push(...t);var l=0;for(const c of f(this,ds)){l++;const o=c.querySelector("caption"),r=o?o.innerHTML:`Sheet${l}`;$(f(this,Ur)).append(`<button class="ng-button" value="${l-1}" title="${r.replaceAll('"',"'")}">${r}</button>`)}f(this,ds).length<=1&&$(f(this,Ur)).hide(),H.j.querySelectorAll(f(this,Ur).querySelector("button")).addClass("ng-active"),$("button",f(this,Ur)).on("click",f(this,Ch))});it(this,"resize",()=>{const t=$(f(this,Ur)).width()>$(this).width();$(f(this,Ur)).css({width:t?"100%":"unset","justify-content":t?"space-evenly":"unset"})});Y(this,Ch,t=>{if(H.j.querySelectorAll(t.currentTarget).hasClass("ng-active"))return;const l=f(this,fs);tt(this,fs,parseInt(t.currentTarget.value)),f(this,un).changeRayout(f(this,fs)),H.j.querySelectorAll("button",f(this,Ur)).removeClass("ng-active"),H.j.querySelectorAll(t.currentTarget).addClass("ng-active");var c=new CustomEvent(H.EVENT.LAYOUT_CHANGED,{bubbles:!0,detail:{}});c.oldIndex=l,c.newIndex=f(this,fs),f(this,un).dispatchEvent(c)});tt(this,ds,[]),tt(this,fs,0)}connectedCallback(){tt(this,un,this.getRootNode().host.getRootNode().host),this.innerHTML='<div class="ng-wrap"></div>',tt(this,Ur,this.querySelector(".ng-wrap"))}get tables(){return f(this,ds)}get currentTable(){return f(this,ds)[f(this,fs)]}}un=new WeakMap,ds=new WeakMap,Ur=new WeakMap,fs=new WeakMap,Ch=new WeakMap,customElements.get("ng-layout")||customElements.define("ng-layout",Sd),customElements.get("ng-foot")||customElements.define("ng-foot",_d);class kd extends HTMLElement{constructor(){super();Y(this,ea);this.attachShadow({mode:"open"})}connectedCallback(){tt(this,ea,this.getRootNode().host),!H.j.querySelectorAll(f(this,ea)).hasClass("simple")&&(this.shadowRoot.innerHTML=`
|
|
361
361
|
<style>
|
|
362
362
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngHead.css";
|
|
363
363
|
${H.getCustomPath(this,"ngHead.css")}
|
|
@@ -366,7 +366,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
366
366
|
<ng-menu></ng-menu>
|
|
367
367
|
<ng-title></ng-title>
|
|
368
368
|
<ng-custom></ng-custom>
|
|
369
|
-
`)}}ea=new WeakMap;class Cd extends HTMLElement{constructor(){super();Y(this,
|
|
369
|
+
`)}}ea=new WeakMap;class Cd extends HTMLElement{constructor(){super();Y(this,dn)}connectedCallback(){this.getRootNode().host&&(tt(this,dn,this.getRootNode().host.getRootNode().host),this.innerHTML=`<span>${f(this,dn).getAttribute("caption")}</span>`,$("span",this).on("dblclick",t=>{const l='<font color="green">https://www.ninegrid.net</font>';t.currentTarget.innerHTML=t.currentTarget.innerHTML==l?`<span>${f(this,dn).getAttribute("caption")}</span>`:l}))}}dn=new WeakMap;class Ed extends HTMLElement{constructor(){super();Y(this,Eh);it(this,"add",t=>{this.querySelector("div:first-child").append(t)})}connectedCallback(){this.getRootNode().host&&(tt(this,Eh,this.getRootNode().host.getRootNode().host),this.innerHTML="<div></div>")}}Eh=new WeakMap,customElements.get("ng-title")||customElements.define("ng-title",Cd),customElements.get("ng-custom")||customElements.define("ng-custom",Ed),customElements.get("ng-head")||customElements.define("ng-head",kd);class Fl extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){new MutationObserver((E,t)=>{for(var l of E)if(l.type=="attributes")switch(l.attributeName){case"stroke":this.shadowRoot.querySelector("polyline").setAttribute(l.attributeName,this.getAttribute(l.attributeName));break;case"fill":this.shadowRoot.querySelector("circle,rect,svg").setAttribute(l.attributeName,this.getAttribute(l.attributeName));break;case"start-fill":case"end-fill":var c=this.getAttribute("start-fill")||"rgba(255, 255, 255, 0.85)",o=this.getAttribute("end-fill")||"rgba(30, 30, 40, 0.85)";$(l.target).css({background:`radial-gradient(circle farthest-corner at 33% 33%, ${c} 0%, ${o} 80%), radial-gradient(circle farthest-corner at 45% 45%, rgba(0, 0, 0, 0) 50%, #000000 80%)`});break}}).observe(this,{childList:!1,subtree:!1,attributeOldValue:!0})}}class Ad extends Fl{constructor(){super()}connectedCallback(){var E=this.getAttribute("size")||"12";this.getAttribute("stroke"),this.shadowRoot.innerHTML=`
|
|
370
370
|
<style>
|
|
371
371
|
:host {
|
|
372
372
|
width: ${E}px;
|
|
@@ -428,7 +428,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
428
428
|
<div class="ng-wrap">
|
|
429
429
|
<img ${o.join(" ")} class="renderer" />
|
|
430
430
|
</div>
|
|
431
|
-
`,super.connectedCallback(),tt(this,Ls,this.shadowRoot.querySelector("img"))}}Ls=new WeakMap;class Nd extends _r{constructor(){super();Y(this,
|
|
431
|
+
`,super.connectedCallback(),tt(this,Ls,this.shadowRoot.querySelector("img"))}}Ls=new WeakMap;class Nd extends _r{constructor(){super();Y(this,fn);Y(this,Ah);it(this,"dataRefresh",t=>{const l=this.getAttribute("src");var c=l?this.getExprValue(l,this.cell.closest("tr").data,this.cell.dataset.row):"";f(this,fn).innerHTML=c||this.getDisplayText(),t||this.reset()});it(this,"r",(t,l)=>{const c=this.getAttribute("icon-src")||l.getAttribute("icon-src");var o=c?this.getExprValue(c,l.closest("tr").data,l.dataset.row):"";f(this,fn).innerHTML=o||this.value});tt(this,Ah,this.getAttribute("src"))}connectedCallback(){const t=this.getAttribute("border")||"unset",l=this.getAttribute("border-radius")||"unset",c=this.getAttribute("link");this.shadowRoot.innerHTML=`
|
|
432
432
|
<style>
|
|
433
433
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngSvg.css";
|
|
434
434
|
${H.getCustomPath(this,"ngSvg.css")}
|
|
@@ -444,7 +444,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
444
444
|
</style>
|
|
445
445
|
|
|
446
446
|
<div class="ng-wrap"></div>
|
|
447
|
-
`,super.connectedCallback(),tt(this,
|
|
447
|
+
`,super.connectedCallback(),tt(this,fn,this.shadowRoot.querySelector("div"))}}fn=new WeakMap,Ah=new WeakMap,customElements.get("ng-img")||customElements.define("ng-img",Id),customElements.get("ng-svg")||customElements.define("ng-svg",Nd);class Od{constructor(E){Y(this,Th);it(this,"importExcel",()=>{f(this,Rh).call(this)});Y(this,Rh,()=>{this.input||(this.input=document.createElement("input"),this.input.type="file",this.input.onchange=f(this,Mh)),this.input.click()});Y(this,Mh,E=>{var t=E.target.files;if(t.length<1){alert("select a file...");return}var l=t[0],c=new FileReader;c.onload=f(this,Ih),c.readAsDataURL(l),c.onloadend=f(this,Nh)});Y(this,Ih,E=>{var t=/^data:(.*);base64,(.*)$/.exec(E.target.result);if(t==null)throw"Could not parse result";t[1],t[2]});Y(this,Nh,E=>{var t=E.target.result;const l=new ExcelJS.Workbook;l.xlsx.load(t).then(()=>{l.worksheets.forEach(c=>{c.eachRow((o,r)=>{r%10==0&&console.log(r)})})})});tt(this,Th,E)}}Th=new WeakMap,Rh=new WeakMap,Mh=new WeakMap,Ih=new WeakMap,Nh=new WeakMap;class jd extends HTMLElement{constructor(){super();Y(this,ra);Y(this,pn);Y(this,Oh,()=>{$("div.panel",this.shadowRoot).show(),$(f(this,pn)).css({overflow:"visible"})});it(this,"close",()=>{$("div.panel",this.shadowRoot).hide(),$(f(this,pn)).css({overflow:"unset"})});Y(this,sa,()=>{f(this,ra).body.querySelectorAll("ng-info").forEach(t=>{var l=t.shadowRoot.querySelector("div.panel");$(l).is(":visible")&&($(l).hide(),$(t.closest("th,td")).css({overflow:"unset"}))})});this.attachShadow({mode:"open"})}connectedCallback(){const t=this.innerHTML;this.shadowRoot.innerHTML=`
|
|
448
448
|
<style>
|
|
449
449
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngInfo.css";
|
|
450
450
|
${H.getCustomPath(this,"ngInfo.css")}
|
|
@@ -458,7 +458,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
458
458
|
<div class="panel">
|
|
459
459
|
${t}
|
|
460
460
|
</div>
|
|
461
|
-
`,tt(this,ra,this.getRootNode().host),tt(this,
|
|
461
|
+
`,tt(this,ra,this.getRootNode().host),tt(this,pn,this.closest("th,td")),$("svg.icon",this.shadowRoot).on("click",l=>{l.preventDefault(),l.stopPropagation(),$("div.panel",this.shadowRoot).is(":visible")?f(this,sa).call(this):(f(this,sa).call(this),f(this,Oh).call(this))}),$(this).on("click",l=>{l.stopPropagation()})}}ra=new WeakMap,pn=new WeakMap,Oh=new WeakMap,sa=new WeakMap,customElements.get("ng-info")||customElements.define("ng-info",jd);class $d extends Qs{constructor(){super();Y(this,Zr);it(this,"dataRefresh",t=>{f(this,jh).call(this,this.value)?(f(this,Zr).value=H.nvl(this.value,"#ffffff"),H.j.querySelectorAll(this).removeClass("invalid")):(f(this,Zr).value="#ffffff",H.j.querySelectorAll(this).addClass("invalid")),f(this,Zr).setAttribute("title",this.value),t||this.reset()});Y(this,jh,t=>{if(H.isNull(t))return!0;if(typeof t!="string"||t.length!=7||!t.startsWith("#"))return!1;var l=parseInt(t.substr(1,2),16),c=parseInt(t.substr(3,2),16),o=parseInt(t.substr(5,2),16);return!(l<0||l>255||c<0||c>255||o<0||o>255)})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
462
462
|
<style>
|
|
463
463
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngInputColor.css";
|
|
464
464
|
${H.getCustomPath(this,"ngInputColor.css")}
|
|
@@ -489,7 +489,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
489
489
|
${l.join(" ")}
|
|
490
490
|
required
|
|
491
491
|
/>
|
|
492
|
-
`,super.connectedCallback(),tt(this,Jr,this.shadowRoot.querySelector("input")),$(this.cell).on("keydown",o=>{switch(o.target.tagName){case"TH":case"TD":["Enter"].includes(o.code)&&f(this,Jr).focus();break}}),f(this,Jr).addEventListener("keydown",o=>{["Enter","Escape"].includes(o.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown"].includes(o.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(o))})}}Jr=new WeakMap,hi=new WeakMap,$h=new WeakMap,customElements.get("ng-input-date")||customElements.define("ng-input-date",Ld);class Pd extends Qs{constructor(){super();Y(this,Ze);Y(this,ps);Y(this,Vr);Y(this,Ps);Y(this,
|
|
492
|
+
`,super.connectedCallback(),tt(this,Jr,this.shadowRoot.querySelector("input")),$(this.cell).on("keydown",o=>{switch(o.target.tagName){case"TH":case"TD":["Enter"].includes(o.code)&&f(this,Jr).focus();break}}),f(this,Jr).addEventListener("keydown",o=>{["Enter","Escape"].includes(o.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown"].includes(o.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(o))})}}Jr=new WeakMap,hi=new WeakMap,$h=new WeakMap,customElements.get("ng-input-date")||customElements.define("ng-input-date",Ld);class Pd extends Qs{constructor(){super();Y(this,Ze);Y(this,ps);Y(this,Vr);Y(this,Ps);Y(this,mn);Y(this,Qr);it(this,"dataRefresh",t=>{f(this,Ze).value=this.value,H.j.querySelectorAll(f(this,Ze)).removeClass("invalid"),f(this,ps)=="number"&&(isNaN(this.value)||f(this,mn)&&Number(f(this,Ze).value)>Number(f(this,mn))||f(this,Ps)&&Number(f(this,Ze).value)<Number(f(this,Ps))?H.j.querySelectorAll(f(this,Ze)).addClass("invalid"):f(this,Qr)&&f(this,Ze).value.indexOf(".")>=0&&f(this,Ze).value.substring(f(this,Ze).value.indexOf(".")+1).length>Number(f(this,Qr))&&H.j.querySelectorAll(f(this,Ze)).addClass("invalid")),f(this,Vr)&&H.getByteLength(this.value)>Number(f(this,Vr))&&H.j.querySelectorAll(f(this,Ze)).addClass("invalid"),t||this.reset()});Y(this,Lh,t=>{if(!["Escape","Enter","Tab","Home","End","ArrowLeft","ArrowRight","PageUp","PageDown","Backspace","Delete"].includes(t.code)){if(f(this,ps)=="number"){let o=[];if(f(this,Qr)&&Number(f(this,Qr))>0&&o.push("."),f(this,Ps)&&Number(f(this,Ps))>=0&&o.push("-"),!(t.keyCode>=48&&t.keyCode<=57||t.keyCode>=96&&t.keyCode<=105)&&!o.includes(t.key)&&t.preventDefault(),f(this,Qr)&&(t.keyCode>=48&&t.keyCode<=57||t.keyCode>=96&&t.keyCode<=105)&&t.target.selectionStart==t.target.selectionEnd){var l=t.target.value,c=l.indexOf(".");if(c>=0){var l=l.substr(c+1,l.length);l.length>=Number(f(this,Qr))&&t.preventDefault()}}}f(this,Vr)&&H.getByteLength(t.target.value)>=Number(f(this,Vr))&&t.target.selectionStart==t.target.selectionEnd&&t.preventDefault()}});if(tt(this,ps,this.getAttribute("type")||"text"),tt(this,Vr,this.getAttribute("maxbyte")),tt(this,Ps,this.getAttribute("min")),tt(this,mn,this.getAttribute("max")),tt(this,Qr,this.getAttribute("scale")),!["text","number"].includes(f(this,ps)))throw`invalid type : ${f(this,ps)}`}connectedCallback(){for(var t=[],l=0;l<this.attributes.length;l++)["type","maxlength","maxbyte","min","max","step","scale","text-align"].includes(this.attributes[l].name)&&t.push(`${this.attributes[l].name}="${this.attributes[l].value}"`);this.shadowRoot.innerHTML=`
|
|
493
493
|
<style>
|
|
494
494
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngInputText.css";
|
|
495
495
|
${H.getCustomPath(this,"ngInputText.css")}
|
|
@@ -499,7 +499,7 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
499
499
|
${t.join(" ")}
|
|
500
500
|
ondragstart="return false;"
|
|
501
501
|
>
|
|
502
|
-
`,super.connectedCallback(),tt(this,Ze,this.shadowRoot.querySelector("input")),f(this,Ze).addEventListener("keydown",f(this,Lh)),f(this,Ze).addEventListener("compositionstart",c=>{c.target.selectionStart==c.target.selectionEnd&&f(this,Vr)&&H.getByteLength(c.target.value)>=Number(f(this,Vr))&&(c.target.value=H.cut(c.target.value,Number(f(this,Vr))),this.value=c.target.value)}),f(this,Ze).addEventListener("compositionupdate",c=>{f(this,ps)=="number"&&(c.target.value=c.target.value.replace(c.data,""))}),f(this,Ze).addEventListener("compositionend",c=>{}),f(this,Ze).addEventListener("keydown",c=>{c.isComposing||c.keyCode===229||(["Enter","Escape"].includes(c.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown","ArrowUp","ArrowDown"].includes(c.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(c)))})}}Ze=new WeakMap,ps=new WeakMap,Vr=new WeakMap,Ps=new WeakMap,
|
|
502
|
+
`,super.connectedCallback(),tt(this,Ze,this.shadowRoot.querySelector("input")),f(this,Ze).addEventListener("keydown",f(this,Lh)),f(this,Ze).addEventListener("compositionstart",c=>{c.target.selectionStart==c.target.selectionEnd&&f(this,Vr)&&H.getByteLength(c.target.value)>=Number(f(this,Vr))&&(c.target.value=H.cut(c.target.value,Number(f(this,Vr))),this.value=c.target.value)}),f(this,Ze).addEventListener("compositionupdate",c=>{f(this,ps)=="number"&&(c.target.value=c.target.value.replace(c.data,""))}),f(this,Ze).addEventListener("compositionend",c=>{}),f(this,Ze).addEventListener("keydown",c=>{c.isComposing||c.keyCode===229||(["Enter","Escape"].includes(c.code)?this.owner.cell.currentCell=this.cell:["Tab","PageUp","PageDown","ArrowUp","ArrowDown"].includes(c.code)&&(this.owner.cell.currentCell=this.cell,this.owner.cell.moveCell(c)))})}}Ze=new WeakMap,ps=new WeakMap,Vr=new WeakMap,Ps=new WeakMap,mn=new WeakMap,Qr=new WeakMap,Lh=new WeakMap,customElements.get("ng-input")||customElements.define("ng-input",Pd);class Dd{constructor(E){Y(this,Oe);Y(this,ci);Y(this,gn);Y(this,bn);Y(this,yn);it(this,"getTotalHeight",()=>f(this,Oe).data.get().reduce((E,t)=>E+t.__ng.height.reduce((l,c)=>l+c,0),0));it(this,"getHeight",E=>{const t=parseInt(E/f(this,Oe).template.length);if(t<0||t>=f(this,Oe).data.count())return 32;const l=f(this,Oe).data.__ng(t);return l?l.height[parseInt(E%f(this,Oe).template.length)]:32});it(this,"setHeight",(E,t)=>{f(this,Oe).data.get(parseInt(E/f(this,Oe).template.length)).__ng.height[parseInt(E%f(this,Oe).template.length)]=t});Y(this,ui,E=>typeof E=="object"&&E.tagName=="TR"?parseInt(E.getAttribute("data-row"))*f(this,Oe).template.length+E.sectionRowIndex%f(this,Oe).template.length:E);it(this,"attr",(E,t,l,c)=>{t=f(this,ui).call(this,t);var o=parseInt(t/f(this,Oe).template.length),r=f(this,Oe).data.get(o,"rowid"),n=t%f(this,Oe).template.length,s=H.decode(E,"head",f(this,gn),"foot",f(this,yn),f(this,bn)),e=s.findIndex(u=>u.rowid==r&&u.subrow==n);if(c)if(e<0){var i={rowid:r,subrow:n,cells:[]};i[l]=c,s.push(i)}else s[e][l]=c;else return e<0?null:s[e][l]});it(this,"height",(E,t,l)=>{var c=this.attr(E,t,"height",l);return c||(c=$(f(this,Oe).template[f(this,ui).call(this,t)%f(this,Oe).template.length]).height()),c});it(this,"attr2",(E,t,l,c,o)=>{l=f(this,ui).call(this,l);var r=parseInt(l/f(this,Oe).template.length),n=E&&E.hasOwnProperty("rowid")?E[r].rowid:null,s=l%f(this,Oe).template.length,e=H.decode(t,"head",f(this,gn),"foot",f(this,yn),f(this,bn)),i=e.findIndex(a=>a.rowid==n&&a.subrow==s);if(o)if(i<0){var u={rowid:n,subrow:s,cells:[]};u[c]=o,e.push(u)}else e[i][c]=o;else return i<0?null:e[i][c]});it(this,"height2",(E,t,l,c)=>{var o=this.attr2(E,t,l,"height",c);return o||(o=$(f(this,Oe).template[f(this,ui).call(this,l)%f(this,Oe).template.length]).height()),o});tt(this,Oe,E),tt(this,ci,-1),tt(this,gn,[]),tt(this,bn,[]),tt(this,yn,[]),this.head={attr:(t,l,c)=>this.attr("head",t,l,c),height:(t,l)=>this.height("head",t,l)},this.body={attr:(t,l,c)=>this.attr("body",t,l,c),height:(t,l)=>this.height("body",t,l),height2:(t,l,c)=>this.height2(t,"body",l,c)},this.foot={attr:(t,l,c)=>this.attr("foot",t,l,c),height:(t,l)=>this.height("foot",t,l)}}get row(){return f(this,ci)}set row(E){tt(this,ci,parseInt(E)),f(this,Oe).selection.selectedStartRow==f(this,Oe).selection.selectedEndRow&&(f(this,Oe).selection.selectedStartRow=f(this,Oe).selection.selectedEndRow=f(this,Oe).selection.startRow=f(this,ci))}}Oe=new WeakMap,ci=new WeakMap,gn=new WeakMap,bn=new WeakMap,yn=new WeakMap,ui=new WeakMap;class Bd extends HTMLElement{constructor(){super();Y(this,ts);Y(this,es);it(this,"popup",()=>{setTimeout(()=>{f(this,es).data.assign(f(this,ts).data.get()),this.shadowRoot.querySelector("dialog").showModal()},100)});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,ts,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
503
503
|
<style>
|
|
504
504
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ninegrid.css";
|
|
505
505
|
:host {
|
|
@@ -514,14 +514,14 @@ use chrome, FireFox or Internet Explorer 11`)}var s=t("safe-buffer"),e=t("random
|
|
|
514
514
|
${f(this,ts).originFormat}
|
|
515
515
|
</nx-dialog>
|
|
516
516
|
`,tt(this,es,this.shadowRoot.querySelector("nine-grid")),f(this,es).removeAttribute("display-row-count"),$(".reset",this.shadowRoot).on("click",t=>{f(this,es).data.assign(f(this,ts).data.get())}),$(".apply",this.shadowRoot).on("click",t=>{var l=f(this,es).data.getChangedData();f(this,ts).data.add(l.insert);for(var c of l.update)f(this,ts).data.update(c);for(var c of l.delete)f(this,ts).data.delete(c);f(this,es).data.changeRowState()}),this.shadowRoot.addEventListener("click",t=>{f(this,es).data.isChanged()&&(t.stopImmediatePropagation(),H.confirm(`There is changed data.
|
|
517
|
-
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(l=>{l&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}ts=new WeakMap,es=new WeakMap,customElements.get("ng-max-popup")||customElements.define("ng-max-popup",Bd);class Fd extends HTMLElement{constructor(){super();Y(this,Lt);Y(this,ia);Y(this,Ph);tt(this,ia,new Od(f(this,Lt))),tt(this,Ph,new Eu(f(this,Lt)))}connectedCallback(){tt(this,Lt,this.getRootNode().host.getRootNode().host),this.innerHTML="";var t=new ad({owner:f(this,Lt),items:{filtering:{name:"Filtering",className:"ng-menu-filtering"},maximize:{name:"Maximize",className:"maximize"},export:{name:"export",items:{"export-excel":{name:"Excel",className:"export-excel"},"export-pdf":{name:"Pdf",className:"export-pdf",disabled:function(l,c){return!0}}}},import:{name:"import",className:"import",disabled:function(l,c){return!0}},properties:{name:"options",items:{"show-title-bar":{name:"title bar show/hide",className:"show-title-bar"},"show-menu-icon":{name:"menu icon show/hide",className:"show-menu-icon"},"show-status-bar":{name:"status bar show/hide",className:"show-status-bar"},"show-tfoot":{name:"table footer show/hide",className:"show-tfoot",disabled:function(l,c){return!($(".ng-table tfoot",this.getRootNode().host).length>0)}},"select-type":{name:"select type",items:{[`select-type-${H.SELECTTYPE.ROW}`]:{name:"row",className:`select-type select-type-${H.SELECTTYPE.ROW}`},[`select-type-${H.SELECTTYPE.ROWS}`]:{name:"multi row",className:`select-type select-type-${H.SELECTTYPE.ROWS}`},[`select-type-${H.SELECTTYPE.COL}`]:{name:"column",className:`select-type select-type-${H.SELECTTYPE.COL}`},[`select-type-${H.SELECTTYPE.COLS}`]:{name:"multi column",className:`select-type select-type-${H.SELECTTYPE.COLS}`},[`select-type-${H.SELECTTYPE.CELL}`]:{name:"cell",className:`select-type select-type-${H.SELECTTYPE.CELL}`},[`select-type-${H.SELECTTYPE.AREA}`]:{name:"area",className:`select-type select-type-${H.SELECTTYPE.AREA}`},[`select-type-${H.SELECTTYPE.NONE}`]:{name:"none",className:`select-type select-type-${H.SELECTTYPE.NONE}`}}},"paging-type":{name:"paging type",items:{[`paging-type-${H.PAGINGTYPE.NONE}`]:{name:"none",className:`paging-type paging-type-${H.PAGINGTYPE.NONE}`},[`paging-type-${H.PAGINGTYPE.CLIENT}`]:{name:"client",className:`paging-type paging-type-${H.PAGINGTYPE.CLIENT}`},[`paging-type-${H.PAGINGTYPE.SERVER}`]:{name:"server",className:`paging-type paging-type-${H.PAGINGTYPE.SERVER}`},"paging-count":{name:"entries per page",items:{[`paging-count-${H.PAGINGCOUNT.AUTO}`]:{name:"auto",className:`paging-count paging-count-${H.PAGINGCOUNT.AUTO}`},[`paging-count-${H.PAGINGCOUNT.NUM_1}`]:{name:"1",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1}`},[`paging-count-${H.PAGINGCOUNT.NUM_5}`]:{name:"5",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_5}`},[`paging-count-${H.PAGINGCOUNT.NUM_10}`]:{name:"10",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10}`},[`paging-count-${H.PAGINGCOUNT.NUM_20}`]:{name:"20",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_20}`},[`paging-count-${H.PAGINGCOUNT.NUM_30}`]:{name:"30",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_30}`},[`paging-count-${H.PAGINGCOUNT.NUM_50}`]:{name:"50",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_50}`},[`paging-count-${H.PAGINGCOUNT.NUM_100}`]:{name:"100",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_100}`},[`paging-count-${H.PAGINGCOUNT.NUM_1000}`]:{name:"1000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1000}`},[`paging-count-${H.PAGINGCOUNT.NUM_10000}`]:{name:"10000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10000}`}}}}},"auto-fit-col":{name:"auto fit columns",className:"auto-fit-col"}}}},callback:l=>{switch(l.menuId){case"maximize":$("ng-max-popup",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-max-popup></ng-max-popup>")),f(this,Lt).shadowRoot.querySelector("ng-max-popup").popup();break;case"import":f(this,ia).importExcel();break;case"export-excel":f(this,Lt).export();break;case"export-pdf":$("ng-export",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-export></ng-export>")),f(this,Lt).shadowRoot.querySelector("ng-export").exportPdf();break;case"detail":break;case"filtering":f(this,Lt).filtering.isFiltering()?f(this,Lt).filtering.off():f(this,Lt).filtering.on();break;case`select-type-${H.SELECTTYPE.ROW}`:case`select-type-${H.SELECTTYPE.ROWS}`:case`select-type-${H.SELECTTYPE.COL}`:case`select-type-${H.SELECTTYPE.COLS}`:case`select-type-${H.SELECTTYPE.CELL}`:case`select-type-${H.SELECTTYPE.AREA}`:case`select-type-${H.SELECTTYPE.NONE}`:f(this,Lt).setAttribute("select-type",l.menuId.replace("select-type-",""));break;case"show-title-bar":f(this,Lt).setAttribute("show-title-bar",f(this,Lt).getAttribute("show-title-bar")=="true"?"false":"true");break;case"show-menu-icon":f(this,Lt).setAttribute("show-menu-icon",f(this,Lt).getAttribute("show-menu-icon")=="true"?"false":"true");break;case"show-status-bar":f(this,Lt).setAttribute("show-status-bar",f(this,Lt).getAttribute("show-status-bar")=="true"?"false":"true");break;case`paging-type-${H.PAGINGTYPE.NONE}`:case`paging-type-${H.PAGINGTYPE.CLIENT}`:case`paging-type-${H.PAGINGTYPE.SERVER}`:f(this,Lt).setAttribute("paging-type",l.menuId.replace("paging-type-",""));break;case`paging-count-${H.PAGINGCOUNT.AUTO}`:case`paging-count-${H.PAGINGCOUNT.NUM_1}`:case`paging-count-${H.PAGINGCOUNT.NUM_5}`:case`paging-count-${H.PAGINGCOUNT.NUM_10}`:case`paging-count-${H.PAGINGCOUNT.NUM_20}`:case`paging-count-${H.PAGINGCOUNT.NUM_30}`:case`paging-count-${H.PAGINGCOUNT.NUM_50}`:case`paging-count-${H.PAGINGCOUNT.NUM_100}`:case`paging-count-${H.PAGINGCOUNT.NUM_1000}`:case`paging-count-${H.PAGINGCOUNT.NUM_10000}`:f(this,Lt).setAttribute("paging-count",l.menuId.replace("paging-count-",""));break;case"col-indicator-type":f(this,Lt).setAttribute("col-indicator-type",f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.COLINDICATORTYPE.COLLAPSE:H.COLINDICATORTYPE.EXPAND);break;case"auto-fit-col":f(this,Lt).setAttribute("auto-fit-col",f(this,Lt).getAttribute("auto-fit-col")=="true"?"false":"true");break;case"show-tfoot":f(this,Lt).setAttribute("show-tfoot",f(this,Lt).getAttribute("show-tfoot")=="true"?"false":"true");break;default:console.log(l.menuId)}},events:{show:l=>{H.j.querySelectorAll(f(this,Lt)).hasClass("ng-maximize")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-title-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-menu-icon")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-status-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll("ng-context-menu-panel .select-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .select-type-${f(this,Lt).getAttribute("select-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-type-${f(this,Lt).getAttribute("paging-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-count",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-count-${f(this,Lt).getAttribute("paging-count")}`,f(this,Lt).shadowRoot).addClass("on"),f(this,Lt).filtering.isFiltering()?H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("auto-fit-col")=="true"?H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).removeClass("on");const c=f(this,Lt).body.querySelector(".ng-table tfoot"),o=H.j.querySelectorAll("ng-context-menu-panel .show-tfoot",f(this,Lt).shadowRoot);c?(o.removeClass("disabled"),c.style.visibility=="collapse"?o.removeClass("on"):o.addClass("on")):o.addClass("disabled"),typeof ExcelJS>"u"&&H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-excel",f(this,Lt).shadowRoot).addClass("disabled"),H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-pdf",f(this,Lt).shadowRoot).addClass("disabled"),f(this,Lt).closest("dialog")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("disabled"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("disabled")},hide:()=>{}}});$(f(this,Lt).shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-menu")).on("click",l=>{t.openMenu(l.offsetX,l.offsetY)})}}Lt=new WeakMap,ia=new WeakMap,Ph=new WeakMap,customElements.get("ng-menu")||customElements.define("ng-menu",Fd);class qd extends HTMLElement{constructor(){super();Y(this,Fe);Y(this,na);Y(this,oa);Y(this,Rr);Y(this,aa);Y(this,We);Y(this,rr);Y(this,Ds);it(this,"refreshTotal",()=>{});Y(this,Dh,()=>{f(this,Fe).data.getValidDataNF().map(t=>{t.__ng.paging=!0}),f(this,Fe).data.resetRecords()});Y(this,yn,()=>{this.type==H.PAGINGTYPE.CLIENT?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fe).data.countNF().toLocaleString()}`):this.type==H.PAGINGTYPE.SERVER?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Ds).toLocaleString()}`):this.type==H.PAGINGTYPE.NONE&&$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Ds).toLocaleString()}`),f(this,rr)==0?$("span",this).eq(0).html(""):$("span",this).eq(0).html(`${f(this,We).toLocaleString()} <i>of</i> ${f(this,rr).toLocaleString()}`),H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1)});Y(this,Bh,()=>{this.type==H.PAGINGTYPE.CLIENT?this.movePage(Math.ceil(f(this,Fe).data.countNF()/f(this,Rr))):this.type==H.PAGINGTYPE.SERVER&&this.movePage(Math.ceil(f(this,Ds)/f(this,Rr)))});it(this,"movePage",t=>{if(!(!f(this,Fe)||!f(this,Fe).data||isNaN(t))){if(this.type==H.PAGINGTYPE.SERVER&&(H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",!0)),tt(this,aa,f(this,We)),tt(this,We,t),this.type==H.PAGINGTYPE.CLIENT){var l=f(this,Fe).data.getValidDataNF();if(tt(this,rr,Math.ceil(l.length/f(this,Rr))),l.length==0)tt(this,rr,0);else if(t<1||t>f(this,rr))throw`1invalid page ${t} of ${f(this,rr)}`;f(this,yn).call(this),l.map(o=>{o.__ng.paging=!1});for(var c=(f(this,We)-1)*f(this,Rr);c<Math.min(f(this,We)*f(this,Rr),f(this,Fe).data.countNF());c++)l[c].__ng.paging=!0;f(this,Fe).data.resetRecords(),f(this,Fe).scrollTo_V1(0)}this.type==H.PAGINGTYPE.SERVER&&f(this,aa)!=f(this,We)&&(this.onpagechanged.pageIndex=f(this,We),this.onpagechanged.pageCnt=f(this,Rr),f(this,Fe).dispatchEvent(this.onpagechanged))}});it(this,"reset",()=>{this.refresh()});it(this,"refresh",()=>{switch(this.type){case H.PAGINGTYPE.NONE:f(this,Dh).call(this),$(".ng-container tbody tr.bindable:not(.nodata)",f(this,Fe).body).remove(),f(this,Fe).scrollTo_V1(0);break;case H.PAGINGTYPE.CLIENT:this.movePage(1),f(this,Fe).refresh();break;case H.PAGINGTYPE.SERVER:break}f(this,yn).call(this)});tt(this,Fe,this.getRootNode().host.getRootNode().host),tt(this,We,0),tt(this,rr,0),tt(this,Ds,0),this.onpagechanged=new CustomEvent("pagechanged",{bubbles:!0,detail:{}})}connectedCallback(){this.innerHTML=`
|
|
517
|
+
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(l=>{l&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}ts=new WeakMap,es=new WeakMap,customElements.get("ng-max-popup")||customElements.define("ng-max-popup",Bd);class Fd extends HTMLElement{constructor(){super();Y(this,Lt);Y(this,ia);Y(this,Ph);tt(this,ia,new Od(f(this,Lt))),tt(this,Ph,new Eu(f(this,Lt)))}connectedCallback(){tt(this,Lt,this.getRootNode().host.getRootNode().host),this.innerHTML="";var t=new ad({owner:f(this,Lt),items:{filtering:{name:"Filtering",className:"ng-menu-filtering"},maximize:{name:"Maximize",className:"maximize"},export:{name:"export",items:{"export-excel":{name:"Excel",className:"export-excel"},"export-pdf":{name:"Pdf",className:"export-pdf",disabled:function(l,c){return!0}}}},import:{name:"import",className:"import",disabled:function(l,c){return!0}},properties:{name:"options",items:{"show-title-bar":{name:"title bar show/hide",className:"show-title-bar"},"show-menu-icon":{name:"menu icon show/hide",className:"show-menu-icon"},"show-status-bar":{name:"status bar show/hide",className:"show-status-bar"},"show-tfoot":{name:"table footer show/hide",className:"show-tfoot",disabled:function(l,c){return!($(".ng-table tfoot",this.getRootNode().host).length>0)}},"select-type":{name:"select type",items:{[`select-type-${H.SELECTTYPE.ROW}`]:{name:"row",className:`select-type select-type-${H.SELECTTYPE.ROW}`},[`select-type-${H.SELECTTYPE.ROWS}`]:{name:"multi row",className:`select-type select-type-${H.SELECTTYPE.ROWS}`},[`select-type-${H.SELECTTYPE.COL}`]:{name:"column",className:`select-type select-type-${H.SELECTTYPE.COL}`},[`select-type-${H.SELECTTYPE.COLS}`]:{name:"multi column",className:`select-type select-type-${H.SELECTTYPE.COLS}`},[`select-type-${H.SELECTTYPE.CELL}`]:{name:"cell",className:`select-type select-type-${H.SELECTTYPE.CELL}`},[`select-type-${H.SELECTTYPE.AREA}`]:{name:"area",className:`select-type select-type-${H.SELECTTYPE.AREA}`},[`select-type-${H.SELECTTYPE.NONE}`]:{name:"none",className:`select-type select-type-${H.SELECTTYPE.NONE}`}}},"paging-type":{name:"paging type",items:{[`paging-type-${H.PAGINGTYPE.NONE}`]:{name:"none",className:`paging-type paging-type-${H.PAGINGTYPE.NONE}`},[`paging-type-${H.PAGINGTYPE.CLIENT}`]:{name:"client",className:`paging-type paging-type-${H.PAGINGTYPE.CLIENT}`},[`paging-type-${H.PAGINGTYPE.SERVER}`]:{name:"server",className:`paging-type paging-type-${H.PAGINGTYPE.SERVER}`},"paging-count":{name:"entries per page",items:{[`paging-count-${H.PAGINGCOUNT.AUTO}`]:{name:"auto",className:`paging-count paging-count-${H.PAGINGCOUNT.AUTO}`},[`paging-count-${H.PAGINGCOUNT.NUM_1}`]:{name:"1",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1}`},[`paging-count-${H.PAGINGCOUNT.NUM_5}`]:{name:"5",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_5}`},[`paging-count-${H.PAGINGCOUNT.NUM_10}`]:{name:"10",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10}`},[`paging-count-${H.PAGINGCOUNT.NUM_20}`]:{name:"20",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_20}`},[`paging-count-${H.PAGINGCOUNT.NUM_30}`]:{name:"30",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_30}`},[`paging-count-${H.PAGINGCOUNT.NUM_50}`]:{name:"50",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_50}`},[`paging-count-${H.PAGINGCOUNT.NUM_100}`]:{name:"100",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_100}`},[`paging-count-${H.PAGINGCOUNT.NUM_1000}`]:{name:"1000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_1000}`},[`paging-count-${H.PAGINGCOUNT.NUM_10000}`]:{name:"10000",className:`paging-count paging-count-${H.PAGINGCOUNT.NUM_10000}`}}}}},"auto-fit-col":{name:"auto fit columns",className:"auto-fit-col"}}}},callback:l=>{switch(l.menuId){case"maximize":$("ng-max-popup",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-max-popup></ng-max-popup>")),f(this,Lt).shadowRoot.querySelector("ng-max-popup").popup();break;case"import":f(this,ia).importExcel();break;case"export-excel":f(this,Lt).export();break;case"export-pdf":$("ng-export",f(this,Lt).shadowRoot).remove(),$(f(this,Lt).shadowRoot).append($("<ng-export></ng-export>")),f(this,Lt).shadowRoot.querySelector("ng-export").exportPdf();break;case"detail":break;case"filtering":f(this,Lt).filtering.isFiltering()?f(this,Lt).filtering.off():f(this,Lt).filtering.on();break;case`select-type-${H.SELECTTYPE.ROW}`:case`select-type-${H.SELECTTYPE.ROWS}`:case`select-type-${H.SELECTTYPE.COL}`:case`select-type-${H.SELECTTYPE.COLS}`:case`select-type-${H.SELECTTYPE.CELL}`:case`select-type-${H.SELECTTYPE.AREA}`:case`select-type-${H.SELECTTYPE.NONE}`:f(this,Lt).setAttribute("select-type",l.menuId.replace("select-type-",""));break;case"show-title-bar":f(this,Lt).setAttribute("show-title-bar",f(this,Lt).getAttribute("show-title-bar")=="true"?"false":"true");break;case"show-menu-icon":f(this,Lt).setAttribute("show-menu-icon",f(this,Lt).getAttribute("show-menu-icon")=="true"?"false":"true");break;case"show-status-bar":f(this,Lt).setAttribute("show-status-bar",f(this,Lt).getAttribute("show-status-bar")=="true"?"false":"true");break;case`paging-type-${H.PAGINGTYPE.NONE}`:case`paging-type-${H.PAGINGTYPE.CLIENT}`:case`paging-type-${H.PAGINGTYPE.SERVER}`:f(this,Lt).setAttribute("paging-type",l.menuId.replace("paging-type-",""));break;case`paging-count-${H.PAGINGCOUNT.AUTO}`:case`paging-count-${H.PAGINGCOUNT.NUM_1}`:case`paging-count-${H.PAGINGCOUNT.NUM_5}`:case`paging-count-${H.PAGINGCOUNT.NUM_10}`:case`paging-count-${H.PAGINGCOUNT.NUM_20}`:case`paging-count-${H.PAGINGCOUNT.NUM_30}`:case`paging-count-${H.PAGINGCOUNT.NUM_50}`:case`paging-count-${H.PAGINGCOUNT.NUM_100}`:case`paging-count-${H.PAGINGCOUNT.NUM_1000}`:case`paging-count-${H.PAGINGCOUNT.NUM_10000}`:f(this,Lt).setAttribute("paging-count",l.menuId.replace("paging-count-",""));break;case"col-indicator-type":f(this,Lt).setAttribute("col-indicator-type",f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.COLINDICATORTYPE.COLLAPSE:H.COLINDICATORTYPE.EXPAND);break;case"auto-fit-col":f(this,Lt).setAttribute("auto-fit-col",f(this,Lt).getAttribute("auto-fit-col")=="true"?"false":"true");break;case"show-tfoot":f(this,Lt).setAttribute("show-tfoot",f(this,Lt).getAttribute("show-tfoot")=="true"?"false":"true");break;default:console.log(l.menuId)}},events:{show:l=>{H.j.querySelectorAll(f(this,Lt)).hasClass("ng-maximize")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-title-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-title-bar",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-menu-icon")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-menu-icon",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("show-status-bar")=="true"?H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .show-status-bar",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll("ng-context-menu-panel .select-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .select-type-${f(this,Lt).getAttribute("select-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-type",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-type-${f(this,Lt).getAttribute("paging-type")}`,f(this,Lt).shadowRoot).addClass("on"),H.j.querySelectorAll("ng-context-menu-panel .paging-count",f(this,Lt).shadowRoot).removeClass("on"),H.j.querySelectorAll(`ng-context-menu-panel .paging-count-${f(this,Lt).getAttribute("paging-count")}`,f(this,Lt).shadowRoot).addClass("on"),f(this,Lt).filtering.isFiltering()?H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .ng-menu-filtering",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("auto-fit-col")=="true"?H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .auto-fit-col",f(this,Lt).shadowRoot).removeClass("on"),f(this,Lt).getAttribute("col-indicator-type")==H.COLINDICATORTYPE.EXPAND?H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).addClass("on"):H.j.querySelectorAll("ng-context-menu-panel .col-indicator-type",f(this,Lt).shadowRoot).removeClass("on");const c=f(this,Lt).body.querySelector(".ng-table tfoot"),o=H.j.querySelectorAll("ng-context-menu-panel .show-tfoot",f(this,Lt).shadowRoot);c?(o.removeClass("disabled"),c.style.visibility=="collapse"?o.removeClass("on"):o.addClass("on")):o.addClass("disabled"),typeof ExcelJS>"u"&&H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-excel",f(this,Lt).shadowRoot).addClass("disabled"),H.j.querySelectorAll("ng-context-menu-panel .import,ng-context-menu-panel .export-pdf",f(this,Lt).shadowRoot).addClass("disabled"),f(this,Lt).closest("dialog")?H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).addClass("disabled"):H.j.querySelectorAll("ng-context-menu-panel .maximize",f(this,Lt).shadowRoot).removeClass("disabled")},hide:()=>{}}});$(f(this,Lt).shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-menu")).on("click",l=>{t.openMenu(l.offsetX,l.offsetY)})}}Lt=new WeakMap,ia=new WeakMap,Ph=new WeakMap,customElements.get("ng-menu")||customElements.define("ng-menu",Fd);class qd extends HTMLElement{constructor(){super();Y(this,Fe);Y(this,na);Y(this,oa);Y(this,Rr);Y(this,aa);Y(this,We);Y(this,rr);Y(this,Ds);it(this,"refreshTotal",()=>{});Y(this,Dh,()=>{f(this,Fe).data.getValidDataNF().map(t=>{t.__ng.paging=!0}),f(this,Fe).data.resetRecords()});Y(this,vn,()=>{this.type==H.PAGINGTYPE.CLIENT?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Fe).data.countNF().toLocaleString()}`):this.type==H.PAGINGTYPE.SERVER?$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Ds).toLocaleString()}`):this.type==H.PAGINGTYPE.NONE&&$("span",this).eq(1).html(`<b>Total</b> : ${f(this,Ds).toLocaleString()}`),f(this,rr)==0?$("span",this).eq(0).html(""):$("span",this).eq(0).html(`${f(this,We).toLocaleString()} <i>of</i> ${f(this,rr).toLocaleString()}`),H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",f(this,We)==1||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",f(this,We)==f(this,rr)||f(this,rr)<1)});Y(this,Bh,()=>{this.type==H.PAGINGTYPE.CLIENT?this.movePage(Math.ceil(f(this,Fe).data.countNF()/f(this,Rr))):this.type==H.PAGINGTYPE.SERVER&&this.movePage(Math.ceil(f(this,Ds)/f(this,Rr)))});it(this,"movePage",t=>{if(!(!f(this,Fe)||!f(this,Fe).data||isNaN(t))){if(this.type==H.PAGINGTYPE.SERVER&&(H.j.querySelectorAll(".ng-paging-first",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-prev",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-next",this).attr("disabled",!0),H.j.querySelectorAll(".ng-paging-last",this).attr("disabled",!0)),tt(this,aa,f(this,We)),tt(this,We,t),this.type==H.PAGINGTYPE.CLIENT){var l=f(this,Fe).data.getValidDataNF();if(tt(this,rr,Math.ceil(l.length/f(this,Rr))),l.length==0)tt(this,rr,0);else if(t<1||t>f(this,rr))throw`1invalid page ${t} of ${f(this,rr)}`;f(this,vn).call(this),l.map(o=>{o.__ng.paging=!1});for(var c=(f(this,We)-1)*f(this,Rr);c<Math.min(f(this,We)*f(this,Rr),f(this,Fe).data.countNF());c++)l[c].__ng.paging=!0;f(this,Fe).data.resetRecords(),f(this,Fe).scrollTo_V1(0)}this.type==H.PAGINGTYPE.SERVER&&f(this,aa)!=f(this,We)&&(this.onpagechanged.pageIndex=f(this,We),this.onpagechanged.pageCnt=f(this,Rr),f(this,Fe).dispatchEvent(this.onpagechanged))}});it(this,"reset",()=>{this.refresh()});it(this,"refresh",()=>{switch(this.type){case H.PAGINGTYPE.NONE:f(this,Dh).call(this),$(".ng-container tbody tr.bindable:not(.nodata)",f(this,Fe).body).remove(),f(this,Fe).scrollTo_V1(0);break;case H.PAGINGTYPE.CLIENT:this.movePage(1),f(this,Fe).refresh();break;case H.PAGINGTYPE.SERVER:break}f(this,vn).call(this)});tt(this,Fe,this.getRootNode().host.getRootNode().host),tt(this,We,0),tt(this,rr,0),tt(this,Ds,0),this.onpagechanged=new CustomEvent("pagechanged",{bubbles:!0,detail:{}})}connectedCallback(){this.innerHTML=`
|
|
518
518
|
<button class="ng-paging-last" disabled></button>
|
|
519
519
|
<button class="ng-paging-next" disabled></button>
|
|
520
520
|
<span></span>
|
|
521
521
|
<button class="ng-paging-prev" disabled></button>
|
|
522
522
|
<button class="ng-paging-first" disabled></button>
|
|
523
523
|
<span></span>
|
|
524
|
-
`,$(".ng-paging-first",this).on("click",t=>this.movePage(1)),$(".ng-paging-prev",this).on("click",t=>this.movePage(f(this,We)-1)),$(".ng-paging-next",this).on("click",t=>this.movePage(f(this,We)+1)),$(".ng-paging-last",this).on("click",t=>f(this,Bh).call(this))}get type(){return f(this,Fe).getAttribute("paging-type")}set type(t){if(!Object.values(H.PAGINGTYPE).includes(t))throw`invalid page type : ${t}`;switch(t){case H.PAGINGTYPE.NONE:$(this).children().show(),$(this).children().not("span:last-child").hide();break;case H.PAGINGTYPE.CLIENT:$(this).children().show();break;case H.PAGINGTYPE.SERVER:$(this).children().show();break}this.refresh()}get currentPage(){return f(this,We)}set currentPage(t){if(this.type!=H.PAGINGTYPE.SERVER)throw'"currentPage" is only allowed when the paging type is server.';tt(this,We,t)}get totalCount(){return f(this,rr)}set totalCount(t){tt(this,Ds,t),f(this,We)<=0&&tt(this,We,1),tt(this,rr,Math.ceil(t/f(this,Rr))),f(this,
|
|
524
|
+
`,$(".ng-paging-first",this).on("click",t=>this.movePage(1)),$(".ng-paging-prev",this).on("click",t=>this.movePage(f(this,We)-1)),$(".ng-paging-next",this).on("click",t=>this.movePage(f(this,We)+1)),$(".ng-paging-last",this).on("click",t=>f(this,Bh).call(this))}get type(){return f(this,Fe).getAttribute("paging-type")}set type(t){if(!Object.values(H.PAGINGTYPE).includes(t))throw`invalid page type : ${t}`;switch(t){case H.PAGINGTYPE.NONE:$(this).children().show(),$(this).children().not("span:last-child").hide();break;case H.PAGINGTYPE.CLIENT:$(this).children().show();break;case H.PAGINGTYPE.SERVER:$(this).children().show();break}this.refresh()}get currentPage(){return f(this,We)}set currentPage(t){if(this.type!=H.PAGINGTYPE.SERVER)throw'"currentPage" is only allowed when the paging type is server.';tt(this,We,t)}get totalCount(){return f(this,rr)}set totalCount(t){tt(this,Ds,t),f(this,We)<=0&&tt(this,We,1),tt(this,rr,Math.ceil(t/f(this,Rr))),f(this,vn).call(this)}get linesPerPage(){return f(this,Rr)}get count(){return f(this,na)}set count(t){setTimeout(()=>{if(tt(this,na,t),t==H.PAGINGCOUNT.AUTO){var l=$(".ng-container-body",f(this,Fe).body).height()-($(".ng-container-body thead",f(this,Fe).body).height()||0)-($(".ng-container-body tfoot",f(this,Fe).body).height()||0),c=0;$(f(this,Fe).template).each((o,r)=>c+=$(r).height()),tt(this,Rr,Math.floor(l/c))}else tt(this,Rr,Number(t));switch(this.type){case H.PAGINGTYPE.NONE:this.refresh();break;case H.PAGINGTYPE.CLIENT:this.refresh();break;case H.PAGINGTYPE.SERVER:this.movePage(1);break}})}get url(){return f(this,oa)}set url(t){tt(this,oa,t)}}Fe=new WeakMap,na=new WeakMap,oa=new WeakMap,Rr=new WeakMap,aa=new WeakMap,We=new WeakMap,rr=new WeakMap,Ds=new WeakMap,Dh=new WeakMap,vn=new WeakMap,Bh=new WeakMap,customElements.get("ng-paging")||customElements.define("ng-paging",qd);class Hd extends _r{constructor(){super();Y(this,di);Y(this,la);it(this,"dataRefresh",t=>{f(this,di).value=this.value,f(this,la).innerHTML=this.getDisplayText(),t||this.reset()})}connectedCallback(){const t=this.getAttribute("back-color")||"transparent",l=this.getAttribute("bar-color")||"green",c=this.getAttribute("show-text")||"true",o=this.getAttribute("text-color")||"unset",r=this.getAttribute("text-shadow")||"unset";for(var n=[],s=0;s<this.attributes.length;s++)["min","max","value"].includes(this.attributes[s].name)&&n.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);this.shadowRoot.innerHTML=`
|
|
525
525
|
<style>
|
|
526
526
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngProgress.css";
|
|
527
527
|
${H.getCustomPath(this,"ngProgress.css")}
|
|
@@ -556,7 +556,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
556
556
|
<div class="ng-wrap">
|
|
557
557
|
${r}
|
|
558
558
|
</div>
|
|
559
|
-
`,super.connectedCallback(),f(this,qh).call(this),tt(this,Bs,this.shadowRoot.querySelectorAll("input")),$(this.cell).on("keydown",n=>{switch(n.preventDefault(),n.code){case"Space":var s=-1;$(f(this,Bs)).each((e,i)=>{if(this.value==i.getAttribute("value"))return s=e,!1}),s=s==f(this,Bs).length-1?0:s>=0?s+1:0,this.value=f(this,Bs)[s].getAttribute("value");break}})}get dataSource(){return f(this,Pr)}}Bs=new WeakMap,Pr=new WeakMap,Fs=new WeakMap,fi=new WeakMap,Fh=new WeakMap,qh=new WeakMap,customElements.get("ng-radio")||customElements.define("ng-radio",zd);class Ud extends _r{constructor(){super();Y(this,
|
|
559
|
+
`,super.connectedCallback(),f(this,qh).call(this),tt(this,Bs,this.shadowRoot.querySelectorAll("input")),$(this.cell).on("keydown",n=>{switch(n.preventDefault(),n.code){case"Space":var s=-1;$(f(this,Bs)).each((e,i)=>{if(this.value==i.getAttribute("value"))return s=e,!1}),s=s==f(this,Bs).length-1?0:s>=0?s+1:0,this.value=f(this,Bs)[s].getAttribute("value");break}})}get dataSource(){return f(this,Pr)}}Bs=new WeakMap,Pr=new WeakMap,Fs=new WeakMap,fi=new WeakMap,Fh=new WeakMap,qh=new WeakMap,customElements.get("ng-radio")||customElements.define("ng-radio",zd);class Ud extends _r{constructor(){super();Y(this,wn);it(this,"dataRefresh",t=>{f(this,wn)&&(f(this,wn).innerHTML=this.getDisplayText(),t||this.reset())})}connectedCallback(){this.getAttribute("link")=="true";const t=this.closest("th,td").getAttribute("text-align")||"left",l=t=="left"?"flex-start":t=="right"?"flex-end":"center";if(this.cell=this.closest("th,td"),!this.cell)return;const c=this.getAttribute("color")||this.cell.getAttribute("color")||"";this.shadowRoot.innerHTML=`
|
|
560
560
|
<style>
|
|
561
561
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRenderer.css";
|
|
562
562
|
${H.getCustomPath(this,"ngRenderer.css")}
|
|
@@ -572,7 +572,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
572
572
|
<div class="ng-wrap">
|
|
573
573
|
<span class="renderer"></span>
|
|
574
574
|
</div>
|
|
575
|
-
`,super.connectedCallback(),tt(this,
|
|
575
|
+
`,super.connectedCallback(),tt(this,wn,this.shadowRoot.querySelector("span.renderer"))}}wn=new WeakMap,customElements.get("ng-renderer")||customElements.define("ng-renderer",Ud);class Vd extends _r{constructor(){super();it(this,"dataRefresh",t=>{!this.owner||!this.cell||!this.data||t||this.reset()});Y(this,Hh,()=>{this.shadowRoot.querySelector("svg.dtl").addEventListener("click",t=>{$("ng-row-detail-popup",this.owner.shadowRoot).remove(),$(this.owner.shadowRoot).append($("<ng-row-detail-popup></ng-row-detail-popup>")),this.owner.shadowRoot.querySelector("ng-row-detail-popup").popup(this.cell.dataset.row)})})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
576
576
|
<style>
|
|
577
577
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowDetail.css";
|
|
578
578
|
${H.getCustomPath(this,"ngRowDetail.css")}
|
|
@@ -602,12 +602,12 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
602
602
|
</nine-grid>
|
|
603
603
|
</nx-dialog>
|
|
604
604
|
`,tt(this,cr,this.shadowRoot.querySelector("nine-grid")),f(this,cr).fields.add(f(this,sr).fields.get()),$(".reset",this.shadowRoot).on("click",l=>{f(this,cr).data.set(f(this,sr).data.getNF(f(this,pi)))}),$(".apply",this.shadowRoot).on("click",l=>{f(this,sr).data.all.update(f(this,cr).data.get(0),f(this,pi)),this.shadowRoot.querySelector("dialog").close()}),$(".close",this.shadowRoot).onFirst("click",l=>{f(this,cr).data.isChanged()&&(l.stopImmediatePropagation(),H.confirm(`There is changed data.
|
|
605
|
-
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(c=>{c&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}sr=new WeakMap,cr=new WeakMap,pi=new WeakMap,customElements.get("ng-row-detail")||customElements.define("ng-row-detail",Vd),customElements.get("ng-row-detail-popup")||customElements.define("ng-row-detail-popup",Wd);const
|
|
605
|
+
Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"}).then(c=>{c&&$(".apply",this.shadowRoot).trigger("click"),this.shadowRoot.querySelector("nx-dialog").close()}))})}}sr=new WeakMap,cr=new WeakMap,pi=new WeakMap,customElements.get("ng-row-detail")||customElements.define("ng-row-detail",Vd),customElements.get("ng-row-detail-popup")||customElements.define("ng-row-detail-popup",Wd);const xn=class xn extends _r{constructor(){super();it(this,"dataRefresh",t=>{t||this.reset()});Y(this,zh,t=>{const l=parseInt(this.cell.dataset.row),c=this.owner.body.querySelector(`.ng-container-body tr[data-row="${l}"]`);t.dataTransfer.setDragImage(c,0,0),t.dataTransfer.effectAllowed="copyMove",xn.dragData={tr:this.cell.closest("tr"),id:this.owner.id,row:l,bind:this.cell.dataset.bind}});xn.scrollInterval=this.getAttribute("scroll-interval")||300}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
606
606
|
<style>
|
|
607
607
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowDrag.css";
|
|
608
608
|
${H.getCustomPath(this,"ngRowDrag.css")}
|
|
609
609
|
</style>
|
|
610
|
-
`,super.connectedCallback(),this.cell.setAttribute("draggable","true"),this.cell.addEventListener("dragstart",f(this,zh))}};zh=new WeakMap,it(
|
|
610
|
+
`,super.connectedCallback(),this.cell.setAttribute("draggable","true"),this.cell.addEventListener("dragstart",f(this,zh))}};zh=new WeakMap,it(xn,"dragData"),it(xn,"scrollInterval");let ar=xn;class Xd{constructor(E){Y(this,He);it(this,"resetEvent",()=>{$(".ng-table tbody.bindable",f(this,He).body).off("dragleave",f(this,fa)).off("dragenter",f(this,da)).off("dragover",f(this,ua)).off("drop",f(this,ma)).off("dragend",f(this,pa)).on("dragleave",f(this,fa)).on("dragenter",f(this,da)).on("dragover",f(this,ua)).on("drop",f(this,ma)).on("dragend",f(this,pa))});Y(this,ha,E=>{[".ng-container-left",".ng-container-body",".ng-container-right"].forEach(t=>{const l=f(this,He).body.querySelectorAll(`${t} tr[data-row="${E}"]`);H.j.querySelectorAll("th,td",l[0]).addClass("ng-dragover-up")})});Y(this,ca,E=>{[".ng-container-left",".ng-container-body",".ng-container-right"].forEach(t=>{f(this,He).body.querySelectorAll(`${t} tr[data-row="${E}"]`).forEach((l,c)=>{l.querySelectorAll("th,td").forEach(o=>{c+(o.rowSpan||1)==f(this,He).template.length&&H.j.querySelectorAll(o).addClass("ng-dragover-down")})})})});Y(this,ua,E=>{E.preventDefault();const t=ar.dragData.tr.getRootNode().host,l=E.currentTarget.getRootNode().host,c=parseInt(ar.dragData.tr.dataset.row),o=parseInt(E.target.closest("th,td").dataset.row);if(H.j.querySelectorAll("th,td",t.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"),H.j.querySelectorAll("th,td",l.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"),t.id==l.id)o<c?(f(this,ha).call(this,o),ar.dragData.targetRow=o):o>c&&(f(this,ca).call(this,o),ar.dragData.targetRow=o-1);else{const r=f(this,He).body.querySelector(`tr[data-row="${o}"]`),s=E.pageY-$(r).offset().top<f(this,He).view.getRowHeight(o)/2;s?f(this,ha).call(this,o):f(this,ca).call(this,o),ar.dragData.targetRow=s?o:o+1}});Y(this,ms);Y(this,da,E=>{E.preventDefault();const t=parseInt(E.target.closest("tr").dataset.row);[f(this,He).view.getVisibleFirstRow(),f(this,He).view.getVisibleLastRow()].includes(t)&&setTimeout(()=>{if(!f(this,ms)){const l=t==f(this,He).view.getVisibleLastRow()?1:-1;tt(this,ms,setInterval(()=>{f(this,He).scrollBy(l)},ar.scrollInterval))}})});Y(this,fa,E=>{E.preventDefault(),clearInterval(f(this,ms)),tt(this,ms,null)});Y(this,pa,E=>{});Y(this,ma,E=>{E.preventDefault(),clearInterval(f(this,ms)),tt(this,ms,null),f(this,He).body.querySelectorAll(".ng-container-left .ng-tmp").forEach(a=>{$(a).remove()});const t=H.nvl(document.getElementById(ar.dragData.id),f(this,He)),l=ar.dragData.row,c=ar.dragData.bind,o=E.target.closest("tr"),r=E.target.getRootNode().host,n=parseInt(o.dataset.row),s=r.body.querySelector("ng-row-drag")?r.body.querySelector("ng-row-drag").cell.dataset.bind:null;if(H.j.querySelectorAll("th,td",t.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"),H.j.querySelectorAll("th,td",r.body).removeClass("ng-dragover-up").removeClass("ng-dragover-down"),t.id==r.id&&l==n)return;const e=new CustomEvent(H.EVENT.CAN_ROW_MOVE,{bubbles:!0,cancelable:!0,detail:{}});if(e.sourceGrid=t,e.targetGrid=r,e.sourceRow=l,e.targetRow=ar.dragData.targetRow,f(this,He).dispatchEvent(e)&&(t.id==r.id?E.altKey?f(this,He).data.insert(f(this,He).data.get(l),n):f(this,He).data.moveRow(l,n):(r.data.insert(t.data.get(l),ar.dragData.targetRow),E.altKey||t.data.delete(l))),c){const a=t.fields.indexOf(c);for(var i=0;i<t.data.all.count();i++)t.data.all.setRecord(i,a,i+1)}if(s&&t.id!=r.id){const a=r.fields.indexOf(s);for(var i=0;i<r.data.all.count();i++)r.data.all.setRecord(i,a,i+1)}f(this,He).dataManager.viewRecords.reset();const u=new CustomEvent(H.EVENT.ROW_MOVED,{bubbles:!0,detail:{}});u.sourceGrid=t,u.targetGrid=r,u.sourceRow=l,u.targetRow=ar.dragData.targetRow,f(this,He).dispatchEvent(u),ar.dragData=null});tt(this,He,E),this.resetEvent()}}He=new WeakMap,ha=new WeakMap,ca=new WeakMap,ua=new WeakMap,ms=new WeakMap,da=new WeakMap,fa=new WeakMap,pa=new WeakMap,ma=new WeakMap,customElements.get("ng-row-drag")||customElements.define("ng-row-drag",ar);class Yd extends HTMLElement{constructor(){super();Y(this,or);Y(this,gr);Y(this,mi);Y(this,Uh,()=>{const l=`data.${H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).tmpl).attr("data-bind")}.replaceAll("\\n", "<br>")`;H.j.querySelectorAll(this).addClass("expand"),H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).tmpl).attr("data-expr",l),H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).body).attr("data-expr",l),f(this,ga).call(this)});Y(this,Vh,()=>{H.j.querySelectorAll(this).removeClass("expand"),f(this,mi)?(H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).tmpl).attr("data-expr",f(this,mi)),H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).body).attr("data-expr",f(this,mi))):(H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).tmpl).removeAttr("data-expr"),H.j.querySelectorAll(`[data-col="${f(this,gr).dataset.col}"]`,f(this,or).body).removeAttr("data-expr")),f(this,ga).call(this)});Y(this,ga,()=>{var t=[];f(this,or).body.querySelectorAll("thead ng-row-expand.expand").forEach(o=>{const r=o.closest("th,td").dataset.col;t.push(`th[data-col="${r}"],td[data-col="${r}"]`)});for(var l=[],c=0;c<f(this,or).template.length;c++)l.push($(t.join(","),f(this,or).template.eq(c)));f(this,or).setRowHeightFitAll(l)});this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
611
611
|
<style>
|
|
612
612
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowExpand.css";
|
|
613
613
|
${H.getCustomPath(this,"ngRowExpand.css")}
|
|
@@ -652,7 +652,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
652
652
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngRowState.css";
|
|
653
653
|
${H.getCustomPath(this,"ngRowState.css")}
|
|
654
654
|
</style>
|
|
655
|
-
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Qd);class tf extends HTMLElement{constructor(){super();Y(this,Ca);Y(this,Dt);Y(this,is);Y(this,me);Y(this,yr);Y(this,vr);Y(this,
|
|
655
|
+
`,super.connectedCallback(),this.cell.dataset.bind="rowState"}}customElements.get("ng-row-state")||customElements.define("ng-row-state",Qd);class tf extends HTMLElement{constructor(){super();Y(this,Ca);Y(this,Dt);Y(this,is);Y(this,me);Y(this,yr);Y(this,vr);Y(this,_n);Y(this,Sn,0);Y(this,bi,0);it(this,"refresh",()=>{if(!f(this,Dt))return;var t=$(".ng-container-body",f(this,Dt).body),l=$(".ng-scroll-thumb",this.shadowRoot),c=$("table > thead",t),o=f(this,Dt).dataManager.viewRecords.rawIndex,r=$(f(this,me).track).height(),n=$(f(this,me).thumb).height();Number(f(this,Dt).getAttribute("display-row-count")||0)>=f(this,Dt).dataManager.rawRecords.length||parseInt($(".ng-container .ng-table tr.nodata",f(this,Dt).body).height())>0&&(f(this,Dt).dataManager.rawRecords.length==0||f(this,Dt).dataManager.viewRecords.rawIndex==0)?$(this).hide():$(this).show();var e=Math.min(r*(t.height()-c.height())/(f(this,Dt).template.height()*f(this,Dt).template.length*f(this,Dt).data.count()),r);l[0].dataset.height=e,e<16&&(e=16);var i=r-f(this,Cn).call(this);if(i!=0){e>=r?l.css({top:0,height:e-20}):l.css({height:e});var u;if(f(this,Dt).isFirstPage)u=0;else if(f(this,Dt).isLastPage)u=r-n-2;else{var a=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);u=parseInt(o*i/(f(this,Dt).data.count()-a+1)),u>r-n-3&&(u=r-n-3)}f(this,me).thumb.style.top=u+"px",f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage,$(this).is(":visible")&&$("ng-hscrollbar",f(this,Dt).body).is(":visible")?$(".ng-scroll-edge",f(this,Dt).body).show():$(".ng-scroll-edge",f(this,Dt).body).hide()}});it(this,"refreshV2",()=>{if(f(this,Dt)){var t=$(".ng-scroll-thumb",this.shadowRoot),l=f(this,Dt).dataManager.viewRecords.rawIndex,c=this.trackHeight,o=this.thumbHeight,r=Math.min(c*(this.bodyHeight-this.theadHeight)/(this.templateHeight*f(this,Dt).template.length*f(this,Dt).data.count()),c);t[0].dataset.height=r,r<16&&(r=16);var n=c-f(this,Cn).call(this),s;if(f(this,Dt).isFirstPage)s=0;else if(f(this,Dt).isLastPage)s=c-o-2;else{var e=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length);s=parseInt(l*n/(f(this,Dt).data.count()-e+1)),s>c-o-3&&(s=c-o-3)}f(this,me).thumb.style.top=s+"px",f(this,me).top.disabled=!!f(this,Dt).isFirstPage,f(this,me).bottom.disabled=!!f(this,Dt).isLastPage}});it(this,"delayScroll",(t,l,c,o)=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(t),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(t)?o&&o.call():clearInterval(f(this,vr))},c))},l))});it(this,"stopScroll",()=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))});Y(this,Jh,()=>{var t=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr)),f(this,Dt).scrollBy(l),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{f(this,Dt).scrollBy(l)},10))},500))};$(f(this,me).top).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-1)}),$(f(this,me).bottom).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(1)}),$(f(this,me).top).on("touchstart",l=>{t(-1)}),$(f(this,me).bottom).on("touchstart",l=>{t(1)}),f(this,me).top.ontouchend=f(this,me).bottom.ontouchend=f(this,me).track.ontouchend=f(this,me).top.onmouseup=f(this,me).top.onmouseleave=f(this,me).bottom.onmouseup=f(this,me).bottom.onmouseleave=f(this,me).track.onmouseup=f(this,me).track.onmouseleave=l=>{clearInterval(f(this,yr)),clearInterval(f(this,vr))},$(f(this,me).track).on("mousedown",f(this,_a)),$(f(this,me).track).on("touchstart",f(this,Qh)),$(f(this,me).thumb).on("mousedown",f(this,ka)),$(f(this,me).thumb).on("touchstart",f(this,tc)),document.addEventListener("mouseup",l=>{f(this,is)&&tt(this,is,!1),document.removeEventListener("mousemove",f(this,kn)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("touchend",l=>{tt(this,is,!1),document.removeEventListener("touchmove",f(this,Sa)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Qh,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,_a).call(this,t)});Y(this,_a,t=>{if(!f(this,is)&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey)){t.preventDefault();var l=f(this,me).thumb.getBoundingClientRect();clearInterval(f(this,yr)),clearInterval(f(this,vr)),t.clientY>l.y?f(this,Dt).pageDown():f(this,Dt).pageUp(),tt(this,yr,setInterval(()=>{clearInterval(f(this,yr)),tt(this,vr,setInterval(()=>{var c=f(this,me).thumb.getBoundingClientRect();if(t.clientY>c.y&&t.clientY<c.y+c.height)clearInterval(f(this,vr));else{var o=t.clientY>c.y?f(this,Dt).pageDown():f(this,Dt).pageUp();o||clearInterval(f(this,vr))}},10))},500))}});Y(this,tc,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,ka).call(this,t),document.addEventListener("touchmove",f(this,Sa))});Y(this,Sa,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,kn).call(this,t)});Y(this,ka,t=>{tt(this,Sn,t.clientY),tt(this,is,!0),this.shiftY=t.offsetY+f(this,me).track.getBoundingClientRect().y,this.trackHeight=$(f(this,me).track).height(),this.thumbHeight=$(f(this,me).thumb).height(),this.nodataHeight=$(".ng-container .ng-table tr.nodata",f(this,Dt).body).height(),this.bodyHeight=$(".ng-container-body",f(this,Dt).body).height(),this.templateHeight=f(this,Dt).template.height(),this.theadHeight=$(".ng-container-body table > thead",f(this,Dt).body).height()||0,this.tfootHeight=$(".ng-container-body table > tfoot",f(this,Dt).body).height()||0,this.fixedHeight=$(".ng-container-body tbody.fixed",f(this,Dt).body).height(),this.tableHeight=$(".ng-container-body .ng-table",f(this,Dt).body).height(),tt(this,_n,!0),document.addEventListener("mousemove",f(this,kn)),typeof this.onDragStart=="function"&&this.onDragStart()});Y(this,kn,t=>{if(!f(this,is))return;t.preventDefault();var l=t.clientY-f(this,Sn);f(this,_n)&&(H.j.querySelectorAll("th,td",f(this,Dt).body).removeClass("active").removeClass("multi-selected").removeClass("selected").removeClass("selected-current").removeClass("selected-area").removeClass("selected-top").removeClass("selected-bottom").removeClass("selected-left").removeClass("selected-right"),tt(this,_n,!1));var c=this.trackHeight;let o=f(this,Cn).call(this);var r=t.clientY-this.shiftY;r<0&&(r=0),r+this.thumbHeight>c&&(r=parseInt(c-o));var n=parseInt($(".ng-container-body tbody.bindable tr",f(this,Dt).body).not(".nodata").length/f(this,Dt).template.length),s=parseInt(r*(f(this,Dt).data.count()+1-n)/parseInt(c-o)),e=Math.max(0,c-o),i=Math.max(0,f(this,Dt).matrix.getTotalHeight()-this.bodyHeight),u=f(this,Dt).matrix.getHeight(s),a=i>0?u*(e/i):0;f(this,Dt).dataManager.viewRecords.rawIndex!=s?(f(this,Dt).scrollToV2(s),tt(this,Sn,t.clientY),tt(this,bi,0),Ye(this,Ca,vu).call(this,0)):(f(this,me).thumb.style.top=r+"px",f(this,Dt).matrix.getHeight(f(this,Dt).dataManager.viewRecords.rawIndex),id.log(u,a,l,s),l>0?tt(this,bi,-Math.abs(u*l/a)):tt(this,bi,Math.abs(u*l/a)),Ye(this,Ca,vu).call(this,f(this,bi)))});Y(this,Cn,()=>parseInt(f(this,me).thumb.dataset.height));this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Dt,this.getRootNode().host),f(this,Dt)&&(this.shadowRoot.innerHTML=`
|
|
656
656
|
<style>
|
|
657
657
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngVScrollBar.css";
|
|
658
658
|
${H.getCustomPath(this,"ngVScrollBar.css")}
|
|
@@ -661,7 +661,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
661
661
|
<button class='ng-scroll-top' disabled><div class='ng-scroll-icon'></div></button>
|
|
662
662
|
<div class='ng-scroll-track'> <div class='ng-scroll-thumb'></div> </div>
|
|
663
663
|
<button class='ng-scroll-bottom'><div class='ng-scroll-icon'></div></button>
|
|
664
|
-
`,tt(this,me,{track:this.shadowRoot.querySelector(".ng-scroll-track"),thumb:this.shadowRoot.querySelector(".ng-scroll-thumb"),top:this.shadowRoot.querySelector(".ng-scroll-top"),bottom:this.shadowRoot.querySelector(".ng-scroll-bottom")}),f(this,is),this.shiftX,f(this,Jh).call(this))}}Dt=new WeakMap,is=new WeakMap,me=new WeakMap,yr=new WeakMap,vr=new WeakMap,
|
|
664
|
+
`,tt(this,me,{track:this.shadowRoot.querySelector(".ng-scroll-track"),thumb:this.shadowRoot.querySelector(".ng-scroll-thumb"),top:this.shadowRoot.querySelector(".ng-scroll-top"),bottom:this.shadowRoot.querySelector(".ng-scroll-bottom")}),f(this,is),this.shiftX,f(this,Jh).call(this))}}Dt=new WeakMap,is=new WeakMap,me=new WeakMap,yr=new WeakMap,vr=new WeakMap,_n=new WeakMap,Sn=new WeakMap,bi=new WeakMap,Jh=new WeakMap,Qh=new WeakMap,_a=new WeakMap,tc=new WeakMap,Sa=new WeakMap,ka=new WeakMap,kn=new WeakMap,Ca=new WeakSet,vu=function(t){t>0&&(t=0),f(this,Dt).body.querySelectorAll("tbody.bindable").forEach(c=>{c.style.transform=`translateY(${t}px)`})},Cn=new WeakMap;class ef extends HTMLElement{constructor(){super();Y(this,Je);Y(this,gs);Y(this,ae);Y(this,Wr);Y(this,Xr);it(this,"refresh",()=>{if(f(this,Je)){var t=$(".ng-container-body",f(this,Je).body),l=$("table",t),c=$(".ng-scroll-track",this.shadowRoot),o=$(".ng-scroll-thumb",this.shadowRoot);t.width()!=0&&l.width()>t.width()?$(f(this,Je).body.querySelector(".ng-container-bottom")).show():$(f(this,Je).body.querySelector(".ng-container-bottom")).hide(),o.width(Math.min(c.width()*t.width()/l.width(),c.width()));var r=parseInt(Math.abs(l.position().left)*c.width()/l.width());r<0&&(r=0),r+o.width()>c.width()&&(r=c.width()-o.width()),o.css({left:r}),H.j.querySelectorAll(".ng-scroll-left",this.shadowRoot).attr("disabled",r==0),H.j.querySelectorAll(".ng-scroll-right",this.shadowRoot).attr("disabled",r==c.width()-o.width());var n=f(this,Je).body.querySelector("ng-vscrollbar");$(this).is(":visible")&&$(n).is(":visible")?$(".ng-scroll-edge",f(this,Je).body).show():$(".ng-scroll-edge",f(this,Je).body).hide()}});it(this,"scrollToHome",()=>{f(this,Hs).call(this,0)});it(this,"scrollToEnd",()=>{var t=f(this,ae).track.getBoundingClientRect(),l=f(this,ae).thumb.getBoundingClientRect(),c=t.width-l.width;f(this,Hs).call(this,c)});Y(this,Hs,t=>{if(f(this,ae)){var l=$("table",f(this,ae).container),c=f(this,ae).track.getBoundingClientRect(),o=f(this,ae).thumb.getBoundingClientRect();t<0&&(t=0),t+o.width>c.width&&(t=c.width-o.width),t=parseInt(t),f(this,ae).thumb.style.left=t+"px",f(this,ae).left.disabled=t==0,f(this,ae).right.disabled=t==parseInt(c.width-o.width);var r=$(f(this,ae).container).width(),n=$(l).width(),s=-t*(n-r)/(c.width-o.width);return-s>n-r&&(s=n-r),-s+5>n-r&&(s=-(n-r)),r>=n&&(s=0),$(l).css({left:s}),!(t==0||t==c.width-o.width)}});it(this,"adjustThumb2",()=>{var t=$(".ng-container-body > table",f(this,Je).body),l=$(".ng-scroll-track",this.shadowRoot),c=$(".ng-scroll-thumb",this.shadowRoot),o=parseInt(Math.abs(t.position().left)*l.width()/t.width());o<0&&(o=0),o+c.width()>l.width()&&(o=l.width()-c.width()),c.css({left:o}),H.j.querySelectorAll(".ng-scroll-left",this.shadowRoot).attr("disabled",o==0),H.j.querySelectorAll(".ng-scroll-right",this.shadowRoot).attr("disabled",o==l.width()-c.width())});Y(this,ec,()=>{var t=l=>{clearInterval(f(this,Wr)),clearInterval(f(this,Xr));var c=f(this,ae).track.getBoundingClientRect(),o=f(this,ae).thumb.getBoundingClientRect();f(this,Hs).call(this,o.x-c.x+l),tt(this,Wr,setInterval(()=>{clearInterval(f(this,Wr)),tt(this,Xr,setInterval(()=>{var r=f(this,ae).thumb.getBoundingClientRect();f(this,Hs).call(this,r.x-c.x+l)||clearInterval(f(this,Xr))},10))},500))};f(this,ae).left.ontouchend=f(this,ae).right.ontouchend=f(this,ae).track.ontouchend=f(this,ae).left.onmouseup=f(this,ae).left.onmouseleave=f(this,ae).right.onmouseup=f(this,ae).right.onmouseleave=f(this,ae).track.onmouseup,f(this,ae).track.onmouseleave=l=>{clearInterval(f(this,Wr)),clearInterval(f(this,Xr))},$(f(this,ae).left).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(-10)}),$(f(this,ae).right).on("mousedown",l=>{l.buttons!=1||l.altKey||l.ctrlKey||l.shiftKey||t(10)}),$(f(this,ae).left).on("touchstart",l=>{t(-10)}),$(f(this,ae).right).on("touchstart",l=>{t(10)}),$(f(this,ae).track).on("mousedown",f(this,Aa)),$(f(this,ae).track).on("touchstart",f(this,rc)),$(f(this,ae).thumb).on("mousedown",f(this,Ta)),$(f(this,ae).thumb).on("touchstart",f(this,sc)),document.addEventListener("touchend",l=>{tt(this,gs,!1),clearInterval(f(this,Wr)),clearInterval(f(this,Xr)),$(document).off("touchmove",f(this,Ra)),typeof this.onDragStop=="function"&&this.onDragStop()}),document.addEventListener("mouseup",l=>{tt(this,gs,!1),clearInterval(f(this,Wr)),clearInterval(f(this,Xr)),document.removeEventListener("mousemove",f(this,En)),typeof this.onDragStop=="function"&&this.onDragStop()})});Y(this,Ea,t=>{var l=f(this,ae).thumb.getBoundingClientRect(),c=parseInt($(".ng-container-body > table",f(this,Je).body).position().left),o=0;t>l.x?$(".ng-container-body .col-indicator",f(this,Je).body).each((r,n)=>{if(o+=parseInt($(n).width())+2,o>Math.abs(c)+1)return!1}):$(".ng-container-body .col-indicator",f(this,Je).body).each((r,n)=>{if(o+parseInt($(n).width())+2>=Math.abs(c))return!1;o+=parseInt($(n).width())+2}),$(".ng-container-body > table",f(this,Je).body).css({left:-o}),this.refresh()});Y(this,rc,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,Aa).call(this,t)});Y(this,Aa,t=>{f(this,gs)||t.buttons!=1||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),f(this,Ea).call(this,t.clientX),tt(this,Wr,setInterval(()=>{clearInterval(f(this,Wr)),tt(this,Xr,setInterval(()=>{var l=f(this,ae).thumb.getBoundingClientRect();t.clientX>l.x&&t.clientX<l.x+l.width?clearInterval(f(this,Xr)):f(this,Ea).call(this,t.clientX)},10))},500)))});Y(this,sc,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,Ta).call(this,t),document.addEventListener("touchmove",f(this,Ra))});Y(this,Ta,t=>{tt(this,gs,!0);var l=Math.min($(f(this,ae).track).width()*$(f(this,Je).body.querySelector(".ng-container-body")).width()/$(f(this,Je).body.querySelector(".ng-container-body > table")).width(),$(f(this,ae).track).width());$(f(this,ae).thumb).width(parseInt(l)),$(f(this,ae).thumb).css({width:parseInt(l),"min-width":parseInt(l)}),this.shiftX=t.offsetX+f(this,ae).track.getBoundingClientRect().x,document.addEventListener("mousemove",f(this,En)),typeof this.onDragStart=="function"&&this.onDragStart()});Y(this,Ra,t=>{var l=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-l.left,t.offsetY=t.targetTouches[0].pageY-l.top,t.pageX=t.changedTouches[0].pageX,t.pageY=t.changedTouches[0].pageY,t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY,t.buttons=1,f(this,En).call(this,t)});Y(this,En,t=>{f(this,gs)&&f(this,Hs).call(this,t.pageX-this.shiftX)});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Je,this.getRootNode().host),this.shadowRoot.innerHTML=`
|
|
665
665
|
<style>
|
|
666
666
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngHScrollBar.css";
|
|
667
667
|
${H.getCustomPath(this,"ngHScrollBar.css")}
|
|
@@ -698,7 +698,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
698
698
|
<nx-dialog>
|
|
699
699
|
<textarea></textarea>
|
|
700
700
|
</nx-dialog>
|
|
701
|
-
`,$(".reset",this.shadowRoot).on("click",t=>{$("textarea",this.shadowRoot).val(f(this,Da))}),$(".apply",this.shadowRoot).on("click",t=>{f(this,$a).data.setValue(f(this,La),f(this,Pa),$("textarea",this.shadowRoot).val()),this.shadowRoot.querySelector("dialog").close()})}}$a=new WeakMap,La=new WeakMap,Pa=new WeakMap,Da=new WeakMap,customElements.get("ng-textarea")||customElements.define("ng-textarea",of),customElements.get("ng-textarea-detail")||customElements.define("ng-textarea-detail",af);class lf extends _r{constructor(){super();Y(this,
|
|
701
|
+
`,$(".reset",this.shadowRoot).on("click",t=>{$("textarea",this.shadowRoot).val(f(this,Da))}),$(".apply",this.shadowRoot).on("click",t=>{f(this,$a).data.setValue(f(this,La),f(this,Pa),$("textarea",this.shadowRoot).val()),this.shadowRoot.querySelector("dialog").close()})}}$a=new WeakMap,La=new WeakMap,Pa=new WeakMap,Da=new WeakMap,customElements.get("ng-textarea")||customElements.define("ng-textarea",of),customElements.get("ng-textarea-detail")||customElements.define("ng-textarea-detail",af);class lf extends _r{constructor(){super();Y(this,yi);Y(this,Ba);Y(this,Fa);it(this,"dataRefresh",t=>{const l=this.value;for(var c="",o=1;o<l;o++)c+='<div class="ng-pad-item"></div>';f(this,Ba).innerHTML=c,f(this,Fa).innerHTML=this.getDisplayText(),f(this,ac).call(this),t||this.reset(),$(".ng-icon",this.shadowRoot).off("click",f(this,qa)),$(".ng-icon",this.shadowRoot).on("click",f(this,qa))});Y(this,qa,t=>{f(this,lc).call(this),H.j.querySelectorAll(t.target).removeClass("ng-expand-on").removeClass("ng-expand-off"),H.j.querySelectorAll(t.target).addClass(f(this,yi,Pl)?"ng-expand-on":"ng-expand-off")});Y(this,ac,()=>{const t=this.row;if(isNaN(t))return;const l=f(this,dc).call(this,t),c=this.value,o=f(this,fc).call(this,t+1),r=f(this,za).call(this,t);H.j.querySelectorAll(".ng-icon",this.shadowRoot).removeClass("ng-expand-on").removeClass("ng-expand-off").removeClass("ng-node").removeClass("ng-icon-up").removeClass("ng-icon-down").removeClass("ng-icon-none").addClass(l?f(this,yi,Pl)?"ng-expand-on":"ng-expand-off":"ng-node");const n=H.j.querySelectorAll(".ng-icon",this.shadowRoot);t==0?r?n.addClass("ng-icon-none"):n.addClass("ng-icon-down"):r&&n.addClass("ng-icon-up");for(var s=$(".ng-pad-item",this.shadowRoot),e=f(this,Ha).call(this,t),i=s.length;e>=0;){i--;var u=f(this,za).call(this,e);u&&s.eq(i).addClass("ng-pad-item-none"),e=f(this,Ha).call(this,e)}c<o?f(this,yi,Pl)?H.j.querySelectorAll(".ng-line",this.shadowRoot).addClass("ng-line-down"):H.j.querySelectorAll(".ng-line",this.shadowRoot).addClass("ng-line-none"):H.j.querySelectorAll(".ng-line",this.shadowRoot).addClass("ng-line-none")});Y(this,lc,()=>{f(this,hc).call(this,!f(this,yi,Pl))});Y(this,hc,t=>{this.data.__ng._[H.ROW.EXPAND]=t,f(this,cc).call(this,t),this.owner.data.resetRecords(),this.owner.dataManager.viewRecords.reset()});Y(this,cc,t=>{var l=this.owner.data.getValidDataNF();const c=this.owner.data.findIndexNF_1(this.data.__ng._[H.ROW.INDEX]);if(!(c<0))for(var o=this.owner.fields.indexOf(this.cell.dataset.bind),r=this.value,n=this.owner.data.getRow(this.row),s=n.__ng._[H.ROW.EXPAND],e=c+1;e<l.length;e++){var i=l[e].v[o];if(i>n.v[o]?s=n.__ng._[H.ROW.EXPAND]:i<n.v[o]&&(s=null),i<=r)break;if(s==null)l[e].__ng._[H.ROW.COLLAPSE]=!t;else if(s&&t){l[e].__ng._[H.ROW.COLLAPSE]=!1;//!b;
|
|
702
702
|
}else if(s&&!t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
703
703
|
}else if(!s&&t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
704
704
|
}else if(!s&&!t){l[e].__ng._[H.ROW.COLLAPSE]=!0;//!b;
|
|
@@ -717,7 +717,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
717
717
|
<div></div>
|
|
718
718
|
<span class="text">${this.displayValue}</span>
|
|
719
719
|
</div>
|
|
720
|
-
`,super.connectedCallback(),tt(this,Ba,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Fa,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Ba=new WeakMap,Fa=new WeakMap,qa=new WeakMap,bi=new WeakSet,Pl=function(){return this.data.__ng._[H.ROW.EXPAND]},ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,cc=new WeakMap,mu=new WeakMap,Ha=new WeakMap,za=new WeakMap,uc=new WeakMap,dc=new WeakMap,fc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",lf);class hf{constructor(E){Y(this,yt);Y(this,Ke);Y(this,wr);Y(this,yi);Y(this,vi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,yi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,yi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,mc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,An).call(this)});Y(this,Ua,()=>{var E=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(E+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),E});Y(this,Va,()=>{var E=f(this,Ua).call(this);const t=parseInt(f(this,Ke)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{E+=f(this,yt).matrix.getHeight(t+l)}),E});Y(this,Wa,()=>{const E=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(E))return f(this,Ke)+E>f(this,yt).data.count()&&(tt(this,Ke,E>=f(this,yt).data.count()?0:f(this,yt).data.count()-E),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke)),E;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ke)+l++);if(f(this,Ke)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ke,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke)}return l});Y(this,Xa,()=>{var E=f(this,Wa).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<E;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Ya,()=>{var E=Math.min(f(this,Wa).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=E&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ke)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,pc,()=>{f(this,Xa).call(this),f(this,Ya).call(this);var E=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Va).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(E=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(E),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var E=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{E+=$(c).height()}),$(f(this,yt).closest("dialog")).height(E)}});Y(this,mc,()=>{f(this,Xa).call(this),f(this,Ya).call(this),f(this,yt).isLastPage});Y(this,gc,()=>{for(const E of f(this,vi))clearTimeout(E);tt(this,vi,[]),f(this,vi).push(setTimeout(()=>{tt(this,yi,!1);var E=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(E.length>0){var c=parseInt(E[0].dataset.row*f(this,yt).template.length);E.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Va).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,vi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,An,()=>{var E=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{E.push(f(this,Ke)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),E=[...new Set(E)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=E[l],t.dataset.matrixRow=parseInt(E[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),E.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ke,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke),f(this,gc).call(this),f(this,yt).isFirstPage=f(this,Ke)==0,f(this,yt).isLastPage=E[E.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(E.dataset.row)});it(this,"getVisibleLastRow",()=>{var E=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return E.length>0?parseInt(E[E.length-1].dataset.row):-1});it(this,"getRowHeight",E=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(E*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!E||!E.style||!E.style.transform?0:parseFloat(E.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const E=this.getVisibleLastRow(),t=this.getTotalSpace();if(E==f(this,yt).data.count()-1){for(var l=0,c=E;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(E,t,l,c)=>{const o=f(this,zs).call(this,E),r=f(this,zs).call(this,l),n=f(this,Us).call(this,t),s=f(this,Us).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(E,t)=>{const l=f(this,zs).call(this,E),c=H.isNull(t)?l:f(this,zs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(E,t)=>{const l=f(this,Us).call(this,E),c=H.isNull(t)?l:f(this,Us).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(E,t,l)=>{const c=f(this,zs).call(this,E),o=f(this,Us).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,zs,E=>{if(typeof E=="number")return E;if(typeof E=="function")return f(this,yt).data.findIndex(E);throw`invalid ${E}`});Y(this,Us,E=>{if(typeof E=="number")return E;if(typeof E=="string"&&f(this,yt).fields.includes(E))return parseInt($(`[data-bind="${E}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${E}`});it(this,"moveTo",E=>{f(this,yt).scrollTo(E)});tt(this,yt,E),tt(this,yi,!1),this.init()}}yt=new WeakMap,Ke=new WeakMap,wr=new WeakMap,yi=new WeakMap,vi=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,pc=new WeakMap,mc=new WeakMap,gc=new WeakMap,An=new WeakMap,zs=new WeakMap,Us=new WeakMap;class cf{constructor(E){Y(this,Qe);Y(this,Vs);it(this,"initialize",()=>{tt(this,Vs,!1),f(this,Qe).data.clearFilter()});it(this,"isFiltering",()=>f(this,Vs));it(this,"on",E=>{tt(this,Vs,!0);const t=f(this,bc).call(this);f(this,Qe).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Qe).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Vs,!1),f(this,Qe).body.querySelectorAll(".ng-table ng-filter-button").forEach(E=>{E.remove()})});it(this,"set",E=>{this.on();let t=Array.isArray(E)?Object.fromEntries(Object.keys(E[0]).map(l=>[l,[...new Set(E.map(c=>c[l]))]])):E;f(this,Qe).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Qe).fields.indexOf(l);f(this,Qe).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Qe).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Qe).data.refreshFilter(),f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Qe).scrollTo_V1(0),f(this,Qe).paging.reset()});Y(this,bc,(E="thead")=>[...f(this,Qe).body.querySelectorAll(`.ng-table ${E}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Qe,E),tt(this,Vs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Qe).shadowRoot.appendChild(t)}}Qe=new WeakMap,Vs=new WeakMap,bc=new WeakMap;class uf extends HTMLElement{constructor(){super();Y(this,Ga);Y(this,Tn);Y(this,Ka,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Ga).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Ga,this.getRootNode().host),this.removeEventListener("click",f(this,Ka)),this.addEventListener("click",f(this,Ka))}get filterOptions(){return f(this,Tn)}set filterOptions(t){tt(this,Tn,t),this.classList.toggle("filtered",f(this,Tn).some(l=>l.data.length>0))}}Ga=new WeakMap,Tn=new WeakMap,Ka=new WeakMap;class df extends HTMLElement{constructor(){super();Y(this,Mr);Y(this,Za);Y(this,Ja);Y(this,yc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Za).filterOptions=e;const i=Object.fromEntries([...f(this,Mr).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Mr).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,vc,t=>{this.style.display="none"});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,xc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Ja)),tt(this,Ja,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Mr).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Mr).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Za,t);const m=t.filterOptions.map((g,S)=>{const C=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Mr).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Mr).exprFunction(D):null,P=h.map(B=>{const F=f(this,Mr).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Mr).data.conv(B),B.__ng.rowidx,f(this,Mr).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:C},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Mr,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
720
|
+
`,super.connectedCallback(),tt(this,Ba,this.shadowRoot.querySelector("div.ng-pad")),tt(this,Fa,this.shadowRoot.querySelector("span"))}get prevLevel(){var t=parseInt(this.closest("tr").sectionRowIndex/this.owner.template.length);if(!this.owner.dataManager.viewRecords)return-1;if(t!=0){var l=this.owner.data.getNF(t-1);return l[this.cell.dataset.bind]}else for(var c=parseInt(this.cell.dataset.row)-1;c>=0;c--){var o=this.owner.data.get(c);if(!o.__ng._[H.ROW.EXPAND])return o[this.cell.dataset.bind]}return-1}}Ba=new WeakMap,Fa=new WeakMap,qa=new WeakMap,yi=new WeakSet,Pl=function(){return this.data.__ng._[H.ROW.EXPAND]},ac=new WeakMap,lc=new WeakMap,hc=new WeakMap,cc=new WeakMap,mu=new WeakMap,Ha=new WeakMap,za=new WeakMap,uc=new WeakMap,dc=new WeakMap,fc=new WeakMap,customElements.get("ng-tree-item")||customElements.define("ng-tree-item",lf);class hf{constructor(E){Y(this,yt);Y(this,Ke);Y(this,wr);Y(this,vi);Y(this,wi,[]);it(this,"init",()=>{tt(this,wr,{body:$(".ng-container-body",f(this,yt).body).height()||0,thead:$(".ng-container-body thead",f(this,yt).body).height()||0,tfoot:$(".ng-container-body tfoot",f(this,yt).body).height()||0}),!f(this,vi)&&($(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(f(this,wr).body),tt(this,vi,!0))});it(this,"redraw",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),f(this,yt).dataManager&&(tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,pc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refresh())});it(this,"redrawV2",()=>{f(this,yt).touchEvent.scrollTop(),this.init(),tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,mc).call(this),f(this,An).call(this),f(this,yt).body.querySelector("ng-vscrollbar").refreshV2()});it(this,"redrawV3",()=>{this.init(),tt(this,Ke,f(this,yt).dataManager.viewRecords.rawIndex||0),f(this,An).call(this)});Y(this,Ua,()=>{var E=0;return $(".ng-container-body tbody.fixed tr",f(this,yt).body).each((t,l)=>{l.data&&l.data.__ng&&(E+=f(this,yt).matrix.getHeight(l.data.__ng.height[parseInt(t%f(this,yt).template.length)]))}),E});Y(this,Va,()=>{var E=f(this,Ua).call(this);const t=parseInt(f(this,Ke)*f(this,yt).template.length);return $(".ng-container-body tbody.bindable tr:not(.nodata)",f(this,yt).body).each((l,c)=>{E+=f(this,yt).matrix.getHeight(t+l)}),E});Y(this,Wa,()=>{const E=parseInt(f(this,yt).getAttribute("display-row-count"));if(f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple"))return 1;if([H.PAGINGTYPE.CLIENT,H.PAGINGTYPE.SERVER].includes(f(this,yt).paging.type))return f(this,yt).paging.linesPerPage;if(!isNaN(E))return f(this,Ke)+E>f(this,yt).data.count()&&(tt(this,Ke,E>=f(this,yt).data.count()?0:f(this,yt).data.count()-E),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke)),E;const t=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Ua).call(this);for(var l=0,c=0;c<t;)c+=this.getRowHeight(f(this,Ke)+l++);if(f(this,Ke)+l>f(this,yt).data.count()){l=0,c=0;for(var o=f(this,yt).data.count()-1;o>=0&&c<t;o--)c+=this.getRowHeight(o),l++;c>t&&l--,tt(this,Ke,f(this,yt).data.count()-l),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke)}return l});Y(this,Xa,()=>{var E=f(this,Wa).call(this),t=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not("tr.nodata").length/(f(this,yt).template.length||1);const l=f(this,yt).template.clone(),c=l.clone(),o=l.clone();l.find("th,td").not("[fixed=left]").remove(),c.find("th,td").not("[fixed=right]").remove(),o.find("th[fixed=left],td[fixed=left],th[fixed=right],td[fixed=right]").remove();const r=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-left")),n=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-right")),s=$("tr.nodata",f(this,yt).body.querySelector(".ng-container-body"));for(var e=t;e<E;e++)l.each((u,a)=>{r.before(a.outerHTML)}),c.each((u,a)=>{n.before(a.outerHTML)}),o.each((u,a)=>{s.before(a.outerHTML)});return;var i;if(i.length>0)var t});Y(this,Ya,()=>{var E=Math.min(f(this,Wa).call(this),f(this,yt).data.count());$(".ng-container tbody.bindable tr:not(.nodata)",f(this,yt).body).each((t,l)=>{parseInt(l.sectionRowIndex/f(this,yt).template.length)>=E&&$(l).remove()}),f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{f(this,Ke)+parseInt(t.sectionRowIndex/f(this,yt).template.length)>=f(this,yt).data.count()&&$(t).remove()})});Y(this,pc,()=>{f(this,Xa).call(this),f(this,Ya).call(this);var E=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Va).call(this);if(f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(E=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(E),f(this,yt).closest("dialog")&&H.j.querySelectorAll(f(this,yt)).hasClass("simple")){$("tr.nodata",f(this,yt).body).height(0);var E=47;$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata").each((l,c)=>{E+=$(c).height()}),$(f(this,yt).closest("dialog")).height(E)}});Y(this,mc,()=>{f(this,Xa).call(this),f(this,Ya).call(this),f(this,yt).isLastPage});Y(this,gc,()=>{for(const E of f(this,wi))clearTimeout(E);tt(this,wi,[]),f(this,wi).push(setTimeout(()=>{tt(this,vi,!1);var E=$(".ng-container-body tbody.bindable tr",f(this,yt).body).not(".nodata"),t=$(".ng-container-left tbody.bindable tr",f(this,yt).body).not(".nodata"),l=$(".ng-container-right tbody.bindable tr",f(this,yt).body).not(".nodata");if(E.length>0){var c=parseInt(E[0].dataset.row*f(this,yt).template.length);E.each((r,n)=>{var s=f(this,yt).matrix.getHeight(c+r);$("canvas.chart",n).css({height:s-4}),$("canvas.chart",t.eq(r)).css({height:s-4}),$("canvas.chart",l.eq(r)).css({height:s-4}),$(n).css({height:s}).height(s),t.eq(r).css({height:s}).height(s),l.eq(r).css({height:s}).height(s)})}f(this,yt).cell.refresh(),$("ng-row-indicator",f(this,yt).body).each((r,n)=>{n.refresh()});var o=f(this,wr).body-f(this,wr).thead-f(this,wr).tfoot-f(this,Va).call(this);f(this,yt).getAttribute("display-row-count")&&f(this,yt).data.count()>=Number(f(this,yt).getAttribute("display-row-count")||0)&&(o=0),$(".ng-container tbody.bindable tr.nodata",f(this,yt).body).height(o),f(this,yt).refreshBindRows(),f(this,yt).refreshData(),f(this,yt).paging.totalCount=f(this,yt).data.countNF(),f(this,yt).body.querySelector("ng-vscrollbar").refresh(),H.j.querySelectorAll(".ng-table tbody tr",f(this,yt).body).removeClass("hover"),H.j.querySelectorAll(f(this,yt)).removeClass("loading"),H.j.querySelectorAll("ng-filter-panel").removeClass("loading")},300)),f(this,wi).push(setTimeout(()=>{f(this,yt).refreshDataV2()}))});Y(this,An,()=>{var E=[];f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)").forEach(t=>{E.push(f(this,Ke)+parseInt(t.sectionRowIndex/f(this,yt).template.length))}),E=[...new Set(E)],f(this,yt).body.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)").forEach(t=>{const l=parseInt(t.sectionRowIndex/f(this,yt).template.length);t.dataset.row=E[l],t.dataset.matrixRow=parseInt(E[l]*f(this,yt).template.length)+parseInt(t.sectionRowIndex%f(this,yt).template.length);for(const c of t.cells)c.dataset.row=t.dataset.row,c.dataset.matrixRow=t.dataset.matrixRow}),E.forEach(t=>{const l=f(this,yt).data.get(t);f(this,yt).body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${t}"]`).forEach(c=>{c.data=l})}),tt(this,Ke,parseInt(f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-of-type").getAttribute("data-row"))),f(this,yt).dataManager.viewRecords.rawIndex=f(this,Ke),f(this,gc).call(this),f(this,yt).isFirstPage=f(this,Ke)==0,f(this,yt).isLastPage=E[E.length-1]==f(this,yt).data.count()-1});it(this,"getVisibleFirstRow",()=>{var E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable tr:first-child");return parseInt(E.dataset.row)});it(this,"getVisibleLastRow",()=>{var E=f(this,yt).body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)");return E.length>0?parseInt(E[E.length-1].dataset.row):-1});it(this,"getRowHeight",E=>{let t=0;for(var l=0;l<f(this,yt).template.length;l++)t+=f(this,yt).matrix.getHeight(parseInt(E*f(this,yt).template.length+l));return t});it(this,"getTranslateY",()=>{const E=f(this,yt).body.querySelector(".ng-container-body tbody.bindable");return!E||!E.style||!E.style.transform?0:parseFloat(E.style.transform.replace("translateY(","").replace(")",""))});it(this,"getTotalSpace",()=>$(f(this,yt).body.querySelector(".ng-container-body")).height()-($(f(this,yt).body.querySelector(".ng-container-body thead")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tfoot")).height()||0)-($(f(this,yt).body.querySelector(".ng-container-body tbody.fixed")).height()||0));it(this,"fitPage",()=>{const E=this.getVisibleLastRow(),t=this.getTotalSpace();if(E==f(this,yt).data.count()-1){for(var l=0,c=E;c>=0;c--)if(l+=this.getRowHeight(c),l>t){f(this,yt).scrollTo(c+1);break}}});it(this,"selectArea",(E,t,l,c)=>{const o=f(this,zs).call(this,E),r=f(this,zs).call(this,l),n=f(this,Us).call(this,t),s=f(this,Us).call(this,c),e=parseInt(o*f(this,yt).template.length),i=parseInt(r*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=o,o>=0&&r>=0?f(this,yt).selection.selectArea(e,n,i,s):this.clearSelection()});it(this,"selectRow",(E,t)=>{const l=f(this,zs).call(this,E),c=H.isNull(t)?l:f(this,zs).call(this,t),o=parseInt(l*f(this,yt).template.length),r=parseInt(c*f(this,yt).template.length)+f(this,yt).template.length-1;f(this,yt).row.at=l,l>=0&&c>=0?f(this,yt).selection.selectArea(o,f(this,yt).firstCol,r,f(this,yt).lastCol):this.clearSelection()});it(this,"selectCol",(E,t)=>{const l=f(this,Us).call(this,E),c=H.isNull(t)?l:f(this,Us).call(this,t),o=0,r=parseInt(f(this,yt).data.count()*f(this,yt).template.length-1);l>=0&&c>=0?f(this,yt).selection.selectArea(o,l,r,c):this.clearSelection()});it(this,"selectCell",(E,t,l)=>{const c=f(this,zs).call(this,E),o=f(this,Us).call(this,t),r=parseInt(c*f(this,yt).template.length)+H.nvl(l,0);f(this,yt).row.at=c,c>=0?f(this,yt).selection.selectArea(r,o,r,o):this.clearSelection()});Y(this,zs,E=>{if(typeof E=="number")return E;if(typeof E=="function")return f(this,yt).data.findIndex(E);throw`invalid ${E}`});Y(this,Us,E=>{if(typeof E=="number")return E;if(typeof E=="string"&&f(this,yt).fields.includes(E))return parseInt($(`[data-bind="${E}"]`,f(this,yt).template)[0].dataset.col);throw`invalid ${E}`});it(this,"moveTo",E=>{f(this,yt).scrollTo(E)});tt(this,yt,E),tt(this,vi,!1),this.init()}}yt=new WeakMap,Ke=new WeakMap,wr=new WeakMap,vi=new WeakMap,wi=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,pc=new WeakMap,mc=new WeakMap,gc=new WeakMap,An=new WeakMap,zs=new WeakMap,Us=new WeakMap;class cf{constructor(E){Y(this,Qe);Y(this,Vs);it(this,"initialize",()=>{tt(this,Vs,!1),f(this,Qe).data.clearFilter()});it(this,"isFiltering",()=>f(this,Vs));it(this,"on",E=>{tt(this,Vs,!0);const t=f(this,bc).call(this);f(this,Qe).body.querySelectorAll(".ng-table thead th, .ng-table thead td").forEach(l=>{var o,r;const c=(o=l.closest("tr"))==null?void 0:o.sectionRowIndex;if(c!==void 0&&c+l.rowSpan-1===t){const n=Array.from(f(this,Qe).activeTmpl.querySelectorAll(`[data-col="${l.dataset.col}"]`)).map(s=>s.dataset.bind?{colnm:s.dataset.bind,data:[]}:null).filter(Boolean);if(n.length>0){(r=l.querySelector("ng-filter-button"))==null||r.remove();const s=document.createElement("ng-filter-button");l.appendChild(s),s.filterOptions=n}}})});it(this,"off",()=>{tt(this,Vs,!1),f(this,Qe).body.querySelectorAll(".ng-table ng-filter-button").forEach(E=>{E.remove()})});it(this,"set",E=>{this.on();let t=Array.isArray(E)?Object.fromEntries(Object.keys(E[0]).map(l=>[l,[...new Set(E.map(c=>c[l]))]])):E;f(this,Qe).data.clearFilter(),Object.entries(t).forEach(([l,c])=>{const o=f(this,Qe).fields.indexOf(l);f(this,Qe).data.getValidData().some(r=>typeof r.v[o]=="number")&&(c=c.map(Number)),f(this,Qe).data.getValidData().filter(r=>c.nineBinarySearch(r.v[o]||"")<0).forEach(r=>{r.__ng.filtered=!0})}),f(this,Qe).data.refreshFilter(),f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(l=>{l.filterOptions.forEach(c=>{c.data=[]})}),Object.entries(t).forEach(([l,c])=>{f(this,Qe).shadowRoot.querySelectorAll("ng-filter-button").forEach(o=>{let r=o.filterOptions;r.forEach(n=>{n.colnm===l&&(n.data=c)}),o.filterOptions=r})}),f(this,Qe).scrollTo_V1(0),f(this,Qe).paging.reset()});Y(this,bc,(E="thead")=>[...f(this,Qe).body.querySelectorAll(`.ng-table ${E}`)].reduce((t,l)=>Math.max(l.rows.length-1,t),0));tt(this,Qe,E),tt(this,Vs,!1);const t=document.createElement("ng-filter-panel");t.style.display="none",f(this,Qe).shadowRoot.appendChild(t)}}Qe=new WeakMap,Vs=new WeakMap,bc=new WeakMap;class uf extends HTMLElement{constructor(){super();Y(this,Ga);Y(this,Tn);Y(this,Ka,t=>{var o;t.preventDefault(),t.stopPropagation();const l=f(this,Ga).shadowRoot.querySelector("ng-filter-panel"),c=(o=this.closest("th,td"))==null?void 0:o.dataset.col;l.col===c?l.close():l.open(this)})}connectedCallback(){tt(this,Ga,this.getRootNode().host),this.removeEventListener("click",f(this,Ka)),this.addEventListener("click",f(this,Ka))}get filterOptions(){return f(this,Tn)}set filterOptions(t){tt(this,Tn,t),this.classList.toggle("filtered",f(this,Tn).some(l=>l.data.length>0))}}Ga=new WeakMap,Tn=new WeakMap,Ka=new WeakMap;class df extends HTMLElement{constructor(){super();Y(this,Mr);Y(this,Za);Y(this,Ja);Y(this,yc,t=>{const l=this.shadowRoot.querySelector("nine-grid");this.classList.add("loading"),setTimeout(()=>{const[c,o,r,n]=["LVL","CHK","COLNM","DATA"].map(u=>l.fields.indexOf(u)),s=l.data.getValidDataNF().filter(u=>u.v[c]===2&&u.v[o]==="Y"),e=s.length>0?[...new Set(s.map(u=>u.v[r]))].map(u=>({colnm:u,data:[...new Set(l.data.getValidData().filter(a=>a.v[o]==="Y"&&a.v[r]===u).map(a=>a.v[n]||""))].sort()})):[];f(this,Za).filterOptions=e;const i=Object.fromEntries([...f(this,Mr).body.querySelectorAll("ng-filter-button")].flatMap(u=>u.filterOptions).filter(u=>u.data.length>0).map(u=>[u.colnm,u.data]));f(this,Mr).filtering.set(i),this.classList.remove("loading"),this.style.display="none"})});Y(this,vc,t=>{this.style.display="none"});Y(this,wc,t=>{const l=this.shadowRoot.querySelector("nine-grid"),c=l.fields.indexOf("CHK"),o=t.target.checked;l.data.getValidData().forEach(r=>{r.v[c]=o?"Y":"N"}),l.refreshData()});Y(this,xc,t=>{const l=this.shadowRoot.querySelector("nine-grid");l.classList.add("loading");const c=l.dataManager.rawRecords;c.forEach(s=>{s.__ng.filtered=!1});const o=t.target.value.toLowerCase(),[r,n]=["LVL","DATA"].map(s=>l.fields.indexOf(s));c.forEach(s=>{s.__ng.filtered=s.v[r]===2&&!String(s.v[n]||"").toLowerCase().includes(o)}),l.data.resetRecords(),clearTimeout(f(this,Ja)),tt(this,Ja,setTimeout(()=>{l.dataManager.viewRecords.reset(),l.dataManager.viewRecords.touch()},200))});it(this,"close",()=>{this.col=null,this.style.display="none"});it(this,"open",t=>{const l=t.closest("th,td"),{left:c}=t.getBoundingClientRect(),{left:o,width:r,top:n}=f(this,Mr).getBoundingClientRect(),{top:s,height:e}=l.getBoundingClientRect(),{width:i}=this.getBoundingClientRect();let u=Math.max(0,c-o);u=Math.min(u,r-i-5);const a=s+e-n;Object.assign(this.style,{left:`${u}px`,top:`${a}px`,display:"flex"}),this.classList.add("loading"),this.shadowRoot.querySelector("input[type=text]").value="",setTimeout(()=>{const h=f(this,Mr).data.getValidDataNF(),p=l.dataset.col;this.col=p,tt(this,Za,t);const m=t.filterOptions.map((g,S)=>{const C=`<span class="group">${l.textContent}${t.filterOptions.length>1?` #${S+1} (${g.colnm})`:""}</span>`,I=f(this,Mr).activeTmpl.querySelector(`[data-col="${p}"][data-bind="${g.colnm}"]`),D=I==null?void 0:I.getAttribute("data-expr"),z=D?f(this,Mr).exprFunction(D):null,P=h.map(B=>{const F=f(this,Mr).fields.indexOf(g.colnm);return D?{v:B.v[F],v2:z(f(this,Mr).data.conv(B),B.__ng.rowidx,f(this,Mr).data)}:{v:B.v[F],v2:B.v[F]}});return[{LVL:1,CHK:"N",DATA2:C},...[...new Set(P.map(JSON.stringify))].map(JSON.parse).sort((B,F)=>(B.v2||"")>(F.v2||"")?1:(B.v2||"")<(F.v2||"")?-1:0).map(B=>({LVL:2,DATA:B.v,DATA2:B.v2||` <span class="empty">(empty)</span> ${B.v}`,COLNM:g.colnm,CHK:g.data.length===0||g.data.nineBinarySearch(B.v||"")>=0?"Y":"N"}))]}).flat(),d=this.shadowRoot.querySelector("nine-grid");d.fields.add(["DATA","DATA2","COLNM"]),d.data.set(m);const b=this.shadowRoot.querySelector("input[type=checkbox]");b.checked=d.data.getValidData().every(g=>!(g.LVL===2&&g.CHK!=="Y")),this.shadowRoot.querySelector("input").focus(),this.classList.remove("loading")})});this.attachShadow({mode:"open"})}connectedCallback(){tt(this,Mr,this.getRootNode().host);const t=this.getRootNode().host.closest("nine-grid").getAttribute("css-path")||"";this.shadowRoot.innerHTML=`
|
|
721
721
|
<style>
|
|
722
722
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ngFilterPanel.css";
|
|
723
723
|
${H.getCustomPath(this,"ngFilterPanel.css")}
|
|
@@ -750,7 +750,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
750
750
|
<button id="btnOk">OK</button>
|
|
751
751
|
<button id="btnCancel">Cancel</button>
|
|
752
752
|
</div>
|
|
753
|
-
`,this.shadowRoot.querySelector("input[type=text]").addEventListener("input",f(this,xc)),this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("change",f(this,wc)),this.shadowRoot.querySelector("#btnOk").addEventListener("click",f(this,yc)),this.shadowRoot.querySelector("#btnCancel").addEventListener("click",f(this,vc))}}Mr=new WeakMap,Za=new WeakMap,Ja=new WeakMap,yc=new WeakMap,vc=new WeakMap,wc=new WeakMap,xc=new WeakMap,customElements.get("ng-filter-button")||customElements.define("ng-filter-button",uf),customElements.get("ng-filter-panel")||customElements.define("ng-filter-panel",df);class Zn extends HTMLElement{constructor(){super();Y(this,Qa,!1);Y(this,
|
|
753
|
+
`,this.shadowRoot.querySelector("input[type=text]").addEventListener("input",f(this,xc)),this.shadowRoot.querySelector("input[type=checkbox]").addEventListener("change",f(this,wc)),this.shadowRoot.querySelector("#btnOk").addEventListener("click",f(this,yc)),this.shadowRoot.querySelector("#btnCancel").addEventListener("click",f(this,vc))}}Mr=new WeakMap,Za=new WeakMap,Ja=new WeakMap,yc=new WeakMap,vc=new WeakMap,wc=new WeakMap,xc=new WeakMap,customElements.get("ng-filter-button")||customElements.define("ng-filter-button",uf),customElements.get("ng-filter-panel")||customElements.define("ng-filter-panel",df);class Zn extends HTMLElement{constructor(){super();Y(this,Qa,!1);Y(this,xi);Y(this,tl);Y(this,Rn);Y(this,os);it(this,"export",()=>{const t=this.shadowRoot.querySelector("ng-export");t&&t.remove();const l=document.createElement("ng-export");this.shadowRoot.appendChild(l),setTimeout(()=>{l.exportExcel()})});it(this,"maximize",()=>{const t=this.shadowRoot.querySelector("ng-max-popup");t&&t.remove();const l=document.createElement("ng-max-popup");this.shadowRoot.appendChild(l),setTimeout(()=>{l.popup()})});it(this,"refreshData",t=>{if(t==null){var l=[];$(".ng-container-body tbody.bindable tr",this.body).not(".nodata").each((r,n)=>{l.push(this.dataManager.viewRecords.rawIndex+parseInt(n.sectionRowIndex/this.template.length))}),l=[...new Set(l)],l.forEach(r=>{const n=this.data.get(r);this.body.querySelectorAll(`.ng-container tbody.bindable tr[data-row="${r}"]`).forEach(s=>{s.data=n})});var c=[];$(".ng-container-body tbody.fixed tr",this.body).not(".nodata").each((r,n)=>{c.push({INDEX:n.data.__ng._[H.ROW.INDEX],ROW:n.dataset.row})}),c.forEach(r=>{const n=this.data.getNF(r.INDEX);this.body.querySelectorAll(`.ng-container tbody.fixed tr[data-row="${r.ROW}"]`).forEach(s=>{s.data=n})})}else{t=parseInt(t);const r=t<0?this.data.getNF(this.body.querySelector(`tbody.fixed tr[data-row="${t}"]`).dataset.index):this.data.get(t);this.body.querySelectorAll(`.ng-container tbody tr[data-row="${t}"]`).forEach(n=>{n.data=r})}(t==null?$(".ng-container tbody tr th,.ng-container tbody tr td",this.body):$(`.ng-container tbody tr[data-row=${t}] th,.ng-container tbody tr[data-row=${t}] td`,this.body)).each((r,n)=>{n.children[0]&&n.children[0].dataRefresh&&n.dataset.row&&n.children[0].dataRefresh()}),$(".ng-container thead tr th,.ng-container thead tr td,.ng-container tfoot tr th,.ng-container tfoot tr td",this.body).each((r,n)=>{n.children[0]&&n.children[0].dataRefresh&&n.children[0].dataRefresh()})});it(this,"refreshDataV2",()=>{$(".ng-container tbody tr th,.ng-container tbody tr td",this.body).each((l,c)=>{c.children[0]&&c.children[0].dataRefresh&&c.dataset.row&&c.children[0].dataRefresh(!0)}),$(".ng-container thead tr th,.ng-container thead tr td,.ng-container tfoot tr th,.ng-container tfoot tr td",this.body).each((l,c)=>{c.children[0]&&c.children[0].dataRefresh&&c.children[0].dataRefresh(!0)})});Y(this,el,t=>{this.dataManager&&(this.data.clear(),this.dataManager.setDataSource(t),this.refresh(),this.paging&&this.paging.refresh(),this.scrollTo_V1(0))});it(this,"changeRayout",t=>{$(".ng-container-left",this.body).children().remove(),$(".ng-container-right",this.body).children().remove(),$(".ng-container-body",this.body).children().remove(),$(".ng-container-body",this.shadowRoot).append(f(this,os)[t]),f(this,il).call(this),this.createTemplate(),f(this,rl).call(this),this.resetTemplate(),f(this,sl).call(this),this.cell.resetEvent(),this.touchEvent.resetEvent(),f(this,xi).resetEvent(),f(this,tl).resetEvent(),f(this,Rn)&&f(this,Rn).resetEvent(),this.sorting&&this.sorting.initialize(),this.filtering&&this.filtering.initialize(),this.pin&&this.pin.initialize(),this.data.initialize(),setTimeout(()=>{this.paging&&this.paging.refresh(),this.scrollTo_V1(0)})});Y(this,rl,()=>{this.elements={table:$(this.body.querySelector(".ng-container-body > table")),hscrollbar:$(this.body.querySelector("ng-hscrollbar")),vscrollbar:$(this.body.querySelector("ng-vscrollbar")),bodyLeft:$(this.body.querySelector(".ng-container-left")),bodyBody:$(this.body.querySelector(".ng-container-body")),bodyRight:$(this.body.querySelector(".ng-container-right"))},this.elements.table.show();var t=this.elements.table.clone();this.elements.bodyLeft.html(t.clone()),$("col,th,td",this.elements.bodyLeft).not("[fixed=left]").remove();var l=0;if($("col",this.elements.bodyLeft).each((o,r)=>{l+=parseInt(H.j.querySelectorAll(r).attr("width"))}),this.elements.bodyLeft.css({width:l,"min-width":l}),this.elements.bodyRight.html(t.clone()),$("col,th,td",this.elements.bodyRight).not("[fixed=right]").remove(),l=0,$("col",this.elements.bodyRight).each((o,r)=>{l+=parseInt(H.j.querySelectorAll(r).attr("width"))}),this.elements.bodyRight.css({width:l,"min-width":l}),this.elements.bodyBody.html(t.clone()),this.elements.bodyBody.find("[fixed=left]").remove(),this.elements.bodyBody.find("[fixed=right]").remove(),this.elements.bodyLeft.find("tbody tr").remove(),this.elements.bodyRight.find("tbody tr").remove(),this.elements.bodyBody.find("tbody tr").remove(),this.elements.bodyBody.find("table").width(0),$(".ng-container .ng-table tr.nodata",this.body).length<=0){var c='<tr class="nodata"></tr>';this.elements.bodyLeft.find("tbody.bindable").append(c),this.elements.bodyRight.find("tbody.bindable").append(c),this.elements.bodyBody.find("tbody.bindable").append(c)}});Y(this,_c,()=>{if(!this.template)return 0;var t=0;return this.template.each((l,c)=>{t+=$(c).height()}),t});Y(this,ys,()=>{const t=parseInt(this.getAttribute("display-row-count"));if(isNaN(t))return;const l=this.shadowRoot.querySelector("ng-head");l&&setTimeout(()=>{const c=parseInt(window.getComputedStyle(l).getPropertyValue("padding-bottom"),10);var o=($(l).height()||0)+($("ng-foot",this.shadowRoot).height()||0)+($(".ng-container-body thead",this.shadowRoot).height()||0)+($(".ng-container-body tfoot:visible",this.shadowRoot).height()||0)+($(".ng-container-bottom:visible",this.shadowRoot).height()||0)+c+(f(this,_c).call(this)||0)*t+3;$(this).height(o)})});Y(this,Sc,()=>{if(f(this,Qa))return;this.originFormat=this.outerHTML,this.uuid=H.randomUUID(),this.id||(this.id=this.uuid),$("table",this).each((r,n)=>{if($("colgroup",n).length==0){var s=0;$("tbody tr",n).eq(0).find("th,td").each((i,u)=>{s+=u.colSpan||1}),$(n).prepend("<colgroup></colgroup>");for(var e=Math.max(parseInt(($(n).width()-16)/s)-1,100),r=0;r<s;r++)$("colgroup",n).append(`<col width="${e}" />`)}n.querySelector("thead")||$("colgroup",n).after("<thead></thead>"),$("tbody th,tbody td",n).each((i,u)=>{u.innerHTML.trim()==""&&(u.innerHTML="<ng-renderer>")}),$("thead th,thead td,tfoot th,tfoot td",n).each((i,u)=>{u.dataset&&u.dataset.expr&&(u.innerHTML="<ng-renderer>"),u.getAttribute("title")||u.setAttribute("title",u.innerHTML)}),$("datalist_BAK",n).each((i,u)=>{if(u.parentNode.getAttribute("data-source"))return!0;const a=[];u.querySelectorAll("option").forEach(m=>{for(var d={},b=0;b<m.attributes.length;b++)d[m.attributes[b].name]=m.attributes[b].value;a.push(d)}),window[this.id]||(window[this.id]=this),window[this.id]["code"+i]=a;const h=u.closest("th,td");if(h){const m=h.getAttribute("key")||"key",d=h.getAttribute("value")||"value",b=h.getAttribute("multi-separator")||",";var p=`window["${this.id}"]["code${i}"]`;u.parentNode.setAttribute("data-source",p),h.dataset.expr=`ninegrid.binarySearchValue(${p}, "${m}", data["${h.dataset.bind}"].split("${b}"), "${d}")`}}),$(n).hide(),f(this,os).push(n),H.j.querySelectorAll(this).hasClass("simple")||f(this,Ec).call(this,n)});const t=`
|
|
754
754
|
<style>
|
|
755
755
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/ninegrid.css";
|
|
756
756
|
${H.getCustomPath(this,"ninegrid.css")}
|
|
@@ -775,7 +775,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
775
775
|
<div class='ng-etc2'></div>
|
|
776
776
|
</div>
|
|
777
777
|
<ng-foot></ng-foot>
|
|
778
|
-
`;this.comboExpr=(r,n,s)=>{const e=s.querySelector("ng-combo");if(!e)return"";const i=e.getAttribute("code")||"code",u=e.getAttribute("codename")||"codename",a=e.getAttribute("multi-separator")||",";return H.binarySearchValue(e.dataSource,i,r[s.dataset.bind],u,a)};for(const r of f(this,os))$(H.j.querySelectorAll("tbody",r).addClass("bindable").elem()).before('<tbody class="fixed"></tbody>');$(this.shadowRoot).append(t),$(".ng-container-body",this.shadowRoot).append(f(this,os)[0]),this.body=this.shadowRoot.querySelector(".ng-body"),this.querySelectorAll("nx-buttons *").forEach(r=>{r.grid=this}),$(this.shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-custom")).append(this.querySelectorAll("nx-buttons")),f(this,il).call(this),this.createTemplate(),f(this,rl).call(this),this.resetTemplate(),f(this,kc).call(this);const l=this.shadowRoot.querySelector("ng-foot");this.paging=l.shadowRoot.querySelector("ng-paging"),this.layout=l.shadowRoot.querySelector("ng-layout"),this.layout&&this.layout.add(f(this,os)),new Vu(this),this.pin=new Jd(this),this.fields=new xd(this),this.cell=new Wu(this),this.touchEvent=new Yu(this),this.selection=new Xu(this),this.tables=new sf(this),this.dataManager=new dd(this),this.view=new hf(this),this.tableUtils=new nf(this),this.columns=new rd(this);for(var c in this.dataManager)this.dataManager[c]instanceof Function&&!["xxx"].includes(c)?this[c]=this.dataManager[c].bind(this):["data","row","tree"].includes(c)&&(this[c]=this.dataManager[c]);for(var c in this.tableUtils)["columns"].includes(c)&&(this[c]=this.tableUtils[c]);for(var c in this.cell)this.cell[c]instanceof Function&&!["refresh"].includes(c)||["xx"].includes(c)&&(this[c]=this.cell[c]);H.j.querySelectorAll(this).hasClass("simple")||(this.filtering=new cf(this)),!H.j.querySelectorAll(this).hasClass("combo")&&!H.j.querySelectorAll(this).hasClass("filter")&&$(this.shadowRoot).append($("<ng-combo-panel></ng-combo-panel").hide()),this.sorting=new rf(this),this.matrix=new Dd(this),tt(this,wi,new ed(this)),tt(this,tl,new td(this)),H.j.querySelectorAll(this).hasClass("simple")||tt(this,Rn,new Xd(this)),f(this,sl).call(this),this.refresh(),this.body.querySelector(".ng-container-body .nodata")&&new ResizeObserver((r,n)=>{this.body.querySelector("ng-vscrollbar").refresh()}).observe(this.body.querySelector(".ng-container-body .nodata")),!H.j.querySelectorAll(this).hasClass("filter")&&!H.j.querySelectorAll(this).hasClass("combo")&&($(this.body).on("mousedown",r=>{this.shadowRoot.querySelectorAll("ng-combo-panel,ng-filter-panel,ng-context-menu-panel").forEach(n=>{$(n).is(":visible")&&$(n).hide()})}),$(this).on("click",r=>{r.target.shadowRoot.querySelectorAll("ng-info").forEach(n=>{n.close()})})),new hd(this),this.classList.contains("simple")||setTimeout(()=>{this.dispatchEvent(new CustomEvent(H.EVENT.LOAD,{bubbles:!0,detail:{}}))},100);const o=this.shadowRoot.querySelector("ng-head");o&&o.shadowRoot.querySelectorAll("nx-buttons button").forEach(r=>{r.addEventListener("click",n=>{const s=new CustomEvent(H.EVENT.BUTTON_CLICK,{bubbles:!0,detail:{target:r}});this.dispatchEvent(s)})}),tt(this,Qa,!0)});Y(this,sl,()=>{this.lastRowHidden=isNaN(parseInt(H.j.querySelectorAll(this).attr("display-row-count"))),this.paging||(this.paging={}),H.j.querySelectorAll(this).attr("col-indicator-type",H.j.querySelectorAll(this).attr("col-indicator-type")||H.COLINDICATORTYPE.COLLAPSE),H.j.querySelectorAll(this).attr("auto-fit-col",H.j.querySelectorAll(this).attr("auto-fit-col")||"false"),H.j.querySelectorAll(this).attr("col-resizable",H.j.querySelectorAll(this).attr("col-resizable")||"true"),H.j.querySelectorAll(this).attr("row-resizable",H.j.querySelectorAll(this).attr("row-resizable")||"false"),H.j.querySelectorAll(this).attr("col-movable",H.j.querySelectorAll(this).attr("col-movable")||"false"),H.j.querySelectorAll(this).attr("enable-fixed-col",H.j.querySelectorAll(this).attr("enable-fixed-col")||"false"),H.j.querySelectorAll(this).attr("show-title-bar",H.j.querySelectorAll(this).attr("show-title-bar")||"false"),H.j.querySelectorAll(this).attr("show-menu-icon",H.j.querySelectorAll(this).attr("show-menu-icon")||"false"),H.j.querySelectorAll(this).attr("show-status-bar",H.j.querySelectorAll(this).attr("show-status-bar")||"false"),H.j.querySelectorAll(this).attr("show-thead",H.j.querySelectorAll(this).attr("show-thead")||"true"),H.j.querySelectorAll(this).attr("show-tfoot",H.j.querySelectorAll(this).attr("show-tfoot")||"true"),H.j.querySelectorAll(this).attr("select-type",H.j.querySelectorAll(this).attr("select-type")||H.SELECTTYPE.CELL),H.j.querySelectorAll(this).attr("paging-type",H.j.querySelectorAll(this).attr("paging-type")||H.PAGINGTYPE.NONE),H.j.querySelectorAll(this).attr("paging-count",H.j.querySelectorAll(this).attr("paging-count")||H.PAGINGCOUNT.AUTO)});Y(this,kc,()=>{new ResizeObserver(l=>{this.view&&this.view.redraw(),this.refreshScroll(),this.refreshBindRows(),$("tbody.bindable tr:not([data-matrix-row])",this.body).not(".nodata").length>0&&this.dataManager.viewRecords.reset()}).observe(this);const t=new MutationObserver((l,c)=>{this.body.querySelector("ng-hscrollbar").refresh()});$("colgroup",this.body).each((l,c)=>{t.observe(c,{childList:!0,subtree:!0,attributeOldValue:!0})}),this.body.querySelector("ng-hscrollbar").refresh(),new ResizeObserver((l,c)=>{if(this.getAttribute("auto-fit-col")=="true"){let n=[];var o=0;$(".ng-container-body col",this.body).each((e,i)=>{n.push({col:i,width:Number(H.j.querySelectorAll(i).attr("width"))})}),n.forEach(e=>{o+=e.width});const s=$(".ng-container-body",this.body).width();s!=0&&n.forEach(e=>{var i=e.width*s/o;H.j.querySelectorAll(e.col).attr("width",i)})}this.body.querySelector("ng-hscrollbar").refresh();const r=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");r&&r.resize(),f(this,ys).call(this)}).observe(this.body.querySelector(".ng-container-body"))});it(this,"createTemplate",()=>{this.template=$(".ng-container-body tbody.bindable tr:not(.nodata)",this.body).clone(),this.tmpl=this.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)"),this.activeTmpl=this.body.querySelector(".ng-container-body tbody.bindable tr:not(.nodata)")});it(this,"resetTemplate",()=>{var t=0;["left","body","right"].forEach(o=>{$(`.ng-container-${o} colgroup col`,this.body).each((r,n)=>{n.dataset.col=t++})});var l=[];$(".col-indicator",this.body).each((o,r)=>{l.push({from:parseInt(r.dataset.col),to:o}),r.innerHTML=`<div>${H.num2ExcelCol(o)}</div>`}),this.template.find("th,td").each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".ng-table th,.ng-table td",this.body).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)});const c=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");c&&($("th,td",c.currentTable).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".last",c.currentTable).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})),this.template.find(".last").each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")}),$(".last",this.body).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})});Y(this,as,(t,l)=>{var c=$(l+" tr",t),o=$(l+" th,"+l+" td",t),r=c.length,n=0;o.each((e,i)=>{n+=i.colSpan});var s=Array.from(Array(r),()=>Array(n).fill(null));c.each((e,i)=>{var u=i.sectionRowIndex,a=0;$(i).find("th,td").each((h,p)=>{for(var m=0;m<s[u].length;m++)if(s[u][m]==null){a=m;break}for(var m=0;m<p.rowSpan;m++)for(var d=0;d<p.colSpan;d++)try{s[u+m][a+d]=m==0&&d==0?"1":"0"}catch(g){console.error(g)}})}),c.each((e,i)=>{var u=i.sectionRowIndex;$(i).find("th,td").not(".dummy").each((a,h)=>{for(var p=0;p<s[u].length;p++)if(s[u][p]=="1"){h.dataset.col=p,s[u][p]="0";break}})})});Y(this,Cc,()=>{const t='<th data-col="@col" class="col-indicator" scope="col"><div>@text</div></th>';var l=this.body.querySelector(".ng-container-body > table > thead");if(!l||l.querySelector(".col-indicator-rowgroup"))return;const c=H.j.querySelectorAll(l.insertRow(0)).attr("role","row").addClass("col-indicator-rowgroup").elem();var o=0;$(".ng-container-body > table > tbody.bindable > tr",this.body).eq(0).find("th,td").each((n,s)=>{if(!H.j.querySelectorAll(s).hasClass("dummy"))for(var e=0;e<s.colSpan;e++)$(c).append(t.replace("@col",o).replace("@text",H.num2ExcelCol(o++)))});var r=[];$("colgroup col",this.body).each((n,s)=>{r.push({width:parseInt(H.j.querySelectorAll(s).attr("width")),background:H.j.querySelectorAll(s).attr("background-color")})}),$("thead .col-indicator",this.body).each((n,s)=>{if(!r[n])return!1;$(s).css({width:r[n].width,"min-width":r[n].width,"background-color":r[n].background,"border-top-color":r[n].background}),H.j.querySelectorAll(s).attr("background-color",r[n].background)})});Y(this,il,()=>{var t=this.body.querySelector(".ng-container-body > table");if(t){t.querySelectorAll("tbody tr").forEach(c=>{c.style.height||(c.style.height="32px")});var l=t.querySelector("thead");l.length<=0&&$("<thead></thead>").appendTo(t),H.j.querySelectorAll(t).attr("role","table").addClass("ng-table"),H.j.querySelectorAll("tbody th,tbody td",t).attr("tabindex",0),H.j.querySelectorAll("thead,tbody,tfoot",t).attr("role","rowgroup"),H.j.querySelectorAll("tr",t).attr("role","row"),H.j.querySelectorAll("tbody > tr",t).attr("role","gridcell"),H.j.querySelectorAll("th,td",t).attr("scope","col"),f(this,as).call(this,$(t),"thead"),f(this,as).call(this,$(t),"tbody.bindable"),f(this,as).call(this,$(t),"tbody.fixed"),f(this,as).call(this,$(t),"tfoot"),f(this,Cc).call(this),t.querySelectorAll("col").forEach((c,o)=>{H.j.querySelectorAll(`[data-col="${o}"]`,t).attr("fixed",H.j.querySelectorAll(c).attr("fixed"))})}});Y(this,Ec,t=>{f(this,as).call(this,t,"thead"),f(this,as).call(this,t,"tbody"),f(this,as).call(this,t,"tfoot"),$("colgroup col[fixed=left]",t).index($(".dummy[fixed=left]",t)),$("tr",t).each((l,c)=>{}),$("colgroup",t).prepend('<col width="0" fixed="left" class="first" />'),$("tr",t).each((l,c)=>{$(c).prepend('<td class="first"></td>')}),$("colgroup",t).append('<col width="0" fixed="right" class="last" />'),$("tr",t).each((l,c)=>{$(c).append('<td class="last"></td>')})});Y(this,nl,()=>{var t=[];return $("th,td",this.template).not(".dummy").not(".first").each((l,c)=>{c.querySelector("ng-row-indicator")||t.push(Number(c.dataset.col))}),t});it(this,"selectArea",(t,l,c,o)=>{const r=f(this,Ws).call(this,t),n=f(this,Ws).call(this,c),s=f(this,Xs).call(this,l),e=f(this,Xs).call(this,o),i=parseInt(r*this.template.length),u=parseInt(n*this.template.length)+this.template.length-1;this.row.at=r,r>=0&&n>=0?this.selection.selectArea(i,s,u,e):this.clearSelection()});it(this,"selectRow",(t,l)=>{const c=f(this,Ws).call(this,t),o=H.isNull(oRow2)?c:f(this,Ws).call(this,l),r=parseInt(c*this.template.length),n=parseInt(o*this.template.length)+this.template.length-1;this.row.at=c,c>=0&&o>=0?this.selection.selectArea(r,this.firstCol,n,this.lastCol):this.clearSelection()});it(this,"selectCol",(t,l)=>{const c=f(this,Xs).call(this,t),o=H.isNull(l)?c:f(this,Xs).call(this,l),r=0,n=parseInt(this.data.count()*this.template.length-1);c>=0&&o>=0?this.selection.selectArea(r,c,n,o):this.clearSelection()});it(this,"selectCell",(t,l,c)=>{const o=f(this,Ws).call(this,t),r=f(this,Xs).call(this,l),n=parseInt(o*this.template.length)+H.nvl(c,0);this.row.at=o,o>=0?this.selection.selectArea(n,r,n,r):this.clearSelection()});Y(this,Ws,t=>{if(typeof t=="number")return t;if(typeof t=="function")return this.data.findIndex(t);throw`invalid ${t}`});Y(this,Xs,t=>{if(typeof t=="number")return t;if(typeof t=="string"&&this.fields.includes(t))return parseInt($(`[data-bind="${t}"]`,this.template)[0].dataset.col);throw`invalid ${t}`});it(this,"scrollTo",t=>{this.row.at=t});it(this,"scrollBy",t=>this.dataManager.scrollTo_V1(this.dataManager.viewRecords.rawIndex+t));it(this,"scrollFirst",()=>{this.scrollTo(0)});it(this,"scrollLast",()=>{this.scrollTo(this.data.count()-1)});this.attachShadow({mode:"open"}),H.extendElementPrototype(),tt(this,os,[]),this.refreshBindRows=()=>{this.bindRows=[],this.bindMatrixRows=[],H.j.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)",this.body).elements.forEach(o=>{this.bindRows.push(parseInt(o.dataset.row)),this.bindMatrixRows.push(parseInt(o.dataset.matrixRow))}),this.bindRows=[...new Set(this.bindRows)],this.bindMatrixRows=[...new Set(this.bindMatrixRows)];var t=$(`.ng-container-body tr[data-row="${this.bindRows[this.bindRows.length-1]}"]`,this.body);if(t.length>0){var l=$(".ng-container-body",this.body);$("tfoot",l),t.eq(0).position().top;var c=0;t.each((o,r)=>{c+=$(r).height()})}},this.refresh=()=>{this.refreshScroll()},this.refreshScroll=()=>{},this.setCurrCell=t=>{this.currCell=t}}connectedCallback(){$(()=>{f(this,Sc).call(this)}),document.addEventListener("DOMContentLoaded",t=>{}),$(document.body).on("mousedown",t=>{t.target.closest("ng-combo-panel")||$("ng-combo-panel").hide()})}disconnectedCallback(){}adoptedCallback(){}get currentRow(){return this.row.at}get dataSource(){return this.dataManager.rawRecords}set dataSource(t){this.dataManager?f(this,el).call(this,t):setTimeout(()=>{f(this,el).call(this,t)},300)}get layouts(){return f(this,os)}attributeChangedCallback(t,l,c){switch(t){case"lang":break;case"caption":const o=this.shadowRoot.querySelector("ng-head");o&&$("span:first-child",o.shadowRoot.querySelector("ng-title")).html(v);break;case"display-row-count":this.lastRowHidden=!!isNaN(parseInt(c));break;case"row-resizable":c=="true"?$(".row-resizer",this.shadowRoot).show():$(".row-resizer",this.shadowRoot).hide();break;case"col-indicator-type":H.j.querySelectorAll(".ng-table thead .col-indicator-rowgroup",this.body).removeClass(H.COLINDICATORTYPE.EXPAND).removeClass(H.COLINDICATORTYPE.COLLAPSE).addClass(c),f(this,ys).call(this);break;case"auto-fit-col":f(this,wi)&&f(this,wi).autoFit(c=="true"),f(this,ys).call(this);break;case"enable-fixed-col":c=="true"?H.j.querySelectorAll(this).addClass(t):H.j.querySelectorAll(this).removeClass(t);break;case"select-type":this.selection&&(this.selection.type=c);break;case"paging-type":this.paging&&(this.paging.type=c);break;case"paging-count":this.paging&&(this.paging.count=c);break;case"show-menu-icon":case"show-title-bar":const r=H.j.querySelectorAll(this).attr("show-title-bar")=="true",n=H.j.querySelectorAll(this).attr("show-menu-icon")=="true",s=this.shadowRoot.querySelector("ng-head");if(!s)break;const e=s.shadowRoot.querySelector("ng-menu");r?(H.j.querySelectorAll(s).addClass("expand"),$(s.shadowRoot).children().not("style").show(),n||H.j.querySelectorAll(e).hide()):n?H.j.querySelectorAll(s).removeClass("expand").show():H.j.querySelectorAll(s).hide(),f(this,ys).call(this);break;case"show-tfoot":$("tfoot",this.body).css({visibility:c=="true"?"unset":"collapse"}),f(this,ys).call(this);break;case"show-status-bar":c=="true"?H.j.querySelectorAll("ng-foot",this.shadowRoot).addClass("expand"):H.j.querySelectorAll("ng-foot",this.shadowRoot).removeClass("expand"),f(this,ys).call(this);break}}get firstCol(){return Math.min.apply(null,f(this,nl).call(this))}get lastCol(){return Math.max.apply(null,f(this,nl).call(this))}}Qa=new WeakMap,wi=new WeakMap,tl=new WeakMap,Rn=new WeakMap,os=new WeakMap,el=new WeakMap,rl=new WeakMap,_c=new WeakMap,ys=new WeakMap,Sc=new WeakMap,sl=new WeakMap,kc=new WeakMap,as=new WeakMap,Cc=new WeakMap,il=new WeakMap,Ec=new WeakMap,nl=new WeakMap,Ws=new WeakMap,Xs=new WeakMap,it(Zn,"observedAttributes",["lang","caption","display-row-count","row-resizable","col-indicator-type","auto-fit-col","enable-fixed-col","select-type","paging-type","paging-count","show-menu-icon","show-title-bar","show-tfoot","show-status-bar"]),customElements.get("nine-grid")||customElements.define("nine-grid",Zn);class ff extends Zn{constructor(){super()}connectedCallback(){super.connectedCallback()}}customElements.get("ng-source")||customElements.define("ng-source",ff);class pf extends HTMLElement{constructor(){super();Y(this,vs);it(this,"showModal",()=>{this.querySelector("dialog").showModal()});it(this,"close",()=>{$(".head",this).off("mousedown",f(this,ol)),$(".head",this).off("touchstart",f(this,ll)),$(document).off("mouseup",f(this,al)),$(document).off("touchend",f(this,hl)),$(document).off("mousemove",f(this,Mn)),$(document).off("touchmove",f(this,In)),this.querySelector("dialog").close()});Y(this,Ac,()=>{$(".close",this).on("click",t=>{H.j.querySelectorAll("dialog",this).addClass("out"),setTimeout(()=>{this.close()},300)}),$(".close2",this).on("click",t=>{this.close()}),$(".head",this).on("mousedown",f(this,ol)),$(".head",this).on("touchstart",f(this,ll)),$(document).on("mouseup",f(this,al)),$(document).on("touchend",f(this,hl))});Y(this,ol,t=>{if(!t.target.closest("buttons")&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftkey)){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,vs,{x:t.clientX-l.x,y:t.clientY-l.y}),$(document).on("mousemove",f(this,Mn))}});Y(this,Mn,t=>{$(this.querySelector("dialog")).offset({left:t.pageX-f(this,vs).x,top:t.pageY-f(this,vs).y})});Y(this,al,t=>{$(document).off("mousemove",f(this,Mn))});Y(this,ll,t=>{if(!t.target.closest("buttons")){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,vs,{x:t.changedTouches[0].pageX-l.x,y:t.changedTouches[0].pageY-l.y}),$(document).on("touchmove",f(this,In))}});Y(this,In,t=>{$(this.querySelector("dialog")).offset({left:t.changedTouches[0].pageX-f(this,vs).x,top:t.changedTouches[0].pageY-f(this,vs).y})});Y(this,hl,t=>{$(document).off("touchmove",f(this,In))})}connectedCallback(){const t=this.innerHTML,l=this.getAttribute("css-file"),c=l?`@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/${l}";`:"",o=l?H.getCustomPath(this,l):"";this.innerHTML=`
|
|
778
|
+
`;this.comboExpr=(r,n,s)=>{const e=s.querySelector("ng-combo");if(!e)return"";const i=e.getAttribute("code")||"code",u=e.getAttribute("codename")||"codename",a=e.getAttribute("multi-separator")||",";return H.binarySearchValue(e.dataSource,i,r[s.dataset.bind],u,a)};for(const r of f(this,os))$(H.j.querySelectorAll("tbody",r).addClass("bindable").elem()).before('<tbody class="fixed"></tbody>');$(this.shadowRoot).append(t),$(".ng-container-body",this.shadowRoot).append(f(this,os)[0]),this.body=this.shadowRoot.querySelector(".ng-body"),this.querySelectorAll("nx-buttons *").forEach(r=>{r.grid=this}),$(this.shadowRoot.querySelector("ng-head").shadowRoot.querySelector("ng-custom")).append(this.querySelectorAll("nx-buttons")),f(this,il).call(this),this.createTemplate(),f(this,rl).call(this),this.resetTemplate(),f(this,kc).call(this);const l=this.shadowRoot.querySelector("ng-foot");this.paging=l.shadowRoot.querySelector("ng-paging"),this.layout=l.shadowRoot.querySelector("ng-layout"),this.layout&&this.layout.add(f(this,os)),new Vu(this),this.pin=new Jd(this),this.fields=new xd(this),this.cell=new Wu(this),this.touchEvent=new Yu(this),this.selection=new Xu(this),this.tables=new sf(this),this.dataManager=new dd(this),this.view=new hf(this),this.tableUtils=new nf(this),this.columns=new rd(this);for(var c in this.dataManager)this.dataManager[c]instanceof Function&&!["xxx"].includes(c)?this[c]=this.dataManager[c].bind(this):["data","row","tree"].includes(c)&&(this[c]=this.dataManager[c]);for(var c in this.tableUtils)["columns"].includes(c)&&(this[c]=this.tableUtils[c]);for(var c in this.cell)this.cell[c]instanceof Function&&!["refresh"].includes(c)||["xx"].includes(c)&&(this[c]=this.cell[c]);H.j.querySelectorAll(this).hasClass("simple")||(this.filtering=new cf(this)),!H.j.querySelectorAll(this).hasClass("combo")&&!H.j.querySelectorAll(this).hasClass("filter")&&$(this.shadowRoot).append($("<ng-combo-panel></ng-combo-panel").hide()),this.sorting=new rf(this),this.matrix=new Dd(this),tt(this,xi,new ed(this)),tt(this,tl,new td(this)),H.j.querySelectorAll(this).hasClass("simple")||tt(this,Rn,new Xd(this)),f(this,sl).call(this),this.refresh(),this.body.querySelector(".ng-container-body .nodata")&&new ResizeObserver((r,n)=>{this.body.querySelector("ng-vscrollbar").refresh()}).observe(this.body.querySelector(".ng-container-body .nodata")),!H.j.querySelectorAll(this).hasClass("filter")&&!H.j.querySelectorAll(this).hasClass("combo")&&($(this.body).on("mousedown",r=>{this.shadowRoot.querySelectorAll("ng-combo-panel,ng-filter-panel,ng-context-menu-panel").forEach(n=>{$(n).is(":visible")&&$(n).hide()})}),$(this).on("click",r=>{r.target.shadowRoot.querySelectorAll("ng-info").forEach(n=>{n.close()})})),new hd(this),this.classList.contains("simple")||setTimeout(()=>{this.dispatchEvent(new CustomEvent(H.EVENT.LOAD,{bubbles:!0,detail:{}}))},100);const o=this.shadowRoot.querySelector("ng-head");o&&o.shadowRoot.querySelectorAll("nx-buttons button").forEach(r=>{r.addEventListener("click",n=>{const s=new CustomEvent(H.EVENT.BUTTON_CLICK,{bubbles:!0,detail:{target:r}});this.dispatchEvent(s)})}),tt(this,Qa,!0)});Y(this,sl,()=>{this.lastRowHidden=isNaN(parseInt(H.j.querySelectorAll(this).attr("display-row-count"))),this.paging||(this.paging={}),H.j.querySelectorAll(this).attr("col-indicator-type",H.j.querySelectorAll(this).attr("col-indicator-type")||H.COLINDICATORTYPE.COLLAPSE),H.j.querySelectorAll(this).attr("auto-fit-col",H.j.querySelectorAll(this).attr("auto-fit-col")||"false"),H.j.querySelectorAll(this).attr("col-resizable",H.j.querySelectorAll(this).attr("col-resizable")||"true"),H.j.querySelectorAll(this).attr("row-resizable",H.j.querySelectorAll(this).attr("row-resizable")||"false"),H.j.querySelectorAll(this).attr("col-movable",H.j.querySelectorAll(this).attr("col-movable")||"false"),H.j.querySelectorAll(this).attr("enable-fixed-col",H.j.querySelectorAll(this).attr("enable-fixed-col")||"false"),H.j.querySelectorAll(this).attr("show-title-bar",H.j.querySelectorAll(this).attr("show-title-bar")||"false"),H.j.querySelectorAll(this).attr("show-menu-icon",H.j.querySelectorAll(this).attr("show-menu-icon")||"false"),H.j.querySelectorAll(this).attr("show-status-bar",H.j.querySelectorAll(this).attr("show-status-bar")||"false"),H.j.querySelectorAll(this).attr("show-thead",H.j.querySelectorAll(this).attr("show-thead")||"true"),H.j.querySelectorAll(this).attr("show-tfoot",H.j.querySelectorAll(this).attr("show-tfoot")||"true"),H.j.querySelectorAll(this).attr("select-type",H.j.querySelectorAll(this).attr("select-type")||H.SELECTTYPE.CELL),H.j.querySelectorAll(this).attr("paging-type",H.j.querySelectorAll(this).attr("paging-type")||H.PAGINGTYPE.NONE),H.j.querySelectorAll(this).attr("paging-count",H.j.querySelectorAll(this).attr("paging-count")||H.PAGINGCOUNT.AUTO)});Y(this,kc,()=>{new ResizeObserver(l=>{this.view&&this.view.redraw(),this.refreshScroll(),this.refreshBindRows(),$("tbody.bindable tr:not([data-matrix-row])",this.body).not(".nodata").length>0&&this.dataManager.viewRecords.reset()}).observe(this);const t=new MutationObserver((l,c)=>{this.body.querySelector("ng-hscrollbar").refresh()});$("colgroup",this.body).each((l,c)=>{t.observe(c,{childList:!0,subtree:!0,attributeOldValue:!0})}),this.body.querySelector("ng-hscrollbar").refresh(),new ResizeObserver((l,c)=>{if(this.getAttribute("auto-fit-col")=="true"){let n=[];var o=0;$(".ng-container-body col",this.body).each((e,i)=>{n.push({col:i,width:Number(H.j.querySelectorAll(i).attr("width"))})}),n.forEach(e=>{o+=e.width});const s=$(".ng-container-body",this.body).width();s!=0&&n.forEach(e=>{var i=e.width*s/o;H.j.querySelectorAll(e.col).attr("width",i)})}this.body.querySelector("ng-hscrollbar").refresh();const r=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");r&&r.resize(),f(this,ys).call(this)}).observe(this.body.querySelector(".ng-container-body"))});it(this,"createTemplate",()=>{this.template=$(".ng-container-body tbody.bindable tr:not(.nodata)",this.body).clone(),this.tmpl=this.body.querySelectorAll(".ng-container-body tbody.bindable tr:not(.nodata)"),this.activeTmpl=this.body.querySelector(".ng-container-body tbody.bindable tr:not(.nodata)")});it(this,"resetTemplate",()=>{var t=0;["left","body","right"].forEach(o=>{$(`.ng-container-${o} colgroup col`,this.body).each((r,n)=>{n.dataset.col=t++})});var l=[];$(".col-indicator",this.body).each((o,r)=>{l.push({from:parseInt(r.dataset.col),to:o}),r.innerHTML=`<div>${H.num2ExcelCol(o)}</div>`}),this.template.find("th,td").each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".ng-table th,.ng-table td",this.body).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)});const c=this.shadowRoot.querySelector("ng-foot").shadowRoot.querySelector("ng-layout");c&&($("th,td",c.currentTable).each((o,r)=>{const n=l.findIndex(s=>s.from==r.dataset.col);n>=0&&(r.dataset.col=l[n].to)}),$(".last",c.currentTable).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})),this.template.find(".last").each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")}),$(".last",this.body).each((o,r)=>{H.j.querySelectorAll(r).addClass("dummy")})});Y(this,as,(t,l)=>{var c=$(l+" tr",t),o=$(l+" th,"+l+" td",t),r=c.length,n=0;o.each((e,i)=>{n+=i.colSpan});var s=Array.from(Array(r),()=>Array(n).fill(null));c.each((e,i)=>{var u=i.sectionRowIndex,a=0;$(i).find("th,td").each((h,p)=>{for(var m=0;m<s[u].length;m++)if(s[u][m]==null){a=m;break}for(var m=0;m<p.rowSpan;m++)for(var d=0;d<p.colSpan;d++)try{s[u+m][a+d]=m==0&&d==0?"1":"0"}catch(g){console.error(g)}})}),c.each((e,i)=>{var u=i.sectionRowIndex;$(i).find("th,td").not(".dummy").each((a,h)=>{for(var p=0;p<s[u].length;p++)if(s[u][p]=="1"){h.dataset.col=p,s[u][p]="0";break}})})});Y(this,Cc,()=>{const t='<th data-col="@col" class="col-indicator" scope="col"><div>@text</div></th>';var l=this.body.querySelector(".ng-container-body > table > thead");if(!l||l.querySelector(".col-indicator-rowgroup"))return;const c=H.j.querySelectorAll(l.insertRow(0)).attr("role","row").addClass("col-indicator-rowgroup").elem();var o=0;$(".ng-container-body > table > tbody.bindable > tr",this.body).eq(0).find("th,td").each((n,s)=>{if(!H.j.querySelectorAll(s).hasClass("dummy"))for(var e=0;e<s.colSpan;e++)$(c).append(t.replace("@col",o).replace("@text",H.num2ExcelCol(o++)))});var r=[];$("colgroup col",this.body).each((n,s)=>{r.push({width:parseInt(H.j.querySelectorAll(s).attr("width")),background:H.j.querySelectorAll(s).attr("background-color")})}),$("thead .col-indicator",this.body).each((n,s)=>{if(!r[n])return!1;$(s).css({width:r[n].width,"min-width":r[n].width,"background-color":r[n].background,"border-top-color":r[n].background}),H.j.querySelectorAll(s).attr("background-color",r[n].background)})});Y(this,il,()=>{var t=this.body.querySelector(".ng-container-body > table");if(t){t.querySelectorAll("tbody tr").forEach(c=>{c.style.height||(c.style.height="32px")});var l=t.querySelector("thead");l.length<=0&&$("<thead></thead>").appendTo(t),H.j.querySelectorAll(t).attr("role","table").addClass("ng-table"),H.j.querySelectorAll("tbody th,tbody td",t).attr("tabindex",0),H.j.querySelectorAll("thead,tbody,tfoot",t).attr("role","rowgroup"),H.j.querySelectorAll("tr",t).attr("role","row"),H.j.querySelectorAll("tbody > tr",t).attr("role","gridcell"),H.j.querySelectorAll("th,td",t).attr("scope","col"),f(this,as).call(this,$(t),"thead"),f(this,as).call(this,$(t),"tbody.bindable"),f(this,as).call(this,$(t),"tbody.fixed"),f(this,as).call(this,$(t),"tfoot"),f(this,Cc).call(this),t.querySelectorAll("col").forEach((c,o)=>{H.j.querySelectorAll(`[data-col="${o}"]`,t).attr("fixed",H.j.querySelectorAll(c).attr("fixed"))})}});Y(this,Ec,t=>{f(this,as).call(this,t,"thead"),f(this,as).call(this,t,"tbody"),f(this,as).call(this,t,"tfoot"),$("colgroup col[fixed=left]",t).index($(".dummy[fixed=left]",t)),$("tr",t).each((l,c)=>{}),$("colgroup",t).prepend('<col width="0" fixed="left" class="first" />'),$("tr",t).each((l,c)=>{$(c).prepend('<td class="first"></td>')}),$("colgroup",t).append('<col width="0" fixed="right" class="last" />'),$("tr",t).each((l,c)=>{$(c).append('<td class="last"></td>')})});Y(this,nl,()=>{var t=[];return $("th,td",this.template).not(".dummy").not(".first").each((l,c)=>{c.querySelector("ng-row-indicator")||t.push(Number(c.dataset.col))}),t});it(this,"selectArea",(t,l,c,o)=>{const r=f(this,Ws).call(this,t),n=f(this,Ws).call(this,c),s=f(this,Xs).call(this,l),e=f(this,Xs).call(this,o),i=parseInt(r*this.template.length),u=parseInt(n*this.template.length)+this.template.length-1;this.row.at=r,r>=0&&n>=0?this.selection.selectArea(i,s,u,e):this.clearSelection()});it(this,"selectRow",(t,l)=>{const c=f(this,Ws).call(this,t),o=H.isNull(oRow2)?c:f(this,Ws).call(this,l),r=parseInt(c*this.template.length),n=parseInt(o*this.template.length)+this.template.length-1;this.row.at=c,c>=0&&o>=0?this.selection.selectArea(r,this.firstCol,n,this.lastCol):this.clearSelection()});it(this,"selectCol",(t,l)=>{const c=f(this,Xs).call(this,t),o=H.isNull(l)?c:f(this,Xs).call(this,l),r=0,n=parseInt(this.data.count()*this.template.length-1);c>=0&&o>=0?this.selection.selectArea(r,c,n,o):this.clearSelection()});it(this,"selectCell",(t,l,c)=>{const o=f(this,Ws).call(this,t),r=f(this,Xs).call(this,l),n=parseInt(o*this.template.length)+H.nvl(c,0);this.row.at=o,o>=0?this.selection.selectArea(n,r,n,r):this.clearSelection()});Y(this,Ws,t=>{if(typeof t=="number")return t;if(typeof t=="function")return this.data.findIndex(t);throw`invalid ${t}`});Y(this,Xs,t=>{if(typeof t=="number")return t;if(typeof t=="string"&&this.fields.includes(t))return parseInt($(`[data-bind="${t}"]`,this.template)[0].dataset.col);throw`invalid ${t}`});it(this,"scrollTo",t=>{this.row.at=t});it(this,"scrollBy",t=>this.dataManager.scrollTo_V1(this.dataManager.viewRecords.rawIndex+t));it(this,"scrollFirst",()=>{this.scrollTo(0)});it(this,"scrollLast",()=>{this.scrollTo(this.data.count()-1)});this.attachShadow({mode:"open"}),H.extendElementPrototype(),tt(this,os,[]),this.refreshBindRows=()=>{this.bindRows=[],this.bindMatrixRows=[],H.j.querySelectorAll(".ng-container tbody.bindable tr:not(.nodata)",this.body).elements.forEach(o=>{this.bindRows.push(parseInt(o.dataset.row)),this.bindMatrixRows.push(parseInt(o.dataset.matrixRow))}),this.bindRows=[...new Set(this.bindRows)],this.bindMatrixRows=[...new Set(this.bindMatrixRows)];var t=$(`.ng-container-body tr[data-row="${this.bindRows[this.bindRows.length-1]}"]`,this.body);if(t.length>0){var l=$(".ng-container-body",this.body);$("tfoot",l),t.eq(0).position().top;var c=0;t.each((o,r)=>{c+=$(r).height()})}},this.refresh=()=>{this.refreshScroll()},this.refreshScroll=()=>{},this.setCurrCell=t=>{this.currCell=t}}connectedCallback(){$(()=>{f(this,Sc).call(this)}),document.addEventListener("DOMContentLoaded",t=>{}),$(document.body).on("mousedown",t=>{t.target.closest("ng-combo-panel")||$("ng-combo-panel").hide()})}disconnectedCallback(){}adoptedCallback(){}get currentRow(){return this.row.at}get dataSource(){return this.dataManager.rawRecords}set dataSource(t){this.dataManager?f(this,el).call(this,t):setTimeout(()=>{f(this,el).call(this,t)},300)}get layouts(){return f(this,os)}attributeChangedCallback(t,l,c){switch(t){case"lang":break;case"caption":const o=this.shadowRoot.querySelector("ng-head");o&&$("span:first-child",o.shadowRoot.querySelector("ng-title")).html(v);break;case"display-row-count":this.lastRowHidden=!!isNaN(parseInt(c));break;case"row-resizable":c=="true"?$(".row-resizer",this.shadowRoot).show():$(".row-resizer",this.shadowRoot).hide();break;case"col-indicator-type":H.j.querySelectorAll(".ng-table thead .col-indicator-rowgroup",this.body).removeClass(H.COLINDICATORTYPE.EXPAND).removeClass(H.COLINDICATORTYPE.COLLAPSE).addClass(c),f(this,ys).call(this);break;case"auto-fit-col":f(this,xi)&&f(this,xi).autoFit(c=="true"),f(this,ys).call(this);break;case"enable-fixed-col":c=="true"?H.j.querySelectorAll(this).addClass(t):H.j.querySelectorAll(this).removeClass(t);break;case"select-type":this.selection&&(this.selection.type=c);break;case"paging-type":this.paging&&(this.paging.type=c);break;case"paging-count":this.paging&&(this.paging.count=c);break;case"show-menu-icon":case"show-title-bar":const r=H.j.querySelectorAll(this).attr("show-title-bar")=="true",n=H.j.querySelectorAll(this).attr("show-menu-icon")=="true",s=this.shadowRoot.querySelector("ng-head");if(!s)break;const e=s.shadowRoot.querySelector("ng-menu");r?(H.j.querySelectorAll(s).addClass("expand"),$(s.shadowRoot).children().not("style").show(),n||H.j.querySelectorAll(e).hide()):n?H.j.querySelectorAll(s).removeClass("expand").show():H.j.querySelectorAll(s).hide(),f(this,ys).call(this);break;case"show-tfoot":$("tfoot",this.body).css({visibility:c=="true"?"unset":"collapse"}),f(this,ys).call(this);break;case"show-status-bar":c=="true"?H.j.querySelectorAll("ng-foot",this.shadowRoot).addClass("expand"):H.j.querySelectorAll("ng-foot",this.shadowRoot).removeClass("expand"),f(this,ys).call(this);break}}get firstCol(){return Math.min.apply(null,f(this,nl).call(this))}get lastCol(){return Math.max.apply(null,f(this,nl).call(this))}}Qa=new WeakMap,xi=new WeakMap,tl=new WeakMap,Rn=new WeakMap,os=new WeakMap,el=new WeakMap,rl=new WeakMap,_c=new WeakMap,ys=new WeakMap,Sc=new WeakMap,sl=new WeakMap,kc=new WeakMap,as=new WeakMap,Cc=new WeakMap,il=new WeakMap,Ec=new WeakMap,nl=new WeakMap,Ws=new WeakMap,Xs=new WeakMap,it(Zn,"observedAttributes",["lang","caption","display-row-count","row-resizable","col-indicator-type","auto-fit-col","enable-fixed-col","select-type","paging-type","paging-count","show-menu-icon","show-title-bar","show-tfoot","show-status-bar"]),customElements.get("nine-grid")||customElements.define("nine-grid",Zn);class ff extends Zn{constructor(){super()}connectedCallback(){super.connectedCallback()}}customElements.get("ng-source")||customElements.define("ng-source",ff);class pf extends HTMLElement{constructor(){super();Y(this,vs);it(this,"showModal",()=>{this.querySelector("dialog").showModal()});it(this,"close",()=>{$(".head",this).off("mousedown",f(this,ol)),$(".head",this).off("touchstart",f(this,ll)),$(document).off("mouseup",f(this,al)),$(document).off("touchend",f(this,hl)),$(document).off("mousemove",f(this,Mn)),$(document).off("touchmove",f(this,In)),this.querySelector("dialog").close()});Y(this,Ac,()=>{$(".close",this).on("click",t=>{H.j.querySelectorAll("dialog",this).addClass("out"),setTimeout(()=>{this.close()},300)}),$(".close2",this).on("click",t=>{this.close()}),$(".head",this).on("mousedown",f(this,ol)),$(".head",this).on("touchstart",f(this,ll)),$(document).on("mouseup",f(this,al)),$(document).on("touchend",f(this,hl))});Y(this,ol,t=>{if(!t.target.closest("buttons")&&!(t.buttons!=1||t.altKey||t.ctrlKey||t.shiftkey)){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,vs,{x:t.clientX-l.x,y:t.clientY-l.y}),$(document).on("mousemove",f(this,Mn))}});Y(this,Mn,t=>{$(this.querySelector("dialog")).offset({left:t.pageX-f(this,vs).x,top:t.pageY-f(this,vs).y})});Y(this,al,t=>{$(document).off("mousemove",f(this,Mn))});Y(this,ll,t=>{if(!t.target.closest("buttons")){var l=this.querySelector("dialog").getBoundingClientRect();tt(this,vs,{x:t.changedTouches[0].pageX-l.x,y:t.changedTouches[0].pageY-l.y}),$(document).on("touchmove",f(this,In))}});Y(this,In,t=>{$(this.querySelector("dialog")).offset({left:t.changedTouches[0].pageX-f(this,vs).x,top:t.changedTouches[0].pageY-f(this,vs).y})});Y(this,hl,t=>{$(document).off("touchmove",f(this,In))})}connectedCallback(){const t=this.innerHTML,l=this.getAttribute("css-file"),c=l?`@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/${l}";`:"",o=l?H.getCustomPath(this,l):"";this.innerHTML=`
|
|
779
779
|
<style>
|
|
780
780
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxDialog.css";
|
|
781
781
|
${H.getCustomPath(this,"nxDialog.css")||""}
|
|
@@ -811,9 +811,9 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
811
811
|
</div>
|
|
812
812
|
</div>
|
|
813
813
|
</dialog>
|
|
814
|
-
`,$(".title",this).html("Details"),f(this,Ac).call(this)}}vs=new WeakMap,Ac=new WeakMap,ol=new WeakMap,Mn=new WeakMap,al=new WeakMap,ll=new WeakMap,In=new WeakMap,hl=new WeakMap,customElements.get("nx-dialog")||customElements.define("nx-dialog",pf);class Au extends HTMLElement{constructor(){super();Y(this,cl);Y(this,Ys);Y(this,ul);Y(this,Nn);Y(this,ws);Y(this,
|
|
814
|
+
`,$(".title",this).html("Details"),f(this,Ac).call(this)}}vs=new WeakMap,Ac=new WeakMap,ol=new WeakMap,Mn=new WeakMap,al=new WeakMap,ll=new WeakMap,In=new WeakMap,hl=new WeakMap,customElements.get("nx-dialog")||customElements.define("nx-dialog",pf);class Au extends HTMLElement{constructor(){super();Y(this,cl);Y(this,Ys);Y(this,ul);Y(this,Nn);Y(this,ws);Y(this,_i,[]);Y(this,On);it(this,"refresh",()=>{if(f(this,Ys)){if(f(this,On))f(this,Ys).innerHTML=i18next.t(f(this,On));else if(f(this,_i).length>0&&!H.isNull(f(this,Nn))){var t=f(this,_i).findIndex(l=>l[f(this,ul)]==H.global.locale);t<0&&(t=0),f(this,Ys).innerHTML=f(this,_i)[t][f(this,Nn)],$("datalist",this).remove(),$(this).append(f(this,ws))}}});Y(this,Tc,()=>{tt(this,ws,"<datalist>"),this.querySelectorAll("datalist option").forEach((c,o)=>{for(var r={},n=0;n<c.attributes.length;n++)r[c.attributes[n].name]=f(this,cl)?c.attributes[n].value:c.attributes[n].value.replaceAll("<","<").replaceAll(">",">"),o==0&&(["locale","lang","key","code"].includes(c.attributes[n].name)?tt(this,ul,c.attributes[n].name):tt(this,Nn,c.attributes[n].name));tt(this,ws,f(this,ws)+"<option");for(const s in r)tt(this,ws,f(this,ws)+` ${s}="${r[s]}"`);tt(this,ws,f(this,ws)+"></option>"),f(this,_i).push(r)}),tt(this,ws,f(this,ws)+"</datalist>");const t=this.innerHTML;this.innerHTML=`
|
|
815
815
|
<span>${t}</span>
|
|
816
|
-
`,tt(this,Ys,this.querySelector("span"));for(var l=0;l<this.attributes.length;l++)f(this,Ys).setAttribute(this.attributes[l].name,this.attributes[l].value);this.refresh()})}connectedCallback(){tt(this,cl,this.getAttribute("enable-html")=="true"),tt(this,On,this.getAttribute("i18n")||this.getAttribute("label")||this.getAttribute("message")||this.getAttribute("text")),$(()=>{f(this,Tc).call(this)})}}cl=new WeakMap,Ys=new WeakMap,ul=new WeakMap,Nn=new WeakMap,ws=new WeakMap,
|
|
816
|
+
`,tt(this,Ys,this.querySelector("span"));for(var l=0;l<this.attributes.length;l++)f(this,Ys).setAttribute(this.attributes[l].name,this.attributes[l].value);this.refresh()})}connectedCallback(){tt(this,cl,this.getAttribute("enable-html")=="true"),tt(this,On,this.getAttribute("i18n")||this.getAttribute("label")||this.getAttribute("message")||this.getAttribute("text")),$(()=>{f(this,Tc).call(this)})}}cl=new WeakMap,Ys=new WeakMap,ul=new WeakMap,Nn=new WeakMap,ws=new WeakMap,_i=new WeakMap,On=new WeakMap,Tc=new WeakMap,it(Au,"i18n",{convertArrayToJSON:t=>{let l={};for(const c of t){if(!c)continue;const o=c.indexOf("=");if(o<=0)continue;const r=c.substring(0,o).split("."),n=c.substring(o+1);let s=l;for(let e=0;e<r.length;e++)e===r.length-1?s[r[e]]=n:(s[r[e]]||(s[r[e]]={}),s=s[r[e]])}return l},updateContent:()=>{H.querySelectorAll("nx-i18n,nx-span").forEach(t=>{t.refresh&&t.refresh()}),H.querySelectorAll("nine-grid").forEach(t=>{t.refresh&&t.refreshData()})},addResourceBundle:t=>{console.log("********************",t);let l=Math.floor(t.length/2);for(var c=0;c<t.length&&!(c+1>=t.length);c+=2){const n=t[c],s=t[c+1];var o=new XMLHttpRequest;if(o.open("GET",s,!1),o.send(),o.status===200){var r=o.responseText;i18next.addResourceBundle(n,"translation",H.i18n.convertArrayToJSON(r.split(`
|
|
817
817
|
`))),--l==0&&i18next.changeLanguage(H.global.locale)}}console.log("=========")}}),customElements.get("nx-i18n")||customElements.define("nx-i18n",Au);class mf extends HTMLElement{constructor(){super();Y(this,jn);Y(this,$n);Y(this,Rc,()=>{this.classList.remove("nx-collapse"),document.body.style.width=`calc(100% - ${f(this,$n)}px)`});Y(this,dl,()=>{this.classList.add("nx-collapse"),document.body.style.width=`calc(100% - ${f(this,jn)}px)`,this.shadowRoot.host.style.width="var(--min-width)",setTimeout(()=>{this.shadowRoot.host.style.width=""},300)});this.attachShadow({mode:"open"})}connectedCallback(){Number(this.getAttribute("round")||8),this.getAttribute("fill"),this.getAttribute("stroke"),Number(this.getAttribute("stroke-width")||0),tt(this,jn,Number(this.getAttribute("min-width")||75)),tt(this,$n,Number(this.getAttribute("max-width")||265));const t=this.getAttribute("head-button-color")||"#eee",l=document.createElement("template");l.innerHTML=`
|
|
818
818
|
<style>
|
|
819
819
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxSidebar.css";
|
|
@@ -1044,7 +1044,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1044
1044
|
</style>
|
|
1045
1045
|
|
|
1046
1046
|
${t}
|
|
1047
|
-
`,this.addEventListener("mouseover",l=>{f(this,ml).call(this,"hover")}),this.addEventListener("mouseout",l=>{f(this,gl).call(this,"hover")}),document.body.style.float="right",document.body.style.transition="width 0.5s ease-in-out",this.collapse()});this.attachShadow({mode:"open"})}connectedCallback(){H.waitForInnerHTML(this).then(()=>f(this,Mc).call(this)).catch(t=>console.error(t)),setTimeout(()=>{if(!H.querySelector("nx-side-menu-item.active",this.shadowRoot)){const t=window.location.href,c=new URL(t).pathname,o=H.querySelector(`nx-side-menu-item[href="${c}"]`,this.shadowRoot);o&&o.classList.add("active")}},300)}}Ln=new WeakMap,Pn=new WeakMap,pl=new WeakMap,ml=new WeakMap,gl=new WeakMap,Mc=new WeakMap;class vf extends HTMLElement{constructor(){super();Y(this,Nc);Y(this,
|
|
1047
|
+
`,this.addEventListener("mouseover",l=>{f(this,ml).call(this,"hover")}),this.addEventListener("mouseout",l=>{f(this,gl).call(this,"hover")}),document.body.style.float="right",document.body.style.transition="width 0.5s ease-in-out",this.collapse()});this.attachShadow({mode:"open"})}connectedCallback(){H.waitForInnerHTML(this).then(()=>f(this,Mc).call(this)).catch(t=>console.error(t)),setTimeout(()=>{if(!H.querySelector("nx-side-menu-item.active",this.shadowRoot)){const t=window.location.href,c=new URL(t).pathname,o=H.querySelector(`nx-side-menu-item[href="${c}"]`,this.shadowRoot);o&&o.classList.add("active")}},300)}}Ln=new WeakMap,Pn=new WeakMap,pl=new WeakMap,ml=new WeakMap,gl=new WeakMap,Mc=new WeakMap;class vf extends HTMLElement{constructor(){super();Y(this,Nc);Y(this,Si);Y(this,Ic,()=>{Ye(this,Nc,Du).call(this),tt(this,Si,this.shadowRoot.getRootNode().host.getRootNode().host),f(this,Si)&&(this.shadowRoot.querySelector(".icon:nth-of-type(1)").addEventListener("click",t=>{f(this,Si).expand()}),this.shadowRoot.querySelectorAll(".icon:nth-of-type(2),.icon:nth-of-type(3)").forEach(t=>{t.addEventListener("click",l=>{f(this,Si).collapse()})}))});this.attachShadow({mode:"open"})}connectedCallback(){H.waitForInnerHTML(this).then(()=>f(this,Ic).call(this)).catch(t=>console.error(t))}}Si=new WeakMap,Ic=new WeakMap,Nc=new WeakSet,Du=function(){const t=this.getAttribute("icon-color")||"#eee",l=this.innerHTML.trim();this.innerHTML="",this.shadowRoot.innerHTML=`
|
|
1048
1048
|
<style>
|
|
1049
1049
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxSideMenuHead.css";
|
|
1050
1050
|
${H.getCustomPath(this,"nxSideMenuHead.css")}
|
|
@@ -1128,9 +1128,9 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1128
1128
|
</div>
|
|
1129
1129
|
<div class="expand-icon"></div>
|
|
1130
1130
|
</li>
|
|
1131
|
-
`}}bl=new WeakMap,Bn=new WeakMap,yl=new WeakMap,Pc=new WeakMap,customElements.get("nx-side-menu")||customElements.define("nx-side-menu",yf),customElements.get("nx-side-menu-head")||customElements.define("nx-side-menu-head",vf),customElements.get("nx-side-menu-foot")||customElements.define("nx-side-menu-foot",wf),customElements.get("nx-side-menu-body")||customElements.define("nx-side-menu-body",xf),customElements.get("nx-side-menu-item")||customElements.define("nx-side-menu-item",_f);class Sf extends HTMLElement{constructor(){super();Y(this,vl);Y(this,Fn);Y(this,wl);Y(this,qn);Y(this,xs);Y(this,
|
|
1131
|
+
`}}bl=new WeakMap,Bn=new WeakMap,yl=new WeakMap,Pc=new WeakMap,customElements.get("nx-side-menu")||customElements.define("nx-side-menu",yf),customElements.get("nx-side-menu-head")||customElements.define("nx-side-menu-head",vf),customElements.get("nx-side-menu-foot")||customElements.define("nx-side-menu-foot",wf),customElements.get("nx-side-menu-body")||customElements.define("nx-side-menu-body",xf),customElements.get("nx-side-menu-item")||customElements.define("nx-side-menu-item",_f);class Sf extends HTMLElement{constructor(){super();Y(this,vl);Y(this,Fn);Y(this,wl);Y(this,qn);Y(this,xs);Y(this,ki,[]);it(this,"refresh",()=>{if(!(f(this,ki).length<0||H.isNull(f(this,qn)))){var t=f(this,ki).findIndex(l=>l[f(this,wl)]==H.global.locale);t<0&&(t=0),f(this,Fn).innerHTML=f(this,ki)[t][f(this,qn)],$("datalist",this).remove(),$(this).append(f(this,xs))}});Y(this,Dc,()=>{tt(this,xs,"<datalist>"),this.querySelectorAll("datalist option").forEach((c,o)=>{for(var r={},n=0;n<c.attributes.length;n++)r[c.attributes[n].name]=f(this,vl)?c.attributes[n].value:c.attributes[n].value.replaceAll("<","<").replaceAll(">",">"),o==0&&(["locale","lang","key","code"].includes(c.attributes[n].name)?tt(this,wl,c.attributes[n].name):tt(this,qn,c.attributes[n].name));tt(this,xs,f(this,xs)+"<option");for(const s in r)tt(this,xs,f(this,xs)+` ${s}="${r[s]}"`);tt(this,xs,f(this,xs)+"></option>"),f(this,ki).push(r)}),tt(this,xs,f(this,xs)+"</datalist>");const t=this.innerHTML;this.innerHTML=`
|
|
1132
1132
|
<span>${t}</span>
|
|
1133
|
-
`,tt(this,Fn,this.querySelector("span"));for(var l=0;l<this.attributes.length;l++)f(this,Fn).setAttribute(this.attributes[l].name,this.attributes[l].value);this.refresh()});tt(this,vl,this.getAttribute("enable-html")=="true"),$(()=>{f(this,Dc).call(this)})}connectedCallback(){H.getLocale()=="ko"?console.warn("nx-span 컴포넌트는 더 이상 사용되지 않을 예정입니다. nx-i18n 컴포넌트로 대체하세요."):console.warn("The nx-span component will be deprecated. Replace with nx-i18n component.")}}vl=new WeakMap,Fn=new WeakMap,wl=new WeakMap,qn=new WeakMap,xs=new WeakMap,
|
|
1133
|
+
`,tt(this,Fn,this.querySelector("span"));for(var l=0;l<this.attributes.length;l++)f(this,Fn).setAttribute(this.attributes[l].name,this.attributes[l].value);this.refresh()});tt(this,vl,this.getAttribute("enable-html")=="true"),$(()=>{f(this,Dc).call(this)})}connectedCallback(){H.getLocale()=="ko"?console.warn("nx-span 컴포넌트는 더 이상 사용되지 않을 예정입니다. nx-i18n 컴포넌트로 대체하세요."):console.warn("The nx-span component will be deprecated. Replace with nx-i18n component.")}}vl=new WeakMap,Fn=new WeakMap,wl=new WeakMap,qn=new WeakMap,xs=new WeakMap,ki=new WeakMap,Dc=new WeakMap,customElements.get("nx-span")||customElements.define("nx-span",Sf);class kf extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
1134
1134
|
<nx-test2></nx-test2>
|
|
1135
1135
|
`}}class Cf extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){this.shadowRoot.innerHTML=`
|
|
1136
1136
|
<div>222222</div>
|
|
@@ -1315,7 +1315,7 @@ Do you want to save it?`,"SAVE",{class:"rgb","true-text":"Yes","false-text":"No"
|
|
|
1315
1315
|
>${o.caption}</a>`:`<span class="breadcrumb-item ${n?"breadcrumb-current":""}">${o.caption}</span>`,e=r<f(this,Ir).length-1?'<span class="breadcrumb-separator"> > </span>':"";return`${s}${e}`}).join("")}
|
|
1316
1316
|
</div>
|
|
1317
1317
|
</div>
|
|
1318
|
-
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Vc))})});Y(this,Vc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,kl).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,kl))}setDynamicPath(t){tt(this,Sl,t),f(this,Cl).call(this),f(this,El).call(this)}}Ir=new WeakMap,Sl=new WeakMap,kl=new WeakMap,Cl=new WeakMap,El=new WeakMap,Vc=new WeakMap,customElements.get("nx-title")||customElements.define("nx-title",Of);class ou extends HTMLElement{constructor(){super();Y(this,Nr);it(this,"originContents");Y(this,Al,!1);Y(this,
|
|
1318
|
+
`,this.shadowRoot.appendChild(c.content.cloneNode(!0)),this.shadowRoot.querySelectorAll(".breadcrumb-link").forEach(o=>{o.addEventListener("click",f(this,Vc))})});Y(this,Vc,t=>{console.log(t);const l=t.target.dataset.path;l&&(window.location.href=l)});this.attachShadow({mode:"open"})}connectedCallback(){f(this,kl).call(this)}disconnectedCallback(){document.removeEventListener("DOMContentLoaded",f(this,kl))}setDynamicPath(t){tt(this,Sl,t),f(this,Cl).call(this),f(this,El).call(this)}}Ir=new WeakMap,Sl=new WeakMap,kl=new WeakMap,Cl=new WeakMap,El=new WeakMap,Vc=new WeakMap,customElements.get("nx-title")||customElements.define("nx-title",Of);class ou extends HTMLElement{constructor(){super();Y(this,Nr);it(this,"originContents");Y(this,Al,!1);Y(this,Ci);Y(this,Tl,!1);it(this,"getData",()=>{const t={};return Ye(this,Nr,Dl).call(this).forEach(l=>{const c=l.name;if(!c)return;let o;if(l.tagName==="INPUT"&&l.type==="checkbox"){let r=l.getAttribute("true-value")||"Y",n=l.getAttribute("false-value")||"N";o=l.checked?r:n}else l.tagName==="INPUT"&&l.type,o=l.value;t[c]?(Array.isArray(t[c])||(t[c]=[t[c]]),t[c].push(o)):t[c]=o}),t});it(this,"clearData",(t={})=>{Ye(this,Nr,xu).call(this),Ye(this,Nr,Dl).call(this).forEach(l=>{const c=l.name;if(!c)return;const o=t&&t[c]!==void 0?t[c]:"";Ye(this,Nr,wu).call(this,l,o)}),this.changed=!1});it(this,"setData",t=>{if(!t||typeof t!="object")return;Ye(this,Nr,xu).call(this);let l=!1;Ye(this,Nr,Dl).call(this).forEach(c=>{const o=c.name;!o||!t.hasOwnProperty(o)||Ye(this,Nr,wu).call(this,c,t[o])&&(l=!0)}),l&&(this.changed=!0)});it(this,"initData",t=>{this.clearData(t),this.changed=!1});Y(this,Rl,t=>{this.changed=!0});Y(this,Wc,()=>{for(const t of this.attributes)t.name.startsWith("css-")&&this.style.setProperty(t.name.substring(4),t.value);this.originContents=this.innerHTML.trim(),this.innerHTML="",this.shadowRoot&&this.tagName.toLowerCase()==="nx-div"&&(this.shadowRoot.innerHTML=this.originContents)})}connectedCallback(){return f(this,Al)?!1:(this.getAttribute("use-shadow")!=="false"&&!this.shadowRoot?(this.attachShadow({mode:"open"}),tt(this,Ci,this.shadowRoot)):tt(this,Ci,this),f(this,Wc).call(this),tt(this,Al,!0),!0)}get changed(){return f(this,Tl)}set changed(t){const l=!!t;tt(this,Tl,l);const c=this.closest(".detail-wrapper");if(c){const o=c.querySelector("nx-title2");o&&(o.changed=l)}}get root(){return f(this,Ci)||this}}Al=new WeakMap,Ci=new WeakMap,Tl=new WeakMap,Nr=new WeakSet,Dl=function(){return H.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]",f(this,Ci))},wu=function(t,l){const c=t.tagName.toUpperCase(),o=t.type;let r=!1;if(["INPUT","TEXTAREA","SELECT","NX-EDITOR"].includes(c))if(o==="checkbox"){const n=t.getAttribute("true-value")||"Y",s=String(n)===String(l);t.checked!==s&&(r=!0),t.checked=s}else if(o==="radio"){const n=String(t.value)===String(l);t.checked!==n&&(r=!0),t.checked=n}else t.value!==l&&(r=!0),t.value=l;else t.textContent!==l&&(r=!0),t.textContent=l;return r},xu=function(){Ye(this,Nr,Dl).call(this).forEach(t=>{t.removeEventListener("input",f(this,Rl)),t.addEventListener("input",f(this,Rl))})},Rl=new WeakMap,Wc=new WeakMap;class jf extends ou{constructor(){super();Y(this,Ml,!1);Y(this,Xc,()=>{const t=this.getAttribute("caption")||"",l=document.createElement("template");l.innerHTML=`
|
|
1319
1319
|
<style>
|
|
1320
1320
|
@import "https://cdn.jsdelivr.net/npm/ninegrid2@${H.version}/dist/css/nxTitle2.css";
|
|
1321
1321
|
${H.getCustomPath(this,"nxTitle2.css")}
|