@yzsf2e/render-core 1.0.2-alpha.25 → 1.0.2-alpha.251
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/render-core.mjs +34762 -4938
- package/dist/render-core.umd.js +67 -3
- package/dist/style.css +9 -1
- package/package.json +14 -2
package/dist/render-core.umd.js
CHANGED
|
@@ -1,4 +1,68 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* @yzsf2e/render-core
|
|
1
|
+
(function(Gt,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("vue"),require("ant-design-vue"),require("@ant-design/icons-vue"),require("vue-i18n"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","@ant-design/icons-vue","vue-i18n","vue-router"],T):(Gt=typeof globalThis<"u"?globalThis:Gt||self,T(Gt["render-core"]={},Gt.Vue,Gt.AntDesignVue,Gt.AntDesignIconsVue,Gt.vueI18n,Gt.VueRouter))})(this,function(Gt,T,Ft,Le,As,Vl){"use strict";/*!
|
|
2
|
+
* @yzsf2e/render-core v1.0.2-alpha.251 Thu Mar 19 2026 10:38:46 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2023 @yzsf2e.
|
|
4
|
-
*/function bo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Co=bo(ie),So=Object.assign;function To(e){return[`yzs-${e}`]}const mt=e=>{const t=e;return t.install=function(n){n.component(t.name,t)},e},[$o]=To("date-picker"),Eo={allowClear:!0,autofocus:!1,bordered:!0,format:"YYYY-MM-DD",nextIcon:"icon-right",open:!1,placement:"bottomLeft",popupStyle:{},prevIcon:"icon-left",size:"small",suffixIcon:"icon-calendar",superNextIcon:"icon-double-right",superPrevIcon:"icon-double-left",valueFormat:"YYYY-MM-DD",renderExtraFooter:()=>null,showNow:!0,showTime:!1,showToday:!0},Sn={dateRender:Function,disabled:Boolean,disabledDate:Function,dropdownClassName:String,getPopupContainer:Function,inputReadOnly:Boolean,locale:Object,mode:String,picker:String,placeholder:String,presets:Array,status:String,defaultPickerValue:Object,disabledTime:Function,format:String,value:Object},Oo=r.defineComponent({name:$o,props:Sn,emits:["change","ok","update:value","openChange","panelChange"],setup(e,{emit:t,expose:n}){const o=r.ref(null),a=r.computed(()=>So(e,Eo)),i=d=>{t("ok",d)},l=d=>{t("change",d),t("update:value",d)},s=d=>{t("openChange",d)},c=(d,y)=>{t("openChange",d,y)};n({blur:()=>{var d;(d=o.value)==null||d.blur()},focus:()=>{var d;(d=o.value)==null||d.focus()}});const f={...a.value,ok:i,onChange:l,onOpenChange:s,panelChange:c};return()=>React.createElement(D.DatePicker,{ref:o,...f})}}),Tn=mt(Oo),_o=r.defineComponent({name:"AIcon",components:Co,props:{type:{required:!0,type:String}}}),ye=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};function Ao(e,t,n,o,a,i){return r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.type))}const zt=ye(_o,[["render",Ao]]);function $n(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Ut(e){let t=!1,n;const o=r.effectScope(!0);return(...a)=>(t||(n=o.run(()=>e(...a)),t=!0),n)}function Gt(e){return typeof e=="function"?e():r.unref(e)}const Po=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vo=e=>typeof e<"u",No=Object.prototype.toString,ko=e=>No.call(e)==="[object Object]",Bo=()=>{};function Ro(e,t){function n(...o){return new Promise((a,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(a).catch(i)})}return n}const En=e=>e();function Io(e=En){const t=r.ref(!0);function n(){t.value=!1}function o(){t.value=!0}const a=(...i)=>{t.value&&e(...i)};return{isActive:r.readonly(t),pause:n,resume:o,eventFilter:a}}function Mo(e){return e||r.getCurrentInstance()}function Do(e,t,n={}){const{eventFilter:o=En,...a}=n;return r.watch(e,Ro(o,t),a)}function Fo(e,t,n={}){const{eventFilter:o,...a}=n,{eventFilter:i,pause:l,resume:s,isActive:c}=Io(o);return{stop:Do(e,t,{...a,eventFilter:i}),pause:l,resume:s,isActive:c}}function Lo(e,t=!0,n){const o=Mo(n);o?r.onMounted(e,o):t?e():r.nextTick(e)}function Vt(e){var t;const n=Gt(e);return(t=n==null?void 0:n.$el)!=null?t:n}const gt=Po?window:void 0;function On(...e){let t,n,o,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,a]=e,t=gt):[t,n,o,a]=e,!t)return Bo;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(g=>g()),i.length=0},s=(g,f,d,y)=>(g.addEventListener(f,d,y),()=>g.removeEventListener(f,d,y)),c=r.watch(()=>[Vt(t),Gt(a)],([g,f])=>{if(l(),!g)return;const d=ko(f)?{...f}:f;i.push(...n.flatMap(y=>o.map(T=>s(g,y,T,d))))},{immediate:!0,flush:"post"}),u=()=>{c(),l()};return $n(u),u}function xo(){const e=r.ref(!1);return r.getCurrentInstance()&&r.onMounted(()=>{e.value=!0}),e}function jo(e){const t=xo();return r.computed(()=>(t.value,!!e()))}function Ko(e){return JSON.parse(JSON.stringify(e))}const ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yt="__vueuse_ssr_handlers__",zo=Uo();function Uo(){return yt in ht||(ht[yt]=ht[yt]||{}),ht[yt]}function Go(e,t){return zo[e]||t}function Vo(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Yo={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},_n="vueuse-storage";function Ho(e,t,n,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:g,window:f=gt,eventFilter:d,onError:y=O=>{console.error(O)},initOnMounted:T}=o,m=(g?r.shallowRef:r.ref)(typeof t=="function"?t():t);if(!n)try{n=Go("getDefaultStorage",()=>{var O;return(O=gt)==null?void 0:O.localStorage})()}catch(O){y(O)}if(!n)return m;const h=Gt(t),w=Vo(h),C=(a=o.serializer)!=null?a:Yo[w],{pause:p,resume:S}=Fo(m,()=>$(m.value),{flush:i,deep:l,eventFilter:d});return f&&s&&Lo(()=>{On(f,"storage",_),On(f,_n,A),T&&_()}),T||_(),m;function $(O){try{if(O==null)n.removeItem(e);else{const E=C.write(O),v=n.getItem(e);v!==E&&(n.setItem(e,E),f&&f.dispatchEvent(new CustomEvent(_n,{detail:{key:e,oldValue:v,newValue:E,storageArea:n}})))}}catch(E){y(E)}}function b(O){const E=O?O.newValue:n.getItem(e);if(E==null)return c&&h!=null&&n.setItem(e,C.write(h)),h;if(!O&&u){const v=C.read(E);return typeof u=="function"?u(v,h):w==="object"&&!Array.isArray(v)?{...h,...v}:v}else return typeof E!="string"?E:C.read(E)}function A(O){_(O.detail)}function _(O){if(!(O&&O.storageArea!==n)){if(O&&O.key==null){m.value=h;return}if(!(O&&O.key!==e)){p();try{(O==null?void 0:O.newValue)!==C.write(m.value)&&(m.value=b(O))}catch(E){y(E)}finally{O?r.nextTick(S):S()}}}}}function Wo(e,t,n={}){const{window:o=gt,...a}=n;let i;const l=jo(()=>o&&"ResizeObserver"in o),s=()=>{i&&(i.disconnect(),i=void 0)},c=r.computed(()=>Array.isArray(e)?e.map(f=>Vt(f)):[Vt(e)]),u=r.watch(c,f=>{if(s(),l.value&&o){i=new ResizeObserver(t);for(const d of f)d&&i.observe(d,a)}},{immediate:!0,flush:"post",deep:!0}),g=()=>{s(),u()};return $n(g),{isSupported:l,stop:g}}function An(e,t,n,o={}){var a,i,l;const{clone:s=!1,passive:c=!1,eventName:u,deep:g=!1,defaultValue:f,shouldEmit:d}=o,y=r.getCurrentInstance(),T=n||(y==null?void 0:y.emit)||((a=y==null?void 0:y.$emit)==null?void 0:a.bind(y))||((l=(i=y==null?void 0:y.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(y==null?void 0:y.proxy));let m=u;t||(t="modelValue"),m=m||`update:${t.toString()}`;const h=p=>s?typeof s=="function"?s(p):Ko(p):p,w=()=>vo(e[t])?h(e[t]):f,C=p=>{d?d(p)&&T(m,p):T(m,p)};if(c){const p=w(),S=r.ref(p);let $=!1;return r.watch(()=>e[t],b=>{$||($=!0,S.value=h(b),r.nextTick(()=>$=!1))}),r.watch(S,b=>{!$&&(b!==e[t]||g)&&C(b)},{deep:g}),S}else return r.computed({get(){return w()},set(p){C(p)}})}const qo=r.defineComponent({name:"DragDrawer",components:{CloseOutlined:ie.CloseOutlined,ShrinkOutlined:ie.ShrinkOutlined,ArrowsAltOutlined:ie.ArrowsAltOutlined},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:Number,default:500},getContainer:{type:Function,default:()=>document.querySelector(".page-renderer-wrapper")}},setup(e,{emit:t}){const n=r.ref(null),o=An(e,"visible",t),a=r.ref(e.width),i=r.ref(!1),l=()=>o.value=!1,s=()=>e.getContainer(),c=s(),u=500,g=()=>{a.value=i.value?e.width:"100%",i.value=!i.value};return r.watch(o,d=>{d||(i.value=!1,a.value=e.width)}),{show:o,fullScreen:i,dragDrawer:n,actualWidth:a,getContainerFn:s,handleClose:l,toggleFullScreen:g,handleMouseDown:d=>{let y=!1;y=!0;const T=d.clientX,m=a.value,h=(c==null?void 0:c.clientWidth)||document.body.clientWidth;document.body.classList.add("disable-select-in-dragging"),window.onmousemove=function(w){if(y==!1)return;const p=w.clientX-T,S=typeof m=="number"?m-p:window.innerWidth-w.x;a.value=Math.min(S<u?u:S,h)},window.onmouseup=()=>{window.onmousemove=null,document.body.classList.remove("disable-select-in-dragging")}}}}}),tp="",Xo={style:{position:"absolute",bottom:"0",left:"0",height:"50px","line-height":"49px",width:"100%","border-top":"1px solid #eee","box-sizing":"content-box","background-color":"#fff","z-index":"2"}};function Qo(e,t,n,o,a,i){const l=r.resolveComponent("ArrowsAltOutlined"),s=r.resolveComponent("ShrinkOutlined"),c=r.resolveComponent("CloseOutlined"),u=r.resolveComponent("a-space"),g=r.resolveComponent("a-button"),f=r.resolveComponent("a-drawer");return r.openBlock(),r.createBlock(f,{ref:"dragDrawer",class:"drag-drawer-warpper",placement:"right",title:e.title,mask:!1,width:e.actualWidth,"get-container":e.getContainerFn,closable:!1,"destroy-on-close":!0,push:!0,visible:e.show,"onUpdate:visible":t[1]||(t[1]=d=>e.show=d)},{extra:r.withCtx(()=>[r.createVNode(u,{style:{transform:"translateY(2px)"}},{default:r.withCtx(()=>[e.fullScreen?(r.openBlock(),r.createBlock(s,{key:1,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])):(r.openBlock(),r.createBlock(l,{key:0,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])),r.createVNode(c,{style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.handleClose},null,8,["onClick"])]),_:1})]),default:r.withCtx(()=>[r.renderSlot(e.$slots,"default"),r.createElementVNode("div",{class:"drag-trigger",onMousedown:t[0]||(t[0]=d=>e.handleMouseDown(d))},null,32),r.createElementVNode("div",Xo,[r.createVNode(u,{style:{"padding-left":"20px"}},{default:r.withCtx(()=>[r.renderSlot(e.$slots,"footBtn"),r.createVNode(g,{onClick:e.handleClose},{default:r.withCtx(()=>[r.createTextVNode("关闭")]),_:1},8,["onClick"])]),_:3})])]),_:3},8,["title","width","get-container","visible"])}const Pn=mt(ye(qo,[["render",Qo]])),Jo=r.defineComponent({name:"PageRendererFormModal",components:{Modal:D.Modal,Button:D.Button,Space:D.Space},props:{form:{type:Object,required:!0},rows:{type:Array,default:()=>[]},extraData:{type:Object}},emits:["refresh"],setup(e,{expose:t,emit:n}){const{form:o}=r.toRefs(e),a=r.ref(!1),i=r.ref(!1),l=r.ref(null),s=r.reactive({showOk:!0}),c=()=>document.querySelector(".page-renderer-wrapper"),u=async()=>{var y,T;i.value=!0;const d=((y=l.value)==null?void 0:y.finish)||(()=>Promise.resolve({success:!0}));(T=l.value)!=null&&T.finish||console.warn("form组件没有提供finish方法"),d().then(m=>{const{needFeedback:h=!0,needRefresh:w=!0,successMsg:C="操作成功"}=o.value;i.value=!1,m&&m.success&&(h&&D.message.success(C),f(),w&&n("refresh"))}).catch(m=>{var w;if(i.value=!1,console.log("[PageRendererFormModal handleOk Error]: ",m),typeof m=="string")return D.message.warn(m);const{errorFields:h}=m;h&&h.length&&D.message.warn((w=h[0])==null?void 0:w.errors.join("、"))})};r.watch(a,d=>{d&&r.nextTick(()=>{const y=document.querySelector(".ant-modal-root"),T=y==null?void 0:y.querySelector(".ant-modal-header"),m=y==null?void 0:y.querySelector(".ant-modal");T.style.cursor="move";const h=m.currentStyle||window.getComputedStyle(m,null);T.onmousedown=w=>{const C=w.clientX-T.offsetLeft,p=w.clientY-T.offsetTop;let S,$;h.left.includes("%")?(S=+document.body.clientWidth*(+h.left.replace(/%/g,"")/100),$=+document.body.clientHeight*(+h.top.replace(/%/g,"")/100)):(S=+h.left.replace(/\px/g,""),$=+h.top.replace(/\px/g,"")),document.onmousemove=function(b){const A=b.clientX-C,_=b.clientY-p;m.style.left=`${A+S}px`,m.style.top=`${_+$}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})});const g=()=>a.value=!0,f=()=>{var d,y;(y=(d=l.value)==null?void 0:d.reset)==null||y.call(d),a.value=!1};return t({openModal:g}),{handleOk:u,closeModal:f,getContainer:c,visible:a,modalConfig:s,currentForm:l,confirmLoading:i}}}),rp="",Zo={key:1};function ea(e,t,n,o,a,i){const l=r.resolveComponent("Button"),s=r.resolveComponent("Space"),c=r.resolveComponent("Modal");return r.openBlock(),r.createBlock(c,r.mergeProps({"wrap-class-name":"drag-modal-wrapper",visible:e.visible,"onUpdate:visible":t[1]||(t[1]=u=>e.visible=u)},e.form.modalProps,{"destroy-on-close":!0,"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},onCancel:e.closeModal}),{title:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(e.form.title),1)]),footer:r.withCtx(()=>{var u;return[((u=e.form.modalProps)==null?void 0:u.hideFooter)!==!0?(r.openBlock(),r.createBlock(s,{key:0},{default:r.withCtx(()=>{var g;return[r.createVNode(l,{onClick:e.closeModal},{default:r.withCtx(()=>{var f;return[r.createTextVNode(r.toDisplayString(((f=e.form.modalProps)==null?void 0:f.cancelText)||"取消"),1)]}),_:1},8,["onClick"]),((g=e.form.modalProps)==null?void 0:g.hideOkButton)!==!0&&e.modalConfig.showOk?(r.openBlock(),r.createBlock(l,{key:0,type:"primary",onClick:e.handleOk,loading:e.confirmLoading},{default:r.withCtx(()=>{var f;return[r.createTextVNode(r.toDisplayString(((f=e.form.modalProps)==null?void 0:f.okText)||"确定"),1)]}),_:1},8,["onClick","loading"])):r.createCommentVNode("",!0)]}),_:1})):r.createCommentVNode("",!0)]}),default:r.withCtx(()=>[e.form.component?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.form.component),{key:0,rows:e.rows,"extra-data":e.extraData,modalConfig:e.modalConfig,"onUpdate:modalConfig":t[0]||(t[0]=u=>e.modalConfig=u),ref:"currentForm"},null,40,["rows","extra-data","modalConfig"])):(r.openBlock(),r.createElementBlock("span",Zo,"form配置中没有为【"+r.toDisplayString(e.form.title)+"】事件提供组件",1))]),_:1},16,["visible","get-container","mask-style","onCancel"])}const vn=ye(Jo,[["render",ea]]),Nn=mt(vn);var ta=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kn={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(ta,function(){var n=1e3,o=6e4,a=36e5,i="millisecond",l="second",s="minute",c="hour",u="day",g="week",f="month",d="quarter",y="year",T="date",m="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var P=["th","st","nd","rd"],N=B%100;return"["+B+(P[(N-20)%10]||P[N]||P[0])+"]"}},p=function(B,P,N){var I=String(B);return!I||I.length>=P?B:""+Array(P+1-I.length).join(N)+B},S={s:p,z:function(B){var P=-B.utcOffset(),N=Math.abs(P),I=Math.floor(N/60),k=N%60;return(P<=0?"+":"-")+p(I,2,"0")+":"+p(k,2,"0")},m:function B(P,N){if(P.date()<N.date())return-B(N,P);var I=12*(N.year()-P.year())+(N.month()-P.month()),k=P.clone().add(I,f),j=N-k<0,K=P.clone().add(I+(j?-1:1),f);return+(-(I+(N-k)/(j?k-K:K-k))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y,w:g,d:u,D:T,h:c,m:s,s:l,ms:i,Q:d}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},$="en",b={};b[$]=C;var A="$isDayjsObject",_=function(B){return B instanceof z||!(!B||!B[A])},O=function B(P,N,I){var k;if(!P)return $;if(typeof P=="string"){var j=P.toLowerCase();b[j]&&(k=j),N&&(b[j]=N,k=j);var K=P.split("-");if(!k&&K.length>1)return B(K[0])}else{var Y=P.name;b[Y]=P,k=Y}return!I&&k&&($=k),k||!I&&$},E=function(B,P){if(_(B))return B.clone();var N=typeof P=="object"?P:{};return N.date=B,N.args=arguments,new z(N)},v=S;v.l=O,v.i=_,v.w=function(B,P){return E(B,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var z=function(){function B(N){this.$L=O(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[A]=!0}var P=B.prototype;return P.parse=function(N){this.$d=function(I){var k=I.date,j=I.utc;if(k===null)return new Date(NaN);if(v.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var K=k.match(h);if(K){var Y=K[2]-1||0,ee=(K[7]||"0").substring(0,3);return j?new Date(Date.UTC(K[1],Y,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)):new Date(K[1],Y,K[3]||1,K[4]||0,K[5]||0,K[6]||0,ee)}}return new Date(k)}(N),this.init()},P.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},P.$utils=function(){return v},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(N,I){var k=E(N);return this.startOf(I)<=k&&k<=this.endOf(I)},P.isAfter=function(N,I){return E(N)<this.startOf(I)},P.isBefore=function(N,I){return this.endOf(I)<E(N)},P.$g=function(N,I,k){return v.u(N)?this[I]:this.set(k,N)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(N,I){var k=this,j=!!v.u(I)||I,K=v.p(N),Y=function(de,re){var oe=v.w(k.$u?Date.UTC(k.$y,re,de):new Date(k.$y,re,de),k);return j?oe:oe.endOf(u)},ee=function(de,re){return v.w(k.toDate()[de].apply(k.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(re)),k)},te=this.$W,J=this.$M,ne=this.$D,se="set"+(this.$u?"UTC":"");switch(K){case y:return j?Y(1,0):Y(31,11);case f:return j?Y(1,J):Y(0,J+1);case g:var le=this.$locale().weekStart||0,ce=(te<le?te+7:te)-le;return Y(j?ne-ce:ne+(6-ce),J);case u:case T:return ee(se+"Hours",0);case c:return ee(se+"Minutes",1);case s:return ee(se+"Seconds",2);case l:return ee(se+"Milliseconds",3);default:return this.clone()}},P.endOf=function(N){return this.startOf(N,!1)},P.$set=function(N,I){var k,j=v.p(N),K="set"+(this.$u?"UTC":""),Y=(k={},k[u]=K+"Date",k[T]=K+"Date",k[f]=K+"Month",k[y]=K+"FullYear",k[c]=K+"Hours",k[s]=K+"Minutes",k[l]=K+"Seconds",k[i]=K+"Milliseconds",k)[j],ee=j===u?this.$D+(I-this.$W):I;if(j===f||j===y){var te=this.clone().set(T,1);te.$d[Y](ee),te.init(),this.$d=te.set(T,Math.min(this.$D,te.daysInMonth())).$d}else Y&&this.$d[Y](ee);return this.init(),this},P.set=function(N,I){return this.clone().$set(N,I)},P.get=function(N){return this[v.p(N)]()},P.add=function(N,I){var k,j=this;N=Number(N);var K=v.p(I),Y=function(J){var ne=E(j);return v.w(ne.date(ne.date()+Math.round(J*N)),j)};if(K===f)return this.set(f,this.$M+N);if(K===y)return this.set(y,this.$y+N);if(K===u)return Y(1);if(K===g)return Y(7);var ee=(k={},k[s]=o,k[c]=a,k[l]=n,k)[K]||1,te=this.$d.getTime()+N*ee;return v.w(te,this)},P.subtract=function(N,I){return this.add(-1*N,I)},P.format=function(N){var I=this,k=this.$locale();if(!this.isValid())return k.invalidDate||m;var j=N||"YYYY-MM-DDTHH:mm:ssZ",K=v.z(this),Y=this.$H,ee=this.$m,te=this.$M,J=k.weekdays,ne=k.months,se=k.meridiem,le=function(re,oe,Te,ve){return re&&(re[oe]||re(I,j))||Te[oe].slice(0,ve)},ce=function(re){return v.s(Y%12||12,re,"0")},de=se||function(re,oe,Te){var ve=re<12?"AM":"PM";return Te?ve.toLowerCase():ve};return j.replace(w,function(re,oe){return oe||function(Te){switch(Te){case"YY":return String(I.$y).slice(-2);case"YYYY":return v.s(I.$y,4,"0");case"M":return te+1;case"MM":return v.s(te+1,2,"0");case"MMM":return le(k.monthsShort,te,ne,3);case"MMMM":return le(ne,te);case"D":return I.$D;case"DD":return v.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return le(k.weekdaysMin,I.$W,J,2);case"ddd":return le(k.weekdaysShort,I.$W,J,3);case"dddd":return J[I.$W];case"H":return String(Y);case"HH":return v.s(Y,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return de(Y,ee,!0);case"A":return de(Y,ee,!1);case"m":return String(ee);case"mm":return v.s(ee,2,"0");case"s":return String(I.$s);case"ss":return v.s(I.$s,2,"0");case"SSS":return v.s(I.$ms,3,"0");case"Z":return K}return null}(re)||K.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(N,I,k){var j,K=this,Y=v.p(I),ee=E(N),te=(ee.utcOffset()-this.utcOffset())*o,J=this-ee,ne=function(){return v.m(K,ee)};switch(Y){case y:j=ne()/12;break;case f:j=ne();break;case d:j=ne()/3;break;case g:j=(J-te)/6048e5;break;case u:j=(J-te)/864e5;break;case c:j=J/a;break;case s:j=J/o;break;case l:j=J/n;break;default:j=J}return k?j:v.a(j)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return b[this.$L]},P.locale=function(N,I){if(!N)return this.$L;var k=this.clone(),j=O(N,I,!0);return j&&(k.$L=j),k},P.clone=function(){return v.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},B}(),G=z.prototype;return E.prototype=G,[["$ms",i],["$s",l],["$m",s],["$H",c],["$W",u],["$M",f],["$y",y],["$D",T]].forEach(function(B){G[B[1]]=function(P){return this.$g(P,B[0],B[1])}}),E.extend=function(B,P){return B.$i||(B(P,z,E),B.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(B){return E(1e3*B)},E.en=b[$],E.Ls=b,E.p={},E})})(kn);var ra=kn.exports;const Bn=na(ra);var oa=typeof global=="object"&&global&&global.Object===Object&&global;const Rn=oa;var aa=typeof self=="object"&&self&&self.Object===Object&&self,ia=Rn||aa||Function("return this")();const ge=ia;var sa=ge.Symbol;const we=sa;var In=Object.prototype,la=In.hasOwnProperty,ca=In.toString,Xe=we?we.toStringTag:void 0;function ua(e){var t=la.call(e,Xe),n=e[Xe];try{e[Xe]=void 0;var o=!0}catch{}var a=ca.call(e);return o&&(t?e[Xe]=n:delete e[Xe]),a}var fa=Object.prototype,da=fa.toString;function pa(e){return da.call(e)}var ma="[object Null]",ga="[object Undefined]",Mn=we?we.toStringTag:void 0;function ke(e){return e==null?e===void 0?ga:ma:Mn&&Mn in Object(e)?ua(e):pa(e)}function $e(e){return e!=null&&typeof e=="object"}var ha="[object Symbol]";function je(e){return typeof e=="symbol"||$e(e)&&ke(e)==ha}function Ke(e,t){for(var n=-1,o=e==null?0:e.length,a=Array(o);++n<o;)a[n]=t(e[n],n,e);return a}var ya=Array.isArray;const ae=ya;var wa=1/0,Dn=we?we.prototype:void 0,Fn=Dn?Dn.toString:void 0;function Ln(e){if(typeof e=="string")return e;if(ae(e))return Ke(e,Ln)+"";if(je(e))return Fn?Fn.call(e):"";var t=e+"";return t=="0"&&1/e==-wa?"-0":t}var ba=/\s/;function Ca(e){for(var t=e.length;t--&&ba.test(e.charAt(t)););return t}var Sa=/^\s+/;function Ta(e){return e&&e.slice(0,Ca(e)+1).replace(Sa,"")}function me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xn=0/0,$a=/^[-+]0x[0-9a-f]+$/i,Ea=/^0b[01]+$/i,Oa=/^0o[0-7]+$/i,_a=parseInt;function Yt(e){if(typeof e=="number")return e;if(je(e))return xn;if(me(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=me(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ta(e);var n=Ea.test(e);return n||Oa.test(e)?_a(e.slice(2),n?2:8):$a.test(e)?xn:+e}var jn=1/0,Aa=17976931348623157e292;function Pa(e){if(!e)return e===0?e:0;if(e=Yt(e),e===jn||e===-jn){var t=e<0?-1:1;return t*Aa}return e===e?e:0}function va(e){var t=Pa(e),n=t%1;return t===t?n?t-n:t:0}function Kn(e){return e}var Na="[object AsyncFunction]",ka="[object Function]",Ba="[object GeneratorFunction]",Ra="[object Proxy]";function zn(e){if(!me(e))return!1;var t=ke(e);return t==ka||t==Ba||t==Na||t==Ra}var Ia=ge["__core-js_shared__"];const Ht=Ia;var Un=function(){var e=/[^.]+$/.exec(Ht&&Ht.keys&&Ht.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ma(e){return!!Un&&Un in e}var Da=Function.prototype,Fa=Da.toString;function Be(e){if(e!=null){try{return Fa.call(e)}catch{}try{return e+""}catch{}}return""}var La=/[\\^$.*+?()[\]{}|]/g,xa=/^\[object .+?Constructor\]$/,ja=Function.prototype,Ka=Object.prototype,za=ja.toString,Ua=Ka.hasOwnProperty,Ga=RegExp("^"+za.call(Ua).replace(La,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Va(e){if(!me(e)||Ma(e))return!1;var t=zn(e)?Ga:xa;return t.test(Be(e))}function Ya(e,t){return e==null?void 0:e[t]}function Re(e,t){var n=Ya(e,t);return Va(n)?n:void 0}var Ha=Re(ge,"WeakMap");const Wt=Ha;var Gn=Object.create,Wa=function(){function e(){}return function(t){if(!me(t))return{};if(Gn)return Gn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const qa=Wa;function Xa(){}function Qa(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}var Ja=function(){try{var e=Re(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Vn=Ja;function Za(e,t){for(var n=-1,o=e==null?0:e.length;++n<o&&t(e[n],n,e)!==!1;);return e}function ei(e,t,n,o){for(var a=e.length,i=n+(o?1:-1);o?i--:++i<a;)if(t(e[i],i,e))return i;return-1}function ti(e){return e!==e}function ni(e,t,n){for(var o=n-1,a=e.length;++o<a;)if(e[o]===t)return o;return-1}function Yn(e,t,n){return t===t?ni(e,t,n):ei(e,ti,n)}function ri(e,t){var n=e==null?0:e.length;return!!n&&Yn(e,t,0)>-1}var oi=9007199254740991,ai=/^(?:0|[1-9]\d*)$/;function wt(e,t){var n=typeof e;return t=t??oi,!!t&&(n=="number"||n!="symbol"&&ai.test(e))&&e>-1&&e%1==0&&e<t}function qt(e,t,n){t=="__proto__"&&Vn?Vn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function bt(e,t){return e===t||e!==e&&t!==t}var ii=Object.prototype,si=ii.hasOwnProperty;function Xt(e,t,n){var o=e[t];(!(si.call(e,t)&&bt(o,n))||n===void 0&&!(t in e))&&qt(e,t,n)}function Ct(e,t,n,o){var a=!n;n||(n={});for(var i=-1,l=t.length;++i<l;){var s=t[i],c=o?o(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),a?qt(n,s,c):Xt(n,s,c)}return n}var li=9007199254740991;function Qt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=li}function ze(e){return e!=null&&Qt(e.length)&&!zn(e)}function ci(e,t,n){if(!me(n))return!1;var o=typeof t;return(o=="number"?ze(n)&&wt(t,n.length):o=="string"&&t in n)?bt(n[t],e):!1}var ui=Object.prototype;function Jt(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ui;return e===n}function fi(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}var di="[object Arguments]";function Hn(e){return $e(e)&&ke(e)==di}var Wn=Object.prototype,pi=Wn.hasOwnProperty,mi=Wn.propertyIsEnumerable,gi=Hn(function(){return arguments}())?Hn:function(e){return $e(e)&&pi.call(e,"callee")&&!mi.call(e,"callee")};const qn=gi;function hi(){return!1}var Xn=typeof V=="object"&&V&&!V.nodeType&&V,Qn=Xn&&typeof module=="object"&&module&&!module.nodeType&&module,yi=Qn&&Qn.exports===Xn,Jn=yi?ge.Buffer:void 0,wi=Jn?Jn.isBuffer:void 0,bi=wi||hi;const St=bi;var Ci="[object Arguments]",Si="[object Array]",Ti="[object Boolean]",$i="[object Date]",Ei="[object Error]",Oi="[object Function]",_i="[object Map]",Ai="[object Number]",Pi="[object Object]",vi="[object RegExp]",Ni="[object Set]",ki="[object String]",Bi="[object WeakMap]",Ri="[object ArrayBuffer]",Ii="[object DataView]",Mi="[object Float32Array]",Di="[object Float64Array]",Fi="[object Int8Array]",Li="[object Int16Array]",xi="[object Int32Array]",ji="[object Uint8Array]",Ki="[object Uint8ClampedArray]",zi="[object Uint16Array]",Ui="[object Uint32Array]",Z={};Z[Mi]=Z[Di]=Z[Fi]=Z[Li]=Z[xi]=Z[ji]=Z[Ki]=Z[zi]=Z[Ui]=!0,Z[Ci]=Z[Si]=Z[Ri]=Z[Ti]=Z[Ii]=Z[$i]=Z[Ei]=Z[Oi]=Z[_i]=Z[Ai]=Z[Pi]=Z[vi]=Z[Ni]=Z[ki]=Z[Bi]=!1;function Gi(e){return $e(e)&&Qt(e.length)&&!!Z[ke(e)]}function Tt(e){return function(t){return e(t)}}var Zn=typeof V=="object"&&V&&!V.nodeType&&V,Qe=Zn&&typeof module=="object"&&module&&!module.nodeType&&module,Vi=Qe&&Qe.exports===Zn,Zt=Vi&&Rn.process,Yi=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||Zt&&Zt.binding&&Zt.binding("util")}catch{}}();const Ue=Yi;var er=Ue&&Ue.isTypedArray,Hi=er?Tt(er):Gi;const tr=Hi;var Wi=Object.prototype,qi=Wi.hasOwnProperty;function nr(e,t){var n=ae(e),o=!n&&qn(e),a=!n&&!o&&St(e),i=!n&&!o&&!a&&tr(e),l=n||o||a||i,s=l?fi(e.length,String):[],c=s.length;for(var u in e)(t||qi.call(e,u))&&!(l&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||wt(u,c)))&&s.push(u);return s}function rr(e,t){return function(n){return e(t(n))}}var Xi=rr(Object.keys,Object);const Qi=Xi;var Ji=Object.prototype,Zi=Ji.hasOwnProperty;function es(e){if(!Jt(e))return Qi(e);var t=[];for(var n in Object(e))Zi.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ge(e){return ze(e)?nr(e):es(e)}function ts(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ns=Object.prototype,rs=ns.hasOwnProperty;function os(e){if(!me(e))return ts(e);var t=Jt(e),n=[];for(var o in e)o=="constructor"&&(t||!rs.call(e,o))||n.push(o);return n}function en(e){return ze(e)?nr(e,!0):os(e)}var as=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,is=/^\w*$/;function tn(e,t){if(ae(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||je(e)?!0:is.test(e)||!as.test(e)||t!=null&&e in Object(t)}var ss=Re(Object,"create");const Je=ss;function ls(){this.__data__=Je?Je(null):{},this.size=0}function cs(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var us="__lodash_hash_undefined__",fs=Object.prototype,ds=fs.hasOwnProperty;function ps(e){var t=this.__data__;if(Je){var n=t[e];return n===us?void 0:n}return ds.call(t,e)?t[e]:void 0}var ms=Object.prototype,gs=ms.hasOwnProperty;function hs(e){var t=this.__data__;return Je?t[e]!==void 0:gs.call(t,e)}var ys="__lodash_hash_undefined__";function ws(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Je&&t===void 0?ys:t,this}function Ie(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ie.prototype.clear=ls,Ie.prototype.delete=cs,Ie.prototype.get=ps,Ie.prototype.has=hs,Ie.prototype.set=ws;function bs(){this.__data__=[],this.size=0}function $t(e,t){for(var n=e.length;n--;)if(bt(e[n][0],t))return n;return-1}var Cs=Array.prototype,Ss=Cs.splice;function Ts(e){var t=this.__data__,n=$t(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():Ss.call(t,n,1),--this.size,!0}function $s(e){var t=this.__data__,n=$t(t,e);return n<0?void 0:t[n][1]}function Es(e){return $t(this.__data__,e)>-1}function Os(e,t){var n=this.__data__,o=$t(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Ee(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Ee.prototype.clear=bs,Ee.prototype.delete=Ts,Ee.prototype.get=$s,Ee.prototype.has=Es,Ee.prototype.set=Os;var _s=Re(ge,"Map");const Ze=_s;function As(){this.size=0,this.__data__={hash:new Ie,map:new(Ze||Ee),string:new Ie}}function Ps(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Et(e,t){var n=e.__data__;return Ps(t)?n[typeof t=="string"?"string":"hash"]:n.map}function vs(e){var t=Et(this,e).delete(e);return this.size-=t?1:0,t}function Ns(e){return Et(this,e).get(e)}function ks(e){return Et(this,e).has(e)}function Bs(e,t){var n=Et(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function Oe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Oe.prototype.clear=As,Oe.prototype.delete=vs,Oe.prototype.get=Ns,Oe.prototype.has=ks,Oe.prototype.set=Bs;var Rs="Expected a function";function nn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Rs);var n=function(){var o=arguments,a=t?t.apply(this,o):o[0],i=n.cache;if(i.has(a))return i.get(a);var l=e.apply(this,o);return n.cache=i.set(a,l)||i,l};return n.cache=new(nn.Cache||Oe),n}nn.Cache=Oe;var Is=500;function Ms(e){var t=nn(e,function(o){return n.size===Is&&n.clear(),o}),n=t.cache;return t}var Ds=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fs=/\\(\\)?/g,Ls=Ms(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ds,function(n,o,a,i){t.push(a?i.replace(Fs,"$1"):o||n)}),t});const xs=Ls;function js(e){return e==null?"":Ln(e)}function Ot(e,t){return ae(e)?e:tn(e,t)?[e]:xs(js(e))}var Ks=1/0;function et(e){if(typeof e=="string"||je(e))return e;var t=e+"";return t=="0"&&1/e==-Ks?"-0":t}function _t(e,t){t=Ot(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[et(t[n++])];return n&&n==o?e:void 0}function At(e,t,n){var o=e==null?void 0:_t(e,t);return o===void 0?n:o}function or(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var zs=rr(Object.getPrototypeOf,Object);const ar=zs;function Us(){this.__data__=new Ee,this.size=0}function Gs(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vs(e){return this.__data__.get(e)}function Ys(e){return this.__data__.has(e)}var Hs=200;function Ws(e,t){var n=this.__data__;if(n instanceof Ee){var o=n.__data__;if(!Ze||o.length<Hs-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Oe(o)}return n.set(e,t),this.size=n.size,this}function be(e){var t=this.__data__=new Ee(e);this.size=t.size}be.prototype.clear=Us,be.prototype.delete=Gs,be.prototype.get=Vs,be.prototype.has=Ys,be.prototype.set=Ws;function qs(e,t){return e&&Ct(t,Ge(t),e)}function Xs(e,t){return e&&Ct(t,en(t),e)}var ir=typeof V=="object"&&V&&!V.nodeType&&V,sr=ir&&typeof module=="object"&&module&&!module.nodeType&&module,Qs=sr&&sr.exports===ir,lr=Qs?ge.Buffer:void 0,cr=lr?lr.allocUnsafe:void 0;function Js(e,t){if(t)return e.slice();var n=e.length,o=cr?cr(n):new e.constructor(n);return e.copy(o),o}function ur(e,t){for(var n=-1,o=e==null?0:e.length,a=0,i=[];++n<o;){var l=e[n];t(l,n,e)&&(i[a++]=l)}return i}function fr(){return[]}var Zs=Object.prototype,el=Zs.propertyIsEnumerable,dr=Object.getOwnPropertySymbols,tl=dr?function(e){return e==null?[]:(e=Object(e),ur(dr(e),function(t){return el.call(e,t)}))}:fr;const rn=tl;function nl(e,t){return Ct(e,rn(e),t)}var rl=Object.getOwnPropertySymbols,ol=rl?function(e){for(var t=[];e;)or(t,rn(e)),e=ar(e);return t}:fr;const pr=ol;function al(e,t){return Ct(e,pr(e),t)}function mr(e,t,n){var o=t(e);return ae(e)?o:or(o,n(e))}function on(e){return mr(e,Ge,rn)}function gr(e){return mr(e,en,pr)}var il=Re(ge,"DataView");const an=il;var sl=Re(ge,"Promise");const sn=sl;var ll=Re(ge,"Set");const Ve=ll;var hr="[object Map]",cl="[object Object]",yr="[object Promise]",wr="[object Set]",br="[object WeakMap]",Cr="[object DataView]",ul=Be(an),fl=Be(Ze),dl=Be(sn),pl=Be(Ve),ml=Be(Wt),Me=ke;(an&&Me(new an(new ArrayBuffer(1)))!=Cr||Ze&&Me(new Ze)!=hr||sn&&Me(sn.resolve())!=yr||Ve&&Me(new Ve)!=wr||Wt&&Me(new Wt)!=br)&&(Me=function(e){var t=ke(e),n=t==cl?e.constructor:void 0,o=n?Be(n):"";if(o)switch(o){case ul:return Cr;case fl:return hr;case dl:return yr;case pl:return wr;case ml:return br}return t});const tt=Me;var gl=Object.prototype,hl=gl.hasOwnProperty;function yl(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&hl.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var wl=ge.Uint8Array;const Pt=wl;function ln(e){var t=new e.constructor(e.byteLength);return new Pt(t).set(new Pt(e)),t}function bl(e,t){var n=t?ln(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Cl=/\w*$/;function Sl(e){var t=new e.constructor(e.source,Cl.exec(e));return t.lastIndex=e.lastIndex,t}var Sr=we?we.prototype:void 0,Tr=Sr?Sr.valueOf:void 0;function Tl(e){return Tr?Object(Tr.call(e)):{}}function $l(e,t){var n=t?ln(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var El="[object Boolean]",Ol="[object Date]",_l="[object Map]",Al="[object Number]",Pl="[object RegExp]",vl="[object Set]",Nl="[object String]",kl="[object Symbol]",Bl="[object ArrayBuffer]",Rl="[object DataView]",Il="[object Float32Array]",Ml="[object Float64Array]",Dl="[object Int8Array]",Fl="[object Int16Array]",Ll="[object Int32Array]",xl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Kl="[object Uint16Array]",zl="[object Uint32Array]";function Ul(e,t,n){var o=e.constructor;switch(t){case Bl:return ln(e);case El:case Ol:return new o(+e);case Rl:return bl(e,n);case Il:case Ml:case Dl:case Fl:case Ll:case xl:case jl:case Kl:case zl:return $l(e,n);case _l:return new o;case Al:case Nl:return new o(e);case Pl:return Sl(e);case vl:return new o;case kl:return Tl(e)}}function Gl(e){return typeof e.constructor=="function"&&!Jt(e)?qa(ar(e)):{}}var Vl="[object Map]";function Yl(e){return $e(e)&&tt(e)==Vl}var $r=Ue&&Ue.isMap,Hl=$r?Tt($r):Yl;const Wl=Hl;var ql="[object Set]";function Xl(e){return $e(e)&&tt(e)==ql}var Er=Ue&&Ue.isSet,Ql=Er?Tt(Er):Xl;const Jl=Ql;var Zl=1,ec=2,tc=4,Or="[object Arguments]",nc="[object Array]",rc="[object Boolean]",oc="[object Date]",ac="[object Error]",_r="[object Function]",ic="[object GeneratorFunction]",sc="[object Map]",lc="[object Number]",Ar="[object Object]",cc="[object RegExp]",uc="[object Set]",fc="[object String]",dc="[object Symbol]",pc="[object WeakMap]",mc="[object ArrayBuffer]",gc="[object DataView]",hc="[object Float32Array]",yc="[object Float64Array]",wc="[object Int8Array]",bc="[object Int16Array]",Cc="[object Int32Array]",Sc="[object Uint8Array]",Tc="[object Uint8ClampedArray]",$c="[object Uint16Array]",Ec="[object Uint32Array]",Q={};Q[Or]=Q[nc]=Q[mc]=Q[gc]=Q[rc]=Q[oc]=Q[hc]=Q[yc]=Q[wc]=Q[bc]=Q[Cc]=Q[sc]=Q[lc]=Q[Ar]=Q[cc]=Q[uc]=Q[fc]=Q[dc]=Q[Sc]=Q[Tc]=Q[$c]=Q[Ec]=!0,Q[ac]=Q[_r]=Q[pc]=!1;function vt(e,t,n,o,a,i){var l,s=t&Zl,c=t&ec,u=t&tc;if(n&&(l=a?n(e,o,a,i):n(e)),l!==void 0)return l;if(!me(e))return e;var g=ae(e);if(g){if(l=yl(e),!s)return Qa(e,l)}else{var f=tt(e),d=f==_r||f==ic;if(St(e))return Js(e,s);if(f==Ar||f==Or||d&&!a){if(l=c||d?{}:Gl(e),!s)return c?al(e,Xs(l,e)):nl(e,qs(l,e))}else{if(!Q[f])return a?e:{};l=Ul(e,f,s)}}i||(i=new be);var y=i.get(e);if(y)return y;i.set(e,l),Jl(e)?e.forEach(function(h){l.add(vt(h,t,n,h,e,i))}):Wl(e)&&e.forEach(function(h,w){l.set(w,vt(h,t,n,w,e,i))});var T=u?c?gr:on:c?en:Ge,m=g?void 0:T(e);return Za(m||e,function(h,w){m&&(w=h,h=e[w]),Xt(l,w,vt(h,t,n,w,e,i))}),l}var Oc=1,_c=4;function cn(e){return vt(e,Oc|_c)}var Ac="__lodash_hash_undefined__";function Pc(e){return this.__data__.set(e,Ac),this}function vc(e){return this.__data__.has(e)}function nt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Oe;++t<n;)this.add(e[t])}nt.prototype.add=nt.prototype.push=Pc,nt.prototype.has=vc;function Nc(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}function Pr(e,t){return e.has(t)}var kc=1,Bc=2;function vr(e,t,n,o,a,i){var l=n&kc,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var u=i.get(e),g=i.get(t);if(u&&g)return u==t&&g==e;var f=-1,d=!0,y=n&Bc?new nt:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var T=e[f],m=t[f];if(o)var h=l?o(m,T,f,t,e,i):o(T,m,f,e,t,i);if(h!==void 0){if(h)continue;d=!1;break}if(y){if(!Nc(t,function(w,C){if(!Pr(y,C)&&(T===w||a(T,w,n,o,i)))return y.push(C)})){d=!1;break}}else if(!(T===m||a(T,m,n,o,i))){d=!1;break}}return i.delete(e),i.delete(t),d}function Rc(e){var t=-1,n=Array(e.size);return e.forEach(function(o,a){n[++t]=[a,o]}),n}function un(e){var t=-1,n=Array(e.size);return e.forEach(function(o){n[++t]=o}),n}var Ic=1,Mc=2,Dc="[object Boolean]",Fc="[object Date]",Lc="[object Error]",xc="[object Map]",jc="[object Number]",Kc="[object RegExp]",zc="[object Set]",Uc="[object String]",Gc="[object Symbol]",Vc="[object ArrayBuffer]",Yc="[object DataView]",Nr=we?we.prototype:void 0,fn=Nr?Nr.valueOf:void 0;function Hc(e,t,n,o,a,i,l){switch(n){case Yc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vc:return!(e.byteLength!=t.byteLength||!i(new Pt(e),new Pt(t)));case Dc:case Fc:case jc:return bt(+e,+t);case Lc:return e.name==t.name&&e.message==t.message;case Kc:case Uc:return e==t+"";case xc:var s=Rc;case zc:var c=o&Ic;if(s||(s=un),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;o|=Mc,l.set(e,t);var g=vr(s(e),s(t),o,a,i,l);return l.delete(e),g;case Gc:if(fn)return fn.call(e)==fn.call(t)}return!1}var Wc=1,qc=Object.prototype,Xc=qc.hasOwnProperty;function Qc(e,t,n,o,a,i){var l=n&Wc,s=on(e),c=s.length,u=on(t),g=u.length;if(c!=g&&!l)return!1;for(var f=c;f--;){var d=s[f];if(!(l?d in t:Xc.call(t,d)))return!1}var y=i.get(e),T=i.get(t);if(y&&T)return y==t&&T==e;var m=!0;i.set(e,t),i.set(t,e);for(var h=l;++f<c;){d=s[f];var w=e[d],C=t[d];if(o)var p=l?o(C,w,d,t,e,i):o(w,C,d,e,t,i);if(!(p===void 0?w===C||a(w,C,n,o,i):p)){m=!1;break}h||(h=d=="constructor")}if(m&&!h){var S=e.constructor,$=t.constructor;S!=$&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof $=="function"&&$ instanceof $)&&(m=!1)}return i.delete(e),i.delete(t),m}var Jc=1,kr="[object Arguments]",Br="[object Array]",Nt="[object Object]",Zc=Object.prototype,Rr=Zc.hasOwnProperty;function eu(e,t,n,o,a,i){var l=ae(e),s=ae(t),c=l?Br:tt(e),u=s?Br:tt(t);c=c==kr?Nt:c,u=u==kr?Nt:u;var g=c==Nt,f=u==Nt,d=c==u;if(d&&St(e)){if(!St(t))return!1;l=!0,g=!1}if(d&&!g)return i||(i=new be),l||tr(e)?vr(e,t,n,o,a,i):Hc(e,t,c,n,o,a,i);if(!(n&Jc)){var y=g&&Rr.call(e,"__wrapped__"),T=f&&Rr.call(t,"__wrapped__");if(y||T){var m=y?e.value():e,h=T?t.value():t;return i||(i=new be),a(m,h,n,o,i)}}return d?(i||(i=new be),Qc(e,t,n,o,a,i)):!1}function kt(e,t,n,o,a){return e===t?!0:e==null||t==null||!$e(e)&&!$e(t)?e!==e&&t!==t:eu(e,t,n,o,kt,a)}var tu=1,nu=2;function ru(e,t,n,o){var a=n.length,i=a,l=!o;if(e==null)return!i;for(e=Object(e);a--;){var s=n[a];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){s=n[a];var c=s[0],u=e[c],g=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var f=new be;if(o)var d=o(u,g,c,e,t,f);if(!(d===void 0?kt(g,u,tu|nu,o,f):d))return!1}}return!0}function Ir(e){return e===e&&!me(e)}function ou(e){for(var t=Ge(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,Ir(a)]}return t}function Mr(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function au(e){var t=ou(e);return t.length==1&&t[0][2]?Mr(t[0][0],t[0][1]):function(n){return n===e||ru(n,e,t)}}function iu(e,t){return e!=null&&t in Object(e)}function su(e,t,n){t=Ot(t,e);for(var o=-1,a=t.length,i=!1;++o<a;){var l=et(t[o]);if(!(i=e!=null&&n(e,l)))break;e=e[l]}return i||++o!=a?i:(a=e==null?0:e.length,!!a&&Qt(a)&&wt(l,a)&&(ae(e)||qn(e)))}function lu(e,t){return e!=null&&su(e,t,iu)}var cu=1,uu=2;function fu(e,t){return tn(e)&&Ir(t)?Mr(et(e),t):function(n){var o=At(n,e);return o===void 0&&o===t?lu(n,e):kt(t,o,cu|uu)}}function du(e){return function(t){return t==null?void 0:t[e]}}function pu(e){return function(t){return _t(t,e)}}function mu(e){return tn(e)?du(et(e)):pu(e)}function rt(e){return typeof e=="function"?e:e==null?Kn:typeof e=="object"?ae(e)?fu(e[0],e[1]):au(e):mu(e)}function gu(e,t,n,o){for(var a=-1,i=e==null?0:e.length;++a<i;){var l=e[a];t(o,l,n(l),e)}return o}function hu(e){return function(t,n,o){for(var a=-1,i=Object(t),l=o(t),s=l.length;s--;){var c=l[e?s:++a];if(n(i[c],c,i)===!1)break}return t}}var yu=hu();const wu=yu;function bu(e,t){return e&&wu(e,t,Ge)}function Cu(e,t){return function(n,o){if(n==null)return n;if(!ze(n))return e(n,o);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++i<a)&&o(l[i],i,l)!==!1;);return n}}var Su=Cu(bu);const Bt=Su;function Tu(e,t,n,o){return Bt(e,function(a,i,l){t(o,a,n(a),l)}),o}function $u(e,t){return function(n,o){var a=ae(n)?gu:Tu,i=t?t():{};return a(n,e,rt(o),i)}}var Eu=function(){return ge.Date.now()};const dn=Eu;var Ou="Expected a function",_u=Math.max,Au=Math.min;function Dr(e,t,n){var o,a,i,l,s,c,u=0,g=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Ou);t=Yt(t)||0,me(n)&&(g=!!n.leading,f="maxWait"in n,i=f?_u(Yt(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(b){var A=o,_=a;return o=a=void 0,u=b,l=e.apply(_,A),l}function T(b){return u=b,s=setTimeout(w,t),g?y(b):l}function m(b){var A=b-c,_=b-u,O=t-A;return f?Au(O,i-_):O}function h(b){var A=b-c,_=b-u;return c===void 0||A>=t||A<0||f&&_>=i}function w(){var b=dn();if(h(b))return C(b);s=setTimeout(w,m(b))}function C(b){return s=void 0,d&&o?y(b):(o=a=void 0,l)}function p(){s!==void 0&&clearTimeout(s),u=0,o=c=a=s=void 0}function S(){return s===void 0?l:C(dn())}function $(){var b=dn(),A=h(b);if(o=arguments,a=this,c=b,A){if(s===void 0)return T(c);if(f)return clearTimeout(s),s=setTimeout(w,t),y(c)}return s===void 0&&(s=setTimeout(w,t)),l}return $.cancel=p,$.flush=S,$}function Pu(e,t,n){for(var o=-1,a=e==null?0:e.length;++o<a;)if(n(t,e[o]))return!0;return!1}function vu(e,t){for(var n=-1,o=e==null?0:e.length;++n<o;)if(!t(e[n],n,e))return!1;return!0}function Nu(e,t){var n=!0;return Bt(e,function(o,a,i){return n=!!t(o,a,i),n}),n}function ku(e,t,n){var o=ae(e)?vu:Nu;return n&&ci(e,t,n)&&(t=void 0),o(e,rt(t))}function Bu(e,t){var n=[];return Bt(e,function(o,a,i){t(o,a,i)&&n.push(o)}),n}function Fr(e,t){var n=ae(e)?ur:Bu;return n(e,rt(t))}function Ru(e,t){var n=-1,o=ze(e)?Array(e.length):[];return Bt(e,function(a,i,l){o[++n]=t(a,i,l)}),o}var Iu="[object String]";function Mu(e){return typeof e=="string"||!ae(e)&&$e(e)&&ke(e)==Iu}function Du(e,t){return Ke(t,function(n){return e[n]})}function Fu(e){return e==null?[]:Du(e,Ge(e))}var Lu=Math.max;function xu(e,t,n,o){e=ze(e)?e:Fu(e),n=n&&!o?va(n):0;var a=e.length;return n<0&&(n=Lu(a+n,0)),Mu(e)?n<=a&&e.indexOf(t,n)>-1:!!a&&Yn(e,t,n)>-1}function Lr(e,t){return kt(e,t)}function ot(e){return e==null}function ju(e){return e===null}var Ku=$u(function(e,t,n){qt(e,n,t)});const xr=Ku;function jr(e,t,n,o){if(!me(e))return e;t=Ot(t,e);for(var a=-1,i=t.length,l=i-1,s=e;s!=null&&++a<i;){var c=et(t[a]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=l){var g=s[c];u=o?o(g,c,s):void 0,u===void 0&&(u=me(g)?g:wt(t[a+1])?[]:{})}Xt(s,c,u),s=s[c]}return e}function zu(e,t,n){for(var o=-1,a=t.length,i={};++o<a;){var l=t[o],s=_t(e,l);n(s,l)&&jr(i,Ot(l,e),s)}return i}function Ye(e,t){if(e==null)return{};var n=Ke(gr(e),function(o){return[o]});return t=rt(t),zu(e,n,function(o,a){return t(o,a[0])})}function Uu(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Gu(e,t){if(e!==t){var n=e!==void 0,o=e===null,a=e===e,i=je(e),l=t!==void 0,s=t===null,c=t===t,u=je(t);if(!s&&!u&&!i&&e>t||i&&l&&c&&!s&&!u||o&&l&&c||!n&&c||!a)return 1;if(!o&&!i&&!u&&e<t||u&&n&&a&&!o&&!i||s&&n&&a||!l&&a||!c)return-1}return 0}function Vu(e,t,n){for(var o=-1,a=e.criteria,i=t.criteria,l=a.length,s=n.length;++o<l;){var c=Gu(a[o],i[o]);if(c){if(o>=s)return c;var u=n[o];return c*(u=="desc"?-1:1)}}return e.index-t.index}function Yu(e,t,n){t.length?t=Ke(t,function(i){return ae(i)?function(l){return _t(l,i.length===1?i[0]:i)}:i}):t=[Kn];var o=-1;t=Ke(t,Tt(rt));var a=Ru(e,function(i,l,s){var c=Ke(t,function(u){return u(i)});return{criteria:c,index:++o,value:i}});return Uu(a,function(i,l){return Vu(i,l,n)})}function Hu(e,t,n,o){return e==null?[]:(ae(t)||(t=t==null?[]:[t]),n=o?void 0:n,ae(n)||(n=n==null?[]:[n]),Yu(e,t,n))}function Kr(e,t,n){return e==null?e:jr(e,t,n)}var Wu=1/0,qu=Ve&&1/un(new Ve([,-0]))[1]==Wu?function(e){return new Ve(e)}:Xa;const Xu=qu;var Qu=200;function Ju(e,t,n){var o=-1,a=ri,i=e.length,l=!0,s=[],c=s;if(n)l=!1,a=Pu;else if(i>=Qu){var u=t?null:Xu(e);if(u)return un(u);l=!1,a=Pr,c=new nt}else c=t?[]:s;e:for(;++o<i;){var g=e[o],f=t?t(g):g;if(g=n||g!==0?g:0,l&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(g)}else a(c,f,n)||(c!==s&&c.push(f),s.push(g))}return s}function Zu(e){return e&&e.length?Ju(e):[]}const ef=(e,t,n="post",o={})=>a=>e({url:t,method:n,data:a,...o}),zr=()=>({meta:{code:"VEHICLE-MANAGEMENT-CLIENT-V3",client:"web-H5",tag:"保险",time:new Date().getTime()}}),pn=({conditions:e,apiConfig:t})=>{const{conditionKey:n}=t,o=zr();return n===null?Object.assign(o,e):o[n||"condition"]=e,o},Ur=({conditions:e,pager:t,listApiConfig:n})=>{const{pageNoKey:o,pageSizeKey:a,conditionKey:i,metaKey:l}=n,s=l===null?{}:zr();return o&&a&&(Kr(s,o,t.pageNo),Kr(s,a,t.pageSize)),i===null?Object.assign(s,e):s[i||"condition"]=e,s},Rt=()=>r.getCurrentInstance().appContext.config.globalProperties.$route,Gr=()=>r.getCurrentInstance().appContext.config.globalProperties.$axios,_e=(e,t,n)=>{const o=Gr();return ef(o,e,t,n)};async function tf(e,t,n,o){return(await e({url:t,method:"POST",data:n,...o})).data}const It=Ut(()=>{const e=r.reactive({});return{enumerations:e,patchEnumerations:async o=>{const a=o?Object.keys(o).filter(s=>e[s]===void 0):[],i=a.map(s=>{const{apiUrl:c,apiMethod:u,params:g}=o[s];if(!c)throw`enum api ${s} 没有提供apiUrl`;return _e(c,u)(g)});(await Promise.allSettled(i)).forEach((s,c)=>{if(s.status==="fulfilled"){const{value:u}=s,{labelKey:g,valueKey:f,dataKey:d,groupKey:y}=o[a[c]];if(u.success){const T=At(u,d||"data"),m=h=>{Object.prototype.toString.call(h)==="[object Array]"?e[a[c]]=[...r.toRaw(e[a[c]]||[]),...h.map(w=>({...y?{group:w[y]}:{},label:w[g],value:w[f]}))]:Object.prototype.toString.call(h)==="[object Object]"&&Object.keys(h).forEach(w=>{m(h[w])})};m(T)}}else console.warn(`【enumeration】: ${a[c]}: 获取失败`)})},patchStaticEnumerations:o=>{Object.keys(o).forEach(i=>{e[i]=o[i]})}}}),nf={Input:D.Input,Select:D.Select,FuzzySelect:D.Select,QuerySelect:D.Select,DatePicker:D.DatePicker,RangePicker:D.RangePicker},rf="Enter",of=13,mn="FuzzySelect",Mt="QuerySelect",af=["RangePicker"],Vr=r.defineComponent({name:"ConditionBuilder",props:{materials:{type:Object,default:()=>{}}},emits:["pressEnter"],setup(e,{emit:t}){const n=Rt(),{materials:o}=r.toRefs(e),{enumerations:a}=It(),i=nf[o.value.type],l=r.computed(()=>af.includes(o.value.type)?["开始时间","结束时间"]:"请输入"),{otherProps:s}=o.value;function c(p){if(!p||!p.style||Object.prototype.toString.call(p.style)==="[object Object]")return p;const{style:S,...$}=p;try{const b=JSON.parse(S);return{...$,style:b}}catch(b){return console.warn("Failed to parse style:",b),p}}const u=c(s),g=o.value.filterGroups||[],f=o.value.refEnum||"",d=r.computed(()=>{var p,S;return((S=a[f])==null?void 0:S.filter((p=o.value.filterGroups)!=null&&p.length?$=>g.includes($.group):()=>!0))||[]}),y=r.ref([]),T=_e(o.value.filterUrl||`/duckbill-data-query-server/table/column/${o.value.filterKey}`),m=r.inject("transformFuzzy",{})[o.value.fieldName],h=(p,S)=>{var b;const $=o.value.filterKey||"label";return S[$]||console.warn(`not found key 【${$}】 in option`),((b=S[$])==null?void 0:b.indexOf(p.toString()))>-1},w=r.computed(()=>{switch(o.value.type){case mn:return Dr(async function(p){const S=pn({conditions:{key:p,code:o.value.fuzzyCode},apiConfig:{conditionKey:"params"}}),$=await T(S),b=m?m($):$;y.value=b},200);case Mt:return Dr(async function(p){const{category:S,tab:$}=n.meta,b=await T({sliceNumber:"50",category:S,tab:$,code:p});o.value.fuzzyMatch?y.value=b.data.map(A=>({value:A,label:A})):y.value=b.data.map(A=>({value:A.id,label:A.name}))},200);default:return null}}),C=r.computed(()=>{switch(o.value.type){case"Select":return d.value;case mn:return y.value;case Mt:return y.value;default:return null}});return()=>i?r.h(i,{size:"small",placeholder:l.value,onkeydown:function(p){(p.keyCode===of||p.key===rf)&&t("pressEnter")},filterOption:[mn,Mt].includes(o.value.type)?!1:h,...Ye({notFoundContent:Mt===o.value.type?null:!0},ju),onSearch:w.value,options:C.value,...u}):r.h("span","Invalid Type")}}),at=Ut(()=>{const e=r.reactive({});return{formState:e,dispatchFormState:(o,a)=>{Object.assign(e[a],o)},initFormState:(o=[],a=Object.create(null),i)=>{e[i]||(e[i]=Object.create(null));const l=Object.keys(a);return o.forEach(s=>{e[i][s.fieldName]=void 0;const c=l.indexOf(s.fieldName);c>-1&&l.splice(c,1)}),l.length&&l.forEach(s=>{e[i][s]=a[s]}),e[i]}}}),{Item:sf,useForm:lf}=D.Form,cf=r.defineComponent({name:"PageRendererConditions",components:{DownOutlined:ie.DownOutlined,UpOutlined:ie.UpOutlined,Col:D.Col,Row:D.Row,Form:D.Form,Item:sf,Space:D.Space,Button:D.Button,ConditionBuilder:Vr},props:{config:{type:Array,default:()=>[]},searching:{type:Boolean,default:!1},current:{type:Number,default:1},defaultQuery:{type:Object,default:()=>{}},immediateQuery:{type:Boolean,default:!1}},emits:["search","changeExpand","update:current","update:sorts","resetSearch"],setup(e,{emit:t,expose:n}){const{config:i,immediateQuery:l}=r.toRefs(e),s=r.inject("pageName",""),c=r.computed(()=>i.value.length>6*3),u=r.ref(!c.value),{formState:g,dispatchFormState:f}=at(),{resetFields:d,validate:y,validateInfos:T}=lf(g[s]);r.watch(()=>e.defaultQuery,C=>{f(C,s),t("search")},{deep:!0,immediate:l.value});const m=()=>{y().then(()=>e.current===1?t("search"):t("update:current",1)).catch(C=>{console.log(C)})},h=C=>C.label.slice(0,10);r.watch(u,()=>t("changeExpand"));const w=r.computed(()=>u.value||!c.value?(6-i.value.length%6)*4:24);return n({resetFields:d}),{expand:u,pageName:s,formState:g,serachSpan:w,validateInfos:T,showAvailiableTrigger:c,AVAILIABLE_EXPAND_LINE:3,CONDITION_COUNT_PER_LINE:6,onSubmit:m,getItemLabel:h}}});function uf(e,t,n,o,a,i){const l=r.resolveComponent("ConditionBuilder"),s=r.resolveComponent("Item"),c=r.resolveComponent("Col"),u=r.resolveComponent("Button"),g=r.resolveComponent("UpOutlined"),f=r.resolveComponent("DownOutlined"),d=r.resolveComponent("Space"),y=r.resolveComponent("Row"),T=r.resolveComponent("Form");return r.openBlock(),r.createBlock(T,{class:"page-renderer-conditions","label-col":{span:8},"wrapper-col":{span:16}},{default:r.withCtx(()=>[r.createVNode(y,{gutter:24},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.config,(m,h)=>{var w;return r.withDirectives((r.openBlock(),r.createBlock(c,{key:m.fieldName,span:((w=m.otherProps)==null?void 0:w.span)||4,class:"conditions-item-col"},{default:r.withCtx(()=>{var C,p;return[r.createVNode(s,r.mergeProps(e.validateInfos[m.fieldName],{colon:!1,"label-col":(C=m.otherProps)==null?void 0:C.labelCol,"wrapper-col":(p=m.otherProps)==null?void 0:p.wrapperCol,label:e.getItemLabel(m),class:{"form-item-with-small-fonts":e.getItemLabel(m).length>4,[`form-item-words${e.getItemLabel(m).length}`]:!0}}),{default:r.withCtx(()=>[r.createVNode(l,{value:e.formState[e.pageName][m.fieldName],"onUpdate:value":S=>e.formState[e.pageName][m.fieldName]=S,materials:m,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","materials","onPressEnter"])]),_:2},1040,["label-col","wrapper-col","label","class"])]}),_:2},1032,["span"])),[[r.vShow,e.expand||!e.showAvailiableTrigger||h<e.CONDITION_COUNT_PER_LINE]])}),128)),r.createVNode(c,{span:e.serachSpan},{default:r.withCtx(()=>[r.createVNode(d,{style:{float:"right","padding-right":"12px"}},{default:r.withCtx(()=>[r.createVNode(u,{type:"primary",size:"small",onClick:r.withModifiers(e.onSubmit,["prevent"]),loading:e.searching},{default:r.withCtx(()=>[r.createTextVNode("查询")]),_:1},8,["onClick","loading"]),r.createVNode(u,{size:"small",onClick:t[0]||(t[0]=m=>e.$emit("resetSearch"))},{default:r.withCtx(()=>[r.createTextVNode("重置")]),_:1}),e.showAvailiableTrigger?(r.openBlock(),r.createElementBlock("a",{key:0,style:{"font-size":"12px"},onClick:t[1]||(t[1]=m=>e.expand=!e.expand)},[e.expand?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(g),r.createTextVNode(" 收起 ")],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(f),r.createTextVNode(" 展开 ")],64))])):r.createCommentVNode("",!0)]),_:1})]),_:1},8,["span"])]),_:1})]),_:1})}const ff=ye(cf,[["render",uf]]),it=Ut(()=>{const e=r.reactive(Object.create(null)),t=r.reactive(Object.create(null)),n=r.reactive(Object.create(null));return r.watch(t,()=>{for(const o in n)n[o]=[]},{deep:!0}),{selectedRows:e,selectedRowKeys:t,selectedErrorRowKeys:n}}),df={".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg"},pf=[{value:100,label:100},{value:200,label:200},{value:500,label:500}],mf={ALL:"导出全部",SELECTED:"导出选中"},Yr={COLUMN_SETTING:"列表设置",FILTER_SETTING:"筛选设置",SORT_SETTING:"排序设置"},gf=r.defineComponent({name:"PageRendererButtons",components:{aicon:zt,Menu:D.Menu,MenuItem:D.MenuItem,Space:D.Space,Button:D.Button,Select:D.Select,Dropdown:D.Dropdown,Pagination:D.Pagination,DropdownButton:D.DropdownButton,SettingOutlined:ie.SettingOutlined,DownOutlined:ie.DownOutlined},props:{config:{type:Array,default:()=>[]},hasApiConfig:{type:Boolean,required:!0},exportConfig:{type:Object},importConfig:{type:Object},handleExport:{type:Function,default:null},total:{type:Number,default:0},current:{type:Number,default:1},pageSize:{type:Number,default:100}},emits:["buttonClick","update:current","update:pageSize","customizeSetting","refresh"],setup(e,{emit:t}){var S,$,b,A;const{current:n,pageSize:o,exportConfig:a,importConfig:i}=r.toRefs(e),l=r.ref(!1),s=r.ref(!1),c=r.inject("pageName",""),{selectedRows:u}=it(),g=(_,O)=>{if(_.needSelectRows){if(!u[c].length){D.message.warn("请选择数据");return}if(_.mode==="single"&&u[c].length>1){D.message.warn("只能选择一条数据");return}}t("buttonClick",_.action,O)},f=r.computed({get:()=>n.value,set:_=>t("update:current",_)}),d=r.computed({get:()=>o.value,set:_=>{const O=Math.ceil(e.total/_);f.value>O&&(f.value=O),t("update:pageSize",_)}}),y=r.inject("paramsGuard",_=>_),T=(S=a.value)!=null&&S.url?_e(($=a.value)==null?void 0:$.url,"post",{responseType:"blob",...a.value.requestOptions}):null,m=(A=(b=i.value)==null?void 0:b.sublist)!=null&&A.length?i.value.sublist.map(_=>_e(_.url,"post",{..._.requestOptions})):[],h=async()=>{var E;const{formState:_}=at(),O=a.value?pn({conditions:r.toRaw(_[c]),apiConfig:a.value}):{};y(O,c);try{l.value=!0;const v=await T(O);if(!v)return;const z=/\{\{(.+?)\}\}/g;let G=((E=a.value)==null?void 0:E.fileName)||"",B=null;for(;(B=z.exec(G))!==null;)B[1]==="Date"&&(G=G.replace(B[0],Bn().format("YYYY-MM-DD")));const P=document.createElement("a"),N=window.URL.createObjectURL(new Blob([v]));if(P.href=N,P.download=G,document.body.appendChild(P),P.click(),document.body.removeChild(P),window.URL.revokeObjectURL(N),a.value.needFeedback===!1)return;D.message.success("导出成功")}catch(v){console.warn("export error: ",v)}finally{l.value=!1}},w=({url:_,type:O})=>{switch(O){case"TEMPLATE_LOCAL":window.open(_);break}},C=async({accept:_,feedback:O=!0,needRefresh:E=!0},v)=>{const z=/^\.[a-zA-Z]+$/,G=_==null?void 0:_.reduce((N,I)=>{if(!z.test(I))throw`请提供正确的文件后缀名,是否是 【.${I}】 ?`;return N[df[I]]=[I],N},{}),[B]=await window.showOpenFilePicker({types:[{accept:G}]}),P=await B.getFile();if(P){const N=m[v],I=new FormData;I.append("file",P),s.value=!0,D.message.success({content:`正在导入: ${P.name}`,duration:0});const k=await N(I);if(s.value=!1,!k.success||O===!1)return;D.message.destroy(),D.message.success({content:O==="USE_RESPONSE"?k.data:typeof O=="string"?O:"导入成功",duration:3}),E&&t("refresh")}};return{SETTINGS_MAP:Yr,importLoading:s,exportLoading:l,computed_current:f,computed_pageSize:d,pageSizeOptions:pf,OPERATIONS_EXPORT_MAP:mf,handleImport:(_,O)=>{const{type:E}=_;if(["TEMPLATE_LOCAL"].includes(E)){w(_);return}if(["IMPORT"].includes(E)){C(_,O);return}D.message.warn(`请确认ImportConfigItem.type是否正确: ${E}`)},handleApiConfigExport:h,handleButtonClick:g}}}),op="",hf={class:"page-renderer-buttons"},yf={class:"page-renderer-buttons-left"},wf={class:"page-renderer-setting-trigger"},bf={href:"javascript:;"};function Cf(e,t,n,o,a,i){const l=r.resolveComponent("aicon"),s=r.resolveComponent("MenuItem"),c=r.resolveComponent("Menu"),u=r.resolveComponent("Space"),g=r.resolveComponent("Button"),f=r.resolveComponent("Dropdown"),d=r.resolveComponent("DownOutlined"),y=r.resolveComponent("Pagination"),T=r.resolveComponent("Select"),m=r.resolveComponent("SettingOutlined"),h=r.resolveDirective("permission");return r.openBlock(),r.createElementBlock("div",hf,[r.createElementVNode("div",yf,[r.createVNode(u,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.config,(w,C)=>r.withDirectives((r.openBlock(),r.createBlock(r.resolveDynamicComponent(w.type),r.mergeProps(w.otherProps,{key:`${w.type}${C}`,onClick:p=>e.handleButtonClick(w,p)}),r.createSlots({overlay:r.withCtx(()=>[r.createVNode(c,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.sublist,p=>(r.openBlock(),r.createBlock(s,{key:p.action,onClick:S=>e.handleButtonClick(p,S)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:r.withCtx(()=>[r.createTextVNode(" "+r.toDisplayString(w.children)+" ",1)]),_:2},[w.iconType?{name:"icon",fn:r.withCtx(()=>[r.createVNode(l,{type:w.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[h,w.permissions]])),128))]),_:1})]),r.createElementVNode("div",null,[r.createVNode(u,null,{default:r.withCtx(()=>{var w,C;return[e.hasApiConfig?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[(w=e.importConfig)!=null&&w.children?(r.openBlock(),r.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:r.withCtx(()=>[r.createVNode(c,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.importConfig.children,(p,S)=>(r.openBlock(),r.createBlock(s,{key:S,onClick:()=>e.handleImport(p,S)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:r.withCtx(()=>[r.createVNode(g,{loading:e.importLoading,size:"small",type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):r.createCommentVNode("",!0),e.exportConfig?(r.openBlock(),r.createBlock(g,{key:1,size:"small",type:"primary",loading:e.exportLoading,onClick:t[0]||(t[0]=()=>e.handleApiConfigExport())},{default:r.withCtx(()=>[r.createTextVNode(" 导出 ")]),_:1},8,["loading"])):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[(C=e.importConfig)!=null&&C.sublist?(r.openBlock(),r.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:r.withCtx(()=>[r.createVNode(c,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.importConfig.sublist,(p,S)=>(r.openBlock(),r.createBlock(s,{key:S,onClick:()=>e.handleImport(p,S)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:r.withCtx(()=>[r.createVNode(g,{loading:e.importLoading,size:"small",type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):r.createCommentVNode("",!0),e.exportConfig?(r.openBlock(),r.createBlock(f,{key:1},{overlay:r.withCtx(()=>[r.createVNode(c,{onClick:t[1]||(t[1]=p=>e.handleExport(p.key))},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.OPERATIONS_EXPORT_MAP,(p,S)=>(r.openBlock(),r.createBlock(s,{key:S},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(p),1)]),_:2},1024))),128))]),_:1})]),default:r.withCtx(()=>[r.createVNode(g,{size:"small",type:"primary",loading:e.exportLoading},{default:r.withCtx(()=>[r.createTextVNode(" 导出 "),r.createVNode(d)]),_:1},8,["loading"])]),_:1})):r.createCommentVNode("",!0)],64)),r.createVNode(y,{class:"operations-pagination-simple",current:e.computed_current,"onUpdate:current":t[2]||(t[2]=p=>e.computed_current=p),pageSize:e.computed_pageSize,"onUpdate:pageSize":t[3]||(t[3]=p=>e.computed_pageSize=p),size:"small",simple:"",total:e.total},null,8,["current","pageSize","total"]),r.createVNode(T,{value:e.computed_pageSize,"onUpdate:value":t[4]||(t[4]=p=>e.computed_pageSize=p),size:"small",options:e.pageSizeOptions},null,8,["value","options"]),e.hasApiConfig?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(f,{key:2,placement:"bottomRight",trigger:["click"]},{overlay:r.withCtx(()=>[r.createVNode(c,{onClick:t[5]||(t[5]=p=>e.$emit("customizeSetting",p.key))},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.SETTINGS_MAP,(p,S)=>(r.openBlock(),r.createBlock(s,{key:S},{default:r.withCtx(()=>[r.createVNode(m,{style:{"margin-right":"4px"}}),r.createElementVNode("a",bf,r.toDisplayString(p),1)]),_:2},1024))),128))]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",wf,[r.createVNode(m,{style:{"font-size":"15px",transform:"translateY(2px)"}})])]),_:1}))]}),_:1})])])}const Sf=ye(gf,[["render",Cf]]),Tf=r.defineComponent({name:"PageRendererSummaryBar",components:{Alert:D.Alert},props:{config:{type:Object,required:!0}},setup(e,{expose:t}){const{config:n}=r.toRefs(e),{template:o}=n.value,a=r.ref(!1),{formState:i}=at(),l=r.inject("pageName",""),s=()=>{const d=/\{\{(.+?)\}\}/g;let y={},T=[];for(;(T=d.exec(o))!==null;)y[T[1].trim()]=" - ";return y},c=r.reactive(s()),u=_e(n.value.url),g=async()=>{const d=pn({conditions:i[l],apiConfig:n.value});a.value=!0,u(d).then(y=>{Object.keys(c).forEach(T=>{const m=At(y,`${n.value.dataKey}.${T}`);c[T]=ot(m)?" - ":m})}).finally(()=>a.value=!1)},f={data:()=>r.toRaw(c),template:o};return t({fetchSummary:g}),()=>r.h(D.Alert,{class:"page-renderer-summary-bar"},{message:()=>a.value?r.h(D.Spin,{size:"small",style:{height:"20px"}}):r.h(f)})}}),ap="",st="__$$loading",lt="__$$map",$f=r.defineComponent({name:"PageRendererTableCell",props:{column:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},handleLinkClick:{type:Function,required:!0},linkCellKeys:{type:Array,default:()=>[]},keywords:{type:Array,default:()=>[]}},setup(e){const{column:t,row:n,linkCellKeys:o,keywords:a}=r.toRefs(e),i=r.computed(()=>{let l=n.value[t.value.dataIndex];return a.value.includes(t.value.dataIndex)&&(l=n.value[lt][t.value.dataIndex]),l});return()=>o.value.includes(t.value.dataIndex)?e.loading?r.h(ie.LoadingOutlined,{style:{color:"#1890ff"}}):r.h("a",{onclick:l=>{l.stopPropagation(),e.handleLinkClick(n.value,t.value,l)}},i.value):i.value}});var Ef=20,Of=1,De=1e6,Hr=1e6,_f=-7,Af=21,Pf=!1,ct="[big.js] ",Fe=ct+"Invalid ",Dt=Fe+"decimal places",vf=Fe+"rounding mode",Wr=ct+"Division by zero",q={},Ce=void 0,Nf=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function qr(){function e(t){var n=this;if(!(n instanceof e))return t===Ce?qr():new e(t);if(t instanceof e)n.s=t.s,n.e=t.e,n.c=t.c.slice();else{if(typeof t!="string"){if(e.strict===!0&&typeof t!="bigint")throw TypeError(Fe+"value");t=t===0&&1/t<0?"-0":String(t)}kf(n,t)}n.constructor=e}return e.prototype=q,e.DP=Ef,e.RM=Of,e.NE=_f,e.PE=Af,e.strict=Pf,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function kf(e,t){var n,o,a;if(!Nf.test(t))throw Error(Fe+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(o=t.search(/e/i))>0?(n<0&&(n=o),n+=+t.slice(o+1),t=t.substring(0,o)):n<0&&(n=t.length),a=t.length,o=0;o<a&&t.charAt(o)=="0";)++o;if(o==a)e.c=[e.e=0];else{for(;a>0&&t.charAt(--a)=="0";);for(e.e=n-o-1,e.c=[],n=0;o<=a;)e.c[n++]=+t.charAt(o++)}return e}function Le(e,t,n,o){var a=e.c;if(n===Ce&&(n=e.constructor.RM),n!==0&&n!==1&&n!==2&&n!==3)throw Error(vf);if(t<1)o=n===3&&(o||!!a[0])||t===0&&(n===1&&a[0]>=5||n===2&&(a[0]>5||a[0]===5&&(o||a[1]!==Ce))),a.length=1,o?(e.e=e.e-t+1,a[0]=1):a[0]=e.e=0;else if(t<a.length){if(o=n===1&&a[t]>=5||n===2&&(a[t]>5||a[t]===5&&(o||a[t+1]!==Ce||a[t-1]&1))||n===3&&(o||!!a[0]),a.length=t,o){for(;++a[--t]>9;)if(a[t]=0,t===0){++e.e,a.unshift(1);break}}for(t=a.length;!a[--t];)a.pop()}return e}function He(e,t,n){var o=e.e,a=e.c.join(""),i=a.length;if(t)a=a.charAt(0)+(i>1?"."+a.slice(1):"")+(o<0?"e":"e+")+o;else if(o<0){for(;++o;)a="0"+a;a="0."+a}else if(o>0)if(++o>i)for(o-=i;o--;)a+="0";else o<i&&(a=a.slice(0,o)+"."+a.slice(o));else i>1&&(a=a.charAt(0)+"."+a.slice(1));return e.s<0&&n?"-"+a:a}q.abs=function(){var e=new this.constructor(this);return e.s=1,e},q.cmp=function(e){var t,n=this,o=n.c,a=(e=new n.constructor(e)).c,i=n.s,l=e.s,s=n.e,c=e.e;if(!o[0]||!a[0])return o[0]?i:a[0]?-l:0;if(i!=l)return i;if(t=i<0,s!=c)return s>c^t?1:-1;for(l=(s=o.length)<(c=a.length)?s:c,i=-1;++i<l;)if(o[i]!=a[i])return o[i]>a[i]^t?1:-1;return s==c?0:s>c^t?1:-1},q.div=function(e){var t=this,n=t.constructor,o=t.c,a=(e=new n(e)).c,i=t.s==e.s?1:-1,l=n.DP;if(l!==~~l||l<0||l>De)throw Error(Dt);if(!a[0])throw Error(Wr);if(!o[0])return e.s=i,e.c=[e.e=0],e;var s,c,u,g,f,d=a.slice(),y=s=a.length,T=o.length,m=o.slice(0,s),h=m.length,w=e,C=w.c=[],p=0,S=l+(w.e=t.e-e.e)+1;for(w.s=i,i=S<0?0:S,d.unshift(0);h++<s;)m.push(0);do{for(u=0;u<10;u++){if(s!=(h=m.length))g=s>h?1:-1;else for(f=-1,g=0;++f<s;)if(a[f]!=m[f]){g=a[f]>m[f]?1:-1;break}if(g<0){for(c=h==s?a:d;h;){if(m[--h]<c[h]){for(f=h;f&&!m[--f];)m[f]=9;--m[f],m[h]+=10}m[h]-=c[h]}for(;!m[0];)m.shift()}else break}C[p++]=g?u:++u,m[0]&&g?m[h]=o[y]||0:m=[o[y]]}while((y++<T||m[0]!==Ce)&&i--);return!C[0]&&p!=1&&(C.shift(),w.e--,S--),p>S&&Le(w,S,n.RM,m[0]!==Ce),w},q.eq=function(e){return this.cmp(e)===0},q.gt=function(e){return this.cmp(e)>0},q.gte=function(e){return this.cmp(e)>-1},q.lt=function(e){return this.cmp(e)<0},q.lte=function(e){return this.cmp(e)<1},q.minus=q.sub=function(e){var t,n,o,a,i=this,l=i.constructor,s=i.s,c=(e=new l(e)).s;if(s!=c)return e.s=-c,i.plus(e);var u=i.c.slice(),g=i.e,f=e.c,d=e.e;if(!u[0]||!f[0])return f[0]?e.s=-c:u[0]?e=new l(i):e.s=1,e;if(s=g-d){for((a=s<0)?(s=-s,o=u):(d=g,o=f),o.reverse(),c=s;c--;)o.push(0);o.reverse()}else for(n=((a=u.length<f.length)?u:f).length,s=c=0;c<n;c++)if(u[c]!=f[c]){a=u[c]<f[c];break}if(a&&(o=u,u=f,f=o,e.s=-e.s),(c=(n=f.length)-(t=u.length))>0)for(;c--;)u[t++]=0;for(c=t;n>s;){if(u[--n]<f[n]){for(t=n;t&&!u[--t];)u[t]=9;--u[t],u[n]+=10}u[n]-=f[n]}for(;u[--c]===0;)u.pop();for(;u[0]===0;)u.shift(),--d;return u[0]||(e.s=1,u=[d=0]),e.c=u,e.e=d,e},q.mod=function(e){var t,n=this,o=n.constructor,a=n.s,i=(e=new o(e)).s;if(!e.c[0])throw Error(Wr);return n.s=e.s=1,t=e.cmp(n)==1,n.s=a,e.s=i,t?new o(n):(a=o.DP,i=o.RM,o.DP=o.RM=0,n=n.div(e),o.DP=a,o.RM=i,this.minus(n.times(e)))},q.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},q.plus=q.add=function(e){var t,n,o,a=this,i=a.constructor;if(e=new i(e),a.s!=e.s)return e.s=-e.s,a.minus(e);var l=a.e,s=a.c,c=e.e,u=e.c;if(!s[0]||!u[0])return u[0]||(s[0]?e=new i(a):e.s=a.s),e;if(s=s.slice(),t=l-c){for(t>0?(c=l,o=u):(t=-t,o=s),o.reverse();t--;)o.push(0);o.reverse()}for(s.length-u.length<0&&(o=u,u=s,s=o),t=u.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+u[t]+n)/10|0;for(n&&(s.unshift(n),++c),t=s.length;s[--t]===0;)s.pop();return e.c=s,e.e=c,e},q.pow=function(e){var t=this,n=new t.constructor("1"),o=n,a=e<0;if(e!==~~e||e<-Hr||e>Hr)throw Error(Fe+"exponent");for(a&&(e=-e);e&1&&(o=o.times(t)),e>>=1,!!e;)t=t.times(t);return a?n.div(o):o},q.prec=function(e,t){if(e!==~~e||e<1||e>De)throw Error(Fe+"precision");return Le(new this.constructor(this),e,t)},q.round=function(e,t){if(e===Ce)e=0;else if(e!==~~e||e<-De||e>De)throw Error(Dt);return Le(new this.constructor(this),e+this.e+1,t)},q.sqrt=function(){var e,t,n,o=this,a=o.constructor,i=o.s,l=o.e,s=new a("0.5");if(!o.c[0])return new a(o);if(i<0)throw Error(ct+"No square root");i=Math.sqrt(o+""),i===0||i===1/0?(t=o.c.join(""),t.length+l&1||(t+="0"),i=Math.sqrt(t),l=((l+1)/2|0)-(l<0||l&1),e=new a((i==1/0?"5e":(i=i.toExponential()).slice(0,i.indexOf("e")+1))+l)):e=new a(i+""),l=e.e+(a.DP+=4);do n=e,e=s.times(n.plus(o.div(n)));while(n.c.slice(0,l).join("")!==e.c.slice(0,l).join(""));return Le(e,(a.DP-=4)+e.e+1,a.RM)},q.times=q.mul=function(e){var t,n=this,o=n.constructor,a=n.c,i=(e=new o(e)).c,l=a.length,s=i.length,c=n.e,u=e.e;if(e.s=n.s==e.s?1:-1,!a[0]||!i[0])return e.c=[e.e=0],e;for(e.e=c+u,l<s&&(t=a,a=i,i=t,u=l,l=s,s=u),t=new Array(u=l+s);u--;)t[u]=0;for(c=s;c--;){for(s=0,u=l+c;u>c;)s=t[u]+i[c]*a[u-c-1]+s,t[u--]=s%10,s=s/10|0;t[u]=s}for(s?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},q.toExponential=function(e,t){var n=this,o=n.c[0];if(e!==Ce){if(e!==~~e||e<0||e>De)throw Error(Dt);for(n=Le(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return He(n,!0,!!o)},q.toFixed=function(e,t){var n=this,o=n.c[0];if(e!==Ce){if(e!==~~e||e<0||e>De)throw Error(Dt);for(n=Le(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length<e;)n.c.push(0)}return He(n,!1,!!o)},q[Symbol.for("nodejs.util.inspect.custom")]=q.toJSON=q.toString=function(){var e=this,t=e.constructor;return He(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},q.toNumber=function(){var e=Number(He(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(ct+"Imprecise conversion");return e},q.toPrecision=function(e,t){var n=this,o=n.constructor,a=n.c[0];if(e!==Ce){if(e!==~~e||e<1||e>De)throw Error(Fe+"precision");for(n=Le(new o(n),e,t);n.c.length<e;)n.c.push(0)}return He(n,e<=n.e||n.e<=o.NE||n.e>=o.PE,!!a)},q.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(ct+"valueOf disallowed");return He(e,e.e<=t.NE||e.e>=t.PE,!0)};var Bf=qr();const Rf={sum:e=>{const{selectedRows:t}=it(),n=r.inject("pageName","");return t[n].reduce((o,a)=>o=o.plus(Number(a[e.dataIndex])),new Bf(0))}},If=(e,t)=>Rf[e](t),Mf={ascend:"ASC",descend:"DESC"},{useForm:Df}=D.Form,Ff=r.defineComponent({name:"PageRendererTableView",components:{Table:D.Table,Space:D.Space,TableCell:$f,LoadingOutlined:ie.LoadingOutlined,ConditionBuilder:Vr,CaretDownOutlined:ie.CaretDownOutlined,CaretUpOutlined:ie.CaretUpOutlined},props:{config:{type:Array,default:()=>[]},conditions:{type:Array,default:()=>[]},current:{type:Number,default:1},hasApiConfig:{type:Boolean,required:!0},rowKey:{type:String||Function,default:(e,t)=>t},data:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},total:{type:Object,default:()=>{}}},emits:["filter","search","changeExpand","update:current","update:sorts","linkClick"],setup(e,{expose:t,emit:n}){const o=async()=>{await r.nextTick(),Wo(T,F=>{const x=F[0],{height:M}=x.contentRect;i.value=M-64})};r.onMounted(o);const{enumerations:a}=It(),i=r.ref(0),l="filter_",s="_index",{config:c,conditions:u,hasApiConfig:g,rowKey:f,data:d,total:y}=r.toRefs(e),T=r.ref(null),m=r.inject("pageName",""),h=r.ref(),w=r.ref([]),C=r.ref({}),p=r.ref([]),{selectedRows:S,selectedRowKeys:$,selectedErrorRowKeys:b}=it();b[m]||(b[m]=[]);const A=r.computed(()=>$[m].length>0),_=r.computed(()=>{if(g.value)return xr(u.value,"fieldName");{const F=c.value.reduce((x,M)=>(M.filterable&&x.push({...M,label:M.title,type:M.filterType,fieldName:M.columnKey,filterKey:M.columnKey,otherProps:{...M,...M.otherProps?M.otherProps:{}}}),x),[]);return xr(F,"columnKey")}}),O=r.ref(!0),E=()=>{O.value=!O.value},v=r.ref(ie.FilterOutlined),z=()=>{v.value=ie.FilterFilled},G=()=>{v.value=ie.FilterOutlined},B=({text:F,column:x,record:M,index:H})=>x&&x.dataIndex===s?H+1:!x||x.dataIndex==="action"?F:ot(M[x.dataIndex])||M[x.dataIndex]===""?" - ":F,P=(F,x)=>{$[m]=F,S[m]=x},N=F=>{const x=window.getSelection();if(x&&(x==null?void 0:x.toString().length)>0)return;const M=[...$[m]],H=f.value;M.indexOf(F[H])>=0?M.splice(M.indexOf(F[H]),1):M.push(F[H]),$[m]=M,S[m]=de.value.filter(U=>M.includes(U[H]))},I=F=>({onclick:()=>N(F)}),k=r.computed(()=>{var M;let F=i.value;A.value&&(F-=31),O.value&&(F-=33);const x=(M=T.value)==null?void 0:M.querySelector(".ant-table-body");return x&&(x.style.minHeight=`${F}px`),F});r.watchEffect(()=>{const F=h.value||{};p.value=[{align:"center",children:O.value?[{title:"筛选",dataIndex:s,key:"TITLE_"+s,fixed:"left",width:40,align:"center"}]:[],dataIndex:s,fixed:"left",key:s,width:40},...c.value.filter(x=>x.show!==!1).map(x=>{const{title:M,width:H=150,columnKey:U,cellRenderType:Ne,cellValueType:We,refEnum:qe,action:R,children:L,summary:W,fixed:X,filterable:ue,sortable:Pe}=x;Ne==="Link"&&w.value.push(U),We==="map"&&qe&&(C.value[U]=x);const pe=U!=="action"&&Array.isArray(L),pt=pe?L.map(he=>({...he,align:"center",action:R,dataIndex:he.columnKey,ellipsis:!0,key:he.columnKey,resizable:!0,width:H})):O.value?[{action:R,align:"center",childActions:U==="action"?L:[],dataIndex:U,ellipsis:!0,filterable:ue,fixed:U==="action"?!0:X,key:l+U,resizable:!0,summary:W,title:"",width:H}]:[];return{action:R,align:"center",childActions:U==="action"?L:[],children:pt,dataIndex:U,ellipsis:!0,fixed:U==="action"?!0:X,key:U,resizable:!0,summary:W,sortable:Pe,sorter:pe?!1:Pe||((he,Kt)=>he[U]>Kt[U]),sortOrder:F.columnKey===U&&F.order,showSorterTooltip:!1,title:M,width:H}})]});function j(F){let x=[];return F.forEach(M=>{M.children&&M.children.length>0?x=x.concat(j(M.children)):x.push(M.dataIndex)}),x}const K=r.computed(()=>j(p.value).map(F=>F===s?y.value.count:y.value[F])),{formState:Y}=at(),{validate:ee}=Df(Y[m]),te=()=>{ee().then(()=>e.current===1?n("search"):n("update:current",1)).catch(F=>{console.warn(F)})},J=()=>{n("filter")},ne=F=>{_.value[F].type==="Input"?J():r.nextTick(te)},se=(F,x,M)=>{var H;h.value=M,Array.isArray(M)||((H=M.column)==null?void 0:H.sorter)===!0&&M.columnKey&&M.order&&n("update:sorts",{[M.columnKey]:Mf[M.order]})},le=()=>{h.value=null},ce=r.computed(()=>Object.keys(C.value)),de=r.computed(()=>{const F=p.value.filter(M=>M.action!==void 0||M.key==="action").reduce((M,H)=>{var U;return H.key==="action"?(U=H.child)==null||U.forEach(Ne=>{M[`${Ne.action}Loading`]=!1}):M[`${H.action}Loading`]=!1,M},{});return Array.isArray(d.value)?d.value.map(M=>({...M,...ce.value.reduce((H,U)=>{var Ne,We,qe,R;if(C.value[U].refEnumLabel){const L=(We=(Ne=a[C.value[U].refEnum])==null?void 0:Ne.find(W=>{var X,ue;return((X=W.id)==null?void 0:X.toString())===((ue=M[C.value[U].refEnum])==null?void 0:ue.toString())}))==null?void 0:We[C.value[U].refEnumLabel];H[lt][U]=L}else H[lt][U]=(R=(qe=a[C.value[U].refEnum])==null?void 0:qe.find(L=>{var W,X;return((W=L.value)==null?void 0:W.toString())===((X=M[U])==null?void 0:X.toString())}))==null?void 0:R.label;return H},{[lt]:r.reactive({})}),[st]:r.reactive(cn(F))})):[]}),re=(F,x)=>{x.width=F,x.children&&x.children.length>0&&(x.children[x.children.length-1].width=F)},oe=(F,x)=>{var M;return((M=c.value.find(H=>H.columnKey===x.dataIndex))==null?void 0:M[F])||""},Te=(F,x,M,H)=>{const U=oe("action",x)||H;F[st][`${U}Loading`]=!0,n("linkClick",oe("action",x)||H,M,[{...F}],()=>F[st][`${U}Loading`]=!1)},ve=(F,x)=>{if(F.length!==3)return console.warn(`【${F}】表达式不合法,默认计算为显示`),!0;const[M,H,U]=F;return H==="equal"?Lr(x[M],U):H==="unequal"?!Lr(x[M],U):!0};return r.onRenderTriggered(F=>{}),t({clearSort:le,toggleTableHeight:o}),{y:i,isNil:ot,columns:p,totalList:K,pageName:m,keywords:ce,computedY:k,dataSource:de,LOADING_SIGN:st,tableWrapper:T,linkCellKeys:w,selectedRows:S,selectedRowKeys:$,selectedErrorRowKeys:b,showSelectionSummaryRow:A,DATA_SOURCE_FILTER_PREFIX:l,DATA_SOURCE_INDEX_KEY:s,formState:Y,fieldNameConditionsByKey:_,isHeaderFilterable:O,currentIcon:v,showFilled:z,showOutlined:G,headerFilterSwitch:E,onSubmit:te,onTableChange:se,onConditionChange:ne,onHeaderFilterChange:J,emit:n,customRow:I,actionVisible:ve,onSelectChange:P,handleLinkClick:Te,transformSummary:If,transformCellText:B,handleResizeColumn:re,findConfigByColumnKey:oe}}}),ip="",Lf={ref:"tableWrapper",style:{flex:"auto",overflow:"hidden"}},xf={key:1},jf={style:{color:"#999"}},Kf={key:1},zf={key:2},Uf=["onClick"],Gf=r.createElementVNode("span",{class:"table-summary-cell-text"},"选中",-1),Vf={key:0,class:"table-summary-cell-text"},Yf={key:1,class:"table-summary-cell-text"},Hf=r.createElementVNode("span",{class:"table-summary-cell-text"},"总计",-1),Wf={class:"table-summary-cell-text"};function qf(e,t,n,o,a,i){const l=r.resolveComponent("a-tooltip"),s=r.resolveComponent("ConditionBuilder"),c=r.resolveComponent("a-input"),u=r.resolveComponent("LoadingOutlined"),g=r.resolveComponent("Space"),f=r.resolveComponent("TableCell"),d=r.resolveComponent("a-table-summary-cell"),y=r.resolveComponent("a-table-summary-row"),T=r.resolveComponent("a-table-summary"),m=r.resolveComponent("Table");return r.openBlock(),r.createElementBlock("div",Lf,[r.createVNode(m,{bordered:"",size:"small","data-source":e.dataSource,columns:e.columns,loading:e.loading,pagination:!1,scroll:{y:e.computedY},"row-key":e.rowKey,"custom-row":e.customRow,"row-class-name":(h,w)=>`${w%2===1?"table-striped-row":""} ${e.selectedErrorRowKeys[e.pageName].includes(h[e.rowKey])?"table-error-row":""}`,"row-selection":{fixed:!0,columnWidth:40,onChange:e.onSelectChange,selectedRowKeys:e.selectedRowKeys[e.pageName]},"transform-cell-text":e.transformCellText,onResizeColumn:e.handleResizeColumn,onChange:e.onTableChange},{headerCell:r.withCtx(({column:h})=>[h.key===e.DATA_SOURCE_INDEX_KEY?(r.openBlock(),r.createElementBlock("div",{key:0,onMouseenter:t[0]||(t[0]=(...w)=>e.showFilled&&e.showFilled(...w)),onMouseleave:t[1]||(t[1]=(...w)=>e.showOutlined&&e.showOutlined(...w)),onClick:t[2]||(t[2]=(...w)=>e.headerFilterSwitch&&e.headerFilterSwitch(...w))},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.currentIcon)))],32)):(r.openBlock(),r.createElementBlock("div",xf,[h.sortable===!1?(r.openBlock(),r.createBlock(l,{key:0},{title:r.withCtx(()=>[r.createTextVNode("仅支持当前页的筛选排序,不支持跨页筛选排序。如需统计全部数据,请点[导出全部],在 excel 统计。")]),default:r.withCtx(()=>[r.createElementVNode("span",jf,r.toDisplayString(h.title),1)]),_:2},1024)):(r.openBlock(),r.createElementBlock("div",Kf,r.toDisplayString(h.title),1)),h.key.startsWith(e.DATA_SOURCE_FILTER_PREFIX)?(r.openBlock(),r.createElementBlock("div",zf,[e.fieldNameConditionsByKey[h.dataIndex]?(r.openBlock(),r.createBlock(s,{key:0,value:e.formState[e.pageName][h.dataIndex],"onUpdate:value":w=>e.formState[e.pageName][h.dataIndex]=w,materials:e.fieldNameConditionsByKey[h.dataIndex],onChange:()=>{e.onConditionChange(h.dataIndex)},onPressEnter:e.onSubmit,style:{width:"100%"}},null,8,["value","onUpdate:value","materials","onChange","onPressEnter"])):(r.openBlock(),r.createBlock(c,{key:1,disabled:"",size:"small",value:e.formState[e.pageName][h.dataIndex],"onUpdate:value":w=>e.formState[e.pageName][h.dataIndex]=w,onChange:e.onHeaderFilterChange,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):r.createCommentVNode("",!0)]))]),bodyCell:r.withCtx(({column:h,record:w})=>[h.dataIndex==="action"?(r.openBlock(),r.createBlock(g,{key:0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.childActions,C=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:C.action},[C.show===void 0||e.actionVisible(C.show,w)?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[w[e.LOADING_SIGN][`${C.action}Loading`]?(r.openBlock(),r.createBlock(u,{key:1,style:{color:"#1890ff"}})):(r.openBlock(),r.createElementBlock("a",{key:0,onClick:r.withModifiers(p=>{e.handleLinkClick(w,h,p,C.action)},["stop"])},r.toDisplayString(C.text),9,Uf))],64)):r.createCommentVNode("",!0)],64))),128))]),_:2},1024)):r.createCommentVNode("",!0),[...e.linkCellKeys,...e.keywords].includes(h.dataIndex)?(r.openBlock(),r.createBlock(f,r.normalizeProps(r.mergeProps({key:1},{row:w,column:h,loading:w[e.LOADING_SIGN][`${h.action}Loading`],keywords:e.keywords,linkCellKeys:e.linkCellKeys,handleLinkClick:e.handleLinkClick})),null,16)):r.createCommentVNode("",!0)]),summary:r.withCtx(()=>[r.createVNode(T,{fixed:""},{default:r.withCtx(()=>[r.withDirectives(r.createVNode(y,{class:"table-summary-selection"},{default:r.withCtx(()=>[r.createVNode(d,{index:0},{default:r.withCtx(()=>[Gf]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.columns,(h,w)=>(r.openBlock(),r.createBlock(d,{key:h.key,index:w+1,style:{"text-align":"center"}},{default:r.withCtx(()=>[w===0?(r.openBlock(),r.createElementBlock("span",Vf,r.toDisplayString(e.selectedRowKeys[e.pageName].length),1)):(r.openBlock(),r.createElementBlock("span",Yf,r.toDisplayString(h.summary?e.transformSummary(h.summary,h):null),1))]),_:2},1032,["index"]))),128))]),_:1},512),[[r.vShow,e.showSelectionSummaryRow]]),r.createVNode(y,null,{default:r.withCtx(()=>[r.createVNode(d,{index:0},{default:r.withCtx(()=>[Hf]),_:1}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.totalList,(h,w)=>(r.openBlock(),r.createBlock(d,{key:w,index:w+1,style:{"text-align":"center"}},{default:r.withCtx(()=>[r.createElementVNode("span",Wf,r.toDisplayString(h),1)]),_:2},1032,["index"]))),128))]),_:1})]),_:1})]),_:1},8,["data-source","columns","loading","scroll","row-key","custom-row","row-class-name","row-selection","transform-cell-text","onResizeColumn","onChange"])],512)}const Xf=ye(Ff,[["render",qf]]);async function Qf(e,t){return tf(e,"/meta-server-web/page/customPageConfig",t)}const Jf={COLUMN_SETTING:"fieldShowConfigList",FILTER_SETTING:"fieldFilterConfigList",SORT_SETTING:"fieldSortConfigList"},Zf=r.defineComponent({name:"PageRendererColumnSettingModal",components:{Modal:D.Modal,Space:D.Space,Button:D.Button,Transfer:D.Transfer},props:{visible:{type:Boolean,default:!1,required:!0},type:{type:String,default:"SORT_SETTING"},title:{type:String,default:"标题"},columns:{type:Array,default:()=>[]}},emits:["change","update:visible"],setup(e,{emit:t}){const n=Rt(),o=Gr(),a=An(e,"visible",t),i=r.ref(!1),l=r.ref([]),s=r.reactive({dataSource:[]});r.watch(a,C=>{C?s.dataSource=cn(r.toRaw(e.columns)).map(p=>(p.show!==!1&&l.value.push(p.columnKey),{...p,disabled:p.columnKey==="action"||p.fixed!==void 0||p.disabled,key:p.columnKey,rowExpandable:!1})):(l.value=[],s.dataSource=[])});const c=[{title:"列名",dataIndex:"title"}],u=async()=>{const C=r.toRaw(l.value),{dataSource:p}=s,{category:S,tab:$}=n.meta,b=C.map(A=>{const _={},O=p.find(E=>E.columnKey===A);if(_.entityId=O.entityId,_.columnKey=O.columnKey,e.type==="SORT_SETTING"){const[E,v]=O.columnKey.split("@");_.columnKey=E,_.sort=v}return _});try{i.value=!0,await Qf(o,{[Jf[e.type]]:b,category:S,label:$}),t("change")}catch(A){console.warn(A)}finally{i.value=!1}},g=()=>a.value=!1,f=({disabled:C,selectedKeys:p,onItemSelectAll:S,onItemSelect:$})=>({getCheckboxProps:b=>({disabled:C||b.disabled}),onSelectAll(b,A){const _=A.filter(O=>!O.disabled).map(({key:O})=>O);S(_,b)},onSelect({key:b},A){$(b,A)},selectedRowKeys:p});let d="",y="";const T=(C,p,S,$)=>({style:{cursor:"move"},onMouseenter:b=>{var _;const A=b||window.event;C.key==="action"||(_=e.columns.find(O=>O.columnKey===C.key))!=null&&_.fixed||(A.target.draggable=!0)},onDragstart:b=>{(b||window.event).stopPropagation(),d=C.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[p].classList.add("source")},onDragover:b=>{(b||window.event).preventDefault()},onDragenter:b=>{(b||window.event).preventDefault();const _=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(s.dataSource[p].disabled)return;const O=document.querySelectorAll(".ant-table-row.target");O.length&&O[0].classList.remove("target"),_[p+(s.dataSource.length-l.value.length)].classList.add("target"),y=C.key},onDrop:b=>{(b||window.event).stopPropagation();const _=document.querySelectorAll(".ant-table-row.target");_.length&&_[0].classList.remove("target");const O=document.querySelectorAll(".ant-table-row.source");if(O.length&&O[0].classList.remove("source"),y===d)return;const E=s.dataSource.slice(),v=E.findIndex(B=>B.key===d),z=E[v];E.splice(v,1);const G=E.findIndex(B=>B.key===y);E.splice(G,0,z),Object.assign(s,{dataSource:E})},onClick:()=>{const{key:b,disabled:A}=C;A||$(b,!S.includes(b))},ondblclick:()=>{const{key:b,disabled:A}=C;if(A)return;const _=l.value.indexOf(b);_>-1?l.value.splice(_,1):l.value.push(b)}}),m=(C,p,S,$)=>({onClick:()=>{const{key:b,disabled:A}=C;A||$(b,!S.includes(b))},ondblclick:()=>{const{key:b,disabled:A}=C;if(A)return;const _=l.value.indexOf(b);_>-1?l.value.splice(_,1):l.value.push(b)}}),h=()=>document.querySelector(".page-renderer-wrapper");return r.watch(a,C=>{C&&r.nextTick(()=>{const p=document.querySelector(".ant-modal-root"),S=p==null?void 0:p.querySelector(".ant-modal-header"),$=p==null?void 0:p.querySelector(".ant-modal");S.style.cursor="move";const b=$.currentStyle||window.getComputedStyle($,null);S.onmousedown=A=>{const _=A.clientX-S.offsetLeft,O=A.clientY-S.offsetTop;let E,v;b.left.includes("%")?(E=+document.body.clientWidth*(+b.left.replace(/\%/g,"")/100),v=+document.body.clientHeight*(+b.top.replace(/\%/g,"")/100)):(E=+b.left.replace(/\px/g,""),v=+b.top.replace(/\px/g,"")),document.onmousemove=function(z){const G=z.clientX-_,B=z.clientY-O;$.style.left=`${G+E}px`,$.style.top=`${B+v}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:a,loading:i,state:s,toKeys:l,tableColumn:c,handleChange:(C,p,S)=>{const $=C.map(b=>b.split("@")[0]);if($.length!==Zu($).length){l.value=C.filter(b=>!S.includes(b)),D.message.warn("同一字段不能同时设置升序和降序!");return}},handleOk:u,customRowRight:T,customRowLeft:m,handleClose:g,getContainer:h,getRowSelection:f}}}),sp="";function ed(e,t,n,o,a,i){const l=r.resolveComponent("a-table"),s=r.resolveComponent("Transfer"),c=r.resolveComponent("Button"),u=r.resolveComponent("Space"),g=r.resolveComponent("Modal");return r.openBlock(),r.createBlock(g,{"wrap-class-name":"drag-modal-wrapper",visible:e.show,"onUpdate:visible":t[1]||(t[1]=f=>e.show=f),"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},"destroy-on-close":!0,onCancel:e.handleClose},{title:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(e.title),1)]),footer:r.withCtx(()=>[r.createVNode(u,null,{default:r.withCtx(()=>[r.createVNode(c,{type:"primary",loading:e.loading,onClick:e.handleOk},{default:r.withCtx(()=>[r.createTextVNode("确定")]),_:1},8,["loading","onClick"])]),_:1})]),default:r.withCtx(()=>[r.createVNode(s,{"target-keys":e.toKeys,"onUpdate:targetKeys":t[0]||(t[0]=f=>e.toKeys=f),"show-select-all":!1,"data-source":e.state.dataSource,"show-search":!0,titles:["隐藏列","显示列"],"list-style":{"min-height":"430px"},"row-key":f=>f.key,style:{"justify-content":"center"},"filter-option":(f,d)=>{var y;return((y=d.title)==null?void 0:y.indexOf(f))!==-1},onChange:e.handleChange},{children:r.withCtx(({direction:f,selectedKeys:d,disabled:y,onItemSelectAll:T,onItemSelect:m})=>[r.createVNode(l,{size:"small",class:r.normalizeClass(f==="right"?"source-table":""),"row-selection":e.getRowSelection({disabled:y,selectedKeys:d,onItemSelectAll:T,onItemSelect:m}),"show-expand-column":!1,columns:e.tableColumn,"data-source":f==="left"?e.state.dataSource.filter(h=>!e.toKeys.includes(h.key)):e.state.dataSource.filter(h=>e.toKeys.includes(h.key)),pagination:!1,scroll:{y:300},style:r.normalizeStyle({pointerEvents:y?"none":null}),"custom-row":(h,w)=>f==="left"?e.customRowLeft(h,w,d,m):e.customRowRight(h,w,d,m)},null,8,["class","row-selection","columns","data-source","style","custom-row"])]),_:1},8,["target-keys","data-source","row-key","filter-option","onChange"])]),_:1},8,["visible","get-container","mask-style","onCancel"])}const td=ye(Zf,[["render",ed]]),nd={},Xr=Symbol("GLOBAL_OPTIONS_PROVIDE_KEY"),Qr=()=>nd,Ae=e=>e,rd=Object.prototype.toString,od=e=>rd.call(e),ad=e=>od(e)==="[object Object]",Ft=e=>Array.isArray(e),ut=e=>e!==null&&typeof e=="object",gn=e=>e instanceof Function,ft=e=>e==null,hn=typeof window>"u",Jr=()=>{var e;return hn||ft((e=window.document)===null||e===void 0?void 0:e.visibilityState)?!0:window.document.visibilityState==="visible"},id=()=>{var e,t;return(e=!hn&&((t=window.navigator)===null||t===void 0?void 0:t.onLine))!==null&&e!==void 0?e:!0},yn=()=>new Promise(()=>{}),Zr=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const o=t.replace(/\[(\d+)\]/g,".$1").split(".");let a=e;for(const i of o)if(a=Object(a)[i],a===void 0)return n;return a},Se=e=>r.isRef(e)?e.value:e,sd=e=>ut(e)?Object.assign(Ft(e)?[]:{},e):e,Lt=new Map,ld=e=>ft(e)?void 0:Lt.get(e),cd=(e,t,n)=>{const o=Lt.get(e);o!=null&&o.timer&&clearTimeout(o.timer);const a=setTimeout(()=>Lt.delete(e),t);Lt.set(e,{...n,timer:a})};function eo(e,t,n){let o,a,i,l,s,c,u=0,g=!1,f=!1,d=!0;const y=!t&&t!==0&&typeof window.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0,ut(n)&&(g=!!n.leading,f="maxWait"in n,i=f?Math.max(+n.maxWait||0,t):i,d="trailing"in n?!!n.trailing:d);function T(E){const v=o,z=a;return o=a=void 0,u=E,l=e.apply(z,v),l}function m(E,v){return y?(window.cancelAnimationFrame(s),window.requestAnimationFrame(E)):setTimeout(E,v)}function h(E){if(y)return window.cancelAnimationFrame(E);clearTimeout(E)}function w(E){return u=E,s=m(S,t),g?T(E):l}function C(E){const v=E-c,z=E-u,G=t-v;return f?Math.min(G,i-z):G}function p(E){const v=E-c,z=E-u;return c===void 0||v>=t||v<0||f&&z>=i}function S(){const E=Date.now();if(p(E))return $(E);s=m(S,C(E))}function $(E){return s=void 0,d&&o?T(E):(o=a=void 0,l)}function b(){s!==void 0&&h(s),u=0,o=c=a=s=void 0}function A(){return s===void 0?l:$(Date.now())}function _(){return s!==void 0}function O(){const E=Date.now(),v=p(E);for(var z=arguments.length,G=new Array(z),B=0;B<z;B++)G[B]=arguments[B];if(o=G,a=this,c=E,v){if(s===void 0)return w(c);if(f)return s=m(S,t),T(c)}return s===void 0&&(s=m(S,t)),l}return O.cancel=b,O.flush=A,O.pending=_,O}function to(e,t){for(const n in t)if(t[n]!==void 0){if(!ut(t[n])||!ut(e[n])||!(n in e)){e[n]=t[n];continue}(ad(t[n])||Ft(t[n]))&&to(e[n],t[n])}}function no(e){const t=Object.assign({},e);for(var n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];if(!o.length)return t;for(const i of o)to(t,i);return t}function ud(e,t,n){let o=!0,a=!0;if(typeof e!="function")throw new TypeError("Expected a function");return ut(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),eo(e,t,{leading:o,trailing:a,maxWait:t})}var fd=Ae((e,t)=>{let{debounceInterval:n,debounceOptions:o,manual:a}=t;const i=r.ref(!1),l=r.ref(),s=r.computed(()=>o),c=r.computed(()=>Se(n)),u=r.ref(e.context.runAsync);return a||(i.value=!0),r.watchEffect(g=>{ft(c.value)||(l.value=eo(f=>f(),c.value,s.value),e.context.runAsync=function(){for(var f=arguments.length,d=new Array(f),y=0;y<f;y++)d[y]=arguments[y];return new Promise((T,m)=>{i.value?(i.value=!1,u.value(...d).then(T).catch(m)):l.value(()=>{u.value(...d).then(T).catch(m)})})},g(()=>{var f;(f=l.value)===null||f===void 0||f.cancel(),e.context.runAsync=u.value}))}),{onCancel(){var g;(g=l.value)===null||g===void 0||g.cancel()}}}),dd=Ae((e,t)=>{let{errorRetryCount:n=0,errorRetryInterval:o=0}=t;const a=r.ref(),i=r.ref(0),l=r.computed(()=>Se(n)),s=r.computed(()=>Se(o));let c=!1;const u=()=>{i.value=0},g=r.computed(()=>{if(s.value)return s.value;const y=1e3,T=1,m=9,h=Math.floor(Math.random()*2**Math.min(i.value,m)+T);return y*h}),f=()=>{let y;const T=l.value===-1,m=i.value<l.value;return(T||m)&&(T||(i.value+=1),y=setTimeout(()=>{c=!0,e.context.refresh()},g.value)),()=>y&&clearTimeout(y)},d=()=>{a.value&&a.value()};return{onBefore(){c||u(),c=!1,d()},onSuccess(){u()},onError(){a.value=f()},onCancel(){u(),d()}}}),pd=Ae((e,t)=>{let{ready:n=r.ref(!0),manual:o,defaultParams:a=[]}=t;return r.watch(n,i=>{!o&&i&&e.context.run(...a)},{flush:"sync"}),{onBefore(){if(!(gn(n)?n():n.value))return e.loading.value=!1,{isBreak:!0}}}}),md=Ae((e,t)=>{let{refreshDeps:n,refreshDepsAction:o,manual:a}=t;if(n===void 0||Ft(n)&&n.length===0)return{};const i=Ft(n)?n:[n];return r.watch(i,()=>{o?o():!a&&e.context.refresh()}),{}}),gd=Ae((e,t)=>{let{throttleInterval:n,throttleOptions:o}=t;const a=r.ref(),i=r.computed(()=>Se(n)),l=r.computed(()=>o),s=r.ref(e.context.runAsync);return r.watchEffect(c=>{if(ft(n))return{};a.value=ud(u=>u(),i.value,l.value),e.context.runAsync=function(){for(var u=arguments.length,g=new Array(u),f=0;f<u;f++)g[f]=arguments[f];return new Promise((d,y)=>{a.value(()=>{s.value(...g).then(d).catch(y)})})},c(()=>{var u;(u=a.value)===null||u===void 0||u.cancel(),e.context.runAsync=s.value})}),{onCancel(){var c;(c=a.value)===null||c===void 0||c.cancel()}}});const hd=(e,t)=>n=>{Object.keys(n).forEach(o=>{e[o].value=n[o]}),t.forEach(o=>o(e))},yd=(e,t)=>()=>{let n=t;for(let o=e.length;o-- >0;)n=e[o](n);return n()},wd=(e,t,n)=>{var o,a;const{initialData:i,onSuccess:l,onError:s,onBefore:c,onAfter:u}=t,g=r.ref((o=n==null?void 0:n.loading)!==null&&o!==void 0?o:!1),f=r.shallowRef((a=n==null?void 0:n.data)!==null&&a!==void 0?a:i),d=r.shallowRef(n==null?void 0:n.error),y=r.ref(n==null?void 0:n.params),T=r.ref([]),m=r.shallowRef("pending"),h={},w=hd({status:m,loading:g,data:f,error:d,params:y},[]),C=function(S){for(var $=arguments.length,b=new Array($>1?$-1:0),A=1;A<$;A++)b[A-1]=arguments[A];if(S==="onQuery"){const _=T.value.map(O=>O.onQuery).filter(Boolean);return{servicePromise:yd(_,b[0])()}}else{const _=T.value.map(O=>{var E;return(E=O[S])===null||E===void 0?void 0:E.call(O,...b)});return Object.assign({},..._)}},p=r.ref(0);return h.runAsync=async function(){for(var S=arguments.length,$=new Array(S),b=0;b<S;b++)$[b]=arguments[b];w({loading:!0,params:$,status:"pending"}),p.value+=1;const A=p.value,{isBreak:_,breakResult:O=yn()}=C("onBefore",$);if(_)return w({status:"settled"}),O;c==null||c($);try{const E=()=>new Promise(G=>G(e(...y.value)));let{servicePromise:v}=C("onQuery",E);v||(v=E());const z=await v;return A!==p.value?yn():(w({data:z,loading:!1,error:void 0,status:"settled"}),C("onSuccess",z,$),l==null||l(z,$),A===p.value&&C("onAfter",$,z,void 0),u==null||u($),z)}catch(E){if(A!==p.value)return yn();throw w({loading:!1,error:E,status:"settled"}),C("onError",E,$),s==null||s(E,$),A===p.value&&C("onAfter",$,void 0,E),u==null||u($),E}},h.run=function(){h.runAsync(...arguments).catch(S=>{s||console.error(S)})},h.cancel=()=>{p.value+=1,w({loading:!1}),C("onCancel")},h.refresh=()=>{h.run(...y.value||[])},h.refreshAsync=()=>h.runAsync(...y.value||[]),h.mutate=S=>{const $=gn(S)?S(f.value):S,b=sd($);w({data:b}),C("onMutate",b)},{status:m,loading:g,data:f,error:d,params:y,plugins:T,context:h}};function bd(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const o=r.inject(Xr,{}),a={...Qr(),...o,...t},{manual:i=!1,defaultParams:l=[]}=a,s=wd(e,a);if(s.plugins.value=n.map(c=>c(s,a)),!i){const c=s.params.value||l;s.context.run(...c)}return r.onUnmounted(()=>{s.context.cancel()}),{loading:s.loading,data:s.data,error:s.error,params:s.params,cancel:s.context.cancel,refresh:s.context.refresh,refreshAsync:s.context.refreshAsync,mutate:s.context.mutate,run:s.context.run,runAsync:s.context.runAsync}}const xt=new Map,Cd=(e,t)=>{xt.set(e,t),t.then(n=>(xt.delete(e),n)).catch(()=>{xt.delete(e)})},Sd=e=>xt.get(e),xe=new Map,Td=(e,t)=>{xe.has(e)&&xe.get(e).forEach(n=>n(t))},$d=(e,t)=>(xe.has(e)?xe.get(e).push(t):xe.set(e,[t]),()=>{const n=xe.get(e).indexOf(t);xe.get(e).splice(n,1)});var Ed=Ae((e,t)=>{let{cacheKey:n,cacheTime:o=6e5,staleTime:a=0,getCache:i,setCache:l}=t;if(!n)return{};const s=gn(n)?n:()=>n,c=r.ref(()=>{});let u;const g=w=>i?i(w):ld(w),f=(w,C,p)=>{l?l(w,p):cd(w,C,p),Td(w,p.data)},d=w=>a===-1||w+a>new Date().getTime(),y=(w,C)=>Object.prototype.hasOwnProperty.call(w,C),T=w=>{const C=s(w);return $d(C,p=>{e.data.value=p})},m=s(),h=g(m);return h&&y(h,"data")&&(e.data.value=h.data,e.params.value=h.params),m&&(c.value=T()),r.onUnmounted(()=>{c.value()}),{onBefore(w){const C=s(w),p=g(C);if(!p||!y(p,"data"))return{};if(d(p.time))return e.data.value=p.data,e.loading.value=!1,{isBreak:!0,breakResult:p.data};e.data.value=p.data},onQuery(w){const C=e.params.value,p=s(C);let S=Sd(p);return S&&S!==u?()=>S:(S=w(),u=S,Cd(p,S),()=>S)},onSuccess(w,C){const p=s(C);p&&(c.value(),f(p,o,{data:w,params:C,time:new Date().getTime()}),c.value=T(C))},onMutate(w){const C=s(e.params.value);C&&(c.value(),f(C,o,{data:w,params:e.params.value,time:new Date().getTime()}),c.value=T(e.params.value))}}});function Od(e){let t,n;class o extends Promise{constructor(i){super(i),this.cancel=()=>{n(),clearTimeout(t)}}}return new o(a=>{n=a,t=setTimeout(n,e)})}function wn(){return new Date().getTime()}var _d=Ae((e,t)=>{let{loadingDelay:n=0,loadingKeep:o=0}=t;const a=r.ref(()=>{}),i=r.computed(()=>Se(n)),l=r.computed(()=>Se(o));let s=0,c={};const u=()=>{let g;return i.value&&(g=setTimeout(()=>{e.status.value==="pending"&&(e.loading.value=!0)},i.value)),()=>g&&clearTimeout(g)};return{onBefore(){e.loading.value=!i.value,a.value(),a.value=u(),s=wn()},onQuery(g){if(!l.value)return()=>g();c=Od(l.value+i.value);const f=async()=>{try{const y=await g();return wn()-s<=i.value&&c.cancel(),Promise.resolve(y)}catch(y){return wn()-s<=i.value&&c.cancel(),Promise.reject(y)}},d=Promise.allSettled([f(),c]).then(y=>{const T=y[0];return T.status==="fulfilled"?T.value:Promise.reject(T.reason)});return()=>d},onCancel(){a.value()},onAfter(){a.value()}}}),bn;const ro=new Set,oo=new Set,ao=new Set,jt=(e,t)=>{let n;switch(e){case"FOCUS_LISTENER":n=ro;break;case"RECONNECT_LISTENER":n=ao;break;case"VISIBLE_LISTENER":n=oo;break}if(!n.has(t))return n.add(t),()=>{n.delete(t)}},Cn=e=>{e.forEach(t=>{t()})};!hn&&(bn=window)!==null&&bn!==void 0&&bn.addEventListener&&(window.addEventListener("visibilitychange",()=>{Jr()&&Cn(oo)},!1),window.addEventListener("focus",()=>Cn(ro),!1),window.addEventListener("online",()=>Cn(ao),!1));var Ad=Ae((e,t)=>{let{pollingInterval:n,pollingWhenHidden:o=!1,pollingWhenOffline:a=!1,errorRetryCount:i=0}=t;const l=r.ref(),s=r.ref(!1),c=r.computed(()=>Se(n)),u=r.computed(()=>Se(i)),g=[],f=m=>{m&&g.push(m)},d=()=>(o||Jr())&&(a||id()),y=m=>{if(e.error.value&&u.value!==0)return;let h;if(!ft(c.value)&&c.value>=0)if(d())h=setTimeout(m,c.value);else{s.value=!0;return}return()=>h&&clearTimeout(h)},T=()=>{s.value&&d()&&(e.context.refresh(),s.value=!1)};return r.watch(c,()=>{l.value&&(l.value(),l.value=y(()=>e.context.refresh()))}),o||f(jt("VISIBLE_LISTENER",T)),a||f(jt("RECONNECT_LISTENER",T)),r.onUnmounted(()=>{g.forEach(m=>m())}),{onBefore(){var m;(m=l.value)===null||m===void 0||m.call(l)},onCancel(){var m;(m=l.value)===null||m===void 0||m.call(l)},onAfter(){l.value=y(()=>e.context.refresh())}}});const Pd=(e,t)=>{let n=!1;return function(){n||(n=!0,e(...arguments),setTimeout(()=>{n=!1},t))}};var vd=Ae((e,t)=>{let{refreshOnWindowFocus:n=!1,refocusTimespan:o=5e3}=t;const a=r.computed(()=>Se(n)),i=r.computed(()=>Se(o)),l=[],s=u=>{u&&l.push(u)},c=()=>{l.forEach(u=>u())};return r.watchEffect(()=>{if(c(),a.value){const u=Pd(e.context.refresh,i.value);s(jt("VISIBLE_LISTENER",u)),s(jt("FOCUS_LISTENER",u))}}),r.onUnmounted(()=>{c()}),{}});function Nd(e,t,n){return bd(e,t,[...n||[],_d,dd,fd,Ad,gd,vd,md,pd,Ed])}function io(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={currentKey:"current",pageSizeKey:"pageSize",totalKey:"total",totalPageKey:"totalPage"},o=r.inject(Xr,{}),{pagination:a,...i}=t,{currentKey:l,pageSizeKey:s,totalKey:c,totalPageKey:u}=no(n,Qr().pagination||{},o.pagination||{},a||{}),g=no({defaultParams:[{[l]:1,[s]:10}]},i),{data:f,params:d,run:y,...T}=Nd(e,g),m=A=>{const[_,...O]=d.value||[],v=[{..._,...A},...O];y(...v)},h=A=>{m({[l]:A})},w=A=>{m({[s]:A})},C=(A,_)=>{m({[l]:A,[s]:_})},p=r.computed(()=>Zr(f.value,c,0)),S=r.computed({get:()=>{var A,_,O;return(A=(_=d.value)===null||_===void 0||(O=_[0])===null||O===void 0?void 0:O[l])!==null&&A!==void 0?A:g.defaultParams[0][l]},set:A=>{h(A)}}),$=r.computed({get:()=>{var A,_,O;return(A=(_=d.value)===null||_===void 0||(O=_[0])===null||O===void 0?void 0:O[s])!==null&&A!==void 0?A:g.defaultParams[0][s]},set:A=>{w(A)}}),b=r.computed(()=>Zr(f.value,u,Math.ceil(p.value/$.value)));return{data:f,params:d,current:S,pageSize:$,total:p,totalPage:b,run:y,changeCurrent:h,changePageSize:w,changePagination:C,...T}}const so="COLUMN_SCHEME",lo={ASC:"升序",DESC:"降序"},kd=r.defineComponent({name:"PageRendererTablePage",components:{Conditions:ff,Operations:Sf,SummaryBar:Tf,TableView:Xf,ColumnSettingModal:td},props:{page:{type:Object,default:()=>{}}},setup(e,{expose:t}){const n=Rt(),{page:o}=r.toRefs(e),{apiConfig:a,buttons:i,data:l,page_size:s}=o.value,c=r.ref(o.value.total),u=r.ref(a==null?void 0:a.summary),g=r.ref(l),f=r.ref(l),d=r.ref({}),y=r.ref(!1),T=r.ref(!1),m=r.ref([]),h=r.ref([]),w=r.ref(),C=r.ref(),p=r.ref(),S={导入:C,导出:w},$=r.computed(()=>({COLUMN_SETTING:o.value.fieldShowConfigList,FILTER_SETTING:o.value.fieldFilterConfigList,SORT_SETTING:o.value.fieldSortConfigList})),b=r.ref(),A=r.ref(o.value.total.count),_=r.inject("transformData",(R,L)=>R),O=r.inject("refreshPage",()=>{}),E=()=>{f.value=Fr(g.value,R=>ku(J,(L,W)=>{var X;return["",void 0,null].includes(L)||Array.isArray(L)?!0:Object.hasOwn(R,W)?xu((X=R[W])==null?void 0:X.toString(),L):!0}))};r.watch(g,()=>{E()});const{patchEnumerations:v,patchStaticEnumerations:z}=It(),G=r.ref(null),B=r.ref(null),P=r.ref(null),N=Ho(so,{}),I=r.ref(N.value[o.value.name]||o.value.columns),k=r.reactive({type:"COLUMN_SETTING",title:"",columns:[],visible:!1}),j=r.computed(()=>o.value.fieldShowConfigList?o.value.fieldShowConfigList.map(R=>R.columnKey):[]),K=r.ref(),Y=r.computed(()=>{if(a)return o.value.rowKey||console.warn("【TablePage】rowKey 列表唯一键没有定义"),o.value.rowKey;{const R=Fr(I.value,{isUniqueKey:!0});return R.length===0?console.warn("【TablePage】isUniqueKey 请设置唯一键"):R.length>1&&console.warn("【TablePage】isUniqueKey 唯一键应该只有一个"),R[0].columnKey}});(()=>{if(a){const R=_e(a.list.url);b.value=io(R,{manual:!0,loadingKeep:100,onBefore(L){L.forEach(W=>re(W,o.value.name))},onSuccess(L){A.value=At(L,a.list.totalKey),g.value=_(L,e.page.name)}})}else{const R=_e(`/duckbill-data-query-server/table/search/${n.meta.category}`);b.value=io(R,{manual:!0,loadingKeep:100,pagination:{totalKey:"data.page.total.count"},onBefore(L){L.forEach(W=>re(W,o.value.name))},onSuccess(L){c.value=L.data.page.total,A.value=L.data.page.total.count,g.value=L.data.page.data,z(L.data.page.enumerations)}}),p.value=_e(`/duckbill-data-query-server/data/export/${n.meta.category}`,"post",{responseType:"blob"})}})(),r.watchEffect(()=>{i.forEach(R=>{const L=S[R.children];L?L.value=R:R.columnAction?h.value.push(R):m.value.push(R)})});const{initFormState:te}=at(),J=te(o.value.conditions,o.value.defaultQuery,o.value.name),ne=r.ref(s),se=r.ref(1),{selectedRows:le,selectedRowKeys:ce}=it(),de=()=>{le[e.page.name]=[],ce[e.page.name]=[]};f.value&&de();const re=r.inject("paramsGuard",R=>R),oe=R=>!ot(R)&&R!=="",Te=()=>{if(a){const R=Ur({conditions:Ye({...r.toRaw(J)},oe),pager:{pageNo:se.value,pageSize:ne.value},listApiConfig:a.list});b.value.run(R),le[e.page.name]=[],ce[e.page.name]=[]}else{const{category:R,tab:L}=n.meta;b.value.run({category:R,tab:L,pageNumber:se.value,pageSize:ne.value,fetchMode:"BODY",sorts:{},filters:Ye({...r.toRaw(J)},oe)})}de(),M()},ve=async R=>{let L;if(R==="SELECTED"){if(ce[e.page.name]&&ce[e.page.name].length===0){D.message.warn("至少选中一条数据!");return}L=ce[e.page.name]}const{category:W,tab:X}=n.meta,ue=await p.value({category:W,tab:X,fetchMode:"BODY",sorts:d.value,filters:Ye({...r.toRaw(J)},oe),ids:L});if(!ue)return;const Pe=/\{\{(.+?)\}\}/g;let pe=`${e.page.name}-{{Date}}.xlsx`,pt=null;for(;(pt=Pe.exec(pe))!==null;)pt[1]==="Date"&&(pe=pe.replace(pt[0],Bn().format("YYYY-MM-DD")));const he=document.createElement("a"),Kt=window.URL.createObjectURL(new Blob([ue]));he.href=Kt,he.download=pe,document.body.appendChild(he),he.click(),document.body.removeChild(he),window.URL.revokeObjectURL(Kt)},F=()=>{var R,L;(R=P.value)==null||R.resetFields(),(L=G.value)==null||L.clearSort()},x=()=>{var R;return(R=G.value)==null?void 0:R.toggleTableHeight()},M=()=>{var R;return(R=B.value)==null?void 0:R.fetchSummary()},H=r.inject("emitHandler",()=>{});r.provide("pageName",e.page.name);const U=(R,L,W,X)=>{const ue=W||(le[e.page.name]?r.toRaw(le[e.page.name]):[]);H(R,ue,X)},Ne=async()=>{k.visible=!1,setTimeout(()=>{O()},500)},We=r.computed(()=>I.value.map(R=>({...R,show:a?!0:j.value.includes(R.columnKey)})));r.watchEffect(()=>{const R=We.value.sort((L,W)=>{const X=j.value.indexOf(L.columnKey),ue=j.value.indexOf(W.columnKey);return X-ue});localStorage.removeItem(so),h.value.length>0&&R.unshift({title:"操作",align:"center",columnKey:"action",children:h.value.map(L=>({text:L.children,action:L.action})),width:h.value.reduce((L,W)=>L+Number(W.columnActionWidth||50),0)}),K.value=R}),r.onMounted(async()=>{z(e.page.enumerations),await v(e.page.enumapi),T.value=!0,r.nextTick().then(()=>{M()})}),a?r.watch([se,ne],([R,L])=>{const W=Ur({conditions:Ye({...r.toRaw(J)},oe),pager:{pageNo:R,pageSize:L},listApiConfig:a.list});b.value.run(W)}):r.watch([se,ne,d],([R,L])=>{const{category:W,tab:X}=n.meta;b.value.run({category:W,tab:X,pageNumber:R,pageSize:L,fetchMode:"BODY",sorts:d.value,filters:Ye({...r.toRaw(J)},oe)})});const qe=R=>{if(a)return;const L=o.value.fieldList.reduce((W,X)=>{const ue={COLUMN_SETTING:!1,SORT_SETTING:!X.sortable,FILTER_SETTING:!X.filterable};if(R==="SORT_SETTING"){const Pe=$.value[R].find(pe=>pe.columnKey===X.columnKey);Object.keys(lo).forEach(pe=>{W.push({...X,title:`${X.title}_${lo[pe]}`,columnKey:`${X.columnKey}@${pe}`,show:Pe?Pe.sort===pe:!1,disabled:ue[R]})})}else W.push({...X,show:!!$.value[R].find(Pe=>Pe.columnKey===X.columnKey),disabled:ue[R]});return W},[]);k.columns=Hu(L,["disabled"],["asc"]),k.type=R,k.title=Yr[R],k.visible=!0};return t({run:Te}),{apiConfig:a,tableData:f,rowKey:Y,paginationQuery:b,paginationTotal:A,loaded:T,buttonsConfig:m,exportConfig:w,importConfig:C,summary:u,current:se,pageSize:ne,pageTotal:c,sorts:d,tableView:G,conditions:P,summaryBar:B,sortedColumns:K,columnSettingState:k,columnSettingVisible:y,handleSearch:Te,handleExport:ve,resetSearch:F,headerFilterHandle:E,handleEmitAction:U,columnSettingChange:Ne,resizeTableHeight:x,handleCustomizeSetting:qe}}});function Bd(e,t,n,o,a,i){const l=r.resolveComponent("Conditions"),s=r.resolveComponent("Operations"),c=r.resolveComponent("SummaryBar"),u=r.resolveComponent("TableView"),g=r.resolveComponent("ColumnSettingModal");return e.loaded?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(l,{ref:"conditions",config:e.page.conditions,"default-query":e.page.defaultQuery,searching:e.paginationQuery.loading,"immediate-query":!!e.apiConfig,current:e.current,"onUpdate:current":t[0]||(t[0]=f=>e.current=f),sorts:e.sorts,"onUpdate:sorts":t[1]||(t[1]=f=>e.sorts=f),onSearch:e.handleSearch,onResetSearch:e.resetSearch,onChangeExpand:e.resizeTableHeight},null,8,["config","default-query","searching","immediate-query","current","sorts","onSearch","onResetSearch","onChangeExpand"]),r.createVNode(s,{total:e.paginationTotal,config:e.buttonsConfig,"has-api-config":!!e.apiConfig,"export-config":e.apiConfig?e.apiConfig.export:e.exportConfig,"import-config":e.apiConfig?e.apiConfig.import:e.importConfig,"handle-export":e.handleExport,pageSize:e.pageSize,"onUpdate:pageSize":t[2]||(t[2]=f=>e.pageSize=f),current:e.current,"onUpdate:current":t[3]||(t[3]=f=>e.current=f),onRefresh:e.handleSearch,onButtonClick:e.handleEmitAction,onCustomizeSetting:e.handleCustomizeSetting},null,8,["total","config","has-api-config","export-config","import-config","handle-export","pageSize","current","onRefresh","onButtonClick","onCustomizeSetting"]),e.summary?(r.openBlock(),r.createBlock(c,{key:0,ref:"summaryBar",config:e.summary},null,8,["config"])):r.createCommentVNode("",!0),r.createVNode(u,{ref:"tableView",config:e.sortedColumns,conditions:e.page.conditions,"row-key":e.rowKey,data:e.tableData,"has-api-config":!!e.apiConfig,loading:e.paginationQuery.loading,total:e.pageTotal,current:e.current,"onUpdate:current":t[4]||(t[4]=f=>e.current=f),sorts:e.sorts,"onUpdate:sorts":t[5]||(t[5]=f=>e.sorts=f),onFilter:e.headerFilterHandle,onSearch:e.handleSearch,onLinkClick:e.handleEmitAction},null,8,["config","conditions","row-key","data","has-api-config","loading","total","current","sorts","onFilter","onSearch","onLinkClick"]),r.createVNode(g,{visible:e.columnSettingState.visible,"onUpdate:visible":t[6]||(t[6]=f=>e.columnSettingState.visible=f),type:e.columnSettingState.type,title:e.columnSettingState.title,columns:e.columnSettingState.columns,onChange:e.columnSettingChange},null,8,["visible","type","title","columns","onChange"])],64)):r.createCommentVNode("",!0)}const co=ye(kd,[["render",Bd]]),Rd=r.defineComponent({name:"PageRendererTabsPage",components:{TablePage:co},props:{pages:{type:Array,default:()=>[]},activePageName:{type:String,default:""}},emits:["update:activePageName"],setup(e,{expose:t,emit:n}){const{pages:o}=r.toRefs(e);r.onMounted(()=>{a(o.value[0].name)});const a=u=>{n("update:activePageName",u)},i={},l=r.ref({}),s=(u,g)=>{u!==null&&(l.value[g]=u,i[g]=()=>l.value[g].run())};return t({run:u=>{i[u]()}}),{activeChange:a,setItemRef:s}}});function Id(e,t,n,o,a,i){const l=r.resolveComponent("TablePage"),s=r.resolveComponent("a-tab-pane"),c=r.resolveComponent("a-tabs");return r.openBlock(),r.createBlock(c,{type:"card",size:"small",class:"tabs-page-renderer","active-key":e.activePageName,"tab-bar-gutter":0,onChange:e.activeChange},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.pages,u=>(r.openBlock(),r.createBlock(s,{key:u.name,tab:u.title},{default:r.withCtx(()=>[r.createVNode(l,{page:u,ref_for:!0,ref:g=>e.setItemRef(g,u.name)},null,8,["page"])]),_:2},1032,["tab"]))),128))]),_:1},8,["active-key","onChange"])}const Md=ye(Rd,[["render",Id]]),Dd=e=>({mounted(t,n){var g,f,d;const a=(g=e.currentRoute.value.meta)==null?void 0:g.permissions,{value:i,modifiers:l}=n,s=(f=r.toRaw(i))==null?void 0:f.length;if(!s)return;let c=!1,u=0;a.forEach(y=>{i.includes(y)&&u++}),l.all?c=u===s:c=u>0,c||(d=t.parentNode)==null||d.removeChild(t)}}),Fd=()=>r.getCurrentInstance().appContext,Ld=()=>{const e=Fd(),t=wo.useRouter();e.directives.permission||e.app.directive("permission",Dd(t))},xd={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};function dt(e){"@babel/helpers - typeof";return dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(e)}function jd(e,t){if(dt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(dt(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kd(e){var t=jd(e,"string");return dt(t)=="symbol"?t:String(t)}function zd(e,t,n){return t=Kd(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function fo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uo(Object(n),!0).forEach(function(o){zd(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}var Ud={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const Gd=Ud;var Vd={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};const po=Vd;var mo={lang:fo({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Gd),timePickerLocale:fo({},po)};mo.lang.ok="确定";const go=mo;var fe="${label}不是一个有效的${type}",Yd={locale:"zh-cn",Pagination:xd,DatePicker:go,TimePicker:po,Calendar:go,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:fe,method:fe,array:fe,object:fe,number:fe,date:fe,boolean:fe,integer:fe,float:fe,regexp:fe,email:fe,url:fe,hex:fe},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"}};const Hd=Yd,Wd=r.defineComponent({name:"PageRenderer",components:{TablePage:co,TabsPage:Md,FormModal:vn,ConfigProvider:D.ConfigProvider},props:{options:{type:Object,default:null},form:{type:Object,default:()=>{}},customEvent:{type:Object}},setup(e,{expose:t}){const n=Rt(),o=r.ref(null),a=r.ref(null),i=r.ref(""),l=r.ref(null),s=r.ref([]),c=r.ref(),u={title:"",component:null},{selectedErrorRowKeys:g}=it(),f=r.shallowRef(u),d=r.ref(e.options),y=r.ref(!1),T=r.inject("actionGuard",null);r.onMounted(()=>{h()});const m=_e(`/duckbill-data-query-server/table/search/${n.meta.category}`),h=async()=>{const{category:p,tab:S}=n.meta;if(!e.options&&p&&S){y.value=!0;try{const $=await m({category:p,tab:S,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});d.value=$.data}catch{D.message.error("页面配置请求失败!")}finally{y.value=!1}}},w={locale:Hd,transformCellText:({text:p,column:S,record:$})=>!S||S.dataIndex==="action"?p:ot($[S.dataIndex])||$[S.dataIndex]===""?" - ":p};r.provide("refreshPage",h),r.provide("emitHandler",(p,S,$)=>{var A,_,O;const b=cn(S);if(e.form===void 0||!e.form[p]){const E=(A=e.customEvent)==null?void 0:A[p];if(!E)return T?T(p,b):D.message.warn("没有找到自定义事件处理函数"),$==null?void 0:$();try{E(b,v=>{var G;const z=(G=d.value.page)==null?void 0:G.rowKey;z&&v.forEach(B=>{var P;B[z]&&g[(P=d.value.page)==null?void 0:P.name].push(B[z])})}).finally(()=>{setTimeout(()=>{$==null||$()},100)})}catch(v){((_=v.message)==null?void 0:_.indexOf("finally"))>-1?D.message.warn("自定义事件处理函数必须返回一个Promise"):D.message.warn(v.message)}}else(((O=e.customEvent)==null?void 0:O[p])||(()=>Promise.resolve()))(b,v=>{var G;const z=(G=d.value.page)==null?void 0:G.rowKey;z&&v.forEach(B=>{var P;B[z]&&g[(P=d.value.page)==null?void 0:P.name].push(B[z])})}).then(v=>{var z;c.value=v,f.value=e.form[p],s.value=f.value.needSelectRows===!1?[]:b,(z=l.value)==null||z.openModal()}).finally(()=>{setTimeout(()=>{$==null||$()},100)})}),Ld();const C=()=>{var p,S;return{basic:(p=o.value)==null?void 0:p.run(),tabs:(S=a.value)==null?void 0:S.run(i.value)}[d.value.type]};return t({run:C}),{run:C,rows:s,tabs:a,table:o,formModal:l,extraData:c,activePageName:i,currentComponent:f,getPopupContainer:w,rendererOptions:d}}}),qd={class:"page-renderer-wrapper"};function Xd(e,t,n,o,a,i){const l=r.resolveComponent("TablePage"),s=r.resolveComponent("TabsPage"),c=r.resolveComponent("FormModal"),u=r.resolveComponent("ConfigProvider");return e.rendererOptions?(r.openBlock(),r.createBlock(u,r.normalizeProps(r.mergeProps({key:0},e.getPopupContainer)),{default:r.withCtx(()=>[r.createElementVNode("div",qd,[e.rendererOptions.type==="basic"?(r.openBlock(),r.createBlock(l,{key:0,page:e.rendererOptions.page,ref:"table"},null,8,["page"])):r.createCommentVNode("",!0),e.rendererOptions.type==="tabs"?(r.openBlock(),r.createBlock(s,{key:1,pages:e.rendererOptions.pages,activePageName:e.activePageName,"onUpdate:activePageName":t[0]||(t[0]=g=>e.activePageName=g),ref:"tabs"},null,8,["pages","activePageName"])):r.createCommentVNode("",!0),r.createVNode(c,{ref:"formModal",form:e.currentComponent,rows:e.rows,"extra-data":e.extraData,onRefresh:e.run},null,8,["form","rows","extra-data","onRefresh"])])]),_:1},16)):r.createCommentVNode("",!0)}const Qd=ye(Wd,[["render",Xd]]),lp="",ho=mt(Qd),Jd=[zt,Tn,Pn,Nn,ho],{enumerations:Zd}=It();function yo(e){Jd.forEach(t=>{t.install?e.use(t):t.name&&e.component(t.name,t)})}const ep={install:yo};V.AIcon=zt,V.DatePicker=Tn,V.DragDrawer=Pn,V.DragModal=Nn,V.LOADING_SIGN=st,V.MAP_SIGN=lt,V.PageRenderer=ho,V.datePickerProps=Sn,V.default=ep,V.enumerations=Zd,V.install=yo,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
4
|
+
*/function Hl(u){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const t in u)if(t!=="default"){const b=Object.getOwnPropertyDescriptor(u,t);Object.defineProperty(k,t,b.get?b:{enumerable:!0,get:()=>u[t]})}}return k.default=u,Object.freeze(k)}const ql=Hl(Le),Wl={name:"@yzsf2e/render-core",version:"1.0.2-alpha.251",main:"dist/render-core",module:"dist/render-core",files:["dist"],scripts:{dev:"storybook dev -p 6006",build:"vite build",lint:"vite lint",release:"node scripts/release.js --gitTag","build-storybook":"storybook build"},publishConfig:{registry:"https://registry.npmjs.org/",access:"public"},author:"yzsf2e",keywords:["vue3","antdv","frontend","component","components"],dependencies:{"@ant-design/icons-vue":"7.0.1","@vueuse/components":"^10.5.0","@vueuse/core":"^10.5.0","@yzsf2e/use":"workspace:^","ant-design-vue":"3.2.20",axios:"^1.6.2","big.js":"^6.2.1",dayjs:"1.11.10",exceljs:"^4.4.0","file-saver":"^2.0.5","lodash-es":"^4.17.21",store:"^2.0.12","v-viewer":"^3.0.13",viewerjs:"^1.11.6","vue-i18n":"^10.0.1","vue-request":"^2.0.3","vue-router":"^4.2.5"},peerDependencies:{"@ant-design/icons-vue":"7.0.1","ant-design-vue":"3.2.20",axios:"^1.6.2",vue:"3.3.4","vue-i18n":"^10.0.1","vue-router":"^4.2.5"},devDependencies:{"@storybook/addon-essentials":"^7.6.6","@storybook/addon-interactions":"^7.6.6","@storybook/addon-links":"^7.6.6","@storybook/blocks":"^7.6.6","@storybook/test":"^7.6.6","@storybook/vue3":"^7.6.6","@storybook/vue3-vite":"^7.6.6","@types/file-saver":"^2.0.7","@types/node":"^18.16.3","@types/vue-i18n":"^7.0.0","@vitejs/plugin-vue":"^4.0.0","@vitejs/plugin-vue-jsx":"^3.0.0",autoprefixer:"^10.4.16",postcss:"^8.4.32",react:"^18.2.0","react-dom":"^18.2.0",sass:"^1.69.5",storybook:"^7.6.6",typescript:"^5.0.4",vite:"^4.4.2",vue:"3.3.4"}},Si=Object.assign,De=location.href.includes("carrierglobe")?"https://api.carrierglobe.com":"https://www.fat.driverglobe.com/api",Jr=()=>T.getCurrentInstance().appContext.config.globalProperties.$axios;function Ms(u){return Object.entries(u).map(([k,t])=>({label:t,value:k}))}const Os=()=>({type:Array,default:()=>[]}),Kl=u=>({type:Number,default:u}),Xl=u=>({type:Boolean,default:u});function je(u){return[`yzs-${u}`]}const Yl=/-(\w)/g,Gl=u=>u.replace(Yl,(k,t)=>t.toUpperCase()),Fe=u=>{const k=u;return k.install=function(t){t.component(k.name,k),t.component(Gl(`-${k.name}`),k)},u},[Zl]=je("date-picker"),Jl={allowClear:!0,autofocus:!1,bordered:!0,format:"YYYY-MM-DD",nextIcon:"icon-right",open:!1,placement:"bottomLeft",popupStyle:{},prevIcon:"icon-left",size:"small",suffixIcon:"icon-calendar",superNextIcon:"icon-double-right",superPrevIcon:"icon-double-left",valueFormat:"YYYY-MM-DD",renderExtraFooter:()=>null,showNow:!0,showTime:!1,showToday:!0},Rs={dateRender:Function,disabled:Boolean,disabledDate:Function,dropdownClassName:String,getPopupContainer:Function,inputReadOnly:Boolean,locale:Object,mode:String,picker:String,placeholder:String,presets:Array,status:String,defaultPickerValue:Object,disabledTime:Function,format:String,value:Object},Ns=Fe(T.defineComponent({name:Zl,props:Rs,emits:["change","ok","update:value","openChange","panelChange"],setup(u,{emit:k,expose:t}){const b=T.ref(null),g=T.computed(()=>Si(u,Jl)),f=i=>{k("ok",i)},o=i=>{k("change",i),k("update:value",i)},a=i=>{k("openChange",i)},r=(i,s)=>{k("openChange",i,s)};t({blur:()=>{var i;(i=b.value)==null||i.blur()},focus:()=>{var i;(i=b.value)==null||i.focus()}});const l={...g.value,ok:f,onChange:o,onOpenChange:a,panelChange:r};return()=>T.createVNode(Ft.DatePicker,T.mergeProps({ref:b},l),null)}})),Ql=T.defineComponent({name:"AIcon",components:ql,props:{type:{required:!0,type:String}}}),$e=(u,k)=>{const t=u.__vccOpts||u;for(const[b,g]of k)t[b]=g;return t};function tc(u,k,t,b,g,f){return T.openBlock(),T.createBlock(T.resolveDynamicComponent(u.type))}const En=$e(Ql,[["render",tc]]),[ec]=je("debounce-button"),rc={name:ec},nc=T.defineComponent({...rc,props:{block:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},ghost:{type:Boolean},href:{},htmlType:{},icon:{},shape:{},size:{default:"middle"},target:{},type:{default:"primary"},loadingTime:{default:5e3},style:{}},emits:["click"],setup(u,{emit:k}){const t=u,b=T.ref(!1);let g=null;function f(){b.value||(b.value=!0,k("click",()=>{b.value=!1,clearTimeout(g)}),g=setTimeout(()=>{b.value=!1},t.loadingTime||0))}return(o,a)=>{const r=T.resolveComponent("a-button");return T.openBlock(),T.createBlock(r,{block:o.block,danger:o.danger,disabled:o.disabled,ghost:o.ghost,href:o.href,"html-type":o.htmlType,icon:o.icon,shape:o.shape,size:o.size,target:o.target,type:o.type,loading:b.value,style:T.normalizeStyle(o.style),onClick:f},{default:T.withCtx(()=>[o.$slots.default?T.renderSlot(o.$slots,"default",{key:0}):T.createCommentVNode("",!0)]),_:3},8,["block","danger","disabled","ghost","href","html-type","icon","shape","size","target","type","loading","style"])}}}),Is=Fe(nc);function js(u){return T.getCurrentScope()?(T.onScopeDispose(u),!0):!1}function Qr(u){let k=!1,t;const b=T.effectScope(!0);return(...g)=>(k||(t=b.run(()=>u(...g)),k=!0),t)}function ze(u){return typeof u=="function"?u():T.unref(u)}const Ps=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ic=u=>typeof u<"u",sc=Object.prototype.toString,oc=u=>sc.call(u)==="[object Object]",ac=()=>{};function lc(u,k){function t(...b){return new Promise((g,f)=>{Promise.resolve(u(()=>k.apply(this,b),{fn:k,thisArg:this,args:b})).then(g).catch(f)})}return t}const Bs=u=>u();function cc(u=Bs){const k=T.ref(!0);function t(){k.value=!1}function b(){k.value=!0}const g=(...f)=>{k.value&&u(...f)};return{isActive:T.readonly(k),pause:t,resume:b,eventFilter:g}}function uc(u){return u||T.getCurrentInstance()}function fc(u,k,t={}){const{eventFilter:b=Bs,...g}=t;return T.watch(u,lc(b,k),g)}function hc(u,k,t={}){const{eventFilter:b,...g}=t,{eventFilter:f,pause:o,resume:a,isActive:r}=cc(b);return{stop:fc(u,k,{...g,eventFilter:f}),pause:o,resume:a,isActive:r}}function dc(u,k={}){if(!T.isRef(u))return T.toRefs(u);const t=Array.isArray(u.value)?Array.from({length:u.value.length}):{};for(const b in u.value)t[b]=T.customRef(()=>({get(){return u.value[b]},set(g){var f;if((f=ze(k.replaceRef))!=null?f:!0)if(Array.isArray(u.value)){const a=[...u.value];a[b]=g,u.value=a}else{const a={...u.value,[b]:g};Object.setPrototypeOf(a,Object.getPrototypeOf(u.value)),u.value=a}else u.value[b]=g}}));return t}function pc(u,k=!0,t){const b=uc(t);b?T.onMounted(u,b):k?u():T.nextTick(u)}function ki(u){var k;const t=ze(u);return(k=t==null?void 0:t.$el)!=null?k:t}const tn=Ps?window:void 0;function en(...u){let k,t,b,g;if(typeof u[0]=="string"||Array.isArray(u[0])?([t,b,g]=u,k=tn):[k,t,b,g]=u,!k)return ac;Array.isArray(t)||(t=[t]),Array.isArray(b)||(b=[b]);const f=[],o=()=>{f.forEach(n=>n()),f.length=0},a=(n,l,i,s)=>(n.addEventListener(l,i,s),()=>n.removeEventListener(l,i,s)),r=T.watch(()=>[ki(k),ze(g)],([n,l])=>{if(o(),!n)return;const i=oc(l)?{...l}:l;f.push(...t.flatMap(s=>b.map(h=>a(n,s,h,i))))},{immediate:!0,flush:"post"}),e=()=>{r(),o()};return js(e),e}function mc(){const u=T.ref(!1);return T.getCurrentInstance()&&T.onMounted(()=>{u.value=!0}),u}function gc(u){const k=mc();return T.computed(()=>(k.value,!!u()))}function bc(u){return JSON.parse(JSON.stringify(u))}const Tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},An="__vueuse_ssr_handlers__",yc=vc();function vc(){return An in Tn||(Tn[An]=Tn[An]||{}),Tn[An]}function wc(u,k){return yc[u]||k}function _c(u){return u==null?"any":u instanceof Set?"set":u instanceof Map?"map":u instanceof Date?"date":typeof u=="boolean"?"boolean":typeof u=="string"?"string":typeof u=="object"?"object":Number.isNaN(u)?"any":"number"}const xc={boolean:{read:u=>u==="true",write:u=>String(u)},object:{read:u=>JSON.parse(u),write:u=>JSON.stringify(u)},number:{read:u=>Number.parseFloat(u),write:u=>String(u)},any:{read:u=>u,write:u=>String(u)},string:{read:u=>u,write:u=>String(u)},map:{read:u=>new Map(JSON.parse(u)),write:u=>JSON.stringify(Array.from(u.entries()))},set:{read:u=>new Set(JSON.parse(u)),write:u=>JSON.stringify(Array.from(u))},date:{read:u=>new Date(u),write:u=>u.toISOString()}},Ds="vueuse-storage";function Fs(u,k,t,b={}){var g;const{flush:f="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:r=!0,mergeDefaults:e=!1,shallow:n,window:l=tn,eventFilter:i,onError:s=B=>{console.error(B)},initOnMounted:h}=b,d=(n?T.shallowRef:T.ref)(typeof k=="function"?k():k);if(!t)try{t=wc("getDefaultStorage",()=>{var B;return(B=tn)==null?void 0:B.localStorage})()}catch(B){s(B)}if(!t)return d;const c=ze(k),p=_c(c),m=(g=b.serializer)!=null?g:xc[p],{pause:S,resume:C}=hc(d,()=>M(d.value),{flush:f,deep:o,eventFilter:i});return l&&a&&pc(()=>{en(l,"storage",N),en(l,Ds,$),h&&N()}),h||N(),d;function M(B){try{if(B==null)t.removeItem(u);else{const D=m.write(B),U=t.getItem(u);U!==D&&(t.setItem(u,D),l&&l.dispatchEvent(new CustomEvent(Ds,{detail:{key:u,oldValue:U,newValue:D,storageArea:t}})))}}catch(D){s(D)}}function P(B){const D=B?B.newValue:t.getItem(u);if(D==null)return r&&c!=null&&t.setItem(u,m.write(c)),c;if(!B&&e){const U=m.read(D);return typeof e=="function"?e(U,c):p==="object"&&!Array.isArray(U)?{...c,...U}:U}else return typeof D!="string"?D:m.read(D)}function $(B){N(B.detail)}function N(B){if(!(B&&B.storageArea!==t)){if(B&&B.key==null){d.value=c;return}if(!(B&&B.key!==u)){S();try{(B==null?void 0:B.newValue)!==m.write(d.value)&&(d.value=P(B))}catch(D){s(D)}finally{B?T.nextTick(C):C()}}}}}function Sc(u,k={}){var t,b;const{pointerTypes:g,preventDefault:f,stopPropagation:o,exact:a,onMove:r,onEnd:e,onStart:n,initialValue:l,axis:i="both",draggingElement:s=tn,containerElement:h,handle:d=u}=k,c=T.ref((t=ze(l))!=null?t:{x:0,y:0}),p=T.ref(),m=$=>g?g.includes($.pointerType):!0,S=$=>{ze(f)&&$.preventDefault(),ze(o)&&$.stopPropagation()},C=$=>{var N;if(!m($)||ze(a)&&$.target!==ze(u))return;const B=ze(h),D=(N=B==null?void 0:B.getBoundingClientRect)==null?void 0:N.call(B),U=ze(u).getBoundingClientRect(),z={x:$.clientX-(B?U.left-D.left:U.left),y:$.clientY-(B?U.top-D.top:U.top)};(n==null?void 0:n(z,$))!==!1&&(p.value=z,S($))},M=$=>{var N;if(!m($)||!p.value)return;const B=ze(h),D=(N=B==null?void 0:B.getBoundingClientRect)==null?void 0:N.call(B),U=ze(u).getBoundingClientRect();let{x:z,y:E}=c.value;(i==="x"||i==="both")&&(z=$.clientX-p.value.x,B&&(z=Math.min(Math.max(0,z),D.width-U.width))),(i==="y"||i==="both")&&(E=$.clientY-p.value.y,B&&(E=Math.min(Math.max(0,E),D.height-U.height))),c.value={x:z,y:E},r==null||r(c.value,$),S($)},P=$=>{m($)&&p.value&&(p.value=void 0,e==null||e(c.value,$),S($))};if(Ps){const $={capture:(b=k.capture)!=null?b:!0};en(d,"pointerdown",C,$),en(s,"pointermove",M,$),en(s,"pointerup",P,$)}return{...dc(c),position:c,isDragging:T.computed(()=>!!p.value),style:T.computed(()=>`left:${c.value.x}px;top:${c.value.y}px;`)}}function kc(u,k,t={}){const{window:b=tn,...g}=t;let f;const o=gc(()=>b&&"ResizeObserver"in b),a=()=>{f&&(f.disconnect(),f=void 0)},r=T.computed(()=>Array.isArray(u)?u.map(l=>ki(l)):[ki(u)]),e=T.watch(r,l=>{if(a(),o.value&&b){f=new ResizeObserver(k);for(const i of l)i&&f.observe(i,g)}},{immediate:!0,flush:"post",deep:!0}),n=()=>{a(),e()};return js(n),{isSupported:o,stop:n}}function Ye(u,k,t,b={}){var g,f,o;const{clone:a=!1,passive:r=!1,eventName:e,deep:n=!1,defaultValue:l,shouldEmit:i}=b,s=T.getCurrentInstance(),h=t||(s==null?void 0:s.emit)||((g=s==null?void 0:s.$emit)==null?void 0:g.bind(s))||((o=(f=s==null?void 0:s.proxy)==null?void 0:f.$emit)==null?void 0:o.bind(s==null?void 0:s.proxy));let d=e;k||(k="modelValue"),d=d||`update:${k.toString()}`;const c=S=>a?typeof a=="function"?a(S):bc(S):S,p=()=>ic(u[k])?c(u[k]):l,m=S=>{i?i(S)&&h(d,S):h(d,S)};if(r){const S=p(),C=T.ref(S);let M=!1;return T.watch(()=>u[k],P=>{M||(M=!0,C.value=c(P),T.nextTick(()=>M=!1))}),T.watch(C,P=>{!M&&(P!==u[k]||n)&&m(P)},{deep:n}),C}else return T.computed({get(){return p()},set(S){m(S)}})}const[Cc]=je("drag-drawer"),Ec=T.defineComponent({name:Cc,components:{CloseOutlined:Le.CloseOutlined,ShrinkOutlined:Le.ShrinkOutlined,ArrowsAltOutlined:Le.ArrowsAltOutlined},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},mask:{type:Boolean,default:!1},width:{type:[Number,String],default:500},getContainer:{type:Function,default:()=>{if(document.querySelector(".page-renderer-wrapper"))return document.querySelector(".page-renderer-wrapper");if(document.querySelector(".main__container"))return document.querySelector(".main__container")}},hideFooter:{type:Boolean,default:!1}},setup(u,{emit:k}){const t=T.ref(null),b=Ye(u,"visible",k),g=T.ref(u.width),f=T.ref(!1),o=()=>b.value=!1,a=()=>u.getContainer(),r=a(),e=500,n=()=>{g.value=f.value?u.width:"100%",f.value=!f.value};return T.watch(b,i=>{i||(f.value=!1,g.value=u.width)}),{show:b,fullScreen:f,dragDrawer:t,actualWidth:g,getContainerFn:a,handleClose:o,toggleFullScreen:n,handleMouseDown:i=>{const s=i.clientX,h=g.value,d=(r==null?void 0:r.clientWidth)||document.body.clientWidth;document.body.classList.add("disable-select-in-dragging"),window.onmousemove=function(c){const m=c.clientX-s,S=typeof h=="number"?h-m:window.innerWidth-c.x;g.value=Math.min(S<e?e:S,d)},window.onmouseup=()=>{window.onmousemove=null,document.body.classList.remove("disable-select-in-dragging")}}}}}),W2="",Tc={key:0,style:{position:"absolute",bottom:"0",left:"0",height:"50px","line-height":"49px",width:"100%","border-top":"1px solid #eee","box-sizing":"content-box","background-color":"#fff","z-index":"2"}};function Ac(u,k,t,b,g,f){const o=T.resolveComponent("ArrowsAltOutlined"),a=T.resolveComponent("ShrinkOutlined"),r=T.resolveComponent("CloseOutlined"),e=T.resolveComponent("a-space"),n=T.resolveComponent("a-button"),l=T.resolveComponent("a-drawer");return T.openBlock(),T.createBlock(l,{ref:"dragDrawer",class:"drag-drawer-warpper",placement:"right",mask:u.mask,width:u.actualWidth,"get-container":u.getContainerFn,closable:!1,"destroy-on-close":!0,push:!0,visible:u.show,"onUpdate:visible":k[1]||(k[1]=i=>u.show=i)},{title:T.withCtx(()=>[u.title?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createTextVNode(T.toDisplayString(u.title),1)],64)):T.renderSlot(u.$slots,"title",{key:1})]),extra:T.withCtx(()=>[T.createVNode(e,{style:{transform:"translateY(2px)"}},{default:T.withCtx(()=>[u.fullScreen?(T.openBlock(),T.createBlock(a,{key:1,style:{color:"#000","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:u.toggleFullScreen},null,8,["onClick"])):(T.openBlock(),T.createBlock(o,{key:0,style:{color:"#000","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:u.toggleFullScreen},null,8,["onClick"])),T.createVNode(r,{style:{color:"#000","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:u.handleClose},null,8,["onClick"])]),_:1})]),default:T.withCtx(()=>[T.renderSlot(u.$slots,"default"),T.createElementVNode("div",{class:"drag-trigger",onMousedown:k[0]||(k[0]=i=>u.handleMouseDown(i))},null,32),u.hideFooter?T.createCommentVNode("",!0):(T.openBlock(),T.createElementBlock("div",Tc,[T.createVNode(e,{style:{"padding-left":"20px"}},{default:T.withCtx(()=>[T.createVNode(n,{onClick:u.handleClose},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("close")||"关闭"),1)]),_:1},8,["onClick"]),T.renderSlot(u.$slots,"footBtn")]),_:3})]))]),_:3},8,["mask","width","get-container","visible"])}const Ls=Fe($e(Ec,[["render",Ac]])),Ue=()=>{try{return As.useI18n()}catch{return{t:()=>{}}}},[Mc]=je("page-renderer-form-modal"),Oc=T.defineComponent({name:Mc,components:{Modal:Ft.Modal,Button:Ft.Button,Space:Ft.Space},props:{form:{type:Object,required:!0},rows:{type:Array,default:()=>[]},extraData:{type:Object},getContainer:{type:Function,default:()=>{if(document.querySelector(".page-renderer-wrapper"))return document.querySelector(".page-renderer-wrapper");if(document.querySelector(".main__container"))return document.querySelector(".main__container")}}},emits:["refresh"],setup(u,{expose:k,emit:t}){const{t:b}=Ue(),{form:g}=T.toRefs(u),f=T.ref(!1),o=T.ref(!1),a=T.ref(null),r=T.reactive({showOk:!0}),e=async()=>{var s,h;o.value=!0;const i=((s=a.value)==null?void 0:s.finish)||(()=>Promise.resolve({success:!0}));(h=a.value)!=null&&h.finish||console.warn("form组件没有提供finish方法"),i().then(d=>{const{needFeedback:c=!0,needRefresh:p=!0,successMsg:m=b("operationSuccessful")||"操作成功"}=g.value;o.value=!1,d&&d.success&&(c&&Ft.message.success(m),l(),p&&t("refresh"))}).catch(d=>{var p;if(o.value=!1,console.log("[PageRendererFormModal handleOk Error]: ",d),typeof d=="string")return Ft.message.warn(d);const{errorFields:c}=d;c&&c.length&&Ft.message.warn((p=c[0])==null?void 0:p.errors.join("、"))})};T.watch(f,i=>{i&&T.nextTick(()=>{const s=document.querySelector(".ant-modal-root"),h=s==null?void 0:s.querySelector(".ant-modal-header"),d=s==null?void 0:s.querySelector(".ant-modal");h.style.cursor="move";const c=d.currentStyle||window.getComputedStyle(d,null);h.onmousedown=p=>{const m=p.clientX-h.offsetLeft,S=p.clientY-h.offsetTop;let C,M;c.left.includes("%")?(C=+document.body.clientWidth*(+c.left.replace(/%/g,"")/100),M=+document.body.clientHeight*(+c.top.replace(/%/g,"")/100)):(C=+c.left.replace(/\px/g,""),M=+c.top.replace(/\px/g,"")),document.onmousemove=function(P){const $=P.clientX-m,N=P.clientY-S;d.style.left=`${$+C}px`,d.style.top=`${N+M}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})});const n=()=>f.value=!0,l=()=>{var i,s;(s=(i=a.value)==null?void 0:i.reset)==null||s.call(i),f.value=!1};return k({openModal:n,closeModal:l}),{handleOk:e,closeModal:l,visible:f,modalConfig:r,currentForm:a,confirmLoading:o}}}),X2="",Rc={key:1};function Nc(u,k,t,b,g,f){const o=T.resolveComponent("Button"),a=T.resolveComponent("Space"),r=T.resolveComponent("Modal");return T.openBlock(),T.createBlock(r,T.mergeProps({"wrap-class-name":"drag-modal-wrapper",visible:u.visible,"onUpdate:visible":k[1]||(k[1]=e=>u.visible=e)},u.form.modalProps,{"destroy-on-close":!0,"get-container":u.getContainer,onCancel:u.closeModal}),{title:T.withCtx(()=>[T.createElementVNode("span",null,T.toDisplayString(u.form.title),1)]),footer:T.withCtx(()=>{var e;return[((e=u.form.modalProps)==null?void 0:e.hideFooter)!==!0?(T.openBlock(),T.createBlock(a,{key:0},{default:T.withCtx(()=>{var n;return[T.createVNode(o,{onClick:u.closeModal},{default:T.withCtx(()=>{var l;return[T.createTextVNode(T.toDisplayString(((l=u.form.modalProps)==null?void 0:l.cancelText)||u.$t("cancel")||"取消"),1)]}),_:1},8,["onClick"]),((n=u.form.modalProps)==null?void 0:n.hideOkButton)!==!0&&u.modalConfig.showOk?(T.openBlock(),T.createBlock(o,{key:0,type:"primary",onClick:u.handleOk,loading:u.confirmLoading},{default:T.withCtx(()=>{var l;return[T.createTextVNode(T.toDisplayString(((l=u.form.modalProps)==null?void 0:l.okText)||u.$t("ok")||"确定"),1)]}),_:1},8,["onClick","loading"])):T.createCommentVNode("",!0)]}),_:1})):T.createCommentVNode("",!0)]}),default:T.withCtx(()=>[u.form.component?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(u.form.component),T.mergeProps({key:0,rows:u.rows,"extra-data":u.extraData},u.form.props,{modalConfig:u.modalConfig,"onUpdate:modalConfig":k[0]||(k[0]=e=>u.modalConfig=e),ref:"currentForm"}),null,16,["rows","extra-data","modalConfig"])):(T.openBlock(),T.createElementBlock("span",Rc,"form配置中没有为【"+T.toDisplayString(u.form.title)+"】事件提供组件",1))]),_:1},16,["visible","get-container","onCancel"])}const $s=$e(Oc,[["render",Nc]]),zs=Fe($s),[Ic]=je("drag-modal-plus"),jc=T.defineComponent({name:Ic,components:{Modal:Ft.Modal,Button:Ft.Button,Space:Ft.Space},props:{visible:{type:Boolean,default:!1},title:{type:String,default:"标题"},width:{type:[Number,String],default:500},cancelText:{type:String,default:""},modalProps:{type:Object,default:()=>({})},getContainer:{type:Function,default:()=>{if(document.querySelector(".page-renderer-wrapper"))return document.querySelector(".page-renderer-wrapper");if(document.querySelector(".main__container"))return document.querySelector(".main__container")}},hideFooter:{type:Boolean,default:!1}},emits:["update:visible"],setup(u,{expose:k,emit:t}){const b=T.ref(null),g=Ye(u,"visible",t);function f(){if(!g.value)return;const r=document.querySelector(".ant-modal-root"),e=r==null?void 0:r.querySelector(".ant-modal-header"),n=r==null?void 0:r.querySelector(".ant-modal");e.style.cursor="move";const l=n.currentStyle||window.getComputedStyle(n,null);e.onmousedown=i=>{const s=i.clientX-e.offsetLeft,h=i.clientY-e.offsetTop;let d,c;l.left.includes("%")?(d=+document.body.clientWidth*(+l.left.replace(/%/g,"")/100),c=+document.body.clientHeight*(+l.top.replace(/%/g,"")/100)):(d=+l.left.replace(/\px/g,""),c=+l.top.replace(/\px/g,"")),document.onmousemove=function(p){const m=p.clientX-s,S=p.clientY-h;n.style.left=`${m+d}px`,n.style.top=`${S+c}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}}T.watch(g,r=>{T.nextTick(()=>{setTimeout(f,500)})},{immediate:!0,flush:"post"});const o=()=>g.value=!1;return k({openModal:()=>g.value=!0,closeModal:o}),{show:g,closeModal:o,dragModalPlusRef:b}}}),Y2="";function Pc(u,k,t,b,g,f){const o=T.resolveComponent("Button"),a=T.resolveComponent("Space"),r=T.resolveComponent("Modal");return T.openBlock(),T.createBlock(r,T.mergeProps({ref:"dragModalPlusRef","wrap-class-name":"drag-modal-wrapper"},u.modalProps,{visible:u.show,"onUpdate:visible":k[0]||(k[0]=e=>u.show=e),width:u.width,"destroy-on-close":!0,"get-container":u.getContainer,onCancel:u.closeModal}),{title:T.withCtx(()=>[T.createElementVNode("span",null,T.toDisplayString(u.title),1)]),footer:T.withCtx(()=>[u.hideFooter?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(a,{key:0},{default:T.withCtx(()=>[T.createVNode(o,{onClick:u.closeModal},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.cancelText||u.$t("cancel")||"取消"),1)]),_:1},8,["onClick"]),T.renderSlot(u.$slots,"footBtn")]),_:3}))]),default:T.withCtx(()=>[T.renderSlot(u.$slots,"default")]),_:3},16,["visible","width","get-container","onCancel"])}const Us=Fe($e(jc,[["render",Pc]])),mr=Qr(()=>{const u=Jr(),k=T.ref({}),t=T.ref({}),b=T.ref({}),g=async(r,e)=>{const n=`${r}-${e}`;if(b.value[n])return b.value[n];const l=await u({url:`${De}/base-biz-data-server/query/data/apiDataSource/${r}/${e}`,method:"get"});return b.value[n]=l.data,b.value[n]};return{getApiDataSource:g,getEnumData:async(r,e,n)=>{const l=n?JSON.stringify(n):"",i=`${r}-${e}-${l}`;if(t.value[i])return t.value[i];const s=await g(r,e);s.async&&!location.href.includes("carrierglobe")&&(Ft.message.warn(`当前词条 ${e} 是懒加载数据源,请使用 YzsEnumFuzzySelect 组件!`),console.error(`当前词条 ${e} 是懒加载数据源,请使用 YzsEnumFuzzySelect 组件!`));let h={};try{h=JSON.parse(s.apiParam)}catch{h={}}const d=await u({url:`${De}${s.apiUrl}`,method:s.apiPost?"post":"get",[s.apiPost?"data":"params"]:{...h,...n}});return t.value[i]=d,t.value[i]},getI18nBizCodeList:async(r,e,n)=>(await u({url:`${De}/base-biz-data-server/query/i18n/biz/code/list`,method:"post",data:{codeType:r,attributeName:e,dataCodes:n}})).data,getDepartmentAuthData:async()=>{if(k.value.auth)return k.value;const[r,e]=await Promise.all([u({url:`${De}/iam-auth-web/auth/user/token/userInfo`,method:"post"}),u({url:`${De}/iam-auth-web/auth/user/user/data/org`,method:"get"})]);return k.value.auth=e.data,k.value.userInfo=r.data,k.value}}}),[Bc]=je("enum-select"),Dc={name:Bc},Fc=T.defineComponent({...Dc,props:{value:{},code:{},name:{},label:{},codeType:{default:"we"},required:{type:Boolean},showLabel:{type:Boolean,default:!0},disabled:{type:Boolean},placeholder:{},params:{},formItemProps:{},selectProps:{default:()=>({allowClear:!0,showSearch:!0})},transform:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,{t:b}=Ue(),g=Ye(t,"value",k);let f="";const o=T.ref([]),{getEnumData:a}=mr(),r=T.computed(()=>({required:t.required,...t.formItemProps})),e=T.computed(()=>({allowClear:!0,showSearch:!0,optionFilterProp:"label",...t.selectProps,disabled:t.disabled,placeholder:t.disabled?"":n()}));function n(){return t.placeholder?t.placeholder:b("pleaseSelect")?`${b("pleaseSelect")}${t.label||b(t.code)}`:""}async function l(){const c=await a(t.codeType,t.code,t.params);o.value=await(t.transform?Promise.resolve(t.transform(c)):Promise.resolve(c.data))}T.watch([()=>t.codeType,()=>t.code,()=>t.params],()=>{l()},{deep:!0,immediate:!0});function i(c){(c.keyCode===13||c.key==="Enter")&&setTimeout(()=>k("pressEnter"))}function s(c){k("change",c)}function h(c){f=c}const d=(c="",p)=>{const m=c.trim().toLowerCase();return String(p.label??p.value).toLowerCase().includes(m)};return(c,p)=>{const m=T.resolveComponent("a-select"),S=T.resolveComponent("a-form-item");return c.showLabel!==!1?(T.openBlock(),T.createBlock(S,T.mergeProps({key:0,name:c.name,label:c.label||T.unref(b)(c.code)||c.code},r.value),{default:T.withCtx(()=>[T.createVNode(m,T.mergeProps({value:T.unref(g),"onUpdate:value":p[0]||(p[0]=C=>T.isRef(g)?g.value=C:null),options:o.value},e.value,{class:[{"enum-select-selector-active":Array.isArray(T.unref(g))?T.unref(g).length>0:T.unref(g)},"enum-select-selector"],"filter-option":d,onSearch:h,onChange:s,onKeydown:i}),T.createSlots({_:2},[c.$slots.option?{name:"option",fn:T.withCtx(C=>[T.renderSlot(c.$slots,"option",T.normalizeProps(T.guardReactiveProps({...C,searchValue:T.unref(f)})))]),key:"0"}:void 0]),1040,["value","options","class"])]),_:3},16,["name","label"])):(T.openBlock(),T.createBlock(m,T.mergeProps({key:1,value:T.unref(g),"onUpdate:value":p[1]||(p[1]=C=>T.isRef(g)?g.value=C:null),options:o.value},e.value,{class:[{"enum-select-selector-active":Array.isArray(T.unref(g))?T.unref(g).length>0:T.unref(g)},"enum-select-selector"],"filter-option":d,onSearch:h,onChange:s,onKeydown:i}),T.createSlots({_:2},[c.$slots.option?{name:"option",fn:T.withCtx(C=>[T.renderSlot(c.$slots,"option",T.normalizeProps(T.guardReactiveProps({...C,searchValue:T.unref(f)})))]),key:"0"}:void 0]),1040,["value","options","class"]))}}}),Z2="",Ci=Fe(Fc),Lc=["title"],$c=["innerHTML"],zc={key:0,class:"yzs-select-staff-option-extinfo"},Uc={key:1,class:"yzs-select-staff-option-resigned"},[Vc]=je("select-staff-option"),Hc={name:Vc},Vs=T.defineComponent({...Hc,props:{label:{default:""},value:{},searchValue:{default:""},ext:{default:{resign:0,mainDeptNames:""}}},setup(u){const k=(t,b)=>{if(!b)return t;const g=new RegExp(`(${b})`,"gi");return t.replace(g,'<span style="color:#448ef7;">$1</span>')};return(t,b)=>(T.openBlock(),T.createElementBlock("div",{class:"yzs-select-staff-option",title:`${t.label} ${t.ext.mainDeptNames?"/"+t.ext.mainDeptNames:""} ${t.ext.resign==1?"[已离职]":""}`},[T.createElementVNode("span",{innerHTML:k(t.label,t.searchValue)},null,8,$c),T.createTextVNode(" "),t.ext.mainDeptNames?(T.openBlock(),T.createElementBlock("span",zc,"/"+T.toDisplayString(t.ext.mainDeptNames)+" ",1)):T.createCommentVNode("",!0),t.ext.resign==1?(T.openBlock(),T.createElementBlock("span",Uc,"已离职")):T.createCommentVNode("",!0)],8,Lc))}}),J2="",[qc]=je("enum-custom-select"),Wc={name:qc},Kc=T.defineComponent({...Wc,props:{value:{},code:{},name:{},label:{},codeType:{default:"we"},required:{type:Boolean},showLabel:{type:Boolean,default:!0},disabled:{type:Boolean},placeholder:{},params:{},formItemProps:{},selectProps:{},transform:{},auth:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,b=Ye(t,"value",k),g=T.ref(!1),f=T.ref({access:"",departments:[]});let o=l=>(l==null?void 0:l.data)||[];const{getDepartmentAuthData:a}=mr();r(t.auth);function r(l){l==="DEPARTMENT"&&(g.value=!0,a().then(i=>{f.value=i.auth,o=s=>{if(i.auth.access==="SELF")return[{label:i.userInfo.nick,value:i.userInfo.huid,ext:{mainDeptNames:"",resign:"0"}}];if(i.auth.access==="DEPT"){const h=(s==null?void 0:s.data)||[],d=(i.auth.departments||[]).map(c=>c.departmentId);return h.filter(c=>d.some(p=>{var m;return(((m=c==null?void 0:c.ext)==null?void 0:m.mainDeptIds)||"").includes(p)}))}else if(i.auth.access==="ALL")return(s==null?void 0:s.data)||[];return(s==null?void 0:s.data)||[]}}).finally(()=>{g.value=!1}))}const e=()=>k("pressEnter"),n=l=>k("change",l);return(l,i)=>{const s=T.resolveComponent("YzsEnumFuzzyCustomSelect"),h=T.resolveComponent("YzsEnumSelect");return g.value?T.createCommentVNode("",!0):(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[f.value.access==="ALL"?(T.openBlock(),T.createBlock(s,T.mergeProps({key:0},t,{value:T.unref(b),"onUpdate:value":i[0]||(i[0]=d=>T.isRef(b)?b.value=d:null),"show-warn":!1,onPressEnter:e,onChange:n}),null,16,["value"])):(T.openBlock(),T.createBlock(h,T.mergeProps({key:1},t,{value:T.unref(b),"onUpdate:value":i[1]||(i[1]=d=>T.isRef(b)?b.value=d:null),transform:T.unref(o),onPressEnter:e,onChange:n}),{option:T.withCtx(({value:d,label:c,ext:p,searchValue:m})=>[T.createVNode(Vs,{value:d,label:c,ext:p,searchValue:m},null,8,["value","label","ext","searchValue"])]),_:1},16,["value","transform"]))],64))}}}),Ei=Fe(Kc);var Xc=typeof global=="object"&&global&&global.Object===Object&&global;const Hs=Xc;var Yc=typeof self=="object"&&self&&self.Object===Object&&self,Gc=Hs||Yc||Function("return this")();const Ge=Gc;var Zc=Ge.Symbol;const tr=Zc;var qs=Object.prototype,Jc=qs.hasOwnProperty,Qc=qs.toString,rn=tr?tr.toStringTag:void 0;function tu(u){var k=Jc.call(u,rn),t=u[rn];try{u[rn]=void 0;var b=!0}catch{}var g=Qc.call(u);return b&&(k?u[rn]=t:delete u[rn]),g}var eu=Object.prototype,ru=eu.toString;function nu(u){return ru.call(u)}var iu="[object Null]",su="[object Undefined]",Ws=tr?tr.toStringTag:void 0;function gr(u){return u==null?u===void 0?su:iu:Ws&&Ws in Object(u)?tu(u):nu(u)}function sr(u){return u!=null&&typeof u=="object"}var ou="[object Symbol]";function Mr(u){return typeof u=="symbol"||sr(u)&&gr(u)==ou}function Or(u,k){for(var t=-1,b=u==null?0:u.length,g=Array(b);++t<b;)g[t]=k(u[t],t,u);return g}var au=Array.isArray;const Pe=au;var lu=1/0,Ks=tr?tr.prototype:void 0,Xs=Ks?Ks.toString:void 0;function Ys(u){if(typeof u=="string")return u;if(Pe(u))return Or(u,Ys)+"";if(Mr(u))return Xs?Xs.call(u):"";var k=u+"";return k=="0"&&1/u==-lu?"-0":k}var cu=/\s/;function uu(u){for(var k=u.length;k--&&cu.test(u.charAt(k)););return k}var fu=/^\s+/;function hu(u){return u&&u.slice(0,uu(u)+1).replace(fu,"")}function We(u){var k=typeof u;return u!=null&&(k=="object"||k=="function")}var Gs=0/0,du=/^[-+]0x[0-9a-f]+$/i,pu=/^0b[01]+$/i,mu=/^0o[0-7]+$/i,gu=parseInt;function Ti(u){if(typeof u=="number")return u;if(Mr(u))return Gs;if(We(u)){var k=typeof u.valueOf=="function"?u.valueOf():u;u=We(k)?k+"":k}if(typeof u!="string")return u===0?u:+u;u=hu(u);var t=pu.test(u);return t||mu.test(u)?gu(u.slice(2),t?2:8):du.test(u)?Gs:+u}var Zs=1/0,bu=17976931348623157e292;function yu(u){if(!u)return u===0?u:0;if(u=Ti(u),u===Zs||u===-Zs){var k=u<0?-1:1;return k*bu}return u===u?u:0}function vu(u){var k=yu(u),t=k%1;return k===k?t?k-t:k:0}function Js(u){return u}var wu="[object AsyncFunction]",_u="[object Function]",xu="[object GeneratorFunction]",Su="[object Proxy]";function Qs(u){if(!We(u))return!1;var k=gr(u);return k==_u||k==xu||k==wu||k==Su}var ku=Ge["__core-js_shared__"];const Ai=ku;var to=function(){var u=/[^.]+$/.exec(Ai&&Ai.keys&&Ai.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}();function Cu(u){return!!to&&to in u}var Eu=Function.prototype,Tu=Eu.toString;function br(u){if(u!=null){try{return Tu.call(u)}catch{}try{return u+""}catch{}}return""}var Au=/[\\^$.*+?()[\]{}|]/g,Mu=/^\[object .+?Constructor\]$/,Ou=Function.prototype,Ru=Object.prototype,Nu=Ou.toString,Iu=Ru.hasOwnProperty,ju=RegExp("^"+Nu.call(Iu).replace(Au,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pu(u){if(!We(u)||Cu(u))return!1;var k=Qs(u)?ju:Mu;return k.test(br(u))}function Bu(u,k){return u==null?void 0:u[k]}function yr(u,k){var t=Bu(u,k);return Pu(t)?t:void 0}var Du=yr(Ge,"WeakMap");const Mi=Du;var eo=Object.create,Fu=function(){function u(){}return function(k){if(!We(k))return{};if(eo)return eo(k);u.prototype=k;var t=new u;return u.prototype=void 0,t}}();const Lu=Fu;function $u(){}function zu(u,k){var t=-1,b=u.length;for(k||(k=Array(b));++t<b;)k[t]=u[t];return k}var Uu=function(){try{var u=yr(Object,"defineProperty");return u({},"",{}),u}catch{}}();const ro=Uu;function Vu(u,k){for(var t=-1,b=u==null?0:u.length;++t<b&&k(u[t],t,u)!==!1;);return u}function Hu(u,k,t,b){for(var g=u.length,f=t+(b?1:-1);b?f--:++f<g;)if(k(u[f],f,u))return f;return-1}function qu(u){return u!==u}function Wu(u,k,t){for(var b=t-1,g=u.length;++b<g;)if(u[b]===k)return b;return-1}function no(u,k,t){return k===k?Wu(u,k,t):Hu(u,qu,t)}function Ku(u,k){var t=u==null?0:u.length;return!!t&&no(u,k,0)>-1}var Xu=9007199254740991,Yu=/^(?:0|[1-9]\d*)$/;function Mn(u,k){var t=typeof u;return k=k??Xu,!!k&&(t=="number"||t!="symbol"&&Yu.test(u))&&u>-1&&u%1==0&&u<k}function Oi(u,k,t){k=="__proto__"&&ro?ro(u,k,{configurable:!0,enumerable:!0,value:t,writable:!0}):u[k]=t}function On(u,k){return u===k||u!==u&&k!==k}var Gu=Object.prototype,Zu=Gu.hasOwnProperty;function Ri(u,k,t){var b=u[k];(!(Zu.call(u,k)&&On(b,t))||t===void 0&&!(k in u))&&Oi(u,k,t)}function Rn(u,k,t,b){var g=!t;t||(t={});for(var f=-1,o=k.length;++f<o;){var a=k[f],r=b?b(t[a],u[a],a,t,u):void 0;r===void 0&&(r=u[a]),g?Oi(t,a,r):Ri(t,a,r)}return t}var Ju=9007199254740991;function Ni(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=Ju}function Rr(u){return u!=null&&Ni(u.length)&&!Qs(u)}function Qu(u,k,t){if(!We(t))return!1;var b=typeof k;return(b=="number"?Rr(t)&&Mn(k,t.length):b=="string"&&k in t)?On(t[k],u):!1}var tf=Object.prototype;function Ii(u){var k=u&&u.constructor,t=typeof k=="function"&&k.prototype||tf;return u===t}function ef(u,k){for(var t=-1,b=Array(u);++t<u;)b[t]=k(t);return b}var rf="[object Arguments]";function io(u){return sr(u)&&gr(u)==rf}var so=Object.prototype,nf=so.hasOwnProperty,sf=so.propertyIsEnumerable,of=io(function(){return arguments}())?io:function(u){return sr(u)&&nf.call(u,"callee")&&!sf.call(u,"callee")};const oo=of;function af(){return!1}var ao=typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,lo=ao&&typeof module=="object"&&module&&!module.nodeType&&module,lf=lo&&lo.exports===ao,co=lf?Ge.Buffer:void 0,cf=co?co.isBuffer:void 0,uf=cf||af;const Nn=uf;var ff="[object Arguments]",hf="[object Array]",df="[object Boolean]",pf="[object Date]",mf="[object Error]",gf="[object Function]",bf="[object Map]",yf="[object Number]",vf="[object Object]",wf="[object RegExp]",_f="[object Set]",xf="[object String]",Sf="[object WeakMap]",kf="[object ArrayBuffer]",Cf="[object DataView]",Ef="[object Float32Array]",Tf="[object Float64Array]",Af="[object Int8Array]",Mf="[object Int16Array]",Of="[object Int32Array]",Rf="[object Uint8Array]",Nf="[object Uint8ClampedArray]",If="[object Uint16Array]",jf="[object Uint32Array]",xe={};xe[Ef]=xe[Tf]=xe[Af]=xe[Mf]=xe[Of]=xe[Rf]=xe[Nf]=xe[If]=xe[jf]=!0,xe[ff]=xe[hf]=xe[kf]=xe[df]=xe[Cf]=xe[pf]=xe[mf]=xe[gf]=xe[bf]=xe[yf]=xe[vf]=xe[wf]=xe[_f]=xe[xf]=xe[Sf]=!1;function Pf(u){return sr(u)&&Ni(u.length)&&!!xe[gr(u)]}function In(u){return function(k){return u(k)}}var uo=typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,nn=uo&&typeof module=="object"&&module&&!module.nodeType&&module,Bf=nn&&nn.exports===uo,ji=Bf&&Hs.process,Df=function(){try{var u=nn&&nn.require&&nn.require("util").types;return u||ji&&ji.binding&&ji.binding("util")}catch{}}();const Nr=Df;var fo=Nr&&Nr.isTypedArray,Ff=fo?In(fo):Pf;const ho=Ff;var Lf=Object.prototype,$f=Lf.hasOwnProperty;function po(u,k){var t=Pe(u),b=!t&&oo(u),g=!t&&!b&&Nn(u),f=!t&&!b&&!g&&ho(u),o=t||b||g||f,a=o?ef(u.length,String):[],r=a.length;for(var e in u)(k||$f.call(u,e))&&!(o&&(e=="length"||g&&(e=="offset"||e=="parent")||f&&(e=="buffer"||e=="byteLength"||e=="byteOffset")||Mn(e,r)))&&a.push(e);return a}function mo(u,k){return function(t){return u(k(t))}}var zf=mo(Object.keys,Object);const Uf=zf;var Vf=Object.prototype,Hf=Vf.hasOwnProperty;function qf(u){if(!Ii(u))return Uf(u);var k=[];for(var t in Object(u))Hf.call(u,t)&&t!="constructor"&&k.push(t);return k}function Ir(u){return Rr(u)?po(u):qf(u)}function Wf(u){var k=[];if(u!=null)for(var t in Object(u))k.push(t);return k}var Kf=Object.prototype,Xf=Kf.hasOwnProperty;function Yf(u){if(!We(u))return Wf(u);var k=Ii(u),t=[];for(var b in u)b=="constructor"&&(k||!Xf.call(u,b))||t.push(b);return t}function Pi(u){return Rr(u)?po(u,!0):Yf(u)}var Gf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zf=/^\w*$/;function Bi(u,k){if(Pe(u))return!1;var t=typeof u;return t=="number"||t=="symbol"||t=="boolean"||u==null||Mr(u)?!0:Zf.test(u)||!Gf.test(u)||k!=null&&u in Object(k)}var Jf=yr(Object,"create");const sn=Jf;function Qf(){this.__data__=sn?sn(null):{},this.size=0}function th(u){var k=this.has(u)&&delete this.__data__[u];return this.size-=k?1:0,k}var eh="__lodash_hash_undefined__",rh=Object.prototype,nh=rh.hasOwnProperty;function ih(u){var k=this.__data__;if(sn){var t=k[u];return t===eh?void 0:t}return nh.call(k,u)?k[u]:void 0}var sh=Object.prototype,oh=sh.hasOwnProperty;function ah(u){var k=this.__data__;return sn?k[u]!==void 0:oh.call(k,u)}var lh="__lodash_hash_undefined__";function ch(u,k){var t=this.__data__;return this.size+=this.has(u)?0:1,t[u]=sn&&k===void 0?lh:k,this}function vr(u){var k=-1,t=u==null?0:u.length;for(this.clear();++k<t;){var b=u[k];this.set(b[0],b[1])}}vr.prototype.clear=Qf,vr.prototype.delete=th,vr.prototype.get=ih,vr.prototype.has=ah,vr.prototype.set=ch;function uh(){this.__data__=[],this.size=0}function jn(u,k){for(var t=u.length;t--;)if(On(u[t][0],k))return t;return-1}var fh=Array.prototype,hh=fh.splice;function dh(u){var k=this.__data__,t=jn(k,u);if(t<0)return!1;var b=k.length-1;return t==b?k.pop():hh.call(k,t,1),--this.size,!0}function ph(u){var k=this.__data__,t=jn(k,u);return t<0?void 0:k[t][1]}function mh(u){return jn(this.__data__,u)>-1}function gh(u,k){var t=this.__data__,b=jn(t,u);return b<0?(++this.size,t.push([u,k])):t[b][1]=k,this}function or(u){var k=-1,t=u==null?0:u.length;for(this.clear();++k<t;){var b=u[k];this.set(b[0],b[1])}}or.prototype.clear=uh,or.prototype.delete=dh,or.prototype.get=ph,or.prototype.has=mh,or.prototype.set=gh;var bh=yr(Ge,"Map");const on=bh;function yh(){this.size=0,this.__data__={hash:new vr,map:new(on||or),string:new vr}}function vh(u){var k=typeof u;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?u!=="__proto__":u===null}function Pn(u,k){var t=u.__data__;return vh(k)?t[typeof k=="string"?"string":"hash"]:t.map}function wh(u){var k=Pn(this,u).delete(u);return this.size-=k?1:0,k}function _h(u){return Pn(this,u).get(u)}function xh(u){return Pn(this,u).has(u)}function Sh(u,k){var t=Pn(this,u),b=t.size;return t.set(u,k),this.size+=t.size==b?0:1,this}function ar(u){var k=-1,t=u==null?0:u.length;for(this.clear();++k<t;){var b=u[k];this.set(b[0],b[1])}}ar.prototype.clear=yh,ar.prototype.delete=wh,ar.prototype.get=_h,ar.prototype.has=xh,ar.prototype.set=Sh;var kh="Expected a function";function Di(u,k){if(typeof u!="function"||k!=null&&typeof k!="function")throw new TypeError(kh);var t=function(){var b=arguments,g=k?k.apply(this,b):b[0],f=t.cache;if(f.has(g))return f.get(g);var o=u.apply(this,b);return t.cache=f.set(g,o)||f,o};return t.cache=new(Di.Cache||ar),t}Di.Cache=ar;var Ch=500;function Eh(u){var k=Di(u,function(b){return t.size===Ch&&t.clear(),b}),t=k.cache;return k}var Th=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ah=/\\(\\)?/g,Mh=Eh(function(u){var k=[];return u.charCodeAt(0)===46&&k.push(""),u.replace(Th,function(t,b,g,f){k.push(g?f.replace(Ah,"$1"):b||t)}),k});const Oh=Mh;function Rh(u){return u==null?"":Ys(u)}function Bn(u,k){return Pe(u)?u:Bi(u,k)?[u]:Oh(Rh(u))}var Nh=1/0;function an(u){if(typeof u=="string"||Mr(u))return u;var k=u+"";return k=="0"&&1/u==-Nh?"-0":k}function Dn(u,k){k=Bn(k,u);for(var t=0,b=k.length;u!=null&&t<b;)u=u[an(k[t++])];return t&&t==b?u:void 0}function jr(u,k,t){var b=u==null?void 0:Dn(u,k);return b===void 0?t:b}function go(u,k){for(var t=-1,b=k.length,g=u.length;++t<b;)u[g+t]=k[t];return u}var Ih=mo(Object.getPrototypeOf,Object);const bo=Ih;function jh(){this.__data__=new or,this.size=0}function Ph(u){var k=this.__data__,t=k.delete(u);return this.size=k.size,t}function Bh(u){return this.__data__.get(u)}function Dh(u){return this.__data__.has(u)}var Fh=200;function Lh(u,k){var t=this.__data__;if(t instanceof or){var b=t.__data__;if(!on||b.length<Fh-1)return b.push([u,k]),this.size=++t.size,this;t=this.__data__=new ar(b)}return t.set(u,k),this.size=t.size,this}function er(u){var k=this.__data__=new or(u);this.size=k.size}er.prototype.clear=jh,er.prototype.delete=Ph,er.prototype.get=Bh,er.prototype.has=Dh,er.prototype.set=Lh;function $h(u,k){return u&&Rn(k,Ir(k),u)}function zh(u,k){return u&&Rn(k,Pi(k),u)}var yo=typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,vo=yo&&typeof module=="object"&&module&&!module.nodeType&&module,Uh=vo&&vo.exports===yo,wo=Uh?Ge.Buffer:void 0,_o=wo?wo.allocUnsafe:void 0;function Vh(u,k){if(k)return u.slice();var t=u.length,b=_o?_o(t):new u.constructor(t);return u.copy(b),b}function xo(u,k){for(var t=-1,b=u==null?0:u.length,g=0,f=[];++t<b;){var o=u[t];k(o,t,u)&&(f[g++]=o)}return f}function So(){return[]}var Hh=Object.prototype,qh=Hh.propertyIsEnumerable,ko=Object.getOwnPropertySymbols,Wh=ko?function(u){return u==null?[]:(u=Object(u),xo(ko(u),function(k){return qh.call(u,k)}))}:So;const Fi=Wh;function Kh(u,k){return Rn(u,Fi(u),k)}var Xh=Object.getOwnPropertySymbols,Yh=Xh?function(u){for(var k=[];u;)go(k,Fi(u)),u=bo(u);return k}:So;const Co=Yh;function Gh(u,k){return Rn(u,Co(u),k)}function Eo(u,k,t){var b=k(u);return Pe(u)?b:go(b,t(u))}function Li(u){return Eo(u,Ir,Fi)}function To(u){return Eo(u,Pi,Co)}var Zh=yr(Ge,"DataView");const $i=Zh;var Jh=yr(Ge,"Promise");const zi=Jh;var Qh=yr(Ge,"Set");const Pr=Qh;var Ao="[object Map]",td="[object Object]",Mo="[object Promise]",Oo="[object Set]",Ro="[object WeakMap]",No="[object DataView]",ed=br($i),rd=br(on),nd=br(zi),id=br(Pr),sd=br(Mi),wr=gr;($i&&wr(new $i(new ArrayBuffer(1)))!=No||on&&wr(new on)!=Ao||zi&&wr(zi.resolve())!=Mo||Pr&&wr(new Pr)!=Oo||Mi&&wr(new Mi)!=Ro)&&(wr=function(u){var k=gr(u),t=k==td?u.constructor:void 0,b=t?br(t):"";if(b)switch(b){case ed:return No;case rd:return Ao;case nd:return Mo;case id:return Oo;case sd:return Ro}return k});const ln=wr;var od=Object.prototype,ad=od.hasOwnProperty;function ld(u){var k=u.length,t=new u.constructor(k);return k&&typeof u[0]=="string"&&ad.call(u,"index")&&(t.index=u.index,t.input=u.input),t}var cd=Ge.Uint8Array;const Fn=cd;function Ui(u){var k=new u.constructor(u.byteLength);return new Fn(k).set(new Fn(u)),k}function ud(u,k){var t=k?Ui(u.buffer):u.buffer;return new u.constructor(t,u.byteOffset,u.byteLength)}var fd=/\w*$/;function hd(u){var k=new u.constructor(u.source,fd.exec(u));return k.lastIndex=u.lastIndex,k}var Io=tr?tr.prototype:void 0,jo=Io?Io.valueOf:void 0;function dd(u){return jo?Object(jo.call(u)):{}}function pd(u,k){var t=k?Ui(u.buffer):u.buffer;return new u.constructor(t,u.byteOffset,u.length)}var md="[object Boolean]",gd="[object Date]",bd="[object Map]",yd="[object Number]",vd="[object RegExp]",wd="[object Set]",_d="[object String]",xd="[object Symbol]",Sd="[object ArrayBuffer]",kd="[object DataView]",Cd="[object Float32Array]",Ed="[object Float64Array]",Td="[object Int8Array]",Ad="[object Int16Array]",Md="[object Int32Array]",Od="[object Uint8Array]",Rd="[object Uint8ClampedArray]",Nd="[object Uint16Array]",Id="[object Uint32Array]";function jd(u,k,t){var b=u.constructor;switch(k){case Sd:return Ui(u);case md:case gd:return new b(+u);case kd:return ud(u,t);case Cd:case Ed:case Td:case Ad:case Md:case Od:case Rd:case Nd:case Id:return pd(u,t);case bd:return new b;case yd:case _d:return new b(u);case vd:return hd(u);case wd:return new b;case xd:return dd(u)}}function Pd(u){return typeof u.constructor=="function"&&!Ii(u)?Lu(bo(u)):{}}var Bd="[object Map]";function Dd(u){return sr(u)&&ln(u)==Bd}var Po=Nr&&Nr.isMap,Fd=Po?In(Po):Dd;const Ld=Fd;var $d="[object Set]";function zd(u){return sr(u)&&ln(u)==$d}var Bo=Nr&&Nr.isSet,Ud=Bo?In(Bo):zd;const Vd=Ud;var Hd=1,qd=2,Wd=4,Do="[object Arguments]",Kd="[object Array]",Xd="[object Boolean]",Yd="[object Date]",Gd="[object Error]",Fo="[object Function]",Zd="[object GeneratorFunction]",Jd="[object Map]",Qd="[object Number]",Lo="[object Object]",tp="[object RegExp]",ep="[object Set]",rp="[object String]",np="[object Symbol]",ip="[object WeakMap]",sp="[object ArrayBuffer]",op="[object DataView]",ap="[object Float32Array]",lp="[object Float64Array]",cp="[object Int8Array]",up="[object Int16Array]",fp="[object Int32Array]",hp="[object Uint8Array]",dp="[object Uint8ClampedArray]",pp="[object Uint16Array]",mp="[object Uint32Array]",we={};we[Do]=we[Kd]=we[sp]=we[op]=we[Xd]=we[Yd]=we[ap]=we[lp]=we[cp]=we[up]=we[fp]=we[Jd]=we[Qd]=we[Lo]=we[tp]=we[ep]=we[rp]=we[np]=we[hp]=we[dp]=we[pp]=we[mp]=!0,we[Gd]=we[Fo]=we[ip]=!1;function Ln(u,k,t,b,g,f){var o,a=k&Hd,r=k&qd,e=k&Wd;if(t&&(o=g?t(u,b,g,f):t(u)),o!==void 0)return o;if(!We(u))return u;var n=Pe(u);if(n){if(o=ld(u),!a)return zu(u,o)}else{var l=ln(u),i=l==Fo||l==Zd;if(Nn(u))return Vh(u,a);if(l==Lo||l==Do||i&&!g){if(o=r||i?{}:Pd(u),!a)return r?Gh(u,zh(o,u)):Kh(u,$h(o,u))}else{if(!we[l])return g?u:{};o=jd(u,l,a)}}f||(f=new er);var s=f.get(u);if(s)return s;f.set(u,o),Vd(u)?u.forEach(function(c){o.add(Ln(c,k,t,c,u,f))}):Ld(u)&&u.forEach(function(c,p){o.set(p,Ln(c,k,t,p,u,f))});var h=e?r?To:Li:r?Pi:Ir,d=n?void 0:h(u);return Vu(d||u,function(c,p){d&&(p=c,c=u[p]),Ri(o,p,Ln(c,k,t,p,u,f))}),o}var gp=1,bp=4;function cn(u){return Ln(u,gp|bp)}var yp="__lodash_hash_undefined__";function vp(u){return this.__data__.set(u,yp),this}function wp(u){return this.__data__.has(u)}function un(u){var k=-1,t=u==null?0:u.length;for(this.__data__=new ar;++k<t;)this.add(u[k])}un.prototype.add=un.prototype.push=vp,un.prototype.has=wp;function _p(u,k){for(var t=-1,b=u==null?0:u.length;++t<b;)if(k(u[t],t,u))return!0;return!1}function $o(u,k){return u.has(k)}var xp=1,Sp=2;function zo(u,k,t,b,g,f){var o=t&xp,a=u.length,r=k.length;if(a!=r&&!(o&&r>a))return!1;var e=f.get(u),n=f.get(k);if(e&&n)return e==k&&n==u;var l=-1,i=!0,s=t&Sp?new un:void 0;for(f.set(u,k),f.set(k,u);++l<a;){var h=u[l],d=k[l];if(b)var c=o?b(d,h,l,k,u,f):b(h,d,l,u,k,f);if(c!==void 0){if(c)continue;i=!1;break}if(s){if(!_p(k,function(p,m){if(!$o(s,m)&&(h===p||g(h,p,t,b,f)))return s.push(m)})){i=!1;break}}else if(!(h===d||g(h,d,t,b,f))){i=!1;break}}return f.delete(u),f.delete(k),i}function kp(u){var k=-1,t=Array(u.size);return u.forEach(function(b,g){t[++k]=[g,b]}),t}function Vi(u){var k=-1,t=Array(u.size);return u.forEach(function(b){t[++k]=b}),t}var Cp=1,Ep=2,Tp="[object Boolean]",Ap="[object Date]",Mp="[object Error]",Op="[object Map]",Rp="[object Number]",Np="[object RegExp]",Ip="[object Set]",jp="[object String]",Pp="[object Symbol]",Bp="[object ArrayBuffer]",Dp="[object DataView]",Uo=tr?tr.prototype:void 0,Hi=Uo?Uo.valueOf:void 0;function Fp(u,k,t,b,g,f,o){switch(t){case Dp:if(u.byteLength!=k.byteLength||u.byteOffset!=k.byteOffset)return!1;u=u.buffer,k=k.buffer;case Bp:return!(u.byteLength!=k.byteLength||!f(new Fn(u),new Fn(k)));case Tp:case Ap:case Rp:return On(+u,+k);case Mp:return u.name==k.name&&u.message==k.message;case Np:case jp:return u==k+"";case Op:var a=kp;case Ip:var r=b&Cp;if(a||(a=Vi),u.size!=k.size&&!r)return!1;var e=o.get(u);if(e)return e==k;b|=Ep,o.set(u,k);var n=zo(a(u),a(k),b,g,f,o);return o.delete(u),n;case Pp:if(Hi)return Hi.call(u)==Hi.call(k)}return!1}var Lp=1,$p=Object.prototype,zp=$p.hasOwnProperty;function Up(u,k,t,b,g,f){var o=t&Lp,a=Li(u),r=a.length,e=Li(k),n=e.length;if(r!=n&&!o)return!1;for(var l=r;l--;){var i=a[l];if(!(o?i in k:zp.call(k,i)))return!1}var s=f.get(u),h=f.get(k);if(s&&h)return s==k&&h==u;var d=!0;f.set(u,k),f.set(k,u);for(var c=o;++l<r;){i=a[l];var p=u[i],m=k[i];if(b)var S=o?b(m,p,i,k,u,f):b(p,m,i,u,k,f);if(!(S===void 0?p===m||g(p,m,t,b,f):S)){d=!1;break}c||(c=i=="constructor")}if(d&&!c){var C=u.constructor,M=k.constructor;C!=M&&"constructor"in u&&"constructor"in k&&!(typeof C=="function"&&C instanceof C&&typeof M=="function"&&M instanceof M)&&(d=!1)}return f.delete(u),f.delete(k),d}var Vp=1,Vo="[object Arguments]",Ho="[object Array]",$n="[object Object]",Hp=Object.prototype,qo=Hp.hasOwnProperty;function qp(u,k,t,b,g,f){var o=Pe(u),a=Pe(k),r=o?Ho:ln(u),e=a?Ho:ln(k);r=r==Vo?$n:r,e=e==Vo?$n:e;var n=r==$n,l=e==$n,i=r==e;if(i&&Nn(u)){if(!Nn(k))return!1;o=!0,n=!1}if(i&&!n)return f||(f=new er),o||ho(u)?zo(u,k,t,b,g,f):Fp(u,k,r,t,b,g,f);if(!(t&Vp)){var s=n&&qo.call(u,"__wrapped__"),h=l&&qo.call(k,"__wrapped__");if(s||h){var d=s?u.value():u,c=h?k.value():k;return f||(f=new er),g(d,c,t,b,f)}}return i?(f||(f=new er),Up(u,k,t,b,g,f)):!1}function zn(u,k,t,b,g){return u===k?!0:u==null||k==null||!sr(u)&&!sr(k)?u!==u&&k!==k:qp(u,k,t,b,zn,g)}var Wp=1,Kp=2;function Xp(u,k,t,b){var g=t.length,f=g,o=!b;if(u==null)return!f;for(u=Object(u);g--;){var a=t[g];if(o&&a[2]?a[1]!==u[a[0]]:!(a[0]in u))return!1}for(;++g<f;){a=t[g];var r=a[0],e=u[r],n=a[1];if(o&&a[2]){if(e===void 0&&!(r in u))return!1}else{var l=new er;if(b)var i=b(e,n,r,u,k,l);if(!(i===void 0?zn(n,e,Wp|Kp,b,l):i))return!1}}return!0}function Wo(u){return u===u&&!We(u)}function Yp(u){for(var k=Ir(u),t=k.length;t--;){var b=k[t],g=u[b];k[t]=[b,g,Wo(g)]}return k}function Ko(u,k){return function(t){return t==null?!1:t[u]===k&&(k!==void 0||u in Object(t))}}function Gp(u){var k=Yp(u);return k.length==1&&k[0][2]?Ko(k[0][0],k[0][1]):function(t){return t===u||Xp(t,u,k)}}function Zp(u,k){return u!=null&&k in Object(u)}function Jp(u,k,t){k=Bn(k,u);for(var b=-1,g=k.length,f=!1;++b<g;){var o=an(k[b]);if(!(f=u!=null&&t(u,o)))break;u=u[o]}return f||++b!=g?f:(g=u==null?0:u.length,!!g&&Ni(g)&&Mn(o,g)&&(Pe(u)||oo(u)))}function Qp(u,k){return u!=null&&Jp(u,k,Zp)}var tm=1,em=2;function rm(u,k){return Bi(u)&&Wo(k)?Ko(an(u),k):function(t){var b=jr(t,u);return b===void 0&&b===k?Qp(t,u):zn(k,b,tm|em)}}function nm(u){return function(k){return k==null?void 0:k[u]}}function im(u){return function(k){return Dn(k,u)}}function sm(u){return Bi(u)?nm(an(u)):im(u)}function fn(u){return typeof u=="function"?u:u==null?Js:typeof u=="object"?Pe(u)?rm(u[0],u[1]):Gp(u):sm(u)}function om(u,k,t,b){for(var g=-1,f=u==null?0:u.length;++g<f;){var o=u[g];k(b,o,t(o),u)}return b}function am(u){return function(k,t,b){for(var g=-1,f=Object(k),o=b(k),a=o.length;a--;){var r=o[u?a:++g];if(t(f[r],r,f)===!1)break}return k}}var lm=am();const cm=lm;function um(u,k){return u&&cm(u,k,Ir)}function fm(u,k){return function(t,b){if(t==null)return t;if(!Rr(t))return u(t,b);for(var g=t.length,f=k?g:-1,o=Object(t);(k?f--:++f<g)&&b(o[f],f,o)!==!1;);return t}}var hm=fm(um);const Un=hm;function dm(u,k,t,b){return Un(u,function(g,f,o){k(b,g,t(g),o)}),b}function pm(u,k){return function(t,b){var g=Pe(t)?om:dm,f=k?k():{};return g(t,u,fn(b),f)}}var mm=function(){return Ge.Date.now()};const qi=mm;var gm="Expected a function",bm=Math.max,ym=Math.min;function _r(u,k,t){var b,g,f,o,a,r,e=0,n=!1,l=!1,i=!0;if(typeof u!="function")throw new TypeError(gm);k=Ti(k)||0,We(t)&&(n=!!t.leading,l="maxWait"in t,f=l?bm(Ti(t.maxWait)||0,k):f,i="trailing"in t?!!t.trailing:i);function s(P){var $=b,N=g;return b=g=void 0,e=P,o=u.apply(N,$),o}function h(P){return e=P,a=setTimeout(p,k),n?s(P):o}function d(P){var $=P-r,N=P-e,B=k-$;return l?ym(B,f-N):B}function c(P){var $=P-r,N=P-e;return r===void 0||$>=k||$<0||l&&N>=f}function p(){var P=qi();if(c(P))return m(P);a=setTimeout(p,d(P))}function m(P){return a=void 0,i&&b?s(P):(b=g=void 0,o)}function S(){a!==void 0&&clearTimeout(a),e=0,b=r=g=a=void 0}function C(){return a===void 0?o:m(qi())}function M(){var P=qi(),$=c(P);if(b=arguments,g=this,r=P,$){if(a===void 0)return h(r);if(l)return clearTimeout(a),a=setTimeout(p,k),s(r)}return a===void 0&&(a=setTimeout(p,k)),o}return M.cancel=S,M.flush=C,M}function vm(u,k,t){for(var b=-1,g=u==null?0:u.length;++b<g;)if(t(k,u[b]))return!0;return!1}function wm(u,k){for(var t=-1,b=u==null?0:u.length;++t<b;)if(!k(u[t],t,u))return!1;return!0}function _m(u,k){var t=!0;return Un(u,function(b,g,f){return t=!!k(b,g,f),t}),t}function xm(u,k,t){var b=Pe(u)?wm:_m;return t&&Qu(u,k,t)&&(k=void 0),b(u,fn(k))}function Sm(u,k){var t=[];return Un(u,function(b,g,f){k(b,g,f)&&t.push(b)}),t}function Xo(u,k){var t=Pe(u)?xo:Sm;return t(u,fn(k))}function km(u,k){var t=-1,b=Rr(u)?Array(u.length):[];return Un(u,function(g,f,o){b[++t]=k(g,f,o)}),b}var Cm="[object String]";function Em(u){return typeof u=="string"||!Pe(u)&&sr(u)&&gr(u)==Cm}function Tm(u,k){return Or(k,function(t){return u[t]})}function Am(u){return u==null?[]:Tm(u,Ir(u))}var Mm=Math.max;function Yo(u,k,t,b){u=Rr(u)?u:Am(u),t=t&&!b?vu(t):0;var g=u.length;return t<0&&(t=Mm(g+t,0)),Em(u)?t<=g&&u.indexOf(k,t)>-1:!!g&&no(u,k,t)>-1}function Wi(u,k){return zn(u,k)}function Vn(u){return u==null}function Om(u){return u===null}var Rm=pm(function(u,k,t){Oi(u,t,k)});const Go=Rm;function Zo(u,k,t,b){if(!We(u))return u;k=Bn(k,u);for(var g=-1,f=k.length,o=f-1,a=u;a!=null&&++g<f;){var r=an(k[g]),e=t;if(r==="__proto__"||r==="constructor"||r==="prototype")return u;if(g!=o){var n=a[r];e=b?b(n,r,a):void 0,e===void 0&&(e=We(n)?n:Mn(k[g+1])?[]:{})}Ri(a,r,e),a=a[r]}return u}function Nm(u,k,t){for(var b=-1,g=k.length,f={};++b<g;){var o=k[b],a=Dn(u,o);t(a,o)&&Zo(f,Bn(o,u),a)}return f}function Br(u,k){if(u==null)return{};var t=Or(To(u),function(b){return[b]});return k=fn(k),Nm(u,t,function(b,g){return k(b,g[0])})}function Im(u,k){var t=u.length;for(u.sort(k);t--;)u[t]=u[t].value;return u}function jm(u,k){if(u!==k){var t=u!==void 0,b=u===null,g=u===u,f=Mr(u),o=k!==void 0,a=k===null,r=k===k,e=Mr(k);if(!a&&!e&&!f&&u>k||f&&o&&r&&!a&&!e||b&&o&&r||!t&&r||!g)return 1;if(!b&&!f&&!e&&u<k||e&&t&&g&&!b&&!f||a&&t&&g||!o&&g||!r)return-1}return 0}function Pm(u,k,t){for(var b=-1,g=u.criteria,f=k.criteria,o=g.length,a=t.length;++b<o;){var r=jm(g[b],f[b]);if(r){if(b>=a)return r;var e=t[b];return r*(e=="desc"?-1:1)}}return u.index-k.index}function Bm(u,k,t){k.length?k=Or(k,function(f){return Pe(f)?function(o){return Dn(o,f.length===1?f[0]:f)}:f}):k=[Js];var b=-1;k=Or(k,In(fn));var g=km(u,function(f,o,a){var r=Or(k,function(e){return e(f)});return{criteria:r,index:++b,value:f}});return Im(g,function(f,o){return Pm(f,o,t)})}function Dm(u,k,t,b){return u==null?[]:(Pe(k)||(k=k==null?[]:[k]),t=b?void 0:t,Pe(t)||(t=t==null?[]:[t]),Bm(u,k,t))}function Dr(u,k,t){return u==null?u:Zo(u,k,t)}var Fm=1/0,Lm=Pr&&1/Vi(new Pr([,-0]))[1]==Fm?function(u){return new Pr(u)}:$u;const $m=Lm;var zm=200;function Um(u,k,t){var b=-1,g=Ku,f=u.length,o=!0,a=[],r=a;if(t)o=!1,g=vm;else if(f>=zm){var e=k?null:$m(u);if(e)return Vi(e);o=!1,g=$o,r=new un}else r=k?[]:a;t:for(;++b<f;){var n=u[b],l=k?k(n):n;if(n=t||n!==0?n:0,o&&l===l){for(var i=r.length;i--;)if(r[i]===l)continue t;k&&r.push(l),a.push(n)}else g(r,l,t)||(r!==a&&r.push(l),a.push(n))}return a}function Vm(u){return u&&u.length?Um(u):[]}const Hm={class:"ant-empty ant-empty-normal ant-empty-small"},qm=T.createElementVNode("div",{class:"ant-empty-image"},[T.createElementVNode("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[T.createElementVNode("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},[T.createElementVNode("ellipse",{fill:"#F5F5F5",cx:"32",cy:"33",rx:"32",ry:"7"}),T.createElementVNode("g",{fillRule:"nonzero",stroke:"#D9D9D9"},[T.createElementVNode("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),T.createElementVNode("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#FAFAFA"})])])])],-1),Wm={class:"ant-empty-description"},Km={class:"ant-empty ant-empty-normal ant-empty-small"},Xm=T.createElementVNode("div",{class:"ant-empty-image"},[T.createElementVNode("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[T.createElementVNode("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},[T.createElementVNode("ellipse",{fill:"#F5F5F5",cx:"32",cy:"33",rx:"32",ry:"7"}),T.createElementVNode("g",{fillRule:"nonzero",stroke:"#D9D9D9"},[T.createElementVNode("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),T.createElementVNode("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:"#FAFAFA"})])])])],-1),Ym={class:"ant-empty-description"},[Gm]=je("fuzzy-select"),Zm={name:Gm},Jm=T.defineComponent({...Zm,props:{value:{},url:{},code:{},name:{},codeType:{default:"we"},label:{},showLabel:{type:Boolean,default:!0},method:{default:"get"},transform:{},params:{},conditionKey:{},conditionValue:{},defaultSearch:{type:Boolean,default:!1},required:{type:Boolean},disabled:{type:Boolean},placeholder:{},formItemProps:{},selectProps:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,b=Jr(),g=Ye(t,"value",k),f=T.computed(()=>({required:t.required,...t.formItemProps})),o=T.computed(()=>({allowClear:!0,showSearch:!0,notFoundContent:null,...t.selectProps,disabled:t.disabled,placeholder:t.disabled?"":t.placeholder})),a=T.ref([]);let r=[],e=!1,n="";const l=T.ref(!1);T.watch(a,c=>{l.value=c.length===0?void 0:!1});const i=async(c,p)=>{const m={...t.params};if((typeof p=="string"&&p||Array.isArray(p)&&p.length>0)&&t.url.includes("/common-query-web/query/common/biz/kv/query")){const M=t.url.includes("common-query-web/query/common/biz/kv/queryJson"),P=M?t.url.split("/common-query-web/query/common/biz/kv/queryJson/")[1]:t.url.split("/common-query-web/query/common/biz/kv/query/")[1],$=new FormData;$.append("keys",Array.isArray(p)?p.filter(B=>![!1,null,void 0,""].includes(B)).join(","):p),M||$.append("extFields",m.returnExtFields?m.returnExtFields.join(","):"");const N=await b({url:`${De}/common-query-web/query/common/biz/kv/map/${P}`,headers:{"Content-Type":"multipart/form-data"},method:"post",data:$});a.value=Ms(N==null?void 0:N.data),r=Ms(N==null?void 0:N.data);return}c&&Dr(m,t.conditionKey||"label",c==null?void 0:c.trim()),p&&Dr(m,t.conditionValue||"value",p);const S=await b({url:t.url,method:t.method,[t.method==="get"?"params":"data"]:m}),C=await(t.transform?Promise.resolve(t.transform(S)):Promise.resolve(S.data));a.value=c?C:[...r,...C]};T.watch(g,c=>{c&&!e&&i(null,c)},{immediate:!0});const s=_r(async c=>{n=c,i(c)},400);T.onMounted(()=>{const c=g.value;!(Array.isArray(c)?c.length>0:!!c)&&t.defaultSearch&&i("")});function h(c){(c.keyCode===13||c.key==="Enter")&&setTimeout(()=>k("pressEnter"))}function d(c,p){e=!0,r=Array.isArray(p)?p:[p],k("change",c),setTimeout(()=>{e=!1},10)}return(c,p)=>{const m=T.resolveComponent("a-select"),S=T.resolveComponent("a-form-item");return c.showLabel?(T.openBlock(),T.createBlock(S,T.mergeProps({key:0,name:c.name,label:c.label||c.$t(c.code)||c.code},f.value),{default:T.withCtx(()=>[T.createVNode(m,T.mergeProps({value:T.unref(g),"onUpdate:value":p[0]||(p[0]=C=>T.isRef(g)?g.value=C:null),"filter-option":!1,options:a.value,onSearch:T.unref(s)},o.value,{notFoundContent:l.value,class:[{"fuzzy-select-selector-active":Array.isArray(T.unref(g))?T.unref(g).length>0:T.unref(g)},"fuzzy-select-selector"],onChange:d,onKeydown:h}),T.createSlots({notFoundContent:T.withCtx(()=>[T.createElementVNode("div",Hm,[qm,T.createElementVNode("p",Wm,T.toDisplayString(c.$t("noData")||"暂无数据"),1)])]),_:2},[c.$slots.option?{name:"option",fn:T.withCtx(C=>[T.renderSlot(c.$slots,"option",T.normalizeProps(T.guardReactiveProps({...C,searchValue:T.unref(n)})))]),key:"0"}:void 0]),1040,["value","options","onSearch","notFoundContent","class"])]),_:3},16,["name","label"])):(T.openBlock(),T.createBlock(m,T.mergeProps({key:1,value:T.unref(g),"onUpdate:value":p[1]||(p[1]=C=>T.isRef(g)?g.value=C:null),"filter-option":!1,options:a.value,onSearch:T.unref(s)},o.value,{notFoundContent:l.value,class:[{"fuzzy-select-selector-active":Array.isArray(T.unref(g))?T.unref(g).length>0:T.unref(g)},"fuzzy-select-selector"],onChange:d,onKeydown:h}),T.createSlots({notFoundContent:T.withCtx(()=>[T.createElementVNode("div",Km,[Xm,T.createElementVNode("p",Ym,T.toDisplayString(c.$t("noData")||"暂无数据"),1)])]),_:2},[c.$slots.option?{name:"option",fn:T.withCtx(C=>[T.renderSlot(c.$slots,"option",T.normalizeProps(T.guardReactiveProps({...C,searchValue:T.unref(n)})))]),key:"0"}:void 0]),1040,["value","options","onSearch","notFoundContent","class"]))}}}),Q2="",Jo=Fe(Jm),[Qm]=je("enum-fuzzy-select"),t0={name:Qm},e0=T.defineComponent({...t0,props:{value:{},code:{},name:{},codeType:{default:"we"},label:{},showLabel:{type:Boolean,default:!0},transform:{},params:{},conditionKey:{default:"label"},conditionValue:{},defaultSearch:{type:Boolean,default:!1},required:{type:Boolean},disabled:{type:Boolean},placeholder:{},formItemProps:{},selectProps:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,{t:b}=Ue(),g=Ye(t,"value",k),{getApiDataSource:f}=mr(),o=T.ref(""),a=T.ref(),r=T.ref({...t.params}),e=T.ref(!1),n=T.computed(()=>t.placeholder?t.placeholder:b("pleaseSelect")?`${b("pleaseSelect")}${t.label||b(t.code)}`:"");T.watch(()=>t.params,h=>{r.value={...r.value,...h}});async function l(){e.value=!0;const h=await f(t.codeType,t.code);if(h){o.value=De+h.apiUrl,a.value=h.apiPost?"post":"get";let d={};try{d=JSON.parse(h.apiParam)}catch{d={}}r.value={...d,...r.value},!h.async&&!location.href.includes("carrierglobe")&&(Ft.message.warn(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsEnumFuzzySelect 组件!`),console.error(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsEnumFuzzySelect 组件!`)),e.value=!1}}l();const i=()=>k("pressEnter"),s=h=>k("change",h);return(h,d)=>{const c=T.resolveComponent("YzsFuzzySelect");return e.value?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(c,{key:0,value:T.unref(g),"onUpdate:value":d[0]||(d[0]=p=>T.isRef(g)?g.value=p:null),url:o.value,code:h.code,name:h.name,label:h.label,method:a.value,params:r.value,required:h.required,disabled:h.disabled,"show-label":h.showLabel,placeholder:n.value,"select-props":h.selectProps,"condition-key":h.conditionKey,"default-search":h.defaultSearch,"condition-value":h.conditionValue,"form-item-props":h.formItemProps,transform:h.transform,onPressEnter:i,onChange:s},null,8,["value","url","code","name","label","method","params","required","disabled","show-label","placeholder","select-props","condition-key","default-search","condition-value","form-item-props","transform"]))}}}),Ki=Fe(e0),[r0]=je("enum-fuzzy-custom-select"),n0={name:r0},i0=T.defineComponent({...n0,props:{value:{},code:{},name:{},codeType:{default:"we"},label:{},showLabel:{type:Boolean,default:!0},transform:{},params:{},conditionKey:{default:"inputText"},conditionValue:{},defaultSearch:{type:Boolean},required:{type:Boolean},disabled:{type:Boolean},placeholder:{},formItemProps:{},selectProps:{},showWarn:{type:Boolean,default:!0}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,{t:b}=Ue(),g=Ye(t,"value",k),{getApiDataSource:f}=mr(),o=T.ref(""),a=T.ref(),r=T.ref({...t.params}),e=T.ref(!1),n=T.computed(()=>t.placeholder?t.placeholder:b("pleaseSelect")?`${b("pleaseSelect")}${t.label||b(t.code)}`:"");T.watch(()=>t.params,h=>{r.value={...r.value,...h}});async function l(){e.value=!0;const h=await f(t.codeType,t.code);if(h){o.value=De+h.apiUrl,a.value=h.apiPost?"post":"get";let d={};try{d=JSON.parse(h.apiParam)}catch{d={}}r.value={...d,...r.value},!h.async&&!location.href.includes("carrierglobe")&&t.showWarn&&(Ft.message.warn(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsEnumFuzzySelect 组件!`),console.error(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsEnumFuzzySelect 组件!`)),e.value=!1}}l();const i=()=>k("pressEnter"),s=h=>k("change",h);return(h,d)=>{const c=T.resolveComponent("YzsFuzzySelect");return e.value?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(c,{key:0,value:T.unref(g),"onUpdate:value":d[0]||(d[0]=p=>T.isRef(g)?g.value=p:null),url:o.value,code:h.code,name:h.name,label:h.label,method:a.value,params:r.value,required:h.required,disabled:h.disabled,"show-label":h.showLabel,placeholder:n.value,"select-props":h.selectProps,"condition-key":h.conditionKey,"condition-value":h.conditionValue,"form-item-props":h.formItemProps,transform:h.transform,onPressEnter:i,onChange:s},{option:T.withCtx(({value:p,label:m,ext:S,searchValue:C})=>[T.createVNode(Vs,{value:p,label:m,ext:S,searchValue:C},null,8,["value","label","ext","searchValue"])]),_:1},8,["value","url","code","name","label","method","params","required","disabled","show-label","placeholder","select-props","condition-key","condition-value","form-item-props","transform"]))}}}),Xi=Fe(i0),[s0]=je("auto-complete"),o0={name:s0},a0=T.defineComponent({...o0,props:{value:{},url:{},code:{},name:{},codeType:{},label:{},showLabel:{type:Boolean,default:!0},method:{default:"get"},transform:{type:Function,default:u=>u.data.map(k=>({value:k}))},params:{},conditionKey:{},conditionValue:{},required:{type:Boolean},disabled:{type:Boolean},placeholder:{},formItemProps:{},selectProps:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,b=Jr(),g=Ye(t,"value",k),f=T.computed(()=>({required:t.required,...t.formItemProps})),o=T.computed(()=>({allowClear:!0,showSearch:!0,notFoundContent:null,...t.selectProps,disabled:t.disabled,placeholder:t.disabled?"":t.placeholder})),a=T.ref([]),r=async i=>{const s={...t.params};Dr(s,t.conditionKey||"inputText",i);const h=await b({url:t.url,method:t.method,[t.method==="get"?"params":"data"]:s});a.value=await Promise.resolve(t.transform(h))},e=_r(async i=>{r(i)},400);function n(i){(i.keyCode===13||i.key==="Enter")&&(g.value=g.value.trim(),setTimeout(()=>k("pressEnter")))}function l(i){k("change",i)}return(i,s)=>{const h=T.resolveComponent("a-auto-complete"),d=T.resolveComponent("a-form-item");return i.showLabel?(T.openBlock(),T.createBlock(d,T.mergeProps({key:0,name:i.name,label:i.label||i.$t(i.code)||i.code},f.value),{default:T.withCtx(()=>[T.createVNode(h,T.mergeProps({value:T.unref(g),"onUpdate:value":s[0]||(s[0]=c=>T.isRef(g)?g.value=c:null),"filter-option":!1,options:a.value,onSearch:T.unref(e)},o.value,{class:[{"auto-complete-selector-active":T.unref(g)},"auto-complete-selector"],onChange:l,onKeydown:n}),null,16,["value","options","onSearch","class"])]),_:1},16,["name","label"])):(T.openBlock(),T.createBlock(h,T.mergeProps({key:1,value:T.unref(g),"onUpdate:value":s[1]||(s[1]=c=>T.isRef(g)?g.value=c:null),"filter-option":!1,options:a.value,onSearch:T.unref(e)},o.value,{class:[{"auto-complete-selector-active":T.unref(g)},"auto-complete-selector"],onChange:l,onKeydown:n}),null,16,["value","options","onSearch","class"]))}}}),tv="",Qo=Fe(a0),[l0]=je("auto-complete-fuzzy-select"),c0={name:l0},u0=T.defineComponent({...c0,props:{value:{},code:{},name:{},codeType:{default:"we"},label:{},showLabel:{type:Boolean,default:!0},transform:{},params:{},conditionKey:{},conditionValue:{},required:{type:Boolean},disabled:{type:Boolean},placeholder:{},formItemProps:{},selectProps:{}},emits:["update:value","pressEnter","change"],setup(u,{emit:k}){const t=u,{t:b}=Ue(),g=Ye(t,"value",k),{getApiDataSource:f}=mr(),o=T.ref(""),a=T.ref(),r=T.ref({...t.params}),e=T.ref(!1),n=T.computed(()=>t.placeholder?t.placeholder:b("pleaseSelect")?`${b("pleaseSelect")}${t.label||b(t.code)}`:"");async function l(){e.value=!0;const h=await f(t.codeType,t.code);if(h){o.value=De+h.apiUrl,a.value=h.apiPost?"post":"get";let d={};try{d=JSON.parse(h.apiParam)}catch{d={}}r.value={...d,...r.value},!h.async&&!location.href.includes("carrierglobe")&&(Ft.message.warn(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsAutoCompleteFuzzySelect 组件!`),console.error(`当前词条 ${t.code} 的数据源不是懒加载数据源,不可使用 YzsAutoCompleteFuzzySelect 组件!`)),e.value=!1}}l();const i=()=>k("pressEnter"),s=h=>k("change",h);return(h,d)=>{const c=T.resolveComponent("YzsAutoComplete");return e.value?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(c,{key:0,value:T.unref(g),"onUpdate:value":d[0]||(d[0]=p=>T.isRef(g)?g.value=p:null),url:o.value,code:h.code,name:h.name,label:h.label,method:a.value,params:r.value,required:h.required,disabled:h.disabled,"show-label":h.showLabel,placeholder:n.value,"select-props":h.selectProps,"condition-key":h.conditionKey,"condition-value":h.conditionValue,"form-item-props":h.formItemProps,transform:h.transform,onPressEnter:i,onChange:s},null,8,["value","url","code","name","label","method","params","required","disabled","show-label","placeholder","select-props","condition-key","condition-value","form-item-props","transform"]))}}}),Yi=Fe(u0),[f0]=je("region-fuzzy-auto-complete"),h0={name:f0},d0=T.defineComponent({...h0,props:{value:{},code:{},name:{},label:{},required:{type:Boolean},showLabel:{type:Boolean,default:!0},disabled:{type:Boolean},placeholder:{},params:{},formItemProps:{},selectProps:{default:()=>({allowClear:!0,dropdownMatchSelectWidth:!1,dropdownStyle:{width:"320px"},size:"small"})},transform:{},treePathFormat:{type:Function,default:u=>(u==null?void 0:u.length)>1?u.slice(1):u}},emits:["update:value","pressEnter","change","changeItem"],setup(u,{emit:k}){const t=u,b=Jr(),{t:g}=Ue(),f=Ye(t,"value",k),o=T.ref([]),a={},r=T.computed(()=>({required:t.required,...t.formItemProps})),e=T.computed(()=>({allowClear:!0,...t.selectProps,disabled:t.disabled,placeholder:t.disabled?"":n()}));function n(){return t.placeholder?t.placeholder:g("pleaseSelect")?`${g("pleaseSelect")}${t.label?t.label:""}`:""}function l(C){(C.keyCode===13||C.key==="Enter")&&setTimeout(()=>k("pressEnter"))}function i(C,M){k("change",C),k("changeItem",M)}const s=_r(async C=>{C&&h(C)},300);async function h(C){const M=await b({url:`${De}/base-biz-data-server/query/data/AdministrativeDivisions/search`,method:"get",params:{...t.params,treeName:C}});d(M.data),await p(m(M.data));const P=M.data.map($=>({_label:$.label,label:c($.ext.treePath),value:c($.ext.treePath),id:$.value,ext:$.ext}));o.value=t.transform?t.transform(P):P}function d(C){C.forEach(M=>{a[M.value]=M.label})}function c(C){return t.treePathFormat(C.split("/")).reduce((M,P)=>M+a[P],"")}async function p(C){const M=C.filter($=>!a[$]);if(M.length===0)return;const P=await b({method:"get",url:`${De}/base-biz-data-server/query/data/AdministrativeDivisions/search?codes=${M.join(",")}`});return d(P.data),P.data}function m(C){const M=[];return C.forEach(P=>{P.ext&&P.ext.treePath&&M.push(...P.ext.treePath.split("/"))}),[...new Set(M)]}T.watch(()=>t.code,async C=>{if(C){const M=await S(C);M&&M.length>0&&(f.value=M[0].label)}else f.value=void 0},{immediate:!0});async function S(C){const M=await b({method:"get",url:`${De}/base-biz-data-server/query/data/AdministrativeDivisions/search`,params:{codes:C}});return d(M.data),await p(m(M.data)),M.data.map($=>({_label:$.label,label:c($.ext.treePath),value:c($.ext.treePath),id:$.value,ext:$.ext}))}return(C,M)=>{const P=T.resolveComponent("a-auto-complete"),$=T.resolveComponent("a-form-item");return C.showLabel!==!1?(T.openBlock(),T.createBlock($,T.mergeProps({key:0,name:C.name,label:C.label},r.value),{default:T.withCtx(()=>[T.createVNode(P,T.mergeProps({value:T.unref(f),"onUpdate:value":M[0]||(M[0]=N=>T.isRef(f)?f.value=N:null),options:o.value},e.value,{class:[{"enum-select-selector-active":T.unref(f)},"enum-select-selector"],onKeydown:l,onSelect:i,onSearch:T.unref(s)}),null,16,["value","options","class","onSearch"])]),_:1},16,["name","label"])):(T.openBlock(),T.createBlock(P,T.mergeProps({key:1,"field-names":{value:"label"},value:T.unref(f),"onUpdate:value":M[1]||(M[1]=N=>T.isRef(f)?f.value=N:null),options:o.value},e.value,{class:[{"enum-select-selector-active":T.unref(f)},"enum-select-selector"],onKeydown:l,onSelect:i,onSearch:T.unref(s)}),null,16,["value","options","class","onSearch"]))}}}),ev="",ta=Fe(d0),rv="";/*!
|
|
5
|
+
* Viewer.js v1.11.6
|
|
6
|
+
* https://fengyuanchen.github.io/viewerjs
|
|
7
|
+
*
|
|
8
|
+
* Copyright 2015-present Chen Fengyuan
|
|
9
|
+
* Released under the MIT license
|
|
10
|
+
*
|
|
11
|
+
* Date: 2023-09-17T03:16:38.052Z
|
|
12
|
+
*/function ea(u,k){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(u);k&&(b=b.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),t.push.apply(t,b)}return t}function Gi(u){for(var k=1;k<arguments.length;k++){var t=arguments[k]!=null?arguments[k]:{};k%2?ea(Object(t),!0).forEach(function(b){g0(u,b,t[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):ea(Object(t)).forEach(function(b){Object.defineProperty(u,b,Object.getOwnPropertyDescriptor(t,b))})}return u}function Zi(u){"@babel/helpers - typeof";return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},Zi(u)}function p0(u,k){if(!(u instanceof k))throw new TypeError("Cannot call a class as a function")}function ra(u,k){for(var t=0;t<k.length;t++){var b=k[t];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(u,na(b.key),b)}}function m0(u,k,t){return k&&ra(u.prototype,k),t&&ra(u,t),Object.defineProperty(u,"prototype",{writable:!1}),u}function g0(u,k,t){return k=na(k),k in u?Object.defineProperty(u,k,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[k]=t,u}function b0(u,k){if(typeof u!="object"||u===null)return u;var t=u[Symbol.toPrimitive];if(t!==void 0){var b=t.call(u,k||"default");if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(k==="string"?String:Number)(u)}function na(u){var k=b0(u,"string");return typeof k=="symbol"?k:String(k)}var ia={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},y0='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',Hn=typeof window<"u"&&typeof window.document<"u",lr=Hn?window:{},Fr=Hn&&lr.document.documentElement?"ontouchstart"in lr.document.documentElement:!1,Ji=Hn?"PointerEvent"in lr:!1,ce="viewer",qn="move",sa="switch",hn="zoom",Wn="".concat(ce,"-active"),v0="".concat(ce,"-close"),Kn="".concat(ce,"-fade"),Qi="".concat(ce,"-fixed"),w0="".concat(ce,"-fullscreen"),oa="".concat(ce,"-fullscreen-exit"),xr="".concat(ce,"-hide"),_0="".concat(ce,"-hide-md-down"),x0="".concat(ce,"-hide-sm-down"),S0="".concat(ce,"-hide-xs-down"),Ke="".concat(ce,"-in"),dn="".concat(ce,"-invisible"),Lr="".concat(ce,"-loading"),k0="".concat(ce,"-move"),aa="".concat(ce,"-open"),$r="".concat(ce,"-show"),Ae="".concat(ce,"-transition"),zr="click",ts="dblclick",la="dragstart",ca="focusin",ua="keydown",Xe="load",Sr="error",C0=Fr?"touchend touchcancel":"mouseup",E0=Fr?"touchmove":"mousemove",T0=Fr?"touchstart":"mousedown",fa=Ji?"pointerdown":T0,ha=Ji?"pointermove":E0,da=Ji?"pointerup pointercancel":C0,pa="resize",Ze="transitionend",ma="wheel",ga="ready",ba="show",ya="shown",va="hide",wa="hidden",_a="view",pn="viewed",xa="move",Sa="moved",ka="rotate",Ca="rotated",Ea="scale",Ta="scaled",Aa="zoom",Ma="zoomed",Oa="play",Ra="stop",Xn="".concat(ce,"Action"),es=/\s\s*/,Yn=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function mn(u){return typeof u=="string"}var A0=Number.isNaN||lr.isNaN;function Te(u){return typeof u=="number"&&!A0(u)}function Ur(u){return typeof u>"u"}function Vr(u){return Zi(u)==="object"&&u!==null}var M0=Object.prototype.hasOwnProperty;function Hr(u){if(!Vr(u))return!1;try{var k=u.constructor,t=k.prototype;return k&&t&&M0.call(t,"isPrototypeOf")}catch{return!1}}function ye(u){return typeof u=="function"}function _e(u,k){if(u&&ye(k))if(Array.isArray(u)||Te(u.length)){var t=u.length,b;for(b=0;b<t&&k.call(u,u[b],b,u)!==!1;b+=1);}else Vr(u)&&Object.keys(u).forEach(function(g){k.call(u,u[g],g,u)});return u}var Ve=Object.assign||function(k){for(var t=arguments.length,b=new Array(t>1?t-1:0),g=1;g<t;g++)b[g-1]=arguments[g];return Vr(k)&&b.length>0&&b.forEach(function(f){Vr(f)&&Object.keys(f).forEach(function(o){k[o]=f[o]})}),k},O0=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Je(u,k){var t=u.style;_e(k,function(b,g){O0.test(g)&&Te(b)&&(b+="px"),t[g]=b})}function R0(u){return mn(u)?u.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):u}function qr(u,k){return!u||!k?!1:u.classList?u.classList.contains(k):u.className.indexOf(k)>-1}function ne(u,k){if(!(!u||!k)){if(Te(u.length)){_e(u,function(b){ne(b,k)});return}if(u.classList){u.classList.add(k);return}var t=u.className.trim();t?t.indexOf(k)<0&&(u.className="".concat(t," ").concat(k)):u.className=k}}function de(u,k){if(!(!u||!k)){if(Te(u.length)){_e(u,function(t){de(t,k)});return}if(u.classList){u.classList.remove(k);return}u.className.indexOf(k)>=0&&(u.className=u.className.replace(k,""))}}function gn(u,k,t){if(k){if(Te(u.length)){_e(u,function(b){gn(b,k,t)});return}t?ne(u,k):de(u,k)}}var N0=/([a-z\d])([A-Z])/g;function rs(u){return u.replace(N0,"$1-$2").toLowerCase()}function Wr(u,k){return Vr(u[k])?u[k]:u.dataset?u.dataset[k]:u.getAttribute("data-".concat(rs(k)))}function ns(u,k,t){Vr(t)?u[k]=t:u.dataset?u.dataset[k]=t:u.setAttribute("data-".concat(rs(k)),t)}var Na=function(){var u=!1;if(Hn){var k=!1,t=function(){},b=Object.defineProperty({},"once",{get:function(){return u=!0,k},set:function(f){k=f}});lr.addEventListener("test",t,b),lr.removeEventListener("test",t,b)}return u}();function ve(u,k,t){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=t;k.trim().split(es).forEach(function(f){if(!Na){var o=u.listeners;o&&o[f]&&o[f][t]&&(g=o[f][t],delete o[f][t],Object.keys(o[f]).length===0&&delete o[f],Object.keys(o).length===0&&delete u.listeners)}u.removeEventListener(f,g,b)})}function ie(u,k,t){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},g=t;k.trim().split(es).forEach(function(f){if(b.once&&!Na){var o=u.listeners,a=o===void 0?{}:o;g=function(){delete a[f][t],u.removeEventListener(f,g,b);for(var e=arguments.length,n=new Array(e),l=0;l<e;l++)n[l]=arguments[l];t.apply(u,n)},a[f]||(a[f]={}),a[f][t]&&u.removeEventListener(f,a[f][t],b),a[f][t]=g,u.listeners=a}u.addEventListener(f,g,b)})}function Oe(u,k,t,b){var g;return ye(Event)&&ye(CustomEvent)?g=new CustomEvent(k,Gi({bubbles:!0,cancelable:!0,detail:t},b)):(g=document.createEvent("CustomEvent"),g.initCustomEvent(k,!0,!0,t)),u.dispatchEvent(g)}function I0(u){var k=u.getBoundingClientRect();return{left:k.left+(window.pageXOffset-document.documentElement.clientLeft),top:k.top+(window.pageYOffset-document.documentElement.clientTop)}}function Gn(u){var k=u.rotate,t=u.scaleX,b=u.scaleY,g=u.translateX,f=u.translateY,o=[];Te(g)&&g!==0&&o.push("translateX(".concat(g,"px)")),Te(f)&&f!==0&&o.push("translateY(".concat(f,"px)")),Te(k)&&k!==0&&o.push("rotate(".concat(k,"deg)")),Te(t)&&t!==1&&o.push("scaleX(".concat(t,")")),Te(b)&&b!==1&&o.push("scaleY(".concat(b,")"));var a=o.length?o.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}function j0(u){return mn(u)?decodeURIComponent(u.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var is=lr.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(lr.navigator.userAgent);function Ia(u,k,t){var b=document.createElement("img");if(u.naturalWidth&&!is)return t(u.naturalWidth,u.naturalHeight),b;var g=document.body||document.documentElement;return b.onload=function(){t(b.width,b.height),is||g.removeChild(b)},_e(k.inheritedAttributes,function(f){var o=u.getAttribute(f);o!==null&&b.setAttribute(f,o)}),b.src=u.src,is||(b.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",g.appendChild(b)),b}function Zn(u){switch(u){case 2:return S0;case 3:return x0;case 4:return _0;default:return""}}function P0(u){var k=Gi({},u),t=[];return _e(u,function(b,g){delete k[g],_e(k,function(f){var o=Math.abs(b.startX-f.startX),a=Math.abs(b.startY-f.startY),r=Math.abs(b.endX-f.endX),e=Math.abs(b.endY-f.endY),n=Math.sqrt(o*o+a*a),l=Math.sqrt(r*r+e*e),i=(l-n)/n;t.push(i)})}),t.sort(function(b,g){return Math.abs(b)<Math.abs(g)}),t[0]}function Jn(u,k){var t=u.pageX,b=u.pageY,g={endX:t,endY:b};return k?g:Gi({timeStamp:Date.now(),startX:t,startY:b},g)}function B0(u){var k=0,t=0,b=0;return _e(u,function(g){var f=g.startX,o=g.startY;k+=f,t+=o,b+=1}),k/=b,t/=b,{pageX:k,pageY:t}}var D0={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var k=this.element.ownerDocument,t=k.body||k.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-k.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var k=this.options,t=this.parent,b;k.inline&&(b={width:Math.max(t.offsetWidth,k.minWidth),height:Math.max(t.offsetHeight,k.minHeight)},this.parentData=b),(this.fulled||!b)&&(b=this.containerData),this.viewerData=Ve({},b)},renderViewer:function(){this.options.inline&&!this.fulled&&Je(this.viewer,this.viewerData)},initList:function(){var k=this,t=this.element,b=this.options,g=this.list,f=[];g.innerHTML="",_e(this.images,function(o,a){var r=o.src,e=o.alt||j0(r),n=k.getImageURL(o);if(r||n){var l=document.createElement("li"),i=document.createElement("img");_e(b.inheritedAttributes,function(s){var h=o.getAttribute(s);h!==null&&i.setAttribute(s,h)}),b.navbar&&(i.src=r||n),i.alt=e,i.setAttribute("data-original-url",n||r),l.setAttribute("data-index",a),l.setAttribute("data-viewer-action","view"),l.setAttribute("role","button"),b.keyboard&&l.setAttribute("tabindex",0),l.appendChild(i),g.appendChild(l),f.push(l)}}),this.items=f,_e(f,function(o){var a=o.firstElementChild,r,e;ns(a,"filled",!0),b.loading&&ne(o,Lr),ie(a,Xe,r=function(l){ve(a,Sr,e),b.loading&&de(o,Lr),k.loadImage(l)},{once:!0}),ie(a,Sr,e=function(){ve(a,Xe,r),b.loading&&de(o,Lr)},{once:!0})}),b.transition&&ie(t,pn,function(){ne(g,Ae)},{once:!0})},renderList:function(){var k=this.index,t=this.items[k];if(t){var b=t.nextElementSibling,g=parseInt(window.getComputedStyle(b||t).marginLeft,10),f=t.offsetWidth,o=f+g;Je(this.list,Ve({width:o*this.length-g},Gn({translateX:(this.viewerData.width-f)/2-o*k})))}},resetList:function(){var k=this.list;k.innerHTML="",de(k,Ae),Je(k,Gn({translateX:0}))},initImage:function(k){var t=this,b=this.options,g=this.image,f=this.viewerData,o=this.footer.offsetHeight,a=f.width,r=Math.max(f.height-o,o),e=this.imageData||{},n;this.imageInitializing={abort:function(){n.onload=null}},n=Ia(g,b,function(l,i){var s=l/i,h=Math.max(0,Math.min(1,b.initialCoverage)),d=a,c=r;t.imageInitializing=!1,r*s>a?c=a/s:d=r*s,h=Te(h)?h:.9,d=Math.min(d*h,l),c=Math.min(c*h,i);var p=(a-d)/2,m=(r-c)/2,S={left:p,top:m,x:p,y:m,width:d,height:c,oldRatio:1,ratio:d/l,aspectRatio:s,naturalWidth:l,naturalHeight:i},C=Ve({},S);b.rotatable&&(S.rotate=e.rotate||0,C.rotate=0),b.scalable&&(S.scaleX=e.scaleX||1,S.scaleY=e.scaleY||1,C.scaleX=1,C.scaleY=1),t.imageData=S,t.initialImageData=C,k&&k()})},renderImage:function(k){var t=this,b=this.image,g=this.imageData;if(Je(b,Ve({width:g.width,height:g.height,marginLeft:g.x,marginTop:g.y},Gn(g))),k)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&qr(b,Ae)){var f=function(){t.imageRendering=!1,k()};this.imageRendering={abort:function(){ve(b,Ze,f)}},ie(b,Ze,f,{once:!0})}else k()},resetImage:function(){var k=this.image;k&&(this.viewing&&this.viewing.abort(),k.parentNode.removeChild(k),this.image=null,this.title.innerHTML="")}},F0={bind:function(){var k=this.options,t=this.viewer,b=this.canvas,g=this.element.ownerDocument;ie(t,zr,this.onClick=this.click.bind(this)),ie(t,la,this.onDragStart=this.dragstart.bind(this)),ie(b,fa,this.onPointerDown=this.pointerdown.bind(this)),ie(g,ha,this.onPointerMove=this.pointermove.bind(this)),ie(g,da,this.onPointerUp=this.pointerup.bind(this)),ie(g,ua,this.onKeyDown=this.keydown.bind(this)),ie(window,pa,this.onResize=this.resize.bind(this)),k.zoomable&&k.zoomOnWheel&&ie(t,ma,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),k.toggleOnDblclick&&ie(b,ts,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var k=this.options,t=this.viewer,b=this.canvas,g=this.element.ownerDocument;ve(t,zr,this.onClick),ve(t,la,this.onDragStart),ve(b,fa,this.onPointerDown),ve(g,ha,this.onPointerMove),ve(g,da,this.onPointerUp),ve(g,ua,this.onKeyDown),ve(window,pa,this.onResize),k.zoomable&&k.zoomOnWheel&&ve(t,ma,this.onWheel,{passive:!1,capture:!0}),k.toggleOnDblclick&&ve(b,ts,this.onDblclick)}},L0={click:function(k){var t=this.options,b=this.imageData,g=k.target,f=Wr(g,Xn);switch(!f&&g.localName==="img"&&g.parentElement.localName==="li"&&(g=g.parentElement,f=Wr(g,Xn)),Fr&&k.isTrusted&&g===this.canvas&&clearTimeout(this.clickCanvasTimeout),f){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Wr(g,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-b.scaleX||-1);break;case"flip-vertical":this.scaleY(-b.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(k){k.preventDefault(),this.viewed&&k.target===this.image&&(Fr&&k.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(k.isTrusted?k:k.detail&&k.detail.originalEvent))},load:function(){var k=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,b=this.options,g=this.image,f=this.index,o=this.viewerData;de(g,dn),b.loading&&de(this.canvas,Lr),g.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){gn(g,k0,b.movable),gn(g,Ae,b.transition),k.renderImage(function(){k.viewed=!0,k.viewing=!1,ye(b.viewed)&&ie(t,pn,b.viewed,{once:!0}),Oe(t,pn,{originalImage:k.images[f],index:f,image:g},{cancelable:!1})})})},loadImage:function(k){var t=k.target,b=t.parentNode,g=b.offsetWidth||30,f=b.offsetHeight||50,o=!!Wr(t,"filled");Ia(t,this.options,function(a,r){var e=a/r,n=g,l=f;f*e>g?o?n=f*e:l=g/e:o?l=g/e:n=f*e,Je(t,Ve({width:n,height:l},Gn({translateX:(g-n)/2,translateY:(f-l)/2})))})},keydown:function(k){var t=this.options;if(t.keyboard){var b=k.keyCode||k.which||k.charCode;switch(b){case 13:this.viewer.contains(k.target)&&this.click(k);break}if(this.fulled)switch(b){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:k.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:k.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:k.ctrlKey&&(k.preventDefault(),this.toggle());break}}},dragstart:function(k){k.target.localName==="img"&&k.preventDefault()},pointerdown:function(k){var t=this.options,b=this.pointers,g=k.buttons,f=k.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(k.type==="mousedown"||k.type==="pointerdown"&&k.pointerType==="mouse")&&(Te(g)&&g!==1||Te(f)&&f!==0||k.ctrlKey))){k.preventDefault(),k.changedTouches?_e(k.changedTouches,function(a){b[a.identifier]=Jn(a)}):b[k.pointerId||0]=Jn(k);var o=t.movable?qn:!1;t.zoomOnTouch&&t.zoomable&&Object.keys(b).length>1?o=hn:t.slideOnTouch&&(k.pointerType==="touch"||k.type==="touchstart")&&this.isSwitchable()&&(o=sa),t.transition&&(o===qn||o===hn)&&de(this.image,Ae),this.action=o}},pointermove:function(k){var t=this.pointers,b=this.action;!this.viewed||!b||(k.preventDefault(),k.changedTouches?_e(k.changedTouches,function(g){Ve(t[g.identifier]||{},Jn(g,!0))}):Ve(t[k.pointerId||0]||{},Jn(k,!0)),this.change(k))},pointerup:function(k){var t=this,b=this.options,g=this.action,f=this.pointers,o;k.changedTouches?_e(k.changedTouches,function(a){o=f[a.identifier],delete f[a.identifier]}):(o=f[k.pointerId||0],delete f[k.pointerId||0]),g&&(k.preventDefault(),b.transition&&(g===qn||g===hn)&&ne(this.image,Ae),this.action=!1,Fr&&g!==hn&&o&&Date.now()-o.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),b.toggleOnDblclick&&this.viewed&&k.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){Oe(t.image,ts,{originalEvent:k})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){t.imageClicked=!1},500)):(this.imageClicked=!1,b.backdrop&&b.backdrop!=="static"&&k.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){Oe(t.canvas,zr,{originalEvent:k})},50)))))},resize:function(){var k=this;if(!(!this.isShown||this.hiding)&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){k.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}_e(this.player.getElementsByTagName("img"),function(t){ie(t,Xe,k.loadImage.bind(k),{once:!0}),Oe(t,Xe)})}},wheel:function(k){var t=this;if(this.viewed&&(k.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var b=Number(this.options.zoomRatio)||.1,g=1;k.deltaY?g=k.deltaY>0?1:-1:k.wheelDelta?g=-k.wheelDelta/120:k.detail&&(g=k.detail>0?1:-1),this.zoom(-g*b,!0,null,k)}}},$0={show:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.element,b=this.options;if(b.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(k),this;if(ye(b.show)&&ie(t,ba,b.show,{once:!0}),Oe(t,ba)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var g=this.viewer;if(de(g,xr),g.setAttribute("role","dialog"),g.setAttribute("aria-labelledby",this.title.id),g.setAttribute("aria-modal",!0),g.removeAttribute("aria-hidden"),b.transition&&!k){var f=this.shown.bind(this);this.transitioning={abort:function(){ve(g,Ze,f),de(g,Ke)}},ne(g,Ae),g.initialOffsetWidth=g.offsetWidth,ie(g,Ze,f,{once:!0}),ne(g,Ke)}else ne(g,Ke),this.shown();return this},hide:function(){var k=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,b=this.element,g=this.options;if(g.inline||this.hiding||!(this.isShown||this.showing))return this;if(ye(g.hide)&&ie(b,va,g.hide,{once:!0}),Oe(b,va)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var f=this.viewer,o=this.image,a=function(){de(f,Ke),k.hidden()};if(g.transition&&!t){var r=function n(l){l&&l.target===f&&(ve(f,Ze,n),k.hidden())},e=function(){qr(f,Ae)?(ie(f,Ze,r),de(f,Ke)):a()};this.transitioning={abort:function(){k.viewed&&qr(o,Ae)?ve(o,Ze,e):qr(f,Ae)&&ve(f,Ze,r)}},this.viewed&&qr(o,Ae)?(ie(o,Ze,e,{once:!0}),this.zoomTo(0,!1,null,null,!0)):e()}else a();return this},view:function(){var k=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var b=this.element,g=this.options,f=this.title,o=this.canvas,a=this.items[t],r=a.querySelector("img"),e=Wr(r,"originalUrl"),n=r.getAttribute("alt"),l=document.createElement("img");if(_e(g.inheritedAttributes,function(c){var p=r.getAttribute(c);p!==null&&l.setAttribute(c,p)}),l.src=e,l.alt=n,ye(g.view)&&ie(b,_a,g.view,{once:!0}),Oe(b,_a,{originalImage:this.images[t],index:t,image:l})===!1||!this.isShown||this.hiding||this.played)return this;var i=this.items[this.index];i&&(de(i,Wn),i.removeAttribute("aria-selected")),ne(a,Wn),a.setAttribute("aria-selected",!0),g.focus&&a.focus(),this.image=l,this.viewed=!1,this.index=t,this.imageData={},ne(l,dn),g.loading&&ne(o,Lr),o.innerHTML="",o.appendChild(l),this.renderList(),f.innerHTML="";var s=function(){var p=k.imageData,m=Array.isArray(g.title)?g.title[1]:g.title;f.innerHTML=R0(ye(m)?m.call(k,l,p):"".concat(n," (").concat(p.naturalWidth," × ").concat(p.naturalHeight,")"))},h,d;return ie(b,pn,s,{once:!0}),this.viewing={abort:function(){ve(b,pn,s),l.complete?k.imageRendering?k.imageRendering.abort():k.imageInitializing&&k.imageInitializing.abort():(l.src="",ve(l,Xe,h),k.timeout&&clearTimeout(k.timeout))}},l.complete?this.load():(ie(l,Xe,h=function(){ve(l,Sr,d),k.load()},{once:!0}),ie(l,Sr,d=function(){ve(l,Xe,h),k.timeout&&(clearTimeout(k.timeout),k.timeout=!1),de(l,dn),g.loading&&de(k.canvas,Lr)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){de(l,dn),k.timeout=!1},1e3)),this},prev:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.index-1;return t<0&&(t=k?this.length-1:0),this.view(t),this},next:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.length-1,b=this.index+1;return b>t&&(b=k?0:t),this.view(b),this},move:function(k){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,b=this.imageData;return this.moveTo(Ur(k)?k:b.x+Number(k),Ur(t)?t:b.y+Number(t)),this},moveTo:function(k){var t=this,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,f=this.element,o=this.options,a=this.imageData;if(k=Number(k),b=Number(b),this.viewed&&!this.played&&o.movable){var r=a.x,e=a.y,n=!1;if(Te(k)?n=!0:k=r,Te(b)?n=!0:b=e,n){if(ye(o.move)&&ie(f,xa,o.move,{once:!0}),Oe(f,xa,{x:k,y:b,oldX:r,oldY:e,originalEvent:g})===!1)return this;a.x=k,a.y=b,a.left=k,a.top=b,this.moving=!0,this.renderImage(function(){t.moving=!1,ye(o.moved)&&ie(f,Sa,o.moved,{once:!0}),Oe(f,Sa,{x:k,y:b,oldX:r,oldY:e,originalEvent:g},{cancelable:!1})})}}return this},rotate:function(k){return this.rotateTo((this.imageData.rotate||0)+Number(k)),this},rotateTo:function(k){var t=this,b=this.element,g=this.options,f=this.imageData;if(k=Number(k),Te(k)&&this.viewed&&!this.played&&g.rotatable){var o=f.rotate;if(ye(g.rotate)&&ie(b,ka,g.rotate,{once:!0}),Oe(b,ka,{degree:k,oldDegree:o})===!1)return this;f.rotate=k,this.rotating=!0,this.renderImage(function(){t.rotating=!1,ye(g.rotated)&&ie(b,Ca,g.rotated,{once:!0}),Oe(b,Ca,{degree:k,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(k){return this.scale(k,this.imageData.scaleY),this},scaleY:function(k){return this.scale(this.imageData.scaleX,k),this},scale:function(k){var t=this,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,g=this.element,f=this.options,o=this.imageData;if(k=Number(k),b=Number(b),this.viewed&&!this.played&&f.scalable){var a=o.scaleX,r=o.scaleY,e=!1;if(Te(k)?e=!0:k=a,Te(b)?e=!0:b=r,e){if(ye(f.scale)&&ie(g,Ea,f.scale,{once:!0}),Oe(g,Ea,{scaleX:k,scaleY:b,oldScaleX:a,oldScaleY:r})===!1)return this;o.scaleX=k,o.scaleY=b,this.scaling=!0,this.renderImage(function(){t.scaling=!1,ye(f.scaled)&&ie(g,Ta,f.scaled,{once:!0}),Oe(g,Ta,{scaleX:k,scaleY:b,oldScaleX:a,oldScaleY:r},{cancelable:!1})})}}return this},zoom:function(k){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,f=this.imageData;return k=Number(k),k<0?k=1/(1-k):k=1+k,this.zoomTo(f.width*k/f.naturalWidth,t,b,g),this},zoomTo:function(k){var t=this,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,a=this.element,r=this.options,e=this.pointers,n=this.imageData,l=n.x,i=n.y,s=n.width,h=n.height,d=n.naturalWidth,c=n.naturalHeight;if(k=Math.max(0,k),Te(k)&&this.viewed&&!this.played&&(o||r.zoomable)){if(!o){var p=Math.max(.01,r.minZoomRatio),m=Math.min(100,r.maxZoomRatio);k=Math.min(Math.max(k,p),m)}if(f)switch(f.type){case"wheel":r.zoomRatio>=.055&&k>.95&&k<1.05&&(k=1);break;case"pointermove":case"touchmove":case"mousemove":k>.99&&k<1.01&&(k=1);break}var S=d*k,C=c*k,M=S-s,P=C-h,$=n.ratio;if(ye(r.zoom)&&ie(a,Aa,r.zoom,{once:!0}),Oe(a,Aa,{ratio:k,oldRatio:$,originalEvent:f})===!1)return this;if(this.zooming=!0,f){var N=I0(this.viewer),B=e&&Object.keys(e).length>0?B0(e):{pageX:f.pageX,pageY:f.pageY};n.x-=M*((B.pageX-N.left-l)/s),n.y-=P*((B.pageY-N.top-i)/h)}else Hr(g)&&Te(g.x)&&Te(g.y)?(n.x-=M*((g.x-l)/s),n.y-=P*((g.y-i)/h)):(n.x-=M/2,n.y-=P/2);n.left=n.x,n.top=n.y,n.width=S,n.height=C,n.oldRatio=$,n.ratio=k,this.renderImage(function(){t.zooming=!1,ye(r.zoomed)&&ie(a,Ma,r.zoomed,{once:!0}),Oe(a,Ma,{ratio:k,oldRatio:$,originalEvent:f},{cancelable:!1})}),b&&this.tooltip()}return this},play:function(){var k=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var b=this.element,g=this.options;if(ye(g.play)&&ie(b,Oa,g.play,{once:!0}),Oe(b,Oa)===!1)return this;var f=this.player,o=this.loadImage.bind(this),a=[],r=0,e=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),ne(f,$r),_e(this.items,function(i,s){var h=i.querySelector("img"),d=document.createElement("img");d.src=Wr(h,"originalUrl"),d.alt=h.getAttribute("alt"),d.referrerPolicy=h.referrerPolicy,r+=1,ne(d,Kn),gn(d,Ae,g.transition),qr(i,Wn)&&(ne(d,Ke),e=s),a.push(d),ie(d,Xe,o,{once:!0}),f.appendChild(d)}),Te(g.interval)&&g.interval>0){var n=function i(){clearTimeout(k.playing.timeout),de(a[e],Ke),e-=1,e=e>=0?e:r-1,ne(a[e],Ke),k.playing.timeout=setTimeout(i,g.interval)},l=function i(){clearTimeout(k.playing.timeout),de(a[e],Ke),e+=1,e=e<r?e:0,ne(a[e],Ke),k.playing.timeout=setTimeout(i,g.interval)};r>1&&(this.playing={prev:n,next:l,timeout:setTimeout(l,g.interval)})}return this},stop:function(){var k=this;if(!this.played)return this;var t=this.element,b=this.options;if(ye(b.stop)&&ie(t,Ra,b.stop,{once:!0}),Oe(t,Ra)===!1)return this;var g=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,_e(g.getElementsByTagName("img"),function(f){ve(f,Xe,k.onLoadWhenPlay)}),de(g,$r),g.innerHTML="",this.exitFullscreen(),this},full:function(){var k=this,t=this.options,b=this.viewer,g=this.image,f=this.list;return!this.isShown||this.played||this.fulled||!t.inline?this:(this.fulled=!0,this.open(),ne(this.button,oa),t.transition&&(de(f,Ae),this.viewed&&de(g,Ae)),ne(b,Qi),b.setAttribute("role","dialog"),b.setAttribute("aria-labelledby",this.title.id),b.setAttribute("aria-modal",!0),b.removeAttribute("style"),Je(b,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=Ve({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){k.renderImage(function(){t.transition&&setTimeout(function(){ne(g,Ae),ne(f,Ae)},0)})}),this)},exit:function(){var k=this,t=this.options,b=this.viewer,g=this.image,f=this.list;return!this.isShown||this.played||!this.fulled||!t.inline?this:(this.fulled=!1,this.close(),de(this.button,oa),t.transition&&(de(f,Ae),this.viewed&&de(g,Ae)),t.focus&&this.clearEnforceFocus(),b.removeAttribute("role"),b.removeAttribute("aria-labelledby"),b.removeAttribute("aria-modal"),de(b,Qi),Je(b,{zIndex:t.zIndexInline}),this.viewerData=Ve({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){k.renderImage(function(){t.transition&&setTimeout(function(){ne(g,Ae),ne(f,Ae)},0)})}),this)},tooltip:function(){var k=this,t=this.options,b=this.tooltipBox,g=this.imageData;return!this.viewed||this.played||!t.tooltip?this:(b.textContent="".concat(Math.round(g.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&Oe(b,Ze),ne(b,$r),ne(b,Kn),ne(b,Ae),b.removeAttribute("aria-hidden"),b.initialOffsetWidth=b.offsetWidth,ne(b,Ke)):(ne(b,$r),b.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(ie(b,Ze,function(){de(b,$r),de(b,Kn),de(b,Ae),b.setAttribute("aria-hidden",!0),k.fading=!1},{once:!0}),de(b,Ke),k.fading=!0):(de(b,$r),b.setAttribute("aria-hidden",!0)),k.tooltipping=!1},1e3),this)},toggle:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,k):this.zoomTo(1,!0,null,k),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=Ve({},this.initialImageData),this.renderImage()),this},update:function(){var k=this,t=this.element,b=this.options,g=this.isImg;if(g&&!t.parentNode)return this.destroy();var f=[];if(_e(g?[t]:t.querySelectorAll("img"),function(e){ye(b.filter)?b.filter.call(k,e)&&f.push(e):k.getImageURL(e)&&f.push(e)}),!f.length)return this;if(this.images=f,this.length=f.length,this.ready){var o=[];if(_e(this.items,function(e,n){var l=e.querySelector("img"),i=f[n];i&&l?(i.src!==l.src||i.alt!==l.alt)&&o.push(n):o.push(n)}),Je(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=o.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var r=this.items[this.index];ne(r,Wn),r.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var k=this.element,t=this.options;return k[ce]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||ve(k,zr,this.onStart),k[ce]=void 0,this):this}},z0={getImageURL:function(k){var t=this.options.url;return mn(t)?t=k.getAttribute(t):ye(t)?t=t.call(this,k):t="",t},enforceFocus:function(){var k=this;this.clearEnforceFocus(),ie(document,ca,this.onFocusin=function(t){var b=k.viewer,g=t.target;if(!(g===document||g===b||b.contains(g))){for(;g;){if(g.getAttribute("tabindex")!==null||g.getAttribute("aria-modal")==="true")return;g=g.parentElement}b.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(ve(document,ca,this.onFocusin),this.onFocusin=null)},open:function(){var k=this.body;ne(k,aa),this.scrollbarWidth>0&&(k.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var k=this.body;de(k,aa),this.scrollbarWidth>0&&(k.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var k=this.element,t=this.options,b=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(b.focus(),this.enforceFocus()),ye(t.shown)&&ie(k,ya,t.shown,{once:!0}),Oe(k,ya)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var k=this.element,t=this.options,b=this.viewer;t.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),ne(b,xr),b.removeAttribute("role"),b.removeAttribute("aria-labelledby"),b.removeAttribute("aria-modal"),b.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(ye(t.hidden)&&ie(k,wa,t.hidden,{once:!0}),Oe(k,wa,null,{cancelable:!1}))},requestFullscreen:function(k){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var b=t.documentElement;b.requestFullscreen?Hr(k)?b.requestFullscreen(k):b.requestFullscreen():b.webkitRequestFullscreen?b.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):b.mozRequestFullScreen?b.mozRequestFullScreen():b.msRequestFullscreen&&b.msRequestFullscreen()}},exitFullscreen:function(){var k=this.element.ownerDocument;this.fulled&&(k.fullscreenElement||k.webkitFullscreenElement||k.mozFullScreenElement||k.msFullscreenElement)&&(k.exitFullscreen?k.exitFullscreen():k.webkitExitFullscreen?k.webkitExitFullscreen():k.mozCancelFullScreen?k.mozCancelFullScreen():k.msExitFullscreen&&k.msExitFullscreen())},change:function(k){var t=this.options,b=this.pointers,g=b[Object.keys(b)[0]];if(g){var f=g.endX-g.startX,o=g.endY-g.startY;switch(this.action){case qn:(f!==0||o!==0)&&(this.pointerMoved=!0,this.move(f,o,k));break;case hn:this.zoom(P0(b),!1,null,k);break;case sa:{this.action="switched";var a=Math.abs(f);a>1&&a>Math.abs(o)&&(this.pointers={},f>1?this.prev(t.loop):f<-1&&this.next(t.loop));break}}_e(b,function(r){r.startX=r.endX,r.startY=r.endY})}},isSwitchable:function(){var k=this.imageData,t=this.viewerData;return this.length>1&&k.x>=0&&k.y>=0&&k.width<=t.width&&k.height<=t.height}},U0=lr.Viewer,V0=function(u){return function(){return u+=1,u}}(-1),ja=function(){function u(k){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(p0(this,u),!k||k.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=k,this.options=Ve({},ia,Hr(t)&&t),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=V0(),this.init()}return m0(u,[{key:"init",value:function(){var t=this,b=this.element,g=this.options;if(!b[ce]){b[ce]=this,g.focus&&!g.keyboard&&(g.focus=!1);var f=b.localName==="img",o=[];if(_e(f?[b]:b.querySelectorAll("img"),function(e){ye(g.filter)?g.filter.call(t,e)&&o.push(e):t.getImageURL(e)&&o.push(e)}),this.isImg=f,this.length=o.length,this.images=o,this.initBody(),Ur(document.createElement(ce).style.transition)&&(g.transition=!1),g.inline){var a=0,r=function(){if(a+=1,a===t.length){var n;t.initializing=!1,t.delaying={abort:function(){clearTimeout(n)}},n=setTimeout(function(){t.delaying=!1,t.build()},0)}};this.initializing={abort:function(){_e(o,function(n){n.complete||(ve(n,Xe,r),ve(n,Sr,r))})}},_e(o,function(e){if(e.complete)r();else{var n,l;ie(e,Xe,n=function(){ve(e,Sr,l),r()},{once:!0}),ie(e,Sr,l=function(){ve(e,Xe,n),r()},{once:!0})}})}else ie(b,zr,this.onStart=function(e){var n=e.target;n.localName==="img"&&(!ye(g.filter)||g.filter.call(t,n))&&t.view(t.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var t=this.element,b=this.options,g=t.parentNode,f=document.createElement("div");f.innerHTML=y0;var o=f.querySelector(".".concat(ce,"-container")),a=o.querySelector(".".concat(ce,"-title")),r=o.querySelector(".".concat(ce,"-toolbar")),e=o.querySelector(".".concat(ce,"-navbar")),n=o.querySelector(".".concat(ce,"-button")),l=o.querySelector(".".concat(ce,"-canvas"));if(this.parent=g,this.viewer=o,this.title=a,this.toolbar=r,this.navbar=e,this.button=n,this.canvas=l,this.footer=o.querySelector(".".concat(ce,"-footer")),this.tooltipBox=o.querySelector(".".concat(ce,"-tooltip")),this.player=o.querySelector(".".concat(ce,"-player")),this.list=o.querySelector(".".concat(ce,"-list")),o.id="".concat(ce).concat(this.id),a.id="".concat(ce,"Title").concat(this.id),ne(a,b.title?Zn(Array.isArray(b.title)?b.title[0]:b.title):xr),ne(e,b.navbar?Zn(b.navbar):xr),gn(n,xr,!b.button),b.keyboard&&n.setAttribute("tabindex",0),b.backdrop&&(ne(o,"".concat(ce,"-backdrop")),!b.inline&&b.backdrop!=="static"&&ns(l,Xn,"hide")),mn(b.className)&&b.className&&b.className.split(es).forEach(function(S){ne(o,S)}),b.toolbar){var i=document.createElement("ul"),s=Hr(b.toolbar),h=Yn.slice(0,3),d=Yn.slice(7,9),c=Yn.slice(9);s||ne(r,Zn(b.toolbar)),_e(s?b.toolbar:Yn,function(S,C){var M=s&&Hr(S),P=s?rs(C):S,$=M&&!Ur(S.show)?S.show:S;if(!(!$||!b.zoomable&&h.indexOf(P)!==-1||!b.rotatable&&d.indexOf(P)!==-1||!b.scalable&&c.indexOf(P)!==-1)){var N=M&&!Ur(S.size)?S.size:S,B=M&&!Ur(S.click)?S.click:S,D=document.createElement("li");b.keyboard&&D.setAttribute("tabindex",0),D.setAttribute("role","button"),ne(D,"".concat(ce,"-").concat(P)),ye(B)||ns(D,Xn,P),Te($)&&ne(D,Zn($)),["small","large"].indexOf(N)!==-1?ne(D,"".concat(ce,"-").concat(N)):P==="play"&&ne(D,"".concat(ce,"-large")),ye(B)&&ie(D,zr,B),i.appendChild(D)}}),r.appendChild(i)}else ne(r,xr);if(!b.rotatable){var p=r.querySelectorAll('li[class*="rotate"]');ne(p,dn),_e(p,function(S){r.appendChild(S)})}if(b.inline)ne(n,w0),Je(o,{zIndex:b.zIndexInline}),window.getComputedStyle(g).position==="static"&&Je(g,{position:"relative"}),g.insertBefore(o,t.nextSibling);else{ne(n,v0),ne(o,Qi),ne(o,Kn),ne(o,xr),Je(o,{zIndex:b.zIndex});var m=b.container;mn(m)&&(m=t.ownerDocument.querySelector(m)),m||(m=this.body),m.appendChild(o)}if(b.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,ye(b.ready)&&ie(t,ga,b.ready,{once:!0}),Oe(t,ga)===!1){this.ready=!1;return}this.ready&&b.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=U0,u}},{key:"setDefaults",value:function(t){Ve(ia,Hr(t)&&t)}}]),u}();Ve(ja.prototype,D0,F0,L0,$0,z0);var H0=typeof global=="object"&&global&&global.Object===Object&&global;const Pa=H0;var q0=typeof self=="object"&&self&&self.Object===Object&&self,W0=Pa||q0||Function("return this")();const ss=W0;var K0=ss.Symbol;const Qn=K0;var Ba=Object.prototype,X0=Ba.hasOwnProperty,Y0=Ba.toString,bn=Qn?Qn.toStringTag:void 0;function G0(u){var k=X0.call(u,bn),t=u[bn];try{u[bn]=void 0;var b=!0}catch{}var g=Y0.call(u);return b&&(k?u[bn]=t:delete u[bn]),g}var Z0=Object.prototype,J0=Z0.toString;function Q0(u){return J0.call(u)}var t1="[object Null]",e1="[object Undefined]",Da=Qn?Qn.toStringTag:void 0;function os(u){return u==null?u===void 0?e1:t1:Da&&Da in Object(u)?G0(u):Q0(u)}function as(u){return u!=null&&typeof u=="object"}var r1=Array.isArray;const n1=r1;function ti(u){var k=typeof u;return u!=null&&(k=="object"||k=="function")}function Fa(u){return u}var i1="[object AsyncFunction]",s1="[object Function]",o1="[object GeneratorFunction]",a1="[object Proxy]";function La(u){if(!ti(u))return!1;var k=os(u);return k==s1||k==o1||k==i1||k==a1}var l1=ss["__core-js_shared__"];const ls=l1;var $a=function(){var u=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}();function c1(u){return!!$a&&$a in u}var u1=Function.prototype,f1=u1.toString;function h1(u){if(u!=null){try{return f1.call(u)}catch{}try{return u+""}catch{}}return""}var d1=/[\\^$.*+?()[\]{}|]/g,p1=/^\[object .+?Constructor\]$/,m1=Function.prototype,g1=Object.prototype,b1=m1.toString,y1=g1.hasOwnProperty,v1=RegExp("^"+b1.call(y1).replace(d1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function w1(u){if(!ti(u)||c1(u))return!1;var k=La(u)?v1:p1;return k.test(h1(u))}function _1(u,k){return u==null?void 0:u[k]}function x1(u,k){var t=_1(u,k);return w1(t)?t:void 0}function S1(u,k,t){switch(t.length){case 0:return u.call(k);case 1:return u.call(k,t[0]);case 2:return u.call(k,t[0],t[1]);case 3:return u.call(k,t[0],t[1],t[2])}return u.apply(k,t)}var k1=800,C1=16,E1=Date.now;function T1(u){var k=0,t=0;return function(){var b=E1(),g=C1-(b-t);if(t=b,g>0){if(++k>=k1)return arguments[0]}else k=0;return u.apply(void 0,arguments)}}function A1(u){return function(){return u}}var M1=function(){try{var u=x1(Object,"defineProperty");return u({},"",{}),u}catch{}}();const ei=M1;var O1=ei?function(u,k){return ei(u,"toString",{configurable:!0,enumerable:!1,value:A1(k),writable:!0})}:Fa,R1=T1(O1);const N1=R1;var I1=9007199254740991,j1=/^(?:0|[1-9]\d*)$/;function za(u,k){var t=typeof u;return k=k??I1,!!k&&(t=="number"||t!="symbol"&&j1.test(u))&&u>-1&&u%1==0&&u<k}function Ua(u,k,t){k=="__proto__"&&ei?ei(u,k,{configurable:!0,enumerable:!0,value:t,writable:!0}):u[k]=t}function cs(u,k){return u===k||u!==u&&k!==k}var P1=Object.prototype,B1=P1.hasOwnProperty;function Va(u,k,t){var b=u[k];(!(B1.call(u,k)&&cs(b,t))||t===void 0&&!(k in u))&&Ua(u,k,t)}function D1(u,k,t,b){var g=!t;t||(t={});for(var f=-1,o=k.length;++f<o;){var a=k[f],r=b?b(t[a],u[a],a,t,u):void 0;r===void 0&&(r=u[a]),g?Ua(t,a,r):Va(t,a,r)}return t}var Ha=Math.max;function F1(u,k,t){return k=Ha(k===void 0?u.length-1:k,0),function(){for(var b=arguments,g=-1,f=Ha(b.length-k,0),o=Array(f);++g<f;)o[g]=b[k+g];g=-1;for(var a=Array(k+1);++g<k;)a[g]=b[g];return a[k]=t(o),S1(u,this,a)}}function qa(u,k){return N1(F1(u,k,Fa),u+"")}var L1=9007199254740991;function Wa(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=L1}function ri(u){return u!=null&&Wa(u.length)&&!La(u)}function Ka(u,k,t){if(!ti(t))return!1;var b=typeof k;return(b=="number"?ri(t)&&za(k,t.length):b=="string"&&k in t)?cs(t[k],u):!1}function $1(u){return qa(function(k,t){var b=-1,g=t.length,f=g>1?t[g-1]:void 0,o=g>2?t[2]:void 0;for(f=u.length>3&&typeof f=="function"?(g--,f):void 0,o&&Ka(t[0],t[1],o)&&(f=g<3?void 0:f,g=1),k=Object(k);++b<g;){var a=t[b];a&&u(k,a,b,f)}return k})}var z1=Object.prototype;function us(u){var k=u&&u.constructor,t=typeof k=="function"&&k.prototype||z1;return u===t}function U1(u,k){for(var t=-1,b=Array(u);++t<u;)b[t]=k(t);return b}var V1="[object Arguments]";function Xa(u){return as(u)&&os(u)==V1}var Ya=Object.prototype,H1=Ya.hasOwnProperty,q1=Ya.propertyIsEnumerable,W1=Xa(function(){return arguments}())?Xa:function(u){return as(u)&&H1.call(u,"callee")&&!q1.call(u,"callee")};const K1=W1;function X1(){return!1}var Ga=typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,Za=Ga&&typeof module=="object"&&module&&!module.nodeType&&module,Y1=Za&&Za.exports===Ga,Ja=Y1?ss.Buffer:void 0,G1=Ja?Ja.isBuffer:void 0,Z1=G1||X1;const J1=Z1;var Q1="[object Arguments]",tg="[object Array]",eg="[object Boolean]",rg="[object Date]",ng="[object Error]",ig="[object Function]",sg="[object Map]",og="[object Number]",ag="[object Object]",lg="[object RegExp]",cg="[object Set]",ug="[object String]",fg="[object WeakMap]",hg="[object ArrayBuffer]",dg="[object DataView]",pg="[object Float32Array]",mg="[object Float64Array]",gg="[object Int8Array]",bg="[object Int16Array]",yg="[object Int32Array]",vg="[object Uint8Array]",wg="[object Uint8ClampedArray]",_g="[object Uint16Array]",xg="[object Uint32Array]",Se={};Se[pg]=Se[mg]=Se[gg]=Se[bg]=Se[yg]=Se[vg]=Se[wg]=Se[_g]=Se[xg]=!0,Se[Q1]=Se[tg]=Se[hg]=Se[eg]=Se[dg]=Se[rg]=Se[ng]=Se[ig]=Se[sg]=Se[og]=Se[ag]=Se[lg]=Se[cg]=Se[ug]=Se[fg]=!1;function Sg(u){return as(u)&&Wa(u.length)&&!!Se[os(u)]}function kg(u){return function(k){return u(k)}}var Qa=typeof Gt=="object"&&Gt&&!Gt.nodeType&&Gt,yn=Qa&&typeof module=="object"&&module&&!module.nodeType&&module,Cg=yn&&yn.exports===Qa,fs=Cg&&Pa.process,Eg=function(){try{var u=yn&&yn.require&&yn.require("util").types;return u||fs&&fs.binding&&fs.binding("util")}catch{}}();const tl=Eg;var el=tl&&tl.isTypedArray,Tg=el?kg(el):Sg;const Ag=Tg;var Mg=Object.prototype,Og=Mg.hasOwnProperty;function rl(u,k){var t=n1(u),b=!t&&K1(u),g=!t&&!b&&J1(u),f=!t&&!b&&!g&&Ag(u),o=t||b||g||f,a=o?U1(u.length,String):[],r=a.length;for(var e in u)(k||Og.call(u,e))&&!(o&&(e=="length"||g&&(e=="offset"||e=="parent")||f&&(e=="buffer"||e=="byteLength"||e=="byteOffset")||za(e,r)))&&a.push(e);return a}function Rg(u,k){return function(t){return u(k(t))}}var Ng=Rg(Object.keys,Object);const Ig=Ng;var jg=Object.prototype,Pg=jg.hasOwnProperty;function Bg(u){if(!us(u))return Ig(u);var k=[];for(var t in Object(u))Pg.call(u,t)&&t!="constructor"&&k.push(t);return k}function Dg(u){return ri(u)?rl(u):Bg(u)}var Fg=Object.prototype,Lg=Fg.hasOwnProperty;$1(function(u,k){if(us(k)||ri(k)){D1(k,Dg(k),u);return}for(var t in k)Lg.call(k,t)&&Va(u,t,k[t])});function $g(u){var k=[];if(u!=null)for(var t in Object(u))k.push(t);return k}var zg=Object.prototype,Ug=zg.hasOwnProperty;function Vg(u){if(!ti(u))return $g(u);var k=us(u),t=[];for(var b in u)b=="constructor"&&(k||!Ug.call(u,b))||t.push(b);return t}function Hg(u){return ri(u)?rl(u,!0):Vg(u)}var nl=Object.prototype,qg=nl.hasOwnProperty;qa(function(u,k){u=Object(u);var t=-1,b=k.length,g=b>2?k[2]:void 0;for(g&&Ka(k[0],k[1],g)&&(b=1);++t<b;)for(var f=k[t],o=Hg(f),a=-1,r=o.length;++a<r;){var e=o[a],n=u[e];(n===void 0||cs(n,nl[e])&&!qg.call(u,e))&&(u[e]=f[e])}return u});const Wg=T.defineComponent({name:"Viewer",props:{images:{type:Array,default:()=>[]},rebuild:{type:Boolean,default:!1},trigger:{type:Object,default:null},options:{type:Object,default:()=>null}},emits:["inited"],setup(u,{emit:k}){let t;const b=T.ref();function g(){t=new ja(b.value,u.options),k("inited",t)}function f(){t&&t.destroy()}function o(){f(),g()}function a(){t?(t.update(),k("inited",t)):g()}function r(){u.rebuild?o():a()}const e={deep:!0};return T.watch(()=>u.images,()=>{T.nextTick(()=>{r()})},e),T.watch(()=>u.trigger,()=>{T.nextTick(()=>{r()})},e),T.watch(()=>u.options,()=>{T.nextTick(()=>{o()})},e),T.onMounted(()=>g()),T.onUnmounted(()=>f()),{root:b,createViewer:g,rebuildViewer:o,updateViewer:a,destroyViewer:f}}}),Kg=(u,k)=>{const t=u.__vccOpts||u;for(const[b,g]of k)t[b]=g;return t},Xg={ref:"root"};function Yg(u,k,t,b,g,f){return T.openBlock(),T.createElementBlock("div",Xg,[T.renderSlot(u.$slots,"default",{images:u.images,options:u.options})],512)}const Gg=Kg(Wg,[["render",Yg]]),Zg=["src"],[Jg]=je("preview-media-modal"),Qg={name:Jg},hs=T.defineComponent({...Qg,props:{show:{type:Boolean},imageList:{},imageIndex:{}},emits:["update:show"],setup(u,{expose:k,emit:t}){const b=u,{t:g}=Ue(),f=x=>t("update:show",x),o=T.ref(!1),a=T.ref(650);function r(){const x=window.document.documentElement.scrollHeight-110;a.value=x>650?650:x}T.onMounted(()=>{r()});const e=T.ref(null),n={transition:!1,inline:!0,button:!1,toolbar:{rotateLeft:!0,prev:!0,oneToOne:!0,next:!0,rotateRight:!0}},l=T.ref(!1),i=T.ref([]),s=T.ref(0);T.watch([()=>b.imageList,()=>b.imageIndex],()=>{b.imageList&&(i.value=[...b.imageList],s.value=b.imageIndex||0)}),T.watch(()=>b.show,()=>{b.show&&r(),l.value=b.show});const h=x=>{e.value=x,x.view(s.value)},d=T.ref(null),{x:c,y:p,isDragging:m}=Sc(d),S=T.ref(0),C=T.ref(0),M=T.ref(!1),P=T.ref(0),$=T.ref(0),N=T.ref(0),B=T.ref(0),D=T.ref({left:0,right:0,top:0,bottom:0});T.watch([c,p],()=>{if(!M.value){S.value=c.value,C.value=p.value;const x=document.body.getBoundingClientRect(),y=d.value.getBoundingClientRect();D.value.right=x.width-y.width,D.value.bottom=x.height-y.height,N.value=P.value,B.value=$.value}M.value=!0}),T.watch(m,()=>{m||(M.value=!1)}),T.watchEffect(()=>{M.value&&(P.value=N.value+Math.min(Math.max(D.value.left,c.value),D.value.right)-S.value,$.value=B.value+Math.min(Math.max(D.value.top,p.value),D.value.bottom)-C.value)});const U=T.computed(()=>({transform:`translate(${P.value}px, ${$.value}px)`})),z=(x,y=0,v)=>{v&&(o.value=v),i.value=[...x],s.value=y,r(),l.value=!0},E=()=>{l.value=!1},O=()=>{f(!1)};return k({open:z,close:E}),(x,y)=>(T.openBlock(),T.createBlock(T.unref(Ft.Modal),{visible:l.value,"onUpdate:visible":y[0]||(y[0]=v=>l.value=v),"destroy-on-close":"",centered:"",width:800,mask:o.value,"mask-closable":!1,"wrap-class-name":"pointer-events-none preview-media-modal","wrap-style":{overflow:"hidden"},footer:null,onOk:E,onCancel:O},{title:T.withCtx(()=>[T.createElementVNode("div",{ref_key:"modalTitleRef",ref:d,style:{width:"100%",cursor:"move"}},[T.createVNode(T.unref(Le.HolderOutlined),{style:{"margin-right":"6px"}}),T.createTextVNode(T.toDisplayString(T.unref(g)("preview")||"预览"),1)],512)]),modalRender:T.withCtx(({originVNode:v})=>[T.createElementVNode("div",{style:T.normalizeStyle(U.value)},[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(v)))],4)]),default:T.withCtx(()=>[T.createVNode(T.unref(Gg),{options:n,images:i.value,onInited:h},{default:T.withCtx(v=>[T.createElementVNode("div",{class:"preview-media-modal__content",style:T.normalizeStyle(`height: ${a.value}px; overflow: hidden`)},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(v.images,w=>(T.openBlock(),T.createElementBlock("img",{style:{opacity:"0"},src:w,key:w},null,8,Zg))),128))],4)]),_:1},8,["images"])]),_:1},8,["visible","mask"]))}}),iv="";var tb=typeof window<"u";function eb(u){const k=T.getCurrentInstance();k&&Si(k.proxy,u)}function rb(){const u=T.reactive({show:!1}),k=g=>{u.show=g},t=g=>{Si(u,g,{transitionAppear:!0}),k(!0)},b=()=>k(!1);return eb({open:t,close:b,toggle:k}),{open:t,close:b,state:u,toggle:k}}function nb(u){var b;const k=T.createApp(u),t=document.createElement("div");return(b=document.querySelector("body"))==null||b.appendChild(t),{instance:k.mount(t),unmount(){var g;k.unmount(),(g=document.querySelector("body"))==null||g.removeChild(t)}}}let ni;function ib(){({instance:ni}=nb({setup(){const{state:u,toggle:k}=rb();return()=>T.createVNode(hs,T.mergeProps(u,{"onUpdate:show":k}),null)}}))}function sb(u,k,t){return tb?(ni||ib(),ni.open({imageList:u,imageIndex:k,mask:t}),ni):Promise.resolve(void 0)}const il=Fe(hs);var oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sl(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ol={exports:{}};(function(u,k){(function(t,b){u.exports=b()})(oe,function(){var t=1e3,b=6e4,g=36e5,f="millisecond",o="second",a="minute",r="hour",e="day",n="week",l="month",i="quarter",s="year",h="date",d="Invalid Date",c=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var x=["th","st","nd","rd"],y=O%100;return"["+O+(x[(y-20)%10]||x[y]||x[0])+"]"}},S=function(O,x,y){var v=String(O);return!v||v.length>=x?O:""+Array(x+1-v.length).join(y)+O},C={s:S,z:function(O){var x=-O.utcOffset(),y=Math.abs(x),v=Math.floor(y/60),w=y%60;return(x<=0?"+":"-")+S(v,2,"0")+":"+S(w,2,"0")},m:function O(x,y){if(x.date()<y.date())return-O(y,x);var v=12*(y.year()-x.year())+(y.month()-x.month()),w=x.clone().add(v,l),_=y-w<0,A=x.clone().add(v+(_?-1:1),l);return+(-(v+(y-w)/(_?w-A:A-w))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:l,y:s,w:n,d:e,D:h,h:r,m:a,s:o,ms:f,Q:i}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},M="en",P={};P[M]=m;var $="$isDayjsObject",N=function(O){return O instanceof z||!(!O||!O[$])},B=function O(x,y,v){var w;if(!x)return M;if(typeof x=="string"){var _=x.toLowerCase();P[_]&&(w=_),y&&(P[_]=y,w=_);var A=x.split("-");if(!w&&A.length>1)return O(A[0])}else{var j=x.name;P[j]=x,w=j}return!v&&w&&(M=w),w||!v&&M},D=function(O,x){if(N(O))return O.clone();var y=typeof x=="object"?x:{};return y.date=O,y.args=arguments,new z(y)},U=C;U.l=B,U.i=N,U.w=function(O,x){return D(O,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var z=function(){function O(y){this.$L=B(y.locale,null,!0),this.parse(y),this.$x=this.$x||y.x||{},this[$]=!0}var x=O.prototype;return x.parse=function(y){this.$d=function(v){var w=v.date,_=v.utc;if(w===null)return new Date(NaN);if(U.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var A=w.match(c);if(A){var j=A[2]-1||0,L=(A[7]||"0").substring(0,3);return _?new Date(Date.UTC(A[1],j,A[3]||1,A[4]||0,A[5]||0,A[6]||0,L)):new Date(A[1],j,A[3]||1,A[4]||0,A[5]||0,A[6]||0,L)}}return new Date(w)}(y),this.init()},x.init=function(){var y=this.$d;this.$y=y.getFullYear(),this.$M=y.getMonth(),this.$D=y.getDate(),this.$W=y.getDay(),this.$H=y.getHours(),this.$m=y.getMinutes(),this.$s=y.getSeconds(),this.$ms=y.getMilliseconds()},x.$utils=function(){return U},x.isValid=function(){return this.$d.toString()!==d},x.isSame=function(y,v){var w=D(y);return this.startOf(v)<=w&&w<=this.endOf(v)},x.isAfter=function(y,v){return D(y)<this.startOf(v)},x.isBefore=function(y,v){return this.endOf(v)<D(y)},x.$g=function(y,v,w){return U.u(y)?this[v]:this.set(w,y)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(y,v){var w=this,_=!!U.u(v)||v,A=U.p(y),j=function(R,V){var K=U.w(w.$u?Date.UTC(w.$y,V,R):new Date(w.$y,V,R),w);return _?K:K.endOf(e)},L=function(R,V){return U.w(w.toDate()[R].apply(w.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(V)),w)},H=this.$W,q=this.$M,X=this.$D,F="set"+(this.$u?"UTC":"");switch(A){case s:return _?j(1,0):j(31,11);case l:return _?j(1,q):j(0,q+1);case n:var W=this.$locale().weekStart||0,I=(H<W?H+7:H)-W;return j(_?X-I:X+(6-I),q);case e:case h:return L(F+"Hours",0);case r:return L(F+"Minutes",1);case a:return L(F+"Seconds",2);case o:return L(F+"Milliseconds",3);default:return this.clone()}},x.endOf=function(y){return this.startOf(y,!1)},x.$set=function(y,v){var w,_=U.p(y),A="set"+(this.$u?"UTC":""),j=(w={},w[e]=A+"Date",w[h]=A+"Date",w[l]=A+"Month",w[s]=A+"FullYear",w[r]=A+"Hours",w[a]=A+"Minutes",w[o]=A+"Seconds",w[f]=A+"Milliseconds",w)[_],L=_===e?this.$D+(v-this.$W):v;if(_===l||_===s){var H=this.clone().set(h,1);H.$d[j](L),H.init(),this.$d=H.set(h,Math.min(this.$D,H.daysInMonth())).$d}else j&&this.$d[j](L);return this.init(),this},x.set=function(y,v){return this.clone().$set(y,v)},x.get=function(y){return this[U.p(y)]()},x.add=function(y,v){var w,_=this;y=Number(y);var A=U.p(v),j=function(q){var X=D(_);return U.w(X.date(X.date()+Math.round(q*y)),_)};if(A===l)return this.set(l,this.$M+y);if(A===s)return this.set(s,this.$y+y);if(A===e)return j(1);if(A===n)return j(7);var L=(w={},w[a]=b,w[r]=g,w[o]=t,w)[A]||1,H=this.$d.getTime()+y*L;return U.w(H,this)},x.subtract=function(y,v){return this.add(-1*y,v)},x.format=function(y){var v=this,w=this.$locale();if(!this.isValid())return w.invalidDate||d;var _=y||"YYYY-MM-DDTHH:mm:ssZ",A=U.z(this),j=this.$H,L=this.$m,H=this.$M,q=w.weekdays,X=w.months,F=w.meridiem,W=function(V,K,Z,Y){return V&&(V[K]||V(v,_))||Z[K].slice(0,Y)},I=function(V){return U.s(j%12||12,V,"0")},R=F||function(V,K,Z){var Y=V<12?"AM":"PM";return Z?Y.toLowerCase():Y};return _.replace(p,function(V,K){return K||function(Z){switch(Z){case"YY":return String(v.$y).slice(-2);case"YYYY":return U.s(v.$y,4,"0");case"M":return H+1;case"MM":return U.s(H+1,2,"0");case"MMM":return W(w.monthsShort,H,X,3);case"MMMM":return W(X,H);case"D":return v.$D;case"DD":return U.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return W(w.weekdaysMin,v.$W,q,2);case"ddd":return W(w.weekdaysShort,v.$W,q,3);case"dddd":return q[v.$W];case"H":return String(j);case"HH":return U.s(j,2,"0");case"h":return I(1);case"hh":return I(2);case"a":return R(j,L,!0);case"A":return R(j,L,!1);case"m":return String(L);case"mm":return U.s(L,2,"0");case"s":return String(v.$s);case"ss":return U.s(v.$s,2,"0");case"SSS":return U.s(v.$ms,3,"0");case"Z":return A}return null}(V)||A.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(y,v,w){var _,A=this,j=U.p(v),L=D(y),H=(L.utcOffset()-this.utcOffset())*b,q=this-L,X=function(){return U.m(A,L)};switch(j){case s:_=X()/12;break;case l:_=X();break;case i:_=X()/3;break;case n:_=(q-H)/6048e5;break;case e:_=(q-H)/864e5;break;case r:_=q/g;break;case a:_=q/b;break;case o:_=q/t;break;default:_=q}return w?_:U.a(_)},x.daysInMonth=function(){return this.endOf(l).$D},x.$locale=function(){return P[this.$L]},x.locale=function(y,v){if(!y)return this.$L;var w=this.clone(),_=B(y,v,!0);return _&&(w.$L=_),w},x.clone=function(){return U.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},O}(),E=z.prototype;return D.prototype=E,[["$ms",f],["$s",o],["$m",a],["$H",r],["$W",e],["$M",l],["$y",s],["$D",h]].forEach(function(O){E[O[1]]=function(x){return this.$g(x,O[0],O[1])}}),D.extend=function(O,x){return O.$i||(O(x,z,D),O.$i=!0),D},D.locale=B,D.isDayjs=N,D.unix=function(O){return D(1e3*O)},D.en=P[M],D.Ls=P,D.p={},D})})(ol);var ob=ol.exports;const ds=sl(ob),ab={},al=Symbol("GLOBAL_OPTIONS_PROVIDE_KEY"),ll=()=>ab,cr=u=>u,lb=Object.prototype.toString,cb=u=>lb.call(u),ub=u=>cb(u)==="[object Object]",ii=u=>Array.isArray(u),vn=u=>u!==null&&typeof u=="object",ps=u=>u instanceof Function,wn=u=>u==null,ms=typeof window>"u",cl=()=>{var u;return ms||wn((u=window.document)===null||u===void 0?void 0:u.visibilityState)?!0:window.document.visibilityState==="visible"},fb=()=>{var u,k;return(u=!ms&&((k=window.navigator)===null||k===void 0?void 0:k.onLine))!==null&&u!==void 0?u:!0},gs=()=>new Promise(()=>{}),ul=function(u,k){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const b=k.replace(/\[(\d+)\]/g,".$1").split(".");let g=u;for(const f of b)if(g=Object(g)[f],g===void 0)return t;return g},rr=u=>T.isRef(u)?u.value:u,hb=u=>vn(u)?Object.assign(ii(u)?[]:{},u):u,si=new Map,db=u=>wn(u)?void 0:si.get(u),pb=(u,k,t)=>{const b=si.get(u);b!=null&&b.timer&&clearTimeout(b.timer);const g=setTimeout(()=>si.delete(u),k);si.set(u,{...t,timer:g})};function fl(u,k,t){let b,g,f,o,a,r,e=0,n=!1,l=!1,i=!0;const s=!k&&k!==0&&typeof window.requestAnimationFrame=="function";if(typeof u!="function")throw new TypeError("Expected a function");k=+k||0,vn(t)&&(n=!!t.leading,l="maxWait"in t,f=l?Math.max(+t.maxWait||0,k):f,i="trailing"in t?!!t.trailing:i);function h(D){const U=b,z=g;return b=g=void 0,e=D,o=u.apply(z,U),o}function d(D,U){return s?(window.cancelAnimationFrame(a),window.requestAnimationFrame(D)):setTimeout(D,U)}function c(D){if(s)return window.cancelAnimationFrame(D);clearTimeout(D)}function p(D){return e=D,a=d(C,k),n?h(D):o}function m(D){const U=D-r,z=D-e,E=k-U;return l?Math.min(E,f-z):E}function S(D){const U=D-r,z=D-e;return r===void 0||U>=k||U<0||l&&z>=f}function C(){const D=Date.now();if(S(D))return M(D);a=d(C,m(D))}function M(D){return a=void 0,i&&b?h(D):(b=g=void 0,o)}function P(){a!==void 0&&c(a),e=0,b=r=g=a=void 0}function $(){return a===void 0?o:M(Date.now())}function N(){return a!==void 0}function B(){const D=Date.now(),U=S(D);for(var z=arguments.length,E=new Array(z),O=0;O<z;O++)E[O]=arguments[O];if(b=E,g=this,r=D,U){if(a===void 0)return p(r);if(l)return a=d(C,k),h(r)}return a===void 0&&(a=d(C,k)),o}return B.cancel=P,B.flush=$,B.pending=N,B}function hl(u,k){for(const t in k)if(k[t]!==void 0){if(!vn(k[t])||!vn(u[t])||!(t in u)){u[t]=k[t];continue}(ub(k[t])||ii(k[t]))&&hl(u[t],k[t])}}function dl(u){const k=Object.assign({},u);for(var t=arguments.length,b=new Array(t>1?t-1:0),g=1;g<t;g++)b[g-1]=arguments[g];if(!b.length)return k;for(const f of b)hl(k,f);return k}function mb(u,k,t){let b=!0,g=!0;if(typeof u!="function")throw new TypeError("Expected a function");return vn(t)&&(b="leading"in t?!!t.leading:b,g="trailing"in t?!!t.trailing:g),fl(u,k,{leading:b,trailing:g,maxWait:k})}var gb=cr((u,k)=>{let{debounceInterval:t,debounceOptions:b,manual:g}=k;const f=T.ref(!1),o=T.ref(),a=T.computed(()=>b),r=T.computed(()=>rr(t)),e=T.ref(u.context.runAsync);return g||(f.value=!0),T.watchEffect(n=>{wn(r.value)||(o.value=fl(l=>l(),r.value,a.value),u.context.runAsync=function(){for(var l=arguments.length,i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return new Promise((h,d)=>{f.value?(f.value=!1,e.value(...i).then(h).catch(d)):o.value(()=>{e.value(...i).then(h).catch(d)})})},n(()=>{var l;(l=o.value)===null||l===void 0||l.cancel(),u.context.runAsync=e.value}))}),{onCancel(){var n;(n=o.value)===null||n===void 0||n.cancel()}}}),bb=cr((u,k)=>{let{errorRetryCount:t=0,errorRetryInterval:b=0}=k;const g=T.ref(),f=T.ref(0),o=T.computed(()=>rr(t)),a=T.computed(()=>rr(b));let r=!1;const e=()=>{f.value=0},n=T.computed(()=>{if(a.value)return a.value;const s=1e3,h=1,d=9,c=Math.floor(Math.random()*2**Math.min(f.value,d)+h);return s*c}),l=()=>{let s;const h=o.value===-1,d=f.value<o.value;return(h||d)&&(h||(f.value+=1),s=setTimeout(()=>{r=!0,u.context.refresh()},n.value)),()=>s&&clearTimeout(s)},i=()=>{g.value&&g.value()};return{onBefore(){r||e(),r=!1,i()},onSuccess(){e()},onError(){g.value=l()},onCancel(){e(),i()}}}),yb=cr((u,k)=>{let{ready:t=T.ref(!0),manual:b,defaultParams:g=[]}=k;return T.watch(t,f=>{!b&&f&&u.context.run(...g)},{flush:"sync"}),{onBefore(){if(!(ps(t)?t():t.value))return u.loading.value=!1,{isBreak:!0}}}}),vb=cr((u,k)=>{let{refreshDeps:t,refreshDepsAction:b,manual:g}=k;if(t===void 0||ii(t)&&t.length===0)return{};const f=ii(t)?t:[t];return T.watch(f,()=>{b?b():!g&&u.context.refresh()}),{}}),wb=cr((u,k)=>{let{throttleInterval:t,throttleOptions:b}=k;const g=T.ref(),f=T.computed(()=>rr(t)),o=T.computed(()=>b),a=T.ref(u.context.runAsync);return T.watchEffect(r=>{if(wn(t))return{};g.value=mb(e=>e(),f.value,o.value),u.context.runAsync=function(){for(var e=arguments.length,n=new Array(e),l=0;l<e;l++)n[l]=arguments[l];return new Promise((i,s)=>{g.value(()=>{a.value(...n).then(i).catch(s)})})},r(()=>{var e;(e=g.value)===null||e===void 0||e.cancel(),u.context.runAsync=a.value})}),{onCancel(){var r;(r=g.value)===null||r===void 0||r.cancel()}}});const _b=(u,k)=>t=>{Object.keys(t).forEach(b=>{u[b].value=t[b]}),k.forEach(b=>b(u))},xb=(u,k)=>()=>{let t=k;for(let b=u.length;b-- >0;)t=u[b](t);return t()},Sb=(u,k,t)=>{var b,g;const{initialData:f,onSuccess:o,onError:a,onBefore:r,onAfter:e}=k,n=T.ref((b=t==null?void 0:t.loading)!==null&&b!==void 0?b:!1),l=T.shallowRef((g=t==null?void 0:t.data)!==null&&g!==void 0?g:f),i=T.shallowRef(t==null?void 0:t.error),s=T.ref(t==null?void 0:t.params),h=T.ref([]),d=T.shallowRef("pending"),c={},p=_b({status:d,loading:n,data:l,error:i,params:s},[]),m=function(C){for(var M=arguments.length,P=new Array(M>1?M-1:0),$=1;$<M;$++)P[$-1]=arguments[$];if(C==="onQuery"){const N=h.value.map(B=>B.onQuery).filter(Boolean);return{servicePromise:xb(N,P[0])()}}else{const N=h.value.map(B=>{var D;return(D=B[C])===null||D===void 0?void 0:D.call(B,...P)});return Object.assign({},...N)}},S=T.ref(0);return c.runAsync=async function(){for(var C=arguments.length,M=new Array(C),P=0;P<C;P++)M[P]=arguments[P];p({loading:!0,params:M,status:"pending"}),S.value+=1;const $=S.value,{isBreak:N,breakResult:B=gs()}=m("onBefore",M);if(N)return p({status:"settled"}),B;r==null||r(M);try{const D=()=>new Promise(E=>E(u(...s.value)));let{servicePromise:U}=m("onQuery",D);U||(U=D());const z=await U;return $!==S.value?gs():(p({data:z,loading:!1,error:void 0,status:"settled"}),m("onSuccess",z,M),o==null||o(z,M),$===S.value&&m("onAfter",M,z,void 0),e==null||e(M),z)}catch(D){if($!==S.value)return gs();throw p({loading:!1,error:D,status:"settled"}),m("onError",D,M),a==null||a(D,M),$===S.value&&m("onAfter",M,void 0,D),e==null||e(M),D}},c.run=function(){c.runAsync(...arguments).catch(C=>{a||console.error(C)})},c.cancel=()=>{S.value+=1,p({loading:!1}),m("onCancel")},c.refresh=()=>{c.run(...s.value||[])},c.refreshAsync=()=>c.runAsync(...s.value||[]),c.mutate=C=>{const M=ps(C)?C(l.value):C,P=hb(M);p({data:P}),m("onMutate",P)},{status:d,loading:n,data:l,error:i,params:s,plugins:h,context:c}};function kb(u){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2?arguments[2]:void 0;const b=T.inject(al,{}),g={...ll(),...b,...k},{manual:f=!1,defaultParams:o=[]}=g,a=Sb(u,g);if(a.plugins.value=t.map(r=>r(a,g)),!f){const r=a.params.value||o;a.context.run(...r)}return T.onUnmounted(()=>{a.context.cancel()}),{loading:a.loading,data:a.data,error:a.error,params:a.params,cancel:a.context.cancel,refresh:a.context.refresh,refreshAsync:a.context.refreshAsync,mutate:a.context.mutate,run:a.context.run,runAsync:a.context.runAsync}}const oi=new Map,Cb=(u,k)=>{oi.set(u,k),k.then(t=>(oi.delete(u),t)).catch(()=>{oi.delete(u)})},Eb=u=>oi.get(u),kr=new Map,Tb=(u,k)=>{kr.has(u)&&kr.get(u).forEach(t=>t(k))},Ab=(u,k)=>(kr.has(u)?kr.get(u).push(k):kr.set(u,[k]),()=>{const t=kr.get(u).indexOf(k);kr.get(u).splice(t,1)});var Mb=cr((u,k)=>{let{cacheKey:t,cacheTime:b=6e5,staleTime:g=0,getCache:f,setCache:o}=k;if(!t)return{};const a=ps(t)?t:()=>t,r=T.ref(()=>{});let e;const n=p=>f?f(p):db(p),l=(p,m,S)=>{o?o(p,S):pb(p,m,S),Tb(p,S.data)},i=p=>g===-1||p+g>new Date().getTime(),s=(p,m)=>Object.prototype.hasOwnProperty.call(p,m),h=p=>{const m=a(p);return Ab(m,S=>{u.data.value=S})},d=a(),c=n(d);return c&&s(c,"data")&&(u.data.value=c.data,u.params.value=c.params),d&&(r.value=h()),T.onUnmounted(()=>{r.value()}),{onBefore(p){const m=a(p),S=n(m);if(!S||!s(S,"data"))return{};if(i(S.time))return u.data.value=S.data,u.loading.value=!1,{isBreak:!0,breakResult:S.data};u.data.value=S.data},onQuery(p){const m=u.params.value,S=a(m);let C=Eb(S);return C&&C!==e?()=>C:(C=p(),e=C,Cb(S,C),()=>C)},onSuccess(p,m){const S=a(m);S&&(r.value(),l(S,b,{data:p,params:m,time:new Date().getTime()}),r.value=h(m))},onMutate(p){const m=a(u.params.value);m&&(r.value(),l(m,b,{data:p,params:u.params.value,time:new Date().getTime()}),r.value=h(u.params.value))}}});function Ob(u){let k,t;class b extends Promise{constructor(f){super(f),this.cancel=()=>{t(),clearTimeout(k)}}}return new b(g=>{t=g,k=setTimeout(t,u)})}function bs(){return new Date().getTime()}var Rb=cr((u,k)=>{let{loadingDelay:t=0,loadingKeep:b=0}=k;const g=T.ref(()=>{}),f=T.computed(()=>rr(t)),o=T.computed(()=>rr(b));let a=0,r={};const e=()=>{let n;return f.value&&(n=setTimeout(()=>{u.status.value==="pending"&&(u.loading.value=!0)},f.value)),()=>n&&clearTimeout(n)};return{onBefore(){u.loading.value=!f.value,g.value(),g.value=e(),a=bs()},onQuery(n){if(!o.value)return()=>n();r=Ob(o.value+f.value);const l=async()=>{try{const s=await n();return bs()-a<=f.value&&r.cancel(),Promise.resolve(s)}catch(s){return bs()-a<=f.value&&r.cancel(),Promise.reject(s)}},i=Promise.allSettled([l(),r]).then(s=>{const h=s[0];return h.status==="fulfilled"?h.value:Promise.reject(h.reason)});return()=>i},onCancel(){g.value()},onAfter(){g.value()}}}),ys;const pl=new Set,ml=new Set,gl=new Set,ai=(u,k)=>{let t;switch(u){case"FOCUS_LISTENER":t=pl;break;case"RECONNECT_LISTENER":t=gl;break;case"VISIBLE_LISTENER":t=ml;break}if(!t.has(k))return t.add(k),()=>{t.delete(k)}},vs=u=>{u.forEach(k=>{k()})};!ms&&(ys=window)!==null&&ys!==void 0&&ys.addEventListener&&(window.addEventListener("visibilitychange",()=>{cl()&&vs(ml)},!1),window.addEventListener("focus",()=>vs(pl),!1),window.addEventListener("online",()=>vs(gl),!1));var Nb=cr((u,k)=>{let{pollingInterval:t,pollingWhenHidden:b=!1,pollingWhenOffline:g=!1,errorRetryCount:f=0}=k;const o=T.ref(),a=T.ref(!1),r=T.computed(()=>rr(t)),e=T.computed(()=>rr(f)),n=[],l=d=>{d&&n.push(d)},i=()=>(b||cl())&&(g||fb()),s=d=>{if(u.error.value&&e.value!==0)return;let c;if(!wn(r.value)&&r.value>=0)if(i())c=setTimeout(d,r.value);else{a.value=!0;return}return()=>c&&clearTimeout(c)},h=()=>{a.value&&i()&&(u.context.refresh(),a.value=!1)};return T.watch(r,()=>{o.value&&(o.value(),o.value=s(()=>u.context.refresh()))}),b||l(ai("VISIBLE_LISTENER",h)),g||l(ai("RECONNECT_LISTENER",h)),T.onUnmounted(()=>{n.forEach(d=>d())}),{onBefore(){var d;(d=o.value)===null||d===void 0||d.call(o)},onCancel(){var d;(d=o.value)===null||d===void 0||d.call(o)},onAfter(){o.value=s(()=>u.context.refresh())}}});const Ib=(u,k)=>{let t=!1;return function(){t||(t=!0,u(...arguments),setTimeout(()=>{t=!1},k))}};var jb=cr((u,k)=>{let{refreshOnWindowFocus:t=!1,refocusTimespan:b=5e3}=k;const g=T.computed(()=>rr(t)),f=T.computed(()=>rr(b)),o=[],a=e=>{e&&o.push(e)},r=()=>{o.forEach(e=>e())};return T.watchEffect(()=>{if(r(),g.value){const e=Ib(u.context.refresh,f.value);a(ai("VISIBLE_LISTENER",e)),a(ai("FOCUS_LISTENER",e))}}),T.onUnmounted(()=>{r()}),{}});function Pb(u,k,t){return kb(u,k,[...t||[],Rb,bb,gb,Nb,wb,jb,vb,yb,Mb])}function bl(u){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const t={currentKey:"current",pageSizeKey:"pageSize",totalKey:"total",totalPageKey:"totalPage"},b=T.inject(al,{}),{pagination:g,...f}=k,{currentKey:o,pageSizeKey:a,totalKey:r,totalPageKey:e}=dl(t,ll().pagination||{},b.pagination||{},g||{}),n=dl({defaultParams:[{[o]:1,[a]:10}]},f),{data:l,params:i,run:s,...h}=Pb(u,n),d=$=>{const[N,...B]=i.value||[],U=[{...N,...$},...B];s(...U)},c=$=>{d({[o]:$})},p=$=>{d({[a]:$})},m=($,N)=>{d({[o]:$,[a]:N})},S=T.computed(()=>ul(l.value,r,0)),C=T.computed({get:()=>{var $,N,B;return($=(N=i.value)===null||N===void 0||(B=N[0])===null||B===void 0?void 0:B[o])!==null&&$!==void 0?$:n.defaultParams[0][o]},set:$=>{c($)}}),M=T.computed({get:()=>{var $,N,B;return($=(N=i.value)===null||N===void 0||(B=N[0])===null||B===void 0?void 0:B[a])!==null&&$!==void 0?$:n.defaultParams[0][a]},set:$=>{p($)}}),P=T.computed(()=>ul(l.value,e,Math.ceil(S.value/M.value)));return{data:l,params:i,current:C,pageSize:M,total:S,totalPage:P,run:s,changeCurrent:c,changePageSize:p,changePagination:m,...h}}const yl=(u,k,t="post",b={})=>g=>u({url:k,method:t,[t==="get"?"params":"data"]:g,...b}),vl=()=>({meta:{code:"VEHICLE-MANAGEMENT-CLIENT-V3",client:"web-H5",tag:"保险",time:new Date().getTime()}}),ws=({conditions:u,apiConfig:k})=>{const{conditionKey:t,metaKey:b}=k,g=b===null?{}:vl();return t===null?Object.assign(g,u):Dr(g,t||"condition",u),g},wl=({conditions:u,pager:k,sort:t,listApiConfig:b})=>{const{pageNoKey:g,pageSizeKey:f,conditionKey:o,metaKey:a}=b,r=a===null?{}:vl();return g&&f&&(Dr(r,g,k.pageNo),Dr(r,f,k.pageSize)),o===null?Object.assign(r,u):r[o||"condition"]=u,r.sort=t,r},_l=/\{\{(.+?)\}\}/g;function _s(u,k){if(Array.isArray(u)){const t=[];return u.forEach(b=>{t.push(_s(b,k))}),t}else if(typeof u=="object"){const t={};for(const b in u)t[k[b]||b]=typeof u[b]=="object"?_s(u[b],k):u[b];return t}}const li=Qr(()=>{const u=T.reactive({});return{enumerations:u,patchEnumerations:async(b,g,f)=>{const o=b?Object.keys(b).filter(e=>u[e]===void 0):[],a=o.map(e=>{const{apiUrl:n,apiMethod:l,params:i,code:s,codeType:h}=b[e];if(s&&g)return g(h||"we",s,i);if(!n)throw`enum api ${e} 没有提供apiUrl`;const d=l&&l.toLocaleLowerCase()==="get";return yl(f,n,l,d?{params:i}:void 0)(i)});(await Promise.allSettled(a)).forEach((e,n)=>{if(e.status==="fulfilled"){const{value:l}=e,{labelKey:i,valueKey:s,childrenKey:h,dataType:d,dataKey:c,groupKey:p}=b[o[n]];if(l.success){const m=jr(l,c||"data"),S=C=>{Object.prototype.toString.call(C)==="[object Array]"?d==="Cascader"?u[o[n]]=C.map(M=>_s(M,{[s||"value"]:"value",[i||"label"]:"label",[h||"children"]:"children"})):u[o[n]]=[...T.toRaw(u[o[n]]||[]),...C.map(M=>{let P=M[i||"label"];return _l.test(i||"label")&&(P=(i||"label").replace(_l,($,N)=>M[N])),{...p?{group:M[p]}:{},label:P,value:M[s||"value"]}})]:Object.prototype.toString.call(C)==="[object Object]"&&Object.keys(C).forEach(M=>{S(C[M])})};S(m)}}else console.warn(`【enumeration】: ${o[n]}: 获取失败`)})},patchStaticEnumerations:b=>{Object.keys(b).forEach(f=>{u[f]=b[f]})}}}),_n="__$$loading",He="__$$map",xl="__$$rowClassName",Sl=[{value:100,label:100},{value:200,label:200},{value:500,label:500}],kl="[@yzsf2e/render-core]",xs=`${kl}COLUMN_WIDTH`,Cl=`${kl}COLUMN_SCHEME`,El=Qr(()=>{const u=Jr(),k=T.ref([]),t=T.ref([]),b=e=>{k.value=e.filter(n=>n.locale),t.value=k.value.reduce((n,l)=>{const i=n.find(s=>Wi(s.locale,l.locale));return i?i.columnKeys.push(l.columnKey):n.push({locale:l.locale,columnKeys:[l.columnKey],keys:[],response:{}}),n},t.value)},g=e=>{t.value.forEach(n=>{e.forEach(l=>{n.columnKeys.forEach(i=>{l[i]&&(Array.isArray(T.toRaw(l[i]))?T.toRaw(l[i]):[l[i]]).forEach(h=>{!n.keys.includes(h)&&n.response[h]===void 0&&n.keys.push(h)})})})})};async function f(e,n,l,i,s){const d=[];for(let p=0;p<s.length;p+=500)d.push(s.slice(p,p+500));return{success:!0,data:(await Promise.allSettled(d.map(p=>u({url:`${De}/base-biz-data-server/query/i18n/biz/${l}/list?dataType=${e}&attributeName=${n}&${i}=${p.join(",")}`,method:"post"})))).reduce((p,m)=>(m.status==="fulfilled"&&Object.assign(p,m.value.data),p),{})}}async function o(e,n,l,i){const h=[];for(let c=0;c<l.length;c+=500)h.push(l.slice(c,c+500));return{success:!0,data:(await Promise.allSettled(h.map(c=>{if(n==="user"){const p=new FormData;return p.append("ids",c.join(",")),u({url:`${De}/iam-auth-web/auth/user/map/org/huid/name`,headers:{"Content-Type":"multipart/form-data"},method:"post",data:p})}else{const p=new FormData;return p.append("keys",c.join(",")),i&&p.append("extFields",i.join(",")),u({url:`${De}/common-query-web/query/common/biz/kv/${e}/${n}`,headers:{"Content-Type":"multipart/form-data"},method:"post",data:p})}}))).reduce((c,p)=>(p.status==="fulfilled"&&Object.assign(c,p.value.data),c),{})}}const a=async()=>{const e=t.value.filter(i=>i.keys.length>0),n=e.map(i=>{const{kvType:s="map",bizType:h,type:d,params:c,extFields:p}=i.locale;if(h)return o(s,h,i.keys,p);if(d){const m={code:"dataCodes",id:"dataIds"}[d];return f(c.dataType,c.attributeName,d,m,i.keys)}else return Promise.resolve({})});(await Promise.allSettled(n)).forEach((i,s)=>{if(i.status==="fulfilled"){const{value:h}=i;if(h.success){const d=jr(h,"data");Object.assign(e[s].response,d),e[s].keys=[]}}else console.warn(`【localeColumns】: ${e[s].columnKeys}: 获取失败`)})};return{localeColumns:k,patchLocaleColumns:async(e,n)=>(e.length===0||n.length===0||(b(e),g(n),await a(),t.value.forEach(l=>{n.forEach(i=>{l.columnKeys.forEach(s=>{i[s]&&(i[He]=i[He]||{},Array.isArray(T.toRaw(i[s]))?i[He][s]=T.toRaw(i[s]).map(h=>l.response[h]||h):i[He][s]=l.response[i[s]]||i[s])})})})),n)}});function Bb(u){if(Array.isArray(u)&&["string","number"].includes(typeof u[0]))return u.join(",");if(u==null)return"";if(typeof u=="string"||typeof u=="number")return String(u);try{return JSON.stringify(u)}catch{return u}}function Ss(u){return typeof u!="string"?u:u.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function Db(u,k){if(u==null&&k==null)return 0;if(u==null)return 1;if(k==null)return-1;if(Array.isArray(u)&&Array.isArray(k))return u.length-k.length;const t=b=>typeof b=="string"&&/^¥[\d,]+\.\d+$/.test(b);if(t(u)&&t(k)){const b=g=>parseFloat(g.replace(/[^0-9.]/g,""));return b(u)-b(k)}return typeof u=="string"&&typeof k=="string"?u.localeCompare(k,"zh-Hans-CN",{numeric:!0}):typeof u=="number"&&typeof k=="number"?u-k:typeof u=="object"&&typeof k=="object"?JSON.stringify(u).localeCompare(JSON.stringify(k)):String(u).localeCompare(String(k),void 0,{numeric:!0})}const Fb=u=>{const k=document.createElement("textarea");k.value=u,document.body.appendChild(k),k.select(),k.setSelectionRange(0,99999);try{document.execCommand("copy"),Ft.message.success("复制成功",1)}catch(t){Ft.message.error("复制失败",1),console.error("【@yzsf2e/render-core】execCommand 复制失败: ",t)}document.body.removeChild(k)},Tl=u=>{navigator.clipboard.writeText(u).then(()=>{Ft.message.success("复制成功",1)}).catch(k=>{console.error("【@yzsf2e/render-core】复制失败: ",k),Fb(u)})},ci=u=>{if(typeof u!="string")try{u=JSON.stringify(u)}catch{u=String(u)}return T.h(T.defineComponent({setup(){const k=T.ref(!1);let t=null;const b=()=>{t=setTimeout(()=>{k.value=!0},300)},g=()=>{clearTimeout(t),k.value=!1},f=o=>{o.stopPropagation(),Tl(Ss(u))};return()=>T.h("div",{style:{position:"relative",display:"inline-block",width:"100%",textAlign:"inherit"},onMouseenter:b,onMouseleave:g},[T.h("span",{innerHTML:u,style:{maxWidth:"100%",overflow:"hidden",display:"inline-block",verticalAlign:"middle"},title:Ss(u)}),k.value&&T.h(Le.CopyOutlined,{style:{fontSize:"16px",position:"absolute",right:"2px",top:"50%",transform:"translateY(-50%)",cursor:"pointer",color:"#1890ff"},onClick:f,onDblclick:o=>o.stopPropagation()})])}}))};async function Lb(u,k,t,b,g){let e=[];const n=await u({pager:{pageNo:1,pageSize:500}}),l=Math.min(jr(n,b),5e4),i=Math.ceil(l/500);g.value=2;const s=await k(n,t);e.push(...s);const h=[];for(let m=2;m<=i;m++)h.push({pageNo:m,retries:0});const d=[];async function c(m){try{const S=await u({pager:{pageNo:m.pageNo,pageSize:500}}),C=await k(S,t);d[m.pageNo-1]=C,g.value=Math.max(g.value,Math.floor(Math.min(1,m.pageNo/i*.89+.01)*100))}catch(S){if(m.retries<3)return m.retries++,c(m);throw Ft.message.error(`导出请求 pageNo=${m.pageNo} 失败,已达最大重试次数`),console.error(`导出请求 pageNo=${m.pageNo} 失败,已达最大重试次数`),S}}async function p(){const m=[];for(;h.length>0;){for(;m.length<3&&h.length>0;){const S=h.shift();if(S){const C=c(S);m.push(C),C.finally(()=>{const M=m.indexOf(C);M!==-1&&m.splice(M,1)})}}m.length>=3&&await Promise.race(m)}await Promise.all(m)}await p();for(let m=1;m<i;m++)d[m]&&e.push(...d[m]);return e}function $b(u){const k=document.getElementById(u);if(!k)return[];const t=k.querySelector(".ant-table-header");if(!t)return[];const b=t.querySelector("colgroup");if(!b)return[];const f=Array.from(b.querySelectorAll("col")).map(o=>{const a=o.getAttribute("style");if(!a)return 0;const r=a.match(/width:\s*(\d+)px/);return r?parseInt(r[1],10):0});return f.splice(0,2),f.pop(),f}const zb=T.defineComponent({name:"PageRendererTableCell",props:{column:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},copyable:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},handleLinkClick:{type:Function,required:!0},linkCellKeys:{type:Array,default:()=>[]},keywords:{type:Array,default:()=>[]},locale:{type:Object,default:()=>({})},localeKeywords:{type:Array,default:()=>[]}},setup(u){const{copyable:k,column:t,row:b,linkCellKeys:g,keywords:f,locale:o,localeKeywords:a}=T.toRefs(u),r=T.computed(()=>{let e=b.value[t.value.dataIndex];return(f.value.includes(t.value.dataIndex)||a.value.includes(t.value.dataIndex))&&(e=b.value[He][t.value.dataIndex]),Array.isArray(e)?e.join(", "):typeof e=="object"?(o.value.customRender||(l=>l.label))(e):e});return()=>{const e=g.value.includes(t.value.dataIndex),n=k.value===!0;return e?u.loading?T.h(Le.LoadingOutlined,{style:{color:"#1890ff"}}):T.h("a",{onclick:l=>{l.stopPropagation(),u.handleLinkClick(b.value,t.value,l)}},n?ci(r.value):r.value):n?ci(r.value):T.h("span",{innerHTML:r.value,title:r.value})}}}),Ub=T.defineComponent({name:"TableCopyCell",props:{text:{type:[String,Number,Object],default:""}},setup(u){return()=>{let k="";if(typeof u.text!="string")try{k=JSON.stringify(u.text)}catch{k=String(u.text)}else k=u.text;return ci(k)}}}),Vb=["/minthum","/thumbnail","/middlethum","/largthum","/zip"];function Hb(u){return Vb.some(k=>u.includes(k))}function qb(u){return!u||Hb(u)?u:`${u}/minthum`}const Wb=T.defineComponent({name:"TableImageCell",props:{image:{type:[String,Array],required:!0}},setup(u){const{image:k}=T.toRefs(u),t=T.inject("previewMediaModalOpen",()=>{}),b=T.ref(new Set),g=T.computed(()=>typeof k.value=="string"?[k.value]:k.value);return{displayImageList:T.computed(()=>g.value.map((r,e)=>b.value.has(e)?r:qb(r))),preview:r=>{t([...g.value],r)},handleImageError:(r,e)=>{const n=r.target,l=g.value[e];n.src!==l&&!b.value.has(e)&&(b.value=new Set([...b.value,e]))}}}}),Kb=["src","onClick","onError"];function Xb(u,k,t,b,g,f){const o=T.resolveComponent("a-space");return T.openBlock(),T.createElementBlock("div",null,[T.createVNode(o,null,{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.displayImageList,(a,r)=>(T.openBlock(),T.createElementBlock("img",{src:a,key:r,onClick:()=>u.preview(r),onError:e=>u.handleImageError(e,r),style:{width:"30px",height:"30px",cursor:"pointer",border:"1px solid #ccc"}},null,40,Kb))),128))]),_:1})])}const Yb=$e(Wb,[["render",Xb]]),xn=Qr(()=>{const u=T.reactive(Object.create(null)),k=T.reactive(Object.create(null)),t=T.reactive(Object.create(null));return T.watch(k,()=>{for(const b in t)t[b]=[]},{deep:!0}),{selectedRows:u,selectedRowKeys:k,selectedErrorRowKeys:t}});var Gb=20,Zb=1,Cr=1e6,Al=1e6,Jb=-7,Qb=21,ty=!1,Sn="[big.js] ",Er=Sn+"Invalid ",ui=Er+"decimal places",ey=Er+"rounding mode",Ml=Sn+"Division by zero",ge={},nr=void 0,ry=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ol(){function u(k){var t=this;if(!(t instanceof u))return k===nr?Ol():new u(k);if(k instanceof u)t.s=k.s,t.e=k.e,t.c=k.c.slice();else{if(typeof k!="string"){if(u.strict===!0&&typeof k!="bigint")throw TypeError(Er+"value");k=k===0&&1/k<0?"-0":String(k)}ny(t,k)}t.constructor=u}return u.prototype=ge,u.DP=Gb,u.RM=Zb,u.NE=Jb,u.PE=Qb,u.strict=ty,u.roundDown=0,u.roundHalfUp=1,u.roundHalfEven=2,u.roundUp=3,u}function ny(u,k){var t,b,g;if(!ry.test(k))throw Error(Er+"number");for(u.s=k.charAt(0)=="-"?(k=k.slice(1),-1):1,(t=k.indexOf("."))>-1&&(k=k.replace(".","")),(b=k.search(/e/i))>0?(t<0&&(t=b),t+=+k.slice(b+1),k=k.substring(0,b)):t<0&&(t=k.length),g=k.length,b=0;b<g&&k.charAt(b)=="0";)++b;if(b==g)u.c=[u.e=0];else{for(;g>0&&k.charAt(--g)=="0";);for(u.e=t-b-1,u.c=[],t=0;b<=g;)u.c[t++]=+k.charAt(b++)}return u}function Tr(u,k,t,b){var g=u.c;if(t===nr&&(t=u.constructor.RM),t!==0&&t!==1&&t!==2&&t!==3)throw Error(ey);if(k<1)b=t===3&&(b||!!g[0])||k===0&&(t===1&&g[0]>=5||t===2&&(g[0]>5||g[0]===5&&(b||g[1]!==nr))),g.length=1,b?(u.e=u.e-k+1,g[0]=1):g[0]=u.e=0;else if(k<g.length){if(b=t===1&&g[k]>=5||t===2&&(g[k]>5||g[k]===5&&(b||g[k+1]!==nr||g[k-1]&1))||t===3&&(b||!!g[0]),g.length=k,b){for(;++g[--k]>9;)if(g[k]=0,k===0){++u.e,g.unshift(1);break}}for(k=g.length;!g[--k];)g.pop()}return u}function Kr(u,k,t){var b=u.e,g=u.c.join(""),f=g.length;if(k)g=g.charAt(0)+(f>1?"."+g.slice(1):"")+(b<0?"e":"e+")+b;else if(b<0){for(;++b;)g="0"+g;g="0."+g}else if(b>0)if(++b>f)for(b-=f;b--;)g+="0";else b<f&&(g=g.slice(0,b)+"."+g.slice(b));else f>1&&(g=g.charAt(0)+"."+g.slice(1));return u.s<0&&t?"-"+g:g}ge.abs=function(){var u=new this.constructor(this);return u.s=1,u},ge.cmp=function(u){var k,t=this,b=t.c,g=(u=new t.constructor(u)).c,f=t.s,o=u.s,a=t.e,r=u.e;if(!b[0]||!g[0])return b[0]?f:g[0]?-o:0;if(f!=o)return f;if(k=f<0,a!=r)return a>r^k?1:-1;for(o=(a=b.length)<(r=g.length)?a:r,f=-1;++f<o;)if(b[f]!=g[f])return b[f]>g[f]^k?1:-1;return a==r?0:a>r^k?1:-1},ge.div=function(u){var k=this,t=k.constructor,b=k.c,g=(u=new t(u)).c,f=k.s==u.s?1:-1,o=t.DP;if(o!==~~o||o<0||o>Cr)throw Error(ui);if(!g[0])throw Error(Ml);if(!b[0])return u.s=f,u.c=[u.e=0],u;var a,r,e,n,l,i=g.slice(),s=a=g.length,h=b.length,d=b.slice(0,a),c=d.length,p=u,m=p.c=[],S=0,C=o+(p.e=k.e-u.e)+1;for(p.s=f,f=C<0?0:C,i.unshift(0);c++<a;)d.push(0);do{for(e=0;e<10;e++){if(a!=(c=d.length))n=a>c?1:-1;else for(l=-1,n=0;++l<a;)if(g[l]!=d[l]){n=g[l]>d[l]?1:-1;break}if(n<0){for(r=c==a?g:i;c;){if(d[--c]<r[c]){for(l=c;l&&!d[--l];)d[l]=9;--d[l],d[c]+=10}d[c]-=r[c]}for(;!d[0];)d.shift()}else break}m[S++]=n?e:++e,d[0]&&n?d[c]=b[s]||0:d=[b[s]]}while((s++<h||d[0]!==nr)&&f--);return!m[0]&&S!=1&&(m.shift(),p.e--,C--),S>C&&Tr(p,C,t.RM,d[0]!==nr),p},ge.eq=function(u){return this.cmp(u)===0},ge.gt=function(u){return this.cmp(u)>0},ge.gte=function(u){return this.cmp(u)>-1},ge.lt=function(u){return this.cmp(u)<0},ge.lte=function(u){return this.cmp(u)<1},ge.minus=ge.sub=function(u){var k,t,b,g,f=this,o=f.constructor,a=f.s,r=(u=new o(u)).s;if(a!=r)return u.s=-r,f.plus(u);var e=f.c.slice(),n=f.e,l=u.c,i=u.e;if(!e[0]||!l[0])return l[0]?u.s=-r:e[0]?u=new o(f):u.s=1,u;if(a=n-i){for((g=a<0)?(a=-a,b=e):(i=n,b=l),b.reverse(),r=a;r--;)b.push(0);b.reverse()}else for(t=((g=e.length<l.length)?e:l).length,a=r=0;r<t;r++)if(e[r]!=l[r]){g=e[r]<l[r];break}if(g&&(b=e,e=l,l=b,u.s=-u.s),(r=(t=l.length)-(k=e.length))>0)for(;r--;)e[k++]=0;for(r=k;t>a;){if(e[--t]<l[t]){for(k=t;k&&!e[--k];)e[k]=9;--e[k],e[t]+=10}e[t]-=l[t]}for(;e[--r]===0;)e.pop();for(;e[0]===0;)e.shift(),--i;return e[0]||(u.s=1,e=[i=0]),u.c=e,u.e=i,u},ge.mod=function(u){var k,t=this,b=t.constructor,g=t.s,f=(u=new b(u)).s;if(!u.c[0])throw Error(Ml);return t.s=u.s=1,k=u.cmp(t)==1,t.s=g,u.s=f,k?new b(t):(g=b.DP,f=b.RM,b.DP=b.RM=0,t=t.div(u),b.DP=g,b.RM=f,this.minus(t.times(u)))},ge.neg=function(){var u=new this.constructor(this);return u.s=-u.s,u},ge.plus=ge.add=function(u){var k,t,b,g=this,f=g.constructor;if(u=new f(u),g.s!=u.s)return u.s=-u.s,g.minus(u);var o=g.e,a=g.c,r=u.e,e=u.c;if(!a[0]||!e[0])return e[0]||(a[0]?u=new f(g):u.s=g.s),u;if(a=a.slice(),k=o-r){for(k>0?(r=o,b=e):(k=-k,b=a),b.reverse();k--;)b.push(0);b.reverse()}for(a.length-e.length<0&&(b=e,e=a,a=b),k=e.length,t=0;k;a[k]%=10)t=(a[--k]=a[k]+e[k]+t)/10|0;for(t&&(a.unshift(t),++r),k=a.length;a[--k]===0;)a.pop();return u.c=a,u.e=r,u},ge.pow=function(u){var k=this,t=new k.constructor("1"),b=t,g=u<0;if(u!==~~u||u<-Al||u>Al)throw Error(Er+"exponent");for(g&&(u=-u);u&1&&(b=b.times(k)),u>>=1,!!u;)k=k.times(k);return g?t.div(b):b},ge.prec=function(u,k){if(u!==~~u||u<1||u>Cr)throw Error(Er+"precision");return Tr(new this.constructor(this),u,k)},ge.round=function(u,k){if(u===nr)u=0;else if(u!==~~u||u<-Cr||u>Cr)throw Error(ui);return Tr(new this.constructor(this),u+this.e+1,k)},ge.sqrt=function(){var u,k,t,b=this,g=b.constructor,f=b.s,o=b.e,a=new g("0.5");if(!b.c[0])return new g(b);if(f<0)throw Error(Sn+"No square root");f=Math.sqrt(b+""),f===0||f===1/0?(k=b.c.join(""),k.length+o&1||(k+="0"),f=Math.sqrt(k),o=((o+1)/2|0)-(o<0||o&1),u=new g((f==1/0?"5e":(f=f.toExponential()).slice(0,f.indexOf("e")+1))+o)):u=new g(f+""),o=u.e+(g.DP+=4);do t=u,u=a.times(t.plus(b.div(t)));while(t.c.slice(0,o).join("")!==u.c.slice(0,o).join(""));return Tr(u,(g.DP-=4)+u.e+1,g.RM)},ge.times=ge.mul=function(u){var k,t=this,b=t.constructor,g=t.c,f=(u=new b(u)).c,o=g.length,a=f.length,r=t.e,e=u.e;if(u.s=t.s==u.s?1:-1,!g[0]||!f[0])return u.c=[u.e=0],u;for(u.e=r+e,o<a&&(k=g,g=f,f=k,e=o,o=a,a=e),k=new Array(e=o+a);e--;)k[e]=0;for(r=a;r--;){for(a=0,e=o+r;e>r;)a=k[e]+f[r]*g[e-r-1]+a,k[e--]=a%10,a=a/10|0;k[e]=a}for(a?++u.e:k.shift(),r=k.length;!k[--r];)k.pop();return u.c=k,u},ge.toExponential=function(u,k){var t=this,b=t.c[0];if(u!==nr){if(u!==~~u||u<0||u>Cr)throw Error(ui);for(t=Tr(new t.constructor(t),++u,k);t.c.length<u;)t.c.push(0)}return Kr(t,!0,!!b)},ge.toFixed=function(u,k){var t=this,b=t.c[0];if(u!==nr){if(u!==~~u||u<0||u>Cr)throw Error(ui);for(t=Tr(new t.constructor(t),u+t.e+1,k),u=u+t.e+1;t.c.length<u;)t.c.push(0)}return Kr(t,!1,!!b)},ge[Symbol.for("nodejs.util.inspect.custom")]=ge.toJSON=ge.toString=function(){var u=this,k=u.constructor;return Kr(u,u.e<=k.NE||u.e>=k.PE,!!u.c[0])},ge.toNumber=function(){var u=Number(Kr(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(u.toString()))throw Error(Sn+"Imprecise conversion");return u},ge.toPrecision=function(u,k){var t=this,b=t.constructor,g=t.c[0];if(u!==nr){if(u!==~~u||u<1||u>Cr)throw Error(Er+"precision");for(t=Tr(new b(t),u,k);t.c.length<u;)t.c.push(0)}return Kr(t,u<=t.e||t.e<=b.NE||t.e>=b.PE,!!g)},ge.valueOf=function(){var u=this,k=u.constructor;if(k.strict===!0)throw Error(Sn+"valueOf disallowed");return Kr(u,u.e<=k.NE||u.e>=k.PE,!0)};var iy=Ol();const sy={sum:u=>{const{selectedRows:k}=xn(),t=T.inject("pageName","");return k[t].reduce((b,g)=>b=b.plus(Number(g[u.dataIndex])),new iy(0))}},oy=(u,k)=>sy[u](k),sv="",[ay]=je("input-range"),ly={disabled:Xl(!1),value:Os(),min:Kl(0),max:Number,placeholder:Os()},cy=T.defineComponent({name:ay,props:ly,emits:["update:value"],setup(u,{emit:k}){const t=Array.isArray(u.disabled)?u.disabled:[u.disabled,u.disabled],b=()=>{const[f,o]=u.value||[];f&&o&&f>=o?k("update:value",[o,f]):k("update:value",[f,o])},g=b;return()=>T.createVNode(Ft.InputGroup,{size:"small",class:"yzs-input-range",style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{default:()=>[T.createVNode(Ft.InputNumber,{size:"small",disabled:!!t[0],value:u.value[0],min:u.min,max:u.max,onChange:f=>k("update:value",[f,u.value[1]]),onBlur:b,onPressEnter:g,placeholder:u.placeholder[0],style:{flex:1},class:{"yzs-input-range-active":u.value[0]!=null}},null),T.createVNode("span",null,[T.createTextVNode("-")]),T.createVNode(Ft.InputNumber,{size:"small",disabled:!!t[1],value:u.value[1],min:u.min,max:u.max,onChange:f=>k("update:value",[u.value[0],f]),onBlur:b,onPressEnter:g,placeholder:u.placeholder[1],style:{flex:1},class:{"yzs-input-range-active":u.value[1]!=null}},null)]})}}),uy={Input:Ft.Input,InputRange:cy,Select:Ft.Select,Cascader:Ft.Cascader,FuzzySelect:Ft.Select,QuerySelect:Ft.Select,DatePicker:Ft.DatePicker,RangePicker:Ft.RangePicker},ks={YzsEnumSelect:Ci,YzsEnumCustomSelect:Ei,YzsEnumFuzzySelect:Ki,YzsEnumFuzzyCustomSelect:Xi,YzsAutoCompleteFuzzySelect:Yi},kn=Qr(()=>{const u=T.reactive({}),k=(g,f)=>{Object.assign(u[f],g)};return{formState:u,initFormState:(g=[],f=Object.create(null),o)=>(u[o]||(u[o]=Object.create(null)),g.forEach(a=>{u[o][a.fieldName]=void 0}),k(f,o),u[o]),dispatchFormState:k,trimFormStateFields:g=>{const f=u[g];f&&Object.keys(f).forEach(o=>{const a=f[o];typeof a=="string"&&(f[o]=a.trim())})}}}),fi=()=>T.getCurrentInstance().appContext.config.globalProperties.$route,hi=()=>T.getCurrentInstance().appContext.config.globalProperties.$axios,ur=(u,k,t)=>{const b=hi();return yl(b,u,k,t)};async function fy(u,k,t,b){return(await u({url:k,method:"POST",data:t,...b})).data}const hy="Enter",dy=13,Cs="FuzzySelect",di="QuerySelect",py="InputRange",Rl=T.defineComponent({name:"ConditionBuilder",props:{materials:{type:Object,default:()=>{}}},emits:["pressEnter"],setup(u,{emit:k}){const{t}=Ue(),b=fi(),g=T.ref(),{materials:f}=T.toRefs(u),{enumerations:o}=li(),a=T.inject("materials",{});let e={...uy,...a}[f.value.type];const n={RangePicker:[t("startTime")||"开始时间",t("endTime")||"结束时间"],Input:t("pleaseEnter")||"请输入",Select:t("pleaseSelect")||"请选择",InputRange:["",""]},l=T.computed(()=>n[f.value.type]||t("pleaseEnter")||"请输入"),{otherProps:i}=f.value;function s(D={}){if(["Cascader"].includes(f.value.type)&&D.showSearch===!0&&(D.showSearch={filter:P}),["FuzzySelect"].includes(f.value.type)&&D.dropdownMatchSelectWidth!==!1&&(D.dropdownMatchSelectWidth=!1,D.dropdownStyle={maxWidth:"400px"}),["RangePicker"].includes(f.value.type)&&(g.value="yzs-range-picker",D.class=g),["DatePicker","RangePicker"].includes(f.value.type)&&D&&!D.format&&(!D.picker||D.picker=="date")&&(D.format="YY-MM-DD"),["Select"].includes(f.value.type)&&D&&D.mode==="multiple"&&(D.maxTagCount||(D.maxTagCount="responsive",D.maxTagTextLength=D.maxTagTextLength||8)),!D||!D.style||Object.prototype.toString.call(D.style)==="[object Object]")return D;const{style:U,...z}=D;try{const E=JSON.parse(U);return{...z,style:E}}catch(E){return console.warn("Failed to parse style:",E),D}}const h=s(i),d=f.value.filterGroups||[],c=f.value.refEnum||"",p=T.computed(()=>{var D,U;return((U=o[c])==null?void 0:U.filter((D=f.value.filterGroups)!=null&&D.length?z=>d.includes(z.group):()=>!0))||[]}),m=T.ref(p.value);T.watch(p,D=>{m.value=D});const S=ur(f.value.filterUrl||`/duckbill-data-query-server/table/column/${f.value.filterKey}`,f.value.filterMethod||"post"),C=T.inject("transformFuzzy",{})[f.value.fieldName],M=(D,U)=>{const z=f.value.filterKey||"label",E=U[z]||"";E||console.warn(`not found key 【${z}】 in option`);const O=D.toString().trim().toLowerCase();return E.toString().toLowerCase().includes(O)};function P(D,U){return U.some(z=>(z.label||"").toLowerCase().indexOf(D.trim().toLowerCase())>-1)}const $=T.computed(()=>{switch(f.value.type){case Cs:return _r(async function(D=""){D=D.trim();const U=ws({conditions:f.value.fuzzyCode?{key:D,code:f.value.fuzzyCode}:D,apiConfig:{conditionKey:f.value.conditionKey||"params",metaKey:f.value.metaKey}}),z=await S(U),E=await(C?Promise.resolve(C(z)):Promise.resolve(z));m.value=E},200);case di:return _r(async function(D){const{category:U,tab:z}=b.meta,E=await S({sliceNumber:"50",category:U,tab:z,code:D});f.value.fuzzyMatch?m.value=E.data.map(O=>({value:O,label:O})):m.value=E.data.map(O=>({value:O.id,label:O.name}))},200);default:return null}}),N=T.computed(()=>{switch(f.value.type){case"Cascader":return p.value;case"Select":return p.value;case Cs:return m.value;case di:return m.value;default:return p.value}});function B(D){var U;(!D||Array.isArray(D)&&D.length===0)&&((U=$.value)==null||U.call($))}return T.onMounted(()=>{var D;f.value.autoRequest&&((D=$.value)==null||D.call($))}),()=>e?T.h(e,{size:"small",placeholder:l.value,onkeydown:function(D){["Cascader"].includes(f.value.type)||(D.keyCode===dy||D.key===hy)&&setTimeout(()=>k("pressEnter"))},filterOption:[Cs,di,py].includes(f.value.type)?!1:M,...Br({notFoundContent:di===f.value.type?null:!0},Om),onChange:B,onSearch:$.value,options:N.value,...h}):T.h("span","Invalid Type")}}),ov="",Nl=T.defineComponent({name:"CustomConditionBuilder",props:{materials:{type:Object,default:()=>{}}},emits:["pressEnter"],setup(u,{emit:k}){var f;const{materials:t}=T.toRefs(u);let b=ks[t.value.type];const g={...(f=t.value.otherProps)==null?void 0:f.selectProps,size:"small"};return["YzsEnumFuzzyCustomSelect","YzsEnumCustomSelect","YzsEnumFuzzySelect"].includes(t.value.type)&&g.dropdownMatchSelectWidth!==!1&&(g.dropdownMatchSelectWidth=!1,g.dropdownStyle={maxWidth:"400px"}),g.mode==="multiple"&&(g.maxTagCount||(g.maxTagCount="responsive",g.maxTagTextLength=g.maxTagTextLength||8)),()=>b?T.h(b,{...t.value.otherProps,showLabel:!1,label:t.value.label,selectProps:g,onPressEnter:()=>{k("pressEnter")}}):T.h("span","Invalid Type")}}),my={beforeMount(u,k,t){let b=null,g=null;const f=getComputedStyle(u).position;(f==="static"||!f)&&(u.style.position="relative");const o=n=>{n==null||n.stopPropagation();const l=u.innerText.trim();l&&Tl(l)},a=()=>g||(g=document.createElement("button"),g.innerHTML='<svg focusable="false" data-icon="copy" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"></path></svg>',Object.assign(g.style,{position:"absolute",right:"0px",top:"50%",padding:"0px",transform:"translateY(-50%)",backgroundColor:"transparent",color:"#1890ff",border:"none",cursor:"pointer",fontSize:"16px",lineHeight:"1em"}),g.addEventListener("click",o),g),r=()=>{u.innerText.trim()&&(b=setTimeout(()=>{g||(a(),u.appendChild(g)),g.style.display="block"},300))},e=()=>{clearTimeout(b),g&&(g.style.display="none",u.contains(g)&&u.removeChild(g),g=null)};u.addEventListener("mouseenter",r),u.addEventListener("mouseleave",e),u.__copyHoverCleanup__=()=>{u.removeEventListener("mouseenter",r),u.removeEventListener("mouseleave",e),g&&(g.removeEventListener("click",o),u.contains(g)&&u.removeChild(g),g=null)}},unmounted(u){u.__copyHoverCleanup__&&u.__copyHoverCleanup__()}},gy={ascend:"ASC",descend:"DESC"},by={ASC:"ascend",DESC:"descend"},{useForm:yy}=Ft.Form,vy=T.defineComponent({name:"PageRendererTableView",directives:{copyHover:my},components:{aicon:En,Table:Ft.Table,Space:Ft.Space,TableCell:zb,TableCopyCell:Ub,TableImageCell:Yb,LoadingOutlined:Le.LoadingOutlined,ConditionBuilder:Rl,CustomConditionBuilder:Nl},props:{tableProps:{type:Object,default:()=>{}},config:{type:Array,default:()=>[]},conditions:{type:Array,default:()=>[]},current:{type:Number,default:1},hasApiConfig:{type:Boolean,required:!0},rowKey:{type:String||Function,default:(u,k)=>k},draggable:{type:Boolean,required:!1},selectable:{type:Boolean,default:!0},rowClickAction:{type:String,default:null},rowDblclickAction:{type:String,default:null},data:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},total:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}},sort:{type:Object,default:()=>{}}},emits:["search","changeExpand","update:current","update:sort","linkClick"],setup(u,{expose:k,emit:t}){var Lt;const{t:b}=Ue(),g=async()=>{await T.nextTick(),kc(p,ut=>{const bt=ut[0],{height:ht}=bt.contentRect;a.value=ht-44-(u.hasApiConfig?0:30)})};T.onMounted(g);const{enumerations:f}=li(),{patchLocaleColumns:o}=El(),a=T.ref(0),r="filter_",e="_index",{config:n,conditions:l,hasApiConfig:i,rowKey:s,data:h,total:d,selectable:c}=T.toRefs(u),p=T.ref(null),m=T.inject("pageName",""),S=T.inject("tableDropChange",ut=>{}),C=T.inject("emitHandler",()=>{}),M=T.ref(u.sort||{});let P=!1;const $=ut=>{t("update:sort",ut),P&&(P=!1)},N=ut=>{$(ut),t("search")},B=_r((ut,bt)=>{if(bt)try{const ht=localStorage.getItem(xs),St=ht?JSON.parse(ht):{};St[m]||(St[m]={}),St[m][bt]=ut,localStorage.setItem(xs,JSON.stringify(St))}catch(ht){console.warn("[@yzsf2e/render-core]保存列宽失败",ht)}},300);T.watch(()=>u.defaultSort,ut=>{P=!0,M.value=ut}),T.watch(M,(ut,bt)=>{const ht=Object.keys(ut)[0];if(ht){const St=n.value.find(Yt=>Yt.columnKey===ht);St!=null&&St.sortable&&(P?$(M.value):N(M.value))}else{const St=Object.keys(bt)[0];if(St){const Yt=n.value.find(Tt=>Tt.columnKey===St);Yt!=null&&Yt.sortable&&(P?$(M.value):N(M.value))}}});const D=T.ref([]),U=T.ref([]),z=T.ref([]),E=T.ref([]),O=T.ref({}),x=T.ref([]),{selectedRows:y,selectedRowKeys:v,selectedErrorRowKeys:w}=xn();w[m]||(w[m]=[]);const _=T.computed(()=>v[m].length>0),A=T.ref(null),j=T.computed(()=>{if(i.value)return Go(l.value,"fieldName");{const ut=n.value.reduce((bt,ht)=>(ht.filterable&&bt.push({...ht,label:ht.title,type:ht.filterType,fieldName:ht.columnKey,filterKey:ht.columnKey,otherProps:{...ht,...ht.otherProps?ht.otherProps:{}}}),bt),[]);return Go(ut,"columnKey")}}),L=T.ref(!i.value),H=T.inject("tableCellSlots",{}),q=T.inject("rowSelection",{}),X=()=>{L.value=!L.value},F=ut=>ut&&ut.dataIndex===e,W=ut=>ut.dataIndex==="action"||ut.cellValueType==="slot",I=(ut,bt)=>Vn(ut[bt.dataIndex])||ut[bt.dataIndex]==="",R=({text:ut,column:bt,record:ht,index:St})=>F(bt)?St+1:T.isVNode(ut)||!bt||W(bt)?ut:I(ht,bt)?" ":ut,V=(ut,bt)=>{var ht,St;v[m]=ut,y[m]=bt,(St=(ht=q[m])==null?void 0:ht.onChange)==null||St.call(ht,v[m],y[m])},K=()=>{V([],[])},Z=T.ref((Lt=u.tableProps)!=null&&Lt.expandedRowKeys?[...u.tableProps.expandedRowKeys]:[]);T.watch(()=>{var ut;return(ut=u.tableProps)==null?void 0:ut.expandedRowKeys},ut=>{ut&&(Z.value=[...ut])},{immediate:!0});const Y=ut=>{var Yt,Tt;const bt=window.getSelection();if(bt&&(bt==null?void 0:bt.toString().length)>0)return;const ht=[...v[m]],St=s.value;ht.indexOf(ut[St])>=0?ht.splice(ht.indexOf(ut[St]),1):ht.push(ut[St]),v[m]=ht,y[m]=_t.value.filter(rt=>ht.includes(rt[St])),(Tt=(Yt=q[m])==null?void 0:Yt.onChange)==null||Tt.call(Yt,v[m],y[m])},J=new WeakMap;let nt={},it={};const G=(ut,bt)=>({...u.draggable?{onMouseenter:ht=>{const St=ht||window.event;St.target.draggable=!0},onDragstart:ht=>{(ht||window.event).stopPropagation(),nt=ut},onDragover:ht=>{(ht||window.event).preventDefault()},onDragenter:ht=>{(ht||window.event).preventDefault();const Yt=document.querySelectorAll(".table-view-wrapper .ant-table-row");if(Rt.value[bt].disabled)return;const Tt=document.querySelectorAll(".ant-table-row.target");Tt.length&&Tt[0].classList.remove("target"),Yt[bt].classList.add("target"),it=ut},onDrop:ht=>{(ht||window.event).stopPropagation();const Yt=document.querySelectorAll(".ant-table-row.target");if(Yt.length&&Yt[0].classList.remove("target"),it[u.rowKey]===nt[u.rowKey])return;const Tt=Rt.value.slice(),rt=Tt.findIndex(wt=>wt[u.rowKey]===nt[u.rowKey]),at=Tt[rt];Tt.splice(rt,1);const dt=Tt.findIndex(wt=>wt[u.rowKey]===it[u.rowKey]);Tt.splice(dt,0,at),Rt.value=Tt,S({pageName:m,fromRecord:nt,toRecord:it})}}:{},onclick:()=>{if(J.has(ut))clearTimeout(J.get(ut)),J.delete(ut);else{const ht=setTimeout(()=>{c.value&&Y(ut),u.rowClickAction&&(A.value=ut[s.value],C(u.rowClickAction,ut)),J.delete(ut)},250);J.set(ut,ht)}},onDblclick:()=>{J.has(ut)&&(clearTimeout(J.get(ut)),J.delete(ut)),u.rowDblclickAction&&C(u.rowDblclickAction,[ut])}});function tt(ut){if(!Array.isArray(ut)||ut.length===0)return 0;let bt=0;for(const ht of ut)ht.children&&ht.children.length>0&&ht.action!=="action"?bt=Math.max(bt,1+tt(ht.children)):bt=Math.max(bt,1);return bt}const et=T.computed(()=>{var St;let ut=a.value;const bt=tt(x.value)-1;_.value&&(ut-=31),L.value?(ut-=33,ut-=(bt-1)*31):ut-=bt*21;const ht=(St=p.value)==null?void 0:St.querySelector(".ant-table-body");return ht&&(ht.style.minHeight=`${ut}px`),ut});function ot(ut){return[...ut.filter(bt=>bt.show!==!1).map(bt=>{const{align:ht,title:St,width:Yt=150,columnKey:Tt,cellRenderType:rt,cellValueType:at,cellValueSlot:dt,className:wt,copyable:Ut,refEnum:Ct,locale:Qt,action:Jt,children:qt,summary:re,fixed:ee,filterable:ae,sortable:ke,sorter:be}=bt;rt==="Link"&&D.value.push(Tt),rt==="HTML"&&U.value.push(Tt),at==="slot"&&z.value.push(Tt),at==="img"&&E.value.push(Tt),(at==="map"&&Ct||at==="slot"&&Ct)&&(O.value[Tt]=bt);const Me=Tt!=="action"&&Array.isArray(qt);function Re(){return Me?ot(qt):L.value?[{action:Jt,locale:Qt,align:ht||"center",cellValueType:at,copyable:Ut,childActions:Tt==="action"?qt:[],cellValueSlot:dt||Tt,className:wt,dataIndex:Tt,ellipsis:!0,filterable:ae,fixed:Tt==="action"?!0:ee,key:r+Tt,resizable:!0,summary:re,title:"",width:Yt}]:[]}return{action:Jt,locale:Qt,align:ht||"center",cellValueType:at,copyable:Ut,childActions:Tt==="action"?qt:[],children:Re(),cellValueSlot:dt||Tt,dataIndex:Tt,className:wt,ellipsis:!0,fixed:Tt==="action"?!0:ee,key:Tt,resizable:!0,summary:re,sortable:ke,sorter:Me||Tt==="action"||be===!1?!1:ke||((Ie,Q)=>{const ct=Ie.__$$map[Tt]||Ie[Tt],gt=Q.__$$map[Tt]||Q[Tt];return Db(ct,gt)}),sortOrder:by[M.value[Tt]],showSorterTooltip:!1,title:St,width:Yt,customHeaderCell:Ie=>({class:Ie.sortable?"custom-remote-sorter-color":""})}})]}T.watchEffect(()=>{x.value=[{align:"center",children:L.value?[{title:b("filter")||"筛选",dataIndex:e,key:"TITLE_"+e,fixed:"left",width:40,align:"center"}]:[],dataIndex:e,fixed:"left",key:e,width:40},...ot(n.value)]});function st(ut){let bt=[];return ut.forEach(ht=>{ht.children&&ht.children.length>0?bt=bt.concat(st(ht.children)):bt.push(ht.dataIndex)}),bt}const lt=T.computed(()=>st(x.value).map(ut=>ut===e?d.value.count:d.value[ut])),{formState:ft}=kn(),{validate:pt}=yy(ft[m]),yt=()=>{pt().then(()=>u.current===1?t("search"):t("update:current",1)).catch(ut=>{console.warn(ut)})},Ot=ut=>{j.value[ut].type==="Input"?Bt():T.nextTick(yt)};let At=!1,kt=null;const Wt=(ut,bt,ht)=>{At||Array.isArray(ht)||(ht.columnKey&&ht.order?M.value={[ht.columnKey]:gy[ht.order]}:M.value={})},Ht=()=>{M.value=u.defaultSort},Vt=T.computed(()=>n.value.filter(ut=>ut.locale)),Kt=T.computed(()=>Object.keys(O.value)),Nt=T.computed(()=>Vt.value.map(ut=>ut.columnKey)),_t=T.ref([]),Rt=T.ref([]),zt=()=>{Rt.value=Xo(_t.value,ut=>xm(ft[m],(bt,ht)=>{var St,Yt;return["",void 0,null].includes(bt)||Array.isArray(bt)?!0:Object.hasOwn(ut,ht)?Yo((St=ut[ht])==null?void 0:St.toString().toLocaleLowerCase(),bt.toString().toLocaleLowerCase())||Yo((Yt=ut.__$$map[ht])==null?void 0:Yt.toString().toLocaleLowerCase(),bt.toString().toLocaleLowerCase()):!0}))},Bt=_r(zt,300),mt=x.value.filter(ut=>ut.action!==void 0||ut.key==="action").reduce((ut,bt)=>{var ht;return bt.key==="action"?(ht=bt.child)==null||ht.forEach(St=>{ut[`${St.action}Loading`]=!1}):ut[`${bt.action}Loading`]=!1,ut},{});function It(ut){return ut.map(bt=>({...bt,...Kt.value.reduce((ht,St)=>{var Yt,Tt,rt,at;if(O.value[St].refEnumLabel){const dt=(Tt=(Yt=f[O.value[St].refEnum])==null?void 0:Yt.find(wt=>{var Ut,Ct;return((Ut=wt.id)==null?void 0:Ut.toString())===((Ct=bt[O.value[St].refEnum])==null?void 0:Ct.toString())}))==null?void 0:Tt[O.value[St].refEnumLabel];ht[He][St]=dt}else Array.isArray(bt[St])?(ht[He][St]=[],bt[St].forEach(dt=>{var wt,Ut;ht[He][St].push((Ut=(wt=f[O.value[St].refEnum])==null?void 0:wt.find(Ct=>{var Qt;return((Qt=Ct.value)==null?void 0:Qt.toString())===(dt==null?void 0:dt.toString())}))==null?void 0:Ut.label)})):ht[He][St]=(at=(rt=f[O.value[St].refEnum])==null?void 0:rt.find(dt=>{var wt,Ut;return((wt=dt.value)==null?void 0:wt.toString())===((Ut=bt[St])==null?void 0:Ut.toString())}))==null?void 0:at.label;return ht},{[He]:T.reactive(bt[He]?bt[He]:{})}),[_n]:T.reactive(cn(mt))}))}async function xt(ut){let bt=ut;try{bt=It(bt),bt=await o(Vt.value,bt)}catch(ht){console.error("【@yzsf2e/render-core】国际化id映射失败: ",ht)}return bt}T.watch([h],async()=>{let ut=Array.isArray(h.value)?h.value:[];ut=await xt(ut),_t.value=ut,Z.value=[],zt()});const Dt=(ut,bt)=>{At=!0,bt.width=ut,bt.children&&bt.children.length>0&&(bt.children[bt.children.length-1].width=ut),B(ut,bt.key),kt!==null&&clearTimeout(kt),kt=window.setTimeout(()=>{At=!1,kt=null},200)},jt=(ut,bt)=>{var ht;return((ht=n.value.find(St=>St.columnKey===bt.dataIndex))==null?void 0:ht[ut])||""},Pt=(ut,bt,ht,St)=>{const Yt=jt("action",bt)||St;ut[_n][`${Yt}Loading`]=!0,t("linkClick",jt("action",bt)||St,ht,[{...ut}],()=>ut[_n][`${Yt}Loading`]=!1)},Zt=(ut,bt)=>{if(ut.length!==3)return console.warn(`【${ut}】表达式不合法,默认计算为显示`),!0;const[ht,St,Yt]=ut;return St==="equal"?Wi(bt[ht],Yt):St==="unequal"?!Wi(bt[ht],Yt):!0};function $t(ut){return ut.align==="right"&&!["action","_index"].includes(ut.dataIndex)?{marginRight:"12px",whiteSpace:"nowrap"}:{whiteSpace:"nowrap"}}return T.onRenderTriggered(ut=>{}),k({clearSort:Ht,clearSelect:K,toggleTableHeight:g,patchDataCodeToText:xt}),{h:T.h,y:a,isNil:Vn,columns:x,totalList:lt,pageName:m,keywords:Kt,localeKeywords:Nt,computedY:et,dataSource:_t,filteredDataSource:Rt,LOADING_SIGN:_n,tableWrapper:p,linkCellKeys:D,htmlCellKeys:U,slotCellKeys:z,imgCellKeys:E,tableCellSlots:H,selectedRows:y,selectedRowKeys:v,selectedErrorRowKeys:w,showSelectionSummaryRow:_,DATA_SOURCE_FILTER_PREFIX:r,DATA_SOURCE_INDEX_KEY:e,customMaterialsMap:ks,formState:ft,fieldNameConditionsByKey:j,isFilterHeaderTable:L,FilterOutlined:Le.FilterOutlined,TABLE_ROW_CLASS_NAME:xl,localExpandedRowKeys:Z,selectedSingleRowKey:A,headerFilterSwitch:X,onSubmit:yt,onTableChange:Wt,onConditionChange:Ot,onHeaderFilterChange:Bt,emit:t,customRow:G,actionVisible:Zt,onSelectChange:V,handleLinkClick:Pt,transformSummary:oy,transformCellText:R,handleResizeColumn:Dt,findConfigByColumnKey:jt,generateColumnTitleStyle:$t,copyTextRender:ci}}}),av="",wy={key:1},_y=["title"],xy={key:1},Sy=["title"],ky={key:0},Cy=["onClick"],Ey={class:"table-summary-cell-text"},Ty={key:0,class:"table-summary-cell-text"},Ay={key:1,class:"table-summary-cell-text"},My=T.createElementVNode("span",{class:"table-summary-cell-text"},"总计",-1),Oy={class:"table-summary-cell-text"};function Ry(u,k,t,b,g,f){var $;const o=T.resolveComponent("a-button"),a=T.resolveComponent("a-tooltip"),r=T.resolveComponent("CustomConditionBuilder"),e=T.resolveComponent("ConditionBuilder"),n=T.resolveComponent("a-input"),l=T.resolveComponent("aicon"),i=T.resolveComponent("LoadingOutlined"),s=T.resolveComponent("Space"),h=T.resolveComponent("TableImageCell"),d=T.resolveComponent("TableCell"),c=T.resolveComponent("TableCopyCell"),p=T.resolveComponent("a-table-summary-cell"),m=T.resolveComponent("a-table-summary-row"),S=T.resolveComponent("a-table-summary"),C=T.resolveComponent("Table"),M=T.resolveDirective("permission"),P=T.resolveDirective("copy-hover");return T.openBlock(),T.createElementBlock("div",{ref:"tableWrapper",class:T.normalizeClass(["table-view-wrapper",{"filter-header-table-active":u.isFilterHeaderTable}]),style:{flex:"auto",overflow:"hidden"}},[T.createVNode(C,{bordered:"",size:"small","data-source":u.filteredDataSource,columns:u.columns,"expand-column-width":40,loading:u.loading,pagination:!1,scroll:{y:u.computedY},"row-key":u.rowKey,"custom-row":u.customRow,"expanded-row-keys":u.localExpandedRowKeys,"onUpdate:expandedRowKeys":k[1]||(k[1]=N=>u.localExpandedRowKeys=N),"row-class-name":(N,B)=>`${B%2===1?"table-striped-row":""} ${u.selectedErrorRowKeys[u.pageName].includes(N[u.rowKey])?"table-error-row":""} ${N[u.TABLE_ROW_CLASS_NAME]?N[u.TABLE_ROW_CLASS_NAME]:""} ${u.selectable===!1&&u.selectedSingleRowKey===N[u.rowKey]?"table-single-selected-row":""}`,"row-selection":u.selectable?{fixed:!0,columnWidth:40,onChange:u.onSelectChange,selectedRowKeys:u.selectedRowKeys[u.pageName]}:void 0,"transform-cell-text":u.transformCellText,onResizeColumn:u.handleResizeColumn,onChange:u.onTableChange},T.createSlots({headerCell:T.withCtx(({column:N})=>{var B;return[N.key===u.DATA_SOURCE_INDEX_KEY?(T.openBlock(),T.createElementBlock("div",{key:0,onClick:k[0]||(k[0]=(...D)=>u.headerFilterSwitch&&u.headerFilterSwitch(...D))},[T.createVNode(a,{title:u.isFilterHeaderTable?u.$t("closeFilterHeader")||"关闭筛选表头":u.$t("enableFilterHeader")||"开启筛选表头"},{default:T.withCtx(()=>[T.createVNode(o,{type:"text",icon:u.h(u.FilterOutlined)},null,8,["icon"])]),_:1},8,["title"])])):(T.openBlock(),T.createElementBlock("div",wy,[N.sortable===!1?(T.openBlock(),T.createBlock(a,{key:0},{title:T.withCtx(()=>[T.createTextVNode("仅支持当前页的筛选排序,不支持跨页筛选排序。如需统计全部数据,请点[导出全部],在 excel 统计。")]),default:T.withCtx(()=>[T.createElementVNode("span",{style:T.normalizeStyle([{color:"#999"},u.generateColumnTitleStyle(N)]),title:N.title},T.toDisplayString(N.title),13,_y)]),_:2},1024)):(B=N.key)!=null&&B.startsWith(u.DATA_SOURCE_FILTER_PREFIX)?(T.openBlock(),T.createElementBlock("div",xy,[u.fieldNameConditionsByKey[N.dataIndex]?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[u.customMaterialsMap[u.fieldNameConditionsByKey[N.dataIndex].type]?(T.openBlock(),T.createBlock(r,{key:0,value:u.formState[u.pageName][N.dataIndex],"onUpdate:value":D=>u.formState[u.pageName][N.dataIndex]=D,materials:u.fieldNameConditionsByKey[N.dataIndex],onChange:()=>u.onConditionChange(N.dataIndex),onPressEnter:u.onSubmit},null,8,["value","onUpdate:value","materials","onChange","onPressEnter"])):(T.openBlock(),T.createBlock(e,{key:1,value:u.formState[u.pageName][N.dataIndex],"onUpdate:value":D=>u.formState[u.pageName][N.dataIndex]=D,materials:u.fieldNameConditionsByKey[N.dataIndex],onChange:()=>u.onConditionChange(N.dataIndex),onPressEnter:u.onSubmit,style:{width:"100%"}},null,8,["value","onUpdate:value","materials","onChange","onPressEnter"]))],64)):(T.openBlock(),T.createBlock(n,{key:1,size:"small","allow-clear":"",value:u.formState[u.pageName][N.dataIndex],"onUpdate:value":D=>u.formState[u.pageName][N.dataIndex]=D,onChange:u.onHeaderFilterChange,onPressEnter:u.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):(T.openBlock(),T.createElementBlock("div",{key:2,style:T.normalizeStyle(u.generateColumnTitleStyle(N)),title:N.title},T.toDisplayString(N.title),13,Sy))]))]}),bodyCell:T.withCtx(({text:N,record:B,index:D,column:U})=>{var z,E,O,x,y,v;return[U.dataIndex==="action"?(T.openBlock(),T.createBlock(s,{key:0},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(U.childActions,w=>(T.openBlock(),T.createElementBlock(T.Fragment,{key:w.action},[w.show===void 0||u.actionVisible(w.show,B)?T.withDirectives((T.openBlock(),T.createElementBlock("div",ky,[B[u.LOADING_SIGN][`${w.action}Loading`]?(T.openBlock(),T.createBlock(i,{key:1,style:{color:"#1890ff"}})):(T.openBlock(),T.createElementBlock("a",{key:0,onClick:T.withModifiers(_=>{w.disabled&&u.actionVisible(w.disabled,B)||u.handleLinkClick(B,U,_,w.action)},["stop"]),class:T.normalizeClass({"ant-table-action-disabled":w.disabled&&u.actionVisible(w.disabled,B)}),style:T.normalizeStyle({color:w.color})},[w.icon?(T.openBlock(),T.createBlock(l,{key:0,type:w.icon},null,8,["type"])):T.createCommentVNode("",!0),T.createTextVNode(" "+T.toDisplayString(w.text),1)],14,Cy))])),[[M,w.permissions]]):T.createCommentVNode("",!0)],64))),128))]),_:2},1024)):T.createCommentVNode("",!0),u.slotCellKeys.includes(U.dataIndex)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[U.copyable===!0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(z=u.tableCellSlots[U.cellValueSlot])!=null&&z.component?T.withDirectives((T.openBlock(),T.createBlock(T.resolveDynamicComponent((E=u.tableCellSlots[U.cellValueSlot])==null?void 0:E.component),T.normalizeProps(T.mergeProps({key:0},{text:N,row:B,index:D,column:U,...(O=u.tableCellSlots[U.cellValueSlot])==null?void 0:O.props})),null,16)),[[P]]):T.createCommentVNode("",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[(x=u.tableCellSlots[U.cellValueSlot])!=null&&x.component?(T.openBlock(),T.createBlock(T.resolveDynamicComponent((y=u.tableCellSlots[U.cellValueSlot])==null?void 0:y.component),T.normalizeProps(T.mergeProps({key:0},{text:N,row:B,index:D,column:U,...(v=u.tableCellSlots[U.cellValueSlot])==null?void 0:v.props})),null,16)):T.createCommentVNode("",!0)],64))],64)):u.imgCellKeys.includes(U.dataIndex)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:2},[N?(T.openBlock(),T.createBlock(h,T.normalizeProps(T.mergeProps({key:0},{image:N})),null,16)):T.createCommentVNode("",!0)],64)):[...u.linkCellKeys,...u.keywords,...u.htmlCellKeys,...u.localeKeywords].includes(U.dataIndex)?(T.openBlock(),T.createBlock(d,T.normalizeProps(T.mergeProps({key:3},{row:B,locale:U.locale,copyable:U.copyable,column:U,loading:B[u.LOADING_SIGN][`${U.action}Loading`],keywords:u.keywords,localeKeywords:u.localeKeywords,linkCellKeys:u.linkCellKeys,handleLinkClick:u.handleLinkClick})),null,16)):U.copyable===!0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:4},[N?(T.openBlock(),T.createBlock(c,T.normalizeProps(T.mergeProps({key:0},{text:N})),null,16)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)]}),_:2},[($=u.tableProps)!=null&&$.expandedRowRender?{name:"expandedRowRender",fn:T.withCtx(({record:N,index:B,indent:D,expanded:U})=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(u.tableProps.expandedRowRender.component),T.normalizeProps(T.guardReactiveProps({row:N,index:B,indent:D,expanded:U,...u.tableProps.expandedRowRender.props})),null,16))]),key:"0"}:void 0,u.selectable?{name:"summary",fn:T.withCtx(()=>[T.createVNode(S,{fixed:""},{default:T.withCtx(()=>[T.withDirectives(T.createVNode(m,{class:"table-summary-selection"},{default:T.withCtx(()=>[T.createVNode(p,{index:0},{default:T.withCtx(()=>[T.createElementVNode("span",Ey,T.toDisplayString(u.$t("selected")||"选中"),1)]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.columns,(N,B)=>(T.openBlock(),T.createBlock(p,{key:N.key,index:B+1,style:{"text-align":"center"}},{default:T.withCtx(()=>[B===0?(T.openBlock(),T.createElementBlock("span",Ty,T.toDisplayString(u.selectedRowKeys[u.pageName].length),1)):(T.openBlock(),T.createElementBlock("span",Ay,T.toDisplayString(N.summary?u.transformSummary(N.summary,N):null),1))]),_:2},1032,["index"]))),128))]),_:1},512),[[T.vShow,u.showSelectionSummaryRow]]),u.hasApiConfig?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(m,{key:0},{default:T.withCtx(()=>[T.createVNode(p,{index:0},{default:T.withCtx(()=>[My]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.totalList,(N,B)=>(T.openBlock(),T.createBlock(p,{key:B,index:B+1,style:{"text-align":"center"}},{default:T.withCtx(()=>[T.createElementVNode("span",Oy,T.toDisplayString(N),1)]),_:2},1032,["index"]))),128))]),_:1}))]),_:1})]),key:"1"}:void 0]),1032,["data-source","columns","loading","scroll","row-key","custom-row","expanded-row-keys","row-class-name","row-selection","transform-cell-text","onResizeColumn","onChange"])],2)}const Ny=$e(vy,[["render",Ry]]),{Item:Iy,useForm:jy}=Ft.Form,Py=T.defineComponent({name:"PageRendererConditions",components:{DownOutlined:Le.DownOutlined,UpOutlined:Le.UpOutlined,Col:Ft.Col,Row:Ft.Row,Form:Ft.Form,Item:Iy,Space:Ft.Space,Button:Ft.Button,ConditionBuilder:Rl,CustomConditionBuilder:Nl},props:{config:{type:Array,default:()=>[]},searching:{type:Boolean,default:!1},current:{type:Number,default:1},defaultQuery:{type:Object,default:()=>{}},immediateQuery:{type:Boolean,default:!1}},emits:["search","changeExpand","update:current","resetSearch"],setup(u,{emit:k,expose:t}){const{t:b}=Ue(),g=6,f=3,{config:o,immediateQuery:a}=T.toRefs(u),r=T.inject("pageName",""),e=T.inject("searchFormChange",N=>{}),n=T.ref(!1),l=T.computed(()=>o.value.reduce((N,B)=>{var D;return((D=B.otherProps)==null?void 0:D.columnWidth)==2?N+=2:N+=1,N},0)),i=T.computed(()=>l.value+1>g*f),s=T.computed(()=>{var D;let N=999999,B=1;for(let U=0;U<o.value.length;U++)if(((D=o.value[U].otherProps)==null?void 0:D.columnWidth)==2?B+=2:B+=1,B>g*f){N=U-1;break}else if(B===g*f){N=U;break}return N}),h=T.computed(()=>{var N,B;return n.value||i.value===!1?(g-l.value%g)*4:((B=(N=o.value[s.value+1])==null?void 0:N.otherProps)==null?void 0:B.columnWidth)===2?8:4}),{formState:d,dispatchFormState:c}=kn(),p=T.reactive(o.value.reduce((N,B)=>(B.fieldName&&B.required&&(N[B.fieldName]=[{required:!0,message:`${B.label} ${b("cannotBeEmpty")||"不能为空"}`}]),N),{})),{resetFields:m,validate:S,validateInfos:C}=jy(d[r],p,{onValidate:(N,B,D)=>D==null?void 0:D.forEach(U=>Ft.message.warning(U))});T.watch(()=>d[r],N=>{e(N)},{deep:!0}),T.watch(()=>u.defaultQuery,N=>{T.nextTick(()=>{c(N,r),u.current===1?k("search"):k("update:current",1)})},{deep:!0,immediate:a.value});const M=()=>{S().then(()=>u.current===1?k("search"):k("update:current",1)).catch(N=>{console.log("[@yzsf2e/render-core]",N)})},P=N=>Array.isArray(N)?N.filter(B=>![void 0,null].includes(B)).length>0:!!N;T.watch(n,()=>k("changeExpand"));function $(N){return N==2?{span:8,labelCol:{span:4},wrapperCol:{span:20}}:{span:4}}return t({resetFields:m,validate:S}),{expand:n,pageName:r,formState:d,serachSpan:h,maxShowIndex:s,validateInfos:C,customMaterialsMap:ks,showAvailiableTrigger:i,columnWidthGenerator:$,onSubmit:M,getItemActive:P}}}),lv="";function By(u,k,t,b,g,f){const o=T.resolveComponent("CustomConditionBuilder"),a=T.resolveComponent("ConditionBuilder"),r=T.resolveComponent("Item"),e=T.resolveComponent("Col"),n=T.resolveComponent("Button"),l=T.resolveComponent("UpOutlined"),i=T.resolveComponent("DownOutlined"),s=T.resolveComponent("Space"),h=T.resolveComponent("Row"),d=T.resolveComponent("Form");return T.openBlock(),T.createBlock(d,{class:"page-renderer-conditions","label-col":{span:8},"wrapper-col":{span:16}},{default:T.withCtx(()=>[T.createVNode(h,{gutter:24},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.config,(c,p)=>{var m;return T.withDirectives((T.openBlock(),T.createBlock(e,{key:c.fieldName,span:u.columnWidthGenerator((m=c.otherProps)==null?void 0:m.columnWidth).span,class:"conditions-item-col"},{default:T.withCtx(()=>{var S,C;return[T.createVNode(r,T.mergeProps(u.validateInfos[c.fieldName],{colon:!1,"label-col":u.columnWidthGenerator((S=c.otherProps)==null?void 0:S.columnWidth).labelCol,"wrapper-col":u.columnWidthGenerator((C=c.otherProps)==null?void 0:C.columnWidth).wrapperCol,label:c.label,class:{"form-item-with-small-fonts":c.label.length>4,[`form-item-words${c.label.length>10?10:c.label.length}`]:!0,"form-item-active":u.getItemActive(u.formState[u.pageName][c.fieldName])}}),{default:T.withCtx(()=>[u.customMaterialsMap[c.type]?(T.openBlock(),T.createBlock(o,{key:0,value:u.formState[u.pageName][c.fieldName],"onUpdate:value":M=>u.formState[u.pageName][c.fieldName]=M,materials:c,onPressEnter:u.onSubmit},null,8,["value","onUpdate:value","materials","onPressEnter"])):(T.openBlock(),T.createBlock(a,{key:1,value:u.formState[u.pageName][c.fieldName],"onUpdate:value":M=>u.formState[u.pageName][c.fieldName]=M,materials:c,onPressEnter:u.onSubmit},null,8,["value","onUpdate:value","materials","onPressEnter"]))]),_:2},1040,["label-col","wrapper-col","label","class"])]}),_:2},1032,["span"])),[[T.vShow,u.expand||p<=u.maxShowIndex]])}),128)),T.createVNode(e,{span:u.serachSpan},{default:T.withCtx(()=>[T.createVNode(s,{style:{float:"right","padding-right":"12px"}},{default:T.withCtx(()=>[T.createVNode(n,{type:"primary",size:"small",onClick:T.withModifiers(u.onSubmit,["prevent"]),loading:u.searching},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("query")||"查询"),1)]),_:1},8,["onClick","loading"]),T.createVNode(n,{size:"small",onClick:k[0]||(k[0]=c=>u.$emit("resetSearch"))},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("reset")||"重置"),1)]),_:1}),u.showAvailiableTrigger?(T.openBlock(),T.createElementBlock("a",{key:0,style:{"font-size":"12px"},onClick:k[1]||(k[1]=c=>u.expand=!u.expand)},[u.expand?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(l),T.createTextVNode(T.toDisplayString(u.$t("collapse")||"收起"),1)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createVNode(i),T.createTextVNode(T.toDisplayString(u.$t("expand")||"展开"),1)],64))])):T.createCommentVNode("",!0)]),_:1})]),_:1},8,["span"])]),_:1})]),_:1})}const Dy=$e(Py,[["render",By]]),Fy=T.defineComponent({name:"PageRendererSummaryBar",components:{Alert:Ft.Alert},props:{config:{type:Object,required:!0}},setup(u,{expose:k}){const{config:t}=T.toRefs(u),{template:b}=t.value,g=T.ref(!1),{formState:f}=kn(),o=T.inject("pageName",""),a=T.inject("paramsGuard",s=>s),r=()=>{const s=/\{\{(.+?)\}\}/g;let h={},d=[];for(;(d=s.exec(b))!==null;)h[d[1].trim()]=" - ";return h},e=T.reactive(r()),n=ur(t.value.url),l=async()=>{const s=ws({conditions:T.toRaw(f[o]),apiConfig:t.value});a(s,o),g.value=!0,n(s).then(h=>{Object.keys(e).forEach(d=>{const c=jr(h,`${t.value.dataKey}.${d}`);e[d]=Vn(c)?" - ":c})}).finally(()=>g.value=!1)},i={data:()=>T.toRaw(e),template:b};return k({fetchSummary:l}),()=>T.h(Ft.Alert,{class:"page-renderer-summary-bar"},{message:()=>g.value?T.h(Ft.Spin,{size:"small",style:{height:"20px"}}):T.h(i)})}}),cv="";async function Ly(u,k){return fy(u,"/meta-server-web/page/customPageConfig",k)}const $y={COLUMN_SETTING:"fieldShowConfigList",FILTER_SETTING:"fieldFilterConfigList",SORT_SETTING:"fieldSortConfigList"},zy=T.defineComponent({name:"PageRendererColumnSettingModal",components:{Modal:Ft.Modal,Space:Ft.Space,Button:Ft.Button,Transfer:Ft.Transfer},props:{hasApiConfig:{type:Boolean,required:!0},visible:{type:Boolean,default:!1,required:!0},type:{type:String,default:"SORT_SETTING"},title:{type:String,default:"title"},columns:{type:Array,default:()=>[]}},emits:["change","update:visible"],setup(u,{emit:k}){const{t}=Ue(),b=fi(),g=hi(),f=Ye(u,"visible",k),o=T.inject("pageName",""),a=Fs(Cl,{}),r=T.ref(!1),e=T.ref([]),n=T.reactive({dataSource:[]});T.watch(f,P=>{if(!P)e.value=[],n.dataSource=[];else{let $=cn(T.toRaw(u.columns));const N=a.value[o];if(N){const B=cn(T.toRaw(u.columns));$=[...N.filter(U=>B.find(z=>z.columnKey===U.columnKey)).map(U=>{const z=B.findIndex(O=>O.columnKey===U.columnKey);return{...B.splice(z,1)[0],show:U.show}}),...B]}n.dataSource=$.map(B=>(B.show!==!1&&e.value.push(B.columnKey),{...B,disabled:B.columnKey==="action"||B.fixed!==void 0||B.disabled,key:B.columnKey,rowExpandable:!1}))}});const l=[{title:t("columnName")||"列名",dataIndex:"title"}],i=()=>{u.hasApiConfig&&u.type==="COLUMN_SETTING"&&Ft.Modal.confirm({title:t("columnSettingModalResetPrompt")||"确认重置为默认值吗?",getContainer:C,onOk(){a.value[o]=void 0,k("change")}})},s=async()=>{const P=T.toRaw(e.value),{dataSource:$}=n;if(u.hasApiConfig&&u.type==="COLUMN_SETTING"){if(P.length<5){Ft.message.warn(t("columnSettingModalHandlePrompt")||"显示列不能小于 5 项!");return}const U=$.map(z=>({columnKey:z.columnKey,show:P.includes(z.columnKey)}));a.value[o]=U,k("change");return}const{category:N,tab:B}=b.meta,D=P.map(U=>{const z={},E=$.find(O=>O.columnKey===U);if(z.entityId=E.entityId,z.columnKey=E.columnKey,u.type==="SORT_SETTING"){const[O,x]=E.columnKey.split("@");z.columnKey=O,z.sort=x}return z});try{r.value=!0,await Ly(g,{[$y[u.type]]:D,category:N,label:B}),k("change")}catch(U){console.warn(U)}finally{r.value=!1}},h=()=>f.value=!1,d=({disabled:P,selectedKeys:$,onItemSelectAll:N,onItemSelect:B})=>({getCheckboxProps:D=>({disabled:P||D.disabled}),onSelectAll(D,U){const z=U.filter(E=>!E.disabled).map(({key:E})=>E);N(z,D)},onSelect({key:D},U){B(D,U)},selectedRowKeys:$});let c="",p="";const m=(P,$,N,B)=>({style:{cursor:"move"},onMouseenter:D=>{var z;const U=D||window.event;P.key==="action"||(z=u.columns.find(E=>E.columnKey===P.key))!=null&&z.fixed||(U.target.draggable=!0)},onDragstart:D=>{(D||window.event).stopPropagation(),c=P.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[$].classList.add("source")},onDragover:D=>{(D||window.event).preventDefault()},onDragenter:D=>{(D||window.event).preventDefault();const z=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(n.dataSource[$].disabled)return;const E=document.querySelectorAll(".ant-table-row.target");E.length&&E[0].classList.remove("target"),z[$+(n.dataSource.length-e.value.length)].classList.add("target"),p=P.key},onDrop:D=>{(D||window.event).stopPropagation();const z=document.querySelectorAll(".ant-table-row.target");z.length&&z[0].classList.remove("target");const E=document.querySelectorAll(".ant-table-row.source");if(E.length&&E[0].classList.remove("source"),p===c)return;const O=n.dataSource.slice(),x=O.findIndex(_=>_.key===c),y=O[x];O.splice(x,1);const v=O.findIndex(_=>_.key===p);O.splice(v,0,y),Object.assign(n,{dataSource:O});const w=[];n.dataSource.map(_=>{e.value.includes(_.key)&&w.push(_.key)}),e.value=w},onClick:()=>{const{key:D,disabled:U}=P;U||B(D,!N.includes(D))},ondblclick:()=>{const{key:D,disabled:U}=P;if(U)return;const z=e.value.indexOf(D);z>-1?e.value.splice(z,1):e.value.push(D)}}),S=(P,$,N,B)=>({onClick:()=>{const{key:D,disabled:U}=P;U||B(D,!N.includes(D))},ondblclick:()=>{const{key:D,disabled:U}=P;if(U)return;const z=e.value.indexOf(D);z>-1?e.value.splice(z,1):e.value.push(D)}}),C=()=>document.querySelector(".page-renderer-wrapper");return T.watch(f,P=>{P&&T.nextTick(()=>{const $=document.querySelector(".ant-modal-root"),N=$==null?void 0:$.querySelector(".ant-modal-header"),B=$==null?void 0:$.querySelector(".ant-modal");N.style.cursor="move";const D=B.currentStyle||window.getComputedStyle(B,null);N.onmousedown=U=>{const z=U.clientX-N.offsetLeft,E=U.clientY-N.offsetTop;let O,x;D.left.includes("%")?(O=+document.body.clientWidth*(+D.left.replace(/\%/g,"")/100),x=+document.body.clientHeight*(+D.top.replace(/\%/g,"")/100)):(O=+D.left.replace(/\px/g,""),x=+D.top.replace(/\px/g,"")),document.onmousemove=function(y){const v=y.clientX-z,w=y.clientY-E;B.style.left=`${v+O}px`,B.style.top=`${w+x}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:f,loading:r,state:n,toKeys:e,tableColumn:l,handleChange:(P,$,N)=>{const B=P.map(D=>D.split("@")[0]);if(B.length!==Vm(B).length){e.value=P.filter(D=>!N.includes(D)),Ft.message.warn("同一字段不能同时设置升序和降序!");return}},handleReset:i,handleOk:s,customRowRight:m,customRowLeft:S,handleClose:h,getContainer:C,getRowSelection:d}}}),uv="",Uy={style:{"text-align":"center",padding:"5px 0"}};function Vy(u,k,t,b,g,f){const o=T.resolveComponent("a-table"),a=T.resolveComponent("Transfer"),r=T.resolveComponent("Button"),e=T.resolveComponent("Space"),n=T.resolveComponent("Modal");return T.openBlock(),T.createBlock(n,{"wrap-class-name":"drag-modal-wrapper",visible:u.show,"onUpdate:visible":k[1]||(k[1]=l=>u.show=l),"get-container":u.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},"destroy-on-close":!0,onCancel:u.handleClose},{title:T.withCtx(()=>[T.createElementVNode("span",null,T.toDisplayString(u.title),1)]),footer:T.withCtx(()=>[T.createVNode(e,null,{default:T.withCtx(()=>[u.hasApiConfig&&u.type==="COLUMN_SETTING"?(T.openBlock(),T.createBlock(r,{key:0,onClick:u.handleReset},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("reset")||"重置"),1)]),_:1},8,["onClick"])):T.createCommentVNode("",!0),T.createVNode(r,{type:"primary",loading:u.loading,onClick:u.handleOk},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("ok")||"确定"),1)]),_:1},8,["loading","onClick"])]),_:1})]),default:T.withCtx(()=>[T.createVNode(a,{"target-keys":u.toKeys,"onUpdate:targetKeys":k[0]||(k[0]=l=>u.toKeys=l),"show-select-all":!1,"data-source":u.state.dataSource,"show-search":!0,titles:[" "+(u.$t("hideColumns")||"隐藏列")," "+(u.$t("showColumns")||"显示列")],"list-style":{"min-height":"430px"},"row-key":l=>l.key,style:{"justify-content":"center"},"filter-option":(l,i)=>{var s;return((s=i.title)==null?void 0:s.indexOf(l))!==-1},onChange:u.handleChange},{children:T.withCtx(({direction:l,selectedKeys:i,disabled:s,filteredItems:h,onItemSelectAll:d,onItemSelect:c})=>[T.createVNode(o,{size:"small",class:T.normalizeClass(l==="right"?"source-table":""),"row-selection":u.getRowSelection({disabled:s,selectedKeys:i,onItemSelectAll:d,onItemSelect:c}),"show-expand-column":!1,columns:u.tableColumn,"data-source":l==="left"?h.filter(p=>!u.toKeys.includes(p.key)):h.filter(p=>u.toKeys.includes(p.key)),pagination:!1,scroll:{y:300},style:T.normalizeStyle({pointerEvents:s?"none":null}),"custom-row":(p,m)=>l==="left"?u.customRowLeft(p,m,i,c):u.customRowRight(p,m,i,c)},null,8,["class","row-selection","columns","data-source","style","custom-row"])]),footer:T.withCtx(({direction:l})=>[T.createElementVNode("div",Uy,T.toDisplayString(l==="left"?u.$t("hideColumnsTips")||"双击字殷,可快速左右切换。":u.$t("showColumnsTips")||"拖捷字段,可上下调整排序位置。"),1)]),_:1},8,["target-keys","data-source","titles","row-key","filter-option","onChange"])]),_:1},8,["visible","get-container","mask-style","onCancel"])}const Hy=$e(zy,[["render",Vy]]),qy={".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg"},Wy={ALL:"导出全部",SELECTED:"导出选中"},Es={COLUMN_SETTING:"列表设置",FILTER_SETTING:"筛选设置",SORT_SETTING:"排序设置"},Ky=T.defineComponent({name:"PageRendererButtons",components:{aicon:En,Menu:Ft.Menu,MenuItem:Ft.MenuItem,Space:Ft.Space,Button:Ft.Button,Select:Ft.Select,Dropdown:Ft.Dropdown,Pagination:Ft.Pagination,DropdownButton:Ft.DropdownButton,SettingOutlined:Le.SettingOutlined,DownOutlined:Le.DownOutlined},props:{config:{type:Array,default:()=>[]},hasApiConfig:{type:Boolean,required:!0},exportConfig:{type:Object},importConfig:{type:Object},handleExport:{type:Function,default:null},frontendExportConfig:{type:Object,default:null},handleFrontendExport:{type:Function,default:null},exportProgress:{type:Number,default:0},total:{type:Number,default:0},current:{type:Number,default:1},pageSize:{type:Number,default:100},pageSizeOptions:{type:Array,default:null}},emits:["buttonClick","update:current","update:pageSize","customizeSetting","refresh"],setup(u,{emit:k}){var N,B,D,U;const{t}=Ue(),b={COLUMN_SETTING:t("listSettings")||"列表设置"},{current:g,pageSize:f,exportConfig:o,importConfig:a,pageSizeOptions:r}=T.toRefs(u),e=T.ref(!1),n=T.ref(!1),l=T.inject("pageName",""),{selectedRows:i}=xn(),s=T.computed(()=>r.value||Sl),h=(z,E)=>{if(z.needSelectRows){if(!i[l].length){Ft.message.warn(t("pleaseSelectData")||"请选择数据");return}if(z.mode==="single"&&i[l].length>1){Ft.message.warn(t("onlyOneDataCanBeSelected")||"只能选择一条数据");return}}k("buttonClick",z.action,E)},d=T.computed({get:()=>g.value,set:z=>k("update:current",z)}),c=T.computed({get:()=>f.value,set:z=>{const E=Math.ceil(u.total/z);d.value>E&&(d.value=E),k("update:pageSize",z)}}),p=T.inject("paramsGuard",z=>z),m=(N=o.value)!=null&&N.url?ur((B=o.value)==null?void 0:B.url,"post",{responseType:"blob",...o.value.requestOptions}):null,S=(U=(D=a.value)==null?void 0:D.children)!=null&&U.length?a.value.children.map(z=>ur(z.url,"post",{...z.requestOptions})):[],C=async()=>{var O;const{formState:z}=kn(),E=o.value?ws({conditions:T.toRaw(z[l]),apiConfig:o.value}):{};p(E,l);try{e.value=!0;const x=await m(E);if(!x)return;try{const j=await new Response(x).json();if(j.success===!1){Ft.message.error(j.message||j.msg||t("exportFailed")||"导出失败");return}}catch{}const y=/\{\{(.+?)\}\}/g;let v=((O=o.value)==null?void 0:O.fileName)||"",w=null;for(;(w=y.exec(v))!==null;)w[1]==="Date"&&(v=v.replace(w[0],ds().format("YYYY-MM-DD")));const _=document.createElement("a"),A=window.URL.createObjectURL(new Blob([x]));if(_.href=A,_.download=v,document.body.appendChild(_),_.click(),document.body.removeChild(_),window.URL.revokeObjectURL(A),o.value.needFeedback===!1)return;Ft.message.success(t("exportSuccess")||"导出成功")}catch(x){console.warn("export error: ",x)}finally{e.value=!1}},M=({url:z,type:E})=>{switch(E){case"TEMPLATE_LOCAL":window.open(z);break}},P=async({accept:z},E)=>{const O=/^\.[a-zA-Z]+$/,x=z==null?void 0:z.reduce((w,_)=>{if(!O.test(_))throw`请提供正确的文件后缀名,是否是 【.${_}】 ?`;return w[qy[_]]=[_],w},{}),[y]=await window.showOpenFilePicker({types:[{accept:x}]}),v=await y.getFile();if(v){const w=S[E],_=new FormData;_.append("file",v),n.value=!0,w(_).finally(()=>{n.value=!1})}};return{SETTINGS_MAP:Es,API_CONFIG_SETTINGS_MAP:b,importLoading:n,exportLoading:e,computed_current:d,computed_pageSize:c,paginationSizeOptions:s,OPERATIONS_EXPORT_MAP:Wy,handleImport:(z,E)=>{const{type:O}=z;if(["TEMPLATE_LOCAL"].includes(O)){M(z);return}if(["IMPORT"].includes(O)){P(z,E);return}Ft.message.warn(`请确认ImportConfigItem.type是否正确: ${O}`)},handleApiConfigExport:C,handleButtonClick:h}}}),fv="",Xy={class:"page-renderer-buttons"},Yy={class:"page-renderer-buttons-left"},Gy={class:"page-renderer-buttons-right"},Zy={class:"page-renderer-pagination"},Jy={key:0},Qy={class:"page-renderer-setting-trigger"},t2={href:"javascript:;"};function e2(u,k,t,b,g,f){const o=T.resolveComponent("aicon"),a=T.resolveComponent("DownOutlined"),r=T.resolveComponent("Button"),e=T.resolveComponent("MenuItem"),n=T.resolveComponent("Menu"),l=T.resolveComponent("Space"),i=T.resolveComponent("Dropdown"),s=T.resolveComponent("Pagination"),h=T.resolveComponent("Select"),d=T.resolveComponent("SettingOutlined"),c=T.resolveDirective("permission");return T.openBlock(),T.createElementBlock("div",Xy,[T.createElementVNode("div",Yy,[T.createVNode(l,{wrap:""},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.config,(p,m)=>T.withDirectives((T.openBlock(),T.createBlock(T.resolveDynamicComponent(p.type),T.mergeProps(p.otherProps,{key:`${p.type}${m}`,overlayClassName:"page-renderer-button-dropdown-menu",onClick:S=>u.handleButtonClick(p,S)}),T.createSlots({overlay:T.withCtx(()=>[T.createVNode(n,null,{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(p.sublist,S=>(T.openBlock(),T.createBlock(e,{key:S.action,onClick:C=>u.handleButtonClick(S,C)},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(S.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:T.withCtx(()=>[p.sublist&&p.sublist.length>0&&p.type==="Dropdown"?(T.openBlock(),T.createBlock(r,T.normalizeProps(T.mergeProps({key:0},p.otherProps)),{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(p.children)+" ",1),T.createVNode(a)]),_:2},1040)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createTextVNode(T.toDisplayString(p.children),1)],64))]),_:2},[p.iconType&&p.sublist&&p.sublist.length>0?{name:"icon",fn:T.withCtx(()=>[T.createVNode(o,{type:p.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[c,p.permissions]])),128))]),_:1})]),T.createElementVNode("div",Gy,[T.createVNode(l,null,{default:T.withCtx(()=>{var p,m,S,C;return[u.hasApiConfig?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(p=u.importConfig)!=null&&p.children?(T.openBlock(),T.createBlock(i,{key:0,trigger:["click"],disabled:u.importLoading},{overlay:T.withCtx(()=>[T.createVNode(n,null,{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.importConfig.children,(M,P)=>(T.openBlock(),T.createBlock(e,{key:P,onClick:()=>u.handleImport(M,P)},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(M.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:T.withCtx(()=>[T.createVNode(r,{loading:u.importLoading,size:"small",type:"primary"},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):T.createCommentVNode("",!0),u.exportConfig?(T.openBlock(),T.createBlock(r,{key:1,size:"small",type:"primary",loading:u.exportLoading,onClick:k[0]||(k[0]=()=>u.handleApiConfigExport())},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("exportText")||"导出"),1)]),_:1},8,["loading"])):T.createCommentVNode("",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[(m=u.importConfig)!=null&&m.sublist?(T.openBlock(),T.createBlock(i,{key:0,trigger:["click"],disabled:u.importLoading},{overlay:T.withCtx(()=>[T.createVNode(n,null,{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.importConfig.sublist,(M,P)=>(T.openBlock(),T.createBlock(e,{key:P,onClick:()=>u.handleImport(M,P)},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(M.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:T.withCtx(()=>[T.createVNode(r,{loading:u.importLoading,size:"small",type:"primary"},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):T.createCommentVNode("",!0),u.exportConfig?(T.openBlock(),T.createBlock(i,{key:1},{overlay:T.withCtx(()=>[T.createVNode(n,{onClick:k[1]||(k[1]=M=>u.handleExport(M.key))},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.OPERATIONS_EXPORT_MAP,(M,P)=>(T.openBlock(),T.createBlock(e,{key:P},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(M),1)]),_:2},1024))),128))]),_:1})]),default:T.withCtx(()=>[T.createVNode(r,{size:"small",type:"primary",loading:u.exportLoading},{default:T.withCtx(()=>[T.createTextVNode(" 导出 "),T.createVNode(a)]),_:1},8,["loading"])]),_:1})):T.createCommentVNode("",!0)],64)),(S=u.frontendExportConfig)!=null&&S.show?T.withDirectives((T.openBlock(),T.createBlock(r,{key:2,size:"small",type:"primary",loading:u.exportProgress>0,onClick:u.handleFrontendExport},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(u.$t("exportText")||"导出")+" "+T.toDisplayString(u.exportProgress>0?`(${u.exportProgress}%)`:""),1)]),_:1},8,["loading","onClick"])),[[c,(C=u.frontendExportConfig)==null?void 0:C.permissions]]):T.createCommentVNode("",!0),T.createElementVNode("div",Zy,[u.hasApiConfig?(T.openBlock(),T.createElementBlock("div",Jy,T.toDisplayString(u.$t("total")||"共")+" "+T.toDisplayString(u.total)+" "+T.toDisplayString(u.$t("items")||"条"),1)):T.createCommentVNode("",!0),T.createVNode(s,{class:"operations-pagination-simple",current:u.computed_current,"onUpdate:current":k[2]||(k[2]=M=>u.computed_current=M),pageSize:u.computed_pageSize,"onUpdate:pageSize":k[3]||(k[3]=M=>u.computed_pageSize=M),size:"small",simple:"",total:u.total},null,8,["current","pageSize","total"]),T.createVNode(h,{value:u.computed_pageSize,"onUpdate:value":k[4]||(k[4]=M=>u.computed_pageSize=M),size:"small",options:u.paginationSizeOptions},null,8,["value","options"])]),T.createVNode(i,{placement:"bottomRight",trigger:["click"]},{overlay:T.withCtx(()=>[T.createVNode(n,{onClick:k[5]||(k[5]=M=>u.$emit("customizeSetting",M.key))},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.hasApiConfig?u.API_CONFIG_SETTINGS_MAP:u.SETTINGS_MAP,(M,P)=>(T.openBlock(),T.createBlock(e,{key:P},{default:T.withCtx(()=>[T.createVNode(d,{style:{"margin-right":"4px"}}),T.createElementVNode("a",t2,T.toDisplayString(M),1)]),_:2},1024))),128))]),_:1})]),default:T.withCtx(()=>[T.createElementVNode("div",Qy,[T.createVNode(d,{style:{"font-size":"15px",transform:"translateY(2px)"}})])]),_:1})]}),_:1})])])}const r2=$e(Ky,[["render",e2]]);function pi(u){throw new Error('Could not dynamically require "'+u+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Il={exports:{}};/*! ExcelJS 19-10-2023 */(function(u,k){(function(t){u.exports=t()})(function(){return function t(b,g,f){function o(e,n){if(!g[e]){if(!b[e]){var l=typeof pi=="function"&πif(!n&&l)return l(e,!0);if(a)return a(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var s=g[e]={exports:{}};b[e][0].call(s.exports,function(h){return o(b[e][1][h]||h)},s,s.exports,t,b,g,f)}return g[e].exports}for(var a=typeof pi=="function"&&pi,r=0;r<f.length;r++)o(f[r]);return o}({1:[function(t,b,g){const f=t("fs"),o=t("fast-csv"),a=t("dayjs/plugin/customParseFormat"),r=t("dayjs/plugin/utc"),e=t("dayjs").extend(a).extend(r),n=t("../utils/stream-buf"),{fs:{exists:l}}=t("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};b.exports=class{constructor(s){this.workbook=s,this.worksheet=null}async readFile(s,h){if(h=h||{},!await l(s))throw new Error("File not found: "+s);const d=f.createReadStream(s),c=await this.read(d,h);return d.close(),c}read(s,h){return h=h||{},new Promise((d,c)=>{const p=this.workbook.addWorksheet(h.sheetName),m=h.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],S=h.map||function(M){if(M==="")return null;const P=Number(M);if(!Number.isNaN(P)&&P!==1/0)return P;const $=m.reduce((B,D)=>{if(B)return B;const U=e(M,D,!0);return U.isValid()?U:null},null);if($)return new Date($.valueOf());const N=i[M];return N!==void 0?N:M},C=o.parse(h.parserOptions).on("data",M=>{p.addRow(M.map(S))}).on("end",()=>{C.emit("worksheet",p)});C.on("worksheet",d).on("error",c),s.pipe(C)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(s,h){return new Promise((d,c)=>{h=h||{};const p=this.workbook.getWorksheet(h.sheetName||h.sheetId),m=o.format(h.formatterOptions);s.on("finish",()=>{d()}),m.on("error",c),m.pipe(s);const{dateFormat:S,dateUTC:C}=h,M=h.map||(N=>{if(N){if(N.text||N.hyperlink)return N.hyperlink||N.text||"";if(N.formula||N.result)return N.result||"";if(N instanceof Date)return S?C?e.utc(N).format(S):e(N).format(S):C?e.utc(N).format():e(N).format();if(N.error)return N.error;if(typeof N=="object")return JSON.stringify(N)}return N}),P=h.includeEmptyRows===void 0||h.includeEmptyRows;let $=1;p&&p.eachRow((N,B)=>{if(P)for(;$++<B-1;)m.write([]);const{values:D}=N;D.shift(),m.write(D.map(M)),$=B}),m.end()})}writeFile(s,h){const d={encoding:(h=h||{}).encoding||"utf8"},c=f.createWriteStream(s,d);return this.write(c,h)}async writeBuffer(s){const h=new n;return await this.write(h,s),h.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(t,b,g){const f=t("../utils/col-cache");class o{constructor(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,e)if(typeof e=="string"){const l=f.decodeAddress(e);this.nativeCol=l.col+n,this.nativeColOff=0,this.nativeRow=l.row+n,this.nativeRowOff=0}else e.nativeCol!==void 0?(this.nativeCol=e.nativeCol||0,this.nativeColOff=e.nativeColOff||0,this.nativeRow=e.nativeRow||0,this.nativeRowOff=e.nativeRowOff||0):e.col!==void 0?(this.col=e.col+n,this.row=e.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}b.exports=o},{"../utils/col-cache":19}],3:[function(t,b,g){const f=t("../utils/col-cache"),o=t("../utils/under-dash"),a=t("./enums"),{slideFormula:r}=t("../utils/shared-formula"),e=t("./note");class n{constructor(s,h,d){if(!s||!h)throw new Error("A Cell needs a Row");this._row=s,this._column=h,f.validateAddress(d),this._address=d,this._value=l.create(n.Types.Null,this),this.style=this._mergeStyle(s.style,h.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(s){this.style.numFmt=s}get font(){return this.style.font}set font(s){this.style.font=s}get alignment(){return this.style.alignment}set alignment(s){this.style.alignment=s}get border(){return this.style.border}set border(s){this.style.border=s}get fill(){return this.style.fill}set fill(s){this.style.fill=s}get protection(){return this.style.protection}set protection(s){this.style.protection=s}_mergeStyle(s,h,d){const c=s&&s.numFmt||h&&h.numFmt;c&&(d.numFmt=c);const p=s&&s.font||h&&h.font;p&&(d.font=p);const m=s&&s.alignment||h&&h.alignment;m&&(d.alignment=m);const S=s&&s.border||h&&h.border;S&&(d.border=S);const C=s&&s.fill||h&&h.fill;C&&(d.fill=C);const M=s&&s.protection||h&&h.protection;return M&&(d.protection=M),d}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===n.Types.Merge}merge(s,h){this._value.release(),this._value=l.create(n.Types.Merge,this,s),h||(this.style=s.style)}unmerge(){this.type===n.Types.Merge&&(this._value.release(),this._value=l.create(n.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(s){return this._value.type===n.Types.Merge&&this._value.isMergedTo(s)}get master(){return this.type===n.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===n.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(s){this.type!==n.Types.Merge?(this._value.release(),this._value=l.create(l.getType(s),this,s)):this._value.master.value=s}get note(){return this._comment&&this._comment.note}set note(s){this._comment=new e(s)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(s){this.type===n.Types.String&&(this._value=l.create(n.Types.Hyperlink,this,{text:this._value.value,hyperlink:s}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:s}=this._row;return{sheetName:s.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(s){this.names=[s]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(s){const{definedNames:h}=this.workbook;h.removeAllNames(this.fullAddress),s.forEach(d=>{h.addEx(this.fullAddress,d)})}addName(s){this.workbook.definedNames.addEx(this.fullAddress,s)}removeName(s){this.workbook.definedNames.removeEx(this.fullAddress,s)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(s){this._dataValidations.add(this.address,s)}get model(){const{model:s}=this._value;return s.style=this.style,this._comment&&(s.comment=this._comment.model),s}set model(s){if(this._value.release(),this._value=l.create(s.type,this),this._value.model=s,s.comment)switch(s.comment.type){case"note":this._comment=e.fromModel(s.comment)}s.style?this.style=s.style:this.style={}}}n.Types=a.ValueType;const l={getType:i=>i==null?n.Types.Null:i instanceof String||typeof i=="string"?n.Types.String:typeof i=="number"?n.Types.Number:typeof i=="boolean"?n.Types.Boolean:i instanceof Date?n.Types.Date:i.text&&i.hyperlink?n.Types.Hyperlink:i.formula||i.sharedFormula?n.Types.Formula:i.richText?n.Types.RichText:i.sharedString?n.Types.SharedString:i.error?n.Types.Error:n.Types.JSON,types:[{t:n.Types.Null,f:class{constructor(i){this.model={address:i.address,type:n.Types.Null}}get value(){return null}set value(i){}get type(){return n.Types.Null}get effectiveType(){return n.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:n.Types.Number,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Number,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Number}get effectiveType(){return n.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.String,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.String,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:n.Types.Date,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Date,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Date}get effectiveType(){return n.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Hyperlink,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Hyperlink,text:s?s.text:void 0,hyperlink:s?s.hyperlink:void 0},s&&s.tooltip&&(this.model.tooltip=s.tooltip)}get value(){const i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return n.Types.Hyperlink}get effectiveType(){return n.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:n.Types.Formula,f:class{constructor(i,s){this.cell=i,this.model={address:i.address,type:n.Types.Formula,shareType:s?s.shareType:void 0,ref:s?s.ref:void 0,formula:s?s.formula:void 0,sharedFormula:s?s.sharedFormula:void 0,result:s?s.result:void 0}}_copyModel(i){const s={},h=d=>{const c=i[d];c&&(s[d]=c)};return h("formula"),h("result"),h("ref"),h("shareType"),h("sharedFormula"),s}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(l.getType(i)){case n.Types.Null:case n.Types.String:case n.Types.Number:case n.Types.Date:break;case n.Types.Hyperlink:case n.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?a.FormulaType.Master:this.model.sharedFormula?a.FormulaType.Shared:a.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return n.Types.Formula}get effectiveType(){const i=this.model.result;return i==null?a.ValueType.Null:i instanceof String||typeof i=="string"?a.ValueType.String:typeof i=="number"?a.ValueType.Number:i instanceof Date?a.ValueType.Date:i.text&&i.hyperlink?a.ValueType.Hyperlink:i.formula?a.ValueType.Formula:a.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:i}=this.cell,s=i.findCell(this.model.sharedFormula);this._translatedFormula=s&&r(s.formula,s.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:n.Types.Merge,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Merge,master:s?s.address:void 0},this._master=s,s&&s.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof n?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return n.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:n.Types.JSON,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.String,value:JSON.stringify(s),rawValue:s}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return n.Types.String}get effectiveType(){return n.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:n.Types.SharedString,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.SharedString,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.SharedString}get effectiveType(){return n.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.RichText,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.String,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return n.Types.RichText}get effectiveType(){return n.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:n.Types.Boolean,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Boolean,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Boolean}get effectiveType(){return n.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:n.Types.Error,f:class{constructor(i,s){this.model={address:i.address,type:n.Types.Error,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return n.Types.Error}get effectiveType(){return n.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,s)=>(i[s.t]=s.f,i),[]),create(i,s,h){const d=this.types[i];if(!d)throw new Error("Could not create Value of type "+i);return new d(s,h)}};b.exports=n},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(t,b,g){const f=t("../utils/under-dash"),o=t("./enums"),a=t("../utils/col-cache");class r{constructor(n,l,i){this._worksheet=n,this._number=l,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return a.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(n){n?(this.key=n.key,this.width=n.width!==void 0?n.width:9,this.outlineLevel=n.outlineLevel,n.style?this.style=n.style:this.style={},this.header=n.header,this._hidden=!!n.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(n){n!==void 0?(this._header=n,this.headers.forEach((l,i)=>{this._worksheet.getCell(i+1,this.number).value=l})):this._header=void 0}get key(){return this._key}set key(n){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=n,n&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(n){this._hidden=n}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(n){this._outlineLevel=n}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(n){return this.width===n.width&&this.hidden===n.hidden&&this.outlineLevel===n.outlineLevel&&f.isEqual(this.style,n.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const n=this.style;return!n||!(n.font||n.numFmt||n.alignment||n.border||n.fill||n.protection)}get headerCount(){return this.headers.length}eachCell(n,l){const i=this.number;l||(l=n,n=null),this._worksheet.eachRow(n,(s,h)=>{l(s.getCell(i),h)})}get values(){const n=[];return this.eachCell((l,i)=>{l&&l.type!==o.ValueType.Null&&(n[i]=l.value)}),n}set values(n){if(!n)return;const l=this.number;let i=0;n.hasOwnProperty("0")&&(i=1),n.forEach((s,h)=>{this._worksheet.getCell(h+i,l).value=s})}_applyStyle(n,l){return this.style[n]=l,this.eachCell(i=>{i[n]=l}),l}get numFmt(){return this.style.numFmt}set numFmt(n){this._applyStyle("numFmt",n)}get font(){return this.style.font}set font(n){this._applyStyle("font",n)}get alignment(){return this.style.alignment}set alignment(n){this._applyStyle("alignment",n)}get protection(){return this.style.protection}set protection(n){this._applyStyle("protection",n)}get border(){return this.style.border}set border(n){this._applyStyle("border",n)}get fill(){return this.style.fill}set fill(n){this._applyStyle("fill",n)}static toModel(n){const l=[];let i=null;return n&&n.forEach((s,h)=>{s.isDefault?i&&(i=null):i&&s.equivalentTo(i)?i.max=h+1:(i={min:h+1,max:h+1,width:s.width!==void 0?s.width:9,style:s.style,isCustomWidth:s.isCustomWidth,hidden:s.hidden,outlineLevel:s.outlineLevel,collapsed:s.collapsed},l.push(i))}),l.length?l:void 0}static fromModel(n,l){const i=[];let s=1,h=0;for(l=(l=l||[]).sort(function(d,c){return d.min-c.min});h<l.length;){const d=l[h++];for(;s<d.min;)i.push(new r(n,s++));for(;s<=d.max;)i.push(new r(n,s++,d))}return i.length?i:null}}b.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(t,b,g){b.exports=class{constructor(f){this.model=f||{}}add(f,o){return this.model[f]=o}find(f){return this.model[f]}remove(f){this.model[f]=void 0}}},{}],6:[function(t,b,g){const f=t("../utils/under-dash"),o=t("../utils/col-cache"),a=t("../utils/cell-matrix"),r=t("./range"),e=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;b.exports=class{constructor(){this.matrixMap={}}getMatrix(n){return this.matrixMap[n]||(this.matrixMap[n]=new a)}add(n,l){const i=o.decodeEx(n);this.addEx(i,l)}addEx(n,l){const i=this.getMatrix(l);if(n.top)for(let s=n.left;s<=n.right;s++)for(let h=n.top;h<=n.bottom;h++){const d={sheetName:n.sheetName,address:o.n2l(s)+h,row:h,col:s};i.addCellEx(d)}else i.addCellEx(n)}remove(n,l){const i=o.decodeEx(n);this.removeEx(i,l)}removeEx(n,l){this.getMatrix(l).removeCellEx(n)}removeAllNames(n){f.each(this.matrixMap,l=>{l.removeCellEx(n)})}forEach(n){f.each(this.matrixMap,(l,i)=>{l.forEach(s=>{n(i,s)})})}getNames(n){return this.getNamesEx(o.decodeEx(n))}getNamesEx(n){return f.map(this.matrixMap,(l,i)=>l.findCellEx(n)&&i).filter(Boolean)}_explore(n,l){l.mark=!1;const{sheetName:i}=l,s=new r(l.row,l.col,l.row,l.col,i);let h,d;function c(m,S){const C=n.findCellAt(i,m,l.col);return!(!C||!C.mark)&&(s[S]=m,C.mark=!1,!0)}for(d=l.row-1;c(d,"top");d--);for(d=l.row+1;c(d,"bottom");d++);function p(m,S){const C=[];for(d=s.top;d<=s.bottom;d++){const M=n.findCellAt(i,d,m);if(!M||!M.mark)return!1;C.push(M)}s[S]=m;for(let M=0;M<C.length;M++)C[M].mark=!1;return!0}for(h=l.col-1;p(h,"left");h--);for(h=l.col+1;p(h,"right");h++);return s}getRanges(n,l){return(l=l||this.matrixMap[n])?(l.forEach(i=>{i.mark=!0}),{name:n,ranges:l.map(i=>i.mark&&this._explore(l,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:n,ranges:[]}}normaliseMatrix(n,l){n.forEachInSheet(l,(i,s,h)=>{i&&(i.row===s&&i.col===h||(i.row=s,i.col=h,i.address=o.n2l(h)+s))})}spliceRows(n,l,i,s){f.each(this.matrixMap,h=>{h.spliceRows(n,l,i,s),this.normaliseMatrix(h,n)})}spliceColumns(n,l,i,s){f.each(this.matrixMap,h=>{h.spliceColumns(n,l,i,s),this.normaliseMatrix(h,n)})}get model(){return f.map(this.matrixMap,(n,l)=>this.getRanges(l,n)).filter(n=>n.ranges.length)}set model(n){const l=this.matrixMap={};n.forEach(i=>{const s=l[i.name]=new a;i.ranges.forEach(h=>{e.test(h.split("!").pop()||"")&&s.addCell(h)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(t,b,g){b.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(t,b,g){const f=t("../utils/col-cache"),o=t("./anchor");b.exports=class{constructor(a,r){this.worksheet=a,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(a){let{type:r,imageId:e,range:n,hyperlinks:l}=a;if(this.type=r,this.imageId=e,r==="image")if(typeof n=="string"){const i=f.decode(n);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,n.tl,0),br:n.br&&new o(this.worksheet,n.br,0),ext:n.ext,editAs:n.editAs,hyperlinks:l||n.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(t,b,g){const f=t("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;switch(typeof this.note){case"string":r={type:"note",note:{texts:[{text:this.note}]}};break;default:r={type:"note",note:this.note}}return f.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){const{note:e}=r,{texts:n}=e;n.length===1&&Object.keys(n[0]).length===1?this.note=n[0].text:this.note=e}static fromModel(r){const e=new o;return e.model=r,e}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},b.exports=o},{"../utils/under-dash":26}],10:[function(t,b,g){const f=t("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,e,n,l,i){if(arguments.length<4){const s=f.decodeAddress(r),h=f.decodeAddress(e);this.model={top:Math.min(s.row,h.row),left:Math.min(s.col,h.col),bottom:Math.max(s.row,h.row),right:Math.max(s.col,h.col),sheetName:n},this.setTLBR(s.row,s.col,h.row,h.col,i)}else this.model={top:Math.min(r,n),left:Math.min(e,l),bottom:Math.max(r,n),right:Math.max(e,l),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{const e=r[0];if(e instanceof o)this.model={top:e.model.top,left:e.model.left,bottom:e.model.bottom,right:e.model.right,sheetName:e.sheetName};else if(e instanceof Array)this.decode(e);else if(e.top&&e.left&&e.bottom&&e.right)this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName};else{const n=f.decodeEx(e);n.top?this.model={top:n.top,left:n.left,bottom:n.bottom,right:n.right,sheetName:n.sheetName}:this.model={top:n.row,left:n.col,bottom:n.row,right:n.col,sheetName:n.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){const{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,e,n,l){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||e<this.left)&&(this.left=e),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||l>this.right)&&(this.right=l)}expandRow(r){if(r){const{dimensions:e,number:n}=r;e&&this.expand(n,e.min,n,e.max)}}expandToAddress(r){const e=f.decodeEx(r);this.expand(e.row,e.col,e.row,e.col)}get tl(){return f.n2l(this.left)+this.top}get $t$l(){return`$${f.n2l(this.left)}$${this.top}`}get br(){return f.n2l(this.right)+this.bottom}get $b$r(){return`$${f.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){const e=f.decodeEx(r);return this.containsEx(e)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let e=this.left;e<=this.right;e++)for(let n=this.top;n<=this.bottom;n++)r(f.encodeAddress(n,e),n,e)}}b.exports=o},{"../utils/col-cache":19}],11:[function(t,b,g){const f=t("../utils/under-dash"),o=t("./enums"),a=t("../utils/col-cache"),r=t("./cell");b.exports=class{constructor(e,n){this._worksheet=e,this._number=n,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(e){return this._cells[e-1]}getCellEx(e){let n=this._cells[e.col-1];if(!n){const l=this._worksheet.getColumn(e.col);n=new r(this,l,e.address),this._cells[e.col-1]=n}return n}getCell(e){if(typeof e=="string"){const n=this._worksheet.getColumnKey(e);e=n?n.number:a.l2n(e)}return this._cells[e-1]||this.getCellEx({address:a.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,n){const l=e+n;for(var i=arguments.length,s=new Array(i>2?i-2:0),h=2;h<i;h++)s[h-2]=arguments[h];const d=s.length-n,c=this._cells.length;let p,m,S;if(d<0)for(p=e+s.length;p<=c;p++)S=this._cells[p-1],m=this._cells[p-d-1],m?(S=this.getCell(p),S.value=m.value,S.style=m.style,S._comment=m._comment):S&&(S.value=null,S.style={},S._comment=void 0);else if(d>0)for(p=c;p>=l;p--)m=this._cells[p-1],m?(S=this.getCell(p+d),S.value=m.value,S.style=m.style,S._comment=m._comment):this._cells[p+d-1]=void 0;for(p=0;p<s.length;p++)S=this.getCell(e+p),S.value=s[p],S.style={},S._comment=void 0}eachCell(e,n){if(n||(n=e,e=null),e&&e.includeEmpty){const l=this._cells.length;for(let i=1;i<=l;i++)n(this.getCell(i),i)}else this._cells.forEach((l,i)=>{l&&l.type!==o.ValueType.Null&&n(l,i+1)})}addPageBreak(e,n){const l=this._worksheet,i=Math.max(0,e-1)||0,s=Math.max(0,n-1)||16838,h={id:this._number,max:s,man:1};i&&(h.min=i),l.rowBreaks.push(h)}get values(){const e=[];return this._cells.forEach(n=>{n&&n.type!==o.ValueType.Null&&(e[n.col]=n.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let n=0;e.hasOwnProperty("0")&&(n=1),e.forEach((l,i)=>{l!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,i+n),row:this._number,col:i+n}).value=l)})}else this._worksheet.eachColumnKey((n,l)=>{e[l]!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,n.number),row:this._number,col:n.number}).value=e[l])})}get hasValues(){return f.some(this._cells,e=>e&&e.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,n=0;return this._cells.forEach(l=>{l&&l.type!==o.ValueType.Null&&((!e||e>l.col)&&(e=l.col),n<l.col&&(n=l.col))}),e>0?{min:e,max:n}:null}_applyStyle(e,n){return this.style[e]=n,this._cells.forEach(l=>{l&&(l[e]=n)}),n}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const e=[];let n=0,l=0;return this._cells.forEach(i=>{if(i){const s=i.model;s&&((!n||n>i.col)&&(n=i.col),l<i.col&&(l=i.col),e.push(s))}}),this.height||e.length?{cells:e,number:this.number,min:n,max:l,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(e){if(e.number!==this._number)throw new Error("Invalid row number in model");let n;this._cells=[],e.cells.forEach(l=>{switch(l.type){case r.Types.Merge:break;default:{let i;if(l.address)i=a.decodeAddress(l.address);else if(n){const{row:s}=n,h=n.col+1;i={row:s,col:h,address:a.encodeAddress(s,h),$col$row:`$${a.n2l(h)}$${s}`}}n=i,this.getCellEx(i).model=l;break}}}),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(t,b,g){const f=t("../utils/col-cache");class o{constructor(r,e,n){this.table=r,this.column=e,this.index=n}_set(r,e){this.table.cacheState(),this.column[r]=e}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}b.exports=class{constructor(a,r){this.worksheet=a,r&&(this.table=r,this.validate(),this.store())}getFormula(a){switch(a.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${a.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${a.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${a.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${a.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${a.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${a.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${a.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${a.name}])`;case"custom":return a.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+a.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:a}=this,r=(d,c,p)=>{d[c]===void 0&&(d[c]=p)};r(a,"headerRow",!0),r(a,"totalsRow",!1),r(a,"style",{}),r(a.style,"theme","TableStyleMedium2"),r(a.style,"showFirstColumn",!1),r(a.style,"showLastColumn",!1),r(a.style,"showRowStripes",!1),r(a.style,"showColumnStripes",!1);const e=(d,c)=>{if(!d)throw new Error(c)};e(a.ref,"Table must have ref"),e(a.columns,"Table must have column definitions"),e(a.rows,"Table must have row definitions"),a.tl=f.decodeAddress(a.ref);const{row:n,col:l}=a.tl;e(n>0,"Table must be on valid row"),e(l>0,"Table must be on valid col");const{width:i,filterHeight:s,tableHeight:h}=this;a.autoFilterRef=f.encode(n,l,n+s-1,l+i-1),a.tableRef=f.encode(n,l,n+h-1,l+i-1),a.columns.forEach((d,c)=>{e(d.name,`Column ${c} must have a name`),c===0?r(d,"totalsRowLabel","Total"):(r(d,"totalsRowFunction","none"),d.totalsRowFormula=this.getFormula(d))})}store(){const a=(s,h)=>{h&&Object.keys(h).forEach(d=>{s[d]=h[d]})},{worksheet:r,table:e}=this,{row:n,col:l}=e.tl;let i=0;if(e.headerRow){const s=r.getRow(n+i++);e.columns.forEach((h,d)=>{const{style:c,name:p}=h,m=s.getCell(l+d);m.value=p,a(m,c)})}if(e.rows.forEach(s=>{const h=r.getRow(n+i++);s.forEach((d,c)=>{const p=h.getCell(l+c);p.value=d,a(p,e.columns[c].style)})}),e.totalsRow){const s=r.getRow(n+i++);e.columns.forEach((h,d)=>{const c=s.getCell(l+d);if(d===0)c.value=h.totalsRowLabel;else{const p=this.getFormula(h);c.value=p?{formula:h.totalsRowFormula,result:h.totalsRowResult}:null}a(c,h.style)})}}load(a){const{table:r}=this,{row:e,col:n}=r.tl;let l=0;if(r.headerRow){const i=a.getRow(e+l++);r.columns.forEach((s,h)=>{i.getCell(n+h).value=s.name})}if(r.rows.forEach(i=>{const s=a.getRow(e+l++);i.forEach((h,d)=>{s.getCell(n+d).value=h})}),r.totalsRow){const i=a.getRow(e+l++);r.columns.forEach((s,h)=>{const d=i.getCell(n+h);h===0?d.value=s.totalsRowLabel:this.getFormula(s)&&(d.value={formula:s.totalsRowFormula,result:s.totalsRowResult})})}}get model(){return this.table}set model(a){this.table=a}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const a=f.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){const e=this.worksheet.getRow(a.row+r);for(let n=0;n<this._cache.width;n++)e.getCell(a.col+n).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){const e=this.worksheet.getRow(a.row+r);for(let n=0;n<this._cache.width;n++)e.getCell(a.col+n).value=null}for(let r=0;r<this.tableHeight;r++){const e=this.worksheet.getRow(a.row+r);for(let n=this.width;n<this._cache.width;n++)e.getCell(a.col+n).value=null}}this.store()}addRow(a,r){this.cacheState(),r===void 0?this.table.rows.push(a):this.table.rows.splice(r,0,a)}removeRows(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(a,r)}getColumn(a){const r=this.table.columns[a];return new o(this,r,a)}addColumn(a,r,e){this.cacheState(),e===void 0?(this.table.columns.push(a),this.table.rows.forEach((n,l)=>{n.push(r[l])})):(this.table.columns.splice(e,0,a),this.table.rows.forEach((n,l)=>{n.splice(e,0,r[l])}))}removeColumns(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(a,r),this.table.rows.forEach(e=>{e.splice(a,r)})}_assign(a,r,e){this.cacheState(),a[r]=e}get ref(){return this.table.ref}set ref(a){this._assign(this.table,"ref",a)}get name(){return this.table.name}set name(a){this.table.name=a}get displayName(){return this.table.displyName||this.table.name}set displayNamename(a){this.table.displayName=a}get headerRow(){return this.table.headerRow}set headerRow(a){this._assign(this.table,"headerRow",a)}get totalsRow(){return this.table.totalsRow}set totalsRow(a){this._assign(this.table,"totalsRow",a)}get theme(){return this.table.style.name}set theme(a){this.table.style.name=a}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(a){this.table.style.showFirstColumn=a}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(a){this.table.style.showLastColumn=a}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(a){this.table.style.showRowStripes=a}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(a){this.table.style.showColumnStripes=a}}},{"../utils/col-cache":19}],13:[function(t,b,g){const f=t("./worksheet"),o=t("./defined-names"),a=t("../xlsx/xlsx"),r=t("../csv/csv");b.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}addWorksheet(e,n){const l=this.nextId;n&&(typeof n=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),n={properties:{tabColor:{argb:n}}}):(n.argb||n.theme||n.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),n={properties:{tabColor:n}}));const i=this._worksheets.reduce((d,c)=>(c&&c.orderNo)>d?c.orderNo:d,0),s=Object.assign({},n,{id:l,name:e,orderNo:i+1,workbook:this}),h=new f(s);return this._worksheets[l]=h,h}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){const n=this.getWorksheet(e);n&&n.destroy()}getWorksheet(e){return e===void 0?this._worksheets.find(Boolean):typeof e=="number"?this._worksheets[e]:typeof e=="string"?this._worksheets.find(n=>n&&n.name===e):void 0}get worksheets(){return this._worksheets.slice(1).sort((e,n)=>e.orderNo-n.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(n=>{e(n,n.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){const n=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),n}getImage(e){return this.media[e]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(e=>e.model),sheets:this.worksheets.map(e=>e.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(e){this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach(n=>{const{id:l,name:i,state:s}=n,h=e.sheets&&e.sheets.findIndex(d=>d.id===l);(this._worksheets[l]=new f({id:l,name:i,orderNo:h,state:s,workbook:this})).model=n}),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(t,b,g){const f=t("../utils/under-dash"),o=t("../utils/col-cache"),a=t("./range"),r=t("./row"),e=t("./column"),n=t("./enums"),l=t("./image"),i=t("./table"),s=t("./data-validations"),h=t("../utils/encryptor"),{copyStyle:d}=t("../utils/copy-style");b.exports=class{constructor(c){c=c||{},this._workbook=c.workbook,this.id=c.id,this.orderNo=c.orderNo,this.name=c.name,this.state=c.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},c.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!c.pageSetup||!c.pageSetup.fitToWidth&&!c.pageSetup.fitToHeight||c.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},c.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},c.headerFooter),this.dataValidations=new s,this.views=c.views||[],this.autoFilter=c.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(c){if(c===void 0&&(c="sheet"+this.id),this._name!==c){if(typeof c!="string")throw new Error("The name has to be a string.");if(c==="")throw new Error("The name can't be empty.");if(c==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(c))throw new Error(`Worksheet name ${c} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(c))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+c);if(c&&c.length>31&&(console.warn(`Worksheet name ${c} exceeds 31 chars. This will be truncated`),c=c.substring(0,31)),this._workbook._worksheets.find(p=>p&&p.name.toLowerCase()===c.toLowerCase()))throw new Error("Worksheet name already exists: "+c);this._name=c}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const c=new a;return this._rows.forEach(p=>{if(p){const m=p.dimensions;m&&c.expand(p.number,m.min,p.number,m.max)}}),c}get columns(){return this._columns}set columns(c){this._headerRowCount=c.reduce((S,C)=>{const M=(C.header?1:C.headers&&C.headers.length)||0;return Math.max(S,M)},0);let p=1;const m=this._columns=[];c.forEach(S=>{const C=new e(this,p++,!1);m.push(C),C.defn=S})}getColumnKey(c){return this._keys[c]}setColumnKey(c,p){this._keys[c]=p}deleteColumnKey(c){delete this._keys[c]}eachColumnKey(c){f.each(this._keys,c)}getColumn(c){if(typeof c=="string"){const p=this._keys[c];if(p)return p;c=o.l2n(c)}if(this._columns||(this._columns=[]),c>this._columns.length){let p=this._columns.length+1;for(;p<=c;)this._columns.push(new e(this,p++))}return this._columns[c-1]}spliceColumns(c,p){const m=this._rows.length;for(var S=arguments.length,C=new Array(S>2?S-2:0),M=2;M<S;M++)C[M-2]=arguments[M];if(C.length>0)for(let B=0;B<m;B++){const D=[c,p];C.forEach(z=>{D.push(z[B]||null)});const U=this.getRow(B+1);U.splice.apply(U,D)}else this._rows.forEach(B=>{B&&B.splice(c,p)});const P=C.length-p,$=c+p,N=this._columns.length;if(P<0)for(let B=c+C.length;B<=N;B++)this.getColumn(B).defn=this.getColumn(B-P).defn;else if(P>0)for(let B=N;B>=$;B--)this.getColumn(B+P).defn=this.getColumn(B).defn;for(let B=c;B<c+C.length;B++)this.getColumn(B).defn=null;this.workbook.definedNames.spliceColumns(this.name,c,p,C.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let c=0;return this.eachRow(p=>{c=Math.max(c,p.cellCount)}),c}get actualColumnCount(){const c=[];let p=0;return this.eachRow(m=>{m.eachCell(S=>{let{col:C}=S;c[C]||(c[C]=!0,p++)})}),p}_commitRow(){}get _lastRowNumber(){const c=this._rows;let p=c.length;for(;p>0&&c[p-1]===void 0;)p--;return p}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(c){return this._rows[c-1]}findRows(c,p){return this._rows.slice(c-1,c-1+p)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let c=0;return this.eachRow(()=>{c++}),c}getRow(c){let p=this._rows[c-1];return p||(p=this._rows[c-1]=new r(this,c)),p}getRows(c,p){if(p<1)return;const m=[];for(let S=c;S<c+p;S++)m.push(this.getRow(S));return m}addRow(c){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const m=this._nextRow,S=this.getRow(m);return S.values=c,this._setStyleOption(m,p[0]==="i"?p:"n"),S}addRows(c){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const m=[];return c.forEach(S=>{m.push(this.addRow(S,p))}),m}insertRow(c,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(c,0,p),this._setStyleOption(c,m),this.getRow(c)}insertRows(c,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(c,0,...p),m!=="n")for(let S=0;S<p.length;S++)m[0]==="o"&&this.findRow(p.length+c+S)!==void 0?this._copyStyle(p.length+c+S,c+S,m[1]==="+"):m[0]==="i"&&this.findRow(c-1)!==void 0&&this._copyStyle(c-1,c+S,m[1]==="+");return this.getRows(c,p.length)}_setStyleOption(c){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";p[0]==="o"&&this.findRow(c+1)!==void 0?this._copyStyle(c+1,c,p[1]==="+"):p[0]==="i"&&this.findRow(c-1)!==void 0&&this._copyStyle(c-1,c,p[1]==="+")}_copyStyle(c,p){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this.getRow(c),C=this.getRow(p);C.style=d(S.style),S.eachCell({includeEmpty:m},(M,P)=>{C.getCell(P).style=d(M.style)}),C.height=S.height}duplicateRow(c,p){let m=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const S=this._rows[c-1],C=new Array(p).fill(S.values);this.spliceRows(c+1,m?0:p,...C);for(let M=0;M<p;M++){const P=this._rows[c+M];P.style=S.style,P.height=S.height,S.eachCell({includeEmpty:!0},($,N)=>{P.getCell(N).style=$.style})}}spliceRows(c,p){const m=c+p;for(var S=arguments.length,C=new Array(S>2?S-2:0),M=2;M<S;M++)C[M-2]=arguments[M];const P=C.length,$=P-p,N=this._rows.length;let B,D;if($<0)for(c===N&&(this._rows[N-1]=void 0),B=m;B<=N;B++)if(D=this._rows[B-1],D){const U=this.getRow(B+$);U.values=D.values,U.style=D.style,U.height=D.height,D.eachCell({includeEmpty:!0},(z,E)=>{U.getCell(E).style=z.style}),this._rows[B-1]=void 0}else this._rows[B+$-1]=void 0;else if($>0)for(B=N;B>=m;B--)if(D=this._rows[B-1],D){const U=this.getRow(B+$);U.values=D.values,U.style=D.style,U.height=D.height,D.eachCell({includeEmpty:!0},(z,E)=>{if(U.getCell(E).style=z.style,z._value.constructor.name==="MergeValue"){const O=this.getRow(z._row._number+P).getCell(E),x=z._value._master,y=this.getRow(x._row._number+P).getCell(x._column._number);O.merge(y)}})}else this._rows[B+$-1]=void 0;for(B=0;B<P;B++){const U=this.getRow(c+B);U.style={},U.values=C[B]}this.workbook.definedNames.spliceRows(this.name,c,p,P)}eachRow(c,p){if(p||(p=c,c=void 0),c&&c.includeEmpty){const m=this._rows.length;for(let S=1;S<=m;S++)p(this.getRow(S),S)}else this._rows.forEach(m=>{m&&m.hasValues&&p(m,m.number)})}getSheetValues(){const c=[];return this._rows.forEach(p=>{p&&(c[p.number]=p.values)}),c}findCell(c,p){const m=o.getAddress(c,p),S=this._rows[m.row-1];return S?S.findCell(m.col):void 0}getCell(c,p){const m=o.getAddress(c,p);return this.getRow(m.row).getCellEx(m)}mergeCells(){for(var c=arguments.length,p=new Array(c),m=0;m<c;m++)p[m]=arguments[m];const S=new a(p);this._mergeCellsInternal(S)}mergeCellsWithoutStyle(){for(var c=arguments.length,p=new Array(c),m=0;m<c;m++)p[m]=arguments[m];const S=new a(p);this._mergeCellsInternal(S,!0)}_mergeCellsInternal(c,p){f.each(this._merges,S=>{if(S.intersects(c))throw new Error("Cannot merge already merged cells")});const m=this.getCell(c.top,c.left);for(let S=c.top;S<=c.bottom;S++)for(let C=c.left;C<=c.right;C++)(S>c.top||C>c.left)&&this.getCell(S,C).merge(m,p);this._merges[m.address]=c}_unMergeMaster(c){const p=this._merges[c.address];if(p){for(let m=p.top;m<=p.bottom;m++)for(let S=p.left;S<=p.right;S++)this.getCell(m,S).unmerge();delete this._merges[c.address]}}get hasMerges(){return f.some(this._merges,Boolean)}unMergeCells(){for(var c=arguments.length,p=new Array(c),m=0;m<c;m++)p[m]=arguments[m];const S=new a(p);for(let C=S.top;C<=S.bottom;C++)for(let M=S.left;M<=S.right;M++){const P=this.findCell(C,M);P&&(P.type===n.ValueType.Merge?this._unMergeMaster(P.master):this._merges[P.address]&&this._unMergeMaster(P))}}fillFormula(c,p,m){let S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const C=o.decode(c),{top:M,left:P,bottom:$,right:N}=C,B=N-P+1,D=o.encodeAddress(M,P),U=S==="shared";let z;z=typeof m=="function"?m:Array.isArray(m)?Array.isArray(m[0])?(O,x)=>m[O-M][x-P]:(O,x)=>m[(O-M)*B+(x-P)]:()=>{};let E=!0;for(let O=M;O<=$;O++)for(let x=P;x<=N;x++)E?(this.getCell(O,x).value={shareType:S,formula:p,ref:c,result:z(O,x)},E=!1):this.getCell(O,x).value=U?{sharedFormula:D,result:z(O,x)}:z(O,x)}addImage(c,p){const m={type:"image",imageId:c,range:p};this._media.push(new l(this,m))}getImages(){return this._media.filter(c=>c.type==="image")}addBackgroundImage(c){const p={type:"background",imageId:c};this._media.push(new l(this,p))}getBackgroundImageId(){const c=this._media.find(p=>p.type==="background");return c&&c.imageId}protect(c,p){return new Promise(m=>{this.sheetProtection={sheet:!0},p&&"spinCount"in p&&(p.spinCount=Number.isFinite(p.spinCount)?Math.round(Math.max(0,p.spinCount)):1e5),c&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=h.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=p&&"spinCount"in p?p.spinCount:1e5,this.sheetProtection.hashValue=h.convertPasswordToHash(c,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),p&&(this.sheetProtection=Object.assign(this.sheetProtection,p),!c&&"spinCount"in p&&delete this.sheetProtection.spinCount),m()})}unprotect(){this.sheetProtection=null}addTable(c){const p=new i(this,c);return this.tables[c.name]=p,p}getTable(c){return this.tables[c]}removeTable(c){delete this.tables[c]}getTables(){return Object.values(this.tables)}addConditionalFormatting(c){this.conditionalFormattings.push(c)}removeConditionalFormatting(c){typeof c=="number"?this.conditionalFormattings.splice(c,1):this.conditionalFormattings=c instanceof Function?this.conditionalFormattings.filter(c):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(c){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=c}get model(){const c={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(S=>S.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(S=>S.model),conditionalFormattings:this.conditionalFormattings};c.cols=e.toModel(this.columns);const p=c.rows=[],m=c.dimensions=new a;return this._rows.forEach(S=>{const C=S&&S.model;C&&(m.expand(C.number,C.min,C.number,C.max),p.push(C))}),c.merges=[],f.each(this._merges,S=>{c.merges.push(S.range)}),c}_parseRows(c){this._rows=[],c.rows.forEach(p=>{const m=new r(this,p.number);this._rows[m.number-1]=m,m.model=p})}_parseMergeCells(c){f.each(c.mergeCells,p=>{this.mergeCellsWithoutStyle(p)})}set model(c){this.name=c.name,this._columns=e.fromModel(this,c.cols),this._parseRows(c),this._parseMergeCells(c),this.dataValidations=new s(c.dataValidations),this.properties=c.properties,this.pageSetup=c.pageSetup,this.headerFooter=c.headerFooter,this.views=c.views,this.autoFilter=c.autoFilter,this._media=c.media.map(p=>new l(this,p)),this.sheetProtection=c.sheetProtection,this.tables=c.tables.reduce((p,m)=>{const S=new i;return S.model=m,p[m.name]=S,p},{}),this.conditionalFormattings=c.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(t,b,g){t("core-js/modules/es.promise"),t("core-js/modules/es.promise.finally"),t("core-js/modules/es.object.assign"),t("core-js/modules/es.object.keys"),t("core-js/modules/es.object.values"),t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.async-iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.includes"),t("core-js/modules/es.array.find-index"),t("core-js/modules/es.array.find"),t("core-js/modules/es.string.from-code-point"),t("core-js/modules/es.string.includes"),t("core-js/modules/es.number.is-nan"),t("regenerator-runtime/runtime");const f={Workbook:t("./doc/workbook")},o=t("./doc/enums");Object.keys(o).forEach(a=>{f[a]=o[a]}),b.exports=f},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(t,b,g){const f=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");g.bufferToString=function(o){return typeof o=="string"?o:f?f.decode(o):o.toString()}},{}],17:[function(t,b,g){const f=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=t("buffer");g.stringToBuffer=function(a){return typeof a!="string"?a:f?o.from(f.encode(a).buffer):o.from(a)}},{buffer:220}],18:[function(t,b,g){const f=t("./under-dash"),o=t("./col-cache");b.exports=class{constructor(a){this.template=a,this.sheets={}}addCell(a){this.addCellEx(o.decodeEx(a))}getCell(a){return this.findCellEx(o.decodeEx(a),!0)}findCell(a){return this.findCellEx(o.decodeEx(a),!1)}findCellAt(a,r,e){const n=this.sheets[a],l=n&&n[r];return l&&l[e]}addCellEx(a){if(a.top)for(let r=a.top;r<=a.bottom;r++)for(let e=a.left;e<=a.right;e++)this.getCellAt(a.sheetName,r,e);else this.findCellEx(a,!0)}getCellEx(a){return this.findCellEx(a,!0)}findCellEx(a,r){const e=this.findSheet(a,r),n=this.findSheetRow(e,a,r);return this.findRowCell(n,a,r)}getCellAt(a,r,e){const n=this.sheets[a]||(this.sheets[a]=[]),l=n[r]||(n[r]=[]);return l[e]||(l[e]={sheetName:a,address:o.n2l(e)+r,row:r,col:e})}removeCellEx(a){const r=this.findSheet(a);if(!r)return;const e=this.findSheetRow(r,a);e&&delete e[a.col]}forEachInSheet(a,r){const e=this.sheets[a];e&&e.forEach((n,l)=>{n&&n.forEach((i,s)=>{i&&r(i,l,s)})})}forEach(a){f.each(this.sheets,(r,e)=>{this.forEachInSheet(e,a)})}map(a){const r=[];return this.forEach(e=>{r.push(a(e))}),r}findSheet(a,r){const e=a.sheetName;return this.sheets[e]?this.sheets[e]:r?this.sheets[e]=[]:void 0}findSheetRow(a,r,e){const{row:n}=r;return a&&a[n]?a[n]:e?a[n]=[]:void 0}findRowCell(a,r,e){const{col:n}=r;return a&&a[n]?a[n]:e?a[n]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(a,r,e,n){const l=this.sheets[a];if(l){const i=[];for(let s=0;s<n;s++)i.push([]);l.splice(r,e,...i)}}spliceColumns(a,r,e,n){const l=this.sheets[a];if(l){const i=[];for(let s=0;s<n;s++)i.push(null);f.each(l,s=>{s.splice(r,e,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(t,b,g){const f=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:a=>a<=26?1:a<=676?2:3,_fill(a){let r,e,n,l,i,s=1;if(a>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&a>=1){for(;s<=26;)r=this._dictionary[s-1],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=1}if(this._l2nFill<2&&a>=2){for(s=27;s<=702;)e=s-27,n=e%26,l=Math.floor(e/26),r=this._dictionary[l]+this._dictionary[n],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=2}if(this._l2nFill<3&&a>=3){for(s=703;s<=16384;)e=s-703,n=e%26,l=Math.floor(e/26)%26,i=Math.floor(e/676),r=this._dictionary[i]+this._dictionary[l]+this._dictionary[n],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=3}},l2n(a){if(this._l2n[a]||this._fill(a.length),!this._l2n[a])throw new Error("Out of bounds. Invalid column letter: "+a);return this._l2n[a]},n2l(a){if(a<1||a>16384)throw new Error(a+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[a]||this._fill(this._level(a)),this._n2l[a]},_hash:{},validateAddress(a){if(!f.test(a))throw new Error("Invalid Address: "+a);return!0},decodeAddress(a){const r=a.length<5&&this._hash[a];if(r)return r;let e=!1,n="",l=0,i=!1,s="",h=0;for(let c,p=0;p<a.length;p++)if(c=a.charCodeAt(p),!i&&c>=65&&c<=90)e=!0,n+=a[p],l=26*l+c-64;else if(c>=48&&c<=57)i=!0,s+=a[p],h=10*h+c-48;else if(i&&e&&c!==36)break;if(e){if(l>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else l=void 0;i||(h=void 0);const d={address:a=n+s,col:l,row:h,$col$row:`$${n}$${s}`};return l<=100&&h<=100&&(this._hash[a]=d,this._hash[d.$col$row]=d),d},getAddress(a,r){if(r){const e=this.n2l(r)+a;return this.decodeAddress(e)}return this.decodeAddress(a)},decode(a){const r=a.split(":");if(r.length===2){const e=this.decodeAddress(r[0]),n=this.decodeAddress(r[1]),l={top:Math.min(e.row,n.row),left:Math.min(e.col,n.col),bottom:Math.max(e.row,n.row),right:Math.max(e.col,n.col)};return l.tl=this.n2l(l.left)+l.top,l.br=this.n2l(l.right)+l.bottom,l.dimensions=`${l.tl}:${l.br}`,l}return this.decodeAddress(a)},decodeEx(a){const r=a.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),e=r[1]||r[2],n=r[3],l=n.split(":");if(l.length>1){let s=this.decodeAddress(l[0]),h=this.decodeAddress(l[1]);const d=Math.min(s.row,h.row),c=Math.min(s.col,h.col),p=Math.max(s.row,h.row),m=Math.max(s.col,h.col);return s=this.n2l(c)+d,h=this.n2l(m)+p,{top:d,left:c,bottom:p,right:m,sheetName:e,tl:{address:s,col:c,row:d,$col$row:`$${this.n2l(c)}$${d}`,sheetName:e},br:{address:h,col:m,row:p,$col$row:`$${this.n2l(m)}$${p}`,sheetName:e},dimensions:`${s}:${h}`}}if(n.startsWith("#"))return e?{sheetName:e,error:n}:{error:n};const i=this.decodeAddress(n);return e?{sheetName:e,...i}:i},encodeAddress:(a,r)=>o.n2l(r)+a,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(a,r){const[e,n,,l,i]=a,[s,h]=r;return s>=e&&s<=l&&h>=n&&h<=i}};b.exports=o},{}],20:[function(t,b,g){const f=(a,r)=>({...a,...r.reduce((e,n)=>(a[n]&&(e[n]={...a[n]}),e),{})}),o=function(a,r,e){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];a[e]&&(r[e]=f(a[e],n))};g.copyStyle=a=>{if(!a)return a;if(r=a,Object.keys(r).length===0)return{};var r;const e={...a};return o(a,e,"font",["color"]),o(a,e,"alignment"),o(a,e,"protection"),a.border&&(o(a,e,"border"),o(a.border,e.border,"top",["color"]),o(a.border,e.border,"left",["color"]),o(a.border,e.border,"bottom",["color"]),o(a.border,e.border,"right",["color"]),o(a.border,e.border,"diagonal",["color"])),a.fill&&(o(a,e,"fill",["fgColor","bgColor","center"]),a.fill.stops&&(e.fill.stops=a.fill.stops.map(n=>f(n,["color"])))),e}},{}],21:[function(t,b,g){(function(f){(function(){const o=t("crypto"),a={hash(r){const e=o.createHash(r);for(var n=arguments.length,l=new Array(n>1?n-1:0),i=1;i<n;i++)l[i-1]=arguments[i];return e.update(f.concat(l)),e.digest()},convertPasswordToHash(r,e,n,l){if(e=e.toLowerCase(),o.getHashes().indexOf(e)<0)throw new Error(`Hash algorithm '${e}' not supported!`);const i=f.from(r,"utf16le");let s=this.hash(e,f.from(n,"base64"),i);for(let h=0;h<l;h++){const d=f.alloc(4);d.writeUInt32LE(h,0),s=this.hash(e,s,d)}return s.toString("base64")},randomBytes:r=>o.randomBytes(r)};b.exports=a}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(t,b,g){const{SaxesParser:f}=t("saxes"),{PassThrough:o}=t("readable-stream"),{bufferToString:a}=t("./browser-buffer-decode");b.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));const e=new f;let n;e.on("error",i=>{n=i});let l=[];e.on("opentag",i=>l.push({eventType:"opentag",value:i})),e.on("text",i=>l.push({eventType:"text",value:i})),e.on("closetag",i=>l.push({eventType:"closetag",value:i}));for await(const i of r){if(e.write(a(i)),n)throw n;yield l,l=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(t,b,g){const f=t("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,a=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;b.exports={slideFormula:function(r,e,n){const l=f.decode(e),i=f.decode(n);return r.replace(o,(s,h,d,c,p)=>{if(p)return s;const m=a.exec(c);if(m){const S=m[1],C=m[2].toUpperCase(),M=m[3],P=m[4];if(C.length>3||C.length===3&&C>"XFD")return s;let $=f.l2n(C),N=parseInt(P,10);return S||($+=i.col-l.col),M||(N+=i.row-l.row),(h||"")+(S||"")+f.n2l($)+(M||"")+N}return s})}}},{"./col-cache":19}],24:[function(t,b,g){(function(f,o){(function(){const a=t("readable-stream"),r=t("./utils"),e=t("./string-buf");class n{constructor(c,p){this._data=c,this._encoding=p}get length(){return this.toBuffer().length}copy(c,p,m,S){return this.toBuffer().copy(c,p,m,S)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class l{constructor(c){this._data=c}get length(){return this._data.length}copy(c,p,m,S){return this._data._buf.copy(c,p,m,S)}toBuffer(){return this._data.toBuffer()}}class i{constructor(c){this._data=c}get length(){return this._data.length}copy(c,p,m,S){this._data.copy(c,p,m,S)}toBuffer(){return this._data}}class s{constructor(c){this.size=c,this.buffer=o.alloc(c),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const c=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(c,0,this.iRead,this.iWrite),c}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(c){let p;return c===0?null:c===void 0||c>=this.length?(p=this.toBuffer(),this.iRead=this.iWrite,p):(p=o.alloc(c),this.buffer.copy(p,0,this.iRead,c),this.iRead+=c,p)}write(c,p,m){const S=Math.min(m,this.size-this.iWrite);return c.copy(this.buffer,this.iWrite,p,p+S),this.iWrite+=S,S}}const h=function(d){d=d||{},this.bufSize=d.bufSize||1048576,this.buffers=[],this.batch=d.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(h,a.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(d=>d.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const c=this.buffers[this.buffers.length-1];if(!c.full)return c}const d=new s(this.bufSize);return this.buffers.push(d),d},async _pipe(d){await Promise.all(this.pipes.map(function(c){return new Promise(p=>{c.write(d.toBuffer(),()=>{p()})})}))},_writeToBuffers(d){let c=0;const p=d.length;for(;c<p;)c+=this._getWritableBuffer().write(d,c,p-c)},async write(d,c,p){let m;if(c instanceof Function&&(p=c,c="utf8"),p=p||r.nop,d instanceof e)m=new l(d);else if(d instanceof o)m=new i(d);else{if(!(typeof d=="string"||d instanceof String||d instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");m=new n(d,c)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(m);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(m),f.nextTick(p)):(await this._pipe(m),p());else this.paused||this.emit("data",m.toBuffer()),this._writeToBuffers(m),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(d,c,p){const m=S=>{S?p(S):(this._flush(),this.pipes.forEach(C=>{C.end()}),this.emit("finish"))};d?this.write(d,c,m):m()},read(d){let c;if(d){for(c=[];d&&this.buffers.length&&!this.buffers[0].eod;){const p=this.buffers[0],m=p.read(d);d-=m.length,c.push(m),p.eod&&p.full&&this.buffers.shift()}return o.concat(c)}return c=this.buffers.map(p=>p.toBuffer()).filter(Boolean),this.buffers=[],o.concat(c)},setEncoding(d){this.encoding=d},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(d){this.pipes.push(d),!this.paused&&this.buffers.length&&this.end()},unpipe(d){this.pipes=this.pipes.filter(c=>c!==d)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),b.exports=h}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(t,b,g){(function(f){(function(){b.exports=class{constructor(o){this._buf=f.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=f.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let a=2*this._buf.length;for(;a<o;)a*=2;const r=f.alloc(a);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let a=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;a>=this._buf.length-4;)this._grow(this._inPos+o.length),a=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=a}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220}],26:[function(t,b,g){const{toString:f}=Object.prototype,o=/["&<>]/,a={each:function(r,e){r&&(Array.isArray(r)?r.forEach(e):Object.keys(r).forEach(n=>{e(r[n],n)}))},some:function(r,e){return!!r&&(Array.isArray(r)?r.some(e):Object.keys(r).some(n=>e(r[n],n)))},every:function(r,e){return!r||(Array.isArray(r)?r.every(e):Object.keys(r).every(n=>e(r[n],n)))},map:function(r,e){return r?Array.isArray(r)?r.map(e):Object.keys(r).map(n=>e(r[n],n)):[]},keyBy:(r,e)=>r.reduce((n,l)=>(n[l[e]]=l,n),{}),isEqual:function(r,e){const n=typeof r,l=typeof e,i=Array.isArray(r),s=Array.isArray(e);let h;if(n!==l)return!1;switch(typeof r){case"object":if(i||s)return!(!i||!s)&&r.length===e.length&&r.every((d,c)=>{const p=e[c];return a.isEqual(d,p)});if(r===null||e===null)return r===e;if(h=Object.keys(r),Object.keys(e).length!==h.length)return!1;for(const d of h)if(!e.hasOwnProperty(d))return!1;return a.every(r,(d,c)=>{const p=e[c];return a.isEqual(d,p)});default:return r===e}},escapeHtml(r){const e=o.exec(r);if(!e)return r;let n="",l="",i=0,s=e.index;for(;s<r.length;s++){switch(r.charAt(s)){case'"':l=""";break;case"&":l="&";break;case"'":l="'";break;case"<":l="<";break;case">":l=">";break;default:continue}i!==s&&(n+=r.substring(i,s)),i=s+1,n+=l}return i!==s?n+r.substring(i,s):n},strcmp:(r,e)=>r<e?-1:r>e?1:0,isUndefined:r=>f.call(r)==="[object Undefined]",isObject:r=>f.call(r)==="[object Object]",deepMerge(){const r=arguments[0]||{},{length:e}=arguments;let n,l,i;function s(h,d){n=r[d],i=Array.isArray(h),a.isObject(h)||i?(i?(i=!1,l=n&&Array.isArray(n)?n:[]):l=n&&a.isObject(n)?n:{},r[d]=a.deepMerge(l,h)):a.isUndefined(h)||(r[d]=h)}for(let h=0;h<e;h++)a.each(arguments[h],s);return r}};b.exports=a},{}],27:[function(t,b,g){(function(f,o){(function(){const a=t("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,e={nop(){},promiseImmediate:n=>new Promise(l=>{f.setImmediate?o(()=>{l(n)}):setTimeout(()=>{l(n)},1)}),inherits:function(n,l,i,s){n.super_=l,s||(s=i,i=null),i&&Object.keys(i).forEach(d=>{Object.defineProperty(n,d,Object.getOwnPropertyDescriptor(i,d))});const h={constructor:{value:n,enumerable:!1,writable:!1,configurable:!0}};s&&Object.keys(s).forEach(d=>{h[d]=Object.getOwnPropertyDescriptor(s,d)}),n.prototype=Object.create(l.prototype,h)},dateToExcel:(n,l)=>25569+n.getTime()/864e5-(l?1462:0),excelToDate(n,l){const i=Math.round(24*(n-25569+(l?1462:0))*3600*1e3);return new Date(i)},parsePath(n){const l=n.lastIndexOf("/");return{path:n.substring(0,l),name:n.substring(l+1)}},getRelsPath(n){const l=e.parsePath(n);return`${l.path}/_rels/${l.name}.rels`},xmlEncode(n){const l=r.exec(n);if(!l)return n;let i="",s="",h=0,d=l.index;for(;d<n.length;d++){const c=n.charCodeAt(d);switch(c){case 34:s=""";break;case 38:s="&";break;case 39:s="'";break;case 60:s="<";break;case 62:s=">";break;case 127:s="";break;default:if(c<=31&&(c<=8||c>=11&&c!==13)){s="";break}continue}h!==d&&(i+=n.substring(h,d)),h=d+1,s&&(i+=s)}return h!==d?i+n.substring(h,d):i},xmlDecode:n=>n.replace(/&([a-z]*);/g,l=>{switch(l){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return l}}),validInt(n){const l=parseInt(n,10);return Number.isNaN(l)?0:l},isDateFmt(n){return n?(n=(n=n.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:n=>new Promise(l=>{a.access(n,a.constants.F_OK,i=>{l(!i)})})},toIsoDateString:n=>n.toIsoString().subsstr(0,10),parseBoolean:n=>n===!0||n==="true"||n===1||n==="1"};b.exports=e}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{},t("timers").setImmediate)},{fs:216,timers:523}],28:[function(t,b,g){const f=t("./under-dash"),o=t("./utils");function a(n,l,i){n.push(` ${l}="${o.xmlEncode(i.toString())}"`)}function r(n,l){if(l){const i=[];f.each(l,(s,h)=>{s!==void 0&&a(i,h,s)}),n.push(i.join(""))}}class e{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(l){const i=this._xml;i.push("<?xml"),r(i,l),i.push(`?>
|
|
13
|
+
`)}openNode(l,i){const s=this.tos,h=this._xml;s&&this.open&&h.push(">"),this._stack.push(l),h.push("<"),h.push(l),r(h,i),this.leaf=!0,this.open=!0}addAttribute(l,i){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");i!==void 0&&a(this._xml,l,i)}addAttributes(l){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r(this._xml,l)}writeText(l){const i=this._xml;this.open&&(i.push(">"),this.open=!1),this.leaf=!1,i.push(o.xmlEncode(l.toString()))}writeXml(l){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(l)}closeNode(){const l=this._stack.pop(),i=this._xml;this.leaf?i.push("/>"):(i.push("</"),i.push(l),i.push(">")),this.open=!1,this.leaf=!1}leafNode(l,i,s){this.openNode(l,i),s!==void 0&&this.writeText(s),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const l=this._rollbacks.pop();this._xml.length>l.xml&&this._xml.splice(l.xml,this._xml.length-l.xml),this._stack.length>l.stack&&this._stack.splice(l.stack,this._stack.length-l.stack),this.leaf=l.leaf,this.open=l.open}get xml(){return this.closeAll(),this._xml.join("")}}e.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},b.exports=e},{"./under-dash":26,"./utils":27}],29:[function(t,b,g){(function(f){(function(){const o=t("events"),a=t("jszip"),r=t("./stream-buf"),{stringToBuffer:e}=t("./browser-buffer-encode");class n extends o.EventEmitter{constructor(i){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},i),this.zip=new a,this.stream=new r}append(i,s){s.hasOwnProperty("base64")&&s.base64?this.zip.file(s.name,i,{base64:!0}):(f.browser&&typeof i=="string"&&(i=e(i)),this.zip.file(s.name,i))}async finalize(){const i=await this.zip.generateAsync(this.options);this.stream.end(i),this.emit("finish")}read(i){return this.stream.read(i)}setEncoding(i){return this.stream.setEncoding(i)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(i,s){return this.stream.pipe(i,s)}unpipe(i){return this.stream.unpipe(i)}unshift(i){return this.stream.unshift(i)}wrap(i){return this.stream.wrap(i)}}b.exports={ZipWriter:n}}).call(this)}).call(this,t("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(t,b,g){b.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(t,b,g){b.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(t,b,g){const f=t("../../utils/parse-sax"),o=t("../../utils/xml-stream");class a{prepare(){}render(){}parseOpen(e){}parseText(e){}parseClose(e){}reconcile(e,n){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(e=>{e instanceof a?e.reset():e.xform&&e.xform.reset()})}mergeModel(e){this.model=Object.assign(this.model||{},e)}async parse(e){for await(const n of e)for(const{eventType:l,value:i}of n)if(l==="opentag")this.parseOpen(i);else if(l==="text")this.parseText(i);else if(l==="closetag"&&!this.parseClose(i.name))return this.model;return this.model}async parseStream(e){return this.parse(f(e))}get xml(){return this.toXml(this.model)}toXml(e){const n=new o;return this.render(n,e),n.xml}static toAttribute(e,n){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e===void 0){if(l)return n}else if(l||e!==n)return e.toString()}static toStringAttribute(e,n){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(e,n,l)}static toStringValue(e,n){return e===void 0?n:e}static toBoolAttribute(e,n){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e===void 0){if(l)return n}else if(l||e!==n)return e?"1":"0"}static toBoolValue(e,n){return e===void 0?n:e==="1"}static toIntAttribute(e,n){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(e,n,l)}static toIntValue(e,n){return e===void 0?n:parseInt(e,10)}static toFloatAttribute(e,n){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(e,n,l)}static toFloatValue(e,n){return e===void 0?n:parseFloat(e)}}b.exports=a},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(t,b,g){const f=t("../base-xform"),o=t("../../../utils/col-cache");function a(e){try{return o.decodeEx(e),!0}catch{return!1}}function r(e){const n=[];let l=!1,i="";return e.split(",").forEach(s=>{if(!s)return;const h=(s.match(/'/g)||[]).length;if(!h)return void(l?i+=s+",":a(s)&&n.push(s));const d=h%2==0;!l&&d&&a(s)?n.push(s):l&&!d?(l=!1,a(i+s)&&n.push(i+s),i=""):(l=!0,i+=s+",")}),n}b.exports=class extends f{render(e,n){e.openNode("definedName",{name:n.name,localSheetId:n.localSheetId}),e.writeText(n.ranges.join(",")),e.closeNode()}parseOpen(e){switch(e.name){case"definedName":return this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(e){this._parsedText.push(e)}parseClose(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(t,b,g){const f=t("../../../utils/utils"),o=t("../base-xform");b.exports=class extends o{render(a,r){a.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(a){return a.name==="sheet"&&(this.model={name:f.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){o.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){const r={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(r.visibility=a.visibility),o.leafNode("workbookView",r)}parseOpen(o){if(o.name==="workbookView"){const a=this.model={},r=function(n,l,i){const s=l!==void 0?a[n]=l:i;s!==void 0&&(a[n]=s)},e=function(n,l,i){const s=l!==void 0?a[n]=parseInt(l,10):i;s!==void 0&&(a[n]=s)};return e("x",o.attributes.xWindow,0),e("y",o.attributes.yWindow,0),e("width",o.attributes.windowWidth,25e3),e("height",o.attributes.windowHeight,1e4),r("visibility",o.attributes.visibility,"visible"),e("activeTab",o.attributes.activeTab,void 0),e("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../../../utils/col-cache"),a=t("../../../utils/xml-stream"),r=t("../base-xform"),e=t("../static-xform"),n=t("../list-xform"),l=t("./defined-name-xform"),i=t("./sheet-xform"),s=t("./workbook-view-xform"),h=t("./workbook-properties-xform"),d=t("./workbook-calc-properties-xform");class c extends r{constructor(){super(),this.map={fileVersion:c.STATIC_XFORMS.fileVersion,workbookPr:new h,bookViews:new n({tag:"bookViews",count:!1,childXform:new s}),sheets:new n({tag:"sheets",count:!1,childXform:new i}),definedNames:new n({tag:"definedNames",count:!1,childXform:new l}),calcPr:new d}}prepare(m){m.sheets=m.worksheets;const S=[];let C=0;m.sheets.forEach(M=>{if(M.pageSetup&&M.pageSetup.printArea&&M.pageSetup.printArea.split("&&").forEach(P=>{const $=P.split(":"),N={name:"_xlnm.Print_Area",ranges:[`'${M.name}'!$${$[0]}:$${$[1]}`],localSheetId:C};S.push(N)}),M.pageSetup&&(M.pageSetup.printTitlesRow||M.pageSetup.printTitlesColumn)){const P=[];if(M.pageSetup.printTitlesColumn){const N=M.pageSetup.printTitlesColumn.split(":");P.push(`'${M.name}'!$${N[0]}:$${N[1]}`)}if(M.pageSetup.printTitlesRow){const N=M.pageSetup.printTitlesRow.split(":");P.push(`'${M.name}'!$${N[0]}:$${N[1]}`)}const $={name:"_xlnm.Print_Titles",ranges:P,localSheetId:C};S.push($)}C++}),S.length&&(m.definedNames=m.definedNames.concat(S)),(m.media||[]).forEach((M,P)=>{M.name=M.type+(P+1)})}render(m,S){m.openXml(a.StdDocAttributes),m.openNode("workbook",c.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(m),this.map.workbookPr.render(m,S.properties),this.map.bookViews.render(m,S.views),this.map.sheets.render(m,S.sheets),this.map.definedNames.render(m,S.definedNames),this.map.calcPr.render(m,S.calcProperties),m.closeNode()}parseOpen(m){if(this.parser)return this.parser.parseOpen(m),!0;switch(m.name){case"workbook":return!0;default:return this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0}}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(m){const S=(m.workbookRels||[]).reduce((N,B)=>(N[B.Id]=B,N),{}),C=[];let M,P=0;(m.sheets||[]).forEach(N=>{const B=S[N.rId];B&&(M=m.worksheetHash["xl/"+B.Target.replace(/^(\s|\/xl\/)+/,"")],M&&(M.name=N.name,M.id=N.id,M.state=N.state,C[P++]=M))});const $=[];f.each(m.definedNames,N=>{if(N.name==="_xlnm.Print_Area"){if(M=C[N.localSheetId],M){M.pageSetup||(M.pageSetup={});const B=o.decodeEx(N.ranges[0]);M.pageSetup.printArea=M.pageSetup.printArea?`${M.pageSetup.printArea}&&${B.dimensions}`:B.dimensions}}else if(N.name==="_xlnm.Print_Titles"){if(M=C[N.localSheetId],M){M.pageSetup||(M.pageSetup={});const B=N.ranges.join(","),D=/\$/g,U=/\$\d+:\$\d+/,z=B.match(U);if(z&&z.length){const x=z[0];M.pageSetup.printTitlesRow=x.replace(D,"")}const E=/\$[A-Z]+:\$[A-Z]+/,O=B.match(E);if(O&&O.length){const x=O[0];M.pageSetup.printTitlesColumn=x.replace(D,"")}}}else $.push(N)}),m.definedNames=$,m.media.forEach((N,B)=>{N.index=B})}}c.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c.STATIC_XFORMS={fileVersion:new e({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},b.exports=c},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(t,b,g){const f=t("../strings/rich-text-xform"),o=t("../../../utils/utils"),a=t("../base-xform"),r=b.exports=function(e){this.model=e};o.inherits(r,a,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new f),this._richTextXform},render(e,n){n=n||this.model,e.openNode("comment",{ref:n.ref,authorId:0}),e.openNode("text"),n&&n.note&&n.note.texts&&n.note.texts.forEach(l=>{this.richTextXform.render(e,l)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"comment":return this.model={type:"note",note:{texts:[]},...e.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../../../utils/utils"),a=t("../base-xform"),r=t("./comment-xform"),e=b.exports=function(){this.map={comment:new r}};o.inherits(e,a,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(n,l){l=l||this.model,n.openXml(f.StdDocAttributes),n.openNode("comments",e.COMMENTS_ATTRIBUTES),n.openNode("authors"),n.leafNode("author",null,"Author"),n.closeNode(),n.openNode("commentList"),l.comments.forEach(i=>{this.map.comment.render(n,i)}),n.closeNode(),n.closeNode()},parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(n),!0;default:return!1}},parseText(n){this.parser&&this.parser.parseText(n)},parseClose(n){switch(n){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a,r){(a===r[2]||this.tag==="x:SizeWithCells"&&a===r[1])&&o.leafNode(this.tag)}parseOpen(o){switch(o.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"x:Anchor"}getAnchorRect(o){const a=Math.floor(o.left),r=Math.floor(68*(o.left-a)),e=Math.floor(o.top),n=Math.floor(18*(o.top-e)),l=Math.floor(o.right),i=Math.floor(68*(o.right-l)),s=Math.floor(o.bottom);return[a,r,e,n,l,i,s,Math.floor(18*(o.bottom-s))]}getDefaultRect(o){const a=o.col,r=Math.max(o.row-2,0);return[a,6,r,14,a+2,2,r+4,16]}render(o,a){const r=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);o.leafNode("x:Anchor",null,r.join(", "))}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(t,b,g){const f=t("../base-xform"),o=t("./vml-anchor-xform"),a=t("./style/vml-protection-xform"),r=t("./style/vml-position-xform"),e=["twoCells","oneCells","absolute"];b.exports=class extends f{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new a({tag:"x:Locked"}),"x:LockText":new a({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(n,l){const{protection:i,editAs:s}=l.note;n.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(n,s,e),this.map["x:SizeWithCells"].render(n,s,e),this.map["x:Anchor"].render(n,l),this.map["x:Locked"].render(n,i.locked),n.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(n,i.lockText),n.leafNode("x:Row",null,l.refAddress.row-1),n.leafNode("x:Column",null,l.refAddress.col-1),n.closeNode()}parseOpen(n){switch(n.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const n=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),l=Object.keys(n).length;this.model.editAs=e[l],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("./vml-shape-xform");class r extends o{constructor(){super(),this.map={"v:shape":new a}}get tag(){return"xml"}render(n,l){n.openXml(f.StdDocAttributes),n.openNode(this.tag,r.DRAWING_ATTRIBUTES),n.openNode("o:shapelayout",{"v:ext":"edit"}),n.leafNode("o:idmap",{"v:ext":"edit",data:1}),n.closeNode(),n.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),n.leafNode("v:stroke",{joinstyle:"miter"}),n.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),n.closeNode(),l.comments.forEach((i,s)=>{this.map["v:shape"].render(n,i,s)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(n){case this.tag:return!1;default:return!0}}reconcile(n,l){n.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,l):this.map["xdr:oneCellAnchor"].reconcile(i,l)})}}r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},b.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(t,b,g){const f=t("../base-xform"),o=t("./vml-textbox-xform"),a=t("./vml-client-data-xform");class r extends f{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new a}}get tag(){return"v:shape"}render(n,l,i){n.openNode("v:shape",r.V_SHAPE_ATTRIBUTES(l,i)),n.leafNode("v:fill",{color2:"infoBackground [80]"}),n.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),n.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(n,l),this.map["x:ClientData"].render(n,l),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={margins:{insetmode:n.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}r.V_SHAPE_ATTRIBUTES=(e,n)=>({id:"_x0000_s"+(1025+n),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":e.note.margins&&e.note.margins.insetmode}),b.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"v:textbox"}conversionUnit(o,a,r){return`${parseFloat(o)*a.toFixed(2)}${r}`}reverseConversionUnit(o){return(o||"").split(",").map(a=>Number(parseFloat(this.conversionUnit(parseFloat(a),.1,"")).toFixed(2)))}render(o,a){const r={style:"mso-direction-alt:auto"};if(a&&a.note){let{inset:e}=a.note&&a.note.margins;Array.isArray(e)&&(e=e.map(n=>this.conversionUnit(n,10,"mm")).join(",")),e&&(r.inset=e)}o.openNode("v:textbox",r),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:return this.model={inset:this.reverseConversionUnit(o.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(t,b,g){const f=t("./base-xform");b.exports=class extends f{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,a){this.model[o]=a.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,a.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(r=>{o.leafNode("vt:lpstr",void 0,r.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("../simple/string-xform"),r=t("./app-heading-pairs-xform"),e=t("./app-titles-of-parts-xform");class n extends o{constructor(){super(),this.map={Company:new a({tag:"Company"}),Manager:new a({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new e}}render(i,s){i.openXml(f.StdDocAttributes),i.openNode("Properties",n.PROPERTY_ATTRIBUTES),i.leafNode("Application",void 0,"Microsoft Excel"),i.leafNode("DocSecurity",void 0,"0"),i.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(i,s.worksheets),this.map.TitleOfParts.render(i,s.worksheets),this.map.Company.render(i,s.company||""),this.map.Manager.render(i,s.manager),i.leafNode("LinksUpToDate",void 0,"false"),i.leafNode("SharedDoc",void 0,"false"),i.leafNode("HyperlinksChanged",void 0,"false"),i.leafNode("AppVersion",void 0,"16.0300"),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"Properties":return!0;default:return this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0)}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}n.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3,6}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},b.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform");class a extends o{render(e,n){e.openXml(f.StdDocAttributes),e.openNode("Types",a.PROPERTY_ATTRIBUTES);const l={};(n.media||[]).forEach(i=>{if(i.type==="image"){const s=i.extension;l[s]||(l[s]=!0,e.leafNode("Default",{Extension:s,ContentType:"image/"+s}))}}),e.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),e.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),e.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),n.worksheets.forEach(i=>{const s=`/xl/worksheets/sheet${i.id}.xml`;e.leafNode("Override",{PartName:s,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),e.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),e.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),n.sharedStrings&&n.sharedStrings.count&&e.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),n.tables&&n.tables.forEach(i=>{e.leafNode("Override",{PartName:"/xl/tables/"+i.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),n.drawings&&n.drawings.forEach(i=>{e.leafNode("Override",{PartName:`/xl/drawings/${i.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),n.commentRefs&&(e.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),n.commentRefs.forEach(i=>{let{commentName:s}=i;e.leafNode("Override",{PartName:`/xl/${s}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),e.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),e.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),e.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},b.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("../simple/date-xform"),r=t("../simple/string-xform"),e=t("../simple/integer-xform");class n extends o{constructor(){super(),this.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new a({tag:"cp:lastPrinted",format:n.DateFormat}),"cp:revision":new e({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new a({tag:"dcterms:created",attrs:n.DateAttrs,format:n.DateFormat}),"dcterms:modified":new a({tag:"dcterms:modified",attrs:n.DateAttrs,format:n.DateFormat})}}render(i,s){i.openXml(f.StdDocAttributes),i.openNode("cp:coreProperties",n.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(i,s.creator),this.map["dc:title"].render(i,s.title),this.map["dc:subject"].render(i,s.subject),this.map["dc:description"].render(i,s.description),this.map["dc:identifier"].render(i,s.identifier),this.map["dc:language"].render(i,s.language),this.map["cp:keywords"].render(i,s.keywords),this.map["cp:category"].render(i,s.category),this.map["cp:lastModifiedBy"].render(i,s.lastModifiedBy),this.map["cp:lastPrinted"].render(i,s.lastPrinted),this.map["cp:revision"].render(i,s.revision),this.map["cp:version"].render(i,s.version),this.map["cp:contentStatus"].render(i,s.contentStatus),this.map["cp:contentType"].render(i,s.contentType),this.map["dcterms:created"].render(i,s.created),this.map["dcterms:modified"].render(i,s.modified),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[i.name],this.parser)return this.parser.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+i)}}}n.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3}/,"")},n.DateAttrs={"xsi:type":"dcterms:W3CDTF"},n.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},b.exports=n},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{render(o,a){o.leafNode("Relationship",a)}parseOpen(o){switch(o.name){case"Relationship":return this.model=o.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("./relationship-xform");class r extends o{constructor(){super(),this.map={Relationship:new a}}render(n,l){l=l||this._values,n.openXml(f.StdDocAttributes),n.openNode("Relationships",r.RELATIONSHIPS_ATTRIBUTES),l.forEach(i=>{this.map.Relationship.render(n,i)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[n.name],this.parser)return this.parser.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(n){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+n)}}}r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},b.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,a){if(o&&o.rId){const r=a.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){const e=r[1],n=a.mediaIndex[e];return a.media[n]}}}}},{"../base-xform":32}],57:[function(t,b,g){const f=t("../base-xform"),o=t("./blip-xform");b.exports=class extends f{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(a,r){a.openNode(this.tag),this.map["a:blip"].render(a,r),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(){}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"a:blip"}render(o,a){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(t,b,g){const f=t("../base-xform"),o=t("./hlink-click-xform"),a=t("./ext-lst-xform");b.exports=class extends f{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new a}}get tag(){return"xdr:cNvPr"}render(r,e){r.openNode(this.tag,{id:e.index,name:"Picture "+e.index}),this.map["a:hlinkClick"].render(r,e),this.map["a:extLst"].render(r,e),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:this.reset();break;default:this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)}return!0}parseText(){}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(t,b,g){const f=t("../base-xform"),o=t("../simple/integer-xform");b.exports=class extends f{constructor(a){super(),this.tag=a.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(a,r){a.openNode(this.tag),this.map["xdr:col"].render(a,r.nativeCol),this.map["xdr:colOff"].render(a,r.nativeColOff),this.map["xdr:row"].render(a,r.nativeRow),this.map["xdr:rowOff"].render(a,r.nativeRowOff),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(t,b,g){const f=t("../../../utils/col-cache"),o=t("../../../utils/xml-stream"),a=t("../base-xform"),r=t("./two-cell-anchor-xform"),e=t("./one-cell-anchor-xform");class n extends a{constructor(){super(),this.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new e}}prepare(i){i.anchors.forEach((s,h)=>{s.anchorType=function(d){return(typeof d.range=="string"?f.decode(d.range):d.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(s),this.map[s.anchorType].prepare(s,{index:h})})}get tag(){return"xdr:wsDr"}render(i,s){i.openXml(o.StdDocAttributes),i.openNode(this.tag,n.DRAWING_ATTRIBUTES),s.anchors.forEach(h=>{this.map[h.anchorType].render(i,h)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(i){case this.tag:return!1;default:return!0}}reconcile(i,s){i.anchors.forEach(h=>{h.br?this.map["xdr:twoCellAnchor"].reconcile(h,s):this.map["xdr:oneCellAnchor"].reconcile(h,s)})}}n.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},b.exports=n},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,a){o.openNode(this.tag);const r=Math.floor(9525*a.width),e=Math.floor(9525*a.height);o.addAttribute("cx",r),o.addAttribute("cy",e),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"a:hlinkClick"}render(o,a){a.hyperlinks&&a.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}parseOpen(o){switch(o.name){case this.tag:return this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(t,b,g){const f=t("../base-xform"),o=t("./c-nv-pr-xform"),a=t("./c-nv-pic-pr-xform");b.exports=class extends f{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new a}}get tag(){return"xdr:nvPicPr"}render(r,e){r.openNode(this.tag),this.map["xdr:cNvPr"].render(r,e),this.map["xdr:cNvPicPr"].render(r,e),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:this.reset();break;default:this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)}return!0}parseText(){}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(t,b,g){const f=t("./base-cell-anchor-xform"),o=t("../static-xform"),a=t("./cell-position-xform"),r=t("./ext-xform"),e=t("./pic-xform");b.exports=class extends f{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new e,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(n,l){this.map["xdr:pic"].prepare(n.picture,l)}render(n,l){n.openNode(this.tag,{editAs:l.range.editAs||"oneCell"}),this.map["xdr:from"].render(n,l.range.tl),this.map["xdr:ext"].render(n,l.range.ext),this.map["xdr:pic"].render(n,l.picture),this.map["xdr:clientData"].render(n,{}),n.closeNode()}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(n,l){n.medium=this.reconcilePicture(n.picture,l)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(t,b,g){const f=t("../base-xform"),o=t("../static-xform"),a=t("./blip-fill-xform"),r=t("./nv-pic-pr-xform"),e=t("./sp-pr");b.exports=class extends f{constructor(){super(),this.map={"xdr:nvPicPr":new r,"xdr:blipFill":new a,"xdr:spPr":new o(e)}}get tag(){return"xdr:pic"}prepare(n,l){n.index=l.index+1}render(n,l){n.openNode(this.tag),this.map["xdr:nvPicPr"].render(n,l),this.map["xdr:blipFill"].render(n,l),this.map["xdr:spPr"].render(n,l),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset();break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(){}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(n){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(t,b,g){b.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(t,b,g){const f=t("./base-cell-anchor-xform"),o=t("../static-xform"),a=t("./cell-position-xform"),r=t("./pic-xform");b.exports=class extends f{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:to":new a({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(e,n){this.map["xdr:pic"].prepare(e.picture,n)}render(e,n){e.openNode(this.tag,{editAs:n.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,n.range.tl),this.map["xdr:to"].render(e,n.range.br),this.map["xdr:pic"].render(e,n.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(e,n){e.medium=this.reconcilePicture(e.picture,n)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(t,b,g){const f=t("./base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,a){const{childXform:r}=this;o&&o.forEach((e,n)=>{a.index=n,r.prepare(e,a)})}render(o,a){if(this.always||a&&a.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,a&&a.length||0);const{childXform:r}=this;(a||[]).forEach((e,n)=>{r.render(o,e,n)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,a){if(o){const{childXform:r}=this;o.forEach(e=>{r.reconcile(e,a)})}}}},{"./base-xform":32}],72:[function(t,b,g){const f=t("../../../utils/col-cache"),o=t("../base-xform");b.exports=class extends o{get tag(){return"autoFilter"}render(a,r){if(r)if(typeof r=="string")a.leafNode("autoFilter",{ref:r});else{const e=function(i){return typeof i=="string"?i:f.getAddress(i.row,i.column).address},n=e(r.from),l=e(r.to);n&&l&&a.leafNode("autoFilter",{ref:`${n}:${l}`})}}parseOpen(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(t,b,g){const f=t("../../../utils/utils"),o=t("../base-xform"),a=t("../../../doc/range"),r=t("../../../doc/enums"),e=t("../strings/rich-text-xform");function n(l){if(l==null)return r.ValueType.Null;if(l instanceof String||typeof l=="string")return r.ValueType.String;if(typeof l=="number")return r.ValueType.Number;if(typeof l=="boolean")return r.ValueType.Boolean;if(l instanceof Date)return r.ValueType.Date;if(l.text&&l.hyperlink)return r.ValueType.Hyperlink;if(l.formula)return r.ValueType.Formula;if(l.error)return r.ValueType.Error;throw new Error("I could not understand type of value")}b.exports=class extends o{constructor(){super(),this.richTextXForm=new e}get tag(){return"c"}prepare(l,i){const s=i.styles.addStyleModel(l.style||{},function(h){switch(h.type){case r.ValueType.Formula:return n(h.result);default:return h.type}}(l));switch(s&&(l.styleId=s),l.comment&&i.comments.push({...l.comment,ref:l.address}),l.type){case r.ValueType.String:case r.ValueType.RichText:i.sharedStrings&&(l.ssId=i.sharedStrings.add(l.value));break;case r.ValueType.Date:i.date1904&&(l.date1904=!0);break;case r.ValueType.Hyperlink:i.sharedStrings&&l.text!==void 0&&l.text!==null&&(l.ssId=i.sharedStrings.add(l.text)),i.hyperlinks.push({address:l.address,target:l.hyperlink,tooltip:l.tooltip});break;case r.ValueType.Merge:i.merges.add(l);break;case r.ValueType.Formula:if(i.date1904&&(l.date1904=!0),l.shareType==="shared"&&(l.si=i.siFormulae++),l.formula)i.formulae[l.address]=l;else if(l.sharedFormula){const h=i.formulae[l.sharedFormula];if(!h)throw new Error("Shared Formula master must exist above and or left of clone for cell "+l.address);h.si===void 0?(h.shareType="shared",h.si=i.siFormulae++,h.range=new a(h.address,l.address)):h.range&&h.range.expandToAddress(l.address),l.si=h.si}}}renderFormula(l,i){let s=null;switch(i.shareType){case"shared":s={t:"shared",ref:i.ref||i.range.range,si:i.si};break;case"array":s={t:"array",ref:i.ref};break;default:i.si!==void 0&&(s={t:"shared",si:i.si})}switch(n(i.result)){case r.ValueType.Null:l.leafNode("f",s,i.formula);break;case r.ValueType.String:l.addAttribute("t","str"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result);break;case r.ValueType.Number:l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result?1:0);break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result.error);break;case r.ValueType.Date:l.leafNode("f",s,i.formula),l.leafNode("v",null,f.dateToExcel(i.result,i.date1904));break;default:throw new Error("I could not understand type of value")}}render(l,i){if(i.type!==r.ValueType.Null||i.styleId){switch(l.openNode("c"),l.addAttribute("r",i.address),i.styleId&&l.addAttribute("s",i.styleId),i.type){case r.ValueType.Null:break;case r.ValueType.Number:l.leafNode("v",null,i.value);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("v",null,i.value?"1":"0");break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("v",null,i.value.error);break;case r.ValueType.String:case r.ValueType.RichText:i.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,i.ssId)):i.value&&i.value.richText?(l.addAttribute("t","inlineStr"),l.openNode("is"),i.value.richText.forEach(s=>{this.richTextXForm.render(l,s)}),l.closeNode("is")):(l.addAttribute("t","str"),l.leafNode("v",null,i.value));break;case r.ValueType.Date:l.leafNode("v",null,f.dateToExcel(i.value,i.date1904));break;case r.ValueType.Hyperlink:i.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,i.ssId)):(l.addAttribute("t","str"),l.leafNode("v",null,i.text));break;case r.ValueType.Formula:this.renderFormula(l,i);break;case r.ValueType.Merge:}l.closeNode()}}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"c":return this.model={address:l.attributes.r},this.t=l.attributes.t,l.attributes.s&&(this.model.styleId=parseInt(l.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=l.attributes.si,this.model.shareType=l.attributes.t,this.model.ref=l.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){if(this.parser)this.parser.parseText(l);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+l:l;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+l:l:this.model.value=this.model.value?this.model.value+l:l}}parseClose(l){switch(l){case"c":{const{model:i}=this;if(i.formula||i.shareType)i.type=r.ValueType.Formula,i.value&&(this.t==="str"?i.result=f.xmlDecode(i.value):this.t==="b"?i.result=parseInt(i.value,10)!==0:this.t==="e"?i.result={error:i.value}:i.result=parseFloat(i.value),i.value=void 0);else if(i.value!==void 0)switch(this.t){case"s":i.type=r.ValueType.String,i.value=parseInt(i.value,10);break;case"str":i.type=r.ValueType.String,i.value=f.xmlDecode(i.value);break;case"inlineStr":i.type=r.ValueType.String;break;case"b":i.type=r.ValueType.Boolean,i.value=parseInt(i.value,10)!==0;break;case"e":i.type=r.ValueType.Error,i.value={error:i.value};break;default:i.type=r.ValueType.Number,i.value=parseFloat(i.value)}else i.styleId?i.type=r.ValueType.Null:i.type=r.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(l),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(l),!0)}}reconcile(l,i){const s=l.styleId&&i.styles&&i.styles.getStyleModel(l.styleId);switch(s&&(l.style=s),l.styleId!==void 0&&(l.styleId=void 0),l.type){case r.ValueType.String:typeof l.value=="number"&&i.sharedStrings&&(l.value=i.sharedStrings.getString(l.value)),l.value.richText&&(l.type=r.ValueType.RichText);break;case r.ValueType.Number:s&&f.isDateFmt(s.numFmt)&&(l.type=r.ValueType.Date,l.value=f.excelToDate(l.value,i.date1904));break;case r.ValueType.Formula:l.result!==void 0&&s&&f.isDateFmt(s.numFmt)&&(l.result=f.excelToDate(l.result,i.date1904)),l.shareType==="shared"&&(l.ref?i.formulae[l.si]=l.address:(l.sharedFormula=i.formulae[l.si],delete l.shareType),delete l.si)}const h=i.hyperlinkMap[l.address];h&&(l.type===r.ValueType.Formula?(l.text=l.result,l.result=void 0):(l.text=l.value,l.value=void 0),l.type=r.ValueType.Hyperlink,l.hyperlink=h);const d=i.commentsMap&&i.commentsMap[l.address];d&&(l.comment=d)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{get tag(){return"x14:cfIcon"}render(o,a){o.leafNode(this.tag,{iconSet:a.iconSet,iconId:a.iconId})}parseOpen(o){let{attributes:a}=o;this.model={iconSet:a.iconSet,iconId:f.toIntValue(a.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(t,b,g){const{v4:f}=t("uuid"),o=t("../../base-xform"),a=t("../../composite-xform"),r=t("./databar-ext-xform"),e=t("./icon-set-ext-xform"),n={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class l extends a{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new r,"x14:iconSet":this.iconSetXform=new e}}get tag(){return"x14:cfRule"}static isExt(s){return s.type==="dataBar"?r.isExt(s):!(s.type!=="iconSet"||!s.custom&&!n[s.iconSet])}prepare(s){l.isExt(s)&&(s.x14Id=`{${f()}}`.toUpperCase())}render(s,h){if(l.isExt(h))switch(h.type){case"dataBar":this.renderDataBar(s,h);break;case"iconSet":this.renderIconSet(s,h)}}renderDataBar(s,h){s.openNode(this.tag,{type:"dataBar",id:h.x14Id}),this.databarXform.render(s,h),s.closeNode()}renderIconSet(s,h){s.openNode(this.tag,{type:"iconSet",priority:h.priority,id:h.x14Id||`{${f()}}`}),this.iconSetXform.render(s,h),s.closeNode()}createNewModel(s){let{attributes:h}=s;return{type:h.type,x14Id:h.id,priority:o.toIntValue(h.priority)}}onParserClose(s,h){Object.assign(this.model,h.model)}}b.exports=l},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(t,b,g){const f=t("../../composite-xform"),o=t("./f-ext-xform");b.exports=class extends f{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(a,r){a.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(a,r.value),a.closeNode()}createNewModel(a){return{type:a.attributes.type}}onParserClose(a,r){switch(a){case"xm:f":this.model.value=r.model?parseFloat(r.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(t,b,g){const f=t("../../composite-xform"),o=t("./sqref-ext-xform"),a=t("./cf-rule-ext-xform");b.exports=class extends f{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new a}}get tag(){return"x14:conditionalFormatting"}prepare(r,e){r.rules.forEach(n=>{this.cfRule.prepare(n,e)})}render(r,e){e.rules.some(a.isExt)&&(r.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),e.rules.filter(a.isExt).forEach(n=>this.cfRule.render(r,n)),this.sqRef.render(r,e.ref),r.closeNode())}createNewModel(){return{rules:[]}}onParserClose(r,e){switch(r){case"xm:sqref":this.model.ref=e.model;break;case"x14:cfRule":this.model.rules.push(e.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(t,b,g){const f=t("../../composite-xform"),o=t("./cf-rule-ext-xform"),a=t("./conditional-formatting-ext-xform");b.exports=class extends f{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new a}}get tag(){return"x14:conditionalFormattings"}hasContent(r){return r.hasExtContent===void 0&&(r.hasExtContent=r.some(e=>e.rules.some(o.isExt))),r.hasExtContent}prepare(r,e){r.forEach(n=>{this.cfXform.prepare(n,e)})}render(r,e){this.hasContent(e)&&(r.openNode(this.tag),e.forEach(n=>this.cfXform.render(r,n)),r.closeNode())}createNewModel(){return[]}onParserClose(r,e){this.model.push(e.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(t,b,g){const f=t("../../base-xform"),o=t("../../composite-xform"),a=t("../../style/color-xform"),r=t("./cfvo-ext-xform");b.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new r,"x14:borderColor":this.borderColorXform=new a("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new a("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new a("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new a("x14:axisColor")}}static isExt(e){return!e.gradient}get tag(){return"x14:dataBar"}render(e,n){e.openNode(this.tag,{minLength:f.toIntAttribute(n.minLength,0,!0),maxLength:f.toIntAttribute(n.maxLength,100,!0),border:f.toBoolAttribute(n.border,!1),gradient:f.toBoolAttribute(n.gradient,!0),negativeBarColorSameAsPositive:f.toBoolAttribute(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:f.toBoolAttribute(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:f.toAttribute(n.axisPosition,"auto"),direction:f.toAttribute(n.direction,"leftToRight")}),n.cfvo.forEach(l=>{this.cfvoXform.render(e,l)}),this.borderColorXform.render(e,n.borderColor),this.negativeBorderColorXform.render(e,n.negativeBorderColor),this.negativeFillColorXform.render(e,n.negativeFillColor),this.axisColorXform.render(e,n.axisColor),e.closeNode()}createNewModel(e){let{attributes:n}=e;return{cfvo:[],minLength:f.toIntValue(n.minLength,0),maxLength:f.toIntValue(n.maxLength,100),border:f.toBoolValue(n.border,!1),gradient:f.toBoolValue(n.gradient,!0),negativeBarColorSameAsPositive:f.toBoolValue(n.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:f.toBoolValue(n.negativeBarBorderColorSameAsPositive,!0),axisPosition:f.toStringValue(n.axisPosition,"auto"),direction:f.toStringValue(n.direction,"leftToRight")}}onParserClose(e,n){const[,l]=e.split(":");switch(l){case"cfvo":this.model.cfvo.push(n.model);break;default:this.model[l]=n.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{get tag(){return"xm:f"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(t,b,g){const f=t("../../base-xform"),o=t("../../composite-xform"),a=t("./cfvo-ext-xform"),r=t("./cf-icon-ext-xform");b.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:cfIcon":this.cfIconXform=new r}}get tag(){return"x14:iconSet"}render(e,n){e.openNode(this.tag,{iconSet:f.toStringAttribute(n.iconSet),reverse:f.toBoolAttribute(n.reverse,!1),showValue:f.toBoolAttribute(n.showValue,!0),custom:f.toBoolAttribute(n.icons,!1)}),n.cfvo.forEach(l=>{this.cfvoXform.render(e,l)}),n.icons&&n.icons.forEach((l,i)=>{l.iconId=i,this.cfIconXform.render(e,l)}),e.closeNode()}createNewModel(e){let{attributes:n}=e;return{cfvo:[],iconSet:f.toStringValue(n.iconSet,"3TrafficLights"),reverse:f.toBoolValue(n.reverse,!1),showValue:f.toBoolValue(n.showValue,!0)}}onParserClose(e,n){const[,l]=e.split(":");switch(l){case"cfvo":this.model.cfvo.push(n.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(n.model);break;default:this.model[l]=n.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{get tag(){return"xm:sqref"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(t,b,g){const f=t("../../base-xform"),o=t("../../composite-xform"),a=t("../../../../doc/range"),r=t("./databar-xform"),e=t("./ext-lst-ref-xform"),n=t("./formula-xform"),l=t("./color-scale-xform"),i=t("./icon-set-xform"),s={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},h=c=>{const{type:p,operator:m}=c;switch(p){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:p};default:return{type:p,operator:m}}};class d extends o{constructor(){super(),this.map={dataBar:this.databarXform=new r,extLst:this.extLstRefXform=new e,formula:this.formulaXform=new n,colorScale:this.colorScaleXform=new l,iconSet:this.iconSetXform=new i}}get tag(){return"cfRule"}static isPrimitive(p){return p.type!=="iconSet"||!p.custom&&!s[p.iconSet]}render(p,m){switch(m.type){case"expression":this.renderExpression(p,m);break;case"cellIs":this.renderCellIs(p,m);break;case"top10":this.renderTop10(p,m);break;case"aboveAverage":this.renderAboveAverage(p,m);break;case"dataBar":this.renderDataBar(p,m);break;case"colorScale":this.renderColorScale(p,m);break;case"iconSet":this.renderIconSet(p,m);break;case"containsText":this.renderText(p,m);break;case"timePeriod":this.renderTimePeriod(p,m)}}renderExpression(p,m){p.openNode(this.tag,{type:"expression",dxfId:m.dxfId,priority:m.priority}),this.formulaXform.render(p,m.formulae[0]),p.closeNode()}renderCellIs(p,m){p.openNode(this.tag,{type:"cellIs",dxfId:m.dxfId,priority:m.priority,operator:m.operator}),m.formulae.forEach(S=>{this.formulaXform.render(p,S)}),p.closeNode()}renderTop10(p,m){p.leafNode(this.tag,{type:"top10",dxfId:m.dxfId,priority:m.priority,percent:f.toBoolAttribute(m.percent,!1),bottom:f.toBoolAttribute(m.bottom,!1),rank:f.toIntValue(m.rank,10,!0)})}renderAboveAverage(p,m){p.leafNode(this.tag,{type:"aboveAverage",dxfId:m.dxfId,priority:m.priority,aboveAverage:f.toBoolAttribute(m.aboveAverage,!0)})}renderDataBar(p,m){p.openNode(this.tag,{type:"dataBar",priority:m.priority}),this.databarXform.render(p,m),this.extLstRefXform.render(p,m),p.closeNode()}renderColorScale(p,m){p.openNode(this.tag,{type:"colorScale",priority:m.priority}),this.colorScaleXform.render(p,m),p.closeNode()}renderIconSet(p,m){d.isPrimitive(m)&&(p.openNode(this.tag,{type:"iconSet",priority:m.priority}),this.iconSetXform.render(p,m),p.closeNode())}renderText(p,m){p.openNode(this.tag,{type:m.operator,dxfId:m.dxfId,priority:m.priority,operator:f.toStringAttribute(m.operator,"containsText")});const S=(C=>{if(C.formulae&&C.formulae[0])return C.formulae[0];const M=new a(C.ref),{tl:P}=M;switch(C.operator){case"containsText":return`NOT(ISERROR(SEARCH("${C.text}",${P})))`;case"containsBlanks":return`LEN(TRIM(${P}))=0`;case"notContainsBlanks":return`LEN(TRIM(${P}))>0`;case"containsErrors":return`ISERROR(${P})`;case"notContainsErrors":return`NOT(ISERROR(${P}))`;default:return}})(m);S&&this.formulaXform.render(p,S),p.closeNode()}renderTimePeriod(p,m){p.openNode(this.tag,{type:"timePeriod",dxfId:m.dxfId,priority:m.priority,timePeriod:m.timePeriod});const S=(C=>{if(C.formulae&&C.formulae[0])return C.formulae[0];const M=new a(C.ref),{tl:P}=M;switch(C.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${P},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${P},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${P},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${P},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${P},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${P},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${P},1)=TODAY()-1`;case"today":return`FLOOR(${P},1)=TODAY()`;case"tomorrow":return`FLOOR(${P},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${P},1)<=6,FLOOR(${P},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${P})=MONTH(EDATE(TODAY(),0-1)),YEAR(${P})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${P})=MONTH(TODAY()),YEAR(${P})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${P})=MONTH(EDATE(TODAY(),0+1)),YEAR(${P})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(m);S&&this.formulaXform.render(p,S),p.closeNode()}createNewModel(p){let{attributes:m}=p;return{...h(m),dxfId:f.toIntValue(m.dxfId),priority:f.toIntValue(m.priority),timePeriod:m.timePeriod,percent:f.toBoolValue(m.percent),bottom:f.toBoolValue(m.bottom),rank:f.toIntValue(m.rank),aboveAverage:f.toBoolValue(m.aboveAverage)}}onParserClose(p,m){switch(p){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,m.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(m.model)}}}b.exports=d},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{get tag(){return"cfvo"}render(o,a){o.leafNode(this.tag,{type:a.type,val:a.value})}parseOpen(o){this.model={type:o.attributes.type,value:f.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(t,b,g){const f=t("../../composite-xform"),o=t("../../style/color-xform"),a=t("./cfvo-xform");b.exports=class extends f{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"colorScale"}render(r,e){r.openNode(this.tag),e.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),e.color.forEach(n=>{this.colorXform.render(r,n)}),r.closeNode()}createNewModel(r){return{cfvo:[],color:[]}}onParserClose(r,e){this.model[r].push(e.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(t,b,g){const f=t("../../composite-xform"),o=t("./cf-rule-xform");b.exports=class extends f{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(a,r){r.rules.some(o.isPrimitive)&&(a.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(e=>{o.isPrimitive(e)&&(e.ref=r.ref,this.map.cfRule.render(a,e))}),a.closeNode())}createNewModel(a){let{attributes:r}=a;return{ref:r.sqref,rules:[]}}onParserClose(a,r){this.model.rules.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(t,b,g){const f=t("../../base-xform"),o=t("./conditional-formatting-xform");b.exports=class extends f{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(a,r){let e=a.reduce((n,l)=>Math.max(n,...l.rules.map(i=>i.priority||0)),1);a.forEach(n=>{n.rules.forEach(l=>{l.priority||(l.priority=e++),l.style&&(l.dxfId=r.styles.addDxfStyle(l.style))})})}render(a,r){r.forEach(e=>{this.cfXform.render(a,e)})}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(!!this.parser.parseClose(a)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(a,r){a.forEach(e=>{e.rules.forEach(n=>{n.dxfId!==void 0&&(n.style=r.styles.getDxfStyle(n.dxfId),delete n.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(t,b,g){const f=t("../../composite-xform"),o=t("../../style/color-xform"),a=t("./cfvo-xform");b.exports=class extends f{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"dataBar"}render(r,e){r.openNode(this.tag),e.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),this.colorXform.render(r,e.color),r.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(r,e){switch(r){case"cfvo":this.model.cfvo.push(e.model);break;case"color":this.model.color=e.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(t,b,g){const f=t("../../base-xform"),o=t("../../composite-xform");class a extends f{get tag(){return"x14:id"}render(n,l){n.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(n){this.model+=n}parseClose(n){return n!==this.tag}}class r extends o{constructor(){super(),this.map={"x14:id":this.idXform=new a}}get tag(){return"ext"}render(n,l){n.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(n,l.x14Id),n.closeNode()}createNewModel(){return{}}onParserClose(n,l){this.model.x14Id=l.model}}b.exports=class extends o{constructor(){super(),this.map={ext:new r}}get tag(){return"extLst"}render(e,n){e.openNode(this.tag),this.map.ext.render(e,n),e.closeNode()}createNewModel(){return{}}onParserClose(e,n){Object.assign(this.model,n.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(t,b,g){const f=t("../../base-xform");b.exports=class extends f{get tag(){return"formula"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(t,b,g){const f=t("../../base-xform"),o=t("../../composite-xform"),a=t("./cfvo-xform");b.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new a}}get tag(){return"iconSet"}render(r,e){r.openNode(this.tag,{iconSet:f.toStringAttribute(e.iconSet,"3TrafficLights"),reverse:f.toBoolAttribute(e.reverse,!1),showValue:f.toBoolAttribute(e.showValue,!0)}),e.cfvo.forEach(n=>{this.cfvoXform.render(r,n)}),r.closeNode()}createNewModel(r){let{attributes:e}=r;return{iconSet:f.toStringValue(e.iconSet,"3TrafficLights"),reverse:f.toBoolValue(e.reverse),showValue:f.toBoolValue(e.showValue),cfvo:[]}}onParserClose(r,e){this.model[r].push(e.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(t,b,g){const f=t("../../../utils/utils"),o=t("../base-xform");b.exports=class extends o{get tag(){return"col"}prepare(a,r){const e=r.styles.addStyleModel(a.style||{});e&&(a.styleId=e)}render(a,r){a.openNode("col"),a.addAttribute("min",r.min),a.addAttribute("max",r.max),r.width&&a.addAttribute("width",r.width),r.styleId&&a.addAttribute("style",r.styleId),r.hidden&&a.addAttribute("hidden","1"),r.bestFit&&a.addAttribute("bestFit","1"),r.outlineLevel&&a.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&a.addAttribute("collapsed","1"),a.addAttribute("customWidth","1"),a.closeNode()}parseOpen(a){if(a.name==="col"){const r=this.model={min:parseInt(a.attributes.min||"0",10),max:parseInt(a.attributes.max||"0",10),width:a.attributes.width===void 0?void 0:parseFloat(a.attributes.width||"0")};return a.attributes.style&&(r.styleId=parseInt(a.attributes.style,10)),f.parseBoolean(a.attributes.hidden)&&(r.hidden=!0),f.parseBoolean(a.attributes.bestFit)&&(r.bestFit=!0),a.attributes.outlineLevel&&(r.outlineLevel=parseInt(a.attributes.outlineLevel,10)),f.parseBoolean(a.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(a,r){a.styleId&&(a.style=r.styles.getStyleModel(a.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../../../utils/utils"),a=t("../../../utils/col-cache"),r=t("../base-xform"),e=t("../../../doc/range");function n(i,s,h,d){const c=s[h];c!==void 0?i[h]=c:d!==void 0&&(i[h]=d)}function l(i,s,h,d){const c=s[h];c!==void 0?i[h]=o.parseBoolean(c):d!==void 0&&(i[h]=d)}b.exports=class extends r{get tag(){return"dataValidations"}render(i,s){const h=function(d){const c=f.map(d,(S,C)=>({address:C,dataValidation:S,marked:!1})).sort((S,C)=>f.strcmp(S.address,C.address)),p=f.keyBy(c,"address"),m=(S,C,M)=>{for(let P=0;P<C;P++){const $=a.encodeAddress(S.row+P,M);if(!d[$]||!f.isEqual(d[S.address],d[$]))return!1}return!0};return c.map(S=>{if(!S.marked){const C=a.decodeEx(S.address);if(C.dimensions)return p[C.dimensions].marked=!0,{...S.dataValidation,sqref:S.address};let M=1,P=a.encodeAddress(C.row+M,C.col);for(;d[P]&&f.isEqual(S.dataValidation,d[P]);)M++,P=a.encodeAddress(C.row+M,C.col);let $=1;for(;m(C,M,C.col+$);)$++;for(let N=0;N<M;N++)for(let B=0;B<$;B++)P=a.encodeAddress(C.row+N,C.col+B),p[P].marked=!0;if(M>1||$>1){const N=C.row+(M-1),B=C.col+($-1);return{...S.dataValidation,sqref:`${S.address}:${a.encodeAddress(N,B)}`}}return{...S.dataValidation,sqref:S.address}}return null}).filter(Boolean)}(s);h.length&&(i.openNode("dataValidations",{count:h.length}),h.forEach(d=>{i.openNode("dataValidation"),d.type!=="any"&&(i.addAttribute("type",d.type),d.operator&&d.type!=="list"&&d.operator!=="between"&&i.addAttribute("operator",d.operator),d.allowBlank&&i.addAttribute("allowBlank","1")),d.showInputMessage&&i.addAttribute("showInputMessage","1"),d.promptTitle&&i.addAttribute("promptTitle",d.promptTitle),d.prompt&&i.addAttribute("prompt",d.prompt),d.showErrorMessage&&i.addAttribute("showErrorMessage","1"),d.errorStyle&&i.addAttribute("errorStyle",d.errorStyle),d.errorTitle&&i.addAttribute("errorTitle",d.errorTitle),d.error&&i.addAttribute("error",d.error),i.addAttribute("sqref",d.sqref),(d.formulae||[]).forEach((c,p)=>{i.openNode("formula"+(p+1)),d.type==="date"?i.writeText(o.dateToExcel(new Date(c))):i.writeText(c),i.closeNode()}),i.closeNode()}),i.closeNode())}parseOpen(i){switch(i.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=i.attributes.sqref;const s={type:i.attributes.type||"any",formulae:[]};switch(i.attributes.type&&l(s,i.attributes,"allowBlank"),l(s,i.attributes,"showInputMessage"),l(s,i.attributes,"showErrorMessage"),s.type){case"any":case"list":case"custom":break;default:n(s,i.attributes,"operator","between")}return n(s,i.attributes,"promptTitle"),n(s,i.attributes,"prompt"),n(s,i.attributes,"errorStyle"),n(s,i.attributes,"errorTitle"),n(s,i.attributes,"error"),this._dataValidation=s,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(i){this._formula&&this._formula.push(i)}parseClose(i){switch(i){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(s=>{s.includes(":")?new e(s).forEachAddress(h=>{this.model[h]=this._dataValidation}):this.model[s]=this._dataValidation}),!0;case"formula1":case"formula2":{let s=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":s=parseInt(s,10);break;case"decimal":s=parseFloat(s);break;case"date":s=o.excelToDate(parseFloat(s))}return this._dataValidation.formulae.push(s),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"dimension"}render(o,a){a&&o.leafNode("dimension",{ref:a})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"drawing"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(t,b,g){const f=t("../composite-xform"),o=t("./cf-ext/conditional-formattings-ext-xform");class a extends f{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e,n){this.conditionalFormattings.prepare(e.conditionalFormattings,n)}render(e,n){e.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(e,n.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,n){this.model[e]=n.model}}b.exports=class extends f{constructor(){super(),this.map={ext:this.ext=new a}}get tag(){return"extLst"}prepare(r,e){this.ext.prepare(r,e)}hasContent(r){return this.ext.hasContent(r)}render(r,e){this.hasContent(e)&&(r.openNode("extLst"),this.ext.render(r,e),r.closeNode())}createNewModel(){return{}}onParserClose(r,e){Object.assign(this.model,e.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"headerFooter"}render(o,a){if(a){o.addRollback();let r=!1;o.openNode("headerFooter"),a.differentFirst&&(o.addAttribute("differentFirst","1"),r=!0),a.differentOddEven&&(o.addAttribute("differentOddEven","1"),r=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(o.leafNode("oddHeader",null,a.oddHeader),r=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(o.leafNode("oddFooter",null,a.oddFooter),r=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(o.leafNode("evenHeader",null,a.evenHeader),r=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(o.leafNode("evenFooter",null,a.evenFooter),r=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(o.leafNode("firstHeader",null,a.firstHeader),r=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(o.leafNode("firstFooter",null,a.firstFooter),r=!0),r?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"hyperlink"}render(o,a){this.isInternalLink(a)?o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip,location:a.target}):o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"mergeCell"}render(o,a){o.leafNode("mergeCell",{ref:a})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../../../doc/range"),a=t("../../../utils/col-cache"),r=t("../../../doc/enums");b.exports=class{constructor(){this.merges={}}add(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{const n=`${e.master}:${e.address}`;this.merges[e.master]=new o(n)}}get mergeCells(){return f.map(this.merges,e=>e.range)}reconcile(e,n){f.each(e,l=>{const i=a.decode(l);for(let s=i.top;s<=i.bottom;s++){const h=n[s-1];for(let d=i.left;d<=i.right;d++){const c=h.cells[d-1];c?c.type===r.ValueType.Merge&&(c.master=i.tl):h.cells[d]={type:r.ValueType.Null,address:a.encodeAddress(s,d)}}}})}getMasterAddress(e){const n=this.hash[e];return n&&n.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(t,b,g){const f=t("../base-xform"),o=a=>a!==void 0;b.exports=class extends f{get tag(){return"outlinePr"}render(a,r){return!(!r||!o(r.summaryBelow)&&!o(r.summaryRight))&&(a.leafNode(this.tag,{summaryBelow:o(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:o(r.summaryRight)?Number(r.summaryRight):void 0}),!0)}parseOpen(a){return a.name===this.tag&&(this.model={summaryBelow:o(a.attributes.summaryBelow)?!!Number(a.attributes.summaryBelow):void 0,summaryRight:o(a.attributes.summaryRight)?!!Number(a.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"brk"}render(o,a){o.leafNode("brk",a)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../base-xform");b.exports=class extends o{get tag(){return"pageMargins"}render(a,r){if(r){const e={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};f.some(e,n=>n!==void 0)&&a.leafNode(this.tag,e)}}parseOpen(a){switch(a.name){case this.tag:return this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"pageSetUpPr"}render(o,a){return!(!a||!a.fitToPage)&&(o.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../base-xform");function a(l){return l?"1":void 0}function r(l){switch(l){case"overThenDown":return l;default:return}}function e(l){switch(l){case"atEnd":case"asDisplyed":return l;default:return}}function n(l){switch(l){case"dash":case"blank":case"NA":return l;default:return}}b.exports=class extends o{get tag(){return"pageSetup"}render(l,i){if(i){const s={paperSize:i.paperSize,orientation:i.orientation,horizontalDpi:i.horizontalDpi,verticalDpi:i.verticalDpi,pageOrder:r(i.pageOrder),blackAndWhite:a(i.blackAndWhite),draft:a(i.draft),cellComments:e(i.cellComments),errors:n(i.errors),scale:i.scale,fitToWidth:i.fitToWidth,fitToHeight:i.fitToHeight,firstPageNumber:i.firstPageNumber,useFirstPageNumber:a(i.firstPageNumber),usePrinterDefaults:a(i.usePrinterDefaults),copies:i.copies};f.some(s,h=>h!==void 0)&&l.leafNode(this.tag,s)}}parseOpen(l){switch(l.name){case this.tag:return this.model={paperSize:(i=l.attributes.paperSize,i!==void 0?parseInt(i,10):void 0),orientation:l.attributes.orientation||"portrait",horizontalDpi:parseInt(l.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(l.attributes.verticalDpi||"4294967295",10),pageOrder:l.attributes.pageOrder||"downThenOver",blackAndWhite:l.attributes.blackAndWhite==="1",draft:l.attributes.draft==="1",cellComments:l.attributes.cellComments||"None",errors:l.attributes.errors||"displayed",scale:parseInt(l.attributes.scale||"100",10),fitToWidth:parseInt(l.attributes.fitToWidth||"1",10),fitToHeight:parseInt(l.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(l.attributes.firstPageNumber||"1",10),useFirstPageNumber:l.attributes.useFirstPageNumber==="1",usePrinterDefaults:l.attributes.usePrinterDefaults==="1",copies:parseInt(l.attributes.copies||"1",10)},!0;default:return!1}var i}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"picture"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../base-xform");function a(r){return r?"1":void 0}b.exports=class extends o{get tag(){return"printOptions"}render(r,e){if(e){const n={headings:a(e.showRowColHeaders),gridLines:a(e.showGridLines),horizontalCentered:a(e.horizontalCentered),verticalCentered:a(e.verticalCentered)};f.some(n,l=>l!==void 0)&&r.leafNode(this.tag,n)}}parseOpen(r){switch(r.name){case this.tag:return this.model={showRowColHeaders:r.attributes.headings==="1",showGridLines:r.attributes.gridLines==="1",horizontalCentered:r.attributes.horizontalCentered==="1",verticalCentered:r.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(t,b,g){const f=t("./page-breaks-xform"),o=t("../list-xform");b.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new f})}render(a,r){if(r&&r.length){a.openNode(this.tag,this.$),this.count&&(a.addAttribute(this.$count,r.length),a.addAttribute("manualBreakCount",r.length));const{childXform:e}=this;r.forEach(n=>{e.render(a,n)}),a.closeNode()}else this.empty&&a.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(t,b,g){const f=t("../base-xform"),o=t("../../../utils/utils"),a=t("./cell-xform");b.exports=class extends f{constructor(r){super(),this.maxItems=r&&r.maxItems,this.map={c:new a}}get tag(){return"row"}prepare(r,e){const n=e.styles.addStyleModel(r.style);n&&(r.styleId=n);const l=this.map.c;r.cells.forEach(i=>{l.prepare(i,e)})}render(r,e,n){r.openNode("row"),r.addAttribute("r",e.number),e.height&&(r.addAttribute("ht",e.height),r.addAttribute("customHeight","1")),e.hidden&&r.addAttribute("hidden","1"),e.min>0&&e.max>0&&e.min<=e.max&&r.addAttribute("spans",`${e.min}:${e.max}`),e.styleId&&(r.addAttribute("s",e.styleId),r.addAttribute("customFormat","1")),r.addAttribute("x14ac:dyDescent","0.25"),e.outlineLevel&&r.addAttribute("outlineLevel",e.outlineLevel),e.collapsed&&r.addAttribute("collapsed","1");const l=this.map.c;e.cells.forEach(i=>{l.render(r,i,n)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(r.name==="row"){this.numRowsSeen+=1;const e=r.attributes.spans?r.attributes.spans.split(":").map(l=>parseInt(l,10)):[void 0,void 0],n=this.model={number:parseInt(r.attributes.r,10),min:e[0],max:e[1],cells:[]};return r.attributes.s&&(n.styleId=parseInt(r.attributes.s,10)),o.parseBoolean(r.attributes.hidden)&&(n.hidden=!0),o.parseBoolean(r.attributes.bestFit)&&(n.bestFit=!0),r.attributes.ht&&(n.height=parseFloat(r.attributes.ht)),r.attributes.outlineLevel&&(n.outlineLevel=parseInt(r.attributes.outlineLevel,10)),o.parseBoolean(r.attributes.collapsed)&&(n.collapsed=!0),!0}return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(r,e){r.style=r.styleId?e.styles.getStyleModel(r.styleId):{},r.styleId!==void 0&&(r.styleId=void 0);const n=this.map.c;r.cells.forEach(l=>{n.reconcile(l,e)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../base-xform");b.exports=class extends o{get tag(){return"sheetFormatPr"}render(a,r){if(r){const e={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(e.defaultColWidth=r.defaultColWidth),r.defaultRowHeight&&r.defaultRowHeight===15||(e.customHeight="1"),f.some(e,n=>n!==void 0)&&a.leafNode("sheetFormatPr",e)}}parseOpen(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(t,b,g){const f=t("../base-xform"),o=t("../style/color-xform"),a=t("./page-setup-properties-xform"),r=t("./outline-properties-xform");b.exports=class extends f{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new a,outlinePr:new r}}get tag(){return"sheetPr"}render(e,n){if(n){e.addRollback(),e.openNode("sheetPr");let l=!1;l=this.map.tabColor.render(e,n.tabColor)||l,l=this.map.pageSetUpPr.render(e,n.pageSetup)||l,l=this.map.outlinePr.render(e,n.outlineProperties)||l,l?(e.closeNode(),e.commit()):e.rollback()}}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):!!this.map[e.name]&&(this.parser=this.map[e.name],this.parser.parseOpen(e),!0)}parseText(e){return!!this.parser&&(this.parser.parseText(e),!0)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../base-xform");function a(e,n){return e?n:void 0}function r(e,n){return e===n||void 0}b.exports=class extends o{get tag(){return"sheetProtection"}render(e,n){if(n){const l={sheet:a(n.sheet,"1"),selectLockedCells:n.selectLockedCells===!1?"1":void 0,selectUnlockedCells:n.selectUnlockedCells===!1?"1":void 0,formatCells:a(n.formatCells,"0"),formatColumns:a(n.formatColumns,"0"),formatRows:a(n.formatRows,"0"),insertColumns:a(n.insertColumns,"0"),insertRows:a(n.insertRows,"0"),insertHyperlinks:a(n.insertHyperlinks,"0"),deleteColumns:a(n.deleteColumns,"0"),deleteRows:a(n.deleteRows,"0"),sort:a(n.sort,"0"),autoFilter:a(n.autoFilter,"0"),pivotTables:a(n.pivotTables,"0")};n.sheet&&(l.algorithmName=n.algorithmName,l.hashValue=n.hashValue,l.saltValue=n.saltValue,l.spinCount=n.spinCount,l.objects=a(n.objects===!1,"1"),l.scenarios=a(n.scenarios===!1,"1")),f.some(l,i=>i!==void 0)&&e.leafNode(this.tag,l)}}parseOpen(e){switch(e.name){case this.tag:return this.model={sheet:r(e.attributes.sheet,"1"),objects:e.attributes.objects!=="1"&&void 0,scenarios:e.attributes.scenarios!=="1"&&void 0,selectLockedCells:e.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:e.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:r(e.attributes.formatCells,"0"),formatColumns:r(e.attributes.formatColumns,"0"),formatRows:r(e.attributes.formatRows,"0"),insertColumns:r(e.attributes.insertColumns,"0"),insertRows:r(e.attributes.insertRows,"0"),insertHyperlinks:r(e.attributes.insertHyperlinks,"0"),deleteColumns:r(e.attributes.deleteColumns,"0"),deleteRows:r(e.attributes.deleteRows,"0"),sort:r(e.attributes.sort,"0"),autoFilter:r(e.attributes.autoFilter,"0"),pivotTables:r(e.attributes.pivotTables,"0")},e.attributes.algorithmName&&(this.model.algorithmName=e.attributes.algorithmName,this.model.hashValue=e.attributes.hashValue,this.model.saltValue=e.attributes.saltValue,this.model.spinCount=parseInt(e.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(t,b,g){const f=t("../../../utils/col-cache"),o=t("../base-xform"),a={frozen:"frozen",frozenSplit:"frozen",split:"split"};b.exports=class extends o{get tag(){return"sheetView"}prepare(r){switch(r.state){case"frozen":case"split":break;default:r.state="normal"}}render(r,e){r.openNode("sheetView",{workbookViewId:e.workbookViewId||0});const n=function(d,c,p){p&&r.addAttribute(d,c)};let l,i,s,h;switch(n("rightToLeft","1",e.rightToLeft===!0),n("tabSelected","1",e.tabSelected),n("showRuler","0",e.showRuler===!1),n("showRowColHeaders","0",e.showRowColHeaders===!1),n("showGridLines","0",e.showGridLines===!1),n("zoomScale",e.zoomScale,e.zoomScale),n("zoomScaleNormal",e.zoomScaleNormal,e.zoomScaleNormal),n("view",e.style,e.style),e.state){case"frozen":i=e.xSplit||0,s=e.ySplit||0,l=e.topLeftCell||f.getAddress(s+1,i+1).address,h=(e.xSplit&&e.ySplit?"bottomRight":e.xSplit&&"topRight")||"bottomLeft",r.leafNode("pane",{xSplit:e.xSplit||void 0,ySplit:e.ySplit||void 0,topLeftCell:l,activePane:h,state:"frozen"}),r.leafNode("selection",{pane:h,activeCell:e.activeCell,sqref:e.activeCell});break;case"split":e.activePane==="topLeft"&&(e.activePane=void 0),r.leafNode("pane",{xSplit:e.xSplit||void 0,ySplit:e.ySplit||void 0,topLeftCell:e.topLeftCell,activePane:e.activePane}),r.leafNode("selection",{pane:e.activePane,activeCell:e.activeCell,sqref:e.activeCell});break;case"normal":e.activeCell&&r.leafNode("selection",{activeCell:e.activeCell,sqref:e.activeCell})}r.closeNode()}parseOpen(r){switch(r.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(r.attributes.workbookViewId,10),rightToLeft:r.attributes.rightToLeft==="1",tabSelected:r.attributes.tabSelected==="1",showRuler:r.attributes.showRuler!=="0",showRowColHeaders:r.attributes.showRowColHeaders!=="0",showGridLines:r.attributes.showGridLines!=="0",zoomScale:parseInt(r.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(r.attributes.zoomScaleNormal||"100",10),style:r.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(r.attributes.xSplit||"0",10),ySplit:parseInt(r.attributes.ySplit||"0",10),topLeftCell:r.attributes.topLeftCell,activePane:r.attributes.activePane||"topLeft",state:r.attributes.state},!0;case"selection":{const e=r.attributes.pane||"topLeft";return this.selections[e]={pane:e,activeCell:r.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(r){let e,n;switch(r){case"sheetView":return this.sheetView&&this.pane?(e=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:a[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(e.activePane=this.pane.activePane),n=this.selections[this.pane.activePane],n&&n.activeCell&&(e.activeCell=n.activeCell),this.sheetView.style&&(e.style=this.sheetView.style)):(e=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},n=this.selections.topLeft,n&&n.activeCell&&(e.activeCell=n.activeCell),this.sheetView.style&&(e.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"tablePart"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../../../utils/col-cache"),a=t("../../../utils/xml-stream"),r=t("../../rel-type"),e=t("./merges"),n=t("../base-xform"),l=t("../list-xform"),i=t("./row-xform"),s=t("./col-xform"),h=t("./dimension-xform"),d=t("./hyperlink-xform"),c=t("./merge-cell-xform"),p=t("./data-validations-xform"),m=t("./sheet-properties-xform"),S=t("./sheet-format-properties-xform"),C=t("./sheet-view-xform"),M=t("./sheet-protection-xform"),P=t("./page-margins-xform"),$=t("./page-setup-xform"),N=t("./print-options-xform"),B=t("./auto-filter-xform"),D=t("./picture-xform"),U=t("./drawing-xform"),z=t("./table-part-xform"),E=t("./row-breaks-xform"),O=t("./header-footer-xform"),x=t("./cf/conditional-formattings-xform"),y=t("./ext-lst-xform"),v=(_,A)=>{if(!A||!A.length)return _;if(!_||!_.length)return A;const j={},L={};return _.forEach(H=>{j[H.ref]=H,H.rules.forEach(q=>{const{x14Id:X}=q;X&&(L[X]=q)})}),A.forEach(H=>{H.rules.forEach(q=>{const X=L[q.x14Id];X?((F,W)=>{Object.keys(W).forEach(I=>{const R=F[I],V=W[I];R===void 0&&V!==void 0&&(F[I]=V)})})(X,q):j[H.ref]?j[H.ref].rules.push(q):_.push({ref:H.ref,rules:[q]})})}),_};class w extends n{constructor(A){super();const{maxRows:j,maxCols:L,ignoreNodes:H}=A||{};this.ignoreNodes=H||[],this.map={sheetPr:new m,dimension:new h,sheetViews:new l({tag:"sheetViews",count:!1,childXform:new C}),sheetFormatPr:new S,cols:new l({tag:"cols",count:!1,childXform:new s}),sheetData:new l({tag:"sheetData",count:!1,empty:!0,childXform:new i({maxItems:L}),maxItems:j}),autoFilter:new B,mergeCells:new l({tag:"mergeCells",count:!0,childXform:new c}),rowBreaks:new E,hyperlinks:new l({tag:"hyperlinks",count:!1,childXform:new d}),pageMargins:new P,dataValidations:new p,pageSetup:new $,headerFooter:new O,printOptions:new N,picture:new D,drawing:new U,sheetProtection:new M,tableParts:new l({tag:"tableParts",count:!0,childXform:new z}),conditionalFormatting:new x,extLst:new y}}prepare(A,j){j.merges=new e,A.hyperlinks=j.hyperlinks=[],A.comments=j.comments=[],j.formulae={},j.siFormulae=0,this.map.cols.prepare(A.cols,j),this.map.sheetData.prepare(A.rows,j),this.map.conditionalFormatting.prepare(A.conditionalFormattings,j),A.mergeCells=j.merges.mergeCells;const L=A.rels=[];function H(F){return"rId"+(F.length+1)}if(A.hyperlinks.forEach(F=>{const W=H(L);F.rId=W,L.push({Id:W,Type:r.Hyperlink,Target:F.target,TargetMode:"External"})}),A.comments.length>0){const F={Id:H(L),Type:r.Comments,Target:`../comments${A.id}.xml`};L.push(F);const W={Id:H(L),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${A.id}.vml`};L.push(W),A.comments.forEach(I=>{I.refAddress=o.decodeAddress(I.ref)}),j.commentRefs.push({commentName:"comments"+A.id,vmlDrawing:"vmlDrawing"+A.id})}const q=[];let X;A.media.forEach(F=>{if(F.type==="background"){const W=H(L);X=j.media[F.imageId],L.push({Id:W,Type:r.Image,Target:`../media/${X.name}.${X.extension}`}),A.background={rId:W},A.image=j.media[F.imageId]}else if(F.type==="image"){let{drawing:W}=A;X=j.media[F.imageId],W||(W=A.drawing={rId:H(L),name:"drawing"+ ++j.drawingsCount,anchors:[],rels:[]},j.drawings.push(W),L.push({Id:W.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${W.name}.xml`}));let I=this.preImageId===F.imageId?q[F.imageId]:q[W.rels.length];I||(I=H(W.rels),q[W.rels.length]=I,W.rels.push({Id:I,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${X.name}.${X.extension}`}));const R={picture:{rId:I},range:F.range};if(F.hyperlinks&&F.hyperlinks.hyperlink){const V=H(W.rels);q[W.rels.length]=V,R.picture.hyperlinks={tooltip:F.hyperlinks.tooltip,rId:V},W.rels.push({Id:V,Type:r.Hyperlink,Target:F.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=F.imageId,W.anchors.push(R)}}),A.tables.forEach(F=>{const W=H(L);F.rId=W,L.push({Id:W,Type:r.Table,Target:"../tables/"+F.target}),F.columns.forEach(I=>{const{style:R}=I;R&&(I.dxfId=j.styles.addDxfStyle(R))})}),this.map.extLst.prepare(A,j)}render(A,j){A.openXml(a.StdDocAttributes),A.openNode("worksheet",w.WORKSHEET_ATTRIBUTES);const L=j.properties?{defaultRowHeight:j.properties.defaultRowHeight,dyDescent:j.properties.dyDescent,outlineLevelCol:j.properties.outlineLevelCol,outlineLevelRow:j.properties.outlineLevelRow}:void 0;j.properties&&j.properties.defaultColWidth&&(L.defaultColWidth=j.properties.defaultColWidth);const H={outlineProperties:j.properties&&j.properties.outlineProperties,tabColor:j.properties&&j.properties.tabColor,pageSetup:j.pageSetup&&j.pageSetup.fitToPage?{fitToPage:j.pageSetup.fitToPage}:void 0},q=j.pageSetup&&j.pageSetup.margins,X={showRowColHeaders:j.pageSetup&&j.pageSetup.showRowColHeaders,showGridLines:j.pageSetup&&j.pageSetup.showGridLines,horizontalCentered:j.pageSetup&&j.pageSetup.horizontalCentered,verticalCentered:j.pageSetup&&j.pageSetup.verticalCentered},F=j.sheetProtection;this.map.sheetPr.render(A,H),this.map.dimension.render(A,j.dimensions),this.map.sheetViews.render(A,j.views),this.map.sheetFormatPr.render(A,L),this.map.cols.render(A,j.cols),this.map.sheetData.render(A,j.rows),this.map.sheetProtection.render(A,F),this.map.autoFilter.render(A,j.autoFilter),this.map.mergeCells.render(A,j.mergeCells),this.map.conditionalFormatting.render(A,j.conditionalFormattings),this.map.dataValidations.render(A,j.dataValidations),this.map.hyperlinks.render(A,j.hyperlinks),this.map.printOptions.render(A,X),this.map.pageMargins.render(A,q),this.map.pageSetup.render(A,j.pageSetup),this.map.headerFooter.render(A,j.headerFooter),this.map.rowBreaks.render(A,j.rowBreaks),this.map.drawing.render(A,j.drawing),this.map.picture.render(A,j.background),this.map.tableParts.render(A,j.tables),this.map.extLst.render(A,j),j.rels&&j.rels.forEach(W=>{W.Type===r.VmlDrawing&&A.leafNode("legacyDrawing",{"r:id":W.Id})}),A.closeNode()}parseOpen(A){return this.parser?(this.parser.parseOpen(A),!0):A.name==="worksheet"?(f.each(this.map,j=>{j.reset()}),!0):(this.map[A.name]&&!this.ignoreNodes.includes(A.name)&&(this.parser=this.map[A.name],this.parser.parseOpen(A)),!0)}parseText(A){this.parser&&this.parser.parseText(A)}parseClose(A){if(this.parser)return this.parser.parseClose(A)||(this.parser=void 0),!0;switch(A){case"worksheet":{const j=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(j.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(j.outlineProperties=this.map.sheetPr.model.outlineProperties);const L={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},H=Object.assign(L,this.map.pageSetup.model,this.map.printOptions.model),q=v(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:j,views:this.map.sheetViews.model,pageSetup:H,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:q},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(A,j){const L=(A.relationships||[]).reduce((q,X)=>{if(q[X.Id]=X,X.Type===r.Comments&&(A.comments=j.comments[X.Target].comments),X.Type===r.VmlDrawing&&A.comments&&A.comments.length){const F=j.vmlDrawings[X.Target].comments;A.comments.forEach((W,I)=>{W.note=Object.assign({},W.note,F[I])})}return q},{});if(j.commentsMap=(A.comments||[]).reduce((q,X)=>(X.ref&&(q[X.ref]=X),q),{}),j.hyperlinkMap=(A.hyperlinks||[]).reduce((q,X)=>(X.rId&&(q[X.address]=L[X.rId].Target),q),{}),j.formulae={},A.rows=A.rows&&A.rows.filter(Boolean)||[],A.rows.forEach(q=>{q.cells=q.cells&&q.cells.filter(Boolean)||[]}),this.map.cols.reconcile(A.cols,j),this.map.sheetData.reconcile(A.rows,j),this.map.conditionalFormatting.reconcile(A.conditionalFormattings,j),A.media=[],A.drawing){const q=L[A.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(q){const X=q[1];j.drawings[X].anchors.forEach(F=>{if(F.medium){const W={type:"image",imageId:F.medium.index,range:F.range,hyperlinks:F.picture.hyperlinks};A.media.push(W)}})}}const H=A.background&&L[A.background.rId];if(H){const q=H.Target.split("/media/")[1],X=j.mediaIndex&&j.mediaIndex[q];X!==void 0&&A.media.push({type:"background",imageId:X})}A.tables=(A.tables||[]).map(q=>{const X=L[q.rId];return j.tables[X.Target]}),delete A.relationships,delete A.hyperlinks,delete A.comments}}w.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},b.exports=w},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,a){a&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return""}},this._parse=o.parse||function(a){return new Date(a)}}render(o,a){a&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(a)):o.writeText(this._format(a)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,a){(a||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,a){a!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(t,b,g){const f=t("./base-xform"),o=t("../../utils/xml-stream");b.exports=class extends f{constructor(a){super(),this._model=a}render(a){if(!this._xml){const r=new o;(function e(n,l){n.openNode(l.tag,l.$),l.c&&l.c.forEach(i=>{e(n,i)}),l.t&&n.writeText(l.t),n.closeNode()})(r,this._model),this._xml=r.xml}a.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(a){switch(a){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(t,b,g){const f=t("./text-xform"),o=t("./rich-text-xform"),a=t("../base-xform");b.exports=class extends a{constructor(){super(),this.map={r:new o,t:new f}}get tag(){return"rPh"}render(r,e){if(r.openNode(this.tag,{sb:e.sb||0,eb:e.eb||0}),e&&e.hasOwnProperty("richText")&&e.richText){const{r:n}=this.map;e.richText.forEach(l=>{n.render(r,l)})}else e&&this.map.t.render(r,e.text);r.closeNode()}parseOpen(r){const{name:e}=r;return this.parser?(this.parser.parseOpen(r),!0):e===this.tag?(this.model={sb:parseInt(r.attributes.sb,10),eb:parseInt(r.attributes.eb,10)},!0):(this.parser=this.map[e],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(t,b,g){const f=t("./text-xform"),o=t("../style/font-xform"),a=t("../base-xform");class r extends a{constructor(n){super(),this.model=n}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new f)}get fontXform(){return this._fontXform||(this._fontXform=new o(r.FONT_OPTIONS))}render(n,l){l=l||this.model,n.openNode("r"),l.font&&this.fontXform.render(n,l.font),this.textXform.render(n,l.text),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(n),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){switch(n){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(n),!0}}}r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},b.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(t,b,g){const f=t("./text-xform"),o=t("./rich-text-xform"),a=t("./phonetic-text-xform"),r=t("../base-xform");b.exports=class extends r{constructor(e){super(),this.model=e,this.map={r:new o,t:new f,rPh:new a}}get tag(){return"si"}render(e,n){e.openNode(this.tag),n&&n.hasOwnProperty("richText")&&n.richText?n.richText.length?n.richText.forEach(l=>{this.map.r.render(e,l)}):this.map.t.render(e,""):n!=null&&this.map.t.render(e,n),e.closeNode()}parseOpen(e){const{name:n}=e;return this.parser?(this.parser.parseOpen(e),!0):n===this.tag?(this.model={},!0):(this.parser=this.map[n],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":{let n=this.model.richText;n||(n=this.model.richText=[]),n.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(e){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("./shared-string-xform");b.exports=class extends o{constructor(r){super(),this.model=r||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new a)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(r){return this.model.values[r]}add(r){return r.richText?this.addRichText(r):this.addText(r)}addText(r){let e=this.hash[r];return e===void 0&&(e=this.hash[r]=this.model.values.length,this.model.values.push(r)),this.model.count++,e}addRichText(r){const e=this.sharedStringXform.toXml(r);let n=this.rich[e];return n===void 0&&(n=this.rich[e]=this.model.values.length,this.model.values.push(r)),this.model.count++,n}render(r,e){e=e||this._values,r.openXml(f.StdDocAttributes),r.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:e.count,uniqueCount:e.values.length});const n=this.sharedStringXform;e.values.forEach(l=>{n.render(r,l)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(r),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(r){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+r)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"t"}render(o,a){o.openNode("t"),/^\s|\n|\s$/.test(a)&&o.addAttribute("xml:space","preserve"),o.writeText(a),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,a)=>String.fromCharCode(parseInt(a,16)))}parseOpen(o){switch(o.name){case"t":return this._text=[],!0;default:return!1}}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(t,b,g){const f=t("../../../doc/enums"),o=t("../../../utils/utils"),a=t("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((n,l)=>(n[l]=!0,n),{}),horizontal(n){return this.horizontalValues[n]?n:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((n,l)=>(n[l]=!0,n),{}),vertical(n){return n==="middle"?"center":this.verticalValues[n]?n:void 0},wrapText:n=>!!n||void 0,shrinkToFit:n=>!!n||void 0,textRotation(n){switch(n){case"vertical":return n;default:return(n=o.validInt(n))>=-90&&n<=90?n:void 0}},indent:n=>(n=o.validInt(n),Math.max(0,n)),readingOrder(n){switch(n){case"ltr":return f.ReadingOrder.LeftToRight;case"rtl":return f.ReadingOrder.RightToLeft;default:return}}},e={toXml(n){if(n=r.textRotation(n)){if(n==="vertical")return 255;const l=Math.round(n);if(l>=0&&l<=90)return l;if(l<0&&l>=-90)return 90-l}},toModel(n){const l=o.validInt(n);if(l!==void 0){if(l===255)return"vertical";if(l>=0&&l<=90)return l;if(l>90&&l<=180)return 90-l}}};b.exports=class extends a{get tag(){return"alignment"}render(n,l){n.addRollback(),n.openNode("alignment");let i=!1;function s(h,d){d&&(n.addAttribute(h,d),i=!0)}s("horizontal",r.horizontal(l.horizontal)),s("vertical",r.vertical(l.vertical)),s("wrapText",!!r.wrapText(l.wrapText)&&"1"),s("shrinkToFit",!!r.shrinkToFit(l.shrinkToFit)&&"1"),s("indent",r.indent(l.indent)),s("textRotation",e.toXml(l.textRotation)),s("readingOrder",r.readingOrder(l.readingOrder)),n.closeNode(),i?n.commit():n.rollback()}parseOpen(n){const l={};let i=!1;function s(h,d,c){h&&(l[d]=c,i=!0)}s(n.attributes.horizontal,"horizontal",n.attributes.horizontal),s(n.attributes.vertical,"vertical",n.attributes.vertical==="center"?"middle":n.attributes.vertical),s(n.attributes.wrapText,"wrapText",o.parseBoolean(n.attributes.wrapText)),s(n.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(n.attributes.shrinkToFit)),s(n.attributes.indent,"indent",parseInt(n.attributes.indent,10)),s(n.attributes.textRotation,"textRotation",e.toModel(n.attributes.textRotation)),s(n.attributes.readingOrder,"readingOrder",n.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=i?l:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(t,b,g){const f=t("../base-xform"),o=t("../../../utils/utils"),a=t("./color-xform");class r extends f{constructor(n){super(),this.name=n,this.map={color:new a}}get tag(){return this.name}render(n,l,i){const s=l&&l.color||i||this.defaultColor;n.openNode(this.name),l&&l.style&&(n.addAttribute("style",l.style),s&&this.map.color.render(n,s)),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.name:{const{style:l}=n.attributes;return this.model=l?{style:l}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):(n===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(n){return r.validStyleValues[n]}}r.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((e,n)=>(e[n]=!0,e),{}),b.exports=class extends f{constructor(){super(),this.map={top:new r("top"),left:new r("left"),bottom:new r("bottom"),right:new r("right"),diagonal:new r("diagonal")}}render(e,n){const{color:l}=n;function i(s,h){s&&!s.color&&n.color&&(s={...s,color:n.color}),h.render(e,s,l)}e.openNode("border"),n.diagonal&&n.diagonal.style&&(n.diagonal.up&&e.addAttribute("diagonalUp","1"),n.diagonal.down&&e.addAttribute("diagonalDown","1")),i(n.left,this.map.left),i(n.right,this.map.right),i(n.top,this.map.top),i(n.bottom,this.map.bottom),i(n.diagonal,this.map.diagonal),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"border":return this.reset(),this.diagonalUp=o.parseBoolean(e.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(e.attributes.diagonalDown),!0;default:return this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if(e==="border"){const n=this.model={},l=function(i,s,h){s&&(h&&Object.assign(s,h),n[i]=s)};l("left",this.map.left.model),l("right",this.map.right.model),l("top",this.map.top.model),l("bottom",this.map.bottom.model),l("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,a){return!!a&&(o.openNode(this.name),a.argb?o.addAttribute("rgb",a.argb):a.theme!==void 0?(o.addAttribute("theme",a.theme),a.tint!==void 0&&o.addAttribute("tint",a.tint)):a.indexed!==void 0?o.addAttribute("indexed",a.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(t,b,g){const f=t("../base-xform"),o=t("./alignment-xform"),a=t("./border-xform"),r=t("./fill-xform"),e=t("./font-xform"),n=t("./numfmt-xform"),l=t("./protection-xform");b.exports=class extends f{constructor(){super(),this.map={alignment:new o,border:new a,fill:new r,font:new e,numFmt:new n,protection:new l}}get tag(){return"dxf"}render(i,s){if(i.openNode(this.tag),s.font&&this.map.font.render(i,s.font),s.numFmt&&s.numFmtId){const h={id:s.numFmtId,formatCode:s.numFmt};this.map.numFmt.render(i,h)}s.fill&&this.map.fill.render(i,s.fill),s.alignment&&this.map.alignment.render(i,s.alignment),s.border&&this.map.border.render(i,s.border),s.protection&&this.map.protection.render(i,s.protection),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i),!0}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(t,b,g){const f=t("../base-xform"),o=t("./color-xform");class a extends f{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(i,s){i.openNode("stop"),i.addAttribute("position",s.position),this.map.color.render(i,s.color),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"stop":return this.model={position:parseFloat(i.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(i),!0;default:return!1}}parseText(){}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class r extends f{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(i,s){i.openNode("patternFill"),i.addAttribute("patternType",s.pattern),s.fgColor&&this.map.fgColor.render(i,s.fgColor),s.bgColor&&this.map.bgColor.render(i,s.bgColor),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"patternFill":return this.model={type:"pattern",pattern:i.attributes.patternType},!0;default:return this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0)}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.parser.model&&(this.model[i]=this.parser.model),this.parser=void 0),!0)}}class e extends f{constructor(){super(),this.map={stop:new a}}get name(){return"gradient"}get tag(){return"gradientFill"}render(i,s){switch(i.openNode("gradientFill"),s.gradient){case"angle":i.addAttribute("degree",s.degree);break;case"path":i.addAttribute("type","path"),s.center.left&&(i.addAttribute("left",s.center.left),s.center.right===void 0&&i.addAttribute("right",s.center.left)),s.center.right&&i.addAttribute("right",s.center.right),s.center.top&&(i.addAttribute("top",s.center.top),s.center.bottom===void 0&&i.addAttribute("bottom",s.center.top)),s.center.bottom&&i.addAttribute("bottom",s.center.bottom)}const h=this.map.stop;s.stops.forEach(d=>{h.render(i,d)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"gradientFill":{const s=this.model={stops:[]};return i.attributes.degree?(s.gradient="angle",s.degree=parseInt(i.attributes.degree,10)):i.attributes.type==="path"&&(s.gradient="path",s.center={left:i.attributes.left?parseFloat(i.attributes.left):0,top:i.attributes.top?parseFloat(i.attributes.top):0},i.attributes.right!==i.attributes.left&&(s.center.right=i.attributes.right?parseFloat(i.attributes.right):0),i.attributes.bottom!==i.attributes.top&&(s.center.bottom=i.attributes.bottom?parseFloat(i.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class n extends f{constructor(){super(),this.map={patternFill:new r,gradientFill:new e}}get tag(){return"fill"}render(i,s){switch(i.addRollback(),i.openNode("fill"),s.type){case"pattern":this.map.patternFill.render(i,s);break;case"gradient":this.map.gradientFill.render(i,s);break;default:return void i.rollback()}i.closeNode(),i.commit()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"fill":return this.model={},!0;default:return this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0)}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(i){return n.validPatternValues[i]}}n.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((l,i)=>(l[i]=!0,l),{}),n.StopXform=a,n.PatternFillXform=r,n.GradientFillXform=e,b.exports=n},{"../base-xform":32,"./color-xform":128}],131:[function(t,b,g){const f=t("./color-xform"),o=t("../simple/boolean-xform"),a=t("../simple/integer-xform"),r=t("../simple/string-xform"),e=t("./underline-xform"),n=t("../../../utils/under-dash"),l=t("../base-xform");class i extends l{constructor(h){super(),this.options=h||i.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new e},charset:{prop:"charset",xform:new a({tag:"charset",attr:"val"})},color:{prop:"color",xform:new f},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new a({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new a({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new r({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(h,d){const{map:c}=this;h.openNode(this.options.tagName),n.each(this.map,(p,m)=>{c[m].xform.render(h,d[p.prop])}),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;if(this.map[h.name])return this.parser=this.map[h.name].xform,this.parser.parseOpen(h);switch(h.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser&&!this.parser.parseClose(h)){const d=this.map[h];return this.parser.model&&(this.model[d.prop]=this.parser.model),this.parser=void 0,!0}switch(h){case this.options.tagName:return!1;default:return!0}}}i.OPTIONS={tagName:"font",fontNameTag:"name"},b.exports=i},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(t,b,g){const f=t("../../../utils/under-dash"),o=t("../../defaultnumformats"),a=t("../base-xform"),r=function(){const n={};return f.each(o,(l,i)=>{l.f&&(n[l.f]=parseInt(i,10))}),n}();class e extends a{constructor(l,i){super(),this.id=l,this.formatCode=i}get tag(){return"numFmt"}render(l,i){l.leafNode("numFmt",{numFmtId:i.id,formatCode:i.formatCode})}parseOpen(l){switch(l.name){case"numFmt":return this.model={id:parseInt(l.attributes.numFmtId,10),formatCode:l.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}e.getDefaultFmtId=function(n){return r[n]},e.getDefaultFmtCode=function(n){return o[n]&&o[n].f},b.exports=e},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(t,b,g){const f=t("../base-xform"),o={boolean:(a,r)=>a===void 0?r:a};b.exports=class extends f{get tag(){return"protection"}render(a,r){a.addRollback(),a.openNode("protection");let e=!1;function n(l,i){i!==void 0&&(a.addAttribute(l,i),e=!0)}n("locked",o.boolean(r.locked,!0)?void 0:"0"),n("hidden",o.boolean(r.hidden,!1)?"1":void 0),a.closeNode(),e?a.commit():a.rollback()}parseOpen(a){const r={locked:a.attributes.locked!=="0",hidden:a.attributes.hidden==="1"},e=!r.locked||r.hidden;this.model=e?r:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(t,b,g){const f=t("../base-xform"),o=t("./alignment-xform"),a=t("./protection-xform");b.exports=class extends f{constructor(r){super(),this.xfId=!(!r||!r.xfId),this.map={alignment:new o,protection:new a}}get tag(){return"xf"}render(r,e){r.openNode("xf",{numFmtId:e.numFmtId||0,fontId:e.fontId||0,fillId:e.fillId||0,borderId:e.borderId||0}),this.xfId&&r.addAttribute("xfId",e.xfId||0),e.numFmtId&&r.addAttribute("applyNumberFormat","1"),e.fontId&&r.addAttribute("applyFont","1"),e.fillId&&r.addAttribute("applyFill","1"),e.borderId&&r.addAttribute("applyBorder","1"),e.alignment&&r.addAttribute("applyAlignment","1"),e.protection&&r.addAttribute("applyProtection","1"),e.alignment&&this.map.alignment.render(r,e.alignment),e.protection&&this.map.protection.render(r,e.protection),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"xf":return this.model={numFmtId:parseInt(r.attributes.numFmtId,10),fontId:parseInt(r.attributes.fontId,10),fillId:parseInt(r.attributes.fillId,10),borderId:parseInt(r.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(r.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(r),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(r),!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):r!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(t,b,g){const f=t("../../../doc/enums"),o=t("../../../utils/xml-stream"),a=t("../base-xform"),r=t("../static-xform"),e=t("../list-xform"),n=t("./font-xform"),l=t("./fill-xform"),i=t("./border-xform"),s=t("./numfmt-xform"),h=t("./style-xform"),d=t("./dxf-xform");class c extends a{constructor(m){super(),this.map={numFmts:new e({tag:"numFmts",count:!0,childXform:new s}),fonts:new e({tag:"fonts",count:!0,childXform:new n,$:{"x14ac:knownFonts":1}}),fills:new e({tag:"fills",count:!0,childXform:new l}),borders:new e({tag:"borders",count:!0,childXform:new i}),cellStyleXfs:new e({tag:"cellStyleXfs",count:!0,childXform:new h}),cellXfs:new e({tag:"cellXfs",count:!0,childXform:new h({xfId:!0})}),dxfs:new e({tag:"dxfs",always:!0,count:!0,childXform:new d}),numFmt:new s,font:new n,fill:new l,border:new i,style:new h({xfId:!0}),cellStyles:c.STATIC_XFORMS.cellStyles,tableStyles:c.STATIC_XFORMS.tableStyles,extLst:c.STATIC_XFORMS.extLst},m&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(m,S){S=S||this.model,m.openXml(o.StdDocAttributes),m.openNode("styleSheet",c.STYLESHEET_ATTRIBUTES),this.index?(S.numFmts&&S.numFmts.length&&(m.openNode("numFmts",{count:S.numFmts.length}),S.numFmts.forEach(C=>{m.writeXml(C)}),m.closeNode()),S.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),m.openNode("fonts",{count:S.fonts.length,"x14ac:knownFonts":1}),S.fonts.forEach(C=>{m.writeXml(C)}),m.closeNode(),m.openNode("fills",{count:S.fills.length}),S.fills.forEach(C=>{m.writeXml(C)}),m.closeNode(),m.openNode("borders",{count:S.borders.length}),S.borders.forEach(C=>{m.writeXml(C)}),m.closeNode(),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),m.openNode("cellXfs",{count:S.styles.length}),S.styles.forEach(C=>{m.writeXml(C)}),m.closeNode()):(this.map.numFmts.render(m,S.numFmts),this.map.fonts.render(m,S.fonts),this.map.fills.render(m,S.fills),this.map.borders.render(m,S.borders),this.map.cellStyleXfs.render(m,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(m,S.styles)),c.STATIC_XFORMS.cellStyles.render(m),this.map.dxfs.render(m,S.dxfs),c.STATIC_XFORMS.tableStyles.render(m),c.STATIC_XFORMS.extLst.render(m),m.closeNode()}parseOpen(m){if(this.parser)return this.parser.parseOpen(m),!0;switch(m.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[m.name],this.parser&&this.parser.parseOpen(m),!0}}parseText(m){this.parser&&this.parser.parseText(m)}parseClose(m){if(this.parser)return this.parser.parseClose(m)||(this.parser=void 0),!0;switch(m){case"styleSheet":{this.model={};const S=(C,M)=>{M.model&&M.model.length&&(this.model[C]=M.model)};if(S("numFmts",this.map.numFmts),S("fonts",this.map.fonts),S("fills",this.map.fills),S("borders",this.map.borders),S("styles",this.map.cellXfs),S("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const C=this.index.numFmt;this.model.numFmts.forEach(M=>{C[M.id]=M.formatCode})}return!1}default:return!0}}addStyleModel(m,S){if(!m)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(m))return this.weakMap.get(m);const C={};if(S=S||f.ValueType.Number,m.numFmt)C.numFmtId=this._addNumFmtStr(m.numFmt);else switch(S){case f.ValueType.Number:C.numFmtId=this._addNumFmtStr("General");break;case f.ValueType.Date:C.numFmtId=this._addNumFmtStr("mm-dd-yy")}m.font&&(C.fontId=this._addFont(m.font)),m.border&&(C.borderId=this._addBorder(m.border)),m.fill&&(C.fillId=this._addFill(m.fill)),m.alignment&&(C.alignment=m.alignment),m.protection&&(C.protection=m.protection);const M=this._addStyle(C);return this.weakMap&&this.weakMap.set(m,M),M}getStyleModel(m){const S=this.model.styles[m];if(!S)return null;let C=this.index.model[m];if(C)return C;if(C=this.index.model[m]={},S.numFmtId){const P=this.index.numFmt[S.numFmtId]||s.getDefaultFmtCode(S.numFmtId);P&&(C.numFmt=P)}function M(P,$,N){if(N||N===0){const B=$[N];B&&(C[P]=B)}}return M("font",this.model.fonts,S.fontId),M("border",this.model.borders,S.borderId),M("fill",this.model.fills,S.fillId),S.alignment&&(C.alignment=S.alignment),S.protection&&(C.protection=S.protection),C}addDxfStyle(m){return m.numFmt&&(m.numFmtId=this._addNumFmtStr(m.numFmt)),this.model.dxfs.push(m),this.model.dxfs.length-1}getDxfStyle(m){return this.model.dxfs[m]}_addStyle(m){const S=this.map.style.toXml(m);let C=this.index.style[S];return C===void 0&&(C=this.index.style[S]=this.model.styles.length,this.model.styles.push(S)),C}_addNumFmtStr(m){let S=s.getDefaultFmtId(m);if(S!==void 0||(S=this.index.numFmt[m],S!==void 0))return S;S=this.index.numFmt[m]=164+this.model.numFmts.length;const C=this.map.numFmt.toXml({id:S,formatCode:m});return this.model.numFmts.push(C),S}_addFont(m){const S=this.map.font.toXml(m);let C=this.index.font[S];return C===void 0&&(C=this.index.font[S]=this.model.fonts.length,this.model.fonts.push(S)),C}_addBorder(m){const S=this.map.border.toXml(m);let C=this.index.border[S];return C===void 0&&(C=this.index.border[S]=this.model.borders.length,this.model.borders.push(S)),C}_addFill(m){const S=this.map.fill.toXml(m);let C=this.index.fill[S];return C===void 0&&(C=this.index.fill[S]=this.model.fills.length,this.model.fills.push(S)),C}}c.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},c.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},c.Mock=class extends c{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(p){return p.autodrain(),Promise.resolve()}addStyleModel(p,m){switch(m){case f.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const p={numFmtId:s.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(p)}return this._dateStyleId}getStyleModel(){return{}}},b.exports=c},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(t,b,g){const f=t("../base-xform");class o extends f{constructor(r){super(),this.model=r}get tag(){return"u"}render(r,e){if((e=e||this.model)===!0)r.leafNode("u");else{const n=o.Attributes[e];n&&r.leafNode("u",n)}}parseOpen(r){r.name==="u"&&(this.model=r.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},b.exports=o},{"../base-xform":32}],137:[function(t,b,g){const f=t("../base-xform"),o=t("./filter-column-xform");b.exports=class extends f{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(a){a.columns.forEach((r,e)=>{this.map.filterColumn.prepare(r,{index:e})})}render(a,r){return a.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(e=>{this.map.filterColumn.render(a,e)}),a.closeNode(),!0}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+a)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"customFilter"}render(o,a){o.leafNode(this.tag,{val:a.val,operator:a.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(t,b,g){const f=t("../base-xform"),o=t("../list-xform"),a=t("./custom-filter-xform"),r=t("./filter-xform");b.exports=class extends f{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new a}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new r})}}get tag(){return"filterColumn"}prepare(e,n){e.colId=n.index.toString()}render(e,n){return n.customFilters?(e.openNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),this.map.customFilters.render(e,n.customFilters),e.closeNode(),!0):(e.leafNode(this.tag,{colId:n.colId,hiddenButton:n.filterButton?"0":"1"}),!0)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{attributes:n}=e;switch(e.name){case this.tag:return this.model={filterButton:n.hiddenButton==="0"},!0;default:if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"filter"}render(o,a){o.leafNode(this.tag,{val:a.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"tableColumn"}prepare(o,a){o.id=a.index+1}render(o,a){return o.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(t,b,g){const f=t("../base-xform");b.exports=class extends f{get tag(){return"tableStyleInfo"}render(o,a){return o.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(t,b,g){const f=t("../../../utils/xml-stream"),o=t("../base-xform"),a=t("../list-xform"),r=t("./auto-filter-xform"),e=t("./table-column-xform"),n=t("./table-style-info-xform");class l extends o{constructor(){super(),this.map={autoFilter:new r,tableColumns:new a({tag:"tableColumns",count:!0,empty:!0,childXform:new e}),tableStyleInfo:new n}}prepare(s,h){this.map.autoFilter.prepare(s),this.map.tableColumns.prepare(s.columns,h)}get tag(){return"table"}render(s,h){s.openXml(f.StdDocAttributes),s.openNode(this.tag,{...l.TABLE_ATTRIBUTES,id:h.id,name:h.name,displayName:h.displayName||h.name,ref:h.tableRef,totalsRowCount:h.totalsRow?"1":void 0,totalsRowShown:h.totalsRow?void 0:"1",headerRowCount:h.headerRow?"1":"0"}),this.map.autoFilter.render(s,h),this.map.tableColumns.render(s,h.columns),this.map.tableStyleInfo.render(s,h.style),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;const{name:h,attributes:d}=s;switch(h){case this.tag:this.reset(),this.model={name:d.name,displayName:d.displayName||d.name,tableRef:d.ref,totalsRow:d.totalsRowCount==="1",headerRow:d.headerRowCount==="1"};break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((h,d)=>{this.model.columns[d].filterButton=h.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(s,h){s.columns.forEach(d=>{d.dxfId!==void 0&&(d.style=h.styles.getDxfStyle(d.dxfId))})}}l.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},b.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(t,b,g){(function(f,o){(function(){const a=t("fs"),r=t("jszip"),{PassThrough:e}=t("readable-stream"),n=t("../utils/zip-stream"),l=t("../utils/stream-buf"),i=t("../utils/utils"),s=t("../utils/xml-stream"),{bufferToString:h}=t("../utils/browser-buffer-decode"),d=t("./xform/style/styles-xform"),c=t("./xform/core/core-xform"),p=t("./xform/strings/shared-strings-xform"),m=t("./xform/core/relationships-xform"),S=t("./xform/core/content-types-xform"),C=t("./xform/core/app-xform"),M=t("./xform/book/workbook-xform"),P=t("./xform/sheet/worksheet-xform"),$=t("./xform/drawing/drawing-xform"),N=t("./xform/table/table-xform"),B=t("./xform/comment/comments-xform"),D=t("./xform/comment/vml-notes-xform"),U=t("./xml/theme1");class z{constructor(O){this.workbook=O}async readFile(O,x){if(!await i.fs.exists(O))throw new Error("File not found: "+O);const y=a.createReadStream(O);try{const v=await this.read(y,x);return y.close(),v}catch(v){throw y.close(),v}}parseRels(O){return new m().parseStream(O)}parseWorkbook(O){return new M().parseStream(O)}parseSharedStrings(O){return new p().parseStream(O)}reconcile(O,x){const y=new M,v=new P(x),w=new $,_=new N;y.reconcile(O);const A={media:O.media,mediaIndex:O.mediaIndex};Object.keys(O.drawings).forEach(H=>{const q=O.drawings[H],X=O.drawingRels[H];X&&(A.rels=X.reduce((F,W)=>(F[W.Id]=W,F),{}),(q.anchors||[]).forEach(F=>{const W=F.picture&&F.picture.hyperlinks;W&&A.rels[W.rId]&&(W.hyperlink=A.rels[W.rId].Target,delete W.rId)}),w.reconcile(q,A))});const j={styles:O.styles};Object.values(O.tables).forEach(H=>{_.reconcile(H,j)});const L={styles:O.styles,sharedStrings:O.sharedStrings,media:O.media,mediaIndex:O.mediaIndex,date1904:O.properties&&O.properties.date1904,drawings:O.drawings,comments:O.comments,tables:O.tables,vmlDrawings:O.vmlDrawings};O.worksheets.forEach(H=>{H.relationships=O.worksheetRels[H.sheetNo],v.reconcile(H,L)}),delete O.worksheetHash,delete O.worksheetRels,delete O.globalRels,delete O.sharedStrings,delete O.workbookRels,delete O.sheetDefs,delete O.styles,delete O.mediaIndex,delete O.drawings,delete O.drawingRels,delete O.vmlDrawings}async _processWorksheetEntry(O,x,y,v,w){const _=new P(v),A=await _.parseStream(O);A.sheetNo=y,x.worksheetHash[w]=A,x.worksheets.push(A)}async _processCommentEntry(O,x,y){const v=new B,w=await v.parseStream(O);x.comments[`../${y}.xml`]=w}async _processTableEntry(O,x,y){const v=new N,w=await v.parseStream(O);x.tables[`../tables/${y}.xml`]=w}async _processWorksheetRelsEntry(O,x,y){const v=new m,w=await v.parseStream(O);x.worksheetRels[y]=w}async _processMediaEntry(O,x,y){const v=y.lastIndexOf(".");if(v>=1){const w=y.substr(v+1),_=y.substr(0,v);await new Promise((A,j)=>{const L=new l;L.on("finish",()=>{x.mediaIndex[y]=x.media.length,x.mediaIndex[_]=x.media.length;const H={type:"image",name:_,extension:w,buffer:L.toBuffer()};x.media.push(H),A()}),O.on("error",H=>{j(H)}),O.pipe(L)})}}async _processDrawingEntry(O,x,y){const v=new $,w=await v.parseStream(O);x.drawings[y]=w}async _processDrawingRelsEntry(O,x,y){const v=new m,w=await v.parseStream(O);x.drawingRels[y]=w}async _processVmlDrawingEntry(O,x,y){const v=new D,w=await v.parseStream(O);x.vmlDrawings[`../drawings/${y}.vml`]=w}async _processThemeEntry(O,x,y){await new Promise((v,w)=>{const _=new l;O.on("error",w),_.on("error",w),_.on("finish",()=>{x.themes[y]=_.read().toString(),v()}),O.pipe(_)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(O,x){!O[Symbol.asyncIterator]&&O.pipe&&(O=O.pipe(new e));const y=[];for await(const v of O)y.push(v);return this.load(o.concat(y),x)}async load(O,x){let y;y=x&&x.base64?o.from(O.toString(),"base64"):O;const v={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},w=await r.loadAsync(y);for(const _ of Object.values(w.files))if(!_.dir){let A,j=_.name;if(j[0]==="/"&&(j=j.substr(1)),j.match(/xl\/media\//)||j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))A=new e,A.write(await _.async("nodebuffer"));else{let L;A=new e({writableObjectMode:!0,readableObjectMode:!0}),L=f.browser?h(await _.async("nodebuffer")):await _.async("string");const H=16384;for(let q=0;q<L.length;q+=H)A.write(L.substring(q,q+H))}switch(A.end(),j){case"_rels/.rels":v.globalRels=await this.parseRels(A);break;case"xl/workbook.xml":{const L=await this.parseWorkbook(A);v.sheets=L.sheets,v.definedNames=L.definedNames,v.views=L.views,v.properties=L.properties,v.calcProperties=L.calcProperties;break}case"xl/_rels/workbook.xml.rels":v.workbookRels=await this.parseRels(A);break;case"xl/sharedStrings.xml":v.sharedStrings=new p,await v.sharedStrings.parseStream(A);break;case"xl/styles.xml":v.styles=new d,await v.styles.parseStream(A);break;case"docProps/app.xml":{const L=new C,H=await L.parseStream(A);v.company=H.company,v.manager=H.manager;break}case"docProps/core.xml":{const L=new c,H=await L.parseStream(A);Object.assign(v,H);break}default:{let L=j.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(L){await this._processWorksheetEntry(A,v,L[1],x,j);break}if(L=j.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),L){await this._processWorksheetRelsEntry(A,v,L[1]);break}if(L=j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),L){await this._processThemeEntry(A,v,L[1]);break}if(L=j.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),L){await this._processMediaEntry(A,v,L[1]);break}if(L=j.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),L){await this._processDrawingEntry(A,v,L[1]);break}if(L=j.match(/xl\/(comments\d+)[.]xml/),L){await this._processCommentEntry(A,v,L[1]);break}if(L=j.match(/xl\/tables\/(table\d+)[.]xml/),L){await this._processTableEntry(A,v,L[1]);break}if(L=j.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),L){await this._processDrawingRelsEntry(A,v,L[1]);break}if(L=j.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),L){await this._processVmlDrawingEntry(A,v,L[1]);break}}}}return this.reconcile(v,x),this.workbook.model=v,this.workbook}async addMedia(O,x){await Promise.all(x.media.map(async y=>{if(y.type==="image"){const v=`xl/media/${y.name}.${y.extension}`;if(y.filename){const w=await function(_,A){return new Promise((j,L)=>{a.readFile(_,A,(H,q)=>{H?L(H):j(q)})})}(y.filename);return O.append(w,{name:v})}if(y.buffer)return O.append(y.buffer,{name:v});if(y.base64){const w=y.base64,_=w.substring(w.indexOf(",")+1);return O.append(_,{name:v,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(O,x){const y=new $,v=new m;x.worksheets.forEach(w=>{const{drawing:_}=w;if(_){y.prepare(_,{});let A=y.toXml(_);O.append(A,{name:`xl/drawings/${_.name}.xml`}),A=v.toXml(_.rels),O.append(A,{name:`xl/drawings/_rels/${_.name}.xml.rels`})}})}addTables(O,x){const y=new N;x.worksheets.forEach(v=>{const{tables:w}=v;w.forEach(_=>{y.prepare(_,{});const A=y.toXml(_);O.append(A,{name:"xl/tables/"+_.target})})})}async addContentTypes(O,x){const y=new S().toXml(x);O.append(y,{name:"[Content_Types].xml"})}async addApp(O,x){const y=new C().toXml(x);O.append(y,{name:"docProps/app.xml"})}async addCore(O,x){const y=new c;O.append(y.toXml(x),{name:"docProps/core.xml"})}async addThemes(O,x){const y=x.themes||{theme1:U};Object.keys(y).forEach(v=>{const w=y[v],_=`xl/theme/${v}.xml`;O.append(w,{name:_})})}async addOfficeRels(O){const x=new m().toXml([{Id:"rId1",Type:z.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:z.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:z.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);O.append(x,{name:"_rels/.rels"})}async addWorkbookRels(O,x){let y=1;const v=[{Id:"rId"+y++,Type:z.RelType.Styles,Target:"styles.xml"},{Id:"rId"+y++,Type:z.RelType.Theme,Target:"theme/theme1.xml"}];x.sharedStrings.count&&v.push({Id:"rId"+y++,Type:z.RelType.SharedStrings,Target:"sharedStrings.xml"}),x.worksheets.forEach(_=>{_.rId="rId"+y++,v.push({Id:_.rId,Type:z.RelType.Worksheet,Target:`worksheets/sheet${_.id}.xml`})});const w=new m().toXml(v);O.append(w,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(O,x){x.sharedStrings&&x.sharedStrings.count&&O.append(x.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(O,x){const{xml:y}=x.styles;y&&O.append(y,{name:"xl/styles.xml"})}async addWorkbook(O,x){const y=new M;O.append(y.toXml(x),{name:"xl/workbook.xml"})}async addWorksheets(O,x){const y=new P,v=new m,w=new B,_=new D;x.worksheets.forEach(A=>{let j=new s;y.render(j,A),O.append(j.xml,{name:`xl/worksheets/sheet${A.id}.xml`}),A.rels&&A.rels.length&&(j=new s,v.render(j,A.rels),O.append(j.xml,{name:`xl/worksheets/_rels/sheet${A.id}.xml.rels`})),A.comments.length>0&&(j=new s,w.render(j,A),O.append(j.xml,{name:`xl/comments${A.id}.xml`}),j=new s,_.render(j,A),O.append(j.xml,{name:`xl/drawings/vmlDrawing${A.id}.vml`}))})}_finalize(O){return new Promise((x,y)=>{O.on("finish",()=>{x(this)}),O.on("error",y),O.finalize()})}prepareModel(O,x){O.creator=O.creator||"ExcelJS",O.lastModifiedBy=O.lastModifiedBy||"ExcelJS",O.created=O.created||new Date,O.modified=O.modified||new Date,O.useSharedStrings=x.useSharedStrings===void 0||x.useSharedStrings,O.useStyles=x.useStyles===void 0||x.useStyles,O.sharedStrings=new p,O.styles=O.useStyles?new d(!0):new d.Mock;const y=new M,v=new P;y.prepare(O);const w={sharedStrings:O.sharedStrings,styles:O.styles,date1904:O.properties.date1904,drawingsCount:0,media:O.media};w.drawings=O.drawings=[],w.commentRefs=O.commentRefs=[];let _=0;O.tables=[],O.worksheets.forEach(A=>{A.tables.forEach(j=>{_++,j.target=`table${_}.xml`,j.id=_,O.tables.push(j)}),v.prepare(A,w)})}async write(O,x){x=x||{};const{model:y}=this.workbook,v=new n.ZipWriter(x.zip);return v.pipe(O),this.prepareModel(y,x),await this.addContentTypes(v,y),await this.addOfficeRels(v,y),await this.addWorkbookRels(v,y),await this.addWorksheets(v,y),await this.addSharedStrings(v,y),await this.addDrawings(v,y),await this.addTables(v,y),await Promise.all([this.addThemes(v,y),this.addStyles(v,y)]),await this.addMedia(v,y),await Promise.all([this.addApp(v,y),this.addCore(v,y)]),await this.addWorkbook(v,y),this._finalize(v)}writeFile(O,x){const y=a.createWriteStream(O);return new Promise((v,w)=>{y.on("finish",()=>{v()}),y.on("error",_=>{w(_)}),this.write(y,x).then(()=>{y.end()}).catch(_=>{w(_)})})}async writeBuffer(O){const x=new l;return await this.write(x,O),x.read()}}z.RelType=t("./rel-type"),b.exports=z}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(t,b,g){b.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
14
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(t,b,g){(function(f){(function(){Object.defineProperty(g,"__esModule",{value:!0}),g.CsvFormatterStream=void 0;const o=t("stream"),a=t("./formatter");class r extends o.Transform{constructor(n){super({writableObjectMode:n.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=n,this.rowFormatter=new a.RowFormatter(n),this.hasWrittenBOM=!n.writeBOM}transform(n){return this.rowFormatter.rowTransform=n,this}_transform(n,l,i){let s=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(n,(h,d)=>h?(s=!0,i(h)):(d&&d.forEach(c=>{this.push(f.from(c,"utf8"))}),s=!0,i()))}catch(h){if(s)throw h;i(h)}}_flush(n){this.rowFormatter.finish((l,i)=>l?n(l):(i&&i.forEach(s=>{this.push(f.from(s,"utf8"))}),n()))}}g.CsvFormatterStream=r}).call(this)}).call(this,t("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.FormatterOptions=void 0,g.FormatterOptions=class{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
|
|
15
|
+
`,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,f||{}),(f==null?void 0:f.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(f==null?void 0:f.quote)===!0?this.quote='"':(f==null?void 0:f.quote)===!1&&(this.quote=""),typeof(f==null?void 0:f.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=f.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(t,b,g){var f=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0}),g.FieldFormatter=void 0;const o=f(t("lodash.isboolean")),a=f(t("lodash.isnil")),r=f(t("lodash.escaperegexp"));g.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,e.headers!==null&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const n=`[${e.delimiter}${r.default(e.rowDelimiter)}|\r|
|
|
16
|
+
]`;this.ESCAPE_REGEXP=new RegExp(n)}set headers(e){this._headers=e}shouldQuote(e,n){const l=n?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return o.default(l)?l:Array.isArray(l)?l[e]:this._headers!==null&&l[this._headers[e]]}format(e,n,l){const i=(""+(a.default(e)?"":e)).replace(/\0/g,""),{formatterOptions:s}=this;return s.quote!==""&&i.indexOf(s.quote)!==-1?this.quoteField(i.replace(this.REPLACE_REGEXP,s.escapedQuote)):i.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(n,l)?this.quoteField(i):i}quoteField(e){const{quote:n}=this.formatterOptions;return`${n}${e}${n}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(t,b,g){var f=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(g,"__esModule",{value:!0}),g.RowFormatter=void 0;const o=f(t("lodash.isfunction")),a=f(t("lodash.isequal")),r=t("./FieldFormatter"),e=t("../types");class n{constructor(i){this.rowCount=0,this.formatterOptions=i,this.fieldFormatter=new r.FieldFormatter(i),this.headers=i.headers,this.shouldWriteHeaders=i.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),i.transform&&(this.rowTransform=i.transform)}static isRowHashArray(i){return!!Array.isArray(i)&&Array.isArray(i[0])&&i[0].length===2}static isRowArray(i){return Array.isArray(i)&&!this.isRowHashArray(i)}static gatherHeaders(i){return n.isRowHashArray(i)?i.map(s=>s[0]):Array.isArray(i)?i:Object.keys(i)}static createTransform(i){return e.isSyncTransform(i)?(s,h)=>{let d=null;try{d=i(s)}catch(c){return h(c)}return h(null,d)}:(s,h)=>{i(s,h)}}set rowTransform(i){if(!o.default(i))throw new TypeError("The transform should be a function");this._rowTransform=n.createTransform(i)}format(i,s){this.callTransformer(i,(h,d)=>{if(h)return s(h);if(!i)return s(null);const c=[];if(d){const{shouldFormatColumns:p,headers:m}=this.checkHeaders(d);if(this.shouldWriteHeaders&&m&&!this.hasWrittenHeaders&&(c.push(this.formatColumns(m,!0)),this.hasWrittenHeaders=!0),p){const S=this.gatherColumns(d);c.push(this.formatColumns(S,!1))}}return s(null,c)})}finish(i){const s=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return i(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));s.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&s.push(this.formatterOptions.rowDelimiter),i(null,s)}checkHeaders(i){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const s=n.gatherHeaders(i);return this.headers=s,this.fieldFormatter.headers=s,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(s,i),headers:s}:{shouldFormatColumns:!0,headers:null}}gatherColumns(i){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(i)?n.isRowHashArray(i)?this.headers.map((s,h)=>{const d=i[h];return d?d[1]:""}):n.isRowArray(i)&&!this.shouldWriteHeaders?i:this.headers.map((s,h)=>i[h]):this.headers.map(s=>i[s])}callTransformer(i,s){return this._rowTransform?this._rowTransform(i,s):s(null,i)}formatColumns(i,s){const h=i.map((c,p)=>this.fieldFormatter.format(c,p,s)).join(this.formatterOptions.delimiter),{rowCount:d}=this;return this.rowCount+=1,d?[this.formatterOptions.rowDelimiter,h].join(""):h}}g.RowFormatter=n},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.FieldFormatter=g.RowFormatter=void 0;var f=t("./RowFormatter");Object.defineProperty(g,"RowFormatter",{enumerable:!0,get:function(){return f.RowFormatter}});var o=t("./FieldFormatter");Object.defineProperty(g,"FieldFormatter",{enumerable:!0,get:function(){return o.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(t,b,g){(function(f){(function(){var o=Object.create?function(p,m,S,C){C===void 0&&(C=S),Object.defineProperty(p,C,{enumerable:!0,get:function(){return m[S]}})}:function(p,m,S,C){C===void 0&&(C=S),p[C]=m[S]},a=Object.create?function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}:function(p,m){p.default=m},r=function(p){if(p&&p.__esModule)return p;var m={};if(p!=null)for(var S in p)S!=="default"&&Object.prototype.hasOwnProperty.call(p,S)&&o(m,p,S);return a(m,p),m},e=function(p,m){for(var S in p)S==="default"||Object.prototype.hasOwnProperty.call(m,S)||o(m,p,S)};Object.defineProperty(g,"__esModule",{value:!0}),g.writeToPath=g.writeToString=g.writeToBuffer=g.writeToStream=g.write=g.format=g.FormatterOptions=g.CsvFormatterStream=void 0;const n=t("util"),l=t("stream"),i=r(t("fs")),s=t("./FormatterOptions"),h=t("./CsvFormatterStream");e(t("./types"),g);var d=t("./CsvFormatterStream");Object.defineProperty(g,"CsvFormatterStream",{enumerable:!0,get:function(){return d.CsvFormatterStream}});var c=t("./FormatterOptions");Object.defineProperty(g,"FormatterOptions",{enumerable:!0,get:function(){return c.FormatterOptions}}),g.format=p=>new h.CsvFormatterStream(new s.FormatterOptions(p)),g.write=(p,m)=>{const S=g.format(m),C=n.promisify((M,P)=>{S.write(M,void 0,P)});return p.reduce((M,P)=>M.then(()=>C(P)),Promise.resolve()).then(()=>S.end()).catch(M=>{S.emit("error",M)}),S},g.writeToStream=(p,m,S)=>g.write(m,S).pipe(p),g.writeToBuffer=function(p){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const S=[],C=new l.Writable({write(M,P,$){S.push(M),$()}});return new Promise((M,P)=>{C.on("error",P).on("finish",()=>M(f.concat(S))),g.write(p,m).pipe(C)})},g.writeToString=(p,m)=>g.writeToBuffer(p,m).then(S=>S.toString()),g.writeToPath=(p,m,S)=>{const C=i.createWriteStream(p,{encoding:"utf8"});return g.write(m,S).pipe(C)}}).call(this)}).call(this,t("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.isSyncTransform=void 0,g.isSyncTransform=f=>f.length===1},{}],153:[function(t,b,g){(function(f){(function(){Object.defineProperty(g,"__esModule",{value:!0}),g.CsvParserStream=void 0;const o=t("string_decoder"),a=t("stream"),r=t("./transforms"),e=t("./parser");class n extends a.Transform{constructor(i){super({objectMode:i.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=i,this.parser=new e.Parser(i),this.headerTransformer=new r.HeaderTransformer(i),this.decoder=new o.StringDecoder(i.encoding),this.rowTransformerValidator=new r.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(i){return this.rowTransformerValidator.rowTransform=i,this}validate(i){return this.rowTransformerValidator.rowValidator=i,this}emit(i){if(i==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var s=arguments.length,h=new Array(s>1?s-1:0),d=1;d<s;d++)h[d-1]=arguments[d];return super.emit(i,...h)}_transform(i,s,h){if(this.hasHitRowLimit)return h();const d=n.wrapDoneCallback(h);try{const{lines:c}=this,p=c+this.decoder.write(i),m=this.parse(p,!0);return this.processRows(m,d)}catch(c){return d(c)}}_flush(i){const s=n.wrapDoneCallback(i);if(this.hasHitRowLimit)return s();try{const h=this.lines+this.decoder.end(),d=this.parse(h,!1);return this.processRows(d,s)}catch(h){return s(h)}}parse(i,s){if(!i)return[];const{line:h,rows:d}=this.parser.parse(i,s);return this.lines=h,d}processRows(i,s){const h=i.length,d=c=>{const p=C=>C?s(C):c%100!=0?d(c+1):void f(()=>d(c+1));if(this.checkAndEmitHeaders(),c>=h||this.hasHitRowLimit)return s();if(this.parsedLineCount+=1,this.shouldSkipLine)return p();const m=i[c];this.rowCount+=1,this.parsedRowCount+=1;const S=this.rowCount;return this.transformRow(m,(C,M)=>{if(C)return this.rowCount-=1,p(C);if(!M)return p(new Error("expected transform result"));if(M.isValid){if(M.row)return this.pushRow(M.row,p)}else this.emit("data-invalid",M.row,S,M.reason);return p()})};d(0)}transformRow(i,s){try{this.headerTransformer.transform(i,(h,d)=>h?s(h):d?d.isValid?d.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(d.row,s):this.skipRow(s):(this.rowCount-=1,this.parsedRowCount-=1,s(null,{row:null,isValid:!0})):this.shouldEmitRows?s(null,{isValid:!1,row:i}):this.skipRow(s):s(new Error("Expected result from header transform")))}catch(h){s(h)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(i){return this.rowCount-=1,i(null,{row:null,isValid:!0})}pushRow(i,s){try{this.parserOptions.objectMode?this.push(i):this.push(JSON.stringify(i)),s()}catch(h){s(h)}}static wrapDoneCallback(i){let s=!1;return function(h){if(h){if(s)throw h;return s=!0,void i(h)}for(var d=arguments.length,c=new Array(d>1?d-1:0),p=1;p<d;p++)c[p-1]=arguments[p];i(...c)}}}g.CsvParserStream=n}).call(this)}).call(this,t("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(t,b,g){var f=function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(g,"__esModule",{value:!0}),g.ParserOptions=void 0;const o=f(t("lodash.escaperegexp")),a=f(t("lodash.isnil"));g.ParserOptions=class{constructor(r){var e;if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,r||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=o.default(this.delimiter),this.escapeChar=(e=this.escape)!==null&&e!==void 0?e:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(t,b,g){var f=Object.create?function(d,c,p,m){m===void 0&&(m=p),Object.defineProperty(d,m,{enumerable:!0,get:function(){return c[p]}})}:function(d,c,p,m){m===void 0&&(m=p),d[m]=c[p]},o=Object.create?function(d,c){Object.defineProperty(d,"default",{enumerable:!0,value:c})}:function(d,c){d.default=c},a=function(d){if(d&&d.__esModule)return d;var c={};if(d!=null)for(var p in d)p!=="default"&&Object.prototype.hasOwnProperty.call(d,p)&&f(c,d,p);return o(c,d),c},r=function(d,c){for(var p in d)p==="default"||Object.prototype.hasOwnProperty.call(c,p)||f(c,d,p)};Object.defineProperty(g,"__esModule",{value:!0}),g.parseString=g.parseFile=g.parseStream=g.parse=g.ParserOptions=g.CsvParserStream=void 0;const e=a(t("fs")),n=t("stream"),l=t("./ParserOptions"),i=t("./CsvParserStream");r(t("./types"),g);var s=t("./CsvParserStream");Object.defineProperty(g,"CsvParserStream",{enumerable:!0,get:function(){return s.CsvParserStream}});var h=t("./ParserOptions");Object.defineProperty(g,"ParserOptions",{enumerable:!0,get:function(){return h.ParserOptions}}),g.parse=d=>new i.CsvParserStream(new l.ParserOptions(d)),g.parseStream=(d,c)=>d.pipe(new i.CsvParserStream(new l.ParserOptions(c))),g.parseFile=function(d){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.createReadStream(d).pipe(new i.CsvParserStream(new l.ParserOptions(c)))},g.parseString=(d,c)=>{const p=new n.Readable;return p.push(d),p.push(null),p.pipe(new i.CsvParserStream(new l.ParserOptions(c)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.Parser=void 0;const f=t("./Scanner"),o=t("./RowParser"),a=t("./Token");class r{constructor(n){this.parserOptions=n,this.rowParser=new o.RowParser(this.parserOptions)}static removeBOM(n){return n&&n.charCodeAt(0)===65279?n.slice(1):n}parse(n,l){const i=new f.Scanner({line:r.removeBOM(n),parserOptions:this.parserOptions,hasMoreData:l});return this.parserOptions.supportsComments?this.parseWithComments(i):this.parseWithoutComments(i)}parseWithoutComments(n){const l=[];let i=!0;for(;i;)i=this.parseRow(n,l);return{line:n.line,rows:l}}parseWithComments(n){const{parserOptions:l}=this,i=[];for(let s=n.nextCharacterToken;s!==null;s=n.nextCharacterToken)if(a.Token.isTokenComment(s,l)){if(n.advancePastLine()===null)return{line:n.lineFromCursor,rows:i};if(!n.hasMoreCharacters)return{line:n.lineFromCursor,rows:i};n.truncateToCursor()}else if(!this.parseRow(n,i))break;return{line:n.line,rows:i}}parseRow(n,l){if(!n.nextNonSpaceToken)return!1;const i=this.rowParser.parse(n);return i!==null&&(this.parserOptions.ignoreEmpty&&o.RowParser.isEmptyRow(i)||l.push(i),!0)}}g.Parser=r},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.RowParser=void 0;const f=t("./column"),o=t("./Token");g.RowParser=class{constructor(a){this.parserOptions=a,this.columnParser=new f.ColumnParser(a)}static isEmptyRow(a){return a.join("").replace(/\s+/g,"")===""}parse(a){const{parserOptions:r}=this,{hasMoreData:e}=a,n=a,l=[];let i=this.getStartToken(n,l);for(;i;){if(o.Token.isTokenRowDelimiter(i))return n.advancePastToken(i),!n.hasMoreCharacters&&o.Token.isTokenCarriageReturn(i,r)&&e?null:(n.truncateToCursor(),l);if(!this.shouldSkipColumnParse(n,i,l)){const s=this.columnParser.parse(n);if(s===null)return null;l.push(s)}i=n.nextNonSpaceToken}return e?null:(n.truncateToCursor(),l)}getStartToken(a,r){const e=a.nextNonSpaceToken;return e!==null&&o.Token.isTokenDelimiter(e,this.parserOptions)?(r.push(""),a.nextNonSpaceToken):e}shouldSkipColumnParse(a,r,e){const{parserOptions:n}=this;if(o.Token.isTokenDelimiter(r,n)){a.advancePastToken(r);const l=a.nextCharacterToken;if(!a.hasMoreCharacters||l!==null&&o.Token.isTokenRowDelimiter(l)||l!==null&&o.Token.isTokenDelimiter(l,n))return e.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.Scanner=void 0;const f=t("./Token"),o=/((?:\r\n)|\n|\r)/;g.Scanner=class{constructor(a){this.cursor=0,this.line=a.line,this.lineLength=this.line.length,this.parserOptions=a.parserOptions,this.hasMoreData=a.hasMoreData,this.cursor=a.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:a}=this,r=this.parserOptions.NEXT_TOKEN_REGEXP;if(a.search(r)===-1)return null;const e=r.exec(a);if(e==null)return null;const n=e[1],l=this.cursor+(e.index||0);return new f.Token({token:n,startCursor:l,endCursor:l+n.length-1})}get nextCharacterToken(){const{cursor:a,lineLength:r}=this;return r<=a?null:new f.Token({token:this.line[a],startCursor:a,endCursor:a})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const a=o.exec(this.lineFromCursor);return a?(this.cursor+=(a.index||0)+a[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(a){return this.cursor=a,this}advanceToToken(a){return this.cursor=a.startCursor,this}advancePastToken(a){return this.cursor=a.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.Token=void 0,g.Token=class{constructor(f){this.token=f.token,this.startCursor=f.startCursor,this.endCursor=f.endCursor}static isTokenRowDelimiter(f){const o=f.token;return o==="\r"||o===`
|
|
17
|
+
`||o===`\r
|
|
18
|
+
`}static isTokenCarriageReturn(f,o){return f.token===o.carriageReturn}static isTokenComment(f,o){return o.supportsComments&&!!f&&f.token===o.comment}static isTokenEscapeCharacter(f,o){return f.token===o.escapeChar}static isTokenQuote(f,o){return f.token===o.quote}static isTokenDelimiter(f,o){return f.token===o.delimiter}}},{}],160:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.ColumnFormatter=void 0,g.ColumnFormatter=class{constructor(f){f.trim?this.format=o=>o.trim():f.ltrim?this.format=o=>o.trimLeft():f.rtrim?this.format=o=>o.trimRight():this.format=o=>o}}},{}],161:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.ColumnParser=void 0;const f=t("./NonQuotedColumnParser"),o=t("./QuotedColumnParser"),a=t("../Token");g.ColumnParser=class{constructor(r){this.parserOptions=r,this.quotedColumnParser=new o.QuotedColumnParser(r),this.nonQuotedColumnParser=new f.NonQuotedColumnParser(r)}parse(r){const{nextNonSpaceToken:e}=r;return e!==null&&a.Token.isTokenQuote(e,this.parserOptions)?(r.advanceToToken(e),this.quotedColumnParser.parse(r)):this.nonQuotedColumnParser.parse(r)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.NonQuotedColumnParser=void 0;const f=t("./ColumnFormatter"),o=t("../Token");g.NonQuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new f.ColumnFormatter(a)}parse(a){if(!a.hasMoreCharacters)return null;const{parserOptions:r}=this,e=[];let n=a.nextCharacterToken;for(;n&&!o.Token.isTokenDelimiter(n,r)&&!o.Token.isTokenRowDelimiter(n);n=a.nextCharacterToken)e.push(n.token),a.advancePastToken(n);return this.columnFormatter.format(e.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.QuotedColumnParser=void 0;const f=t("./ColumnFormatter"),o=t("../Token");g.QuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new f.ColumnFormatter(a)}parse(a){if(!a.hasMoreCharacters)return null;const r=a.cursor,{foundClosingQuote:e,col:n}=this.gatherDataBetweenQuotes(a);if(!e){if(a.advanceTo(r),!a.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${a.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(a),n}gatherDataBetweenQuotes(a){const{parserOptions:r}=this;let e=!1,n=!1;const l=[];let i=a.nextCharacterToken;for(;!n&&i!==null;i=a.nextCharacterToken){const s=o.Token.isTokenQuote(i,r);if(!e&&s)e=!0;else if(e)if(o.Token.isTokenEscapeCharacter(i,r)){a.advancePastToken(i);const h=a.nextCharacterToken;h!==null&&(o.Token.isTokenQuote(h,r)||o.Token.isTokenEscapeCharacter(h,r))?(l.push(h.token),i=h):s?n=!0:l.push(i.token)}else s?n=!0:l.push(i.token);a.advancePastToken(i)}return{col:this.columnFormatter.format(l.join("")),foundClosingQuote:n}}checkForMalformedColumn(a){const{parserOptions:r}=this,{nextNonSpaceToken:e}=a;if(e){const n=o.Token.isTokenDelimiter(e,r),l=o.Token.isTokenRowDelimiter(e);if(!n&&!l){const i=a.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${r.escapedDelimiter}' OR new line got: '${e.token}'. at '${i}`)}a.advanceToToken(e)}else a.hasMoreData||a.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.ColumnFormatter=g.QuotedColumnParser=g.NonQuotedColumnParser=g.ColumnParser=void 0;var f=t("./ColumnParser");Object.defineProperty(g,"ColumnParser",{enumerable:!0,get:function(){return f.ColumnParser}});var o=t("./NonQuotedColumnParser");Object.defineProperty(g,"NonQuotedColumnParser",{enumerable:!0,get:function(){return o.NonQuotedColumnParser}});var a=t("./QuotedColumnParser");Object.defineProperty(g,"QuotedColumnParser",{enumerable:!0,get:function(){return a.QuotedColumnParser}});var r=t("./ColumnFormatter");Object.defineProperty(g,"ColumnFormatter",{enumerable:!0,get:function(){return r.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.QuotedColumnParser=g.NonQuotedColumnParser=g.ColumnParser=g.Token=g.Scanner=g.RowParser=g.Parser=void 0;var f=t("./Parser");Object.defineProperty(g,"Parser",{enumerable:!0,get:function(){return f.Parser}});var o=t("./RowParser");Object.defineProperty(g,"RowParser",{enumerable:!0,get:function(){return o.RowParser}});var a=t("./Scanner");Object.defineProperty(g,"Scanner",{enumerable:!0,get:function(){return a.Scanner}});var r=t("./Token");Object.defineProperty(g,"Token",{enumerable:!0,get:function(){return r.Token}});var e=t("./column");Object.defineProperty(g,"ColumnParser",{enumerable:!0,get:function(){return e.ColumnParser}}),Object.defineProperty(g,"NonQuotedColumnParser",{enumerable:!0,get:function(){return e.NonQuotedColumnParser}}),Object.defineProperty(g,"QuotedColumnParser",{enumerable:!0,get:function(){return e.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(t,b,g){var f=function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(g,"__esModule",{value:!0}),g.HeaderTransformer=void 0;const o=f(t("lodash.isundefined")),a=f(t("lodash.isfunction")),r=f(t("lodash.uniq")),e=f(t("lodash.groupby"));g.HeaderTransformer=class{constructor(n){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=n,n.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(n.headers)?this.setHeaders(n.headers):a.default(n.headers)&&(this.headersTransform=n.headers)}transform(n,l){return this.shouldMapRow(n)?l(null,this.processRow(n)):l(null,{row:null,isValid:!0})}shouldMapRow(n){const{parserOptions:l}=this;if(!this.headersTransform&&l.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(n)){if(this.headersTransform)this.setHeaders(this.headersTransform(n));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(n)}return!1}return!0}processRow(n){if(!this.headers)return{row:n,isValid:!0};const{parserOptions:l}=this;if(!l.discardUnmappedColumns&&n.length>this.headersLength){if(!l.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${n.length}`);return{row:n,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${n.length}`}}return l.strictColumnHandling&&n.length<this.headersLength?{row:n,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${n.length}`}:{row:this.mapHeaders(n),isValid:!0}}mapHeaders(n){const l={},{headers:i,headersLength:s}=this;for(let h=0;h<s;h+=1){const d=i[h];if(!o.default(d)){const c=n[h];o.default(c)?l[d]="":l[d]=c}}return l}setHeaders(n){var l;const i=n.filter(s=>!!s);if(r.default(i).length!==i.length){const s=e.default(i),h=Object.keys(s).filter(d=>s[d].length>1);throw new Error("Duplicate headers found "+JSON.stringify(h))}this.headers=n,this.receivedHeaders=!0,this.headersLength=((l=this.headers)===null||l===void 0?void 0:l.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(t,b,g){var f=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(g,"__esModule",{value:!0}),g.RowTransformerValidator=void 0;const o=f(t("lodash.isfunction")),a=t("../types");class r{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(n){return a.isSyncTransform(n)?(l,i)=>{let s=null;try{s=n(l)}catch(h){return i(h)}return i(null,s)}:n}static createValidator(n){return a.isSyncValidate(n)?(l,i)=>{i(null,{row:l,isValid:n(l)})}:(l,i)=>{n(l,(s,h,d)=>s?i(s):i(null,h?{row:l,isValid:h,reason:d}:{row:l,isValid:!1,reason:d}))}}set rowTransform(n){if(!o.default(n))throw new TypeError("The transform should be a function");this._rowTransform=r.createTransform(n)}set rowValidator(n){if(!o.default(n))throw new TypeError("The validate should be a function");this._rowValidator=r.createValidator(n)}transformAndValidate(n,l){return this.callTransformer(n,(i,s)=>i?l(i):s?this.callValidator(s,(h,d)=>h?l(h):d&&!d.isValid?l(null,{row:s,isValid:!1,reason:d.reason}):l(null,{row:s,isValid:!0})):l(null,{row:null,isValid:!0}))}callTransformer(n,l){return this._rowTransform?this._rowTransform(n,l):l(null,n)}callValidator(n,l){return this._rowValidator?this._rowValidator(n,l):l(null,{row:n,isValid:!0})}}g.RowTransformerValidator=r},{"../types":169,"lodash.isfunction":446}],168:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.HeaderTransformer=g.RowTransformerValidator=void 0;var f=t("./RowTransformerValidator");Object.defineProperty(g,"RowTransformerValidator",{enumerable:!0,get:function(){return f.RowTransformerValidator}});var o=t("./HeaderTransformer");Object.defineProperty(g,"HeaderTransformer",{enumerable:!0,get:function(){return o.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.isSyncValidate=g.isSyncTransform=void 0,g.isSyncTransform=f=>f.length===1,g.isSyncValidate=f=>f.length===1},{}],170:[function(t,b,g){const f=g;f.bignum=t("bn.js"),f.define=t("./asn1/api").define,f.base=t("./asn1/base"),f.constants=t("./asn1/constants"),f.decoders=t("./asn1/decoders"),f.encoders=t("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(t,b,g){const f=t("./encoders"),o=t("./decoders"),a=t("inherits");function r(e,n){this.name=e,this.body=n,this.decoders={},this.encoders={}}g.define=function(e,n){return new r(e,n)},r.prototype._createNamed=function(e){const n=this.name;function l(i){this._initNamed(i,n)}return a(l,e),l.prototype._initNamed=function(i,s){e.call(this,i,s)},new l(this)},r.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(o[e])),this.decoders[e]},r.prototype.decode=function(e,n,l){return this._getDecoder(n).decode(e,l)},r.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(f[e])),this.encoders[e]},r.prototype.encode=function(e,n,l){return this._getEncoder(n).encode(e,l)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(t,b,g){const f=t("inherits"),o=t("../base/reporter").Reporter,a=t("safer-buffer").Buffer;function r(n,l){o.call(this,l),a.isBuffer(n)?(this.base=n,this.offset=0,this.length=n.length):this.error("Input not Buffer")}function e(n,l){if(Array.isArray(n))this.length=0,this.value=n.map(function(i){return e.isEncoderBuffer(i)||(i=new e(i,l)),this.length+=i.length,i},this);else if(typeof n=="number"){if(!(0<=n&&n<=255))return l.error("non-byte EncoderBuffer value");this.value=n,this.length=1}else if(typeof n=="string")this.value=n,this.length=a.byteLength(n);else{if(!a.isBuffer(n))return l.error("Unsupported type: "+typeof n);this.value=n,this.length=n.length}}f(r,o),g.DecoderBuffer=r,r.isDecoderBuffer=function(n){return n instanceof r?!0:typeof n=="object"&&a.isBuffer(n.base)&&n.constructor.name==="DecoderBuffer"&&typeof n.offset=="number"&&typeof n.length=="number"&&typeof n.save=="function"&&typeof n.restore=="function"&&typeof n.isEmpty=="function"&&typeof n.readUInt8=="function"&&typeof n.skip=="function"&&typeof n.raw=="function"},r.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},r.prototype.restore=function(n){const l=new r(this.base);return l.offset=n.offset,l.length=this.offset,this.offset=n.offset,o.prototype.restore.call(this,n.reporter),l},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(n){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(n||"DecoderBuffer overrun")},r.prototype.skip=function(n,l){if(!(this.offset+n<=this.length))return this.error(l||"DecoderBuffer overrun");const i=new r(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+n,this.offset+=n,i},r.prototype.raw=function(n){return this.base.slice(n?n.offset:this.offset,this.length)},g.EncoderBuffer=e,e.isEncoderBuffer=function(n){return n instanceof e?!0:typeof n=="object"&&n.constructor.name==="EncoderBuffer"&&typeof n.length=="number"&&typeof n.join=="function"},e.prototype.join=function(n,l){return n||(n=a.alloc(this.length)),l||(l=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(n,l),l+=i.length}):(typeof this.value=="number"?n[l]=this.value:typeof this.value=="string"?n.write(this.value,l):a.isBuffer(this.value)&&this.value.copy(n,l),l+=this.length)),n}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(t,b,g){const f=g;f.Reporter=t("./reporter").Reporter,f.DecoderBuffer=t("./buffer").DecoderBuffer,f.EncoderBuffer=t("./buffer").EncoderBuffer,f.Node=t("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(t,b,g){const f=t("../base/reporter").Reporter,o=t("../base/buffer").EncoderBuffer,a=t("../base/buffer").DecoderBuffer,r=t("minimalistic-assert"),e=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],n=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(e);function l(s,h,d){const c={};this._baseState=c,c.name=d,c.enc=s,c.parent=h||null,c.children=null,c.tag=null,c.args=null,c.reverseArgs=null,c.choice=null,c.optional=!1,c.any=!1,c.obj=!1,c.use=null,c.useDecoder=null,c.key=null,c.default=null,c.explicit=null,c.implicit=null,c.contains=null,c.parent||(c.children=[],this._wrap())}b.exports=l;const i=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){const s=this._baseState,h={};i.forEach(function(c){h[c]=s[c]});const d=new this.constructor(h.parent);return d._baseState=h,d},l.prototype._wrap=function(){const s=this._baseState;n.forEach(function(h){this[h]=function(){const d=new this.constructor(this);return s.children.push(d),d[h].apply(d,arguments)}},this)},l.prototype._init=function(s){const h=this._baseState;r(h.parent===null),s.call(this),h.children=h.children.filter(function(d){return d._baseState.parent===this},this),r.equal(h.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(s){const h=this._baseState,d=s.filter(function(c){return c instanceof this.constructor},this);s=s.filter(function(c){return!(c instanceof this.constructor)},this),d.length!==0&&(r(h.children===null),h.children=d,d.forEach(function(c){c._baseState.parent=this},this)),s.length!==0&&(r(h.args===null),h.args=s,h.reverseArgs=s.map(function(c){if(typeof c!="object"||c.constructor!==Object)return c;const p={};return Object.keys(c).forEach(function(m){m==(0|m)&&(m|=0);const S=c[m];p[S]=m}),p}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(s){l.prototype[s]=function(){const h=this._baseState;throw new Error(s+" not implemented for encoding: "+h.enc)}}),e.forEach(function(s){l.prototype[s]=function(){const h=this._baseState,d=Array.prototype.slice.call(arguments);return r(h.tag===null),h.tag=s,this._useArgs(d),this}}),l.prototype.use=function(s){r(s);const h=this._baseState;return r(h.use===null),h.use=s,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(s){const h=this._baseState;return r(h.default===null),h.default=s,h.optional=!0,this},l.prototype.explicit=function(s){const h=this._baseState;return r(h.explicit===null&&h.implicit===null),h.explicit=s,this},l.prototype.implicit=function(s){const h=this._baseState;return r(h.explicit===null&&h.implicit===null),h.implicit=s,this},l.prototype.obj=function(){const s=this._baseState,h=Array.prototype.slice.call(arguments);return s.obj=!0,h.length!==0&&this._useArgs(h),this},l.prototype.key=function(s){const h=this._baseState;return r(h.key===null),h.key=s,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(s){const h=this._baseState;return r(h.choice===null),h.choice=s,this._useArgs(Object.keys(s).map(function(d){return s[d]})),this},l.prototype.contains=function(s){const h=this._baseState;return r(h.use===null),h.contains=s,this},l.prototype._decode=function(s,h){const d=this._baseState;if(d.parent===null)return s.wrapResult(d.children[0]._decode(s,h));let c,p=d.default,m=!0,S=null;if(d.key!==null&&(S=s.enterKey(d.key)),d.optional){let C=null;if(d.explicit!==null?C=d.explicit:d.implicit!==null?C=d.implicit:d.tag!==null&&(C=d.tag),C!==null||d.any){if(m=this._peekTag(s,C,d.any),s.isError(m))return m}else{const M=s.save();try{d.choice===null?this._decodeGeneric(d.tag,s,h):this._decodeChoice(s,h),m=!0}catch{m=!1}s.restore(M)}}if(d.obj&&m&&(c=s.enterObject()),m){if(d.explicit!==null){const M=this._decodeTag(s,d.explicit);if(s.isError(M))return M;s=M}const C=s.offset;if(d.use===null&&d.choice===null){let M;d.any&&(M=s.save());const P=this._decodeTag(s,d.implicit!==null?d.implicit:d.tag,d.any);if(s.isError(P))return P;d.any?p=s.raw(M):s=P}if(h&&h.track&&d.tag!==null&&h.track(s.path(),C,s.length,"tagged"),h&&h.track&&d.tag!==null&&h.track(s.path(),s.offset,s.length,"content"),d.any||(p=d.choice===null?this._decodeGeneric(d.tag,s,h):this._decodeChoice(s,h)),s.isError(p))return p;if(d.any||d.choice!==null||d.children===null||d.children.forEach(function(M){M._decode(s,h)}),d.contains&&(d.tag==="octstr"||d.tag==="bitstr")){const M=new a(p);p=this._getUse(d.contains,s._reporterState.obj)._decode(M,h)}}return d.obj&&m&&(p=s.leaveObject(c)),d.key===null||p===null&&m!==!0?S!==null&&s.exitKey(S):s.leaveKey(S,d.key,p),p},l.prototype._decodeGeneric=function(s,h,d){const c=this._baseState;return s==="seq"||s==="set"?null:s==="seqof"||s==="setof"?this._decodeList(h,s,c.args[0],d):/str$/.test(s)?this._decodeStr(h,s,d):s==="objid"&&c.args?this._decodeObjid(h,c.args[0],c.args[1],d):s==="objid"?this._decodeObjid(h,null,null,d):s==="gentime"||s==="utctime"?this._decodeTime(h,s,d):s==="null_"?this._decodeNull(h,d):s==="bool"?this._decodeBool(h,d):s==="objDesc"?this._decodeStr(h,s,d):s==="int"||s==="enum"?this._decodeInt(h,c.args&&c.args[0],d):c.use!==null?this._getUse(c.use,h._reporterState.obj)._decode(h,d):h.error("unknown tag: "+s)},l.prototype._getUse=function(s,h){const d=this._baseState;return d.useDecoder=this._use(s,h),r(d.useDecoder._baseState.parent===null),d.useDecoder=d.useDecoder._baseState.children[0],d.implicit!==d.useDecoder._baseState.implicit&&(d.useDecoder=d.useDecoder.clone(),d.useDecoder._baseState.implicit=d.implicit),d.useDecoder},l.prototype._decodeChoice=function(s,h){const d=this._baseState;let c=null,p=!1;return Object.keys(d.choice).some(function(m){const S=s.save(),C=d.choice[m];try{const M=C._decode(s,h);if(s.isError(M))return!1;c={type:m,value:M},p=!0}catch{return s.restore(S),!1}return!0},this),p?c:s.error("Choice not matched")},l.prototype._createEncoderBuffer=function(s){return new o(s,this.reporter)},l.prototype._encode=function(s,h,d){const c=this._baseState;if(c.default!==null&&c.default===s)return;const p=this._encodeValue(s,h,d);return p===void 0||this._skipDefault(p,h,d)?void 0:p},l.prototype._encodeValue=function(s,h,d){const c=this._baseState;if(c.parent===null)return c.children[0]._encode(s,h||new f);let p=null;if(this.reporter=h,c.optional&&s===void 0){if(c.default===null)return;s=c.default}let m=null,S=!1;if(c.any)p=this._createEncoderBuffer(s);else if(c.choice)p=this._encodeChoice(s,h);else if(c.contains)m=this._getUse(c.contains,d)._encode(s,h),S=!0;else if(c.children)m=c.children.map(function(C){if(C._baseState.tag==="null_")return C._encode(null,h,s);if(C._baseState.key===null)return h.error("Child should have a key");const M=h.enterKey(C._baseState.key);if(typeof s!="object")return h.error("Child expected, but input is not object");const P=C._encode(s[C._baseState.key],h,s);return h.leaveKey(M),P},this).filter(function(C){return C}),m=this._createEncoderBuffer(m);else if(c.tag==="seqof"||c.tag==="setof"){if(!c.args||c.args.length!==1)return h.error("Too many args for : "+c.tag);if(!Array.isArray(s))return h.error("seqof/setof, but data is not Array");const C=this.clone();C._baseState.implicit=null,m=this._createEncoderBuffer(s.map(function(M){const P=this._baseState;return this._getUse(P.args[0],s)._encode(M,h)},C))}else c.use!==null?p=this._getUse(c.use,d)._encode(s,h):(m=this._encodePrimitive(c.tag,s),S=!0);if(!c.any&&c.choice===null){const C=c.implicit!==null?c.implicit:c.tag,M=c.implicit===null?"universal":"context";C===null?c.use===null&&h.error("Tag could be omitted only for .use()"):c.use===null&&(p=this._encodeComposite(C,S,M,m))}return c.explicit!==null&&(p=this._encodeComposite(c.explicit,!1,"context",p)),p},l.prototype._encodeChoice=function(s,h){const d=this._baseState,c=d.choice[s.type];return c||r(!1,s.type+" not found in "+JSON.stringify(Object.keys(d.choice))),c._encode(s.value,h)},l.prototype._encodePrimitive=function(s,h){const d=this._baseState;if(/str$/.test(s))return this._encodeStr(h,s);if(s==="objid"&&d.args)return this._encodeObjid(h,d.reverseArgs[0],d.args[1]);if(s==="objid")return this._encodeObjid(h,null,null);if(s==="gentime"||s==="utctime")return this._encodeTime(h,s);if(s==="null_")return this._encodeNull();if(s==="int"||s==="enum")return this._encodeInt(h,d.args&&d.reverseArgs[0]);if(s==="bool")return this._encodeBool(h);if(s==="objDesc")return this._encodeStr(h,s);throw new Error("Unsupported tag: "+s)},l.prototype._isNumstr=function(s){return/^[0-9 ]*$/.test(s)},l.prototype._isPrintstr=function(s){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(s)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(t,b,g){const f=t("inherits");function o(r){this._reporterState={obj:null,path:[],options:r||{},errors:[]}}function a(r,e){this.path=r,this.rethrow(e)}g.Reporter=o,o.prototype.isError=function(r){return r instanceof a},o.prototype.save=function(){const r=this._reporterState;return{obj:r.obj,pathLen:r.path.length}},o.prototype.restore=function(r){const e=this._reporterState;e.obj=r.obj,e.path=e.path.slice(0,r.pathLen)},o.prototype.enterKey=function(r){return this._reporterState.path.push(r)},o.prototype.exitKey=function(r){const e=this._reporterState;e.path=e.path.slice(0,r-1)},o.prototype.leaveKey=function(r,e,n){const l=this._reporterState;this.exitKey(r),l.obj!==null&&(l.obj[e]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const r=this._reporterState,e=r.obj;return r.obj={},e},o.prototype.leaveObject=function(r){const e=this._reporterState,n=e.obj;return e.obj=r,n},o.prototype.error=function(r){let e;const n=this._reporterState,l=r instanceof a;if(e=l?r:new a(n.path.map(function(i){return"["+JSON.stringify(i)+"]"}).join(""),r.message||r,r.stack),!n.options.partial)throw e;return l||n.errors.push(e),e},o.prototype.wrapResult=function(r){const e=this._reporterState;return e.options.partial?{result:this.isError(r)?null:r,errors:e.errors}:r},f(a,Error),a.prototype.rethrow=function(r){if(this.message=r+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:440}],176:[function(t,b,g){function f(o){const a={};return Object.keys(o).forEach(function(r){(0|r)==r&&(r|=0);const e=o[r];a[e]=r}),a}g.tagClass={0:"universal",1:"application",2:"context",3:"private"},g.tagClassByName=f(g.tagClass),g.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},g.tagByName=f(g.tag)},{}],177:[function(t,b,g){const f=g;f._reverse=function(o){const a={};return Object.keys(o).forEach(function(r){(0|r)==r&&(r|=0);const e=o[r];a[e]=r}),a},f.der=t("./der")},{"./der":176}],178:[function(t,b,g){const f=t("inherits"),o=t("bn.js"),a=t("../base/buffer").DecoderBuffer,r=t("../base/node"),e=t("../constants/der");function n(h){this.enc="der",this.name=h.name,this.entity=h,this.tree=new l,this.tree._init(h.body)}function l(h){r.call(this,"der",h)}function i(h,d){let c=h.readUInt8(d);if(h.isError(c))return c;const p=e.tagClass[c>>6],m=(32&c)==0;if((31&c)==31){let S=c;for(c=0;(128&S)==128;){if(S=h.readUInt8(d),h.isError(S))return S;c<<=7,c|=127&S}}else c&=31;return{cls:p,primitive:m,tag:c,tagStr:e.tag[c]}}function s(h,d,c){let p=h.readUInt8(c);if(h.isError(p))return p;if(!d&&p===128)return null;if(!(128&p))return p;const m=127&p;if(m>4)return h.error("length octect is too long");p=0;for(let S=0;S<m;S++){p<<=8;const C=h.readUInt8(c);if(h.isError(C))return C;p|=C}return p}b.exports=n,n.prototype.decode=function(h,d){return a.isDecoderBuffer(h)||(h=new a(h,d)),this.tree._decode(h,d)},f(l,r),l.prototype._peekTag=function(h,d,c){if(h.isEmpty())return!1;const p=h.save(),m=i(h,'Failed to peek tag: "'+d+'"');return h.isError(m)?m:(h.restore(p),m.tag===d||m.tagStr===d||m.tagStr+"of"===d||c)},l.prototype._decodeTag=function(h,d,c){const p=i(h,'Failed to decode tag of "'+d+'"');if(h.isError(p))return p;let m=s(h,p.primitive,'Failed to get length of "'+d+'"');if(h.isError(m))return m;if(!c&&p.tag!==d&&p.tagStr!==d&&p.tagStr+"of"!==d)return h.error('Failed to match tag: "'+d+'"');if(p.primitive||m!==null)return h.skip(m,'Failed to match body of: "'+d+'"');const S=h.save(),C=this._skipUntilEnd(h,'Failed to skip indefinite length body: "'+this.tag+'"');return h.isError(C)?C:(m=h.offset-S.offset,h.restore(S),h.skip(m,'Failed to match body of: "'+d+'"'))},l.prototype._skipUntilEnd=function(h,d){for(;;){const c=i(h,d);if(h.isError(c))return c;const p=s(h,c.primitive,d);if(h.isError(p))return p;let m;if(m=c.primitive||p!==null?h.skip(p):this._skipUntilEnd(h,d),h.isError(m))return m;if(c.tagStr==="end")break}},l.prototype._decodeList=function(h,d,c,p){const m=[];for(;!h.isEmpty();){const S=this._peekTag(h,"end");if(h.isError(S))return S;const C=c.decode(h,"der",p);if(h.isError(C)&&S)break;m.push(C)}return m},l.prototype._decodeStr=function(h,d){if(d==="bitstr"){const c=h.readUInt8();return h.isError(c)?c:{unused:c,data:h.raw()}}if(d==="bmpstr"){const c=h.raw();if(c.length%2==1)return h.error("Decoding of string type: bmpstr length mismatch");let p="";for(let m=0;m<c.length/2;m++)p+=String.fromCharCode(c.readUInt16BE(2*m));return p}if(d==="numstr"){const c=h.raw().toString("ascii");return this._isNumstr(c)?c:h.error("Decoding of string type: numstr unsupported characters")}if(d==="octstr"||d==="objDesc")return h.raw();if(d==="printstr"){const c=h.raw().toString("ascii");return this._isPrintstr(c)?c:h.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(d)?h.raw().toString():h.error("Decoding of string type: "+d+" unsupported")},l.prototype._decodeObjid=function(h,d,c){let p;const m=[];let S=0,C=0;for(;!h.isEmpty();)C=h.readUInt8(),S<<=7,S|=127&C,!(128&C)&&(m.push(S),S=0);128&C&&m.push(S);const M=m[0]/40|0,P=m[0]%40;if(p=c?m:[M,P].concat(m.slice(1)),d){let $=d[p.join(" ")];$===void 0&&($=d[p.join(".")]),$!==void 0&&(p=$)}return p},l.prototype._decodeTime=function(h,d){const c=h.raw().toString();let p,m,S,C,M,P;if(d==="gentime")p=0|c.slice(0,4),m=0|c.slice(4,6),S=0|c.slice(6,8),C=0|c.slice(8,10),M=0|c.slice(10,12),P=0|c.slice(12,14);else{if(d!=="utctime")return h.error("Decoding "+d+" time is not supported yet");p=0|c.slice(0,2),m=0|c.slice(2,4),S=0|c.slice(4,6),C=0|c.slice(6,8),M=0|c.slice(8,10),P=0|c.slice(10,12),p=p<70?2e3+p:1900+p}return Date.UTC(p,m-1,S,C,M,P,0)},l.prototype._decodeNull=function(){return null},l.prototype._decodeBool=function(h){const d=h.readUInt8();return h.isError(d)?d:d!==0},l.prototype._decodeInt=function(h,d){const c=h.raw();let p=new o(c);return d&&(p=d[p.toString(10)]||p),p},l.prototype._use=function(h,d){return typeof h=="function"&&(h=h(d)),h._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(t,b,g){const f=g;f.der=t("./der"),f.pem=t("./pem")},{"./der":178,"./pem":180}],180:[function(t,b,g){const f=t("inherits"),o=t("safer-buffer").Buffer,a=t("./der");function r(e){a.call(this,e),this.enc="pem"}f(r,a),b.exports=r,r.prototype.decode=function(e,n){const l=e.toString().split(/[\r\n]+/g),i=n.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let h=-1,d=-1;for(let m=0;m<l.length;m++){const S=l[m].match(s);if(S!==null&&S[2]===i){if(h!==-1){if(S[1]!=="END")break;d=m;break}if(S[1]!=="BEGIN")break;h=m}}if(h===-1||d===-1)throw new Error("PEM section not found for: "+i);const c=l.slice(h+1,d).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const p=o.from(c,"base64");return a.prototype.decode.call(this,p,n)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(t,b,g){const f=t("inherits"),o=t("safer-buffer").Buffer,a=t("../base/node"),r=t("../constants/der");function e(i){this.enc="der",this.name=i.name,this.entity=i,this.tree=new n,this.tree._init(i.body)}function n(i){a.call(this,"der",i)}function l(i){return i<10?"0"+i:i}b.exports=e,e.prototype.encode=function(i,s){return this.tree._encode(i,s).join()},f(n,a),n.prototype._encodeComposite=function(i,s,h,d){const c=function(S,C,M,P){let $;if(S==="seqof"?S="seq":S==="setof"&&(S="set"),r.tagByName.hasOwnProperty(S))$=r.tagByName[S];else{if(typeof S!="number"||(0|S)!==S)return P.error("Unknown tag: "+S);$=S}return $>=31?P.error("Multi-octet tag encoding unsupported"):(C||($|=32),$|=r.tagClassByName[M||"universal"]<<6,$)}(i,s,h,this.reporter);if(d.length<128){const S=o.alloc(2);return S[0]=c,S[1]=d.length,this._createEncoderBuffer([S,d])}let p=1;for(let S=d.length;S>=256;S>>=8)p++;const m=o.alloc(2+p);m[0]=c,m[1]=128|p;for(let S=1+p,C=d.length;C>0;S--,C>>=8)m[S]=255&C;return this._createEncoderBuffer([m,d])},n.prototype._encodeStr=function(i,s){if(s==="bitstr")return this._createEncoderBuffer([0|i.unused,i.data]);if(s==="bmpstr"){const h=o.alloc(2*i.length);for(let d=0;d<i.length;d++)h.writeUInt16BE(i.charCodeAt(d),2*d);return this._createEncoderBuffer(h)}return s==="numstr"?this._isNumstr(i)?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: numstr supports only digits and space"):s==="printstr"?this._isPrintstr(i)?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(s)||s==="objDesc"?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: "+s+" unsupported")},n.prototype._encodeObjid=function(i,s,h){if(typeof i=="string"){if(!s)return this.reporter.error("string objid given, but no values map found");if(!s.hasOwnProperty(i))return this.reporter.error("objid not found in values map");i=s[i].split(/[\s.]+/g);for(let m=0;m<i.length;m++)i[m]|=0}else if(Array.isArray(i)){i=i.slice();for(let m=0;m<i.length;m++)i[m]|=0}if(!Array.isArray(i))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(i));if(!h){if(i[1]>=40)return this.reporter.error("Second objid identifier OOB");i.splice(0,2,40*i[0]+i[1])}let d=0;for(let m=0;m<i.length;m++){let S=i[m];for(d++;S>=128;S>>=7)d++}const c=o.alloc(d);let p=c.length-1;for(let m=i.length-1;m>=0;m--){let S=i[m];for(c[p--]=127&S;(S>>=7)>0;)c[p--]=128|127&S}return this._createEncoderBuffer(c)},n.prototype._encodeTime=function(i,s){let h;const d=new Date(i);return s==="gentime"?h=[l(d.getUTCFullYear()),l(d.getUTCMonth()+1),l(d.getUTCDate()),l(d.getUTCHours()),l(d.getUTCMinutes()),l(d.getUTCSeconds()),"Z"].join(""):s==="utctime"?h=[l(d.getUTCFullYear()%100),l(d.getUTCMonth()+1),l(d.getUTCDate()),l(d.getUTCHours()),l(d.getUTCMinutes()),l(d.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+s+" time is not supported yet"),this._encodeStr(h,"octstr")},n.prototype._encodeNull=function(){return this._createEncoderBuffer("")},n.prototype._encodeInt=function(i,s){if(typeof i=="string"){if(!s)return this.reporter.error("String int or enum given, but no values map");if(!s.hasOwnProperty(i))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(i));i=s[i]}if(typeof i!="number"&&!o.isBuffer(i)){const c=i.toArray();!i.sign&&128&c[0]&&c.unshift(0),i=o.from(c)}if(o.isBuffer(i)){let c=i.length;i.length===0&&c++;const p=o.alloc(c);return i.copy(p),i.length===0&&(p[0]=0),this._createEncoderBuffer(p)}if(i<128)return this._createEncoderBuffer(i);if(i<256)return this._createEncoderBuffer([0,i]);let h=1;for(let c=i;c>=256;c>>=8)h++;const d=new Array(h);for(let c=d.length-1;c>=0;c--)d[c]=255&i,i>>=8;return 128&d[0]&&d.unshift(0),this._createEncoderBuffer(o.from(d))},n.prototype._encodeBool=function(i){return this._createEncoderBuffer(i?255:0)},n.prototype._use=function(i,s){return typeof i=="function"&&(i=i(s)),i._getEncoder("der").tree},n.prototype._skipDefault=function(i,s,h){const d=this._baseState;let c;if(d.default===null)return!1;const p=i.join();if(d.defaultBuffer===void 0&&(d.defaultBuffer=this._encodeValue(d.default,s,h).join()),p.length!==d.defaultBuffer.length)return!1;for(c=0;c<p.length;c++)if(p[c]!==d.defaultBuffer[c])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(t,b,g){const f=g;f.der=t("./der"),f.pem=t("./pem")},{"./der":181,"./pem":183}],183:[function(t,b,g){const f=t("inherits"),o=t("./der");function a(r){o.call(this,r),this.enc="pem"}f(a,o),b.exports=a,a.prototype.encode=function(r,e){const n=o.prototype.encode.call(this,r).toString("base64"),l=["-----BEGIN "+e.label+"-----"];for(let i=0;i<n.length;i+=64)l.push(n.slice(i,i+64));return l.push("-----END "+e.label+"-----"),l.join(`
|
|
19
|
+
`)}},{"./der":181,inherits:440}],184:[function(t,b,g){(function(f,o){function a(E,O){if(!E)throw new Error(O||"Assertion failed")}function r(E,O){E.super_=O;var x=function(){};x.prototype=O.prototype,E.prototype=new x,E.prototype.constructor=E}function e(E,O,x){if(e.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&(O!=="le"&&O!=="be"||(x=O,O=10),this._init(E||0,O||10,x||"be"))}var n;typeof f=="object"?f.exports=e:(void 0).BN=e,e.BN=e,e.wordSize=26;try{n=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t("buffer").Buffer}catch{}function l(E,O){var x=E.charCodeAt(O);return x>=65&&x<=70?x-55:x>=97&&x<=102?x-87:x-48&15}function i(E,O,x){var y=l(E,x);return x-1>=O&&(y|=l(E,x-1)<<4),y}function s(E,O,x,y){for(var v=0,w=Math.min(E.length,x),_=O;_<w;_++){var A=E.charCodeAt(_)-48;v*=y,v+=A>=49?A-49+10:A>=17?A-17+10:A}return v}e.isBN=function(E){return E instanceof e||E!==null&&typeof E=="object"&&E.constructor.wordSize===e.wordSize&&Array.isArray(E.words)},e.max=function(E,O){return E.cmp(O)>0?E:O},e.min=function(E,O){return E.cmp(O)<0?E:O},e.prototype._init=function(E,O,x){if(typeof E=="number")return this._initNumber(E,O,x);if(typeof E=="object")return this._initArray(E,O,x);O==="hex"&&(O=16),a(O===(0|O)&&O>=2&&O<=36);var y=0;(E=E.toString().replace(/\s+/g,""))[0]==="-"&&(y++,this.negative=1),y<E.length&&(O===16?this._parseHex(E,y,x):(this._parseBase(E,O,y),x==="le"&&this._initArray(this.toArray(),O,x)))},e.prototype._initNumber=function(E,O,x){E<0&&(this.negative=1,E=-E),E<67108864?(this.words=[67108863&E],this.length=1):E<4503599627370496?(this.words=[67108863&E,E/67108864&67108863],this.length=2):(a(E<9007199254740992),this.words=[67108863&E,E/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),O,x)},e.prototype._initArray=function(E,O,x){if(a(typeof E.length=="number"),E.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(E.length/3),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var v,w,_=0;if(x==="be")for(y=E.length-1,v=0;y>=0;y-=3)w=E[y]|E[y-1]<<8|E[y-2]<<16,this.words[v]|=w<<_&67108863,this.words[v+1]=w>>>26-_&67108863,(_+=24)>=26&&(_-=26,v++);else if(x==="le")for(y=0,v=0;y<E.length;y+=3)w=E[y]|E[y+1]<<8|E[y+2]<<16,this.words[v]|=w<<_&67108863,this.words[v+1]=w>>>26-_&67108863,(_+=24)>=26&&(_-=26,v++);return this.strip()},e.prototype._parseHex=function(E,O,x){this.length=Math.ceil((E.length-O)/6),this.words=new Array(this.length);for(var y=0;y<this.length;y++)this.words[y]=0;var v,w=0,_=0;if(x==="be")for(y=E.length-1;y>=O;y-=2)v=i(E,O,y)<<w,this.words[_]|=67108863&v,w>=18?(w-=18,_+=1,this.words[_]|=v>>>26):w+=8;else for(y=(E.length-O)%2==0?O+1:O;y<E.length;y+=2)v=i(E,O,y)<<w,this.words[_]|=67108863&v,w>=18?(w-=18,_+=1,this.words[_]|=v>>>26):w+=8;this.strip()},e.prototype._parseBase=function(E,O,x){this.words=[0],this.length=1;for(var y=0,v=1;v<=67108863;v*=O)y++;y--,v=v/O|0;for(var w=E.length-x,_=w%y,A=Math.min(w,w-_)+x,j=0,L=x;L<A;L+=y)j=s(E,L,L+y,O),this.imuln(v),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(_!==0){var H=1;for(j=s(E,L,E.length,O),L=0;L<_;L++)H*=O;this.imuln(H),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},e.prototype.copy=function(E){E.words=new Array(this.length);for(var O=0;O<this.length;O++)E.words[O]=this.words[O];E.length=this.length,E.negative=this.negative,E.red=this.red},e.prototype.clone=function(){var E=new e(null);return this.copy(E),E},e.prototype._expand=function(E){for(;this.length<E;)this.words[this.length++]=0;return this},e.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},e.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},e.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(E,O,x){x.negative=O.negative^E.negative;var y=E.length+O.length|0;x.length=y,y=y-1|0;var v=0|E.words[0],w=0|O.words[0],_=v*w,A=67108863&_,j=_/67108864|0;x.words[0]=A;for(var L=1;L<y;L++){for(var H=j>>>26,q=67108863&j,X=Math.min(L,O.length-1),F=Math.max(0,L-E.length+1);F<=X;F++){var W=L-F|0;H+=(_=(v=0|E.words[W])*(w=0|O.words[F])+q)/67108864|0,q=67108863&_}x.words[L]=0|q,j=0|H}return j!==0?x.words[L]=0|j:x.length--,x.strip()}e.prototype.toString=function(E,O){var x;if(O=0|O||1,(E=E||10)===16||E==="hex"){x="";for(var y=0,v=0,w=0;w<this.length;w++){var _=this.words[w],A=(16777215&(_<<y|v)).toString(16);x=(v=_>>>24-y&16777215)!==0||w!==this.length-1?h[6-A.length]+A+x:A+x,(y+=2)>=26&&(y-=26,w--)}for(v!==0&&(x=v.toString(16)+x);x.length%O!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(E===(0|E)&&E>=2&&E<=36){var j=d[E],L=c[E];x="";var H=this.clone();for(H.negative=0;!H.isZero();){var q=H.modn(L).toString(E);x=(H=H.idivn(L)).isZero()?q+x:h[j-q.length]+q+x}for(this.isZero()&&(x="0"+x);x.length%O!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}a(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=67108864*this.words[1]:this.length===3&&this.words[2]===1?E+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},e.prototype.toJSON=function(){return this.toString(16)},e.prototype.toBuffer=function(E,O){return a(n!==void 0),this.toArrayLike(n,E,O)},e.prototype.toArray=function(E,O){return this.toArrayLike(Array,E,O)},e.prototype.toArrayLike=function(E,O,x){var y=this.byteLength(),v=x||Math.max(1,y);a(y<=v,"byte array longer than desired length"),a(v>0,"Requested array length <= 0"),this.strip();var w,_,A=O==="le",j=new E(v),L=this.clone();if(A){for(_=0;!L.isZero();_++)w=L.andln(255),L.iushrn(8),j[_]=w;for(;_<v;_++)j[_]=0}else{for(_=0;_<v-y;_++)j[_]=0;for(_=0;!L.isZero();_++)w=L.andln(255),L.iushrn(8),j[v-_-1]=w}return j},Math.clz32?e.prototype._countBits=function(E){return 32-Math.clz32(E)}:e.prototype._countBits=function(E){var O=E,x=0;return O>=4096&&(x+=13,O>>>=13),O>=64&&(x+=7,O>>>=7),O>=8&&(x+=4,O>>>=4),O>=2&&(x+=2,O>>>=2),x+O},e.prototype._zeroBits=function(E){if(E===0)return 26;var O=E,x=0;return!(8191&O)&&(x+=13,O>>>=13),!(127&O)&&(x+=7,O>>>=7),!(15&O)&&(x+=4,O>>>=4),!(3&O)&&(x+=2,O>>>=2),!(1&O)&&x++,x},e.prototype.bitLength=function(){var E=this.words[this.length-1],O=this._countBits(E);return 26*(this.length-1)+O},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,O=0;O<this.length;O++){var x=this._zeroBits(this.words[O]);if(E+=x,x!==26)break}return E},e.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},e.prototype.toTwos=function(E){return this.negative!==0?this.abs().inotn(E).iaddn(1):this.clone()},e.prototype.fromTwos=function(E){return this.testn(E-1)?this.notn(E).iaddn(1).ineg():this.clone()},e.prototype.isNeg=function(){return this.negative!==0},e.prototype.neg=function(){return this.clone().ineg()},e.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},e.prototype.iuor=function(E){for(;this.length<E.length;)this.words[this.length++]=0;for(var O=0;O<E.length;O++)this.words[O]=this.words[O]|E.words[O];return this.strip()},e.prototype.ior=function(E){return a((this.negative|E.negative)==0),this.iuor(E)},e.prototype.or=function(E){return this.length>E.length?this.clone().ior(E):E.clone().ior(this)},e.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},e.prototype.iuand=function(E){var O;O=this.length>E.length?E:this;for(var x=0;x<O.length;x++)this.words[x]=this.words[x]&E.words[x];return this.length=O.length,this.strip()},e.prototype.iand=function(E){return a((this.negative|E.negative)==0),this.iuand(E)},e.prototype.and=function(E){return this.length>E.length?this.clone().iand(E):E.clone().iand(this)},e.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},e.prototype.iuxor=function(E){var O,x;this.length>E.length?(O=this,x=E):(O=E,x=this);for(var y=0;y<x.length;y++)this.words[y]=O.words[y]^x.words[y];if(this!==O)for(;y<O.length;y++)this.words[y]=O.words[y];return this.length=O.length,this.strip()},e.prototype.ixor=function(E){return a((this.negative|E.negative)==0),this.iuxor(E)},e.prototype.xor=function(E){return this.length>E.length?this.clone().ixor(E):E.clone().ixor(this)},e.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},e.prototype.inotn=function(E){a(typeof E=="number"&&E>=0);var O=0|Math.ceil(E/26),x=E%26;this._expand(O),x>0&&O--;for(var y=0;y<O;y++)this.words[y]=67108863&~this.words[y];return x>0&&(this.words[y]=~this.words[y]&67108863>>26-x),this.strip()},e.prototype.notn=function(E){return this.clone().inotn(E)},e.prototype.setn=function(E,O){a(typeof E=="number"&&E>=0);var x=E/26|0,y=E%26;return this._expand(x+1),this.words[x]=O?this.words[x]|1<<y:this.words[x]&~(1<<y),this.strip()},e.prototype.iadd=function(E){var O,x,y;if(this.negative!==0&&E.negative===0)return this.negative=0,O=this.isub(E),this.negative^=1,this._normSign();if(this.negative===0&&E.negative!==0)return E.negative=0,O=this.isub(E),E.negative=1,O._normSign();this.length>E.length?(x=this,y=E):(x=E,y=this);for(var v=0,w=0;w<y.length;w++)O=(0|x.words[w])+(0|y.words[w])+v,this.words[w]=67108863&O,v=O>>>26;for(;v!==0&&w<x.length;w++)O=(0|x.words[w])+v,this.words[w]=67108863&O,v=O>>>26;if(this.length=x.length,v!==0)this.words[this.length]=v,this.length++;else if(x!==this)for(;w<x.length;w++)this.words[w]=x.words[w];return this},e.prototype.add=function(E){var O;return E.negative!==0&&this.negative===0?(E.negative=0,O=this.sub(E),E.negative^=1,O):E.negative===0&&this.negative!==0?(this.negative=0,O=E.sub(this),this.negative=1,O):this.length>E.length?this.clone().iadd(E):E.clone().iadd(this)},e.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var O=this.iadd(E);return E.negative=1,O._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var x,y,v=this.cmp(E);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;v>0?(x=this,y=E):(x=E,y=this);for(var w=0,_=0;_<y.length;_++)w=(O=(0|x.words[_])-(0|y.words[_])+w)>>26,this.words[_]=67108863&O;for(;w!==0&&_<x.length;_++)w=(O=(0|x.words[_])+w)>>26,this.words[_]=67108863&O;if(w===0&&_<x.length&&x!==this)for(;_<x.length;_++)this.words[_]=x.words[_];return this.length=Math.max(this.length,_),x!==this&&(this.negative=1),this.strip()},e.prototype.sub=function(E){return this.clone().isub(E)};var m=function(E,O,x){var y,v,w,_=E.words,A=O.words,j=x.words,L=0,H=0|_[0],q=8191&H,X=H>>>13,F=0|_[1],W=8191&F,I=F>>>13,R=0|_[2],V=8191&R,K=R>>>13,Z=0|_[3],Y=8191&Z,J=Z>>>13,nt=0|_[4],it=8191&nt,G=nt>>>13,tt=0|_[5],et=8191&tt,ot=tt>>>13,st=0|_[6],lt=8191&st,ft=st>>>13,pt=0|_[7],yt=8191&pt,Ot=pt>>>13,At=0|_[8],kt=8191&At,Wt=At>>>13,Ht=0|_[9],Vt=8191&Ht,Kt=Ht>>>13,Nt=0|A[0],_t=8191&Nt,Rt=Nt>>>13,zt=0|A[1],Bt=8191&zt,mt=zt>>>13,It=0|A[2],xt=8191&It,Dt=It>>>13,jt=0|A[3],Pt=8191&jt,Zt=jt>>>13,$t=0|A[4],Lt=8191&$t,ut=$t>>>13,bt=0|A[5],ht=8191&bt,St=bt>>>13,Yt=0|A[6],Tt=8191&Yt,rt=Yt>>>13,at=0|A[7],dt=8191&at,wt=at>>>13,Ut=0|A[8],Ct=8191&Ut,Qt=Ut>>>13,Jt=0|A[9],qt=8191&Jt,re=Jt>>>13;x.negative=E.negative^O.negative,x.length=19;var ee=(L+(y=Math.imul(q,_t))|0)+((8191&(v=(v=Math.imul(q,Rt))+Math.imul(X,_t)|0))<<13)|0;L=((w=Math.imul(X,Rt))+(v>>>13)|0)+(ee>>>26)|0,ee&=67108863,y=Math.imul(W,_t),v=(v=Math.imul(W,Rt))+Math.imul(I,_t)|0,w=Math.imul(I,Rt);var ae=(L+(y=y+Math.imul(q,Bt)|0)|0)+((8191&(v=(v=v+Math.imul(q,mt)|0)+Math.imul(X,Bt)|0))<<13)|0;L=((w=w+Math.imul(X,mt)|0)+(v>>>13)|0)+(ae>>>26)|0,ae&=67108863,y=Math.imul(V,_t),v=(v=Math.imul(V,Rt))+Math.imul(K,_t)|0,w=Math.imul(K,Rt),y=y+Math.imul(W,Bt)|0,v=(v=v+Math.imul(W,mt)|0)+Math.imul(I,Bt)|0,w=w+Math.imul(I,mt)|0;var ke=(L+(y=y+Math.imul(q,xt)|0)|0)+((8191&(v=(v=v+Math.imul(q,Dt)|0)+Math.imul(X,xt)|0))<<13)|0;L=((w=w+Math.imul(X,Dt)|0)+(v>>>13)|0)+(ke>>>26)|0,ke&=67108863,y=Math.imul(Y,_t),v=(v=Math.imul(Y,Rt))+Math.imul(J,_t)|0,w=Math.imul(J,Rt),y=y+Math.imul(V,Bt)|0,v=(v=v+Math.imul(V,mt)|0)+Math.imul(K,Bt)|0,w=w+Math.imul(K,mt)|0,y=y+Math.imul(W,xt)|0,v=(v=v+Math.imul(W,Dt)|0)+Math.imul(I,xt)|0,w=w+Math.imul(I,Dt)|0;var be=(L+(y=y+Math.imul(q,Pt)|0)|0)+((8191&(v=(v=v+Math.imul(q,Zt)|0)+Math.imul(X,Pt)|0))<<13)|0;L=((w=w+Math.imul(X,Zt)|0)+(v>>>13)|0)+(be>>>26)|0,be&=67108863,y=Math.imul(it,_t),v=(v=Math.imul(it,Rt))+Math.imul(G,_t)|0,w=Math.imul(G,Rt),y=y+Math.imul(Y,Bt)|0,v=(v=v+Math.imul(Y,mt)|0)+Math.imul(J,Bt)|0,w=w+Math.imul(J,mt)|0,y=y+Math.imul(V,xt)|0,v=(v=v+Math.imul(V,Dt)|0)+Math.imul(K,xt)|0,w=w+Math.imul(K,Dt)|0,y=y+Math.imul(W,Pt)|0,v=(v=v+Math.imul(W,Zt)|0)+Math.imul(I,Pt)|0,w=w+Math.imul(I,Zt)|0;var Me=(L+(y=y+Math.imul(q,Lt)|0)|0)+((8191&(v=(v=v+Math.imul(q,ut)|0)+Math.imul(X,Lt)|0))<<13)|0;L=((w=w+Math.imul(X,ut)|0)+(v>>>13)|0)+(Me>>>26)|0,Me&=67108863,y=Math.imul(et,_t),v=(v=Math.imul(et,Rt))+Math.imul(ot,_t)|0,w=Math.imul(ot,Rt),y=y+Math.imul(it,Bt)|0,v=(v=v+Math.imul(it,mt)|0)+Math.imul(G,Bt)|0,w=w+Math.imul(G,mt)|0,y=y+Math.imul(Y,xt)|0,v=(v=v+Math.imul(Y,Dt)|0)+Math.imul(J,xt)|0,w=w+Math.imul(J,Dt)|0,y=y+Math.imul(V,Pt)|0,v=(v=v+Math.imul(V,Zt)|0)+Math.imul(K,Pt)|0,w=w+Math.imul(K,Zt)|0,y=y+Math.imul(W,Lt)|0,v=(v=v+Math.imul(W,ut)|0)+Math.imul(I,Lt)|0,w=w+Math.imul(I,ut)|0;var Re=(L+(y=y+Math.imul(q,ht)|0)|0)+((8191&(v=(v=v+Math.imul(q,St)|0)+Math.imul(X,ht)|0))<<13)|0;L=((w=w+Math.imul(X,St)|0)+(v>>>13)|0)+(Re>>>26)|0,Re&=67108863,y=Math.imul(lt,_t),v=(v=Math.imul(lt,Rt))+Math.imul(ft,_t)|0,w=Math.imul(ft,Rt),y=y+Math.imul(et,Bt)|0,v=(v=v+Math.imul(et,mt)|0)+Math.imul(ot,Bt)|0,w=w+Math.imul(ot,mt)|0,y=y+Math.imul(it,xt)|0,v=(v=v+Math.imul(it,Dt)|0)+Math.imul(G,xt)|0,w=w+Math.imul(G,Dt)|0,y=y+Math.imul(Y,Pt)|0,v=(v=v+Math.imul(Y,Zt)|0)+Math.imul(J,Pt)|0,w=w+Math.imul(J,Zt)|0,y=y+Math.imul(V,Lt)|0,v=(v=v+Math.imul(V,ut)|0)+Math.imul(K,Lt)|0,w=w+Math.imul(K,ut)|0,y=y+Math.imul(W,ht)|0,v=(v=v+Math.imul(W,St)|0)+Math.imul(I,ht)|0,w=w+Math.imul(I,St)|0;var Ie=(L+(y=y+Math.imul(q,Tt)|0)|0)+((8191&(v=(v=v+Math.imul(q,rt)|0)+Math.imul(X,Tt)|0))<<13)|0;L=((w=w+Math.imul(X,rt)|0)+(v>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,y=Math.imul(yt,_t),v=(v=Math.imul(yt,Rt))+Math.imul(Ot,_t)|0,w=Math.imul(Ot,Rt),y=y+Math.imul(lt,Bt)|0,v=(v=v+Math.imul(lt,mt)|0)+Math.imul(ft,Bt)|0,w=w+Math.imul(ft,mt)|0,y=y+Math.imul(et,xt)|0,v=(v=v+Math.imul(et,Dt)|0)+Math.imul(ot,xt)|0,w=w+Math.imul(ot,Dt)|0,y=y+Math.imul(it,Pt)|0,v=(v=v+Math.imul(it,Zt)|0)+Math.imul(G,Pt)|0,w=w+Math.imul(G,Zt)|0,y=y+Math.imul(Y,Lt)|0,v=(v=v+Math.imul(Y,ut)|0)+Math.imul(J,Lt)|0,w=w+Math.imul(J,ut)|0,y=y+Math.imul(V,ht)|0,v=(v=v+Math.imul(V,St)|0)+Math.imul(K,ht)|0,w=w+Math.imul(K,St)|0,y=y+Math.imul(W,Tt)|0,v=(v=v+Math.imul(W,rt)|0)+Math.imul(I,Tt)|0,w=w+Math.imul(I,rt)|0;var Q=(L+(y=y+Math.imul(q,dt)|0)|0)+((8191&(v=(v=v+Math.imul(q,wt)|0)+Math.imul(X,dt)|0))<<13)|0;L=((w=w+Math.imul(X,wt)|0)+(v>>>13)|0)+(Q>>>26)|0,Q&=67108863,y=Math.imul(kt,_t),v=(v=Math.imul(kt,Rt))+Math.imul(Wt,_t)|0,w=Math.imul(Wt,Rt),y=y+Math.imul(yt,Bt)|0,v=(v=v+Math.imul(yt,mt)|0)+Math.imul(Ot,Bt)|0,w=w+Math.imul(Ot,mt)|0,y=y+Math.imul(lt,xt)|0,v=(v=v+Math.imul(lt,Dt)|0)+Math.imul(ft,xt)|0,w=w+Math.imul(ft,Dt)|0,y=y+Math.imul(et,Pt)|0,v=(v=v+Math.imul(et,Zt)|0)+Math.imul(ot,Pt)|0,w=w+Math.imul(ot,Zt)|0,y=y+Math.imul(it,Lt)|0,v=(v=v+Math.imul(it,ut)|0)+Math.imul(G,Lt)|0,w=w+Math.imul(G,ut)|0,y=y+Math.imul(Y,ht)|0,v=(v=v+Math.imul(Y,St)|0)+Math.imul(J,ht)|0,w=w+Math.imul(J,St)|0,y=y+Math.imul(V,Tt)|0,v=(v=v+Math.imul(V,rt)|0)+Math.imul(K,Tt)|0,w=w+Math.imul(K,rt)|0,y=y+Math.imul(W,dt)|0,v=(v=v+Math.imul(W,wt)|0)+Math.imul(I,dt)|0,w=w+Math.imul(I,wt)|0;var ct=(L+(y=y+Math.imul(q,Ct)|0)|0)+((8191&(v=(v=v+Math.imul(q,Qt)|0)+Math.imul(X,Ct)|0))<<13)|0;L=((w=w+Math.imul(X,Qt)|0)+(v>>>13)|0)+(ct>>>26)|0,ct&=67108863,y=Math.imul(Vt,_t),v=(v=Math.imul(Vt,Rt))+Math.imul(Kt,_t)|0,w=Math.imul(Kt,Rt),y=y+Math.imul(kt,Bt)|0,v=(v=v+Math.imul(kt,mt)|0)+Math.imul(Wt,Bt)|0,w=w+Math.imul(Wt,mt)|0,y=y+Math.imul(yt,xt)|0,v=(v=v+Math.imul(yt,Dt)|0)+Math.imul(Ot,xt)|0,w=w+Math.imul(Ot,Dt)|0,y=y+Math.imul(lt,Pt)|0,v=(v=v+Math.imul(lt,Zt)|0)+Math.imul(ft,Pt)|0,w=w+Math.imul(ft,Zt)|0,y=y+Math.imul(et,Lt)|0,v=(v=v+Math.imul(et,ut)|0)+Math.imul(ot,Lt)|0,w=w+Math.imul(ot,ut)|0,y=y+Math.imul(it,ht)|0,v=(v=v+Math.imul(it,St)|0)+Math.imul(G,ht)|0,w=w+Math.imul(G,St)|0,y=y+Math.imul(Y,Tt)|0,v=(v=v+Math.imul(Y,rt)|0)+Math.imul(J,Tt)|0,w=w+Math.imul(J,rt)|0,y=y+Math.imul(V,dt)|0,v=(v=v+Math.imul(V,wt)|0)+Math.imul(K,dt)|0,w=w+Math.imul(K,wt)|0,y=y+Math.imul(W,Ct)|0,v=(v=v+Math.imul(W,Qt)|0)+Math.imul(I,Ct)|0,w=w+Math.imul(I,Qt)|0;var gt=(L+(y=y+Math.imul(q,qt)|0)|0)+((8191&(v=(v=v+Math.imul(q,re)|0)+Math.imul(X,qt)|0))<<13)|0;L=((w=w+Math.imul(X,re)|0)+(v>>>13)|0)+(gt>>>26)|0,gt&=67108863,y=Math.imul(Vt,Bt),v=(v=Math.imul(Vt,mt))+Math.imul(Kt,Bt)|0,w=Math.imul(Kt,mt),y=y+Math.imul(kt,xt)|0,v=(v=v+Math.imul(kt,Dt)|0)+Math.imul(Wt,xt)|0,w=w+Math.imul(Wt,Dt)|0,y=y+Math.imul(yt,Pt)|0,v=(v=v+Math.imul(yt,Zt)|0)+Math.imul(Ot,Pt)|0,w=w+Math.imul(Ot,Zt)|0,y=y+Math.imul(lt,Lt)|0,v=(v=v+Math.imul(lt,ut)|0)+Math.imul(ft,Lt)|0,w=w+Math.imul(ft,ut)|0,y=y+Math.imul(et,ht)|0,v=(v=v+Math.imul(et,St)|0)+Math.imul(ot,ht)|0,w=w+Math.imul(ot,St)|0,y=y+Math.imul(it,Tt)|0,v=(v=v+Math.imul(it,rt)|0)+Math.imul(G,Tt)|0,w=w+Math.imul(G,rt)|0,y=y+Math.imul(Y,dt)|0,v=(v=v+Math.imul(Y,wt)|0)+Math.imul(J,dt)|0,w=w+Math.imul(J,wt)|0,y=y+Math.imul(V,Ct)|0,v=(v=v+Math.imul(V,Qt)|0)+Math.imul(K,Ct)|0,w=w+Math.imul(K,Qt)|0;var vt=(L+(y=y+Math.imul(W,qt)|0)|0)+((8191&(v=(v=v+Math.imul(W,re)|0)+Math.imul(I,qt)|0))<<13)|0;L=((w=w+Math.imul(I,re)|0)+(v>>>13)|0)+(vt>>>26)|0,vt&=67108863,y=Math.imul(Vt,xt),v=(v=Math.imul(Vt,Dt))+Math.imul(Kt,xt)|0,w=Math.imul(Kt,Dt),y=y+Math.imul(kt,Pt)|0,v=(v=v+Math.imul(kt,Zt)|0)+Math.imul(Wt,Pt)|0,w=w+Math.imul(Wt,Zt)|0,y=y+Math.imul(yt,Lt)|0,v=(v=v+Math.imul(yt,ut)|0)+Math.imul(Ot,Lt)|0,w=w+Math.imul(Ot,ut)|0,y=y+Math.imul(lt,ht)|0,v=(v=v+Math.imul(lt,St)|0)+Math.imul(ft,ht)|0,w=w+Math.imul(ft,St)|0,y=y+Math.imul(et,Tt)|0,v=(v=v+Math.imul(et,rt)|0)+Math.imul(ot,Tt)|0,w=w+Math.imul(ot,rt)|0,y=y+Math.imul(it,dt)|0,v=(v=v+Math.imul(it,wt)|0)+Math.imul(G,dt)|0,w=w+Math.imul(G,wt)|0,y=y+Math.imul(Y,Ct)|0,v=(v=v+Math.imul(Y,Qt)|0)+Math.imul(J,Ct)|0,w=w+Math.imul(J,Qt)|0;var Xt=(L+(y=y+Math.imul(V,qt)|0)|0)+((8191&(v=(v=v+Math.imul(V,re)|0)+Math.imul(K,qt)|0))<<13)|0;L=((w=w+Math.imul(K,re)|0)+(v>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,y=Math.imul(Vt,Pt),v=(v=Math.imul(Vt,Zt))+Math.imul(Kt,Pt)|0,w=Math.imul(Kt,Zt),y=y+Math.imul(kt,Lt)|0,v=(v=v+Math.imul(kt,ut)|0)+Math.imul(Wt,Lt)|0,w=w+Math.imul(Wt,ut)|0,y=y+Math.imul(yt,ht)|0,v=(v=v+Math.imul(yt,St)|0)+Math.imul(Ot,ht)|0,w=w+Math.imul(Ot,St)|0,y=y+Math.imul(lt,Tt)|0,v=(v=v+Math.imul(lt,rt)|0)+Math.imul(ft,Tt)|0,w=w+Math.imul(ft,rt)|0,y=y+Math.imul(et,dt)|0,v=(v=v+Math.imul(et,wt)|0)+Math.imul(ot,dt)|0,w=w+Math.imul(ot,wt)|0,y=y+Math.imul(it,Ct)|0,v=(v=v+Math.imul(it,Qt)|0)+Math.imul(G,Ct)|0,w=w+Math.imul(G,Qt)|0;var Et=(L+(y=y+Math.imul(Y,qt)|0)|0)+((8191&(v=(v=v+Math.imul(Y,re)|0)+Math.imul(J,qt)|0))<<13)|0;L=((w=w+Math.imul(J,re)|0)+(v>>>13)|0)+(Et>>>26)|0,Et&=67108863,y=Math.imul(Vt,Lt),v=(v=Math.imul(Vt,ut))+Math.imul(Kt,Lt)|0,w=Math.imul(Kt,ut),y=y+Math.imul(kt,ht)|0,v=(v=v+Math.imul(kt,St)|0)+Math.imul(Wt,ht)|0,w=w+Math.imul(Wt,St)|0,y=y+Math.imul(yt,Tt)|0,v=(v=v+Math.imul(yt,rt)|0)+Math.imul(Ot,Tt)|0,w=w+Math.imul(Ot,rt)|0,y=y+Math.imul(lt,dt)|0,v=(v=v+Math.imul(lt,wt)|0)+Math.imul(ft,dt)|0,w=w+Math.imul(ft,wt)|0,y=y+Math.imul(et,Ct)|0,v=(v=v+Math.imul(et,Qt)|0)+Math.imul(ot,Ct)|0,w=w+Math.imul(ot,Qt)|0;var Mt=(L+(y=y+Math.imul(it,qt)|0)|0)+((8191&(v=(v=v+Math.imul(it,re)|0)+Math.imul(G,qt)|0))<<13)|0;L=((w=w+Math.imul(G,re)|0)+(v>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,y=Math.imul(Vt,ht),v=(v=Math.imul(Vt,St))+Math.imul(Kt,ht)|0,w=Math.imul(Kt,St),y=y+Math.imul(kt,Tt)|0,v=(v=v+Math.imul(kt,rt)|0)+Math.imul(Wt,Tt)|0,w=w+Math.imul(Wt,rt)|0,y=y+Math.imul(yt,dt)|0,v=(v=v+Math.imul(yt,wt)|0)+Math.imul(Ot,dt)|0,w=w+Math.imul(Ot,wt)|0,y=y+Math.imul(lt,Ct)|0,v=(v=v+Math.imul(lt,Qt)|0)+Math.imul(ft,Ct)|0,w=w+Math.imul(ft,Qt)|0;var ue=(L+(y=y+Math.imul(et,qt)|0)|0)+((8191&(v=(v=v+Math.imul(et,re)|0)+Math.imul(ot,qt)|0))<<13)|0;L=((w=w+Math.imul(ot,re)|0)+(v>>>13)|0)+(ue>>>26)|0,ue&=67108863,y=Math.imul(Vt,Tt),v=(v=Math.imul(Vt,rt))+Math.imul(Kt,Tt)|0,w=Math.imul(Kt,rt),y=y+Math.imul(kt,dt)|0,v=(v=v+Math.imul(kt,wt)|0)+Math.imul(Wt,dt)|0,w=w+Math.imul(Wt,wt)|0,y=y+Math.imul(yt,Ct)|0,v=(v=v+Math.imul(yt,Qt)|0)+Math.imul(Ot,Ct)|0,w=w+Math.imul(Ot,Qt)|0;var le=(L+(y=y+Math.imul(lt,qt)|0)|0)+((8191&(v=(v=v+Math.imul(lt,re)|0)+Math.imul(ft,qt)|0))<<13)|0;L=((w=w+Math.imul(ft,re)|0)+(v>>>13)|0)+(le>>>26)|0,le&=67108863,y=Math.imul(Vt,dt),v=(v=Math.imul(Vt,wt))+Math.imul(Kt,dt)|0,w=Math.imul(Kt,wt),y=y+Math.imul(kt,Ct)|0,v=(v=v+Math.imul(kt,Qt)|0)+Math.imul(Wt,Ct)|0,w=w+Math.imul(Wt,Qt)|0;var se=(L+(y=y+Math.imul(yt,qt)|0)|0)+((8191&(v=(v=v+Math.imul(yt,re)|0)+Math.imul(Ot,qt)|0))<<13)|0;L=((w=w+Math.imul(Ot,re)|0)+(v>>>13)|0)+(se>>>26)|0,se&=67108863,y=Math.imul(Vt,Ct),v=(v=Math.imul(Vt,Qt))+Math.imul(Kt,Ct)|0,w=Math.imul(Kt,Qt);var te=(L+(y=y+Math.imul(kt,qt)|0)|0)+((8191&(v=(v=v+Math.imul(kt,re)|0)+Math.imul(Wt,qt)|0))<<13)|0;L=((w=w+Math.imul(Wt,re)|0)+(v>>>13)|0)+(te>>>26)|0,te&=67108863;var pe=(L+(y=Math.imul(Vt,qt))|0)+((8191&(v=(v=Math.imul(Vt,re))+Math.imul(Kt,qt)|0))<<13)|0;return L=((w=Math.imul(Kt,re))+(v>>>13)|0)+(pe>>>26)|0,pe&=67108863,j[0]=ee,j[1]=ae,j[2]=ke,j[3]=be,j[4]=Me,j[5]=Re,j[6]=Ie,j[7]=Q,j[8]=ct,j[9]=gt,j[10]=vt,j[11]=Xt,j[12]=Et,j[13]=Mt,j[14]=ue,j[15]=le,j[16]=se,j[17]=te,j[18]=pe,L!==0&&(j[19]=L,x.length++),x};function S(E,O,x){return new C().mulp(E,O,x)}function C(E,O){this.x=E,this.y=O}Math.imul||(m=p),e.prototype.mulTo=function(E,O){var x=this.length+E.length;return this.length===10&&E.length===10?m(this,E,O):x<63?p(this,E,O):x<1024?function(y,v,w){w.negative=v.negative^y.negative,w.length=y.length+v.length;for(var _=0,A=0,j=0;j<w.length-1;j++){var L=A;A=0;for(var H=67108863&_,q=Math.min(j,v.length-1),X=Math.max(0,j-y.length+1);X<=q;X++){var F=j-X,W=(0|y.words[F])*(0|v.words[X]),I=67108863&W;H=67108863&(I=I+H|0),A+=(L=(L=L+(W/67108864|0)|0)+(I>>>26)|0)>>>26,L&=67108863}w.words[j]=H,_=L,L=A}return _!==0?w.words[j]=_:w.length--,w.strip()}(this,E,O):S(this,E,O)},C.prototype.makeRBT=function(E){for(var O=new Array(E),x=e.prototype._countBits(E)-1,y=0;y<E;y++)O[y]=this.revBin(y,x,E);return O},C.prototype.revBin=function(E,O,x){if(E===0||E===x-1)return E;for(var y=0,v=0;v<O;v++)y|=(1&E)<<O-v-1,E>>=1;return y},C.prototype.permute=function(E,O,x,y,v,w){for(var _=0;_<w;_++)y[_]=O[E[_]],v[_]=x[E[_]]},C.prototype.transform=function(E,O,x,y,v,w){this.permute(w,E,O,x,y,v);for(var _=1;_<v;_<<=1)for(var A=_<<1,j=Math.cos(2*Math.PI/A),L=Math.sin(2*Math.PI/A),H=0;H<v;H+=A)for(var q=j,X=L,F=0;F<_;F++){var W=x[H+F],I=y[H+F],R=x[H+F+_],V=y[H+F+_],K=q*R-X*V;V=q*V+X*R,R=K,x[H+F]=W+R,y[H+F]=I+V,x[H+F+_]=W-R,y[H+F+_]=I-V,F!==A&&(K=j*q-L*X,X=j*X+L*q,q=K)}},C.prototype.guessLen13b=function(E,O){var x=1|Math.max(O,E),y=1&x,v=0;for(x=x/2|0;x;x>>>=1)v++;return 1<<v+1+y},C.prototype.conjugate=function(E,O,x){if(!(x<=1))for(var y=0;y<x/2;y++){var v=E[y];E[y]=E[x-y-1],E[x-y-1]=v,v=O[y],O[y]=-O[x-y-1],O[x-y-1]=-v}},C.prototype.normalize13b=function(E,O){for(var x=0,y=0;y<O/2;y++){var v=8192*Math.round(E[2*y+1]/O)+Math.round(E[2*y]/O)+x;E[y]=67108863&v,x=v<67108864?0:v/67108864|0}return E},C.prototype.convert13b=function(E,O,x,y){for(var v=0,w=0;w<O;w++)v+=0|E[w],x[2*w]=8191&v,v>>>=13,x[2*w+1]=8191&v,v>>>=13;for(w=2*O;w<y;++w)x[w]=0;a(v===0),a((-8192&v)==0)},C.prototype.stub=function(E){for(var O=new Array(E),x=0;x<E;x++)O[x]=0;return O},C.prototype.mulp=function(E,O,x){var y=2*this.guessLen13b(E.length,O.length),v=this.makeRBT(y),w=this.stub(y),_=new Array(y),A=new Array(y),j=new Array(y),L=new Array(y),H=new Array(y),q=new Array(y),X=x.words;X.length=y,this.convert13b(E.words,E.length,_,y),this.convert13b(O.words,O.length,L,y),this.transform(_,w,A,j,y,v),this.transform(L,w,H,q,y,v);for(var F=0;F<y;F++){var W=A[F]*H[F]-j[F]*q[F];j[F]=A[F]*q[F]+j[F]*H[F],A[F]=W}return this.conjugate(A,j,y),this.transform(A,j,X,w,y,v),this.conjugate(X,w,y),this.normalize13b(X,y),x.negative=E.negative^O.negative,x.length=E.length+O.length,x.strip()},e.prototype.mul=function(E){var O=new e(null);return O.words=new Array(this.length+E.length),this.mulTo(E,O)},e.prototype.mulf=function(E){var O=new e(null);return O.words=new Array(this.length+E.length),S(this,E,O)},e.prototype.imul=function(E){return this.clone().mulTo(E,this)},e.prototype.imuln=function(E){a(typeof E=="number"),a(E<67108864);for(var O=0,x=0;x<this.length;x++){var y=(0|this.words[x])*E,v=(67108863&y)+(67108863&O);O>>=26,O+=y/67108864|0,O+=v>>>26,this.words[x]=67108863&v}return O!==0&&(this.words[x]=O,this.length++),this},e.prototype.muln=function(E){return this.clone().imuln(E)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(E){var O=function(w){for(var _=new Array(w.bitLength()),A=0;A<_.length;A++){var j=A/26|0,L=A%26;_[A]=(w.words[j]&1<<L)>>>L}return _}(E);if(O.length===0)return new e(1);for(var x=this,y=0;y<O.length&&O[y]===0;y++,x=x.sqr());if(++y<O.length)for(var v=x.sqr();y<O.length;y++,v=v.sqr())O[y]!==0&&(x=x.mul(v));return x},e.prototype.iushln=function(E){a(typeof E=="number"&&E>=0);var O,x=E%26,y=(E-x)/26,v=67108863>>>26-x<<26-x;if(x!==0){var w=0;for(O=0;O<this.length;O++){var _=this.words[O]&v,A=(0|this.words[O])-_<<x;this.words[O]=A|w,w=_>>>26-x}w&&(this.words[O]=w,this.length++)}if(y!==0){for(O=this.length-1;O>=0;O--)this.words[O+y]=this.words[O];for(O=0;O<y;O++)this.words[O]=0;this.length+=y}return this.strip()},e.prototype.ishln=function(E){return a(this.negative===0),this.iushln(E)},e.prototype.iushrn=function(E,O,x){var y;a(typeof E=="number"&&E>=0),y=O?(O-O%26)/26:0;var v=E%26,w=Math.min((E-v)/26,this.length),_=67108863^67108863>>>v<<v,A=x;if(y-=w,y=Math.max(0,y),A){for(var j=0;j<w;j++)A.words[j]=this.words[j];A.length=w}if(w!==0)if(this.length>w)for(this.length-=w,j=0;j<this.length;j++)this.words[j]=this.words[j+w];else this.words[0]=0,this.length=1;var L=0;for(j=this.length-1;j>=0&&(L!==0||j>=y);j--){var H=0|this.words[j];this.words[j]=L<<26-v|H>>>v,L=H&_}return A&&L!==0&&(A.words[A.length++]=L),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},e.prototype.ishrn=function(E,O,x){return a(this.negative===0),this.iushrn(E,O,x)},e.prototype.shln=function(E){return this.clone().ishln(E)},e.prototype.ushln=function(E){return this.clone().iushln(E)},e.prototype.shrn=function(E){return this.clone().ishrn(E)},e.prototype.ushrn=function(E){return this.clone().iushrn(E)},e.prototype.testn=function(E){a(typeof E=="number"&&E>=0);var O=E%26,x=(E-O)/26,y=1<<O;return!(this.length<=x)&&!!(this.words[x]&y)},e.prototype.imaskn=function(E){a(typeof E=="number"&&E>=0);var O=E%26,x=(E-O)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(O!==0&&x++,this.length=Math.min(x,this.length),O!==0){var y=67108863^67108863>>>O<<O;this.words[this.length-1]&=y}return this.strip()},e.prototype.maskn=function(E){return this.clone().imaskn(E)},e.prototype.iaddn=function(E){return a(typeof E=="number"),a(E<67108864),E<0?this.isubn(-E):this.negative!==0?this.length===1&&(0|this.words[0])<E?(this.words[0]=E-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(E),this.negative=1,this):this._iaddn(E)},e.prototype._iaddn=function(E){this.words[0]+=E;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},e.prototype.isubn=function(E){if(a(typeof E=="number"),a(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},e.prototype.addn=function(E){return this.clone().iaddn(E)},e.prototype.subn=function(E){return this.clone().isubn(E)},e.prototype.iabs=function(){return this.negative=0,this},e.prototype.abs=function(){return this.clone().iabs()},e.prototype._ishlnsubmul=function(E,O,x){var y,v,w=E.length+x;this._expand(w);var _=0;for(y=0;y<E.length;y++){v=(0|this.words[y+x])+_;var A=(0|E.words[y])*O;_=((v-=67108863&A)>>26)-(A/67108864|0),this.words[y+x]=67108863&v}for(;y<this.length-x;y++)_=(v=(0|this.words[y+x])+_)>>26,this.words[y+x]=67108863&v;if(_===0)return this.strip();for(a(_===-1),_=0,y=0;y<this.length;y++)_=(v=-(0|this.words[y])+_)>>26,this.words[y]=67108863&v;return this.negative=1,this.strip()},e.prototype._wordDiv=function(E,O){var x=(this.length,E.length),y=this.clone(),v=E,w=0|v.words[v.length-1];(x=26-this._countBits(w))!==0&&(v=v.ushln(x),y.iushln(x),w=0|v.words[v.length-1]);var _,A=y.length-v.length;if(O!=="mod"){(_=new e(null)).length=A+1,_.words=new Array(_.length);for(var j=0;j<_.length;j++)_.words[j]=0}var L=y.clone()._ishlnsubmul(v,1,A);L.negative===0&&(y=L,_&&(_.words[A]=1));for(var H=A-1;H>=0;H--){var q=67108864*(0|y.words[v.length+H])+(0|y.words[v.length+H-1]);for(q=Math.min(q/w|0,67108863),y._ishlnsubmul(v,q,H);y.negative!==0;)q--,y.negative=0,y._ishlnsubmul(v,1,H),y.isZero()||(y.negative^=1);_&&(_.words[H]=q)}return _&&_.strip(),y.strip(),O!=="div"&&x!==0&&y.iushrn(x),{div:_||null,mod:y}},e.prototype.divmod=function(E,O,x){return a(!E.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:this.negative!==0&&E.negative===0?(w=this.neg().divmod(E,O),O!=="mod"&&(y=w.div.neg()),O!=="div"&&(v=w.mod.neg(),x&&v.negative!==0&&v.iadd(E)),{div:y,mod:v}):this.negative===0&&E.negative!==0?(w=this.divmod(E.neg(),O),O!=="mod"&&(y=w.div.neg()),{div:y,mod:w.mod}):this.negative&E.negative?(w=this.neg().divmod(E.neg(),O),O!=="div"&&(v=w.mod.neg(),x&&v.negative!==0&&v.isub(E)),{div:w.div,mod:v}):E.length>this.length||this.cmp(E)<0?{div:new e(0),mod:this}:E.length===1?O==="div"?{div:this.divn(E.words[0]),mod:null}:O==="mod"?{div:null,mod:new e(this.modn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new e(this.modn(E.words[0]))}:this._wordDiv(E,O);var y,v,w},e.prototype.div=function(E){return this.divmod(E,"div",!1).div},e.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},e.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},e.prototype.divRound=function(E){var O=this.divmod(E);if(O.mod.isZero())return O.div;var x=O.div.negative!==0?O.mod.isub(E):O.mod,y=E.ushrn(1),v=E.andln(1),w=x.cmp(y);return w<0||v===1&&w===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},e.prototype.modn=function(E){a(E<=67108863);for(var O=(1<<26)%E,x=0,y=this.length-1;y>=0;y--)x=(O*x+(0|this.words[y]))%E;return x},e.prototype.idivn=function(E){a(E<=67108863);for(var O=0,x=this.length-1;x>=0;x--){var y=(0|this.words[x])+67108864*O;this.words[x]=y/E|0,O=y%E}return this.strip()},e.prototype.divn=function(E){return this.clone().idivn(E)},e.prototype.egcd=function(E){a(E.negative===0),a(!E.isZero());var O=this,x=E.clone();O=O.negative!==0?O.umod(E):O.clone();for(var y=new e(1),v=new e(0),w=new e(0),_=new e(1),A=0;O.isEven()&&x.isEven();)O.iushrn(1),x.iushrn(1),++A;for(var j=x.clone(),L=O.clone();!O.isZero();){for(var H=0,q=1;!(O.words[0]&q)&&H<26;++H,q<<=1);if(H>0)for(O.iushrn(H);H-- >0;)(y.isOdd()||v.isOdd())&&(y.iadd(j),v.isub(L)),y.iushrn(1),v.iushrn(1);for(var X=0,F=1;!(x.words[0]&F)&&X<26;++X,F<<=1);if(X>0)for(x.iushrn(X);X-- >0;)(w.isOdd()||_.isOdd())&&(w.iadd(j),_.isub(L)),w.iushrn(1),_.iushrn(1);O.cmp(x)>=0?(O.isub(x),y.isub(w),v.isub(_)):(x.isub(O),w.isub(y),_.isub(v))}return{a:w,b:_,gcd:x.iushln(A)}},e.prototype._invmp=function(E){a(E.negative===0),a(!E.isZero());var O=this,x=E.clone();O=O.negative!==0?O.umod(E):O.clone();for(var y,v=new e(1),w=new e(0),_=x.clone();O.cmpn(1)>0&&x.cmpn(1)>0;){for(var A=0,j=1;!(O.words[0]&j)&&A<26;++A,j<<=1);if(A>0)for(O.iushrn(A);A-- >0;)v.isOdd()&&v.iadd(_),v.iushrn(1);for(var L=0,H=1;!(x.words[0]&H)&&L<26;++L,H<<=1);if(L>0)for(x.iushrn(L);L-- >0;)w.isOdd()&&w.iadd(_),w.iushrn(1);O.cmp(x)>=0?(O.isub(x),v.isub(w)):(x.isub(O),w.isub(v))}return(y=O.cmpn(1)===0?v:w).cmpn(0)<0&&y.iadd(E),y},e.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var O=this.clone(),x=E.clone();O.negative=0,x.negative=0;for(var y=0;O.isEven()&&x.isEven();y++)O.iushrn(1),x.iushrn(1);for(;;){for(;O.isEven();)O.iushrn(1);for(;x.isEven();)x.iushrn(1);var v=O.cmp(x);if(v<0){var w=O;O=x,x=w}else if(v===0||x.cmpn(1)===0)break;O.isub(x)}return x.iushln(y)},e.prototype.invm=function(E){return this.egcd(E).a.umod(E)},e.prototype.isEven=function(){return(1&this.words[0])==0},e.prototype.isOdd=function(){return(1&this.words[0])==1},e.prototype.andln=function(E){return this.words[0]&E},e.prototype.bincn=function(E){a(typeof E=="number");var O=E%26,x=(E-O)/26,y=1<<O;if(this.length<=x)return this._expand(x+1),this.words[x]|=y,this;for(var v=y,w=x;v!==0&&w<this.length;w++){var _=0|this.words[w];v=(_+=v)>>>26,_&=67108863,this.words[w]=_}return v!==0&&(this.words[w]=v,this.length++),this},e.prototype.isZero=function(){return this.length===1&&this.words[0]===0},e.prototype.cmpn=function(E){var O,x=E<0;if(this.negative!==0&&!x)return-1;if(this.negative===0&&x)return 1;if(this.strip(),this.length>1)O=1;else{x&&(E=-E),a(E<=67108863,"Number is too big");var y=0|this.words[0];O=y===E?0:y<E?-1:1}return this.negative!==0?0|-O:O},e.prototype.cmp=function(E){if(this.negative!==0&&E.negative===0)return-1;if(this.negative===0&&E.negative!==0)return 1;var O=this.ucmp(E);return this.negative!==0?0|-O:O},e.prototype.ucmp=function(E){if(this.length>E.length)return 1;if(this.length<E.length)return-1;for(var O=0,x=this.length-1;x>=0;x--){var y=0|this.words[x],v=0|E.words[x];if(y!==v){y<v?O=-1:y>v&&(O=1);break}}return O},e.prototype.gtn=function(E){return this.cmpn(E)===1},e.prototype.gt=function(E){return this.cmp(E)===1},e.prototype.gten=function(E){return this.cmpn(E)>=0},e.prototype.gte=function(E){return this.cmp(E)>=0},e.prototype.ltn=function(E){return this.cmpn(E)===-1},e.prototype.lt=function(E){return this.cmp(E)===-1},e.prototype.lten=function(E){return this.cmpn(E)<=0},e.prototype.lte=function(E){return this.cmp(E)<=0},e.prototype.eqn=function(E){return this.cmpn(E)===0},e.prototype.eq=function(E){return this.cmp(E)===0},e.red=function(E){return new U(E)},e.prototype.toRed=function(E){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},e.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(E){return this.red=E,this},e.prototype.forceRed=function(E){return a(!this.red,"Already a number in reduction context"),this._forceRed(E)},e.prototype.redAdd=function(E){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},e.prototype.redIAdd=function(E){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},e.prototype.redSub=function(E){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},e.prototype.redISub=function(E){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},e.prototype.redShl=function(E){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},e.prototype.redMul=function(E){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},e.prototype.redIMul=function(E){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},e.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(E){return a(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var M={k256:null,p224:null,p192:null,p25519:null};function P(E,O){this.name=E,this.p=new e(O,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function $(){P.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function N(){P.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){P.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function D(){P.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function U(E){if(typeof E=="string"){var O=e._prime(E);this.m=O.p,this.prime=O}else a(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}function z(E){U.call(this,E),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}P.prototype._tmp=function(){var E=new e(null);return E.words=new Array(Math.ceil(this.n/13)),E},P.prototype.ireduce=function(E){var O,x=E;do this.split(x,this.tmp),O=(x=(x=this.imulK(x)).iadd(this.tmp)).bitLength();while(O>this.n);var y=O<this.n?-1:x.ucmp(this.p);return y===0?(x.words[0]=0,x.length=1):y>0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},P.prototype.split=function(E,O){E.iushrn(this.n,0,O)},P.prototype.imulK=function(E){return E.imul(this.k)},r($,P),$.prototype.split=function(E,O){for(var x=Math.min(E.length,9),y=0;y<x;y++)O.words[y]=E.words[y];if(O.length=x,E.length<=9)return E.words[0]=0,void(E.length=1);var v=E.words[9];for(O.words[O.length++]=4194303&v,y=10;y<E.length;y++){var w=0|E.words[y];E.words[y-10]=(4194303&w)<<4|v>>>22,v=w}v>>>=22,E.words[y-10]=v,v===0&&E.length>10?E.length-=10:E.length-=9},$.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var O=0,x=0;x<E.length;x++){var y=0|E.words[x];O+=977*y,E.words[x]=67108863&O,O=64*y+(O/67108864|0)}return E.words[E.length-1]===0&&(E.length--,E.words[E.length-1]===0&&E.length--),E},r(N,P),r(B,P),r(D,P),D.prototype.imulK=function(E){for(var O=0,x=0;x<E.length;x++){var y=19*(0|E.words[x])+O,v=67108863&y;y>>>=26,E.words[x]=v,O=y}return O!==0&&(E.words[E.length++]=O),E},e._prime=function(E){if(M[E])return M[E];var O;if(E==="k256")O=new $;else if(E==="p224")O=new N;else if(E==="p192")O=new B;else{if(E!=="p25519")throw new Error("Unknown prime "+E);O=new D}return M[E]=O,O},U.prototype._verify1=function(E){a(E.negative===0,"red works only with positives"),a(E.red,"red works only with red numbers")},U.prototype._verify2=function(E,O){a((E.negative|O.negative)==0,"red works only with positives"),a(E.red&&E.red===O.red,"red works only with red numbers")},U.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):E.umod(this.m)._forceRed(this)},U.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},U.prototype.add=function(E,O){this._verify2(E,O);var x=E.add(O);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},U.prototype.iadd=function(E,O){this._verify2(E,O);var x=E.iadd(O);return x.cmp(this.m)>=0&&x.isub(this.m),x},U.prototype.sub=function(E,O){this._verify2(E,O);var x=E.sub(O);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},U.prototype.isub=function(E,O){this._verify2(E,O);var x=E.isub(O);return x.cmpn(0)<0&&x.iadd(this.m),x},U.prototype.shl=function(E,O){return this._verify1(E),this.imod(E.ushln(O))},U.prototype.imul=function(E,O){return this._verify2(E,O),this.imod(E.imul(O))},U.prototype.mul=function(E,O){return this._verify2(E,O),this.imod(E.mul(O))},U.prototype.isqr=function(E){return this.imul(E,E.clone())},U.prototype.sqr=function(E){return this.mul(E,E)},U.prototype.sqrt=function(E){if(E.isZero())return E.clone();var O=this.m.andln(3);if(a(O%2==1),O===3){var x=this.m.add(new e(1)).iushrn(2);return this.pow(E,x)}for(var y=this.m.subn(1),v=0;!y.isZero()&&y.andln(1)===0;)v++,y.iushrn(1);a(!y.isZero());var w=new e(1).toRed(this),_=w.redNeg(),A=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new e(2*j*j).toRed(this);this.pow(j,A).cmp(_)!==0;)j.redIAdd(_);for(var L=this.pow(j,y),H=this.pow(E,y.addn(1).iushrn(1)),q=this.pow(E,y),X=v;q.cmp(w)!==0;){for(var F=q,W=0;F.cmp(w)!==0;W++)F=F.redSqr();a(W<X);var I=this.pow(L,new e(1).iushln(X-W-1));H=H.redMul(I),L=I.redSqr(),q=q.redMul(L),X=W}return H},U.prototype.invm=function(E){var O=E._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},U.prototype.pow=function(E,O){if(O.isZero())return new e(1).toRed(this);if(O.cmpn(1)===0)return E.clone();var x=new Array(16);x[0]=new e(1).toRed(this),x[1]=E;for(var y=2;y<x.length;y++)x[y]=this.mul(x[y-1],E);var v=x[0],w=0,_=0,A=O.bitLength()%26;for(A===0&&(A=26),y=O.length-1;y>=0;y--){for(var j=O.words[y],L=A-1;L>=0;L--){var H=j>>L&1;v!==x[0]&&(v=this.sqr(v)),H!==0||w!==0?(w<<=1,w|=H,(++_===4||y===0&&L===0)&&(v=this.mul(v,x[w]),_=0,w=0)):_=0}A=26}return v},U.prototype.convertTo=function(E){var O=E.umod(this.m);return O===E?O.clone():O},U.prototype.convertFrom=function(E){var O=E.clone();return O.red=null,O},e.mont=function(E){return new z(E)},r(z,U),z.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},z.prototype.convertFrom=function(E){var O=this.imod(E.mul(this.rinv));return O.red=null,O},z.prototype.imul=function(E,O){if(E.isZero()||O.isZero())return E.words[0]=0,E.length=1,E;var x=E.imul(O),y=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=x.isub(y).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},z.prototype.mul=function(E,O){if(E.isZero()||O.isZero())return new e(0)._forceRed(this);var x=E.mul(O),y=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),v=x.isub(y).iushrn(this.shift),w=v;return v.cmp(this.m)>=0?w=v.isub(this.m):v.cmpn(0)<0&&(w=v.iadd(this.m)),w._forceRed(this)},z.prototype.invm=function(E){return this.imod(E._invmp(this.m).mul(this.r2))._forceRed(this)}})(b===void 0||b)},{buffer:188}],185:[function(t,b,g){g.byteLength=function(s){var h=l(s),d=h[0],c=h[1];return 3*(d+c)/4-c},g.toByteArray=function(s){var h,d,c=l(s),p=c[0],m=c[1],S=new a(function(P,$,N){return 3*($+N)/4-N}(0,p,m)),C=0,M=m>0?p-4:p;for(d=0;d<M;d+=4)h=o[s.charCodeAt(d)]<<18|o[s.charCodeAt(d+1)]<<12|o[s.charCodeAt(d+2)]<<6|o[s.charCodeAt(d+3)],S[C++]=h>>16&255,S[C++]=h>>8&255,S[C++]=255&h;return m===2&&(h=o[s.charCodeAt(d)]<<2|o[s.charCodeAt(d+1)]>>4,S[C++]=255&h),m===1&&(h=o[s.charCodeAt(d)]<<10|o[s.charCodeAt(d+1)]<<4|o[s.charCodeAt(d+2)]>>2,S[C++]=h>>8&255,S[C++]=255&h),S},g.fromByteArray=function(s){for(var h,d=s.length,c=d%3,p=[],m=0,S=d-c;m<S;m+=16383)p.push(i(s,m,m+16383>S?S:m+16383));return c===1?(h=s[d-1],p.push(f[h>>2]+f[h<<4&63]+"==")):c===2&&(h=(s[d-2]<<8)+s[d-1],p.push(f[h>>10]+f[h>>4&63]+f[h<<2&63]+"=")),p.join("")};for(var f=[],o=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,n=r.length;e<n;++e)f[e]=r[e],o[r.charCodeAt(e)]=e;function l(s){var h=s.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=s.indexOf("=");return d===-1&&(d=h),[d,d===h?0:4-d%4]}function i(s,h,d){for(var c,p,m=[],S=h;S<d;S+=3)c=(s[S]<<16&16711680)+(s[S+1]<<8&65280)+(255&s[S+2]),m.push(f[(p=c)>>18&63]+f[p>>12&63]+f[p>>6&63]+f[63&p]);return m.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},{}],186:[function(t,b,g){(function(f,o){function a(x,y){if(!x)throw new Error(y||"Assertion failed")}function r(x,y){x.super_=y;var v=function(){};v.prototype=y.prototype,x.prototype=new v,x.prototype.constructor=x}function e(x,y,v){if(e.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&(y!=="le"&&y!=="be"||(v=y,y=10),this._init(x||0,y||10,v||"be"))}var n;typeof f=="object"?f.exports=e:(void 0).BN=e,e.BN=e,e.wordSize=26;try{n=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:t("buffer").Buffer}catch{}function l(x,y){var v=x.charCodeAt(y);return v>=48&&v<=57?v-48:v>=65&&v<=70?v-55:v>=97&&v<=102?v-87:void a(!1,"Invalid character in "+x)}function i(x,y,v){var w=l(x,v);return v-1>=y&&(w|=l(x,v-1)<<4),w}function s(x,y,v,w){for(var _=0,A=0,j=Math.min(x.length,v),L=y;L<j;L++){var H=x.charCodeAt(L)-48;_*=w,A=H>=49?H-49+10:H>=17?H-17+10:H,a(H>=0&&A<w,"Invalid character"),_+=A}return _}function h(x,y){x.words=y.words,x.length=y.length,x.negative=y.negative,x.red=y.red}if(e.isBN=function(x){return x instanceof e||x!==null&&typeof x=="object"&&x.constructor.wordSize===e.wordSize&&Array.isArray(x.words)},e.max=function(x,y){return x.cmp(y)>0?x:y},e.min=function(x,y){return x.cmp(y)<0?x:y},e.prototype._init=function(x,y,v){if(typeof x=="number")return this._initNumber(x,y,v);if(typeof x=="object")return this._initArray(x,y,v);y==="hex"&&(y=16),a(y===(0|y)&&y>=2&&y<=36);var w=0;(x=x.toString().replace(/\s+/g,""))[0]==="-"&&(w++,this.negative=1),w<x.length&&(y===16?this._parseHex(x,w,v):(this._parseBase(x,y,w),v==="le"&&this._initArray(this.toArray(),y,v)))},e.prototype._initNumber=function(x,y,v){x<0&&(this.negative=1,x=-x),x<67108864?(this.words=[67108863&x],this.length=1):x<4503599627370496?(this.words=[67108863&x,x/67108864&67108863],this.length=2):(a(x<9007199254740992),this.words=[67108863&x,x/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),y,v)},e.prototype._initArray=function(x,y,v){if(a(typeof x.length=="number"),x.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(x.length/3),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var _,A,j=0;if(v==="be")for(w=x.length-1,_=0;w>=0;w-=3)A=x[w]|x[w-1]<<8|x[w-2]<<16,this.words[_]|=A<<j&67108863,this.words[_+1]=A>>>26-j&67108863,(j+=24)>=26&&(j-=26,_++);else if(v==="le")for(w=0,_=0;w<x.length;w+=3)A=x[w]|x[w+1]<<8|x[w+2]<<16,this.words[_]|=A<<j&67108863,this.words[_+1]=A>>>26-j&67108863,(j+=24)>=26&&(j-=26,_++);return this._strip()},e.prototype._parseHex=function(x,y,v){this.length=Math.ceil((x.length-y)/6),this.words=new Array(this.length);for(var w=0;w<this.length;w++)this.words[w]=0;var _,A=0,j=0;if(v==="be")for(w=x.length-1;w>=y;w-=2)_=i(x,y,w)<<A,this.words[j]|=67108863&_,A>=18?(A-=18,j+=1,this.words[j]|=_>>>26):A+=8;else for(w=(x.length-y)%2==0?y+1:y;w<x.length;w+=2)_=i(x,y,w)<<A,this.words[j]|=67108863&_,A>=18?(A-=18,j+=1,this.words[j]|=_>>>26):A+=8;this._strip()},e.prototype._parseBase=function(x,y,v){this.words=[0],this.length=1;for(var w=0,_=1;_<=67108863;_*=y)w++;w--,_=_/y|0;for(var A=x.length-v,j=A%w,L=Math.min(A,A-j)+v,H=0,q=v;q<L;q+=w)H=s(x,q,q+w,y),this.imuln(_),this.words[0]+H<67108864?this.words[0]+=H:this._iaddn(H);if(j!==0){var X=1;for(H=s(x,q,x.length,y),q=0;q<j;q++)X*=y;this.imuln(X),this.words[0]+H<67108864?this.words[0]+=H:this._iaddn(H)}this._strip()},e.prototype.copy=function(x){x.words=new Array(this.length);for(var y=0;y<this.length;y++)x.words[y]=this.words[y];x.length=this.length,x.negative=this.negative,x.red=this.red},e.prototype._move=function(x){h(x,this)},e.prototype.clone=function(){var x=new e(null);return this.copy(x),x},e.prototype._expand=function(x){for(;this.length<x;)this.words[this.length++]=0;return this},e.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},e.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{e.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch{e.prototype.inspect=d}else e.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];e.prototype.toString=function(x,y){var v;if(y=0|y||1,(x=x||10)===16||x==="hex"){v="";for(var w=0,_=0,A=0;A<this.length;A++){var j=this.words[A],L=(16777215&(j<<w|_)).toString(16);_=j>>>24-w&16777215,(w+=2)>=26&&(w-=26,A--),v=_!==0||A!==this.length-1?c[6-L.length]+L+v:L+v}for(_!==0&&(v=_.toString(16)+v);v.length%y!=0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(x===(0|x)&&x>=2&&x<=36){var H=p[x],q=m[x];v="";var X=this.clone();for(X.negative=0;!X.isZero();){var F=X.modrn(q).toString(x);v=(X=X.idivn(q)).isZero()?F+v:c[H-F.length]+F+v}for(this.isZero()&&(v="0"+v);v.length%y!=0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}a(!1,"Base should be between 2 and 36")},e.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=67108864*this.words[1]:this.length===3&&this.words[2]===1?x+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},e.prototype.toJSON=function(){return this.toString(16,2)},n&&(e.prototype.toBuffer=function(x,y){return this.toArrayLike(n,x,y)}),e.prototype.toArray=function(x,y){return this.toArrayLike(Array,x,y)};function S(x,y,v){v.negative=y.negative^x.negative;var w=x.length+y.length|0;v.length=w,w=w-1|0;var _=0|x.words[0],A=0|y.words[0],j=_*A,L=67108863&j,H=j/67108864|0;v.words[0]=L;for(var q=1;q<w;q++){for(var X=H>>>26,F=67108863&H,W=Math.min(q,y.length-1),I=Math.max(0,q-x.length+1);I<=W;I++){var R=q-I|0;X+=(j=(_=0|x.words[R])*(A=0|y.words[I])+F)/67108864|0,F=67108863&j}v.words[q]=0|F,H=0|X}return H!==0?v.words[q]=0|H:v.length--,v._strip()}e.prototype.toArrayLike=function(x,y,v){this._strip();var w=this.byteLength(),_=v||Math.max(1,w);a(w<=_,"byte array longer than desired length"),a(_>0,"Requested array length <= 0");var A=function(j,L){return j.allocUnsafe?j.allocUnsafe(L):new j(L)}(x,_);return this["_toArrayLike"+(y==="le"?"LE":"BE")](A,w),A},e.prototype._toArrayLikeLE=function(x,y){for(var v=0,w=0,_=0,A=0;_<this.length;_++){var j=this.words[_]<<A|w;x[v++]=255&j,v<x.length&&(x[v++]=j>>8&255),v<x.length&&(x[v++]=j>>16&255),A===6?(v<x.length&&(x[v++]=j>>24&255),w=0,A=0):(w=j>>>24,A+=2)}if(v<x.length)for(x[v++]=w;v<x.length;)x[v++]=0},e.prototype._toArrayLikeBE=function(x,y){for(var v=x.length-1,w=0,_=0,A=0;_<this.length;_++){var j=this.words[_]<<A|w;x[v--]=255&j,v>=0&&(x[v--]=j>>8&255),v>=0&&(x[v--]=j>>16&255),A===6?(v>=0&&(x[v--]=j>>24&255),w=0,A=0):(w=j>>>24,A+=2)}if(v>=0)for(x[v--]=w;v>=0;)x[v--]=0},Math.clz32?e.prototype._countBits=function(x){return 32-Math.clz32(x)}:e.prototype._countBits=function(x){var y=x,v=0;return y>=4096&&(v+=13,y>>>=13),y>=64&&(v+=7,y>>>=7),y>=8&&(v+=4,y>>>=4),y>=2&&(v+=2,y>>>=2),v+y},e.prototype._zeroBits=function(x){if(x===0)return 26;var y=x,v=0;return!(8191&y)&&(v+=13,y>>>=13),!(127&y)&&(v+=7,y>>>=7),!(15&y)&&(v+=4,y>>>=4),!(3&y)&&(v+=2,y>>>=2),!(1&y)&&v++,v},e.prototype.bitLength=function(){var x=this.words[this.length-1],y=this._countBits(x);return 26*(this.length-1)+y},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,y=0;y<this.length;y++){var v=this._zeroBits(this.words[y]);if(x+=v,v!==26)break}return x},e.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},e.prototype.toTwos=function(x){return this.negative!==0?this.abs().inotn(x).iaddn(1):this.clone()},e.prototype.fromTwos=function(x){return this.testn(x-1)?this.notn(x).iaddn(1).ineg():this.clone()},e.prototype.isNeg=function(){return this.negative!==0},e.prototype.neg=function(){return this.clone().ineg()},e.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},e.prototype.iuor=function(x){for(;this.length<x.length;)this.words[this.length++]=0;for(var y=0;y<x.length;y++)this.words[y]=this.words[y]|x.words[y];return this._strip()},e.prototype.ior=function(x){return a((this.negative|x.negative)==0),this.iuor(x)},e.prototype.or=function(x){return this.length>x.length?this.clone().ior(x):x.clone().ior(this)},e.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},e.prototype.iuand=function(x){var y;y=this.length>x.length?x:this;for(var v=0;v<y.length;v++)this.words[v]=this.words[v]&x.words[v];return this.length=y.length,this._strip()},e.prototype.iand=function(x){return a((this.negative|x.negative)==0),this.iuand(x)},e.prototype.and=function(x){return this.length>x.length?this.clone().iand(x):x.clone().iand(this)},e.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},e.prototype.iuxor=function(x){var y,v;this.length>x.length?(y=this,v=x):(y=x,v=this);for(var w=0;w<v.length;w++)this.words[w]=y.words[w]^v.words[w];if(this!==y)for(;w<y.length;w++)this.words[w]=y.words[w];return this.length=y.length,this._strip()},e.prototype.ixor=function(x){return a((this.negative|x.negative)==0),this.iuxor(x)},e.prototype.xor=function(x){return this.length>x.length?this.clone().ixor(x):x.clone().ixor(this)},e.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},e.prototype.inotn=function(x){a(typeof x=="number"&&x>=0);var y=0|Math.ceil(x/26),v=x%26;this._expand(y),v>0&&y--;for(var w=0;w<y;w++)this.words[w]=67108863&~this.words[w];return v>0&&(this.words[w]=~this.words[w]&67108863>>26-v),this._strip()},e.prototype.notn=function(x){return this.clone().inotn(x)},e.prototype.setn=function(x,y){a(typeof x=="number"&&x>=0);var v=x/26|0,w=x%26;return this._expand(v+1),this.words[v]=y?this.words[v]|1<<w:this.words[v]&~(1<<w),this._strip()},e.prototype.iadd=function(x){var y,v,w;if(this.negative!==0&&x.negative===0)return this.negative=0,y=this.isub(x),this.negative^=1,this._normSign();if(this.negative===0&&x.negative!==0)return x.negative=0,y=this.isub(x),x.negative=1,y._normSign();this.length>x.length?(v=this,w=x):(v=x,w=this);for(var _=0,A=0;A<w.length;A++)y=(0|v.words[A])+(0|w.words[A])+_,this.words[A]=67108863&y,_=y>>>26;for(;_!==0&&A<v.length;A++)y=(0|v.words[A])+_,this.words[A]=67108863&y,_=y>>>26;if(this.length=v.length,_!==0)this.words[this.length]=_,this.length++;else if(v!==this)for(;A<v.length;A++)this.words[A]=v.words[A];return this},e.prototype.add=function(x){var y;return x.negative!==0&&this.negative===0?(x.negative=0,y=this.sub(x),x.negative^=1,y):x.negative===0&&this.negative!==0?(this.negative=0,y=x.sub(this),this.negative=1,y):this.length>x.length?this.clone().iadd(x):x.clone().iadd(this)},e.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var y=this.iadd(x);return x.negative=1,y._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var v,w,_=this.cmp(x);if(_===0)return this.negative=0,this.length=1,this.words[0]=0,this;_>0?(v=this,w=x):(v=x,w=this);for(var A=0,j=0;j<w.length;j++)A=(y=(0|v.words[j])-(0|w.words[j])+A)>>26,this.words[j]=67108863&y;for(;A!==0&&j<v.length;j++)A=(y=(0|v.words[j])+A)>>26,this.words[j]=67108863&y;if(A===0&&j<v.length&&v!==this)for(;j<v.length;j++)this.words[j]=v.words[j];return this.length=Math.max(this.length,j),v!==this&&(this.negative=1),this._strip()},e.prototype.sub=function(x){return this.clone().isub(x)};var C=function(x,y,v){var w,_,A,j=x.words,L=y.words,H=v.words,q=0,X=0|j[0],F=8191&X,W=X>>>13,I=0|j[1],R=8191&I,V=I>>>13,K=0|j[2],Z=8191&K,Y=K>>>13,J=0|j[3],nt=8191&J,it=J>>>13,G=0|j[4],tt=8191&G,et=G>>>13,ot=0|j[5],st=8191&ot,lt=ot>>>13,ft=0|j[6],pt=8191&ft,yt=ft>>>13,Ot=0|j[7],At=8191&Ot,kt=Ot>>>13,Wt=0|j[8],Ht=8191&Wt,Vt=Wt>>>13,Kt=0|j[9],Nt=8191&Kt,_t=Kt>>>13,Rt=0|L[0],zt=8191&Rt,Bt=Rt>>>13,mt=0|L[1],It=8191&mt,xt=mt>>>13,Dt=0|L[2],jt=8191&Dt,Pt=Dt>>>13,Zt=0|L[3],$t=8191&Zt,Lt=Zt>>>13,ut=0|L[4],bt=8191&ut,ht=ut>>>13,St=0|L[5],Yt=8191&St,Tt=St>>>13,rt=0|L[6],at=8191&rt,dt=rt>>>13,wt=0|L[7],Ut=8191&wt,Ct=wt>>>13,Qt=0|L[8],Jt=8191&Qt,qt=Qt>>>13,re=0|L[9],ee=8191&re,ae=re>>>13;v.negative=x.negative^y.negative,v.length=19;var ke=(q+(w=Math.imul(F,zt))|0)+((8191&(_=(_=Math.imul(F,Bt))+Math.imul(W,zt)|0))<<13)|0;q=((A=Math.imul(W,Bt))+(_>>>13)|0)+(ke>>>26)|0,ke&=67108863,w=Math.imul(R,zt),_=(_=Math.imul(R,Bt))+Math.imul(V,zt)|0,A=Math.imul(V,Bt);var be=(q+(w=w+Math.imul(F,It)|0)|0)+((8191&(_=(_=_+Math.imul(F,xt)|0)+Math.imul(W,It)|0))<<13)|0;q=((A=A+Math.imul(W,xt)|0)+(_>>>13)|0)+(be>>>26)|0,be&=67108863,w=Math.imul(Z,zt),_=(_=Math.imul(Z,Bt))+Math.imul(Y,zt)|0,A=Math.imul(Y,Bt),w=w+Math.imul(R,It)|0,_=(_=_+Math.imul(R,xt)|0)+Math.imul(V,It)|0,A=A+Math.imul(V,xt)|0;var Me=(q+(w=w+Math.imul(F,jt)|0)|0)+((8191&(_=(_=_+Math.imul(F,Pt)|0)+Math.imul(W,jt)|0))<<13)|0;q=((A=A+Math.imul(W,Pt)|0)+(_>>>13)|0)+(Me>>>26)|0,Me&=67108863,w=Math.imul(nt,zt),_=(_=Math.imul(nt,Bt))+Math.imul(it,zt)|0,A=Math.imul(it,Bt),w=w+Math.imul(Z,It)|0,_=(_=_+Math.imul(Z,xt)|0)+Math.imul(Y,It)|0,A=A+Math.imul(Y,xt)|0,w=w+Math.imul(R,jt)|0,_=(_=_+Math.imul(R,Pt)|0)+Math.imul(V,jt)|0,A=A+Math.imul(V,Pt)|0;var Re=(q+(w=w+Math.imul(F,$t)|0)|0)+((8191&(_=(_=_+Math.imul(F,Lt)|0)+Math.imul(W,$t)|0))<<13)|0;q=((A=A+Math.imul(W,Lt)|0)+(_>>>13)|0)+(Re>>>26)|0,Re&=67108863,w=Math.imul(tt,zt),_=(_=Math.imul(tt,Bt))+Math.imul(et,zt)|0,A=Math.imul(et,Bt),w=w+Math.imul(nt,It)|0,_=(_=_+Math.imul(nt,xt)|0)+Math.imul(it,It)|0,A=A+Math.imul(it,xt)|0,w=w+Math.imul(Z,jt)|0,_=(_=_+Math.imul(Z,Pt)|0)+Math.imul(Y,jt)|0,A=A+Math.imul(Y,Pt)|0,w=w+Math.imul(R,$t)|0,_=(_=_+Math.imul(R,Lt)|0)+Math.imul(V,$t)|0,A=A+Math.imul(V,Lt)|0;var Ie=(q+(w=w+Math.imul(F,bt)|0)|0)+((8191&(_=(_=_+Math.imul(F,ht)|0)+Math.imul(W,bt)|0))<<13)|0;q=((A=A+Math.imul(W,ht)|0)+(_>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,w=Math.imul(st,zt),_=(_=Math.imul(st,Bt))+Math.imul(lt,zt)|0,A=Math.imul(lt,Bt),w=w+Math.imul(tt,It)|0,_=(_=_+Math.imul(tt,xt)|0)+Math.imul(et,It)|0,A=A+Math.imul(et,xt)|0,w=w+Math.imul(nt,jt)|0,_=(_=_+Math.imul(nt,Pt)|0)+Math.imul(it,jt)|0,A=A+Math.imul(it,Pt)|0,w=w+Math.imul(Z,$t)|0,_=(_=_+Math.imul(Z,Lt)|0)+Math.imul(Y,$t)|0,A=A+Math.imul(Y,Lt)|0,w=w+Math.imul(R,bt)|0,_=(_=_+Math.imul(R,ht)|0)+Math.imul(V,bt)|0,A=A+Math.imul(V,ht)|0;var Q=(q+(w=w+Math.imul(F,Yt)|0)|0)+((8191&(_=(_=_+Math.imul(F,Tt)|0)+Math.imul(W,Yt)|0))<<13)|0;q=((A=A+Math.imul(W,Tt)|0)+(_>>>13)|0)+(Q>>>26)|0,Q&=67108863,w=Math.imul(pt,zt),_=(_=Math.imul(pt,Bt))+Math.imul(yt,zt)|0,A=Math.imul(yt,Bt),w=w+Math.imul(st,It)|0,_=(_=_+Math.imul(st,xt)|0)+Math.imul(lt,It)|0,A=A+Math.imul(lt,xt)|0,w=w+Math.imul(tt,jt)|0,_=(_=_+Math.imul(tt,Pt)|0)+Math.imul(et,jt)|0,A=A+Math.imul(et,Pt)|0,w=w+Math.imul(nt,$t)|0,_=(_=_+Math.imul(nt,Lt)|0)+Math.imul(it,$t)|0,A=A+Math.imul(it,Lt)|0,w=w+Math.imul(Z,bt)|0,_=(_=_+Math.imul(Z,ht)|0)+Math.imul(Y,bt)|0,A=A+Math.imul(Y,ht)|0,w=w+Math.imul(R,Yt)|0,_=(_=_+Math.imul(R,Tt)|0)+Math.imul(V,Yt)|0,A=A+Math.imul(V,Tt)|0;var ct=(q+(w=w+Math.imul(F,at)|0)|0)+((8191&(_=(_=_+Math.imul(F,dt)|0)+Math.imul(W,at)|0))<<13)|0;q=((A=A+Math.imul(W,dt)|0)+(_>>>13)|0)+(ct>>>26)|0,ct&=67108863,w=Math.imul(At,zt),_=(_=Math.imul(At,Bt))+Math.imul(kt,zt)|0,A=Math.imul(kt,Bt),w=w+Math.imul(pt,It)|0,_=(_=_+Math.imul(pt,xt)|0)+Math.imul(yt,It)|0,A=A+Math.imul(yt,xt)|0,w=w+Math.imul(st,jt)|0,_=(_=_+Math.imul(st,Pt)|0)+Math.imul(lt,jt)|0,A=A+Math.imul(lt,Pt)|0,w=w+Math.imul(tt,$t)|0,_=(_=_+Math.imul(tt,Lt)|0)+Math.imul(et,$t)|0,A=A+Math.imul(et,Lt)|0,w=w+Math.imul(nt,bt)|0,_=(_=_+Math.imul(nt,ht)|0)+Math.imul(it,bt)|0,A=A+Math.imul(it,ht)|0,w=w+Math.imul(Z,Yt)|0,_=(_=_+Math.imul(Z,Tt)|0)+Math.imul(Y,Yt)|0,A=A+Math.imul(Y,Tt)|0,w=w+Math.imul(R,at)|0,_=(_=_+Math.imul(R,dt)|0)+Math.imul(V,at)|0,A=A+Math.imul(V,dt)|0;var gt=(q+(w=w+Math.imul(F,Ut)|0)|0)+((8191&(_=(_=_+Math.imul(F,Ct)|0)+Math.imul(W,Ut)|0))<<13)|0;q=((A=A+Math.imul(W,Ct)|0)+(_>>>13)|0)+(gt>>>26)|0,gt&=67108863,w=Math.imul(Ht,zt),_=(_=Math.imul(Ht,Bt))+Math.imul(Vt,zt)|0,A=Math.imul(Vt,Bt),w=w+Math.imul(At,It)|0,_=(_=_+Math.imul(At,xt)|0)+Math.imul(kt,It)|0,A=A+Math.imul(kt,xt)|0,w=w+Math.imul(pt,jt)|0,_=(_=_+Math.imul(pt,Pt)|0)+Math.imul(yt,jt)|0,A=A+Math.imul(yt,Pt)|0,w=w+Math.imul(st,$t)|0,_=(_=_+Math.imul(st,Lt)|0)+Math.imul(lt,$t)|0,A=A+Math.imul(lt,Lt)|0,w=w+Math.imul(tt,bt)|0,_=(_=_+Math.imul(tt,ht)|0)+Math.imul(et,bt)|0,A=A+Math.imul(et,ht)|0,w=w+Math.imul(nt,Yt)|0,_=(_=_+Math.imul(nt,Tt)|0)+Math.imul(it,Yt)|0,A=A+Math.imul(it,Tt)|0,w=w+Math.imul(Z,at)|0,_=(_=_+Math.imul(Z,dt)|0)+Math.imul(Y,at)|0,A=A+Math.imul(Y,dt)|0,w=w+Math.imul(R,Ut)|0,_=(_=_+Math.imul(R,Ct)|0)+Math.imul(V,Ut)|0,A=A+Math.imul(V,Ct)|0;var vt=(q+(w=w+Math.imul(F,Jt)|0)|0)+((8191&(_=(_=_+Math.imul(F,qt)|0)+Math.imul(W,Jt)|0))<<13)|0;q=((A=A+Math.imul(W,qt)|0)+(_>>>13)|0)+(vt>>>26)|0,vt&=67108863,w=Math.imul(Nt,zt),_=(_=Math.imul(Nt,Bt))+Math.imul(_t,zt)|0,A=Math.imul(_t,Bt),w=w+Math.imul(Ht,It)|0,_=(_=_+Math.imul(Ht,xt)|0)+Math.imul(Vt,It)|0,A=A+Math.imul(Vt,xt)|0,w=w+Math.imul(At,jt)|0,_=(_=_+Math.imul(At,Pt)|0)+Math.imul(kt,jt)|0,A=A+Math.imul(kt,Pt)|0,w=w+Math.imul(pt,$t)|0,_=(_=_+Math.imul(pt,Lt)|0)+Math.imul(yt,$t)|0,A=A+Math.imul(yt,Lt)|0,w=w+Math.imul(st,bt)|0,_=(_=_+Math.imul(st,ht)|0)+Math.imul(lt,bt)|0,A=A+Math.imul(lt,ht)|0,w=w+Math.imul(tt,Yt)|0,_=(_=_+Math.imul(tt,Tt)|0)+Math.imul(et,Yt)|0,A=A+Math.imul(et,Tt)|0,w=w+Math.imul(nt,at)|0,_=(_=_+Math.imul(nt,dt)|0)+Math.imul(it,at)|0,A=A+Math.imul(it,dt)|0,w=w+Math.imul(Z,Ut)|0,_=(_=_+Math.imul(Z,Ct)|0)+Math.imul(Y,Ut)|0,A=A+Math.imul(Y,Ct)|0,w=w+Math.imul(R,Jt)|0,_=(_=_+Math.imul(R,qt)|0)+Math.imul(V,Jt)|0,A=A+Math.imul(V,qt)|0;var Xt=(q+(w=w+Math.imul(F,ee)|0)|0)+((8191&(_=(_=_+Math.imul(F,ae)|0)+Math.imul(W,ee)|0))<<13)|0;q=((A=A+Math.imul(W,ae)|0)+(_>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,w=Math.imul(Nt,It),_=(_=Math.imul(Nt,xt))+Math.imul(_t,It)|0,A=Math.imul(_t,xt),w=w+Math.imul(Ht,jt)|0,_=(_=_+Math.imul(Ht,Pt)|0)+Math.imul(Vt,jt)|0,A=A+Math.imul(Vt,Pt)|0,w=w+Math.imul(At,$t)|0,_=(_=_+Math.imul(At,Lt)|0)+Math.imul(kt,$t)|0,A=A+Math.imul(kt,Lt)|0,w=w+Math.imul(pt,bt)|0,_=(_=_+Math.imul(pt,ht)|0)+Math.imul(yt,bt)|0,A=A+Math.imul(yt,ht)|0,w=w+Math.imul(st,Yt)|0,_=(_=_+Math.imul(st,Tt)|0)+Math.imul(lt,Yt)|0,A=A+Math.imul(lt,Tt)|0,w=w+Math.imul(tt,at)|0,_=(_=_+Math.imul(tt,dt)|0)+Math.imul(et,at)|0,A=A+Math.imul(et,dt)|0,w=w+Math.imul(nt,Ut)|0,_=(_=_+Math.imul(nt,Ct)|0)+Math.imul(it,Ut)|0,A=A+Math.imul(it,Ct)|0,w=w+Math.imul(Z,Jt)|0,_=(_=_+Math.imul(Z,qt)|0)+Math.imul(Y,Jt)|0,A=A+Math.imul(Y,qt)|0;var Et=(q+(w=w+Math.imul(R,ee)|0)|0)+((8191&(_=(_=_+Math.imul(R,ae)|0)+Math.imul(V,ee)|0))<<13)|0;q=((A=A+Math.imul(V,ae)|0)+(_>>>13)|0)+(Et>>>26)|0,Et&=67108863,w=Math.imul(Nt,jt),_=(_=Math.imul(Nt,Pt))+Math.imul(_t,jt)|0,A=Math.imul(_t,Pt),w=w+Math.imul(Ht,$t)|0,_=(_=_+Math.imul(Ht,Lt)|0)+Math.imul(Vt,$t)|0,A=A+Math.imul(Vt,Lt)|0,w=w+Math.imul(At,bt)|0,_=(_=_+Math.imul(At,ht)|0)+Math.imul(kt,bt)|0,A=A+Math.imul(kt,ht)|0,w=w+Math.imul(pt,Yt)|0,_=(_=_+Math.imul(pt,Tt)|0)+Math.imul(yt,Yt)|0,A=A+Math.imul(yt,Tt)|0,w=w+Math.imul(st,at)|0,_=(_=_+Math.imul(st,dt)|0)+Math.imul(lt,at)|0,A=A+Math.imul(lt,dt)|0,w=w+Math.imul(tt,Ut)|0,_=(_=_+Math.imul(tt,Ct)|0)+Math.imul(et,Ut)|0,A=A+Math.imul(et,Ct)|0,w=w+Math.imul(nt,Jt)|0,_=(_=_+Math.imul(nt,qt)|0)+Math.imul(it,Jt)|0,A=A+Math.imul(it,qt)|0;var Mt=(q+(w=w+Math.imul(Z,ee)|0)|0)+((8191&(_=(_=_+Math.imul(Z,ae)|0)+Math.imul(Y,ee)|0))<<13)|0;q=((A=A+Math.imul(Y,ae)|0)+(_>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,w=Math.imul(Nt,$t),_=(_=Math.imul(Nt,Lt))+Math.imul(_t,$t)|0,A=Math.imul(_t,Lt),w=w+Math.imul(Ht,bt)|0,_=(_=_+Math.imul(Ht,ht)|0)+Math.imul(Vt,bt)|0,A=A+Math.imul(Vt,ht)|0,w=w+Math.imul(At,Yt)|0,_=(_=_+Math.imul(At,Tt)|0)+Math.imul(kt,Yt)|0,A=A+Math.imul(kt,Tt)|0,w=w+Math.imul(pt,at)|0,_=(_=_+Math.imul(pt,dt)|0)+Math.imul(yt,at)|0,A=A+Math.imul(yt,dt)|0,w=w+Math.imul(st,Ut)|0,_=(_=_+Math.imul(st,Ct)|0)+Math.imul(lt,Ut)|0,A=A+Math.imul(lt,Ct)|0,w=w+Math.imul(tt,Jt)|0,_=(_=_+Math.imul(tt,qt)|0)+Math.imul(et,Jt)|0,A=A+Math.imul(et,qt)|0;var ue=(q+(w=w+Math.imul(nt,ee)|0)|0)+((8191&(_=(_=_+Math.imul(nt,ae)|0)+Math.imul(it,ee)|0))<<13)|0;q=((A=A+Math.imul(it,ae)|0)+(_>>>13)|0)+(ue>>>26)|0,ue&=67108863,w=Math.imul(Nt,bt),_=(_=Math.imul(Nt,ht))+Math.imul(_t,bt)|0,A=Math.imul(_t,ht),w=w+Math.imul(Ht,Yt)|0,_=(_=_+Math.imul(Ht,Tt)|0)+Math.imul(Vt,Yt)|0,A=A+Math.imul(Vt,Tt)|0,w=w+Math.imul(At,at)|0,_=(_=_+Math.imul(At,dt)|0)+Math.imul(kt,at)|0,A=A+Math.imul(kt,dt)|0,w=w+Math.imul(pt,Ut)|0,_=(_=_+Math.imul(pt,Ct)|0)+Math.imul(yt,Ut)|0,A=A+Math.imul(yt,Ct)|0,w=w+Math.imul(st,Jt)|0,_=(_=_+Math.imul(st,qt)|0)+Math.imul(lt,Jt)|0,A=A+Math.imul(lt,qt)|0;var le=(q+(w=w+Math.imul(tt,ee)|0)|0)+((8191&(_=(_=_+Math.imul(tt,ae)|0)+Math.imul(et,ee)|0))<<13)|0;q=((A=A+Math.imul(et,ae)|0)+(_>>>13)|0)+(le>>>26)|0,le&=67108863,w=Math.imul(Nt,Yt),_=(_=Math.imul(Nt,Tt))+Math.imul(_t,Yt)|0,A=Math.imul(_t,Tt),w=w+Math.imul(Ht,at)|0,_=(_=_+Math.imul(Ht,dt)|0)+Math.imul(Vt,at)|0,A=A+Math.imul(Vt,dt)|0,w=w+Math.imul(At,Ut)|0,_=(_=_+Math.imul(At,Ct)|0)+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Ct)|0,w=w+Math.imul(pt,Jt)|0,_=(_=_+Math.imul(pt,qt)|0)+Math.imul(yt,Jt)|0,A=A+Math.imul(yt,qt)|0;var se=(q+(w=w+Math.imul(st,ee)|0)|0)+((8191&(_=(_=_+Math.imul(st,ae)|0)+Math.imul(lt,ee)|0))<<13)|0;q=((A=A+Math.imul(lt,ae)|0)+(_>>>13)|0)+(se>>>26)|0,se&=67108863,w=Math.imul(Nt,at),_=(_=Math.imul(Nt,dt))+Math.imul(_t,at)|0,A=Math.imul(_t,dt),w=w+Math.imul(Ht,Ut)|0,_=(_=_+Math.imul(Ht,Ct)|0)+Math.imul(Vt,Ut)|0,A=A+Math.imul(Vt,Ct)|0,w=w+Math.imul(At,Jt)|0,_=(_=_+Math.imul(At,qt)|0)+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,qt)|0;var te=(q+(w=w+Math.imul(pt,ee)|0)|0)+((8191&(_=(_=_+Math.imul(pt,ae)|0)+Math.imul(yt,ee)|0))<<13)|0;q=((A=A+Math.imul(yt,ae)|0)+(_>>>13)|0)+(te>>>26)|0,te&=67108863,w=Math.imul(Nt,Ut),_=(_=Math.imul(Nt,Ct))+Math.imul(_t,Ut)|0,A=Math.imul(_t,Ct),w=w+Math.imul(Ht,Jt)|0,_=(_=_+Math.imul(Ht,qt)|0)+Math.imul(Vt,Jt)|0,A=A+Math.imul(Vt,qt)|0;var pe=(q+(w=w+Math.imul(At,ee)|0)|0)+((8191&(_=(_=_+Math.imul(At,ae)|0)+Math.imul(kt,ee)|0))<<13)|0;q=((A=A+Math.imul(kt,ae)|0)+(_>>>13)|0)+(pe>>>26)|0,pe&=67108863,w=Math.imul(Nt,Jt),_=(_=Math.imul(Nt,qt))+Math.imul(_t,Jt)|0,A=Math.imul(_t,qt);var Ce=(q+(w=w+Math.imul(Ht,ee)|0)|0)+((8191&(_=(_=_+Math.imul(Ht,ae)|0)+Math.imul(Vt,ee)|0))<<13)|0;q=((A=A+Math.imul(Vt,ae)|0)+(_>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var fe=(q+(w=Math.imul(Nt,ee))|0)+((8191&(_=(_=Math.imul(Nt,ae))+Math.imul(_t,ee)|0))<<13)|0;return q=((A=Math.imul(_t,ae))+(_>>>13)|0)+(fe>>>26)|0,fe&=67108863,H[0]=ke,H[1]=be,H[2]=Me,H[3]=Re,H[4]=Ie,H[5]=Q,H[6]=ct,H[7]=gt,H[8]=vt,H[9]=Xt,H[10]=Et,H[11]=Mt,H[12]=ue,H[13]=le,H[14]=se,H[15]=te,H[16]=pe,H[17]=Ce,H[18]=fe,q!==0&&(H[19]=q,v.length++),v};function M(x,y,v){v.negative=y.negative^x.negative,v.length=x.length+y.length;for(var w=0,_=0,A=0;A<v.length-1;A++){var j=_;_=0;for(var L=67108863&w,H=Math.min(A,y.length-1),q=Math.max(0,A-x.length+1);q<=H;q++){var X=A-q,F=(0|x.words[X])*(0|y.words[q]),W=67108863&F;L=67108863&(W=W+L|0),_+=(j=(j=j+(F/67108864|0)|0)+(W>>>26)|0)>>>26,j&=67108863}v.words[A]=L,w=j,j=_}return w!==0?v.words[A]=w:v.length--,v._strip()}function P(x,y,v){return M(x,y,v)}Math.imul||(C=S),e.prototype.mulTo=function(x,y){var v=this.length+x.length;return this.length===10&&x.length===10?C(this,x,y):v<63?S(this,x,y):v<1024?M(this,x,y):P(this,x,y)},e.prototype.mul=function(x){var y=new e(null);return y.words=new Array(this.length+x.length),this.mulTo(x,y)},e.prototype.mulf=function(x){var y=new e(null);return y.words=new Array(this.length+x.length),P(this,x,y)},e.prototype.imul=function(x){return this.clone().mulTo(x,this)},e.prototype.imuln=function(x){var y=x<0;y&&(x=-x),a(typeof x=="number"),a(x<67108864);for(var v=0,w=0;w<this.length;w++){var _=(0|this.words[w])*x,A=(67108863&_)+(67108863&v);v>>=26,v+=_/67108864|0,v+=A>>>26,this.words[w]=67108863&A}return v!==0&&(this.words[w]=v,this.length++),y?this.ineg():this},e.prototype.muln=function(x){return this.clone().imuln(x)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(x){var y=function(A){for(var j=new Array(A.bitLength()),L=0;L<j.length;L++){var H=L/26|0,q=L%26;j[L]=A.words[H]>>>q&1}return j}(x);if(y.length===0)return new e(1);for(var v=this,w=0;w<y.length&&y[w]===0;w++,v=v.sqr());if(++w<y.length)for(var _=v.sqr();w<y.length;w++,_=_.sqr())y[w]!==0&&(v=v.mul(_));return v},e.prototype.iushln=function(x){a(typeof x=="number"&&x>=0);var y,v=x%26,w=(x-v)/26,_=67108863>>>26-v<<26-v;if(v!==0){var A=0;for(y=0;y<this.length;y++){var j=this.words[y]&_,L=(0|this.words[y])-j<<v;this.words[y]=L|A,A=j>>>26-v}A&&(this.words[y]=A,this.length++)}if(w!==0){for(y=this.length-1;y>=0;y--)this.words[y+w]=this.words[y];for(y=0;y<w;y++)this.words[y]=0;this.length+=w}return this._strip()},e.prototype.ishln=function(x){return a(this.negative===0),this.iushln(x)},e.prototype.iushrn=function(x,y,v){var w;a(typeof x=="number"&&x>=0),w=y?(y-y%26)/26:0;var _=x%26,A=Math.min((x-_)/26,this.length),j=67108863^67108863>>>_<<_,L=v;if(w-=A,w=Math.max(0,w),L){for(var H=0;H<A;H++)L.words[H]=this.words[H];L.length=A}if(A!==0)if(this.length>A)for(this.length-=A,H=0;H<this.length;H++)this.words[H]=this.words[H+A];else this.words[0]=0,this.length=1;var q=0;for(H=this.length-1;H>=0&&(q!==0||H>=w);H--){var X=0|this.words[H];this.words[H]=q<<26-_|X>>>_,q=X&j}return L&&q!==0&&(L.words[L.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},e.prototype.ishrn=function(x,y,v){return a(this.negative===0),this.iushrn(x,y,v)},e.prototype.shln=function(x){return this.clone().ishln(x)},e.prototype.ushln=function(x){return this.clone().iushln(x)},e.prototype.shrn=function(x){return this.clone().ishrn(x)},e.prototype.ushrn=function(x){return this.clone().iushrn(x)},e.prototype.testn=function(x){a(typeof x=="number"&&x>=0);var y=x%26,v=(x-y)/26,w=1<<y;return!(this.length<=v)&&!!(this.words[v]&w)},e.prototype.imaskn=function(x){a(typeof x=="number"&&x>=0);var y=x%26,v=(x-y)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(y!==0&&v++,this.length=Math.min(v,this.length),y!==0){var w=67108863^67108863>>>y<<y;this.words[this.length-1]&=w}return this._strip()},e.prototype.maskn=function(x){return this.clone().imaskn(x)},e.prototype.iaddn=function(x){return a(typeof x=="number"),a(x<67108864),x<0?this.isubn(-x):this.negative!==0?this.length===1&&(0|this.words[0])<=x?(this.words[0]=x-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(x),this.negative=1,this):this._iaddn(x)},e.prototype._iaddn=function(x){this.words[0]+=x;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},e.prototype.isubn=function(x){if(a(typeof x=="number"),a(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this._strip()},e.prototype.addn=function(x){return this.clone().iaddn(x)},e.prototype.subn=function(x){return this.clone().isubn(x)},e.prototype.iabs=function(){return this.negative=0,this},e.prototype.abs=function(){return this.clone().iabs()},e.prototype._ishlnsubmul=function(x,y,v){var w,_,A=x.length+v;this._expand(A);var j=0;for(w=0;w<x.length;w++){_=(0|this.words[w+v])+j;var L=(0|x.words[w])*y;j=((_-=67108863&L)>>26)-(L/67108864|0),this.words[w+v]=67108863&_}for(;w<this.length-v;w++)j=(_=(0|this.words[w+v])+j)>>26,this.words[w+v]=67108863&_;if(j===0)return this._strip();for(a(j===-1),j=0,w=0;w<this.length;w++)j=(_=-(0|this.words[w])+j)>>26,this.words[w]=67108863&_;return this.negative=1,this._strip()},e.prototype._wordDiv=function(x,y){var v=(this.length,x.length),w=this.clone(),_=x,A=0|_.words[_.length-1];(v=26-this._countBits(A))!==0&&(_=_.ushln(v),w.iushln(v),A=0|_.words[_.length-1]);var j,L=w.length-_.length;if(y!=="mod"){(j=new e(null)).length=L+1,j.words=new Array(j.length);for(var H=0;H<j.length;H++)j.words[H]=0}var q=w.clone()._ishlnsubmul(_,1,L);q.negative===0&&(w=q,j&&(j.words[L]=1));for(var X=L-1;X>=0;X--){var F=67108864*(0|w.words[_.length+X])+(0|w.words[_.length+X-1]);for(F=Math.min(F/A|0,67108863),w._ishlnsubmul(_,F,X);w.negative!==0;)F--,w.negative=0,w._ishlnsubmul(_,1,X),w.isZero()||(w.negative^=1);j&&(j.words[X]=F)}return j&&j._strip(),w._strip(),y!=="div"&&v!==0&&w.iushrn(v),{div:j||null,mod:w}},e.prototype.divmod=function(x,y,v){return a(!x.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:this.negative!==0&&x.negative===0?(A=this.neg().divmod(x,y),y!=="mod"&&(w=A.div.neg()),y!=="div"&&(_=A.mod.neg(),v&&_.negative!==0&&_.iadd(x)),{div:w,mod:_}):this.negative===0&&x.negative!==0?(A=this.divmod(x.neg(),y),y!=="mod"&&(w=A.div.neg()),{div:w,mod:A.mod}):this.negative&x.negative?(A=this.neg().divmod(x.neg(),y),y!=="div"&&(_=A.mod.neg(),v&&_.negative!==0&&_.isub(x)),{div:A.div,mod:_}):x.length>this.length||this.cmp(x)<0?{div:new e(0),mod:this}:x.length===1?y==="div"?{div:this.divn(x.words[0]),mod:null}:y==="mod"?{div:null,mod:new e(this.modrn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new e(this.modrn(x.words[0]))}:this._wordDiv(x,y);var w,_,A},e.prototype.div=function(x){return this.divmod(x,"div",!1).div},e.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},e.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},e.prototype.divRound=function(x){var y=this.divmod(x);if(y.mod.isZero())return y.div;var v=y.div.negative!==0?y.mod.isub(x):y.mod,w=x.ushrn(1),_=x.andln(1),A=v.cmp(w);return A<0||_===1&&A===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},e.prototype.modrn=function(x){var y=x<0;y&&(x=-x),a(x<=67108863);for(var v=(1<<26)%x,w=0,_=this.length-1;_>=0;_--)w=(v*w+(0|this.words[_]))%x;return y?-w:w},e.prototype.modn=function(x){return this.modrn(x)},e.prototype.idivn=function(x){var y=x<0;y&&(x=-x),a(x<=67108863);for(var v=0,w=this.length-1;w>=0;w--){var _=(0|this.words[w])+67108864*v;this.words[w]=_/x|0,v=_%x}return this._strip(),y?this.ineg():this},e.prototype.divn=function(x){return this.clone().idivn(x)},e.prototype.egcd=function(x){a(x.negative===0),a(!x.isZero());var y=this,v=x.clone();y=y.negative!==0?y.umod(x):y.clone();for(var w=new e(1),_=new e(0),A=new e(0),j=new e(1),L=0;y.isEven()&&v.isEven();)y.iushrn(1),v.iushrn(1),++L;for(var H=v.clone(),q=y.clone();!y.isZero();){for(var X=0,F=1;!(y.words[0]&F)&&X<26;++X,F<<=1);if(X>0)for(y.iushrn(X);X-- >0;)(w.isOdd()||_.isOdd())&&(w.iadd(H),_.isub(q)),w.iushrn(1),_.iushrn(1);for(var W=0,I=1;!(v.words[0]&I)&&W<26;++W,I<<=1);if(W>0)for(v.iushrn(W);W-- >0;)(A.isOdd()||j.isOdd())&&(A.iadd(H),j.isub(q)),A.iushrn(1),j.iushrn(1);y.cmp(v)>=0?(y.isub(v),w.isub(A),_.isub(j)):(v.isub(y),A.isub(w),j.isub(_))}return{a:A,b:j,gcd:v.iushln(L)}},e.prototype._invmp=function(x){a(x.negative===0),a(!x.isZero());var y=this,v=x.clone();y=y.negative!==0?y.umod(x):y.clone();for(var w,_=new e(1),A=new e(0),j=v.clone();y.cmpn(1)>0&&v.cmpn(1)>0;){for(var L=0,H=1;!(y.words[0]&H)&&L<26;++L,H<<=1);if(L>0)for(y.iushrn(L);L-- >0;)_.isOdd()&&_.iadd(j),_.iushrn(1);for(var q=0,X=1;!(v.words[0]&X)&&q<26;++q,X<<=1);if(q>0)for(v.iushrn(q);q-- >0;)A.isOdd()&&A.iadd(j),A.iushrn(1);y.cmp(v)>=0?(y.isub(v),_.isub(A)):(v.isub(y),A.isub(_))}return(w=y.cmpn(1)===0?_:A).cmpn(0)<0&&w.iadd(x),w},e.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var y=this.clone(),v=x.clone();y.negative=0,v.negative=0;for(var w=0;y.isEven()&&v.isEven();w++)y.iushrn(1),v.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;v.isEven();)v.iushrn(1);var _=y.cmp(v);if(_<0){var A=y;y=v,v=A}else if(_===0||v.cmpn(1)===0)break;y.isub(v)}return v.iushln(w)},e.prototype.invm=function(x){return this.egcd(x).a.umod(x)},e.prototype.isEven=function(){return(1&this.words[0])==0},e.prototype.isOdd=function(){return(1&this.words[0])==1},e.prototype.andln=function(x){return this.words[0]&x},e.prototype.bincn=function(x){a(typeof x=="number");var y=x%26,v=(x-y)/26,w=1<<y;if(this.length<=v)return this._expand(v+1),this.words[v]|=w,this;for(var _=w,A=v;_!==0&&A<this.length;A++){var j=0|this.words[A];_=(j+=_)>>>26,j&=67108863,this.words[A]=j}return _!==0&&(this.words[A]=_,this.length++),this},e.prototype.isZero=function(){return this.length===1&&this.words[0]===0},e.prototype.cmpn=function(x){var y,v=x<0;if(this.negative!==0&&!v)return-1;if(this.negative===0&&v)return 1;if(this._strip(),this.length>1)y=1;else{v&&(x=-x),a(x<=67108863,"Number is too big");var w=0|this.words[0];y=w===x?0:w<x?-1:1}return this.negative!==0?0|-y:y},e.prototype.cmp=function(x){if(this.negative!==0&&x.negative===0)return-1;if(this.negative===0&&x.negative!==0)return 1;var y=this.ucmp(x);return this.negative!==0?0|-y:y},e.prototype.ucmp=function(x){if(this.length>x.length)return 1;if(this.length<x.length)return-1;for(var y=0,v=this.length-1;v>=0;v--){var w=0|this.words[v],_=0|x.words[v];if(w!==_){w<_?y=-1:w>_&&(y=1);break}}return y},e.prototype.gtn=function(x){return this.cmpn(x)===1},e.prototype.gt=function(x){return this.cmp(x)===1},e.prototype.gten=function(x){return this.cmpn(x)>=0},e.prototype.gte=function(x){return this.cmp(x)>=0},e.prototype.ltn=function(x){return this.cmpn(x)===-1},e.prototype.lt=function(x){return this.cmp(x)===-1},e.prototype.lten=function(x){return this.cmpn(x)<=0},e.prototype.lte=function(x){return this.cmp(x)<=0},e.prototype.eqn=function(x){return this.cmpn(x)===0},e.prototype.eq=function(x){return this.cmp(x)===0},e.red=function(x){return new E(x)},e.prototype.toRed=function(x){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},e.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(x){return this.red=x,this},e.prototype.forceRed=function(x){return a(!this.red,"Already a number in reduction context"),this._forceRed(x)},e.prototype.redAdd=function(x){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},e.prototype.redIAdd=function(x){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},e.prototype.redSub=function(x){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},e.prototype.redISub=function(x){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},e.prototype.redShl=function(x){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},e.prototype.redMul=function(x){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},e.prototype.redIMul=function(x){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},e.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(x){return a(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var $={k256:null,p224:null,p192:null,p25519:null};function N(x,y){this.name=x,this.p=new e(y,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function B(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function D(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function U(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function z(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(x){if(typeof x=="string"){var y=e._prime(x);this.m=y.p,this.prime=y}else a(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}function O(x){E.call(this,x),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N.prototype._tmp=function(){var x=new e(null);return x.words=new Array(Math.ceil(this.n/13)),x},N.prototype.ireduce=function(x){var y,v=x;do this.split(v,this.tmp),y=(v=(v=this.imulK(v)).iadd(this.tmp)).bitLength();while(y>this.n);var w=y<this.n?-1:v.ucmp(this.p);return w===0?(v.words[0]=0,v.length=1):w>0?v.isub(this.p):v.strip!==void 0?v.strip():v._strip(),v},N.prototype.split=function(x,y){x.iushrn(this.n,0,y)},N.prototype.imulK=function(x){return x.imul(this.k)},r(B,N),B.prototype.split=function(x,y){for(var v=Math.min(x.length,9),w=0;w<v;w++)y.words[w]=x.words[w];if(y.length=v,x.length<=9)return x.words[0]=0,void(x.length=1);var _=x.words[9];for(y.words[y.length++]=4194303&_,w=10;w<x.length;w++){var A=0|x.words[w];x.words[w-10]=(4194303&A)<<4|_>>>22,_=A}_>>>=22,x.words[w-10]=_,_===0&&x.length>10?x.length-=10:x.length-=9},B.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var y=0,v=0;v<x.length;v++){var w=0|x.words[v];y+=977*w,x.words[v]=67108863&y,y=64*w+(y/67108864|0)}return x.words[x.length-1]===0&&(x.length--,x.words[x.length-1]===0&&x.length--),x},r(D,N),r(U,N),r(z,N),z.prototype.imulK=function(x){for(var y=0,v=0;v<x.length;v++){var w=19*(0|x.words[v])+y,_=67108863&w;w>>>=26,x.words[v]=_,y=w}return y!==0&&(x.words[x.length++]=y),x},e._prime=function(x){if($[x])return $[x];var y;if(x==="k256")y=new B;else if(x==="p224")y=new D;else if(x==="p192")y=new U;else{if(x!=="p25519")throw new Error("Unknown prime "+x);y=new z}return $[x]=y,y},E.prototype._verify1=function(x){a(x.negative===0,"red works only with positives"),a(x.red,"red works only with red numbers")},E.prototype._verify2=function(x,y){a((x.negative|y.negative)==0,"red works only with positives"),a(x.red&&x.red===y.red,"red works only with red numbers")},E.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):(h(x,x.umod(this.m)._forceRed(this)),x)},E.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},E.prototype.add=function(x,y){this._verify2(x,y);var v=x.add(y);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},E.prototype.iadd=function(x,y){this._verify2(x,y);var v=x.iadd(y);return v.cmp(this.m)>=0&&v.isub(this.m),v},E.prototype.sub=function(x,y){this._verify2(x,y);var v=x.sub(y);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},E.prototype.isub=function(x,y){this._verify2(x,y);var v=x.isub(y);return v.cmpn(0)<0&&v.iadd(this.m),v},E.prototype.shl=function(x,y){return this._verify1(x),this.imod(x.ushln(y))},E.prototype.imul=function(x,y){return this._verify2(x,y),this.imod(x.imul(y))},E.prototype.mul=function(x,y){return this._verify2(x,y),this.imod(x.mul(y))},E.prototype.isqr=function(x){return this.imul(x,x.clone())},E.prototype.sqr=function(x){return this.mul(x,x)},E.prototype.sqrt=function(x){if(x.isZero())return x.clone();var y=this.m.andln(3);if(a(y%2==1),y===3){var v=this.m.add(new e(1)).iushrn(2);return this.pow(x,v)}for(var w=this.m.subn(1),_=0;!w.isZero()&&w.andln(1)===0;)_++,w.iushrn(1);a(!w.isZero());var A=new e(1).toRed(this),j=A.redNeg(),L=this.m.subn(1).iushrn(1),H=this.m.bitLength();for(H=new e(2*H*H).toRed(this);this.pow(H,L).cmp(j)!==0;)H.redIAdd(j);for(var q=this.pow(H,w),X=this.pow(x,w.addn(1).iushrn(1)),F=this.pow(x,w),W=_;F.cmp(A)!==0;){for(var I=F,R=0;I.cmp(A)!==0;R++)I=I.redSqr();a(R<W);var V=this.pow(q,new e(1).iushln(W-R-1));X=X.redMul(V),q=V.redSqr(),F=F.redMul(q),W=R}return X},E.prototype.invm=function(x){var y=x._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},E.prototype.pow=function(x,y){if(y.isZero())return new e(1).toRed(this);if(y.cmpn(1)===0)return x.clone();var v=new Array(16);v[0]=new e(1).toRed(this),v[1]=x;for(var w=2;w<v.length;w++)v[w]=this.mul(v[w-1],x);var _=v[0],A=0,j=0,L=y.bitLength()%26;for(L===0&&(L=26),w=y.length-1;w>=0;w--){for(var H=y.words[w],q=L-1;q>=0;q--){var X=H>>q&1;_!==v[0]&&(_=this.sqr(_)),X!==0||A!==0?(A<<=1,A|=X,(++j===4||w===0&&q===0)&&(_=this.mul(_,v[A]),j=0,A=0)):j=0}L=26}return _},E.prototype.convertTo=function(x){var y=x.umod(this.m);return y===x?y.clone():y},E.prototype.convertFrom=function(x){var y=x.clone();return y.red=null,y},e.mont=function(x){return new O(x)},r(O,E),O.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},O.prototype.convertFrom=function(x){var y=this.imod(x.mul(this.rinv));return y.red=null,y},O.prototype.imul=function(x,y){if(x.isZero()||y.isZero())return x.words[0]=0,x.length=1,x;var v=x.imul(y),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=v.isub(w).iushrn(this.shift),A=_;return _.cmp(this.m)>=0?A=_.isub(this.m):_.cmpn(0)<0&&(A=_.iadd(this.m)),A._forceRed(this)},O.prototype.mul=function(x,y){if(x.isZero()||y.isZero())return new e(0)._forceRed(this);var v=x.mul(y),w=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=v.isub(w).iushrn(this.shift),A=_;return _.cmp(this.m)>=0?A=_.isub(this.m):_.cmpn(0)<0&&(A=_.iadd(this.m)),A._forceRed(this)},O.prototype.invm=function(x){return this.imod(x._invmp(this.m).mul(this.r2))._forceRed(this)}})(b===void 0||b)},{buffer:188}],187:[function(t,b,g){var f;function o(r){this.rand=r}if(b.exports=function(r){return f||(f=new o(null)),f.generate(r)},b.exports.Rand=o,o.prototype.generate=function(r){return this._rand(r)},o.prototype._rand=function(r){if(this.rand.getBytes)return this.rand.getBytes(r);for(var e=new Uint8Array(r),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(r){var e=new Uint8Array(r);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(r){var e=new Uint8Array(r);return self.msCrypto.getRandomValues(e),e}:typeof window=="object"&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=t("crypto");if(typeof a.randomBytes!="function")throw new Error("Not supported");o.prototype._rand=function(r){return a.randomBytes(r)}}catch{}},{crypto:188}],188:[function(t,b,g){},{}],189:[function(t,b,g){var f=t("safe-buffer").Buffer;function o(i){f.isBuffer(i)||(i=f.from(i));for(var s=i.length/4|0,h=new Array(s),d=0;d<s;d++)h[d]=i.readUInt32BE(4*d);return h}function a(i){for(;0<i.length;i++)i[0]=0}function r(i,s,h,d,c){for(var p,m,S,C,M=h[0],P=h[1],$=h[2],N=h[3],B=i[0]^s[0],D=i[1]^s[1],U=i[2]^s[2],z=i[3]^s[3],E=4,O=1;O<c;O++)p=M[B>>>24]^P[D>>>16&255]^$[U>>>8&255]^N[255&z]^s[E++],m=M[D>>>24]^P[U>>>16&255]^$[z>>>8&255]^N[255&B]^s[E++],S=M[U>>>24]^P[z>>>16&255]^$[B>>>8&255]^N[255&D]^s[E++],C=M[z>>>24]^P[B>>>16&255]^$[D>>>8&255]^N[255&U]^s[E++],B=p,D=m,U=S,z=C;return p=(d[B>>>24]<<24|d[D>>>16&255]<<16|d[U>>>8&255]<<8|d[255&z])^s[E++],m=(d[D>>>24]<<24|d[U>>>16&255]<<16|d[z>>>8&255]<<8|d[255&B])^s[E++],S=(d[U>>>24]<<24|d[z>>>16&255]<<16|d[B>>>8&255]<<8|d[255&D])^s[E++],C=(d[z>>>24]<<24|d[B>>>16&255]<<16|d[D>>>8&255]<<8|d[255&U])^s[E++],[p>>>=0,m>>>=0,S>>>=0,C>>>=0]}var e=[0,1,2,4,8,16,32,64,128,27,54],n=function(){for(var i=new Array(256),s=0;s<256;s++)i[s]=s<128?s<<1:s<<1^283;for(var h=[],d=[],c=[[],[],[],[]],p=[[],[],[],[]],m=0,S=0,C=0;C<256;++C){var M=S^S<<1^S<<2^S<<3^S<<4;M=M>>>8^255&M^99,h[m]=M,d[M]=m;var P=i[m],$=i[P],N=i[$],B=257*i[M]^16843008*M;c[0][m]=B<<24|B>>>8,c[1][m]=B<<16|B>>>16,c[2][m]=B<<8|B>>>24,c[3][m]=B,B=16843009*N^65537*$^257*P^16843008*m,p[0][M]=B<<24|B>>>8,p[1][M]=B<<16|B>>>16,p[2][M]=B<<8|B>>>24,p[3][M]=B,m===0?m=S=1:(m=P^i[i[i[N^P]]],S^=i[i[S]])}return{SBOX:h,INV_SBOX:d,SUB_MIX:c,INV_SUB_MIX:p}}();function l(i){this._key=o(i),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var i=this._key,s=i.length,h=s+6,d=4*(h+1),c=[],p=0;p<s;p++)c[p]=i[p];for(p=s;p<d;p++){var m=c[p-1];p%s==0?(m=m<<8|m>>>24,m=n.SBOX[m>>>24]<<24|n.SBOX[m>>>16&255]<<16|n.SBOX[m>>>8&255]<<8|n.SBOX[255&m],m^=e[p/s|0]<<24):s>6&&p%s==4&&(m=n.SBOX[m>>>24]<<24|n.SBOX[m>>>16&255]<<16|n.SBOX[m>>>8&255]<<8|n.SBOX[255&m]),c[p]=c[p-s]^m}for(var S=[],C=0;C<d;C++){var M=d-C,P=c[M-(C%4?0:4)];S[C]=C<4||M<=4?P:n.INV_SUB_MIX[0][n.SBOX[P>>>24]]^n.INV_SUB_MIX[1][n.SBOX[P>>>16&255]]^n.INV_SUB_MIX[2][n.SBOX[P>>>8&255]]^n.INV_SUB_MIX[3][n.SBOX[255&P]]}this._nRounds=h,this._keySchedule=c,this._invKeySchedule=S},l.prototype.encryptBlockRaw=function(i){return r(i=o(i),this._keySchedule,n.SUB_MIX,n.SBOX,this._nRounds)},l.prototype.encryptBlock=function(i){var s=this.encryptBlockRaw(i),h=f.allocUnsafe(16);return h.writeUInt32BE(s[0],0),h.writeUInt32BE(s[1],4),h.writeUInt32BE(s[2],8),h.writeUInt32BE(s[3],12),h},l.prototype.decryptBlock=function(i){var s=(i=o(i))[1];i[1]=i[3],i[3]=s;var h=r(i,this._invKeySchedule,n.INV_SUB_MIX,n.INV_SBOX,this._nRounds),d=f.allocUnsafe(16);return d.writeUInt32BE(h[0],0),d.writeUInt32BE(h[3],4),d.writeUInt32BE(h[2],8),d.writeUInt32BE(h[1],12),d},l.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},b.exports.AES=l},{"safe-buffer":494}],190:[function(t,b,g){var f=t("./aes"),o=t("safe-buffer").Buffer,a=t("cipher-base"),r=t("inherits"),e=t("./ghash"),n=t("buffer-xor"),l=t("./incr32");function i(s,h,d,c){a.call(this);var p=o.alloc(4,0);this._cipher=new f.AES(h);var m=this._cipher.encryptBlock(p);this._ghash=new e(m),d=function(S,C,M){if(C.length===12)return S._finID=o.concat([C,o.from([0,0,0,1])]),o.concat([C,o.from([0,0,0,2])]);var P=new e(M),$=C.length,N=$%16;P.update(C),N&&(N=16-N,P.update(o.alloc(N,0))),P.update(o.alloc(8,0));var B=8*$,D=o.alloc(8);D.writeUIntBE(B,0,8),P.update(D),S._finID=P.state;var U=o.from(S._finID);return l(U),U}(this,d,m),this._prev=o.from(d),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=c,this._alen=0,this._len=0,this._mode=s,this._authTag=null,this._called=!1}r(i,a),i.prototype._update=function(s){if(!this._called&&this._alen){var h=16-this._alen%16;h<16&&(h=o.alloc(h,0),this._ghash.update(h))}this._called=!0;var d=this._mode.encrypt(this,s);return this._decrypt?this._ghash.update(s):this._ghash.update(d),this._len+=s.length,d},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var s=n(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(h,d){var c=0;h.length!==d.length&&c++;for(var p=Math.min(h.length,d.length),m=0;m<p;++m)c+=h[m]^d[m];return c}(s,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=s,this._cipher.scrub()},i.prototype.getAuthTag=function(){if(this._decrypt||!o.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},i.prototype.setAuthTag=function(s){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=s},i.prototype.setAAD=function(s){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(s),this._alen+=s.length},b.exports=i},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(t,b,g){var f=t("./encrypter"),o=t("./decrypter"),a=t("./modes/list.json");g.createCipher=g.Cipher=f.createCipher,g.createCipheriv=g.Cipheriv=f.createCipheriv,g.createDecipher=g.Decipher=o.createDecipher,g.createDecipheriv=g.Decipheriv=o.createDecipheriv,g.listCiphers=g.getCiphers=function(){return Object.keys(a)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(t,b,g){var f=t("./authCipher"),o=t("safe-buffer").Buffer,a=t("./modes"),r=t("./streamCipher"),e=t("cipher-base"),n=t("./aes"),l=t("evp_bytestokey");function i(d,c,p){e.call(this),this._cache=new s,this._last=void 0,this._cipher=new n.AES(c),this._prev=o.from(p),this._mode=d,this._autopadding=!0}function s(){this.cache=o.allocUnsafe(0)}function h(d,c,p){var m=a[d.toLowerCase()];if(!m)throw new TypeError("invalid suite type");if(typeof p=="string"&&(p=o.from(p)),m.mode!=="GCM"&&p.length!==m.iv)throw new TypeError("invalid iv length "+p.length);if(typeof c=="string"&&(c=o.from(c)),c.length!==m.key/8)throw new TypeError("invalid key length "+c.length);return m.type==="stream"?new r(m.module,c,p,!0):m.type==="auth"?new f(m.module,c,p,!0):new i(m.module,c,p)}t("inherits")(i,e),i.prototype._update=function(d){var c,p;this._cache.add(d);for(var m=[];c=this._cache.get(this._autopadding);)p=this._mode.decrypt(this,c),m.push(p);return o.concat(m)},i.prototype._final=function(){var d=this._cache.flush();if(this._autopadding)return function(c){var p=c[15];if(p<1||p>16)throw new Error("unable to decrypt data");for(var m=-1;++m<p;)if(c[m+(16-p)]!==p)throw new Error("unable to decrypt data");if(p!==16)return c.slice(0,16-p)}(this._mode.decrypt(this,d));if(d)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(d){return this._autopadding=!!d,this},s.prototype.add=function(d){this.cache=o.concat([this.cache,d])},s.prototype.get=function(d){var c;if(d){if(this.cache.length>16)return c=this.cache.slice(0,16),this.cache=this.cache.slice(16),c}else if(this.cache.length>=16)return c=this.cache.slice(0,16),this.cache=this.cache.slice(16),c;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},g.createDecipher=function(d,c){var p=a[d.toLowerCase()];if(!p)throw new TypeError("invalid suite type");var m=l(c,!1,p.key,p.iv);return h(d,m.key,m.iv)},g.createDecipheriv=h},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(t,b,g){var f=t("./modes"),o=t("./authCipher"),a=t("safe-buffer").Buffer,r=t("./streamCipher"),e=t("cipher-base"),n=t("./aes"),l=t("evp_bytestokey");function i(c,p,m){e.call(this),this._cache=new h,this._cipher=new n.AES(p),this._prev=a.from(m),this._mode=c,this._autopadding=!0}t("inherits")(i,e),i.prototype._update=function(c){var p,m;this._cache.add(c);for(var S=[];p=this._cache.get();)m=this._mode.encrypt(this,p),S.push(m);return a.concat(S)};var s=a.alloc(16,16);function h(){this.cache=a.allocUnsafe(0)}function d(c,p,m){var S=f[c.toLowerCase()];if(!S)throw new TypeError("invalid suite type");if(typeof p=="string"&&(p=a.from(p)),p.length!==S.key/8)throw new TypeError("invalid key length "+p.length);if(typeof m=="string"&&(m=a.from(m)),S.mode!=="GCM"&&m.length!==S.iv)throw new TypeError("invalid iv length "+m.length);return S.type==="stream"?new r(S.module,p,m):S.type==="auth"?new o(S.module,p,m):new i(S.module,p,m)}i.prototype._final=function(){var c=this._cache.flush();if(this._autopadding)return c=this._mode.encrypt(this,c),this._cipher.scrub(),c;if(!c.equals(s))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(c){return this._autopadding=!!c,this},h.prototype.add=function(c){this.cache=a.concat([this.cache,c])},h.prototype.get=function(){if(this.cache.length>15){var c=this.cache.slice(0,16);return this.cache=this.cache.slice(16),c}return null},h.prototype.flush=function(){for(var c=16-this.cache.length,p=a.allocUnsafe(c),m=-1;++m<c;)p.writeUInt8(c,m);return a.concat([this.cache,p])},g.createCipheriv=d,g.createCipher=function(c,p){var m=f[c.toLowerCase()];if(!m)throw new TypeError("invalid suite type");var S=l(p,!1,m.key,m.iv);return d(c,S.key,S.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(t,b,g){var f=t("safe-buffer").Buffer,o=f.alloc(16,0);function a(e){var n=f.allocUnsafe(16);return n.writeUInt32BE(e[0]>>>0,0),n.writeUInt32BE(e[1]>>>0,4),n.writeUInt32BE(e[2]>>>0,8),n.writeUInt32BE(e[3]>>>0,12),n}function r(e){this.h=e,this.state=f.alloc(16,0),this.cache=f.allocUnsafe(0)}r.prototype.ghash=function(e){for(var n=-1;++n<e.length;)this.state[n]^=e[n];this._multiply()},r.prototype._multiply=function(){for(var e,n,l,i=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],s=[0,0,0,0],h=-1;++h<128;){for(this.state[~~(h/8)]&1<<7-h%8&&(s[0]^=i[0],s[1]^=i[1],s[2]^=i[2],s[3]^=i[3]),l=(1&i[3])!=0,n=3;n>0;n--)i[n]=i[n]>>>1|(1&i[n-1])<<31;i[0]=i[0]>>>1,l&&(i[0]=i[0]^225<<24)}this.state=a(s)},r.prototype.update=function(e){var n;for(this.cache=f.concat([this.cache,e]);this.cache.length>=16;)n=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(n)},r.prototype.final=function(e,n){return this.cache.length&&this.ghash(f.concat([this.cache,o],16)),this.ghash(a([0,e,0,n])),this.state},b.exports=r},{"safe-buffer":494}],195:[function(t,b,g){b.exports=function(f){for(var o,a=f.length;a--;){if((o=f.readUInt8(a))!==255){o++,f.writeUInt8(o,a);break}f.writeUInt8(0,a)}}},{}],196:[function(t,b,g){var f=t("buffer-xor");g.encrypt=function(o,a){var r=f(a,o._prev);return o._prev=o._cipher.encryptBlock(r),o._prev},g.decrypt=function(o,a){var r=o._prev;o._prev=a;var e=o._cipher.decryptBlock(a);return f(e,r)}},{"buffer-xor":219}],197:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("buffer-xor");function a(r,e,n){var l=e.length,i=o(e,r._cache);return r._cache=r._cache.slice(l),r._prev=f.concat([r._prev,n?e:i]),i}g.encrypt=function(r,e,n){for(var l,i=f.allocUnsafe(0);e.length;){if(r._cache.length===0&&(r._cache=r._cipher.encryptBlock(r._prev),r._prev=f.allocUnsafe(0)),!(r._cache.length<=e.length)){i=f.concat([i,a(r,e,n)]);break}l=r._cache.length,i=f.concat([i,a(r,e.slice(0,l),n)]),e=e.slice(l)}return i}},{"buffer-xor":219,"safe-buffer":494}],198:[function(t,b,g){var f=t("safe-buffer").Buffer;function o(r,e,n){for(var l,i,s=-1,h=0;++s<8;)l=e&1<<7-s?128:0,h+=(128&(i=r._cipher.encryptBlock(r._prev)[0]^l))>>s%8,r._prev=a(r._prev,n?l:i);return h}function a(r,e){var n=r.length,l=-1,i=f.allocUnsafe(r.length);for(r=f.concat([r,f.from([e])]);++l<n;)i[l]=r[l]<<1|r[l+1]>>7;return i}g.encrypt=function(r,e,n){for(var l=e.length,i=f.allocUnsafe(l),s=-1;++s<l;)i[s]=o(r,e[s],n);return i}},{"safe-buffer":494}],199:[function(t,b,g){var f=t("safe-buffer").Buffer;function o(a,r,e){var n=a._cipher.encryptBlock(a._prev)[0]^r;return a._prev=f.concat([a._prev.slice(1),f.from([e?r:n])]),n}g.encrypt=function(a,r,e){for(var n=r.length,l=f.allocUnsafe(n),i=-1;++i<n;)l[i]=o(a,r[i],e);return l}},{"safe-buffer":494}],200:[function(t,b,g){var f=t("buffer-xor"),o=t("safe-buffer").Buffer,a=t("../incr32");function r(e){var n=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),n}g.encrypt=function(e,n){var l=Math.ceil(n.length/16),i=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*l)]);for(var s=0;s<l;s++){var h=r(e),d=i+16*s;e._cache.writeUInt32BE(h[0],d+0),e._cache.writeUInt32BE(h[1],d+4),e._cache.writeUInt32BE(h[2],d+8),e._cache.writeUInt32BE(h[3],d+12)}var c=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),f(n,c)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(t,b,g){g.encrypt=function(f,o){return f._cipher.encryptBlock(o)},g.decrypt=function(f,o){return f._cipher.decryptBlock(o)}},{}],202:[function(t,b,g){var f={ECB:t("./ecb"),CBC:t("./cbc"),CFB:t("./cfb"),CFB8:t("./cfb8"),CFB1:t("./cfb1"),OFB:t("./ofb"),CTR:t("./ctr"),GCM:t("./ctr")},o=t("./list.json");for(var a in o)o[a].module=f[o[a].mode];b.exports=o},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(t,b,g){b.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],204:[function(t,b,g){(function(f){(function(){var o=t("buffer-xor");function a(r){return r._prev=r._cipher.encryptBlock(r._prev),r._prev}g.encrypt=function(r,e){for(;r._cache.length<e.length;)r._cache=f.concat([r._cache,a(r)]);var n=r._cache.slice(0,e.length);return r._cache=r._cache.slice(e.length),o(e,n)}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(t,b,g){var f=t("./aes"),o=t("safe-buffer").Buffer,a=t("cipher-base");function r(e,n,l,i){a.call(this),this._cipher=new f.AES(n),this._prev=o.from(l),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=i,this._mode=e}t("inherits")(r,a),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},b.exports=r},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(t,b,g){var f=t("browserify-des"),o=t("browserify-aes/browser"),a=t("browserify-aes/modes"),r=t("browserify-des/modes"),e=t("evp_bytestokey");function n(i,s,h){if(i=i.toLowerCase(),a[i])return o.createCipheriv(i,s,h);if(r[i])return new f({key:s,iv:h,mode:i});throw new TypeError("invalid suite type")}function l(i,s,h){if(i=i.toLowerCase(),a[i])return o.createDecipheriv(i,s,h);if(r[i])return new f({key:s,iv:h,mode:i,decrypt:!0});throw new TypeError("invalid suite type")}g.createCipher=g.Cipher=function(i,s){var h,d;if(i=i.toLowerCase(),a[i])h=a[i].key,d=a[i].iv;else{if(!r[i])throw new TypeError("invalid suite type");h=8*r[i].key,d=r[i].iv}var c=e(s,!1,h,d);return n(i,c.key,c.iv)},g.createCipheriv=g.Cipheriv=n,g.createDecipher=g.Decipher=function(i,s){var h,d;if(i=i.toLowerCase(),a[i])h=a[i].key,d=a[i].iv;else{if(!r[i])throw new TypeError("invalid suite type");h=8*r[i].key,d=r[i].iv}var c=e(s,!1,h,d);return l(i,c.key,c.iv)},g.createDecipheriv=g.Decipheriv=l,g.listCiphers=g.getCiphers=function(){return Object.keys(r).concat(o.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(t,b,g){var f=t("cipher-base"),o=t("des.js"),a=t("inherits"),r=t("safe-buffer").Buffer,e={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};function n(l){f.call(this);var i,s=l.mode.toLowerCase(),h=e[s];i=l.decrypt?"decrypt":"encrypt";var d=l.key;r.isBuffer(d)||(d=r.from(d)),s!=="des-ede"&&s!=="des-ede-cbc"||(d=r.concat([d,d.slice(0,8)]));var c=l.iv;r.isBuffer(c)||(c=r.from(c)),this._des=h.create({key:d,iv:c,type:i})}e.des=e["des-cbc"],e.des3=e["des-ede3-cbc"],b.exports=n,a(n,f),n.prototype._update=function(l){return r.from(this._des.update(l))},n.prototype._final=function(){return r.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(t,b,g){g["des-ecb"]={key:8,iv:0},g["des-cbc"]=g.des={key:8,iv:8},g["des-ede3-cbc"]=g.des3={key:24,iv:8},g["des-ede3"]={key:24,iv:0},g["des-ede-cbc"]={key:16,iv:8},g["des-ede"]={key:16,iv:0}},{}],209:[function(t,b,g){(function(f){(function(){var o=t("bn.js"),a=t("randombytes");function r(n){var l,i=n.modulus.byteLength();do l=new o(a(i));while(l.cmp(n.modulus)>=0||!l.umod(n.prime1)||!l.umod(n.prime2));return l}function e(n,l){var i=function($){var N=r($);return{blinder:N.toRed(o.mont($.modulus)).redPow(new o($.publicExponent)).fromRed(),unblinder:N.invm($.modulus)}}(l),s=l.modulus.byteLength(),h=new o(n).mul(i.blinder).umod(l.modulus),d=h.toRed(o.mont(l.prime1)),c=h.toRed(o.mont(l.prime2)),p=l.coefficient,m=l.prime1,S=l.prime2,C=d.redPow(l.exponent1).fromRed(),M=c.redPow(l.exponent2).fromRed(),P=C.isub(M).imul(p).umod(m).imul(S);return M.iadd(P).imul(i.unblinder).umod(l.modulus).toArrayLike(f,"be",s)}e.getr=r,b.exports=e}).call(this)}).call(this,t("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(t,b,g){b.exports=t("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(t,b,g){b.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],212:[function(t,b,g){b.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],213:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("create-hash"),a=t("readable-stream"),r=t("inherits"),e=t("./sign"),n=t("./verify"),l=t("./algorithms.json");function i(c){a.Writable.call(this);var p=l[c];if(!p)throw new Error("Unknown message digest");this._hashType=p.hash,this._hash=o(p.hash),this._tag=p.id,this._signType=p.sign}function s(c){a.Writable.call(this);var p=l[c];if(!p)throw new Error("Unknown message digest");this._hash=o(p.hash),this._tag=p.id,this._signType=p.sign}function h(c){return new i(c)}function d(c){return new s(c)}Object.keys(l).forEach(function(c){l[c].id=f.from(l[c].id,"hex"),l[c.toLowerCase()]=l[c]}),r(i,a.Writable),i.prototype._write=function(c,p,m){this._hash.update(c),m()},i.prototype.update=function(c,p){return typeof c=="string"&&(c=f.from(c,p)),this._hash.update(c),this},i.prototype.sign=function(c,p){this.end();var m=this._hash.digest(),S=e(m,c,this._hashType,this._signType,this._tag);return p?S.toString(p):S},r(s,a.Writable),s.prototype._write=function(c,p,m){this._hash.update(c),m()},s.prototype.update=function(c,p){return typeof c=="string"&&(c=f.from(c,p)),this._hash.update(c),this},s.prototype.verify=function(c,p,m){typeof p=="string"&&(p=f.from(p,m)),this.end();var S=this._hash.digest();return n(p,S,c,this._signType,this._tag)},b.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("create-hmac"),a=t("browserify-rsa"),r=t("elliptic").ec,e=t("bn.js"),n=t("parse-asn1"),l=t("./curves.json");function i(c,p,m,S){if((c=f.from(c.toArray())).length<p.byteLength()){var C=f.alloc(p.byteLength()-c.length);c=f.concat([C,c])}var M=m.length,P=function(B,D){B=(B=s(B,D)).mod(D);var U=f.from(B.toArray());if(U.length<D.byteLength()){var z=f.alloc(D.byteLength()-U.length);U=f.concat([z,U])}return U}(m,p),$=f.alloc(M);$.fill(1);var N=f.alloc(M);return N=o(S,N).update($).update(f.from([0])).update(c).update(P).digest(),$=o(S,N).update($).digest(),{k:N=o(S,N).update($).update(f.from([1])).update(c).update(P).digest(),v:$=o(S,N).update($).digest()}}function s(c,p){var m=new e(c),S=(c.length<<3)-p.bitLength();return S>0&&m.ishrn(S),m}function h(c,p,m){var S,C;do{for(S=f.alloc(0);8*S.length<c.bitLength();)p.v=o(m,p.k).update(p.v).digest(),S=f.concat([S,p.v]);C=s(S,c),p.k=o(m,p.k).update(p.v).update(f.from([0])).digest(),p.v=o(m,p.k).update(p.v).digest()}while(C.cmp(c)!==-1);return C}function d(c,p,m,S){return c.toRed(e.mont(m)).redPow(p).fromRed().mod(S)}b.exports=function(c,p,m,S,C){var M=n(p);if(M.curve){if(S!=="ecdsa"&&S!=="ecdsa/rsa")throw new Error("wrong private key type");return function(B,D){var U=l[D.curve.join(".")];if(!U)throw new Error("unknown curve "+D.curve.join("."));var z=new r(U).keyFromPrivate(D.privateKey).sign(B);return f.from(z.toDER())}(c,M)}if(M.type==="dsa"){if(S!=="dsa")throw new Error("wrong private key type");return function(B,D,U){for(var z,E=D.params.priv_key,O=D.params.p,x=D.params.q,y=D.params.g,v=new e(0),w=s(B,x).mod(x),_=!1,A=i(E,x,B,U);_===!1;)z=h(x,A,U),v=d(y,z,O,x),(_=z.invm(x).imul(w.add(E.mul(v))).mod(x)).cmpn(0)===0&&(_=!1,v=new e(0));return function(j,L){j=j.toArray(),L=L.toArray(),128&j[0]&&(j=[0].concat(j)),128&L[0]&&(L=[0].concat(L));var H=[48,j.length+L.length+4,2,j.length];return H=H.concat(j,[2,L.length],L),f.from(H)}(v,_)}(c,M,m)}if(S!=="rsa"&&S!=="ecdsa/rsa")throw new Error("wrong private key type");c=f.concat([C,c]);for(var P=M.modulus.byteLength(),$=[0,1];c.length+$.length+1<P;)$.push(255);$.push(0);for(var N=-1;++N<c.length;)$.push(c[N]);return a($,M)},b.exports.getKey=i,b.exports.makeKey=h},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("bn.js"),a=t("elliptic").ec,r=t("parse-asn1"),e=t("./curves.json");function n(l,i){if(l.cmpn(0)<=0)throw new Error("invalid sig");if(l.cmp(i)>=i)throw new Error("invalid sig")}b.exports=function(l,i,s,h,d){var c=r(s);if(c.type==="ec"){if(h!=="ecdsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");return function($,N,B){var D=e[B.data.algorithm.curve.join(".")];if(!D)throw new Error("unknown curve "+B.data.algorithm.curve.join("."));var U=new a(D),z=B.data.subjectPrivateKey.data;return U.verify(N,$,z)}(l,i,c)}if(c.type==="dsa"){if(h!=="dsa")throw new Error("wrong public key type");return function($,N,B){var D=B.data.p,U=B.data.q,z=B.data.g,E=B.data.pub_key,O=r.signature.decode($,"der"),x=O.s,y=O.r;n(x,U),n(y,U);var v=o.mont(D),w=x.invm(U);return z.toRed(v).redPow(new o(N).mul(w).mod(U)).fromRed().mul(E.toRed(v).redPow(y.mul(w).mod(U)).fromRed()).mod(D).mod(U).cmp(y)===0}(l,i,c)}if(h!=="rsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");i=f.concat([d,i]);for(var p=c.modulus.byteLength(),m=[1],S=0;i.length+m.length+2<p;)m.push(255),S++;m.push(0);for(var C=-1;++C<i.length;)m.push(i[C]);m=f.from(m);var M=o.mont(c.modulus);l=(l=new o(l).toRed(M)).redPow(new o(c.publicExponent)),l=f.from(l.fromRed().toArray());var P=S<8?1:0;for(p=Math.min(l.length,m.length),l.length!==m.length&&(P=1),C=-1;++C<p;)P|=l[C]^m[C];return P===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(t,b,g){},{}],217:[function(t,b,g){var f=t("buffer"),o=f.Buffer;function a(e,n){for(var l in e)n[l]=e[l]}function r(e,n,l){return o(e,n,l)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?b.exports=f:(a(f,g),g.Buffer=r),a(o,r),r.from=function(e,n,l){if(typeof e=="number")throw new TypeError("Argument must not be a number");return o(e,n,l)},r.alloc=function(e,n,l){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=o(e);return n!==void 0?typeof l=="string"?i.fill(n,l):i.fill(n):i.fill(0),i},r.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o(e)},r.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return f.SlowBuffer(e)}},{buffer:220}],218:[function(t,b,g){var f=t("safe-buffer").Buffer,o=f.isEncoding||function(c){switch((c=""+c)&&c.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(c){var p;switch(this.encoding=function(m){var S=function(C){if(!C)return"utf8";for(var M;;)switch(C){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return C;default:if(M)return;C=(""+C).toLowerCase(),M=!0}}(m);if(typeof S!="string"&&(f.isEncoding===o||!o(m)))throw new Error("Unknown encoding: "+m);return S||m}(c),this.encoding){case"utf16le":this.text=n,this.end=l,p=4;break;case"utf8":this.fillLast=e,p=4;break;case"base64":this.text=i,this.end=s,p=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=f.allocUnsafe(p)}function r(c){return c<=127?0:c>>5==6?2:c>>4==14?3:c>>3==30?4:c>>6==2?-1:-2}function e(c){var p=this.lastTotal-this.lastNeed,m=function(S,C,M){if((192&C[0])!=128)return S.lastNeed=0,"�";if(S.lastNeed>1&&C.length>1){if((192&C[1])!=128)return S.lastNeed=1,"�";if(S.lastNeed>2&&C.length>2&&(192&C[2])!=128)return S.lastNeed=2,"�"}}(this,c);return m!==void 0?m:this.lastNeed<=c.length?(c.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(c.copy(this.lastChar,p,0,c.length),void(this.lastNeed-=c.length))}function n(c,p){if((c.length-p)%2==0){var m=c.toString("utf16le",p);if(m){var S=m.charCodeAt(m.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=c[c.length-1],c.toString("utf16le",p,c.length-1)}function l(c){var p=c&&c.length?this.write(c):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return p+this.lastChar.toString("utf16le",0,m)}return p}function i(c,p){var m=(c.length-p)%3;return m===0?c.toString("base64",p):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=c[c.length-1]:(this.lastChar[0]=c[c.length-2],this.lastChar[1]=c[c.length-1]),c.toString("base64",p,c.length-m))}function s(c){var p=c&&c.length?this.write(c):"";return this.lastNeed?p+this.lastChar.toString("base64",0,3-this.lastNeed):p}function h(c){return c.toString(this.encoding)}function d(c){return c&&c.length?this.write(c):""}g.StringDecoder=a,a.prototype.write=function(c){if(c.length===0)return"";var p,m;if(this.lastNeed){if((p=this.fillLast(c))===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<c.length?p?p+this.text(c,m):this.text(c,m):p||""},a.prototype.end=function(c){var p=c&&c.length?this.write(c):"";return this.lastNeed?p+"�":p},a.prototype.text=function(c,p){var m=function(C,M,P){var $=M.length-1;if($<P)return 0;var N=r(M[$]);return N>=0?(N>0&&(C.lastNeed=N-1),N):--$<P||N===-2?0:(N=r(M[$]))>=0?(N>0&&(C.lastNeed=N-2),N):--$<P||N===-2?0:(N=r(M[$]))>=0?(N>0&&(N===2?N=0:C.lastNeed=N-3),N):0}(this,c,p);if(!this.lastNeed)return c.toString("utf8",p);this.lastTotal=m;var S=c.length-(m-this.lastNeed);return c.copy(this.lastChar,0,S),c.toString("utf8",p,S)},a.prototype.fillLast=function(c){if(this.lastNeed<=c.length)return c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);c.copy(this.lastChar,this.lastTotal-this.lastNeed,0,c.length),this.lastNeed-=c.length}},{"safe-buffer":217}],219:[function(t,b,g){(function(f){(function(){b.exports=function(o,a){for(var r=Math.min(o.length,a.length),e=new f(r),n=0;n<r;++n)e[n]=o[n]^a[n];return e}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:220}],220:[function(t,b,g){(function(f){(function(){var o=t("base64-js"),a=t("ieee754");g.Buffer=e,g.SlowBuffer=function(I){return+I!=I&&(I=0),e.alloc(+I)},g.INSPECT_MAX_BYTES=50;function r(I){if(I>2147483647)throw new RangeError('The value "'+I+'" is invalid for option "size"');var R=new Uint8Array(I);return R.__proto__=e.prototype,R}function e(I,R,V){if(typeof I=="number"){if(typeof R=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(I)}return n(I,R,V)}function n(I,R,V){if(typeof I=="string")return function(Y,J){if(typeof J=="string"&&J!==""||(J="utf8"),!e.isEncoding(J))throw new TypeError("Unknown encoding: "+J);var nt=0|d(Y,J),it=r(nt),G=it.write(Y,J);return G!==nt&&(it=it.slice(0,G)),it}(I,R);if(ArrayBuffer.isView(I))return s(I);if(I==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(F(I,ArrayBuffer)||I&&F(I.buffer,ArrayBuffer))return function(Y,J,nt){if(J<0||Y.byteLength<J)throw new RangeError('"offset" is outside of buffer bounds');if(Y.byteLength<J+(nt||0))throw new RangeError('"length" is outside of buffer bounds');var it;return it=J===void 0&&nt===void 0?new Uint8Array(Y):nt===void 0?new Uint8Array(Y,J):new Uint8Array(Y,J,nt),it.__proto__=e.prototype,it}(I,R,V);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var K=I.valueOf&&I.valueOf();if(K!=null&&K!==I)return e.from(K,R,V);var Z=function(Y){if(e.isBuffer(Y)){var J=0|h(Y.length),nt=r(J);return nt.length===0||Y.copy(nt,0,0,J),nt}if(Y.length!==void 0)return typeof Y.length!="number"||W(Y.length)?r(0):s(Y);if(Y.type==="Buffer"&&Array.isArray(Y.data))return s(Y.data)}(I);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return e.from(I[Symbol.toPrimitive]("string"),R,V);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}function l(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function i(I){return l(I),r(I<0?0:0|h(I))}function s(I){for(var R=I.length<0?0:0|h(I.length),V=r(R),K=0;K<R;K+=1)V[K]=255&I[K];return V}function h(I){if(I>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|I}function d(I,R){if(e.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||F(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);var V=I.length,K=arguments.length>2&&arguments[2]===!0;if(!K&&V===0)return 0;for(var Z=!1;;)switch(R){case"ascii":case"latin1":case"binary":return V;case"utf8":case"utf-8":return H(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*V;case"hex":return V>>>1;case"base64":return q(I).length;default:if(Z)return K?-1:H(I).length;R=(""+R).toLowerCase(),Z=!0}}function c(I,R,V){var K=!1;if((R===void 0||R<0)&&(R=0),R>this.length||((V===void 0||V>this.length)&&(V=this.length),V<=0)||(V>>>=0)<=(R>>>=0))return"";for(I||(I="utf8");;)switch(I){case"hex":return O(this,R,V);case"utf8":case"utf-8":return U(this,R,V);case"ascii":return z(this,R,V);case"latin1":case"binary":return E(this,R,V);case"base64":return D(this,R,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,R,V);default:if(K)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),K=!0}}function p(I,R,V){var K=I[R];I[R]=I[V],I[V]=K}function m(I,R,V,K,Z){if(I.length===0)return-1;if(typeof V=="string"?(K=V,V=0):V>2147483647?V=2147483647:V<-2147483648&&(V=-2147483648),W(V=+V)&&(V=Z?0:I.length-1),V<0&&(V=I.length+V),V>=I.length){if(Z)return-1;V=I.length-1}else if(V<0){if(!Z)return-1;V=0}if(typeof R=="string"&&(R=e.from(R,K)),e.isBuffer(R))return R.length===0?-1:S(I,R,V,K,Z);if(typeof R=="number")return R&=255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(I,R,V):Uint8Array.prototype.lastIndexOf.call(I,R,V):S(I,[R],V,K,Z);throw new TypeError("val must be string, number or Buffer")}function S(I,R,V,K,Z){var Y,J=1,nt=I.length,it=R.length;if(K!==void 0&&((K=String(K).toLowerCase())==="ucs2"||K==="ucs-2"||K==="utf16le"||K==="utf-16le")){if(I.length<2||R.length<2)return-1;J=2,nt/=2,it/=2,V/=2}function G(st,lt){return J===1?st[lt]:st.readUInt16BE(lt*J)}if(Z){var tt=-1;for(Y=V;Y<nt;Y++)if(G(I,Y)===G(R,tt===-1?0:Y-tt)){if(tt===-1&&(tt=Y),Y-tt+1===it)return tt*J}else tt!==-1&&(Y-=Y-tt),tt=-1}else for(V+it>nt&&(V=nt-it),Y=V;Y>=0;Y--){for(var et=!0,ot=0;ot<it;ot++)if(G(I,Y+ot)!==G(R,ot)){et=!1;break}if(et)return Y}return-1}function C(I,R,V,K){V=Number(V)||0;var Z=I.length-V;K?(K=Number(K))>Z&&(K=Z):K=Z;var Y=R.length;K>Y/2&&(K=Y/2);for(var J=0;J<K;++J){var nt=parseInt(R.substr(2*J,2),16);if(W(nt))return J;I[V+J]=nt}return J}function M(I,R,V,K){return X(H(R,I.length-V),I,V,K)}function P(I,R,V,K){return X(function(Z){for(var Y=[],J=0;J<Z.length;++J)Y.push(255&Z.charCodeAt(J));return Y}(R),I,V,K)}function $(I,R,V,K){return P(I,R,V,K)}function N(I,R,V,K){return X(q(R),I,V,K)}function B(I,R,V,K){return X(function(Z,Y){for(var J,nt,it,G=[],tt=0;tt<Z.length&&!((Y-=2)<0);++tt)J=Z.charCodeAt(tt),nt=J>>8,it=J%256,G.push(it),G.push(nt);return G}(R,I.length-V),I,V,K)}function D(I,R,V){return R===0&&V===I.length?o.fromByteArray(I):o.fromByteArray(I.slice(R,V))}function U(I,R,V){V=Math.min(I.length,V);for(var K=[],Z=R;Z<V;){var Y,J,nt,it,G=I[Z],tt=null,et=G>239?4:G>223?3:G>191?2:1;if(Z+et<=V)switch(et){case 1:G<128&&(tt=G);break;case 2:(192&(Y=I[Z+1]))==128&&(it=(31&G)<<6|63&Y)>127&&(tt=it);break;case 3:Y=I[Z+1],J=I[Z+2],(192&Y)==128&&(192&J)==128&&(it=(15&G)<<12|(63&Y)<<6|63&J)>2047&&(it<55296||it>57343)&&(tt=it);break;case 4:Y=I[Z+1],J=I[Z+2],nt=I[Z+3],(192&Y)==128&&(192&J)==128&&(192&nt)==128&&(it=(15&G)<<18|(63&Y)<<12|(63&J)<<6|63&nt)>65535&&it<1114112&&(tt=it)}tt===null?(tt=65533,et=1):tt>65535&&(tt-=65536,K.push(tt>>>10&1023|55296),tt=56320|1023&tt),K.push(tt),Z+=et}return function(ot){var st=ot.length;if(st<=4096)return String.fromCharCode.apply(String,ot);for(var lt="",ft=0;ft<st;)lt+=String.fromCharCode.apply(String,ot.slice(ft,ft+=4096));return lt}(K)}g.kMaxLength=2147483647,e.TYPED_ARRAY_SUPPORT=function(){try{var I=new Uint8Array(1);return I.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},I.foo()===42}catch{return!1}}(),e.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(I,R,V){return n(I,R,V)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(I,R,V){return function(K,Z,Y){return l(K),K<=0?r(K):Z!==void 0?typeof Y=="string"?r(K).fill(Z,Y):r(K).fill(Z):r(K)}(I,R,V)},e.allocUnsafe=function(I){return i(I)},e.allocUnsafeSlow=function(I){return i(I)},e.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==e.prototype},e.compare=function(I,R){if(F(I,Uint8Array)&&(I=e.from(I,I.offset,I.byteLength)),F(R,Uint8Array)&&(R=e.from(R,R.offset,R.byteLength)),!e.isBuffer(I)||!e.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===R)return 0;for(var V=I.length,K=R.length,Z=0,Y=Math.min(V,K);Z<Y;++Z)if(I[Z]!==R[Z]){V=I[Z],K=R[Z];break}return V<K?-1:K<V?1:0},e.isEncoding=function(I){switch(String(I).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(I,R){if(!Array.isArray(I))throw new TypeError('"list" argument must be an Array of Buffers');if(I.length===0)return e.alloc(0);var V;if(R===void 0)for(R=0,V=0;V<I.length;++V)R+=I[V].length;var K=e.allocUnsafe(R),Z=0;for(V=0;V<I.length;++V){var Y=I[V];if(F(Y,Uint8Array)&&(Y=e.from(Y)),!e.isBuffer(Y))throw new TypeError('"list" argument must be an Array of Buffers');Y.copy(K,Z),Z+=Y.length}return K},e.byteLength=d,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var I=this.length;if(I%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var R=0;R<I;R+=2)p(this,R,R+1);return this},e.prototype.swap32=function(){var I=this.length;if(I%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var R=0;R<I;R+=4)p(this,R,R+3),p(this,R+1,R+2);return this},e.prototype.swap64=function(){var I=this.length;if(I%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var R=0;R<I;R+=8)p(this,R,R+7),p(this,R+1,R+6),p(this,R+2,R+5),p(this,R+3,R+4);return this},e.prototype.toString=function(){var I=this.length;return I===0?"":arguments.length===0?U(this,0,I):c.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(I){if(!e.isBuffer(I))throw new TypeError("Argument must be a Buffer");return this===I||e.compare(this,I)===0},e.prototype.inspect=function(){var I="",R=g.INSPECT_MAX_BYTES;return I=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(I+=" ... "),"<Buffer "+I+">"},e.prototype.compare=function(I,R,V,K,Z){if(F(I,Uint8Array)&&(I=e.from(I,I.offset,I.byteLength)),!e.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof I);if(R===void 0&&(R=0),V===void 0&&(V=I?I.length:0),K===void 0&&(K=0),Z===void 0&&(Z=this.length),R<0||V>I.length||K<0||Z>this.length)throw new RangeError("out of range index");if(K>=Z&&R>=V)return 0;if(K>=Z)return-1;if(R>=V)return 1;if(this===I)return 0;for(var Y=(Z>>>=0)-(K>>>=0),J=(V>>>=0)-(R>>>=0),nt=Math.min(Y,J),it=this.slice(K,Z),G=I.slice(R,V),tt=0;tt<nt;++tt)if(it[tt]!==G[tt]){Y=it[tt],J=G[tt];break}return Y<J?-1:J<Y?1:0},e.prototype.includes=function(I,R,V){return this.indexOf(I,R,V)!==-1},e.prototype.indexOf=function(I,R,V){return m(this,I,R,V,!0)},e.prototype.lastIndexOf=function(I,R,V){return m(this,I,R,V,!1)},e.prototype.write=function(I,R,V,K){if(R===void 0)K="utf8",V=this.length,R=0;else if(V===void 0&&typeof R=="string")K=R,V=this.length,R=0;else{if(!isFinite(R))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");R>>>=0,isFinite(V)?(V>>>=0,K===void 0&&(K="utf8")):(K=V,V=void 0)}var Z=this.length-R;if((V===void 0||V>Z)&&(V=Z),I.length>0&&(V<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");K||(K="utf8");for(var Y=!1;;)switch(K){case"hex":return C(this,I,R,V);case"utf8":case"utf-8":return M(this,I,R,V);case"ascii":return P(this,I,R,V);case"latin1":case"binary":return $(this,I,R,V);case"base64":return N(this,I,R,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,I,R,V);default:if(Y)throw new TypeError("Unknown encoding: "+K);K=(""+K).toLowerCase(),Y=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function z(I,R,V){var K="";V=Math.min(I.length,V);for(var Z=R;Z<V;++Z)K+=String.fromCharCode(127&I[Z]);return K}function E(I,R,V){var K="";V=Math.min(I.length,V);for(var Z=R;Z<V;++Z)K+=String.fromCharCode(I[Z]);return K}function O(I,R,V){var K=I.length;(!R||R<0)&&(R=0),(!V||V<0||V>K)&&(V=K);for(var Z="",Y=R;Y<V;++Y)Z+=L(I[Y]);return Z}function x(I,R,V){for(var K=I.slice(R,V),Z="",Y=0;Y<K.length;Y+=2)Z+=String.fromCharCode(K[Y]+256*K[Y+1]);return Z}function y(I,R,V){if(I%1!=0||I<0)throw new RangeError("offset is not uint");if(I+R>V)throw new RangeError("Trying to access beyond buffer length")}function v(I,R,V,K,Z,Y){if(!e.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(R>Z||R<Y)throw new RangeError('"value" argument is out of bounds');if(V+K>I.length)throw new RangeError("Index out of range")}function w(I,R,V,K,Z,Y){if(V+K>I.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("Index out of range")}function _(I,R,V,K,Z){return R=+R,V>>>=0,Z||w(I,0,V,4),a.write(I,R,V,K,23,4),V+4}function A(I,R,V,K,Z){return R=+R,V>>>=0,Z||w(I,0,V,8),a.write(I,R,V,K,52,8),V+8}e.prototype.slice=function(I,R){var V=this.length;(I=~~I)<0?(I+=V)<0&&(I=0):I>V&&(I=V),(R=R===void 0?V:~~R)<0?(R+=V)<0&&(R=0):R>V&&(R=V),R<I&&(R=I);var K=this.subarray(I,R);return K.__proto__=e.prototype,K},e.prototype.readUIntLE=function(I,R,V){I>>>=0,R>>>=0,V||y(I,R,this.length);for(var K=this[I],Z=1,Y=0;++Y<R&&(Z*=256);)K+=this[I+Y]*Z;return K},e.prototype.readUIntBE=function(I,R,V){I>>>=0,R>>>=0,V||y(I,R,this.length);for(var K=this[I+--R],Z=1;R>0&&(Z*=256);)K+=this[I+--R]*Z;return K},e.prototype.readUInt8=function(I,R){return I>>>=0,R||y(I,1,this.length),this[I]},e.prototype.readUInt16LE=function(I,R){return I>>>=0,R||y(I,2,this.length),this[I]|this[I+1]<<8},e.prototype.readUInt16BE=function(I,R){return I>>>=0,R||y(I,2,this.length),this[I]<<8|this[I+1]},e.prototype.readUInt32LE=function(I,R){return I>>>=0,R||y(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+16777216*this[I+3]},e.prototype.readUInt32BE=function(I,R){return I>>>=0,R||y(I,4,this.length),16777216*this[I]+(this[I+1]<<16|this[I+2]<<8|this[I+3])},e.prototype.readIntLE=function(I,R,V){I>>>=0,R>>>=0,V||y(I,R,this.length);for(var K=this[I],Z=1,Y=0;++Y<R&&(Z*=256);)K+=this[I+Y]*Z;return K>=(Z*=128)&&(K-=Math.pow(2,8*R)),K},e.prototype.readIntBE=function(I,R,V){I>>>=0,R>>>=0,V||y(I,R,this.length);for(var K=R,Z=1,Y=this[I+--K];K>0&&(Z*=256);)Y+=this[I+--K]*Z;return Y>=(Z*=128)&&(Y-=Math.pow(2,8*R)),Y},e.prototype.readInt8=function(I,R){return I>>>=0,R||y(I,1,this.length),128&this[I]?-1*(255-this[I]+1):this[I]},e.prototype.readInt16LE=function(I,R){I>>>=0,R||y(I,2,this.length);var V=this[I]|this[I+1]<<8;return 32768&V?4294901760|V:V},e.prototype.readInt16BE=function(I,R){I>>>=0,R||y(I,2,this.length);var V=this[I+1]|this[I]<<8;return 32768&V?4294901760|V:V},e.prototype.readInt32LE=function(I,R){return I>>>=0,R||y(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},e.prototype.readInt32BE=function(I,R){return I>>>=0,R||y(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},e.prototype.readFloatLE=function(I,R){return I>>>=0,R||y(I,4,this.length),a.read(this,I,!0,23,4)},e.prototype.readFloatBE=function(I,R){return I>>>=0,R||y(I,4,this.length),a.read(this,I,!1,23,4)},e.prototype.readDoubleLE=function(I,R){return I>>>=0,R||y(I,8,this.length),a.read(this,I,!0,52,8)},e.prototype.readDoubleBE=function(I,R){return I>>>=0,R||y(I,8,this.length),a.read(this,I,!1,52,8)},e.prototype.writeUIntLE=function(I,R,V,K){I=+I,R>>>=0,V>>>=0,K||v(this,I,R,V,Math.pow(2,8*V)-1,0);var Z=1,Y=0;for(this[R]=255&I;++Y<V&&(Z*=256);)this[R+Y]=I/Z&255;return R+V},e.prototype.writeUIntBE=function(I,R,V,K){I=+I,R>>>=0,V>>>=0,K||v(this,I,R,V,Math.pow(2,8*V)-1,0);var Z=V-1,Y=1;for(this[R+Z]=255&I;--Z>=0&&(Y*=256);)this[R+Z]=I/Y&255;return R+V},e.prototype.writeUInt8=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,1,255,0),this[R]=255&I,R+1},e.prototype.writeUInt16LE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,2,65535,0),this[R]=255&I,this[R+1]=I>>>8,R+2},e.prototype.writeUInt16BE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,2,65535,0),this[R]=I>>>8,this[R+1]=255&I,R+2},e.prototype.writeUInt32LE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,4,4294967295,0),this[R+3]=I>>>24,this[R+2]=I>>>16,this[R+1]=I>>>8,this[R]=255&I,R+4},e.prototype.writeUInt32BE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,4,4294967295,0),this[R]=I>>>24,this[R+1]=I>>>16,this[R+2]=I>>>8,this[R+3]=255&I,R+4},e.prototype.writeIntLE=function(I,R,V,K){if(I=+I,R>>>=0,!K){var Z=Math.pow(2,8*V-1);v(this,I,R,V,Z-1,-Z)}var Y=0,J=1,nt=0;for(this[R]=255&I;++Y<V&&(J*=256);)I<0&&nt===0&&this[R+Y-1]!==0&&(nt=1),this[R+Y]=(I/J>>0)-nt&255;return R+V},e.prototype.writeIntBE=function(I,R,V,K){if(I=+I,R>>>=0,!K){var Z=Math.pow(2,8*V-1);v(this,I,R,V,Z-1,-Z)}var Y=V-1,J=1,nt=0;for(this[R+Y]=255&I;--Y>=0&&(J*=256);)I<0&&nt===0&&this[R+Y+1]!==0&&(nt=1),this[R+Y]=(I/J>>0)-nt&255;return R+V},e.prototype.writeInt8=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,1,127,-128),I<0&&(I=255+I+1),this[R]=255&I,R+1},e.prototype.writeInt16LE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,2,32767,-32768),this[R]=255&I,this[R+1]=I>>>8,R+2},e.prototype.writeInt16BE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,2,32767,-32768),this[R]=I>>>8,this[R+1]=255&I,R+2},e.prototype.writeInt32LE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,4,2147483647,-2147483648),this[R]=255&I,this[R+1]=I>>>8,this[R+2]=I>>>16,this[R+3]=I>>>24,R+4},e.prototype.writeInt32BE=function(I,R,V){return I=+I,R>>>=0,V||v(this,I,R,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[R]=I>>>24,this[R+1]=I>>>16,this[R+2]=I>>>8,this[R+3]=255&I,R+4},e.prototype.writeFloatLE=function(I,R,V){return _(this,I,R,!0,V)},e.prototype.writeFloatBE=function(I,R,V){return _(this,I,R,!1,V)},e.prototype.writeDoubleLE=function(I,R,V){return A(this,I,R,!0,V)},e.prototype.writeDoubleBE=function(I,R,V){return A(this,I,R,!1,V)},e.prototype.copy=function(I,R,V,K){if(!e.isBuffer(I))throw new TypeError("argument should be a Buffer");if(V||(V=0),K||K===0||(K=this.length),R>=I.length&&(R=I.length),R||(R=0),K>0&&K<V&&(K=V),K===V||I.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(V<0||V>=this.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("sourceEnd out of bounds");K>this.length&&(K=this.length),I.length-R<K-V&&(K=I.length-R+V);var Z=K-V;if(this===I&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(R,V,K);else if(this===I&&V<R&&R<K)for(var Y=Z-1;Y>=0;--Y)I[Y+R]=this[Y+V];else Uint8Array.prototype.set.call(I,this.subarray(V,K),R);return Z},e.prototype.fill=function(I,R,V,K){if(typeof I=="string"){if(typeof R=="string"?(K=R,R=0,V=this.length):typeof V=="string"&&(K=V,V=this.length),K!==void 0&&typeof K!="string")throw new TypeError("encoding must be a string");if(typeof K=="string"&&!e.isEncoding(K))throw new TypeError("Unknown encoding: "+K);if(I.length===1){var Z=I.charCodeAt(0);(K==="utf8"&&Z<128||K==="latin1")&&(I=Z)}}else typeof I=="number"&&(I&=255);if(R<0||this.length<R||this.length<V)throw new RangeError("Out of range index");if(V<=R)return this;var Y;if(R>>>=0,V=V===void 0?this.length:V>>>0,I||(I=0),typeof I=="number")for(Y=R;Y<V;++Y)this[Y]=I;else{var J=e.isBuffer(I)?I:e.from(I,K),nt=J.length;if(nt===0)throw new TypeError('The value "'+I+'" is invalid for argument "value"');for(Y=0;Y<V-R;++Y)this[Y+R]=J[Y%nt]}return this};var j=/[^+/0-9A-Za-z-_]/g;function L(I){return I<16?"0"+I.toString(16):I.toString(16)}function H(I,R){var V;R=R||1/0;for(var K=I.length,Z=null,Y=[],J=0;J<K;++J){if((V=I.charCodeAt(J))>55295&&V<57344){if(!Z){if(V>56319){(R-=3)>-1&&Y.push(239,191,189);continue}if(J+1===K){(R-=3)>-1&&Y.push(239,191,189);continue}Z=V;continue}if(V<56320){(R-=3)>-1&&Y.push(239,191,189),Z=V;continue}V=65536+(Z-55296<<10|V-56320)}else Z&&(R-=3)>-1&&Y.push(239,191,189);if(Z=null,V<128){if((R-=1)<0)break;Y.push(V)}else if(V<2048){if((R-=2)<0)break;Y.push(V>>6|192,63&V|128)}else if(V<65536){if((R-=3)<0)break;Y.push(V>>12|224,V>>6&63|128,63&V|128)}else{if(!(V<1114112))throw new Error("Invalid code point");if((R-=4)<0)break;Y.push(V>>18|240,V>>12&63|128,V>>6&63|128,63&V|128)}}return Y}function q(I){return o.toByteArray(function(R){if((R=(R=R.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;R.length%4!=0;)R+="=";return R}(I))}function X(I,R,V,K){for(var Z=0;Z<K&&!(Z+V>=R.length||Z>=I.length);++Z)R[Z+V]=I[Z];return Z}function F(I,R){return I instanceof R||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===R.name}function W(I){return I!=I}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("stream").Transform,a=t("string_decoder").StringDecoder;function r(e){o.call(this),this.hashMode=typeof e=="string",this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t("inherits")(r,o),r.prototype.update=function(e,n,l){typeof e=="string"&&(e=f.from(e,n));var i=this._update(e);return this.hashMode?this:(l&&(i=this._toString(i,l)),i)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,n,l){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(s){i=s}finally{l(i)}},r.prototype._flush=function(e){var n;try{this.push(this.__final())}catch(l){n=l}e(n)},r.prototype._finalOrDigest=function(e){var n=this.__final()||f.alloc(0);return e&&(n=this._toString(n,e,!0)),n},r.prototype._toString=function(e,n,l){if(this._decoder||(this._decoder=new a(n),this._encoding=n),this._encoding!==n)throw new Error("can't switch encodings");var i=this._decoder.write(e);return l&&(i+=this._decoder.end()),i},b.exports=r},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(t,b,g){var f=t("../internals/is-callable"),o=t("../internals/try-to-string"),a=TypeError;b.exports=function(r){if(f(r))return r;throw new a(o(r)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(t,b,g){var f=t("../internals/is-constructor"),o=t("../internals/try-to-string"),a=TypeError;b.exports=function(r){if(f(r))return r;throw new a(o(r)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(t,b,g){var f=t("../internals/is-callable"),o=String,a=TypeError;b.exports=function(r){if(typeof r=="object"||f(r))return r;throw new a("Can't set "+o(r)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(t,b,g){var f=t("../internals/well-known-symbol"),o=t("../internals/object-create"),a=t("../internals/object-define-property").f,r=f("unscopables"),e=Array.prototype;e[r]===void 0&&a(e,r,{configurable:!0,value:o(null)}),b.exports=function(n){e[r][n]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(t,b,g){var f=t("../internals/object-is-prototype-of"),o=TypeError;b.exports=function(a,r){if(f(r,a))return a;throw new o("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(t,b,g){var f=t("../internals/is-object"),o=String,a=TypeError;b.exports=function(r){if(f(r))return r;throw new a(o(r)+" is not an object")}},{"../internals/is-object":289}],228:[function(t,b,g){var f=t("../internals/to-indexed-object"),o=t("../internals/to-absolute-index"),a=t("../internals/length-of-array-like"),r=function(e){return function(n,l,i){var s,h=f(n),d=a(h),c=o(i,d);if(e&&l!=l){for(;d>c;)if((s=h[c++])!=s)return!0}else for(;d>c;c++)if((e||c in h)&&h[c]===l)return e||c||0;return!e&&-1}};b.exports={includes:r(!0),indexOf:r(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(t,b,g){var f=t("../internals/function-bind-context"),o=t("../internals/function-uncurry-this"),a=t("../internals/indexed-object"),r=t("../internals/to-object"),e=t("../internals/length-of-array-like"),n=t("../internals/array-species-create"),l=o([].push),i=function(s){var h=s===1,d=s===2,c=s===3,p=s===4,m=s===6,S=s===7,C=s===5||m;return function(M,P,$,N){for(var B,D,U=r(M),z=a(U),E=f(P,$),O=e(z),x=0,y=N||n,v=h?y(M,O):d||S?y(M,0):void 0;O>x;x++)if((C||x in z)&&(D=E(B=z[x],x,U),s))if(h)v[x]=D;else if(D)switch(s){case 3:return!0;case 5:return B;case 6:return x;case 2:l(v,B)}else switch(s){case 4:return!1;case 7:l(v,B)}return m?-1:c||p?p:v}};b.exports={forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findIndex:i(6),filterReject:i(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(t,b,g){var f=t("../internals/to-absolute-index"),o=t("../internals/length-of-array-like"),a=t("../internals/create-property"),r=Array,e=Math.max;b.exports=function(n,l,i){for(var s=o(n),h=f(l,s),d=f(i===void 0?s:i,s),c=r(e(d-h,0)),p=0;h<d;h++,p++)a(c,p,n[h]);return c.length=p,c}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(t,b,g){var f=t("../internals/function-uncurry-this");b.exports=f([].slice)},{"../internals/function-uncurry-this":268}],232:[function(t,b,g){var f=t("../internals/is-array"),o=t("../internals/is-constructor"),a=t("../internals/is-object"),r=t("../internals/well-known-symbol")("species"),e=Array;b.exports=function(n){var l;return f(n)&&(l=n.constructor,(o(l)&&(l===e||f(l.prototype))||a(l)&&(l=l[r])===null)&&(l=void 0)),l===void 0?e:l}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(t,b,g){var f=t("../internals/array-species-constructor");b.exports=function(o,a){return new(f(o))(a===0?0:a)}},{"../internals/array-species-constructor":232}],234:[function(t,b,g){var f=t("../internals/well-known-symbol")("iterator"),o=!1;try{var a=0,r={next:function(){return{done:!!a++}},return:function(){o=!0}};r[f]=function(){return this},Array.from(r,function(){throw 2})}catch{}b.exports=function(e,n){try{if(!n&&!o)return!1}catch{return!1}var l=!1;try{var i={};i[f]=function(){return{next:function(){return{done:l=!0}}}},e(i)}catch{}return l}},{"../internals/well-known-symbol":357}],235:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=f({}.toString),a=f("".slice);b.exports=function(r){return a(o(r),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(t,b,g){var f=t("../internals/to-string-tag-support"),o=t("../internals/is-callable"),a=t("../internals/classof-raw"),r=t("../internals/well-known-symbol")("toStringTag"),e=Object,n=a(function(){return arguments}())==="Arguments";b.exports=f?a:function(l){var i,s,h;return l===void 0?"Undefined":l===null?"Null":typeof(s=function(d,c){try{return d[c]}catch{}}(i=e(l),r))=="string"?s:n?a(i):(h=a(i))==="Object"&&o(i.callee)?"Arguments":h}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(t,b,g){var f=t("../internals/has-own-property"),o=t("../internals/own-keys"),a=t("../internals/object-get-own-property-descriptor"),r=t("../internals/object-define-property");b.exports=function(e,n,l){for(var i=o(n),s=r.f,h=a.f,d=0;d<i.length;d++){var c=i[d];f(e,c)||l&&f(l,c)||s(e,c,h(n,c))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(t,b,g){var f=t("../internals/well-known-symbol")("match");b.exports=function(o){var a=/./;try{"/./"[o](a)}catch{try{return a[f]=!1,"/./"[o](a)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(t,b,g){var f=t("../internals/fails");b.exports=!f(function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype})},{"../internals/fails":260}],240:[function(t,b,g){b.exports=function(f,o){return{value:f,done:o}}},{}],241:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/object-define-property"),a=t("../internals/create-property-descriptor");b.exports=f?function(r,e,n){return o.f(r,e,a(1,n))}:function(r,e,n){return r[e]=n,r}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(t,b,g){b.exports=function(f,o){return{enumerable:!(1&f),configurable:!(2&f),writable:!(4&f),value:o}}},{}],243:[function(t,b,g){var f=t("../internals/to-property-key"),o=t("../internals/object-define-property"),a=t("../internals/create-property-descriptor");b.exports=function(r,e,n){var l=f(e);l in r?o.f(r,l,a(0,n)):r[l]=n}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(t,b,g){var f=t("../internals/make-built-in"),o=t("../internals/object-define-property");b.exports=function(a,r,e){return e.get&&f(e.get,r,{getter:!0}),e.set&&f(e.set,r,{setter:!0}),o.f(a,r,e)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(t,b,g){var f=t("../internals/is-callable"),o=t("../internals/object-define-property"),a=t("../internals/make-built-in"),r=t("../internals/define-global-property");b.exports=function(e,n,l,i){i||(i={});var s=i.enumerable,h=i.name!==void 0?i.name:n;if(f(l)&&a(l,h,i),i.global)s?e[n]=l:r(n,l);else{try{i.unsafe?e[n]&&(s=!0):delete e[n]}catch{}s?e[n]=l:o.f(e,n,{value:l,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(t,b,g){var f=t("../internals/global"),o=Object.defineProperty;b.exports=function(a,r){try{o(f,a,{value:r,configurable:!0,writable:!0})}catch{f[a]=r}return r}},{"../internals/global":274}],247:[function(t,b,g){var f=t("../internals/fails");b.exports=!f(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},{"../internals/fails":260}],248:[function(t,b,g){var f=typeof document=="object"&&document.all,o=f===void 0&&f!==void 0;b.exports={all:f,IS_HTMLDDA:o}},{}],249:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/is-object"),a=f.document,r=o(a)&&o(a.createElement);b.exports=function(e){return r?a.createElement(e):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(t,b,g){var f=t("../internals/engine-is-deno"),o=t("../internals/engine-is-node");b.exports=!f&&!o&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(t,b,g){b.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(t,b,g){var f=t("../internals/engine-user-agent");b.exports=/ipad|iphone|ipod/i.test(f)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(t,b,g){var f=t("../internals/engine-user-agent");b.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(f)},{"../internals/engine-user-agent":256}],254:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/classof-raw");b.exports=o(f.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(t,b,g){var f=t("../internals/engine-user-agent");b.exports=/web0s(?!.*chrome)/i.test(f)},{"../internals/engine-user-agent":256}],256:[function(t,b,g){b.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(t,b,g){var f,o,a=t("../internals/global"),r=t("../internals/engine-user-agent"),e=a.process,n=a.Deno,l=e&&e.versions||n&&n.version,i=l&&l.v8;i&&(o=(f=i.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!o&&r&&(!(f=r.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=r.match(/Chrome\/(\d+)/))&&(o=+f[1]),b.exports=o},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(t,b,g){b.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/object-get-own-property-descriptor").f,a=t("../internals/create-non-enumerable-property"),r=t("../internals/define-built-in"),e=t("../internals/define-global-property"),n=t("../internals/copy-constructor-properties"),l=t("../internals/is-forced");b.exports=function(i,s){var h,d,c,p,m,S=i.target,C=i.global,M=i.stat;if(h=C?f:M?f[S]||e(S,{}):(f[S]||{}).prototype)for(d in s){if(p=s[d],c=i.dontCallGetSet?(m=o(h,d))&&m.value:h[d],!l(C?d:S+(M?".":"#")+d,i.forced)&&c!==void 0){if(typeof p==typeof c)continue;n(p,c)}(i.sham||c&&c.sham)&&a(p,"sham",!0),r(h,d,p,i)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(t,b,g){b.exports=function(f){try{return!!f()}catch{return!0}}},{}],261:[function(t,b,g){var f=t("../internals/function-bind-native"),o=Function.prototype,a=o.apply,r=o.call;b.exports=typeof Reflect=="object"&&Reflect.apply||(f?r.bind(a):function(){return r.apply(a,arguments)})},{"../internals/function-bind-native":263}],262:[function(t,b,g){var f=t("../internals/function-uncurry-this-clause"),o=t("../internals/a-callable"),a=t("../internals/function-bind-native"),r=f(f.bind);b.exports=function(e,n){return o(e),n===void 0?e:a?r(e,n):function(){return e.apply(n,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(t,b,g){var f=t("../internals/fails");b.exports=!f(function(){var o=(function(){}).bind();return typeof o!="function"||o.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(t,b,g){var f=t("../internals/function-bind-native"),o=Function.prototype.call;b.exports=f?o.bind(o):function(){return o.apply(o,arguments)}},{"../internals/function-bind-native":263}],265:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/has-own-property"),a=Function.prototype,r=f&&Object.getOwnPropertyDescriptor,e=o(a,"name"),n=e&&(function(){}).name==="something",l=e&&(!f||f&&r(a,"name").configurable);b.exports={EXISTS:e,PROPER:n,CONFIGURABLE:l}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/a-callable");b.exports=function(a,r,e){try{return f(o(Object.getOwnPropertyDescriptor(a,r)[e]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(t,b,g){var f=t("../internals/classof-raw"),o=t("../internals/function-uncurry-this");b.exports=function(a){if(f(a)==="Function")return o(a)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(t,b,g){var f=t("../internals/function-bind-native"),o=Function.prototype,a=o.call,r=f&&o.bind.bind(a,a);b.exports=f?r:function(e){return function(){return a.apply(e,arguments)}}},{"../internals/function-bind-native":263}],269:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/is-callable"),a=function(r){return o(r)?r:void 0};b.exports=function(r,e){return arguments.length<2?a(f[r]):f[r]&&f[r][e]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(t,b,g){var f=t("../internals/classof"),o=t("../internals/get-method"),a=t("../internals/is-null-or-undefined"),r=t("../internals/iterators"),e=t("../internals/well-known-symbol")("iterator");b.exports=function(n){if(!a(n))return o(n,e)||o(n,"@@iterator")||r[f(n)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(t,b,g){var f=t("../internals/function-call"),o=t("../internals/a-callable"),a=t("../internals/an-object"),r=t("../internals/try-to-string"),e=t("../internals/get-iterator-method"),n=TypeError;b.exports=function(l,i){var s=arguments.length<2?e(l):i;if(o(s))return a(f(s,l));throw new n(r(l)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/is-array"),a=t("../internals/is-callable"),r=t("../internals/classof-raw"),e=t("../internals/to-string"),n=f([].push);b.exports=function(l){if(a(l))return l;if(o(l)){for(var i=l.length,s=[],h=0;h<i;h++){var d=l[h];typeof d=="string"?n(s,d):typeof d!="number"&&r(d)!=="Number"&&r(d)!=="String"||n(s,e(d))}var c=s.length,p=!0;return function(m,S){if(p)return p=!1,S;if(o(this))return S;for(var C=0;C<c;C++)if(s[C]===m)return S}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(t,b,g){var f=t("../internals/a-callable"),o=t("../internals/is-null-or-undefined");b.exports=function(a,r){var e=a[r];return o(e)?void 0:f(e)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(t,b,g){(function(f){(function(){var o=function(a){return a&&a.Math===Math&&a};b.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof f=="object"&&f)||function(){return this}()||this||Function("return this")()}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/to-object"),a=f({}.hasOwnProperty);b.exports=Object.hasOwn||function(r,e){return a(o(r),e)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(t,b,g){b.exports={}},{}],277:[function(t,b,g){b.exports=function(f,o){try{arguments.length===1?console.error(f):console.error(f,o)}catch{}}},{}],278:[function(t,b,g){var f=t("../internals/get-built-in");b.exports=f("document","documentElement")},{"../internals/get-built-in":269}],279:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/fails"),a=t("../internals/document-create-element");b.exports=!f&&!o(function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!==7})},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/fails"),a=t("../internals/classof-raw"),r=Object,e=f("".split);b.exports=o(function(){return!r("z").propertyIsEnumerable(0)})?function(n){return a(n)==="String"?e(n,""):r(n)}:r},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/is-callable"),a=t("../internals/shared-store"),r=f(Function.toString);o(a.inspectSource)||(a.inspectSource=function(e){return r(e)}),b.exports=a.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(t,b,g){var f,o,a,r=t("../internals/weak-map-basic-detection"),e=t("../internals/global"),n=t("../internals/is-object"),l=t("../internals/create-non-enumerable-property"),i=t("../internals/has-own-property"),s=t("../internals/shared-store"),h=t("../internals/shared-key"),d=t("../internals/hidden-keys"),c=e.TypeError,p=e.WeakMap;if(r||s.state){var m=s.state||(s.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,f=function(C,M){if(m.has(C))throw new c("Object already initialized");return M.facade=C,m.set(C,M),M},o=function(C){return m.get(C)||{}},a=function(C){return m.has(C)}}else{var S=h("state");d[S]=!0,f=function(C,M){if(i(C,S))throw new c("Object already initialized");return M.facade=C,l(C,S,M),M},o=function(C){return i(C,S)?C[S]:{}},a=function(C){return i(C,S)}}b.exports={set:f,get:o,has:a,enforce:function(C){return a(C)?o(C):f(C,{})},getterFor:function(C){return function(M){var P;if(!n(M)||(P=o(M)).type!==C)throw new c("Incompatible receiver, "+C+" required");return P}}}},{"../internals/create-non-enumerable-property":241,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/is-object":289,"../internals/shared-key":332,"../internals/shared-store":333,"../internals/weak-map-basic-detection":354}],283:[function(t,b,g){var f=t("../internals/well-known-symbol"),o=t("../internals/iterators"),a=f("iterator"),r=Array.prototype;b.exports=function(e){return e!==void 0&&(o.Array===e||r[a]===e)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(t,b,g){var f=t("../internals/classof-raw");b.exports=Array.isArray||function(o){return f(o)==="Array"}},{"../internals/classof-raw":235}],285:[function(t,b,g){var f=t("../internals/document-all"),o=f.all;b.exports=f.IS_HTMLDDA?function(a){return typeof a=="function"||a===o}:function(a){return typeof a=="function"}},{"../internals/document-all":248}],286:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/fails"),a=t("../internals/is-callable"),r=t("../internals/classof"),e=t("../internals/get-built-in"),n=t("../internals/inspect-source"),l=function(){},i=[],s=e("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=f(h.exec),c=!h.test(l),p=function(S){if(!a(S))return!1;try{return s(l,i,S),!0}catch{return!1}},m=function(S){if(!a(S))return!1;switch(r(S)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!d(h,n(S))}catch{return!0}};m.sham=!0,b.exports=!s||o(function(){var S;return p(p.call)||!p(Object)||!p(function(){S=!0})||S})?m:p},{"../internals/classof":236,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/inspect-source":281,"../internals/is-callable":285}],287:[function(t,b,g){var f=t("../internals/fails"),o=t("../internals/is-callable"),a=/#|\.prototype\./,r=function(s,h){var d=n[e(s)];return d===i||d!==l&&(o(h)?f(h):!!h)},e=r.normalize=function(s){return String(s).replace(a,".").toLowerCase()},n=r.data={},l=r.NATIVE="N",i=r.POLYFILL="P";b.exports=r},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(t,b,g){b.exports=function(f){return f==null}},{}],289:[function(t,b,g){var f=t("../internals/is-callable"),o=t("../internals/document-all"),a=o.all;b.exports=o.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:f(r)||r===a}:function(r){return typeof r=="object"?r!==null:f(r)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(t,b,g){b.exports=!1},{}],291:[function(t,b,g){var f=t("../internals/is-object"),o=t("../internals/classof-raw"),a=t("../internals/well-known-symbol")("match");b.exports=function(r){var e;return f(r)&&((e=r[a])!==void 0?!!e:o(r)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(t,b,g){var f=t("../internals/get-built-in"),o=t("../internals/is-callable"),a=t("../internals/object-is-prototype-of"),r=t("../internals/use-symbol-as-uid"),e=Object;b.exports=r?function(n){return typeof n=="symbol"}:function(n){var l=f("Symbol");return o(l)&&a(l.prototype,e(n))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(t,b,g){var f=t("../internals/function-bind-context"),o=t("../internals/function-call"),a=t("../internals/an-object"),r=t("../internals/try-to-string"),e=t("../internals/is-array-iterator-method"),n=t("../internals/length-of-array-like"),l=t("../internals/object-is-prototype-of"),i=t("../internals/get-iterator"),s=t("../internals/get-iterator-method"),h=t("../internals/iterator-close"),d=TypeError,c=function(m,S){this.stopped=m,this.result=S},p=c.prototype;b.exports=function(m,S,C){var M,P,$,N,B,D,U,z=C&&C.that,E=!(!C||!C.AS_ENTRIES),O=!(!C||!C.IS_RECORD),x=!(!C||!C.IS_ITERATOR),y=!(!C||!C.INTERRUPTED),v=f(S,z),w=function(A){return M&&h(M,"normal",A),new c(!0,A)},_=function(A){return E?(a(A),y?v(A[0],A[1],w):v(A[0],A[1])):y?v(A,w):v(A)};if(O)M=m.iterator;else if(x)M=m;else{if(!(P=s(m)))throw new d(r(m)+" is not iterable");if(e(P)){for($=0,N=n(m);N>$;$++)if((B=_(m[$]))&&l(p,B))return B;return new c(!1)}M=i(m,P)}for(D=O?m.next:M.next;!(U=o(D,M)).done;){try{B=_(U.value)}catch(A){h(M,"throw",A)}if(typeof B=="object"&&B&&l(p,B))return B}return new c(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(t,b,g){var f=t("../internals/function-call"),o=t("../internals/an-object"),a=t("../internals/get-method");b.exports=function(r,e,n){var l,i;o(r);try{if(!(l=a(r,"return"))){if(e==="throw")throw n;return n}l=f(l,r)}catch(s){i=!0,l=s}if(e==="throw")throw n;if(i)throw l;return o(l),n}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(t,b,g){var f=t("../internals/iterators-core").IteratorPrototype,o=t("../internals/object-create"),a=t("../internals/create-property-descriptor"),r=t("../internals/set-to-string-tag"),e=t("../internals/iterators"),n=function(){return this};b.exports=function(l,i,s,h){var d=i+" Iterator";return l.prototype=o(f,{next:a(+!h,s)}),r(l,d,!1,!0),e[d]=n,l}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-call"),a=t("../internals/is-pure"),r=t("../internals/function-name"),e=t("../internals/is-callable"),n=t("../internals/iterator-create-constructor"),l=t("../internals/object-get-prototype-of"),i=t("../internals/object-set-prototype-of"),s=t("../internals/set-to-string-tag"),h=t("../internals/create-non-enumerable-property"),d=t("../internals/define-built-in"),c=t("../internals/well-known-symbol"),p=t("../internals/iterators"),m=t("../internals/iterators-core"),S=r.PROPER,C=r.CONFIGURABLE,M=m.IteratorPrototype,P=m.BUGGY_SAFARI_ITERATORS,$=c("iterator"),N=function(){return this};b.exports=function(B,D,U,z,E,O,x){n(U,D,z);var y,v,w,_=function(F){if(F===E&&q)return q;if(!P&&F&&F in L)return L[F];switch(F){case"keys":case"values":case"entries":return function(){return new U(this,F)}}return function(){return new U(this)}},A=D+" Iterator",j=!1,L=B.prototype,H=L[$]||L["@@iterator"]||E&&L[E],q=!P&&H||_(E),X=D==="Array"&&L.entries||H;if(X&&(y=l(X.call(new B)))!==Object.prototype&&y.next&&(a||l(y)===M||(i?i(y,M):e(y[$])||d(y,$,N)),s(y,A,!0,!0),a&&(p[A]=N)),S&&E==="values"&&H&&H.name!=="values"&&(!a&&C?h(L,"name","values"):(j=!0,q=function(){return o(H,this)})),E)if(v={values:_("values"),keys:O?q:_("keys"),entries:_("entries")},x)for(w in v)(P||j||!(w in L))&&d(L,w,v[w]);else f({target:D,proto:!0,forced:P||j},v);return a&&!x||L[$]===q||d(L,$,q,{name:E}),p[D]=q,v}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(t,b,g){var f,o,a,r=t("../internals/fails"),e=t("../internals/is-callable"),n=t("../internals/is-object"),l=t("../internals/object-create"),i=t("../internals/object-get-prototype-of"),s=t("../internals/define-built-in"),h=t("../internals/well-known-symbol"),d=t("../internals/is-pure"),c=h("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(o=i(i(a)))!==Object.prototype&&(f=o):p=!0),!n(f)||r(function(){var m={};return f[c].call(m)!==m})?f={}:d&&(f=l(f)),e(f[c])||s(f,c,function(){return this}),b.exports={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:p}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(t,b,g){arguments[4][276][0].apply(g,arguments)},{dup:276}],299:[function(t,b,g){var f=t("../internals/to-length");b.exports=function(o){return f(o.length)}},{"../internals/to-length":343}],300:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/fails"),a=t("../internals/is-callable"),r=t("../internals/has-own-property"),e=t("../internals/descriptors"),n=t("../internals/function-name").CONFIGURABLE,l=t("../internals/inspect-source"),i=t("../internals/internal-state"),s=i.enforce,h=i.get,d=String,c=Object.defineProperty,p=f("".slice),m=f("".replace),S=f([].join),C=e&&!o(function(){return c(function(){},"length",{value:8}).length!==8}),M=String(String).split("String"),P=b.exports=function($,N,B){p(d(N),0,7)==="Symbol("&&(N="["+m(d(N),/^Symbol\(([^)]*)\)/,"$1")+"]"),B&&B.getter&&(N="get "+N),B&&B.setter&&(N="set "+N),(!r($,"name")||n&&$.name!==N)&&(e?c($,"name",{value:N,configurable:!0}):$.name=N),C&&B&&r(B,"arity")&&$.length!==B.arity&&c($,"length",{value:B.arity});try{B&&r(B,"constructor")&&B.constructor?e&&c($,"prototype",{writable:!1}):$.prototype&&($.prototype=void 0)}catch{}var D=s($);return r(D,"source")||(D.source=S(M,typeof N=="string"?N:"")),$};Function.prototype.toString=P(function(){return a(this)&&h(this).source||l(this)},"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(t,b,g){var f=Math.ceil,o=Math.floor;b.exports=Math.trunc||function(a){var r=+a;return(r>0?o:f)(r)}},{}],302:[function(t,b,g){var f,o,a,r,e,n=t("../internals/global"),l=t("../internals/function-bind-context"),i=t("../internals/object-get-own-property-descriptor").f,s=t("../internals/task").set,h=t("../internals/queue"),d=t("../internals/engine-is-ios"),c=t("../internals/engine-is-ios-pebble"),p=t("../internals/engine-is-webos-webkit"),m=t("../internals/engine-is-node"),S=n.MutationObserver||n.WebKitMutationObserver,C=n.document,M=n.process,P=n.Promise,$=i(n,"queueMicrotask"),N=$&&$.value;if(!N){var B=new h,D=function(){var U,z;for(m&&(U=M.domain)&&U.exit();z=B.get();)try{z()}catch(E){throw B.head&&f(),E}U&&U.enter()};d||m||p||!S||!C?!c&&P&&P.resolve?((r=P.resolve(void 0)).constructor=P,e=l(r.then,r),f=function(){e(D)}):m?f=function(){M.nextTick(D)}:(s=l(s,n),f=function(){s(D)}):(o=!0,a=C.createTextNode(""),new S(D).observe(a,{characterData:!0}),f=function(){a.data=o=!o}),N=function(U){B.head||f(),B.add(U)}}b.exports=N},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(t,b,g){var f=t("../internals/a-callable"),o=TypeError,a=function(r){var e,n;this.promise=new r(function(l,i){if(e!==void 0||n!==void 0)throw new o("Bad Promise constructor");e=l,n=i}),this.resolve=f(e),this.reject=f(n)};b.exports.f=function(r){return new a(r)}},{"../internals/a-callable":222}],304:[function(t,b,g){var f=t("../internals/is-regexp"),o=TypeError;b.exports=function(a){if(f(a))throw new o("The method doesn't accept regular expressions");return a}},{"../internals/is-regexp":291}],305:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/function-uncurry-this"),a=t("../internals/function-call"),r=t("../internals/fails"),e=t("../internals/object-keys"),n=t("../internals/object-get-own-property-symbols"),l=t("../internals/object-property-is-enumerable"),i=t("../internals/to-object"),s=t("../internals/indexed-object"),h=Object.assign,d=Object.defineProperty,c=o([].concat);b.exports=!h||r(function(){if(f&&h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},m={},S=Symbol("assign detection");return p[S]=7,"abcdefghijklmnopqrst".split("").forEach(function(C){m[C]=C}),h({},p)[S]!==7||e(h({},m)).join("")!=="abcdefghijklmnopqrst"})?function(p,m){for(var S=i(p),C=arguments.length,M=1,P=n.f,$=l.f;C>M;)for(var N,B=s(arguments[M++]),D=P?c(e(B),P(B)):e(B),U=D.length,z=0;U>z;)N=D[z++],f&&!a($,B,N)||(S[N]=B[N]);return S}:h},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(t,b,g){var f,o=t("../internals/an-object"),a=t("../internals/object-define-properties"),r=t("../internals/enum-bug-keys"),e=t("../internals/hidden-keys"),n=t("../internals/html"),l=t("../internals/document-create-element"),i=t("../internals/shared-key"),s=i("IE_PROTO"),h=function(){},d=function(m){return"<script>"+m+"<\/script>"},c=function(m){m.write(d("")),m.close();var S=m.parentWindow.Object;return m=null,S},p=function(){try{f=new ActiveXObject("htmlfile")}catch{}var m,S;p=typeof document<"u"?document.domain&&f?c(f):((S=l("iframe")).style.display="none",n.appendChild(S),S.src="javascript:",(m=S.contentWindow.document).open(),m.write(d("document.F=Object")),m.close(),m.F):c(f);for(var C=r.length;C--;)delete p.prototype[r[C]];return p()};e[s]=!0,b.exports=Object.create||function(m,S){var C;return m!==null?(h.prototype=o(m),C=new h,h.prototype=null,C[s]=m):C=p(),S===void 0?C:a.f(C,S)}},{"../internals/an-object":227,"../internals/document-create-element":249,"../internals/enum-bug-keys":258,"../internals/hidden-keys":276,"../internals/html":278,"../internals/object-define-properties":307,"../internals/shared-key":332}],307:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/v8-prototype-define-bug"),a=t("../internals/object-define-property"),r=t("../internals/an-object"),e=t("../internals/to-indexed-object"),n=t("../internals/object-keys");g.f=f&&!o?Object.defineProperties:function(l,i){r(l);for(var s,h=e(i),d=n(i),c=d.length,p=0;c>p;)a.f(l,s=d[p++],h[s]);return l}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/object-define-property":308,"../internals/object-keys":316,"../internals/to-indexed-object":341,"../internals/v8-prototype-define-bug":352}],308:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/ie8-dom-define"),a=t("../internals/v8-prototype-define-bug"),r=t("../internals/an-object"),e=t("../internals/to-property-key"),n=TypeError,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor;g.f=f?a?function(s,h,d){if(r(s),h=e(h),r(d),typeof s=="function"&&h==="prototype"&&"value"in d&&"writable"in d&&!d.writable){var c=i(s,h);c&&c.writable&&(s[h]=d.value,d={configurable:"configurable"in d?d.configurable:c.configurable,enumerable:"enumerable"in d?d.enumerable:c.enumerable,writable:!1})}return l(s,h,d)}:l:function(s,h,d){if(r(s),h=e(h),r(d),o)try{return l(s,h,d)}catch{}if("get"in d||"set"in d)throw new n("Accessors not supported");return"value"in d&&(s[h]=d.value),s}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/function-call"),a=t("../internals/object-property-is-enumerable"),r=t("../internals/create-property-descriptor"),e=t("../internals/to-indexed-object"),n=t("../internals/to-property-key"),l=t("../internals/has-own-property"),i=t("../internals/ie8-dom-define"),s=Object.getOwnPropertyDescriptor;g.f=f?s:function(h,d){if(h=e(h),d=n(d),i)try{return s(h,d)}catch{}if(l(h,d))return r(!o(a.f,h,d),h[d])}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/function-call":264,"../internals/has-own-property":275,"../internals/ie8-dom-define":279,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341,"../internals/to-property-key":346}],310:[function(t,b,g){var f=t("../internals/classof-raw"),o=t("../internals/to-indexed-object"),a=t("../internals/object-get-own-property-names").f,r=t("../internals/array-slice-simple"),e=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];b.exports.f=function(n){return e&&f(n)==="Window"?function(l){try{return a(l)}catch{return r(e)}}(n):a(o(n))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(t,b,g){var f=t("../internals/object-keys-internal"),o=t("../internals/enum-bug-keys").concat("length","prototype");g.f=Object.getOwnPropertyNames||function(a){return f(a,o)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(t,b,g){g.f=Object.getOwnPropertySymbols},{}],313:[function(t,b,g){var f=t("../internals/has-own-property"),o=t("../internals/is-callable"),a=t("../internals/to-object"),r=t("../internals/shared-key"),e=t("../internals/correct-prototype-getter"),n=r("IE_PROTO"),l=Object,i=l.prototype;b.exports=e?l.getPrototypeOf:function(s){var h=a(s);if(f(h,n))return h[n];var d=h.constructor;return o(d)&&h instanceof d?d.prototype:h instanceof l?i:null}},{"../internals/correct-prototype-getter":239,"../internals/has-own-property":275,"../internals/is-callable":285,"../internals/shared-key":332,"../internals/to-object":344}],314:[function(t,b,g){var f=t("../internals/function-uncurry-this");b.exports=f({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=t("../internals/has-own-property"),a=t("../internals/to-indexed-object"),r=t("../internals/array-includes").indexOf,e=t("../internals/hidden-keys"),n=f([].push);b.exports=function(l,i){var s,h=a(l),d=0,c=[];for(s in h)!o(e,s)&&o(h,s)&&n(c,s);for(;i.length>d;)o(h,s=i[d++])&&(~r(c,s)||n(c,s));return c}},{"../internals/array-includes":228,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/to-indexed-object":341}],316:[function(t,b,g){var f=t("../internals/object-keys-internal"),o=t("../internals/enum-bug-keys");b.exports=Object.keys||function(a){return f(a,o)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(t,b,g){var f={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!f.call({1:2},1);g.f=a?function(r){var e=o(this,r);return!!e&&e.enumerable}:f},{}],318:[function(t,b,g){var f=t("../internals/function-uncurry-this-accessor"),o=t("../internals/an-object"),a=t("../internals/a-possible-prototype");b.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,e=!1,n={};try{(r=f(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch{}return function(l,i){return o(l),a(i),e?r(l,i):l.__proto__=i,l}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/fails"),a=t("../internals/function-uncurry-this"),r=t("../internals/object-get-prototype-of"),e=t("../internals/object-keys"),n=t("../internals/to-indexed-object"),l=a(t("../internals/object-property-is-enumerable").f),i=a([].push),s=f&&o(function(){var d=Object.create(null);return d[2]=2,!l(d,2)}),h=function(d){return function(c){for(var p,m=n(c),S=e(m),C=s&&r(m)===null,M=S.length,P=0,$=[];M>P;)p=S[P++],f&&!(C?p in m:l(m,p))||i($,d?[p,m[p]]:m[p]);return $}};b.exports={entries:h(!0),values:h(!1)}},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/object-get-prototype-of":313,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341}],320:[function(t,b,g){var f=t("../internals/function-call"),o=t("../internals/is-callable"),a=t("../internals/is-object"),r=TypeError;b.exports=function(e,n){var l,i;if(n==="string"&&o(l=e.toString)&&!a(i=f(l,e))||o(l=e.valueOf)&&!a(i=f(l,e))||n!=="string"&&o(l=e.toString)&&!a(i=f(l,e)))return i;throw new r("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(t,b,g){var f=t("../internals/get-built-in"),o=t("../internals/function-uncurry-this"),a=t("../internals/object-get-own-property-names"),r=t("../internals/object-get-own-property-symbols"),e=t("../internals/an-object"),n=o([].concat);b.exports=f("Reflect","ownKeys")||function(l){var i=a.f(e(l)),s=r.f;return s?n(i,s(l)):i}},{"../internals/an-object":227,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-symbols":312}],322:[function(t,b,g){var f=t("../internals/global");b.exports=f},{"../internals/global":274}],323:[function(t,b,g){b.exports=function(f){try{return{error:!1,value:f()}}catch(o){return{error:!0,value:o}}}},{}],324:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/promise-native-constructor"),a=t("../internals/is-callable"),r=t("../internals/is-forced"),e=t("../internals/inspect-source"),n=t("../internals/well-known-symbol"),l=t("../internals/engine-is-browser"),i=t("../internals/engine-is-deno"),s=t("../internals/is-pure"),h=t("../internals/engine-v8-version"),d=o&&o.prototype,c=n("species"),p=!1,m=a(f.PromiseRejectionEvent),S=r("Promise",function(){var C=e(o),M=C!==String(o);if(!M&&h===66||s&&(!d.catch||!d.finally))return!0;if(!h||h<51||!/native code/.test(C)){var P=new o(function(N){N(1)}),$=function(N){N(function(){},function(){})};if((P.constructor={})[c]=$,!(p=P.then(function(){})instanceof $))return!0}return!M&&(l||i)&&!m});b.exports={CONSTRUCTOR:S,REJECTION_EVENT:m,SUBCLASSING:p}},{"../internals/engine-is-browser":250,"../internals/engine-is-deno":251,"../internals/engine-v8-version":257,"../internals/global":274,"../internals/inspect-source":281,"../internals/is-callable":285,"../internals/is-forced":287,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/well-known-symbol":357}],325:[function(t,b,g){var f=t("../internals/global");b.exports=f.Promise},{"../internals/global":274}],326:[function(t,b,g){var f=t("../internals/an-object"),o=t("../internals/is-object"),a=t("../internals/new-promise-capability");b.exports=function(r,e){if(f(r),o(e)&&e.constructor===r)return e;var n=a.f(r);return(0,n.resolve)(e),n.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(t,b,g){var f=t("../internals/promise-native-constructor"),o=t("../internals/check-correctness-of-iteration"),a=t("../internals/promise-constructor-detection").CONSTRUCTOR;b.exports=a||!o(function(r){f.all(r).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(t,b,g){var f=function(){this.head=null,this.tail=null};f.prototype={add:function(o){var a={item:o,next:null},r=this.tail;r?r.next=a:this.head=a,this.tail=a},get:function(){var o=this.head;if(o)return(this.head=o.next)===null&&(this.tail=null),o.item}},b.exports=f},{}],329:[function(t,b,g){var f=t("../internals/is-null-or-undefined"),o=TypeError;b.exports=function(a){if(f(a))throw new o("Can't call method on "+a);return a}},{"../internals/is-null-or-undefined":288}],330:[function(t,b,g){var f=t("../internals/get-built-in"),o=t("../internals/define-built-in-accessor"),a=t("../internals/well-known-symbol"),r=t("../internals/descriptors"),e=a("species");b.exports=function(n){var l=f(n);r&&l&&!l[e]&&o(l,e,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],331:[function(t,b,g){var f=t("../internals/object-define-property").f,o=t("../internals/has-own-property"),a=t("../internals/well-known-symbol")("toStringTag");b.exports=function(r,e,n){r&&!n&&(r=r.prototype),r&&!o(r,a)&&f(r,a,{configurable:!0,value:e})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(t,b,g){var f=t("../internals/shared"),o=t("../internals/uid"),a=f("keys");b.exports=function(r){return a[r]||(a[r]=o(r))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/define-global-property"),a=f["__core-js_shared__"]||o("__core-js_shared__",{});b.exports=a},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(t,b,g){var f=t("../internals/is-pure"),o=t("../internals/shared-store");(b.exports=function(a,r){return o[a]||(o[a]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:f?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(t,b,g){var f=t("../internals/an-object"),o=t("../internals/a-constructor"),a=t("../internals/is-null-or-undefined"),r=t("../internals/well-known-symbol")("species");b.exports=function(e,n){var l,i=f(e).constructor;return i===void 0||a(l=f(i)[r])?n:o(l)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(t,b,g){var f=t("../internals/engine-v8-version"),o=t("../internals/fails"),a=t("../internals/global").String;b.exports=!!Object.getOwnPropertySymbols&&!o(function(){var r=Symbol("symbol detection");return!a(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&f&&f<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(t,b,g){var f=t("../internals/function-call"),o=t("../internals/get-built-in"),a=t("../internals/well-known-symbol"),r=t("../internals/define-built-in");b.exports=function(){var e=o("Symbol"),n=e&&e.prototype,l=n&&n.valueOf,i=a("toPrimitive");n&&!n[i]&&r(n,i,function(s){return f(l,this)},{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(t,b,g){var f=t("../internals/symbol-constructor-detection");b.exports=f&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(t,b,g){var f,o,a,r,e=t("../internals/global"),n=t("../internals/function-apply"),l=t("../internals/function-bind-context"),i=t("../internals/is-callable"),s=t("../internals/has-own-property"),h=t("../internals/fails"),d=t("../internals/html"),c=t("../internals/array-slice"),p=t("../internals/document-create-element"),m=t("../internals/validate-arguments-length"),S=t("../internals/engine-is-ios"),C=t("../internals/engine-is-node"),M=e.setImmediate,P=e.clearImmediate,$=e.process,N=e.Dispatch,B=e.Function,D=e.MessageChannel,U=e.String,z=0,E={};h(function(){f=e.location});var O=function(w){if(s(E,w)){var _=E[w];delete E[w],_()}},x=function(w){return function(){O(w)}},y=function(w){O(w.data)},v=function(w){e.postMessage(U(w),f.protocol+"//"+f.host)};M&&P||(M=function(w){m(arguments.length,1);var _=i(w)?w:B(w),A=c(arguments,1);return E[++z]=function(){n(_,void 0,A)},o(z),z},P=function(w){delete E[w]},C?o=function(w){$.nextTick(x(w))}:N&&N.now?o=function(w){N.now(x(w))}:D&&!S?(r=(a=new D).port2,a.port1.onmessage=y,o=l(r.postMessage,r)):e.addEventListener&&i(e.postMessage)&&!e.importScripts&&f&&f.protocol!=="file:"&&!h(v)?(o=v,e.addEventListener("message",y,!1)):o="onreadystatechange"in p("script")?function(w){d.appendChild(p("script")).onreadystatechange=function(){d.removeChild(this),O(w)}}:function(w){setTimeout(x(w),0)}),b.exports={set:M,clear:P}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(t,b,g){var f=t("../internals/to-integer-or-infinity"),o=Math.max,a=Math.min;b.exports=function(r,e){var n=f(r);return n<0?o(n+e,0):a(n,e)}},{"../internals/to-integer-or-infinity":342}],341:[function(t,b,g){var f=t("../internals/indexed-object"),o=t("../internals/require-object-coercible");b.exports=function(a){return f(o(a))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(t,b,g){var f=t("../internals/math-trunc");b.exports=function(o){var a=+o;return a!=a||a===0?0:f(a)}},{"../internals/math-trunc":301}],343:[function(t,b,g){var f=t("../internals/to-integer-or-infinity"),o=Math.min;b.exports=function(a){return a>0?o(f(a),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(t,b,g){var f=t("../internals/require-object-coercible"),o=Object;b.exports=function(a){return o(f(a))}},{"../internals/require-object-coercible":329}],345:[function(t,b,g){var f=t("../internals/function-call"),o=t("../internals/is-object"),a=t("../internals/is-symbol"),r=t("../internals/get-method"),e=t("../internals/ordinary-to-primitive"),n=t("../internals/well-known-symbol"),l=TypeError,i=n("toPrimitive");b.exports=function(s,h){if(!o(s)||a(s))return s;var d,c=r(s,i);if(c){if(h===void 0&&(h="default"),d=f(c,s,h),!o(d)||a(d))return d;throw new l("Can't convert object to primitive value")}return h===void 0&&(h="number"),e(s,h)}},{"../internals/function-call":264,"../internals/get-method":273,"../internals/is-object":289,"../internals/is-symbol":292,"../internals/ordinary-to-primitive":320,"../internals/well-known-symbol":357}],346:[function(t,b,g){var f=t("../internals/to-primitive"),o=t("../internals/is-symbol");b.exports=function(a){var r=f(a,"string");return o(r)?r:r+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(t,b,g){var f={};f[t("../internals/well-known-symbol")("toStringTag")]="z",b.exports=String(f)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(t,b,g){var f=t("../internals/classof"),o=String;b.exports=function(a){if(f(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return o(a)}},{"../internals/classof":236}],349:[function(t,b,g){var f=String;b.exports=function(o){try{return f(o)}catch{return"Object"}}},{}],350:[function(t,b,g){var f=t("../internals/function-uncurry-this"),o=0,a=Math.random(),r=f(1 .toString);b.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+r(++o+a,36)}},{"../internals/function-uncurry-this":268}],351:[function(t,b,g){var f=t("../internals/symbol-constructor-detection");b.exports=f&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(t,b,g){var f=t("../internals/descriptors"),o=t("../internals/fails");b.exports=f&&o(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(t,b,g){var f=TypeError;b.exports=function(o,a){if(o<a)throw new f("Not enough arguments");return o}},{}],354:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/is-callable"),a=f.WeakMap;b.exports=o(a)&&/native code/.test(String(a))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(t,b,g){var f=t("../internals/path"),o=t("../internals/has-own-property"),a=t("../internals/well-known-symbol-wrapped"),r=t("../internals/object-define-property").f;b.exports=function(e){var n=f.Symbol||(f.Symbol={});o(n,e)||r(n,e,{value:a.f(e)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(t,b,g){var f=t("../internals/well-known-symbol");g.f=f},{"../internals/well-known-symbol":357}],357:[function(t,b,g){var f=t("../internals/global"),o=t("../internals/shared"),a=t("../internals/has-own-property"),r=t("../internals/uid"),e=t("../internals/symbol-constructor-detection"),n=t("../internals/use-symbol-as-uid"),l=f.Symbol,i=o("wks"),s=n?l.for||l:l&&l.withoutSetter||r;b.exports=function(h){return a(i,h)||(i[h]=e&&a(l,h)?l[h]:s("Symbol."+h)),i[h]}},{"../internals/global":274,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-constructor-detection":336,"../internals/uid":350,"../internals/use-symbol-as-uid":351}],358:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/array-iteration").findIndex,a=t("../internals/add-to-unscopables"),r=!0;"findIndex"in[]&&Array(1).findIndex(function(){r=!1}),f({target:"Array",proto:!0,forced:r},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/array-iteration").find,a=t("../internals/add-to-unscopables"),r=!0;"find"in[]&&Array(1).find(function(){r=!1}),f({target:"Array",proto:!0,forced:r},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/array-includes").includes,a=t("../internals/fails"),r=t("../internals/add-to-unscopables");f({target:"Array",proto:!0,forced:a(function(){return!Array(1).includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(t,b,g){var f=t("../internals/to-indexed-object"),o=t("../internals/add-to-unscopables"),a=t("../internals/iterators"),r=t("../internals/internal-state"),e=t("../internals/object-define-property").f,n=t("../internals/iterator-define"),l=t("../internals/create-iter-result-object"),i=t("../internals/is-pure"),s=t("../internals/descriptors"),h=r.set,d=r.getterFor("Array Iterator");b.exports=n(Array,"Array",function(p,m){h(this,{type:"Array Iterator",target:f(p),index:0,kind:m})},function(){var p=d(this),m=p.target,S=p.kind,C=p.index++;if(!m||C>=m.length)return p.target=void 0,l(void 0,!0);switch(S){case"keys":return l(C,!1);case"values":return l(m[C],!1)}return l([C,m[C]],!1)},"values");var c=a.Arguments=a.Array;if(o("keys"),o("values"),o("entries"),!i&&s&&c.name!=="values")try{e(c,"name",{value:"values"})}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/get-built-in"),a=t("../internals/function-apply"),r=t("../internals/function-call"),e=t("../internals/function-uncurry-this"),n=t("../internals/fails"),l=t("../internals/is-callable"),i=t("../internals/is-symbol"),s=t("../internals/array-slice"),h=t("../internals/get-json-replacer-function"),d=t("../internals/symbol-constructor-detection"),c=String,p=o("JSON","stringify"),m=e(/./.exec),S=e("".charAt),C=e("".charCodeAt),M=e("".replace),P=e(1 .toString),$=/[\uD800-\uDFFF]/g,N=/^[\uD800-\uDBFF]$/,B=/^[\uDC00-\uDFFF]$/,D=!d||n(function(){var O=o("Symbol")("stringify detection");return p([O])!=="[null]"||p({a:O})!=="{}"||p(Object(O))!=="{}"}),U=n(function(){return p("\uDF06\uD834")!=='"\\udf06\\ud834"'||p("\uDEAD")!=='"\\udead"'}),z=function(O,x){var y=s(arguments),v=h(x);if(l(v)||O!==void 0&&!i(O))return y[1]=function(w,_){if(l(v)&&(_=r(v,this,c(w),_)),!i(_))return _},a(p,null,y)},E=function(O,x,y){var v=S(y,x-1),w=S(y,x+1);return m(N,O)&&!m(B,w)||m(B,O)&&!m(N,v)?"\\u"+P(C(O,0),16):O};p&&f({target:"JSON",stat:!0,arity:3,forced:D||U},{stringify:function(O,x,y){var v=s(arguments),w=a(D?z:p,null,v);return U&&typeof w=="string"?M(w,$,E):w}})},{"../internals/array-slice":231,"../internals/export":259,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/get-json-replacer-function":272,"../internals/is-callable":285,"../internals/is-symbol":292,"../internals/symbol-constructor-detection":336}],363:[function(t,b,g){t("../internals/export")({target:"Number",stat:!0},{isNaN:function(f){return f!=f}})},{"../internals/export":259}],364:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/object-assign");f({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/symbol-constructor-detection"),a=t("../internals/fails"),r=t("../internals/object-get-own-property-symbols"),e=t("../internals/to-object");f({target:"Object",stat:!0,forced:!o||a(function(){r.f(1)})},{getOwnPropertySymbols:function(n){var l=r.f;return l?l(e(n)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/to-object"),a=t("../internals/object-keys");f({target:"Object",stat:!0,forced:t("../internals/fails")(function(){a(1)})},{keys:function(r){return a(o(r))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/object-to-array").values;f({target:"Object",stat:!0},{values:function(a){return o(a)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-call"),a=t("../internals/a-callable"),r=t("../internals/new-promise-capability"),e=t("../internals/perform"),n=t("../internals/iterate");f({target:"Promise",stat:!0,forced:t("../internals/promise-statics-incorrect-iteration")},{all:function(l){var i=this,s=r.f(i),h=s.resolve,d=s.reject,c=e(function(){var p=a(i.resolve),m=[],S=0,C=1;n(l,function(M){var P=S++,$=!1;C++,o(p,i,M).then(function(N){$||($=!0,m[P]=N,--C||h(m))},d)}),--C||h(m)});return c.error&&d(c.value),s.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/is-pure"),a=t("../internals/promise-constructor-detection").CONSTRUCTOR,r=t("../internals/promise-native-constructor"),e=t("../internals/get-built-in"),n=t("../internals/is-callable"),l=t("../internals/define-built-in"),i=r&&r.prototype;if(f({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(h){return this.then(void 0,h)}}),!o&&n(r)){var s=e("Promise").prototype.catch;i.catch!==s&&l(i,"catch",s,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(t,b,g){var f,o,a,r=t("../internals/export"),e=t("../internals/is-pure"),n=t("../internals/engine-is-node"),l=t("../internals/global"),i=t("../internals/function-call"),s=t("../internals/define-built-in"),h=t("../internals/object-set-prototype-of"),d=t("../internals/set-to-string-tag"),c=t("../internals/set-species"),p=t("../internals/a-callable"),m=t("../internals/is-callable"),S=t("../internals/is-object"),C=t("../internals/an-instance"),M=t("../internals/species-constructor"),P=t("../internals/task").set,$=t("../internals/microtask"),N=t("../internals/host-report-errors"),B=t("../internals/perform"),D=t("../internals/queue"),U=t("../internals/internal-state"),z=t("../internals/promise-native-constructor"),E=t("../internals/promise-constructor-detection"),O=t("../internals/new-promise-capability"),x=E.CONSTRUCTOR,y=E.REJECTION_EVENT,v=E.SUBCLASSING,w=U.getterFor("Promise"),_=U.set,A=z&&z.prototype,j=z,L=A,H=l.TypeError,q=l.document,X=l.process,F=O.f,W=F,I=!!(q&&q.createEvent&&l.dispatchEvent),R=function(et){var ot;return!(!S(et)||!m(ot=et.then))&&ot},V=function(et,ot){var st,lt,ft,pt=ot.value,yt=ot.state===1,Ot=yt?et.ok:et.fail,At=et.resolve,kt=et.reject,Wt=et.domain;try{Ot?(yt||(ot.rejection===2&&nt(ot),ot.rejection=1),Ot===!0?st=pt:(Wt&&Wt.enter(),st=Ot(pt),Wt&&(Wt.exit(),ft=!0)),st===et.promise?kt(new H("Promise-chain cycle")):(lt=R(st))?i(lt,st,At,kt):At(st)):kt(pt)}catch(Ht){Wt&&!ft&&Wt.exit(),kt(Ht)}},K=function(et,ot){et.notified||(et.notified=!0,$(function(){for(var st,lt=et.reactions;st=lt.get();)V(st,et);et.notified=!1,ot&&!et.rejection&&Y(et)}))},Z=function(et,ot,st){var lt,ft;I?((lt=q.createEvent("Event")).promise=ot,lt.reason=st,lt.initEvent(et,!1,!0),l.dispatchEvent(lt)):lt={promise:ot,reason:st},!y&&(ft=l["on"+et])?ft(lt):et==="unhandledrejection"&&N("Unhandled promise rejection",st)},Y=function(et){i(P,l,function(){var ot,st=et.facade,lt=et.value;if(J(et)&&(ot=B(function(){n?X.emit("unhandledRejection",lt,st):Z("unhandledrejection",st,lt)}),et.rejection=n||J(et)?2:1,ot.error))throw ot.value})},J=function(et){return et.rejection!==1&&!et.parent},nt=function(et){i(P,l,function(){var ot=et.facade;n?X.emit("rejectionHandled",ot):Z("rejectionhandled",ot,et.value)})},it=function(et,ot,st){return function(lt){et(ot,lt,st)}},G=function(et,ot,st){et.done||(et.done=!0,st&&(et=st),et.value=ot,et.state=2,K(et,!0))},tt=function(et,ot,st){if(!et.done){et.done=!0,st&&(et=st);try{if(et.facade===ot)throw new H("Promise can't be resolved itself");var lt=R(ot);lt?$(function(){var ft={done:!1};try{i(lt,ot,it(tt,ft,et),it(G,ft,et))}catch(pt){G(ft,pt,et)}}):(et.value=ot,et.state=1,K(et,!1))}catch(ft){G({done:!1},ft,et)}}};if(x&&(L=(j=function(et){C(this,L),p(et),i(f,this);var ot=w(this);try{et(it(tt,ot),it(G,ot))}catch(st){G(ot,st)}}).prototype,(f=function(et){_(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new D,rejection:!1,state:0,value:void 0})}).prototype=s(L,"then",function(et,ot){var st=w(this),lt=F(M(this,j));return st.parent=!0,lt.ok=!m(et)||et,lt.fail=m(ot)&&ot,lt.domain=n?X.domain:void 0,st.state===0?st.reactions.add(lt):$(function(){V(lt,st)}),lt.promise}),o=function(){var et=new f,ot=w(et);this.promise=et,this.resolve=it(tt,ot),this.reject=it(G,ot)},O.f=F=function(et){return et===j||et===void 0?new o(et):W(et)},!e&&m(z)&&A!==Object.prototype)){a=A.then,v||s(A,"then",function(et,ot){var st=this;return new j(function(lt,ft){i(a,st,lt,ft)}).then(et,ot)},{unsafe:!0});try{delete A.constructor}catch{}h&&h(A,L)}r({global:!0,constructor:!0,wrap:!0,forced:x},{Promise:j}),d(j,"Promise",!1,!0),c("Promise")},{"../internals/a-callable":222,"../internals/an-instance":226,"../internals/define-built-in":245,"../internals/engine-is-node":254,"../internals/export":259,"../internals/function-call":264,"../internals/global":274,"../internals/host-report-errors":277,"../internals/internal-state":282,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/microtask":302,"../internals/new-promise-capability":303,"../internals/object-set-prototype-of":318,"../internals/perform":323,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/queue":328,"../internals/set-species":330,"../internals/set-to-string-tag":331,"../internals/species-constructor":335,"../internals/task":339}],371:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/is-pure"),a=t("../internals/promise-native-constructor"),r=t("../internals/fails"),e=t("../internals/get-built-in"),n=t("../internals/is-callable"),l=t("../internals/species-constructor"),i=t("../internals/promise-resolve"),s=t("../internals/define-built-in"),h=a&&a.prototype;if(f({target:"Promise",proto:!0,real:!0,forced:!!a&&r(function(){h.finally.call({then:function(){}},function(){})})},{finally:function(c){var p=l(this,e("Promise")),m=n(c);return this.then(m?function(S){return i(p,c()).then(function(){return S})}:c,m?function(S){return i(p,c()).then(function(){throw S})}:c)}}),!o&&n(a)){var d=e("Promise").prototype.finally;h.finally!==d&&s(h,"finally",d,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/fails":260,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326,"../internals/species-constructor":335}],372:[function(t,b,g){t("../modules/es.promise.constructor"),t("../modules/es.promise.all"),t("../modules/es.promise.catch"),t("../modules/es.promise.race"),t("../modules/es.promise.reject"),t("../modules/es.promise.resolve")},{"../modules/es.promise.all":368,"../modules/es.promise.catch":369,"../modules/es.promise.constructor":370,"../modules/es.promise.race":373,"../modules/es.promise.reject":374,"../modules/es.promise.resolve":375}],373:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-call"),a=t("../internals/a-callable"),r=t("../internals/new-promise-capability"),e=t("../internals/perform"),n=t("../internals/iterate");f({target:"Promise",stat:!0,forced:t("../internals/promise-statics-incorrect-iteration")},{race:function(l){var i=this,s=r.f(i),h=s.reject,d=e(function(){var c=a(i.resolve);n(l,function(p){o(c,i,p).then(s.resolve,h)})});return d.error&&h(d.value),s.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-call"),a=t("../internals/new-promise-capability");f({target:"Promise",stat:!0,forced:t("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(r){var e=a.f(this);return o(e.reject,void 0,r),e.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/get-built-in"),a=t("../internals/is-pure"),r=t("../internals/promise-native-constructor"),e=t("../internals/promise-constructor-detection").CONSTRUCTOR,n=t("../internals/promise-resolve"),l=o("Promise"),i=a&&!e;f({target:"Promise",stat:!0,forced:a||e},{resolve:function(s){return n(i&&this===l?r:this,s)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-uncurry-this"),a=t("../internals/to-absolute-index"),r=RangeError,e=String.fromCharCode,n=String.fromCodePoint,l=o([].join);f({target:"String",stat:!0,arity:1,forced:!!n&&n.length!==1},{fromCodePoint:function(i){for(var s,h=[],d=arguments.length,c=0;d>c;){if(s=+arguments[c++],a(s,1114111)!==s)throw new r(s+" is not a valid code point");h[c]=s<65536?e(s):e(55296+((s-=65536)>>10),s%1024+56320)}return l(h,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/function-uncurry-this"),a=t("../internals/not-a-regexp"),r=t("../internals/require-object-coercible"),e=t("../internals/to-string"),n=t("../internals/correct-is-regexp-logic"),l=o("".indexOf);f({target:"String",proto:!0,forced:!n("includes")},{includes:function(i){return!!~l(e(r(this)),e(a(i)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":238,"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/not-a-regexp":304,"../internals/require-object-coercible":329,"../internals/to-string":348}],378:[function(t,b,g){t("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/global"),a=t("../internals/function-call"),r=t("../internals/function-uncurry-this"),e=t("../internals/is-pure"),n=t("../internals/descriptors"),l=t("../internals/symbol-constructor-detection"),i=t("../internals/fails"),s=t("../internals/has-own-property"),h=t("../internals/object-is-prototype-of"),d=t("../internals/an-object"),c=t("../internals/to-indexed-object"),p=t("../internals/to-property-key"),m=t("../internals/to-string"),S=t("../internals/create-property-descriptor"),C=t("../internals/object-create"),M=t("../internals/object-keys"),P=t("../internals/object-get-own-property-names"),$=t("../internals/object-get-own-property-names-external"),N=t("../internals/object-get-own-property-symbols"),B=t("../internals/object-get-own-property-descriptor"),D=t("../internals/object-define-property"),U=t("../internals/object-define-properties"),z=t("../internals/object-property-is-enumerable"),E=t("../internals/define-built-in"),O=t("../internals/define-built-in-accessor"),x=t("../internals/shared"),y=t("../internals/shared-key"),v=t("../internals/hidden-keys"),w=t("../internals/uid"),_=t("../internals/well-known-symbol"),A=t("../internals/well-known-symbol-wrapped"),j=t("../internals/well-known-symbol-define"),L=t("../internals/symbol-define-to-primitive"),H=t("../internals/set-to-string-tag"),q=t("../internals/internal-state"),X=t("../internals/array-iteration").forEach,F=y("hidden"),W=q.set,I=q.getterFor("Symbol"),R=Object.prototype,V=o.Symbol,K=V&&V.prototype,Z=o.RangeError,Y=o.TypeError,J=o.QObject,nt=B.f,it=D.f,G=$.f,tt=z.f,et=r([].push),ot=x("symbols"),st=x("op-symbols"),lt=x("wks"),ft=!J||!J.prototype||!J.prototype.findChild,pt=function(Nt,_t,Rt){var zt=nt(R,_t);zt&&delete R[_t],it(Nt,_t,Rt),zt&&Nt!==R&&it(R,_t,zt)},yt=n&&i(function(){return C(it({},"a",{get:function(){return it(this,"a",{value:7}).a}})).a!==7})?pt:it,Ot=function(Nt,_t){var Rt=ot[Nt]=C(K);return W(Rt,{type:"Symbol",tag:Nt,description:_t}),n||(Rt.description=_t),Rt},At=function(Nt,_t,Rt){Nt===R&&At(st,_t,Rt),d(Nt);var zt=p(_t);return d(Rt),s(ot,zt)?(Rt.enumerable?(s(Nt,F)&&Nt[F][zt]&&(Nt[F][zt]=!1),Rt=C(Rt,{enumerable:S(0,!1)})):(s(Nt,F)||it(Nt,F,S(1,{})),Nt[F][zt]=!0),yt(Nt,zt,Rt)):it(Nt,zt,Rt)},kt=function(Nt,_t){d(Nt);var Rt=c(_t),zt=M(Rt).concat(Kt(Rt));return X(zt,function(Bt){n&&!a(Wt,Rt,Bt)||At(Nt,Bt,Rt[Bt])}),Nt},Wt=function(Nt){var _t=p(Nt),Rt=a(tt,this,_t);return!(this===R&&s(ot,_t)&&!s(st,_t))&&(!(Rt||!s(this,_t)||!s(ot,_t)||s(this,F)&&this[F][_t])||Rt)},Ht=function(Nt,_t){var Rt=c(Nt),zt=p(_t);if(Rt!==R||!s(ot,zt)||s(st,zt)){var Bt=nt(Rt,zt);return!Bt||!s(ot,zt)||s(Rt,F)&&Rt[F][zt]||(Bt.enumerable=!0),Bt}},Vt=function(Nt){var _t=G(c(Nt)),Rt=[];return X(_t,function(zt){s(ot,zt)||s(v,zt)||et(Rt,zt)}),Rt},Kt=function(Nt){var _t=Nt===R,Rt=G(_t?st:c(Nt)),zt=[];return X(Rt,function(Bt){!s(ot,Bt)||_t&&!s(R,Bt)||et(zt,ot[Bt])}),zt};l||(E(K=(V=function(){if(h(K,this))throw new Y("Symbol is not a constructor");var Nt=arguments.length&&arguments[0]!==void 0?m(arguments[0]):void 0,_t=w(Nt),Rt=function(zt){this===R&&a(Rt,st,zt),s(this,F)&&s(this[F],_t)&&(this[F][_t]=!1);var Bt=S(1,zt);try{yt(this,_t,Bt)}catch(mt){if(!(mt instanceof Z))throw mt;pt(this,_t,Bt)}};return n&&ft&&yt(R,_t,{configurable:!0,set:Rt}),Ot(_t,Nt)}).prototype,"toString",function(){return I(this).tag}),E(V,"withoutSetter",function(Nt){return Ot(w(Nt),Nt)}),z.f=Wt,D.f=At,U.f=kt,B.f=Ht,P.f=$.f=Vt,N.f=Kt,A.f=function(Nt){return Ot(_(Nt),Nt)},n&&(O(K,"description",{configurable:!0,get:function(){return I(this).description}}),e||E(R,"propertyIsEnumerable",Wt,{unsafe:!0}))),f({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:V}),X(M(lt),function(Nt){j(Nt)}),f({target:"Symbol",stat:!0,forced:!l},{useSetter:function(){ft=!0},useSimple:function(){ft=!1}}),f({target:"Object",stat:!0,forced:!l,sham:!n},{create:function(Nt,_t){return _t===void 0?C(Nt):kt(C(Nt),_t)},defineProperty:At,defineProperties:kt,getOwnPropertyDescriptor:Ht}),f({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:Vt}),L(),H(V,"Symbol"),v[F]=!0},{"../internals/an-object":227,"../internals/array-iteration":229,"../internals/create-property-descriptor":242,"../internals/define-built-in":245,"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/export":259,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-define-properties":307,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-names-external":310,"../internals/object-get-own-property-symbols":312,"../internals/object-is-prototype-of":314,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/set-to-string-tag":331,"../internals/shared":334,"../internals/shared-key":332,"../internals/symbol-constructor-detection":336,"../internals/symbol-define-to-primitive":337,"../internals/to-indexed-object":341,"../internals/to-property-key":346,"../internals/to-string":348,"../internals/uid":350,"../internals/well-known-symbol":357,"../internals/well-known-symbol-define":355,"../internals/well-known-symbol-wrapped":356}],380:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/get-built-in"),a=t("../internals/has-own-property"),r=t("../internals/to-string"),e=t("../internals/shared"),n=t("../internals/symbol-registry-detection"),l=e("string-to-symbol-registry"),i=e("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!n},{for:function(s){var h=r(s);if(a(l,h))return l[h];var d=o("Symbol")(h);return l[h]=d,i[d]=h,d}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/to-string":348}],381:[function(t,b,g){t("../modules/es.symbol.constructor"),t("../modules/es.symbol.for"),t("../modules/es.symbol.key-for"),t("../modules/es.json.stringify"),t("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":362,"../modules/es.object.get-own-property-symbols":365,"../modules/es.symbol.constructor":379,"../modules/es.symbol.for":380,"../modules/es.symbol.key-for":382}],382:[function(t,b,g){var f=t("../internals/export"),o=t("../internals/has-own-property"),a=t("../internals/is-symbol"),r=t("../internals/try-to-string"),e=t("../internals/shared"),n=t("../internals/symbol-registry-detection"),l=e("symbol-to-string-registry");f({target:"Symbol",stat:!0,forced:!n},{keyFor:function(i){if(!a(i))throw new TypeError(r(i)+" is not a symbol");if(o(l,i))return l[i]}})},{"../internals/export":259,"../internals/has-own-property":275,"../internals/is-symbol":292,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/try-to-string":349}],383:[function(t,b,g){function f(o){return Object.prototype.toString.call(o)}g.isArray=function(o){return Array.isArray?Array.isArray(o):f(o)==="[object Array]"},g.isBoolean=function(o){return typeof o=="boolean"},g.isNull=function(o){return o===null},g.isNullOrUndefined=function(o){return o==null},g.isNumber=function(o){return typeof o=="number"},g.isString=function(o){return typeof o=="string"},g.isSymbol=function(o){return typeof o=="symbol"},g.isUndefined=function(o){return o===void 0},g.isRegExp=function(o){return f(o)==="[object RegExp]"},g.isObject=function(o){return typeof o=="object"&&o!==null},g.isDate=function(o){return f(o)==="[object Date]"},g.isError=function(o){return f(o)==="[object Error]"||o instanceof Error},g.isFunction=function(o){return typeof o=="function"},g.isPrimitive=function(o){return o===null||typeof o=="boolean"||typeof o=="number"||typeof o=="string"||typeof o=="symbol"||o===void 0},g.isBuffer=t("buffer").Buffer.isBuffer},{buffer:220}],384:[function(t,b,g){(function(f){(function(){var o=t("elliptic"),a=t("bn.js");b.exports=function(l){return new e(l)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function e(l){this.curveType=r[l],this.curveType||(this.curveType={name:l}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function n(l,i,s){Array.isArray(l)||(l=l.toArray());var h=new f(l);if(s&&h.length<s){var d=new f(s-h.length);d.fill(0),h=f.concat([d,h])}return i?h.toString(i):h}r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,e.prototype.generateKeys=function(l,i){return this.keys=this.curve.genKeyPair(),this.getPublicKey(l,i)},e.prototype.computeSecret=function(l,i,s){return i=i||"utf8",f.isBuffer(l)||(l=new f(l,i)),n(this.curve.keyFromPublic(l).getPublic().mul(this.keys.getPrivate()).getX(),s,this.curveType.byteLength)},e.prototype.getPublicKey=function(l,i){var s=this.keys.getPublic(i==="compressed",!0);return i==="hybrid"&&(s[s.length-1]%2?s[0]=7:s[0]=6),n(s,l)},e.prototype.getPrivateKey=function(l){return n(this.keys.getPrivate(),l)},e.prototype.setPublicKey=function(l,i){return i=i||"utf8",f.isBuffer(l)||(l=new f(l,i)),this.keys._importPublic(l),this},e.prototype.setPrivateKey=function(l,i){i=i||"utf8",f.isBuffer(l)||(l=new f(l,i));var s=new a(l);return s=s.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(s),this}}).call(this)}).call(this,t("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(t,b,g){arguments[4][184][0].apply(g,arguments)},{buffer:188,dup:184}],386:[function(t,b,g){var f=t("inherits"),o=t("md5.js"),a=t("ripemd160"),r=t("sha.js"),e=t("cipher-base");function n(l){e.call(this,"digest"),this._hash=l}f(n,e),n.prototype._update=function(l){this._hash.update(l)},n.prototype._final=function(){return this._hash.digest()},b.exports=function(l){return(l=l.toLowerCase())==="md5"?new o:l==="rmd160"||l==="ripemd160"?new a:new n(r(l))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(t,b,g){var f=t("md5.js");b.exports=function(o){return new f().update(o).digest()}},{"md5.js":450}],388:[function(t,b,g){var f=t("inherits"),o=t("./legacy"),a=t("cipher-base"),r=t("safe-buffer").Buffer,e=t("create-hash/md5"),n=t("ripemd160"),l=t("sha.js"),i=r.alloc(128);function s(h,d){a.call(this,"digest"),typeof d=="string"&&(d=r.from(d));var c=h==="sha512"||h==="sha384"?128:64;this._alg=h,this._key=d,d.length>c?d=(h==="rmd160"?new n:l(h)).update(d).digest():d.length<c&&(d=r.concat([d,i],c));for(var p=this._ipad=r.allocUnsafe(c),m=this._opad=r.allocUnsafe(c),S=0;S<c;S++)p[S]=54^d[S],m[S]=92^d[S];this._hash=h==="rmd160"?new n:l(h),this._hash.update(p)}f(s,a),s.prototype._update=function(h){this._hash.update(h)},s.prototype._final=function(){var h=this._hash.digest();return(this._alg==="rmd160"?new n:l(this._alg)).update(this._opad).update(h).digest()},b.exports=function(h,d){return(h=h.toLowerCase())==="rmd160"||h==="ripemd160"?new s("rmd160",d):h==="md5"?new o(e,d):new s(h,d)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(t,b,g){var f=t("inherits"),o=t("safe-buffer").Buffer,a=t("cipher-base"),r=o.alloc(128);function e(n,l){a.call(this,"digest"),typeof l=="string"&&(l=o.from(l)),this._alg=n,this._key=l,l.length>64?l=n(l):l.length<64&&(l=o.concat([l,r],64));for(var i=this._ipad=o.allocUnsafe(64),s=this._opad=o.allocUnsafe(64),h=0;h<64;h++)i[h]=54^l[h],s[h]=92^l[h];this._hash=[i]}f(e,a),e.prototype._update=function(n){this._hash.push(n)},e.prototype._final=function(){var n=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,n]))},b.exports=e},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(t,b,g){g.randomBytes=g.rng=g.pseudoRandomBytes=g.prng=t("randombytes"),g.createHash=g.Hash=t("create-hash"),g.createHmac=g.Hmac=t("create-hmac");var f=t("browserify-sign/algos"),o=Object.keys(f),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);g.getHashes=function(){return a};var r=t("pbkdf2");g.pbkdf2=r.pbkdf2,g.pbkdf2Sync=r.pbkdf2Sync;var e=t("browserify-cipher");g.Cipher=e.Cipher,g.createCipher=e.createCipher,g.Cipheriv=e.Cipheriv,g.createCipheriv=e.createCipheriv,g.Decipher=e.Decipher,g.createDecipher=e.createDecipher,g.Decipheriv=e.Decipheriv,g.createDecipheriv=e.createDecipheriv,g.getCiphers=e.getCiphers,g.listCiphers=e.listCiphers;var n=t("diffie-hellman");g.DiffieHellmanGroup=n.DiffieHellmanGroup,g.createDiffieHellmanGroup=n.createDiffieHellmanGroup,g.getDiffieHellman=n.getDiffieHellman,g.createDiffieHellman=n.createDiffieHellman,g.DiffieHellman=n.DiffieHellman;var l=t("browserify-sign");g.createSign=l.createSign,g.Sign=l.Sign,g.createVerify=l.createVerify,g.Verify=l.Verify,g.createECDH=t("create-ecdh");var i=t("public-encrypt");g.publicEncrypt=i.publicEncrypt,g.privateEncrypt=i.privateEncrypt,g.publicDecrypt=i.publicDecrypt,g.privateDecrypt=i.privateDecrypt;var s=t("randomfill");g.randomFill=s.randomFill,g.randomFillSync=s.randomFillSync,g.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
|
|
20
|
+
`))},g.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":206,"browserify-sign":213,"browserify-sign/algos":210,"create-ecdh":384,"create-hash":386,"create-hmac":388,"diffie-hellman":400,pbkdf2:460,"public-encrypt":468,randombytes:475,randomfill:476}],391:[function(t,b,g){(function(f,o){typeof g=="object"&&b!==void 0?b.exports=o():(f=typeof globalThis<"u"?globalThis:f||self).dayjs=o()})(void 0,function(){var f=6e4,o=36e5,a="millisecond",r="second",e="minute",n="hour",l="day",i="week",s="month",h="quarter",d="year",c="date",p="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var v=["th","st","nd","rd"],w=y%100;return"["+y+(v[(w-20)%10]||v[w]||v[0])+"]"}},M=function(y,v,w){var _=String(y);return!_||_.length>=v?y:""+Array(v+1-_.length).join(w)+y},P={s:M,z:function(y){var v=-y.utcOffset(),w=Math.abs(v),_=Math.floor(w/60),A=w%60;return(v<=0?"+":"-")+M(_,2,"0")+":"+M(A,2,"0")},m:function y(v,w){if(v.date()<w.date())return-y(w,v);var _=12*(w.year()-v.year())+(w.month()-v.month()),A=v.clone().add(_,s),j=w-A<0,L=v.clone().add(_+(j?-1:1),s);return+(-(_+(w-A)/(j?A-L:L-A))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:s,y:d,w:i,d:l,D:c,h:n,m:e,s:r,ms:a,Q:h}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},$="en",N={};N[$]=C;var B="$isDayjsObject",D=function(y){return y instanceof O||!(!y||!y[B])},U=function y(v,w,_){var A;if(!v)return $;if(typeof v=="string"){var j=v.toLowerCase();N[j]&&(A=j),w&&(N[j]=w,A=j);var L=v.split("-");if(!A&&L.length>1)return y(L[0])}else{var H=v.name;N[H]=v,A=H}return!_&&A&&($=A),A||!_&&$},z=function(y,v){if(D(y))return y.clone();var w=typeof v=="object"?v:{};return w.date=y,w.args=arguments,new O(w)},E=P;E.l=U,E.i=D,E.w=function(y,v){return z(y,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var O=function(){function y(w){this.$L=U(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[B]=!0}var v=y.prototype;return v.parse=function(w){this.$d=function(_){var A=_.date,j=_.utc;if(A===null)return new Date(NaN);if(E.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var L=A.match(m);if(L){var H=L[2]-1||0,q=(L[7]||"0").substring(0,3);return j?new Date(Date.UTC(L[1],H,L[3]||1,L[4]||0,L[5]||0,L[6]||0,q)):new Date(L[1],H,L[3]||1,L[4]||0,L[5]||0,L[6]||0,q)}}return new Date(A)}(w),this.init()},v.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==p},v.isSame=function(w,_){var A=z(w);return this.startOf(_)<=A&&A<=this.endOf(_)},v.isAfter=function(w,_){return z(w)<this.startOf(_)},v.isBefore=function(w,_){return this.endOf(_)<z(w)},v.$g=function(w,_,A){return E.u(w)?this[_]:this.set(A,w)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(w,_){var A=this,j=!!E.u(_)||_,L=E.p(w),H=function(K,Z){var Y=E.w(A.$u?Date.UTC(A.$y,Z,K):new Date(A.$y,Z,K),A);return j?Y:Y.endOf(l)},q=function(K,Z){return E.w(A.toDate()[K].apply(A.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Z)),A)},X=this.$W,F=this.$M,W=this.$D,I="set"+(this.$u?"UTC":"");switch(L){case d:return j?H(1,0):H(31,11);case s:return j?H(1,F):H(0,F+1);case i:var R=this.$locale().weekStart||0,V=(X<R?X+7:X)-R;return H(j?W-V:W+(6-V),F);case l:case c:return q(I+"Hours",0);case n:return q(I+"Minutes",1);case e:return q(I+"Seconds",2);case r:return q(I+"Milliseconds",3);default:return this.clone()}},v.endOf=function(w){return this.startOf(w,!1)},v.$set=function(w,_){var A,j=E.p(w),L="set"+(this.$u?"UTC":""),H=(A={},A[l]=L+"Date",A[c]=L+"Date",A[s]=L+"Month",A[d]=L+"FullYear",A[n]=L+"Hours",A[e]=L+"Minutes",A[r]=L+"Seconds",A[a]=L+"Milliseconds",A)[j],q=j===l?this.$D+(_-this.$W):_;if(j===s||j===d){var X=this.clone().set(c,1);X.$d[H](q),X.init(),this.$d=X.set(c,Math.min(this.$D,X.daysInMonth())).$d}else H&&this.$d[H](q);return this.init(),this},v.set=function(w,_){return this.clone().$set(w,_)},v.get=function(w){return this[E.p(w)]()},v.add=function(w,_){var A,j=this;w=Number(w);var L=E.p(_),H=function(F){var W=z(j);return E.w(W.date(W.date()+Math.round(F*w)),j)};if(L===s)return this.set(s,this.$M+w);if(L===d)return this.set(d,this.$y+w);if(L===l)return H(1);if(L===i)return H(7);var q=(A={},A[e]=f,A[n]=o,A[r]=1e3,A)[L]||1,X=this.$d.getTime()+w*q;return E.w(X,this)},v.subtract=function(w,_){return this.add(-1*w,_)},v.format=function(w){var _=this,A=this.$locale();if(!this.isValid())return A.invalidDate||p;var j=w||"YYYY-MM-DDTHH:mm:ssZ",L=E.z(this),H=this.$H,q=this.$m,X=this.$M,F=A.weekdays,W=A.months,I=A.meridiem,R=function(Z,Y,J,nt){return Z&&(Z[Y]||Z(_,j))||J[Y].slice(0,nt)},V=function(Z){return E.s(H%12||12,Z,"0")},K=I||function(Z,Y,J){var nt=Z<12?"AM":"PM";return J?nt.toLowerCase():nt};return j.replace(S,function(Z,Y){return Y||function(J){switch(J){case"YY":return String(_.$y).slice(-2);case"YYYY":return E.s(_.$y,4,"0");case"M":return X+1;case"MM":return E.s(X+1,2,"0");case"MMM":return R(A.monthsShort,X,W,3);case"MMMM":return R(W,X);case"D":return _.$D;case"DD":return E.s(_.$D,2,"0");case"d":return String(_.$W);case"dd":return R(A.weekdaysMin,_.$W,F,2);case"ddd":return R(A.weekdaysShort,_.$W,F,3);case"dddd":return F[_.$W];case"H":return String(H);case"HH":return E.s(H,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return K(H,q,!0);case"A":return K(H,q,!1);case"m":return String(q);case"mm":return E.s(q,2,"0");case"s":return String(_.$s);case"ss":return E.s(_.$s,2,"0");case"SSS":return E.s(_.$ms,3,"0");case"Z":return L}return null}(Z)||L.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(w,_,A){var j,L=this,H=E.p(_),q=z(w),X=(q.utcOffset()-this.utcOffset())*f,F=this-q,W=function(){return E.m(L,q)};switch(H){case d:j=W()/12;break;case s:j=W();break;case h:j=W()/3;break;case i:j=(F-X)/6048e5;break;case l:j=(F-X)/864e5;break;case n:j=F/o;break;case e:j=F/f;break;case r:j=F/1e3;break;default:j=F}return A?j:E.a(j)},v.daysInMonth=function(){return this.endOf(s).$D},v.$locale=function(){return N[this.$L]},v.locale=function(w,_){if(!w)return this.$L;var A=this.clone(),j=U(w,_,!0);return j&&(A.$L=j),A},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},y}(),x=O.prototype;return z.prototype=x,[["$ms",a],["$s",r],["$m",e],["$H",n],["$W",l],["$M",s],["$y",d],["$D",c]].forEach(function(y){x[y[1]]=function(v){return this.$g(v,y[0],y[1])}}),z.extend=function(y,v){return y.$i||(y(v,O,z),y.$i=!0),z},z.locale=U,z.isDayjs=D,z.unix=function(y){return z(1e3*y)},z.en=N[$],z.Ls=N,z.p={},z})},{}],392:[function(t,b,g){(function(f,o){typeof g=="object"&&b!==void 0?b.exports=o():(f=typeof globalThis<"u"?globalThis:f||self).dayjs_plugin_customParseFormat=o()})(void 0,function(){var f={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,r=/\d\d?/,e=/\d*[^-_:/,()\s\d]+/,n={},l=function(m){return(m=+m)+(m>68?1900:2e3)},i=function(m){return function(S){this[m]=+S}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var C=S.match(/([+-]|\d\d)/g),M=60*C[1]+(+C[2]||0);return M===0?0:C[0]==="+"?-M:M}(m)}],h=function(m){var S=n[m];return S&&(S.indexOf?S:S.s.concat(S.f))},d=function(m,S){var C,M=n.meridiem;if(M){for(var P=1;P<=24;P+=1)if(m.indexOf(M(P,0,S))>-1){C=P>12;break}}else C=m===(S?"pm":"PM");return C},c={A:[e,function(m){this.afternoon=d(m,!1)}],a:[e,function(m){this.afternoon=d(m,!0)}],S:[/\d/,function(m){this.milliseconds=100*+m}],SS:[a,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[r,i("seconds")],ss:[r,i("seconds")],m:[r,i("minutes")],mm:[r,i("minutes")],H:[r,i("hours")],h:[r,i("hours")],HH:[r,i("hours")],hh:[r,i("hours")],D:[r,i("day")],DD:[a,i("day")],Do:[e,function(m){var S=n.ordinal,C=m.match(/\d+/);if(this.day=C[0],S)for(var M=1;M<=31;M+=1)S(M).replace(/\[|\]/g,"")===m&&(this.day=M)}],M:[r,i("month")],MM:[a,i("month")],MMM:[e,function(m){var S=h("months"),C=(h("monthsShort")||S.map(function(M){return M.slice(0,3)})).indexOf(m)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[e,function(m){var S=h("months").indexOf(m)+1;if(S<1)throw new Error;this.month=S%12||S}],Y:[/[+-]?\d+/,i("year")],YY:[a,function(m){this.year=l(m)}],YYYY:[/\d{4}/,i("year")],Z:s,ZZ:s};function p(m){var S,C;S=m,C=n&&n.formats;for(var M=(m=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(z,E,O){var x=O&&O.toUpperCase();return E||C[O]||f[O]||C[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,v,w){return v||w.slice(1)})})).match(o),P=M.length,$=0;$<P;$+=1){var N=M[$],B=c[N],D=B&&B[0],U=B&&B[1];M[$]=U?{regex:D,parser:U}:N.replace(/^\[|\]$/g,"")}return function(z){for(var E={},O=0,x=0;O<P;O+=1){var y=M[O];if(typeof y=="string")x+=y.length;else{var v=y.regex,w=y.parser,_=z.slice(x),A=v.exec(_)[0];w.call(E,A),z=z.replace(A,"")}}return function(j){var L=j.afternoon;if(L!==void 0){var H=j.hours;L?H<12&&(j.hours+=12):H===12&&(j.hours=0),delete j.afternoon}}(E),E}}return function(m,S,C){C.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(l=m.parseTwoDigitYear);var M=S.prototype,P=M.parse;M.parse=function($){var N=$.date,B=$.utc,D=$.args;this.$u=B;var U=D[1];if(typeof U=="string"){var z=D[2]===!0,E=D[3]===!0,O=z||E,x=D[2];E&&(x=D[2]),n=this.$locale(),!z&&x&&(n=C.Ls[x]),this.$d=function(_,A,j){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*_);var L=p(A)(_),H=L.year,q=L.month,X=L.day,F=L.hours,W=L.minutes,I=L.seconds,R=L.milliseconds,V=L.zone,K=new Date,Z=X||(H||q?1:K.getDate()),Y=H||K.getFullYear(),J=0;H&&!q||(J=q>0?q-1:K.getMonth());var nt=F||0,it=W||0,G=I||0,tt=R||0;return V?new Date(Date.UTC(Y,J,Z,nt,it,G,tt+60*V.offset*1e3)):j?new Date(Date.UTC(Y,J,Z,nt,it,G,tt)):new Date(Y,J,Z,nt,it,G,tt)}catch{return new Date("")}}(N,U,B),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),O&&N!=this.format(U)&&(this.$d=new Date("")),n={}}else if(U instanceof Array)for(var y=U.length,v=1;v<=y;v+=1){D[1]=U[v-1];var w=C.apply(this,D);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}v===y&&(this.$d=new Date(""))}else P.call(this,$)}}})},{}],393:[function(t,b,g){(function(f,o){typeof g=="object"&&b!==void 0?b.exports=o():(f=typeof globalThis<"u"?globalThis:f||self).dayjs_plugin_utc=o()})(void 0,function(){var f="minute",o=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(r,e,n){var l=e.prototype;n.utc=function(m){var S={date:m,utc:!0,args:arguments};return new e(S)},l.utc=function(m){var S=n(this.toDate(),{locale:this.$L,utc:!0});return m?S.add(this.utcOffset(),f):S},l.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var i=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),i.call(this,m)};var s=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else s.call(this)};var h=l.utcOffset;l.utcOffset=function(m,S){var C=this.$utils().u;if(C(m))return this.$u?0:C(this.$offset)?h.call(this):this.$offset;if(typeof m=="string"&&(m=function(N){N===void 0&&(N="");var B=N.match(o);if(!B)return null;var D=(""+B[0]).match(a)||["-",0,0],U=D[0],z=60*+D[1]+ +D[2];return z===0?0:U==="+"?z:-z}(m))===null)return this;var M=Math.abs(m)<=16?60*m:m,P=this;if(S)return P.$offset=M,P.$u=m===0,P;if(m!==0){var $=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(P=this.local().add(M+$,f)).$offset=M,P.$x.$localOffset=$}else P=this.utc();return P};var d=l.format;l.format=function(m){var S=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,S)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var c=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var p=l.diff;l.diff=function(m,S,C){if(m&&this.$u===m.$u)return p.call(this,m,S,C);var M=this.local(),P=n(m).local();return p.call(M,P,S,C)}}})},{}],394:[function(t,b,g){g.utils=t("./des/utils"),g.Cipher=t("./des/cipher"),g.DES=t("./des/des"),g.CBC=t("./des/cbc"),g.EDE=t("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(t,b,g){var f=t("minimalistic-assert"),o=t("inherits"),a={};function r(e){f.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var n=0;n<this.iv.length;n++)this.iv[n]=e[n]}g.instantiate=function(e){function n(h){e.call(this,h),this._cbcInit()}o(n,e);for(var l=Object.keys(a),i=0;i<l.length;i++){var s=l[i];n.prototype[s]=a[s]}return n.create=function(h){return new n(h)},n},a._cbcInit=function(){var e=new r(this.options.iv);this._cbcState=e},a._update=function(e,n,l,i){var s=this._cbcState,h=this.constructor.super_.prototype,d=s.iv;if(this.type==="encrypt"){for(var c=0;c<this.blockSize;c++)d[c]^=e[n+c];for(h._update.call(this,d,0,l,i),c=0;c<this.blockSize;c++)d[c]=l[i+c]}else{for(h._update.call(this,e,n,l,i),c=0;c<this.blockSize;c++)l[i+c]^=d[c];for(c=0;c<this.blockSize;c++)d[c]=e[n+c]}}},{inherits:440,"minimalistic-assert":453}],396:[function(t,b,g){var f=t("minimalistic-assert");function o(a){this.options=a,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=a.padding!==!1}b.exports=o,o.prototype._init=function(){},o.prototype.update=function(a){return a.length===0?[]:this.type==="decrypt"?this._updateDecrypt(a):this._updateEncrypt(a)},o.prototype._buffer=function(a,r){for(var e=Math.min(this.buffer.length-this.bufferOff,a.length-r),n=0;n<e;n++)this.buffer[this.bufferOff+n]=a[r+n];return this.bufferOff+=e,e},o.prototype._flushBuffer=function(a,r){return this._update(this.buffer,0,a,r),this.bufferOff=0,this.blockSize},o.prototype._updateEncrypt=function(a){var r=0,e=0,n=(this.bufferOff+a.length)/this.blockSize|0,l=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(a,r),this.bufferOff===this.buffer.length&&(e+=this._flushBuffer(l,e)));for(var i=a.length-(a.length-r)%this.blockSize;r<i;r+=this.blockSize)this._update(a,r,l,e),e+=this.blockSize;for(;r<a.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=a[r];return l},o.prototype._updateDecrypt=function(a){for(var r=0,e=0,n=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,l=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(a,r),e+=this._flushBuffer(l,e);return r+=this._buffer(a,r),l},o.prototype.final=function(a){var r,e;return a&&(r=this.update(a)),e=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),r?r.concat(e):e},o.prototype._pad=function(a,r){if(r===0)return!1;for(;r<a.length;)a[r++]=0;return!0},o.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},o.prototype._unpad=function(a){return a},o.prototype._finalDecrypt=function(){f.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)}},{"minimalistic-assert":453}],397:[function(t,b,g){var f=t("minimalistic-assert"),o=t("inherits"),a=t("./utils"),r=t("./cipher");function e(){this.tmp=new Array(2),this.keys=null}function n(i){r.call(this,i);var s=new e;this._desState=s,this.deriveKeys(s,i.key)}o(n,r),b.exports=n,n.create=function(i){return new n(i)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];n.prototype.deriveKeys=function(i,s){i.keys=new Array(32),f.equal(s.length,this.blockSize,"Invalid key length");var h=a.readUInt32BE(s,0),d=a.readUInt32BE(s,4);a.pc1(h,d,i.tmp,0),h=i.tmp[0],d=i.tmp[1];for(var c=0;c<i.keys.length;c+=2){var p=l[c>>>1];h=a.r28shl(h,p),d=a.r28shl(d,p),a.pc2(h,d,i.keys,c)}},n.prototype._update=function(i,s,h,d){var c=this._desState,p=a.readUInt32BE(i,s),m=a.readUInt32BE(i,s+4);a.ip(p,m,c.tmp,0),p=c.tmp[0],m=c.tmp[1],this.type==="encrypt"?this._encrypt(c,p,m,c.tmp,0):this._decrypt(c,p,m,c.tmp,0),p=c.tmp[0],m=c.tmp[1],a.writeUInt32BE(h,p,d),a.writeUInt32BE(h,m,d+4)},n.prototype._pad=function(i,s){if(this.padding===!1)return!1;for(var h=i.length-s,d=s;d<i.length;d++)i[d]=h;return!0},n.prototype._unpad=function(i){if(this.padding===!1)return i;for(var s=i[i.length-1],h=i.length-s;h<i.length;h++)f.equal(i[h],s);return i.slice(0,i.length-s)},n.prototype._encrypt=function(i,s,h,d,c){for(var p=s,m=h,S=0;S<i.keys.length;S+=2){var C=i.keys[S],M=i.keys[S+1];a.expand(m,i.tmp,0),C^=i.tmp[0],M^=i.tmp[1];var P=a.substitute(C,M),$=m;m=(p^a.permute(P))>>>0,p=$}a.rip(m,p,d,c)},n.prototype._decrypt=function(i,s,h,d,c){for(var p=h,m=s,S=i.keys.length-2;S>=0;S-=2){var C=i.keys[S],M=i.keys[S+1];a.expand(p,i.tmp,0),C^=i.tmp[0],M^=i.tmp[1];var P=a.substitute(C,M),$=p;p=(m^a.permute(P))>>>0,m=$}a.rip(p,m,d,c)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(t,b,g){var f=t("minimalistic-assert"),o=t("inherits"),a=t("./cipher"),r=t("./des");function e(l,i){f.equal(i.length,24,"Invalid key length");var s=i.slice(0,8),h=i.slice(8,16),d=i.slice(16,24);this.ciphers=l==="encrypt"?[r.create({type:"encrypt",key:s}),r.create({type:"decrypt",key:h}),r.create({type:"encrypt",key:d})]:[r.create({type:"decrypt",key:d}),r.create({type:"encrypt",key:h}),r.create({type:"decrypt",key:s})]}function n(l){a.call(this,l);var i=new e(this.type,this.options.key);this._edeState=i}o(n,a),b.exports=n,n.create=function(l){return new n(l)},n.prototype._update=function(l,i,s,h){var d=this._edeState;d.ciphers[0]._update(l,i,s,h),d.ciphers[1]._update(s,h,s,h),d.ciphers[2]._update(s,h,s,h)},n.prototype._pad=r.prototype._pad,n.prototype._unpad=r.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(t,b,g){g.readUInt32BE=function(r,e){return(r[0+e]<<24|r[1+e]<<16|r[2+e]<<8|r[3+e])>>>0},g.writeUInt32BE=function(r,e,n){r[0+n]=e>>>24,r[1+n]=e>>>16&255,r[2+n]=e>>>8&255,r[3+n]=255&e},g.ip=function(r,e,n,l){for(var i=0,s=0,h=6;h>=0;h-=2){for(var d=0;d<=24;d+=8)i<<=1,i|=e>>>d+h&1;for(d=0;d<=24;d+=8)i<<=1,i|=r>>>d+h&1}for(h=6;h>=0;h-=2){for(d=1;d<=25;d+=8)s<<=1,s|=e>>>d+h&1;for(d=1;d<=25;d+=8)s<<=1,s|=r>>>d+h&1}n[l+0]=i>>>0,n[l+1]=s>>>0},g.rip=function(r,e,n,l){for(var i=0,s=0,h=0;h<4;h++)for(var d=24;d>=0;d-=8)i<<=1,i|=e>>>d+h&1,i<<=1,i|=r>>>d+h&1;for(h=4;h<8;h++)for(d=24;d>=0;d-=8)s<<=1,s|=e>>>d+h&1,s<<=1,s|=r>>>d+h&1;n[l+0]=i>>>0,n[l+1]=s>>>0},g.pc1=function(r,e,n,l){for(var i=0,s=0,h=7;h>=5;h--){for(var d=0;d<=24;d+=8)i<<=1,i|=e>>d+h&1;for(d=0;d<=24;d+=8)i<<=1,i|=r>>d+h&1}for(d=0;d<=24;d+=8)i<<=1,i|=e>>d+h&1;for(h=1;h<=3;h++){for(d=0;d<=24;d+=8)s<<=1,s|=e>>d+h&1;for(d=0;d<=24;d+=8)s<<=1,s|=r>>d+h&1}for(d=0;d<=24;d+=8)s<<=1,s|=r>>d+h&1;n[l+0]=i>>>0,n[l+1]=s>>>0},g.r28shl=function(r,e){return r<<e&268435455|r>>>28-e};var f=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];g.pc2=function(r,e,n,l){for(var i=0,s=0,h=f.length>>>1,d=0;d<h;d++)i<<=1,i|=r>>>f[d]&1;for(d=h;d<f.length;d++)s<<=1,s|=e>>>f[d]&1;n[l+0]=i>>>0,n[l+1]=s>>>0},g.expand=function(r,e,n){var l=0,i=0;l=(1&r)<<5|r>>>27;for(var s=23;s>=15;s-=4)l<<=6,l|=r>>>s&63;for(s=11;s>=3;s-=4)i|=r>>>s&63,i<<=6;i|=(31&r)<<1|r>>>31,e[n+0]=l>>>0,e[n+1]=i>>>0};var o=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];g.substitute=function(r,e){for(var n=0,l=0;l<4;l++)n<<=4,n|=o[64*l+(r>>>18-6*l&63)];for(l=0;l<4;l++)n<<=4,n|=o[256+64*l+(e>>>18-6*l&63)];return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];g.permute=function(r){for(var e=0,n=0;n<a.length;n++)e<<=1,e|=r>>>a[n]&1;return e>>>0},g.padSplit=function(r,e,n){for(var l=r.toString(2);l.length<e;)l="0"+l;for(var i=[],s=0;s<e;s+=n)i.push(l.slice(s,s+n));return i.join(" ")}},{}],400:[function(t,b,g){(function(f){(function(){var o=t("./lib/generatePrime"),a=t("./lib/primes.json"),r=t("./lib/dh"),e={binary:!0,hex:!0,base64:!0};g.DiffieHellmanGroup=g.createDiffieHellmanGroup=g.getDiffieHellman=function(n){var l=new f(a[n].prime,"hex"),i=new f(a[n].gen,"hex");return new r(l,i)},g.createDiffieHellman=g.DiffieHellman=function n(l,i,s,h){return f.isBuffer(i)||e[i]===void 0?n(l,"binary",i,s):(i=i||"binary",h=h||"binary",s=s||new f([2]),f.isBuffer(s)||(s=new f(s,h)),typeof l=="number"?new r(o(l,s),s,!0):(f.isBuffer(l)||(l=new f(l,i)),new r(l,s,!0)))}}).call(this)}).call(this,t("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(t,b,g){(function(f){(function(){var o=t("bn.js"),a=new(t("miller-rabin")),r=new o(24),e=new o(11),n=new o(10),l=new o(3),i=new o(7),s=t("./generatePrime"),h=t("randombytes");function d(C,M){return M=M||"utf8",f.isBuffer(C)||(C=new f(C,M)),this._pub=new o(C),this}function c(C,M){return M=M||"utf8",f.isBuffer(C)||(C=new f(C,M)),this._priv=new o(C),this}b.exports=m;var p={};function m(C,M,P){this.setGenerator(M),this.__prime=new o(C),this._prime=o.mont(this.__prime),this._primeLen=C.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,P?(this.setPublicKey=d,this.setPrivateKey=c):this._primeCode=8}function S(C,M){var P=new f(C.toArray());return M?P.toString(M):P}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=function(C,M){var P=M.toString("hex"),$=[P,C.toString(16)].join("_");if($ in p)return p[$];var N,B=0;if(C.isEven()||!s.simpleSieve||!s.fermatTest(C)||!a.test(C))return B+=1,B+=P==="02"||P==="05"?8:4,p[$]=B,B;switch(a.test(C.shrn(1))||(B+=2),P){case"02":C.mod(r).cmp(e)&&(B+=8);break;case"05":(N=C.mod(n)).cmp(l)&&N.cmp(i)&&(B+=8);break;default:B+=4}return p[$]=B,B}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new o(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(C){var M=(C=(C=new o(C)).toRed(this._prime)).redPow(this._priv).fromRed(),P=new f(M.toArray()),$=this.getPrime();if(P.length<$.length){var N=new f($.length-P.length);N.fill(0),P=f.concat([N,P])}return P},m.prototype.getPublicKey=function(C){return S(this._pub,C)},m.prototype.getPrivateKey=function(C){return S(this._priv,C)},m.prototype.getPrime=function(C){return S(this.__prime,C)},m.prototype.getGenerator=function(C){return S(this._gen,C)},m.prototype.setGenerator=function(C,M){return M=M||"utf8",f.isBuffer(C)||(C=new f(C,M)),this.__gen=C,this._gen=new o(C),this}}).call(this)}).call(this,t("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(t,b,g){var f=t("randombytes");b.exports=C,C.simpleSieve=m,C.fermatTest=S;var o=t("bn.js"),a=new o(24),r=new(t("miller-rabin")),e=new o(1),n=new o(2),l=new o(5),i=(new o(16),new o(8),new o(10)),s=new o(3),h=(new o(7),new o(11)),d=new o(4),c=(new o(12),null);function p(){if(c!==null)return c;var M=[];M[0]=2;for(var P=1,$=3;$<1048576;$+=2){for(var N=Math.ceil(Math.sqrt($)),B=0;B<P&&M[B]<=N&&$%M[B]!=0;B++);P!==B&&M[B]<=N||(M[P++]=$)}return c=M,M}function m(M){for(var P=p(),$=0;$<P.length;$++)if(M.modn(P[$])===0)return M.cmpn(P[$])===0;return!0}function S(M){var P=o.mont(M);return n.toRed(P).redPow(M.subn(1)).fromRed().cmpn(1)===0}function C(M,P){if(M<16)return new o(P===2||P===5?[140,123]:[140,39]);var $,N;for(P=new o(P);;){for($=new o(f(Math.ceil(M/8)));$.bitLength()>M;)$.ishrn(1);if($.isEven()&&$.iadd(e),$.testn(1)||$.iadd(n),P.cmp(n)){if(!P.cmp(l))for(;$.mod(i).cmp(s);)$.iadd(d)}else for(;$.mod(a).cmp(h);)$.iadd(d);if(m(N=$.shrn(1))&&m($)&&S(N)&&S($)&&r.test(N)&&r.test($))return $}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(t,b,g){b.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],404:[function(t,b,g){arguments[4][184][0].apply(g,arguments)},{buffer:188,dup:184}],405:[function(t,b,g){var f=g;f.version=t("../package.json").version,f.utils=t("./elliptic/utils"),f.rand=t("brorand"),f.curve=t("./elliptic/curve"),f.curves=t("./elliptic/curves"),f.ec=t("./elliptic/ec"),f.eddsa=t("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(t,b,g){var f=t("bn.js"),o=t("../utils"),a=o.getNAF,r=o.getJSF,e=o.assert;function n(i,s){this.type=i,this.p=new f(s.p,16),this.red=s.prime?f.red(s.prime):f.mont(this.p),this.zero=new f(0).toRed(this.red),this.one=new f(1).toRed(this.red),this.two=new f(2).toRed(this.red),this.n=s.n&&new f(s.n,16),this.g=s.g&&this.pointFromJSON(s.g,s.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var h=this.n&&this.p.div(this.n);!h||h.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(i,s){this.curve=i,this.type=s,this.precomputed=null}b.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(i,s){e(i.precomputed);var h=i._getDoubles(),d=a(s,1,this._bitLength),c=(1<<h.step+1)-(h.step%2==0?2:1);c/=3;var p,m,S=[];for(p=0;p<d.length;p+=h.step){m=0;for(var C=p+h.step-1;C>=p;C--)m=(m<<1)+d[C];S.push(m)}for(var M=this.jpoint(null,null,null),P=this.jpoint(null,null,null),$=c;$>0;$--){for(p=0;p<S.length;p++)(m=S[p])===$?P=P.mixedAdd(h.points[p]):m===-$&&(P=P.mixedAdd(h.points[p].neg()));M=M.add(P)}return M.toP()},n.prototype._wnafMul=function(i,s){var h=4,d=i._getNAFPoints(h);h=d.wnd;for(var c=d.points,p=a(s,h,this._bitLength),m=this.jpoint(null,null,null),S=p.length-1;S>=0;S--){for(var C=0;S>=0&&p[S]===0;S--)C++;if(S>=0&&C++,m=m.dblp(C),S<0)break;var M=p[S];e(M!==0),m=i.type==="affine"?M>0?m.mixedAdd(c[M-1>>1]):m.mixedAdd(c[-M-1>>1].neg()):M>0?m.add(c[M-1>>1]):m.add(c[-M-1>>1].neg())}return i.type==="affine"?m.toP():m},n.prototype._wnafMulAdd=function(i,s,h,d,c){var p,m,S,C=this._wnafT1,M=this._wnafT2,P=this._wnafT3,$=0;for(p=0;p<d;p++){var N=(S=s[p])._getNAFPoints(i);C[p]=N.wnd,M[p]=N.points}for(p=d-1;p>=1;p-=2){var B=p-1,D=p;if(C[B]===1&&C[D]===1){var U=[s[B],null,null,s[D]];s[B].y.cmp(s[D].y)===0?(U[1]=s[B].add(s[D]),U[2]=s[B].toJ().mixedAdd(s[D].neg())):s[B].y.cmp(s[D].y.redNeg())===0?(U[1]=s[B].toJ().mixedAdd(s[D]),U[2]=s[B].add(s[D].neg())):(U[1]=s[B].toJ().mixedAdd(s[D]),U[2]=s[B].toJ().mixedAdd(s[D].neg()));var z=[-3,-1,-5,-7,0,7,5,1,3],E=r(h[B],h[D]);for($=Math.max(E[0].length,$),P[B]=new Array($),P[D]=new Array($),m=0;m<$;m++){var O=0|E[0][m],x=0|E[1][m];P[B][m]=z[3*(O+1)+(x+1)],P[D][m]=0,M[B]=U}}else P[B]=a(h[B],C[B],this._bitLength),P[D]=a(h[D],C[D],this._bitLength),$=Math.max(P[B].length,$),$=Math.max(P[D].length,$)}var y=this.jpoint(null,null,null),v=this._wnafT4;for(p=$;p>=0;p--){for(var w=0;p>=0;){var _=!0;for(m=0;m<d;m++)v[m]=0|P[m][p],v[m]!==0&&(_=!1);if(!_)break;w++,p--}if(p>=0&&w++,y=y.dblp(w),p<0)break;for(m=0;m<d;m++){var A=v[m];A!==0&&(A>0?S=M[m][A-1>>1]:A<0&&(S=M[m][-A-1>>1].neg()),y=S.type==="affine"?y.mixedAdd(S):y.add(S))}}for(p=0;p<d;p++)M[p]=null;return c?y:y.toP()},n.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},n.prototype.decodePoint=function(i,s){i=o.toArray(i,s);var h=this.p.byteLength();if((i[0]===4||i[0]===6||i[0]===7)&&i.length-1==2*h)return i[0]===6?e(i[i.length-1]%2==0):i[0]===7&&e(i[i.length-1]%2==1),this.point(i.slice(1,1+h),i.slice(1+h,1+2*h));if((i[0]===2||i[0]===3)&&i.length-1===h)return this.pointFromX(i.slice(1,1+h),i[0]===3);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(i){return this.encode(i,!0)},l.prototype._encode=function(i){var s=this.curve.p.byteLength(),h=this.getX().toArray("be",s);return i?[this.getY().isEven()?2:3].concat(h):[4].concat(h,this.getY().toArray("be",s))},l.prototype.encode=function(i,s){return o.encode(this._encode(s),i)},l.prototype.precompute=function(i){if(this.precomputed)return this;var s={doubles:null,naf:null,beta:null};return s.naf=this._getNAFPoints(8),s.doubles=this._getDoubles(4,i),s.beta=this._getBeta(),this.precomputed=s,this},l.prototype._hasDoubles=function(i){if(!this.precomputed)return!1;var s=this.precomputed.doubles;return!!s&&s.points.length>=Math.ceil((i.bitLength()+1)/s.step)},l.prototype._getDoubles=function(i,s){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var h=[this],d=this,c=0;c<s;c+=i){for(var p=0;p<i;p++)d=d.dbl();h.push(d)}return{step:i,points:h}},l.prototype._getNAFPoints=function(i){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var s=[this],h=(1<<i)-1,d=h===1?null:this.dbl(),c=1;c<h;c++)s[c]=s[c-1].add(d);return{wnd:i,points:s}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(i){for(var s=this,h=0;h<i;h++)s=s.dbl();return s}},{"../utils":419,"bn.js":420}],407:[function(t,b,g){var f=t("../utils"),o=t("bn.js"),a=t("inherits"),r=t("./base"),e=f.assert;function n(i){this.twisted=(0|i.a)!=1,this.mOneA=this.twisted&&(0|i.a)==-1,this.extended=this.mOneA,r.call(this,"edwards",i),this.a=new o(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),e(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|i.c)==1}function l(i,s,h,d,c){r.BasePoint.call(this,i,"projective"),s===null&&h===null&&d===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(s,16),this.y=new o(h,16),this.z=d?new o(d,16):this.curve.one,this.t=c&&new o(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(n,r),b.exports=n,n.prototype._mulA=function(i){return this.mOneA?i.redNeg():this.a.redMul(i)},n.prototype._mulC=function(i){return this.oneC?i:this.c.redMul(i)},n.prototype.jpoint=function(i,s,h,d){return this.point(i,s,h,d)},n.prototype.pointFromX=function(i,s){(i=new o(i,16)).red||(i=i.toRed(this.red));var h=i.redSqr(),d=this.c2.redSub(this.a.redMul(h)),c=this.one.redSub(this.c2.redMul(this.d).redMul(h)),p=d.redMul(c.redInvm()),m=p.redSqrt();if(m.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");var S=m.fromRed().isOdd();return(s&&!S||!s&&S)&&(m=m.redNeg()),this.point(i,m)},n.prototype.pointFromY=function(i,s){(i=new o(i,16)).red||(i=i.toRed(this.red));var h=i.redSqr(),d=h.redSub(this.c2),c=h.redMul(this.d).redMul(this.c2).redSub(this.a),p=d.redMul(c.redInvm());if(p.cmp(this.zero)===0){if(s)throw new Error("invalid point");return this.point(this.zero,i)}var m=p.redSqrt();if(m.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");return m.fromRed().isOdd()!==s&&(m=m.redNeg()),this.point(m,i)},n.prototype.validate=function(i){if(i.isInfinity())return!0;i.normalize();var s=i.x.redSqr(),h=i.y.redSqr(),d=s.redMul(this.a).redAdd(h),c=this.c2.redMul(this.one.redAdd(this.d.redMul(s).redMul(h)));return d.cmp(c)===0},a(l,r.BasePoint),n.prototype.pointFromJSON=function(i){return l.fromJSON(this,i)},n.prototype.point=function(i,s,h,d){return new l(this,i,s,h,d)},l.fromJSON=function(i,s){return new l(i,s[0],s[1],s[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},l.prototype._extDbl=function(){var i=this.x.redSqr(),s=this.y.redSqr(),h=this.z.redSqr();h=h.redIAdd(h);var d=this.curve._mulA(i),c=this.x.redAdd(this.y).redSqr().redISub(i).redISub(s),p=d.redAdd(s),m=p.redSub(h),S=d.redSub(s),C=c.redMul(m),M=p.redMul(S),P=c.redMul(S),$=m.redMul(p);return this.curve.point(C,M,$,P)},l.prototype._projDbl=function(){var i,s,h,d,c,p,m=this.x.redAdd(this.y).redSqr(),S=this.x.redSqr(),C=this.y.redSqr();if(this.curve.twisted){var M=(d=this.curve._mulA(S)).redAdd(C);this.zOne?(i=m.redSub(S).redSub(C).redMul(M.redSub(this.curve.two)),s=M.redMul(d.redSub(C)),h=M.redSqr().redSub(M).redSub(M)):(c=this.z.redSqr(),p=M.redSub(c).redISub(c),i=m.redSub(S).redISub(C).redMul(p),s=M.redMul(d.redSub(C)),h=M.redMul(p))}else d=S.redAdd(C),c=this.curve._mulC(this.z).redSqr(),p=d.redSub(c).redSub(c),i=this.curve._mulC(m.redISub(d)).redMul(p),s=this.curve._mulC(d).redMul(S.redISub(C)),h=d.redMul(p);return this.curve.point(i,s,h)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(i){var s=this.y.redSub(this.x).redMul(i.y.redSub(i.x)),h=this.y.redAdd(this.x).redMul(i.y.redAdd(i.x)),d=this.t.redMul(this.curve.dd).redMul(i.t),c=this.z.redMul(i.z.redAdd(i.z)),p=h.redSub(s),m=c.redSub(d),S=c.redAdd(d),C=h.redAdd(s),M=p.redMul(m),P=S.redMul(C),$=p.redMul(C),N=m.redMul(S);return this.curve.point(M,P,N,$)},l.prototype._projAdd=function(i){var s,h,d=this.z.redMul(i.z),c=d.redSqr(),p=this.x.redMul(i.x),m=this.y.redMul(i.y),S=this.curve.d.redMul(p).redMul(m),C=c.redSub(S),M=c.redAdd(S),P=this.x.redAdd(this.y).redMul(i.x.redAdd(i.y)).redISub(p).redISub(m),$=d.redMul(C).redMul(P);return this.curve.twisted?(s=d.redMul(M).redMul(m.redSub(this.curve._mulA(p))),h=C.redMul(M)):(s=d.redMul(M).redMul(m.redSub(p)),h=this.curve._mulC(C).redMul(M)),this.curve.point($,s,h)},l.prototype.add=function(i){return this.isInfinity()?i:i.isInfinity()?this:this.curve.extended?this._extAdd(i):this._projAdd(i)},l.prototype.mul=function(i){return this._hasDoubles(i)?this.curve._fixedNafMul(this,i):this.curve._wnafMul(this,i)},l.prototype.mulAdd=function(i,s,h){return this.curve._wnafMulAdd(1,[this,s],[i,h],2,!1)},l.prototype.jmulAdd=function(i,s,h){return this.curve._wnafMulAdd(1,[this,s],[i,h],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var i=this.z.redInvm();return this.x=this.x.redMul(i),this.y=this.y.redMul(i),this.t&&(this.t=this.t.redMul(i)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(i){return this===i||this.getX().cmp(i.getX())===0&&this.getY().cmp(i.getY())===0},l.prototype.eqXToP=function(i){var s=i.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(s)===0)return!0;for(var h=i.clone(),d=this.curve.redN.redMul(this.z);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(s.redIAdd(d),this.x.cmp(s)===0)return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(t,b,g){var f=g;f.base=t("./base"),f.short=t("./short"),f.mont=t("./mont"),f.edwards=t("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(t,b,g){var f=t("bn.js"),o=t("inherits"),a=t("./base"),r=t("../utils");function e(l){a.call(this,"mont",l),this.a=new f(l.a,16).toRed(this.red),this.b=new f(l.b,16).toRed(this.red),this.i4=new f(4).toRed(this.red).redInvm(),this.two=new f(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function n(l,i,s){a.BasePoint.call(this,l,"projective"),i===null&&s===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new f(i,16),this.z=new f(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(e,a),b.exports=e,e.prototype.validate=function(l){var i=l.normalize().x,s=i.redSqr(),h=s.redMul(i).redAdd(s.redMul(this.a)).redAdd(i);return h.redSqrt().redSqr().cmp(h)===0},o(n,a.BasePoint),e.prototype.decodePoint=function(l,i){return this.point(r.toArray(l,i),1)},e.prototype.point=function(l,i){return new n(this,l,i)},e.prototype.pointFromJSON=function(l){return n.fromJSON(this,l)},n.prototype.precompute=function(){},n.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},n.fromJSON=function(l,i){return new n(l,i[0],i[1]||l.one)},n.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},n.prototype.isInfinity=function(){return this.z.cmpn(0)===0},n.prototype.dbl=function(){var l=this.x.redAdd(this.z).redSqr(),i=this.x.redSub(this.z).redSqr(),s=l.redSub(i),h=l.redMul(i),d=s.redMul(i.redAdd(this.curve.a24.redMul(s)));return this.curve.point(h,d)},n.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.diffAdd=function(l,i){var s=this.x.redAdd(this.z),h=this.x.redSub(this.z),d=l.x.redAdd(l.z),c=l.x.redSub(l.z).redMul(s),p=d.redMul(h),m=i.z.redMul(c.redAdd(p).redSqr()),S=i.x.redMul(c.redISub(p).redSqr());return this.curve.point(m,S)},n.prototype.mul=function(l){for(var i=l.clone(),s=this,h=this.curve.point(null,null),d=[];i.cmpn(0)!==0;i.iushrn(1))d.push(i.andln(1));for(var c=d.length-1;c>=0;c--)d[c]===0?(s=s.diffAdd(h,this),h=h.dbl()):(h=s.diffAdd(h,this),s=s.dbl());return h},n.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},n.prototype.eq=function(l){return this.getX().cmp(l.getX())===0},n.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},n.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(t,b,g){var f=t("../utils"),o=t("bn.js"),a=t("inherits"),r=t("./base"),e=f.assert;function n(s){r.call(this,"short",s),this.a=new o(s.a,16).toRed(this.red),this.b=new o(s.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(s),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(s,h,d,c){r.BasePoint.call(this,s,"affine"),h===null&&d===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(h,16),this.y=new o(d,16),c&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function i(s,h,d,c){r.BasePoint.call(this,s,"jacobian"),h===null&&d===null&&c===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(h,16),this.y=new o(d,16),this.z=new o(c,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}a(n,r),b.exports=n,n.prototype._getEndomorphism=function(s){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var h,d;if(s.beta)h=new o(s.beta,16).toRed(this.red);else{var c=this._getEndoRoots(this.p);h=(h=c[0].cmp(c[1])<0?c[0]:c[1]).toRed(this.red)}if(s.lambda)d=new o(s.lambda,16);else{var p=this._getEndoRoots(this.n);this.g.mul(p[0]).x.cmp(this.g.x.redMul(h))===0?d=p[0]:(d=p[1],e(this.g.mul(d).x.cmp(this.g.x.redMul(h))===0))}return{beta:h,lambda:d,basis:s.basis?s.basis.map(function(m){return{a:new o(m.a,16),b:new o(m.b,16)}}):this._getEndoBasis(d)}}},n.prototype._getEndoRoots=function(s){var h=s===this.p?this.red:o.mont(s),d=new o(2).toRed(h).redInvm(),c=d.redNeg(),p=new o(3).toRed(h).redNeg().redSqrt().redMul(d);return[c.redAdd(p).fromRed(),c.redSub(p).fromRed()]},n.prototype._getEndoBasis=function(s){for(var h,d,c,p,m,S,C,M,P,$=this.n.ushrn(Math.floor(this.n.bitLength()/2)),N=s,B=this.n.clone(),D=new o(1),U=new o(0),z=new o(0),E=new o(1),O=0;N.cmpn(0)!==0;){var x=B.div(N);M=B.sub(x.mul(N)),P=z.sub(x.mul(D));var y=E.sub(x.mul(U));if(!c&&M.cmp($)<0)h=C.neg(),d=D,c=M.neg(),p=P;else if(c&&++O==2)break;C=M,B=N,N=M,z=D,D=P,E=U,U=y}m=M.neg(),S=P;var v=c.sqr().add(p.sqr());return m.sqr().add(S.sqr()).cmp(v)>=0&&(m=h,S=d),c.negative&&(c=c.neg(),p=p.neg()),m.negative&&(m=m.neg(),S=S.neg()),[{a:c,b:p},{a:m,b:S}]},n.prototype._endoSplit=function(s){var h=this.endo.basis,d=h[0],c=h[1],p=c.b.mul(s).divRound(this.n),m=d.b.neg().mul(s).divRound(this.n),S=p.mul(d.a),C=m.mul(c.a),M=p.mul(d.b),P=m.mul(c.b);return{k1:s.sub(S).sub(C),k2:M.add(P).neg()}},n.prototype.pointFromX=function(s,h){(s=new o(s,16)).red||(s=s.toRed(this.red));var d=s.redSqr().redMul(s).redIAdd(s.redMul(this.a)).redIAdd(this.b),c=d.redSqrt();if(c.redSqr().redSub(d).cmp(this.zero)!==0)throw new Error("invalid point");var p=c.fromRed().isOdd();return(h&&!p||!h&&p)&&(c=c.redNeg()),this.point(s,c)},n.prototype.validate=function(s){if(s.inf)return!0;var h=s.x,d=s.y,c=this.a.redMul(h),p=h.redSqr().redMul(h).redIAdd(c).redIAdd(this.b);return d.redSqr().redISub(p).cmpn(0)===0},n.prototype._endoWnafMulAdd=function(s,h,d){for(var c=this._endoWnafT1,p=this._endoWnafT2,m=0;m<s.length;m++){var S=this._endoSplit(h[m]),C=s[m],M=C._getBeta();S.k1.negative&&(S.k1.ineg(),C=C.neg(!0)),S.k2.negative&&(S.k2.ineg(),M=M.neg(!0)),c[2*m]=C,c[2*m+1]=M,p[2*m]=S.k1,p[2*m+1]=S.k2}for(var P=this._wnafMulAdd(1,c,p,2*m,d),$=0;$<2*m;$++)c[$]=null,p[$]=null;return P},a(l,r.BasePoint),n.prototype.point=function(s,h,d){return new l(this,s,h,d)},n.prototype.pointFromJSON=function(s,h){return l.fromJSON(this,s,h)},l.prototype._getBeta=function(){if(this.curve.endo){var s=this.precomputed;if(s&&s.beta)return s.beta;var h=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(s){var d=this.curve,c=function(p){return d.point(p.x.redMul(d.endo.beta),p.y)};s.beta=h,h.precomputed={beta:null,naf:s.naf&&{wnd:s.naf.wnd,points:s.naf.points.map(c)},doubles:s.doubles&&{step:s.doubles.step,points:s.doubles.points.map(c)}}}return h}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(s,h,d){typeof h=="string"&&(h=JSON.parse(h));var c=s.point(h[0],h[1],d);if(!h[2])return c;function p(S){return s.point(S[0],S[1],d)}var m=h[2];return c.precomputed={beta:null,doubles:m.doubles&&{step:m.doubles.step,points:[c].concat(m.doubles.points.map(p))},naf:m.naf&&{wnd:m.naf.wnd,points:[c].concat(m.naf.points.map(p))}},c},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(s){if(this.inf)return s;if(s.inf)return this;if(this.eq(s))return this.dbl();if(this.neg().eq(s))return this.curve.point(null,null);if(this.x.cmp(s.x)===0)return this.curve.point(null,null);var h=this.y.redSub(s.y);h.cmpn(0)!==0&&(h=h.redMul(this.x.redSub(s.x).redInvm()));var d=h.redSqr().redISub(this.x).redISub(s.x),c=h.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,c)},l.prototype.dbl=function(){if(this.inf)return this;var s=this.y.redAdd(this.y);if(s.cmpn(0)===0)return this.curve.point(null,null);var h=this.curve.a,d=this.x.redSqr(),c=s.redInvm(),p=d.redAdd(d).redIAdd(d).redIAdd(h).redMul(c),m=p.redSqr().redISub(this.x.redAdd(this.x)),S=p.redMul(this.x.redSub(m)).redISub(this.y);return this.curve.point(m,S)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(s){return s=new o(s,16),this.isInfinity()?this:this._hasDoubles(s)?this.curve._fixedNafMul(this,s):this.curve.endo?this.curve._endoWnafMulAdd([this],[s]):this.curve._wnafMul(this,s)},l.prototype.mulAdd=function(s,h,d){var c=[this,h],p=[s,d];return this.curve.endo?this.curve._endoWnafMulAdd(c,p):this.curve._wnafMulAdd(1,c,p,2)},l.prototype.jmulAdd=function(s,h,d){var c=[this,h],p=[s,d];return this.curve.endo?this.curve._endoWnafMulAdd(c,p,!0):this.curve._wnafMulAdd(1,c,p,2,!0)},l.prototype.eq=function(s){return this===s||this.inf===s.inf&&(this.inf||this.x.cmp(s.x)===0&&this.y.cmp(s.y)===0)},l.prototype.neg=function(s){if(this.inf)return this;var h=this.curve.point(this.x,this.y.redNeg());if(s&&this.precomputed){var d=this.precomputed,c=function(p){return p.neg()};h.precomputed={naf:d.naf&&{wnd:d.naf.wnd,points:d.naf.points.map(c)},doubles:d.doubles&&{step:d.doubles.step,points:d.doubles.points.map(c)}}}return h},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(i,r.BasePoint),n.prototype.jpoint=function(s,h,d){return new i(this,s,h,d)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var s=this.z.redInvm(),h=s.redSqr(),d=this.x.redMul(h),c=this.y.redMul(h).redMul(s);return this.curve.point(d,c)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(s){if(this.isInfinity())return s;if(s.isInfinity())return this;var h=s.z.redSqr(),d=this.z.redSqr(),c=this.x.redMul(h),p=s.x.redMul(d),m=this.y.redMul(h.redMul(s.z)),S=s.y.redMul(d.redMul(this.z)),C=c.redSub(p),M=m.redSub(S);if(C.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var P=C.redSqr(),$=P.redMul(C),N=c.redMul(P),B=M.redSqr().redIAdd($).redISub(N).redISub(N),D=M.redMul(N.redISub(B)).redISub(m.redMul($)),U=this.z.redMul(s.z).redMul(C);return this.curve.jpoint(B,D,U)},i.prototype.mixedAdd=function(s){if(this.isInfinity())return s.toJ();if(s.isInfinity())return this;var h=this.z.redSqr(),d=this.x,c=s.x.redMul(h),p=this.y,m=s.y.redMul(h).redMul(this.z),S=d.redSub(c),C=p.redSub(m);if(S.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=S.redSqr(),P=M.redMul(S),$=d.redMul(M),N=C.redSqr().redIAdd(P).redISub($).redISub($),B=C.redMul($.redISub(N)).redISub(p.redMul(P)),D=this.z.redMul(S);return this.curve.jpoint(N,B,D)},i.prototype.dblp=function(s){if(s===0)return this;if(this.isInfinity())return this;if(!s)return this.dbl();var h;if(this.curve.zeroA||this.curve.threeA){var d=this;for(h=0;h<s;h++)d=d.dbl();return d}var c=this.curve.a,p=this.curve.tinv,m=this.x,S=this.y,C=this.z,M=C.redSqr().redSqr(),P=S.redAdd(S);for(h=0;h<s;h++){var $=m.redSqr(),N=P.redSqr(),B=N.redSqr(),D=$.redAdd($).redIAdd($).redIAdd(c.redMul(M)),U=m.redMul(N),z=D.redSqr().redISub(U.redAdd(U)),E=U.redISub(z),O=D.redMul(E);O=O.redIAdd(O).redISub(B);var x=P.redMul(C);h+1<s&&(M=M.redMul(B)),m=z,C=x,P=O}return this.curve.jpoint(m,P.redMul(p),C)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},i.prototype._zeroDbl=function(){var s,h,d;if(this.zOne){var c=this.x.redSqr(),p=this.y.redSqr(),m=p.redSqr(),S=this.x.redAdd(p).redSqr().redISub(c).redISub(m);S=S.redIAdd(S);var C=c.redAdd(c).redIAdd(c),M=C.redSqr().redISub(S).redISub(S),P=m.redIAdd(m);P=(P=P.redIAdd(P)).redIAdd(P),s=M,h=C.redMul(S.redISub(M)).redISub(P),d=this.y.redAdd(this.y)}else{var $=this.x.redSqr(),N=this.y.redSqr(),B=N.redSqr(),D=this.x.redAdd(N).redSqr().redISub($).redISub(B);D=D.redIAdd(D);var U=$.redAdd($).redIAdd($),z=U.redSqr(),E=B.redIAdd(B);E=(E=E.redIAdd(E)).redIAdd(E),s=z.redISub(D).redISub(D),h=U.redMul(D.redISub(s)).redISub(E),d=(d=this.y.redMul(this.z)).redIAdd(d)}return this.curve.jpoint(s,h,d)},i.prototype._threeDbl=function(){var s,h,d;if(this.zOne){var c=this.x.redSqr(),p=this.y.redSqr(),m=p.redSqr(),S=this.x.redAdd(p).redSqr().redISub(c).redISub(m);S=S.redIAdd(S);var C=c.redAdd(c).redIAdd(c).redIAdd(this.curve.a),M=C.redSqr().redISub(S).redISub(S);s=M;var P=m.redIAdd(m);P=(P=P.redIAdd(P)).redIAdd(P),h=C.redMul(S.redISub(M)).redISub(P),d=this.y.redAdd(this.y)}else{var $=this.z.redSqr(),N=this.y.redSqr(),B=this.x.redMul(N),D=this.x.redSub($).redMul(this.x.redAdd($));D=D.redAdd(D).redIAdd(D);var U=B.redIAdd(B),z=(U=U.redIAdd(U)).redAdd(U);s=D.redSqr().redISub(z),d=this.y.redAdd(this.z).redSqr().redISub(N).redISub($);var E=N.redSqr();E=(E=(E=E.redIAdd(E)).redIAdd(E)).redIAdd(E),h=D.redMul(U.redISub(s)).redISub(E)}return this.curve.jpoint(s,h,d)},i.prototype._dbl=function(){var s=this.curve.a,h=this.x,d=this.y,c=this.z,p=c.redSqr().redSqr(),m=h.redSqr(),S=d.redSqr(),C=m.redAdd(m).redIAdd(m).redIAdd(s.redMul(p)),M=h.redAdd(h),P=(M=M.redIAdd(M)).redMul(S),$=C.redSqr().redISub(P.redAdd(P)),N=P.redISub($),B=S.redSqr();B=(B=(B=B.redIAdd(B)).redIAdd(B)).redIAdd(B);var D=C.redMul(N).redISub(B),U=d.redAdd(d).redMul(c);return this.curve.jpoint($,D,U)},i.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var s=this.x.redSqr(),h=this.y.redSqr(),d=this.z.redSqr(),c=h.redSqr(),p=s.redAdd(s).redIAdd(s),m=p.redSqr(),S=this.x.redAdd(h).redSqr().redISub(s).redISub(c),C=(S=(S=(S=S.redIAdd(S)).redAdd(S).redIAdd(S)).redISub(m)).redSqr(),M=c.redIAdd(c);M=(M=(M=M.redIAdd(M)).redIAdd(M)).redIAdd(M);var P=p.redIAdd(S).redSqr().redISub(m).redISub(C).redISub(M),$=h.redMul(P);$=($=$.redIAdd($)).redIAdd($);var N=this.x.redMul(C).redISub($);N=(N=N.redIAdd(N)).redIAdd(N);var B=this.y.redMul(P.redMul(M.redISub(P)).redISub(S.redMul(C)));B=(B=(B=B.redIAdd(B)).redIAdd(B)).redIAdd(B);var D=this.z.redAdd(S).redSqr().redISub(d).redISub(C);return this.curve.jpoint(N,B,D)},i.prototype.mul=function(s,h){return s=new o(s,h),this.curve._wnafMul(this,s)},i.prototype.eq=function(s){if(s.type==="affine")return this.eq(s.toJ());if(this===s)return!0;var h=this.z.redSqr(),d=s.z.redSqr();if(this.x.redMul(d).redISub(s.x.redMul(h)).cmpn(0)!==0)return!1;var c=h.redMul(this.z),p=d.redMul(s.z);return this.y.redMul(p).redISub(s.y.redMul(c)).cmpn(0)===0},i.prototype.eqXToP=function(s){var h=this.z.redSqr(),d=s.toRed(this.curve.red).redMul(h);if(this.x.cmp(d)===0)return!0;for(var c=s.clone(),p=this.curve.redN.redMul(h);;){if(c.iadd(this.curve.n),c.cmp(this.curve.p)>=0)return!1;if(d.redIAdd(p),this.x.cmp(d)===0)return!0}},i.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},i.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(t,b,g){var f,o=g,a=t("hash.js"),r=t("./curve"),e=t("./utils").assert;function n(i){i.type==="short"?this.curve=new r.short(i):i.type==="edwards"?this.curve=new r.edwards(i):this.curve=new r.mont(i),this.g=this.curve.g,this.n=this.curve.n,this.hash=i.hash,e(this.g.validate(),"Invalid curve"),e(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(i,s){Object.defineProperty(o,i,{configurable:!0,enumerable:!0,get:function(){var h=new n(s);return Object.defineProperty(o,i,{configurable:!0,enumerable:!0,value:h}),h}})}o.PresetCurve=n,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{f=t("./precomputed/secp256k1")}catch{f=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(t,b,g){var f=t("bn.js"),o=t("hmac-drbg"),a=t("../utils"),r=t("../curves"),e=t("brorand"),n=a.assert,l=t("./key"),i=t("./signature");function s(h){if(!(this instanceof s))return new s(h);typeof h=="string"&&(n(Object.prototype.hasOwnProperty.call(r,h),"Unknown curve "+h),h=r[h]),h instanceof r.PresetCurve&&(h={curve:h}),this.curve=h.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=h.curve.g,this.g.precompute(h.curve.n.bitLength()+1),this.hash=h.hash||h.curve.hash}b.exports=s,s.prototype.keyPair=function(h){return new l(this,h)},s.prototype.keyFromPrivate=function(h,d){return l.fromPrivate(this,h,d)},s.prototype.keyFromPublic=function(h,d){return l.fromPublic(this,h,d)},s.prototype.genKeyPair=function(h){h||(h={});for(var d=new o({hash:this.hash,pers:h.pers,persEnc:h.persEnc||"utf8",entropy:h.entropy||e(this.hash.hmacStrength),entropyEnc:h.entropy&&h.entropyEnc||"utf8",nonce:this.n.toArray()}),c=this.n.byteLength(),p=this.n.sub(new f(2));;){var m=new f(d.generate(c));if(!(m.cmp(p)>0))return m.iaddn(1),this.keyFromPrivate(m)}},s.prototype._truncateToN=function(h,d){var c=8*h.byteLength()-this.n.bitLength();return c>0&&(h=h.ushrn(c)),!d&&h.cmp(this.n)>=0?h.sub(this.n):h},s.prototype.sign=function(h,d,c,p){typeof c=="object"&&(p=c,c=null),p||(p={}),d=this.keyFromPrivate(d,c),h=this._truncateToN(new f(h,16));for(var m=this.n.byteLength(),S=d.getPrivate().toArray("be",m),C=h.toArray("be",m),M=new o({hash:this.hash,entropy:S,nonce:C,pers:p.pers,persEnc:p.persEnc||"utf8"}),P=this.n.sub(new f(1)),$=0;;$++){var N=p.k?p.k($):new f(M.generate(this.n.byteLength()));if(!((N=this._truncateToN(N,!0)).cmpn(1)<=0||N.cmp(P)>=0)){var B=this.g.mul(N);if(!B.isInfinity()){var D=B.getX(),U=D.umod(this.n);if(U.cmpn(0)!==0){var z=N.invm(this.n).mul(U.mul(d.getPrivate()).iadd(h));if((z=z.umod(this.n)).cmpn(0)!==0){var E=(B.getY().isOdd()?1:0)|(D.cmp(U)!==0?2:0);return p.canonical&&z.cmp(this.nh)>0&&(z=this.n.sub(z),E^=1),new i({r:U,s:z,recoveryParam:E})}}}}}},s.prototype.verify=function(h,d,c,p){h=this._truncateToN(new f(h,16)),c=this.keyFromPublic(c,p);var m=(d=new i(d,"hex")).r,S=d.s;if(m.cmpn(1)<0||m.cmp(this.n)>=0||S.cmpn(1)<0||S.cmp(this.n)>=0)return!1;var C,M=S.invm(this.n),P=M.mul(h).umod(this.n),$=M.mul(m).umod(this.n);return this.curve._maxwellTrick?!(C=this.g.jmulAdd(P,c.getPublic(),$)).isInfinity()&&C.eqXToP(m):!(C=this.g.mulAdd(P,c.getPublic(),$)).isInfinity()&&C.getX().umod(this.n).cmp(m)===0},s.prototype.recoverPubKey=function(h,d,c,p){n((3&c)===c,"The recovery param is more than two bits"),d=new i(d,p);var m=this.n,S=new f(h),C=d.r,M=d.s,P=1&c,$=c>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&$)throw new Error("Unable to find sencond key candinate");C=$?this.curve.pointFromX(C.add(this.curve.n),P):this.curve.pointFromX(C,P);var N=d.r.invm(m),B=m.sub(S).mul(N).umod(m),D=M.mul(N).umod(m);return this.g.mulAdd(B,C,D)},s.prototype.getKeyRecoveryParam=function(h,d,c,p){if((d=new i(d,p)).recoveryParam!==null)return d.recoveryParam;for(var m=0;m<4;m++){var S;try{S=this.recoverPubKey(h,d,m)}catch{continue}if(S.eq(c))return m}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(t,b,g){var f=t("bn.js"),o=t("../utils").assert;function a(r,e){this.ec=r,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}b.exports=a,a.fromPublic=function(r,e,n){return e instanceof a?e:new a(r,{pub:e,pubEnc:n})},a.fromPrivate=function(r,e,n){return e instanceof a?e:new a(r,{priv:e,privEnc:n})},a.prototype.validate=function(){var r=this.getPublic();return r.isInfinity()?{result:!1,reason:"Invalid public key"}:r.validate()?r.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},a.prototype.getPublic=function(r,e){return typeof r=="string"&&(e=r,r=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,r):this.pub},a.prototype.getPrivate=function(r){return r==="hex"?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(r,e){this.priv=new f(r,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(r,e){if(r.x||r.y)return this.ec.curve.type==="mont"?o(r.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||o(r.x&&r.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(r.x,r.y));this.pub=this.ec.curve.decodePoint(r,e)},a.prototype.derive=function(r){return r.validate()||o(r.validate(),"public point not validated"),r.mul(this.priv).getX()},a.prototype.sign=function(r,e,n){return this.ec.sign(r,this,e,n)},a.prototype.verify=function(r,e){return this.ec.verify(r,e,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":419,"bn.js":420}],414:[function(t,b,g){var f=t("bn.js"),o=t("../utils"),a=o.assert;function r(s,h){if(s instanceof r)return s;this._importDER(s,h)||(a(s.r&&s.s,"Signature without r or s"),this.r=new f(s.r,16),this.s=new f(s.s,16),s.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=s.recoveryParam)}function e(){this.place=0}function n(s,h){var d=s[h.place++];if(!(128&d))return d;var c=15&d;if(c===0||c>4)return!1;for(var p=0,m=0,S=h.place;m<c;m++,S++)p<<=8,p|=s[S],p>>>=0;return!(p<=127)&&(h.place=S,p)}function l(s){for(var h=0,d=s.length-1;!s[h]&&!(128&s[h+1])&&h<d;)h++;return h===0?s:s.slice(h)}function i(s,h){if(h<128)s.push(h);else{var d=1+(Math.log(h)/Math.LN2>>>3);for(s.push(128|d);--d;)s.push(h>>>(d<<3)&255);s.push(h)}}b.exports=r,r.prototype._importDER=function(s,h){s=o.toArray(s,h);var d=new e;if(s[d.place++]!==48)return!1;var c=n(s,d);if(c===!1||c+d.place!==s.length||s[d.place++]!==2)return!1;var p=n(s,d);if(p===!1)return!1;var m=s.slice(d.place,p+d.place);if(d.place+=p,s[d.place++]!==2)return!1;var S=n(s,d);if(S===!1||s.length!==S+d.place)return!1;var C=s.slice(d.place,S+d.place);if(m[0]===0){if(!(128&m[1]))return!1;m=m.slice(1)}if(C[0]===0){if(!(128&C[1]))return!1;C=C.slice(1)}return this.r=new f(m),this.s=new f(C),this.recoveryParam=null,!0},r.prototype.toDER=function(s){var h=this.r.toArray(),d=this.s.toArray();for(128&h[0]&&(h=[0].concat(h)),128&d[0]&&(d=[0].concat(d)),h=l(h),d=l(d);!(d[0]||128&d[1]);)d=d.slice(1);var c=[2];i(c,h.length),(c=c.concat(h)).push(2),i(c,d.length);var p=c.concat(d),m=[48];return i(m,p.length),m=m.concat(p),o.encode(m,s)}},{"../utils":419,"bn.js":420}],415:[function(t,b,g){var f=t("hash.js"),o=t("../curves"),a=t("../utils"),r=a.assert,e=a.parseBytes,n=t("./key"),l=t("./signature");function i(s){if(r(s==="ed25519","only tested with ed25519 so far"),!(this instanceof i))return new i(s);s=o[s].curve,this.curve=s,this.g=s.g,this.g.precompute(s.n.bitLength()+1),this.pointClass=s.point().constructor,this.encodingLength=Math.ceil(s.n.bitLength()/8),this.hash=f.sha512}b.exports=i,i.prototype.sign=function(s,h){s=e(s);var d=this.keyFromSecret(h),c=this.hashInt(d.messagePrefix(),s),p=this.g.mul(c),m=this.encodePoint(p),S=this.hashInt(m,d.pubBytes(),s).mul(d.priv()),C=c.add(S).umod(this.curve.n);return this.makeSignature({R:p,S:C,Rencoded:m})},i.prototype.verify=function(s,h,d){s=e(s),h=this.makeSignature(h);var c=this.keyFromPublic(d),p=this.hashInt(h.Rencoded(),c.pubBytes(),s),m=this.g.mul(h.S());return h.R().add(c.pub().mul(p)).eq(m)},i.prototype.hashInt=function(){for(var s=this.hash(),h=0;h<arguments.length;h++)s.update(arguments[h]);return a.intFromLE(s.digest()).umod(this.curve.n)},i.prototype.keyFromPublic=function(s){return n.fromPublic(this,s)},i.prototype.keyFromSecret=function(s){return n.fromSecret(this,s)},i.prototype.makeSignature=function(s){return s instanceof l?s:new l(this,s)},i.prototype.encodePoint=function(s){var h=s.getY().toArray("le",this.encodingLength);return h[this.encodingLength-1]|=s.getX().isOdd()?128:0,h},i.prototype.decodePoint=function(s){var h=(s=a.parseBytes(s)).length-1,d=s.slice(0,h).concat(-129&s[h]),c=(128&s[h])!=0,p=a.intFromLE(d);return this.curve.pointFromY(p,c)},i.prototype.encodeInt=function(s){return s.toArray("le",this.encodingLength)},i.prototype.decodeInt=function(s){return a.intFromLE(s)},i.prototype.isPoint=function(s){return s instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(t,b,g){var f=t("../utils"),o=f.assert,a=f.parseBytes,r=f.cachedProperty;function e(n,l){this.eddsa=n,this._secret=a(l.secret),n.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=a(l.pub)}e.fromPublic=function(n,l){return l instanceof e?l:new e(n,{pub:l})},e.fromSecret=function(n,l){return l instanceof e?l:new e(n,{secret:l})},e.prototype.secret=function(){return this._secret},r(e,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),r(e,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),r(e,"privBytes",function(){var n=this.eddsa,l=this.hash(),i=n.encodingLength-1,s=l.slice(0,n.encodingLength);return s[0]&=248,s[i]&=127,s[i]|=64,s}),r(e,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),r(e,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),r(e,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),e.prototype.sign=function(n){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(n,this)},e.prototype.verify=function(n,l){return this.eddsa.verify(n,l,this)},e.prototype.getSecret=function(n){return o(this._secret,"KeyPair is public only"),f.encode(this.secret(),n)},e.prototype.getPublic=function(n){return f.encode(this.pubBytes(),n)},b.exports=e},{"../utils":419}],417:[function(t,b,g){var f=t("bn.js"),o=t("../utils"),a=o.assert,r=o.cachedProperty,e=o.parseBytes;function n(l,i){this.eddsa=l,typeof i!="object"&&(i=e(i)),Array.isArray(i)&&(i={R:i.slice(0,l.encodingLength),S:i.slice(l.encodingLength)}),a(i.R&&i.S,"Signature without R or S"),l.isPoint(i.R)&&(this._R=i.R),i.S instanceof f&&(this._S=i.S),this._Rencoded=Array.isArray(i.R)?i.R:i.Rencoded,this._Sencoded=Array.isArray(i.S)?i.S:i.Sencoded}r(n,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),r(n,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),r(n,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),r(n,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),n.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},n.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},b.exports=n},{"../utils":419,"bn.js":420}],418:[function(t,b,g){b.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],419:[function(t,b,g){var f=g,o=t("bn.js"),a=t("minimalistic-assert"),r=t("minimalistic-crypto-utils");f.assert=a,f.toArray=r.toArray,f.zero2=r.zero2,f.toHex=r.toHex,f.encode=r.encode,f.getNAF=function(e,n,l){var i=new Array(Math.max(e.bitLength(),l)+1);i.fill(0);for(var s=1<<n+1,h=e.clone(),d=0;d<i.length;d++){var c,p=h.andln(s-1);h.isOdd()?(c=p>(s>>1)-1?(s>>1)-p:p,h.isubn(c)):c=0,i[d]=c,h.iushrn(1)}return i},f.getJSF=function(e,n){var l=[[],[]];e=e.clone(),n=n.clone();for(var i,s=0,h=0;e.cmpn(-s)>0||n.cmpn(-h)>0;){var d,c,p=e.andln(3)+s&3,m=n.andln(3)+h&3;p===3&&(p=-1),m===3&&(m=-1),d=1&p?(i=e.andln(7)+s&7)!==3&&i!==5||m!==2?p:-p:0,l[0].push(d),c=1&m?(i=n.andln(7)+h&7)!==3&&i!==5||p!==2?m:-m:0,l[1].push(c),2*s===d+1&&(s=1-s),2*h===c+1&&(h=1-h),e.iushrn(1),n.iushrn(1)}return l},f.cachedProperty=function(e,n,l){var i="_"+n;e.prototype[n]=function(){return this[i]!==void 0?this[i]:this[i]=l.call(this)}},f.parseBytes=function(e){return typeof e=="string"?f.toArray(e,"hex"):e},f.intFromLE=function(e){return new o(e,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(t,b,g){arguments[4][184][0].apply(g,arguments)},{buffer:188,dup:184}],421:[function(t,b,g){b.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],422:[function(t,b,g){var f=Object.create||function(N){var B=function(){};return B.prototype=N,new B},o=Object.keys||function(N){var B=[];for(var D in N)Object.prototype.hasOwnProperty.call(N,D)&&B.push(D);return D},a=Function.prototype.bind||function(N){var B=this;return function(){return B.apply(N,arguments)}};function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=f(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}b.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0;var e,n=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),e=l.x===0}catch{e=!1}function i(N){return N._maxListeners===void 0?r.defaultMaxListeners:N._maxListeners}function s(N,B,D){if(B)N.call(D);else for(var U=N.length,z=$(N,U),E=0;E<U;++E)z[E].call(D)}function h(N,B,D,U){if(B)N.call(D,U);else for(var z=N.length,E=$(N,z),O=0;O<z;++O)E[O].call(D,U)}function d(N,B,D,U,z){if(B)N.call(D,U,z);else for(var E=N.length,O=$(N,E),x=0;x<E;++x)O[x].call(D,U,z)}function c(N,B,D,U,z,E){if(B)N.call(D,U,z,E);else for(var O=N.length,x=$(N,O),y=0;y<O;++y)x[y].call(D,U,z,E)}function p(N,B,D,U){if(B)N.apply(D,U);else for(var z=N.length,E=$(N,z),O=0;O<z;++O)E[O].apply(D,U)}function m(N,B,D,U){var z,E,O;if(typeof D!="function")throw new TypeError('"listener" argument must be a function');if((E=N._events)?(E.newListener&&(N.emit("newListener",B,D.listener?D.listener:D),E=N._events),O=E[B]):(E=N._events=f(null),N._eventsCount=0),O){if(typeof O=="function"?O=E[B]=U?[D,O]:[O,D]:U?O.unshift(D):O.push(D),!O.warned&&(z=i(N))&&z>0&&O.length>z){O.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+O.length+' "'+String(B)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');x.name="MaxListenersExceededWarning",x.emitter=N,x.type=B,x.count=O.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",x.name,x.message)}}else O=E[B]=D,++N._eventsCount;return N}function S(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var N=new Array(arguments.length),B=0;B<N.length;++B)N[B]=arguments[B];this.listener.apply(this.target,N)}}function C(N,B,D){var U={fired:!1,wrapFn:void 0,target:N,type:B,listener:D},z=a.call(S,U);return z.listener=D,U.wrapFn=z,z}function M(N,B,D){var U=N._events;if(!U)return[];var z=U[B];return z?typeof z=="function"?D?[z.listener||z]:[z]:D?function(E){for(var O=new Array(E.length),x=0;x<O.length;++x)O[x]=E[x].listener||E[x];return O}(z):$(z,z.length):[]}function P(N){var B=this._events;if(B){var D=B[N];if(typeof D=="function")return 1;if(D)return D.length}return 0}function $(N,B){for(var D=new Array(B),U=0;U<B;++U)D[U]=N[U];return D}e?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return n},set:function(N){if(typeof N!="number"||N<0||N!=N)throw new TypeError('"defaultMaxListeners" must be a positive number');n=N}}):r.defaultMaxListeners=n,r.prototype.setMaxListeners=function(N){if(typeof N!="number"||N<0||isNaN(N))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=N,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(N){var B,D,U,z,E,O,x=N==="error";if(O=this._events)x=x&&O.error==null;else if(!x)return!1;if(x){if(arguments.length>1&&(B=arguments[1]),B instanceof Error)throw B;var y=new Error('Unhandled "error" event. ('+B+")");throw y.context=B,y}if(!(D=O[N]))return!1;var v=typeof D=="function";switch(U=arguments.length){case 1:s(D,v,this);break;case 2:h(D,v,this,arguments[1]);break;case 3:d(D,v,this,arguments[1],arguments[2]);break;case 4:c(D,v,this,arguments[1],arguments[2],arguments[3]);break;default:for(z=new Array(U-1),E=1;E<U;E++)z[E-1]=arguments[E];p(D,v,this,z)}return!0},r.prototype.addListener=function(N,B){return m(this,N,B,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(N,B){return m(this,N,B,!0)},r.prototype.once=function(N,B){if(typeof B!="function")throw new TypeError('"listener" argument must be a function');return this.on(N,C(this,N,B)),this},r.prototype.prependOnceListener=function(N,B){if(typeof B!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(N,C(this,N,B)),this},r.prototype.removeListener=function(N,B){var D,U,z,E,O;if(typeof B!="function")throw new TypeError('"listener" argument must be a function');if(!(U=this._events))return this;if(!(D=U[N]))return this;if(D===B||D.listener===B)--this._eventsCount==0?this._events=f(null):(delete U[N],U.removeListener&&this.emit("removeListener",N,D.listener||B));else if(typeof D!="function"){for(z=-1,E=D.length-1;E>=0;E--)if(D[E]===B||D[E].listener===B){O=D[E].listener,z=E;break}if(z<0)return this;z===0?D.shift():function(x,y){for(var v=y,w=v+1,_=x.length;w<_;v+=1,w+=1)x[v]=x[w];x.pop()}(D,z),D.length===1&&(U[N]=D[0]),U.removeListener&&this.emit("removeListener",N,O||B)}return this},r.prototype.removeAllListeners=function(N){var B,D,U;if(!(D=this._events))return this;if(!D.removeListener)return arguments.length===0?(this._events=f(null),this._eventsCount=0):D[N]&&(--this._eventsCount==0?this._events=f(null):delete D[N]),this;if(arguments.length===0){var z,E=o(D);for(U=0;U<E.length;++U)(z=E[U])!=="removeListener"&&this.removeAllListeners(z);return this.removeAllListeners("removeListener"),this._events=f(null),this._eventsCount=0,this}if(typeof(B=D[N])=="function")this.removeListener(N,B);else if(B)for(U=B.length-1;U>=0;U--)this.removeListener(N,B[U]);return this},r.prototype.listeners=function(N){return M(this,N,!0)},r.prototype.rawListeners=function(N){return M(this,N,!1)},r.listenerCount=function(N,B){return typeof N.listenerCount=="function"?N.listenerCount(B):P.call(N,B)},r.prototype.listenerCount=P,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("md5.js");b.exports=function(a,r,e,n){if(f.isBuffer(a)||(a=f.from(a,"binary")),r&&(f.isBuffer(r)||(r=f.from(r,"binary")),r.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=e/8,i=f.alloc(l),s=f.alloc(n||0),h=f.alloc(0);l>0||n>0;){var d=new o;d.update(h),d.update(a),r&&d.update(r),h=d.digest();var c=0;if(l>0){var p=i.length-l;c=Math.min(l,h.length),h.copy(i,p,0,c),l-=c}if(c<h.length&&n>0){var m=s.length-n,S=Math.min(n,h.length-c);h.copy(s,m,c,c+S),n-=S}}return h.fill(0),{key:i,iv:s}}},{"md5.js":450,"safe-buffer":494}],424:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.CsvParserStream=g.ParserOptions=g.parseFile=g.parseStream=g.parseString=g.parse=g.FormatterOptions=g.CsvFormatterStream=g.writeToPath=g.writeToString=g.writeToBuffer=g.writeToStream=g.write=g.format=void 0;var f=t("@fast-csv/format");Object.defineProperty(g,"format",{enumerable:!0,get:function(){return f.format}}),Object.defineProperty(g,"write",{enumerable:!0,get:function(){return f.write}}),Object.defineProperty(g,"writeToStream",{enumerable:!0,get:function(){return f.writeToStream}}),Object.defineProperty(g,"writeToBuffer",{enumerable:!0,get:function(){return f.writeToBuffer}}),Object.defineProperty(g,"writeToString",{enumerable:!0,get:function(){return f.writeToString}}),Object.defineProperty(g,"writeToPath",{enumerable:!0,get:function(){return f.writeToPath}}),Object.defineProperty(g,"CsvFormatterStream",{enumerable:!0,get:function(){return f.CsvFormatterStream}}),Object.defineProperty(g,"FormatterOptions",{enumerable:!0,get:function(){return f.FormatterOptions}});var o=t("@fast-csv/parse");Object.defineProperty(g,"parse",{enumerable:!0,get:function(){return o.parse}}),Object.defineProperty(g,"parseString",{enumerable:!0,get:function(){return o.parseString}}),Object.defineProperty(g,"parseStream",{enumerable:!0,get:function(){return o.parseStream}}),Object.defineProperty(g,"parseFile",{enumerable:!0,get:function(){return o.parseFile}}),Object.defineProperty(g,"ParserOptions",{enumerable:!0,get:function(){return o.ParserOptions}}),Object.defineProperty(g,"CsvParserStream",{enumerable:!0,get:function(){return o.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("readable-stream").Transform;function a(r){o.call(this),this._block=f.allocUnsafe(r),this._blockSize=r,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t("inherits")(a,o),a.prototype._transform=function(r,e,n){var l=null;try{this.update(r,e)}catch(i){l=i}n(l)},a.prototype._flush=function(r){var e=null;try{this.push(this.digest())}catch(n){e=n}r(e)},a.prototype.update=function(r,e){if(function(d,c){if(!f.isBuffer(d)&&typeof d!="string")throw new TypeError(c+" must be a string or a buffer")}(r,"Data"),this._finalized)throw new Error("Digest already called");f.isBuffer(r)||(r=f.from(r,e));for(var n=this._block,l=0;this._blockOffset+r.length-l>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)n[i++]=r[l++];this._update(),this._blockOffset=0}for(;l<r.length;)n[this._blockOffset++]=r[l++];for(var s=0,h=8*r.length;h>0;++s)this._length[s]+=h,(h=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*h);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();r!==void 0&&(e=e.toString(r)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},b.exports=a},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(t,b,g){var f=g;f.utils=t("./hash/utils"),f.common=t("./hash/common"),f.sha=t("./hash/sha"),f.ripemd=t("./hash/ripemd"),f.hmac=t("./hash/hmac"),f.sha1=f.sha.sha1,f.sha256=f.sha.sha256,f.sha224=f.sha.sha224,f.sha384=f.sha.sha384,f.sha512=f.sha.sha512,f.ripemd160=f.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(t,b,g){var f=t("./utils"),o=t("minimalistic-assert");function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}g.BlockHash=a,a.prototype.update=function(r,e){if(r=f.toArray(r,e),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){var n=(r=this.pending).length%this._delta8;this.pending=r.slice(r.length-n,r.length),this.pending.length===0&&(this.pending=null),r=f.join32(r,0,r.length-n,this.endian);for(var l=0;l<r.length;l+=this._delta32)this._update(r,l,l+this._delta32)}return this},a.prototype.digest=function(r){return this.update(this._pad()),o(this.pending===null),this._digest(r)},a.prototype._pad=function(){var r=this.pendingTotal,e=this._delta8,n=e-(r+this.padLength)%e,l=new Array(n+this.padLength);l[0]=128;for(var i=1;i<n;i++)l[i]=0;if(r<<=3,this.endian==="big"){for(var s=8;s<this.padLength;s++)l[i++]=0;l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=r>>>24&255,l[i++]=r>>>16&255,l[i++]=r>>>8&255,l[i++]=255&r}else for(l[i++]=255&r,l[i++]=r>>>8&255,l[i++]=r>>>16&255,l[i++]=r>>>24&255,l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=0,s=8;s<this.padLength;s++)l[i++]=0;return l}},{"./utils":437,"minimalistic-assert":453}],428:[function(t,b,g){var f=t("./utils"),o=t("minimalistic-assert");function a(r,e,n){if(!(this instanceof a))return new a(r,e,n);this.Hash=r,this.blockSize=r.blockSize/8,this.outSize=r.outSize/8,this.inner=null,this.outer=null,this._init(f.toArray(e,n))}b.exports=a,a.prototype._init=function(r){r.length>this.blockSize&&(r=new this.Hash().update(r).digest()),o(r.length<=this.blockSize);for(var e=r.length;e<this.blockSize;e++)r.push(0);for(e=0;e<r.length;e++)r[e]^=54;for(this.inner=new this.Hash().update(r),e=0;e<r.length;e++)r[e]^=106;this.outer=new this.Hash().update(r)},a.prototype.update=function(r,e){return this.inner.update(r,e),this},a.prototype.digest=function(r){return this.outer.update(this.inner.digest()),this.outer.digest(r)}},{"./utils":437,"minimalistic-assert":453}],429:[function(t,b,g){var f=t("./utils"),o=t("./common"),a=f.rotl32,r=f.sum32,e=f.sum32_3,n=f.sum32_4,l=o.BlockHash;function i(){if(!(this instanceof i))return new i;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function s(C,M,P,$){return C<=15?M^P^$:C<=31?M&P|~M&$:C<=47?(M|~P)^$:C<=63?M&$|P&~$:M^(P|~$)}function h(C){return C<=15?0:C<=31?1518500249:C<=47?1859775393:C<=63?2400959708:2840853838}function d(C){return C<=15?1352829926:C<=31?1548603684:C<=47?1836072691:C<=63?2053994217:0}f.inherits(i,l),g.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(C,M){for(var P=this.h[0],$=this.h[1],N=this.h[2],B=this.h[3],D=this.h[4],U=P,z=$,E=N,O=B,x=D,y=0;y<80;y++){var v=r(a(n(P,s(y,$,N,B),C[c[y]+M],h(y)),m[y]),D);P=D,D=B,B=a(N,10),N=$,$=v,v=r(a(n(U,s(79-y,z,E,O),C[p[y]+M],d(y)),S[y]),x),U=x,x=O,O=a(E,10),E=z,z=v}v=e(this.h[1],N,O),this.h[1]=e(this.h[2],B,x),this.h[2]=e(this.h[3],D,U),this.h[3]=e(this.h[4],P,z),this.h[4]=e(this.h[0],$,E),this.h[0]=v},i.prototype._digest=function(C){return C==="hex"?f.toHex32(this.h,"little"):f.split32(this.h,"little")};var c=[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],p=[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],m=[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],S=[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]},{"./common":427,"./utils":437}],430:[function(t,b,g){g.sha1=t("./sha/1"),g.sha224=t("./sha/224"),g.sha256=t("./sha/256"),g.sha384=t("./sha/384"),g.sha512=t("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(t,b,g){var f=t("../utils"),o=t("../common"),a=t("./common"),r=f.rotl32,e=f.sum32,n=f.sum32_5,l=a.ft_1,i=o.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}f.inherits(h,i),b.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(d,c){for(var p=this.W,m=0;m<16;m++)p[m]=d[c+m];for(;m<p.length;m++)p[m]=r(p[m-3]^p[m-8]^p[m-14]^p[m-16],1);var S=this.h[0],C=this.h[1],M=this.h[2],P=this.h[3],$=this.h[4];for(m=0;m<p.length;m++){var N=~~(m/20),B=n(r(S,5),l(N,C,M,P),$,p[m],s[N]);$=P,P=M,M=r(C,30),C=S,S=B}this.h[0]=e(this.h[0],S),this.h[1]=e(this.h[1],C),this.h[2]=e(this.h[2],M),this.h[3]=e(this.h[3],P),this.h[4]=e(this.h[4],$)},h.prototype._digest=function(d){return d==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(t,b,g){var f=t("../utils"),o=t("./256");function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}f.inherits(a,o),b.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(r){return r==="hex"?f.toHex32(this.h.slice(0,7),"big"):f.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(t,b,g){var f=t("../utils"),o=t("../common"),a=t("./common"),r=t("minimalistic-assert"),e=f.sum32,n=f.sum32_4,l=f.sum32_5,i=a.ch32,s=a.maj32,h=a.s0_256,d=a.s1_256,c=a.g0_256,p=a.g1_256,m=o.BlockHash,S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function C(){if(!(this instanceof C))return new C;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=S,this.W=new Array(64)}f.inherits(C,m),b.exports=C,C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(M,P){for(var $=this.W,N=0;N<16;N++)$[N]=M[P+N];for(;N<$.length;N++)$[N]=n(p($[N-2]),$[N-7],c($[N-15]),$[N-16]);var B=this.h[0],D=this.h[1],U=this.h[2],z=this.h[3],E=this.h[4],O=this.h[5],x=this.h[6],y=this.h[7];for(r(this.k.length===$.length),N=0;N<$.length;N++){var v=l(y,d(E),i(E,O,x),this.k[N],$[N]),w=e(h(B),s(B,D,U));y=x,x=O,O=E,E=e(z,v),z=U,U=D,D=B,B=e(v,w)}this.h[0]=e(this.h[0],B),this.h[1]=e(this.h[1],D),this.h[2]=e(this.h[2],U),this.h[3]=e(this.h[3],z),this.h[4]=e(this.h[4],E),this.h[5]=e(this.h[5],O),this.h[6]=e(this.h[6],x),this.h[7]=e(this.h[7],y)},C.prototype._digest=function(M){return M==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(t,b,g){var f=t("../utils"),o=t("./512");function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}f.inherits(a,o),b.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(r){return r==="hex"?f.toHex32(this.h.slice(0,12),"big"):f.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(t,b,g){var f=t("../utils"),o=t("../common"),a=t("minimalistic-assert"),r=f.rotr64_hi,e=f.rotr64_lo,n=f.shr64_hi,l=f.shr64_lo,i=f.sum64,s=f.sum64_hi,h=f.sum64_lo,d=f.sum64_4_hi,c=f.sum64_4_lo,p=f.sum64_5_hi,m=f.sum64_5_lo,S=o.BlockHash,C=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function M(){if(!(this instanceof M))return new M;S.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=C,this.W=new Array(160)}function P(w,_,A,j,L){var H=w&A^~w&L;return H<0&&(H+=4294967296),H}function $(w,_,A,j,L,H){var q=_&j^~_&H;return q<0&&(q+=4294967296),q}function N(w,_,A,j,L){var H=w&A^w&L^A&L;return H<0&&(H+=4294967296),H}function B(w,_,A,j,L,H){var q=_&j^_&H^j&H;return q<0&&(q+=4294967296),q}function D(w,_){var A=r(w,_,28)^r(_,w,2)^r(_,w,7);return A<0&&(A+=4294967296),A}function U(w,_){var A=e(w,_,28)^e(_,w,2)^e(_,w,7);return A<0&&(A+=4294967296),A}function z(w,_){var A=r(w,_,14)^r(w,_,18)^r(_,w,9);return A<0&&(A+=4294967296),A}function E(w,_){var A=e(w,_,14)^e(w,_,18)^e(_,w,9);return A<0&&(A+=4294967296),A}function O(w,_){var A=r(w,_,1)^r(w,_,8)^n(w,_,7);return A<0&&(A+=4294967296),A}function x(w,_){var A=e(w,_,1)^e(w,_,8)^l(w,_,7);return A<0&&(A+=4294967296),A}function y(w,_){var A=r(w,_,19)^r(_,w,29)^n(w,_,6);return A<0&&(A+=4294967296),A}function v(w,_){var A=e(w,_,19)^e(_,w,29)^l(w,_,6);return A<0&&(A+=4294967296),A}f.inherits(M,S),b.exports=M,M.blockSize=1024,M.outSize=512,M.hmacStrength=192,M.padLength=128,M.prototype._prepareBlock=function(w,_){for(var A=this.W,j=0;j<32;j++)A[j]=w[_+j];for(;j<A.length;j+=2){var L=y(A[j-4],A[j-3]),H=v(A[j-4],A[j-3]),q=A[j-14],X=A[j-13],F=O(A[j-30],A[j-29]),W=x(A[j-30],A[j-29]),I=A[j-32],R=A[j-31];A[j]=d(L,H,q,X,F,W,I,R),A[j+1]=c(L,H,q,X,F,W,I,R)}},M.prototype._update=function(w,_){this._prepareBlock(w,_);var A=this.W,j=this.h[0],L=this.h[1],H=this.h[2],q=this.h[3],X=this.h[4],F=this.h[5],W=this.h[6],I=this.h[7],R=this.h[8],V=this.h[9],K=this.h[10],Z=this.h[11],Y=this.h[12],J=this.h[13],nt=this.h[14],it=this.h[15];a(this.k.length===A.length);for(var G=0;G<A.length;G+=2){var tt=nt,et=it,ot=z(R,V),st=E(R,V),lt=P(R,V,K,Z,Y),ft=$(R,V,K,Z,Y,J),pt=this.k[G],yt=this.k[G+1],Ot=A[G],At=A[G+1],kt=p(tt,et,ot,st,lt,ft,pt,yt,Ot,At),Wt=m(tt,et,ot,st,lt,ft,pt,yt,Ot,At);tt=D(j,L),et=U(j,L),ot=N(j,L,H,q,X),st=B(j,L,H,q,X,F);var Ht=s(tt,et,ot,st),Vt=h(tt,et,ot,st);nt=Y,it=J,Y=K,J=Z,K=R,Z=V,R=s(W,I,kt,Wt),V=h(I,I,kt,Wt),W=X,I=F,X=H,F=q,H=j,q=L,j=s(kt,Wt,Ht,Vt),L=h(kt,Wt,Ht,Vt)}i(this.h,0,j,L),i(this.h,2,H,q),i(this.h,4,X,F),i(this.h,6,W,I),i(this.h,8,R,V),i(this.h,10,K,Z),i(this.h,12,Y,J),i(this.h,14,nt,it)},M.prototype._digest=function(w){return w==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(t,b,g){var f=t("../utils").rotr32;function o(e,n,l){return e&n^~e&l}function a(e,n,l){return e&n^e&l^n&l}function r(e,n,l){return e^n^l}g.ft_1=function(e,n,l,i){return e===0?o(n,l,i):e===1||e===3?r(n,l,i):e===2?a(n,l,i):void 0},g.ch32=o,g.maj32=a,g.p32=r,g.s0_256=function(e){return f(e,2)^f(e,13)^f(e,22)},g.s1_256=function(e){return f(e,6)^f(e,11)^f(e,25)},g.g0_256=function(e){return f(e,7)^f(e,18)^e>>>3},g.g1_256=function(e){return f(e,17)^f(e,19)^e>>>10}},{"../utils":437}],437:[function(t,b,g){var f=t("minimalistic-assert"),o=t("inherits");function a(l,i){return(64512&l.charCodeAt(i))==55296&&!(i<0||i+1>=l.length)&&(64512&l.charCodeAt(i+1))==56320}function r(l){return(l>>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24)>>>0}function e(l){return l.length===1?"0"+l:l}function n(l){return l.length===7?"0"+l:l.length===6?"00"+l:l.length===5?"000"+l:l.length===4?"0000"+l:l.length===3?"00000"+l:l.length===2?"000000"+l:l.length===1?"0000000"+l:l}g.inherits=o,g.toArray=function(l,i){if(Array.isArray(l))return l.slice();if(!l)return[];var s=[];if(typeof l=="string")if(i){if(i==="hex")for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),d=0;d<l.length;d+=2)s.push(parseInt(l[d]+l[d+1],16))}else for(var h=0,d=0;d<l.length;d++){var c=l.charCodeAt(d);c<128?s[h++]=c:c<2048?(s[h++]=c>>6|192,s[h++]=63&c|128):a(l,d)?(c=65536+((1023&c)<<10)+(1023&l.charCodeAt(++d)),s[h++]=c>>18|240,s[h++]=c>>12&63|128,s[h++]=c>>6&63|128,s[h++]=63&c|128):(s[h++]=c>>12|224,s[h++]=c>>6&63|128,s[h++]=63&c|128)}else for(d=0;d<l.length;d++)s[d]=0|l[d];return s},g.toHex=function(l){for(var i="",s=0;s<l.length;s++)i+=e(l[s].toString(16));return i},g.htonl=r,g.toHex32=function(l,i){for(var s="",h=0;h<l.length;h++){var d=l[h];i==="little"&&(d=r(d)),s+=n(d.toString(16))}return s},g.zero2=e,g.zero8=n,g.join32=function(l,i,s,h){var d=s-i;f(d%4==0);for(var c=new Array(d/4),p=0,m=i;p<c.length;p++,m+=4){var S;S=h==="big"?l[m]<<24|l[m+1]<<16|l[m+2]<<8|l[m+3]:l[m+3]<<24|l[m+2]<<16|l[m+1]<<8|l[m],c[p]=S>>>0}return c},g.split32=function(l,i){for(var s=new Array(4*l.length),h=0,d=0;h<l.length;h++,d+=4){var c=l[h];i==="big"?(s[d]=c>>>24,s[d+1]=c>>>16&255,s[d+2]=c>>>8&255,s[d+3]=255&c):(s[d+3]=c>>>24,s[d+2]=c>>>16&255,s[d+1]=c>>>8&255,s[d]=255&c)}return s},g.rotr32=function(l,i){return l>>>i|l<<32-i},g.rotl32=function(l,i){return l<<i|l>>>32-i},g.sum32=function(l,i){return l+i>>>0},g.sum32_3=function(l,i,s){return l+i+s>>>0},g.sum32_4=function(l,i,s,h){return l+i+s+h>>>0},g.sum32_5=function(l,i,s,h,d){return l+i+s+h+d>>>0},g.sum64=function(l,i,s,h){var d=l[i],c=h+l[i+1]>>>0,p=(c<h?1:0)+s+d;l[i]=p>>>0,l[i+1]=c},g.sum64_hi=function(l,i,s,h){return(i+h>>>0<i?1:0)+l+s>>>0},g.sum64_lo=function(l,i,s,h){return i+h>>>0},g.sum64_4_hi=function(l,i,s,h,d,c,p,m){var S=0,C=i;return S+=(C=C+h>>>0)<i?1:0,S+=(C=C+c>>>0)<c?1:0,l+s+d+p+(S+=(C=C+m>>>0)<m?1:0)>>>0},g.sum64_4_lo=function(l,i,s,h,d,c,p,m){return i+h+c+m>>>0},g.sum64_5_hi=function(l,i,s,h,d,c,p,m,S,C){var M=0,P=i;return M+=(P=P+h>>>0)<i?1:0,M+=(P=P+c>>>0)<c?1:0,M+=(P=P+m>>>0)<m?1:0,l+s+d+p+S+(M+=(P=P+C>>>0)<C?1:0)>>>0},g.sum64_5_lo=function(l,i,s,h,d,c,p,m,S,C){return i+h+c+m+C>>>0},g.rotr64_hi=function(l,i,s){return(i<<32-s|l>>>s)>>>0},g.rotr64_lo=function(l,i,s){return(l<<32-s|i>>>s)>>>0},g.shr64_hi=function(l,i,s){return l>>>s},g.shr64_lo=function(l,i,s){return(l<<32-s|i>>>s)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(t,b,g){var f=t("hash.js"),o=t("minimalistic-crypto-utils"),a=t("minimalistic-assert");function r(e){if(!(this instanceof r))return new r(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var n=o.toArray(e.entropy,e.entropyEnc||"hex"),l=o.toArray(e.nonce,e.nonceEnc||"hex"),i=o.toArray(e.pers,e.persEnc||"hex");a(n.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(n,l,i)}b.exports=r,r.prototype._init=function(e,n,l){var i=e.concat(n).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new f.hmac(this.hash,this.K)},r.prototype._update=function(e){var n=this._hmac().update(this.V).update([0]);e&&(n=n.update(e)),this.K=n.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(e,n,l,i){typeof n!="string"&&(i=l,l=n,n=null),e=o.toArray(e,n),l=o.toArray(l,i),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(l||[])),this._reseed=1},r.prototype.generate=function(e,n,l,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof n!="string"&&(i=l,l=n,n=null),l&&(l=o.toArray(l,i||"hex"),this._update(l));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var h=s.slice(0,e);return this._update(l),this._reseed++,o.encode(h,n)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(t,b,g){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */g.read=function(f,o,a,r,e){var n,l,i=8*e-r-1,s=(1<<i)-1,h=s>>1,d=-7,c=a?e-1:0,p=a?-1:1,m=f[o+c];for(c+=p,n=m&(1<<-d)-1,m>>=-d,d+=i;d>0;n=256*n+f[o+c],c+=p,d-=8);for(l=n&(1<<-d)-1,n>>=-d,d+=r;d>0;l=256*l+f[o+c],c+=p,d-=8);if(n===0)n=1-h;else{if(n===s)return l?NaN:1/0*(m?-1:1);l+=Math.pow(2,r),n-=h}return(m?-1:1)*l*Math.pow(2,n-r)},g.write=function(f,o,a,r,e,n){var l,i,s,h=8*n-e-1,d=(1<<h)-1,c=d>>1,p=e===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:n-1,S=r?1:-1,C=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(i=isNaN(o)?1:0,l=d):(l=Math.floor(Math.log(o)/Math.LN2),o*(s=Math.pow(2,-l))<1&&(l--,s*=2),(o+=l+c>=1?p/s:p*Math.pow(2,1-c))*s>=2&&(l++,s/=2),l+c>=d?(i=0,l=d):l+c>=1?(i=(o*s-1)*Math.pow(2,e),l+=c):(i=o*Math.pow(2,c-1)*Math.pow(2,e),l=0));e>=8;f[a+m]=255&i,m+=S,i/=256,e-=8);for(l=l<<e|i,h+=e;h>0;f[a+m]=255&l,m+=S,l/=256,h-=8);f[a+m-S]|=128*C}},{}],440:[function(t,b,g){typeof Object.create=="function"?b.exports=function(f,o){o&&(f.super_=o,f.prototype=Object.create(o.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}))}:b.exports=function(f,o){if(o){f.super_=o;var a=function(){};a.prototype=o.prototype,f.prototype=new a,f.prototype.constructor=f}}},{}],441:[function(t,b,g){(function(f,o,a,r,e,n,l,i){(function(){/*!
|
|
21
|
+
|
|
22
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
23
|
+
<http://stuartk.com/jszip>
|
|
24
|
+
|
|
25
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
26
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
27
|
+
|
|
28
|
+
JSZip uses the library pako released under the MIT license :
|
|
29
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
30
|
+
*/(function(s){typeof g=="object"&&b!==void 0?b.exports=s():(typeof window<"u"?window:o!==void 0?o:typeof self<"u"?self:this).JSZip=s()})(function(){return function s(h,d,c){function p(C,M){if(!d[C]){if(!h[C]){var P=typeof t=="function"&&t;if(!M&&P)return P(C,!0);if(m)return m(C,!0);var $=new Error("Cannot find module '"+C+"'");throw $.code="MODULE_NOT_FOUND",$}var N=d[C]={exports:{}};h[C][0].call(N.exports,function(B){return p(h[C][1][B]||B)},N,N.exports,s,h,d,c)}return d[C].exports}for(var m=typeof t=="function"&&t,S=0;S<c.length;S++)p(c[S]);return p}({1:[function(s,h,d){var c=s("./utils"),p=s("./support"),m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(S){for(var C,M,P,$,N,B,D,U=[],z=0,E=S.length,O=E,x=c.getTypeOf(S)!=="string";z<S.length;)O=E-z,P=x?(C=S[z++],M=z<E?S[z++]:0,z<E?S[z++]:0):(C=S.charCodeAt(z++),M=z<E?S.charCodeAt(z++):0,z<E?S.charCodeAt(z++):0),$=C>>2,N=(3&C)<<4|M>>4,B=1<O?(15&M)<<2|P>>6:64,D=2<O?63&P:64,U.push(m.charAt($)+m.charAt(N)+m.charAt(B)+m.charAt(D));return U.join("")},d.decode=function(S){var C,M,P,$,N,B,D=0,U=0,z="data:";if(S.substr(0,z.length)===z)throw new Error("Invalid base64 input, it looks like a data url.");var E,O=3*(S=S.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(S.charAt(S.length-1)===m.charAt(64)&&O--,S.charAt(S.length-2)===m.charAt(64)&&O--,O%1!=0)throw new Error("Invalid base64 input, bad content length.");for(E=p.uint8array?new Uint8Array(0|O):new Array(0|O);D<S.length;)C=m.indexOf(S.charAt(D++))<<2|($=m.indexOf(S.charAt(D++)))>>4,M=(15&$)<<4|(N=m.indexOf(S.charAt(D++)))>>2,P=(3&N)<<6|(B=m.indexOf(S.charAt(D++))),E[U++]=C,N!==64&&(E[U++]=M),B!==64&&(E[U++]=P);return E}},{"./support":30,"./utils":32}],2:[function(s,h,d){var c=s("./external"),p=s("./stream/DataWorker"),m=s("./stream/Crc32Probe"),S=s("./stream/DataLengthProbe");function C(M,P,$,N,B){this.compressedSize=M,this.uncompressedSize=P,this.crc32=$,this.compression=N,this.compressedContent=B}C.prototype={getContentWorker:function(){var M=new p(c.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new S("data_length")),P=this;return M.on("end",function(){if(this.streamInfo.data_length!==P.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),M},getCompressedWorker:function(){return new p(c.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},C.createWorkerFrom=function(M,P,$){return M.pipe(new m).pipe(new S("uncompressedSize")).pipe(P.compressWorker($)).pipe(new S("compressedSize")).withStreamInfo("compression",P)},h.exports=C},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,h,d){var c=s("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new c("STORE compression")},uncompressWorker:function(){return new c("STORE decompression")}},d.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,h,d){var c=s("./utils"),p=function(){for(var m,S=[],C=0;C<256;C++){m=C;for(var M=0;M<8;M++)m=1&m?3988292384^m>>>1:m>>>1;S[C]=m}return S}();h.exports=function(m,S){return m!==void 0&&m.length?c.getTypeOf(m)!=="string"?function(C,M,P,$){var N=p,B=0+P;C^=-1;for(var D=0;D<B;D++)C=C>>>8^N[255&(C^M[D])];return-1^C}(0|S,m,m.length):function(C,M,P,$){var N=p,B=0+P;C^=-1;for(var D=0;D<B;D++)C=C>>>8^N[255&(C^M.charCodeAt(D))];return-1^C}(0|S,m,m.length):0}},{"./utils":32}],5:[function(s,h,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(s,h,d){var c;c=typeof Promise<"u"?Promise:s("lie"),h.exports={Promise:c}},{lie:37}],7:[function(s,h,d){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",p=s("pako"),m=s("./utils"),S=s("./stream/GenericWorker"),C=c?"uint8array":"array";function M(P,$){S.call(this,"FlateWorker/"+P),this._pako=null,this._pakoAction=P,this._pakoOptions=$,this.meta={}}d.magic="\b\0",m.inherits(M,S),M.prototype.processChunk=function(P){this.meta=P.meta,this._pako===null&&this._createPako(),this._pako.push(m.transformTo(C,P.data),!1)},M.prototype.flush=function(){S.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},M.prototype.cleanUp=function(){S.prototype.cleanUp.call(this),this._pako=null},M.prototype._createPako=function(){this._pako=new p[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var P=this;this._pako.onData=function($){P.push({data:$,meta:P.meta})}},d.compressWorker=function(P){return new M("Deflate",P)},d.uncompressWorker=function(){return new M("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,h,d){function c(N,B){var D,U="";for(D=0;D<B;D++)U+=String.fromCharCode(255&N),N>>>=8;return U}function p(N,B,D,U,z,E){var O,x,y=N.file,v=N.compression,w=E!==C.utf8encode,_=m.transformTo("string",E(y.name)),A=m.transformTo("string",C.utf8encode(y.name)),j=y.comment,L=m.transformTo("string",E(j)),H=m.transformTo("string",C.utf8encode(j)),q=A.length!==y.name.length,X=H.length!==j.length,F="",W="",I="",R=y.dir,V=y.date,K={crc32:0,compressedSize:0,uncompressedSize:0};B&&!D||(K.crc32=N.crc32,K.compressedSize=N.compressedSize,K.uncompressedSize=N.uncompressedSize);var Z=0;B&&(Z|=8),w||!q&&!X||(Z|=2048);var Y=0,J=0;R&&(Y|=16),z==="UNIX"?(J=798,Y|=function(it,G){var tt=it;return it||(tt=G?16893:33204),(65535&tt)<<16}(y.unixPermissions,R)):(J=20,Y|=function(it){return 63&(it||0)}(y.dosPermissions)),O=V.getUTCHours(),O<<=6,O|=V.getUTCMinutes(),O<<=5,O|=V.getUTCSeconds()/2,x=V.getUTCFullYear()-1980,x<<=4,x|=V.getUTCMonth()+1,x<<=5,x|=V.getUTCDate(),q&&(W=c(1,1)+c(M(_),4)+A,F+="up"+c(W.length,2)+W),X&&(I=c(1,1)+c(M(L),4)+H,F+="uc"+c(I.length,2)+I);var nt="";return nt+=`
|
|
31
|
+
\0`,nt+=c(Z,2),nt+=v.magic,nt+=c(O,2),nt+=c(x,2),nt+=c(K.crc32,4),nt+=c(K.compressedSize,4),nt+=c(K.uncompressedSize,4),nt+=c(_.length,2),nt+=c(F.length,2),{fileRecord:P.LOCAL_FILE_HEADER+nt+_+F,dirRecord:P.CENTRAL_FILE_HEADER+c(J,2)+nt+c(L.length,2)+"\0\0\0\0"+c(Y,4)+c(U,4)+_+F+L}}var m=s("../utils"),S=s("../stream/GenericWorker"),C=s("../utf8"),M=s("../crc32"),P=s("../signature");function $(N,B,D,U){S.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=B,this.zipPlatform=D,this.encodeFileName=U,this.streamFiles=N,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}m.inherits($,S),$.prototype.push=function(N){var B=N.meta.percent||0,D=this.entriesCount,U=this._sources.length;this.accumulate?this.contentBuffer.push(N):(this.bytesWritten+=N.data.length,S.prototype.push.call(this,{data:N.data,meta:{currentFile:this.currentFile,percent:D?(B+100*(D-U-1))/D:100}}))},$.prototype.openedSource=function(N){this.currentSourceOffset=this.bytesWritten,this.currentFile=N.file.name;var B=this.streamFiles&&!N.file.dir;if(B){var D=p(N,B,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:D.fileRecord,meta:{percent:0}})}else this.accumulate=!0},$.prototype.closedSource=function(N){this.accumulate=!1;var B=this.streamFiles&&!N.file.dir,D=p(N,B,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(D.dirRecord),B)this.push({data:function(U){return P.DATA_DESCRIPTOR+c(U.crc32,4)+c(U.compressedSize,4)+c(U.uncompressedSize,4)}(N),meta:{percent:100}});else for(this.push({data:D.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},$.prototype.flush=function(){for(var N=this.bytesWritten,B=0;B<this.dirRecords.length;B++)this.push({data:this.dirRecords[B],meta:{percent:100}});var D=this.bytesWritten-N,U=function(z,E,O,x,y){var v=m.transformTo("string",y(x));return P.CENTRAL_DIRECTORY_END+"\0\0\0\0"+c(z,2)+c(z,2)+c(E,4)+c(O,4)+c(v.length,2)+v}(this.dirRecords.length,D,N,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})},$.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},$.prototype.registerPrevious=function(N){this._sources.push(N);var B=this;return N.on("data",function(D){B.processChunk(D)}),N.on("end",function(){B.closedSource(B.previous.streamInfo),B._sources.length?B.prepareNextSource():B.end()}),N.on("error",function(D){B.error(D)}),this},$.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))},$.prototype.error=function(N){var B=this._sources;if(!S.prototype.error.call(this,N))return!1;for(var D=0;D<B.length;D++)try{B[D].error(N)}catch{}return!0},$.prototype.lock=function(){S.prototype.lock.call(this);for(var N=this._sources,B=0;B<N.length;B++)N[B].lock()},h.exports=$},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,h,d){var c=s("../compressions"),p=s("./ZipFileWorker");d.generateWorker=function(m,S,C){var M=new p(S.streamFiles,C,S.platform,S.encodeFileName),P=0;try{m.forEach(function($,N){P++;var B=function(E,O){var x=E||O,y=c[x];if(!y)throw new Error(x+" is not a valid compression method !");return y}(N.options.compression,S.compression),D=N.options.compressionOptions||S.compressionOptions||{},U=N.dir,z=N.date;N._compressWorker(B,D).withStreamInfo("file",{name:$,dir:U,date:z,comment:N.comment||"",unixPermissions:N.unixPermissions,dosPermissions:N.dosPermissions}).pipe(M)}),M.entriesCount=P}catch($){M.error($)}return M}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,h,d){function c(){if(!(this instanceof c))return new c;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 p=new c;for(var m in this)typeof this[m]!="function"&&(p[m]=this[m]);return p}}(c.prototype=s("./object")).loadAsync=s("./load"),c.support=s("./support"),c.defaults=s("./defaults"),c.version="3.10.1",c.loadAsync=function(p,m){return new c().loadAsync(p,m)},c.external=s("./external"),h.exports=c},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,h,d){var c=s("./utils"),p=s("./external"),m=s("./utf8"),S=s("./zipEntries"),C=s("./stream/Crc32Probe"),M=s("./nodejsUtils");function P($){return new p.Promise(function(N,B){var D=$.decompressed.getContentWorker().pipe(new C);D.on("error",function(U){B(U)}).on("end",function(){D.streamInfo.crc32!==$.decompressed.crc32?B(new Error("Corrupted zip : CRC32 mismatch")):N()}).resume()})}h.exports=function($,N){var B=this;return N=c.extend(N||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:m.utf8decode}),M.isNode&&M.isStream($)?p.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):c.prepareContent("the loaded zip file",$,!0,N.optimizedBinaryString,N.base64).then(function(D){var U=new S(N);return U.load(D),U}).then(function(D){var U=[p.Promise.resolve(D)],z=D.files;if(N.checkCRC32)for(var E=0;E<z.length;E++)U.push(P(z[E]));return p.Promise.all(U)}).then(function(D){for(var U=D.shift(),z=U.files,E=0;E<z.length;E++){var O=z[E],x=O.fileNameStr,y=c.resolve(O.fileNameStr);B.file(y,O.decompressed,{binary:!0,optimizedBinaryString:!0,date:O.date,dir:O.dir,comment:O.fileCommentStr.length?O.fileCommentStr:null,unixPermissions:O.unixPermissions,dosPermissions:O.dosPermissions,createFolders:N.createFolders}),O.dir||(B.file(y).unsafeOriginalName=x)}return U.zipComment.length&&(B.comment=U.zipComment),B})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,h,d){var c=s("../utils"),p=s("../stream/GenericWorker");function m(S,C){p.call(this,"Nodejs stream input adapter for "+S),this._upstreamEnded=!1,this._bindStream(C)}c.inherits(m,p),m.prototype._bindStream=function(S){var C=this;(this._stream=S).pause(),S.on("data",function(M){C.push({data:M,meta:{percent:0}})}).on("error",function(M){C.isPaused?this.generatedError=M:C.error(M)}).on("end",function(){C.isPaused?C._upstreamEnded=!0:C.end()})},m.prototype.pause=function(){return!!p.prototype.pause.call(this)&&(this._stream.pause(),!0)},m.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},h.exports=m},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,h,d){var c=s("readable-stream").Readable;function p(m,S,C){c.call(this,S),this._helper=m;var M=this;m.on("data",function(P,$){M.push(P)||M._helper.pause(),C&&C($)}).on("error",function(P){M.emit("error",P)}).on("end",function(){M.push(null)})}s("../utils").inherits(p,c),p.prototype._read=function(){this._helper.resume()},h.exports=p},{"../utils":32,"readable-stream":16}],14:[function(s,h,d){h.exports={isNode:a!==void 0,newBufferFrom:function(c,p){if(a.from&&a.from!==Uint8Array.from)return a.from(c,p);if(typeof c=="number")throw new Error('The "data" argument must not be a number');return new a(c,p)},allocBuffer:function(c){if(a.alloc)return a.alloc(c);var p=new a(c);return p.fill(0),p},isBuffer:function(c){return a.isBuffer(c)},isStream:function(c){return c&&typeof c.on=="function"&&typeof c.pause=="function"&&typeof c.resume=="function"}}},{}],15:[function(s,h,d){function c(y,v,w){var _,A=m.getTypeOf(v),j=m.extend(w||{},M);j.date=j.date||new Date,j.compression!==null&&(j.compression=j.compression.toUpperCase()),typeof j.unixPermissions=="string"&&(j.unixPermissions=parseInt(j.unixPermissions,8)),j.unixPermissions&&16384&j.unixPermissions&&(j.dir=!0),j.dosPermissions&&16&j.dosPermissions&&(j.dir=!0),j.dir&&(y=z(y)),j.createFolders&&(_=U(y))&&E.call(this,_,!0);var L=A==="string"&&j.binary===!1&&j.base64===!1;w&&w.binary!==void 0||(j.binary=!L),(v instanceof P&&v.uncompressedSize===0||j.dir||!v||v.length===0)&&(j.base64=!1,j.binary=!0,v="",j.compression="STORE",A="string");var H;H=v instanceof P||v instanceof S?v:B.isNode&&B.isStream(v)?new D(y,v):m.prepareContent(y,v,j.binary,j.optimizedBinaryString,j.base64);var q=new $(y,H,j);this.files[y]=q}var p=s("./utf8"),m=s("./utils"),S=s("./stream/GenericWorker"),C=s("./stream/StreamHelper"),M=s("./defaults"),P=s("./compressedObject"),$=s("./zipObject"),N=s("./generate"),B=s("./nodejsUtils"),D=s("./nodejs/NodejsStreamInputAdapter"),U=function(y){y.slice(-1)==="/"&&(y=y.substring(0,y.length-1));var v=y.lastIndexOf("/");return 0<v?y.substring(0,v):""},z=function(y){return y.slice(-1)!=="/"&&(y+="/"),y},E=function(y,v){return v=v!==void 0?v:M.createFolders,y=z(y),this.files[y]||c.call(this,y,null,{dir:!0,createFolders:v}),this.files[y]};function O(y){return Object.prototype.toString.call(y)==="[object RegExp]"}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(y){var v,w,_;for(v in this.files)_=this.files[v],(w=v.slice(this.root.length,v.length))&&v.slice(0,this.root.length)===this.root&&y(w,_)},filter:function(y){var v=[];return this.forEach(function(w,_){y(w,_)&&v.push(_)}),v},file:function(y,v,w){if(arguments.length!==1)return y=this.root+y,c.call(this,y,v,w),this;if(O(y)){var _=y;return this.filter(function(j,L){return!L.dir&&_.test(j)})}var A=this.files[this.root+y];return A&&!A.dir?A:null},folder:function(y){if(!y)return this;if(O(y))return this.filter(function(A,j){return j.dir&&y.test(A)});var v=this.root+y,w=E.call(this,v),_=this.clone();return _.root=w.name,_},remove:function(y){y=this.root+y;var v=this.files[y];if(v||(y.slice(-1)!=="/"&&(y+="/"),v=this.files[y]),v&&!v.dir)delete this.files[y];else for(var w=this.filter(function(A,j){return j.name.slice(0,y.length)===y}),_=0;_<w.length;_++)delete this.files[w[_].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 v,w={};try{if((w=m.extend(y||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:p.utf8encode})).type=w.type.toLowerCase(),w.compression=w.compression.toUpperCase(),w.type==="binarystring"&&(w.type="string"),!w.type)throw new Error("No output type specified.");m.checkSupport(w.type),w.platform!=="darwin"&&w.platform!=="freebsd"&&w.platform!=="linux"&&w.platform!=="sunos"||(w.platform="UNIX"),w.platform==="win32"&&(w.platform="DOS");var _=w.comment||this.comment||"";v=N.generateWorker(this,w,_)}catch(A){(v=new S("error")).error(A)}return new C(v,w.type||"string",w.mimeType)},generateAsync:function(y,v){return this.generateInternalStream(y).accumulate(v)},generateNodeStream:function(y,v){return(y=y||{}).type||(y.type="nodebuffer"),this.generateInternalStream(y).toNodejsStream(v)}};h.exports=x},{"./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(s,h,d){h.exports=s("stream")},{stream:void 0}],17:[function(s,h,d){var c=s("./DataReader");function p(m){c.call(this,m);for(var S=0;S<this.data.length;S++)m[S]=255&m[S]}s("../utils").inherits(p,c),p.prototype.byteAt=function(m){return this.data[this.zero+m]},p.prototype.lastIndexOfSignature=function(m){for(var S=m.charCodeAt(0),C=m.charCodeAt(1),M=m.charCodeAt(2),P=m.charCodeAt(3),$=this.length-4;0<=$;--$)if(this.data[$]===S&&this.data[$+1]===C&&this.data[$+2]===M&&this.data[$+3]===P)return $-this.zero;return-1},p.prototype.readAndCheckSignature=function(m){var S=m.charCodeAt(0),C=m.charCodeAt(1),M=m.charCodeAt(2),P=m.charCodeAt(3),$=this.readData(4);return S===$[0]&&C===$[1]&&M===$[2]&&P===$[3]},p.prototype.readData=function(m){if(this.checkOffset(m),m===0)return[];var S=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,S},h.exports=p},{"../utils":32,"./DataReader":18}],18:[function(s,h,d){var c=s("../utils");function p(m){this.data=m,this.length=m.length,this.index=0,this.zero=0}p.prototype={checkOffset:function(m){this.checkIndex(this.index+m)},checkIndex:function(m){if(this.length<this.zero+m||m<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+m+"). Corrupted zip ?")},setIndex:function(m){this.checkIndex(m),this.index=m},skip:function(m){this.setIndex(this.index+m)},byteAt:function(){},readInt:function(m){var S,C=0;for(this.checkOffset(m),S=this.index+m-1;S>=this.index;S--)C=(C<<8)+this.byteAt(S);return this.index+=m,C},readString:function(m){return c.transformTo("string",this.readData(m))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var m=this.readInt(4);return new Date(Date.UTC(1980+(m>>25&127),(m>>21&15)-1,m>>16&31,m>>11&31,m>>5&63,(31&m)<<1))}},h.exports=p},{"../utils":32}],19:[function(s,h,d){var c=s("./Uint8ArrayReader");function p(m){c.call(this,m)}s("../utils").inherits(p,c),p.prototype.readData=function(m){this.checkOffset(m);var S=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,S},h.exports=p},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,h,d){var c=s("./DataReader");function p(m){c.call(this,m)}s("../utils").inherits(p,c),p.prototype.byteAt=function(m){return this.data.charCodeAt(this.zero+m)},p.prototype.lastIndexOfSignature=function(m){return this.data.lastIndexOf(m)-this.zero},p.prototype.readAndCheckSignature=function(m){return m===this.readData(4)},p.prototype.readData=function(m){this.checkOffset(m);var S=this.data.slice(this.zero+this.index,this.zero+this.index+m);return this.index+=m,S},h.exports=p},{"../utils":32,"./DataReader":18}],21:[function(s,h,d){var c=s("./ArrayReader");function p(m){c.call(this,m)}s("../utils").inherits(p,c),p.prototype.readData=function(m){if(this.checkOffset(m),m===0)return new Uint8Array(0);var S=this.data.subarray(this.zero+this.index,this.zero+this.index+m);return this.index+=m,S},h.exports=p},{"../utils":32,"./ArrayReader":17}],22:[function(s,h,d){var c=s("../utils"),p=s("../support"),m=s("./ArrayReader"),S=s("./StringReader"),C=s("./NodeBufferReader"),M=s("./Uint8ArrayReader");h.exports=function(P){var $=c.getTypeOf(P);return c.checkSupport($),$!=="string"||p.uint8array?$==="nodebuffer"?new C(P):p.uint8array?new M(c.transformTo("uint8array",P)):new m(c.transformTo("array",P)):new S(P)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,h,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,h,d){var c=s("./GenericWorker"),p=s("../utils");function m(S){c.call(this,"ConvertWorker to "+S),this.destType=S}p.inherits(m,c),m.prototype.processChunk=function(S){this.push({data:p.transformTo(this.destType,S.data),meta:S.meta})},h.exports=m},{"../utils":32,"./GenericWorker":28}],25:[function(s,h,d){var c=s("./GenericWorker"),p=s("../crc32");function m(){c.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(m,c),m.prototype.processChunk=function(S){this.streamInfo.crc32=p(S.data,this.streamInfo.crc32||0),this.push(S)},h.exports=m},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,h,d){var c=s("../utils"),p=s("./GenericWorker");function m(S){p.call(this,"DataLengthProbe for "+S),this.propName=S,this.withStreamInfo(S,0)}c.inherits(m,p),m.prototype.processChunk=function(S){if(S){var C=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=C+S.data.length}p.prototype.processChunk.call(this,S)},h.exports=m},{"../utils":32,"./GenericWorker":28}],27:[function(s,h,d){var c=s("../utils"),p=s("./GenericWorker");function m(S){p.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(M){C.dataIsReady=!0,C.data=M,C.max=M&&M.length||0,C.type=c.getTypeOf(M),C.isPaused||C._tickAndRepeat()},function(M){C.error(M)})}c.inherits(m,p),m.prototype.cleanUp=function(){p.prototype.cleanUp.call(this),this.data=null},m.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,c.delay(this._tickAndRepeat,[],this)),!0)},m.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(c.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},m.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}})},h.exports=m},{"../utils":32,"./GenericWorker":28}],28:[function(s,h,d){function c(p){this.name=p||"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}c.prototype={push:function(p){this.emit("data",p)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(p){this.emit("error",p)}return!0},error:function(p){return!this.isFinished&&(this.isPaused?this.generatedError=p:(this.isFinished=!0,this.emit("error",p),this.previous&&this.previous.error(p),this.cleanUp()),!0)},on:function(p,m){return this._listeners[p].push(m),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(p,m){if(this._listeners[p])for(var S=0;S<this._listeners[p].length;S++)this._listeners[p][S].call(this,m)},pipe:function(p){return p.registerPrevious(this)},registerPrevious:function(p){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=p.streamInfo,this.mergeStreamInfo(),this.previous=p;var m=this;return p.on("data",function(S){m.processChunk(S)}),p.on("end",function(){m.end()}),p.on("error",function(S){m.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 p=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),p=!0),this.previous&&this.previous.resume(),!p},flush:function(){},processChunk:function(p){this.push(p)},withStreamInfo:function(p,m){return this.extraStreamInfo[p]=m,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var p in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,p)&&(this.streamInfo[p]=this.extraStreamInfo[p])},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 p="Worker "+this.name;return this.previous?this.previous+" -> "+p:p}},h.exports=c},{}],29:[function(s,h,d){var c=s("../utils"),p=s("./ConvertWorker"),m=s("./GenericWorker"),S=s("../base64"),C=s("../support"),M=s("../external"),P=null;if(C.nodestream)try{P=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function $(N,B,D){var U=B;switch(B){case"blob":case"arraybuffer":U="uint8array";break;case"base64":U="string"}try{this._internalType=U,this._outputType=B,this._mimeType=D,c.checkSupport(U),this._worker=N.pipe(new p(U)),N.lock()}catch(z){this._worker=new m("error"),this._worker.error(z)}}$.prototype={accumulate:function(N){return function(B,D){return new M.Promise(function(U,z){var E=[],O=B._internalType,x=B._outputType,y=B._mimeType;B.on("data",function(v,w){E.push(v),D&&D(w)}).on("error",function(v){E=[],z(v)}).on("end",function(){try{var v=function(w,_,A){switch(w){case"blob":return c.newBlob(c.transformTo("arraybuffer",_),A);case"base64":return S.encode(_);default:return c.transformTo(w,_)}}(x,function(w,_){var A,j=0,L=null,H=0;for(A=0;A<_.length;A++)H+=_[A].length;switch(w){case"string":return _.join("");case"array":return Array.prototype.concat.apply([],_);case"uint8array":for(L=new Uint8Array(H),A=0;A<_.length;A++)L.set(_[A],j),j+=_[A].length;return L;case"nodebuffer":return a.concat(_);default:throw new Error("concat : unsupported type '"+w+"'")}}(O,E),y);U(v)}catch(w){z(w)}E=[]}).resume()})}(this,N)},on:function(N,B){var D=this;return N==="data"?this._worker.on(N,function(U){B.call(D,U.data,U.meta)}):this._worker.on(N,function(){c.delay(B,arguments,D)}),this},resume:function(){return c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(N){if(c.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new P(this,{objectMode:this._outputType!=="nodebuffer"},N)}},h.exports=$},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,h,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=a!==void 0,d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var c=new ArrayBuffer(0);try{d.blob=new Blob([c],{type:"application/zip"}).size===0}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);p.append(c),d.blob=p.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!s("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(s,h,d){for(var c=s("./utils"),p=s("./support"),m=s("./nodejsUtils"),S=s("./stream/GenericWorker"),C=new Array(256),M=0;M<256;M++)C[M]=252<=M?6:248<=M?5:240<=M?4:224<=M?3:192<=M?2:1;function P(){S.call(this,"utf-8 decode"),this.leftOver=null}function $(){S.call(this,"utf-8 encode")}C[254]=C[254]=1,d.utf8encode=function(N){return p.nodebuffer?m.newBufferFrom(N,"utf-8"):function(B){var D,U,z,E,O,x=B.length,y=0;for(E=0;E<x;E++)(64512&(U=B.charCodeAt(E)))==55296&&E+1<x&&(64512&(z=B.charCodeAt(E+1)))==56320&&(U=65536+(U-55296<<10)+(z-56320),E++),y+=U<128?1:U<2048?2:U<65536?3:4;for(D=p.uint8array?new Uint8Array(y):new Array(y),E=O=0;O<y;E++)(64512&(U=B.charCodeAt(E)))==55296&&E+1<x&&(64512&(z=B.charCodeAt(E+1)))==56320&&(U=65536+(U-55296<<10)+(z-56320),E++),U<128?D[O++]=U:(U<2048?D[O++]=192|U>>>6:(U<65536?D[O++]=224|U>>>12:(D[O++]=240|U>>>18,D[O++]=128|U>>>12&63),D[O++]=128|U>>>6&63),D[O++]=128|63&U);return D}(N)},d.utf8decode=function(N){return p.nodebuffer?c.transformTo("nodebuffer",N).toString("utf-8"):function(B){var D,U,z,E,O=B.length,x=new Array(2*O);for(D=U=0;D<O;)if((z=B[D++])<128)x[U++]=z;else if(4<(E=C[z]))x[U++]=65533,D+=E-1;else{for(z&=E===2?31:E===3?15:7;1<E&&D<O;)z=z<<6|63&B[D++],E--;1<E?x[U++]=65533:z<65536?x[U++]=z:(z-=65536,x[U++]=55296|z>>10&1023,x[U++]=56320|1023&z)}return x.length!==U&&(x.subarray?x=x.subarray(0,U):x.length=U),c.applyFromCharCode(x)}(N=c.transformTo(p.uint8array?"uint8array":"array",N))},c.inherits(P,S),P.prototype.processChunk=function(N){var B=c.transformTo(p.uint8array?"uint8array":"array",N.data);if(this.leftOver&&this.leftOver.length){if(p.uint8array){var D=B;(B=new Uint8Array(D.length+this.leftOver.length)).set(this.leftOver,0),B.set(D,this.leftOver.length)}else B=this.leftOver.concat(B);this.leftOver=null}var U=function(E,O){var x;for((O=O||E.length)>E.length&&(O=E.length),x=O-1;0<=x&&(192&E[x])==128;)x--;return x<0||x===0?O:x+C[E[x]]>O?x:O}(B),z=B;U!==B.length&&(p.uint8array?(z=B.subarray(0,U),this.leftOver=B.subarray(U,B.length)):(z=B.slice(0,U),this.leftOver=B.slice(U,B.length))),this.push({data:d.utf8decode(z),meta:N.meta})},P.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=P,c.inherits($,S),$.prototype.processChunk=function(N){this.push({data:d.utf8encode(N.data),meta:N.meta})},d.Utf8EncodeWorker=$},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,h,d){var c=s("./support"),p=s("./base64"),m=s("./nodejsUtils"),S=s("./external");function C(D){return D}function M(D,U){for(var z=0;z<D.length;++z)U[z]=255&D.charCodeAt(z);return U}s("setimmediate"),d.newBlob=function(D,U){d.checkSupport("blob");try{return new Blob([D],{type:U})}catch{try{var z=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return z.append(D),z.getBlob(U)}catch{throw new Error("Bug : can't construct the Blob.")}}};var P={stringifyByChunk:function(D,U,z){var E=[],O=0,x=D.length;if(x<=z)return String.fromCharCode.apply(null,D);for(;O<x;)U==="array"||U==="nodebuffer"?E.push(String.fromCharCode.apply(null,D.slice(O,Math.min(O+z,x)))):E.push(String.fromCharCode.apply(null,D.subarray(O,Math.min(O+z,x)))),O+=z;return E.join("")},stringifyByChar:function(D){for(var U="",z=0;z<D.length;z++)U+=String.fromCharCode(D[z]);return U},applyCanBeUsed:{uint8array:function(){try{return c.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return c.nodebuffer&&String.fromCharCode.apply(null,m.allocBuffer(1)).length===1}catch{return!1}}()}};function $(D){var U=65536,z=d.getTypeOf(D),E=!0;if(z==="uint8array"?E=P.applyCanBeUsed.uint8array:z==="nodebuffer"&&(E=P.applyCanBeUsed.nodebuffer),E)for(;1<U;)try{return P.stringifyByChunk(D,z,U)}catch{U=Math.floor(U/2)}return P.stringifyByChar(D)}function N(D,U){for(var z=0;z<D.length;z++)U[z]=D[z];return U}d.applyFromCharCode=$;var B={};B.string={string:C,array:function(D){return M(D,new Array(D.length))},arraybuffer:function(D){return B.string.uint8array(D).buffer},uint8array:function(D){return M(D,new Uint8Array(D.length))},nodebuffer:function(D){return M(D,m.allocBuffer(D.length))}},B.array={string:$,array:C,arraybuffer:function(D){return new Uint8Array(D).buffer},uint8array:function(D){return new Uint8Array(D)},nodebuffer:function(D){return m.newBufferFrom(D)}},B.arraybuffer={string:function(D){return $(new Uint8Array(D))},array:function(D){return N(new Uint8Array(D),new Array(D.byteLength))},arraybuffer:C,uint8array:function(D){return new Uint8Array(D)},nodebuffer:function(D){return m.newBufferFrom(new Uint8Array(D))}},B.uint8array={string:$,array:function(D){return N(D,new Array(D.length))},arraybuffer:function(D){return D.buffer},uint8array:C,nodebuffer:function(D){return m.newBufferFrom(D)}},B.nodebuffer={string:$,array:function(D){return N(D,new Array(D.length))},arraybuffer:function(D){return B.nodebuffer.uint8array(D).buffer},uint8array:function(D){return N(D,new Uint8Array(D.length))},nodebuffer:C},d.transformTo=function(D,U){if(U=U||"",!D)return U;d.checkSupport(D);var z=d.getTypeOf(U);return B[z][D](U)},d.resolve=function(D){for(var U=D.split("/"),z=[],E=0;E<U.length;E++){var O=U[E];O==="."||O===""&&E!==0&&E!==U.length-1||(O===".."?z.pop():z.push(O))}return z.join("/")},d.getTypeOf=function(D){return typeof D=="string"?"string":Object.prototype.toString.call(D)==="[object Array]"?"array":c.nodebuffer&&m.isBuffer(D)?"nodebuffer":c.uint8array&&D instanceof Uint8Array?"uint8array":c.arraybuffer&&D instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(D){if(!c[D.toLowerCase()])throw new Error(D+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(D){var U,z,E="";for(z=0;z<(D||"").length;z++)E+="\\x"+((U=D.charCodeAt(z))<16?"0":"")+U.toString(16).toUpperCase();return E},d.delay=function(D,U,z){i(function(){D.apply(z||null,U||[])})},d.inherits=function(D,U){function z(){}z.prototype=U.prototype,D.prototype=new z},d.extend=function(){var D,U,z={};for(D=0;D<arguments.length;D++)for(U in arguments[D])Object.prototype.hasOwnProperty.call(arguments[D],U)&&z[U]===void 0&&(z[U]=arguments[D][U]);return z},d.prepareContent=function(D,U,z,E,O){return S.Promise.resolve(U).then(function(x){return c.blob&&(x instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x))!==-1)&&typeof FileReader<"u"?new S.Promise(function(y,v){var w=new FileReader;w.onload=function(_){y(_.target.result)},w.onerror=function(_){v(_.target.error)},w.readAsArrayBuffer(x)}):x}).then(function(x){var y=d.getTypeOf(x);return y?(y==="arraybuffer"?x=d.transformTo("uint8array",x):y==="string"&&(O?x=p.decode(x):z&&E!==!0&&(x=function(v){return M(v,c.uint8array?new Uint8Array(v.length):new Array(v.length))}(x))),x):S.Promise.reject(new Error("Can't read the data of '"+D+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,h,d){var c=s("./reader/readerFor"),p=s("./utils"),m=s("./signature"),S=s("./zipEntry"),C=s("./support");function M(P){this.files=[],this.loadOptions=P}M.prototype={checkSignature:function(P){if(!this.reader.readAndCheckSignature(P)){this.reader.index-=4;var $=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+p.pretty($)+", expected "+p.pretty(P)+")")}},isSignature:function(P,$){var N=this.reader.index;this.reader.setIndex(P);var B=this.reader.readString(4)===$;return this.reader.setIndex(N),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 P=this.reader.readData(this.zipCommentLength),$=C.uint8array?"uint8array":"array",N=p.transformTo($,P);this.zipComment=this.loadOptions.decodeFileName(N)},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 P,$,N,B=this.zip64EndOfCentralSize-44;0<B;)P=this.reader.readInt(2),$=this.reader.readInt(4),N=this.reader.readData($),this.zip64ExtensibleData[P]={id:P,length:$,value:N}},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 P,$;for(P=0;P<this.files.length;P++)$=this.files[P],this.reader.setIndex($.localHeaderOffset),this.checkSignature(m.LOCAL_FILE_HEADER),$.readLocalPart(this.reader),$.handleUTF8(),$.processAttributes()},readCentralDir:function(){var P;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(m.CENTRAL_FILE_HEADER);)(P=new S({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(P);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 P=this.reader.lastIndexOfSignature(m.CENTRAL_DIRECTORY_END);if(P<0)throw this.isSignature(0,m.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(P);var $=P;if(this.checkSignature(m.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===p.MAX_VALUE_16BITS||this.diskWithCentralDirStart===p.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===p.MAX_VALUE_16BITS||this.centralDirRecords===p.MAX_VALUE_16BITS||this.centralDirSize===p.MAX_VALUE_32BITS||this.centralDirOffset===p.MAX_VALUE_32BITS){if(this.zip64=!0,(P=this.reader.lastIndexOfSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(P),this.checkSignature(m.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,m.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(m.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(m.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var N=this.centralDirOffset+this.centralDirSize;this.zip64&&(N+=20,N+=12+this.zip64EndOfCentralSize);var B=$-N;if(0<B)this.isSignature($,m.CENTRAL_FILE_HEADER)||(this.reader.zero=B);else if(B<0)throw new Error("Corrupted zip: missing "+Math.abs(B)+" bytes.")},prepareReader:function(P){this.reader=c(P)},load:function(P){this.prepareReader(P),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},h.exports=M},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,h,d){var c=s("./reader/readerFor"),p=s("./utils"),m=s("./compressedObject"),S=s("./crc32"),C=s("./utf8"),M=s("./compressions"),P=s("./support");function $(N,B){this.options=N,this.loadOptions=B}$.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(N){var B,D;if(N.skip(22),this.fileNameLength=N.readInt(2),D=N.readInt(2),this.fileName=N.readData(this.fileNameLength),N.skip(D),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(U){for(var z in M)if(Object.prototype.hasOwnProperty.call(M,z)&&M[z].magic===U)return M[z];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+p.pretty(this.compressionMethod)+" unknown (inner file : "+p.transformTo("string",this.fileName)+")");this.decompressed=new m(this.compressedSize,this.uncompressedSize,this.crc32,B,N.readData(this.compressedSize))},readCentralPart:function(N){this.versionMadeBy=N.readInt(2),N.skip(2),this.bitFlag=N.readInt(2),this.compressionMethod=N.readString(2),this.date=N.readDate(),this.crc32=N.readInt(4),this.compressedSize=N.readInt(4),this.uncompressedSize=N.readInt(4);var B=N.readInt(2);if(this.extraFieldsLength=N.readInt(2),this.fileCommentLength=N.readInt(2),this.diskNumberStart=N.readInt(2),this.internalFileAttributes=N.readInt(2),this.externalFileAttributes=N.readInt(4),this.localHeaderOffset=N.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");N.skip(B),this.readExtraFields(N),this.parseZIP64ExtraField(N),this.fileComment=N.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var N=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),N==0&&(this.dosPermissions=63&this.externalFileAttributes),N==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var N=c(this.extraFields[1].value);this.uncompressedSize===p.MAX_VALUE_32BITS&&(this.uncompressedSize=N.readInt(8)),this.compressedSize===p.MAX_VALUE_32BITS&&(this.compressedSize=N.readInt(8)),this.localHeaderOffset===p.MAX_VALUE_32BITS&&(this.localHeaderOffset=N.readInt(8)),this.diskNumberStart===p.MAX_VALUE_32BITS&&(this.diskNumberStart=N.readInt(4))}},readExtraFields:function(N){var B,D,U,z=N.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});N.index+4<z;)B=N.readInt(2),D=N.readInt(2),U=N.readData(D),this.extraFields[B]={id:B,length:D,value:U};N.setIndex(z)},handleUTF8:function(){var N=P.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 D=p.transformTo(N,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(D)}var U=this.findExtraFieldUnicodeComment();if(U!==null)this.fileCommentStr=U;else{var z=p.transformTo(N,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(z)}}},findExtraFieldUnicodePath:function(){var N=this.extraFields[28789];if(N){var B=c(N.value);return B.readInt(1)!==1||S(this.fileName)!==B.readInt(4)?null:C.utf8decode(B.readData(N.length-5))}return null},findExtraFieldUnicodeComment:function(){var N=this.extraFields[25461];if(N){var B=c(N.value);return B.readInt(1)!==1||S(this.fileComment)!==B.readInt(4)?null:C.utf8decode(B.readData(N.length-5))}return null}},h.exports=$},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,h,d){function c(B,D,U){this.name=B,this.dir=U.dir,this.date=U.date,this.comment=U.comment,this.unixPermissions=U.unixPermissions,this.dosPermissions=U.dosPermissions,this._data=D,this._dataBinary=U.binary,this.options={compression:U.compression,compressionOptions:U.compressionOptions}}var p=s("./stream/StreamHelper"),m=s("./stream/DataWorker"),S=s("./utf8"),C=s("./compressedObject"),M=s("./stream/GenericWorker");c.prototype={internalStream:function(B){var D=null,U="string";try{if(!B)throw new Error("No output type specified.");var z=(U=B.toLowerCase())==="string"||U==="text";U!=="binarystring"&&U!=="text"||(U="string"),D=this._decompressWorker();var E=!this._dataBinary;E&&!z&&(D=D.pipe(new S.Utf8EncodeWorker)),!E&&z&&(D=D.pipe(new S.Utf8DecodeWorker))}catch(O){(D=new M("error")).error(O)}return new p(D,U,"")},async:function(B,D){return this.internalStream(B).accumulate(D)},nodeStream:function(B,D){return this.internalStream(B||"nodebuffer").toNodejsStream(D)},_compressWorker:function(B,D){if(this._data instanceof C&&this._data.compression.magic===B.magic)return this._data.getCompressedWorker();var U=this._decompressWorker();return this._dataBinary||(U=U.pipe(new S.Utf8EncodeWorker)),C.createWorkerFrom(U,B,D)},_decompressWorker:function(){return this._data instanceof C?this._data.getContentWorker():this._data instanceof M?this._data:new m(this._data)}};for(var P=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],$=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},N=0;N<P.length;N++)c.prototype[P[N]]=$;h.exports=c},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,h,d){(function(c){var p,m,S=c.MutationObserver||c.WebKitMutationObserver;if(S){var C=0,M=new S(B),P=c.document.createTextNode("");M.observe(P,{characterData:!0}),p=function(){P.data=C=++C%2}}else if(c.setImmediate||c.MessageChannel===void 0)p="document"in c&&"onreadystatechange"in c.document.createElement("script")?function(){var D=c.document.createElement("script");D.onreadystatechange=function(){B(),D.onreadystatechange=null,D.parentNode.removeChild(D),D=null},c.document.documentElement.appendChild(D)}:function(){setTimeout(B,0)};else{var $=new c.MessageChannel;$.port1.onmessage=B,p=function(){$.port2.postMessage(0)}}var N=[];function B(){var D,U;m=!0;for(var z=N.length;z;){for(U=N,N=[],D=-1;++D<z;)U[D]();z=N.length}m=!1}h.exports=function(D){N.push(D)!==1||m||p()}}).call(this,o!==void 0?o:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,h,d){var c=s("immediate");function p(){}var m={},S=["REJECTED"],C=["FULFILLED"],M=["PENDING"];function P(z){if(typeof z!="function")throw new TypeError("resolver must be a function");this.state=M,this.queue=[],this.outcome=void 0,z!==p&&D(this,z)}function $(z,E,O){this.promise=z,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof O=="function"&&(this.onRejected=O,this.callRejected=this.otherCallRejected)}function N(z,E,O){c(function(){var x;try{x=E(O)}catch(y){return m.reject(z,y)}x===z?m.reject(z,new TypeError("Cannot resolve promise with itself")):m.resolve(z,x)})}function B(z){var E=z&&z.then;if(z&&(typeof z=="object"||typeof z=="function")&&typeof E=="function")return function(){E.apply(z,arguments)}}function D(z,E){var O=!1;function x(w){O||(O=!0,m.reject(z,w))}function y(w){O||(O=!0,m.resolve(z,w))}var v=U(function(){E(y,x)});v.status==="error"&&x(v.value)}function U(z,E){var O={};try{O.value=z(E),O.status="success"}catch(x){O.status="error",O.value=x}return O}(h.exports=P).prototype.finally=function(z){if(typeof z!="function")return this;var E=this.constructor;return this.then(function(O){return E.resolve(z()).then(function(){return O})},function(O){return E.resolve(z()).then(function(){throw O})})},P.prototype.catch=function(z){return this.then(null,z)},P.prototype.then=function(z,E){if(typeof z!="function"&&this.state===C||typeof E!="function"&&this.state===S)return this;var O=new this.constructor(p);return this.state!==M?N(O,this.state===C?z:E,this.outcome):this.queue.push(new $(O,z,E)),O},$.prototype.callFulfilled=function(z){m.resolve(this.promise,z)},$.prototype.otherCallFulfilled=function(z){N(this.promise,this.onFulfilled,z)},$.prototype.callRejected=function(z){m.reject(this.promise,z)},$.prototype.otherCallRejected=function(z){N(this.promise,this.onRejected,z)},m.resolve=function(z,E){var O=U(B,E);if(O.status==="error")return m.reject(z,O.value);var x=O.value;if(x)D(z,x);else{z.state=C,z.outcome=E;for(var y=-1,v=z.queue.length;++y<v;)z.queue[y].callFulfilled(E)}return z},m.reject=function(z,E){z.state=S,z.outcome=E;for(var O=-1,x=z.queue.length;++O<x;)z.queue[O].callRejected(E);return z},P.resolve=function(z){return z instanceof this?z:m.resolve(new this(p),z)},P.reject=function(z){var E=new this(p);return m.reject(E,z)},P.all=function(z){var E=this;if(Object.prototype.toString.call(z)!=="[object Array]")return this.reject(new TypeError("must be an array"));var O=z.length,x=!1;if(!O)return this.resolve([]);for(var y=new Array(O),v=0,w=-1,_=new this(p);++w<O;)A(z[w],w);return _;function A(j,L){E.resolve(j).then(function(H){y[L]=H,++v!==O||x||(x=!0,m.resolve(_,y))},function(H){x||(x=!0,m.reject(_,H))})}},P.race=function(z){if(Object.prototype.toString.call(z)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=z.length,O=!1;if(!E)return this.resolve([]);for(var x,y=-1,v=new this(p);++y<E;)x=z[y],this.resolve(x).then(function(w){O||(O=!0,m.resolve(v,w))},function(w){O||(O=!0,m.reject(v,w))});return v}},{immediate:36}],38:[function(s,h,d){var c={};(0,s("./lib/utils/common").assign)(c,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),h.exports=c},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,h,d){var c=s("./zlib/deflate"),p=s("./utils/common"),m=s("./utils/strings"),S=s("./zlib/messages"),C=s("./zlib/zstream"),M=Object.prototype.toString;function P(N){if(!(this instanceof P))return new P(N);this.options=p.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},N||{});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 D=c.deflateInit2(this.strm,B.level,B.method,B.windowBits,B.memLevel,B.strategy);if(D!==0)throw new Error(S[D]);if(B.header&&c.deflateSetHeader(this.strm,B.header),B.dictionary){var U;if(U=typeof B.dictionary=="string"?m.string2buf(B.dictionary):M.call(B.dictionary)==="[object ArrayBuffer]"?new Uint8Array(B.dictionary):B.dictionary,(D=c.deflateSetDictionary(this.strm,U))!==0)throw new Error(S[D]);this._dict_set=!0}}function $(N,B){var D=new P(B);if(D.push(N,!0),D.err)throw D.msg||S[D.err];return D.result}P.prototype.push=function(N,B){var D,U,z=this.strm,E=this.options.chunkSize;if(this.ended)return!1;U=B===~~B?B:B===!0?4:0,typeof N=="string"?z.input=m.string2buf(N):M.call(N)==="[object ArrayBuffer]"?z.input=new Uint8Array(N):z.input=N,z.next_in=0,z.avail_in=z.input.length;do{if(z.avail_out===0&&(z.output=new p.Buf8(E),z.next_out=0,z.avail_out=E),(D=c.deflate(z,U))!==1&&D!==0)return this.onEnd(D),!(this.ended=!0);z.avail_out!==0&&(z.avail_in!==0||U!==4&&U!==2)||(this.options.to==="string"?this.onData(m.buf2binstring(p.shrinkBuf(z.output,z.next_out))):this.onData(p.shrinkBuf(z.output,z.next_out)))}while((0<z.avail_in||z.avail_out===0)&&D!==1);return U===4?(D=c.deflateEnd(this.strm),this.onEnd(D),this.ended=!0,D===0):U!==2||(this.onEnd(0),!(z.avail_out=0))},P.prototype.onData=function(N){this.chunks.push(N)},P.prototype.onEnd=function(N){N===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=p.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},d.Deflate=P,d.deflate=$,d.deflateRaw=function(N,B){return(B=B||{}).raw=!0,$(N,B)},d.gzip=function(N,B){return(B=B||{}).gzip=!0,$(N,B)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,h,d){var c=s("./zlib/inflate"),p=s("./utils/common"),m=s("./utils/strings"),S=s("./zlib/constants"),C=s("./zlib/messages"),M=s("./zlib/zstream"),P=s("./zlib/gzheader"),$=Object.prototype.toString;function N(D){if(!(this instanceof N))return new N(D);this.options=p.assign({chunkSize:16384,windowBits:0,to:""},D||{});var U=this.options;U.raw&&0<=U.windowBits&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),!(0<=U.windowBits&&U.windowBits<16)||D&&D.windowBits||(U.windowBits+=32),15<U.windowBits&&U.windowBits<48&&!(15&U.windowBits)&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new M,this.strm.avail_out=0;var z=c.inflateInit2(this.strm,U.windowBits);if(z!==S.Z_OK)throw new Error(C[z]);this.header=new P,c.inflateGetHeader(this.strm,this.header)}function B(D,U){var z=new N(U);if(z.push(D,!0),z.err)throw z.msg||C[z.err];return z.result}N.prototype.push=function(D,U){var z,E,O,x,y,v,w=this.strm,_=this.options.chunkSize,A=this.options.dictionary,j=!1;if(this.ended)return!1;E=U===~~U?U:U===!0?S.Z_FINISH:S.Z_NO_FLUSH,typeof D=="string"?w.input=m.binstring2buf(D):$.call(D)==="[object ArrayBuffer]"?w.input=new Uint8Array(D):w.input=D,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new p.Buf8(_),w.next_out=0,w.avail_out=_),(z=c.inflate(w,S.Z_NO_FLUSH))===S.Z_NEED_DICT&&A&&(v=typeof A=="string"?m.string2buf(A):$.call(A)==="[object ArrayBuffer]"?new Uint8Array(A):A,z=c.inflateSetDictionary(this.strm,v)),z===S.Z_BUF_ERROR&&j===!0&&(z=S.Z_OK,j=!1),z!==S.Z_STREAM_END&&z!==S.Z_OK)return this.onEnd(z),!(this.ended=!0);w.next_out&&(w.avail_out!==0&&z!==S.Z_STREAM_END&&(w.avail_in!==0||E!==S.Z_FINISH&&E!==S.Z_SYNC_FLUSH)||(this.options.to==="string"?(O=m.utf8border(w.output,w.next_out),x=w.next_out-O,y=m.buf2string(w.output,O),w.next_out=x,w.avail_out=_-x,x&&p.arraySet(w.output,w.output,O,x,0),this.onData(y)):this.onData(p.shrinkBuf(w.output,w.next_out)))),w.avail_in===0&&w.avail_out===0&&(j=!0)}while((0<w.avail_in||w.avail_out===0)&&z!==S.Z_STREAM_END);return z===S.Z_STREAM_END&&(E=S.Z_FINISH),E===S.Z_FINISH?(z=c.inflateEnd(this.strm),this.onEnd(z),this.ended=!0,z===S.Z_OK):E!==S.Z_SYNC_FLUSH||(this.onEnd(S.Z_OK),!(w.avail_out=0))},N.prototype.onData=function(D){this.chunks.push(D)},N.prototype.onEnd=function(D){D===S.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=p.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},d.Inflate=N,d.inflate=B,d.inflateRaw=function(D,U){return(U=U||{}).raw=!0,B(D,U)},d.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(s,h,d){var c=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(S){for(var C=Array.prototype.slice.call(arguments,1);C.length;){var M=C.shift();if(M){if(typeof M!="object")throw new TypeError(M+"must be non-object");for(var P in M)M.hasOwnProperty(P)&&(S[P]=M[P])}}return S},d.shrinkBuf=function(S,C){return S.length===C?S:S.subarray?S.subarray(0,C):(S.length=C,S)};var p={arraySet:function(S,C,M,P,$){if(C.subarray&&S.subarray)S.set(C.subarray(M,M+P),$);else for(var N=0;N<P;N++)S[$+N]=C[M+N]},flattenChunks:function(S){var C,M,P,$,N,B;for(C=P=0,M=S.length;C<M;C++)P+=S[C].length;for(B=new Uint8Array(P),C=$=0,M=S.length;C<M;C++)N=S[C],B.set(N,$),$+=N.length;return B}},m={arraySet:function(S,C,M,P,$){for(var N=0;N<P;N++)S[$+N]=C[M+N]},flattenChunks:function(S){return[].concat.apply([],S)}};d.setTyped=function(S){S?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,p)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,m))},d.setTyped(c)},{}],42:[function(s,h,d){var c=s("./common"),p=!0,m=!0;try{String.fromCharCode.apply(null,[0])}catch{p=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{m=!1}for(var S=new c.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 M(P,$){if($<65537&&(P.subarray&&m||!P.subarray&&p))return String.fromCharCode.apply(null,c.shrinkBuf(P,$));for(var N="",B=0;B<$;B++)N+=String.fromCharCode(P[B]);return N}S[254]=S[254]=1,d.string2buf=function(P){var $,N,B,D,U,z=P.length,E=0;for(D=0;D<z;D++)(64512&(N=P.charCodeAt(D)))==55296&&D+1<z&&(64512&(B=P.charCodeAt(D+1)))==56320&&(N=65536+(N-55296<<10)+(B-56320),D++),E+=N<128?1:N<2048?2:N<65536?3:4;for($=new c.Buf8(E),D=U=0;U<E;D++)(64512&(N=P.charCodeAt(D)))==55296&&D+1<z&&(64512&(B=P.charCodeAt(D+1)))==56320&&(N=65536+(N-55296<<10)+(B-56320),D++),N<128?$[U++]=N:(N<2048?$[U++]=192|N>>>6:(N<65536?$[U++]=224|N>>>12:($[U++]=240|N>>>18,$[U++]=128|N>>>12&63),$[U++]=128|N>>>6&63),$[U++]=128|63&N);return $},d.buf2binstring=function(P){return M(P,P.length)},d.binstring2buf=function(P){for(var $=new c.Buf8(P.length),N=0,B=$.length;N<B;N++)$[N]=P.charCodeAt(N);return $},d.buf2string=function(P,$){var N,B,D,U,z=$||P.length,E=new Array(2*z);for(N=B=0;N<z;)if((D=P[N++])<128)E[B++]=D;else if(4<(U=S[D]))E[B++]=65533,N+=U-1;else{for(D&=U===2?31:U===3?15:7;1<U&&N<z;)D=D<<6|63&P[N++],U--;1<U?E[B++]=65533:D<65536?E[B++]=D:(D-=65536,E[B++]=55296|D>>10&1023,E[B++]=56320|1023&D)}return M(E,B)},d.utf8border=function(P,$){var N;for(($=$||P.length)>P.length&&($=P.length),N=$-1;0<=N&&(192&P[N])==128;)N--;return N<0||N===0?$:N+S[P[N]]>$?N:$}},{"./common":41}],43:[function(s,h,d){h.exports=function(c,p,m,S){for(var C=65535&c|0,M=c>>>16&65535|0,P=0;m!==0;){for(m-=P=2e3<m?2e3:m;M=M+(C=C+p[S++]|0)|0,--P;);C%=65521,M%=65521}return C|M<<16|0}},{}],44:[function(s,h,d){h.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(s,h,d){var c=function(){for(var p,m=[],S=0;S<256;S++){p=S;for(var C=0;C<8;C++)p=1&p?3988292384^p>>>1:p>>>1;m[S]=p}return m}();h.exports=function(p,m,S,C){var M=c,P=C+S;p^=-1;for(var $=C;$<P;$++)p=p>>>8^M[255&(p^m[$])];return-1^p}},{}],46:[function(s,h,d){var c,p=s("../utils/common"),m=s("./trees"),S=s("./adler32"),C=s("./crc32"),M=s("./messages"),P=-2,$=258,N=262,B=113;function D(F,W){return F.msg=M[W],W}function U(F){return(F<<1)-(4<F?9:0)}function z(F){for(var W=F.length;0<=--W;)F[W]=0}function E(F){var W=F.state,I=W.pending;I>F.avail_out&&(I=F.avail_out),I!==0&&(p.arraySet(F.output,W.pending_buf,W.pending_out,I,F.next_out),F.next_out+=I,W.pending_out+=I,F.total_out+=I,F.avail_out-=I,W.pending-=I,W.pending===0&&(W.pending_out=0))}function O(F,W){m._tr_flush_block(F,0<=F.block_start?F.block_start:-1,F.strstart-F.block_start,W),F.block_start=F.strstart,E(F.strm)}function x(F,W){F.pending_buf[F.pending++]=W}function y(F,W){F.pending_buf[F.pending++]=W>>>8&255,F.pending_buf[F.pending++]=255&W}function v(F,W){var I,R,V=F.max_chain_length,K=F.strstart,Z=F.prev_length,Y=F.nice_match,J=F.strstart>F.w_size-N?F.strstart-(F.w_size-N):0,nt=F.window,it=F.w_mask,G=F.prev,tt=F.strstart+$,et=nt[K+Z-1],ot=nt[K+Z];F.prev_length>=F.good_match&&(V>>=2),Y>F.lookahead&&(Y=F.lookahead);do if(nt[(I=W)+Z]===ot&&nt[I+Z-1]===et&&nt[I]===nt[K]&&nt[++I]===nt[K+1]){K+=2,I++;do;while(nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&nt[++K]===nt[++I]&&K<tt);if(R=$-(tt-K),K=tt-$,Z<R){if(F.match_start=W,Y<=(Z=R))break;et=nt[K+Z-1],ot=nt[K+Z]}}while((W=G[W&it])>J&&--V!=0);return Z<=F.lookahead?Z:F.lookahead}function w(F){var W,I,R,V,K,Z,Y,J,nt,it,G=F.w_size;do{if(V=F.window_size-F.lookahead-F.strstart,F.strstart>=G+(G-N)){for(p.arraySet(F.window,F.window,G,G,0),F.match_start-=G,F.strstart-=G,F.block_start-=G,W=I=F.hash_size;R=F.head[--W],F.head[W]=G<=R?R-G:0,--I;);for(W=I=G;R=F.prev[--W],F.prev[W]=G<=R?R-G:0,--I;);V+=G}if(F.strm.avail_in===0)break;if(Z=F.strm,Y=F.window,J=F.strstart+F.lookahead,it=void 0,(nt=V)<(it=Z.avail_in)&&(it=nt),I=it===0?0:(Z.avail_in-=it,p.arraySet(Y,Z.input,Z.next_in,it,J),Z.state.wrap===1?Z.adler=S(Z.adler,Y,it,J):Z.state.wrap===2&&(Z.adler=C(Z.adler,Y,it,J)),Z.next_in+=it,Z.total_in+=it,it),F.lookahead+=I,F.lookahead+F.insert>=3)for(K=F.strstart-F.insert,F.ins_h=F.window[K],F.ins_h=(F.ins_h<<F.hash_shift^F.window[K+1])&F.hash_mask;F.insert&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[K+3-1])&F.hash_mask,F.prev[K&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=K,K++,F.insert--,!(F.lookahead+F.insert<3)););}while(F.lookahead<N&&F.strm.avail_in!==0)}function _(F,W){for(var I,R;;){if(F.lookahead<N){if(w(F),F.lookahead<N&&W===0)return 1;if(F.lookahead===0)break}if(I=0,F.lookahead>=3&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+3-1])&F.hash_mask,I=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),I!==0&&F.strstart-I<=F.w_size-N&&(F.match_length=v(F,I)),F.match_length>=3)if(R=m._tr_tally(F,F.strstart-F.match_start,F.match_length-3),F.lookahead-=F.match_length,F.match_length<=F.max_lazy_match&&F.lookahead>=3){for(F.match_length--;F.strstart++,F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+3-1])&F.hash_mask,I=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart,--F.match_length!=0;);F.strstart++}else F.strstart+=F.match_length,F.match_length=0,F.ins_h=F.window[F.strstart],F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+1])&F.hash_mask;else R=m._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++;if(R&&(O(F,!1),F.strm.avail_out===0))return 1}return F.insert=F.strstart<2?F.strstart:2,W===4?(O(F,!0),F.strm.avail_out===0?3:4):F.last_lit&&(O(F,!1),F.strm.avail_out===0)?1:2}function A(F,W){for(var I,R,V;;){if(F.lookahead<N){if(w(F),F.lookahead<N&&W===0)return 1;if(F.lookahead===0)break}if(I=0,F.lookahead>=3&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+3-1])&F.hash_mask,I=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),F.prev_length=F.match_length,F.prev_match=F.match_start,F.match_length=2,I!==0&&F.prev_length<F.max_lazy_match&&F.strstart-I<=F.w_size-N&&(F.match_length=v(F,I),F.match_length<=5&&(F.strategy===1||F.match_length===3&&4096<F.strstart-F.match_start)&&(F.match_length=2)),F.prev_length>=3&&F.match_length<=F.prev_length){for(V=F.strstart+F.lookahead-3,R=m._tr_tally(F,F.strstart-1-F.prev_match,F.prev_length-3),F.lookahead-=F.prev_length-1,F.prev_length-=2;++F.strstart<=V&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+3-1])&F.hash_mask,I=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),--F.prev_length!=0;);if(F.match_available=0,F.match_length=2,F.strstart++,R&&(O(F,!1),F.strm.avail_out===0))return 1}else if(F.match_available){if((R=m._tr_tally(F,0,F.window[F.strstart-1]))&&O(F,!1),F.strstart++,F.lookahead--,F.strm.avail_out===0)return 1}else F.match_available=1,F.strstart++,F.lookahead--}return F.match_available&&(R=m._tr_tally(F,0,F.window[F.strstart-1]),F.match_available=0),F.insert=F.strstart<2?F.strstart:2,W===4?(O(F,!0),F.strm.avail_out===0?3:4):F.last_lit&&(O(F,!1),F.strm.avail_out===0)?1:2}function j(F,W,I,R,V){this.good_length=F,this.max_lazy=W,this.nice_length=I,this.max_chain=R,this.func=V}function L(){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 p.Buf16(1146),this.dyn_dtree=new p.Buf16(122),this.bl_tree=new p.Buf16(78),z(this.dyn_ltree),z(this.dyn_dtree),z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new p.Buf16(16),this.heap=new p.Buf16(573),z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(573),z(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 H(F){var W;return F&&F.state?(F.total_in=F.total_out=0,F.data_type=2,(W=F.state).pending=0,W.pending_out=0,W.wrap<0&&(W.wrap=-W.wrap),W.status=W.wrap?42:B,F.adler=W.wrap===2?0:1,W.last_flush=0,m._tr_init(W),0):D(F,P)}function q(F){var W=H(F);return W===0&&function(I){I.window_size=2*I.w_size,z(I.head),I.max_lazy_match=c[I.level].max_lazy,I.good_match=c[I.level].good_length,I.nice_match=c[I.level].nice_length,I.max_chain_length=c[I.level].max_chain,I.strstart=0,I.block_start=0,I.lookahead=0,I.insert=0,I.match_length=I.prev_length=2,I.match_available=0,I.ins_h=0}(F.state),W}function X(F,W,I,R,V,K){if(!F)return P;var Z=1;if(W===-1&&(W=6),R<0?(Z=0,R=-R):15<R&&(Z=2,R-=16),V<1||9<V||I!==8||R<8||15<R||W<0||9<W||K<0||4<K)return D(F,P);R===8&&(R=9);var Y=new L;return(F.state=Y).strm=F,Y.wrap=Z,Y.gzhead=null,Y.w_bits=R,Y.w_size=1<<Y.w_bits,Y.w_mask=Y.w_size-1,Y.hash_bits=V+7,Y.hash_size=1<<Y.hash_bits,Y.hash_mask=Y.hash_size-1,Y.hash_shift=~~((Y.hash_bits+3-1)/3),Y.window=new p.Buf8(2*Y.w_size),Y.head=new p.Buf16(Y.hash_size),Y.prev=new p.Buf16(Y.w_size),Y.lit_bufsize=1<<V+6,Y.pending_buf_size=4*Y.lit_bufsize,Y.pending_buf=new p.Buf8(Y.pending_buf_size),Y.d_buf=1*Y.lit_bufsize,Y.l_buf=3*Y.lit_bufsize,Y.level=W,Y.strategy=K,Y.method=I,q(F)}c=[new j(0,0,0,0,function(F,W){var I=65535;for(I>F.pending_buf_size-5&&(I=F.pending_buf_size-5);;){if(F.lookahead<=1){if(w(F),F.lookahead===0&&W===0)return 1;if(F.lookahead===0)break}F.strstart+=F.lookahead,F.lookahead=0;var R=F.block_start+I;if((F.strstart===0||F.strstart>=R)&&(F.lookahead=F.strstart-R,F.strstart=R,O(F,!1),F.strm.avail_out===0)||F.strstart-F.block_start>=F.w_size-N&&(O(F,!1),F.strm.avail_out===0))return 1}return F.insert=0,W===4?(O(F,!0),F.strm.avail_out===0?3:4):(F.strstart>F.block_start&&(O(F,!1),F.strm.avail_out),1)}),new j(4,4,8,4,_),new j(4,5,16,8,_),new j(4,6,32,32,_),new j(4,4,16,16,A),new j(8,16,32,32,A),new j(8,16,128,128,A),new j(8,32,128,256,A),new j(32,128,258,1024,A),new j(32,258,258,4096,A)],d.deflateInit=function(F,W){return X(F,W,8,15,8,0)},d.deflateInit2=X,d.deflateReset=q,d.deflateResetKeep=H,d.deflateSetHeader=function(F,W){return F&&F.state?F.state.wrap!==2?P:(F.state.gzhead=W,0):P},d.deflate=function(F,W){var I,R,V,K;if(!F||!F.state||5<W||W<0)return F?D(F,P):P;if(R=F.state,!F.output||!F.input&&F.avail_in!==0||R.status===666&&W!==4)return D(F,F.avail_out===0?-5:P);if(R.strm=F,I=R.last_flush,R.last_flush=W,R.status===42)if(R.wrap===2)F.adler=0,x(R,31),x(R,139),x(R,8),R.gzhead?(x(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)),x(R,255&R.gzhead.time),x(R,R.gzhead.time>>8&255),x(R,R.gzhead.time>>16&255),x(R,R.gzhead.time>>24&255),x(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),x(R,255&R.gzhead.os),R.gzhead.extra&&R.gzhead.extra.length&&(x(R,255&R.gzhead.extra.length),x(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(F.adler=C(F.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=69):(x(R,0),x(R,0),x(R,0),x(R,0),x(R,0),x(R,R.level===9?2:2<=R.strategy||R.level<2?4:0),x(R,3),R.status=B);else{var Z=8+(R.w_bits-8<<4)<<8;Z|=(2<=R.strategy||R.level<2?0:R.level<6?1:R.level===6?2:3)<<6,R.strstart!==0&&(Z|=32),Z+=31-Z%31,R.status=B,y(R,Z),R.strstart!==0&&(y(R,F.adler>>>16),y(R,65535&F.adler)),F.adler=1}if(R.status===69)if(R.gzhead.extra){for(V=R.pending;R.gzindex<(65535&R.gzhead.extra.length)&&(R.pending!==R.pending_buf_size||(R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),E(F),V=R.pending,R.pending!==R.pending_buf_size));)x(R,255&R.gzhead.extra[R.gzindex]),R.gzindex++;R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=73)}else R.status=73;if(R.status===73)if(R.gzhead.name){V=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),E(F),V=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,x(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),K===0&&(R.gzindex=0,R.status=91)}else R.status=91;if(R.status===91)if(R.gzhead.comment){V=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),E(F),V=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,x(R,K)}while(K!==0);R.gzhead.hcrc&&R.pending>V&&(F.adler=C(F.adler,R.pending_buf,R.pending-V,V)),K===0&&(R.status=103)}else R.status=103;if(R.status===103&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&E(F),R.pending+2<=R.pending_buf_size&&(x(R,255&F.adler),x(R,F.adler>>8&255),F.adler=0,R.status=B)):R.status=B),R.pending!==0){if(E(F),F.avail_out===0)return R.last_flush=-1,0}else if(F.avail_in===0&&U(W)<=U(I)&&W!==4)return D(F,-5);if(R.status===666&&F.avail_in!==0)return D(F,-5);if(F.avail_in!==0||R.lookahead!==0||W!==0&&R.status!==666){var Y=R.strategy===2?function(J,nt){for(var it;;){if(J.lookahead===0&&(w(J),J.lookahead===0)){if(nt===0)return 1;break}if(J.match_length=0,it=m._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,it&&(O(J,!1),J.strm.avail_out===0))return 1}return J.insert=0,nt===4?(O(J,!0),J.strm.avail_out===0?3:4):J.last_lit&&(O(J,!1),J.strm.avail_out===0)?1:2}(R,W):R.strategy===3?function(J,nt){for(var it,G,tt,et,ot=J.window;;){if(J.lookahead<=$){if(w(J),J.lookahead<=$&&nt===0)return 1;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=3&&0<J.strstart&&(G=ot[tt=J.strstart-1])===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]){et=J.strstart+$;do;while(G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&G===ot[++tt]&&tt<et);J.match_length=$-(et-tt),J.match_length>J.lookahead&&(J.match_length=J.lookahead)}if(J.match_length>=3?(it=m._tr_tally(J,1,J.match_length-3),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0):(it=m._tr_tally(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++),it&&(O(J,!1),J.strm.avail_out===0))return 1}return J.insert=0,nt===4?(O(J,!0),J.strm.avail_out===0?3:4):J.last_lit&&(O(J,!1),J.strm.avail_out===0)?1:2}(R,W):c[R.level].func(R,W);if(Y!==3&&Y!==4||(R.status=666),Y===1||Y===3)return F.avail_out===0&&(R.last_flush=-1),0;if(Y===2&&(W===1?m._tr_align(R):W!==5&&(m._tr_stored_block(R,0,0,!1),W===3&&(z(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),E(F),F.avail_out===0))return R.last_flush=-1,0}return W!==4?0:R.wrap<=0?1:(R.wrap===2?(x(R,255&F.adler),x(R,F.adler>>8&255),x(R,F.adler>>16&255),x(R,F.adler>>24&255),x(R,255&F.total_in),x(R,F.total_in>>8&255),x(R,F.total_in>>16&255),x(R,F.total_in>>24&255)):(y(R,F.adler>>>16),y(R,65535&F.adler)),E(F),0<R.wrap&&(R.wrap=-R.wrap),R.pending!==0?0:1)},d.deflateEnd=function(F){var W;return F&&F.state?(W=F.state.status)!==42&&W!==69&&W!==73&&W!==91&&W!==103&&W!==B&&W!==666?D(F,P):(F.state=null,W===B?D(F,-3):0):P},d.deflateSetDictionary=function(F,W){var I,R,V,K,Z,Y,J,nt,it=W.length;if(!F||!F.state||(K=(I=F.state).wrap)===2||K===1&&I.status!==42||I.lookahead)return P;for(K===1&&(F.adler=S(F.adler,W,it,0)),I.wrap=0,it>=I.w_size&&(K===0&&(z(I.head),I.strstart=0,I.block_start=0,I.insert=0),nt=new p.Buf8(I.w_size),p.arraySet(nt,W,it-I.w_size,I.w_size,0),W=nt,it=I.w_size),Z=F.avail_in,Y=F.next_in,J=F.input,F.avail_in=it,F.next_in=0,F.input=W,w(I);I.lookahead>=3;){for(R=I.strstart,V=I.lookahead-2;I.ins_h=(I.ins_h<<I.hash_shift^I.window[R+3-1])&I.hash_mask,I.prev[R&I.w_mask]=I.head[I.ins_h],I.head[I.ins_h]=R,R++,--V;);I.strstart=R,I.lookahead=2,w(I)}return I.strstart+=I.lookahead,I.block_start=I.strstart,I.insert=I.lookahead,I.lookahead=0,I.match_length=I.prev_length=2,I.match_available=0,F.next_in=Y,F.input=J,F.avail_in=Z,I.wrap=K,0},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,h,d){h.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(s,h,d){h.exports=function(c,p){var m,S,C,M,P,$,N,B,D,U,z,E,O,x,y,v,w,_,A,j,L,H,q,X,F;m=c.state,S=c.next_in,X=c.input,C=S+(c.avail_in-5),M=c.next_out,F=c.output,P=M-(p-c.avail_out),$=M+(c.avail_out-257),N=m.dmax,B=m.wsize,D=m.whave,U=m.wnext,z=m.window,E=m.hold,O=m.bits,x=m.lencode,y=m.distcode,v=(1<<m.lenbits)-1,w=(1<<m.distbits)-1;t:do{O<15&&(E+=X[S++]<<O,O+=8,E+=X[S++]<<O,O+=8),_=x[E&v];e:for(;;){if(E>>>=A=_>>>24,O-=A,(A=_>>>16&255)==0)F[M++]=65535&_;else{if(!(16&A)){if(!(64&A)){_=x[(65535&_)+(E&(1<<A)-1)];continue e}if(32&A){m.mode=12;break t}c.msg="invalid literal/length code",m.mode=30;break t}j=65535&_,(A&=15)&&(O<A&&(E+=X[S++]<<O,O+=8),j+=E&(1<<A)-1,E>>>=A,O-=A),O<15&&(E+=X[S++]<<O,O+=8,E+=X[S++]<<O,O+=8),_=y[E&w];r:for(;;){if(E>>>=A=_>>>24,O-=A,!(16&(A=_>>>16&255))){if(!(64&A)){_=y[(65535&_)+(E&(1<<A)-1)];continue r}c.msg="invalid distance code",m.mode=30;break t}if(L=65535&_,O<(A&=15)&&(E+=X[S++]<<O,(O+=8)<A&&(E+=X[S++]<<O,O+=8)),N<(L+=E&(1<<A)-1)){c.msg="invalid distance too far back",m.mode=30;break t}if(E>>>=A,O-=A,(A=M-P)<L){if(D<(A=L-A)&&m.sane){c.msg="invalid distance too far back",m.mode=30;break t}if(q=z,(H=0)===U){if(H+=B-A,A<j){for(j-=A;F[M++]=z[H++],--A;);H=M-L,q=F}}else if(U<A){if(H+=B+U-A,(A-=U)<j){for(j-=A;F[M++]=z[H++],--A;);if(H=0,U<j){for(j-=A=U;F[M++]=z[H++],--A;);H=M-L,q=F}}}else if(H+=U-A,A<j){for(j-=A;F[M++]=z[H++],--A;);H=M-L,q=F}for(;2<j;)F[M++]=q[H++],F[M++]=q[H++],F[M++]=q[H++],j-=3;j&&(F[M++]=q[H++],1<j&&(F[M++]=q[H++]))}else{for(H=M-L;F[M++]=F[H++],F[M++]=F[H++],F[M++]=F[H++],2<(j-=3););j&&(F[M++]=F[H++],1<j&&(F[M++]=F[H++]))}break}}break}}while(S<C&&M<$);S-=j=O>>3,E&=(1<<(O-=j<<3))-1,c.next_in=S,c.next_out=M,c.avail_in=S<C?C-S+5:5-(S-C),c.avail_out=M<$?$-M+257:257-(M-$),m.hold=E,m.bits=O}},{}],49:[function(s,h,d){var c=s("../utils/common"),p=s("./adler32"),m=s("./crc32"),S=s("./inffast"),C=s("./inftrees"),M=-2;function P(v){return(v>>>24&255)+(v>>>8&65280)+((65280&v)<<8)+((255&v)<<24)}function $(){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 c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function N(v){var w;return v&&v.state?(w=v.state,v.total_in=v.total_out=w.total=0,v.msg="",w.wrap&&(v.adler=1&w.wrap),w.mode=1,w.last=0,w.havedict=0,w.dmax=32768,w.head=null,w.hold=0,w.bits=0,w.lencode=w.lendyn=new c.Buf32(852),w.distcode=w.distdyn=new c.Buf32(592),w.sane=1,w.back=-1,0):M}function B(v){var w;return v&&v.state?((w=v.state).wsize=0,w.whave=0,w.wnext=0,N(v)):M}function D(v,w){var _,A;return v&&v.state?(A=v.state,w<0?(_=0,w=-w):(_=1+(w>>4),w<48&&(w&=15)),w&&(w<8||15<w)?M:(A.window!==null&&A.wbits!==w&&(A.window=null),A.wrap=_,A.wbits=w,B(v))):M}function U(v,w){var _,A;return v?(A=new $,(v.state=A).window=null,(_=D(v,w))!==0&&(v.state=null),_):M}var z,E,O=!0;function x(v){if(O){var w;for(z=new c.Buf32(512),E=new c.Buf32(32),w=0;w<144;)v.lens[w++]=8;for(;w<256;)v.lens[w++]=9;for(;w<280;)v.lens[w++]=7;for(;w<288;)v.lens[w++]=8;for(C(1,v.lens,0,288,z,0,v.work,{bits:9}),w=0;w<32;)v.lens[w++]=5;C(2,v.lens,0,32,E,0,v.work,{bits:5}),O=!1}v.lencode=z,v.lenbits=9,v.distcode=E,v.distbits=5}function y(v,w,_,A){var j,L=v.state;return L.window===null&&(L.wsize=1<<L.wbits,L.wnext=0,L.whave=0,L.window=new c.Buf8(L.wsize)),A>=L.wsize?(c.arraySet(L.window,w,_-L.wsize,L.wsize,0),L.wnext=0,L.whave=L.wsize):(A<(j=L.wsize-L.wnext)&&(j=A),c.arraySet(L.window,w,_-A,j,L.wnext),(A-=j)?(c.arraySet(L.window,w,_-A,A,0),L.wnext=A,L.whave=L.wsize):(L.wnext+=j,L.wnext===L.wsize&&(L.wnext=0),L.whave<L.wsize&&(L.whave+=j))),0}d.inflateReset=B,d.inflateReset2=D,d.inflateResetKeep=N,d.inflateInit=function(v){return U(v,15)},d.inflateInit2=U,d.inflate=function(v,w){var _,A,j,L,H,q,X,F,W,I,R,V,K,Z,Y,J,nt,it,G,tt,et,ot,st,lt,ft=0,pt=new c.Buf8(4),yt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!v||!v.state||!v.output||!v.input&&v.avail_in!==0)return M;(_=v.state).mode===12&&(_.mode=13),H=v.next_out,j=v.output,X=v.avail_out,L=v.next_in,A=v.input,q=v.avail_in,F=_.hold,W=_.bits,I=q,R=X,ot=0;t:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;W<16;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(2&_.wrap&&F===35615){pt[_.check=0]=255&F,pt[1]=F>>>8&255,_.check=m(_.check,pt,2,0),W=F=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&F)<<8)+(F>>8))%31){v.msg="incorrect header check",_.mode=30;break}if((15&F)!=8){v.msg="unknown compression method",_.mode=30;break}if(W-=4,et=8+(15&(F>>>=4)),_.wbits===0)_.wbits=et;else if(et>_.wbits){v.msg="invalid window size",_.mode=30;break}_.dmax=1<<et,v.adler=_.check=1,_.mode=512&F?10:12,W=F=0;break;case 2:for(;W<16;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(_.flags=F,(255&_.flags)!=8){v.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){v.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=F>>8&1),512&_.flags&&(pt[0]=255&F,pt[1]=F>>>8&255,_.check=m(_.check,pt,2,0)),W=F=0,_.mode=3;case 3:for(;W<32;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.head&&(_.head.time=F),512&_.flags&&(pt[0]=255&F,pt[1]=F>>>8&255,pt[2]=F>>>16&255,pt[3]=F>>>24&255,_.check=m(_.check,pt,4,0)),W=F=0,_.mode=4;case 4:for(;W<16;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.head&&(_.head.xflags=255&F,_.head.os=F>>8),512&_.flags&&(pt[0]=255&F,pt[1]=F>>>8&255,_.check=m(_.check,pt,2,0)),W=F=0,_.mode=5;case 5:if(1024&_.flags){for(;W<16;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.length=F,_.head&&(_.head.extra_len=F),512&_.flags&&(pt[0]=255&F,pt[1]=F>>>8&255,_.check=m(_.check,pt,2,0)),W=F=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(q<(V=_.length)&&(V=q),V&&(_.head&&(et=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),c.arraySet(_.head.extra,A,L,V,et)),512&_.flags&&(_.check=m(_.check,A,V,L)),q-=V,L+=V,_.length-=V),_.length))break t;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(q===0)break t;for(V=0;et=A[L+V++],_.head&&et&&_.length<65536&&(_.head.name+=String.fromCharCode(et)),et&&V<q;);if(512&_.flags&&(_.check=m(_.check,A,V,L)),q-=V,L+=V,et)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(q===0)break t;for(V=0;et=A[L+V++],_.head&&et&&_.length<65536&&(_.head.comment+=String.fromCharCode(et)),et&&V<q;);if(512&_.flags&&(_.check=m(_.check,A,V,L)),q-=V,L+=V,et)break t}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;W<16;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(F!==(65535&_.check)){v.msg="header crc mismatch",_.mode=30;break}W=F=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),v.adler=_.check=0,_.mode=12;break;case 10:for(;W<32;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}v.adler=_.check=P(F),W=F=0,_.mode=11;case 11:if(_.havedict===0)return v.next_out=H,v.avail_out=X,v.next_in=L,v.avail_in=q,_.hold=F,_.bits=W,2;v.adler=_.check=1,_.mode=12;case 12:if(w===5||w===6)break t;case 13:if(_.last){F>>>=7&W,W-=7&W,_.mode=27;break}for(;W<3;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}switch(_.last=1&F,W-=1,3&(F>>>=1)){case 0:_.mode=14;break;case 1:if(x(_),_.mode=20,w!==6)break;F>>>=2,W-=2;break t;case 2:_.mode=17;break;case 3:v.msg="invalid block type",_.mode=30}F>>>=2,W-=2;break;case 14:for(F>>>=7&W,W-=7&W;W<32;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if((65535&F)!=(F>>>16^65535)){v.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&F,W=F=0,_.mode=15,w===6)break t;case 15:_.mode=16;case 16:if(V=_.length){if(q<V&&(V=q),X<V&&(V=X),V===0)break t;c.arraySet(j,A,L,V,H),q-=V,L+=V,X-=V,H+=V,_.length-=V;break}_.mode=12;break;case 17:for(;W<14;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(_.nlen=257+(31&F),F>>>=5,W-=5,_.ndist=1+(31&F),F>>>=5,W-=5,_.ncode=4+(15&F),F>>>=4,W-=4,286<_.nlen||30<_.ndist){v.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;W<3;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.lens[yt[_.have++]]=7&F,F>>>=3,W-=3}for(;_.have<19;)_.lens[yt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,st={bits:_.lenbits},ot=C(0,_.lens,0,19,_.lencode,0,_.work,st),_.lenbits=st.bits,ot){v.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;J=(ft=_.lencode[F&(1<<_.lenbits)-1])>>>16&255,nt=65535&ft,!((Y=ft>>>24)<=W);){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(nt<16)F>>>=Y,W-=Y,_.lens[_.have++]=nt;else{if(nt===16){for(lt=Y+2;W<lt;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(F>>>=Y,W-=Y,_.have===0){v.msg="invalid bit length repeat",_.mode=30;break}et=_.lens[_.have-1],V=3+(3&F),F>>>=2,W-=2}else if(nt===17){for(lt=Y+3;W<lt;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}W-=Y,et=0,V=3+(7&(F>>>=Y)),F>>>=3,W-=3}else{for(lt=Y+7;W<lt;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}W-=Y,et=0,V=11+(127&(F>>>=Y)),F>>>=7,W-=7}if(_.have+V>_.nlen+_.ndist){v.msg="invalid bit length repeat",_.mode=30;break}for(;V--;)_.lens[_.have++]=et}}if(_.mode===30)break;if(_.lens[256]===0){v.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,st={bits:_.lenbits},ot=C(1,_.lens,0,_.nlen,_.lencode,0,_.work,st),_.lenbits=st.bits,ot){v.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,st={bits:_.distbits},ot=C(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,st),_.distbits=st.bits,ot){v.msg="invalid distances set",_.mode=30;break}if(_.mode=20,w===6)break t;case 20:_.mode=21;case 21:if(6<=q&&258<=X){v.next_out=H,v.avail_out=X,v.next_in=L,v.avail_in=q,_.hold=F,_.bits=W,S(v,R),H=v.next_out,j=v.output,X=v.avail_out,L=v.next_in,A=v.input,q=v.avail_in,F=_.hold,W=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;J=(ft=_.lencode[F&(1<<_.lenbits)-1])>>>16&255,nt=65535&ft,!((Y=ft>>>24)<=W);){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(J&&!(240&J)){for(it=Y,G=J,tt=nt;J=(ft=_.lencode[tt+((F&(1<<it+G)-1)>>it)])>>>16&255,nt=65535&ft,!(it+(Y=ft>>>24)<=W);){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}F>>>=it,W-=it,_.back+=it}if(F>>>=Y,W-=Y,_.back+=Y,_.length=nt,J===0){_.mode=26;break}if(32&J){_.back=-1,_.mode=12;break}if(64&J){v.msg="invalid literal/length code",_.mode=30;break}_.extra=15&J,_.mode=22;case 22:if(_.extra){for(lt=_.extra;W<lt;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.length+=F&(1<<_.extra)-1,F>>>=_.extra,W-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;J=(ft=_.distcode[F&(1<<_.distbits)-1])>>>16&255,nt=65535&ft,!((Y=ft>>>24)<=W);){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(!(240&J)){for(it=Y,G=J,tt=nt;J=(ft=_.distcode[tt+((F&(1<<it+G)-1)>>it)])>>>16&255,nt=65535&ft,!(it+(Y=ft>>>24)<=W);){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}F>>>=it,W-=it,_.back+=it}if(F>>>=Y,W-=Y,_.back+=Y,64&J){v.msg="invalid distance code",_.mode=30;break}_.offset=nt,_.extra=15&J,_.mode=24;case 24:if(_.extra){for(lt=_.extra;W<lt;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}_.offset+=F&(1<<_.extra)-1,F>>>=_.extra,W-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){v.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(X===0)break t;if(V=R-X,_.offset>V){if((V=_.offset-V)>_.whave&&_.sane){v.msg="invalid distance too far back",_.mode=30;break}K=V>_.wnext?(V-=_.wnext,_.wsize-V):_.wnext-V,V>_.length&&(V=_.length),Z=_.window}else Z=j,K=H-_.offset,V=_.length;for(X<V&&(V=X),X-=V,_.length-=V;j[H++]=Z[K++],--V;);_.length===0&&(_.mode=21);break;case 26:if(X===0)break t;j[H++]=_.length,X--,_.mode=21;break;case 27:if(_.wrap){for(;W<32;){if(q===0)break t;q--,F|=A[L++]<<W,W+=8}if(R-=X,v.total_out+=R,_.total+=R,R&&(v.adler=_.check=_.flags?m(_.check,j,R,H-R):p(_.check,j,R,H-R)),R=X,(_.flags?F:P(F))!==_.check){v.msg="incorrect data check",_.mode=30;break}W=F=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;W<32;){if(q===0)break t;q--,F+=A[L++]<<W,W+=8}if(F!==(4294967295&_.total)){v.msg="incorrect length check",_.mode=30;break}W=F=0}_.mode=29;case 29:ot=1;break t;case 30:ot=-3;break t;case 31:return-4;case 32:default:return M}return v.next_out=H,v.avail_out=X,v.next_in=L,v.avail_in=q,_.hold=F,_.bits=W,(_.wsize||R!==v.avail_out&&_.mode<30&&(_.mode<27||w!==4))&&y(v,v.output,v.next_out,R-v.avail_out)?(_.mode=31,-4):(I-=v.avail_in,R-=v.avail_out,v.total_in+=I,v.total_out+=R,_.total+=R,_.wrap&&R&&(v.adler=_.check=_.flags?m(_.check,j,R,v.next_out-R):p(_.check,j,R,v.next_out-R)),v.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(I==0&&R===0||w===4)&&ot===0&&(ot=-5),ot)},d.inflateEnd=function(v){if(!v||!v.state)return M;var w=v.state;return w.window&&(w.window=null),v.state=null,0},d.inflateGetHeader=function(v,w){var _;return v&&v.state&&2&(_=v.state).wrap?((_.head=w).done=!1,0):M},d.inflateSetDictionary=function(v,w){var _,A=w.length;return v&&v.state?(_=v.state).wrap!==0&&_.mode!==11?M:_.mode===11&&p(1,w,A,0)!==_.check?-3:y(v,w,A,A)?(_.mode=31,-4):(_.havedict=1,0):M},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,h,d){var c=s("../utils/common"),p=[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],m=[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];h.exports=function(M,P,$,N,B,D,U,z){var E,O,x,y,v,w,_,A,j,L=z.bits,H=0,q=0,X=0,F=0,W=0,I=0,R=0,V=0,K=0,Z=0,Y=null,J=0,nt=new c.Buf16(16),it=new c.Buf16(16),G=null,tt=0;for(H=0;H<=15;H++)nt[H]=0;for(q=0;q<N;q++)nt[P[$+q]]++;for(W=L,F=15;1<=F&&nt[F]===0;F--);if(F<W&&(W=F),F===0)return B[D++]=20971520,B[D++]=20971520,z.bits=1,0;for(X=1;X<F&&nt[X]===0;X++);for(W<X&&(W=X),H=V=1;H<=15;H++)if(V<<=1,(V-=nt[H])<0)return-1;if(0<V&&(M===0||F!==1))return-1;for(it[1]=0,H=1;H<15;H++)it[H+1]=it[H]+nt[H];for(q=0;q<N;q++)P[$+q]!==0&&(U[it[P[$+q]]++]=q);if(w=M===0?(Y=G=U,19):M===1?(Y=p,J-=257,G=m,tt-=257,256):(Y=S,G=C,-1),H=X,v=D,R=q=Z=0,x=-1,y=(K=1<<(I=W))-1,M===1&&852<K||M===2&&592<K)return 1;for(;;){for(_=H-R,j=U[q]<w?(A=0,U[q]):U[q]>w?(A=G[tt+U[q]],Y[J+U[q]]):(A=96,0),E=1<<H-R,X=O=1<<I;B[v+(Z>>R)+(O-=E)]=_<<24|A<<16|j|0,O!==0;);for(E=1<<H-1;Z&E;)E>>=1;if(E!==0?(Z&=E-1,Z+=E):Z=0,q++,--nt[H]==0){if(H===F)break;H=P[$+U[q]]}if(W<H&&(Z&y)!==x){for(R===0&&(R=W),v+=X,V=1<<(I=H-R);I+R<F&&!((V-=nt[I+R])<=0);)I++,V<<=1;if(K+=1<<I,M===1&&852<K||M===2&&592<K)return 1;B[x=Z&y]=W<<24|I<<16|v-D|0}}return Z!==0&&(B[v+Z]=H-R<<24|64<<16|0),z.bits=W,0}},{"../utils/common":41}],51:[function(s,h,d){h.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(s,h,d){var c=s("../utils/common");function p(G){for(var tt=G.length;0<=--tt;)G[tt]=0}var m=256,S=286,C=30,M=15,P=[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],$=[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],N=[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],D=new Array(576);p(D);var U=new Array(60);p(U);var z=new Array(512);p(z);var E=new Array(256);p(E);var O=new Array(29);p(O);var x,y,v,w=new Array(C);function _(G,tt,et,ot,st){this.static_tree=G,this.extra_bits=tt,this.extra_base=et,this.elems=ot,this.max_length=st,this.has_stree=G&&G.length}function A(G,tt){this.dyn_tree=G,this.max_code=0,this.stat_desc=tt}function j(G){return G<256?z[G]:z[256+(G>>>7)]}function L(G,tt){G.pending_buf[G.pending++]=255&tt,G.pending_buf[G.pending++]=tt>>>8&255}function H(G,tt,et){G.bi_valid>16-et?(G.bi_buf|=tt<<G.bi_valid&65535,L(G,G.bi_buf),G.bi_buf=tt>>16-G.bi_valid,G.bi_valid+=et-16):(G.bi_buf|=tt<<G.bi_valid&65535,G.bi_valid+=et)}function q(G,tt,et){H(G,et[2*tt],et[2*tt+1])}function X(G,tt){for(var et=0;et|=1&G,G>>>=1,et<<=1,0<--tt;);return et>>>1}function F(G,tt,et){var ot,st,lt=new Array(16),ft=0;for(ot=1;ot<=M;ot++)lt[ot]=ft=ft+et[ot-1]<<1;for(st=0;st<=tt;st++){var pt=G[2*st+1];pt!==0&&(G[2*st]=X(lt[pt]++,pt))}}function W(G){var tt;for(tt=0;tt<S;tt++)G.dyn_ltree[2*tt]=0;for(tt=0;tt<C;tt++)G.dyn_dtree[2*tt]=0;for(tt=0;tt<19;tt++)G.bl_tree[2*tt]=0;G.dyn_ltree[512]=1,G.opt_len=G.static_len=0,G.last_lit=G.matches=0}function I(G){8<G.bi_valid?L(G,G.bi_buf):0<G.bi_valid&&(G.pending_buf[G.pending++]=G.bi_buf),G.bi_buf=0,G.bi_valid=0}function R(G,tt,et,ot){var st=2*tt,lt=2*et;return G[st]<G[lt]||G[st]===G[lt]&&ot[tt]<=ot[et]}function V(G,tt,et){for(var ot=G.heap[et],st=et<<1;st<=G.heap_len&&(st<G.heap_len&&R(tt,G.heap[st+1],G.heap[st],G.depth)&&st++,!R(tt,ot,G.heap[st],G.depth));)G.heap[et]=G.heap[st],et=st,st<<=1;G.heap[et]=ot}function K(G,tt,et){var ot,st,lt,ft,pt=0;if(G.last_lit!==0)for(;ot=G.pending_buf[G.d_buf+2*pt]<<8|G.pending_buf[G.d_buf+2*pt+1],st=G.pending_buf[G.l_buf+pt],pt++,ot===0?q(G,st,tt):(q(G,(lt=E[st])+m+1,tt),(ft=P[lt])!==0&&H(G,st-=O[lt],ft),q(G,lt=j(--ot),et),(ft=$[lt])!==0&&H(G,ot-=w[lt],ft)),pt<G.last_lit;);q(G,256,tt)}function Z(G,tt){var et,ot,st,lt=tt.dyn_tree,ft=tt.stat_desc.static_tree,pt=tt.stat_desc.has_stree,yt=tt.stat_desc.elems,Ot=-1;for(G.heap_len=0,G.heap_max=573,et=0;et<yt;et++)lt[2*et]!==0?(G.heap[++G.heap_len]=Ot=et,G.depth[et]=0):lt[2*et+1]=0;for(;G.heap_len<2;)lt[2*(st=G.heap[++G.heap_len]=Ot<2?++Ot:0)]=1,G.depth[st]=0,G.opt_len--,pt&&(G.static_len-=ft[2*st+1]);for(tt.max_code=Ot,et=G.heap_len>>1;1<=et;et--)V(G,lt,et);for(st=yt;et=G.heap[1],G.heap[1]=G.heap[G.heap_len--],V(G,lt,1),ot=G.heap[1],G.heap[--G.heap_max]=et,G.heap[--G.heap_max]=ot,lt[2*st]=lt[2*et]+lt[2*ot],G.depth[st]=(G.depth[et]>=G.depth[ot]?G.depth[et]:G.depth[ot])+1,lt[2*et+1]=lt[2*ot+1]=st,G.heap[1]=st++,V(G,lt,1),2<=G.heap_len;);G.heap[--G.heap_max]=G.heap[1],function(At,kt){var Wt,Ht,Vt,Kt,Nt,_t,Rt=kt.dyn_tree,zt=kt.max_code,Bt=kt.stat_desc.static_tree,mt=kt.stat_desc.has_stree,It=kt.stat_desc.extra_bits,xt=kt.stat_desc.extra_base,Dt=kt.stat_desc.max_length,jt=0;for(Kt=0;Kt<=M;Kt++)At.bl_count[Kt]=0;for(Rt[2*At.heap[At.heap_max]+1]=0,Wt=At.heap_max+1;Wt<573;Wt++)Dt<(Kt=Rt[2*Rt[2*(Ht=At.heap[Wt])+1]+1]+1)&&(Kt=Dt,jt++),Rt[2*Ht+1]=Kt,zt<Ht||(At.bl_count[Kt]++,Nt=0,xt<=Ht&&(Nt=It[Ht-xt]),_t=Rt[2*Ht],At.opt_len+=_t*(Kt+Nt),mt&&(At.static_len+=_t*(Bt[2*Ht+1]+Nt)));if(jt!==0){do{for(Kt=Dt-1;At.bl_count[Kt]===0;)Kt--;At.bl_count[Kt]--,At.bl_count[Kt+1]+=2,At.bl_count[Dt]--,jt-=2}while(0<jt);for(Kt=Dt;Kt!==0;Kt--)for(Ht=At.bl_count[Kt];Ht!==0;)zt<(Vt=At.heap[--Wt])||(Rt[2*Vt+1]!==Kt&&(At.opt_len+=(Kt-Rt[2*Vt+1])*Rt[2*Vt],Rt[2*Vt+1]=Kt),Ht--)}}(G,tt),F(lt,Ot,G.bl_count)}function Y(G,tt,et){var ot,st,lt=-1,ft=tt[1],pt=0,yt=7,Ot=4;for(ft===0&&(yt=138,Ot=3),tt[2*(et+1)+1]=65535,ot=0;ot<=et;ot++)st=ft,ft=tt[2*(ot+1)+1],++pt<yt&&st===ft||(pt<Ot?G.bl_tree[2*st]+=pt:st!==0?(st!==lt&&G.bl_tree[2*st]++,G.bl_tree[32]++):pt<=10?G.bl_tree[34]++:G.bl_tree[36]++,lt=st,Ot=(pt=0)===ft?(yt=138,3):st===ft?(yt=6,3):(yt=7,4))}function J(G,tt,et){var ot,st,lt=-1,ft=tt[1],pt=0,yt=7,Ot=4;for(ft===0&&(yt=138,Ot=3),ot=0;ot<=et;ot++)if(st=ft,ft=tt[2*(ot+1)+1],!(++pt<yt&&st===ft)){if(pt<Ot)for(;q(G,st,G.bl_tree),--pt!=0;);else st!==0?(st!==lt&&(q(G,st,G.bl_tree),pt--),q(G,16,G.bl_tree),H(G,pt-3,2)):pt<=10?(q(G,17,G.bl_tree),H(G,pt-3,3)):(q(G,18,G.bl_tree),H(G,pt-11,7));lt=st,Ot=(pt=0)===ft?(yt=138,3):st===ft?(yt=6,3):(yt=7,4)}}p(w);var nt=!1;function it(G,tt,et,ot){H(G,0+(ot?1:0),3),function(st,lt,ft,pt){I(st),L(st,ft),L(st,~ft),c.arraySet(st.pending_buf,st.window,lt,ft,st.pending),st.pending+=ft}(G,tt,et)}d._tr_init=function(G){nt||(function(){var tt,et,ot,st,lt,ft=new Array(16);for(st=ot=0;st<28;st++)for(O[st]=ot,tt=0;tt<1<<P[st];tt++)E[ot++]=st;for(E[ot-1]=st,st=lt=0;st<16;st++)for(w[st]=lt,tt=0;tt<1<<$[st];tt++)z[lt++]=st;for(lt>>=7;st<C;st++)for(w[st]=lt<<7,tt=0;tt<1<<$[st]-7;tt++)z[256+lt++]=st;for(et=0;et<=M;et++)ft[et]=0;for(tt=0;tt<=143;)D[2*tt+1]=8,tt++,ft[8]++;for(;tt<=255;)D[2*tt+1]=9,tt++,ft[9]++;for(;tt<=279;)D[2*tt+1]=7,tt++,ft[7]++;for(;tt<=287;)D[2*tt+1]=8,tt++,ft[8]++;for(F(D,287,ft),tt=0;tt<C;tt++)U[2*tt+1]=5,U[2*tt]=X(tt,5);x=new _(D,P,257,S,M),y=new _(U,$,0,C,M),v=new _(new Array(0),N,0,19,7)}(),nt=!0),G.l_desc=new A(G.dyn_ltree,x),G.d_desc=new A(G.dyn_dtree,y),G.bl_desc=new A(G.bl_tree,v),G.bi_buf=0,G.bi_valid=0,W(G)},d._tr_stored_block=it,d._tr_flush_block=function(G,tt,et,ot){var st,lt,ft=0;0<G.level?(G.strm.data_type===2&&(G.strm.data_type=function(pt){var yt,Ot=4093624447;for(yt=0;yt<=31;yt++,Ot>>>=1)if(1&Ot&&pt.dyn_ltree[2*yt]!==0)return 0;if(pt.dyn_ltree[18]!==0||pt.dyn_ltree[20]!==0||pt.dyn_ltree[26]!==0)return 1;for(yt=32;yt<m;yt++)if(pt.dyn_ltree[2*yt]!==0)return 1;return 0}(G)),Z(G,G.l_desc),Z(G,G.d_desc),ft=function(pt){var yt;for(Y(pt,pt.dyn_ltree,pt.l_desc.max_code),Y(pt,pt.dyn_dtree,pt.d_desc.max_code),Z(pt,pt.bl_desc),yt=18;3<=yt&&pt.bl_tree[2*B[yt]+1]===0;yt--);return pt.opt_len+=3*(yt+1)+5+5+4,yt}(G),st=G.opt_len+3+7>>>3,(lt=G.static_len+3+7>>>3)<=st&&(st=lt)):st=lt=et+5,et+4<=st&&tt!==-1?it(G,tt,et,ot):G.strategy===4||lt===st?(H(G,2+(ot?1:0),3),K(G,D,U)):(H(G,4+(ot?1:0),3),function(pt,yt,Ot,At){var kt;for(H(pt,yt-257,5),H(pt,Ot-1,5),H(pt,At-4,4),kt=0;kt<At;kt++)H(pt,pt.bl_tree[2*B[kt]+1],3);J(pt,pt.dyn_ltree,yt-1),J(pt,pt.dyn_dtree,Ot-1)}(G,G.l_desc.max_code+1,G.d_desc.max_code+1,ft+1),K(G,G.dyn_ltree,G.dyn_dtree)),W(G),ot&&I(G)},d._tr_tally=function(G,tt,et){return G.pending_buf[G.d_buf+2*G.last_lit]=tt>>>8&255,G.pending_buf[G.d_buf+2*G.last_lit+1]=255&tt,G.pending_buf[G.l_buf+G.last_lit]=255&et,G.last_lit++,tt===0?G.dyn_ltree[2*et]++:(G.matches++,tt--,G.dyn_ltree[2*(E[et]+m+1)]++,G.dyn_dtree[2*j(tt)]++),G.last_lit===G.lit_bufsize-1},d._tr_align=function(G){H(G,2,3),q(G,256,D),function(tt){tt.bi_valid===16?(L(tt,tt.bi_buf),tt.bi_buf=0,tt.bi_valid=0):8<=tt.bi_valid&&(tt.pending_buf[tt.pending++]=255&tt.bi_buf,tt.bi_buf>>=8,tt.bi_valid-=8)}(G)}},{"../utils/common":41}],53:[function(s,h,d){h.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(s,h,d){(function(c){(function(p,m){if(!p.setImmediate){var S,C,M,P,$=1,N={},B=!1,D=p.document,U=Object.getPrototypeOf&&Object.getPrototypeOf(p);U=U&&U.setTimeout?U:p,S={}.toString.call(p.process)==="[object process]"?function(x){f.nextTick(function(){E(x)})}:function(){if(p.postMessage&&!p.importScripts){var x=!0,y=p.onmessage;return p.onmessage=function(){x=!1},p.postMessage("","*"),p.onmessage=y,x}}()?(P="setImmediate$"+Math.random()+"$",p.addEventListener?p.addEventListener("message",O,!1):p.attachEvent("onmessage",O),function(x){p.postMessage(P+x,"*")}):p.MessageChannel?((M=new MessageChannel).port1.onmessage=function(x){E(x.data)},function(x){M.port2.postMessage(x)}):D&&"onreadystatechange"in D.createElement("script")?(C=D.documentElement,function(x){var y=D.createElement("script");y.onreadystatechange=function(){E(x),y.onreadystatechange=null,C.removeChild(y),y=null},C.appendChild(y)}):function(x){setTimeout(E,0,x)},U.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var y=new Array(arguments.length-1),v=0;v<y.length;v++)y[v]=arguments[v+1];var w={callback:x,args:y};return N[$]=w,S($),$++},U.clearImmediate=z}function z(x){delete N[x]}function E(x){if(B)setTimeout(E,0,x);else{var y=N[x];if(y){B=!0;try{(function(v){var w=v.callback,_=v.args;switch(_.length){case 0:w();break;case 1:w(_[0]);break;case 2:w(_[0],_[1]);break;case 3:w(_[0],_[1],_[2]);break;default:w.apply(void 0,_)}})(y)}finally{z(x),B=!1}}}}function O(x){x.source===p&&typeof x.data=="string"&&x.data.indexOf(P)===0&&E(+x.data.slice(P.length))}})(typeof self>"u"?c===void 0?this:c:self)}).call(this,o!==void 0?o:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe: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,b,g){(function(f){(function(){var o=/[\\^$.*+?()[\]{}|]/g,a=RegExp(o.source),r=typeof f=="object"&&f&&f.Object===Object&&f,e=typeof self=="object"&&self&&self.Object===Object&&self,n=r||e||Function("return this")(),l=Object.prototype.toString,i=n.Symbol,s=i?i.prototype:void 0,h=s?s.toString:void 0;function d(c){if(typeof c=="string")return c;if(function(m){return typeof m=="symbol"||function(S){return!!S&&typeof S=="object"}(m)&&l.call(m)=="[object Symbol]"}(c))return h?h.call(c):"";var p=c+"";return p=="0"&&1/c==-1/0?"-0":p}b.exports=function(c){var p;return(c=(p=c)==null?"":d(p))&&a.test(c)?c.replace(o,"\\$&"):c}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(t,b,g){(function(f){(function(){var o="[object Arguments]",a="[object Map]",r="[object Object]",e="[object Set]",n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[o]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[a]=p["[object Number]"]=p[r]=p["[object RegExp]"]=p[e]=p["[object String]"]=p["[object WeakMap]"]=!1;var m=typeof f=="object"&&f&&f.Object===Object&&f,S=typeof self=="object"&&self&&self.Object===Object&&self,C=m||S||Function("return this")(),M=typeof g=="object"&&g&&!g.nodeType&&g,P=M&&typeof b=="object"&&b&&!b.nodeType&&b,$=P&&P.exports===M&&m.process,N=function(){try{return $&&$.binding("util")}catch{}}(),B=N&&N.isTypedArray;function D(Q,ct,gt,vt){for(var Xt=-1,Et=Q?Q.length:0;++Xt<Et;){var Mt=Q[Xt];ct(vt,Mt,gt(Mt),Q)}return vt}function U(Q,ct){for(var gt=-1,vt=Q?Q.length:0;++gt<vt;)if(ct(Q[gt],gt,Q))return!0;return!1}function z(Q){var ct=!1;if(Q!=null&&typeof Q.toString!="function")try{ct=!!(Q+"")}catch{}return ct}function E(Q){var ct=-1,gt=Array(Q.size);return Q.forEach(function(vt,Xt){gt[++ct]=[Xt,vt]}),gt}function O(Q){var ct=-1,gt=Array(Q.size);return Q.forEach(function(vt){gt[++ct]=vt}),gt}var x,y,v,w=Array.prototype,_=Function.prototype,A=Object.prototype,j=C["__core-js_shared__"],L=(x=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",H=_.toString,q=A.hasOwnProperty,X=A.toString,F=RegExp("^"+H.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=C.Symbol,I=C.Uint8Array,R=A.propertyIsEnumerable,V=w.splice,K=(y=Object.keys,v=Object,function(Q){return y(v(Q))}),Z=Lt(C,"DataView"),Y=Lt(C,"Map"),J=Lt(C,"Promise"),nt=Lt(C,"Set"),it=Lt(C,"WeakMap"),G=Lt(Object,"create"),tt=at(Z),et=at(Y),ot=at(J),st=at(nt),lt=at(it),ft=W?W.prototype:void 0,pt=ft?ft.valueOf:void 0,yt=ft?ft.toString:void 0;function Ot(Q){var ct=-1,gt=Q?Q.length:0;for(this.clear();++ct<gt;){var vt=Q[ct];this.set(vt[0],vt[1])}}function At(Q){var ct=-1,gt=Q?Q.length:0;for(this.clear();++ct<gt;){var vt=Q[ct];this.set(vt[0],vt[1])}}function kt(Q){var ct=-1,gt=Q?Q.length:0;for(this.clear();++ct<gt;){var vt=Q[ct];this.set(vt[0],vt[1])}}function Wt(Q){var ct=-1,gt=Q?Q.length:0;for(this.__data__=new kt;++ct<gt;)this.add(Q[ct])}function Ht(Q){this.__data__=new At(Q)}function Vt(Q,ct){var gt=Jt(Q)||Qt(Q)?function(Mt,ue){for(var le=-1,se=Array(Mt);++le<Mt;)se[le]=ue(le);return se}(Q.length,String):[],vt=gt.length,Xt=!!vt;for(var Et in Q)!ct&&!q.call(Q,Et)||Xt&&(Et=="length"||bt(Et,vt))||gt.push(Et);return gt}function Kt(Q,ct){for(var gt=Q.length;gt--;)if(Ct(Q[gt][0],ct))return gt;return-1}function Nt(Q,ct,gt,vt){return Rt(Q,function(Xt,Et,Mt){ct(vt,Xt,gt(Xt),Mt)}),vt}Ot.prototype.clear=function(){this.__data__=G?G(null):{}},Ot.prototype.delete=function(Q){return this.has(Q)&&delete this.__data__[Q]},Ot.prototype.get=function(Q){var ct=this.__data__;if(G){var gt=ct[Q];return gt==="__lodash_hash_undefined__"?void 0:gt}return q.call(ct,Q)?ct[Q]:void 0},Ot.prototype.has=function(Q){var ct=this.__data__;return G?ct[Q]!==void 0:q.call(ct,Q)},Ot.prototype.set=function(Q,ct){return this.__data__[Q]=G&&ct===void 0?"__lodash_hash_undefined__":ct,this},At.prototype.clear=function(){this.__data__=[]},At.prototype.delete=function(Q){var ct=this.__data__,gt=Kt(ct,Q);return!(gt<0)&&(gt==ct.length-1?ct.pop():V.call(ct,gt,1),!0)},At.prototype.get=function(Q){var ct=this.__data__,gt=Kt(ct,Q);return gt<0?void 0:ct[gt][1]},At.prototype.has=function(Q){return Kt(this.__data__,Q)>-1},At.prototype.set=function(Q,ct){var gt=this.__data__,vt=Kt(gt,Q);return vt<0?gt.push([Q,ct]):gt[vt][1]=ct,this},kt.prototype.clear=function(){this.__data__={hash:new Ot,map:new(Y||At),string:new Ot}},kt.prototype.delete=function(Q){return $t(this,Q).delete(Q)},kt.prototype.get=function(Q){return $t(this,Q).get(Q)},kt.prototype.has=function(Q){return $t(this,Q).has(Q)},kt.prototype.set=function(Q,ct){return $t(this,Q).set(Q,ct),this},Wt.prototype.add=Wt.prototype.push=function(Q){return this.__data__.set(Q,"__lodash_hash_undefined__"),this},Wt.prototype.has=function(Q){return this.__data__.has(Q)},Ht.prototype.clear=function(){this.__data__=new At},Ht.prototype.delete=function(Q){return this.__data__.delete(Q)},Ht.prototype.get=function(Q){return this.__data__.get(Q)},Ht.prototype.has=function(Q){return this.__data__.has(Q)},Ht.prototype.set=function(Q,ct){var gt=this.__data__;if(gt instanceof At){var vt=gt.__data__;if(!Y||vt.length<199)return vt.push([Q,ct]),this;gt=this.__data__=new kt(vt)}return gt.set(Q,ct),this};var _t,Rt=(_t=function(Q,ct){return Q&&zt(Q,ct,Re)},function(Q,ct){if(Q==null)return Q;if(!qt(Q))return _t(Q,ct);for(var gt=Q.length,vt=-1,Xt=Object(Q);++vt<gt&&ct(Xt[vt],vt,Xt)!==!1;);return Q}),zt=function(Q){return function(ct,gt,vt){for(var Xt=-1,Et=Object(ct),Mt=vt(ct),ue=Mt.length;ue--;){var le=Mt[Q?ue:++Xt];if(gt(Et[le],le,Et)===!1)break}return ct}}();function Bt(Q,ct){for(var gt=0,vt=(ct=ht(ct,Q)?[ct]:Pt(ct)).length;Q!=null&><vt;)Q=Q[rt(ct[gt++])];return gt&>==vt?Q:void 0}function mt(Q,ct){return Q!=null&&ct in Object(Q)}function It(Q,ct,gt,vt,Xt){return Q===ct||(Q==null||ct==null||!ae(Q)&&!ke(ct)?Q!=Q&&ct!=ct:function(Et,Mt,ue,le,se,te){var pe=Jt(Et),Ce=Jt(Mt),fe="[object Array]",Ee="[object Array]";pe||(fe=(fe=ut(Et))==o?r:fe),Ce||(Ee=(Ee=ut(Mt))==o?r:Ee);var Ne=fe==r&&!z(Et),Be=Ee==r&&!z(Mt),Qe=fe==Ee;if(Qe&&!Ne)return te||(te=new Ht),pe||Me(Et)?Zt(Et,Mt,ue,le,se,te):function(me,he,hr,Ar,gi,qe,fr){switch(hr){case"[object DataView]":if(me.byteLength!=he.byteLength||me.byteOffset!=he.byteOffset)return!1;me=me.buffer,he=he.buffer;case"[object ArrayBuffer]":return!(me.byteLength!=he.byteLength||!Ar(new I(me),new I(he)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ct(+me,+he);case"[object Error]":return me.name==he.name&&me.message==he.message;case"[object RegExp]":case"[object String]":return me==he+"";case a:var dr=E;case e:var Cn=2&qe;if(dr||(dr=O),me.size!=he.size&&!Cn)return!1;var bi=fr.get(me);if(bi)return bi==he;qe|=1,fr.set(me,he);var Zr=Zt(dr(me),dr(he),Ar,gi,qe,fr);return fr.delete(me),Zr;case"[object Symbol]":if(pt)return pt.call(me)==pt.call(he)}return!1}(Et,Mt,fe,ue,le,se,te);if(!(2&se)){var ir=Ne&&q.call(Et,"__wrapped__"),Xr=Be&&q.call(Mt,"__wrapped__");if(ir||Xr){var Yr=ir?Et.value():Et,Gr=Xr?Mt.value():Mt;return te||(te=new Ht),ue(Yr,Gr,le,se,te)}}return Qe?(te||(te=new Ht),function(me,he,hr,Ar,gi,qe){var fr=2&gi,dr=Re(me),Cn=dr.length,bi=Re(he).length;if(Cn!=bi&&!fr)return!1;for(var Zr=Cn;Zr--;){var pr=dr[Zr];if(!(fr?pr in he:q.call(he,pr)))return!1}var zl=qe.get(me);if(zl&&qe.get(he))return zl==he;var yi=!0;qe.set(me,he),qe.set(he,me);for(var Ts=fr;++Zr<Cn;){pr=dr[Zr];var vi=me[pr],wi=he[pr];if(Ar)var Ul=fr?Ar(wi,vi,pr,he,me,qe):Ar(vi,wi,pr,me,he,qe);if(!(Ul===void 0?vi===wi||hr(vi,wi,Ar,gi,qe):Ul)){yi=!1;break}Ts||(Ts=pr=="constructor")}if(yi&&!Ts){var _i=me.constructor,xi=he.constructor;_i==xi||!("constructor"in me)||!("constructor"in he)||typeof _i=="function"&&_i instanceof _i&&typeof xi=="function"&&xi instanceof xi||(yi=!1)}return qe.delete(me),qe.delete(he),yi}(Et,Mt,ue,le,se,te)):!1}(Q,ct,It,gt,vt,Xt))}function xt(Q){return!(!ae(Q)||function(ct){return!!L&&L in ct}(Q))&&(re(Q)||z(Q)?F:d).test(at(Q))}function Dt(Q){return typeof Q=="function"?Q:Q==null?Ie:typeof Q=="object"?Jt(Q)?function(vt,Xt){return ht(vt)&&St(Xt)?Yt(rt(vt),Xt):function(Et){var Mt=function(ue,le,se){var te=ue==null?void 0:Bt(ue,le);return te===void 0?se:te}(Et,vt);return Mt===void 0&&Mt===Xt?function(ue,le){return ue!=null&&function(se,te,pe){te=ht(te,se)?[te]:Pt(te);for(var Ce,fe=-1,Ee=te.length;++fe<Ee;){var Ne=rt(te[fe]);if(!(Ce=se!=null&&pe(se,Ne)))break;se=se[Ne]}return Ce||!!(Ee=se?se.length:0)&&ee(Ee)&&bt(Ne,Ee)&&(Jt(se)||Qt(se))}(ue,le,mt)}(Et,vt):It(Xt,Mt,void 0,3)}}(Q[0],Q[1]):function(vt){var Xt=function(Et){for(var Mt=Re(Et),ue=Mt.length;ue--;){var le=Mt[ue],se=Et[le];Mt[ue]=[le,se,St(se)]}return Mt}(vt);return Xt.length==1&&Xt[0][2]?Yt(Xt[0][0],Xt[0][1]):function(Et){return Et===vt||function(Mt,ue,le,se){var te=le.length,pe=te,Ce=!se;if(Mt==null)return!pe;for(Mt=Object(Mt);te--;){var fe=le[te];if(Ce&&fe[2]?fe[1]!==Mt[fe[0]]:!(fe[0]in Mt))return!1}for(;++te<pe;){var Ee=(fe=le[te])[0],Ne=Mt[Ee],Be=fe[1];if(Ce&&fe[2]){if(Ne===void 0&&!(Ee in Mt))return!1}else{var Qe=new Ht;if(se)var ir=se(Ne,Be,Ee,Mt,ue,Qe);if(!(ir===void 0?It(Be,Ne,se,3,Qe):ir))return!1}}return!0}(Et,vt,Xt)}}(Q):ht(ct=Q)?(gt=rt(ct),function(vt){return vt==null?void 0:vt[gt]}):function(vt){return function(Xt){return Bt(Xt,vt)}}(ct);var ct,gt}function jt(Q){if(gt=(ct=Q)&&ct.constructor,vt=typeof gt=="function"&>.prototype||A,ct!==vt)return K(Q);var ct,gt,vt,Xt=[];for(var Et in Object(Q))q.call(Q,Et)&&Et!="constructor"&&Xt.push(Et);return Xt}function Pt(Q){return Jt(Q)?Q:Tt(Q)}function Zt(Q,ct,gt,vt,Xt,Et){var Mt=2&Xt,ue=Q.length,le=ct.length;if(ue!=le&&!(Mt&&le>ue))return!1;var se=Et.get(Q);if(se&&Et.get(ct))return se==ct;var te=-1,pe=!0,Ce=1&Xt?new Wt:void 0;for(Et.set(Q,ct),Et.set(ct,Q);++te<ue;){var fe=Q[te],Ee=ct[te];if(vt)var Ne=Mt?vt(Ee,fe,te,ct,Q,Et):vt(fe,Ee,te,Q,ct,Et);if(Ne!==void 0){if(Ne)continue;pe=!1;break}if(Ce){if(!U(ct,function(Be,Qe){if(!Ce.has(Qe)&&(fe===Be||gt(fe,Be,vt,Xt,Et)))return Ce.add(Qe)})){pe=!1;break}}else if(fe!==Ee&&!gt(fe,Ee,vt,Xt,Et)){pe=!1;break}}return Et.delete(Q),Et.delete(ct),pe}function $t(Q,ct){var gt,vt,Xt=Q.__data__;return((vt=typeof(gt=ct))=="string"||vt=="number"||vt=="symbol"||vt=="boolean"?gt!=="__proto__":gt===null)?Xt[typeof ct=="string"?"string":"hash"]:Xt.map}function Lt(Q,ct){var gt=function(vt,Xt){return vt==null?void 0:vt[Xt]}(Q,ct);return xt(gt)?gt:void 0}var ut=function(Q){return X.call(Q)};function bt(Q,ct){return!!(ct=ct??9007199254740991)&&(typeof Q=="number"||c.test(Q))&&Q>-1&&Q%1==0&&Q<ct}function ht(Q,ct){if(Jt(Q))return!1;var gt=typeof Q;return!(gt!="number"&>!="symbol"&>!="boolean"&&Q!=null&&!be(Q))||l.test(Q)||!n.test(Q)||ct!=null&&Q in Object(ct)}function St(Q){return Q==Q&&!ae(Q)}function Yt(Q,ct){return function(gt){return gt!=null&>[Q]===ct&&(ct!==void 0||Q in Object(gt))}}(Z&&ut(new Z(new ArrayBuffer(1)))!="[object DataView]"||Y&&ut(new Y)!=a||J&&ut(J.resolve())!="[object Promise]"||nt&&ut(new nt)!=e||it&&ut(new it)!="[object WeakMap]")&&(ut=function(Q){var ct=X.call(Q),gt=ct==r?Q.constructor:void 0,vt=gt?at(gt):void 0;if(vt)switch(vt){case tt:return"[object DataView]";case et:return a;case ot:return"[object Promise]";case st:return e;case lt:return"[object WeakMap]"}return ct});var Tt=Ut(function(Q){var ct;Q=(ct=Q)==null?"":function(vt){if(typeof vt=="string")return vt;if(be(vt))return yt?yt.call(vt):"";var Xt=vt+"";return Xt=="0"&&1/vt==-1/0?"-0":Xt}(ct);var gt=[];return i.test(Q)&>.push(""),Q.replace(s,function(vt,Xt,Et,Mt){gt.push(Et?Mt.replace(h,"$1"):Xt||vt)}),gt});function rt(Q){if(typeof Q=="string"||be(Q))return Q;var ct=Q+"";return ct=="0"&&1/Q==-1/0?"-0":ct}function at(Q){if(Q!=null){try{return H.call(Q)}catch{}try{return Q+""}catch{}}return""}var dt,wt=(dt=function(Q,ct,gt){q.call(Q,gt)?Q[gt].push(ct):Q[gt]=[ct]},function(Q,ct){var gt=Jt(Q)?D:Nt,vt={};return gt(Q,dt,Dt(ct),vt)});function Ut(Q,ct){if(typeof Q!="function"||ct&&typeof ct!="function")throw new TypeError("Expected a function");var gt=function(){var vt=arguments,Xt=ct?ct.apply(this,vt):vt[0],Et=gt.cache;if(Et.has(Xt))return Et.get(Xt);var Mt=Q.apply(this,vt);return gt.cache=Et.set(Xt,Mt),Mt};return gt.cache=new(Ut.Cache||kt),gt}function Ct(Q,ct){return Q===ct||Q!=Q&&ct!=ct}function Qt(Q){return function(ct){return ke(ct)&&qt(ct)}(Q)&&q.call(Q,"callee")&&(!R.call(Q,"callee")||X.call(Q)==o)}Ut.Cache=kt;var Jt=Array.isArray;function qt(Q){return Q!=null&&ee(Q.length)&&!re(Q)}function re(Q){var ct=ae(Q)?X.call(Q):"";return ct=="[object Function]"||ct=="[object GeneratorFunction]"}function ee(Q){return typeof Q=="number"&&Q>-1&&Q%1==0&&Q<=9007199254740991}function ae(Q){var ct=typeof Q;return!!Q&&(ct=="object"||ct=="function")}function ke(Q){return!!Q&&typeof Q=="object"}function be(Q){return typeof Q=="symbol"||ke(Q)&&X.call(Q)=="[object Symbol]"}var Me=B?function(Q){return function(ct){return Q(ct)}}(B):function(Q){return ke(Q)&&ee(Q.length)&&!!p[X.call(Q)]};function Re(Q){return qt(Q)?Vt(Q):jt(Q)}function Ie(Q){return Q}b.exports=wt}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(t,b,g){var f=Object.prototype.toString;b.exports=function(o){return o===!0||o===!1||function(a){return!!a&&typeof a=="object"}(o)&&f.call(o)=="[object Boolean]"}},{}],445:[function(t,b,g){(function(f){(function(){var o="[object Arguments]",a="[object Map]",r="[object Object]",e="[object Set]",n=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i[o]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i[a]=i["[object Number]"]=i[r]=i["[object RegExp]"]=i[e]=i["[object String]"]=i["[object WeakMap]"]=!1;var s=typeof f=="object"&&f&&f.Object===Object&&f,h=typeof self=="object"&&self&&self.Object===Object&&self,d=s||h||Function("return this")(),c=typeof g=="object"&&g&&!g.nodeType&&g,p=c&&typeof b=="object"&&b&&!b.nodeType&&b,m=p&&p.exports===c,S=m&&s.process,C=function(){try{return S&&S.binding&&S.binding("util")}catch{}}(),M=C&&C.isTypedArray;function P(rt,at){for(var dt=-1,wt=rt==null?0:rt.length;++dt<wt;)if(at(rt[dt],dt,rt))return!0;return!1}function $(rt){var at=-1,dt=Array(rt.size);return rt.forEach(function(wt,Ut){dt[++at]=[Ut,wt]}),dt}function N(rt){var at=-1,dt=Array(rt.size);return rt.forEach(function(wt){dt[++at]=wt}),dt}var B,D,U,z=Array.prototype,E=Function.prototype,O=Object.prototype,x=d["__core-js_shared__"],y=E.toString,v=O.hasOwnProperty,w=(B=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+B:"",_=O.toString,A=RegExp("^"+y.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=m?d.Buffer:void 0,L=d.Symbol,H=d.Uint8Array,q=O.propertyIsEnumerable,X=z.splice,F=L?L.toStringTag:void 0,W=Object.getOwnPropertySymbols,I=j?j.isBuffer:void 0,R=(D=Object.keys,U=Object,function(rt){return D(U(rt))}),V=mt(d,"DataView"),K=mt(d,"Map"),Z=mt(d,"Promise"),Y=mt(d,"Set"),J=mt(d,"WeakMap"),nt=mt(Object,"create"),it=jt(V),G=jt(K),tt=jt(Z),et=jt(Y),ot=jt(J),st=L?L.prototype:void 0,lt=st?st.valueOf:void 0;function ft(rt){var at=-1,dt=rt==null?0:rt.length;for(this.clear();++at<dt;){var wt=rt[at];this.set(wt[0],wt[1])}}function pt(rt){var at=-1,dt=rt==null?0:rt.length;for(this.clear();++at<dt;){var wt=rt[at];this.set(wt[0],wt[1])}}function yt(rt){var at=-1,dt=rt==null?0:rt.length;for(this.clear();++at<dt;){var wt=rt[at];this.set(wt[0],wt[1])}}function Ot(rt){var at=-1,dt=rt==null?0:rt.length;for(this.__data__=new yt;++at<dt;)this.add(rt[at])}function At(rt){var at=this.__data__=new pt(rt);this.size=at.size}function kt(rt,at){var dt=$t(rt),wt=!dt&&Zt(rt),Ut=!dt&&!wt&&Lt(rt),Ct=!dt&&!wt&&!Ut&&Yt(rt),Qt=dt||wt||Ut||Ct,Jt=Qt?function(ee,ae){for(var ke=-1,be=Array(ee);++ke<ee;)be[ke]=ae(ke);return be}(rt.length,String):[],qt=Jt.length;for(var re in rt)!at&&!v.call(rt,re)||Qt&&(re=="length"||Ut&&(re=="offset"||re=="parent")||Ct&&(re=="buffer"||re=="byteLength"||re=="byteOffset")||Dt(re,qt))||Jt.push(re);return Jt}function Wt(rt,at){for(var dt=rt.length;dt--;)if(Pt(rt[dt][0],at))return dt;return-1}function Ht(rt){return rt==null?rt===void 0?"[object Undefined]":"[object Null]":F&&F in Object(rt)?function(at){var dt=v.call(at,F),wt=at[F];try{at[F]=void 0;var Ut=!0}catch{}var Ct=_.call(at);return Ut&&(dt?at[F]=wt:delete at[F]),Ct}(rt):function(at){return _.call(at)}(rt)}function Vt(rt){return St(rt)&&Ht(rt)==o}function Kt(rt,at,dt,wt,Ut){return rt===at||(rt==null||at==null||!St(rt)&&!St(at)?rt!=rt&&at!=at:function(Ct,Qt,Jt,qt,re,ee){var ae=$t(Ct),ke=$t(Qt),be=ae?"[object Array]":xt(Ct),Me=ke?"[object Array]":xt(Qt),Re=(be=be==o?r:be)==r,Ie=(Me=Me==o?r:Me)==r,Q=be==Me;if(Q&&Lt(Ct)){if(!Lt(Qt))return!1;ae=!0,Re=!1}if(Q&&!Re)return ee||(ee=new At),ae||Yt(Ct)?Rt(Ct,Qt,Jt,qt,re,ee):function(Et,Mt,ue,le,se,te,pe){switch(ue){case"[object DataView]":if(Et.byteLength!=Mt.byteLength||Et.byteOffset!=Mt.byteOffset)return!1;Et=Et.buffer,Mt=Mt.buffer;case"[object ArrayBuffer]":return!(Et.byteLength!=Mt.byteLength||!te(new H(Et),new H(Mt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pt(+Et,+Mt);case"[object Error]":return Et.name==Mt.name&&Et.message==Mt.message;case"[object RegExp]":case"[object String]":return Et==Mt+"";case a:var Ce=$;case e:var fe=1≤if(Ce||(Ce=N),Et.size!=Mt.size&&!fe)return!1;var Ee=pe.get(Et);if(Ee)return Ee==Mt;le|=2,pe.set(Et,Mt);var Ne=Rt(Ce(Et),Ce(Mt),le,se,te,pe);return pe.delete(Et),Ne;case"[object Symbol]":if(lt)return lt.call(Et)==lt.call(Mt)}return!1}(Ct,Qt,be,Jt,qt,re,ee);if(!(1&Jt)){var ct=Re&&v.call(Ct,"__wrapped__"),gt=Ie&&v.call(Qt,"__wrapped__");if(ct||gt){var vt=ct?Ct.value():Ct,Xt=gt?Qt.value():Qt;return ee||(ee=new At),re(vt,Xt,Jt,qt,ee)}}return Q?(ee||(ee=new At),function(Et,Mt,ue,le,se,te){var pe=1&ue,Ce=zt(Et),fe=Ce.length,Ee=zt(Mt).length;if(fe!=Ee&&!pe)return!1;for(var Ne=fe;Ne--;){var Be=Ce[Ne];if(!(pe?Be in Mt:v.call(Mt,Be)))return!1}var Qe=te.get(Et);if(Qe&&te.get(Mt))return Qe==Mt;var ir=!0;te.set(Et,Mt),te.set(Mt,Et);for(var Xr=pe;++Ne<fe;){Be=Ce[Ne];var Yr=Et[Be],Gr=Mt[Be];if(le)var me=pe?le(Gr,Yr,Be,Mt,Et,te):le(Yr,Gr,Be,Et,Mt,te);if(!(me===void 0?Yr===Gr||se(Yr,Gr,ue,le,te):me)){ir=!1;break}Xr||(Xr=Be=="constructor")}if(ir&&!Xr){var he=Et.constructor,hr=Mt.constructor;he==hr||!("constructor"in Et)||!("constructor"in Mt)||typeof he=="function"&&he instanceof he&&typeof hr=="function"&&hr instanceof hr||(ir=!1)}return te.delete(Et),te.delete(Mt),ir}(Ct,Qt,Jt,qt,re,ee)):!1}(rt,at,dt,wt,Kt,Ut))}function Nt(rt){return!(!ht(rt)||function(at){return!!w&&w in at}(rt))&&(ut(rt)?A:n).test(jt(rt))}function _t(rt){if(dt=(at=rt)&&at.constructor,wt=typeof dt=="function"&&dt.prototype||O,at!==wt)return R(rt);var at,dt,wt,Ut=[];for(var Ct in Object(rt))v.call(rt,Ct)&&Ct!="constructor"&&Ut.push(Ct);return Ut}function Rt(rt,at,dt,wt,Ut,Ct){var Qt=1&dt,Jt=rt.length,qt=at.length;if(Jt!=qt&&!(Qt&&qt>Jt))return!1;var re=Ct.get(rt);if(re&&Ct.get(at))return re==at;var ee=-1,ae=!0,ke=2&dt?new Ot:void 0;for(Ct.set(rt,at),Ct.set(at,rt);++ee<Jt;){var be=rt[ee],Me=at[ee];if(wt)var Re=Qt?wt(Me,be,ee,at,rt,Ct):wt(be,Me,ee,rt,at,Ct);if(Re!==void 0){if(Re)continue;ae=!1;break}if(ke){if(!P(at,function(Ie,Q){if(ct=Q,!ke.has(ct)&&(be===Ie||Ut(be,Ie,dt,wt,Ct)))return ke.push(Q);var ct})){ae=!1;break}}else if(be!==Me&&!Ut(be,Me,dt,wt,Ct)){ae=!1;break}}return Ct.delete(rt),Ct.delete(at),ae}function zt(rt){return function(at,dt,wt){var Ut=dt(at);return $t(at)?Ut:function(Ct,Qt){for(var Jt=-1,qt=Qt.length,re=Ct.length;++Jt<qt;)Ct[re+Jt]=Qt[Jt];return Ct}(Ut,wt(at))}(rt,Tt,It)}function Bt(rt,at){var dt,wt,Ut=rt.__data__;return((wt=typeof(dt=at))=="string"||wt=="number"||wt=="symbol"||wt=="boolean"?dt!=="__proto__":dt===null)?Ut[typeof at=="string"?"string":"hash"]:Ut.map}function mt(rt,at){var dt=function(wt,Ut){return wt==null?void 0:wt[Ut]}(rt,at);return Nt(dt)?dt:void 0}ft.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},ft.prototype.delete=function(rt){var at=this.has(rt)&&delete this.__data__[rt];return this.size-=at?1:0,at},ft.prototype.get=function(rt){var at=this.__data__;if(nt){var dt=at[rt];return dt==="__lodash_hash_undefined__"?void 0:dt}return v.call(at,rt)?at[rt]:void 0},ft.prototype.has=function(rt){var at=this.__data__;return nt?at[rt]!==void 0:v.call(at,rt)},ft.prototype.set=function(rt,at){var dt=this.__data__;return this.size+=this.has(rt)?0:1,dt[rt]=nt&&at===void 0?"__lodash_hash_undefined__":at,this},pt.prototype.clear=function(){this.__data__=[],this.size=0},pt.prototype.delete=function(rt){var at=this.__data__,dt=Wt(at,rt);return!(dt<0)&&(dt==at.length-1?at.pop():X.call(at,dt,1),--this.size,!0)},pt.prototype.get=function(rt){var at=this.__data__,dt=Wt(at,rt);return dt<0?void 0:at[dt][1]},pt.prototype.has=function(rt){return Wt(this.__data__,rt)>-1},pt.prototype.set=function(rt,at){var dt=this.__data__,wt=Wt(dt,rt);return wt<0?(++this.size,dt.push([rt,at])):dt[wt][1]=at,this},yt.prototype.clear=function(){this.size=0,this.__data__={hash:new ft,map:new(K||pt),string:new ft}},yt.prototype.delete=function(rt){var at=Bt(this,rt).delete(rt);return this.size-=at?1:0,at},yt.prototype.get=function(rt){return Bt(this,rt).get(rt)},yt.prototype.has=function(rt){return Bt(this,rt).has(rt)},yt.prototype.set=function(rt,at){var dt=Bt(this,rt),wt=dt.size;return dt.set(rt,at),this.size+=dt.size==wt?0:1,this},Ot.prototype.add=Ot.prototype.push=function(rt){return this.__data__.set(rt,"__lodash_hash_undefined__"),this},Ot.prototype.has=function(rt){return this.__data__.has(rt)},At.prototype.clear=function(){this.__data__=new pt,this.size=0},At.prototype.delete=function(rt){var at=this.__data__,dt=at.delete(rt);return this.size=at.size,dt},At.prototype.get=function(rt){return this.__data__.get(rt)},At.prototype.has=function(rt){return this.__data__.has(rt)},At.prototype.set=function(rt,at){var dt=this.__data__;if(dt instanceof pt){var wt=dt.__data__;if(!K||wt.length<199)return wt.push([rt,at]),this.size=++dt.size,this;dt=this.__data__=new yt(wt)}return dt.set(rt,at),this.size=dt.size,this};var It=W?function(rt){return rt==null?[]:(rt=Object(rt),function(at,dt){for(var wt=-1,Ut=at==null?0:at.length,Ct=0,Qt=[];++wt<Ut;){var Jt=at[wt];dt(Jt,wt,at)&&(Qt[Ct++]=Jt)}return Qt}(W(rt),function(at){return q.call(rt,at)}))}:function(){return[]},xt=Ht;function Dt(rt,at){return!!(at=at??9007199254740991)&&(typeof rt=="number"||l.test(rt))&&rt>-1&&rt%1==0&&rt<at}function jt(rt){if(rt!=null){try{return y.call(rt)}catch{}try{return rt+""}catch{}}return""}function Pt(rt,at){return rt===at||rt!=rt&&at!=at}(V&&xt(new V(new ArrayBuffer(1)))!="[object DataView]"||K&&xt(new K)!=a||Z&&xt(Z.resolve())!="[object Promise]"||Y&&xt(new Y)!=e||J&&xt(new J)!="[object WeakMap]")&&(xt=function(rt){var at=Ht(rt),dt=at==r?rt.constructor:void 0,wt=dt?jt(dt):"";if(wt)switch(wt){case it:return"[object DataView]";case G:return a;case tt:return"[object Promise]";case et:return e;case ot:return"[object WeakMap]"}return at});var Zt=Vt(function(){return arguments}())?Vt:function(rt){return St(rt)&&v.call(rt,"callee")&&!q.call(rt,"callee")},$t=Array.isArray,Lt=I||function(){return!1};function ut(rt){if(!ht(rt))return!1;var at=Ht(rt);return at=="[object Function]"||at=="[object GeneratorFunction]"||at=="[object AsyncFunction]"||at=="[object Proxy]"}function bt(rt){return typeof rt=="number"&&rt>-1&&rt%1==0&&rt<=9007199254740991}function ht(rt){var at=typeof rt;return rt!=null&&(at=="object"||at=="function")}function St(rt){return rt!=null&&typeof rt=="object"}var Yt=M?function(rt){return function(at){return rt(at)}}(M):function(rt){return St(rt)&&bt(rt.length)&&!!i[Ht(rt)]};function Tt(rt){return(at=rt)!=null&&bt(at.length)&&!ut(at)?kt(rt):_t(rt);var at}b.exports=function(rt,at){return Kt(rt,at)}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(t,b,g){(function(f){(function(){var o=typeof f=="object"&&f&&f.Object===Object&&f,a=typeof self=="object"&&self&&self.Object===Object&&self,r=o||a||Function("return this")(),e=Object.prototype,n=e.hasOwnProperty,l=e.toString,i=r.Symbol,s=i?i.toStringTag:void 0;function h(d){return d==null?d===void 0?"[object Undefined]":"[object Null]":s&&s in Object(d)?function(c){var p=n.call(c,s),m=c[s];try{c[s]=void 0;var S=!0}catch{}var C=l.call(c);return S&&(p?c[s]=m:delete c[s]),C}(d):function(c){return l.call(c)}(d)}b.exports=function(d){if(!function(p){var m=typeof p;return p!=null&&(m=="object"||m=="function")}(d))return!1;var c=h(d);return c=="[object Function]"||c=="[object GeneratorFunction]"||c=="[object AsyncFunction]"||c=="[object Proxy]"}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(t,b,g){b.exports=function(f){return f==null}},{}],448:[function(t,b,g){b.exports=function(f){return f===void 0}},{}],449:[function(t,b,g){(function(f){(function(){var o=/^\[object .+?Constructor\]$/,a=typeof f=="object"&&f&&f.Object===Object&&f,r=typeof self=="object"&&self&&self.Object===Object&&self,e=a||r||Function("return this")();function n(H,q){return!!(H&&H.length)&&function(X,F,W){if(F!=F)return function(V,K,Z,Y){for(var J=V.length,nt=Z+(Y?1:-1);Y?nt--:++nt<J;)if(K(V[nt],nt,V))return nt;return-1}(X,i,W);for(var I=W-1,R=X.length;++I<R;)if(X[I]===F)return I;return-1}(H,q,0)>-1}function l(H,q,X){for(var F=-1,W=H?H.length:0;++F<W;)if(X(q,H[F]))return!0;return!1}function i(H){return H!=H}function s(H,q){return H.has(q)}function h(H){var q=-1,X=Array(H.size);return H.forEach(function(F){X[++q]=F}),X}var d,c=Array.prototype,p=Function.prototype,m=Object.prototype,S=e["__core-js_shared__"],C=(d=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",M=p.toString,P=m.hasOwnProperty,$=m.toString,N=RegExp("^"+M.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=c.splice,D=j(e,"Map"),U=j(e,"Set"),z=j(Object,"create");function E(H){var q=-1,X=H?H.length:0;for(this.clear();++q<X;){var F=H[q];this.set(F[0],F[1])}}function O(H){var q=-1,X=H?H.length:0;for(this.clear();++q<X;){var F=H[q];this.set(F[0],F[1])}}function x(H){var q=-1,X=H?H.length:0;for(this.clear();++q<X;){var F=H[q];this.set(F[0],F[1])}}function y(H){var q=-1,X=H?H.length:0;for(this.__data__=new x;++q<X;)this.add(H[q])}function v(H,q){for(var X,F,W=H.length;W--;)if((X=H[W][0])===(F=q)||X!=X&&F!=F)return W;return-1}function w(H){return!(!L(H)||(q=H,C&&C in q))&&(function(X){var F=L(X)?$.call(X):"";return F=="[object Function]"||F=="[object GeneratorFunction]"}(H)||function(X){var F=!1;if(X!=null&&typeof X.toString!="function")try{F=!!(X+"")}catch{}return F}(H)?N:o).test(function(X){if(X!=null){try{return M.call(X)}catch{}try{return X+""}catch{}}return""}(H));var q}E.prototype.clear=function(){this.__data__=z?z(null):{}},E.prototype.delete=function(H){return this.has(H)&&delete this.__data__[H]},E.prototype.get=function(H){var q=this.__data__;if(z){var X=q[H];return X==="__lodash_hash_undefined__"?void 0:X}return P.call(q,H)?q[H]:void 0},E.prototype.has=function(H){var q=this.__data__;return z?q[H]!==void 0:P.call(q,H)},E.prototype.set=function(H,q){return this.__data__[H]=z&&q===void 0?"__lodash_hash_undefined__":q,this},O.prototype.clear=function(){this.__data__=[]},O.prototype.delete=function(H){var q=this.__data__,X=v(q,H);return!(X<0)&&(X==q.length-1?q.pop():B.call(q,X,1),!0)},O.prototype.get=function(H){var q=this.__data__,X=v(q,H);return X<0?void 0:q[X][1]},O.prototype.has=function(H){return v(this.__data__,H)>-1},O.prototype.set=function(H,q){var X=this.__data__,F=v(X,H);return F<0?X.push([H,q]):X[F][1]=q,this},x.prototype.clear=function(){this.__data__={hash:new E,map:new(D||O),string:new E}},x.prototype.delete=function(H){return A(this,H).delete(H)},x.prototype.get=function(H){return A(this,H).get(H)},x.prototype.has=function(H){return A(this,H).has(H)},x.prototype.set=function(H,q){return A(this,H).set(H,q),this},y.prototype.add=y.prototype.push=function(H){return this.__data__.set(H,"__lodash_hash_undefined__"),this},y.prototype.has=function(H){return this.__data__.has(H)};var _=U&&1/h(new U([,-0]))[1]==1/0?function(H){return new U(H)}:function(){};function A(H,q){var X,F,W=H.__data__;return((F=typeof(X=q))=="string"||F=="number"||F=="symbol"||F=="boolean"?X!=="__proto__":X===null)?W[typeof q=="string"?"string":"hash"]:W.map}function j(H,q){var X=function(F,W){return F==null?void 0:F[W]}(H,q);return w(X)?X:void 0}function L(H){var q=typeof H;return!!H&&(q=="object"||q=="function")}b.exports=function(H){return H&&H.length?function(q,X,F){var W=-1,I=n,R=q.length,V=!0,K=[],Z=K;if(F)V=!1,I=l;else if(R>=200){var Y=X?null:_(q);if(Y)return h(Y);V=!1,I=s,Z=new y}else Z=X?[]:K;t:for(;++W<R;){var J=q[W],nt=X?X(J):J;if(J=F||J!==0?J:0,V&&nt==nt){for(var it=Z.length;it--;)if(Z[it]===nt)continue t;X&&Z.push(nt),K.push(J)}else I(Z,nt,F)||(Z!==K&&Z.push(nt),K.push(J))}return K}(H):[]}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(t,b,g){var f=t("inherits"),o=t("hash-base"),a=t("safe-buffer").Buffer,r=new Array(16);function e(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function n(d,c){return d<<c|d>>>32-c}function l(d,c,p,m,S,C,M){return n(d+(c&p|~c&m)+S+C|0,M)+c|0}function i(d,c,p,m,S,C,M){return n(d+(c&m|p&~m)+S+C|0,M)+c|0}function s(d,c,p,m,S,C,M){return n(d+(c^p^m)+S+C|0,M)+c|0}function h(d,c,p,m,S,C,M){return n(d+(p^(c|~m))+S+C|0,M)+c|0}f(e,o),e.prototype._update=function(){for(var d=r,c=0;c<16;++c)d[c]=this._block.readInt32LE(4*c);var p=this._a,m=this._b,S=this._c,C=this._d;p=l(p,m,S,C,d[0],3614090360,7),C=l(C,p,m,S,d[1],3905402710,12),S=l(S,C,p,m,d[2],606105819,17),m=l(m,S,C,p,d[3],3250441966,22),p=l(p,m,S,C,d[4],4118548399,7),C=l(C,p,m,S,d[5],1200080426,12),S=l(S,C,p,m,d[6],2821735955,17),m=l(m,S,C,p,d[7],4249261313,22),p=l(p,m,S,C,d[8],1770035416,7),C=l(C,p,m,S,d[9],2336552879,12),S=l(S,C,p,m,d[10],4294925233,17),m=l(m,S,C,p,d[11],2304563134,22),p=l(p,m,S,C,d[12],1804603682,7),C=l(C,p,m,S,d[13],4254626195,12),S=l(S,C,p,m,d[14],2792965006,17),p=i(p,m=l(m,S,C,p,d[15],1236535329,22),S,C,d[1],4129170786,5),C=i(C,p,m,S,d[6],3225465664,9),S=i(S,C,p,m,d[11],643717713,14),m=i(m,S,C,p,d[0],3921069994,20),p=i(p,m,S,C,d[5],3593408605,5),C=i(C,p,m,S,d[10],38016083,9),S=i(S,C,p,m,d[15],3634488961,14),m=i(m,S,C,p,d[4],3889429448,20),p=i(p,m,S,C,d[9],568446438,5),C=i(C,p,m,S,d[14],3275163606,9),S=i(S,C,p,m,d[3],4107603335,14),m=i(m,S,C,p,d[8],1163531501,20),p=i(p,m,S,C,d[13],2850285829,5),C=i(C,p,m,S,d[2],4243563512,9),S=i(S,C,p,m,d[7],1735328473,14),p=s(p,m=i(m,S,C,p,d[12],2368359562,20),S,C,d[5],4294588738,4),C=s(C,p,m,S,d[8],2272392833,11),S=s(S,C,p,m,d[11],1839030562,16),m=s(m,S,C,p,d[14],4259657740,23),p=s(p,m,S,C,d[1],2763975236,4),C=s(C,p,m,S,d[4],1272893353,11),S=s(S,C,p,m,d[7],4139469664,16),m=s(m,S,C,p,d[10],3200236656,23),p=s(p,m,S,C,d[13],681279174,4),C=s(C,p,m,S,d[0],3936430074,11),S=s(S,C,p,m,d[3],3572445317,16),m=s(m,S,C,p,d[6],76029189,23),p=s(p,m,S,C,d[9],3654602809,4),C=s(C,p,m,S,d[12],3873151461,11),S=s(S,C,p,m,d[15],530742520,16),p=h(p,m=s(m,S,C,p,d[2],3299628645,23),S,C,d[0],4096336452,6),C=h(C,p,m,S,d[7],1126891415,10),S=h(S,C,p,m,d[14],2878612391,15),m=h(m,S,C,p,d[5],4237533241,21),p=h(p,m,S,C,d[12],1700485571,6),C=h(C,p,m,S,d[3],2399980690,10),S=h(S,C,p,m,d[10],4293915773,15),m=h(m,S,C,p,d[1],2240044497,21),p=h(p,m,S,C,d[8],1873313359,6),C=h(C,p,m,S,d[15],4264355552,10),S=h(S,C,p,m,d[6],2734768916,15),m=h(m,S,C,p,d[13],1309151649,21),p=h(p,m,S,C,d[4],4149444226,6),C=h(C,p,m,S,d[11],3174756917,10),S=h(S,C,p,m,d[2],718787259,15),m=h(m,S,C,p,d[9],3951481745,21),this._a=this._a+p|0,this._b=this._b+m|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 d=a.allocUnsafe(16);return d.writeInt32LE(this._a,0),d.writeInt32LE(this._b,4),d.writeInt32LE(this._c,8),d.writeInt32LE(this._d,12),d},b.exports=e},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(t,b,g){var f=t("bn.js"),o=t("brorand");function a(r){this.rand=r||new o.Rand}b.exports=a,a.create=function(r){return new a(r)},a.prototype._randbelow=function(r){var e=r.bitLength(),n=Math.ceil(e/8);do var l=new f(this.rand.generate(n));while(l.cmp(r)>=0);return l},a.prototype._randrange=function(r,e){var n=e.sub(r);return r.add(this._randbelow(n))},a.prototype.test=function(r,e,n){var l=r.bitLength(),i=f.mont(r),s=new f(1).toRed(i);e||(e=Math.max(1,l/48|0));for(var h=r.subn(1),d=0;!h.testn(d);d++);for(var c=r.shrn(d),p=h.toRed(i);e>0;e--){var m=this._randrange(new f(2),h);n&&n(m);var S=m.toRed(i).redPow(c);if(S.cmp(s)!==0&&S.cmp(p)!==0){for(var C=1;C<d;C++){if((S=S.redSqr()).cmp(s)===0)return!1;if(S.cmp(p)===0)break}if(C===d)return!1}}return!0},a.prototype.getDivisor=function(r,e){var n=r.bitLength(),l=f.mont(r),i=new f(1).toRed(l);e||(e=Math.max(1,n/48|0));for(var s=r.subn(1),h=0;!s.testn(h);h++);for(var d=r.shrn(h),c=s.toRed(l);e>0;e--){var p=this._randrange(new f(2),s),m=r.gcd(p);if(m.cmpn(1)!==0)return m;var S=p.toRed(l).redPow(d);if(S.cmp(i)!==0&&S.cmp(c)!==0){for(var C=1;C<h;C++){if((S=S.redSqr()).cmp(i)===0)return S.fromRed().subn(1).gcd(r);if(S.cmp(c)===0)break}if(C===h)return(S=S.redSqr()).fromRed().subn(1).gcd(r)}}return!1}},{"bn.js":452,brorand:187}],452:[function(t,b,g){arguments[4][184][0].apply(g,arguments)},{buffer:188,dup:184}],453:[function(t,b,g){function f(o,a){if(!o)throw new Error(a||"Assertion failed")}b.exports=f,f.equal=function(o,a,r){if(o!=a)throw new Error(r||"Assertion failed: "+o+" != "+a)}},{}],454:[function(t,b,g){var f=g;function o(r){return r.length===1?"0"+r:r}function a(r){for(var e="",n=0;n<r.length;n++)e+=o(r[n].toString(16));return e}f.toArray=function(r,e){if(Array.isArray(r))return r.slice();if(!r)return[];var n=[];if(typeof r!="string"){for(var l=0;l<r.length;l++)n[l]=0|r[l];return n}if(e==="hex")for((r=r.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(r="0"+r),l=0;l<r.length;l+=2)n.push(parseInt(r[l]+r[l+1],16));else for(l=0;l<r.length;l++){var i=r.charCodeAt(l),s=i>>8,h=255&i;s?n.push(s,h):n.push(h)}return n},f.zero2=o,f.toHex=a,f.encode=function(r,e){return e==="hex"?a(r):r}},{}],455:[function(t,b,g){b.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,b,g){var f=t("asn1.js");g.certificate=t("./certificate");var o=f.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())});g.RSAPrivateKey=o;var a=f.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});g.RSAPublicKey=a;var r=f.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(e),this.key("subjectPublicKey").bitstr())});g.PublicKey=r;var e=f.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())}),n=f.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(e),this.key("subjectPrivateKey").octstr())});g.PrivateKey=n;var l=f.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())});g.EncryptedPrivateKey=l;var i=f.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())});g.DSAPrivateKey=i,g.DSAparam=f.define("DSAparam",function(){this.int()});var s=f.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())});g.ECPrivateKey=s;var h=f.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});g.signature=f.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":170}],457:[function(t,b,g){var f=t("asn1.js"),o=f.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),a=f.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),r=f.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),e=f.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())}),n=f.define("RelativeDistinguishedName",function(){this.setof(a)}),l=f.define("RDNSequence",function(){this.seqof(n)}),i=f.define("Name",function(){this.choice({rdnSequence:this.use(l)})}),s=f.define("Validity",function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))}),h=f.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=f.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(r),this.key("issuer").use(i),this.key("validity").use(s),this.key("subject").use(i),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(h).optional())}),c=f.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(r),this.key("signatureValue").bitstr())});b.exports=c},{"asn1.js":170}],458:[function(t,b,g){var f=/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,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,r=t("evp_bytestokey"),e=t("browserify-aes"),n=t("safe-buffer").Buffer;b.exports=function(l,i){var s,h=l.toString(),d=h.match(f);if(d){var c="aes"+d[1],p=n.from(d[2],"hex"),m=n.from(d[3].replace(/[\r\n]/g,""),"base64"),S=r(i,p.slice(0,8),parseInt(d[1],10)).key,C=[],M=e.createDecipheriv(c,S,p);C.push(M.update(m)),C.push(M.final()),s=n.concat(C)}else{var P=h.match(a);s=n.from(P[2].replace(/[\r\n]/g,""),"base64")}return{tag:h.match(o)[1],data:s}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(t,b,g){var f=t("./asn1"),o=t("./aesid.json"),a=t("./fixProc"),r=t("browserify-aes"),e=t("pbkdf2"),n=t("safe-buffer").Buffer;function l(i){var s;typeof i!="object"||n.isBuffer(i)||(s=i.passphrase,i=i.key),typeof i=="string"&&(i=n.from(i));var h,d,c=a(i,s),p=c.tag,m=c.data;switch(p){case"CERTIFICATE":d=f.certificate.decode(m,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(d||(d=f.PublicKey.decode(m,"der")),h=d.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPublicKey.decode(d.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return d.subjectPrivateKey=d.subjectPublicKey,{type:"ec",data:d};case"1.2.840.10040.4.1":return d.algorithm.params.pub_key=f.DSAparam.decode(d.subjectPublicKey.data,"der"),{type:"dsa",data:d.algorithm.params};default:throw new Error("unknown key id "+h)}case"ENCRYPTED PRIVATE KEY":m=function(S,C){var M=S.algorithm.decrypt.kde.kdeparams.salt,P=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),$=o[S.algorithm.decrypt.cipher.algo.join(".")],N=S.algorithm.decrypt.cipher.iv,B=S.subjectPrivateKey,D=parseInt($.split("-")[1],10)/8,U=e.pbkdf2Sync(C,M,P,D,"sha1"),z=r.createDecipheriv($,U,N),E=[];return E.push(z.update(B)),E.push(z.final()),n.concat(E)}(m=f.EncryptedPrivateKey.decode(m,"der"),s);case"PRIVATE KEY":switch(h=(d=f.PrivateKey.decode(m,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPrivateKey.decode(d.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:d.algorithm.curve,privateKey:f.ECPrivateKey.decode(d.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return d.algorithm.params.priv_key=f.DSAparam.decode(d.subjectPrivateKey,"der"),{type:"dsa",params:d.algorithm.params};default:throw new Error("unknown key id "+h)}case"RSA PUBLIC KEY":return f.RSAPublicKey.decode(m,"der");case"RSA PRIVATE KEY":return f.RSAPrivateKey.decode(m,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:f.DSAPrivateKey.decode(m,"der")};case"EC PRIVATE KEY":return{curve:(m=f.ECPrivateKey.decode(m,"der")).parameters.value,privateKey:m.privateKey};default:throw new Error("unknown key type "+p)}}b.exports=l,l.signature=f.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(t,b,g){g.pbkdf2=t("./lib/async"),g.pbkdf2Sync=t("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(t,b,g){(function(f){(function(){var o,a,r=t("safe-buffer").Buffer,e=t("./precondition"),n=t("./default-encoding"),l=t("./sync"),i=t("./to-buffer"),s=f.crypto&&f.crypto.subtle,h={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"},d=[];function c(){return a||(a=f.process&&f.process.nextTick?f.process.nextTick:f.queueMicrotask?f.queueMicrotask:f.setImmediate?f.setImmediate:f.setTimeout)}function p(m,S,C,M,P){return s.importKey("raw",m,{name:"PBKDF2"},!1,["deriveBits"]).then(function($){return s.deriveBits({name:"PBKDF2",salt:S,iterations:C,hash:{name:P}},$,M<<3)}).then(function($){return r.from($)})}b.exports=function(m,S,C,M,P,$){typeof P=="function"&&($=P,P=void 0);var N=h[(P=P||"sha1").toLowerCase()];if(N&&typeof f.Promise=="function"){if(e(C,M),m=i(m,n,"Password"),S=i(S,n,"Salt"),typeof $!="function")throw new Error("No callback provided to pbkdf2");(function(B,D){B.then(function(U){c()(function(){D(null,U)})},function(U){c()(function(){D(U)})})})(function(B){if(f.process&&!f.process.browser||!s||!s.importKey||!s.deriveBits)return Promise.resolve(!1);if(d[B]!==void 0)return d[B];var D=p(o=o||r.alloc(8),o,10,128,B).then(function(){return!0}).catch(function(){return!1});return d[B]=D,D}(N).then(function(B){return B?p(m,S,C,M,N):l(m,S,C,M,P)}),$)}else c()(function(){var B;try{B=l(m,S,C,M,P)}catch(D){return $(D)}$(null,B)})}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(t,b,g){(function(f,o){(function(){var a;o.process&&o.process.browser?a="utf-8":o.process&&o.process.version?a=parseInt(f.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":a="utf-8",b.exports=a}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(t,b,g){var f=Math.pow(2,30)-1;b.exports=function(o,a){if(typeof o!="number")throw new TypeError("Iterations not a number");if(o<0)throw new TypeError("Bad iterations");if(typeof a!="number")throw new TypeError("Key length not a number");if(a<0||a>f||a!=a)throw new TypeError("Bad key length")}},{}],464:[function(t,b,g){var f=t("create-hash/md5"),o=t("ripemd160"),a=t("sha.js"),r=t("safe-buffer").Buffer,e=t("./precondition"),n=t("./default-encoding"),l=t("./to-buffer"),i=r.alloc(128),s={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(d,c,p){var m=function(N){function B(D){return a(N).update(D).digest()}return N==="rmd160"||N==="ripemd160"?function(D){return new o().update(D).digest()}:N==="md5"?f:B}(d),S=d==="sha512"||d==="sha384"?128:64;c.length>S?c=m(c):c.length<S&&(c=r.concat([c,i],S));for(var C=r.allocUnsafe(S+s[d]),M=r.allocUnsafe(S+s[d]),P=0;P<S;P++)C[P]=54^c[P],M[P]=92^c[P];var $=r.allocUnsafe(S+p+4);C.copy($,0,0,S),this.ipad1=$,this.ipad2=C,this.opad=M,this.alg=d,this.blocksize=S,this.hash=m,this.size=s[d]}h.prototype.run=function(d,c){return d.copy(c,this.blocksize),this.hash(c).copy(this.opad,this.blocksize),this.hash(this.opad)},b.exports=function(d,c,p,m,S){e(p,m);var C=new h(S=S||"sha1",d=l(d,n,"Password"),(c=l(c,n,"Salt")).length),M=r.allocUnsafe(m),P=r.allocUnsafe(c.length+4);c.copy(P,0,0,c.length);for(var $=0,N=s[S],B=Math.ceil(m/N),D=1;D<=B;D++){P.writeUInt32BE(D,c.length);for(var U=C.run(P,C.ipad1),z=U,E=1;E<p;E++){z=C.run(z,C.ipad2);for(var O=0;O<N;O++)U[O]^=z[O]}U.copy(M,$),$+=N}return M}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(t,b,g){var f=t("safe-buffer").Buffer;b.exports=function(o,a,r){if(f.isBuffer(o))return o;if(typeof o=="string")return f.from(o,a);if(ArrayBuffer.isView(o))return f.from(o.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(t,b,g){(function(f){(function(){f===void 0||!f.version||f.version.indexOf("v0.")===0||f.version.indexOf("v1.")===0&&f.version.indexOf("v1.8.")!==0?b.exports={nextTick:function(o,a,r,e){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var n,l,i=arguments.length;switch(i){case 0:case 1:return f.nextTick(o);case 2:return f.nextTick(function(){o.call(null,a)});case 3:return f.nextTick(function(){o.call(null,a,r)});case 4:return f.nextTick(function(){o.call(null,a,r,e)});default:for(n=new Array(i-1),l=0;l<n.length;)n[l++]=arguments[l];return f.nextTick(function(){o.apply(null,n)})}}}:b.exports=f}).call(this)}).call(this,t("_process"))},{_process:467}],467:[function(t,b,g){var f,o,a=b.exports={};function r(){throw new Error("setTimeout has not been defined")}function e(){throw new Error("clearTimeout has not been defined")}function n(S){if(f===setTimeout)return setTimeout(S,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(S,0);try{return f(S,0)}catch{try{return f.call(null,S,0)}catch{return f.call(this,S,0)}}}(function(){try{f=typeof setTimeout=="function"?setTimeout:r}catch{f=r}try{o=typeof clearTimeout=="function"?clearTimeout:e}catch{o=e}})();var l,i=[],s=!1,h=-1;function d(){s&&l&&(s=!1,l.length?i=l.concat(i):h=-1,i.length&&c())}function c(){if(!s){var S=n(d);s=!0;for(var C=i.length;C;){for(l=i,i=[];++h<C;)l&&l[h].run();h=-1,C=i.length}l=null,s=!1,function(M){if(o===clearTimeout)return clearTimeout(M);if((o===e||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(M);try{o(M)}catch{try{return o.call(null,M)}catch{return o.call(this,M)}}}(S)}}function p(S,C){this.fun=S,this.array=C}function m(){}a.nextTick=function(S){var C=new Array(arguments.length-1);if(arguments.length>1)for(var M=1;M<arguments.length;M++)C[M-1]=arguments[M];i.push(new p(S,C)),i.length!==1||s||n(c)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(S){return[]},a.binding=function(S){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(S){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],468:[function(t,b,g){g.publicEncrypt=t("./publicEncrypt"),g.privateDecrypt=t("./privateDecrypt"),g.privateEncrypt=function(f,o){return g.publicEncrypt(f,o,!0)},g.publicDecrypt=function(f,o){return g.privateDecrypt(f,o,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(t,b,g){var f=t("create-hash"),o=t("safe-buffer").Buffer;function a(r){var e=o.allocUnsafe(4);return e.writeUInt32BE(r,0),e}b.exports=function(r,e){for(var n,l=o.alloc(0),i=0;l.length<e;)n=a(i++),l=o.concat([l,f("sha1").update(r).update(n).digest()]);return l.slice(0,e)}},{"create-hash":386,"safe-buffer":494}],470:[function(t,b,g){arguments[4][184][0].apply(g,arguments)},{buffer:188,dup:184}],471:[function(t,b,g){var f=t("parse-asn1"),o=t("./mgf"),a=t("./xor"),r=t("bn.js"),e=t("browserify-rsa"),n=t("create-hash"),l=t("./withPublic"),i=t("safe-buffer").Buffer;b.exports=function(s,h,d){var c;c=s.padding?s.padding:d?1:4;var p,m=f(s),S=m.modulus.byteLength();if(h.length>S||new r(h).cmp(m.modulus)>=0)throw new Error("decryption error");p=d?l(new r(h),m):e(h,m);var C=i.alloc(S-p.length);if(p=i.concat([C,p],S),c===4)return function(M,P){var $=M.modulus.byteLength(),N=n("sha1").update(i.alloc(0)).digest(),B=N.length;if(P[0]!==0)throw new Error("decryption error");var D=P.slice(1,B+1),U=P.slice(B+1),z=a(D,o(U,B)),E=a(U,o(z,$-B-1));if(function(x,y){x=i.from(x),y=i.from(y);var v=0,w=x.length;x.length!==y.length&&(v++,w=Math.min(x.length,y.length));for(var _=-1;++_<w;)v+=x[_]^y[_];return v}(N,E.slice(0,B)))throw new Error("decryption error");for(var O=B;E[O]===0;)O++;if(E[O++]!==1)throw new Error("decryption error");return E.slice(O)}(m,p);if(c===1)return function(M,P,$){for(var N=P.slice(0,2),B=2,D=0;P[B++]!==0;)if(B>=P.length){D++;break}var U=P.slice(2,B-1);if((N.toString("hex")!=="0002"&&!$||N.toString("hex")!=="0001"&&$)&&D++,U.length<8&&D++,D)throw new Error("decryption error");return P.slice(B)}(0,p,d);if(c===3)return p;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,b,g){var f=t("parse-asn1"),o=t("randombytes"),a=t("create-hash"),r=t("./mgf"),e=t("./xor"),n=t("bn.js"),l=t("./withPublic"),i=t("browserify-rsa"),s=t("safe-buffer").Buffer;b.exports=function(h,d,c){var p;p=h.padding?h.padding:c?1:4;var m,S=f(h);if(p===4)m=function(C,M){var P=C.modulus.byteLength(),$=M.length,N=a("sha1").update(s.alloc(0)).digest(),B=N.length,D=2*B;if($>P-D-2)throw new Error("message too long");var U=s.alloc(P-$-D-2),z=P-B-1,E=o(B),O=e(s.concat([N,U,s.alloc(1,1),M],z),r(E,z)),x=e(E,r(O,B));return new n(s.concat([s.alloc(1),x,O],P))}(S,d);else if(p===1)m=function(C,M,P){var $,N=M.length,B=C.modulus.byteLength();if(N>B-11)throw new Error("message too long");return $=P?s.alloc(B-N-3,255):function(D){for(var U,z=s.allocUnsafe(D),E=0,O=o(2*D),x=0;E<D;)x===O.length&&(O=o(2*D),x=0),(U=O[x++])&&(z[E++]=U);return z}(B-N-3),new n(s.concat([s.from([0,P?1:2]),$,s.alloc(1),M],B))}(S,d,c);else{if(p!==3)throw new Error("unknown padding");if((m=new n(d)).cmp(S.modulus)>=0)throw new Error("data too long for modulus")}return c?i(m,S):l(m,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,b,g){var f=t("bn.js"),o=t("safe-buffer").Buffer;b.exports=function(a,r){return o.from(a.toRed(f.mont(r.modulus)).redPow(new f(r.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(t,b,g){b.exports=function(f,o){for(var a=f.length,r=-1;++r<a;)f[r]^=o[r];return f}},{}],475:[function(t,b,g){(function(f,o){(function(){var a=t("safe-buffer").Buffer,r=o.crypto||o.msCrypto;r&&r.getRandomValues?b.exports=function(e,n){if(e>4294967295)throw new RangeError("requested too many random bytes");var l=a.allocUnsafe(e);if(e>0)if(e>65536)for(var i=0;i<e;i+=65536)r.getRandomValues(l.slice(i,i+65536));else r.getRandomValues(l);return typeof n=="function"?f.nextTick(function(){n(null,l)}):l}:b.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
32
|
+
Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(t,b,g){(function(f,o){(function(){function a(){throw new Error(`secure random number generation not supported by this browser
|
|
33
|
+
use chrome, FireFox or Internet Explorer 11`)}var r=t("safe-buffer"),e=t("randombytes"),n=r.Buffer,l=r.kMaxLength,i=o.crypto||o.msCrypto,s=Math.pow(2,32)-1;function h(p,m){if(typeof p!="number"||p!=p)throw new TypeError("offset must be a number");if(p>s||p<0)throw new TypeError("offset must be a uint32");if(p>l||p>m)throw new RangeError("offset out of range")}function d(p,m,S){if(typeof p!="number"||p!=p)throw new TypeError("size must be a number");if(p>s||p<0)throw new TypeError("size must be a uint32");if(p+m>S||p>l)throw new RangeError("buffer too small")}function c(p,m,S,C){if(f.browser){var M=p.buffer,P=new Uint8Array(M,m,S);return i.getRandomValues(P),C?void f.nextTick(function(){C(null,p)}):p}if(!C)return e(S).copy(p,m),p;e(S,function($,N){if($)return C($);N.copy(p,m),C(null,p)})}i&&i.getRandomValues||!f.browser?(g.randomFill=function(p,m,S,C){if(!(n.isBuffer(p)||p instanceof o.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof m=="function")C=m,m=0,S=p.length;else if(typeof S=="function")C=S,S=p.length-m;else if(typeof C!="function")throw new TypeError('"cb" argument must be a function');return h(m,p.length),d(S,m,p.length),c(p,m,S,C)},g.randomFillSync=function(p,m,S){if(m===void 0&&(m=0),!(n.isBuffer(p)||p instanceof o.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(m,p.length),S===void 0&&(S=p.length-m),d(S,m,p.length),c(p,m,S)}):(g.randomFill=a,g.randomFillSync=a)}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(t,b,g){var f={};function o(r,e,n){n||(n=Error);var l=function(i){var s,h;function d(c,p,m){return i.call(this,function(S,C,M){return typeof e=="string"?e:e(S,C,M)}(c,p,m))||this}return h=i,(s=d).prototype=Object.create(h.prototype),s.prototype.constructor=s,s.__proto__=h,d}(n);l.prototype.name=n.name,l.prototype.code=r,f[r]=l}function a(r,e){if(Array.isArray(r)){var n=r.length;return r=r.map(function(l){return String(l)}),n>2?"one of ".concat(e," ").concat(r.slice(0,n-1).join(", "),", or ")+r[n-1]:n===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}o("ERR_INVALID_OPT_VALUE",function(r,e){return'The value "'+e+'" is invalid for option "'+r+'"'},TypeError),o("ERR_INVALID_ARG_TYPE",function(r,e,n){var l,i,s;if(typeof e=="string"&&(i="not ",e.substr(0,i.length)===i)?(l="must not be",e=e.replace(/^not /,"")):l="must be",function(d,c,p){return(p===void 0||p>d.length)&&(p=d.length),d.substring(p-c.length,p)===c}(r," argument"))s="The ".concat(r," ").concat(l," ").concat(a(e,"type"));else{var h=function(d,c,p){return typeof p!="number"&&(p=0),!(p+c.length>d.length)&&d.indexOf(c,p)!==-1}(r,".")?"property":"argument";s='The "'.concat(r,'" ').concat(h," ").concat(l," ").concat(a(e,"type"))}return s+=". Received type ".concat(typeof n)},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(r){return"The "+r+" method is not implemented"}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(r){return"Cannot call "+r+" after a stream was destroyed"}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(r){return"Unknown encoding: "+r},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),b.exports.codes=f},{}],478:[function(t,b,g){(function(f){(function(){var o=Object.keys||function(d){var c=[];for(var p in d)c.push(p);return c};b.exports=i;var a=t("./_stream_readable"),r=t("./_stream_writable");t("inherits")(i,a);for(var e=o(r.prototype),n=0;n<e.length;n++){var l=e[n];i.prototype[l]||(i.prototype[l]=r.prototype[l])}function i(d){if(!(this instanceof i))return new i(d);a.call(this,d),r.call(this,d),this.allowHalfOpen=!0,d&&(d.readable===!1&&(this.readable=!1),d.writable===!1&&(this.writable=!1),d.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||f.nextTick(h,this)}function h(d){d.end()}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(d){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=d,this._writableState.destroyed=d)}})}).call(this)}).call(this,t("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(t,b,g){b.exports=o;var f=t("./_stream_transform");function o(a){if(!(this instanceof o))return new o(a);f.call(this,a)}t("inherits")(o,f),o.prototype._transform=function(a,r,e){e(null,a)}},{"./_stream_transform":481,inherits:440}],480:[function(t,b,g){(function(f,o){(function(){var a;b.exports=z,z.ReadableState=U,t("events").EventEmitter;var r=function(I,R){return I.listeners(R).length},e=t("./internal/streams/stream"),n=t("buffer").Buffer,l=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},i,s=t("util");i=s&&s.debuglog?s.debuglog("stream"):function(){};var h,d,c,p=t("./internal/streams/buffer_list"),m=t("./internal/streams/destroy"),S=t("./internal/streams/state").getHighWaterMark,C=t("../errors").codes,M=C.ERR_INVALID_ARG_TYPE,P=C.ERR_STREAM_PUSH_AFTER_EOF,$=C.ERR_METHOD_NOT_IMPLEMENTED,N=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;t("inherits")(z,e);var B=m.errorOrDestroy,D=["error","close","destroy","pause","resume"];function U(I,R,V){a=a||t("./_stream_duplex"),I=I||{},typeof V!="boolean"&&(V=R instanceof a),this.objectMode=!!I.objectMode,V&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=S(this,I,"readableHighWaterMark",V),this.buffer=new p,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=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(h||(h=t("string_decoder/").StringDecoder),this.decoder=new h(I.encoding),this.encoding=I.encoding)}function z(I){if(a=a||t("./_stream_duplex"),!(this instanceof z))return new z(I);var R=this instanceof a;this._readableState=new U(I,this,R),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),e.call(this)}function E(I,R,V,K,Z){i("readableAddChunk",R);var Y,J=I._readableState;if(R===null)J.reading=!1,function(nt,it){if(i("onEofChunk"),!it.ended){if(it.decoder){var G=it.decoder.end();G&&G.length&&(it.buffer.push(G),it.length+=it.objectMode?1:G.length)}it.ended=!0,it.sync?y(nt):(it.needReadable=!1,it.emittedReadable||(it.emittedReadable=!0,v(nt)))}}(I,J);else if(Z||(Y=function(nt,it){var G;tt=it,n.isBuffer(tt)||tt instanceof l||typeof it=="string"||it===void 0||nt.objectMode||(G=new M("chunk",["string","Buffer","Uint8Array"],it));var tt;return G}(J,R)),Y)B(I,Y);else if(J.objectMode||R&&R.length>0)if(typeof R=="string"||J.objectMode||Object.getPrototypeOf(R)===n.prototype||(R=function(nt){return n.from(nt)}(R)),K)J.endEmitted?B(I,new N):O(I,J,R,!0);else if(J.ended)B(I,new P);else{if(J.destroyed)return!1;J.reading=!1,J.decoder&&!V?(R=J.decoder.write(R),J.objectMode||R.length!==0?O(I,J,R,!1):w(I,J)):O(I,J,R,!1)}else K||(J.reading=!1,w(I,J));return!J.ended&&(J.length<J.highWaterMark||J.length===0)}function O(I,R,V,K){R.flowing&&R.length===0&&!R.sync?(R.awaitDrain=0,I.emit("data",V)):(R.length+=R.objectMode?1:V.length,K?R.buffer.unshift(V):R.buffer.push(V),R.needReadable&&y(I)),w(I,R)}Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(I){this._readableState&&(this._readableState.destroyed=I)}}),z.prototype.destroy=m.destroy,z.prototype._undestroy=m.undestroy,z.prototype._destroy=function(I,R){R(I)},z.prototype.push=function(I,R){var V,K=this._readableState;return K.objectMode?V=!0:typeof I=="string"&&((R=R||K.defaultEncoding)!==K.encoding&&(I=n.from(I,R),R=""),V=!0),E(this,I,R,!1,V)},z.prototype.unshift=function(I){return E(this,I,null,!0,!1)},z.prototype.isPaused=function(){return this._readableState.flowing===!1},z.prototype.setEncoding=function(I){h||(h=t("string_decoder/").StringDecoder);var R=new h(I);this._readableState.decoder=R,this._readableState.encoding=this._readableState.decoder.encoding;for(var V=this._readableState.buffer.head,K="";V!==null;)K+=R.write(V.data),V=V.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};function x(I,R){return I<=0||R.length===0&&R.ended?0:R.objectMode?1:I!=I?R.flowing&&R.length?R.buffer.head.data.length:R.length:(I>R.highWaterMark&&(R.highWaterMark=function(V){return V>=1073741824?V=1073741824:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}(I)),I<=R.length?I:R.ended?R.length:(R.needReadable=!0,0))}function y(I){var R=I._readableState;i("emitReadable",R.needReadable,R.emittedReadable),R.needReadable=!1,R.emittedReadable||(i("emitReadable",R.flowing),R.emittedReadable=!0,f.nextTick(v,I))}function v(I){var R=I._readableState;i("emitReadable_",R.destroyed,R.length,R.ended),R.destroyed||!R.length&&!R.ended||(I.emit("readable"),R.emittedReadable=!1),R.needReadable=!R.flowing&&!R.ended&&R.length<=R.highWaterMark,H(I)}function w(I,R){R.readingMore||(R.readingMore=!0,f.nextTick(_,I,R))}function _(I,R){for(;!R.reading&&!R.ended&&(R.length<R.highWaterMark||R.flowing&&R.length===0);){var V=R.length;if(i("maybeReadMore read 0"),I.read(0),V===R.length)break}R.readingMore=!1}function A(I){var R=I._readableState;R.readableListening=I.listenerCount("readable")>0,R.resumeScheduled&&!R.paused?R.flowing=!0:I.listenerCount("data")>0&&I.resume()}function j(I){i("readable nexttick read 0"),I.read(0)}function L(I,R){i("resume",R.reading),R.reading||I.read(0),R.resumeScheduled=!1,I.emit("resume"),H(I),R.flowing&&!R.reading&&I.read(0)}function H(I){var R=I._readableState;for(i("flow",R.flowing);R.flowing&&I.read()!==null;);}function q(I,R){return R.length===0?null:(R.objectMode?V=R.buffer.shift():!I||I>=R.length?(V=R.decoder?R.buffer.join(""):R.buffer.length===1?R.buffer.first():R.buffer.concat(R.length),R.buffer.clear()):V=R.buffer.consume(I,R.decoder),V);var V}function X(I){var R=I._readableState;i("endReadable",R.endEmitted),R.endEmitted||(R.ended=!0,f.nextTick(F,R,I))}function F(I,R){if(i("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,R.readable=!1,R.emit("end"),I.autoDestroy)){var V=R._writableState;(!V||V.autoDestroy&&V.finished)&&R.destroy()}}function W(I,R){for(var V=0,K=I.length;V<K;V++)if(I[V]===R)return V;return-1}z.prototype.read=function(I){i("read",I),I=parseInt(I,10);var R=this._readableState,V=I;if(I!==0&&(R.emittedReadable=!1),I===0&&R.needReadable&&((R.highWaterMark!==0?R.length>=R.highWaterMark:R.length>0)||R.ended))return i("read: emitReadable",R.length,R.ended),R.length===0&&R.ended?X(this):y(this),null;if((I=x(I,R))===0&&R.ended)return R.length===0&&X(this),null;var K,Z=R.needReadable;return i("need readable",Z),(R.length===0||R.length-I<R.highWaterMark)&&i("length less than watermark",Z=!0),R.ended||R.reading?i("reading or ended",Z=!1):Z&&(i("do read"),R.reading=!0,R.sync=!0,R.length===0&&(R.needReadable=!0),this._read(R.highWaterMark),R.sync=!1,R.reading||(I=x(V,R))),(K=I>0?q(I,R):null)===null?(R.needReadable=R.length<=R.highWaterMark,I=0):(R.length-=I,R.awaitDrain=0),R.length===0&&(R.ended||(R.needReadable=!0),V!==I&&R.ended&&X(this)),K!==null&&this.emit("data",K),K},z.prototype._read=function(I){B(this,new $("_read()"))},z.prototype.pipe=function(I,R){var V=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=I;break;case 1:K.pipes=[K.pipes,I];break;default:K.pipes.push(I)}K.pipesCount+=1,i("pipe count=%d opts=%j",K.pipesCount,R);var Z=(!R||R.end!==!1)&&I!==f.stdout&&I!==f.stderr?J:st;function Y(lt,ft){i("onunpipe"),lt===V&&ft&&ft.hasUnpiped===!1&&(ft.hasUnpiped=!0,i("cleanup"),I.removeListener("close",et),I.removeListener("finish",ot),I.removeListener("drain",nt),I.removeListener("error",tt),I.removeListener("unpipe",Y),V.removeListener("end",J),V.removeListener("end",st),V.removeListener("data",G),it=!0,!K.awaitDrain||I._writableState&&!I._writableState.needDrain||nt())}function J(){i("onend"),I.end()}K.endEmitted?f.nextTick(Z):V.once("end",Z),I.on("unpipe",Y);var nt=function(lt){return function(){var ft=lt._readableState;i("pipeOnDrain",ft.awaitDrain),ft.awaitDrain&&ft.awaitDrain--,ft.awaitDrain===0&&r(lt,"data")&&(ft.flowing=!0,H(lt))}}(V);I.on("drain",nt);var it=!1;function G(lt){i("ondata");var ft=I.write(lt);i("dest.write",ft),ft===!1&&((K.pipesCount===1&&K.pipes===I||K.pipesCount>1&&W(K.pipes,I)!==-1)&&!it&&(i("false write response, pause",K.awaitDrain),K.awaitDrain++),V.pause())}function tt(lt){i("onerror",lt),st(),I.removeListener("error",tt),r(I,"error")===0&&B(I,lt)}function et(){I.removeListener("finish",ot),st()}function ot(){i("onfinish"),I.removeListener("close",et),st()}function st(){i("unpipe"),V.unpipe(I)}return V.on("data",G),function(lt,ft,pt){if(typeof lt.prependListener=="function")return lt.prependListener(ft,pt);lt._events&<._events[ft]?Array.isArray(lt._events[ft])?lt._events[ft].unshift(pt):lt._events[ft]=[pt,lt._events[ft]]:lt.on(ft,pt)}(I,"error",tt),I.once("close",et),I.once("finish",ot),I.emit("pipe",V),K.flowing||(i("pipe resume"),V.resume()),I},z.prototype.unpipe=function(I){var R=this._readableState,V={hasUnpiped:!1};if(R.pipesCount===0)return this;if(R.pipesCount===1)return I&&I!==R.pipes||(I||(I=R.pipes),R.pipes=null,R.pipesCount=0,R.flowing=!1,I&&I.emit("unpipe",this,V)),this;if(!I){var K=R.pipes,Z=R.pipesCount;R.pipes=null,R.pipesCount=0,R.flowing=!1;for(var Y=0;Y<Z;Y++)K[Y].emit("unpipe",this,{hasUnpiped:!1});return this}var J=W(R.pipes,I);return J===-1||(R.pipes.splice(J,1),R.pipesCount-=1,R.pipesCount===1&&(R.pipes=R.pipes[0]),I.emit("unpipe",this,V)),this},z.prototype.on=function(I,R){var V=e.prototype.on.call(this,I,R),K=this._readableState;return I==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):I==="readable"&&(K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,i("on readable",K.length,K.reading),K.length?y(this):K.reading||f.nextTick(j,this))),V},z.prototype.addListener=z.prototype.on,z.prototype.removeListener=function(I,R){var V=e.prototype.removeListener.call(this,I,R);return I==="readable"&&f.nextTick(A,this),V},z.prototype.removeAllListeners=function(I){var R=e.prototype.removeAllListeners.apply(this,arguments);return I!=="readable"&&I!==void 0||f.nextTick(A,this),R},z.prototype.resume=function(){var I=this._readableState;return I.flowing||(i("resume"),I.flowing=!I.readableListening,function(R,V){V.resumeScheduled||(V.resumeScheduled=!0,f.nextTick(L,R,V))}(this,I)),I.paused=!1,this},z.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},z.prototype.wrap=function(I){var R=this,V=this._readableState,K=!1;for(var Z in I.on("end",function(){if(i("wrapped end"),V.decoder&&!V.ended){var J=V.decoder.end();J&&J.length&&R.push(J)}R.push(null)}),I.on("data",function(J){i("wrapped data"),V.decoder&&(J=V.decoder.write(J)),V.objectMode&&J==null||(V.objectMode||J&&J.length)&&(R.push(J)||(K=!0,I.pause()))}),I)this[Z]===void 0&&typeof I[Z]=="function"&&(this[Z]=function(J){return function(){return I[J].apply(I,arguments)}}(Z));for(var Y=0;Y<D.length;Y++)I.on(D[Y],this.emit.bind(this,D[Y]));return this._read=function(J){i("wrapped _read",J),K&&(K=!1,I.resume())},this},typeof Symbol=="function"&&(z.prototype[Symbol.asyncIterator]=function(){return d===void 0&&(d=t("./internal/streams/async_iterator")),d(this)}),Object.defineProperty(z.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(z.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(z.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(I){this._readableState&&(this._readableState.flowing=I)}}),z._fromList=q,Object.defineProperty(z.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(z.from=function(I,R){return c===void 0&&(c=t("./internal/streams/from")),c(z,I,R)})}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe: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,b,g){b.exports=i;var f=t("../errors").codes,o=f.ERR_METHOD_NOT_IMPLEMENTED,a=f.ERR_MULTIPLE_CALLBACK,r=f.ERR_TRANSFORM_ALREADY_TRANSFORMING,e=f.ERR_TRANSFORM_WITH_LENGTH_0,n=t("./_stream_duplex");function l(d,c){var p=this._transformState;p.transforming=!1;var m=p.writecb;if(m===null)return this.emit("error",new a);p.writechunk=null,p.writecb=null,c!=null&&this.push(c),m(d);var S=this._readableState;S.reading=!1,(S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}function i(d){if(!(this instanceof i))return new i(d);n.call(this,d),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,d&&(typeof d.transform=="function"&&(this._transform=d.transform),typeof d.flush=="function"&&(this._flush=d.flush)),this.on("prefinish",s)}function s(){var d=this;typeof this._flush!="function"||this._readableState.destroyed?h(this,null,null):this._flush(function(c,p){h(d,c,p)})}function h(d,c,p){if(c)return d.emit("error",c);if(p!=null&&d.push(p),d._writableState.length)throw new e;if(d._transformState.transforming)throw new r;return d.push(null)}t("inherits")(i,n),i.prototype.push=function(d,c){return this._transformState.needTransform=!1,n.prototype.push.call(this,d,c)},i.prototype._transform=function(d,c,p){p(new o("_transform()"))},i.prototype._write=function(d,c,p){var m=this._transformState;if(m.writecb=p,m.writechunk=d,m.writeencoding=c,!m.transforming){var S=this._readableState;(m.needTransform||S.needReadable||S.length<S.highWaterMark)&&this._read(S.highWaterMark)}},i.prototype._read=function(d){var c=this._transformState;c.writechunk===null||c.transforming?c.needTransform=!0:(c.transforming=!0,this._transform(c.writechunk,c.writeencoding,c.afterTransform))},i.prototype._destroy=function(d,c){n.prototype._destroy.call(this,d,function(p){c(p)})}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(t,b,g){(function(f,o){(function(){function a(_){var A=this;this.next=null,this.entry=null,this.finish=function(){(function(j,L,H){var q=j.entry;for(j.entry=null;q;){var X=q.callback;L.pendingcb--,X(H),q=q.next}L.corkedRequestsFree.next=j})(A,_)}}var r;b.exports=z,z.WritableState=U;var e={deprecate:t("util-deprecate")},n=t("./internal/streams/stream"),l=t("buffer").Buffer,i=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},s,h=t("./internal/streams/destroy"),d=t("./internal/streams/state").getHighWaterMark,c=t("../errors").codes,p=c.ERR_INVALID_ARG_TYPE,m=c.ERR_METHOD_NOT_IMPLEMENTED,S=c.ERR_MULTIPLE_CALLBACK,C=c.ERR_STREAM_CANNOT_PIPE,M=c.ERR_STREAM_DESTROYED,P=c.ERR_STREAM_NULL_VALUES,$=c.ERR_STREAM_WRITE_AFTER_END,N=c.ERR_UNKNOWN_ENCODING,B=h.errorOrDestroy;function D(){}function U(_,A,j){r=r||t("./_stream_duplex"),_=_||{},typeof j!="boolean"&&(j=A instanceof r),this.objectMode=!!_.objectMode,j&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=d(this,_,"writableHighWaterMark",j),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var L=_.decodeStrings===!1;this.decodeStrings=!L,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){(function(q,X){var F=q._writableState,W=F.sync,I=F.writecb;if(typeof I!="function")throw new S;if(function(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}(F),X)(function(V,K,Z,Y,J){--K.pendingcb,Z?(f.nextTick(J,Y),f.nextTick(w,V,K),V._writableState.errorEmitted=!0,B(V,Y)):(J(Y),V._writableState.errorEmitted=!0,B(V,Y),w(V,K))})(q,F,W,X,I);else{var R=y(F)||q.destroyed;R||F.corked||F.bufferProcessing||!F.bufferedRequest||x(q,F),W?f.nextTick(O,q,F,R,I):O(q,F,R,I)}})(A,H)},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 a(this)}function z(_){var A=this instanceof(r=r||t("./_stream_duplex"));if(!A&&!s.call(z,this))return new z(_);this._writableState=new U(_,this,A),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)),n.call(this)}function E(_,A,j,L,H,q,X){A.writelen=L,A.writecb=X,A.writing=!0,A.sync=!0,A.destroyed?A.onwrite(new M("write")):j?_._writev(H,A.onwrite):_._write(H,q,A.onwrite),A.sync=!1}function O(_,A,j,L){j||function(H,q){q.length===0&&q.needDrain&&(q.needDrain=!1,H.emit("drain"))}(_,A),A.pendingcb--,L(),w(_,A)}function x(_,A){A.bufferProcessing=!0;var j=A.bufferedRequest;if(_._writev&&j&&j.next){var L=A.bufferedRequestCount,H=new Array(L),q=A.corkedRequestsFree;q.entry=j;for(var X=0,F=!0;j;)H[X]=j,j.isBuf||(F=!1),j=j.next,X+=1;H.allBuffers=F,E(_,A,!0,A.length,H,"",q.finish),A.pendingcb++,A.lastBufferedRequest=null,q.next?(A.corkedRequestsFree=q.next,q.next=null):A.corkedRequestsFree=new a(A),A.bufferedRequestCount=0}else{for(;j;){var W=j.chunk,I=j.encoding,R=j.callback;if(E(_,A,!1,A.objectMode?1:W.length,W,I,R),j=j.next,A.bufferedRequestCount--,A.writing)break}j===null&&(A.lastBufferedRequest=null)}A.bufferedRequest=j,A.bufferProcessing=!1}function y(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function v(_,A){_._final(function(j){A.pendingcb--,j&&B(_,j),A.prefinished=!0,_.emit("prefinish"),w(_,A)})}function w(_,A){var j=y(A);if(j&&(function(H,q){q.prefinished||q.finalCalled||(typeof H._final!="function"||q.destroyed?(q.prefinished=!0,H.emit("prefinish")):(q.pendingcb++,q.finalCalled=!0,f.nextTick(v,H,q)))}(_,A),A.pendingcb===0&&(A.finished=!0,_.emit("finish"),A.autoDestroy))){var L=_._readableState;(!L||L.autoDestroy&&L.endEmitted)&&_.destroy()}return j}t("inherits")(z,n),U.prototype.getBuffer=function(){for(var _=this.bufferedRequest,A=[];_;)A.push(_),_=_.next;return A},function(){try{Object.defineProperty(U.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"?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(_){return!!s.call(this,_)||this===z&&_&&_._writableState instanceof U}})):s=function(_){return _ instanceof this},z.prototype.pipe=function(){B(this,new C)},z.prototype.write=function(_,A,j){var L,H=this._writableState,q=!1,X=!H.objectMode&&(L=_,l.isBuffer(L)||L instanceof i);return X&&!l.isBuffer(_)&&(_=function(F){return l.from(F)}(_)),typeof A=="function"&&(j=A,A=null),X?A="buffer":A||(A=H.defaultEncoding),typeof j!="function"&&(j=D),H.ending?function(F,W){var I=new $;B(F,I),f.nextTick(W,I)}(this,j):(X||function(F,W,I,R){var V;return I===null?V=new P:typeof I=="string"||W.objectMode||(V=new p("chunk",["string","Buffer"],I)),!V||(B(F,V),f.nextTick(R,V),!1)}(this,H,_,j))&&(H.pendingcb++,q=function(F,W,I,R,V,K){if(!I){var Z=function(it,G,tt){return it.objectMode||it.decodeStrings===!1||typeof G!="string"||(G=l.from(G,tt)),G}(W,R,V);R!==Z&&(I=!0,V="buffer",R=Z)}var Y=W.objectMode?1:R.length;W.length+=Y;var J=W.length<W.highWaterMark;if(J||(W.needDrain=!0),W.writing||W.corked){var nt=W.lastBufferedRequest;W.lastBufferedRequest={chunk:R,encoding:V,isBuf:I,callback:K,next:null},nt?nt.next=W.lastBufferedRequest:W.bufferedRequest=W.lastBufferedRequest,W.bufferedRequestCount+=1}else E(F,W,!1,Y,R,V,K);return J}(this,H,X,_,A,j)),q},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||x(this,_))},z.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 N(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),z.prototype._write=function(_,A,j){j(new m("_write()"))},z.prototype._writev=null,z.prototype.end=function(_,A,j){var L=this._writableState;return typeof _=="function"?(j=_,_=null,A=null):typeof A=="function"&&(j=A,A=null),_!=null&&this.write(_,A),L.corked&&(L.corked=1,this.uncork()),L.ending||function(H,q,X){q.ending=!0,w(H,q),X&&(q.finished?f.nextTick(X):H.once("finish",X)),q.ended=!0,H.writable=!1}(this,L,j),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_)}}),z.prototype.destroy=h.destroy,z.prototype._undestroy=h.undestroy,z.prototype._destroy=function(_,A){A(_)}}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe: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,b,g){(function(f){(function(){var o;function a(M,P,$){return(P=function(N){var B=function(D,U){if(typeof D!="object"||D===null)return D;var z=D[Symbol.toPrimitive];if(z!==void 0){var E=z.call(D,U||"default");if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(D)}(N,"string");return typeof B=="symbol"?B:String(B)}(P))in M?Object.defineProperty(M,P,{value:$,enumerable:!0,configurable:!0,writable:!0}):M[P]=$,M}var r=t("./end-of-stream"),e=Symbol("lastResolve"),n=Symbol("lastReject"),l=Symbol("error"),i=Symbol("ended"),s=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function c(M,P){return{value:M,done:P}}function p(M){var P=M[e];if(P!==null){var $=M[d].read();$!==null&&(M[s]=null,M[e]=null,M[n]=null,P(c($,!1)))}}function m(M){f.nextTick(p,M)}var S=Object.getPrototypeOf(function(){}),C=Object.setPrototypeOf((a(o={get stream(){return this[d]},next:function(){var M=this,P=this[l];if(P!==null)return Promise.reject(P);if(this[i])return Promise.resolve(c(void 0,!0));if(this[d].destroyed)return new Promise(function(D,U){f.nextTick(function(){M[l]?U(M[l]):D(c(void 0,!0))})});var $,N=this[s];if(N)$=new Promise(function(D,U){return function(z,E){D.then(function(){U[i]?z(c(void 0,!0)):U[h](z,E)},E)}}(N,this));else{var B=this[d].read();if(B!==null)return Promise.resolve(c(B,!1));$=new Promise(this[h])}return this[s]=$,$}},Symbol.asyncIterator,function(){return this}),a(o,"return",function(){var M=this;return new Promise(function(P,$){M[d].destroy(null,function(N){N?$(N):P(c(void 0,!0))})})}),o),S);b.exports=function(M){var P,$=Object.create(C,(a(P={},d,{value:M,writable:!0}),a(P,e,{value:null,writable:!0}),a(P,n,{value:null,writable:!0}),a(P,l,{value:null,writable:!0}),a(P,i,{value:M._readableState.endEmitted,writable:!0}),a(P,h,{value:function(N,B){var D=$[d].read();D?($[s]=null,$[e]=null,$[n]=null,N(c(D,!1))):($[e]=N,$[n]=B)},writable:!0}),P));return $[s]=null,r(M,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var B=$[n];return B!==null&&($[s]=null,$[e]=null,$[n]=null,B(N)),void($[l]=N)}var D=$[e];D!==null&&($[s]=null,$[e]=null,$[n]=null,D(c(void 0,!0))),$[i]=!0}),M.on("readable",m.bind(null,$)),$}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":486,_process:467}],484:[function(t,b,g){function f(s,h){var d=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);h&&(c=c.filter(function(p){return Object.getOwnPropertyDescriptor(s,p).enumerable})),d.push.apply(d,c)}return d}function o(s){for(var h=1;h<arguments.length;h++){var d=arguments[h]!=null?arguments[h]:{};h%2?f(Object(d),!0).forEach(function(c){a(s,c,d[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(d)):f(Object(d)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(d,c))})}return s}function a(s,h,d){return(h=e(h))in s?Object.defineProperty(s,h,{value:d,enumerable:!0,configurable:!0,writable:!0}):s[h]=d,s}function r(s,h){for(var d=0;d<h.length;d++){var c=h[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(s,e(c.key),c)}}function e(s){var h=function(d,c){if(typeof d!="object"||d===null)return d;var p=d[Symbol.toPrimitive];if(p!==void 0){var m=p.call(d,c||"default");if(typeof m!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(d)}(s,"string");return typeof h=="symbol"?h:String(h)}var n=t("buffer").Buffer,l=t("util").inspect,i=l&&l.custom||"inspect";b.exports=function(){function s(){(function(c,p){if(!(c instanceof p))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}var h,d;return h=s,(d=[{key:"push",value:function(c){var p={data:c,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(c){var p={data:c,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(c){if(this.length===0)return"";for(var p=this.head,m=""+p.data;p=p.next;)m+=c+p.data;return m}},{key:"concat",value:function(c){if(this.length===0)return n.alloc(0);for(var p,m,S,C=n.allocUnsafe(c>>>0),M=this.head,P=0;M;)p=M.data,m=C,S=P,n.prototype.copy.call(p,m,S),P+=M.data.length,M=M.next;return C}},{key:"consume",value:function(c,p){var m;return c<this.head.data.length?(m=this.head.data.slice(0,c),this.head.data=this.head.data.slice(c)):m=c===this.head.data.length?this.shift():p?this._getString(c):this._getBuffer(c),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(c){var p=this.head,m=1,S=p.data;for(c-=S.length;p=p.next;){var C=p.data,M=c>C.length?C.length:c;if(M===C.length?S+=C:S+=C.slice(0,c),(c-=M)==0){M===C.length?(++m,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=C.slice(M));break}++m}return this.length-=m,S}},{key:"_getBuffer",value:function(c){var p=n.allocUnsafe(c),m=this.head,S=1;for(m.data.copy(p),c-=m.data.length;m=m.next;){var C=m.data,M=c>C.length?C.length:c;if(C.copy(p,p.length-c,0,M),(c-=M)==0){M===C.length?(++S,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=C.slice(M));break}++S}return this.length-=S,p}},{key:i,value:function(c,p){return l(this,o(o({},p),{},{depth:0,customInspect:!1}))}}])&&r(h.prototype,d),Object.defineProperty(h,"prototype",{writable:!1}),s}()},{buffer:220,util:188}],485:[function(t,b,g){(function(f){(function(){function o(e,n){r(e,n),a(e)}function a(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,n){e.emit("error",n)}b.exports={destroy:function(e,n){var l=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(n?n(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,f.nextTick(r,this,e)):f.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(h){!n&&h?l._writableState?l._writableState.errorEmitted?f.nextTick(a,l):(l._writableState.errorEmitted=!0,f.nextTick(o,l,h)):f.nextTick(o,l,h):n?(f.nextTick(a,l),n(h)):f.nextTick(a,l)}),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,n){var l=e._readableState,i=e._writableState;l&&l.autoDestroy||i&&i.autoDestroy?e.destroy(n):e.emit("error",n)}}}).call(this)}).call(this,t("_process"))},{_process:467}],486:[function(t,b,g){var f=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}b.exports=function a(r,e,n){if(typeof e=="function")return a(r,null,e);e||(e={}),n=function(M){var P=!1;return function(){if(!P){P=!0;for(var $=arguments.length,N=new Array($),B=0;B<$;B++)N[B]=arguments[B];M.apply(this,N)}}}(n||o);var l=e.readable||e.readable!==!1&&r.readable,i=e.writable||e.writable!==!1&&r.writable,s=function(){r.writable||d()},h=r._writableState&&r._writableState.finished,d=function(){i=!1,h=!0,l||n.call(r)},c=r._readableState&&r._readableState.endEmitted,p=function(){l=!1,c=!0,i||n.call(r)},m=function(M){n.call(r,M)},S=function(){var M;return l&&!c?(r._readableState&&r._readableState.ended||(M=new f),n.call(r,M)):i&&!h?(r._writableState&&r._writableState.ended||(M=new f),n.call(r,M)):void 0},C=function(){r.req.on("finish",d)};return function(M){return M.setHeader&&typeof M.abort=="function"}(r)?(r.on("complete",d),r.on("abort",S),r.req?C():r.on("request",C)):i&&!r._writableState&&(r.on("end",s),r.on("close",s)),r.on("end",p),r.on("finish",d),e.error!==!1&&r.on("error",m),r.on("close",S),function(){r.removeListener("complete",d),r.removeListener("abort",S),r.removeListener("request",C),r.req&&r.req.removeListener("finish",d),r.removeListener("end",s),r.removeListener("close",s),r.removeListener("finish",d),r.removeListener("end",p),r.removeListener("error",m),r.removeListener("close",S)}}},{"../../../errors":477}],487:[function(t,b,g){b.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(t,b,g){var f,o=t("../../../errors").codes,a=o.ERR_MISSING_ARGS,r=o.ERR_STREAM_DESTROYED;function e(h){if(h)throw h}function n(h,d,c,p){p=function(C){var M=!1;return function(){M||(M=!0,C.apply(void 0,arguments))}}(p);var m=!1;h.on("close",function(){m=!0}),f===void 0&&(f=t("./end-of-stream")),f(h,{readable:d,writable:c},function(C){if(C)return p(C);m=!0,p()});var S=!1;return function(C){if(!m&&!S)return S=!0,function(M){return M.setHeader&&typeof M.abort=="function"}(h)?h.abort():typeof h.destroy=="function"?h.destroy():void p(C||new r("pipe"))}}function l(h){h()}function i(h,d){return h.pipe(d)}function s(h){return h.length?typeof h[h.length-1]!="function"?e:h.pop():e}b.exports=function(){for(var h=arguments.length,d=new Array(h),c=0;c<h;c++)d[c]=arguments[c];var p,m=s(d);if(Array.isArray(d[0])&&(d=d[0]),d.length<2)throw new a("streams");var S=d.map(function(C,M){var P=M<d.length-1;return n(C,P,M>0,function($){p||(p=$),$&&S.forEach(l),P||(S.forEach(l),m(p))})});return d.reduce(i)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(t,b,g){var f=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;b.exports={getHighWaterMark:function(o,a,r,e){var n=function(l,i,s){return l.highWaterMark!=null?l.highWaterMark:i?l[s]:null}(a,e,r);if(n!=null){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new f(e?r:"highWaterMark",n);return Math.floor(n)}return o.objectMode?16:16384}}},{"../../../errors":477}],490:[function(t,b,g){b.exports=t("events").EventEmitter},{events:422}],491:[function(t,b,g){(g=b.exports=t("./lib/_stream_readable.js")).Stream=g,g.Readable=g,g.Writable=t("./lib/_stream_writable.js"),g.Duplex=t("./lib/_stream_duplex.js"),g.Transform=t("./lib/_stream_transform.js"),g.PassThrough=t("./lib/_stream_passthrough.js"),g.finished=t("./lib/internal/streams/end-of-stream.js"),g.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,b,g){var f=function(o){var a=Object.prototype,r=a.hasOwnProperty,e=Object.defineProperty||function(w,_,A){w[_]=A.value},n=typeof Symbol=="function"?Symbol:{},l=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function h(w,_,A){return Object.defineProperty(w,_,{value:A,enumerable:!0,configurable:!0,writable:!0}),w[_]}try{h({},"")}catch{h=function(_,A,j){return _[A]=j}}function d(w,_,A,j){var L=_&&_.prototype instanceof m?_:m,H=Object.create(L.prototype),q=new x(j||[]);return e(H,"_invoke",{value:U(w,A,q)}),H}function c(w,_,A){try{return{type:"normal",arg:w.call(_,A)}}catch(j){return{type:"throw",arg:j}}}o.wrap=d;var p={};function m(){}function S(){}function C(){}var M={};h(M,l,function(){return this});var P=Object.getPrototypeOf,$=P&&P(P(y([])));$&&$!==a&&r.call($,l)&&(M=$);var N=C.prototype=m.prototype=Object.create(M);function B(w){["next","throw","return"].forEach(function(_){h(w,_,function(A){return this._invoke(_,A)})})}function D(w,_){var A;e(this,"_invoke",{value:function(j,L){function H(){return new _(function(q,X){(function F(W,I,R,V){var K=c(w[W],w,I);if(K.type!=="throw"){var Z=K.arg,Y=Z.value;return Y&&typeof Y=="object"&&r.call(Y,"__await")?_.resolve(Y.__await).then(function(J){F("next",J,R,V)},function(J){F("throw",J,R,V)}):_.resolve(Y).then(function(J){Z.value=J,R(Z)},function(J){return F("throw",J,R,V)})}V(K.arg)})(j,L,q,X)})}return A=A?A.then(H,H):H()}})}function U(w,_,A){var j="suspendedStart";return function(L,H){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(L==="throw")throw H;return v()}for(A.method=L,A.arg=H;;){var q=A.delegate;if(q){var X=z(q,A);if(X){if(X===p)continue;return X}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(j==="suspendedStart")throw j="completed",A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);j="executing";var F=c(w,_,A);if(F.type==="normal"){if(j=A.done?"completed":"suspendedYield",F.arg===p)continue;return{value:F.arg,done:A.done}}F.type==="throw"&&(j="completed",A.method="throw",A.arg=F.arg)}}}function z(w,_){var A=_.method,j=w.iterator[A];if(j===void 0)return _.delegate=null,A==="throw"&&w.iterator.return&&(_.method="return",_.arg=void 0,z(w,_),_.method==="throw")||A!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+A+"' method")),p;var L=c(j,w.iterator,_.arg);if(L.type==="throw")return _.method="throw",_.arg=L.arg,_.delegate=null,p;var H=L.arg;return H?H.done?(_[w.resultName]=H.value,_.next=w.nextLoc,_.method!=="return"&&(_.method="next",_.arg=void 0),_.delegate=null,p):H:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,p)}function E(w){var _={tryLoc:w[0]};1 in w&&(_.catchLoc=w[1]),2 in w&&(_.finallyLoc=w[2],_.afterLoc=w[3]),this.tryEntries.push(_)}function O(w){var _=w.completion||{};_.type="normal",delete _.arg,w.completion=_}function x(w){this.tryEntries=[{tryLoc:"root"}],w.forEach(E,this),this.reset(!0)}function y(w){if(w){var _=w[l];if(_)return _.call(w);if(typeof w.next=="function")return w;if(!isNaN(w.length)){var A=-1,j=function L(){for(;++A<w.length;)if(r.call(w,A))return L.value=w[A],L.done=!1,L;return L.value=void 0,L.done=!0,L};return j.next=j}}return{next:v}}function v(){return{value:void 0,done:!0}}return S.prototype=C,e(N,"constructor",{value:C,configurable:!0}),e(C,"constructor",{value:S,configurable:!0}),S.displayName=h(C,s,"GeneratorFunction"),o.isGeneratorFunction=function(w){var _=typeof w=="function"&&w.constructor;return!!_&&(_===S||(_.displayName||_.name)==="GeneratorFunction")},o.mark=function(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,C):(w.__proto__=C,h(w,s,"GeneratorFunction")),w.prototype=Object.create(N),w},o.awrap=function(w){return{__await:w}},B(D.prototype),h(D.prototype,i,function(){return this}),o.AsyncIterator=D,o.async=function(w,_,A,j,L){L===void 0&&(L=Promise);var H=new D(d(w,_,A,j),L);return o.isGeneratorFunction(_)?H:H.next().then(function(q){return q.done?q.value:H.next()})},B(N),h(N,s,"Generator"),h(N,l,function(){return this}),h(N,"toString",function(){return"[object Generator]"}),o.keys=function(w){var _=Object(w),A=[];for(var j in _)A.push(j);return A.reverse(),function L(){for(;A.length;){var H=A.pop();if(H in _)return L.value=H,L.done=!1,L}return L.done=!0,L}},o.values=y,x.prototype={constructor:x,reset:function(w){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(O),!w)for(var _ in this)_.charAt(0)==="t"&&r.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=void 0)},stop:function(){this.done=!0;var w=this.tryEntries[0].completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(w){if(this.done)throw w;var _=this;function A(F,W){return H.type="throw",H.arg=w,_.next=F,W&&(_.method="next",_.arg=void 0),!!W}for(var j=this.tryEntries.length-1;j>=0;--j){var L=this.tryEntries[j],H=L.completion;if(L.tryLoc==="root")return A("end");if(L.tryLoc<=this.prev){var q=r.call(L,"catchLoc"),X=r.call(L,"finallyLoc");if(q&&X){if(this.prev<L.catchLoc)return A(L.catchLoc,!0);if(this.prev<L.finallyLoc)return A(L.finallyLoc)}else if(q){if(this.prev<L.catchLoc)return A(L.catchLoc,!0)}else{if(!X)throw new Error("try statement without catch or finally");if(this.prev<L.finallyLoc)return A(L.finallyLoc)}}}},abrupt:function(w,_){for(var A=this.tryEntries.length-1;A>=0;--A){var j=this.tryEntries[A];if(j.tryLoc<=this.prev&&r.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var L=j;break}}L&&(w==="break"||w==="continue")&&L.tryLoc<=_&&_<=L.finallyLoc&&(L=null);var H=L?L.completion:{};return H.type=w,H.arg=_,L?(this.method="next",this.next=L.finallyLoc,p):this.complete(H)},complete:function(w,_){if(w.type==="throw")throw w.arg;return w.type==="break"||w.type==="continue"?this.next=w.arg:w.type==="return"?(this.rval=this.arg=w.arg,this.method="return",this.next="end"):w.type==="normal"&&_&&(this.next=_),p},finish:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var A=this.tryEntries[_];if(A.finallyLoc===w)return this.complete(A.completion,A.afterLoc),O(A),p}},catch:function(w){for(var _=this.tryEntries.length-1;_>=0;--_){var A=this.tryEntries[_];if(A.tryLoc===w){var j=A.completion;if(j.type==="throw"){var L=j.arg;O(A)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(w,_,A){return this.delegate={iterator:y(w),resultName:_,nextLoc:A},this.method==="next"&&(this.arg=void 0),p}},o}(typeof b=="object"?b.exports:{});try{regeneratorRuntime=f}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=f:Function("r","regeneratorRuntime = r")(f)}},{}],493:[function(t,b,g){var f=t("buffer").Buffer,o=t("inherits"),a=t("hash-base"),r=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],n=[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],l=[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],i=[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],s=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function c(P,$){return P<<$|P>>>32-$}function p(P,$,N,B,D,U,z,E){return c(P+($^N^B)+U+z|0,E)+D|0}function m(P,$,N,B,D,U,z,E){return c(P+($&N|~$&B)+U+z|0,E)+D|0}function S(P,$,N,B,D,U,z,E){return c(P+(($|~N)^B)+U+z|0,E)+D|0}function C(P,$,N,B,D,U,z,E){return c(P+($&B|N&~B)+U+z|0,E)+D|0}function M(P,$,N,B,D,U,z,E){return c(P+($^(N|~B))+U+z|0,E)+D|0}o(d,a),d.prototype._update=function(){for(var P=r,$=0;$<16;++$)P[$]=this._block.readInt32LE(4*$);for(var N=0|this._a,B=0|this._b,D=0|this._c,U=0|this._d,z=0|this._e,E=0|this._a,O=0|this._b,x=0|this._c,y=0|this._d,v=0|this._e,w=0;w<80;w+=1){var _,A;w<16?(_=p(N,B,D,U,z,P[e[w]],s[0],l[w]),A=M(E,O,x,y,v,P[n[w]],h[0],i[w])):w<32?(_=m(N,B,D,U,z,P[e[w]],s[1],l[w]),A=C(E,O,x,y,v,P[n[w]],h[1],i[w])):w<48?(_=S(N,B,D,U,z,P[e[w]],s[2],l[w]),A=S(E,O,x,y,v,P[n[w]],h[2],i[w])):w<64?(_=C(N,B,D,U,z,P[e[w]],s[3],l[w]),A=m(E,O,x,y,v,P[n[w]],h[3],i[w])):(_=M(N,B,D,U,z,P[e[w]],s[4],l[w]),A=p(E,O,x,y,v,P[n[w]],h[4],i[w])),N=z,z=U,U=c(D,10),D=B,B=_,E=v,v=y,y=c(x,10),x=O,O=A}var j=this._b+D+y|0;this._b=this._c+U+v|0,this._c=this._d+z+E|0,this._d=this._e+N+O|0,this._e=this._a+B+x|0,this._a=j},d.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 P=f.alloc?f.alloc(20):new f(20);return P.writeInt32LE(this._a,0),P.writeInt32LE(this._b,4),P.writeInt32LE(this._c,8),P.writeInt32LE(this._d,12),P.writeInt32LE(this._e,16),P},b.exports=d},{buffer:220,"hash-base":425,inherits:440}],494:[function(t,b,g){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var f=t("buffer"),o=f.Buffer;function a(e,n){for(var l in e)n[l]=e[l]}function r(e,n,l){return o(e,n,l)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?b.exports=f:(a(f,g),g.Buffer=r),r.prototype=Object.create(o.prototype),a(o,r),r.from=function(e,n,l){if(typeof e=="number")throw new TypeError("Argument must not be a number");return o(e,n,l)},r.alloc=function(e,n,l){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=o(e);return n!==void 0?typeof l=="string"?i.fill(n,l):i.fill(n):i.fill(0),i},r.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return o(e)},r.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return f.SlowBuffer(e)}},{buffer:220}],495:[function(t,b,g){(function(f){(function(){var o,a=t("buffer"),r=a.Buffer,e={};for(o in a)a.hasOwnProperty(o)&&o!=="SlowBuffer"&&o!=="Buffer"&&(e[o]=a[o]);var n=e.Buffer={};for(o in r)r.hasOwnProperty(o)&&o!=="allocUnsafe"&&o!=="allocUnsafeSlow"&&(n[o]=r[o]);if(e.Buffer.prototype=r.prototype,n.from&&n.from!==Uint8Array.from||(n.from=function(l,i,s){if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof l);if(l&&l.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 l);return r(l,i,s)}),n.alloc||(n.alloc=function(l,i,s){if(typeof l!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof l);if(l<0||l>=2*(1<<30))throw new RangeError('The value "'+l+'" is invalid for option "size"');var h=r(l);return i&&i.length!==0?typeof s=="string"?h.fill(i,s):h.fill(i):h.fill(0),h}),!e.kStringMaxLength)try{e.kStringMaxLength=f.binding("buffer").kStringMaxLength}catch{}e.constants||(e.constants={MAX_LENGTH:e.kMaxLength},e.kStringMaxLength&&(e.constants.MAX_STRING_LENGTH=e.kStringMaxLength)),b.exports=e}).call(this)}).call(this,t("_process"))},{_process:467,buffer:220}],496:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0});const f=t("xmlchars/xml/1.0/ed5"),o=t("xmlchars/xml/1.1/ed2"),a=t("xmlchars/xmlns/1.0/ed3");var r=f.isS,e=f.isChar,n=f.isNameStartChar,l=f.isNameChar,i=f.S_LIST,s=f.NAME_RE,h=o.isChar,d=a.isNCNameStartChar,c=a.isNCNameChar,p=a.NC_NAME_RE;const m="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",C={__proto__:null,xml:m,xmlns:S},M={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},P=y=>y===34||y===39,$=[34,39],N=[...$,91,62],B=[...$,60,93],D=[61,63,...i],U=[...i,62,38,60];function z(y,v,w){switch(v){case"xml":w!==m&&y.fail(`xml prefix must be bound to ${m}.`);break;case"xmlns":w!==S&&y.fail(`xmlns prefix must be bound to ${S}.`)}switch(w){case S:y.fail(v===""?`the default namespace may not be set to ${w}.`:`may not assign a prefix (even "xmlns") to the URI ${S}.`);break;case m:switch(v){case"xml":break;case"":y.fail(`the default namespace may not be set to ${w}.`);break;default:y.fail("may not assign the xml namespace to another prefix.")}}}const E=y=>p.test(y),O=y=>s.test(y);g.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const x={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"};g.SaxesParser=class{constructor(y){this.opt=y??{},this.fragmentOpt=!!this.opt.fragment;const v=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,v){this.nameStartCheck=d,this.nameCheck=c,this.isName=E,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},C);const w=this.opt.additionalNamespaces;w!=null&&(function(_,A){for(const j of Object.keys(A))z(_,j,A[j])}(this,w),Object.assign(this.ns,w))}else this.nameStartCheck=n,this.nameCheck=l,this.isName=O,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:v}=this;this.state=v?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=v,this.xmlDeclPossible=!v,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:w}=this.opt;if(w===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");w="1.0"}this.setXMLVersion(w),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(M),(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,v){this[x[y]]=v}off(y){this[x[y]]=void 0}makeError(y){var v;let w=(v=this.fileName)!==null&&v!==void 0?v:"";return this.trackPosition&&(w.length>0&&(w+=":"),w+=`${this.line}:${this.column}`),w.length>0&&(w+=": "),new Error(w+y)}fail(y){const v=this.makeError(y),w=this.errorHandler;if(w===void 0)throw v;return w(v),this}write(y){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let v=!1;y===null?(v=!0,y=""):typeof y=="object"&&(y=y.toString()),this.carriedFromPrevious!==void 0&&(y=`${this.carriedFromPrevious}${y}`,this.carriedFromPrevious=void 0);let w=y.length;const _=y.charCodeAt(w-1);!v&&(_===13||_>=55296&&_<=56319)&&(this.carriedFromPrevious=y[w-1],w--,y=y.slice(0,w));const{stateTable:A}=this;for(this.chunk=y,this.i=0;this.i<w;)A[this.state].call(this);return this.chunkPosition+=w,v?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:y,i:v}=this;if(this.prevI=v,this.i=v+1,v>=y.length)return-1;const w=y.charCodeAt(v);if(this.column++,w<55296){if(w>=32||w===9)return w;switch(w){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return y.charCodeAt(v+1)===10&&(this.i=v+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),w}}if(w>56319)return w>=57344&&w<=65533||this.fail("disallowed character."),w;const _=65536+1024*(w-55296)+(y.charCodeAt(v+1)-56320);return this.i=v+2,_>1114111&&this.fail("disallowed character."),_}getCode11(){const{chunk:y,i:v}=this;if(this.prevI=v,this.i=v+1,v>=y.length)return-1;const w=y.charCodeAt(v);if(this.column++,w<55296){if(w>31&&w<127||w>159&&w!==8232||w===9)return w;switch(w){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const A=y.charCodeAt(v+1);A!==10&&A!==133||(this.i=v+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),w}}if(w>56319)return w>=57344&&w<=65533||this.fail("disallowed character."),w;const _=65536+1024*(w-55296)+(y.charCodeAt(v+1)-56320);return this.i=v+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:v}=this;const{chunk:w}=this;for(;;){const _=this.getCode(),A=_===-2,j=A?10:_;if(j===-1||y.includes(j))return this.text+=w.slice(v,this.prevI),j;A&&(this.text+=w.slice(v,this.prevI)+`
|
|
34
|
+
`,v=this.i)}}captureToChar(y){let{i:v}=this;const{chunk:w}=this;for(;;){let _=this.getCode();switch(_){case-2:this.text+=w.slice(v,this.prevI)+`
|
|
35
|
+
`,v=this.i,_=10;break;case-1:return this.text+=w.slice(v),!1}if(_===y)return this.text+=w.slice(v,this.prevI),!0}}captureNameChars(){const{chunk:y,i:v}=this;for(;;){const w=this.getCode();if(w===-1)return this.name+=y.slice(v),-1;if(!l(w))return this.name+=y.slice(v,this.prevI),w===-2?10:w}}skipSpaces(){for(;;){const y=this.getCodeNorm();if(y===-1||!r(y))return y}}setXMLVersion(y){this.currentXMLVersion=y,y==="1.0"?(this.isChar=e,this.getCode=this.getCode10):(this.isChar=h,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const y=this.i,v=this.skipSpaces();switch(this.prevI!==y&&(this.xmlDeclPossible=!1),v){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var y;const v=this.captureTo(N);switch(v){case 62:(y=this.doctypeHandler)===null||y===void 0||y.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(v),v===91?this.state=4:P(v)&&(this.state=3,this.q=v)}}sDoctypeQuote(){const y=this.q;this.captureToChar(y)&&(this.text+=String.fromCodePoint(y),this.q=null,this.state=2)}sDTD(){const y=this.captureTo(B);y!==-1&&(this.text+=String.fromCodePoint(y),y===93?this.state=2:y===60?this.state=6:P(y)&&(this.state=5,this.q=y))}sDTDQuoted(){const y=this.q;this.captureToChar(y)&&(this.text+=String.fromCodePoint(y),this.state=4,this.q=null)}sDTDOpenWaka(){const y=this.getCodeNorm();switch(this.text+=String.fromCodePoint(y),y){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const y=String.fromCodePoint(this.getCodeNorm()),v=this.openWakaBang+=y;this.text+=y,v!=="-"&&(this.state=v==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const y=this.getCodeNorm();this.text+=String.fromCodePoint(y),this.state=y===45?10:8}sDTDCommentEnded(){const y=this.getCodeNorm();this.text+=String.fromCodePoint(y),y===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const y=this.getCodeNorm();this.text+=String.fromCodePoint(y),y===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:y}=this;const{chunk:v}=this;t:for(;;)switch(this.getCode()){case-2:this.entity+=v.slice(y,this.prevI)+`
|
|
36
|
+
`,y=this.i;break;case 59:{const{entityReturnState:w}=this,_=this.entity+v.slice(y,this.prevI);let A;this.state=w,_===""?(this.fail("empty entity name."),A="&;"):(A=this.parseEntity(_),this.entity=""),w===13&&this.textHandler===void 0||(this.text+=A);break t}case-1:this.entity+=v.slice(y);break t}}sOpenWaka(){const y=this.getCode();if(n(y))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(y){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var y;const v=this.getCodeNorm();v===45?(this.state=19,(y=this.commentHandler)===null||y===void 0||y.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(v),this.state=17)}sCommentEnded(){const y=this.getCodeNorm();y!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(y),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const y=this.getCodeNorm();y===93?this.state=22:(this.text+="]"+String.fromCodePoint(y),this.state=20)}sCDataEnding2(){var y;const v=this.getCodeNorm();switch(v){case 62:(y=this.cdataHandler)===null||y===void 0||y.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(v),this.state=20}}sPIFirstChar(){const y=this.getCodeNorm();this.nameStartCheck(y)?(this.piTarget+=String.fromCodePoint(y),this.state=24):y===63||r(y)?(this.fail("processing instruction without a target."),this.state=y===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(y),this.state=24)}sPIRest(){const{chunk:y,i:v}=this;for(;;){const w=this.getCodeNorm();if(w===-1)return void(this.piTarget+=y.slice(v));if(!this.nameCheck(w)){this.piTarget+=y.slice(v,this.prevI);const _=w===63;_||r(w)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=_?33:27):this.state=_?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(w));break}}}sPIBody(){if(this.text.length===0){const y=this.getCodeNorm();y===63?this.state=26:r(y)||(this.text=String.fromCodePoint(y))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var y;const v=this.getCodeNorm();if(v===62){const{piTarget:w}=this;w.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(y=this.piHandler)===null||y===void 0||y.call(this,{target:w,body:this.text}),this.piTarget=this.text="",this.state=13}else v===63?this.text+="?":(this.text+="?"+String.fromCodePoint(v),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const y=this.skipSpaces();y!==63?y!==-1&&(this.state=28,this.name=String.fromCodePoint(y)):this.state=33}sXMLDeclName(){const y=this.captureTo(D);if(y===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(r(y)||y===61){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=y===61?30:29}}sXMLDeclEq(){const y=this.getCodeNorm();if(y===63)return this.state=33,void this.fail("XML declaration is incomplete.");r(y)||(y!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const y=this.getCodeNorm();if(y===63)return this.state=33,void this.fail("XML declaration is incomplete.");r(y)||(P(y)?this.q=y:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const y=this.captureTo([this.q,63]);if(y===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(y===-1)return;const v=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const w=v;this.xmlDecl.version=w,/^1\.[0-9]+$/.test(w)?this.opt.forceXMLVersion||this.setXMLVersion(w):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(v)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=v;break;case"standalone":v!=="yes"&&v!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=v}this.name="",this.state=32}sXMLDeclSeparator(){const y=this.getCodeNorm();y!==63?(r(y)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var y;this.getCodeNorm()===62?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(y=this.xmldeclHandler)===null||y===void 0||y.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var y;const v=this.captureNameChars();if(v===-1)return;const w=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=w.ns=Object.create(null)),(y=this.openTagStartHandler)===null||y===void 0||y.call(this,w),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),v){case 62:this.openTag();break;case 47:this.state=35;break;default:r(v)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const y=this.skipSpaces();y!==-1&&(n(y)?(this.unget(),this.state=37):y===62?this.openTag():y===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const y=this.captureNameChars();y===61?this.state=39:r(y)?this.state=38:y===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):y!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const y=this.skipSpaces();switch(y){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",y===62?this.openTag():n(y)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const y=this.getCodeNorm();P(y)?(this.q=y,this.state=40):r(y)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:y,chunk:v}=this;let{i:w}=this;for(;;)switch(this.getCode()){case y:return this.pushAttrib(this.name,this.text+v.slice(w,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=v.slice(w,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=v.slice(w,this.prevI)+" ",w=this.i;break;case 60:return this.text+=v.slice(w,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=v.slice(w))}}sAttribValueClosed(){const y=this.getCodeNorm();r(y)?this.state=36:y===62?this.openTag():y===47?this.state=35:n(y)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const y=this.captureTo(U);switch(y){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",y===62?this.openTag():this.state=36}}sCloseTag(){const y=this.captureNameChars();y===62?this.closeTag():r(y)?this.state=44:y!==-1&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:y,forbiddenState:v}=this;const{chunk:w,textHandler:_}=this;t:for(;;)switch(this.getCode()){case 60:if(this.state=15,_!==void 0){const{text:A}=this,j=w.slice(y,this.prevI);A.length!==0?(_(A+j),this.text=""):j.length!==0&&_(j)}v=0;break t;case 38:this.state=14,this.entityReturnState=13,_!==void 0&&(this.text+=w.slice(y,this.prevI)),v=0;break t;case 93:switch(v){case 0:v=1;break;case 1:v=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:v===2&&this.fail('the string "]]>" is disallowed in char data.'),v=0;break;case-2:_!==void 0&&(this.text+=w.slice(y,this.prevI)+`
|
|
37
|
+
`),y=this.i,v=0;break;case-1:_!==void 0&&(this.text+=w.slice(y));break t;default:v=0}this.forbiddenState=v}handleTextOutsideRoot(){let{i:y}=this;const{chunk:v,textHandler:w}=this;let _=!1;t:for(;;){const A=this.getCode();switch(A){case 60:if(this.state=15,w!==void 0){const{text:j}=this,L=v.slice(y,this.prevI);j.length!==0?(w(j+L),this.text=""):L.length!==0&&w(L)}break t;case 38:this.state=14,this.entityReturnState=13,w!==void 0&&(this.text+=v.slice(y,this.prevI)),_=!0;break t;case-2:w!==void 0&&(this.text+=v.slice(y,this.prevI)+`
|
|
38
|
+
`),y=this.i;break;case-1:w!==void 0&&(this.text+=v.slice(y));break t;default:r(A)||(_=!0)}}_&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(y,v){var w;const{prefix:_,local:A}=this.qname(y),j={name:y,prefix:_,local:A,value:v};if(this.attribList.push(j),(w=this.attributeHandler)===null||w===void 0||w.call(this,j),_==="xmlns"){const L=v.trim();this.currentXMLVersion==="1.0"&&L===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[A]=L,z(this,A,L)}else if(y==="xmlns"){const L=v.trim();this.topNS[""]=L,z(this,"",L)}}pushAttribPlain(y,v){var w;const _={name:y,value:v};this.attribList.push(_),(w=this.attributeHandler)===null||w===void 0||w.call(this,_)}end(){var y,v;this.sawRoot||this.fail("document must contain a root element.");const{tags:w}=this;for(;w.length>0;){const A=w.pop();this.fail("unclosed tag: "+A.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:_}=this;return _.length!==0&&((y=this.textHandler)===null||y===void 0||y.call(this,_),this.text=""),this._closed=!0,(v=this.endHandler)===null||v===void 0||v.call(this),this._init(),this}resolve(y){var v,w;let _=this.topNS[y];if(_!==void 0)return _;const{tags:A}=this;for(let j=A.length-1;j>=0;j--)if(_=A[j].ns[y],_!==void 0)return _;return _=this.ns[y],_!==void 0?_:(w=(v=this.opt).resolvePrefix)===null||w===void 0?void 0:w.call(v,y)}qname(y){const v=y.indexOf(":");if(v===-1)return{prefix:"",local:y};const w=y.slice(v+1),_=y.slice(0,v);return(_===""||w===""||w.includes(":"))&&this.fail(`malformed name: ${y}.`),{prefix:_,local:w}}processAttribsNS(){var y;const{attribList:v}=this,w=this.tag;{const{prefix:j,local:L}=this.qname(w.name);w.prefix=j,w.local=L;const H=w.uri=(y=this.resolve(j))!==null&&y!==void 0?y:"";j!==""&&(j==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),H===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(j)}.`),w.uri=j))}if(v.length===0)return;const{attributes:_}=w,A=new Set;for(const j of v){const{name:L,prefix:H,local:q}=j;let X,F;H===""?(X=L==="xmlns"?S:"",F=L):(X=this.resolve(H),X===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(H)}.`),X=H),F=`{${X}}${q}`),A.has(F)&&this.fail(`duplicate attribute: ${F}.`),A.add(F),j.uri=X,_[L]=j}this.attribList=[]}processAttribsPlain(){const{attribList:y}=this,v=this.tag.attributes;for(const{name:w,value:_}of y)v[w]!==void 0&&this.fail(`duplicate attribute: ${w}.`),v[w]=_;this.attribList=[]}openTag(){var y;this.processAttribs();const{tags:v}=this,w=this.tag;w.isSelfClosing=!1,(y=this.openTagHandler)===null||y===void 0||y.call(this,w),v.push(w),this.state=13,this.name=""}openSelfClosingTag(){var y,v,w;this.processAttribs();const{tags:_}=this,A=this.tag;A.isSelfClosing=!0,(y=this.openTagHandler)===null||y===void 0||y.call(this,A),(v=this.closeTagHandler)===null||v===void 0||v.call(this,A),(this.tag=(w=_[_.length-1])!==null&&w!==void 0?w:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:y,name:v}=this;if(this.state=13,this.name="",v==="")return this.fail("weird empty close tag."),void(this.text+="</>");const w=this.closeTagHandler;let _=y.length;for(;_-- >0;){const A=this.tag=y.pop();if(this.topNS=A.ns,w==null||w(A),A.name===v)break;this.fail("unexpected close tag.")}_===0?this.closedRoot=!0:_<0&&(this.fail(`unmatched closing tag: ${v}.`),this.text+=`</${v}>`)}parseEntity(y){if(y[0]!=="#"){const w=this.ENTITIES[y];return w!==void 0?w:(this.fail(this.isName(y)?"undefined entity.":"disallowed character in entity name."),`&${y};`)}let v=NaN;return y[1]==="x"&&/^#x[0-9a-f]+$/i.test(y)?v=parseInt(y.slice(2),16):/^#[0-9]+$/.test(y)&&(v=parseInt(y.slice(1),10)),this.isChar(v)?String.fromCodePoint(v):(this.fail("malformed character entity."),`&${y};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(t,b,g){var f=t("safe-buffer").Buffer;function o(a,r){this._block=f.alloc(a),this._finalSize=r,this._blockSize=a,this._len=0}o.prototype.update=function(a,r){typeof a=="string"&&(r=r||"utf8",a=f.from(a,r));for(var e=this._block,n=this._blockSize,l=a.length,i=this._len,s=0;s<l;){for(var h=i%n,d=Math.min(l-s,n-h),c=0;c<d;c++)e[h+c]=a[s+c];s+=d,(i+=d)%n==0&&this._update(e)}return this._len+=l,this},o.prototype.digest=function(a){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var e=8*this._len;if(e<=4294967295)this._block.writeUInt32BE(e,this._blockSize-4);else{var n=(4294967295&e)>>>0,l=(e-n)/4294967296;this._block.writeUInt32BE(l,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return a?i.toString(a):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},b.exports=o},{"safe-buffer":494}],498:[function(t,b,g){var f=b.exports=function(o){o=o.toLowerCase();var a=f[o];if(!a)throw new Error(o+" is not supported (we accept pull requests)");return new a};f.sha=t("./sha"),f.sha1=t("./sha1"),f.sha224=t("./sha224"),f.sha256=t("./sha256"),f.sha384=t("./sha384"),f.sha512=t("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(t,b,g){var f=t("inherits"),o=t("./hash"),a=t("safe-buffer").Buffer,r=[1518500249,1859775393,-1894007588,-899497514],e=new Array(80);function n(){this.init(),this._w=e,o.call(this,64,56)}function l(s){return s<<30|s>>>2}function i(s,h,d,c){return s===0?h&d|~h&c:s===2?h&d|h&c|d&c:h^d^c}f(n,o),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(s){for(var h,d=this._w,c=0|this._a,p=0|this._b,m=0|this._c,S=0|this._d,C=0|this._e,M=0;M<16;++M)d[M]=s.readInt32BE(4*M);for(;M<80;++M)d[M]=d[M-3]^d[M-8]^d[M-14]^d[M-16];for(var P=0;P<80;++P){var $=~~(P/20),N=0|((h=c)<<5|h>>>27)+i($,p,m,S)+C+d[P]+r[$];C=S,S=m,m=l(p),p=c,c=N}this._a=c+this._a|0,this._b=p+this._b|0,this._c=m+this._c|0,this._d=S+this._d|0,this._e=C+this._e|0},n.prototype._hash=function(){var s=a.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},b.exports=n},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(t,b,g){var f=t("inherits"),o=t("./hash"),a=t("safe-buffer").Buffer,r=[1518500249,1859775393,-1894007588,-899497514],e=new Array(80);function n(){this.init(),this._w=e,o.call(this,64,56)}function l(h){return h<<5|h>>>27}function i(h){return h<<30|h>>>2}function s(h,d,c,p){return h===0?d&c|~d&p:h===2?d&c|d&p|c&p:d^c^p}f(n,o),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(h){for(var d,c=this._w,p=0|this._a,m=0|this._b,S=0|this._c,C=0|this._d,M=0|this._e,P=0;P<16;++P)c[P]=h.readInt32BE(4*P);for(;P<80;++P)c[P]=(d=c[P-3]^c[P-8]^c[P-14]^c[P-16])<<1|d>>>31;for(var $=0;$<80;++$){var N=~~($/20),B=l(p)+s(N,m,S,C)+M+c[$]+r[N]|0;M=C,C=S,S=i(m),m=p,p=B}this._a=p+this._a|0,this._b=m+this._b|0,this._c=S+this._c|0,this._d=C+this._d|0,this._e=M+this._e|0},n.prototype._hash=function(){var h=a.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},b.exports=n},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(t,b,g){var f=t("inherits"),o=t("./sha256"),a=t("./hash"),r=t("safe-buffer").Buffer,e=new Array(64);function n(){this.init(),this._w=e,a.call(this,64,56)}f(n,o),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var l=r.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},b.exports=n},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(t,b,g){var f=t("inherits"),o=t("./hash"),a=t("safe-buffer").Buffer,r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],e=new Array(64);function n(){this.init(),this._w=e,o.call(this,64,56)}function l(c,p,m){return m^c&(p^m)}function i(c,p,m){return c&p|m&(c|p)}function s(c){return(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10)}function h(c){return(c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7)}function d(c){return(c>>>7|c<<25)^(c>>>18|c<<14)^c>>>3}f(n,o),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(c){for(var p,m=this._w,S=0|this._a,C=0|this._b,M=0|this._c,P=0|this._d,$=0|this._e,N=0|this._f,B=0|this._g,D=0|this._h,U=0;U<16;++U)m[U]=c.readInt32BE(4*U);for(;U<64;++U)m[U]=0|(((p=m[U-2])>>>17|p<<15)^(p>>>19|p<<13)^p>>>10)+m[U-7]+d(m[U-15])+m[U-16];for(var z=0;z<64;++z){var E=D+h($)+l($,N,B)+r[z]+m[z]|0,O=s(S)+i(S,C,M)|0;D=B,B=N,N=$,$=P+E|0,P=M,M=C,C=S,S=E+O|0}this._a=S+this._a|0,this._b=C+this._b|0,this._c=M+this._c|0,this._d=P+this._d|0,this._e=$+this._e|0,this._f=N+this._f|0,this._g=B+this._g|0,this._h=D+this._h|0},n.prototype._hash=function(){var c=a.allocUnsafe(32);return c.writeInt32BE(this._a,0),c.writeInt32BE(this._b,4),c.writeInt32BE(this._c,8),c.writeInt32BE(this._d,12),c.writeInt32BE(this._e,16),c.writeInt32BE(this._f,20),c.writeInt32BE(this._g,24),c.writeInt32BE(this._h,28),c},b.exports=n},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(t,b,g){var f=t("inherits"),o=t("./sha512"),a=t("./hash"),r=t("safe-buffer").Buffer,e=new Array(160);function n(){this.init(),this._w=e,a.call(this,128,112)}f(n,o),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){var l=r.allocUnsafe(48);function i(s,h,d){l.writeInt32BE(s,d),l.writeInt32BE(h,d+4)}return i(this._ah,this._al,0),i(this._bh,this._bl,8),i(this._ch,this._cl,16),i(this._dh,this._dl,24),i(this._eh,this._el,32),i(this._fh,this._fl,40),l},b.exports=n},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(t,b,g){var f=t("inherits"),o=t("./hash"),a=t("safe-buffer").Buffer,r=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],e=new Array(160);function n(){this.init(),this._w=e,o.call(this,128,112)}function l(C,M,P){return P^C&(M^P)}function i(C,M,P){return C&M|P&(C|M)}function s(C,M){return(C>>>28|M<<4)^(M>>>2|C<<30)^(M>>>7|C<<25)}function h(C,M){return(C>>>14|M<<18)^(C>>>18|M<<14)^(M>>>9|C<<23)}function d(C,M){return(C>>>1|M<<31)^(C>>>8|M<<24)^C>>>7}function c(C,M){return(C>>>1|M<<31)^(C>>>8|M<<24)^(C>>>7|M<<25)}function p(C,M){return(C>>>19|M<<13)^(M>>>29|C<<3)^C>>>6}function m(C,M){return(C>>>19|M<<13)^(M>>>29|C<<3)^(C>>>6|M<<26)}function S(C,M){return C>>>0<M>>>0?1:0}f(n,o),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(C){for(var M=this._w,P=0|this._ah,$=0|this._bh,N=0|this._ch,B=0|this._dh,D=0|this._eh,U=0|this._fh,z=0|this._gh,E=0|this._hh,O=0|this._al,x=0|this._bl,y=0|this._cl,v=0|this._dl,w=0|this._el,_=0|this._fl,A=0|this._gl,j=0|this._hl,L=0;L<32;L+=2)M[L]=C.readInt32BE(4*L),M[L+1]=C.readInt32BE(4*L+4);for(;L<160;L+=2){var H=M[L-30],q=M[L-30+1],X=d(H,q),F=c(q,H),W=p(H=M[L-4],q=M[L-4+1]),I=m(q,H),R=M[L-14],V=M[L-14+1],K=M[L-32],Z=M[L-32+1],Y=F+V|0,J=X+R+S(Y,F)|0;J=(J=J+W+S(Y=Y+I|0,I)|0)+K+S(Y=Y+Z|0,Z)|0,M[L]=J,M[L+1]=Y}for(var nt=0;nt<160;nt+=2){J=M[nt],Y=M[nt+1];var it=i(P,$,N),G=i(O,x,y),tt=s(P,O),et=s(O,P),ot=h(D,w),st=h(w,D),lt=r[nt],ft=r[nt+1],pt=l(D,U,z),yt=l(w,_,A),Ot=j+st|0,At=E+ot+S(Ot,j)|0;At=(At=(At=At+pt+S(Ot=Ot+yt|0,yt)|0)+lt+S(Ot=Ot+ft|0,ft)|0)+J+S(Ot=Ot+Y|0,Y)|0;var kt=et+G|0,Wt=tt+it+S(kt,et)|0;E=z,j=A,z=U,A=_,U=D,_=w,D=B+At+S(w=v+Ot|0,v)|0,B=N,v=y,N=$,y=x,$=P,x=O,P=At+Wt+S(O=Ot+kt|0,Ot)|0}this._al=this._al+O|0,this._bl=this._bl+x|0,this._cl=this._cl+y|0,this._dl=this._dl+v|0,this._el=this._el+w|0,this._fl=this._fl+_|0,this._gl=this._gl+A|0,this._hl=this._hl+j|0,this._ah=this._ah+P+S(this._al,O)|0,this._bh=this._bh+$+S(this._bl,x)|0,this._ch=this._ch+N+S(this._cl,y)|0,this._dh=this._dh+B+S(this._dl,v)|0,this._eh=this._eh+D+S(this._el,w)|0,this._fh=this._fh+U+S(this._fl,_)|0,this._gh=this._gh+z+S(this._gl,A)|0,this._hh=this._hh+E+S(this._hl,j)|0},n.prototype._hash=function(){var C=a.allocUnsafe(64);function M(P,$,N){C.writeInt32BE(P,N),C.writeInt32BE($,N+4)}return M(this._ah,this._al,0),M(this._bh,this._bl,8),M(this._ch,this._cl,16),M(this._dh,this._dl,24),M(this._eh,this._el,32),M(this._fh,this._fl,40),M(this._gh,this._gl,48),M(this._hh,this._hl,56),C},b.exports=n},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(t,b,g){b.exports=o;var f=t("events").EventEmitter;function o(){f.call(this)}t("inherits")(o,f),o.Readable=t("readable-stream/readable.js"),o.Writable=t("readable-stream/writable.js"),o.Duplex=t("readable-stream/duplex.js"),o.Transform=t("readable-stream/transform.js"),o.PassThrough=t("readable-stream/passthrough.js"),o.Stream=o,o.prototype.pipe=function(a,r){var e=this;function n(p){a.writable&&a.write(p)===!1&&e.pause&&e.pause()}function l(){e.readable&&e.resume&&e.resume()}e.on("data",n),a.on("drain",l),a._isStdio||r&&r.end===!1||(e.on("end",s),e.on("close",h));var i=!1;function s(){i||(i=!0,a.end())}function h(){i||(i=!0,typeof a.destroy=="function"&&a.destroy())}function d(p){if(c(),f.listenerCount(this,"error")===0)throw p}function c(){e.removeListener("data",n),a.removeListener("drain",l),e.removeListener("end",s),e.removeListener("close",h),e.removeListener("error",d),a.removeListener("error",d),e.removeListener("end",c),e.removeListener("close",c),a.removeListener("close",c)}return e.on("error",d),a.on("error",d),e.on("end",c),e.on("close",c),a.on("close",c),a.emit("pipe",e),a}},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(t,b,g){var f={}.toString;b.exports=Array.isArray||function(o){return f.call(o)=="[object Array]"}},{}],507:[function(t,b,g){b.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(t,b,g){var f=t("process-nextick-args"),o=Object.keys||function(c){var p=[];for(var m in c)p.push(m);return p};b.exports=s;var a=Object.create(t("core-util-is"));a.inherits=t("inherits");var r=t("./_stream_readable"),e=t("./_stream_writable");a.inherits(s,r);for(var n=o(e.prototype),l=0;l<n.length;l++){var i=n[l];s.prototype[i]||(s.prototype[i]=e.prototype[i])}function s(c){if(!(this instanceof s))return new s(c);r.call(this,c),e.call(this,c),c&&c.readable===!1&&(this.readable=!1),c&&c.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,c&&c.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||f.nextTick(d,this)}function d(c){c.end()}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(c){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=c,this._writableState.destroyed=c)}}),s.prototype._destroy=function(c,p){this.push(null),this.end(),f.nextTick(p,c)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(t,b,g){b.exports=a;var f=t("./_stream_transform"),o=Object.create(t("core-util-is"));function a(r){if(!(this instanceof a))return new a(r);f.call(this,r)}o.inherits=t("inherits"),o.inherits(a,f),a.prototype._transform=function(r,e,n){n(null,r)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(t,b,g){(function(f,o){(function(){var a=t("process-nextick-args");b.exports=P;var r,e=t("isarray");P.ReadableState=M,t("events").EventEmitter;var n=function(j,L){return j.listeners(L).length},l=t("./internal/streams/stream"),i=t("safe-buffer").Buffer,s=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h=Object.create(t("core-util-is"));h.inherits=t("inherits");var d=t("util"),c=void 0;c=d&&d.debuglog?d.debuglog("stream"):function(){};var p,m=t("./internal/streams/BufferList"),S=t("./internal/streams/destroy");h.inherits(P,l);var C=["error","close","destroy","pause","resume"];function M(j,L){j=j||{};var H=L instanceof(r=r||t("./_stream_duplex"));this.objectMode=!!j.objectMode,H&&(this.objectMode=this.objectMode||!!j.readableObjectMode);var q=j.highWaterMark,X=j.readableHighWaterMark,F=this.objectMode?16:16384;this.highWaterMark=q||q===0?q:H&&(X||X===0)?X:F,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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.destroyed=!1,this.defaultEncoding=j.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,j.encoding&&(p||(p=t("string_decoder/").StringDecoder),this.decoder=new p(j.encoding),this.encoding=j.encoding)}function P(j){if(r=r||t("./_stream_duplex"),!(this instanceof P))return new P(j);this._readableState=new M(j,this),this.readable=!0,j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy)),l.call(this)}function $(j,L,H,q,X){var F,W=j._readableState;return L===null?(W.reading=!1,function(I,R){if(!R.ended){if(R.decoder){var V=R.decoder.end();V&&V.length&&(R.buffer.push(V),R.length+=R.objectMode?1:V.length)}R.ended=!0,D(I)}}(j,W)):(X||(F=function(I,R){var V;K=R,i.isBuffer(K)||K instanceof s||typeof R=="string"||R===void 0||I.objectMode||(V=new TypeError("Invalid non-string/buffer chunk"));var K;return V}(W,L)),F?j.emit("error",F):W.objectMode||L&&L.length>0?(typeof L=="string"||W.objectMode||Object.getPrototypeOf(L)===i.prototype||(L=function(I){return i.from(I)}(L)),q?W.endEmitted?j.emit("error",new Error("stream.unshift() after end event")):N(j,W,L,!0):W.ended?j.emit("error",new Error("stream.push() after EOF")):(W.reading=!1,W.decoder&&!H?(L=W.decoder.write(L),W.objectMode||L.length!==0?N(j,W,L,!1):z(j,W)):N(j,W,L,!1))):q||(W.reading=!1)),function(I){return!I.ended&&(I.needReadable||I.length<I.highWaterMark||I.length===0)}(W)}function N(j,L,H,q){L.flowing&&L.length===0&&!L.sync?(j.emit("data",H),j.read(0)):(L.length+=L.objectMode?1:H.length,q?L.buffer.unshift(H):L.buffer.push(H),L.needReadable&&D(j)),z(j,L)}Object.defineProperty(P.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(j){this._readableState&&(this._readableState.destroyed=j)}}),P.prototype.destroy=S.destroy,P.prototype._undestroy=S.undestroy,P.prototype._destroy=function(j,L){this.push(null),L(j)},P.prototype.push=function(j,L){var H,q=this._readableState;return q.objectMode?H=!0:typeof j=="string"&&((L=L||q.defaultEncoding)!==q.encoding&&(j=i.from(j,L),L=""),H=!0),$(this,j,L,!1,H)},P.prototype.unshift=function(j){return $(this,j,null,!0,!1)},P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(j){return p||(p=t("string_decoder/").StringDecoder),this._readableState.decoder=new p(j),this._readableState.encoding=j,this};function B(j,L){return j<=0||L.length===0&&L.ended?0:L.objectMode?1:j!=j?L.flowing&&L.length?L.buffer.head.data.length:L.length:(j>L.highWaterMark&&(L.highWaterMark=function(H){return H>=8388608?H=8388608:(H--,H|=H>>>1,H|=H>>>2,H|=H>>>4,H|=H>>>8,H|=H>>>16,H++),H}(j)),j<=L.length?j:L.ended?L.length:(L.needReadable=!0,0))}function D(j){var L=j._readableState;L.needReadable=!1,L.emittedReadable||(c("emitReadable",L.flowing),L.emittedReadable=!0,L.sync?a.nextTick(U,j):U(j))}function U(j){c("emit readable"),j.emit("readable"),y(j)}function z(j,L){L.readingMore||(L.readingMore=!0,a.nextTick(E,j,L))}function E(j,L){for(var H=L.length;!L.reading&&!L.flowing&&!L.ended&&L.length<L.highWaterMark&&(c("maybeReadMore read 0"),j.read(0),H!==L.length);)H=L.length;L.readingMore=!1}function O(j){c("readable nexttick read 0"),j.read(0)}function x(j,L){L.reading||(c("resume read 0"),j.read(0)),L.resumeScheduled=!1,L.awaitDrain=0,j.emit("resume"),y(j),L.flowing&&!L.reading&&j.read(0)}function y(j){var L=j._readableState;for(c("flow",L.flowing);L.flowing&&j.read()!==null;);}function v(j,L){return L.length===0?null:(L.objectMode?H=L.buffer.shift():!j||j>=L.length?(H=L.decoder?L.buffer.join(""):L.buffer.length===1?L.buffer.head.data:L.buffer.concat(L.length),L.buffer.clear()):H=function(q,X,F){var W;return q<X.head.data.length?(W=X.head.data.slice(0,q),X.head.data=X.head.data.slice(q)):W=q===X.head.data.length?X.shift():F?function(I,R){var V=R.head,K=1,Z=V.data;for(I-=Z.length;V=V.next;){var Y=V.data,J=I>Y.length?Y.length:I;if(J===Y.length?Z+=Y:Z+=Y.slice(0,I),(I-=J)===0){J===Y.length?(++K,V.next?R.head=V.next:R.head=R.tail=null):(R.head=V,V.data=Y.slice(J));break}++K}return R.length-=K,Z}(q,X):function(I,R){var V=i.allocUnsafe(I),K=R.head,Z=1;for(K.data.copy(V),I-=K.data.length;K=K.next;){var Y=K.data,J=I>Y.length?Y.length:I;if(Y.copy(V,V.length-I,0,J),(I-=J)===0){J===Y.length?(++Z,K.next?R.head=K.next:R.head=R.tail=null):(R.head=K,K.data=Y.slice(J));break}++Z}return R.length-=Z,V}(q,X),W}(j,L.buffer,L.decoder),H);var H}function w(j){var L=j._readableState;if(L.length>0)throw new Error('"endReadable()" called on non-empty stream');L.endEmitted||(L.ended=!0,a.nextTick(_,L,j))}function _(j,L){j.endEmitted||j.length!==0||(j.endEmitted=!0,L.readable=!1,L.emit("end"))}function A(j,L){for(var H=0,q=j.length;H<q;H++)if(j[H]===L)return H;return-1}P.prototype.read=function(j){c("read",j),j=parseInt(j,10);var L=this._readableState,H=j;if(j!==0&&(L.emittedReadable=!1),j===0&&L.needReadable&&(L.length>=L.highWaterMark||L.ended))return c("read: emitReadable",L.length,L.ended),L.length===0&&L.ended?w(this):D(this),null;if((j=B(j,L))===0&&L.ended)return L.length===0&&w(this),null;var q,X=L.needReadable;return c("need readable",X),(L.length===0||L.length-j<L.highWaterMark)&&c("length less than watermark",X=!0),L.ended||L.reading?c("reading or ended",X=!1):X&&(c("do read"),L.reading=!0,L.sync=!0,L.length===0&&(L.needReadable=!0),this._read(L.highWaterMark),L.sync=!1,L.reading||(j=B(H,L))),(q=j>0?v(j,L):null)===null?(L.needReadable=!0,j=0):L.length-=j,L.length===0&&(L.ended||(L.needReadable=!0),H!==j&&L.ended&&w(this)),q!==null&&this.emit("data",q),q},P.prototype._read=function(j){this.emit("error",new Error("_read() is not implemented"))},P.prototype.pipe=function(j,L){var H=this,q=this._readableState;switch(q.pipesCount){case 0:q.pipes=j;break;case 1:q.pipes=[q.pipes,j];break;default:q.pipes.push(j)}q.pipesCount+=1,c("pipe count=%d opts=%j",q.pipesCount,L);var X=(!L||L.end!==!1)&&j!==f.stdout&&j!==f.stderr?W:nt;function F(it,G){c("onunpipe"),it===H&&G&&G.hasUnpiped===!1&&(G.hasUnpiped=!0,c("cleanup"),j.removeListener("close",Y),j.removeListener("finish",J),j.removeListener("drain",I),j.removeListener("error",Z),j.removeListener("unpipe",F),H.removeListener("end",W),H.removeListener("end",nt),H.removeListener("data",K),R=!0,!q.awaitDrain||j._writableState&&!j._writableState.needDrain||I())}function W(){c("onend"),j.end()}q.endEmitted?a.nextTick(X):H.once("end",X),j.on("unpipe",F);var I=function(it){return function(){var G=it._readableState;c("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&n(it,"data")&&(G.flowing=!0,y(it))}}(H);j.on("drain",I);var R=!1,V=!1;function K(it){c("ondata"),V=!1,j.write(it)!==!1||V||((q.pipesCount===1&&q.pipes===j||q.pipesCount>1&&A(q.pipes,j)!==-1)&&!R&&(c("false write response, pause",q.awaitDrain),q.awaitDrain++,V=!0),H.pause())}function Z(it){c("onerror",it),nt(),j.removeListener("error",Z),n(j,"error")===0&&j.emit("error",it)}function Y(){j.removeListener("finish",J),nt()}function J(){c("onfinish"),j.removeListener("close",Y),nt()}function nt(){c("unpipe"),H.unpipe(j)}return H.on("data",K),function(it,G,tt){if(typeof it.prependListener=="function")return it.prependListener(G,tt);it._events&&it._events[G]?e(it._events[G])?it._events[G].unshift(tt):it._events[G]=[tt,it._events[G]]:it.on(G,tt)}(j,"error",Z),j.once("close",Y),j.once("finish",J),j.emit("pipe",H),q.flowing||(c("pipe resume"),H.resume()),j},P.prototype.unpipe=function(j){var L=this._readableState,H={hasUnpiped:!1};if(L.pipesCount===0)return this;if(L.pipesCount===1)return j&&j!==L.pipes||(j||(j=L.pipes),L.pipes=null,L.pipesCount=0,L.flowing=!1,j&&j.emit("unpipe",this,H)),this;if(!j){var q=L.pipes,X=L.pipesCount;L.pipes=null,L.pipesCount=0,L.flowing=!1;for(var F=0;F<X;F++)q[F].emit("unpipe",this,{hasUnpiped:!1});return this}var W=A(L.pipes,j);return W===-1||(L.pipes.splice(W,1),L.pipesCount-=1,L.pipesCount===1&&(L.pipes=L.pipes[0]),j.emit("unpipe",this,H)),this},P.prototype.on=function(j,L){var H=l.prototype.on.call(this,j,L);if(j==="data")this._readableState.flowing!==!1&&this.resume();else if(j==="readable"){var q=this._readableState;q.endEmitted||q.readableListening||(q.readableListening=q.needReadable=!0,q.emittedReadable=!1,q.reading?q.length&&D(this):a.nextTick(O,this))}return H},P.prototype.addListener=P.prototype.on,P.prototype.resume=function(){var j=this._readableState;return j.flowing||(c("resume"),j.flowing=!0,function(L,H){H.resumeScheduled||(H.resumeScheduled=!0,a.nextTick(x,L,H))}(this,j)),this},P.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this},P.prototype.wrap=function(j){var L=this,H=this._readableState,q=!1;for(var X in j.on("end",function(){if(c("wrapped end"),H.decoder&&!H.ended){var W=H.decoder.end();W&&W.length&&L.push(W)}L.push(null)}),j.on("data",function(W){c("wrapped data"),H.decoder&&(W=H.decoder.write(W)),H.objectMode&&W==null||(H.objectMode||W&&W.length)&&(L.push(W)||(q=!0,j.pause()))}),j)this[X]===void 0&&typeof j[X]=="function"&&(this[X]=function(W){return function(){return j[W].apply(j,arguments)}}(X));for(var F=0;F<C.length;F++)j.on(C[F],this.emit.bind(this,C[F]));return this._read=function(W){c("wrapped _read",W),q&&(q=!1,j.resume())},this},Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),P._fromList=v}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,events:422,inherits:440,isarray:506,"process-nextick-args":466,"safe-buffer":520,"string_decoder/":521,util:188}],511:[function(t,b,g){b.exports=r;var f=t("./_stream_duplex"),o=Object.create(t("core-util-is"));function a(l,i){var s=this._transformState;s.transforming=!1;var h=s.writecb;if(!h)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,i!=null&&this.push(i),h(l);var d=this._readableState;d.reading=!1,(d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}function r(l){if(!(this instanceof r))return new r(l);f.call(this,l),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",e)}function e(){var l=this;typeof this._flush=="function"?this._flush(function(i,s){n(l,i,s)}):n(this,null,null)}function n(l,i,s){if(i)return l.emit("error",i);if(s!=null&&l.push(s),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}o.inherits=t("inherits"),o.inherits(r,f),r.prototype.push=function(l,i){return this._transformState.needTransform=!1,f.prototype.push.call(this,l,i)},r.prototype._transform=function(l,i,s){throw new Error("_transform() is not implemented")},r.prototype._write=function(l,i,s){var h=this._transformState;if(h.writecb=s,h.writechunk=l,h.writeencoding=i,!h.transforming){var d=this._readableState;(h.needTransform||d.needReadable||d.length<d.highWaterMark)&&this._read(d.highWaterMark)}},r.prototype._read=function(l){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},r.prototype._destroy=function(l,i){var s=this;f.prototype._destroy.call(this,l,function(h){i(h),s.emit("close")})}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(t,b,g){(function(f,o,a){(function(){var r=t("process-nextick-args");function e(z){var E=this;this.next=null,this.entry=null,this.finish=function(){(function(O,x,y){var v=O.entry;for(O.entry=null;v;){var w=v.callback;x.pendingcb--,w(y),v=v.next}x.corkedRequestsFree.next=O})(E,z)}}b.exports=M;var n,l=!f.browser&&["v0.10","v0.9."].indexOf(f.version.slice(0,5))>-1?a:r.nextTick;M.WritableState=C;var i=Object.create(t("core-util-is"));i.inherits=t("inherits");var s={deprecate:t("util-deprecate")},h=t("./internal/streams/stream"),d=t("safe-buffer").Buffer,c=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},p,m=t("./internal/streams/destroy");function S(){}function C(z,E){n=n||t("./_stream_duplex"),z=z||{};var O=E instanceof n;this.objectMode=!!z.objectMode,O&&(this.objectMode=this.objectMode||!!z.writableObjectMode);var x=z.highWaterMark,y=z.writableHighWaterMark,v=this.objectMode?16:16384;this.highWaterMark=x||x===0?x:O&&(y||y===0)?y:v,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=z.decodeStrings===!1;this.decodeStrings=!w,this.defaultEncoding=z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_){(function(A,j){var L=A._writableState,H=L.sync,q=L.writecb;if(function(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}(L),j)(function(F,W,I,R,V){--W.pendingcb,I?(r.nextTick(V,R),r.nextTick(U,F,W),F._writableState.errorEmitted=!0,F.emit("error",R)):(V(R),F._writableState.errorEmitted=!0,F.emit("error",R),U(F,W))})(A,L,H,j,q);else{var X=B(L);X||L.corked||L.bufferProcessing||!L.bufferedRequest||N(A,L),H?l($,A,L,X,q):$(A,L,X,q)}})(E,_)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function M(z){if(n=n||t("./_stream_duplex"),!(p.call(M,this)||this instanceof n))return new M(z);this._writableState=new C(z,this),this.writable=!0,z&&(typeof z.write=="function"&&(this._write=z.write),typeof z.writev=="function"&&(this._writev=z.writev),typeof z.destroy=="function"&&(this._destroy=z.destroy),typeof z.final=="function"&&(this._final=z.final)),h.call(this)}function P(z,E,O,x,y,v,w){E.writelen=x,E.writecb=w,E.writing=!0,E.sync=!0,O?z._writev(y,E.onwrite):z._write(y,v,E.onwrite),E.sync=!1}function $(z,E,O,x){O||function(y,v){v.length===0&&v.needDrain&&(v.needDrain=!1,y.emit("drain"))}(z,E),E.pendingcb--,x(),U(z,E)}function N(z,E){E.bufferProcessing=!0;var O=E.bufferedRequest;if(z._writev&&O&&O.next){var x=E.bufferedRequestCount,y=new Array(x),v=E.corkedRequestsFree;v.entry=O;for(var w=0,_=!0;O;)y[w]=O,O.isBuf||(_=!1),O=O.next,w+=1;y.allBuffers=_,P(z,E,!0,E.length,y,"",v.finish),E.pendingcb++,E.lastBufferedRequest=null,v.next?(E.corkedRequestsFree=v.next,v.next=null):E.corkedRequestsFree=new e(E),E.bufferedRequestCount=0}else{for(;O;){var A=O.chunk,j=O.encoding,L=O.callback;if(P(z,E,!1,E.objectMode?1:A.length,A,j,L),O=O.next,E.bufferedRequestCount--,E.writing)break}O===null&&(E.lastBufferedRequest=null)}E.bufferedRequest=O,E.bufferProcessing=!1}function B(z){return z.ending&&z.length===0&&z.bufferedRequest===null&&!z.finished&&!z.writing}function D(z,E){z._final(function(O){E.pendingcb--,O&&z.emit("error",O),E.prefinished=!0,z.emit("prefinish"),U(z,E)})}function U(z,E){var O=B(E);return O&&(function(x,y){y.prefinished||y.finalCalled||(typeof x._final=="function"?(y.pendingcb++,y.finalCalled=!0,r.nextTick(D,x,y)):(y.prefinished=!0,x.emit("prefinish")))}(z,E),E.pendingcb===0&&(E.finished=!0,z.emit("finish"))),O}i.inherits(M,h),C.prototype.getBuffer=function(){for(var z=this.bufferedRequest,E=[];z;)E.push(z),z=z.next;return E},function(){try{Object.defineProperty(C.prototype,"buffer",{get:s.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"?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(z){return!!p.call(this,z)||this===M&&z&&z._writableState instanceof C}})):p=function(z){return z instanceof this},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},M.prototype.write=function(z,E,O){var x,y=this._writableState,v=!1,w=!y.objectMode&&(x=z,d.isBuffer(x)||x instanceof c);return w&&!d.isBuffer(z)&&(z=function(_){return d.from(_)}(z)),typeof E=="function"&&(O=E,E=null),w?E="buffer":E||(E=y.defaultEncoding),typeof O!="function"&&(O=S),y.ended?function(_,A){var j=new Error("write after end");_.emit("error",j),r.nextTick(A,j)}(this,O):(w||function(_,A,j,L){var H=!0,q=!1;return j===null?q=new TypeError("May not write null values to stream"):typeof j=="string"||j===void 0||A.objectMode||(q=new TypeError("Invalid non-string/buffer chunk")),q&&(_.emit("error",q),r.nextTick(L,q),H=!1),H}(this,y,z,O))&&(y.pendingcb++,v=function(_,A,j,L,H,q){if(!j){var X=function(R,V,K){return R.objectMode||R.decodeStrings===!1||typeof V!="string"||(V=d.from(V,K)),V}(A,L,H);L!==X&&(j=!0,H="buffer",L=X)}var F=A.objectMode?1:L.length;A.length+=F;var W=A.length<A.highWaterMark;if(W||(A.needDrain=!0),A.writing||A.corked){var I=A.lastBufferedRequest;A.lastBufferedRequest={chunk:L,encoding:H,isBuf:j,callback:q,next:null},I?I.next=A.lastBufferedRequest:A.bufferedRequest=A.lastBufferedRequest,A.bufferedRequestCount+=1}else P(_,A,!1,F,L,H,q);return W}(this,y,w,z,E,O)),v},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var z=this._writableState;z.corked&&(z.corked--,z.writing||z.corked||z.bufferProcessing||!z.bufferedRequest||N(this,z))},M.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(z,E,O){O(new Error("_write() is not implemented"))},M.prototype._writev=null,M.prototype.end=function(z,E,O){var x=this._writableState;typeof z=="function"?(O=z,z=null,E=null):typeof E=="function"&&(O=E,E=null),z!=null&&this.write(z,E),x.corked&&(x.corked=1,this.uncork()),x.ending||function(y,v,w){v.ending=!0,U(y,v),w&&(v.finished?r.nextTick(w):y.once("finish",w)),v.ended=!0,y.writable=!1}(this,x,O)},Object.defineProperty(M.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),M.prototype.destroy=m.destroy,M.prototype._undestroy=m.undestroy,M.prototype._destroy=function(z,E){this.end(),E(z)}}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{},t("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,inherits:440,"process-nextick-args":466,"safe-buffer":520,timers:523,"util-deprecate":524}],513:[function(t,b,g){var f=t("safe-buffer").Buffer,o=t("util");b.exports=function(){function a(){(function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(r){var e={data:r,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},a.prototype.unshift=function(r){var e={data:r,next:this.head};this.length===0&&(this.tail=e),this.head=e,++this.length},a.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(r){if(this.length===0)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=r+e.data;return n},a.prototype.concat=function(r){if(this.length===0)return f.alloc(0);for(var e,n,l,i=f.allocUnsafe(r>>>0),s=this.head,h=0;s;)e=s.data,n=i,l=h,e.copy(n,l),h+=s.data.length,s=s.next;return i},a}(),o&&o.inspect&&o.inspect.custom&&(b.exports.prototype[o.inspect.custom]=function(){var a=o.inspect({length:this.length});return this.constructor.name+" "+a})},{"safe-buffer":520,util:188}],514:[function(t,b,g){var f=t("process-nextick-args");function o(a,r){a.emit("error",r)}b.exports={destroy:function(a,r){var e=this,n=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return n||l?(r?r(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,f.nextTick(o,this,a)):f.nextTick(o,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(i){!r&&i?e._writableState?e._writableState.errorEmitted||(e._writableState.errorEmitted=!0,f.nextTick(o,e,i)):f.nextTick(o,e,i):r&&r(i)}),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)}}},{"process-nextick-args":466}],515:[function(t,b,g){arguments[4][490][0].apply(g,arguments)},{dup:490,events:422}],516:[function(t,b,g){b.exports=t("./readable").PassThrough},{"./readable":517}],517:[function(t,b,g){(g=b.exports=t("./lib/_stream_readable.js")).Stream=g,g.Readable=g,g.Writable=t("./lib/_stream_writable.js"),g.Duplex=t("./lib/_stream_duplex.js"),g.Transform=t("./lib/_stream_transform.js"),g.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(t,b,g){b.exports=t("./readable").Transform},{"./readable":517}],519:[function(t,b,g){b.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(t,b,g){arguments[4][217][0].apply(g,arguments)},{buffer:220,dup:217}],521:[function(t,b,g){arguments[4][218][0].apply(g,arguments)},{dup:218,"safe-buffer":520}],522:[function(t,b,g){arguments[4][218][0].apply(g,arguments)},{dup:218,"safe-buffer":494}],523:[function(t,b,g){(function(f,o){(function(){var a=t("process/browser.js").nextTick,r=Function.prototype.apply,e=Array.prototype.slice,n={},l=0;function i(s,h){this._id=s,this._clearFn=h}g.setTimeout=function(){return new i(r.call(setTimeout,window,arguments),clearTimeout)},g.setInterval=function(){return new i(r.call(setInterval,window,arguments),clearInterval)},g.clearTimeout=g.clearInterval=function(s){s.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},g.enroll=function(s,h){clearTimeout(s._idleTimeoutId),s._idleTimeout=h},g.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},g._unrefActive=g.active=function(s){clearTimeout(s._idleTimeoutId);var h=s._idleTimeout;h>=0&&(s._idleTimeoutId=setTimeout(function(){s._onTimeout&&s._onTimeout()},h))},g.setImmediate=typeof f=="function"?f:function(s){var h=l++,d=!(arguments.length<2)&&e.call(arguments,1);return n[h]=!0,a(function(){n[h]&&(d?s.apply(null,d):s.call(null),g.clearImmediate(h))}),h},g.clearImmediate=typeof o=="function"?o:function(s){delete n[s]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(t,b,g){(function(f){(function(){function o(a){try{if(!f.localStorage)return!1}catch{return!1}var r=f.localStorage[a];return r!=null&&String(r).toLowerCase()==="true"}b.exports=function(a,r){if(o("noDeprecation"))return a;var e=!1;return function(){if(!e){if(o("throwDeprecation"))throw new Error(r);o("traceDeprecation")?console.trace(r):console.warn(r),e=!0}return a.apply(this,arguments)}}}).call(this)}).call(this,typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(t,b,g){typeof Object.create=="function"?b.exports=function(f,o){f.super_=o,f.prototype=Object.create(o.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(f,o){f.super_=o;var a=function(){};a.prototype=o.prototype,f.prototype=new a,f.prototype.constructor=f}},{}],526:[function(t,b,g){b.exports=function(f){return f&&typeof f=="object"&&typeof f.copy=="function"&&typeof f.fill=="function"&&typeof f.readUInt8=="function"}},{}],527:[function(t,b,g){(function(f,o){(function(){var a=/%[sdj%]/g;g.format=function(y){if(!C(y)){for(var v=[],w=0;w<arguments.length;w++)v.push(n(arguments[w]));return v.join(" ")}w=1;for(var _=arguments,A=_.length,j=String(y).replace(a,function(H){if(H==="%%")return"%";if(w>=A)return H;switch(H){case"%s":return String(_[w++]);case"%d":return Number(_[w++]);case"%j":try{return JSON.stringify(_[w++])}catch{return"[Circular]"}default:return H}}),L=_[w];w<A;L=_[++w])m(L)||!$(L)?j+=" "+L:j+=" "+n(L);return j},g.deprecate=function(y,v){if(M(o.process))return function(){return g.deprecate(y,v).apply(this,arguments)};if(f.noDeprecation===!0)return y;var w=!1;return function(){if(!w){if(f.throwDeprecation)throw new Error(v);f.traceDeprecation?console.trace(v):console.error(v),w=!0}return y.apply(this,arguments)}};var r,e={};function n(y,v){var w={seen:[],stylize:i};return arguments.length>=3&&(w.depth=arguments[2]),arguments.length>=4&&(w.colors=arguments[3]),p(v)?w.showHidden=v:v&&g._extend(w,v),M(w.showHidden)&&(w.showHidden=!1),M(w.depth)&&(w.depth=2),M(w.colors)&&(w.colors=!1),M(w.customInspect)&&(w.customInspect=!0),w.colors&&(w.stylize=l),s(w,y,w.depth)}function l(y,v){var w=n.styles[v];return w?"\x1B["+n.colors[w][0]+"m"+y+"\x1B["+n.colors[w][1]+"m":y}function i(y,v){return y}function s(y,v,w){if(y.customInspect&&v&&D(v.inspect)&&v.inspect!==g.inspect&&(!v.constructor||v.constructor.prototype!==v)){var _=v.inspect(w,y);return C(_)||(_=s(y,_,w)),_}var A=function(I,R){if(M(R))return I.stylize("undefined","undefined");if(C(R)){var V="'"+JSON.stringify(R).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(V,"string")}if(S(R))return I.stylize(""+R,"number");if(p(R))return I.stylize(""+R,"boolean");if(m(R))return I.stylize("null","null")}(y,v);if(A)return A;var j=Object.keys(v),L=function(I){var R={};return I.forEach(function(V,K){R[V]=!0}),R}(j);if(y.showHidden&&(j=Object.getOwnPropertyNames(v)),B(v)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return h(v);if(j.length===0){if(D(v)){var H=v.name?": "+v.name:"";return y.stylize("[Function"+H+"]","special")}if(P(v))return y.stylize(RegExp.prototype.toString.call(v),"regexp");if(N(v))return y.stylize(Date.prototype.toString.call(v),"date");if(B(v))return h(v)}var q,X="",F=!1,W=["{","}"];return c(v)&&(F=!0,W=["[","]"]),D(v)&&(X=" [Function"+(v.name?": "+v.name:"")+"]"),P(v)&&(X=" "+RegExp.prototype.toString.call(v)),N(v)&&(X=" "+Date.prototype.toUTCString.call(v)),B(v)&&(X=" "+h(v)),j.length!==0||F&&v.length!=0?w<0?P(v)?y.stylize(RegExp.prototype.toString.call(v),"regexp"):y.stylize("[Object]","special"):(y.seen.push(v),q=F?function(I,R,V,K,Z){for(var Y=[],J=0,nt=R.length;J<nt;++J)x(R,String(J))?Y.push(d(I,R,V,K,String(J),!0)):Y.push("");return Z.forEach(function(it){it.match(/^\d+$/)||Y.push(d(I,R,V,K,it,!0))}),Y}(y,v,w,L,j):j.map(function(I){return d(y,v,w,L,I,F)}),y.seen.pop(),function(I,R,V){return I.reduce(function(K,Z){return Z.indexOf(`
|
|
39
|
+
`)>=0,K+Z.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?V[0]+(R===""?"":R+`
|
|
40
|
+
`)+" "+I.join(`,
|
|
41
|
+
`)+" "+V[1]:V[0]+R+" "+I.join(", ")+" "+V[1]}(q,X,W)):W[0]+X+W[1]}function h(y){return"["+Error.prototype.toString.call(y)+"]"}function d(y,v,w,_,A,j){var L,H,q;if((q=Object.getOwnPropertyDescriptor(v,A)||{value:v[A]}).get?H=q.set?y.stylize("[Getter/Setter]","special"):y.stylize("[Getter]","special"):q.set&&(H=y.stylize("[Setter]","special")),x(_,A)||(L="["+A+"]"),H||(y.seen.indexOf(q.value)<0?(H=m(w)?s(y,q.value,null):s(y,q.value,w-1)).indexOf(`
|
|
42
|
+
`)>-1&&(H=j?H.split(`
|
|
43
|
+
`).map(function(X){return" "+X}).join(`
|
|
44
|
+
`).substr(2):`
|
|
45
|
+
`+H.split(`
|
|
46
|
+
`).map(function(X){return" "+X}).join(`
|
|
47
|
+
`)):H=y.stylize("[Circular]","special")),M(L)){if(j&&A.match(/^\d+$/))return H;(L=JSON.stringify(""+A)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(L=L.substr(1,L.length-2),L=y.stylize(L,"name")):(L=L.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),L=y.stylize(L,"string"))}return L+": "+H}function c(y){return Array.isArray(y)}function p(y){return typeof y=="boolean"}function m(y){return y===null}function S(y){return typeof y=="number"}function C(y){return typeof y=="string"}function M(y){return y===void 0}function P(y){return $(y)&&U(y)==="[object RegExp]"}function $(y){return typeof y=="object"&&y!==null}function N(y){return $(y)&&U(y)==="[object Date]"}function B(y){return $(y)&&(U(y)==="[object Error]"||y instanceof Error)}function D(y){return typeof y=="function"}function U(y){return Object.prototype.toString.call(y)}function z(y){return y<10?"0"+y.toString(10):y.toString(10)}g.debuglog=function(y){if(M(r)&&(r=f.env.NODE_DEBUG||""),y=y.toUpperCase(),!e[y])if(new RegExp("\\b"+y+"\\b","i").test(r)){var v=f.pid;e[y]=function(){var w=g.format.apply(g,arguments);console.error("%s %d: %s",y,v,w)}}else e[y]=function(){};return e[y]},g.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},g.isArray=c,g.isBoolean=p,g.isNull=m,g.isNullOrUndefined=function(y){return y==null},g.isNumber=S,g.isString=C,g.isSymbol=function(y){return typeof y=="symbol"},g.isUndefined=M,g.isRegExp=P,g.isObject=$,g.isDate=N,g.isError=B,g.isFunction=D,g.isPrimitive=function(y){return y===null||typeof y=="boolean"||typeof y=="number"||typeof y=="string"||typeof y=="symbol"||y===void 0},g.isBuffer=t("./support/isBuffer");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var y=new Date,v=[z(y.getHours()),z(y.getMinutes()),z(y.getSeconds())].join(":");return[y.getDate(),E[y.getMonth()],v].join(" ")}function x(y,v){return Object.prototype.hasOwnProperty.call(y,v)}g.log=function(){console.log("%s - %s",O(),g.format.apply(g,arguments))},g.inherits=t("inherits"),g._extend=function(y,v){if(!v||!$(v))return y;for(var w=Object.keys(v),_=w.length;_--;)y[w[_]]=v[w[_]];return y}}).call(this)}).call(this,t("_process"),typeof oe<"u"?oe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),Object.defineProperty(g,"v1",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(g,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(g,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(g,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(g,"NIL",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(g,"version",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(g,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(g,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(g,"parse",{enumerable:!0,get:function(){return s.default}});var f=h(t("./v1.js")),o=h(t("./v3.js")),a=h(t("./v4.js")),r=h(t("./v5.js")),e=h(t("./nil.js")),n=h(t("./version.js")),l=h(t("./validate.js")),i=h(t("./stringify.js")),s=h(t("./parse.js"));function h(d){return d&&d.__esModule?d:{default:d}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(t,b,g){function f(s){return 14+(s+64>>>9<<4)+1}function o(s,h){const d=(65535&s)+(65535&h);return(s>>16)+(h>>16)+(d>>16)<<16|65535&d}function a(s,h,d,c,p,m){return o((S=o(o(h,s),o(c,m)))<<(C=p)|S>>>32-C,d);var S,C}function r(s,h,d,c,p,m,S){return a(h&d|~h&c,s,h,p,m,S)}function e(s,h,d,c,p,m,S){return a(h&c|d&~c,s,h,p,m,S)}function n(s,h,d,c,p,m,S){return a(h^d^c,s,h,p,m,S)}function l(s,h,d,c,p,m,S){return a(d^(h|~c),s,h,p,m,S)}Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var i=function(s){if(typeof s=="string"){const h=unescape(encodeURIComponent(s));s=new Uint8Array(h.length);for(let d=0;d<h.length;++d)s[d]=h.charCodeAt(d)}return function(h){const d=[],c=32*h.length;for(let p=0;p<c;p+=8){const m=h[p>>5]>>>p%32&255,S=parseInt("0123456789abcdef".charAt(m>>>4&15)+"0123456789abcdef".charAt(15&m),16);d.push(S)}return d}(function(h,d){h[d>>5]|=128<<d%32,h[f(d)-1]=d;let c=1732584193,p=-271733879,m=-1732584194,S=271733878;for(let C=0;C<h.length;C+=16){const M=c,P=p,$=m,N=S;c=r(c,p,m,S,h[C],7,-680876936),S=r(S,c,p,m,h[C+1],12,-389564586),m=r(m,S,c,p,h[C+2],17,606105819),p=r(p,m,S,c,h[C+3],22,-1044525330),c=r(c,p,m,S,h[C+4],7,-176418897),S=r(S,c,p,m,h[C+5],12,1200080426),m=r(m,S,c,p,h[C+6],17,-1473231341),p=r(p,m,S,c,h[C+7],22,-45705983),c=r(c,p,m,S,h[C+8],7,1770035416),S=r(S,c,p,m,h[C+9],12,-1958414417),m=r(m,S,c,p,h[C+10],17,-42063),p=r(p,m,S,c,h[C+11],22,-1990404162),c=r(c,p,m,S,h[C+12],7,1804603682),S=r(S,c,p,m,h[C+13],12,-40341101),m=r(m,S,c,p,h[C+14],17,-1502002290),p=r(p,m,S,c,h[C+15],22,1236535329),c=e(c,p,m,S,h[C+1],5,-165796510),S=e(S,c,p,m,h[C+6],9,-1069501632),m=e(m,S,c,p,h[C+11],14,643717713),p=e(p,m,S,c,h[C],20,-373897302),c=e(c,p,m,S,h[C+5],5,-701558691),S=e(S,c,p,m,h[C+10],9,38016083),m=e(m,S,c,p,h[C+15],14,-660478335),p=e(p,m,S,c,h[C+4],20,-405537848),c=e(c,p,m,S,h[C+9],5,568446438),S=e(S,c,p,m,h[C+14],9,-1019803690),m=e(m,S,c,p,h[C+3],14,-187363961),p=e(p,m,S,c,h[C+8],20,1163531501),c=e(c,p,m,S,h[C+13],5,-1444681467),S=e(S,c,p,m,h[C+2],9,-51403784),m=e(m,S,c,p,h[C+7],14,1735328473),p=e(p,m,S,c,h[C+12],20,-1926607734),c=n(c,p,m,S,h[C+5],4,-378558),S=n(S,c,p,m,h[C+8],11,-2022574463),m=n(m,S,c,p,h[C+11],16,1839030562),p=n(p,m,S,c,h[C+14],23,-35309556),c=n(c,p,m,S,h[C+1],4,-1530992060),S=n(S,c,p,m,h[C+4],11,1272893353),m=n(m,S,c,p,h[C+7],16,-155497632),p=n(p,m,S,c,h[C+10],23,-1094730640),c=n(c,p,m,S,h[C+13],4,681279174),S=n(S,c,p,m,h[C],11,-358537222),m=n(m,S,c,p,h[C+3],16,-722521979),p=n(p,m,S,c,h[C+6],23,76029189),c=n(c,p,m,S,h[C+9],4,-640364487),S=n(S,c,p,m,h[C+12],11,-421815835),m=n(m,S,c,p,h[C+15],16,530742520),p=n(p,m,S,c,h[C+2],23,-995338651),c=l(c,p,m,S,h[C],6,-198630844),S=l(S,c,p,m,h[C+7],10,1126891415),m=l(m,S,c,p,h[C+14],15,-1416354905),p=l(p,m,S,c,h[C+5],21,-57434055),c=l(c,p,m,S,h[C+12],6,1700485571),S=l(S,c,p,m,h[C+3],10,-1894986606),m=l(m,S,c,p,h[C+10],15,-1051523),p=l(p,m,S,c,h[C+1],21,-2054922799),c=l(c,p,m,S,h[C+8],6,1873313359),S=l(S,c,p,m,h[C+15],10,-30611744),m=l(m,S,c,p,h[C+6],15,-1560198380),p=l(p,m,S,c,h[C+13],21,1309151649),c=l(c,p,m,S,h[C+4],6,-145523070),S=l(S,c,p,m,h[C+11],10,-1120210379),m=l(m,S,c,p,h[C+2],15,718787259),p=l(p,m,S,c,h[C+9],21,-343485551),c=o(c,M),p=o(p,P),m=o(m,$),S=o(S,N)}return[c,p,m,S]}(function(h){if(h.length===0)return[];const d=8*h.length,c=new Uint32Array(f(d));for(let p=0;p<d;p+=8)c[p>>5]|=(255&h[p/8])<<p%32;return c}(s),8*s.length))};g.default=i},{}],530:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f,o=(f=t("./validate.js"))&&f.__esModule?f:{default:f},a=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n};g.default=a},{"./validate.js":541}],532:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,g.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],533:[function(t,b,g){let f;Object.defineProperty(g,"__esModule",{value:!0}),g.default=function(){if(!f&&(f=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!f))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f(o)};const o=new Uint8Array(16)},{}],534:[function(t,b,g){function f(r,e,n,l){switch(r){case 0:return e&n^~e&l;case 1:return e^n^l;case 2:return e&n^e&l^n&l;case 3:return e^n^l}}function o(r,e){return r<<e|r>>>32-e}Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var a=function(r){const e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){const h=unescape(encodeURIComponent(r));r=[];for(let d=0;d<h.length;++d)r.push(h.charCodeAt(d))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);const l=r.length/4+2,i=Math.ceil(l/16),s=new Array(i);for(let h=0;h<i;++h){const d=new Uint32Array(16);for(let c=0;c<16;++c)d[c]=r[64*h+4*c]<<24|r[64*h+4*c+1]<<16|r[64*h+4*c+2]<<8|r[64*h+4*c+3];s[h]=d}s[i-1][14]=8*(r.length-1)/Math.pow(2,32),s[i-1][14]=Math.floor(s[i-1][14]),s[i-1][15]=8*(r.length-1)&4294967295;for(let h=0;h<i;++h){const d=new Uint32Array(80);for(let M=0;M<16;++M)d[M]=s[h][M];for(let M=16;M<80;++M)d[M]=o(d[M-3]^d[M-8]^d[M-14]^d[M-16],1);let c=n[0],p=n[1],m=n[2],S=n[3],C=n[4];for(let M=0;M<80;++M){const P=Math.floor(M/20),$=o(c,5)+f(P,p,m,S)+C+e[P]+d[M]>>>0;C=S,S=m,m=o(p,30)>>>0,p=c,c=$}n[0]=n[0]+c>>>0,n[1]=n[1]+p>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+S>>>0,n[4]=n[4]+C>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]};g.default=a},{}],535:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f,o=(f=t("./validate.js"))&&f.__esModule?f:{default:f};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).substr(1));var r=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const l=(a[e[n+0]]+a[e[n+1]]+a[e[n+2]]+a[e[n+3]]+"-"+a[e[n+4]]+a[e[n+5]]+"-"+a[e[n+6]]+a[e[n+7]]+"-"+a[e[n+8]]+a[e[n+9]]+"-"+a[e[n+10]]+a[e[n+11]]+a[e[n+12]]+a[e[n+13]]+a[e[n+14]]+a[e[n+15]]).toLowerCase();if(!(0,o.default)(l))throw TypeError("Stringified UUID is invalid");return l};g.default=r},{"./validate.js":541}],536:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f=a(t("./rng.js")),o=a(t("./stringify.js"));function a(s){return s&&s.__esModule?s:{default:s}}let r,e,n=0,l=0;var i=function(s,h,d){let c=h&&d||0;const p=h||new Array(16);let m=(s=s||{}).node||r,S=s.clockseq!==void 0?s.clockseq:e;if(m==null||S==null){const B=s.random||(s.rng||f.default)();m==null&&(m=r=[1|B[0],B[1],B[2],B[3],B[4],B[5]]),S==null&&(S=e=16383&(B[6]<<8|B[7]))}let C=s.msecs!==void 0?s.msecs:Date.now(),M=s.nsecs!==void 0?s.nsecs:l+1;const P=C-n+(M-l)/1e4;if(P<0&&s.clockseq===void 0&&(S=S+1&16383),(P<0||C>n)&&s.nsecs===void 0&&(M=0),M>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");n=C,l=M,e=S,C+=122192928e5;const $=(1e4*(268435455&C)+M)%4294967296;p[c++]=$>>>24&255,p[c++]=$>>>16&255,p[c++]=$>>>8&255,p[c++]=255&$;const N=C/4294967296*1e4&268435455;p[c++]=N>>>8&255,p[c++]=255&N,p[c++]=N>>>24&15|16,p[c++]=N>>>16&255,p[c++]=S>>>8|128,p[c++]=255&S;for(let B=0;B<6;++B)p[c+B]=m[B];return h||(0,o.default)(p)};g.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f=a(t("./v35.js")),o=a(t("./md5.js"));function a(e){return e&&e.__esModule?e:{default:e}}var r=(0,f.default)("v3",48,o.default);g.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=function(n,l,i){function s(h,d,c,p){if(typeof h=="string"&&(h=function(S){S=unescape(encodeURIComponent(S));const C=[];for(let M=0;M<S.length;++M)C.push(S.charCodeAt(M));return C}(h)),typeof d=="string"&&(d=(0,o.default)(d)),d.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let m=new Uint8Array(16+h.length);if(m.set(d),m.set(h,d.length),m=i(m),m[6]=15&m[6]|l,m[8]=63&m[8]|128,c){p=p||0;for(let S=0;S<16;++S)c[p+S]=m[S];return c}return(0,f.default)(m)}try{s.name=n}catch{}return s.DNS=r,s.URL=e,s},g.URL=g.DNS=void 0;var f=a(t("./stringify.js")),o=a(t("./parse.js"));function a(n){return n&&n.__esModule?n:{default:n}}const r="6ba7b810-9dad-11d1-80b4-00c04fd430c8";g.DNS=r;const e="6ba7b811-9dad-11d1-80b4-00c04fd430c8";g.URL=e},{"./parse.js":531,"./stringify.js":535}],539:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f=a(t("./rng.js")),o=a(t("./stringify.js"));function a(e){return e&&e.__esModule?e:{default:e}}var r=function(e,n,l){const i=(e=e||{}).random||(e.rng||f.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){l=l||0;for(let s=0;s<16;++s)n[l+s]=i[s];return n}return(0,o.default)(i)};g.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f=a(t("./v35.js")),o=a(t("./sha1.js"));function a(e){return e&&e.__esModule?e:{default:e}}var r=(0,f.default)("v5",80,o.default);g.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f,o=(f=t("./regex.js"))&&f.__esModule?f:{default:f},a=function(r){return typeof r=="string"&&o.default.test(r)};g.default=a},{"./regex.js":532}],542:[function(t,b,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var f,o=(f=t("./validate.js"))&&f.__esModule?f:{default:f},a=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)};g.default=a},{"./validate.js":541}],543:[function(t,b,g){/**
|
|
48
|
+
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
49
|
+
*
|
|
50
|
+
* @author Louis-Dominique Dubeau
|
|
51
|
+
* @license MIT
|
|
52
|
+
* @copyright Louis-Dominique Dubeau
|
|
53
|
+
*/Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR=`
|
|
54
|
+
\r --�𐀀-`,g.S=` \r
|
|
55
|
+
`,g.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.NAME_CHAR+"]+$","u");function f(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=f,g.isNameChar=function(o){return f(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],544:[function(t,b,g){/**
|
|
56
|
+
* Character classes and associated utilities for the 2nd edition of XML 1.1.
|
|
57
|
+
*
|
|
58
|
+
* @author Louis-Dominique Dubeau
|
|
59
|
+
* @license MIT
|
|
60
|
+
* @copyright Louis-Dominique Dubeau
|
|
61
|
+
*/Object.defineProperty(g,"__esModule",{value:!0}),g.CHAR="--�𐀀-",g.RESTRICTED_CHAR="-\b\v\f---",g.S=` \r
|
|
62
|
+
`,g.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",g.NAME_CHAR="-"+g.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",g.CHAR_RE=new RegExp("^["+g.CHAR+"]$","u"),g.RESTRICTED_CHAR_RE=new RegExp("^["+g.RESTRICTED_CHAR+"]$","u"),g.S_RE=new RegExp("^["+g.S+"]+$","u"),g.NAME_START_CHAR_RE=new RegExp("^["+g.NAME_START_CHAR+"]$","u"),g.NAME_CHAR_RE=new RegExp("^["+g.NAME_CHAR+"]$","u"),g.NAME_RE=new RegExp("^["+g.NAME_START_CHAR+"]["+g.NAME_CHAR+"]*$","u"),g.NMTOKEN_RE=new RegExp("^["+g.NAME_CHAR+"]+$","u");function f(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}g.S_LIST=[32,10,13,9],g.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},g.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},g.isS=function(o){return o===32||o===10||o===13||o===9},g.isNameStartChar=f,g.isNameChar=function(o){return f(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(t,b,g){/**
|
|
63
|
+
* Character class utilities for XML NS 1.0 edition 3.
|
|
64
|
+
*
|
|
65
|
+
* @author Louis-Dominique Dubeau
|
|
66
|
+
* @license MIT
|
|
67
|
+
* @copyright Louis-Dominique Dubeau
|
|
68
|
+
*/function f(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(g,"__esModule",{value:!0}),g.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�𐀀-",g.NC_NAME_CHAR="-"+g.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",g.NC_NAME_START_CHAR_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]$","u"),g.NC_NAME_CHAR_RE=new RegExp("^["+g.NC_NAME_CHAR+"]$","u"),g.NC_NAME_RE=new RegExp("^["+g.NC_NAME_START_CHAR+"]["+g.NC_NAME_CHAR+"]*$","u"),g.isNCNameStartChar=f,g.isNCNameChar=function(o){return f(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)})})(Il);var n2=Il.exports;const i2=sl(n2);var jl={exports:{}};(function(u,k){(function(t,b){b()})(oe,function(){function t(e,n){return typeof n>"u"?n={autoBom:!1}:typeof n!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),n={autoBom:!n}),n.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function b(e,n,l){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){r(i.response,n,l)},i.onerror=function(){console.error("could not download file")},i.send()}function g(e){var n=new XMLHttpRequest;n.open("HEAD",e,!1);try{n.send()}catch{}return 200<=n.status&&299>=n.status}function f(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof oe=="object"&&oe.global===oe?oe:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,n,l){var i=o.URL||o.webkitURL,s=document.createElement("a");n=n||e.name||"download",s.download=n,s.rel="noopener",typeof e=="string"?(s.href=e,s.origin===location.origin?f(s):g(s.href)?b(e,n,l):f(s,s.target="_blank")):(s.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(s.href)},4e4),setTimeout(function(){f(s)},0))}:"msSaveOrOpenBlob"in navigator?function(e,n,l){if(n=n||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(t(e,l),n);else if(g(e))b(e,n,l);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){f(i)})}}:function(e,n,l,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return b(e,n,l);var s=e.type==="application/octet-stream",h=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||s&&h||a)&&typeof FileReader<"u"){var c=new FileReader;c.onloadend=function(){var S=c.result;S=d?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=S:location=S,i=null},c.readAsDataURL(e)}else{var p=o.URL||o.webkitURL,m=p.createObjectURL(e);i?i.location=m:location.href=m,i=null,setTimeout(function(){p.revokeObjectURL(m)},4e4)}});o.saveAs=r.saveAs=r,u.exports=r})})(jl);var s2=jl.exports;function o2(){var u,k;return window.__POWERED_BY_WUJIE__?(u=window.parent["@yzsf2e/render-core"])==null?void 0:u.exporting:(k=window["@yzsf2e/render-core"])==null?void 0:k.exporting}function mi(u){window.__POWERED_BY_WUJIE__?window.parent["@yzsf2e/render-core"]?window.parent["@yzsf2e/render-core"].exporting=u:window.parent["@yzsf2e/render-core"]={exporting:u}:window["@yzsf2e/render-core"]?window["@yzsf2e/render-core"].exporting=u:window["@yzsf2e/render-core"]={exporting:u}}function a2(u){const k=[];function t(b){for(const g of b)g.children&&g.children.length?t(g.children):g.key&&k.push(g.key)}return t(u),k}async function l2(u){try{const k=await fetch(u);return k.ok?await k.arrayBuffer():null}catch(k){return console.error("Failed to fetch image:",u,k),null}}function c2(u){const k=u.toLowerCase();return k.includes(".png")?"png":k.includes(".jpg")||k.includes(".jpeg")?"jpeg":k.includes(".gif")?"gif":"png"}function u2(u){return new Promise((k,t)=>{const b=new Blob([u]),g=URL.createObjectURL(b),f=new Image;f.onload=()=>{URL.revokeObjectURL(g),k({width:f.width,height:f.height})},f.onerror=()=>{URL.revokeObjectURL(g),t(new Error("Failed to load image"))},f.src=g})}async function Pl(u,k,t="表格"){const b=new i2.Workbook,g=b.addWorksheet("Sheet1");function f(i){return i.reduce((s,h)=>{const d=h.children?1+f(h.children):1;return Math.max(s,d)},1)}const o=f(u),a=[];function r(i){for(const s of i)s.children?r(s.children):a.push(s)}r(u),g.columns=a.map(i=>({header:i.title,key:i.key,width:i.width||15}));let e=1;function n(i,s){for(const h of i){const d=e;if(h.children&&h.children.length){n(h.children,s+1);const p=e-1;g.mergeCells(s,d,s,p);const m=g.getCell(s,d);m.value=h.title,m.font={bold:!0},m.alignment={horizontal:"center",vertical:"middle"},m.fill={type:"pattern",pattern:"solid",fgColor:{argb:"DDEEFF"}}}else{g.mergeCells(s,d,o,d);const p=g.getCell(s,d);p.value=h.title,p.font={bold:!0},p.alignment={horizontal:"center",vertical:"middle"},p.fill={type:"pattern",pattern:"solid",fgColor:{argb:"DDEEFF"}},e++}}}n(u,1);for(let i=0;i<k.length;i++){const s=k[i],h=a.map(c=>c.exportType==="image"?"":s[c.key]);g.addRow(h);const d=o+i+1;for(let c=0;c<a.length;c++){const p=a[c];if(p.exportType==="image"&&s[p.key]){const m=s[p.key],S=m?m.split(","):[];let C=0;for(let M=0;M<S.length;M++){const P=S[M];if(!P)continue;const $=await l2(P);if($)try{const N=await u2($),B=N.width/N.height;if(!B||!isFinite(B)||B<=0){console.error("Invalid aspect ratio:",B);continue}const D=b.addImage({buffer:$,extension:c2(P)}),U=50,z=U*B,E=C/64;g.addImage(D,{tl:{col:c+E,row:d-1},ext:{width:z,height:U},editAs:"oneCell"}),C+=z+5}catch(N){console.error("Failed to get image dimensions:",N)}}if(S.length>0){const M=g.getRow(d);(!M.height||M.height<40)&&(M.height=40)}}}}const l=await b.xlsx.writeBuffer();s2.saveAs(new Blob([l]),t+".xlsx")}const Bl={ASC:"升序",DESC:"降序"},f2=T.defineComponent({name:"PageRendererTablePage",components:{Conditions:Dy,Operations:r2,SummaryBar:Fy,TableView:Ny,ColumnSettingModal:Hy},props:{page:{type:Object,default:()=>{}},config:{type:Object,default:()=>{}}},setup(u,{expose:k}){const{t}=Ue(),b=fi(),g=hi(),{page:f}=T.toRefs(u),{apiConfig:o,buttons:a,data:r,page_size_options:e,sort:n}=f.value,l=T.ref(f.value.total),i=T.ref(o==null?void 0:o.summary),s=T.ref(r||[]),h=T.ref(n),d=T.ref(!1),c=T.ref(!1),p=T.ref(!1),m=T.ref([]),S=T.ref([]),C=T.ref(),M=T.ref(),P=T.ref(),$=T.ref(0),N={导入:M,导出:C},B=T.computed(()=>({COLUMN_SETTING:f.value.fieldShowConfigList,FILTER_SETTING:f.value.fieldFilterConfigList,SORT_SETTING:f.value.fieldSortConfigList})),D=T.ref(),U=T.ref(),z=T.ref(),E=T.inject("transformData",(mt,It)=>mt),O=T.inject("reloadPage",()=>{}),{patchEnumerations:x,patchStaticEnumerations:y}=li(),v=T.ref(null),w=T.ref(null),_=T.ref(null),A=Fs(Cl,{}),j=()=>{try{const mt=localStorage.getItem(xs);return mt?JSON.parse(mt):{}}catch{return{}}},L=T.ref(f.value.columns||[]),H=T.reactive({type:"COLUMN_SETTING",title:"",columns:[],visible:!1}),q=T.computed(()=>f.value.fieldShowConfigList?f.value.fieldShowConfigList.map(mt=>mt.columnKey):[]),X=T.ref(),F=T.computed(()=>{if(o)return f.value.rowKey||console.warn("【TablePage】rowKey 列表唯一键没有定义"),f.value.rowKey;{const mt=Xo(L.value,{isUniqueKey:!0});return mt.length===0?console.warn("【TablePage】isUniqueKey 请设置唯一键"):mt.length>1&&console.warn("【TablePage】isUniqueKey 唯一键应该只有一个"),mt[0].columnKey}});(()=>{if(o)U.value=ur(o.list.url,o.list.method||"post"),z.value=ur(o.list.url,o.list.method||"post",{timeout:2e4}),D.value=bl(U.value,{manual:!0,loadingKeep:100,onBefore(mt){d.value=!0,mt.forEach(It=>it(It,f.value.name))},onSuccess:async mt=>{try{s.value=await E(mt,u.page.name,s),l.value.count=jr(mt,o.list.totalKey)}finally{d.value=!1}},onError(){d.value=!1}});else{const mt=ur(`/duckbill-data-query-server/table/search/${b.meta.category}`);D.value=bl(mt,{manual:!0,loadingKeep:100,pagination:{totalKey:"data.page.total.count"},onBefore(It){It.forEach(xt=>it(xt,f.value.name))},onSuccess(It){l.value=It.data.page.total,s.value=It.data.page.data,y(It.data.page.enumerations)}}),P.value=ur(`/duckbill-data-query-server/data/export/${b.meta.category}`,"post",{responseType:"blob"})}})(),T.watchEffect(()=>{a.forEach(mt=>{const It=N[mt.children];It?It.value=mt:mt.columnAction?S.value.push(mt):m.value.push(mt)})});const{initFormState:I,trimFormStateFields:R}=kn(),V=I(f.value.conditions,f.value.defaultQuery,f.value.name),K=T.ref(e?e[0].value:Sl[0].value),Z=T.ref(1),{selectedRows:Y,selectedRowKeys:J}=xn();Y[u.page.name]&&console.warn(`【@yzsf2e/render-core】请检查页面名 ${u.page.name} 是否重复!`);const nt=()=>{Y[u.page.name]=[],J[u.page.name]=[]};s.value&&nt();const it=T.inject("paramsGuard",mt=>mt),G=[...f.value.conditions.map(mt=>mt.fieldName),...Object.keys(f.value.defaultQuery)],tt=(mt,It)=>!Vn(mt)&&mt!==""&&G.includes(It),et=()=>{if(o){R(f.value.name);const mt=wl({conditions:Br({...T.toRaw(V)},tt),pager:{pageNo:Z.value,pageSize:K.value},sort:h.value,listApiConfig:o.list});D.value.run(mt)}else{const{category:mt,tab:It}=b.meta;D.value.run({category:mt,tab:It,pageNumber:Z.value,pageSize:K.value,fetchMode:"BODY",sorts:{},filters:Br({...T.toRaw(V)},tt)})}nt(),kt()};function ot(mt){var Dt;let It=$b(`${u.page.name}-table`);((Dt=mt[0])==null?void 0:Dt.columnKey)==="action"&&(mt=mt.slice(1),It=It.slice(1));function xt(jt,Pt){const Zt=[];for(const $t of jt)if($t.show!==!1)if($t.children&&$t.children.length)Zt.push({title:t($t.title)||$t.title,key:null,children:xt($t.children,Pt)});else{const Lt=Math.max(100,It[Pt.value]||$t.width||100)/8;Zt.push({title:t($t.title)||$t.title,key:$t.columnKey,width:Lt,exportType:$t.exportType}),Pt.value+=1}return Zt}return xt(mt,{value:0})}function st({pager:mt}={}){let It=wl({conditions:Br({...T.toRaw(V)},tt),pager:mt||{pageNo:Z.value,pageSize:K.value},sort:h.value,listApiConfig:o.list});return it(It,f.value.name),z.value(It)}function lt(mt,It){const xt=[];return mt.forEach(Dt=>{const jt=It.find(Pt=>Pt.columnKey===Dt.key);jt&&jt.cellRenderType==="HTML"&&xt.push(Dt.key)}),xt}function ft(mt,It){return mt.forEach(xt=>{It.forEach(Dt=>{xt[Dt]=Ss(xt[Dt])})}),mt}let pt=null;async function yt(){var mt,It;if(o2()){Ft.message.warn("已有页面正在导出,请稍等!");return}if((mt=o==null?void 0:o.frontendExport)!=null&&mt.onExport){try{mi(!0),$.value=1,await o.frontendExport.onExport($)}catch(xt){console.error("[@yzsf2e/render-core]自定义前端导出失败:",xt)}finally{$.value=0,mi(!1)}return}try{mi(!0),await((It=_.value)==null?void 0:It.validate()),$.value=1,pt&&clearTimeout(pt);const xt=ot(X.value);let Dt=await Lb(st,E,u.page.name,o.list.totalKey,$);Dt=await v.value.patchDataCodeToText(Dt),Dt=Dt.map(Pt=>{const Zt={};return a2(xt).forEach(Lt=>{const ut=Pt.__$$map[Lt]||Pt[Lt];Zt[Lt]=Bb(ut)}),Zt}),Dt=ft(Dt,lt(xt,X.value)),console.warn("[@yzsf2e/render-core]导出表头:",xt),console.warn("[@yzsf2e/render-core]导出数据:",Dt),$.value=100,pt=setTimeout(()=>{$.value=0},1e3);const jt=`${u.page.title}-${ds().format("YYYY-MM-DD-HH_mm_ss")}`;Pl(xt,Dt,jt)}catch(xt){$.value=0,Ft.message.error("导出失败!"),console.error("导出失败:",xt)}finally{mi(!1)}}const Ot=async mt=>{let It;if(mt==="SELECTED"){if(J[u.page.name]&&J[u.page.name].length===0){Ft.message.warn("至少选中一条数据!");return}It=J[u.page.name]}const{category:xt,tab:Dt}=b.meta,jt=await P.value({category:xt,tab:Dt,fetchMode:"BODY",sorts:h.value,filters:Br({...T.toRaw(V)},tt),ids:It});if(!jt)return;const Pt=/\{\{(.+?)\}\}/g;let Zt=`${u.page.name}-{{Date}}.xlsx`,$t=null;for(;($t=Pt.exec(Zt))!==null;)$t[1]==="Date"&&(Zt=Zt.replace($t[0],ds().format("YYYY-MM-DD")));const Lt=document.createElement("a"),ut=window.URL.createObjectURL(new Blob([jt]));Lt.href=ut,Lt.download=Zt,document.body.appendChild(Lt),Lt.click(),document.body.removeChild(Lt),window.URL.revokeObjectURL(ut)},At=()=>{var mt;return(mt=v.value)==null?void 0:mt.toggleTableHeight()},kt=()=>{var mt;return(mt=w.value)==null?void 0:mt.fetchSummary()},Wt=T.inject("emitHandler",()=>{});T.provide("pageName",u.page.name);const Ht=(mt,It,xt,Dt)=>{const jt=xt||(Y[u.page.name]?T.toRaw(Y[u.page.name]):[]);Wt(mt,jt,Dt)},Vt=async()=>{H.visible=!1,window.__POWERED_BY_WUJIE__&&setTimeout(()=>{O()},500)},Kt=T.computed(()=>L.value.map(mt=>({...mt,show:o?!0:q.value.includes(mt.columnKey)})));T.watchEffect(()=>{const mt=Kt.value.sort((jt,Pt)=>{const Zt=q.value.indexOf(jt.columnKey),$t=q.value.indexOf(Pt.columnKey);return Zt-$t});S.value.length>0&&mt.unshift({title:"操作",align:"center",columnKey:"action",children:S.value.map(jt=>({text:jt.children,action:jt.action})),width:S.value.reduce((jt,Pt)=>jt+Number(Pt.columnActionWidth||50),0)});let It=mt;const xt=j()[u.page.name];if(xt){const jt=Pt=>Pt.map(Zt=>{const $t={...Zt};return xt[$t.columnKey]&&($t.width=xt[$t.columnKey]),$t.children&&Array.isArray($t.children)&&($t.children=jt($t.children)),$t});It=jt(It)}const Dt=A.value[u.page.name];if(Dt){const jt=cn(T.toRaw(It));It=[...Dt.filter(Zt=>jt.find($t=>$t.columnKey===Zt.columnKey)).map(Zt=>{const $t=jt.findIndex(ut=>ut.columnKey===Zt.columnKey);return{...jt.splice($t,1)[0],show:Zt.show}}),...jt]}X.value=It});const{getEnumData:Nt}=mr();T.onMounted(async()=>{y(u.page.enumerations),await x(u.page.enumapi,Nt,g),p.value=!0,T.nextTick().then(()=>{kt()})}),o?T.watch([Z,K],()=>{et()}):T.watch([Z,K,h],([mt,It,xt])=>{const{category:Dt,tab:jt}=b.meta;D.value.run({category:Dt,tab:jt,pageNumber:mt,pageSize:It,fetchMode:"BODY",sorts:xt.value,filters:Br({...T.toRaw(V)},tt)})});const _t=mt=>{if(o){H.columns=[...f.value.columns],H.type=mt,H.title=Es[mt],H.visible=!0;return}const It=f.value.fieldList.reduce((xt,Dt)=>{const jt={COLUMN_SETTING:!1,SORT_SETTING:!Dt.sortable,FILTER_SETTING:!Dt.filterable};if(mt==="SORT_SETTING"){const Pt=B.value[mt].find(Zt=>Zt.columnKey===Dt.columnKey);Object.keys(Bl).forEach(Zt=>{xt.push({...Dt,title:`${Dt.title}_${Bl[Zt]}`,columnKey:`${Dt.columnKey}@${Zt}`,show:Pt?Pt.sort===Zt:!1,disabled:jt[mt]})})}else xt.push({...Dt,show:!!B.value[mt].find(Pt=>Pt.columnKey===Dt.columnKey),disabled:jt[mt]});return xt},[]);H.columns=Dm(It,["disabled"],["asc"]),H.type=mt,H.title=Es[mt],H.visible=!0},Rt=()=>{var mt,It;(mt=_.value)==null||mt.resetFields(),(It=v.value)==null||It.clearSort()},zt=()=>{var mt;(mt=v.value)==null||mt.clearSelect()};function Bt(){return V}return k({run:et,resetSearch:Rt,clearSelect:zt,getSearchFormState:Bt}),{apiConfig:o,tableData:s,rowKey:F,paginationQuery:D,loaded:p,buttonsConfig:m,exportConfig:C,importConfig:M,summary:i,current:Z,pageSize:K,pageTotal:l,sort:h,tableView:v,conditions:_,summaryBar:w,sortedColumns:X,columnSettingState:H,columnSettingVisible:c,paginationQueryLoading:d,exportProgress:$,handleSearch:et,listSearchApi:st,handleFrontendExport:yt,handleExport:Ot,resetSearch:Rt,handleEmitAction:Ht,columnSettingChange:Vt,resizeTableHeight:At,handleCustomizeSetting:_t}}});function h2(u,k,t,b,g,f){var l,i,s,h;const o=T.resolveComponent("Conditions"),a=T.resolveComponent("Operations"),r=T.resolveComponent("SummaryBar"),e=T.resolveComponent("TableView"),n=T.resolveComponent("ColumnSettingModal");return u.loaded?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(o,{ref:"conditions",config:u.page.conditions,"default-query":u.page.defaultQuery,searching:u.paginationQuery.loading,"immediate-query":u.apiConfig?((l=u.apiConfig.list)==null?void 0:l.autoRequest)!==!1:!1,current:u.current,"onUpdate:current":k[0]||(k[0]=d=>u.current=d),onSearch:u.handleSearch,onResetSearch:u.resetSearch,onChangeExpand:u.resizeTableHeight},null,8,["config","default-query","searching","immediate-query","current","onSearch","onResetSearch","onChangeExpand"]),T.createVNode(a,{total:(i=u.pageTotal)==null?void 0:i.count,config:u.buttonsConfig,"has-api-config":!!u.apiConfig,"frontend-export-config":(s=u.apiConfig)==null?void 0:s.frontendExport,"export-config":u.apiConfig?u.apiConfig.export:u.exportConfig,"import-config":u.apiConfig?u.apiConfig.import:u.importConfig,"page-size-options":u.page.page_size_options,"export-progress":u.exportProgress,"handle-export":u.handleExport,"handle-frontend-export":u.handleFrontendExport,pageSize:u.pageSize,"onUpdate:pageSize":k[1]||(k[1]=d=>u.pageSize=d),current:u.current,"onUpdate:current":k[2]||(k[2]=d=>u.current=d),onRefresh:u.handleSearch,onButtonClick:u.handleEmitAction,onCustomizeSetting:u.handleCustomizeSetting},null,8,["total","config","has-api-config","frontend-export-config","export-config","import-config","page-size-options","export-progress","handle-export","handle-frontend-export","pageSize","current","onRefresh","onButtonClick","onCustomizeSetting"]),u.summary?(T.openBlock(),T.createBlock(r,{key:0,ref:"summaryBar",config:u.summary},null,8,["config"])):T.renderSlot(u.$slots,"summaryBar",{key:1}),u.page.columns?(T.openBlock(),T.createBlock(e,{key:2,ref:"tableView",id:`${u.page.name}-table`,selectable:u.page.selectable,"table-props":(h=u.config)==null?void 0:h.table,config:u.sortedColumns,conditions:u.page.conditions,"row-key":u.rowKey,draggable:u.page.draggable,"row-click-action":u.page.rowClickAction,"row-dblclick-action":u.page.rowDblclickAction,data:u.tableData,"has-api-config":!!u.apiConfig,loading:u.paginationQueryLoading,total:u.pageTotal,"default-sort":u.page.sort,current:u.current,"onUpdate:current":k[3]||(k[3]=d=>u.current=d),sort:u.sort,"onUpdate:sort":k[4]||(k[4]=d=>u.sort=d),onSearch:u.handleSearch,onLinkClick:u.handleEmitAction},null,8,["id","selectable","table-props","config","conditions","row-key","draggable","row-click-action","row-dblclick-action","data","has-api-config","loading","total","default-sort","current","sort","onSearch","onLinkClick"])):T.createCommentVNode("",!0),T.createVNode(n,{visible:u.columnSettingState.visible,"onUpdate:visible":k[5]||(k[5]=d=>u.columnSettingState.visible=d),"has-api-config":!!u.apiConfig,type:u.columnSettingState.type,title:u.columnSettingState.title,columns:u.columnSettingState.columns,onChange:u.columnSettingChange},null,8,["visible","has-api-config","type","title","columns","onChange"])],64)):T.createCommentVNode("",!0)}const Dl=$e(f2,[["render",h2]]),d2=T.defineComponent({name:"PageRendererTabsPage",components:{TablePage:Dl},props:{tabClickAction:{type:String,default:""},pages:{type:Array,default:()=>[]},activePageName:{type:String,default:""},customEvent:{type:Object}},emits:["update:activePageName"],setup(u,{expose:k,emit:t}){const{pages:b}=T.toRefs(u),g=T.inject("actionGuard",null);T.onMounted(()=>{f(b.value[0].name)});const f=h=>{t("update:activePageName",h),e(h,u.pages.findIndex(d=>d.name==h))},o={},a=T.ref({}),r=(h,d)=>{h!==null&&(a.value[d]=h,o[d]=()=>a.value[d].run())},e=(h,d)=>{var p;const c=(p=u.customEvent)==null?void 0:p[u.tabClickAction];if(c)return c({name:h,index:d});if(g)return g(u.tabClickAction,{name:h,index:d});u.tabClickAction&&Ft.message.warn("没有监听 tab 切换的事件处理函数")},n=h=>{a.value[h]&&o[h]()},l=h=>{a.value[h]&&a.value[h].resetSearch()},i=h=>{a.value[h]&&a.value[h].clearSelect()};function s(h){a.value[h]&&a.value[h].getSearchFormState()}return k({run:n,resetSearch:l,clearSelect:i,getSearchFormState:s}),{activeChange:f,setItemRef:r}}});function p2(u,k,t,b,g,f){const o=T.resolveComponent("TablePage"),a=T.resolveComponent("a-tab-pane"),r=T.resolveComponent("a-tabs");return T.openBlock(),T.createBlock(r,{type:"card",size:"small",class:"tabs-page-renderer","active-key":u.activePageName,"tab-bar-gutter":0,onChange:u.activeChange},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(u.pages,e=>(T.openBlock(),T.createBlock(a,{key:e.name,tab:e.title},{default:T.withCtx(()=>[T.createVNode(o,{page:e,ref_for:!0,ref:n=>u.setItemRef(n,e.name)},null,8,["page"])]),_:2},1032,["tab"]))),128))]),_:1},8,["active-key","onChange"])}const m2=$e(d2,[["render",p2]]),g2=u=>({mounted(k,t){var n,l,i;const g=(n=u.currentRoute.value.meta)==null?void 0:n.permissions,{value:f,modifiers:o}=t,a=(l=T.toRaw(f))==null?void 0:l.length;if(!a)return;let r=!1,e=0;g.forEach(s=>{f.includes(s)&&e++}),o.all?r=e===a:r=e>0,r||(i=k.parentNode)==null||i.removeChild(k)}}),b2=()=>T.getCurrentInstance().appContext,y2=()=>{const u=b2(),k=Vl.useRouter();u.directives.permission||u.app.directive("permission",g2(k))},Fl=u=>{var t,b;u=T.isRef(u)?u.value:u;function k(g){var a;const{t:f}=As.useI18n();function o(r){r.forEach(e=>{var n;e.title=f(e.title),e.columnKey==="action"?(n=e.children)==null||n.forEach(l=>{l.text=f(l.text)}):e.children&&e.children.length>0&&o(e.children)})}g.title=f(g.title||"没有配置页面title"),(a=g.buttons)==null||a.forEach(r=>{var e;r.children=f(r.children),(e=r.sublist)==null||e.forEach(n=>{n.children=f(n.children)})}),(g.conditions||[]).forEach((r,e)=>{var n,l,i,s,h;if(r.label=f(r.label),(n=r.otherProps)!=null&&n.placeholder)if(typeof((l=r.otherProps)==null?void 0:l.placeholder)=="string")r.otherProps.placeholder=f((i=r.otherProps)==null?void 0:i.placeholder);else if(Array.isArray((s=r.otherProps)==null?void 0:s.placeholder))r.otherProps.placeholder=r.otherProps.placeholder.map(d=>f(d));else try{r.otherProps.placeholder=JSON.stringify((h=r.otherProps)==null?void 0:h.placeholder)}catch{r.otherProps.placeholder=""}}),o(g.columns)}try{(t=u==null?void 0:u.page)!=null&&t.i18n&&k(u.page),(b=u==null?void 0:u.pages)==null||b.forEach(g=>{g!=null&&g.i18n&&k(g)})}catch{return u}return u},v2=T.defineComponent({name:"TableCellTrueOrFalse",props:{text:{type:String,default:""},row:{type:Object,default:()=>{}},index:{type:Number,default:null},column:{type:Object,default:()=>{}}}}),w2={style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},_2={key:0},x2=[T.createElementVNode("svg",{t:"1748226272776",class:"icon",viewBox:"0 0 1026 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3786",width:"18",height:"18"},[T.createElementVNode("path",{d:"M79.288 400c19.2 0 38.4 9.6 54.4 25.6l240 249.6c12.8 16 19.2 16 35.2 0 147.2-153.6 294.4-304 441.6-457.6 16-16 32-35.2 48-51.2 28.8-28.8 70.4-32 99.2-6.4 32 25.6 38.4 73.6 9.6 105.6-32 38.4-67.2 73.6-102.4 108.8-150.4 156.8-300.8 313.6-454.4 470.4-38.4 38.4-80 41.6-115.2 6.4-105.6-108.8-211.2-217.6-313.6-326.4-22.4-25.6-28.8-54.4-12.8-83.2 12.8-25.6 35.2-41.6 70.4-41.6z",fill:"#48cbd7","p-id":"3787"})],-1)];function S2(u,k,t,b,g,f){return T.openBlock(),T.createElementBlock("div",w2,[u.row.__$$map[u.column.dataIndex]==="是"?(T.openBlock(),T.createElementBlock("span",_2,x2)):T.createCommentVNode("",!0)])}const k2=$e(v2,[["render",S2]]),[C2]=je("page-renderer"),E2=T.defineComponent({name:C2,components:{TablePage:Dl,TabsPage:m2,FormModal:$s,PreviewMediaModal:hs},props:{options:{type:Object,default:null},config:{type:Object,default:()=>({})},form:{type:Object,default:()=>{}},tableCellSlots:{type:Object,default:()=>{}},rowSelection:{type:Object,default:()=>({})},customEvent:{type:Object}},emits:["table-drop-change","search-form-change"],setup(u,{emit:k,expose:t}){var O;const b=fi(),g=T.ref(null),f=T.ref(null),o=T.ref(""),a=T.ref(null),r=T.ref(null),e=T.ref([]),n=T.ref(),l={title:"",component:null},{selectedErrorRowKeys:i}=xn(),s=T.shallowRef(l),h=T.ref(!!u.options),d={YzsTrueOrFalse:{component:k2}},c=T.computed(()=>({...d,...u.tableCellSlots||{}})),p=T.ref(Fl(u.options));T.watch(()=>u.options,x=>{p.value=Fl(x)}),T.watch(()=>p.value,x=>{h.value=!!x});const m=T.ref(!1),S=T.inject("actionGuard",null);hi().interceptors.response.use(x=>{var y,v;if(x.data&&((y=x.data)==null?void 0:y.type)==="string"&&typeof((v=x.data)==null?void 0:v.value)=="string")try{x.data=JSON.parse(x.data.value)}catch{console.warn("response.data is not a json string")}return x}),T.onMounted(()=>{$()});const M=ur(`/duckbill-data-query-server/table/search/${b.meta.category}`),P=()=>{h.value=!1,T.nextTick(()=>{h.value=!0})},$=async()=>{const{category:x,tab:y}=b.meta;if(!u.options&&x&&y){m.value=!0;try{const v=await M({category:x,tab:y,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});p.value=v.data}catch{Ft.message.error("页面配置请求失败!")}finally{m.value=!1}}},N=(x,y)=>{var v;(v=r.value)==null||v.open(x,y)};T.provide("tableDropChange",x=>k("table-drop-change",x)),T.provide("searchFormChange",x=>k("search-form-change",x)),T.provide("materials",(O=u.config)==null?void 0:O.materials),T.provide("previewMediaModalOpen",N),T.provide("tableCellSlots",c),T.provide("rowSelection",u.rowSelection||{}),T.provide("reloadPage",P),T.provide("emitHandler",(x,y,v)=>{var _,A,j;const w=cn(y);if(u.form===void 0||!u.form[x]){const L=(_=u.customEvent)==null?void 0:_[x];if(!L)return S?S(x,w):Ft.message.warn("没有找到自定义事件处理函数"),v==null?void 0:v();try{L(w,H=>{var X;const q=(X=p.value.page)==null?void 0:X.rowKey;q&&H.forEach(F=>{var W;F[q]&&i[(W=p.value.page)==null?void 0:W.name].push(F[q])})}).finally(()=>{setTimeout(()=>{v==null||v()},100)})}catch(H){((A=H.message)==null?void 0:A.indexOf("finally"))>-1?Ft.message.warn("自定义事件处理函数必须返回一个Promise"):Ft.message.warn(H.message)}}else(((j=u.customEvent)==null?void 0:j[x])||(()=>Promise.resolve()))(w,H=>{var X;const q=(X=p.value.page)==null?void 0:X.rowKey;q&&H.forEach(F=>{var W;F[q]&&i[(W=p.value.page)==null?void 0:W.name].push(F[q])})}).then(H=>{var q;n.value=H,s.value=u.form[x],e.value=s.value.needSelectRows===!1?[]:w,(q=a.value)==null||q.openModal()}).finally(()=>{setTimeout(()=>{v==null||v()},100)})}),y2();const B=()=>{var x,y;return{basic:(x=g.value)==null?void 0:x.run(),tabs:(y=f.value)==null?void 0:y.run(o.value)}[p.value.type]},D=()=>{var x,y;return{basic:(x=g.value)==null?void 0:x.resetSearch(),tabs:(y=f.value)==null?void 0:y.resetSearch(o.value)}[p.value.type]},U=()=>{var x,y;return{basic:(x=g.value)==null?void 0:x.clearSelect(),tabs:(y=f.value)==null?void 0:y.clearSelect(o.value)}[p.value.type]};function z(){return{basic:()=>{var x;return JSON.parse(JSON.stringify(((x=g.value)==null?void 0:x.getSearchFormState())||{}))},tabs:()=>{var x;return JSON.parse(JSON.stringify(((x=f.value)==null?void 0:x.getSearchFormState(o.value))||{}))}}[p.value.type]()}function E(x){var y,v;if((v=(y=u==null?void 0:u.options)==null?void 0:y.page)!=null&&v.defaultQuery){const w=Object.keys(x),_=Object.keys(x).filter(A=>u.options.page.defaultQuery[A]===x[A]);_.length>0&&_.length===w.length&&Object.assign(u.options.page.defaultQuery,_.reduce((A,j)=>(A[j]="",A),{})),Object.assign(u.options.page.defaultQuery,x)}}return t({run:B,resetSearch:D,clearSelect:U,getSearchFormState:z,setSearchFormState:E}),{run:B,loaded:h,rows:e,tabs:f,table:g,formModal:a,previewMediaModalRef:r,extraData:n,activePageName:o,currentComponent:s,rendererOptions:p}}});function T2(u,k,t,b,g,f){var n,l,i;const o=T.resolveComponent("TablePage"),a=T.resolveComponent("TabsPage"),r=T.resolveComponent("FormModal"),e=T.resolveComponent("PreviewMediaModal");return T.openBlock(),T.createElementBlock("div",{class:"page-renderer-wrapper",style:T.normalizeStyle({height:(l=(n=u.rendererOptions)==null?void 0:n.page)!=null&&l.columns||(i=u.rendererOptions)!=null&&i.pages?"100%":"auto"})},[u.loaded?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[u.rendererOptions.type==="basic"?(T.openBlock(),T.createBlock(o,{key:0,page:u.rendererOptions.page,config:u.config,ref:"table"},{summaryBar:T.withCtx(()=>[T.renderSlot(u.$slots,"summaryBar")]),_:3},8,["page","config"])):T.createCommentVNode("",!0),u.rendererOptions.type==="tabs"?(T.openBlock(),T.createBlock(a,{key:1,"tab-click-action":u.rendererOptions.tabClickAction,pages:u.rendererOptions.pages,config:u.config,"custom-event":u.customEvent,activePageName:u.activePageName,"onUpdate:activePageName":k[0]||(k[0]=s=>u.activePageName=s),ref:"tabs"},null,8,["tab-click-action","pages","config","custom-event","activePageName"])):T.createCommentVNode("",!0),T.createVNode(r,{ref:"formModal",form:u.currentComponent,rows:u.rows,"extra-data":u.extraData,onRefresh:u.run},null,8,["form","rows","extra-data","onRefresh"]),T.createVNode(e,{ref:"previewMediaModalRef"},null,512)],64)):T.createCommentVNode("",!0)],4)}const A2=$e(E2,[["render",T2]]),dv="",Ll=Fe(A2);window["@yzsf2e/render-core"]={version:Wl.version};const M2=[En,Ns,Is,Ls,zs,Us,Ci,Ei,Jo,Ki,Xi,Qo,Yi,ta,il,Ll],{enumerations:O2}=li();function R2(u){return u.replace(/^yzs-/,"").replace(/(?:^|-)([a-z])/g,(k,t)=>t.toUpperCase())}function $l(u){M2.forEach(k=>{k.install?(u.use(k),["yzs-date-picker","yzs-drag-drawer","yzs-page-renderer-form-modal","yzs-page-renderer"].includes(k.name)&&u.component(R2(k.name),k)):k.name&&u.component(k.name,k)}),u.config.globalProperties.$t||(u.config.globalProperties.$t=()=>{})}const N2={install:$l};Gt.AIcon=En,Gt.AutoComplete=Qo,Gt.AutoCompleteFuzzySelect=Yi,Gt.DatePicker=Ns,Gt.DebounceButton=Is,Gt.DragDrawer=Ls,Gt.DragModal=zs,Gt.DragModalPlus=Us,Gt.EnumCustomSelect=Ei,Gt.EnumFuzzyCustomSelect=Xi,Gt.EnumFuzzySelect=Ki,Gt.EnumSelect=Ci,Gt.FuzzySelect=Jo,Gt.LOADING_SIGN=_n,Gt.MAP_SIGN=He,Gt.PageRenderer=Ll,Gt.PreviewMediaModal=il,Gt.RegionFuzzyAutoComplete=ta,Gt.TABLE_ROW_CLASS_NAME=xl,Gt.datePickerProps=Rs,Gt.default=N2,Gt.enumerations=O2,Gt.exportToXLSX=Pl,Gt.install=$l,Gt.showPreviewMediaModal=sb,Gt.useApiDataSource=mr,Gt.useLocaleColumns=El,Object.defineProperties(Gt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|