morningfast-plus 1.0.19 → 1.0.21

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.
@@ -1 +1,26 @@
1
- import{Fragment as e,computed as t,createBlock as a,createCommentVNode as n,createElementBlock as l,createElementVNode as o,createSlots as r,createTextVNode as u,createVNode as i,defineComponent as s,getCurrentInstance as c,getCurrentScope as p,guardReactiveProps as d,h as f,inject as m,markRaw as v,mergeModels as h,mergeProps as g,nextTick as _,normalizeClass as y,normalizeProps as b,normalizeStyle as w,onBeforeUnmount as k,onMounted as C,onScopeDispose as P,openBlock as z,provide as M,ref as S,render as x,renderList as j,renderSlot as T,resolveDynamicComponent as O,shallowRef as E,toDisplayString as V,toRaw as I,toValue as R,unref as B,useAttrs as D,useCssVars as U,useModel as $,useSlots as F,useTemplateRef as A,vModelText as L,vShow as N,watch as q,withCtx as W,withDirectives as H,withKeys as G,withModifiers as K}from"vue";import{ElAside as Y,ElButton as Q,ElCard as X,ElCascader as Z,ElCheckbox as J,ElCheckboxGroup as ee,ElConfigProvider as te,ElContainer as ae,ElDatePicker as ne,ElDialog as le,ElDivider as oe,ElDrawer as re,ElHeader as ue,ElIcon as ie,ElImage as se,ElInput as ce,ElInputTag as pe,ElLink as de,ElMain as fe,ElMessage as me,ElMessageBox as ve,ElOption as he,ElPagination as ge,ElPopover as _e,ElScrollbar as ye,ElSelect as be,ElSelectV2 as we,ElSplitter as ke,ElSplitterPanel as Ce,ElTabPane as Pe,ElTable as ze,ElTableColumn as Me,ElTabs as Se,ElTag as xe,ElText as je,ElTooltip as Te,ElTreeV2 as Oe,ElUpload as Ee,buttonEmits as Ve,buttonProps as Ie,dayjs as Re,inputEmits as Be,inputProps as De,selectEmits as Ue,uploadProps as $e,vLoading as Fe}from"element-plus";import{Bell as Ae,CaretBottom as Le,DocumentCopy as Ne,Download as qe}from"@element-plus/icons-vue";import We from"axios";import He from"@jamescoyle/vue-icon";import{animate as Ge,stagger as Ke,text as Ye}from"animejs";function Qe(e){return e.install=t=>{t.component(e?.name,e)},e}const Xe=["copy"],Ze={enhance:{type:String,values:Xe,default:""},value:{type:String,default:""},copySize:{type:Number,default:16.8}},Je={...Ie,...Ze},et={...Ve,copied:(e,t)=>e&&t instanceof MouseEvent};function tt(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{if(document.execCommand("copy"))return!0}catch(a){return!1}document.body.removeChild(t)}async function at(e,t){return Boolean(t?tt(e):async function(e){try{return await(navigator?.clipboard?.writeText?.(e)),!0}catch(t){return tt(e)}}(e))}new Proxy({accessKeyId:"",accessKeySecret:"",stsToken:"",region:"",bucket:"",refreshSTSTokenInterval:9999999},{get:(e,t)=>e[t],set:()=>!1});function nt(e,t){return new Promise(a=>{fetch(e).then(e=>e.blob()).then(e=>{const n=document.createElement("a"),l=t?.name;n.href=URL.createObjectURL(e),n.download=l,n.click(),n.remove(),URL.revokeObjectURL(n.href),a(!0)}).catch(e=>{a(!1)})})}var lt={class:"mp-enhance-button"},ot=(e,t)=>{const a=e.__vccOpts||e;for(const[n,l]of t)a[n]=l;return a},rt=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpEnhanceButton",__name:"enhance-button",props:Je,emits:et,setup(e,{emit:l}){const r=c(),u=e,s=l,p=F(),d=D(),m=t(()=>Boolean(r?.vnode?.props?.onClick||r?.vnode?.props?.onclick)),v=t(()=>u.disabled||!m.value&&!u.value);async function h(e){s("copied",await at(u.value),e)}return(e,t)=>(z(),a(B(Te),{placement:"top",disabled:!(!u.disabled&&!u.value),"show-after":300},{default:W(()=>[o("section",lt,[(z(),a(O(f(B(Q),{...u,...B(d),disabled:v.value,onClick:e=>function(e){m.value?s("click",e):h(e)}(e)},B(p))))),m.value?(z(),a(B(Q),{key:0,link:"",class:"mp-enhance-button__copy",type:u?.type,size:u?.size,disabled:!u.value,onClick:h},{default:W(()=>[i(B(ie),{size:u.copySize},{default:W(()=>[i(B(Ne))]),_:1},8,["size"])]),_:1},8,["type","size","disabled"])):n("",!0)])]),content:W(()=>[...t[0]||(t[0]=[o("span",null,"复制目标内容为空",-1)])]),_:1},8,["disabled"]))}}),[["__scopeId","data-v-dfbefb7f"]]);const ut=Qe(/* @__PURE__ */s({name:"MpButton",__name:"button",props:Je,emits:et,setup(e,{emit:n}){const l=c(),o=e,r=D(),u=F(),i=t(()=>Xe.includes(o.enhance));return(e,t)=>i.value?(z(),a(O(f(rt,{...o,...B(r),...B(l)?.vnode?.props||{}},B(u))),{key:0})):(z(),a(O(f(B(Q),{...o,...B(r),value:"",enhance:"",copySize:"",default:""},B(u))),{key:1}))}})),it=Symbol("__MpConfiguration__"),st={},ct={};const pt=Qe(/* @__PURE__ */s({name:"MpConfiguration",__name:"configuration",props:st,emits:ct,setup:e=>(M(it,{configuration:S({}),pageQueue:S({}),layout:S({size:null,currentRem:16}),theme:S({})}),(e,t)=>T(e.$slots,"default"))}));const dt={name:{type:String,default:""},type:{type:String,values:["","material","fa","mdi","fa5","fa5pro","fa5duotone"],default:""},path:{type:String,default:""},size:{type:Number,default:16},viewbox:{type:String},flip:{type:String},rotate:{type:Object}},ft={};var mt={inited:!1,value:{}};async function vt(){if(!mt.inited){const e={...await import("@mdi/js")||{},default:""};mt.inited||(mt.value=e,mt.inited=!0)}return v(mt.value)}var ht=/* @__PURE__ */s({name:"MpIcon",__name:"icon",props:dt,emits:ft,setup(e){const l=e,o=E({}),r=t(()=>o.value[l?.name]||"");return async function(){o.value=await vt()}(),(e,t)=>r.value?(z(),a(B(He),g({key:0},l,{path:r.value,type:"mdi",class:"mp-icon"}),null,16,["path"])):n("",!0)}});const gt=Qe(ht);var _t=gt;const yt=["none","default","string[enter]"],bt={...De,type:{type:String,values:yt,default:"none"},appendTo:{type:String,default:"body"}},wt={...Be},kt={type:{type:String,values:yt,default:"default"},value:{type:String,default:""}},Ct={};async function Pt(e,t,a){const n={modal:!1,appendToBody:!0,destroyOnClose:!0,draggable:!0,overflow:!0,...a||{},class:["mp-hook-dialog",a?.class||""].filter(Boolean).join(" "),headerClass:["mp-hook-dialog-header",a?.headerClass||""].filter(Boolean).join(" "),bodyClass:["mp-hook-dialog-body",a?.bodyClass||""].filter(Boolean).join(" "),footerClass:["mp-hook-dialog-footer",a?.footerClass||""].filter(Boolean).join(" "),onClosed:function(){a?.onClosed?.(),function(e){requestAnimationFrame(()=>{x(null,e),e.remove()})}(r)},showFooter:!!a?.showFooter,showConfirmButton:!0,showCancelButton:!0,confirmButtonText:a?.confirmButtonText??"确定",cancelButtonText:a?.cancelButtonText??"取消"};let l=null;const o=new Promise(e=>l=e),r=function(e,t){const a=xt(),n=document.createElement("div");return Mt.set(n,t),a.appendChild(n),x(e,n),n}(f({setup(){const o=S(void 0===n?.modelValue||n?.modelValue),r=S(null),u=E(()=>!0),i=S(!1);let s=E(null);async function c(){try{i.value=!0,s.value=await u.value(),(void 0===s.value||s.value)&&(l?.(s.value),o.value=!1)}catch(e){}finally{i.value=!1}}return M(St,{ref:r,confirm:c,getDialogStatus:()=>o.value,openDialog:()=>{o.value=!0},closeDialog:()=>{o.value=!1},subscribeConfirmEvent:e=>{u.value=e}}),()=>f(le,{...n,modelValue:o.value,"onUpdate:modelValue":e=>{o.value=e},onVnodeMounted(e){r.value=e?.component?.exposeProxy||null}},{default:()=>f(e,t),header:()=>a?.headerSlot?a.headerSlot:a?.type?f("div",{class:"flex items-center gap-1"},[f(je,{type:a?.type}),f("span",{},n?.title||"提示")]):null,footer:()=>n.showFooter?f("div",{class:"flex justify-end items-center gap-4 p-4! pt-0!"},[a?.footerStartExtra||null,n.showConfirmButton?f(Q,{type:"primary",class:"m-0!",loading:i.value,onClick:c},()=>n.confirmButtonText):null,n.showCancelButton?f(Q,{type:"default",class:"m-0!",onClick:()=>{o.value=!1}},()=>n.cancelButtonText):null,a?.footerEndExtra||null]):null})}}),{id:crypto.randomUUID(),type:"dialog",props:t,configs:n});return o}const zt="mp-popups-container",Mt=/* @__PURE__ */new WeakMap,St=Symbol("__POPUP_PROVIDE_NAME__");function xt(){const e=document.querySelector(`body > div.${zt.toString()}`);return e||function(){const e=document.createElement("div");return e.classList.add(`${zt.toString()}`),document?.querySelector?.(`body > div.${"mp-popups-container".toString()}`)||document.body.appendChild(e),e}()}new Proxy([],{get:(e,t)=>Reflect.get(e,t),set:()=>!1});var jt=`Global-Image-Preview-${window.crypto.randomUUID()||Date.now().toString(36).slice(2)}`,Tt=S([]),Ot=E(null);async function Et(e){await async function(){if(document.querySelector(`#${jt}`))return;const e=f({setup(){function e(e){Ot.value=e}return()=>f(se,{src:Tt.value?.[0]||"",previewSrcList:Tt.value,previewTeleported:!0,zIndex:9999,fit:"contain",id:jt,ref:e,teleported:!0,style:{width:0,height:0,position:"fixed",overflow:"hidden",top:"-999px",left:"-999px"}})}}),t=xt(),a=document.createElement("div");t.appendChild(a),x(e,a)}(),Ot.value&&e?.length&&(Tt.value=e,requestIdleCallback(()=>{Ot.value?.showPreview?.()}))}var Vt={class:"morningfast-plus-input-extra"},It=/* @__PURE__ */s({name:"MpInputExtra",__name:"extra",props:kt,emits:Ct,setup(e,{emit:a}){const n=m(St),o=A("inputRef"),r={default:"请输入内容","string[enter]":"请输入内容(回车为分隔符)"},u=e,s=t(()=>r?.[u?.type||"default"]||""),c=S("");function p(){return{value:d(c.value)}}function d(e){return"string[enter]"===u.type?e.trim().split("\n")?.filter(Boolean)?.join(","):e}return C(()=>{requestIdleCallback(()=>{n?.subscribeConfirmEvent(p),o.value?.focus?.(),c.value="default"!==u?.type?"string[enter]"===u?.type?String(u?.value||"").split(",").map(e=>e.trim()).filter(Boolean).join("\n"):u?.value||"":u.value||""})}),(e,t)=>(z(),l("section",Vt,[i(B(ce),{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),ref_key:"inputRef",ref:o,rows:6,type:"textarea",placeholder:s.value,"validate-event":!1},null,8,["modelValue","placeholder"])]))}}),Rt={class:"mp-input-suffix"};const Bt=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpInput",__name:"input",props:/* @__PURE__ */h(bt,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */h(wt,["update:modelValue"]),setup(e,{emit:n}){const l=c(),r=e,u=D(),s=$(e,"modelValue"),p=t(()=>r?.placeholder||["default","none"].includes(r?.type)?"请输入内容":"请输入内容(逗号为分隔符)"),d=t(()=>({default:24,small:16,large:32}?.[u?.size||"default"]||0));async function f(){s.value=(await Pt(It,{type:r?.type||"default",value:String(r?.modelValue||"")},{showFooter:!0,title:"输入框扩展",width:"450px"}))?.value||""}return(e,t)=>(z(),a(B(ce),g({...B(u),...r,...B(l)?.vnode?.props||{}},{placeholder:p.value,class:"mp-input"}),{suffix:W(()=>[o("div",Rt,[T(e.$slots,"suffix-before",{},void 0,!0),H(i(B(gt),{class:"mp-input-icon",name:"mdiArrowBottomRightBoldBoxOutline",size:d.value,onClick:f},null,8,["size"]),[[N,"none"!==e.type]]),T(e.$slots,"suffix-after",{},void 0,!0)])]),_:3},16,["placeholder"]))}}),[["__scopeId","data-v-8cc4408f"]])),Dt=["small","default","medium","large"],Ut={content:{type:String,default:"加载中 . . ."},autoPlay:{type:Boolean,default:!0},size:{type:String,default:"default",values:Dt},forceSize:{type:Number,default:-1}},$t={};var Ft={class:"mp-plus-loading"};const At=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpLoading",__name:"loading",props:Ut,emits:$t,setup(e,{expose:a}){U(e=>({v5c338038:s.value}));const n=e,r=A("textRef"),u={small:.6,default:1,medium:1.4,large:1.8},i=E(null),s=t(()=>(n?.forceSize>=0?n?.forceSize:1.5*(u[n.size]||1)).toFixed(2)+"rem");function c(){i.value?.pause?.(),i.value=Ge(Ye.splitText(r.value,{words:!1,chars:!0})?.chars,{y:[{to:"-2.75rem",ease:"outExpo",duration:600},{to:0,ease:"outBounce",duration:800,delay:100}],rotate:{from:"-1turn",delay:0},delay:Ke(50),ease:"inOutCirc",loopDelay:1e3,loop:!0}),n.autoPlay&&i.value?.play?.()}return q(()=>n.content,c,{flush:"post"}),a({play:function(){i.value?.play()},stop:function(){i.value?.pause()}}),C(c),(e,t)=>(z(),l("section",Ft,[o("span",{ref:"textRef"},V(n.content),513)]))}}),[["__scopeId","data-v-c32b805e"]]));var Lt=At;const Nt={NORMAL:1,FIXED:2,AFFIX:4,HOME:8},qt={LIST:1,FORM_CREATE:2,FORM_EDIT:4,FORM_READONLY:8,CHART:16,EXCEL:32,CUSTOM:64},Wt={modelValue:{type:[Object,null],required:!1},defaultValue:{type:Object,required:!1},showHome:{type:Boolean,default:!0},router:{type:Object,default:null,required:!0},proxy:{type:Boolean,default:!1}},Ht={"update:modelValue":e=>!0,change:e=>!0};function Gt(e){return e&&"object"==typeof e&&Array.isArray(e.tabs)&&"object"==typeof e.tabMap}function Kt(){return{id:`mp_page_manager_tab_${window.crypto.randomUUID()}-${Date.now().toString()}-${window.crypto.randomUUID()}`,title:"",type:Nt.NORMAL,sort:1,pages:[]}}function Yt(){return{id:`mp_page_manager_page_${window.crypto.randomUUID()}-${Date.now().toString()}-${window.crypto.randomUUID()}`,parentId:"",name:"",type:qt.CUSTOM,history:[],originRoute:null}}function Qt(e,t){const a=Kt(),n=Yt();return n.name=e?.name||e?.originRoute?.meta?.title||"未命名页面",n.originRoute=e?.originRoute||null,n.type=e?.type||qt.CUSTOM,n.parentId=a.id,a.title=n.name,a.type=t?.type||Nt.NORMAL,a.pages.push(n),a}function Xt(e,t){return e.pages.push(t),e.title=t.name,e}function Zt(e,t){return e.pages.splice(e.pages.indexOf(t),1),e.title=e.pages.length>0?e.pages[e.pages.length-1].name:"",e}function Jt(){const e=Kt(),t=Yt();t.name="主页",t.type=qt.CUSTOM,t.originRoute=null,e.title=t.name,e.type=Nt.HOME,e.pages.push(t);const a={activeTabId:"",activePageId:"",tabs:[e],tabMap:{}};return a.tabMap[a.tabs[0].id]=a.tabs[0],a.activePageId=a.tabs[0].pages[0].id,a.activeTabId=a.tabs[0].id,a}function ea(e){return Array.isArray(e)?[...e].sort((e,t)=>e.sort-t.sort):[]}var ta="object"==typeof global&&global&&global.Object===Object&&global,aa="object"==typeof self&&self&&self.Object===Object&&self,na=ta||aa||Function("return this")(),la=na.Symbol,oa=Object.prototype,ra=oa.hasOwnProperty,ua=oa.toString,ia=la?la.toStringTag:void 0;var sa=function(e){var t=ra.call(e,ia),a=e[ia];try{e[ia]=void 0;var n=!0}catch(o){}var l=ua.call(e);return n&&(t?e[ia]=a:delete e[ia]),l},ca=Object.prototype.toString;var pa=function(e){return ca.call(e)},da=la?la.toStringTag:void 0;var fa=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":da&&da in Object(e)?sa(e):pa(e)};var ma=function(e){return null!=e&&"object"==typeof e};var va=function(e){return"symbol"==typeof e||ma(e)&&"[object Symbol]"==fa(e)};var ha=function(e,t){for(var a=-1,n=null==e?0:e.length,l=Array(n);++a<n;)l[a]=t(e[a],a,e);return l},ga=Array.isArray,_a=la?la.prototype:void 0,ya=_a?_a.toString:void 0;var ba=function e(t){if("string"==typeof t)return t;if(ga(t))return ha(t,e)+"";if(va(t))return ya?ya.call(t):"";var a=t+"";return"0"==a&&1/t==-1/0?"-0":a};var wa=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var ka=function(e){return e};var Ca,Pa=function(e){if(!wa(e))return!1;var t=fa(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},za=na["__core-js_shared__"],Ma=(Ca=/[^.]+$/.exec(za&&za.keys&&za.keys.IE_PROTO||""))?"Symbol(src)_1."+Ca:"";var Sa=function(e){return!!Ma&&Ma in e},xa=Function.prototype.toString;var ja=function(e){if(null!=e){try{return xa.call(e)}catch(t){}try{return e+""}catch(t){}}return""},Ta=/^\[object .+?Constructor\]$/,Oa=Function.prototype,Ea=Object.prototype,Va=Oa.toString,Ia=Ea.hasOwnProperty,Ra=RegExp("^"+Va.call(Ia).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ba=function(e){return!(!wa(e)||Sa(e))&&(Pa(e)?Ra:Ta).test(ja(e))};var Da=function(e,t){return null==e?void 0:e[t]};var Ua=function(e,t){var a=Da(e,t);return Ba(a)?a:void 0},$a=Ua(na,"WeakMap"),Fa=function(){try{var e=Ua(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Aa=/^(?:0|[1-9]\d*)$/;var La=function(e,t){var a=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==a||"symbol"!=a&&Aa.test(e))&&e>-1&&e%1==0&&e<t};var Na=function(e,t,a){"__proto__"==t&&Fa?Fa(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a};var qa=function(e,t){return e===t||e!=e&&t!=t};var Wa=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Ha=function(e){return null!=e&&Wa(e.length)&&!Pa(e)},Ga=Object.prototype;var Ka=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ga)};var Ya=function(e,t){for(var a=-1,n=Array(e);++a<e;)n[a]=t(a);return n};var Qa=function(e){return ma(e)&&"[object Arguments]"==fa(e)},Xa=Object.prototype,Za=Xa.hasOwnProperty,Ja=Xa.propertyIsEnumerable,en=Qa(function(){return arguments}())?Qa:function(e){return ma(e)&&Za.call(e,"callee")&&!Ja.call(e,"callee")};var tn=function(){return!1},an="object"==typeof exports&&exports&&!exports.nodeType&&exports,nn=an&&"object"==typeof module&&module&&!module.nodeType&&module,ln=nn&&nn.exports===an?na.Buffer:void 0,on=(ln?ln.isBuffer:void 0)||tn,rn={};rn["[object Float32Array]"]=rn["[object Float64Array]"]=rn["[object Int8Array]"]=rn["[object Int16Array]"]=rn["[object Int32Array]"]=rn["[object Uint8Array]"]=rn["[object Uint8ClampedArray]"]=rn["[object Uint16Array]"]=rn["[object Uint32Array]"]=!0,rn["[object Arguments]"]=rn["[object Array]"]=rn["[object ArrayBuffer]"]=rn["[object Boolean]"]=rn["[object DataView]"]=rn["[object Date]"]=rn["[object Error]"]=rn["[object Function]"]=rn["[object Map]"]=rn["[object Number]"]=rn["[object Object]"]=rn["[object RegExp]"]=rn["[object Set]"]=rn["[object String]"]=rn["[object WeakMap]"]=!1;var un=function(e){return ma(e)&&Wa(e.length)&&!!rn[fa(e)]};var sn=function(e){return function(t){return e(t)}},cn="object"==typeof exports&&exports&&!exports.nodeType&&exports,pn=cn&&"object"==typeof module&&module&&!module.nodeType&&module,dn=pn&&pn.exports===cn&&ta.process,fn=function(){try{var e=pn&&pn.require&&pn.require("util").types;return e||dn&&dn.binding&&dn.binding("util")}catch(t){}}(),mn=fn&&fn.isTypedArray,vn=mn?sn(mn):un,hn=Object.prototype.hasOwnProperty;var gn=function(e,t){var a=ga(e),n=!a&&en(e),l=!a&&!n&&on(e),o=!a&&!n&&!l&&vn(e),r=a||n||l||o,u=r?Ya(e.length,String):[],i=u.length;for(var s in e)!t&&!hn.call(e,s)||r&&("length"==s||l&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||La(s,i))||u.push(s);return u};var _n=function(e,t){return function(a){return e(t(a))}}(Object.keys,Object),yn=Object.prototype.hasOwnProperty;var bn=function(e){if(!Ka(e))return _n(e);var t=[];for(var a in Object(e))yn.call(e,a)&&"constructor"!=a&&t.push(a);return t};var wn=function(e){return Ha(e)?gn(e):bn(e)},kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cn=/^\w*$/;var Pn=function(e,t){if(ga(e))return!1;var a=typeof e;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=e&&!va(e))||(Cn.test(e)||!kn.test(e)||null!=t&&e in Object(t))},zn=Ua(Object,"create");var Mn=function(){this.__data__=zn?zn(null):{},this.size=0};var Sn=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},xn=Object.prototype.hasOwnProperty;var jn=function(e){var t=this.__data__;if(zn){var a=t[e];return"__lodash_hash_undefined__"===a?void 0:a}return xn.call(t,e)?t[e]:void 0},Tn=Object.prototype.hasOwnProperty;var On=function(e){var t=this.__data__;return zn?void 0!==t[e]:Tn.call(t,e)};var En=function(e,t){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=zn&&void 0===t?"__lodash_hash_undefined__":t,this};function Vn(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var n=e[t];this.set(n[0],n[1])}}Vn.prototype.clear=Mn,Vn.prototype.delete=Sn,Vn.prototype.get=jn,Vn.prototype.has=On,Vn.prototype.set=En;var In=Vn;var Rn=function(){this.__data__=[],this.size=0};var Bn=function(e,t){for(var a=e.length;a--;)if(qa(e[a][0],t))return a;return-1},Dn=Array.prototype.splice;var Un=function(e){var t=this.__data__,a=Bn(t,e);return!(a<0)&&(a==t.length-1?t.pop():Dn.call(t,a,1),--this.size,!0)};var $n=function(e){var t=this.__data__,a=Bn(t,e);return a<0?void 0:t[a][1]};var Fn=function(e){return Bn(this.__data__,e)>-1};var An=function(e,t){var a=this.__data__,n=Bn(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this};function Ln(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var n=e[t];this.set(n[0],n[1])}}Ln.prototype.clear=Rn,Ln.prototype.delete=Un,Ln.prototype.get=$n,Ln.prototype.has=Fn,Ln.prototype.set=An;var Nn=Ln,qn=Ua(na,"Map");var Wn=function(){this.size=0,this.__data__={hash:new In,map:new(qn||Nn),string:new In}};var Hn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Gn=function(e,t){var a=e.__data__;return Hn(t)?a["string"==typeof t?"string":"hash"]:a.map};var Kn=function(e){var t=Gn(this,e).delete(e);return this.size-=t?1:0,t};var Yn=function(e){return Gn(this,e).get(e)};var Qn=function(e){return Gn(this,e).has(e)};var Xn=function(e,t){var a=Gn(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this};function Zn(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var n=e[t];this.set(n[0],n[1])}}Zn.prototype.clear=Wn,Zn.prototype.delete=Kn,Zn.prototype.get=Yn,Zn.prototype.has=Qn,Zn.prototype.set=Xn;var Jn=Zn;function el(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var a=function(){var n=arguments,l=t?t.apply(this,n):n[0],o=a.cache;if(o.has(l))return o.get(l);var r=e.apply(this,n);return a.cache=o.set(l,r)||o,r};return a.cache=new(el.Cache||Jn),a}el.Cache=Jn;var tl=el;var al=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nl=/\\(\\)?/g,ll=function(e){var t=tl(e,function(e){return 500===a.size&&a.clear(),e}),a=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(al,function(e,a,n,l){t.push(n?l.replace(nl,"$1"):a||e)}),t});var ol=function(e){return null==e?"":ba(e)};var rl=function(e,t){return ga(e)?e:Pn(e,t)?[e]:ll(ol(e))};var ul=function(e){if("string"==typeof e||va(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var il=function(e,t){for(var a=0,n=(t=rl(t,e)).length;null!=e&&a<n;)e=e[ul(t[a++])];return a&&a==n?e:void 0};var sl=function(e,t,a){var n=null==e?void 0:il(e,t);return void 0===n?a:n};var cl=function(e,t){for(var a=-1,n=t.length,l=e.length;++a<n;)e[l+a]=t[a];return e};var pl=function(){this.__data__=new Nn,this.size=0};var dl=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a};var fl=function(e){return this.__data__.get(e)};var ml=function(e){return this.__data__.has(e)};var vl=function(e,t){var a=this.__data__;if(a instanceof Nn){var n=a.__data__;if(!qn||n.length<199)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new Jn(n)}return a.set(e,t),this.size=a.size,this};function hl(e){this.size=(this.__data__=new Nn(e)).size}hl.prototype.clear=pl,hl.prototype.delete=dl,hl.prototype.get=fl,hl.prototype.has=ml,hl.prototype.set=vl;var gl=hl;var _l=function(e,t){for(var a=-1,n=null==e?0:e.length,l=0,o=[];++a<n;){var r=e[a];t(r,a,e)&&(o[l++]=r)}return o};var yl=function(){return[]},bl=Object.prototype.propertyIsEnumerable,wl=Object.getOwnPropertySymbols,kl=wl?function(e){return null==e?[]:(e=Object(e),_l(wl(e),function(t){return bl.call(e,t)}))}:yl;var Cl=function(e,t,a){var n=t(e);return ga(e)?n:cl(n,a(e))};var Pl=function(e){return Cl(e,wn,kl)},zl=Ua(na,"DataView"),Ml=Ua(na,"Promise"),Sl=Ua(na,"Set"),xl="[object Map]",jl="[object Promise]",Tl="[object Set]",Ol="[object WeakMap]",El="[object DataView]",Vl=ja(zl),Il=ja(qn),Rl=ja(Ml),Bl=ja(Sl),Dl=ja($a),Ul=fa;(zl&&Ul(new zl(/* @__PURE__ */new ArrayBuffer(1)))!=El||qn&&Ul(new qn)!=xl||Ml&&Ul(Ml.resolve())!=jl||Sl&&Ul(new Sl)!=Tl||$a&&Ul(new $a)!=Ol)&&(Ul=function(e){var t=fa(e),a="[object Object]"==t?e.constructor:void 0,n=a?ja(a):"";if(n)switch(n){case Vl:return El;case Il:return xl;case Rl:return jl;case Bl:return Tl;case Dl:return Ol}return t});var $l=Ul,Fl=na.Uint8Array;var Al=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Ll=function(e){return this.__data__.has(e)};function Nl(e){var t=-1,a=null==e?0:e.length;for(this.__data__=new Jn;++t<a;)this.add(e[t])}Nl.prototype.add=Nl.prototype.push=Al,Nl.prototype.has=Ll;var ql=Nl;var Wl=function(e,t){for(var a=-1,n=null==e?0:e.length;++a<n;)if(t(e[a],a,e))return!0;return!1};var Hl=function(e,t){return e.has(t)};var Gl=function(e,t,a,n,l,o){var r=1&a,u=e.length,i=t.length;if(u!=i&&!(r&&i>u))return!1;var s=o.get(e),c=o.get(t);if(s&&c)return s==t&&c==e;var p=-1,d=!0,f=2&a?new ql:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var m=e[p],v=t[p];if(n)var h=r?n(v,m,p,t,e,o):n(m,v,p,e,t,o);if(void 0!==h){if(h)continue;d=!1;break}if(f){if(!Wl(t,function(e,t){if(!Hl(f,t)&&(m===e||l(m,e,a,n,o)))return f.push(t)})){d=!1;break}}else if(m!==v&&!l(m,v,a,n,o)){d=!1;break}}return o.delete(e),o.delete(t),d};var Kl=function(e){var t=-1,a=Array(e.size);return e.forEach(function(e,n){a[++t]=[n,e]}),a};var Yl=function(e){var t=-1,a=Array(e.size);return e.forEach(function(e){a[++t]=e}),a},Ql=la?la.prototype:void 0,Xl=Ql?Ql.valueOf:void 0;var Zl=function(e,t,a,n,l,o,r){switch(a){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Fl(e),new Fl(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return qa(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var u=Kl;case"[object Set]":var i=1&n;if(u||(u=Yl),e.size!=t.size&&!i)return!1;var s=r.get(e);if(s)return s==t;n|=2,r.set(e,t);var c=Gl(u(e),u(t),n,l,o,r);return r.delete(e),c;case"[object Symbol]":if(Xl)return Xl.call(e)==Xl.call(t)}return!1},Jl=Object.prototype.hasOwnProperty;var eo=function(e,t,a,n,l,o){var r=1&a,u=Pl(e),i=u.length;if(i!=Pl(t).length&&!r)return!1;for(var s=i;s--;){var c=u[s];if(!(r?c in t:Jl.call(t,c)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=r;++s<i;){var v=e[c=u[s]],h=t[c];if(n)var g=r?n(h,v,c,t,e,o):n(v,h,c,e,t,o);if(!(void 0===g?v===h||l(v,h,a,n,o):g)){f=!1;break}m||(m="constructor"==c)}if(f&&!m){var _=e.constructor,y=t.constructor;_==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f},to="[object Arguments]",ao="[object Array]",no="[object Object]",lo=Object.prototype.hasOwnProperty;var oo=function(e,t,a,n,l,o){var r=ga(e),u=ga(t),i=r?ao:$l(e),s=u?ao:$l(t),c=(i=i==to?no:i)==no,p=(s=s==to?no:s)==no,d=i==s;if(d&&on(e)){if(!on(t))return!1;r=!0,c=!1}if(d&&!c)return o||(o=new gl),r||vn(e)?Gl(e,t,a,n,l,o):Zl(e,t,i,a,n,l,o);if(!(1&a)){var f=c&&lo.call(e,"__wrapped__"),m=p&&lo.call(t,"__wrapped__");if(f||m){var v=f?e.value():e,h=m?t.value():t;return o||(o=new gl),l(v,h,a,n,o)}}return!!d&&(o||(o=new gl),eo(e,t,a,n,l,o))};var ro=function e(t,a,n,l,o){return t===a||(null==t||null==a||!ma(t)&&!ma(a)?t!=t&&a!=a:oo(t,a,n,l,e,o))};var uo=function(e,t,a,n){var l=a.length,o=l,r=!n;if(null==e)return!o;for(e=Object(e);l--;){var u=a[l];if(r&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++l<o;){var i=(u=a[l])[0],s=e[i],c=u[1];if(r&&u[2]){if(void 0===s&&!(i in e))return!1}else{var p=new gl;if(n)var d=n(s,c,i,e,t,p);if(!(void 0===d?ro(c,s,3,n,p):d))return!1}}return!0};var io=function(e){return e==e&&!wa(e)};var so=function(e){for(var t=wn(e),a=t.length;a--;){var n=t[a],l=e[n];t[a]=[n,l,io(l)]}return t};var co=function(e,t){return function(a){return null!=a&&(a[e]===t&&(void 0!==t||e in Object(a)))}};var po=function(e){var t=so(e);return 1==t.length&&t[0][2]?co(t[0][0],t[0][1]):function(a){return a===e||uo(a,e,t)}};var fo=function(e,t){return null!=e&&t in Object(e)};var mo=function(e,t,a){for(var n=-1,l=(t=rl(t,e)).length,o=!1;++n<l;){var r=ul(t[n]);if(!(o=null!=e&&a(e,r)))break;e=e[r]}return o||++n!=l?o:!!(l=null==e?0:e.length)&&Wa(l)&&La(r,l)&&(ga(e)||en(e))};var vo=function(e,t){return null!=e&&mo(e,t,fo)};var ho=function(e,t){return Pn(e)&&io(t)?co(ul(e),t):function(a){var n=sl(a,e);return void 0===n&&n===t?vo(a,e):ro(t,n,3)}};var go=function(e){return function(t){return null==t?void 0:t[e]}};var _o=function(e){return function(t){return il(t,e)}};var yo=function(e){return Pn(e)?go(ul(e)):_o(e)};var bo=function(e){return"function"==typeof e?e:null==e?ka:"object"==typeof e?ga(e)?ho(e[0],e[1]):po(e):yo(e)};var wo=function(e,t,a,n){for(var l=-1,o=null==e?0:e.length;++l<o;){var r=e[l];t(n,r,a(r),e)}return n};var ko=function(e){return function(t,a,n){for(var l=-1,o=Object(t),r=n(t),u=r.length;u--;){var i=r[e?u:++l];if(!1===a(o[i],i,o))break}return t}}();var Co=function(e,t){return function(a,n){if(null==a)return a;if(!Ha(a))return e(a,n);for(var l=a.length,o=t?l:-1,r=Object(a);(t?o--:++o<l)&&!1!==n(r[o],o,r););return a}}(function(e,t){return e&&ko(e,t,wn)});var Po=function(e,t,a,n){return Co(e,function(e,l,o){t(n,e,a(e),o)}),n};var zo=function(e,t){return function(a,n){var l=ga(a)?wo:Po,o=t?t():{};return l(a,e,bo(n,2),o)}}(function(e,t,a){Na(e,a,t)});function Mo(e,t){return!!p()&&(P(e,t),!0)}var So="undefined"!=typeof window&&"undefined"!=typeof document,xo=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),e=>null!=e),jo=Object.prototype.toString,To=()=>{};function Oo(e){return Array.isArray(e)?e:[e]}function Eo(e){const t=Object.create(null);return a=>t[a]||(t[a]=e(a))}var Vo=/\B([A-Z])/g,Io=(Eo(e=>e.replace(Vo,"-$1").toLowerCase()),/-(\w)/g);Eo(e=>e.replace(Io,(e,t)=>t?t.toUpperCase():""));function Ro(e,t=200,a={}){return function(e,t){return function(...a){return new Promise((n,l)=>{Promise.resolve(e(()=>t.apply(this,a),{fn:t,thisArg:this,args:a})).then(n).catch(l)})}}(function(e,t={}){let a,n,l=To;const o=e=>{clearTimeout(e),l(),l=To};let r;return u=>{const i=R(e),s=R(t.maxWait);return a&&o(a),i<=0||void 0!==s&&s<=0?(n&&(o(n),n=void 0),Promise.resolve(u())):new Promise((e,c)=>{l=t.rejectOnCancel?c:e,r=u,s&&!n&&(n=setTimeout(()=>{a&&o(a),n=void 0,e(r())},s)),a=setTimeout(()=>{n&&o(n),n=void 0,e(u())},i)})}}(t,a),e)}function Bo(e,t=!0,a){!function(e){return e||c()}(a)?t?e():_(e):C(e,a)}var Do=So?window:void 0;So&&window.document,So&&window.navigator,So&&window.location;function Uo(e){var t;const a=R(e);return null!==(t=null==a?void 0:a.$el)&&void 0!==t?t:a}function $o(...e){const a=t(()=>{const t=Oo(R(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,a,n],l,o)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==a?void 0:a.length))return;const r=(u=n,"[object Object]"===jo.call(u)?{...n}:n);var u;const i=e.flatMap(e=>t.flatMap(t=>a.map(a=>((e,t,a,n)=>(e.addEventListener(t,a,n),()=>e.removeEventListener(t,a,n)))(e,t,a,r))));o(()=>{i.forEach(e=>e())})},l={flush:"post"},q(()=>{var t,n;return[null!==(t=null===(n=a.value)||void 0===n?void 0:n.map(e=>Uo(e)))&&void 0!==t?t:[Do].filter(e=>null!=e),Oo(R(a.value?e[1]:e[0])),Oo(B(a.value?e[2]:e[1])),R(a.value?e[3]:e[2])]},n,{...l,immediate:!0});var n,l}function Fo(e){const a=function(){const e=E(!1),t=c();return t&&C(()=>{e.value=!0},t),e}();return t(()=>(a.value,Boolean(e())))}function Ao(e,a,n={}){const{window:l=Do,initialValue:o,observe:r=!1}=n,u=E(o),i=t(()=>{var e;return Uo(a)||(null==l||null===(e=l.document)||void 0===e?void 0:e.documentElement)});function s(){const t=R(e),a=R(i);var n;a&&l&&t&&(u.value=(null===(n=l.getComputedStyle(a).getPropertyValue(t))||void 0===n?void 0:n.trim())||u.value||o)}return r&&function(e,a,n={}){const{window:l=Do,...o}=n;let r;const u=/* @__PURE__ */Fo(()=>l&&"MutationObserver"in l),i=()=>{r&&(r.disconnect(),r=void 0)},s=q(t(()=>{const t=Oo(R(e)).map(Uo).filter(xo);return new Set(t)}),e=>{i(),u.value&&e.size&&(r=new MutationObserver(a),e.forEach(e=>r.observe(e,o)))},{immediate:!0,flush:"post"}),c=()=>{s(),i()};Mo(c)}(i,s,{attributeFilter:["style","class"],window:l}),q([i,()=>R(e)],(e,t)=>{t[0]&&t[1]&&t[0].style.removeProperty(t[1]),s()},{immediate:!0}),q([u,i],([t,a])=>{const n=R(e);(null==a?void 0:a.style)&&n&&(null==t?a.style.removeProperty(n):a.style.setProperty(n,t))},{immediate:!0}),u}function Lo(e,a={width:0,height:0},n={}){const{window:l=Do,box:o="content-box"}=n,r=t(()=>{var t;return null===(t=Uo(e))||void 0===t||null===(t=t.namespaceURI)||void 0===t?void 0:t.includes("svg")}),u=E(a.width),i=E(a.height),{stop:s}=function(e,a,n={}){const{window:l=Do,...o}=n;let r;const u=/* @__PURE__ */Fo(()=>l&&"ResizeObserver"in l),i=()=>{r&&(r.disconnect(),r=void 0)},s=q(t(()=>{const t=R(e);return Array.isArray(t)?t.map(e=>Uo(e)):[Uo(t)]}),e=>{if(i(),u.value&&l){r=new ResizeObserver(a);for(const t of e)t&&r.observe(t,o)}},{immediate:!0,flush:"post"}),c=()=>{i(),s()};return Mo(c),{isSupported:u,stop:c}}(e,([t])=>{const a="border-box"===o?t.borderBoxSize:"content-box"===o?t.contentBoxSize:t.devicePixelContentBoxSize;if(l&&r.value){const t=Uo(e);if(t){const e=t.getBoundingClientRect();u.value=e.width,i.value=e.height}}else if(a){const e=Oo(a);u.value=e.reduce((e,{inlineSize:t})=>e+t,0),i.value=e.reduce((e,{blockSize:t})=>e+t,0)}else u.value=t.contentRect.width,i.value=t.contentRect.height},n);Bo(()=>{const t=Uo(e);t&&(u.value="offsetWidth"in t?t.offsetWidth:a.width,i.value="offsetHeight"in t?t.offsetHeight:a.height)});const c=q(()=>Uo(e),e=>{u.value=e?a.width:0,i.value=e?a.height:0});return{width:u,height:i,stop:function(){s(),c()}}}Number.POSITIVE_INFINITY;const No={updated(e,t,a){const n=e;n?.__RIGHT_CLICK_HANDLER__&&e.removeEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__),n.__RIGHT_CLICK_HANDLER__=n=>{n.preventDefault(),t.value?.(n,e,a,t.arg)},e.addEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__)},beforeUnmount(e,t,a){const n=e;n?.__RIGHT_CLICK_HANDLER__&&n.removeEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__)}};var qo={class:"mp-page-manager"},Wo={class:"mp-page-manager-tab-name"},Ho=["onClick"],Go={key:0,class:"mp-page-manager-tab-icon"},Ko={class:"mp-page-manager-tab-name"},Yo=["onClick"],Qo={class:"mp-page-manager__options"},Xo={class:"mp-page-manager__popup-content"};const Zo=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpPageManager",__name:"page-manager",props:/* @__PURE__ */h(Wt,{modelValue:{default:()=>Jt(),required:!1},modelModifiers:{}}),emits:/* @__PURE__ */h(Ht,["update:modelValue"]),setup(r,{expose:u,emit:s}){const c=r,p=s,d=m(it),f=$(r,"modelValue"),v=A("tabsScrollRef"),h=Lo(v),g=A("tabsContainerRef"),b=Lo(g),w=S({}),C=A("popupContainerRef"),P=A("menuPopupRef"),M=S(null),x=S([]),O=S(!1),E=S(!1),I=S(null),R=t(()=>1.25*(d?.layout?.value?.currentRem||16)),D=t(()=>ea(f.value?.tabs)),U=t(()=>b.width.value>h.width.value);function F(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__back){const e=f?.value?.tabMap?.[f?.value?.activeTabId];return e?.pages?.length<=1?void Z(e):(e.pages.pop(),f.value={...f.value},X(e,!0))}}function L(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__forward)return c?.router?.__forward(...e)}function G(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__go)return c?.router?.__go(...e)}function Y(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__push){const t="string"==typeof e?.[0]?x?.value?.find(t=>t.path===e[0]):e?.[0];if(!t)return;const a=f?.value?.tabMap?.[f?.value?.activeTabId],n=a?.pages?.[a?.pages?.length-1];if(t?.path?.startsWith(n?.originRoute?.path)){const e=Yt();return e.originRoute=t,e.name=t?.meta?.title||"未命名页面",Xt(a,e),f.value={...f.value},X(a)}{const e=Qt({name:t?.meta?.title||"未命名页面",type:t?.meta?.page_type||qt.CUSTOM,originRoute:t},{type:Nt.NORMAL}),a=[...f.value.tabs,e];return f.value={...f.value,tabs:a,tabMap:zo(a,"id")},X(e)}}}function Q(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__replace){const t="string"==typeof e?.[0]?x?.value?.find(t=>t.path===e[0]):e?.[0];if(!t)return null;const a=Qt({name:t?.meta?.title||"未命名页面",type:t?.meta?.page_type||qt.CUSTOM,originRoute:t},{type:Nt.NORMAL}),n=[...f.value.tabs,a];return f.value={...f.value,tabs:n,tabMap:zo(n,"id")},X(a)}}function X(e,t){if(f.value.activeTabId===e.id&&!t)return;if(f.value.activeTabId=e.id,f.value.activePageId=e?.pages?.length?e.pages[e.pages.length-1].id:"",f.value={...f.value},!M.value||!f?.value?.tabMap?.[e?.id]?.pages?.length)return;const a=f?.value?.tabMap?.[e?.id]?.pages,n=a[a.length-1]?.originRoute,l=M.value.__replace({path:n?.path||"/page/home",query:n?.query||{},params:n?.params||{},state:{__mp_page_manager_from_tab_id__:f.value.activeTabId,__mp_page_manager_from_page_id__:f.value.activePageId,__mp_page_manager_to_tab_id__:e.id,__mp_page_manager_to_page_id__:e?.pages?.[0].id}});return requestIdleCallback(()=>{v.value?.scrollTo({left:w.value[e.id]?.offsetLeft||0,behavior:"smooth"}),ae()}),l}function Z(e){const t=f.value.tabs.findIndex(t=>t.id===e.id);if(-1===t)return;if(f.value.tabs.splice(t,1),delete f.value.tabMap[e.id],f.value={...f.value},f?.value?.activeTabId!==e.id)return void ae();const a=f.value?.tabs?.[t-1]||f.value?.tabs?.[t];a?X(a?.type===Nt.HOME&&f.value?.tabs?.[t]||a):f.value=Jt()}function J(){I.value=null}function ee(){te()}function te(){O.value=!1,E.value=!1}function ae(){p("change",f.value)}return q(()=>c?.router,e=>{M.value=function(e){if(!c?.router)throw new Error("请传入 router 对象");return c.router.__back=c?.router?.back||(()=>{}),c.router.__forward=c?.router?.forward||(()=>{}),c.router.__go=c?.router?.go||(()=>{}),c.router.__push=c?.router?.push||(()=>{}),c.router.__replace=c?.router?.replace||(()=>{}),c?.proxy?(c.router.back=F,c.router.forward=L,c.router.go=G,c.router.push=Y,c.router.replace=Q,e):e}(e),x.value=M.value?.getRoutes?.()||[]},{immediate:!0}),q(()=>c?.defaultValue,e=>{e&&(f.value={...e})},{once:!0,immediate:!0,flush:"post"}),u({hidePopup:te,closeTab:function(e){Z(e)},closeOtherTabs:function(e){}}),k(()=>{h?.stop?.(),b?.stop?.()}),(t,r)=>(z(),l("section",qo,[t.showHome?(z(),l("div",{class:y(["mp-page-manager-tab mp-page-manager-tab-home",{active:f.value.activeTabId===D.value[0]?.id}]),key:D.value[0]?.id,onClick:r[0]||(r[0]=K(()=>X(D.value[0]),["stop"]))},[i(B(gt),{type:"mdi",name:"mdiHomeOutline",size:R.value},null,8,["size"]),o("div",Wo,V(D.value[0].title),1)],2)):n("",!0),H(o("div",{ref_key:"tabsScrollRef",ref:v,class:"mp-page-manager-tabs-scroll"},[o("div",{ref_key:"tabsContainerRef",ref:g,class:"mp-page-manager-tabs"},[(z(!0),l(e,null,j(D.value.slice(1),e=>H((z(),l("div",{class:y(["mp-page-manager-tab",{active:f.value.activeTabId===e.id}]),key:e.id,ref_for:!0,ref:t=>function(e,t){t?w.value[e]=t:delete w.value[e]}(e.id,t),onClick:K(()=>X(e),["stop"])},[e?.pages?.[e.pages.length-1]?.originRoute?.meta?.icon?(z(),l("div",Go,[i(B(gt),{type:"mdi",name:e?.pages?.[e.pages.length-1]?.originRoute?.meta?.icon,size:R.value},null,8,["name","size"])])):n("",!0),o("div",Ko,V(e.title),1),o("div",{class:"mp-page-manager-tab-close",onClick:K(()=>Z(e),["stop"])},[i(B(gt),{name:"mdiCloseCircleOutline",type:"mdi",size:R.value},null,8,["size"])],8,Yo)],10,Ho)),[[B(No),(t,a)=>function(e,t){O.value=!1,_(()=>{if(!C?.value||!P?.value)return;const a=e.getBoundingClientRect();C.value.style.left=`${a.left+a.width/2}px`,C.value.style.top=`${a.top+a.height}px`,I.value=t,O.value=!0})}(a,e)]])),128))],512)],512),[[N,D.value?.length>2]]),o("div",Qo,[U.value?(z(),a(B(gt),{key:0,type:"mdi",name:"mdiViewCarousel",size:R.value},null,8,["size"])):n("",!0),i(B(_e),{visible:E.value,"onUpdate:visible":r[1]||(r[1]=e=>E.value=e),ref:"addPopupRef","popper-class":"mp-page-manager__popup",disabled:!t.$slots?.["popup-add"],offset:15,"hide-after":0,transition:"",placement:"bottom-start",width:"auto",trigger:"click"},{reference:W(()=>[i(B(gt),{class:"mp-page-manager__popup-add-btn",type:"mdi",name:"mdiPlus",size:R.value},null,8,["size"])]),default:W(()=>[o("div",Xo,[T(t.$slots,"popup-add",{},void 0,!0)])]),_:3},8,["visible","disabled"])]),i(B(_e),{visible:O.value,"onUpdate:visible":r[2]||(r[2]=e=>O.value=e),ref_key:"menuPopupRef",ref:P,"popper-class":"mp-page-manager__popup",disabled:!t.$slots?.["popup-menu"],offset:10,"hide-after":0,placement:"bottom",width:"auto",trigger:"click",onHide:J},{reference:W(()=>[o("div",{class:"mp-page-manager__popup-container",ref_key:"popupContainerRef",ref:C},null,512)]),default:W(()=>[o("div",{class:"mp-page-manager__popup-content",onClick:ee},[T(t.$slots,"popup-menu",{tab:I.value},void 0,!0)])]),_:3},8,["visible","disabled"])]))}}),[["__scopeId","data-v-36a0af9f"]])),Jo={...De,modelValue:{type:String,default:""},defaultMode:{type:String,required:!1},autoClean:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!1}},er={"update:modelValue":e=>!0,scan:e=>!0};var tr={class:"mp-scan-input"},ar={class:"mp-scan-input-scan-controller"},nr={class:"mp-scan-input-suffix"};const lr=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpScanInput",__name:"scan-input",props:/* @__PURE__ */h(Jo,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */h(er,["update:modelValue"]),setup(e,{expose:a,emit:n}){const r=c(),u=A("scanInputRef"),s=A("hiddenInputRef"),p=e,d=n,f=D(),m=$(e,"modelValue"),v=S(""),h=S("scan"),b=S(!1),w=S(!1),k=t(()=>b.value||w.value),P=t(()=>Boolean(f?.readonly||"scan"===h.value)),M=t(()=>({input:"mdiKeyboard",scan:"mdiBarcodeScan"})),x=t(()=>({default:24,small:16,large:32}?.[f?.size||"default"]||0));function j(){b.value=!0,"scan"===h.value?s.value?.focus():u?.value?.focus(),I()}function O(){b.value=!1,h.value="scan",R()}function E(){w.value=!0,I()}function V(){b.value=!1,w.value=!1,R()}function I(){_(()=>{u.value?.ref?.parentElement?.classList?.add("is-focus")})}function R(){_(()=>{u.value?.ref?.parentElement?.classList?.remove("is-focus")})}function U(){"scan"===h.value&&(m.value=v.value)}function F(){"scan"===h.value&&(d("scan",v.value),p?.autoClean&&(m.value="",v.value=""))}return C(()=>{p.autoFocus&&setTimeout(()=>{j()},300)}),a({ref:u,focus:j,blur:()=>{O(),V()}}),(e,t)=>(z(),l("div",tr,[o("div",ar,[H(o("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>v.value=e),ref:"hiddenInputRef",type:"password",autocomplete:"off",onFocus:E,onBlur:V,onInput:U,onKeydown:G(F,["enter"])},null,544),[[L,v.value]])]),i(B(ce),g({...B(f),...p,...B(r)?.vnode?.props||{},modelValue:m.value,"onUpdate:modelValue":e=>d("update:modelValue",e)},{placeholder:e.placeholder,readonly:P.value,autoFocus:!1,ref:"scanInputRef",onFocus:j,onBlur:O}),{suffix:W(()=>[o("div",nr,[T(e.$slots,"suffix-before",{},void 0,!0),H(i(B(gt),{class:y(["mp-scan-input-icon",{[h.value]:!0,"is-focus":k.value}]),size:x.value,name:M.value[h.value]},null,8,["class","size","name"]),[[N,"none"!==e.type]]),T(e.$slots,"suffix-after",{},void 0,!0)])]),_:3},16,["placeholder","readonly"])]))}}),[["__scopeId","data-v-eea77d91"]])),or=["element","morningfast"],rr=["picture","button","list"];var ur={png:"mdiImage",jpg:"mdiImage",jpeg:"mdiImage",gif:"mdiImage",bmp:"mdiImage",webp:"mdiImage",svg:"mdiImage",mp4:"mdiVideo",avi:"mdiVideo",mov:"mdiVideo",mkv:"mdiVideo",wmv:"mdiVideo",flv:"mdiVideo",rmvb:"mdiVideo",mp3:"mdiMusicBox",wav:"mdiMusicBox",flac:"mdiMusicBox",xlsx:"mdiFileExcelBox",xls:"mdiFileExcelBox",docx:"mdiFileWordBox",doc:"mdiFileWordBox",pptx:"mdiFilePowerpointBox",ppt:"mdiFilePowerpointBox",pdf:"mdiFilePdfBox",csv:"mdiFileDelimited",txt:"mdiFileDocument",zip:"mdiZipBox",rar:"mdiZipBox","7z":"mdiZipBox",xml:"mdiFileXmlBox",json:"mdiCodeJson",js:"mdiFileCode",ts:"mdiFileCode",html:"mdiFileCode",css:"mdiFileCode",vue:"mdiFileCode",php:"mdiFileCode",go:"mdiFileCode",java:"mdiFileCode",pem:"mdiFileKey",key:"mdiFileKey",dmg:"mdiPackageVariant",exe:"mdiPackageVariant",apk:"mdiPackageVariant",ipa:"mdiPackageVariant",msi:"mdiPackageVariant",unknown:"mdiFileQuestion"},ir=Object.keys(ur),sr={ready:"",uploading:"mdiLoading",success:"mdiCheckboxMarkedCircleOutline",fail:"mdiProgressAlert"};function cr(e){return{ready:"info",uploading:"primary",success:"success",fail:"danger"}?.[e.status]||"info"}function pr(e){const t=e.name?.split(".").pop()?.toLowerCase();return t&&ir?.includes(t)?ur[t]:ur.unknown}function dr(e){return sr[e.status]||""}function fr(e){const t=e.name?.split(".").pop()?.toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t||"")}const mr={...$e,type:{type:String,values:or,default:"morningfast"},renderType:{type:String,values:rr,default:"button"},fileSize:{type:Number,default:1024},fileTotalSize:{type:Number,default:10240},path:{type:String,default:"",required:!0},size:{type:String,default:"default"},showIcon:{type:Boolean,default:!0}},vr={change:(e,t)=>!0,remove:(e,t)=>!0,preview:e=>!0,success:(e,t,a)=>!0,error:(e,t,a)=>!0,replace:(e,t)=>!0,"update:modelValue":e=>!0},hr={...$e,uploadQueue:{type:Array},size:{type:String,default:"default"},showIcon:{type:Boolean,default:!0}},gr={trigger:()=>!0,replace:e=>!0,remove:e=>!0,download:e=>!0};var _r={class:"mp-upload-picture"},yr={class:"mp-upload-picture-files"},br=["src"],wr={class:"mp-upload-picture-file-options"},kr=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpUploadPicture",__name:"picture",props:hr,emits:gr,setup(n,{emit:r}){const u=n,s=r,c=t(()=>({default:24,small:16,large:32}?.[u?.size||"default"]||0)),p=t(()=>({default:84,small:48,large:128}?.[u?.size||"default"]||0));function d(){s("trigger")}return(t,n)=>(z(),l("section",_r,[o("div",yr,[(z(!0),l(e,null,j(u.uploadQueue,e=>(z(),l("div",{class:"mp-upload-picture-box mp-upload-picture-file",key:e.uid,style:w({width:`${p.value}px`,height:`${p.value}px`})},[e.url&&B(fr)(e)?(z(),l("img",{key:0,src:e.url,draggable:"false",class:"mp-upload-picture-file-img-controller"},null,8,br)):(z(),a(B(ie),{key:1,color:"#909399",size:1.5*c.value},{default:W(()=>[i(B(_t),{name:B(pr)(e)},null,8,["name"])]),_:2},1032,["size"])),o("div",{class:"mp-upload-picture-file-status",style:w({width:`${c.value}px`,height:`${c.value}px`})},[i(B(je),{type:B(cr)(e),size:u.size},{default:W(()=>[i(B(ie),{class:y({"is-loading":"uploading"===e.status}),size:.75*c.value},{default:W(()=>[i(B(_t),{name:B(dr)(e)},null,8,["name"])]),_:2},1032,["class","size"])]),_:2},1032,["type","size"])],4),o("div",wr,[i(B(Te),{content:"更换文件",placement:"top","show-after":240,enterable:!1},{default:W(()=>[i(B(Q),{link:"",size:u.size,onClick:()=>function(e){s("replace",e)}(e)},{default:W(()=>[i(B(je),{type:"primary"},{default:W(()=>[i(B(ie),{size:c.value},{default:W(()=>[i(B(_t),{name:"mdiFileReplaceOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),i(B(Te),{content:"预览文件",placement:"top","show-after":240,enterable:!1},{default:W(()=>[i(B(Q),{link:"",size:u.size,onClick:()=>function(e){e.url&&Et([e.url])}(e)},{default:W(()=>[i(B(je),{type:"primary"},{default:W(()=>[i(B(ie),{size:c.value},{default:W(()=>[i(B(_t),{name:"mdiEyeOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),i(B(Te),{content:"下载文件",placement:"top","show-after":240,enterable:!1},{default:W(()=>[i(B(Q),{link:"",size:u.size,onClick:()=>function(e){e.url&&s("download",e)}(e)},{default:W(()=>[i(B(je),{type:"primary"},{default:W(()=>[i(B(ie),{size:c.value},{default:W(()=>[i(B(_t),{name:"mdiTrayArrowDown",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),i(B(Te),{content:"删除文件",placement:"top","show-after":240,enterable:!1},{default:W(()=>[i(B(Q),{link:"",size:u.size,onClick:()=>function(e){s("remove",e)}(e)},{default:W(()=>[i(B(je),{type:"danger"},{default:W(()=>[i(B(ie),{size:c.value},{default:W(()=>[i(B(_t),{name:"mdiDeleteForeverOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024)])],4))),128)),T(t.$slots,"trigger",{trigger:d},()=>[o("div",{class:"mp-upload-picture-box mp-upload-picture-trigger",style:w({width:`${p.value}px`,height:`${p.value}px`}),onClick:d},[i(B(ie),{size:c.value},{default:W(()=>[i(B(_t),{name:"mdiNotePlusOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])],4)],!0)]),T(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-d5c984b0"]]),Cr={class:"mp-upload-text"},Pr={class:"mp-upload-text-files"},zr={class:"mp-upload-text-tag"},Mr=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpUploadText",__name:"button",props:hr,emits:gr,setup(n,{emit:r}){const u=n,s=r,c=t(()=>({default:24,small:16,large:32}?.[u?.size||"default"]||0));function p(){s("trigger")}return(t,n)=>(z(),l("section",Cr,[o("div",Pr,[(z(!0),l(e,null,j(u.uploadQueue,e=>(z(),a(B(xe),{class:"mp-upload-text-file",key:e.uid,type:B(cr)(e),size:u.size,closable:["wait","success","fail"].includes(e.status),onClose:()=>{s("remove",e)},onClick:()=>{s("replace",e)}},{default:W(()=>[o("div",zr,[H(i(B(ie),{onClick:K(()=>{var t;(t=e).url&&Et([t.url])},["stop"])},{default:W(()=>[i(B(_t),{name:B(pr)(e),size:c.value},null,8,["name","size"])]),_:2},1032,["onClick"]),[[N,u.showIcon&&B(fr)(e)]]),o("span",null,V(e.name),1),H(i(B(ie),{class:"is-loading"},{default:W(()=>[i(B(_t),{name:"mdiLoading",size:c.value},null,8,["size"])]),_:1},512),[[N,["uploading"].includes(e.status)]])])]),_:2},1032,["type","size","closable","onClose","onClick"]))),128)),T(t.$slots,"trigger",{trigger:p},()=>[i(B(Q),{type:"primary",link:"",size:u.size,onClick:p},{default:W(()=>[i(B(_t),{name:"mdiCloudUpload",size:c.value},null,8,["size"]),n[0]||(n[0]=o("span",{class:"mp-upload-text-u-btn"}," 点击上传 ",-1))]),_:1},8,["size"])],!0)]),T(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-38876885"]]),Sr={class:"mp-upload-list"},xr={class:"mp-upload-list-files"},jr=["src","onClick"],Tr={class:"mp-upload-list-file-info"},Or={class:"mp-upload-list-file-info-name-container"},Er={class:"mp-upload-list-file-status"},Vr={key:1,class:"mp-upload-list-file-info-type-and-size"},Ir={class:"mp-upload-list-file-options"},Rr={class:"mp-upload-list-trigger"},Br=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MpUploadList",__name:"list",props:hr,emits:gr,setup(r,{emit:s}){const c=r,p=s,d=t(()=>({default:24,small:16,large:32}?.[c?.size||"default"]||0));function f(){p("trigger")}return(t,r)=>(z(),l("section",Sr,[o("div",xr,[(z(!0),l(e,null,j(c.uploadQueue,e=>(z(),l("div",{class:"mp-upload-list-file",key:e.uid},[o("div",{class:"mp-upload-list-file-img",style:w({width:2*d.value+"px",height:2*d.value+"px"})},[e.url&&B(fr)(e)?(z(),l("img",{key:0,src:e.url,draggable:"false",class:"mp-upload-list-file-img-controller",onClick:()=>function(e){e.url&&Et([e.url])}(e)},null,8,jr)):(z(),a(B(ie),{key:1,color:"#909399",size:1.5*d.value},{default:W(()=>[i(ht,{name:B(pr)(e)},null,8,["name"])]),_:2},1032,["size"]))],4),o("div",Tr,[o("div",Or,[i(B(je),{style:w({fontSize:.75*d.value+"px"}),class:"mp-upload-list-file-info-name"},{default:W(()=>[u(V(e.name),1)]),_:2},1032,["style"]),o("div",Er,[i(B(je),{type:B(cr)(e),size:c.size},{default:W(()=>[i(B(ie),{size:d.value,class:y({"is-loading":"uploading"===e.status})},{default:W(()=>[i(ht,{name:B(dr)(e)},null,8,["name"])]),_:2},1032,["size","class"])]),_:2},1032,["type","size"])])]),["default","large"].includes(c.size)?(z(),a(B(de),{key:0,size:c.size,class:"mp-upload-list-file-info-url",onClick:()=>function(e){e.url&&p("download",e)}(e)},{default:W(()=>[u(V(e.url),1)]),_:2},1032,["size","onClick"])):n("",!0),["default","large"].includes(c.size)?(z(),l("div",Vr,[i(B(xe),{size:c.size,type:"primary",class:"mp-upload-list-file-info-type"},{default:W(()=>[u(V(e?.type||"未知类型"),1)]),_:2},1032,["size"]),i(B(je),{size:c.size,type:"info",class:"mp-upload-list-file-info-size"},{default:W(()=>[u(V(e?.size?`${(e.size/1048576).toFixed(3)} KB`:"未知大小"),1)]),_:2},1032,["size"])])):n("",!0)]),o("div",Ir,[i(B(Q),{text:"",backgound:"",class:"mp-upload-list-file-replace",onClick:()=>function(e){p("replace",e)}(e)},{default:W(()=>[i(B(Te),{content:"更换文件",placement:"top","show-after":240},{default:W(()=>[i(B(je),{type:"primary",size:c.size},{default:W(()=>[i(B(ie),{size:d.value},{default:W(()=>[i(ht,{name:"mdiFileReplaceOutline"})]),_:1},8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["onClick"]),i(B(Q),{text:"",backgound:"",class:"mp-upload-list-file-remove",onClick:()=>function(e){p("remove",e)}(e)},{default:W(()=>[i(B(Te),{content:"删除文件",placement:"top","show-after":240},{default:W(()=>[i(B(je),{type:"danger",size:c.size},{default:W(()=>[i(B(ie),{size:d.value},{default:W(()=>[i(ht,{name:"mdiDeleteForeverOutline"})]),_:1},8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["onClick"])])]))),128))]),T(t.$slots,"trigger",{trigger:f},()=>[o("div",Rr,[i(B(Q),{text:"",type:"primary",size:c.size,onClick:f},{default:W(()=>[i(ht,{name:"mdiCloudUpload",size:d.value},null,8,["size"]),r[0]||(r[0]=o("span",{class:"mp-upload-list-u-btn"}," 点击上传 ",-1))]),_:1},8,["size"])])],!0),T(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-4ba7f70a"]]);const Dr=Qe(/* @__PURE__ */s({name:"MpUpload",__name:"upload",props:mr,emits:vr,setup(e,{expose:n,emit:l}){const o=c(),r=e,u=l,i=D(),s=F(),p=S([]),d=t(()=>({picture:kr,button:Mr,list:Br}?.[r?.renderType||""]||null)),m=t(()=>(r?.accept||"*/*").split(",").map(e=>e.trim().toLowerCase()));function v(e){const t=e;return t.uid=Number(String(Math.round(Math.random()*Math.PI*1e3))+String(Date.now())?.slice(-8)+String(e.size)),t.isDirectory=!1,{uid:t.uid,name:e.name,size:e.size,type:e.type,raw:t,status:"ready",percentage:0,response:null,url:""}}async function h(e){try{e.status="uploading";const t=await async function(e,t){const a=await null.put(`${t}/${e.name}`,e,{timeout:/* @__PURE__ */(new Date).getTime()+18e4});return a.name=a.name?.split("/").pop()||e.name,"https:"===window.location.protocol&&(a.url=a.url.replace("http://","https://")),a}(e.raw,r?.path);e.status="success",e.response=t,e.url=t?.url||""}catch(t){e.status="fail",e.response=null}finally{p.value=[...p.value]}}async function g(e){Promise.all(e.map(e=>h(e)))}async function _(e){e||(e=p.value.filter(e=>"ready"===e.status)),g(e=e.filter(e=>"ready"===e.status||"fail"===e.status))}function y(e){if(!(e.reduce((e,t)=>e+t.size/1024,0)+p.value.reduce((e,t)=>e+(t.size||0)/1024,0)<=r.fileTotalSize))throw new Error(`文件总大小超出限制,当前最多上传${r.fileTotalSize}KB`)}async function b(e,t){const a=e.target,n=Array.from(a?.files||[]);try{if(function(e){if(!("number"!=typeof r.limit||r.limit<=0||p.value.length+e.length>r.limit))throw new Error(`文件数量超出限制,当前最多上传${r.limit}个文件`)}(n),y(n),await async function(e){let t=[...e],a=[];if(m.value.includes("*/*"))return!0;if(t=t?.filter(e=>{const t=m.value.includes(e.type.toLowerCase());return t||a.push(e),t}),a.length&&t.length){const n=a.map(e=>e.name).join("、");"confirm"===(await ve.confirm(`以下文件类型不匹配,是否保留合法的文件继续上传?<br/><br/>${n}`,"文件类型不匹配",{dangerouslyUseHTMLString:!0,confirmButtonText:"继续上传",cancelButtonText:"取消上传",type:"warning"})).action&&(e.length=0,e.push(...t))}else if(a.length&&!t.length)throw new Error("选择的文件类型不匹配");return!0}(n),async function(e){let t=[...e],a=[];if(t=t?.filter(e=>{const t=e.size/1024<=r.fileSize;return t||a.push(e),t}),a.length&&t.length){const n=a.map(e=>e.name).join("、"),l=await ve.confirm(`以下文件大小超出限制,是否保留合法的文件继续上传?<br/><br/>${n}`,"文件大小超出限制",{dangerouslyUseHTMLString:!0,confirmButtonText:"继续上传",cancelButtonText:"取消上传",type:"warning"});"confirm"!==l&&"confirm"!==l.action||(e.length=0,e.push(...t))}else if(a.length&&!t.length)throw new Error(`选择的文件大小超出限制,单个文件最大${r.fileSize}KB`)}(n),t){const e=n.map(v);p.value.push(...e),_(e)}}catch(l){me.error(l?.message||"文件选择失败")}finally{return n}}function w(e=!0,t=!1){return new Promise(a=>{if(!r?.path)return me.error("上传路径无效"),void a(null);const n=document.createElement("input");n.type="file",n.multiple=t||!!r.multiple,n.accept=r.accept||"*/*",n.onchange=async function(t){try{a(await b(t,e))}catch(l){a(null)}finally{a(null),n.remove()}},n.click()})}async function k(e){const t=await w(!1,!0);if(!t?.length)return;const a=t?.[0],n=p.value.find(t=>t===e);if(!n||!a)return;const l=v(a);n.name=l.name,n.size=l.size,n.type=l.type,n.raw=l.raw,n.status="ready",n.percentage=0,n.response=null,n.url="",_([n]),u("replace",I(l),I(p.value))}async function C(e){const t=await ve.confirm(`确认删除文件「${e.name}」?`,"删除文件",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"});if("confirm"===t||"confirm"===t.action){const t=p.value.indexOf(e);p.value.splice(t,1),u("remove",I(e),I(p.value))}}async function P(e){e?.url&&await nt(e?.url,e.raw)}return n({uploadToOss:h,uploadListToOss:g,updateQueue:async function(e){},queryQueues:async function(){return I(p.value)}}),(e,t)=>"morningfast"===r?.type&&d.value?(z(),a(O(f(d.value,{...r,...B(i),...B(o)?.vnode?.props||{},uploadQueue:p.value,onTrigger:w,onReplace:k,onRemove:C,onDownload:P},B(s))),{key:0})):(z(),a(O(f(B(Ee),{...r,...B(i),...B(o)?.vnode?.props||{}},B(s))),{key:1}))}})),Ur={},$r={...Ue};const Fr=Qe(/* @__PURE__ */s({name:"MpVirtualSelect",__name:"virtual-select",props:{autoOptionPlaceholder:{type:Boolean}},emits:$r,setup(e){const n=c(),l=e,o=D(),r=F(),u=t(()=>({props:{label:"name",value:"id"},filterable:!0,clearable:!0,valueOnClear:l?.autoOptionPlaceholder?"":null,placeholder:l?.autoOptionPlaceholder?"全部":l?.placeholder||"请选择",emptyValues:l?.autoOptionPlaceholder?[""]:void 0})),i=t(()=>l.autoOptionPlaceholder&&l.options?[{id:"",name:"全部"},...l.options]:l?.options||[]);return(e,t)=>(z(),a(O(f(B(we),{class:"mp-virtual-select",...l,...B(o),...u.value,...B(n)?.vnode?.props||{},options:i.value},B(r)))))}}));var Ar={MorningfastPlusChannelsSearch:"",MorningfastPlusProductSearch:"",MorningfastPlusRateSearch:"",MorningfastPlusTaskSearch:"",MorningfastPlusUserSelect:"",MorningfastPlusUserSelectArchitecture:"",MorningfastPlusWarehouseSearch:"",MorningfastPlusProductDetail:"",MorningfastPlusProductDetailChildren:"",MorningfastPlusEnumWarehouse:"",MorningfastPlusEnumTaskStatus:"",MorningfastPlusEnumUser:"",MorningfastPlusEnumTaskType:"",MorningfastPlusEnumProductCategory:""},Lr={MorningfastPlusChannelsSearch:"GET",MorningfastPlusProductSearch:"POST",MorningfastPlusRateSearch:"GET",MorningfastPlusTaskSearch:"GET",MorningfastPlusUserSelect:"POST",MorningfastPlusUserSelectArchitecture:"POST",MorningfastPlusWarehouseSearch:"GET",MorningfastPlusProductDetail:"GET",MorningfastPlusProductDetailChildren:"GET",MorningfastPlusEnumWarehouse:"GET",MorningfastPlusEnumTaskStatus:"GET",MorningfastPlusEnumUser:"GET",MorningfastPlusEnumTaskType:"GET",MorningfastPlusEnumProductCategory:"POST"},Nr={global:{},MorningfastPlusChannelsSearch:{},MorningfastPlusProductSearch:{},MorningfastPlusRateSearch:{},MorningfastPlusTaskSearch:{},MorningfastPlusUserSelect:{},MorningfastPlusUserSelectArchitecture:{},MorningfastPlusWarehouseSearch:{},MorningfastPlusProductDetail:{},MorningfastPlusProductDetailChildren:{},MorningfastPlusEnumWarehouse:{},MorningfastPlusEnumTaskStatus:{},MorningfastPlusEnumUser:{},MorningfastPlusEnumTaskType:{},MorningfastPlusEnumProductCategory:{}},qr={MorningfastPlusChannelsSearch:[],MorningfastPlusProductSearch:[],MorningfastPlusRateSearch:[],MorningfastPlusTaskSearch:[],MorningfastPlusUserSelect:[],MorningfastPlusUserSelectArchitecture:[],MorningfastPlusWarehouseSearch:[],MorningfastPlusProductDetail:[]};const Wr=new Proxy(Ar,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求地址「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1}),Hr=new Proxy(Lr,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求方法「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1}),Gr=new Proxy(Nr,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求头「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1});function Kr(e,t,a){if(!(e in Ar))throw new Error(`私有请求地址「${e}」不存在, 请检查输入是否正确`);{let n=e;Ar[n]=t,a&&(Lr[n]=a),function(e){if(!qr?.[e])return;qr[e].forEach(e=>requestIdleCallback(()=>e())),qr[e]=[]}(n)}}function Yr(e,t){if(!(e in Nr))throw new Error(`私有请求头「${e}」不存在, 请检查输入是否正确`);Nr[e]=t}function Qr(e,t){if(qr?.[e]){if(!(e in qr)||!(e in Ar))throw new Error(`私有组件「${e}」不存在, 请检查输入是否正确`);Ar[e]?t():qr[e].push(t)}}const Xr={},Zr={};async function Jr(e,t){return await Pt(du,e,{title:"任务查询器",width:1280,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}async function eu(e){let t=null;return t=await We({url:Wr[e],method:Hr[e],headers:{...Gr.global,...Gr[e]}}),200===t?.status?t?.data?.data:[]}async function tu(){return Wr.MorningfastPlusWarehouseSearch?await eu("MorningfastPlusWarehouseSearch"):[]}async function au(){return Wr.MorningfastPlusEnumProductCategory?await eu("MorningfastPlusEnumProductCategory"):[]}async function nu(){return Wr.MorningfastPlusEnumTaskType?await eu("MorningfastPlusEnumTaskType"):[]}async function lu(){return Wr.MorningfastPlusEnumTaskStatus?await eu("MorningfastPlusEnumTaskStatus"):[]}async function ou(){return Wr.MorningfastPlusEnumUser?await eu("MorningfastPlusEnumUser"):[]}var ru={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}},uu={key:0,class:"mp-p-task-search"},iu={class:"mp-p-task-search-filter"},su={class:"mp-p-task-search-table"},cu={class:"mp-p-task-search-table-column-time"},pu={class:"mp-p-task-search-pagination"},du=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppTaskSearch",__name:"task-search",props:Xr,emits:Zr,setup(t,{emit:r}){const s={1:{icon:"mdiHumanQueue",text:"任务等待被处理"},2:{icon:"mdiDistributeHorizontalCenter",text:"任务开始排队"},3:{icon:"mdiClock",text:"执行中"},4:{icon:"mdiClockCheck",text:"执行成功"},5:{icon:"mdiClockRemove",text:"执行失败"}},c={0:"#909399",1:"#909399",2:"#409EFF",3:"#409EFF",4:"#67C23A",5:"#F56C6C"},p=S(!1),d=E({}),f=S({types:[],status:[],users:[]}),m=S({name:"",type:"",status:"",createdBy:"",createdDate:""}),v=S({page:1,pageSize:20,total:0}),h=S([]),g=S({list:!1,importFile:[],exportFile:[]});async function _(){try{g.value.list=!0;const e=await We.get(Wr.MorningfastPlusTaskSearch,{headers:d.value,params:{type:m.value.type,task_status:m.value.status,request_file_name:m.value.name,created_by:m.value.createdBy,created_date:m.value.createdDate,page:v.value.page,limit:v.value.pageSize}});200===e?.status?(h.value=e?.data?.data?.list||[],v.value.total=e?.data?.data?.total||0):me.error("查询异常,请稍后重试")}catch(e){}finally{g.value.list=!1}}function y(){m.value={name:"",type:"",status:"",createdBy:"",createdDate:""},_()}function b(e){return e?.task_type_name?.includes("导入")?"success":(e?.task_type_name?.includes("导出"),"primary")}return Qr("MorningfastPlusTaskSearch",function(){d.value={...Gr.global,...Gr.MorningfastPlusTaskSearch},p.value=Boolean(Wr.MorningfastPlusTaskSearch),_(),async function(){const e=await Promise.all([nu(),lu(),ou()]);f.value.types=e?.[0]||[],f.value.status=e?.[1]||[],f.value.users=e?.[2]||[]}()}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[p.value?(z(),l("div",uu,[o("div",iu,[i(B(be),{class:"mp-p-task-search-filter-item",modelValue:m.value.type,"onUpdate:modelValue":r[0]||(r[0]=e=>m.value.type=e),filterable:"",clearable:"",placeholder:"类型"},{default:W(()=>[(z(!0),l(e,null,j(f.value.types,e=>(z(),a(B(he),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i(B(be),{class:"mp-p-task-search-filter-item-small",modelValue:m.value.status,"onUpdate:modelValue":r[1]||(r[1]=e=>m.value.status=e),filterable:"",clearable:"",placeholder:"状态"},{default:W(()=>[(z(!0),l(e,null,j(f.value.status,e=>(z(),a(B(he),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i(B(ne),{class:"mp-p-task-search-filter-item-large",modelValue:m.value.createdDate,"onUpdate:modelValue":r[2]||(r[2]=e=>m.value.createdDate=e),type:"date",placeholder:"时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),i(B(we),{class:"mp-p-task-search-filter-item",modelValue:m.value.createdBy,"onUpdate:modelValue":r[3]||(r[3]=e=>m.value.createdBy=e),filterable:"",clearable:"",options:f.value.users,props:{label:"name",value:"id"},placeholder:"操作人"},null,8,["modelValue","options"]),i(B(Q),{type:"primary",onClick:_},{default:W(()=>[...r[6]||(r[6]=[u(" 查询 ",-1)])]),_:1}),i(B(Q),{type:"info",onClick:y},{default:W(()=>[...r[7]||(r[7]=[u(" 重置 ",-1)])]),_:1})]),o("div",su,[H((z(),a(B(ze),{class:"w-full!",data:h.value,height:"50vh",border:!0},{default:W(()=>[i(B(Me),{prop:"task_type_name",label:"类型","min-width":"200"},{default:W(({row:e})=>[i(B(xe),{type:b(e)},{default:W(()=>[u(V(e?.task_type_name),1)]),_:2},1032,["type"])]),_:1}),i(B(Me),{prop:"",label:"操作人&时间","min-width":"320"},{default:W(({row:e})=>[o("div",cu,[o("span",null,V(e?.created_name),1),o("span",null,V(e?.created_at),1)])]),_:1}),i(B(Me),{prop:"task_status_name",label:"状态","min-width":"200"},{default:W(({row:e})=>[o("div",{class:"mp-p-task-search-table-column-status",style:w({color:c[e?.task_status]})},[i(B(_t),{path:s[e?.task_status]?.icon,size:16},null,8,["path"]),o("span",null,V(s[e?.task_status]?.text),1)],4)]),_:1}),i(B(Me),{prop:"",label:"操作结果",width:"160",align:"center"},{default:W(({row:e})=>[3===e?.request_type?(z(),a(B(Q),{key:0,text:"",type:"primary",size:"small",loading:g.value.importFile.includes(e?.id),onClick:K(()=>async function(e){try{g.value.importFile.push(e?.id);const t=new File([],`${e?.task_type_name}-${e?.created_name}-${Re(e?.created_at||Date.now()).format("YYYY年MM月DD日HH时mm分ss秒")}.${e?.request_file?.split?.(".")?.pop?.()||"xlsx"}`);await nt(e?.request_file,t)}catch(t){}finally{g.value.importFile=g.value.importFile.filter(t=>t!==e?.id)}}(e),["stop"])},{default:W(()=>[...r[8]||(r[8]=[u(" 下载导入文件 ",-1)])]),_:1},8,["loading","onClick"])):n("",!0),3===e?.response_type?(z(),a(B(Q),{key:1,text:"",type:"primary",size:"small",loading:g.value.exportFile.includes(e?.id),onClick:K(()=>async function(e){try{g.value.exportFile.push(e?.id);const t=new File([],`${e?.task_type_name}-${e?.created_name}-${Re(e?.created_at||Date.now()).format("YYYY年MM月DD日HH时mm分ss秒")}.${e?.response?.split?.(".")?.pop?.()||"xlsx"}`);await nt(e?.response,t)}catch(t){}finally{g.value.exportFile=g.value.exportFile.filter(t=>t!==e?.id)}}(e),["stop"])},{default:W(()=>[...r[9]||(r[9]=[u(" 下载导出文件 ",-1)])]),_:1},8,["loading","onClick"])):n("",!0),3!==e?.response_type?(z(),a(B(Q),{key:2,text:"",type:"primary",size:"small",disabled:!e?.response,onClick:K(()=>function(e){me({type:4===e?.task_status?"success":"error",message:e?.response&&"string"!=typeof e?.response?JSON.stringify(e?.response):e?.response})}(e),["stop"])},{default:W(()=>[...r[10]||(r[10]=[u(" 查看结果 ",-1)])]),_:1},8,["disabled","onClick"])):n("",!0)]),_:1})]),_:1},8,["data"])),[[B(Fe),g.value.list]])]),o("div",pu,[i(B(ge),{size:"small",background:"",teleported:!1,layout:"->, prev, pager, sizes, next, jumper, total","current-page":v.value.page,"onUpdate:currentPage":r[4]||(r[4]=e=>v.value.page=e),"page-size":v.value.pageSize,"onUpdate:pageSize":r[5]||(r[5]=e=>v.value.pageSize=e),"default-page-size":20,"page-sizes":[20,40,60,80,100],total:v.value.total,onChange:_},null,8,["current-page","page-size","total"])])])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-e3d9b1f8"]]);const fu=Qe(du),mu={selection:{type:Boolean,default:!0}},vu={},hu={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},gu={click:e=>!0};async function _u(e,t){return await Pt(Pu,e,{title:"仓库查询器",width:480,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}var yu={class:"mp-p-warehouse-search-item-name"},bu=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppWarehouseSearchItem",__name:"warehouse-item",props:hu,emits:gu,setup(e,{emit:t}){const r=t;return(e,t)=>(z(),l("div",{class:"mp-p-warehouse-search-item",onClick:t[0]||(t[0]=()=>r("click",e.data))},[e.selection?(z(),a(B(J),{key:0,label:"",value:e.data?.id,onClick:K(e=>{},["stop"])},null,8,["value"])):n("",!0),o("div",yu,V(e.data?.name),1)]))}}),[["__scopeId","data-v-12c0cd15"]]),wu={key:0,class:"mp-p-warehouse-search"},ku={class:"mp-p-warehouse-search-filter"},Cu={class:"mp-p-warehouse-search-loading"},Pu=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppWarehouseSearch",__name:"warehouse.search",props:mu,emits:vu,setup(r,{emit:u}){const s=r,c=m(St,{}),p=S(!1),d=E({}),f=S({name:""}),v=S([]),h=S([]),g=S(!1),_=t(()=>f.value.name?v.value.filter(e=>e.name.includes(f.value.name)):v.value);function y(){return h.value}return Qr("MorningfastPlusWarehouseSearch",function(){d.value={...Gr.global,...Gr.MorningfastPlusWarehouseSearch},p.value=Boolean(Wr.MorningfastPlusTaskSearch),async function(){try{g.value=!0;const e=await We.get(Wr.MorningfastPlusWarehouseSearch,{headers:d.value});200===e?.status?v.value=e?.data?.data||[]:me.error("查询异常,请稍后重试")}catch(e){}finally{g.value=!1}}(),c?.subscribeConfirmEvent?.(y)}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[p.value?(z(),l("div",wu,[o("div",ku,[i(B(ce),{class:"mp-p-warehouse-search-filter-input",modelValue:f.value.name,"onUpdate:modelValue":r[0]||(r[0]=e=>f.value.name=e),placeholder:"请输入仓库名称",clearable:""},null,8,["modelValue"])]),i(B(ye),{height:"50vh"},{default:W(()=>[H(i(B(ee),{class:"mp-p-warehouse-search-list",modelValue:h.value,"onUpdate:modelValue":r[1]||(r[1]=e=>h.value=e)},{default:W(()=>[(z(!0),l(e,null,j(_.value,e=>(z(),a(bu,{data:e,key:e.id,selection:s?.selection,onClick:()=>{return t=e,void(h.value.includes(t.id)?h.value=h.value.filter(e=>e!==t.id):h.value.push(t.id));var t}},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),[[N,!g.value]]),o("div",Cu,[g.value?(z(),a(B(Lt),{key:0})):n("",!0)])]),_:1})])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-9712eec9"]]);const zu=Qe(Pu),Mu={selection:{type:Boolean,default:!0}},Su={},xu={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},ju={click:e=>!0};async function Tu(e,t){return await Pt(Bu,e,{title:"物流渠道查询器",width:480,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}var Ou={class:"mp-p-warehouse-search-item-name"},Eu=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppChannelsSearchItem",__name:"channels-item",props:xu,emits:ju,setup(e,{emit:t}){const r=t;return(e,t)=>(z(),l("div",{class:"mp-p-warehouse-search-item",onClick:t[0]||(t[0]=()=>r("click",e.data))},[e.selection?(z(),a(B(J),{key:0,label:"",value:e.data?.id,onClick:K(e=>{},["stop"])},null,8,["value"])):n("",!0),o("div",Ou,V(e.data?.name),1)]))}}),[["__scopeId","data-v-c5e84b84"]]),Vu={key:0,class:"mp-p-warehouse-search"},Iu={class:"mp-p-warehouse-search-filter"},Ru={class:"mp-p-warehouse-search-loading"},Bu=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppChannelsSearch",__name:"channels-search",props:Mu,emits:Su,setup(r,{emit:u}){const s=r,c=m(St,{}),p=S(!1),d=E({}),f=S({name:""}),v=S([]),h=S([]),g=S(!1),_=t(()=>f.value.name?v.value.filter(e=>e.name.includes(f.value.name)):v.value);function y(){return h.value}return Qr("MorningfastPlusChannelsSearch",function(){d.value={...Gr.global,...Gr.MorningfastPlusChannelsSearch},p.value=Boolean(Wr.MorningfastPlusTaskSearch),async function(){try{g.value=!0;const e=await We.get(Wr.MorningfastPlusChannelsSearch,{headers:d.value});200===e?.status?v.value=e?.data?.data||[]:me.error("查询异常,请稍后重试")}catch(e){}finally{g.value=!1}}(),c?.subscribeConfirmEvent?.(y)}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[p.value?(z(),l("div",Vu,[o("div",Iu,[i(B(ce),{class:"mp-p-warehouse-search-filter-input",modelValue:f.value.name,"onUpdate:modelValue":r[0]||(r[0]=e=>f.value.name=e),placeholder:"请输入物流渠道名称",clearable:""},null,8,["modelValue"])]),i(B(ye),{height:"50vh"},{default:W(()=>[H(i(B(ee),{class:"mp-p-warehouse-search-list",modelValue:h.value,"onUpdate:modelValue":r[1]||(r[1]=e=>h.value=e)},{default:W(()=>[(z(!0),l(e,null,j(_.value,e=>(z(),a(Eu,{data:e,key:e.id,selection:s?.selection,onClick:()=>{return t=e,void(h.value.includes(t.id)?h.value=h.value.filter(e=>e!==t.id):h.value.push(t.id));var t}},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),[[N,!g.value]]),o("div",Ru,[g.value?(z(),a(B(Lt),{key:0})):n("",!0)])]),_:1})])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f96bf035"]]);const Du=Qe(Bu),Uu={selection:{type:Boolean,default:!0}},$u={},Fu={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},Au={click:e=>!0};async function Lu(e,t){const a=e?.selection?1080:960,n=e?.selection?.85:.72,l=window.innerWidth*n;return await Pt(_i,e,{title:"产品查询器",width:`${l<a?a:l}px`,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:e?.selection,...t||{}})}const Nu={sku:{type:String,required:!0,default:""}},qu={},Wu={data:{type:Array,required:!0,default:()=>[]}},Hu={},Gu={modelValue:{type:Array,required:!0},data:{type:[Object,null],required:!0,default:()=>null},headers:{type:[Object,null],required:!1,default:()=>({})}},Ku={"update:modelValue":e=>!0,searchChildren:()=>!0},Yu={data:{type:[Object,null],required:!0,default:()=>null},children:{type:Array,required:!0,default:()=>[]}};async function Qu(e,t){return await Pt(si,e,{title:`产品详情 -「${e?.sku}」`,width:"100%",appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!0,showFooter:!1,...t||{}})}var Xu={class:"mp-p-product-detail-children"},Zu={class:"mp-p-product-detail-children-status"},Ju={class:"mp-p-product-detail-children-icon"},ei=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppProductDetailChildren",__name:"product-detail-children",props:Wu,emits:Hu,setup(e,{emit:t}){const l=e;return(e,t)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[o("div",Xu,[i(B(ze),{data:l?.data,"max-height":"50vh",border:!0},{default:W(()=>[i(B(Me),{type:"index",label:"序号",width:70,align:"center"}),i(B(Me),{prop:"name_cn",label:"产品中文名称","min-width":180},{default:W(({row:e})=>[o("div",Zu,[o("span",null,[o("span",null,V(e.name_cn),1),e?.operational_status_name?(z(),a(B(Te),{key:0,content:e?.operational_status_name,effect:"light",placement:"top"},{default:W(()=>[o("span",Ju,[e?.operational_status_name?.includes("正常")?(z(),a(B(gt),{key:0,class:"mp-p-product-detail-children-success",type:"mdi",name:"mdiCheckDecagram",size:16})):(z(),a(B(gt),{key:1,class:"mp-p-product-detail-children-alert",type:"mdi",name:"mdiAlertDecagram",size:16}))])]),_:2},1032,["content"])):n("",!0)])])]),_:1}),i(B(Me),{prop:"stock_sku",label:"子SKU编码",width:180,align:"center"},{default:W(({row:e})=>[i(B(Q),{type:"primary",link:"",onClick:()=>{return t=e,void(t?.stock_sku&&Qu({sku:t?.stock_sku}));var t}},{default:W(()=>[u(V(e?.stock_sku),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),_:1},8,["locale"]))}}),[["__scopeId","data-v-c8d0f0ef"]]),ti=/* @__PURE__ */s({name:"MppProductDetailBase",__name:"base",props:/* @__PURE__ */h(Gu,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */h(Ku,["update:modelValue"]),setup(e){const t=e,a=$(e,"modelValue"),n=S({children:!1});async function o(){a?.value?.length||await async function(){try{n.value.children=!0;const e=await We({method:"post",url:Wr.MorningfastPlusProductDetailChildren,headers:t?.headers||{},data:{sales_sku:t?.data?.sales_sku}});200===e?.status?a.value=e?.data?.data||[]:me.error("查询异常,请稍后重试")}catch(e){}finally{n.value.children=!1}}(),await Pt(ei,{data:a?.value||[]},{title:"全部子SKU列表",width:620})}return(e,t)=>(z(),l("div",null,[t[1]||(t[1]=u(" MppProductDetailBase ",-1)),i(B(Q),{loading:n.value.children,onClick:o},{default:W(()=>[...t[0]||(t[0]=[u(" 点击查询全部子SKU ",-1)])]),_:1},8,["loading"])]))}}),ai=/* @__PURE__ */s({name:"MppProductDetailCustomTag",__name:"custom-tag",props:Yu,setup:e=>(e,t)=>(z(),l("div",null,"MppProductDetailCustomTag"))}),ni=/* @__PURE__ */s({name:"MppProductDetailPatentInformation",__name:"patent-information",props:Yu,setup:e=>(e,t)=>(z(),l("div",null,"MppProductDetailPatentInformation"))}),li=/* @__PURE__ */s({name:"MppProductDetailSalesInformation",__name:"sales-information",props:Yu,setup:e=>(e,t)=>(z(),l("div",null,"MppProductDetailSalesInformation"))}),oi=/* @__PURE__ */s({name:"MppProductDetailLogisticsSmallPack",__name:"logistics-small-pack",props:Yu,setup:e=>(e,t)=>(z(),l("div",null,"MppProductDetailLogisticsSmallPack"))}),ri=/* @__PURE__ */s({name:"MppProductDetailPurchaseInformation",__name:"purchase-information",props:Yu,setup:e=>(e,t)=>(z(),l("div",null,"MppProductDetailPurchaseInformation"))}),ui=/* @__PURE__ */s({name:"MppProductDetailSalesPlatformInformation",__name:"sales-platform-information",props:Yu,setup:e=>(e,t)=>(z(),a(B(ze),{data:e.data?.sales_platform_information||[],"max-height":"45vh",border:!0},{default:W(()=>[i(B(Me),{label:"平台",prop:"platform_name","min-width":"160px",align:"center"}),i(B(Me),{label:"是否可刊登",prop:"sale_status_name","min-width":"200px",align:"center"}),i(B(Me),{label:"禁售类型",prop:"prohibit_type_name","min-width":"120px",align:"center"}),i(B(Me),{label:"备注",prop:"prohibit_remark","min-width":"160px",align:"center"})]),_:1},8,["data"]))}),ii=["loading"],si=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppProductDetail",__name:"product-detail",props:Nu,emits:qu,setup(t,{emit:r}){const u=t,s=[{label:"分类信息",name:"custom_tag",component:ai},{label:"专利信息",name:"patent_information",component:ni},{label:"权限信息",name:"sales_platform_information",component:ui},{label:"销售信息",name:"sales_information",component:li},{label:"物流小包",name:"logistics_small_pack",component:oi},{label:"采购信息",name:"purchase_information",component:ri}],c=S(!1),p=E({}),d=S(null),f=S([]),m=S({detail:!1}),v=S(0);return Qr("MorningfastPlusProductDetail",function(){c.value=Boolean(Wr.MorningfastPlusProductDetail)&&Boolean(Wr?.MorningfastPlusProductDetailChildren),p.value={...Gr.global,...Gr.MorningfastPlusProductDetail},async function(){try{m.value.detail=!0;const e=await We({method:"post",url:Wr.MorningfastPlusProductDetail,headers:p.value,data:{sku:u?.sku}});200===e?.status?d.value=e?.data?.data||null:me.error("查询异常,请稍后重试")}catch(e){}finally{m.value.detail=!1}}()}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[c.value?(z(),l("div",{key:0,loading:m.value.detail,class:"mp-p-product-detail"},[i(B(ye),{"max-height":"70vh"},{default:W(()=>[i(B(X),{class:"mp-p-product-detail-card",shadow:"never"},{default:W(()=>[i(B(X),{class:"mp-p-product-detail-card-inner",header:"基本信息",shadow:"never"},{header:W(()=>[...r[2]||(r[2]=[o("span",null,"基本信息",-1)])]),default:W(()=>[i(ti,{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=e=>f.value=e),data:d.value,headers:p.value},null,8,["modelValue","data","headers"])]),_:1}),i(B(X),{class:"mp-p-product-detail-card-inner mp-p-product-detail-tab",shadow:"never"},{header:W(()=>[i(B(Se),{modelValue:v.value,"onUpdate:modelValue":r[1]||(r[1]=e=>v.value=e)},{default:W(()=>[(z(),l(e,null,j(s,(e,t)=>i(B(Pe),{key:e.name,label:e.label,name:t},null,8,["label","name"])),64))]),_:1},8,["modelValue"])]),default:W(()=>[s?.[v.value]?.component?(z(),a(O(s?.[v.value]?.component),{key:0,data:d.value,children:f.value},null,8,["data","children"])):n("",!0)]),_:1})]),_:1})]),_:1})],8,ii)):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f031b443"]]);const ci=Qe(si);var pi={class:"mp-p-product-search-item__description"},di=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppProductSearchItem",__name:"product-item",props:Fu,emits:Au,setup(e,{emit:a}){const n=e,r=a,s=t(()=>n?.data?.warehouse_stock?.length>1?n?.data?.warehouse_stock?.[0]?.warehouse_name+`...等${n?.data?.warehouse_stock?.length}个仓库`:n?.data?.warehouse_stock?.[0]?.warehouse_name||""),c=t(()=>{const e=n?.data?.warehouse_stock?.reduce((e,t)=>e+(t?.stock_num||0),0);return e>0?e:0});function p(){n?.data?.sku&&Qu({sku:n?.data?.sku})}function d(){r("click",n?.data)}return(e,t)=>(z(),l("div",{class:"mp-p-product-search-item",onClick:d},[o("div",{onClick:K(e=>{},["stop"])},[H(i(B(J),{value:e.data?.sku},null,8,["value"]),[[N,e.selection]])]),i(B(se),{class:"mp-p-product-search-item__image",src:e.data?.image_path,fit:"contain"},null,8,["src"]),o("div",pi,[i(B(Q),{class:"mp-p-product-search-item__description__sku",link:"",type:"primary",onClick:K(p,["stop"])},{default:W(()=>[u(V(e.data?.sku),1)]),_:1}),i(B(je),{class:"mp-p-product-search-item__description__name",size:"small",onClick:K(e=>{},["stop"])},{default:W(()=>[u(V(e.data?.include),1)]),_:1}),i(B(Te),{effect:"light",placement:"top","show-after":240},{content:W(()=>[i(B(ze),{class:"mp-p-product-search-item__description__warehouse__table",data:e.data?.warehouse_stock||[],border:!0,"max-height":200,size:"small"},{default:W(()=>[i(B(Me),{prop:"warehouse_name",label:"仓库",width:140}),i(B(Me),{prop:"stock_num",label:"库存",width:100})]),_:1},8,["data"])]),default:W(()=>[H(i(B(je),{class:"mp-p-product-search-item__description__warehouse",onClick:K(e=>{},["stop"])},{default:W(()=>[i(B(je),{type:"info",size:"small"},{default:W(()=>[u(V(s.value),1)]),_:1}),i(B(je),{type:"danger",size:"small"},{default:W(()=>[u(" ("+V(c.value)+") ",1)]),_:1})]),_:1},512),[[N,s.value]])]),_:1})])]))}}),[["__scopeId","data-v-25d0bd47"]]),fi={key:0,class:"mp-p-product-search"},mi={class:"mp-p-product-search__filter"},vi={class:"mp-p-product-search__content"},hi={class:"mp-p-product-search__list__empty"},gi={key:0,class:"mp-p-product-search__list__empty"},_i=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppProductSearch",__name:"product-search",props:Uu,emits:$u,setup(t,{emit:r}){const s=t,c=S(!1),p=E({}),d=A("listLoadingDom"),f=Lo(d),m=S({category:[],warehouse:[]}),v=S([]),h=S([]),g=S([]),_=S({product_name:"",sku:"",sku_type:[],warehouseCode:[]}),y=S({label:"name",value:"id",children:"children",multiple:!0}),b=S({page:1,pageSize:12,total:0,finish:!1}),w=S({list:!1,scrollLock:!1});function k(){_.value={product_name:"",sku:"",sku_type:[],warehouseCode:[]},h.value=[],g.value=[],b.value={page:1,pageSize:12,total:0,finish:!1},C()}async function C(e="cover"){if("append"!==e||!w.value.scrollLock)try{w.value.list=!0,w.value.scrollLock=!0;const t=await We({url:Wr.MorningfastPlusProductSearch,method:"POST",headers:p.value,data:{..._.value,page:b.value.page,limit:b.value.pageSize}});200===t?.status?("cover"===e?v.value=t?.data?.data?.list||[]:"append"===e&&(v.value=[...v.value,...t?.data?.data?.list||[]]),b.value.total=t?.data?.data?.total||0,b.value.finish=v.value.length>=b.value.total):me.error("查询异常,请稍后重试")}catch(t){}finally{w.value.list=!1,w.value.scrollLock=!1}}const P=Ro((e="cover")=>{C(e)},1e3);function M(){P()}function x(){P()}function T(){v.value.length<b.value.total&&!w.value.list&&(b.value.page+=1,w.value.list=!0,P("append"))}return Qr("MorningfastPlusTaskSearch",function(){p.value={...Gr.global,...Gr.MorningfastPlusProductSearch},c.value=Boolean(Wr.MorningfastPlusProductSearch),C(),async function(){const e=await Promise.all([tu(),au()]);m.value.warehouse=e?.[0]||[],m.value.category=e?.[1]||[]}()}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[c.value?(z(),l("div",fi,[o("div",mi,[i(B(ce),{modelValue:_.value.sku,"onUpdate:modelValue":r[0]||(r[0]=e=>_.value.sku=e),clearable:"",placeholder:"请输入产品SKU",class:"mp-p-product-search__filter__component",onInput:r[1]||(r[1]=()=>B(P)())},null,8,["modelValue"]),i(B(ce),{modelValue:_.value.product_name,"onUpdate:modelValue":r[2]||(r[2]=e=>_.value.product_name=e),clearable:"",placeholder:"请输入产品名称",class:"mp-p-product-search__filter__component",onInput:r[3]||(r[3]=()=>B(P)())},null,8,["modelValue"]),i(B(be),{modelValue:_.value.warehouseCode,"onUpdate:modelValue":r[4]||(r[4]=e=>_.value.warehouseCode=e),multiple:"",clearable:"","collapse-tags":"","collapse-tags-tooltip":"","max-collapse-tags-tooltip-height":340,class:"mp-p-product-search__filter__component",placeholder:"请选择仓库",onChange:M},{default:W(()=>[(z(!0),l(e,null,j(m.value.warehouse,e=>(z(),a(B(he),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),i(B(Z),{modelValue:_.value.sku_type,"onUpdate:modelValue":r[5]||(r[5]=e=>_.value.sku_type=e),options:m.value.category,props:y.value,clearable:"","collapse-tags":"","collapse-tags-tooltip":"","max-collapse-tags-tooltip-height":340,style:{width:"240px"},placeholder:"请选择产品分类",onChange:x},null,8,["modelValue","options","props"]),i(B(Q),{class:"mp-p-product-search__filter__button",type:"primary",onClick:r[6]||(r[6]=()=>C())},{default:W(()=>[...r[8]||(r[8]=[u(" 查询 ",-1)])]),_:1}),i(B(Q),{class:"mp-p-product-search__filter__button",type:"info",onClick:k},{default:W(()=>[...r[9]||(r[9]=[u(" 重置 ",-1)])]),_:1})]),o("div",vi,[i(B(ye),{class:"mp-p-product-search__list__scrollbar",height:"50vh",distance:B(f).height.value,onEndReached:T},{default:W(()=>[i(B(ee),{class:"mp-p-product-search__list",modelValue:h.value,"onUpdate:modelValue":r[7]||(r[7]=e=>h.value=e)},{default:W(()=>[(z(!0),l(e,null,j(v.value,e=>(z(),a(di,{data:e,key:e.sku,selection:s?.selection,onClick:()=>function(e){const t=h.value.findIndex(t=>t===e?.sku);-1!==t?(h.value.splice(t,1),g.value.filter(t=>t.sku!==e?.sku)):(h.value.push(e?.sku),g.value.push(e))}(e)},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),H(o("div",{ref_key:"listLoadingDom",ref:d,class:"mp-p-product-search__list__loading"},[i(B(Lt))],512),[[N,v.value.length&&!b.value.finish]]),H(o("div",hi,[i(B(je),{type:"info",size:"large"},{default:W(()=>[...r[10]||(r[10]=[u("暂无数据",-1)])]),_:1})],512),[[N,!w.value.list&&0===v.value.length]])]),_:1},8,["distance"]),H(i(B(ye),{class:"mp-p-product-search__record__scrollbar","view-class":"mp-p-product-search__record__scrollbar__view",height:"50vh"},{default:W(()=>[(z(!0),l(e,null,j(h.value,e=>(z(),a(B(xe),{key:e,type:"primary",closable:"","disable-transitions":!1,onClose:()=>{return t=e,h.value=h.value.filter(e=>e!==t),void(g.value=g.value.filter(e=>e.sku!==t));var t}},{default:W(()=>[u(V(e),1)]),_:2},1032,["onClose"]))),128)),h.value.length?n("",!0):(z(),l("div",gi,[i(B(je),{type:"info"},{default:W(()=>[...r[11]||(r[11]=[u("暂无选中数据",-1)])]),_:1})]))]),_:1},512),[[N,s?.selection]])])])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-1b544793"]]);const yi=Qe(_i),bi=["default","architecture"],wi={...Ur,modelValue:{type:[String,Number,Array],default:()=>""},multiple:{type:Boolean,default:()=>!1}},ki={"update:modelValue":e=>!0};var Ci={key:0,class:"mp-p-user-select"};const Pi=Qe(/* @__PURE__ */s({name:"MppUserSelect",__name:"user-select",props:/* @__PURE__ */h(wi,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */h(ki,["update:modelValue"]),setup(e,{emit:t}){const o=e,r=D(),u=c(),i=$(e,"modelValue"),s=S(!1),p=E({}),d=S([]),m=S(!1);return Qr("MorningfastPlusUserSelect",function(){s.value=Boolean(Wr.MorningfastPlusUserSelect),p.value={...Gr.global,...Gr.MorningfastPlusUserSelect},async function(){try{m.value=!0;const e=await We({method:"POST",url:Wr.MorningfastPlusUserSelect,headers:p.value});200===e?.status?d.value=e?.data?.data||[]:me.error("查询异常,请稍后重试")}catch(e){}finally{m.value=!1}}()}),(e,t)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[s.value?(z(),l("div",Ci,[(z(),a(O(f(B(Fr),{...B(r),placeholder:"请选择用户",...o,...B(u)?.vnode?.props||{},options:d.value})),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=e=>i.value=e)},null,8,["modelValue"]))])):n("",!0)]),_:1},8,["locale"]))}})),zi={modelValue:{type:Array,required:!1,default:()=>[]},separate:{type:Array,required:!1,default:()=>[]},defaultValue:{type:Array,required:!1,default:()=>[]}},Mi={"update:modelValue":e=>!0,"update:separate":e=>!0,change:e=>!0};var Si={key:0,class:"mp-p-user-select"};const xi=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppUserSelectArchitecture",__name:"user-select-architecture",props:/* @__PURE__ */h(zi,{modelValue:{required:!1,default:()=>[]},modelModifiers:{},separate:{required:!1,default:()=>[]},separateModifiers:{}}),emits:/* @__PURE__ */h(Mi,["update:modelValue","update:separate"]),setup(r,{expose:s,emit:c}){const p=r,d=c,f=$(r,"modelValue"),m=$(r,"separate"),v=S(!1),h=S(!1),g=E({}),y=A("architectureRef"),b=Lo(y),w=A("treeContainerRef"),k=Lo(w),C=A("inputTagRef"),P=A("treeRef"),M=S(""),x=S(!1),T=S({value:"id",label:"name",children:"user_list"}),O=S([]),I=t(()=>Math.min(Math.max(0,700,b?.width?.value),900)+"px"),R=t(()=>{const e=/* @__PURE__ */new Map;for(const t of O.value)for(const a of t?.user_list||[])a?.name&&e.set(a.name,a);return e}),D=t({get:()=>f?.value?.map(e=>e?.name?.toString())||[],set(e){if(e?.length>f?.value?.length){const t=e?.[e.length-1];if(!R.value?.has(t))return void me.warning("未找到匹配用户,请重新输入")}f.value=function(e){const t=[];return e?.forEach(e=>{const a=R.value.get(e);a&&t.push(a)}),t}(e),d("change",f.value)}});function U(){x.value=!0,C?.value?.focus()}function F(){U()}function L(e,t){U();const a=[];t?.checkedNodes?.forEach(e=>{e?.user_list||a.push(e)}),f.value=a,d("change",f.value)}const N=Ro(function(e){M.value=e?.trim(),function(){const e=[];if(!M.value)return P?.value?.setData(O.value),void O.value?.forEach(e=>{const t=P?.value?.getNode?.(e?.id);t&&P?.value?.collapseNode(t)});O?.value?.forEach(t=>{const a=[];t?.user_list?.forEach(e=>{e?.name?.includes?.(M.value)&&a?.push(e)}),a.length&&e.push({id:t?.id,name:t?.name,user_list:a})}),P?.value?.setData(e),_(()=>{e?.forEach(e=>{const t=P?.value?.getNode?.(e?.id);t&&P?.value?.expandNode(t)})})}()},240);function H(){f.value?.forEach(e=>{const t=P?.value?.getNode?.(e?.id);t&&P?.value?.setChecked(t?.data?.id,!0)})}function G(e){const t=R?.value?.get(e);if(!t)return;const a=P?.value?.getNode?.(t?.id);a&&P?.value?.setChecked(a?.data?.id,!1)}function Y(){(P?.value?.getCheckedKeys?.(!0)||[])?.forEach(e=>{P?.value?.setChecked(e,!1)})}function Q(e){return(e||f.value)?.map(e=>({...e,id:e?.id?.toString().split("-")?.pop?.()||""}))?.filter(e=>Boolean(e?.id))}function X(e){const t=[],a={};for(const n of O.value){n?.name&&(a[n.name]=n);for(const e of n?.user_list||[])e?.name&&(a[e.name]=e)}e?.forEach(e=>{const n=a[e?.name?.toString()?.split("-")?.shift?.()];n&&t.push({...e,id:n?.id+"-"+e?.id})}),f.value=t}return Qr("MorningfastPlusUserSelectArchitecture",async function(){v.value=Boolean(Wr.MorningfastPlusUserSelectArchitecture),g.value={...Gr.global,...Gr.MorningfastPlusUserSelect},await async function(){try{h.value=!0;const t=await We({method:Hr.MorningfastPlusUserSelectArchitecture,url:Wr.MorningfastPlusUserSelectArchitecture,headers:g.value});200===t?.status?O.value=(e=t?.data?.data||[],e?.forEach(e=>{e?.id&&(e.id=e.id.toString(),e?.user_list?.forEach?.(t=>{t?.id&&(t.id=e?.id?.toString()+"-"+t.id.toString())}))}),e):me.error("查询异常,请稍后重试")}catch(t){}finally{h.value=!1}var e}(),p?.defaultValue&&(m.value=p?.defaultValue,X(p?.defaultValue))}),q(()=>f.value,e=>{m.value=Q(e)},{deep:!0}),s({getCleanValue:Q,setValue:X}),(t,r)=>(z(),a(B(te),{locale:B(ru)},{default:W(()=>[v.value?(z(),l("div",Si,[o("div",{ref_key:"architectureRef",ref:y,class:"mp-p-user-select-architecture"},[i(B(_e),{visible:x.value,"onUpdate:visible":r[1]||(r[1]=e=>x.value=e),"popper-class":"mpp-user-select-architecture-popper",placement:"bottom",trigger:"focus","hide-after":100,persistent:!1,width:I.value,"trigger-keys":[],teleported:"",onAfterEnter:H},{reference:W(()=>[i(B(pe),{ref_key:"inputTagRef",ref:C,modelValue:D.value,"onUpdate:modelValue":r[0]||(r[0]=e=>D.value=e),draggable:"",clearable:"","collapse-tags":!0,"collapse-tags-tooltip":!0,"save-on-blur":!1,trigger:"Enter",placeholder:"请选择用户",onInput:B(N),onRemoveTag:G,onClear:Y},null,8,["modelValue","onInput"])]),default:W(()=>[o("div",{class:"mpp-user-select-architecture-content",onClick:K(F,["stop"])},[i(B(ke),{onResizeStart:U,onResizeEnd:U},{default:W(()=>[i(B(Ce),{size:"50%",min:"50%"},{default:W(()=>[o("div",{ref_key:"treeContainerRef",ref:w,class:"mpp-user-select-architecture-panel-tree"},[i(B(Oe),{ref_key:"treeRef",ref:P,"show-checkbox":"",data:O.value,props:T.value,height:B(k)?.height?.value,onNodeClick:U,onCheck:L,onCurrentChange:U},null,8,["data","props","height"])],512)]),_:1}),i(B(Ce),{size:"50%",min:25,collapsible:""},{default:W(()=>[i(B(ye),{"view-class":"mpp-user-select-architecture-panel-values"},{default:W(()=>[(z(!0),l(e,null,j(f.value,(e,t)=>(z(),a(B(xe),{key:e?.id,type:"primary",closable:"",onClose:()=>function(e){U();const t=f.value.splice(e,1);f.value=[...f.value];const a=t?.[0];if(!a)return;const n=P?.value?.getNode?.(a?.id);n&&P?.value?.setChecked(n?.data?.id,!1)}(t)},{default:W(()=>[u(V(e?.name),1)]),_:2},1032,["onClose"]))),128))]),_:1})]),_:1})]),_:1})])]),_:1},8,["visible","width"])],512)])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-cd6016b6"]])),ji={root:{type:Boolean,default:!1},rem:{type:Object,default:()=>({baseFontSize:16,viewportWidth:1920})},userName:{type:String,default:""},logo:{type:String,default:""},currentRoute:{type:Object,default:()=>null},routes:{type:[Array,null],default:()=>null}},Ti={"click-logo":()=>!0,"click-router":e=>!0},Oi={currentRoute:{type:Object,default:()=>null},route:{type:Object,default:()=>null}},Ei={click:e=>!0};var Vi={class:"mp-p-layout__aside-drawer-content"},Ii={class:"mp-p-layout__aside-drawer-content-title"},Ri=["onClick"],Bi={key:0,class:"mp-p-layout__aside-drawer-group"},Di=["onClick"],Ui=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppLayoutAsideDrawer",__name:"aside-drawer",props:Oi,emits:Ei,setup(t,{emit:a}){const r=t,u=a;function i(e){e?.children?.length||u("click",e)}return(t,a)=>(z(),l("section",Vi,[o("span",Ii,V(r?.route?.meta?.title),1),(z(!0),l(e,null,j(r?.route?.children,t=>(z(),l("div",{class:y([t?.children?.length?"mp-p-layout__aside-drawer-catalogue":"mp-p-layout__aside-drawer-item"])},[o("div",{class:y(["mp-p-layout__aside-drawer-item-text",{"inner-title":t?.children?.length,active:r?.currentRoute?.value?.path===`${r?.route?.path}${t?.path}`}]),onClick:()=>i(t)},[o("span",null,V(t?.meta?.title),1)],10,Ri),t?.children?.length?(z(),l("div",Bi,[(z(!0),l(e,null,j(t?.children,e=>(z(),l("div",{class:"mp-p-layout__aside-drawer-item",onClick:()=>i(e)},[o("span",{class:y(["mp-p-layout__aside-drawer-item-text",{active:r?.currentRoute?.value?.path===`${r?.route?.path}${t?.path}${e?.path}`}])},[o("span",null,V(e?.meta?.title),1)],2)],8,Di))),256))])):n("",!0)],2))),256))]))}}),[["__scopeId","data-v-c8169f91"]]),$i=["src"],Fi={class:"mp-p-layout__aside-container"},Ai={class:"mp-p-layout__aside-menus"},Li=["onClick"],Ni={class:"mp-p-layout__aside-menu-text"},qi=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppLayoutAside",__name:"aside",props:ji,emits:Ti,setup(a,{emit:r}){const u=a,s=r,c=m(it),p=t(()=>2*(c?.layout?.value?.currentRem||16)),d=S(!1),f=S(null);function v(){s?.("click-logo")}function h(e){s?.("click-router",e),_()}function g(e){return!(!u?.currentRoute||!e)&&(f?.value?f.value?.path===e?.path:u?.currentRoute?.value?.path?.startsWith(e?.path))}function _(){d.value=!1,f.value=null}return(t,a)=>(z(),l(e,null,[i(B(Y),{class:"mp-p-layout__aside"},{default:W(()=>[u?.logo?(z(),l("div",{key:0,class:"mp-p-layout__aside-logo",onClick:v},[o("img",{src:u.logo,alt:"",draggable:"false"},null,8,$i)])):n("",!0),o("div",Fi,[o("div",Ai,[(z(!0),l(e,null,j(u?.routes,e=>(z(),l("div",{class:y(["mp-p-layout__aside-menu",{active:g(e)}]),onClick:()=>function(e){f.value=e,d.value=!0}(e)},[i(B(_t),{type:"mdi",name:e?.meta?.icon,size:p.value},null,8,["name","size"]),o("span",Ni,V(e?.meta?.title),1)],10,Li))),256))])])]),_:1}),i(B(re),{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=e=>d.value=e),direction:"ltr",size:"auto",class:"mp-p-layout__aside-drawer","body-class":"mp-p-layout__aside-drawer-body","z-index":4990,"with-header":!1,onClose:_},{default:W(()=>[i(Ui,{route:f.value,"current-route":u?.currentRoute,onClick:h},null,8,["route","current-route"])]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-c5ab8472"]]),Wi={key:0,class:"mp-p-layout__header-page-manager"},Hi={class:"mp-p-layout__header-options"},Gi={key:0,class:"mp-p-layout__header-options-slot"},Ki={class:"mp-p-layout__header-options-user"},Yi=/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppLayoutHeader",__name:"header",props:ji,emits:Ti,setup(e,{emit:t}){const r=e;function u(){Jr({},{showFooter:!1})}return(e,t)=>(z(),a(B(ue),{class:"mp-p-layout__header"},{default:W(()=>[e.$slots?.tabs?(z(),l("div",Wi,[T(e.$slots,"tabs",{},void 0,!0)])):n("",!0),o("div",Hi,[e.$slots?.["header-option"]?(z(),l("div",Gi,[T(e.$slots,"header-option",{},void 0,!0),i(B(oe),{direction:"vertical"})])):n("",!0),i(B(ie),{size:"1rem",onClick:u},{default:W(()=>[i(B(qe))]),_:1}),i(B(ie),{size:"1rem"},{default:W(()=>[i(B(Ae))]),_:1}),i(B(oe),{direction:"vertical"}),i(B(_e),{"popper-class":"mpp-layout__popup",disabled:!e.$slots["user-menu"],"show-after":0,offset:10,"hide-after":0,placement:"bottom",width:"auto",trigger:"click"},{reference:W(()=>[o("div",Ki,[o("span",null,"账户:"+V(r?.userName||"-"),1),e.$slots["user-menu"]?(z(),a(B(ie),{key:0,size:"0.75rem"},{default:W(()=>[i(B(Le))]),_:1})):n("",!0)])]),default:W(()=>[T(e.$slots,"user-menu",{},void 0,!0)]),_:3},8,["disabled"])])]),_:3}))}}),[["__scopeId","data-v-ad09aa81"]]);const Qi=Qe(/* @__PURE__ */ot(/* @__PURE__ */s({name:"MppLayoutMain",__name:"layout",props:ji,emits:Ti,setup(e,{emit:t}){const n=e,l=t,o=m(it),u=A("mainRef"),s=Lo(u),c=E(!1),p=Ao("--root-font-size",document.documentElement);function f(){l("click-logo")}function v(e){l("click-router",e)}function h(){n?.root&&n?.rem?.viewportWidth&&n?.rem?.baseFontSize?requestIdleCallback(()=>{const e=window.innerWidth/(n?.rem?.viewportWidth||1920)*(n?.rem?.baseFontSize||16);p.value=`${e}px`,o&&(o.layout.value.currentRem=e),c.value=!0}):c.value=!0}return $o("resize",h),h(),C(()=>{n?.root&&o&&(o?.layout?.value?.size||(o.layout.value.size=s))}),(e,t)=>H((z(),a(B(ae),{class:y(["mp-p-layout",{root:n?.root}])},{default:W(()=>[i(qi,g(n,{onClickLogo:f,onClickRouter:v}),null,16),i(B(ae),{class:"mp-p-layout__content"},{default:W(()=>[i(Yi,b(d(n)),r({_:2},[j(e.$slots,(t,a)=>({name:a,fn:W(t=>[T(e.$slots,a,b(d(t||{})),void 0,!0)])}))]),1040),i(B(fe),{ref_key:"mainRef",ref:u,class:"mp-p-layout__main"},{default:W(()=>[T(e.$slots,"default",{},void 0,!0)]),_:3},512)]),_:3})]),_:3},8,["class"])),[[N,c.value]])}}),[["__scopeId","data-v-7083901b"]]));export{ut as MpButton,et as MpButtonEmits,Ze as MpButtonEnhanceProps,Xe as MpButtonEnhanceType,Je as MpButtonProps,pt as MpConfiguration,ct as MpConfigurationEmits,st as MpConfigurationProps,gt as MpIcon,ft as MpIconEmits,dt as MpIconProps,Bt as MpInput,wt as MpInputEmits,Ct as MpInputExtraEmits,kt as MpInputExtraProps,yt as MpInputExtraType,bt as MpInputProps,At as MpLoading,$t as MpLoadingEmits,Ut as MpLoadingProps,Dt as MpLoadingSize,Zo as MpPageManager,Ht as MpPageManagerEmits,Wt as MpPageManagerProps,qt as MpPageType,lr as MpScanInput,Nt as MpTabType,Dr as MpUpload,vr as MpUploadEmits,mr as MpUploadProps,gr as MpUploadRenderComponentEmits,hr as MpUploadRenderComponentProps,rr as MpUploadRenderTypes,or as MpUploadTypes,Fr as MpVirtualSelect,$r as MpVirtualSelectEmits,Ur as MpVirtualSelectProps,Du as MppChannelsSearch,Su as MppChannelsSearchEmits,ju as MppChannelsSearchItemEmits,xu as MppChannelsSearchItemProps,Mu as MppChannelsSearchProps,Qi as MppLayout,Ei as MppLayoutDrawerEmits,Oi as MppLayoutDrawerProps,Ti as MppLayoutEmits,ji as MppLayoutProps,ci as MppProductDetail,Ku as MppProductDetailBaseEmits,Gu as MppProductDetailBaseProps,Hu as MppProductDetailChildrenEmits,Wu as MppProductDetailChildrenProps,qu as MppProductDetailEmits,Nu as MppProductDetailProps,Yu as MppProductDetailTabProps,yi as MppProductSearch,$u as MppProductSearchEmits,Au as MppProductSearchItemEmits,Fu as MppProductSearchItemProps,Uu as MppProductSearchProps,fu as MppTaskSearch,Zr as MppTaskSearchEmits,Xr as MppTaskSearchProps,Pi as MppUserSelect,xi as MppUserSelectArchitecture,Mi as MppUserSelectArchitectureEmits,zi as MppUserSelectArchitectureProps,ki as MppUserSelectEmits,bi as MppUserSelectMode,wi as MppUserSelectProps,zu as MppWarehouseSearch,vu as MppWarehouseSearchEmits,gu as MppWarehouseSearchItemEmits,hu as MppWarehouseSearchItemProps,mu as MppWarehouseSearchProps,it as __MpConfigurationKey__,Qt as addNewTab,Xt as addPage,pr as filterFileIcon,fr as filterIsImage,dr as filterStatusIcon,cr as filterTagThemeType,Yt as generatePage,Kt as generateTab,Yr as injectPrivateHeaders,Kr as injectPrivateUrls,Jt as newState,Gr as privateHeaders,Hr as privateMethods,Wr as privateUrls,Zt as removePage,ea as sortTabs,vt as useAllIcon,Tu as useChannelsSearchDialog,Qu as useProductDetailDialog,Lu as useProductSearchDialog,Jr as useTaskSearchDialog,_u as useWarehouseSearchDialog,Gt as validateStore};
1
+ import{Fragment as e,computed as t,createBlock as r,createCommentVNode as n,createElementBlock as i,createElementVNode as s,createSlots as a,createTextVNode as o,createVNode as l,defineComponent as u,getCurrentInstance as c,guardReactiveProps as h,h as f,inject as d,markRaw as p,mergeModels as m,mergeProps as b,nextTick as g,normalizeClass as y,normalizeProps as v,normalizeStyle as w,onBeforeUnmount as _,onMounted as x,openBlock as k,provide as S,ref as M,render as C,renderList as T,renderSlot as E,resolveDynamicComponent as A,shallowRef as R,toDisplayString as O,toRaw as j,unref as I,useAttrs as P,useCssVars as N,useModel as B,useSlots as D,useTemplateRef as F,vModelText as L,vShow as z,watch as U,withCtx as $,withDirectives as V,withKeys as H,withModifiers as q}from"vue";import{ElAside as W,ElButton as X,ElCard as K,ElCascader as Y,ElCheckbox as Z,ElCheckboxGroup as G,ElConfigProvider as J,ElContainer as Q,ElDatePicker as ee,ElDialog as te,ElDivider as re,ElDrawer as ne,ElEmpty as ie,ElHeader as se,ElIcon as ae,ElImage as oe,ElInput as le,ElInputTag as ue,ElLink as ce,ElMain as he,ElMessage as fe,ElMessageBox as de,ElOption as pe,ElPagination as me,ElPopover as be,ElScrollbar as ge,ElSelect as ye,ElSelectV2 as ve,ElSplitter as we,ElSplitterPanel as _e,ElTabPane as xe,ElTable as ke,ElTableColumn as Se,ElTabs as Me,ElTag as Ce,ElText as Te,ElTooltip as Ee,ElTreeV2 as Ae,ElUpload as Re,buttonEmits as Oe,buttonProps as je,dayjs as Ie,inputEmits as Pe,inputProps as Ne,selectEmits as Be,uploadProps as De,vLoading as Fe}from"element-plus";import{Bell as Le,CaretBottom as ze,DocumentCopy as Ue,Download as $e}from"@element-plus/icons-vue";import Ve from"axios";import He from"@jamescoyle/vue-icon";import{animate as qe,stagger as We,text as Xe}from"animejs";import{useCssVar as Ke,useDebounceFn as Ye,useElementSize as Ze,useEventListener as Ge}from"@vueuse/core";var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qe=/* @__PURE__ */(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)(function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});function et(e){return e.install=t=>{t.component(e?.name,e)},e}const tt=["copy"],rt={enhance:{type:String,values:tt,default:""},value:{type:String,default:""},copySize:{type:Number,default:16.8}},nt={...je,...rt},it={...Oe,copied:(e,t)=>e&&t instanceof MouseEvent};function st(e){const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select();try{if(document.execCommand("copy"))return!0}catch(r){return!1}document.body.removeChild(t)}async function at(e,t){return Boolean(t?st(e):async function(e){try{return await(navigator?.clipboard?.writeText?.(e)),!0}catch(t){return st(e)}}(e))}new Proxy({accessKeyId:"",accessKeySecret:"",stsToken:"",region:"",bucket:"",refreshSTSTokenInterval:9999999},{get:(e,t)=>e[t],set:()=>!1});function ot(e,t){return new Promise(r=>{fetch(e).then(e=>e.blob()).then(e=>{const n=document.createElement("a"),i=t?.name;n.href=URL.createObjectURL(e),n.download=i,n.click(),n.remove(),URL.revokeObjectURL(n.href),r(!0)}).catch(e=>{r(!1)})})}/* @__PURE__ */Je((e,t)=>{!function(r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define([],r):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).ExcelJS=r()}(function(){return function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var l="function"==typeof Qe&&Qe;if(!o&&l)return l(a,!0);if(s)return s(a,!0);var u=/* @__PURE__ */new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){return i(t[a][1][e]||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof Qe&&Qe,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){const n=e("fs"),i=e("fast-csv"),s=e("dayjs/plugin/customParseFormat"),a=e("dayjs/plugin/utc"),o=e("dayjs").extend(s).extend(a),l=e("../utils/stream-buf"),{fs:{exists:u}}=e("../utils/utils"),c={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!"}};t.exports=class{constructor(e){this.workbook=e,this.worksheet=null}async readFile(e,t){if(t=t||{},!(await u(e)))throw new Error("File not found: "+e);const r=n.createReadStream(e),i=await this.read(r,t);return r.close(),i}read(e,t){return t=t||{},new Promise((r,n)=>{const s=this.workbook.addWorksheet(t.sheetName),a=t.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],l=t.map||function(e){if(""===e)return null;const t=Number(e);if(!Number.isNaN(t)&&t!==1/0)return t;const r=a.reduce((t,r)=>{if(t)return t;const n=o(e,r,!0);return n.isValid()?n:null},null);if(r)return new Date(r.valueOf());const n=c[e];return void 0!==n?n:e},u=i.parse(t.parserOptions).on("data",e=>{s.addRow(e.map(l))}).on("end",()=>{u.emit("worksheet",s)});u.on("worksheet",r).on("error",n),e.pipe(u)})}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(e,t){return new Promise((r,n)=>{t=t||{};const s=this.workbook.getWorksheet(t.sheetName||t.sheetId),a=i.format(t.formatterOptions);e.on("finish",()=>{r()}),a.on("error",n),a.pipe(e);const{dateFormat:l,dateUTC:u}=t,c=t.map||(e=>{if(e){if(e.text||e.hyperlink)return e.hyperlink||e.text||"";if(e.formula||e.result)return e.result||"";if(e instanceof Date)return l?u?o.utc(e).format(l):o(e).format(l):u?o.utc(e).format():o(e).format();if(e.error)return e.error;if("object"==typeof e)return JSON.stringify(e)}return e}),h=void 0===t.includeEmptyRows||t.includeEmptyRows;let f=1;s&&s.eachRow((e,t)=>{if(h)for(;f++<t-1;)a.write([]);const{values:r}=e;r.shift(),a.write(r.map(c)),f=t}),a.end()})}writeFile(e,t){const r={encoding:(t=t||{}).encoding||"utf8"},i=n.createWriteStream(e,r);return this.write(i,t)}async writeBuffer(e){const t=new l;return await this.write(t,e),t.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(e,t,r){const n=e("../utils/col-cache");class i{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.worksheet=e,t)if("string"==typeof t){const e=n.decodeAddress(t);this.nativeCol=e.col+r,this.nativeColOff=0,this.nativeRow=e.row+r,this.nativeRowOff=0}else void 0!==t.nativeCol?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):void 0!==t.col?(this.col=t.col+r,this.row=t.row+r):(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(e){return e instanceof i||null==e?e:new i(e)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(e){this.nativeCol=Math.floor(e),this.nativeColOff=Math.floor((e-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(e){this.nativeRow=Math.floor(e),this.nativeRowOff=Math.floor((e-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(e){this.nativeCol=e.nativeCol,this.nativeColOff=e.nativeColOff,this.nativeRow=e.nativeRow,this.nativeRowOff=e.nativeRowOff}}t.exports=i},{"../utils/col-cache":19}],3:[function(e,t,r){const n=e("../utils/col-cache"),i=e("../utils/under-dash"),s=e("./enums"),{slideFormula:a}=e("../utils/shared-formula"),o=e("./note");class l{constructor(e,t,r){if(!e||!t)throw new Error("A Cell needs a Row");this._row=e,this._column=t,n.validateAddress(r),this._address=r,this._value=u.create(l.Types.Null,this),this.style=this._mergeStyle(e.style,t.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(e){this.style.numFmt=e}get font(){return this.style.font}set font(e){this.style.font=e}get alignment(){return this.style.alignment}set alignment(e){this.style.alignment=e}get border(){return this.style.border}set border(e){this.style.border=e}get fill(){return this.style.fill}set fill(e){this.style.fill=e}get protection(){return this.style.protection}set protection(e){this.style.protection=e}_mergeStyle(e,t,r){const n=e&&e.numFmt||t&&t.numFmt;n&&(r.numFmt=n);const i=e&&e.font||t&&t.font;i&&(r.font=i);const s=e&&e.alignment||t&&t.alignment;s&&(r.alignment=s);const a=e&&e.border||t&&t.border;a&&(r.border=a);const o=e&&e.fill||t&&t.fill;o&&(r.fill=o);const l=e&&e.protection||t&&t.protection;return l&&(r.protection=l),r}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===l.Types.Merge}merge(e,t){this._value.release(),this._value=u.create(l.Types.Merge,this,e),t||(this.style=e.style)}unmerge(){this.type===l.Types.Merge&&(this._value.release(),this._value=u.create(l.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(e){return this._value.type===l.Types.Merge&&this._value.isMergedTo(e)}get master(){return this.type===l.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===l.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(e){this.type!==l.Types.Merge?(this._value.release(),this._value=u.create(u.getType(e),this,e)):this._value.master.value=e}get note(){return this._comment&&this._comment.note}set note(e){this._comment=new o(e)}get text(){return this._value.toString()}get html(){return i.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(e){this.type===l.Types.String&&(this._value=u.create(l.Types.Hyperlink,this,{text:this._value.value,hyperlink:e}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:e}=this._row;return{sheetName:e.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(e){this.names=[e]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(e){const{definedNames:t}=this.workbook;t.removeAllNames(this.fullAddress),e.forEach(e=>{t.addEx(this.fullAddress,e)})}addName(e){this.workbook.definedNames.addEx(this.fullAddress,e)}removeName(e){this.workbook.definedNames.removeEx(this.fullAddress,e)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(e){this._dataValidations.add(this.address,e)}get model(){const{model:e}=this._value;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e}set model(e){if(this._value.release(),this._value=u.create(e.type,this),this._value.model=e,e.comment&&"note"===e.comment.type)this._comment=o.fromModel(e.comment);e.style?this.style=e.style:this.style={}}}l.Types=s.ValueType;const u={getType:e=>null==e?l.Types.Null:e instanceof String||"string"==typeof e?l.Types.String:"number"==typeof e?l.Types.Number:"boolean"==typeof e?l.Types.Boolean:e instanceof Date?l.Types.Date:e.text&&e.hyperlink?l.Types.Hyperlink:e.formula||e.sharedFormula?l.Types.Formula:e.richText?l.Types.RichText:e.sharedString?l.Types.SharedString:e.error?l.Types.Error:l.Types.JSON,types:[{t:l.Types.Null,f:class{constructor(e){this.model={address:e.address,type:l.Types.Null}}get value(){return null}set value(e){}get type(){return l.Types.Null}get effectiveType(){return l.Types.Null}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){}toString(){return""}}},{t:l.Types.Number,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Number,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Number}get effectiveType(){return l.Types.Number}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.String,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:l.Types.Date,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Date,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Date}get effectiveType(){return l.Types.Date}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Hyperlink,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip&&(this.model.tooltip=t.tooltip)}get value(){const e={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(e.tooltip=this.model.tooltip),e}set value(e){this.model={text:e.text,hyperlink:e.hyperlink},e.tooltip&&(this.model.tooltip=e.tooltip)}get text(){return this.model.text}set text(e){this.model.text=e}get hyperlink(){return this.model.hyperlink}set hyperlink(e){this.model.hyperlink=e}get type(){return l.Types.Hyperlink}get effectiveType(){return l.Types.Hyperlink}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:l.Types.Formula,f:class{constructor(e,t){this.cell=e,this.model={address:e.address,type:l.Types.Formula,shareType:t?t.shareType:void 0,ref:t?t.ref:void 0,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}}_copyModel(e){const t={},r=r=>{const n=e[r];n&&(t[r]=n)};return r("formula"),r("result"),r("ref"),r("shareType"),r("sharedFormula"),t}get value(){return this._copyModel(this.model)}set value(e){this.model=this._copyModel(e)}validate(e){switch(u.getType(e)){case l.Types.Null:case l.Types.String:case l.Types.Number:case l.Types.Date:break;case l.Types.Hyperlink:case l.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(e){this.model.formula=e}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(e){this.model.result=e}get type(){return l.Types.Formula}get effectiveType(){const e=this.model.result;return null==e?s.ValueType.Null:e instanceof String||"string"==typeof e?s.ValueType.String:"number"==typeof e?s.ValueType.Number:e instanceof Date?s.ValueType.Date:e.text&&e.hyperlink?s.ValueType.Hyperlink:e.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(e){this.model.address=e}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:e}=this.cell,t=e.findCell(this.model.sharedFormula);this._translatedFormula=t&&a(t.formula,t.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:l.Types.Merge,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Merge,master:t?t.address:void 0},this._master=t,t&&t.addMergeRef()}get value(){return this._master.value}set value(e){e instanceof l?(this._master&&this._master.releaseMergeRef(),e.addMergeRef(),this._master=e):this._master.value=e}isMergedTo(e){return e===this._master}get master(){return this._master}get type(){return l.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:l.Types.JSON,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:JSON.stringify(t),rawValue:t}}get value(){return this.model.rawValue}set value(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:l.Types.SharedString,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.SharedString,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.SharedString}get effectiveType(){return l.Types.SharedString}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.RichText,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.String,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}toString(){return this.model.value.richText.map(e=>e.text).join("")}get type(){return l.Types.RichText}get effectiveType(){return l.Types.RichText}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:l.Types.Boolean,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Boolean,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Boolean}get effectiveType(){return l.Types.Boolean}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Error,f:class{constructor(e,t){this.model={address:e.address,type:l.Types.Error,value:t}}get value(){return this.model.value}set value(e){this.model.value=e}get type(){return l.Types.Error}get effectiveType(){return l.Types.Error}get address(){return this.model.address}set address(e){this.model.address=e}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((e,t)=>(e[t.t]=t.f,e),[]),create(e,t,r){const n=this.types[e];if(!n)throw new Error("Could not create Value of type "+e);return new n(t,r)}};t.exports=l},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,t,r){const n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache");class a{constructor(e,t,r){this._worksheet=e,this._number=t,!1!==r&&(this.defn=r)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return void 0!==this.width&&9!==this.width}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=void 0!==e.width?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.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(e){void 0!==e?(this._header=e,this.headers.forEach((e,t)=>{this._worksheet.getCell(t+1,this.number).value=e})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}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.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&n.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;const e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}get headerCount(){return this.headers.length}eachCell(e,t){const r=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,(e,n)=>{t(e.getCell(r),n)})}get values(){const e=[];return this.eachCell((t,r)=>{t&&t.type!==i.ValueType.Null&&(e[r]=t.value)}),e}set values(e){if(!e)return;const t=this.number;let r=0;e.hasOwnProperty("0")&&(r=1),e.forEach((e,n)=>{this._worksheet.getCell(n+r,t).value=e})}_applyStyle(e,t){return this.style[e]=t,this.eachCell(r=>{r[e]=t}),t}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)}static toModel(e){const t=[];let r=null;return e&&e.forEach((e,n)=>{e.isDefault?r&&(r=null):r&&e.equivalentTo(r)?r.max=n+1:(r={min:n+1,max:n+1,width:void 0!==e.width?e.width:9,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(r))}),t.length?t:void 0}static fromModel(e,t){const r=[];let n=1,i=0;for(t=(t=t||[]).sort(function(e,t){return e.min-t.min});i<t.length;){const s=t[i++];for(;n<s.min;)r.push(new a(e,n++));for(;n<=s.max;)r.push(new a(e,n++,s))}return r.length?r:null}}t.exports=a},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,t,r){t.exports=class{constructor(e){this.model=e||{}}add(e,t){return this.model[e]=t}find(e){return this.model[e]}remove(e){this.model[e]=void 0}}},{}],6:[function(e,t,r){const n=e("../utils/under-dash"),i=e("../utils/col-cache"),s=e("../utils/cell-matrix"),a=e("./range"),o=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;t.exports=class{constructor(){this.matrixMap={}}getMatrix(e){return this.matrixMap[e]||(this.matrixMap[e]=new s)}add(e,t){const r=i.decodeEx(e);this.addEx(r,t)}addEx(e,t){const r=this.getMatrix(t);if(e.top)for(let n=e.left;n<=e.right;n++)for(let t=e.top;t<=e.bottom;t++){const s={sheetName:e.sheetName,address:i.n2l(n)+t,row:t,col:n};r.addCellEx(s)}else r.addCellEx(e)}remove(e,t){const r=i.decodeEx(e);this.removeEx(r,t)}removeEx(e,t){this.getMatrix(t).removeCellEx(e)}removeAllNames(e){n.each(this.matrixMap,t=>{t.removeCellEx(e)})}forEach(e){n.each(this.matrixMap,(t,r)=>{t.forEach(t=>{e(r,t)})})}getNames(e){return this.getNamesEx(i.decodeEx(e))}getNamesEx(e){return n.map(this.matrixMap,(t,r)=>t.findCellEx(e)&&r).filter(Boolean)}_explore(e,t){t.mark=!1;const{sheetName:r}=t,n=new a(t.row,t.col,t.row,t.col,r);let i,s;function o(i,s){const a=e.findCellAt(r,i,t.col);return!(!a||!a.mark||(n[s]=i,a.mark=!1,0))}for(s=t.row-1;o(s,"top");s--);for(s=t.row+1;o(s,"bottom");s++);function l(t,i){const a=[];for(s=n.top;s<=n.bottom;s++){const n=e.findCellAt(r,s,t);if(!n||!n.mark)return!1;a.push(n)}n[i]=t;for(let e=0;e<a.length;e++)a[e].mark=!1;return!0}for(i=t.col-1;l(i,"left");i--);for(i=t.col+1;l(i,"right");i++);return n}getRanges(e,t){return(t=t||this.matrixMap[e])?(t.forEach(e=>{e.mark=!0}),{name:e,ranges:t.map(e=>e.mark&&this._explore(t,e)).filter(Boolean).map(e=>e.$shortRange)}):{name:e,ranges:[]}}normaliseMatrix(e,t){e.forEachInSheet(t,(e,t,r)=>{e&&(e.row===t&&e.col===r||(e.row=t,e.col=r,e.address=i.n2l(r)+t))})}spliceRows(e,t,r,i){n.each(this.matrixMap,n=>{n.spliceRows(e,t,r,i),this.normaliseMatrix(n,e)})}spliceColumns(e,t,r,i){n.each(this.matrixMap,n=>{n.spliceColumns(e,t,r,i),this.normaliseMatrix(n,e)})}get model(){return n.map(this.matrixMap,(e,t)=>this.getRanges(t,e)).filter(e=>e.ranges.length)}set model(e){const t=this.matrixMap={};e.forEach(e=>{const r=t[e.name]=new s;e.ranges.forEach(e=>{o.test(e.split("!").pop()||"")&&r.addCell(e)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(e,t,r){t.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(e,t,r){const n=e("../utils/col-cache"),i=e("./anchor");t.exports=class{constructor(e,t){this.worksheet=e,this.model=t}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(e){let{type:t,imageId:r,range:s,hyperlinks:a}=e;if(this.type=t,this.imageId=r,"image"===t)if("string"==typeof s){const e=n.decode(s);this.range={tl:new i(this.worksheet,{col:e.left,row:e.top},-1),br:new i(this.worksheet,{col:e.right,row:e.bottom},0),editAs:"oneCell"}}else this.range={tl:new i(this.worksheet,s.tl,0),br:s.br&&new i(this.worksheet,s.br,0),ext:s.ext,editAs:s.editAs,hyperlinks:a||s.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,t,r){const n=e("../utils/under-dash");class i{constructor(e){this.note=e}get model(){let e=null;if("string"==typeof this.note)e={type:"note",note:{texts:[{text:this.note}]}};else e={type:"note",note:this.note};return n.deepMerge({},i.DEFAULT_CONFIGS,e)}set model(e){const{note:t}=e,{texts:r}=t;1===r.length&&1===Object.keys(r[0]).length?this.note=r[0].text:this.note=t}static fromModel(e){const t=new i;return t.model=e,t}}i.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},t.exports=i},{"../utils/under-dash":26}],10:[function(e,t,r){const n=e("../utils/col-cache");class i{constructor(){this.decode(arguments)}setTLBR(e,t,r,i,s){if(arguments.length<4){const i=n.decodeAddress(e),a=n.decodeAddress(t);this.model={top:Math.min(i.row,a.row),left:Math.min(i.col,a.col),bottom:Math.max(i.row,a.row),right:Math.max(i.col,a.col),sheetName:r},this.setTLBR(i.row,i.col,a.row,a.col,s)}else this.model={top:Math.min(e,r),left:Math.min(t,i),bottom:Math.max(e,r),right:Math.max(t,i),sheetName:s}}decode(e){switch(e.length){case 5:this.setTLBR(e[0],e[1],e[2],e[3],e[4]);break;case 4:this.setTLBR(e[0],e[1],e[2],e[3]);break;case 3:this.setTLBR(e[0],e[1],e[2]);break;case 2:this.setTLBR(e[0],e[1]);break;case 1:{const t=e[0];if(t instanceof i)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const e=n.decodeEx(t);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.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() - "+e.length)}}get top(){return this.model.top||1}set top(e){this.model.top=e}get left(){return this.model.left||1}set left(e){this.model.left=e}get bottom(){return this.model.bottom||1}set bottom(e){this.model.bottom=e}get right(){return this.model.right||1}set right(e){this.model.right=e}get sheetName(){return this.model.sheetName}set sheetName(e){this.model.sheetName=e}get _serialisedSheetName(){const{sheetName:e}=this.model;return e?/^[a-zA-Z0-9]*$/.test(e)?e+"!":`'${e}'!`:""}expand(e,t,r,n){(!this.model.top||e<this.top)&&(this.top=e),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||r>this.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)}expandRow(e){if(e){const{dimensions:t,number:r}=e;t&&this.expand(r,t.min,r,t.max)}}expandToAddress(e){const t=n.decodeEx(e);this.expand(t.row,t.col,t.row,t.col)}get tl(){return n.n2l(this.left)+this.top}get $t$l(){return`$${n.n2l(this.left)}$${this.top}`}get br(){return n.n2l(this.right)+this.bottom}get $b$r(){return`$${n.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(e){return!(e.sheetName&&this.sheetName&&e.sheetName!==this.sheetName||e.bottom<this.top||e.top>this.bottom||e.right<this.left||e.left>this.right)}contains(e){const t=n.decodeEx(e);return this.containsEx(t)}containsEx(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right}forEachAddress(e){for(let t=this.left;t<=this.right;t++)for(let r=this.top;r<=this.bottom;r++)e(n.encodeAddress(r,t),r,t)}}t.exports=i},{"../utils/col-cache":19}],11:[function(e,t,r){const n=e("../utils/under-dash"),i=e("./enums"),s=e("../utils/col-cache"),a=e("./cell");t.exports=class{constructor(e,t){this._worksheet=e,this._number=t,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 t=this._cells[e.col-1];if(!t){const r=this._worksheet.getColumn(e.col);t=new a(this,r,e.address),this._cells[e.col-1]=t}return t}getCell(e){if("string"==typeof e){const t=this._worksheet.getColumnKey(e);e=t?t.number:s.l2n(e)}return this._cells[e-1]||this.getCellEx({address:s.encodeAddress(this._number,e),row:this._number,col:e})}splice(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const a=i.length-t,o=this._cells.length;let l,u,c;if(a<0)for(l=e+i.length;l<=o;l++)c=this._cells[l-1],u=this._cells[l-a-1],u?(c=this.getCell(l),c.value=u.value,c.style=u.style,c._comment=u._comment):c&&(c.value=null,c.style={},c._comment=void 0);else if(a>0)for(l=o;l>=r;l--)u=this._cells[l-1],u?(c=this.getCell(l+a),c.value=u.value,c.style=u.style,c._comment=u._comment):this._cells[l+a-1]=void 0;for(l=0;l<i.length;l++)c=this.getCell(e+l),c.value=i[l],c.style={},c._comment=void 0}eachCell(e,t){if(t||(t=e,e=null),e&&e.includeEmpty){const e=this._cells.length;for(let r=1;r<=e;r++)t(this.getCell(r),r)}else this._cells.forEach((e,r)=>{e&&e.type!==i.ValueType.Null&&t(e,r+1)})}addPageBreak(e,t){const r=this._worksheet,n=Math.max(0,e-1)||0,i=Math.max(0,t-1)||16838,s={id:this._number,max:i,man:1};n&&(s.min=n),r.rowBreaks.push(s)}get values(){const e=[];return this._cells.forEach(t=>{t&&t.type!==i.ValueType.Null&&(e[t.col]=t.value)}),e}set values(e){if(this._cells=[],e)if(e instanceof Array){let t=0;e.hasOwnProperty("0")&&(t=1),e.forEach((e,r)=>{void 0!==e&&(this.getCellEx({address:s.encodeAddress(this._number,r+t),row:this._number,col:r+t}).value=e)})}else this._worksheet.eachColumnKey((t,r)=>{void 0!==e[r]&&(this.getCellEx({address:s.encodeAddress(this._number,t.number),row:this._number,col:t.number}).value=e[r])})}get hasValues(){return n.some(this._cells,e=>e&&e.type!==i.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let e=0;return this.eachCell(()=>{e++}),e}get dimensions(){let e=0,t=0;return this._cells.forEach(r=>{r&&r.type!==i.ValueType.Null&&((!e||e>r.col)&&(e=r.col),t<r.col&&(t=r.col))}),e>0?{min:e,max:t}:null}_applyStyle(e,t){return this.style[e]=t,this._cells.forEach(r=>{r&&(r[e]=t)}),t}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 t=0,r=0;return this._cells.forEach(n=>{if(n){const i=n.model;i&&((!t||t>n.col)&&(t=n.col),r<n.col&&(r=n.col),e.push(i))}}),this.height||e.length?{cells:e,number:this.number,min:t,max:r,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 t;this._cells=[],e.cells.forEach(e=>{switch(e.type){case a.Types.Merge:break;default:{let r;if(e.address)r=s.decodeAddress(e.address);else if(t){const{row:e}=t,n=t.col+1;r={row:e,col:n,address:s.encodeAddress(e,n),$col$row:`$${s.n2l(n)}$${e}`}}t=r,this.getCellEx(r).model=e;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(e,t,r){const n=e("../utils/col-cache");class i{constructor(e,t,r){this.table=e,this.column=t,this.index=r}_set(e,t){this.table.cacheState(),this.column[e]=t}get name(){return this.column.name}set name(e){this._set("name",e)}get filterButton(){return this.column.filterButton}set filterButton(e){this.column.filterButton=e}get style(){return this.column.style}set style(e){this.column.style=e}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(e){this._set("totalsRowLabel",e)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(e){this._set("totalsRowFunction",e)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(e){this._set("totalsRowResult",e)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(e){this._set("totalsRowFormula",e)}}t.exports=class{constructor(e,t){this.worksheet=e,t&&(this.table=t,this.validate(),this.store())}getFormula(e){switch(e.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${e.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${e.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${e.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${e.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${e.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${e.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${e.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${e.name}])`;case"custom":return e.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+e.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:e}=this,t=(e,t,r)=>{void 0===e[t]&&(e[t]=r)};t(e,"headerRow",!0),t(e,"totalsRow",!1),t(e,"style",{}),t(e.style,"theme","TableStyleMedium2"),t(e.style,"showFirstColumn",!1),t(e.style,"showLastColumn",!1),t(e.style,"showRowStripes",!1),t(e.style,"showColumnStripes",!1);const r=(e,t)=>{if(!e)throw new Error(t)};r(e.ref,"Table must have ref"),r(e.columns,"Table must have column definitions"),r(e.rows,"Table must have row definitions"),e.tl=n.decodeAddress(e.ref);const{row:i,col:s}=e.tl;r(i>0,"Table must be on valid row"),r(s>0,"Table must be on valid col");const{width:a,filterHeight:o,tableHeight:l}=this;e.autoFilterRef=n.encode(i,s,i+o-1,s+a-1),e.tableRef=n.encode(i,s,i+l-1,s+a-1),e.columns.forEach((e,n)=>{r(e.name,`Column ${n} must have a name`),0===n?t(e,"totalsRowLabel","Total"):(t(e,"totalsRowFunction","none"),e.totalsRowFormula=this.getFormula(e))})}store(){const e=(e,t)=>{t&&Object.keys(t).forEach(r=>{e[r]=t[r]})},{worksheet:t,table:r}=this,{row:n,col:i}=r.tl;let s=0;if(r.headerRow){const a=t.getRow(n+s++);r.columns.forEach((t,r)=>{const{style:n,name:s}=t,o=a.getCell(i+r);o.value=s,e(o,n)})}if(r.rows.forEach(a=>{const o=t.getRow(n+s++);a.forEach((t,n)=>{const s=o.getCell(i+n);s.value=t,e(s,r.columns[n].style)})}),r.totalsRow){const a=t.getRow(n+s++);r.columns.forEach((t,r)=>{const n=a.getCell(i+r);n.value=0===r?t.totalsRowLabel:this.getFormula(t)?{formula:t.totalsRowFormula,result:t.totalsRowResult}:null,e(n,t.style)})}}load(e){const{table:t}=this,{row:r,col:n}=t.tl;let i=0;if(t.headerRow){const s=e.getRow(r+i++);t.columns.forEach((e,t)=>{s.getCell(n+t).value=e.name})}if(t.rows.forEach(t=>{const s=e.getRow(r+i++);t.forEach((e,t)=>{s.getCell(n+t).value=e})}),t.totalsRow){const s=e.getRow(r+i++);t.columns.forEach((e,t)=>{const r=s.getCell(n+t);0===t?r.value=e.totalsRowLabel:this.getFormula(e)&&(r.value={formula:e.totalsRowFormula,result:e.totalsRowResult})})}}get model(){return this.table}set model(e){this.table=e}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const e=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let t=0;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++)r.getCell(e.col+t).value=null}else{for(let t=this.tableHeight;t<this._cache.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=0;t<this._cache.width;t++)r.getCell(e.col+t).value=null}for(let t=0;t<this.tableHeight;t++){const r=this.worksheet.getRow(e.row+t);for(let t=this.width;t<this._cache.width;t++)r.getCell(e.col+t).value=null}}this.store()}addRow(e,t){this.cacheState(),void 0===t?this.table.rows.push(e):this.table.rows.splice(t,0,e)}removeRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(e,t)}getColumn(e){const t=this.table.columns[e];return new i(this,t,e)}addColumn(e,t,r){this.cacheState(),void 0===r?(this.table.columns.push(e),this.table.rows.forEach((e,r)=>{e.push(t[r])})):(this.table.columns.splice(r,0,e),this.table.rows.forEach((e,n)=>{e.splice(r,0,t[n])}))}removeColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(e,t),this.table.rows.forEach(r=>{r.splice(e,t)})}_assign(e,t,r){this.cacheState(),e[t]=r}get ref(){return this.table.ref}set ref(e){this._assign(this.table,"ref",e)}get name(){return this.table.name}set name(e){this.table.name=e}get displayName(){return this.table.displyName||this.table.name}set displayNamename(e){this.table.displayName=e}get headerRow(){return this.table.headerRow}set headerRow(e){this._assign(this.table,"headerRow",e)}get totalsRow(){return this.table.totalsRow}set totalsRow(e){this._assign(this.table,"totalsRow",e)}get theme(){return this.table.style.name}set theme(e){this.table.style.name=e}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(e){this.table.style.showFirstColumn=e}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(e){this.table.style.showLastColumn=e}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(e){this.table.style.showRowStripes=e}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(e){this.table.style.showColumnStripes=e}}},{"../utils/col-cache":19}],13:[function(e,t,r){const n=e("./worksheet"),i=e("./defined-names"),s=e("../xlsx/xlsx"),a=e("../csv/csv");t.exports=class{constructor(){this.category="",this.company="",this.created=/* @__PURE__ */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 i}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new a(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,t){const r=this.nextId;t&&("string"==typeof t?t={properties:{tabColor:{argb:t}}}:(t.argb||t.theme||t.indexed)&&(t={properties:{tabColor:t}}));const i=this._worksheets.reduce((e,t)=>(t&&t.orderNo)>e?t.orderNo:e,0),s=new n(Object.assign({},t,{id:r,name:e,orderNo:i+1,workbook:this}));return this._worksheets[r]=s,s}removeWorksheetEx(e){delete this._worksheets[e.id]}removeWorksheet(e){const t=this.getWorksheet(e);t&&t.destroy()}getWorksheet(e){return void 0===e?this._worksheets.find(Boolean):"number"==typeof e?this._worksheets[e]:"string"==typeof e?this._worksheets.find(t=>t&&t.name===e):void 0}get worksheets(){return this._worksheets.slice(1).sort((e,t)=>e.orderNo-t.orderNo).filter(Boolean)}eachSheet(e){this.worksheets.forEach(t=>{e(t,t.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(e){const t=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),t}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(t=>{const{id:r,name:i,state:s}=t,a=e.sheets&&e.sheets.findIndex(e=>e.id===r);(this._worksheets[r]=new n({id:r,name:i,orderNo:a,state:s,workbook:this})).model=t}),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(e,t,r){const n=e("../utils/under-dash"),i=e("../utils/col-cache"),s=e("./range"),a=e("./row"),o=e("./column"),l=e("./enums"),u=e("./image"),c=e("./table"),h=e("./data-validations"),f=e("../utils/encryptor"),{copyStyle:d}=e("../utils/copy-style");t.exports=class{constructor(e){e=e||{},this._workbook=e.workbook,this.id=e.id,this.orderNo=e.orderNo,this.name=e.name,this.state=e.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},e.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:!(!e.pageSetup||!e.pageSetup.fitToWidth&&!e.pageSetup.fitToHeight||e.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},e.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},e.headerFooter),this.dataValidations=new h,this.views=e.views||[],this.autoFilter=e.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(e){if(void 0===e&&(e="sheet"+this.id),this._name!==e){if("string"!=typeof e)throw new Error("The name has to be a string.");if(""===e)throw new Error("The name can't be empty.");if("History"===e)throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(e))throw new Error(`Worksheet name ${e} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(e))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+e);if(e&&e.length>31&&(e=e.substring(0,31)),this._workbook._worksheets.find(t=>t&&t.name.toLowerCase()===e.toLowerCase()))throw new Error("Worksheet name already exists: "+e);this._name=e}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const e=new s;return this._rows.forEach(t=>{if(t){const r=t.dimensions;r&&e.expand(t.number,r.min,t.number,r.max)}}),e}get columns(){return this._columns}set columns(e){this._headerRowCount=e.reduce((e,t)=>{const r=(t.header?1:t.headers&&t.headers.length)||0;return Math.max(e,r)},0);let t=1;const r=this._columns=[];e.forEach(e=>{const n=new o(this,t++,!1);r.push(n),n.defn=e})}getColumnKey(e){return this._keys[e]}setColumnKey(e,t){this._keys[e]=t}deleteColumnKey(e){delete this._keys[e]}eachColumnKey(e){n.each(this._keys,e)}getColumn(e){if("string"==typeof e){const t=this._keys[e];if(t)return t;e=i.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length){let t=this._columns.length+1;for(;t<=e;)this._columns.push(new o(this,t++))}return this._columns[e-1]}spliceColumns(e,t){const r=this._rows.length;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(i.length>0)for(let u=0;u<r;u++){const r=[e,t];i.forEach(e=>{r.push(e[u]||null)});const n=this.getRow(u+1);n.splice.apply(n,r)}else this._rows.forEach(r=>{r&&r.splice(e,t)});const a=i.length-t,o=e+t,l=this._columns.length;if(a<0)for(let u=e+i.length;u<=l;u++)this.getColumn(u).defn=this.getColumn(u-a).defn;else if(a>0)for(let u=l;u>=o;u--)this.getColumn(u+a).defn=this.getColumn(u).defn;for(let u=e;u<e+i.length;u++)this.getColumn(u).defn=null;this.workbook.definedNames.spliceColumns(this.name,e,t,i.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let e=0;return this.eachRow(t=>{e=Math.max(e,t.cellCount)}),e}get actualColumnCount(){const e=[];let t=0;return this.eachRow(r=>{r.eachCell(r=>{let{col:n}=r;e[n]||(e[n]=!0,t++)})}),t}_commitRow(){}get _lastRowNumber(){const e=this._rows;let t=e.length;for(;t>0&&void 0===e[t-1];)t--;return t}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(e){return this._rows[e-1]}findRows(e,t){return this._rows.slice(e-1,e-1+t)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let e=0;return this.eachRow(()=>{e++}),e}getRow(e){let t=this._rows[e-1];return t||(t=this._rows[e-1]=new a(this,e)),t}getRows(e,t){if(t<1)return;const r=[];for(let n=e;n<e+t;n++)r.push(this.getRow(n));return r}addRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=this._nextRow,n=this.getRow(r);return n.values=e,this._setStyleOption(r,"i"===t[0]?t:"n"),n}addRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";const r=[];return e.forEach(e=>{r.push(this.addRow(e,t))}),r}insertRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";return this.spliceRows(e,0,t),this._setStyleOption(e,r),this.getRow(e)}insertRows(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";if(this.spliceRows(e,0,...t),"n"!==r)for(let n=0;n<t.length;n++)"o"===r[0]&&void 0!==this.findRow(t.length+e+n)?this._copyStyle(t.length+e+n,e+n,"+"===r[1]):"i"===r[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e+n,"+"===r[1]);return this.getRows(e,t.length)}_setStyleOption(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n";"o"===t[0]&&void 0!==this.findRow(e+1)?this._copyStyle(e+1,e,"+"===t[1]):"i"===t[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e,"+"===t[1])}_copyStyle(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.getRow(e),i=this.getRow(t);i.style=d(n.style),n.eachCell({includeEmpty:r},(e,t)=>{i.getCell(t).style=d(e.style)}),i.height=n.height}duplicateRow(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this._rows[e-1],i=new Array(t).fill(n.values);this.spliceRows(e+1,r?0:t,...i);for(let s=0;s<t;s++){const t=this._rows[e+s];t.style=n.style,t.height=n.height,n.eachCell({includeEmpty:!0},(e,r)=>{t.getCell(r).style=e.style})}}spliceRows(e,t){const r=e+t;for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];const a=i.length,o=a-t,l=this._rows.length;let u,c;if(o<0)for(e===l&&(this._rows[l-1]=void 0),u=r;u<=l;u++)if(c=this._rows[u-1],c){const e=this.getRow(u+o);e.values=c.values,e.style=c.style,e.height=c.height,c.eachCell({includeEmpty:!0},(t,r)=>{e.getCell(r).style=t.style}),this._rows[u-1]=void 0}else this._rows[u+o-1]=void 0;else if(o>0)for(u=l;u>=r;u--)if(c=this._rows[u-1],c){const e=this.getRow(u+o);e.values=c.values,e.style=c.style,e.height=c.height,c.eachCell({includeEmpty:!0},(t,r)=>{if(e.getCell(r).style=t.style,"MergeValue"===t._value.constructor.name){const e=this.getRow(t._row._number+a).getCell(r),n=t._value._master,i=this.getRow(n._row._number+a).getCell(n._column._number);e.merge(i)}})}else this._rows[u+o-1]=void 0;for(u=0;u<a;u++){const t=this.getRow(e+u);t.style={},t.values=i[u]}this.workbook.definedNames.spliceRows(this.name,e,t,a)}eachRow(e,t){if(t||(t=e,e=void 0),e&&e.includeEmpty){const e=this._rows.length;for(let r=1;r<=e;r++)t(this.getRow(r),r)}else this._rows.forEach(e=>{e&&e.hasValues&&t(e,e.number)})}getSheetValues(){const e=[];return this._rows.forEach(t=>{t&&(e[t.number]=t.values)}),e}findCell(e,t){const r=i.getAddress(e,t),n=this._rows[r.row-1];return n?n.findCell(r.col):void 0}getCell(e,t){const r=i.getAddress(e,t);return this.getRow(r.row).getCellEx(r)}mergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new s(t);this._mergeCellsInternal(n)}mergeCellsWithoutStyle(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new s(t);this._mergeCellsInternal(n,!0)}_mergeCellsInternal(e,t){n.each(this._merges,t=>{if(t.intersects(e))throw new Error("Cannot merge already merged cells")});const r=this.getCell(e.top,e.left);for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++)(n>e.top||i>e.left)&&this.getCell(n,i).merge(r,t);this._merges[r.address]=e}_unMergeMaster(e){const t=this._merges[e.address];if(t){for(let e=t.top;e<=t.bottom;e++)for(let r=t.left;r<=t.right;r++)this.getCell(e,r).unmerge();delete this._merges[e.address]}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=new s(t);for(let i=n.top;i<=n.bottom;i++)for(let e=n.left;e<=n.right;e++){const t=this.findCell(i,e);t&&(t.type===l.ValueType.Merge?this._unMergeMaster(t.master):this._merges[t.address]&&this._unMergeMaster(t))}}fillFormula(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"shared";const{top:s,left:a,bottom:o,right:l}=i.decode(e),u=l-a+1,c=i.encodeAddress(s,a),h="shared"===n;let f;f="function"==typeof r?r:Array.isArray(r)?Array.isArray(r[0])?(e,t)=>r[e-s][t-a]:(e,t)=>r[(e-s)*u+(t-a)]:()=>{};let d=!0;for(let i=s;i<=o;i++)for(let r=a;r<=l;r++)d?(this.getCell(i,r).value={shareType:n,formula:t,ref:e,result:f(i,r)},d=!1):this.getCell(i,r).value=h?{sharedFormula:c,result:f(i,r)}:f(i,r)}addImage(e,t){const r={type:"image",imageId:e,range:t};this._media.push(new u(this,r))}getImages(){return this._media.filter(e=>"image"===e.type)}addBackgroundImage(e){const t={type:"background",imageId:e};this._media.push(new u(this,t))}getBackgroundImageId(){const e=this._media.find(e=>"background"===e.type);return e&&e.imageId}protect(e,t){return new Promise(r=>{this.sheetProtection={sheet:!0},t&&"spinCount"in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=f.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=t&&"spinCount"in t?t.spinCount:1e5,this.sheetProtection.hashValue=f.convertPasswordToHash(e,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),t&&(this.sheetProtection=Object.assign(this.sheetProtection,t),!e&&"spinCount"in t&&delete this.sheetProtection.spinCount),r()})}unprotect(){this.sheetProtection=null}addTable(e){const t=new c(this,e);return this.tables[e.name]=t,t}getTable(e){return this.tables[e]}removeTable(e){delete this.tables[e]}getTables(){return Object.values(this.tables)}addConditionalFormatting(e){this.conditionalFormattings.push(e)}removeConditionalFormatting(e){"number"==typeof e?this.conditionalFormattings.splice(e,1):this.conditionalFormattings=e instanceof Function?this.conditionalFormattings.filter(e):[]}get tabColor(){return this.properties.tabColor}set tabColor(e){this.properties.tabColor=e}get model(){const e={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(e=>e.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(e=>e.model),conditionalFormattings:this.conditionalFormattings};e.cols=o.toModel(this.columns);const t=e.rows=[],r=e.dimensions=new s;return this._rows.forEach(e=>{const n=e&&e.model;n&&(r.expand(n.number,n.min,n.number,n.max),t.push(n))}),e.merges=[],n.each(this._merges,t=>{e.merges.push(t.range)}),e}_parseRows(e){this._rows=[],e.rows.forEach(e=>{const t=new a(this,e.number);this._rows[t.number-1]=t,t.model=e})}_parseMergeCells(e){n.each(e.mergeCells,e=>{this.mergeCellsWithoutStyle(e)})}set model(e){this.name=e.name,this._columns=o.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new h(e.dataValidations),this.properties=e.properties,this.pageSetup=e.pageSetup,this.headerFooter=e.headerFooter,this.views=e.views,this.autoFilter=e.autoFilter,this._media=e.media.map(e=>new u(this,e)),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce((e,t)=>{const r=new c;return r.model=t,e[t.name]=r,e},{}),this.conditionalFormattings=e.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(e,t,r){e("core-js/modules/es.promise"),e("core-js/modules/es.promise.finally"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");const n={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach(e=>{n[e]=i[e]}),t.exports=n},{"./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(e,t,r){const n="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");r.bufferToString=function(e){return"string"==typeof e?e:n?n.decode(e):e.toString()}},{}],17:[function(e,t,r){const n="undefined"==typeof TextEncoder?null:new TextEncoder("utf-8"),{Buffer:i}=e("buffer");r.stringToBuffer=function(e){return"string"!=typeof e?e:n?i.from(n.encode(e).buffer):i.from(e)}},{buffer:220}],18:[function(e,t,r){const n=e("./under-dash"),i=e("./col-cache");t.exports=class{constructor(e){this.template=e,this.sheets={}}addCell(e){this.addCellEx(i.decodeEx(e))}getCell(e){return this.findCellEx(i.decodeEx(e),!0)}findCell(e){return this.findCellEx(i.decodeEx(e),!1)}findCellAt(e,t,r){const n=this.sheets[e],i=n&&n[t];return i&&i[r]}addCellEx(e){if(e.top)for(let t=e.top;t<=e.bottom;t++)for(let r=e.left;r<=e.right;r++)this.getCellAt(e.sheetName,t,r);else this.findCellEx(e,!0)}getCellEx(e){return this.findCellEx(e,!0)}findCellEx(e,t){const r=this.findSheet(e,t),n=this.findSheetRow(r,e,t);return this.findRowCell(n,e,t)}getCellAt(e,t,r){const n=this.sheets[e]||(this.sheets[e]=[]),s=n[t]||(n[t]=[]);return s[r]||(s[r]={sheetName:e,address:i.n2l(r)+t,row:t,col:r})}removeCellEx(e){const t=this.findSheet(e);if(!t)return;const r=this.findSheetRow(t,e);r&&delete r[e.col]}forEachInSheet(e,t){const r=this.sheets[e];r&&r.forEach((e,r)=>{e&&e.forEach((e,n)=>{e&&t(e,r,n)})})}forEach(e){n.each(this.sheets,(t,r)=>{this.forEachInSheet(r,e)})}map(e){const t=[];return this.forEach(r=>{t.push(e(r))}),t}findSheet(e,t){const r=e.sheetName;return this.sheets[r]?this.sheets[r]:t?this.sheets[r]=[]:void 0}findSheetRow(e,t,r){const{row:n}=t;return e&&e[n]?e[n]:r?e[n]=[]:void 0}findRowCell(e,t,r){const{col:n}=t;return e&&e[n]?e[n]:r?e[n]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}spliceRows(e,t,r,n){const i=this.sheets[e];if(i){const e=[];for(let t=0;t<n;t++)e.push([]);i.splice(t,r,...e)}}spliceColumns(e,t,r,i){const s=this.sheets[e];if(s){const e=[];for(let t=0;t<i;t++)e.push(null);n.each(s,n=>{n.splice(t,r,...e)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(e,t,r){const n=/^[A-Z]+\d+$/,i={_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:e=>e<=26?1:e<=676?2:3,_fill(e){let t,r,n,i,s,a=1;if(e>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&e>=1){for(;a<=26;)t=this._dictionary[a-1],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&e>=2){for(a=27;a<=702;)r=a-27,n=r%26,i=Math.floor(r/26),t=this._dictionary[i]+this._dictionary[n],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&e>=3){for(a=703;a<=16384;)r=a-703,n=r%26,i=Math.floor(r/26)%26,s=Math.floor(r/676),t=this._dictionary[s]+this._dictionary[i]+this._dictionary[n],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=3}},l2n(e){if(this._l2n[e]||this._fill(e.length),!this._l2n[e])throw new Error("Out of bounds. Invalid column letter: "+e);return this._l2n[e]},n2l(e){if(e<1||e>16384)throw new Error(e+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress(e){if(!n.test(e))throw new Error("Invalid Address: "+e);return!0},decodeAddress(e){const t=e.length<5&&this._hash[e];if(t)return t;let r=!1,n="",i=0,s=!1,a="",o=0;for(let u,c=0;c<e.length;c++)if(u=e.charCodeAt(c),!s&&u>=65&&u<=90)r=!0,n+=e[c],i=26*i+u-64;else if(u>=48&&u<=57)s=!0,a+=e[c],o=10*o+u-48;else if(s&&r&&36!==u)break;if(r){if(i>16384)throw new Error("Out of bounds. Invalid column letter: "+n)}else i=void 0;s||(o=void 0);const l={address:e=n+a,col:i,row:o,$col$row:`$${n}$${a}`};return i<=100&&o<=100&&(this._hash[e]=l,this._hash[l.$col$row]=l),l},getAddress(e,t){if(t){const r=this.n2l(t)+e;return this.decodeAddress(r)}return this.decodeAddress(e)},decode(e){const t=e.split(":");if(2===t.length){const e=this.decodeAddress(t[0]),r=this.decodeAddress(t[1]),n={top:Math.min(e.row,r.row),left:Math.min(e.col,r.col),bottom:Math.max(e.row,r.row),right:Math.max(e.col,r.col)};return n.tl=this.n2l(n.left)+n.top,n.br=this.n2l(n.right)+n.bottom,n.dimensions=`${n.tl}:${n.br}`,n}return this.decodeAddress(e)},decodeEx(e){const t=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=t[1]||t[2],n=t[3],i=n.split(":");if(i.length>1){let e=this.decodeAddress(i[0]),t=this.decodeAddress(i[1]);const n=Math.min(e.row,t.row),s=Math.min(e.col,t.col),a=Math.max(e.row,t.row),o=Math.max(e.col,t.col);return e=this.n2l(s)+n,t=this.n2l(o)+a,{top:n,left:s,bottom:a,right:o,sheetName:r,tl:{address:e,col:s,row:n,$col$row:`$${this.n2l(s)}$${n}`,sheetName:r},br:{address:t,col:o,row:a,$col$row:`$${this.n2l(o)}$${a}`,sheetName:r},dimensions:`${e}:${t}`}}if(n.startsWith("#"))return r?{sheetName:r,error:n}:{error:n};const s=this.decodeAddress(n);return r?{sheetName:r,...s}:s},encodeAddress:(e,t)=>i.n2l(t)+e,encode(){switch(arguments.length){case 2:return i.encodeAddress(arguments[0],arguments[1]);case 4:return`${i.encodeAddress(arguments[0],arguments[1])}:${i.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(e,t){const[r,n,,i,s]=e,[a,o]=t;return a>=r&&a<=i&&o>=n&&o<=s}};t.exports=i},{}],20:[function(e,t,r){const n=(e,t)=>({...e,...t.reduce((t,r)=>(e[r]&&(t[r]={...e[r]}),t),{})}),i=function(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];e[r]&&(t[r]=n(e[r],i))};r.copyStyle=e=>{if(!e)return e;if(t=e,0===Object.keys(t).length)return{};var t;const r={...e};return i(e,r,"font",["color"]),i(e,r,"alignment"),i(e,r,"protection"),e.border&&(i(e,r,"border"),i(e.border,r.border,"top",["color"]),i(e.border,r.border,"left",["color"]),i(e.border,r.border,"bottom",["color"]),i(e.border,r.border,"right",["color"]),i(e.border,r.border,"diagonal",["color"])),e.fill&&(i(e,r,"fill",["fgColor","bgColor","center"]),e.fill.stops&&(r.fill.stops=e.fill.stops.map(e=>n(e,["color"])))),r}},{}],21:[function(e,t,r){(function(r){(function(){const n=e("crypto");t.exports={hash(e){const t=n.createHash(e);for(var i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return t.update(r.concat(s)),t.digest()},convertPasswordToHash(e,t,i,s){if(t=t.toLowerCase(),n.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);const a=r.from(e,"utf16le");let o=this.hash(t,r.from(i,"base64"),a);for(let n=0;n<s;n++){const e=r.alloc(4);e.writeUInt32LE(n,0),o=this.hash(t,o,e)}return o.toString("base64")},randomBytes:e=>n.randomBytes(e)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(e,t,r){const{SaxesParser:n}=e("saxes"),{PassThrough:i}=e("readable-stream"),{bufferToString:s}=e("./browser-buffer-decode");t.exports=async function*(e){e.pipe&&!e[Symbol.asyncIterator]&&(e=e.pipe(new i));const t=new n;let r;t.on("error",e=>{r=e});let a=[];t.on("opentag",e=>a.push({eventType:"opentag",value:e})),t.on("text",e=>a.push({eventType:"text",value:e})),t.on("closetag",e=>a.push({eventType:"closetag",value:e}));for await(const n of e){if(t.write(s(n)),r)throw r;yield a,a=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,t,r){const n=e("./col-cache"),i=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(e,t,r){const a=n.decode(t),o=n.decode(r);return e.replace(i,(e,t,r,i,l)=>{if(l)return e;const u=s.exec(i);if(u){const r=u[1],i=u[2].toUpperCase(),s=u[3],l=u[4];if(i.length>3||3===i.length&&i>"XFD")return e;let c=n.l2n(i),h=parseInt(l,10);return r||(c+=o.col-a.col),s||(h+=o.row-a.row),(t||"")+(r||"")+n.n2l(c)+(s||"")+h}return e})}}},{"./col-cache":19}],24:[function(e,t,r){(function(r,n){(function(){const i=e("readable-stream"),s=e("./utils"),a=e("./string-buf");class o{constructor(e,t){this._data=e,this._encoding=t}get length(){return this.toBuffer().length}copy(e,t,r,n){return this.toBuffer().copy(e,t,r,n)}toBuffer(){return this._buffer||(this._buffer=n.from(this._data,this._encoding)),this._buffer}}class l{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){return this._data._buf.copy(e,t,r,n)}toBuffer(){return this._data.toBuffer()}}class u{constructor(e){this._data=e}get length(){return this._data.length}copy(e,t,r,n){this._data.copy(e,t,r,n)}toBuffer(){return this._data}}class c{constructor(e){this.size=e,this.buffer=n.alloc(e),this.iRead=0,this.iWrite=0}toBuffer(){if(0===this.iRead&&this.iWrite===this.size)return this.buffer;const e=n.alloc(this.iWrite-this.iRead);return this.buffer.copy(e,0,this.iRead,this.iWrite),e}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(e){let t;return 0===e?null:void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite,t):(t=n.alloc(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e,t)}write(e,t,r){const n=Math.min(r,this.size-this.iWrite);return e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}}const h=function(e){e=e||{},this.bufSize=e.bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};s.inherits(h,i.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map(e=>e.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const e=this.buffers[this.buffers.length-1];if(!e.full)return e}const e=new c(this.bufSize);return this.buffers.push(e),e},async _pipe(e){await Promise.all(this.pipes.map(function(t){return new Promise(r=>{t.write(e.toBuffer(),()=>{r()})})}))},_writeToBuffers(e){let t=0;const r=e.length;for(;t<r;)t+=this._getWritableBuffer().write(e,t,r-t)},async write(e,t,i){let c;if(t instanceof Function&&(i=t,t="utf8"),i=i||s.nop,e instanceof a)c=new l(e);else if(e instanceof n)c=new u(e);else{if(!("string"==typeof e||e instanceof String||e instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");c=new o(e,t)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(c);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(c),r.nextTick(i)):(await this._pipe(c),i());else this.paused||this.emit("data",c.toBuffer()),this._writeToBuffers(c),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(e,t,r){const n=e=>{e?r(e):(this._flush(),this.pipes.forEach(e=>{e.end()}),this.emit("finish"))};e?this.write(e,t,n):n()},read(e){let t;if(e){for(t=[];e&&this.buffers.length&&!this.buffers[0].eod;){const r=this.buffers[0],n=r.read(e);e-=n.length,t.push(n),r.eod&&r.full&&this.buffers.shift()}return n.concat(t)}return t=this.buffers.map(e=>e.toBuffer()).filter(Boolean),this.buffers=[],n.concat(t)},setEncoding(e){this.encoding=e},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe(e){this.pipes=this.pipes.filter(t=>t!==e)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),t.exports=h}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(e,t,r){(function(e){(function(){t.exports=class{constructor(t){this._buf=e.alloc(t&&t.size||16384),this._encoding=t&&t.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=e.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(e){e=e||0,this._buffer=void 0,this._inPos=e}_grow(t){let r=2*this._buf.length;for(;r<t;)r*=2;const n=e.alloc(r);this._buf.copy(n,0),this._buf=n}addText(e){this._buffer=void 0;let t=this._inPos+this._buf.write(e,this._inPos,this._encoding);for(;t>=this._buf.length-4;)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t}addStringBuf(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),e._buf.copy(this._buf,this._inPos,0,e.length),this._inPos+=e.length)}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],26:[function(e,t,r){const{toString:n}=Object.prototype,i=/["&<>]/,s={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach(r=>{t(e[r],r)}))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some(r=>t(e[r],r)))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every(r=>t(e[r],r)))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map(r=>t(e[r],r)):[]},keyBy:(e,t)=>e.reduce((e,r)=>(e[r[t]]=r,e),{}),isEqual:function(e,t){const r=typeof e,n=typeof t,i=Array.isArray(e),a=Array.isArray(t);let o;if(r!==n)return!1;if("object"==typeof e){if(i||a)return!(!i||!a)&&e.length===t.length&&e.every((e,r)=>{const n=t[r];return s.isEqual(e,n)});if(null===e||null===t)return e===t;if(o=Object.keys(e),Object.keys(t).length!==o.length)return!1;for(const e of o)if(!t.hasOwnProperty(e))return!1;return s.every(e,(e,r)=>{const n=t[r];return s.isEqual(e,n)})}return e===t},escapeHtml(e){const t=i.exec(e);if(!t)return e;let r="",n="",s=0,a=t.index;for(;a<e.length;a++){switch(e.charAt(a)){case'"':n="&quot;";break;case"&":n="&amp;";break;case"'":n="&apos;";break;case"<":n="&lt;";break;case">":n="&gt;";break;default:continue}s!==a&&(r+=e.substring(s,a)),s=a+1,r+=n}return s!==a?r+e.substring(s,a):r},strcmp:(e,t)=>e<t?-1:e>t?1:0,isUndefined:e=>"[object Undefined]"===n.call(e),isObject:e=>"[object Object]"===n.call(e),deepMerge(){const e=arguments[0]||{},{length:t}=arguments;let r,n,i;function a(t,a){r=e[a],i=Array.isArray(t),s.isObject(t)||i?(i?(i=!1,n=r&&Array.isArray(r)?r:[]):n=r&&s.isObject(r)?r:{},e[a]=s.deepMerge(n,t)):s.isUndefined(t)||(e[a]=t)}for(let o=0;o<t;o++)s.each(arguments[o],a);return e}};t.exports=s},{}],27:[function(e,t,r){(function(r,n){(function(){const i=e("fs"),s=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,a={nop(){},promiseImmediate:e=>new Promise(t=>{r.setImmediate?n(()=>{t(e)}):setTimeout(()=>{t(e)},1)}),inherits:function(e,t,r,n){e.super_=t,n||(n=r,r=null),r&&Object.keys(r).forEach(t=>{Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))});const i={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach(e=>{i[e]=Object.getOwnPropertyDescriptor(n,e)}),e.prototype=Object.create(t.prototype,i)},dateToExcel:(e,t)=>25569+e.getTime()/864e5-(t?1462:0),excelToDate(e,t){const r=Math.round(24*(e-25569+(t?1462:0))*3600*1e3);return new Date(r)},parsePath(e){const t=e.lastIndexOf("/");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath(e){const t=a.parsePath(e);return`${t.path}/_rels/${t.name}.rels`},xmlEncode(e){const t=s.exec(e);if(!t)return e;let r="",n="",i=0,a=t.index;for(;a<e.length;a++){const t=e.charCodeAt(a);switch(t){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&apos;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;case 127:n="";break;default:if(t<=31&&(t<=8||t>=11&&13!==t)){n="";break}continue}i!==a&&(r+=e.substring(i,a)),i=a+1,n&&(r+=n)}return i!==a?r+e.substring(i,a):r},xmlDecode:e=>e.replace(/&([a-z]*);/g,e=>{switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return e}}),validInt(e){const t=parseInt(e,10);return Number.isNaN(t)?0:t},isDateFmt:e=>!!e&&null!==(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/),fs:{exists:e=>new Promise(t=>{i.access(e,i.constants.F_OK,e=>{t(!e)})})},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>!0===e||"true"===e||1===e||"1"===e};t.exports=a}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{fs:216,timers:523}],28:[function(e,t,r){const n=e("./under-dash"),i=e("./utils");function s(e,t,r){e.push(` ${t}="${i.xmlEncode(r.toString())}"`)}function a(e,t){if(t){const r=[];n.each(t,(e,t)=>{void 0!==e&&s(r,t,e)}),e.push(r.join(""))}}class o{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(e){const t=this._xml;t.push("<?xml"),a(t,e),t.push("?>\n")}openNode(e,t){const r=this.tos,n=this._xml;r&&this.open&&n.push(">"),this._stack.push(e),n.push("<"),n.push(e),a(n,t),this.leaf=!0,this.open=!0}addAttribute(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");void 0!==t&&s(this._xml,e,t)}addAttributes(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");a(this._xml,e)}writeText(e){const t=this._xml;this.open&&(t.push(">"),this.open=!1),this.leaf=!1,t.push(i.xmlEncode(e.toString()))}writeXml(e){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(e)}closeNode(){const e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("</"),t.push(e),t.push(">")),this.open=!1,this.leaf=!1}leafNode(e,t,r){this.openNode(e,t),void 0!==r&&this.writeText(r),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 e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}get xml(){return this.closeAll(),this._xml.join("")}}o.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},t.exports=o},{"./under-dash":26,"./utils":27}],29:[function(e,t,r){(function(r){(function(){const n=e("events"),i=e("jszip"),s=e("./stream-buf"),{stringToBuffer:a}=e("./browser-buffer-encode");class o extends n.EventEmitter{constructor(e){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},e),this.zip=new i,this.stream=new s}append(e,t){t.hasOwnProperty("base64")&&t.base64?this.zip.file(t.name,e,{base64:!0}):(r.browser&&"string"==typeof e&&(e=a(e)),this.zip.file(t.name,e))}async finalize(){const e=await this.zip.generateAsync(this.options);this.stream.end(e),this.emit("finish")}read(e){return this.stream.read(e)}setEncoding(e){return this.stream.setEncoding(e)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(e,t){return this.stream.pipe(e,t)}unpipe(e){return this.stream.unpipe(e)}unshift(e){return this.stream.unshift(e)}wrap(e){return this.stream.wrap(e)}}t.exports={ZipWriter:o}}).call(this)}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(e,t,r){t.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(e,t,r){t.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(e,t,r){const n=e("../../utils/parse-sax"),i=e("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(e){}parseText(e){}parseClose(e){}reconcile(e,t){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(e=>{e instanceof s?e.reset():e.xform&&e.xform.reset()})}mergeModel(e){this.model=Object.assign(this.model||{},e)}async parse(e){for await(const t of e)for(const{eventType:e,value:r}of t)if("opentag"===e)this.parseOpen(r);else if("text"===e)this.parseText(r);else if("closetag"===e&&!this.parseClose(r.name))return this.model;return this.model}async parseStream(e){return this.parse(n(e))}get xml(){return this.toXml(this.model)}toXml(e){const t=new i;return this.render(t,e),t.xml}static toAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(r)return t}else if(r||e!==t)return e.toString()}static toStringAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toStringValue(e,t){return void 0===e?t:e}static toBoolAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(r)return t}else if(r||e!==t)return e?"1":"0"}static toBoolValue(e,t){return void 0===e?t:"1"===e}static toIntAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toIntValue(e,t){return void 0===e?t:parseInt(e,10)}static toFloatAttribute(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return s.toAttribute(e,t,r)}static toFloatValue(e,t){return void 0===e?t:parseFloat(e)}}t.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,t,r){const n=e("../base-xform"),i=e("../../../utils/col-cache");function s(e){try{return i.decodeEx(e),!0}catch(t){return!1}}function a(e){const t=[];let r=!1,n="";return e.split(",").forEach(e=>{if(!e)return;const i=(e.match(/'/g)||[]).length;if(!i)return void(r?n+=e+",":s(e)&&t.push(e));const a=i%2==0;!r&&a&&s(e)?t.push(e):r&&!a?(r=!1,s(n+e)&&t.push(n+e),n=""):(r=!0,n+=e+",")}),t}t.exports=class extends n{render(e,t){e.openNode("definedName",{name:t.name,localSheetId:t.localSheetId}),e.writeText(t.ranges.join(",")),e.closeNode()}parseOpen(e){return"definedName"===e.name&&(this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0)}parseText(e){this._parsedText.push(e)}parseClose(){return this.model={name:this._parsedName,ranges:a(this._parsedText.join(""))},void 0!==this._parsedLocalSheetId&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,t,r){const n=e("../../../utils/utils"),i=e("../base-xform");t.exports=class extends i{render(e,t){e.leafNode("sheet",{sheetId:t.id,name:t.name,state:t.state,"r:id":t.rId})}parseOpen(e){return"sheet"===e.name&&(this.model={name:n.xmlDecode(e.attributes.name),id:parseInt(e.attributes.sheetId,10),state:e.attributes.state,rId:e.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){e.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:t.fullCalcOnLoad?1:void 0})}parseOpen(e){return"calcPr"===e.name&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){e.leafNode("workbookPr",{date1904:t.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(e){return"workbookPr"===e.name&&(this.model={date1904:"1"===e.attributes.date1904},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){const r={xWindow:t.x||0,yWindow:t.y||0,windowWidth:t.width||12e3,windowHeight:t.height||24e3,firstSheet:t.firstSheet,activeTab:t.activeTab};t.visibility&&"visible"!==t.visibility&&(r.visibility=t.visibility),e.leafNode("workbookView",r)}parseOpen(e){if("workbookView"===e.name){const t=this.model={},r=function(e,r,n){const i=void 0!==r?t[e]=r:n;void 0!==i&&(t[e]=i)},n=function(e,r,n){const i=void 0!==r?t[e]=parseInt(r,10):n;void 0!==i&&(t[e]=i)};return n("x",e.attributes.xWindow,0),n("y",e.attributes.yWindow,0),n("width",e.attributes.windowWidth,25e3),n("height",e.attributes.windowHeight,1e4),r("visibility",e.attributes.visibility,"visible"),n("activeTab",e.attributes.activeTab,void 0),n("firstSheet",e.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),a=e("../base-xform"),o=e("../static-xform"),l=e("../list-xform"),u=e("./defined-name-xform"),c=e("./sheet-xform"),h=e("./workbook-view-xform"),f=e("./workbook-properties-xform"),d=e("./workbook-calc-properties-xform");class p extends a{constructor(){super(),this.map={fileVersion:p.STATIC_XFORMS.fileVersion,workbookPr:new f,bookViews:new l({tag:"bookViews",count:!1,childXform:new h}),sheets:new l({tag:"sheets",count:!1,childXform:new c}),definedNames:new l({tag:"definedNames",count:!1,childXform:new u}),calcPr:new d}}prepare(e){e.sheets=e.worksheets;const t=[];let r=0;e.sheets.forEach(e=>{if(e.pageSetup&&e.pageSetup.printArea&&e.pageSetup.printArea.split("&&").forEach(n=>{const i=n.split(":"),s={name:"_xlnm.Print_Area",ranges:[`'${e.name}'!$${i[0]}:$${i[1]}`],localSheetId:r};t.push(s)}),e.pageSetup&&(e.pageSetup.printTitlesRow||e.pageSetup.printTitlesColumn)){const n=[];if(e.pageSetup.printTitlesColumn){const t=e.pageSetup.printTitlesColumn.split(":");n.push(`'${e.name}'!$${t[0]}:$${t[1]}`)}if(e.pageSetup.printTitlesRow){const t=e.pageSetup.printTitlesRow.split(":");n.push(`'${e.name}'!$${t[0]}:$${t[1]}`)}const i={name:"_xlnm.Print_Titles",ranges:n,localSheetId:r};t.push(i)}r++}),t.length&&(e.definedNames=e.definedNames.concat(t)),(e.media||[]).forEach((e,t)=>{e.name=e.type+(t+1)})}render(e,t){e.openXml(s.StdDocAttributes),e.openNode("workbook",p.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(e),this.map.workbookPr.render(e,t.properties),this.map.bookViews.render(e,t.views),this.map.sheets.render(e,t.sheets),this.map.definedNames.render(e,t.definedNames),this.map.calcPr.render(e,t.calcProperties),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):("workbook"===e.name||(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):"workbook"!==e||(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)}reconcile(e){const t=(e.workbookRels||[]).reduce((e,t)=>(e[t.Id]=t,e),{}),r=[];let s,a=0;(e.sheets||[]).forEach(n=>{const i=t[n.rId];i&&(s=e.worksheetHash["xl/"+i.Target.replace(/^(\s|\/xl\/)+/,"")],s&&(s.name=n.name,s.id=n.id,s.state=n.state,r[a++]=s))});const o=[];n.each(e.definedNames,e=>{if("_xlnm.Print_Area"===e.name){if(s=r[e.localSheetId],s){s.pageSetup||(s.pageSetup={});const t=i.decodeEx(e.ranges[0]);s.pageSetup.printArea=s.pageSetup.printArea?`${s.pageSetup.printArea}&&${t.dimensions}`:t.dimensions}}else if("_xlnm.Print_Titles"===e.name){if(s=r[e.localSheetId],s){s.pageSetup||(s.pageSetup={});const t=e.ranges.join(","),r=/\$/g,n=t.match(/\$\d+:\$\d+/);if(n&&n.length){const e=n[0];s.pageSetup.printTitlesRow=e.replace(r,"")}const i=t.match(/\$[A-Z]+:\$[A-Z]+/);if(i&&i.length){const e=i[0];s.pageSetup.printTitlesColumn=e.replace(r,"")}}}else o.push(e)}),e.definedNames=o,e.media.forEach((e,t)=>{e.index=t})}}p.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"},p.STATIC_XFORMS={fileVersion:new o({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},t.exports=p},{"../../../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(e,t,r){const n=e("../strings/rich-text-xform"),i=e("../../../utils/utils"),s=e("../base-xform"),a=t.exports=function(e){this.model=e};i.inherits(a,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new n),this._richTextXform},render(e,t){t=t||this.model,e.openNode("comment",{ref:t.ref,authorId:0}),e.openNode("text"),t&&t.note&&t.note.texts&&t.note.texts.forEach(t=>{this.richTextXform.render(e,t)}),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(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../../../utils/utils"),s=e("../base-xform"),a=e("./comment-xform"),o=t.exports=function(){this.map={comment:new a}};i.inherits(o,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(e,t){t=t||this.model,e.openXml(n.StdDocAttributes),e.openNode("comments",o.COMMENTS_ATTRIBUTES),e.openNode("authors"),e.leafNode("author",null,"Author"),e.closeNode(),e.openNode("commentList"),t.comments.forEach(t=>{this.map.comment.render(e,t)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){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(e),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,t,r){(t===r[2]||"x:SizeWithCells"===this.tag&&t===r[1])&&e.leafNode(this.tag)}parseOpen(e){return e.name===this.tag&&(this.model={},this.model[this.tag]=!0,!0)}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{constructor(e){super(),this._model=e}get tag(){return this._model&&this._model.tag}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(e){return e.name===this.tag&&(this.text="",!0)}parseText(e){this.text=e}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"x:Anchor"}getAnchorRect(e){const t=Math.floor(e.left),r=Math.floor(68*(e.left-t)),n=Math.floor(e.top),i=Math.floor(18*(e.top-n)),s=Math.floor(e.right),a=Math.floor(68*(e.right-s)),o=Math.floor(e.bottom);return[t,r,n,i,s,a,o,Math.floor(18*(e.bottom-o))]}getDefaultRect(e){const t=e.col,r=Math.max(e.row-2,0);return[t,6,r,14,t+2,2,r+4,16]}render(e,t){const r=t.anchor?this.getAnchorRect(t.anchor):this.getDefaultRect(t.refAddress);e.leafNode("x:Anchor",null,r.join(", "))}parseOpen(e){return e.name===this.tag&&(this.text="",!0)}parseText(e){this.text=e}parseClose(){return!1}}},{"../base-xform":32}],44:[function(e,t,r){const n=e("../base-xform"),i=e("./vml-anchor-xform"),s=e("./style/vml-protection-xform"),a=e("./style/vml-position-xform"),o=["twoCells","oneCells","absolute"];t.exports=class extends n{constructor(){super(),this.map={"x:Anchor":new i,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new a({tag:"x:SizeWithCells"}),"x:MoveWithCells":new a({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(e,t){const{protection:r,editAs:n}=t.note;e.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(e,n,o),this.map["x:SizeWithCells"].render(e,n,o),this.map["x:Anchor"].render(e,t),this.map["x:Locked"].render(e,r.locked),e.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(e,r.lockText),e.leafNode("x:Row",null,t.refAddress.row-1),e.leafNode("x:Column",null,t.refAddress.col-1),e.closeNode()}parseOpen(e){if(e.name===this.tag)this.reset(),this.model={anchor:[],protection:{},editAs:""};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.normalizeModel(),!1)}normalizeModel(){const e=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),t=Object.keys(e).length;this.model.editAs=o[t],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(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./vml-shape-xform");class a extends i{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(this.tag,a.DRAWING_ATTRIBUTES),e.openNode("o:shapelayout",{"v:ext":"edit"}),e.leafNode("o:idmap",{"v:ext":"edit",data:1}),e.closeNode(),e.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),e.leafNode("v:stroke",{joinstyle:"miter"}),e.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),e.closeNode(),t.comments.forEach((t,r)=>{this.map["v:shape"].render(e,t,r)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset(),this.model={comments:[]};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}reconcile(e,t){e.anchors.forEach(e=>{e.br?this.map["xdr:twoCellAnchor"].reconcile(e,t):this.map["xdr:oneCellAnchor"].reconcile(e,t)})}}a.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"},t.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,t,r){const n=e("../base-xform"),i=e("./vml-textbox-xform"),s=e("./vml-client-data-xform");class a extends n{constructor(){super(),this.map={"v:textbox":new i,"x:ClientData":new s}}get tag(){return"v:shape"}render(e,t,r){e.openNode("v:shape",a.V_SHAPE_ATTRIBUTES(t,r)),e.leafNode("v:fill",{color2:"infoBackground [80]"}),e.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),e.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(e,t),this.map["x:ClientData"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset(),this.model={margins:{insetmode:e.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(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)}}a.V_SHAPE_ATTRIBUTES=(e,t)=>({id:"_x0000_s"+(1025+t),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}),t.exports=a},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"v:textbox"}conversionUnit(e,t,r){return`${parseFloat(e)*t.toFixed(2)}${r}`}reverseConversionUnit(e){return(e||"").split(",").map(e=>Number(parseFloat(this.conversionUnit(parseFloat(e),.1,"")).toFixed(2)))}render(e,t){const r={style:"mso-direction-alt:auto"};if(t&&t.note){let{inset:e}=t.note&&t.note.margins;Array.isArray(e)&&(e=e.map(e=>this.conversionUnit(e,10,"mm")).join(",")),e&&(r.inset=e)}e.openNode("v:textbox",r),e.leafNode("div",{style:"text-align:left"}),e.closeNode()}parseOpen(e){return e.name!==this.tag||(this.model={inset:this.reverseConversionUnit(e.attributes.inset)},!0)}parseText(){}parseClose(e){return e!==this.tag}}},{"../base-xform":32}],48:[function(e,t,r){const n=e("./base-xform");t.exports=class extends n{createNewModel(e){return{}}parseOpen(e){return this.parser=this.parser||this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag&&(this.model=this.createNewModel(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}onParserClose(e,t){this.model[e]=t.model}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.onParserClose(e,this.parser),this.parser=void 0),!0):e!==this.tag}}},{"./base-xform":32}],49:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){e.openNode("HeadingPairs"),e.openNode("vt:vector",{size:2,baseType:"variant"}),e.openNode("vt:variant"),e.leafNode("vt:lpstr",void 0,"Worksheets"),e.closeNode(),e.openNode("vt:variant"),e.leafNode("vt:i4",void 0,t.length),e.closeNode(),e.closeNode(),e.closeNode()}parseOpen(e){return"HeadingPairs"===e.name}parseText(){}parseClose(e){return"HeadingPairs"!==e}}},{"../base-xform":32}],50:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){e.openNode("TitlesOfParts"),e.openNode("vt:vector",{size:t.length,baseType:"lpstr"}),t.forEach(t=>{e.leafNode("vt:lpstr",void 0,t.name)}),e.closeNode(),e.closeNode()}parseOpen(e){return"TitlesOfParts"===e.name}parseText(){}parseClose(e){return"TitlesOfParts"!==e}}},{"../base-xform":32}],51:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../simple/string-xform"),a=e("./app-heading-pairs-xform"),o=e("./app-titles-of-parts-xform");class l extends i{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new a,TitleOfParts:new o}}render(e,t){e.openXml(n.StdDocAttributes),e.openNode("Properties",l.PROPERTY_ATTRIBUTES),e.leafNode("Application",void 0,"Microsoft Excel"),e.leafNode("DocSecurity",void 0,"0"),e.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(e,t.worksheets),this.map.TitleOfParts.render(e,t.worksheets),this.map.Company.render(e,t.company||""),this.map.Manager.render(e,t.manager),e.leafNode("LinksUpToDate",void 0,"false"),e.leafNode("SharedDoc",void 0,"false"),e.leafNode("HyperlinksChanged",void 0,"false"),e.leafNode("AppVersion",void 0,"16.0300"),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"Properties"===e.name||(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):"Properties"!==e||(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1)}}l.DateFormat=function(e){return e.toISOString().replace(/[.]\d{3,6}/,"")},l.DateAttrs={"xsi:type":"dcterms:W3CDTF"},l.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},t.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform");class s extends i{render(e,t){e.openXml(n.StdDocAttributes),e.openNode("Types",s.PROPERTY_ATTRIBUTES);const r={};(t.media||[]).forEach(t=>{if("image"===t.type){const n=t.extension;r[n]||(r[n]=!0,e.leafNode("Default",{Extension:n,ContentType:"image/"+n}))}}),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"}),t.worksheets.forEach(t=>{const r=`/xl/worksheets/sheet${t.id}.xml`;e.leafNode("Override",{PartName:r,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"}),t.sharedStrings&&t.sharedStrings.count&&e.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),t.tables&&t.tables.forEach(t=>{e.leafNode("Override",{PartName:"/xl/tables/"+t.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),t.drawings&&t.drawings.forEach(t=>{e.leafNode("Override",{PartName:`/xl/drawings/${t.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),t.commentRefs&&(e.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),t.commentRefs.forEach(t=>{let{commentName:r}=t;e.leafNode("Override",{PartName:`/xl/${r}.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}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},t.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../simple/date-xform"),a=e("../simple/string-xform"),o=e("../simple/integer-xform");class l extends i{constructor(){super(),this.map={"dc:creator":new a({tag:"dc:creator"}),"dc:title":new a({tag:"dc:title"}),"dc:subject":new a({tag:"dc:subject"}),"dc:description":new a({tag:"dc:description"}),"dc:identifier":new a({tag:"dc:identifier"}),"dc:language":new a({tag:"dc:language"}),"cp:keywords":new a({tag:"cp:keywords"}),"cp:category":new a({tag:"cp:category"}),"cp:lastModifiedBy":new a({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:l.DateFormat}),"cp:revision":new o({tag:"cp:revision"}),"cp:version":new a({tag:"cp:version"}),"cp:contentStatus":new a({tag:"cp:contentStatus"}),"cp:contentType":new a({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:l.DateAttrs,format:l.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:l.DateAttrs,format:l.DateFormat})}}render(e,t){e.openXml(n.StdDocAttributes),e.openNode("cp:coreProperties",l.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(e,t.creator),this.map["dc:title"].render(e,t.title),this.map["dc:subject"].render(e,t.subject),this.map["dc:description"].render(e,t.description),this.map["dc:identifier"].render(e,t.identifier),this.map["dc:language"].render(e,t.language),this.map["cp:keywords"].render(e,t.keywords),this.map["cp:category"].render(e,t.category),this.map["cp:lastModifiedBy"].render(e,t.lastModifiedBy),this.map["cp:lastPrinted"].render(e,t.lastPrinted),this.map["cp:revision"].render(e,t.revision),this.map["cp:version"].render(e,t.version),this.map["cp:contentStatus"].render(e,t.contentStatus),this.map["cp:contentType"].render(e,t.contentType),this.map["dcterms:created"].render(e,t.created),this.map["dcterms:modified"].render(e,t.modified),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){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: "+e)}}}l.DateFormat=function(e){return e.toISOString().replace(/[.]\d{3}/,"")},l.DateAttrs={"xsi:type":"dcterms:W3CDTF"},l.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"},t.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{render(e,t){e.leafNode("Relationship",t)}parseOpen(e){return"Relationship"===e.name&&(this.model=e.attributes,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./relationship-xform");class a extends i{constructor(){super(),this.map={Relationship:new s}}render(e,t){t=t||this._values,e.openXml(n.StdDocAttributes),e.openNode("Relationships",a.RELATIONSHIPS_ATTRIBUTES),t.forEach(t=>{this.map.Relationship.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if("Relationships"===e.name)return this.model=[],!0;if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0),!0;if("Relationships"===e)return!1;throw new Error("Unexpected xml node in parseClose: "+e)}}a.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset(),this.model={range:{editAs:e.attributes.editAs||"oneCell"}};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}reconcilePicture(e,t){if(e&&e.rId){const r=t.rels[e.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){const e=r[1],n=t.mediaIndex[e];return t.media[n]}}}}},{"../base-xform":32}],57:[function(e,t,r){const n=e("../base-xform"),i=e("./blip-xform");t.exports=class extends n{constructor(){super(),this.map={"a:blip":new i}}get tag(){return"xdr:blipFill"}render(e,t){e.openNode(this.tag),this.map["a:blip"].render(e,t),e.openNode("a:stretch"),e.leafNode("a:fillRect"),e.closeNode(),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset();else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["a:blip"].model,!1)}}},{"../base-xform":32,"./blip-xform":58}],58:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"a:blip"}render(e,t){e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":t.rId,cstate:"print"})}parseOpen(e){return e.name!==this.tag||(this.model={rId:e.attributes["r:embed"]},!0)}parseText(){}parseClose(e){return e!==this.tag}}},{"../base-xform":32}],59:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"xdr:cNvPicPr"}render(e){e.openNode(this.tag),e.leafNode("a:picLocks",{noChangeAspect:"1"}),e.closeNode()}parseOpen(e){return e.name,this.tag,!0}parseText(){}parseClose(e){return e!==this.tag}}},{"../base-xform":32}],60:[function(e,t,r){const n=e("../base-xform"),i=e("./hlink-click-xform"),s=e("./ext-lst-xform");t.exports=class extends n{constructor(){super(),this.map={"a:hlinkClick":new i,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(e,t){e.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(e,t),this.map["a:extLst"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset();else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["a:hlinkClick"].model,!1)}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,t,r){const n=e("../base-xform"),i=e("../simple/integer-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.map={"xdr:col":new i({tag:"xdr:col",zero:!0}),"xdr:colOff":new i({tag:"xdr:colOff",zero:!0}),"xdr:row":new i({tag:"xdr:row",zero:!0}),"xdr:rowOff":new i({tag:"xdr:rowOff",zero:!0})}}render(e,t){e.openNode(this.tag),this.map["xdr:col"].render(e,t.nativeCol),this.map["xdr:colOff"].render(e,t.nativeColOff),this.map["xdr:row"].render(e,t.nativeRow),this.map["xdr:rowOff"].render(e,t.nativeRowOff),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset();else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(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)}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,t,r){const n=e("../../../utils/col-cache"),i=e("../../../utils/xml-stream"),s=e("../base-xform"),a=e("./two-cell-anchor-xform"),o=e("./one-cell-anchor-xform");class l extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new a,"xdr:oneCellAnchor":new o}}prepare(e){e.anchors.forEach((e,t)=>{var r;e.anchorType=("string"==typeof(r=e).range?n.decode(r.range):r.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor",this.map[e.anchorType].prepare(e,{index:t})})}get tag(){return"xdr:wsDr"}render(e,t){e.openXml(i.StdDocAttributes),e.openNode(this.tag,l.DRAWING_ATTRIBUTES),t.anchors.forEach(t=>{this.map[t.anchorType].render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset(),this.model={anchors:[]};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}reconcile(e,t){e.anchors.forEach(e=>{e.br?this.map["xdr:twoCellAnchor"].reconcile(e,t):this.map["xdr:oneCellAnchor"].reconcile(e,t)})}}l.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},t.exports=l},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"a:extLst"}render(e){e.openNode(this.tag),e.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),e.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),e.closeNode(),e.closeNode()}parseOpen(e){return e.name,this.tag,!0}parseText(){}parseClose(e){return e!==this.tag}}},{"../base-xform":32}],64:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.map={}}render(e,t){e.openNode(this.tag);const r=Math.floor(9525*t.width),n=Math.floor(9525*t.height);e.addAttribute("cx",r),e.addAttribute("cy",n),e.closeNode()}parseOpen(e){return e.name===this.tag&&(this.model={width:parseInt(e.attributes.cx||"0",10)/9525,height:parseInt(e.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"a:hlinkClick"}render(e,t){t.hyperlinks&&t.hyperlinks.rId&&e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":t.hyperlinks.rId,tooltip:t.hyperlinks.tooltip})}parseOpen(e){return e.name!==this.tag||(this.model={hyperlinks:{rId:e.attributes["r:id"],tooltip:e.attributes.tooltip}},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(e,t,r){const n=e("../base-xform"),i=e("./c-nv-pr-xform"),s=e("./c-nv-pic-pr-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:cNvPr":new i,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(e,t){e.openNode(this.tag),this.map["xdr:cNvPr"].render(e,t),this.map["xdr:cNvPicPr"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset();else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["xdr:cNvPr"].model,!1)}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,t,r){const n=e("./base-cell-anchor-xform"),i=e("../static-xform"),s=e("./cell-position-xform"),a=e("./ext-xform"),o=e("./pic-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new a({tag:"xdr:ext"}),"xdr:pic":new o,"xdr:clientData":new i({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(e,t){this.map["xdr:pic"].prepare(e.picture,t)}render(e,t){e.openNode(this.tag,{editAs:t.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,t.range.tl),this.map["xdr:ext"].render(e,t.range.ext),this.map["xdr:pic"].render(e,t.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(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)}reconcile(e,t){e.medium=this.reconcilePicture(e.picture,t)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,t,r){const n=e("../base-xform"),i=e("../static-xform"),s=e("./blip-fill-xform"),a=e("./nv-pic-pr-xform"),o=e("./sp-pr");t.exports=class extends n{constructor(){super(),this.map={"xdr:nvPicPr":new a,"xdr:blipFill":new s,"xdr:spPr":new i(o)}}get tag(){return"xdr:pic"}prepare(e,t){e.index=t.index+1}render(e,t){e.openNode(this.tag),this.map["xdr:nvPicPr"].render(e,t),this.map["xdr:blipFill"].render(e,t),this.map["xdr:spPr"].render(e,t),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)this.reset();else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):e!==this.tag}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(e,t,r){t.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(e,t,r){const n=e("./base-cell-anchor-xform"),i=e("../static-xform"),s=e("./cell-position-xform"),a=e("./pic-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new a,"xdr:clientData":new i({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(e,t){this.map["xdr:pic"].prepare(e.picture,t)}render(e,t){e.openNode(this.tag,{editAs:t.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,t.range.tl),this.map["xdr:to"].render(e,t.range.br),this.map["xdr:pic"].render(e,t.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(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)}reconcile(e,t){e.medium=this.reconcilePicture(e.picture,t)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,t,r){const n=e("./base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.always=!!e.always,this.count=e.count,this.empty=e.empty,this.$count=e.$count||"count",this.$=e.$,this.childXform=e.childXform,this.maxItems=e.maxItems}prepare(e,t){const{childXform:r}=this;e&&e.forEach((e,n)=>{t.index=n,r.prepare(e,t)})}render(e,t){if(this.always||t&&t.length){e.openNode(this.tag,this.$),this.count&&e.addAttribute(this.$count,t&&t.length||0);const{childXform:r}=this;(t||[]).forEach((t,n)=>{r.render(e,t,n)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.model=[],!0):!!this.childXform.parseOpen(e)&&(this.parser=this.childXform,!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser){if(!this.parser.parseClose(e)&&(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(e,t){if(e){const{childXform:r}=this;e.forEach(e=>{r.reconcile(e,t)})}}}},{"./base-xform":32}],72:[function(e,t,r){const n=e("../../../utils/col-cache"),i=e("../base-xform");t.exports=class extends i{get tag(){return"autoFilter"}render(e,t){if(t)if("string"==typeof t)e.leafNode("autoFilter",{ref:t});else{const r=function(e){return"string"==typeof e?e:n.getAddress(e.row,e.column).address},i=r(t.from),s=r(t.to);i&&s&&e.leafNode("autoFilter",{ref:`${i}:${s}`})}}parseOpen(e){"autoFilter"===e.name&&(this.model=e.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,t,r){const n=e("../../../utils/utils"),i=e("../base-xform"),s=e("../../../doc/range"),a=e("../../../doc/enums"),o=e("../strings/rich-text-xform");function l(e){if(null==e)return a.ValueType.Null;if(e instanceof String||"string"==typeof e)return a.ValueType.String;if("number"==typeof e)return a.ValueType.Number;if("boolean"==typeof e)return a.ValueType.Boolean;if(e instanceof Date)return a.ValueType.Date;if(e.text&&e.hyperlink)return a.ValueType.Hyperlink;if(e.formula)return a.ValueType.Formula;if(e.error)return a.ValueType.Error;throw new Error("I could not understand type of value")}t.exports=class extends i{constructor(){super(),this.richTextXForm=new o}get tag(){return"c"}prepare(e,t){const r=t.styles.addStyleModel(e.style||{},(n=e).type===a.ValueType.Formula?l(n.result):n.type);var n;switch(r&&(e.styleId=r),e.comment&&t.comments.push({...e.comment,ref:e.address}),e.type){case a.ValueType.String:case a.ValueType.RichText:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.value));break;case a.ValueType.Date:t.date1904&&(e.date1904=!0);break;case a.ValueType.Hyperlink:t.sharedStrings&&void 0!==e.text&&null!==e.text&&(e.ssId=t.sharedStrings.add(e.text)),t.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip});break;case a.ValueType.Merge:t.merges.add(e);break;case a.ValueType.Formula:if(t.date1904&&(e.date1904=!0),"shared"===e.shareType&&(e.si=t.siFormulae++),e.formula)t.formulae[e.address]=e;else if(e.sharedFormula){const r=t.formulae[e.sharedFormula];if(!r)throw new Error("Shared Formula master must exist above and or left of clone for cell "+e.address);void 0===r.si?(r.shareType="shared",r.si=t.siFormulae++,r.range=new s(r.address,e.address)):r.range&&r.range.expandToAddress(e.address),e.si=r.si}}}renderFormula(e,t){let r=null;switch(t.shareType){case"shared":r={t:"shared",ref:t.ref||t.range.range,si:t.si};break;case"array":r={t:"array",ref:t.ref};break;default:void 0!==t.si&&(r={t:"shared",si:t.si})}switch(l(t.result)){case a.ValueType.Null:e.leafNode("f",r,t.formula);break;case a.ValueType.String:e.addAttribute("t","str"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result);break;case a.ValueType.Number:e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result);break;case a.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result?1:0);break;case a.ValueType.Error:e.addAttribute("t","e"),e.leafNode("f",r,t.formula),e.leafNode("v",null,t.result.error);break;case a.ValueType.Date:e.leafNode("f",r,t.formula),e.leafNode("v",null,n.dateToExcel(t.result,t.date1904));break;default:throw new Error("I could not understand type of value")}}render(e,t){if(t.type!==a.ValueType.Null||t.styleId){switch(e.openNode("c"),e.addAttribute("r",t.address),t.styleId&&e.addAttribute("s",t.styleId),t.type){case a.ValueType.Null:break;case a.ValueType.Number:e.leafNode("v",null,t.value);break;case a.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("v",null,t.value?"1":"0");break;case a.ValueType.Error:e.addAttribute("t","e"),e.leafNode("v",null,t.value.error);break;case a.ValueType.String:case a.ValueType.RichText:void 0!==t.ssId?(e.addAttribute("t","s"),e.leafNode("v",null,t.ssId)):t.value&&t.value.richText?(e.addAttribute("t","inlineStr"),e.openNode("is"),t.value.richText.forEach(t=>{this.richTextXForm.render(e,t)}),e.closeNode("is")):(e.addAttribute("t","str"),e.leafNode("v",null,t.value));break;case a.ValueType.Date:e.leafNode("v",null,n.dateToExcel(t.value,t.date1904));break;case a.ValueType.Hyperlink:void 0!==t.ssId?(e.addAttribute("t","s"),e.leafNode("v",null,t.ssId)):(e.addAttribute("t","str"),e.leafNode("v",null,t.text));break;case a.ValueType.Formula:this.renderFormula(e,t);case a.ValueType.Merge:}e.closeNode()}}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"c":return this.model={address:e.attributes.r},this.t=e.attributes.t,e.attributes.s&&(this.model.styleId=parseInt(e.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=e.attributes.si,this.model.shareType=e.attributes.t,this.model.ref=e.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(e),!0;default:return!1}}parseText(e){if(this.parser)this.parser.parseText(e);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+e:e;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+e:e:this.model.value=this.model.value?this.model.value+e:e}}parseClose(e){switch(e){case"c":{const{model:e}=this;if(e.formula||e.shareType)e.type=a.ValueType.Formula,e.value&&("str"===this.t?e.result=n.xmlDecode(e.value):"b"===this.t?e.result=0!==parseInt(e.value,10):"e"===this.t?e.result={error:e.value}:e.result=parseFloat(e.value),e.value=void 0);else if(void 0!==e.value)switch(this.t){case"s":e.type=a.ValueType.String,e.value=parseInt(e.value,10);break;case"str":e.type=a.ValueType.String,e.value=n.xmlDecode(e.value);break;case"inlineStr":e.type=a.ValueType.String;break;case"b":e.type=a.ValueType.Boolean,e.value=0!==parseInt(e.value,10);break;case"e":e.type=a.ValueType.Error,e.value={error:e.value};break;default:e.type=a.ValueType.Number,e.value=parseFloat(e.value)}else e.styleId?e.type=a.ValueType.Null:e.type=a.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(e),!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(e),!0)}}reconcile(e,t){const r=e.styleId&&t.styles&&t.styles.getStyleModel(e.styleId);switch(r&&(e.style=r),void 0!==e.styleId&&(e.styleId=void 0),e.type){case a.ValueType.String:"number"==typeof e.value&&t.sharedStrings&&(e.value=t.sharedStrings.getString(e.value)),e.value.richText&&(e.type=a.ValueType.RichText);break;case a.ValueType.Number:r&&n.isDateFmt(r.numFmt)&&(e.type=a.ValueType.Date,e.value=n.excelToDate(e.value,t.date1904));break;case a.ValueType.Formula:void 0!==e.result&&r&&n.isDateFmt(r.numFmt)&&(e.result=n.excelToDate(e.result,t.date1904)),"shared"===e.shareType&&(e.ref?t.formulae[e.si]=e.address:(e.sharedFormula=t.formulae[e.si],delete e.shareType),delete e.si)}const i=t.hyperlinkMap[e.address];i&&(e.type===a.ValueType.Formula?(e.text=e.result,e.result=void 0):(e.text=e.value,e.value=void 0),e.type=a.ValueType.Hyperlink,e.hyperlink=i);const s=t.commentsMap&&t.commentsMap[e.address];s&&(e.comment=s)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{get tag(){return"x14:cfIcon"}render(e,t){e.leafNode(this.tag,{iconSet:t.iconSet,iconId:t.iconId})}parseOpen(e){let{attributes:t}=e;this.model={iconSet:t.iconSet,iconId:n.toIntValue(t.iconId)}}parseClose(e){return e!==this.tag}}},{"../../base-xform":32}],75:[function(e,t,r){const{v4:n}=e("uuid"),i=e("../../base-xform"),s=e("../../composite-xform"),a=e("./databar-ext-xform"),o=e("./icon-set-ext-xform"),l={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class u extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new a,"x14:iconSet":this.iconSetXform=new o}}get tag(){return"x14:cfRule"}static isExt(e){return"dataBar"===e.type?a.isExt(e):!("iconSet"!==e.type||!e.custom&&!l[e.iconSet])}prepare(e){u.isExt(e)&&(e.x14Id=`{${n()}}`.toUpperCase())}render(e,t){if(u.isExt(t))switch(t.type){case"dataBar":this.renderDataBar(e,t);break;case"iconSet":this.renderIconSet(e,t)}}renderDataBar(e,t){e.openNode(this.tag,{type:"dataBar",id:t.x14Id}),this.databarXform.render(e,t),e.closeNode()}renderIconSet(e,t){e.openNode(this.tag,{type:"iconSet",priority:t.priority,id:t.x14Id||`{${n()}}`}),this.iconSetXform.render(e,t),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{type:t.type,x14Id:t.id,priority:i.toIntValue(t.priority)}}onParserClose(e,t){Object.assign(this.model,t.model)}}t.exports=u},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,t,r){const n=e("../../composite-xform"),i=e("./f-ext-xform");t.exports=class extends n{constructor(){super(),this.map={"xm:f":this.fExtXform=new i}}get tag(){return"x14:cfvo"}render(e,t){e.openNode(this.tag,{type:t.type}),void 0!==t.value&&this.fExtXform.render(e,t.value),e.closeNode()}createNewModel(e){return{type:e.attributes.type}}onParserClose(e,t){if("xm:f"===e)this.model.value=t.model?parseFloat(t.model):0}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,t,r){const n=e("../../composite-xform"),i=e("./sqref-ext-xform"),s=e("./cf-rule-ext-xform");t.exports=class extends n{constructor(){super(),this.map={"xm:sqref":this.sqRef=new i,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(e,t){e.rules.forEach(e=>{this.cfRule.prepare(e,t)})}render(e,t){t.rules.some(s.isExt)&&(e.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(s.isExt).forEach(t=>this.cfRule.render(e,t)),this.sqRef.render(e,t.ref),e.closeNode())}createNewModel(){return{rules:[]}}onParserClose(e,t){switch(e){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,t,r){const n=e("../../composite-xform"),i=e("./cf-rule-ext-xform"),s=e("./conditional-formatting-ext-xform");t.exports=class extends n{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(e){return void 0===e.hasExtContent&&(e.hasExtContent=e.some(e=>e.rules.some(i.isExt))),e.hasExtContent}prepare(e,t){e.forEach(e=>{this.cfXform.prepare(e,t)})}render(e,t){this.hasContent(t)&&(e.openNode(this.tag),t.forEach(t=>this.cfXform.render(e,t)),e.closeNode())}createNewModel(){return[]}onParserClose(e,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,t,r){const n=e("../../base-xform"),i=e("../../composite-xform"),s=e("../../style/color-xform"),a=e("./cfvo-ext-xform");t.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(e){return!e.gradient}get tag(){return"x14:dataBar"}render(e,t){e.openNode(this.tag,{minLength:n.toIntAttribute(t.minLength,0,!0),maxLength:n.toIntAttribute(t.maxLength,100,!0),border:n.toBoolAttribute(t.border,!1),gradient:n.toBoolAttribute(t.gradient,!0),negativeBarColorSameAsPositive:n.toBoolAttribute(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toAttribute(t.axisPosition,"auto"),direction:n.toAttribute(t.direction,"leftToRight")}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.borderColorXform.render(e,t.borderColor),this.negativeBorderColorXform.render(e,t.negativeBorderColor),this.negativeFillColorXform.render(e,t.negativeFillColor),this.axisColorXform.render(e,t.axisColor),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{cfvo:[],minLength:n.toIntValue(t.minLength,0),maxLength:n.toIntValue(t.maxLength,100),border:n.toBoolValue(t.border,!1),gradient:n.toBoolValue(t.gradient,!0),negativeBarColorSameAsPositive:n.toBoolValue(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:n.toBoolValue(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:n.toStringValue(t.axisPosition,"auto"),direction:n.toStringValue(t.direction,"leftToRight")}}onParserClose(e,t){const[,r]=e.split(":");if("cfvo"===r)this.model.cfvo.push(t.model);else this.model[r]=t.model}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{get tag(){return"xm:f"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{"../../base-xform":32}],81:[function(e,t,r){const n=e("../../base-xform"),i=e("../../composite-xform"),s=e("./cfvo-ext-xform"),a=e("./cf-icon-ext-xform");t.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new a}}get tag(){return"x14:iconSet"}render(e,t){e.openNode(this.tag,{iconSet:n.toStringAttribute(t.iconSet),reverse:n.toBoolAttribute(t.reverse,!1),showValue:n.toBoolAttribute(t.showValue,!0),custom:n.toBoolAttribute(t.icons,!1)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.icons&&t.icons.forEach((t,r)=>{t.iconId=r,this.cfIconXform.render(e,t)}),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{cfvo:[],iconSet:n.toStringValue(t.iconSet,"3TrafficLights"),reverse:n.toBoolValue(t.reverse,!1),showValue:n.toBoolValue(t.showValue,!0)}}onParserClose(e,t){const[,r]=e.split(":");switch(r){case"cfvo":this.model.cfvo.push(t.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(t.model);break;default:this.model[r]=t.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{get tag(){return"xm:sqref"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{"../../base-xform":32}],83:[function(e,t,r){const n=e("../../base-xform"),i=e("../../composite-xform"),s=e("../../../../doc/range"),a=e("./databar-xform"),o=e("./ext-lst-ref-xform"),l=e("./formula-xform"),u=e("./color-scale-xform"),c=e("./icon-set-xform"),h={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},f=e=>{const{type:t,operator:r}=e;switch(t){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:t};default:return{type:t,operator:r}}};class d extends i{constructor(){super(),this.map={dataBar:this.databarXform=new a,extLst:this.extLstRefXform=new o,formula:this.formulaXform=new l,colorScale:this.colorScaleXform=new u,iconSet:this.iconSetXform=new c}}get tag(){return"cfRule"}static isPrimitive(e){return"iconSet"!==e.type||!e.custom&&!h[e.iconSet]}render(e,t){switch(t.type){case"expression":this.renderExpression(e,t);break;case"cellIs":this.renderCellIs(e,t);break;case"top10":this.renderTop10(e,t);break;case"aboveAverage":this.renderAboveAverage(e,t);break;case"dataBar":this.renderDataBar(e,t);break;case"colorScale":this.renderColorScale(e,t);break;case"iconSet":this.renderIconSet(e,t);break;case"containsText":this.renderText(e,t);break;case"timePeriod":this.renderTimePeriod(e,t)}}renderExpression(e,t){e.openNode(this.tag,{type:"expression",dxfId:t.dxfId,priority:t.priority}),this.formulaXform.render(e,t.formulae[0]),e.closeNode()}renderCellIs(e,t){e.openNode(this.tag,{type:"cellIs",dxfId:t.dxfId,priority:t.priority,operator:t.operator}),t.formulae.forEach(t=>{this.formulaXform.render(e,t)}),e.closeNode()}renderTop10(e,t){e.leafNode(this.tag,{type:"top10",dxfId:t.dxfId,priority:t.priority,percent:n.toBoolAttribute(t.percent,!1),bottom:n.toBoolAttribute(t.bottom,!1),rank:n.toIntValue(t.rank,10,!0)})}renderAboveAverage(e,t){e.leafNode(this.tag,{type:"aboveAverage",dxfId:t.dxfId,priority:t.priority,aboveAverage:n.toBoolAttribute(t.aboveAverage,!0)})}renderDataBar(e,t){e.openNode(this.tag,{type:"dataBar",priority:t.priority}),this.databarXform.render(e,t),this.extLstRefXform.render(e,t),e.closeNode()}renderColorScale(e,t){e.openNode(this.tag,{type:"colorScale",priority:t.priority}),this.colorScaleXform.render(e,t),e.closeNode()}renderIconSet(e,t){d.isPrimitive(t)&&(e.openNode(this.tag,{type:"iconSet",priority:t.priority}),this.iconSetXform.render(e,t),e.closeNode())}renderText(e,t){e.openNode(this.tag,{type:t.operator,dxfId:t.dxfId,priority:t.priority,operator:n.toStringAttribute(t.operator,"containsText")});const r=(e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];const{tl:t}=new s(e.ref);switch(e.operator){case"containsText":return`NOT(ISERROR(SEARCH("${e.text}",${t})))`;case"containsBlanks":return`LEN(TRIM(${t}))=0`;case"notContainsBlanks":return`LEN(TRIM(${t}))>0`;case"containsErrors":return`ISERROR(${t})`;case"notContainsErrors":return`NOT(ISERROR(${t}))`;default:return}})(t);r&&this.formulaXform.render(e,r),e.closeNode()}renderTimePeriod(e,t){e.openNode(this.tag,{type:"timePeriod",dxfId:t.dxfId,priority:t.priority,timePeriod:t.timePeriod});const r=(e=>{if(e.formulae&&e.formulae[0])return e.formulae[0];const{tl:t}=new s(e.ref);switch(e.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${t},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${t},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${t},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${t},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${t},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${t},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${t},1)=TODAY()-1`;case"today":return`FLOOR(${t},1)=TODAY()`;case"tomorrow":return`FLOOR(${t},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${t},1)<=6,FLOOR(${t},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${t})=MONTH(EDATE(TODAY(),0-1)),YEAR(${t})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${t})=MONTH(TODAY()),YEAR(${t})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${t})=MONTH(EDATE(TODAY(),0+1)),YEAR(${t})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(t);r&&this.formulaXform.render(e,r),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{...f(t),dxfId:n.toIntValue(t.dxfId),priority:n.toIntValue(t.priority),timePeriod:t.timePeriod,percent:n.toBoolValue(t.percent),bottom:n.toBoolValue(t.bottom),rank:n.toIntValue(t.rank),aboveAverage:n.toBoolValue(t.aboveAverage)}}onParserClose(e,t){switch(e){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,t.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(t.model)}}}t.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(e,t,r){const n=e("../../base-xform");t.exports=class extends n{get tag(){return"cfvo"}render(e,t){e.leafNode(this.tag,{type:t.type,val:t.value})}parseOpen(e){this.model={type:e.attributes.type,value:n.toFloatValue(e.attributes.val)}}parseClose(e){return e!==this.tag}}},{"../../base-xform":32}],85:[function(e,t,r){const n=e("../../composite-xform"),i=e("../../style/color-xform"),s=e("./cfvo-xform");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return"colorScale"}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),t.color.forEach(t=>{this.colorXform.render(e,t)}),e.closeNode()}createNewModel(e){return{cfvo:[],color:[]}}onParserClose(e,t){this.model[e].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,t,r){const n=e("../../composite-xform"),i=e("./cf-rule-xform");t.exports=class extends n{constructor(){super(),this.map={cfRule:new i}}get tag(){return"conditionalFormatting"}render(e,t){t.rules.some(i.isPrimitive)&&(e.openNode(this.tag,{sqref:t.ref}),t.rules.forEach(r=>{i.isPrimitive(r)&&(r.ref=t.ref,this.map.cfRule.render(e,r))}),e.closeNode())}createNewModel(e){let{attributes:t}=e;return{ref:t.sqref,rules:[]}}onParserClose(e,t){this.model.rules.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,t,r){const n=e("../../base-xform"),i=e("./conditional-formatting-xform");t.exports=class extends n{constructor(){super(),this.cfXform=new i}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(e,t){let r=e.reduce((e,t)=>Math.max(e,...t.rules.map(e=>e.priority||0)),1);e.forEach(e=>{e.rules.forEach(e=>{e.priority||(e.priority=r++),e.style&&(e.dxfId=t.styles.addDxfStyle(e.style))})})}render(e,t){t.forEach(t=>{this.cfXform.render(e,t)})}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"conditionalFormatting"===e.name&&(this.parser=this.cfXform,this.parser.parseOpen(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!(!this.parser||!this.parser.parseClose(e)&&(this.model.push(this.parser.model),this.parser=void 0,1))}reconcile(e,t){e.forEach(e=>{e.rules.forEach(e=>{void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId),delete e.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,t,r){const n=e("../../composite-xform"),i=e("../../style/color-xform"),s=e("./cfvo-xform");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new i}}get tag(){return"dataBar"}render(e,t){e.openNode(this.tag),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),this.colorXform.render(e,t.color),e.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(e,t){switch(e){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,t,r){const n=e("../../base-xform"),i=e("../../composite-xform");class s extends n{get tag(){return"x14:id"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}class a extends i{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(e,t){e.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(e,t.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model.x14Id=t.model}}t.exports=class extends i{constructor(){super(),this.map={ext:new a}}get tag(){return"extLst"}render(e,t){e.openNode(this.tag),this.map.ext.render(e,t),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){Object.assign(this.model,t.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,t,r){const n=e("../../base-xform");t.exports=class extends n{get tag(){return"formula"}render(e,t){e.leafNode(this.tag,null,t)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}},{"../../base-xform":32}],91:[function(e,t,r){const n=e("../../base-xform"),i=e("../../composite-xform"),s=e("./cfvo-xform");t.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(e,t){e.openNode(this.tag,{iconSet:n.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:n.toBoolAttribute(t.reverse,!1),showValue:n.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(t=>{this.cfvoXform.render(e,t)}),e.closeNode()}createNewModel(e){let{attributes:t}=e;return{iconSet:n.toStringValue(t.iconSet,"3TrafficLights"),reverse:n.toBoolValue(t.reverse),showValue:n.toBoolValue(t.showValue),cfvo:[]}}onParserClose(e,t){this.model[e].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,t,r){const n=e("../../../utils/utils"),i=e("../base-xform");t.exports=class extends i{get tag(){return"col"}prepare(e,t){const r=t.styles.addStyleModel(e.style||{});r&&(e.styleId=r)}render(e,t){e.openNode("col"),e.addAttribute("min",t.min),e.addAttribute("max",t.max),t.width&&e.addAttribute("width",t.width),t.styleId&&e.addAttribute("style",t.styleId),t.hidden&&e.addAttribute("hidden","1"),t.bestFit&&e.addAttribute("bestFit","1"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1"),e.addAttribute("customWidth","1"),e.closeNode()}parseOpen(e){if("col"===e.name){const t=this.model={min:parseInt(e.attributes.min||"0",10),max:parseInt(e.attributes.max||"0",10),width:void 0===e.attributes.width?void 0:parseFloat(e.attributes.width||"0")};return e.attributes.style&&(t.styleId=parseInt(e.attributes.style,10)),n.parseBoolean(e.attributes.hidden)&&(t.hidden=!0),n.parseBoolean(e.attributes.bestFit)&&(t.bestFit=!0),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),n.parseBoolean(e.attributes.collapsed)&&(t.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(e,t){e.styleId&&(e.style=t.styles.getStyleModel(e.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../../../utils/utils"),s=e("../../../utils/col-cache"),a=e("../base-xform"),o=e("../../../doc/range");function l(e,t,r,n){const i=t[r];void 0!==i?e[r]=i:void 0!==n&&(e[r]=n)}function u(e,t,r,n){const s=t[r];void 0!==s?e[r]=i.parseBoolean(s):void 0!==n&&(e[r]=n)}t.exports=class extends a{get tag(){return"dataValidations"}render(e,t){const r=function(e){const t=n.map(e,(e,t)=>({address:t,dataValidation:e,marked:!1})).sort((e,t)=>n.strcmp(e.address,t.address)),r=n.keyBy(t,"address"),i=(t,r,i)=>{for(let a=0;a<r;a++){const r=s.encodeAddress(t.row+a,i);if(!e[r]||!n.isEqual(e[t.address],e[r]))return!1}return!0};return t.map(t=>{if(!t.marked){const a=s.decodeEx(t.address);if(a.dimensions)return r[a.dimensions].marked=!0,{...t.dataValidation,sqref:t.address};let o=1,l=s.encodeAddress(a.row+o,a.col);for(;e[l]&&n.isEqual(t.dataValidation,e[l]);)o++,l=s.encodeAddress(a.row+o,a.col);let u=1;for(;i(a,o,a.col+u);)u++;for(let e=0;e<o;e++)for(let t=0;t<u;t++)l=s.encodeAddress(a.row+e,a.col+t),r[l].marked=!0;if(o>1||u>1){const e=a.row+(o-1),r=a.col+(u-1);return{...t.dataValidation,sqref:`${t.address}:${s.encodeAddress(e,r)}`}}return{...t.dataValidation,sqref:t.address}}return null}).filter(Boolean)}(t);r.length&&(e.openNode("dataValidations",{count:r.length}),r.forEach(t=>{e.openNode("dataValidation"),"any"!==t.type&&(e.addAttribute("type",t.type),t.operator&&"list"!==t.type&&"between"!==t.operator&&e.addAttribute("operator",t.operator),t.allowBlank&&e.addAttribute("allowBlank","1")),t.showInputMessage&&e.addAttribute("showInputMessage","1"),t.promptTitle&&e.addAttribute("promptTitle",t.promptTitle),t.prompt&&e.addAttribute("prompt",t.prompt),t.showErrorMessage&&e.addAttribute("showErrorMessage","1"),t.errorStyle&&e.addAttribute("errorStyle",t.errorStyle),t.errorTitle&&e.addAttribute("errorTitle",t.errorTitle),t.error&&e.addAttribute("error",t.error),e.addAttribute("sqref",t.sqref),(t.formulae||[]).forEach((r,n)=>{e.openNode("formula"+(n+1)),"date"===t.type?e.writeText(i.dateToExcel(new Date(r))):e.writeText(r),e.closeNode()}),e.closeNode()}),e.closeNode())}parseOpen(e){switch(e.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=e.attributes.sqref;const t={type:e.attributes.type||"any",formulae:[]};switch(e.attributes.type&&u(t,e.attributes,"allowBlank"),u(t,e.attributes,"showInputMessage"),u(t,e.attributes,"showErrorMessage"),t.type){case"any":case"list":case"custom":break;default:l(t,e.attributes,"operator","between")}return l(t,e.attributes,"promptTitle"),l(t,e.attributes,"prompt"),l(t,e.attributes,"errorStyle"),l(t,e.attributes,"errorTitle"),l(t,e.attributes,"error"),this._dataValidation=t,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(e){this._formula&&this._formula.push(e)}parseClose(e){switch(e){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(e=>{e.includes(":")?new o(e).forEachAddress(e=>{this.model[e]=this._dataValidation}):this.model[e]=this._dataValidation}),!0;case"formula1":case"formula2":{let e=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":e=parseInt(e,10);break;case"decimal":e=parseFloat(e);break;case"date":e=i.excelToDate(parseFloat(e))}return this._dataValidation.formulae.push(e),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(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"dimension"}render(e,t){t&&e.leafNode("dimension",{ref:t})}parseOpen(e){return"dimension"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"drawing"}render(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}parseOpen(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(e,t,r){const n=e("../composite-xform"),i=e("./cf-ext/conditional-formattings-ext-xform");class s extends n{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new i}}get tag(){return"ext"}hasContent(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}prepare(e,t){this.conditionalFormattings.prepare(e.conditionalFormattings,t)}render(e,t){e.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(e,t.conditionalFormattings),e.closeNode()}createNewModel(){return{}}onParserClose(e,t){this.model[e]=t.model}}t.exports=class extends n{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(e,t){this.ext.prepare(e,t)}hasContent(e){return this.ext.hasContent(e)}render(e,t){this.hasContent(t)&&(e.openNode("extLst"),this.ext.render(e,t),e.closeNode())}createNewModel(){return{}}onParserClose(e,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"headerFooter"}render(e,t){if(t){e.addRollback();let r=!1;e.openNode("headerFooter"),t.differentFirst&&(e.addAttribute("differentFirst","1"),r=!0),t.differentOddEven&&(e.addAttribute("differentOddEven","1"),r=!0),t.oddHeader&&"string"==typeof t.oddHeader&&(e.leafNode("oddHeader",null,t.oddHeader),r=!0),t.oddFooter&&"string"==typeof t.oddFooter&&(e.leafNode("oddFooter",null,t.oddFooter),r=!0),t.evenHeader&&"string"==typeof t.evenHeader&&(e.leafNode("evenHeader",null,t.evenHeader),r=!0),t.evenFooter&&"string"==typeof t.evenFooter&&(e.leafNode("evenFooter",null,t.evenFooter),r=!0),t.firstHeader&&"string"==typeof t.firstHeader&&(e.leafNode("firstHeader",null,t.firstHeader),r=!0),t.firstFooter&&"string"==typeof t.firstFooter&&(e.leafNode("firstFooter",null,t.firstFooter),r=!0),r?(e.closeNode(),e.commit()):e.rollback()}}parseOpen(e){switch(e.name){case"headerFooter":return this.model={},e.attributes.differentFirst&&(this.model.differentFirst=1===parseInt(e.attributes.differentFirst,0)),e.attributes.differentOddEven&&(this.model.differentOddEven=1===parseInt(e.attributes.differentOddEven,0)),!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(e){switch(this.currentNode){case"oddHeader":this.model.oddHeader=e;break;case"oddFooter":this.model.oddFooter=e;break;case"evenHeader":this.model.evenHeader=e;break;case"evenFooter":this.model.evenFooter=e;break;case"firstHeader":this.model.firstHeader=e;break;case"firstFooter":this.model.firstFooter=e}}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(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"hyperlink"}render(e,t){this.isInternalLink(t)?e.leafNode("hyperlink",{ref:t.address,"r:id":t.rId,tooltip:t.tooltip,location:t.target}):e.leafNode("hyperlink",{ref:t.address,"r:id":t.rId,tooltip:t.tooltip})}parseOpen(e){return"hyperlink"===e.name&&(this.model={address:e.attributes.ref,rId:e.attributes["r:id"],tooltip:e.attributes.tooltip},e.attributes.location&&(this.model.target=e.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(e){return e.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(e.target)}}},{"../base-xform":32}],99:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"mergeCell"}render(e,t){e.leafNode("mergeCell",{ref:t})}parseOpen(e){return"mergeCell"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../../../doc/range"),s=e("../../../utils/col-cache"),a=e("../../../doc/enums");t.exports=class{constructor(){this.merges={}}add(e){if(this.merges[e.master])this.merges[e.master].expandToAddress(e.address);else{const t=`${e.master}:${e.address}`;this.merges[e.master]=new i(t)}}get mergeCells(){return n.map(this.merges,e=>e.range)}reconcile(e,t){n.each(e,e=>{const r=s.decode(e);for(let n=r.top;n<=r.bottom;n++){const e=t[n-1];for(let t=r.left;t<=r.right;t++){const i=e.cells[t-1];i?i.type===a.ValueType.Merge&&(i.master=r.tl):e.cells[t]={type:a.ValueType.Null,address:s.encodeAddress(n,t)}}}})}getMasterAddress(e){const t=this.hash[e];return t&&t.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,t,r){const n=e("../base-xform"),i=e=>void 0!==e;t.exports=class extends n{get tag(){return"outlinePr"}render(e,t){return!(!t||!i(t.summaryBelow)&&!i(t.summaryRight)||(e.leafNode(this.tag,{summaryBelow:i(t.summaryBelow)?Number(t.summaryBelow):void 0,summaryRight:i(t.summaryRight)?Number(t.summaryRight):void 0}),0))}parseOpen(e){return e.name===this.tag&&(this.model={summaryBelow:i(e.attributes.summaryBelow)?Boolean(Number(e.attributes.summaryBelow)):void 0,summaryRight:i(e.attributes.summaryRight)?Boolean(Number(e.attributes.summaryRight)):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"brk"}render(e,t){e.leafNode("brk",t)}parseOpen(e){return"brk"===e.name&&(this.model=e.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../base-xform");t.exports=class extends i{get tag(){return"pageMargins"}render(e,t){if(t){const r={left:t.left,right:t.right,top:t.top,bottom:t.bottom,header:t.header,footer:t.footer};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){return e.name===this.tag&&(this.model={left:parseFloat(e.attributes.left||.7),right:parseFloat(e.attributes.right||.7),top:parseFloat(e.attributes.top||.75),bottom:parseFloat(e.attributes.bottom||.75),header:parseFloat(e.attributes.header||.3),footer:parseFloat(e.attributes.footer||.3)},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"pageSetUpPr"}render(e,t){return!(!t||!t.fitToPage||(e.leafNode(this.tag,{fitToPage:t.fitToPage?"1":void 0}),0))}parseOpen(e){return e.name===this.tag&&(this.model={fitToPage:"1"===e.attributes.fitToPage},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../base-xform");function s(e){return e?"1":void 0}function a(e){if("overThenDown"===e)return e}function o(e){switch(e){case"atEnd":case"asDisplyed":return e;default:return}}function l(e){switch(e){case"dash":case"blank":case"NA":return e;default:return}}t.exports=class extends i{get tag(){return"pageSetup"}render(e,t){if(t){const r={paperSize:t.paperSize,orientation:t.orientation,horizontalDpi:t.horizontalDpi,verticalDpi:t.verticalDpi,pageOrder:a(t.pageOrder),blackAndWhite:s(t.blackAndWhite),draft:s(t.draft),cellComments:o(t.cellComments),errors:l(t.errors),scale:t.scale,fitToWidth:t.fitToWidth,fitToHeight:t.fitToHeight,firstPageNumber:t.firstPageNumber,useFirstPageNumber:s(t.firstPageNumber),usePrinterDefaults:s(t.usePrinterDefaults),copies:t.copies};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){return e.name===this.tag&&(this.model={paperSize:(t=e.attributes.paperSize,void 0!==t?parseInt(t,10):void 0),orientation:e.attributes.orientation||"portrait",horizontalDpi:parseInt(e.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(e.attributes.verticalDpi||"4294967295",10),pageOrder:e.attributes.pageOrder||"downThenOver",blackAndWhite:"1"===e.attributes.blackAndWhite,draft:"1"===e.attributes.draft,cellComments:e.attributes.cellComments||"None",errors:e.attributes.errors||"displayed",scale:parseInt(e.attributes.scale||"100",10),fitToWidth:parseInt(e.attributes.fitToWidth||"1",10),fitToHeight:parseInt(e.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(e.attributes.firstPageNumber||"1",10),useFirstPageNumber:"1"===e.attributes.useFirstPageNumber,usePrinterDefaults:"1"===e.attributes.usePrinterDefaults,copies:parseInt(e.attributes.copies||"1",10)},!0);var t}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"picture"}render(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}parseOpen(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../base-xform");function s(e){return e?"1":void 0}t.exports=class extends i{get tag(){return"printOptions"}render(e,t){if(t){const r={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)};n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){return e.name===this.tag&&(this.model={showRowColHeaders:"1"===e.attributes.headings,showGridLines:"1"===e.attributes.gridLines,horizontalCentered:"1"===e.attributes.horizontalCentered,verticalCentered:"1"===e.attributes.verticalCentered},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,t,r){const n=e("./page-breaks-xform"),i=e("../list-xform");t.exports=class extends i{constructor(){super({tag:"rowBreaks",count:!0,childXform:new n})}render(e,t){if(t&&t.length){e.openNode(this.tag,this.$),this.count&&(e.addAttribute(this.$count,t.length),e.addAttribute("manualBreakCount",t.length));const{childXform:r}=this;t.forEach(t=>{r.render(e,t)}),e.closeNode()}else this.empty&&e.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,t,r){const n=e("../base-xform"),i=e("../../../utils/utils"),s=e("./cell-xform");t.exports=class extends n{constructor(e){super(),this.maxItems=e&&e.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(e,t){const r=t.styles.addStyleModel(e.style);r&&(e.styleId=r);const n=this.map.c;e.cells.forEach(e=>{n.prepare(e,t)})}render(e,t,r){e.openNode("row"),e.addAttribute("r",t.number),t.height&&(e.addAttribute("ht",t.height),e.addAttribute("customHeight","1")),t.hidden&&e.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&e.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(e.addAttribute("s",t.styleId),e.addAttribute("customFormat","1")),e.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1");const n=this.map.c;t.cells.forEach(t=>{n.render(e,t,r)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if("row"===e.name){this.numRowsSeen+=1;const t=e.attributes.spans?e.attributes.spans.split(":").map(e=>parseInt(e,10)):[void 0,void 0],r=this.model={number:parseInt(e.attributes.r,10),min:t[0],max:t[1],cells:[]};return e.attributes.s&&(r.styleId=parseInt(e.attributes.s,10)),i.parseBoolean(e.attributes.hidden)&&(r.hidden=!0),i.parseBoolean(e.attributes.bestFit)&&(r.bestFit=!0),e.attributes.ht&&(r.height=parseFloat(e.attributes.ht)),e.attributes.outlineLevel&&(r.outlineLevel=parseInt(e.attributes.outlineLevel,10)),i.parseBoolean(e.attributes.collapsed)&&(r.collapsed=!0),!0}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){if(!this.parser.parseClose(e)){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(e,t){e.style=e.styleId?t.styles.getStyleModel(e.styleId):{},void 0!==e.styleId&&(e.styleId=void 0);const r=this.map.c;e.cells.forEach(e=>{r.reconcile(e,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../base-xform");t.exports=class extends i{get tag(){return"sheetFormatPr"}render(e,t){if(t){const r={defaultRowHeight:t.defaultRowHeight,outlineLevelRow:t.outlineLevelRow,outlineLevelCol:t.outlineLevelCol,"x14ac:dyDescent":t.dyDescent};t.defaultColWidth&&(r.defaultColWidth=t.defaultColWidth),t.defaultRowHeight&&15===t.defaultRowHeight||(r.customHeight="1"),n.some(r,e=>void 0!==e)&&e.leafNode("sheetFormatPr",r)}}parseOpen(e){return"sheetFormatPr"===e.name&&(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(e.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(e.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol||"0",10)},e.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(e.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,t,r){const n=e("../base-xform"),i=e("../style/color-xform"),s=e("./page-setup-properties-xform"),a=e("./outline-properties-xform");t.exports=class extends n{constructor(){super(),this.map={tabColor:new i("tabColor"),pageSetUpPr:new s,outlinePr:new a}}get tag(){return"sheetPr"}render(e,t){if(t){e.addRollback(),e.openNode("sheetPr");let r=!1;r=this.map.tabColor.render(e,t.tabColor)||r,r=this.map.pageSetUpPr.render(e,t.pageSetup)||r,r=this.map.outlinePr.render(e,t.outlineProperties)||r,r?(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(e,t,r){const n=e("../../../utils/under-dash"),i=e("../base-xform");function s(e,t){return e?t:void 0}function a(e,t){return e===t||void 0}t.exports=class extends i{get tag(){return"sheetProtection"}render(e,t){if(t){const r={sheet:s(t.sheet,"1"),selectLockedCells:!1===t.selectLockedCells?"1":void 0,selectUnlockedCells:!1===t.selectUnlockedCells?"1":void 0,formatCells:s(t.formatCells,"0"),formatColumns:s(t.formatColumns,"0"),formatRows:s(t.formatRows,"0"),insertColumns:s(t.insertColumns,"0"),insertRows:s(t.insertRows,"0"),insertHyperlinks:s(t.insertHyperlinks,"0"),deleteColumns:s(t.deleteColumns,"0"),deleteRows:s(t.deleteRows,"0"),sort:s(t.sort,"0"),autoFilter:s(t.autoFilter,"0"),pivotTables:s(t.pivotTables,"0")};t.sheet&&(r.algorithmName=t.algorithmName,r.hashValue=t.hashValue,r.saltValue=t.saltValue,r.spinCount=t.spinCount,r.objects=s(!1===t.objects,"1"),r.scenarios=s(!1===t.scenarios,"1")),n.some(r,e=>void 0!==e)&&e.leafNode(this.tag,r)}}parseOpen(e){return e.name===this.tag&&(this.model={sheet:a(e.attributes.sheet,"1"),objects:"1"!==e.attributes.objects&&void 0,scenarios:"1"!==e.attributes.scenarios&&void 0,selectLockedCells:"1"!==e.attributes.selectLockedCells&&void 0,selectUnlockedCells:"1"!==e.attributes.selectUnlockedCells&&void 0,formatCells:a(e.attributes.formatCells,"0"),formatColumns:a(e.attributes.formatColumns,"0"),formatRows:a(e.attributes.formatRows,"0"),insertColumns:a(e.attributes.insertColumns,"0"),insertRows:a(e.attributes.insertRows,"0"),insertHyperlinks:a(e.attributes.insertHyperlinks,"0"),deleteColumns:a(e.attributes.deleteColumns,"0"),deleteRows:a(e.attributes.deleteRows,"0"),sort:a(e.attributes.sort,"0"),autoFilter:a(e.attributes.autoFilter,"0"),pivotTables:a(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)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,t,r){const n=e("../../../utils/col-cache"),i=e("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};t.exports=class extends i{get tag(){return"sheetView"}prepare(e){switch(e.state){case"frozen":case"split":break;default:e.state="normal"}}render(e,t){e.openNode("sheetView",{workbookViewId:t.workbookViewId||0});const r=function(t,r,n){n&&e.addAttribute(t,r)};let i,s,a,o;switch(r("rightToLeft","1",!0===t.rightToLeft),r("tabSelected","1",t.tabSelected),r("showRuler","0",!1===t.showRuler),r("showRowColHeaders","0",!1===t.showRowColHeaders),r("showGridLines","0",!1===t.showGridLines),r("zoomScale",t.zoomScale,t.zoomScale),r("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),r("view",t.style,t.style),t.state){case"frozen":s=t.xSplit||0,a=t.ySplit||0,i=t.topLeftCell||n.getAddress(a+1,s+1).address,o=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:i,activePane:o,state:"frozen"}),e.leafNode("selection",{pane:o,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":"topLeft"===t.activePane&&(t.activePane=void 0),e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),e.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&e.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}e.closeNode()}parseOpen(e){switch(e.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(e.attributes.workbookViewId,10),rightToLeft:"1"===e.attributes.rightToLeft,tabSelected:"1"===e.attributes.tabSelected,showRuler:!("0"===e.attributes.showRuler),showRowColHeaders:!("0"===e.attributes.showRowColHeaders),showGridLines:!("0"===e.attributes.showGridLines),zoomScale:parseInt(e.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(e.attributes.zoomScaleNormal||"100",10),style:e.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(e.attributes.xSplit||"0",10),ySplit:parseInt(e.attributes.ySplit||"0",10),topLeftCell:e.attributes.topLeftCell,activePane:e.attributes.activePane||"topLeft",state:e.attributes.state},!0;case"selection":{const t=e.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:e.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(e){let t,r;return"sheetView"!==e||(this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[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},"split"===this.model.state&&(t.activePane=this.pane.activePane),r=this.selections[this.pane.activePane],r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=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},r=this.selections.topLeft,r&&r.activeCell&&(t.activeCell=r.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1)}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"tablePart"}render(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}parseOpen(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(e,t,r){const n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),a=e("../../rel-type"),o=e("./merges"),l=e("../base-xform"),u=e("../list-xform"),c=e("./row-xform"),h=e("./col-xform"),f=e("./dimension-xform"),d=e("./hyperlink-xform"),p=e("./merge-cell-xform"),m=e("./data-validations-xform"),b=e("./sheet-properties-xform"),g=e("./sheet-format-properties-xform"),y=e("./sheet-view-xform"),v=e("./sheet-protection-xform"),w=e("./page-margins-xform"),_=e("./page-setup-xform"),x=e("./print-options-xform"),k=e("./auto-filter-xform"),S=e("./picture-xform"),M=e("./drawing-xform"),C=e("./table-part-xform"),T=e("./row-breaks-xform"),E=e("./header-footer-xform"),A=e("./cf/conditional-formattings-xform"),R=e("./ext-lst-xform");class O extends l{constructor(e){super();const{maxRows:t,maxCols:r,ignoreNodes:n}=e||{};this.ignoreNodes=n||[],this.map={sheetPr:new b,dimension:new f,sheetViews:new u({tag:"sheetViews",count:!1,childXform:new y}),sheetFormatPr:new g,cols:new u({tag:"cols",count:!1,childXform:new h}),sheetData:new u({tag:"sheetData",count:!1,empty:!0,childXform:new c({maxItems:r}),maxItems:t}),autoFilter:new k,mergeCells:new u({tag:"mergeCells",count:!0,childXform:new p}),rowBreaks:new T,hyperlinks:new u({tag:"hyperlinks",count:!1,childXform:new d}),pageMargins:new w,dataValidations:new m,pageSetup:new _,headerFooter:new E,printOptions:new x,picture:new S,drawing:new M,sheetProtection:new v,tableParts:new u({tag:"tableParts",count:!0,childXform:new C}),conditionalFormatting:new A,extLst:new R}}prepare(e,t){t.merges=new o,e.hyperlinks=t.hyperlinks=[],e.comments=t.comments=[],t.formulae={},t.siFormulae=0,this.map.cols.prepare(e.cols,t),this.map.sheetData.prepare(e.rows,t),this.map.conditionalFormatting.prepare(e.conditionalFormattings,t),e.mergeCells=t.merges.mergeCells;const r=e.rels=[];function n(e){return"rId"+(e.length+1)}if(e.hyperlinks.forEach(e=>{const t=n(r);e.rId=t,r.push({Id:t,Type:a.Hyperlink,Target:e.target,TargetMode:"External"})}),e.comments.length>0){const s={Id:n(r),Type:a.Comments,Target:`../comments${e.id}.xml`};r.push(s);const o={Id:n(r),Type:a.VmlDrawing,Target:`../drawings/vmlDrawing${e.id}.vml`};r.push(o),e.comments.forEach(e=>{e.refAddress=i.decodeAddress(e.ref)}),t.commentRefs.push({commentName:"comments"+e.id,vmlDrawing:"vmlDrawing"+e.id})}const s=[];let l;e.media.forEach(i=>{if("background"===i.type){const s=n(r);l=t.media[i.imageId],r.push({Id:s,Type:a.Image,Target:`../media/${l.name}.${l.extension}`}),e.background={rId:s},e.image=t.media[i.imageId]}else if("image"===i.type){let{drawing:o}=e;l=t.media[i.imageId],o||(o=e.drawing={rId:n(r),name:"drawing"+ ++t.drawingsCount,anchors:[],rels:[]},t.drawings.push(o),r.push({Id:o.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${o.name}.xml`}));let u=this.preImageId===i.imageId?s[i.imageId]:s[o.rels.length];u||(u=n(o.rels),s[o.rels.length]=u,o.rels.push({Id:u,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${l.name}.${l.extension}`}));const c={picture:{rId:u},range:i.range};if(i.hyperlinks&&i.hyperlinks.hyperlink){const e=n(o.rels);s[o.rels.length]=e,c.picture.hyperlinks={tooltip:i.hyperlinks.tooltip,rId:e},o.rels.push({Id:e,Type:a.Hyperlink,Target:i.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=i.imageId,o.anchors.push(c)}}),e.tables.forEach(e=>{const i=n(r);e.rId=i,r.push({Id:i,Type:a.Table,Target:"../tables/"+e.target}),e.columns.forEach(e=>{const{style:r}=e;r&&(e.dxfId=t.styles.addDxfStyle(r))})}),this.map.extLst.prepare(e,t)}render(e,t){e.openXml(s.StdDocAttributes),e.openNode("worksheet",O.WORKSHEET_ATTRIBUTES);const r=t.properties?{defaultRowHeight:t.properties.defaultRowHeight,dyDescent:t.properties.dyDescent,outlineLevelCol:t.properties.outlineLevelCol,outlineLevelRow:t.properties.outlineLevelRow}:void 0;t.properties&&t.properties.defaultColWidth&&(r.defaultColWidth=t.properties.defaultColWidth);const n={outlineProperties:t.properties&&t.properties.outlineProperties,tabColor:t.properties&&t.properties.tabColor,pageSetup:t.pageSetup&&t.pageSetup.fitToPage?{fitToPage:t.pageSetup.fitToPage}:void 0},i=t.pageSetup&&t.pageSetup.margins,o={showRowColHeaders:t.pageSetup&&t.pageSetup.showRowColHeaders,showGridLines:t.pageSetup&&t.pageSetup.showGridLines,horizontalCentered:t.pageSetup&&t.pageSetup.horizontalCentered,verticalCentered:t.pageSetup&&t.pageSetup.verticalCentered},l=t.sheetProtection;this.map.sheetPr.render(e,n),this.map.dimension.render(e,t.dimensions),this.map.sheetViews.render(e,t.views),this.map.sheetFormatPr.render(e,r),this.map.cols.render(e,t.cols),this.map.sheetData.render(e,t.rows),this.map.sheetProtection.render(e,l),this.map.autoFilter.render(e,t.autoFilter),this.map.mergeCells.render(e,t.mergeCells),this.map.conditionalFormatting.render(e,t.conditionalFormattings),this.map.dataValidations.render(e,t.dataValidations),this.map.hyperlinks.render(e,t.hyperlinks),this.map.printOptions.render(e,o),this.map.pageMargins.render(e,i),this.map.pageSetup.render(e,t.pageSetup),this.map.headerFooter.render(e,t.headerFooter),this.map.rowBreaks.render(e,t.rowBreaks),this.map.drawing.render(e,t.drawing),this.map.picture.render(e,t.background),this.map.tableParts.render(e,t.tables),this.map.extLst.render(e,t),t.rels&&t.rels.forEach(t=>{t.Type===a.VmlDrawing&&e.leafNode("legacyDrawing",{"r:id":t.Id})}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"worksheet"===e.name?(n.each(this.map,e=>{e.reset()}),!0):(this.map[e.name]&&!this.ignoreNodes.includes(e.name)&&(this.parser=this.map[e.name],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("worksheet"===e){const e=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(e.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(e.outlineProperties=this.map.sheetPr.model.outlineProperties);const t={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},r=Object.assign(t,this.map.pageSetup.model,this.map.printOptions.model),n=((e,t)=>{if(!t||!t.length)return e;if(!e||!e.length)return t;const r={},n={};return e.forEach(e=>{r[e.ref]=e,e.rules.forEach(e=>{const{x14Id:t}=e;t&&(n[t]=e)})}),t.forEach(t=>{t.rules.forEach(i=>{const s=n[i.x14Id];var a,o;s?(a=s,o=i,Object.keys(o).forEach(e=>{const t=a[e],r=o[e];void 0===t&&void 0!==r&&(a[e]=r)})):r[t.ref]?r[t.ref].rules.push(i):e.push({ref:t.ref,rules:[i]})})}),e})(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:e,views:this.map.sheetViews.model,pageSetup:r,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:n},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}return!0}reconcile(e,t){const r=(e.relationships||[]).reduce((r,n)=>{if(r[n.Id]=n,n.Type===a.Comments&&(e.comments=t.comments[n.Target].comments),n.Type===a.VmlDrawing&&e.comments&&e.comments.length){const r=t.vmlDrawings[n.Target].comments;e.comments.forEach((e,t)=>{e.note=Object.assign({},e.note,r[t])})}return r},{});if(t.commentsMap=(e.comments||[]).reduce((e,t)=>(t.ref&&(e[t.ref]=t),e),{}),t.hyperlinkMap=(e.hyperlinks||[]).reduce((e,t)=>(t.rId&&(e[t.address]=r[t.rId].Target),e),{}),t.formulae={},e.rows=e.rows&&e.rows.filter(Boolean)||[],e.rows.forEach(e=>{e.cells=e.cells&&e.cells.filter(Boolean)||[]}),this.map.cols.reconcile(e.cols,t),this.map.sheetData.reconcile(e.rows,t),this.map.conditionalFormatting.reconcile(e.conditionalFormattings,t),e.media=[],e.drawing){const n=r[e.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(n){const r=n[1];t.drawings[r].anchors.forEach(t=>{if(t.medium){const r={type:"image",imageId:t.medium.index,range:t.range,hyperlinks:t.picture.hyperlinks};e.media.push(r)}})}}const n=e.background&&r[e.background.rId];if(n){const r=n.Target.split("/media/")[1],i=t.mediaIndex&&t.mediaIndex[r];void 0!==i&&e.media.push({type:"background",imageId:i})}e.tables=(e.tables||[]).map(e=>{const n=r[e.rId];return t.tables[n.Target]}),delete e.relationships,delete e.hyperlinks,delete e.comments}}O.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"},t.exports=O},{"../../../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(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr}render(e,t){t&&(e.openNode(this.tag),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this._format=e.format||function(e){try{return Number.isNaN(e.getTime())?"":e.toISOString()}catch(t){return""}},this._parse=e.parse||function(e){return new Date(e)}}render(e,t){t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(t)):e.writeText(this._format(t)),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=this._parse(e.attributes[this.attr]):this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs,this.zero=e.zero}render(e,t){(t||this.zero)&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}parseOpen(e){return e.name===this.tag&&(this.attr?this.model=parseInt(e.attributes[this.attr],10):this.text=[],!0)}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.tag=e.tag,this.attr=e.attr,this.attrs=e.attrs}render(e,t){void 0!==t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}parseOpen(e){e.name===this.tag&&(this.attr?this.model=e.attributes[this.attr]:this.text=[])}parseText(e){this.attr||this.text.push(e)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(e,t,r){const n=e("./base-xform"),i=e("../../utils/xml-stream");t.exports=class extends n{constructor(e){super(),this._model=e}render(e){if(!this._xml){const e=new i;(function e(t,r){t.openNode(r.tag,r.$),r.c&&r.c.forEach(r=>{e(t,r)}),r.t&&t.writeText(r.t),t.closeNode()})(e,this._model),this._xml=e.xml}e.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(e){return e!==this._model.tag}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,t,r){const n=e("./text-xform"),i=e("./rich-text-xform"),s=e("../base-xform");t.exports=class extends s{constructor(){super(),this.map={r:new i,t:new n}}get tag(){return"rPh"}render(e,t){if(e.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){const{r:r}=this.map;t.richText.forEach(t=>{r.render(e,t)})}else t&&this.map.t.render(e,t.text);e.closeNode()}parseOpen(e){const{name:t}=e;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[t],!!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 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}return e!==this.tag}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,t,r){const n=e("./text-xform"),i=e("../style/font-xform"),s=e("../base-xform");class a extends s{constructor(e){super(),this.model=e}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new n)}get fontXform(){return this._fontXform||(this._fontXform=new i(a.FONT_OPTIONS))}render(e,t){t=t||this.model,e.openNode("r"),t.font&&this.fontXform.render(e,t.font),this.textXform.render(e,t.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){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(e),!0}}}a.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},t.exports=a},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,t,r){const n=e("./text-xform"),i=e("./rich-text-xform"),s=e("./phonetic-text-xform"),a=e("../base-xform");t.exports=class extends a{constructor(e){super(),this.model=e,this.map={r:new i,t:new n,rPh:new s}}get tag(){return"si"}render(e,t){e.openNode(this.tag),t&&t.hasOwnProperty("richText")&&t.richText?t.richText.length?t.richText.forEach(t=>{this.map.r.render(e,t)}):this.map.t.render(e,""):null!=t&&this.map.t.render(e,t),e.closeNode()}parseOpen(e){const{name:t}=e;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={},!0):(this.parser=this.map[t],!!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 e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}return e!==this.tag}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("./shared-string-xform");t.exports=class extends i{constructor(e){super(),this.model=e||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(e){return this.model.values[e]}add(e){return e.richText?this.addRichText(e):this.addText(e)}addText(e){let t=this.hash[e];return void 0===t&&(t=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,t}addRichText(e){const t=this.sharedStringXform.toXml(e);let r=this.rich[t];return void 0===r&&(r=this.rich[t]=this.model.values.length,this.model.values.push(e)),this.model.count++,r}render(e,t){t=t||this._values,e.openXml(n.StdDocAttributes),e.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});const r=this.sharedStringXform;t.values.forEach(t=>{r.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(e),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if("sst"===e)return!1;throw new Error("Unexpected xml node in parseClose: "+e)}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"t"}render(e,t){e.openNode("t"),/^\s|\n|\s$/.test(t)&&e.addAttribute("xml:space","preserve"),e.writeText(t),e.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(e,t)=>String.fromCharCode(parseInt(t,16)))}parseOpen(e){return"t"===e.name&&(this._text=[],!0)}parseText(e){this._text.push(e)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(e,t,r){const n=e("../../../doc/enums"),i=e("../../../utils/utils"),s=e("../base-xform"),a={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((e,t)=>(e[t]=!0,e),{}),horizontal(e){return this.horizontalValues[e]?e:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((e,t)=>(e[t]=!0,e),{}),vertical(e){return"middle"===e?"center":this.verticalValues[e]?e:void 0},wrapText:e=>!!e||void 0,shrinkToFit:e=>!!e||void 0,textRotation:e=>"vertical"===e||(e=i.validInt(e))>=-90&&e<=90?e:void 0,indent:e=>(e=i.validInt(e),Math.max(0,e)),readingOrder(e){switch(e){case"ltr":return n.ReadingOrder.LeftToRight;case"rtl":return n.ReadingOrder.RightToLeft;default:return}}},o={toXml(e){if(e=a.textRotation(e)){if("vertical"===e)return 255;const t=Math.round(e);if(t>=0&&t<=90)return t;if(t<0&&t>=-90)return 90-t}},toModel(e){const t=i.validInt(e);if(void 0!==t){if(255===t)return"vertical";if(t>=0&&t<=90)return t;if(t>90&&t<=180)return 90-t}}};t.exports=class extends s{get tag(){return"alignment"}render(e,t){e.addRollback(),e.openNode("alignment");let r=!1;function n(t,n){n&&(e.addAttribute(t,n),r=!0)}n("horizontal",a.horizontal(t.horizontal)),n("vertical",a.vertical(t.vertical)),n("wrapText",!!a.wrapText(t.wrapText)&&"1"),n("shrinkToFit",!!a.shrinkToFit(t.shrinkToFit)&&"1"),n("indent",a.indent(t.indent)),n("textRotation",o.toXml(t.textRotation)),n("readingOrder",a.readingOrder(t.readingOrder)),e.closeNode(),r?e.commit():e.rollback()}parseOpen(e){const t={};let r=!1;function n(e,n,i){e&&(t[n]=i,r=!0)}n(e.attributes.horizontal,"horizontal",e.attributes.horizontal),n(e.attributes.vertical,"vertical","center"===e.attributes.vertical?"middle":e.attributes.vertical),n(e.attributes.wrapText,"wrapText",i.parseBoolean(e.attributes.wrapText)),n(e.attributes.shrinkToFit,"shrinkToFit",i.parseBoolean(e.attributes.shrinkToFit)),n(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),n(e.attributes.textRotation,"textRotation",o.toModel(e.attributes.textRotation)),n(e.attributes.readingOrder,"readingOrder","2"===e.attributes.readingOrder?"rtl":"ltr"),this.model=r?t:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,t,r){const n=e("../base-xform"),i=e("../../../utils/utils"),s=e("./color-xform");class a extends n{constructor(e){super(),this.name=e,this.map={color:new s}}get tag(){return this.name}render(e,t,r){const n=t&&t.color||r||this.defaultColor;e.openNode(this.name),t&&t.style&&(e.addAttribute("style",t.style),n&&this.map.color.render(e,n)),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:{const{style:t}=e.attributes;return this.model=t?{style:t}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(e){return a.validStyleValues[e]}}a.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((e,t)=>(e[t]=!0,e),{}),t.exports=class extends n{constructor(){super(),this.map={top:new a("top"),left:new a("left"),bottom:new a("bottom"),right:new a("right"),diagonal:new a("diagonal")}}render(e,t){const{color:r}=t;function n(n,i){n&&!n.color&&t.color&&(n={...n,color:t.color}),i.render(e,n,r)}e.openNode("border"),t.diagonal&&t.diagonal.style&&(t.diagonal.up&&e.addAttribute("diagonalUp","1"),t.diagonal.down&&e.addAttribute("diagonalDown","1")),n(t.left,this.map.left),n(t.right,this.map.right),n(t.top,this.map.top),n(t.bottom,this.map.bottom),n(t.diagonal,this.map.diagonal),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"border"===e.name?(this.reset(),this.diagonalUp=i.parseBoolean(e.attributes.diagonalUp),this.diagonalDown=i.parseBoolean(e.attributes.diagonalDown),!0):(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("border"===e){const e=this.model={},t=function(t,r,n){r&&(n&&Object.assign(r,n),e[t]=r)};t("left",this.map.left.model),t("right",this.map.right.model),t("top",this.map.top.model),t("bottom",this.map.bottom.model),t("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{constructor(e){super(),this.name=e||"color"}get tag(){return this.name}render(e,t){return!!t&&(e.openNode(this.name),t.argb?e.addAttribute("rgb",t.argb):void 0!==t.theme?(e.addAttribute("theme",t.theme),void 0!==t.tint&&e.addAttribute("tint",t.tint)):void 0!==t.indexed?e.addAttribute("indexed",t.indexed):e.addAttribute("auto","1"),e.closeNode(),!0)}parseOpen(e){return e.name===this.name&&(e.attributes.rgb?this.model={argb:e.attributes.rgb}:e.attributes.theme?(this.model={theme:parseInt(e.attributes.theme,10)},e.attributes.tint&&(this.model.tint=parseFloat(e.attributes.tint))):e.attributes.indexed?this.model={indexed:parseInt(e.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(e,t,r){const n=e("../base-xform"),i=e("./alignment-xform"),s=e("./border-xform"),a=e("./fill-xform"),o=e("./font-xform"),l=e("./numfmt-xform"),u=e("./protection-xform");t.exports=class extends n{constructor(){super(),this.map={alignment:new i,border:new s,fill:new a,font:new o,numFmt:new l,protection:new u}}get tag(){return"dxf"}render(e,t){if(e.openNode(this.tag),t.font&&this.map.font.render(e,t.font),t.numFmt&&t.numFmtId){const r={id:t.numFmtId,formatCode:t.numFmt};this.map.numFmt.render(e,r)}t.fill&&this.map.fill.render(e,t.fill),t.alignment&&this.map.alignment.render(e,t.alignment),t.border&&this.map.border.render(e,t.border),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==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(e,t,r){const n=e("../base-xform"),i=e("./color-xform");class s extends n{constructor(){super(),this.map={color:new i}}get tag(){return"stop"}render(e,t){e.openNode("stop"),e.addAttribute("position",t.position),this.map.color.render(e,t.color),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"stop":return this.model={position:parseFloat(e.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(){}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class a extends n{constructor(){super(),this.map={fgColor:new i("fgColor"),bgColor:new i("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(e,t){e.openNode("patternFill"),e.addAttribute("patternType",t.pattern),t.fgColor&&this.map.fgColor.render(e,t.fgColor),t.bgColor&&this.map.bgColor.render(e,t.bgColor),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"patternFill"===e.name?(this.model={type:"pattern",pattern:e.attributes.patternType},!0):(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.parser.model&&(this.model[e]=this.parser.model),this.parser=void 0),!0)}}class o extends n{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(e,t){switch(e.openNode("gradientFill"),t.gradient){case"angle":e.addAttribute("degree",t.degree);break;case"path":e.addAttribute("type","path"),t.center.left&&(e.addAttribute("left",t.center.left),void 0===t.center.right&&e.addAttribute("right",t.center.left)),t.center.right&&e.addAttribute("right",t.center.right),t.center.top&&(e.addAttribute("top",t.center.top),void 0===t.center.bottom&&e.addAttribute("bottom",t.center.top)),t.center.bottom&&e.addAttribute("bottom",t.center.bottom)}const r=this.map.stop;t.stops.forEach(t=>{r.render(e,t)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"gradientFill":{const t=this.model={stops:[]};return e.attributes.degree?(t.gradient="angle",t.degree=parseInt(e.attributes.degree,10)):"path"===e.attributes.type&&(t.gradient="path",t.center={left:e.attributes.left?parseFloat(e.attributes.left):0,top:e.attributes.top?parseFloat(e.attributes.top):0},e.attributes.right!==e.attributes.left&&(t.center.right=e.attributes.right?parseFloat(e.attributes.right):0),e.attributes.bottom!==e.attributes.top&&(t.center.bottom=e.attributes.bottom?parseFloat(e.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class l extends n{constructor(){super(),this.map={patternFill:new a,gradientFill:new o}}get tag(){return"fill"}render(e,t){switch(e.addRollback(),e.openNode("fill"),t.type){case"pattern":this.map.patternFill.render(e,t);break;case"gradient":this.map.gradientFill.render(e,t);break;default:return void e.rollback()}e.closeNode(),e.commit()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"fill"===e.name?(this.model={},!0):(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0))}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(e){return l.validPatternValues[e]}}l.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((e,t)=>(e[t]=!0,e),{}),l.StopXform=s,l.PatternFillXform=a,l.GradientFillXform=o,t.exports=l},{"../base-xform":32,"./color-xform":128}],131:[function(e,t,r){const n=e("./color-xform"),i=e("../simple/boolean-xform"),s=e("../simple/integer-xform"),a=e("../simple/string-xform"),o=e("./underline-xform"),l=e("../../../utils/under-dash"),u=e("../base-xform");class c extends u{constructor(e){super(),this.options=e||c.OPTIONS,this.map={b:{prop:"bold",xform:new i({tag:"b",attr:"val"})},i:{prop:"italic",xform:new i({tag:"i",attr:"val"})},u:{prop:"underline",xform:new o},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new n},condense:{prop:"condense",xform:new i({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new i({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new i({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new a({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new a({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new i({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new i({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new a({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(e,t){const{map:r}=this;e.openNode(this.options.tagName),l.each(this.map,(n,i)=>{r[i].xform.render(e,t[n.prop])}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):this.map[e.name]?(this.parser=this.map[e.name].xform,this.parser.parseOpen(e)):e.name===this.options.tagName&&(this.model={},!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser&&!this.parser.parseClose(e)){const t=this.map[e];return this.parser.model&&(this.model[t.prop]=this.parser.model),this.parser=void 0,!0}return e!==this.options.tagName}}c.OPTIONS={tagName:"font",fontNameTag:"name"},t.exports=c},{"../../../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(e,t,r){const n=e("../../../utils/under-dash"),i=e("../../defaultnumformats"),s=e("../base-xform"),a=function(){const e={};return n.each(i,(t,r)=>{t.f&&(e[t.f]=parseInt(r,10))}),e}();class o extends s{constructor(e,t){super(),this.id=e,this.formatCode=t}get tag(){return"numFmt"}render(e,t){e.leafNode("numFmt",{numFmtId:t.id,formatCode:t.formatCode})}parseOpen(e){return"numFmt"===e.name&&(this.model={id:parseInt(e.attributes.numFmtId,10),formatCode:e.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0)}parseText(){}parseClose(){return!1}}o.getDefaultFmtId=function(e){return a[e]},o.getDefaultFmtCode=function(e){return i[e]&&i[e].f},t.exports=o},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,t,r){const n=e("../base-xform"),i=(e,t)=>void 0===e?t:e;t.exports=class extends n{get tag(){return"protection"}render(e,t){e.addRollback(),e.openNode("protection");let r=!1;function n(t,n){void 0!==n&&(e.addAttribute(t,n),r=!0)}n("locked",i(t.locked,!0)?void 0:"0"),n("hidden",i(t.hidden,!1)?"1":void 0),e.closeNode(),r?e.commit():e.rollback()}parseOpen(e){const t={locked:!("0"===e.attributes.locked),hidden:"1"===e.attributes.hidden};this.model=!t.locked||t.hidden?t:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(e,t,r){const n=e("../base-xform"),i=e("./alignment-xform"),s=e("./protection-xform");t.exports=class extends n{constructor(e){super(),this.xfId=!(!e||!e.xfId),this.map={alignment:new i,protection:new s}}get tag(){return"xf"}render(e,t){e.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&e.addAttribute("xfId",t.xfId||0),t.numFmtId&&e.addAttribute("applyNumberFormat","1"),t.fontId&&e.addAttribute("applyFont","1"),t.fillId&&e.addAttribute("applyFill","1"),t.borderId&&e.addAttribute("applyBorder","1"),t.alignment&&e.addAttribute("applyAlignment","1"),t.protection&&e.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(e,t.alignment),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"xf":return this.model={numFmtId:parseInt(e.attributes.numFmtId,10),fontId:parseInt(e.attributes.fontId,10),fillId:parseInt(e.attributes.fillId,10),borderId:parseInt(e.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(e.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(e),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):"xf"!==e}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,t,r){const n=e("../../../doc/enums"),i=e("../../../utils/xml-stream"),s=e("../base-xform"),a=e("../static-xform"),o=e("../list-xform"),l=e("./font-xform"),u=e("./fill-xform"),c=e("./border-xform"),h=e("./numfmt-xform"),f=e("./style-xform"),d=e("./dxf-xform");class p extends s{constructor(e){super(),this.map={numFmts:new o({tag:"numFmts",count:!0,childXform:new h}),fonts:new o({tag:"fonts",count:!0,childXform:new l,$:{"x14ac:knownFonts":1}}),fills:new o({tag:"fills",count:!0,childXform:new u}),borders:new o({tag:"borders",count:!0,childXform:new c}),cellStyleXfs:new o({tag:"cellStyleXfs",count:!0,childXform:new f}),cellXfs:new o({tag:"cellXfs",count:!0,childXform:new f({xfId:!0})}),dxfs:new o({tag:"dxfs",always:!0,count:!0,childXform:new d}),numFmt:new h,font:new l,fill:new u,border:new c,style:new f({xfId:!0}),cellStyles:p.STATIC_XFORMS.cellStyles,tableStyles:p.STATIC_XFORMS.tableStyles,extLst:p.STATIC_XFORMS.extLst},e&&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=/* @__PURE__ */new WeakMap}render(e,t){t=t||this.model,e.openXml(i.StdDocAttributes),e.openNode("styleSheet",p.STYLESHEET_ATTRIBUTES),this.index?(t.numFmts&&t.numFmts.length&&(e.openNode("numFmts",{count:t.numFmts.length}),t.numFmts.forEach(t=>{e.writeXml(t)}),e.closeNode()),t.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),e.openNode("fonts",{count:t.fonts.length,"x14ac:knownFonts":1}),t.fonts.forEach(t=>{e.writeXml(t)}),e.closeNode(),e.openNode("fills",{count:t.fills.length}),t.fills.forEach(t=>{e.writeXml(t)}),e.closeNode(),e.openNode("borders",{count:t.borders.length}),t.borders.forEach(t=>{e.writeXml(t)}),e.closeNode(),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),e.openNode("cellXfs",{count:t.styles.length}),t.styles.forEach(t=>{e.writeXml(t)}),e.closeNode()):(this.map.numFmts.render(e,t.numFmts),this.map.fonts.render(e,t.fonts),this.map.fills.render(e,t.fills),this.map.borders.render(e,t.borders),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(e,t.styles)),p.STATIC_XFORMS.cellStyles.render(e),this.map.dxfs.render(e,t.dxfs),p.STATIC_XFORMS.tableStyles.render(e),p.STATIC_XFORMS.extLst.render(e),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):"styleSheet"===e.name?(this.initIndex(),!0):(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("styleSheet"===e){this.model={};const e=(e,t)=>{t.model&&t.model.length&&(this.model[e]=t.model)};if(e("numFmts",this.map.numFmts),e("fonts",this.map.fonts),e("fills",this.map.fills),e("borders",this.map.borders),e("styles",this.map.cellXfs),e("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const e=this.index.numFmt;this.model.numFmts.forEach(t=>{e[t.id]=t.formatCode})}return!1}return!0}addStyleModel(e,t){if(!e)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(e))return this.weakMap.get(e);const r={};if(t=t||n.ValueType.Number,e.numFmt)r.numFmtId=this._addNumFmtStr(e.numFmt);else switch(t){case n.ValueType.Number:r.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:r.numFmtId=this._addNumFmtStr("mm-dd-yy")}e.font&&(r.fontId=this._addFont(e.font)),e.border&&(r.borderId=this._addBorder(e.border)),e.fill&&(r.fillId=this._addFill(e.fill)),e.alignment&&(r.alignment=e.alignment),e.protection&&(r.protection=e.protection);const i=this._addStyle(r);return this.weakMap&&this.weakMap.set(e,i),i}getStyleModel(e){const t=this.model.styles[e];if(!t)return null;let r=this.index.model[e];if(r)return r;if(r=this.index.model[e]={},t.numFmtId){const e=this.index.numFmt[t.numFmtId]||h.getDefaultFmtCode(t.numFmtId);e&&(r.numFmt=e)}function n(e,t,n){if(n||0===n){const i=t[n];i&&(r[e]=i)}}return n("font",this.model.fonts,t.fontId),n("border",this.model.borders,t.borderId),n("fill",this.model.fills,t.fillId),t.alignment&&(r.alignment=t.alignment),t.protection&&(r.protection=t.protection),r}addDxfStyle(e){return e.numFmt&&(e.numFmtId=this._addNumFmtStr(e.numFmt)),this.model.dxfs.push(e),this.model.dxfs.length-1}getDxfStyle(e){return this.model.dxfs[e]}_addStyle(e){const t=this.map.style.toXml(e);let r=this.index.style[t];return void 0===r&&(r=this.index.style[t]=this.model.styles.length,this.model.styles.push(t)),r}_addNumFmtStr(e){let t=h.getDefaultFmtId(e);if(void 0!==t)return t;if(t=this.index.numFmt[e],void 0!==t)return t;t=this.index.numFmt[e]=164+this.model.numFmts.length;const r=this.map.numFmt.toXml({id:t,formatCode:e});return this.model.numFmts.push(r),t}_addFont(e){const t=this.map.font.toXml(e);let r=this.index.font[t];return void 0===r&&(r=this.index.font[t]=this.model.fonts.length,this.model.fonts.push(t)),r}_addBorder(e){const t=this.map.border.toXml(e);let r=this.index.border[t];return void 0===r&&(r=this.index.border[t]=this.model.borders.length,this.model.borders.push(t)),r}_addFill(e){const t=this.map.fill.toXml(e);let r=this.index.fill[t];return void 0===r&&(r=this.index.fill[t]=this.model.fills.length,this.model.fills.push(t)),r}}p.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"},p.STATIC_XFORMS={cellStyles:new a({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new a({tag:"dxfs",$:{count:0}}),tableStyles:new a({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new a({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"}}]}]})},p.Mock=class extends p{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(e){return e.autodrain(),Promise.resolve()}addStyleModel(e,t){return t===n.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){const e={numFmtId:h.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(e)}return this._dateStyleId}getStyleModel(){return{}}},t.exports=p},{"../../../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(e,t,r){const n=e("../base-xform");class i extends n{constructor(e){super(),this.model=e}get tag(){return"u"}render(e,t){if(!0===(t=t||this.model))e.leafNode("u");else{const r=i.Attributes[t];r&&e.leafNode("u",r)}}parseOpen(e){"u"===e.name&&(this.model=e.attributes.val||!0)}parseText(){}parseClose(){return!1}}i.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},t.exports=i},{"../base-xform":32}],137:[function(e,t,r){const n=e("../base-xform"),i=e("./filter-column-xform");t.exports=class extends n{constructor(){super(),this.map={filterColumn:new i}}get tag(){return"autoFilter"}prepare(e){e.columns.forEach((e,t)=>{this.map.filterColumn.prepare(e,{index:t})})}render(e,t){return e.openNode(this.tag,{ref:t.autoFilterRef}),t.columns.forEach(t=>{this.map.filterColumn.render(e,t)}),e.closeNode(),!0}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)return this.model={autoFilterRef:e.attributes.ref,columns:[]},!0;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(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(e===this.tag)return!1;throw new Error("Unexpected xml node in parseClose: "+e)}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"customFilter"}render(e,t){e.leafNode(this.tag,{val:t.val,operator:t.operator})}parseOpen(e){return e.name===this.tag&&(this.model={val:e.attributes.val,operator:e.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(e,t,r){const n=e("../base-xform"),i=e("../list-xform"),s=e("./custom-filter-xform"),a=e("./filter-xform");t.exports=class extends n{constructor(){super(),this.map={customFilters:new i({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new i({tag:"filters",count:!1,empty:!0,childXform:new a})}}get tag(){return"filterColumn"}prepare(e,t){e.colId=t.index.toString()}render(e,t){return t.customFilters?(e.openNode(this.tag,{colId:t.colId,hiddenButton:t.filterButton?"0":"1"}),this.map.customFilters.render(e,t.customFilters),e.closeNode(),!0):(e.leafNode(this.tag,{colId:t.colId,hiddenButton:t.filterButton?"0":"1"}),!0)}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{attributes:t}=e;if(e.name===this.tag)return this.model={filterButton:"0"===t.hiddenButton},!0;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){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model.customFilters=this.map.customFilters.model,!1)}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"filter"}render(e,t){e.leafNode(this.tag,{val:t.val})}parseOpen(e){return e.name===this.tag&&(this.model={val:e.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"tableColumn"}prepare(e,t){e.id=t.index+1}render(e,t){return e.leafNode(this.tag,{id:t.id.toString(),name:t.name,totalsRowLabel:t.totalsRowLabel,totalsRowFunction:t.totalsRowFunction,dxfId:t.dxfId}),!0}parseOpen(e){if(e.name===this.tag){const{attributes:t}=e;return this.model={name:t.name,totalsRowLabel:t.totalsRowLabel,totalsRowFunction:t.totalsRowFunction,dxfId:t.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(e,t,r){const n=e("../base-xform");t.exports=class extends n{get tag(){return"tableStyleInfo"}render(e,t){return e.leafNode(this.tag,{name:t.theme?t.theme:void 0,showFirstColumn:t.showFirstColumn?"1":"0",showLastColumn:t.showLastColumn?"1":"0",showRowStripes:t.showRowStripes?"1":"0",showColumnStripes:t.showColumnStripes?"1":"0"}),!0}parseOpen(e){if(e.name===this.tag){const{attributes:t}=e;return this.model={theme:t.name?t.name:null,showFirstColumn:"1"===t.showFirstColumn,showLastColumn:"1"===t.showLastColumn,showRowStripes:"1"===t.showRowStripes,showColumnStripes:"1"===t.showColumnStripes},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(e,t,r){const n=e("../../../utils/xml-stream"),i=e("../base-xform"),s=e("../list-xform"),a=e("./auto-filter-xform"),o=e("./table-column-xform"),l=e("./table-style-info-xform");class u extends i{constructor(){super(),this.map={autoFilter:new a,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new o}),tableStyleInfo:new l}}prepare(e,t){this.map.autoFilter.prepare(e),this.map.tableColumns.prepare(e.columns,t)}get tag(){return"table"}render(e,t){e.openXml(n.StdDocAttributes),e.openNode(this.tag,{...u.TABLE_ATTRIBUTES,id:t.id,name:t.name,displayName:t.displayName||t.name,ref:t.tableRef,totalsRowCount:t.totalsRow?"1":void 0,totalsRowShown:t.totalsRow?void 0:"1",headerRowCount:t.headerRow?"1":"0"}),this.map.autoFilter.render(e,t),this.map.tableColumns.render(e,t.columns),this.map.tableStyleInfo.render(e,t.style),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;const{name:t,attributes:r}=e;if(t===this.tag)this.reset(),this.model={name:r.name,displayName:r.displayName||r.name,tableRef:r.ref,totalsRow:"1"===r.totalsRowCount,headerRow:"1"===r.headerRowCount};else this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e);return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(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((e,t)=>{this.model.columns[t].filterButton=e.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1)}reconcile(e,t){e.columns.forEach(e=>{void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId))})}}u.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"},t.exports=u},{"../../../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(e,t,r){(function(r,n){(function(){const i=e("fs"),s=e("jszip"),{PassThrough:a}=e("readable-stream"),o=e("../utils/zip-stream"),l=e("../utils/stream-buf"),u=e("../utils/utils"),c=e("../utils/xml-stream"),{bufferToString:h}=e("../utils/browser-buffer-decode"),f=e("./xform/style/styles-xform"),d=e("./xform/core/core-xform"),p=e("./xform/strings/shared-strings-xform"),m=e("./xform/core/relationships-xform"),b=e("./xform/core/content-types-xform"),g=e("./xform/core/app-xform"),y=e("./xform/book/workbook-xform"),v=e("./xform/sheet/worksheet-xform"),w=e("./xform/drawing/drawing-xform"),_=e("./xform/table/table-xform"),x=e("./xform/comment/comments-xform"),k=e("./xform/comment/vml-notes-xform"),S=e("./xml/theme1");class M{constructor(e){this.workbook=e}async readFile(e,t){if(!(await u.fs.exists(e)))throw new Error("File not found: "+e);const r=i.createReadStream(e);try{const e=await this.read(r,t);return r.close(),e}catch(n){throw r.close(),n}}parseRels(e){return(new m).parseStream(e)}parseWorkbook(e){return(new y).parseStream(e)}parseSharedStrings(e){return(new p).parseStream(e)}reconcile(e,t){const r=new y,n=new v(t),i=new w,s=new _;r.reconcile(e);const a={media:e.media,mediaIndex:e.mediaIndex};Object.keys(e.drawings).forEach(t=>{const r=e.drawings[t],n=e.drawingRels[t];n&&(a.rels=n.reduce((e,t)=>(e[t.Id]=t,e),{}),(r.anchors||[]).forEach(e=>{const t=e.picture&&e.picture.hyperlinks;t&&a.rels[t.rId]&&(t.hyperlink=a.rels[t.rId].Target,delete t.rId)}),i.reconcile(r,a))});const o={styles:e.styles};Object.values(e.tables).forEach(e=>{s.reconcile(e,o)});const l={styles:e.styles,sharedStrings:e.sharedStrings,media:e.media,mediaIndex:e.mediaIndex,date1904:e.properties&&e.properties.date1904,drawings:e.drawings,comments:e.comments,tables:e.tables,vmlDrawings:e.vmlDrawings};e.worksheets.forEach(t=>{t.relationships=e.worksheetRels[t.sheetNo],n.reconcile(t,l)}),delete e.worksheetHash,delete e.worksheetRels,delete e.globalRels,delete e.sharedStrings,delete e.workbookRels,delete e.sheetDefs,delete e.styles,delete e.mediaIndex,delete e.drawings,delete e.drawingRels,delete e.vmlDrawings}async _processWorksheetEntry(e,t,r,n,i){const s=await new v(n).parseStream(e);s.sheetNo=r,t.worksheetHash[i]=s,t.worksheets.push(s)}async _processCommentEntry(e,t,r){const n=await(new x).parseStream(e);t.comments[`../${r}.xml`]=n}async _processTableEntry(e,t,r){const n=await(new _).parseStream(e);t.tables[`../tables/${r}.xml`]=n}async _processWorksheetRelsEntry(e,t,r){const n=await(new m).parseStream(e);t.worksheetRels[r]=n}async _processMediaEntry(e,t,r){const n=r.lastIndexOf(".");if(n>=1){const i=r.substr(n+1),s=r.substr(0,n);await new Promise((n,a)=>{const o=new l;o.on("finish",()=>{t.mediaIndex[r]=t.media.length,t.mediaIndex[s]=t.media.length;const e={type:"image",name:s,extension:i,buffer:o.toBuffer()};t.media.push(e),n()}),e.on("error",e=>{a(e)}),e.pipe(o)})}}async _processDrawingEntry(e,t,r){const n=await(new w).parseStream(e);t.drawings[r]=n}async _processDrawingRelsEntry(e,t,r){const n=await(new m).parseStream(e);t.drawingRels[r]=n}async _processVmlDrawingEntry(e,t,r){const n=await(new k).parseStream(e);t.vmlDrawings[`../drawings/${r}.vml`]=n}async _processThemeEntry(e,t,r){await new Promise((n,i)=>{const s=new l;e.on("error",i),s.on("error",i),s.on("finish",()=>{t.themes[r]=s.read().toString(),n()}),e.pipe(s)})}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(e,t){!e[Symbol.asyncIterator]&&e.pipe&&(e=e.pipe(new a));const r=[];for await(const n of e)r.push(n);return this.load(n.concat(r),t)}async load(e,t){let i;i=t&&t.base64?n.from(e.toString(),"base64"):e;const o={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},l=await s.loadAsync(i);for(const n of Object.values(l.files))if(!n.dir){let e,i=n.name;if("/"===i[0]&&(i=i.substr(1)),i.match(/xl\/media\//)||i.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))e=new a,e.write(await n.async("nodebuffer"));else{let t;e=new a({writableObjectMode:!0,readableObjectMode:!0}),t=r.browser?h(await n.async("nodebuffer")):await n.async("string");const i=16384;for(let r=0;r<t.length;r+=i)e.write(t.substring(r,r+i))}switch(e.end(),i){case"_rels/.rels":o.globalRels=await this.parseRels(e);break;case"xl/workbook.xml":{const t=await this.parseWorkbook(e);o.sheets=t.sheets,o.definedNames=t.definedNames,o.views=t.views,o.properties=t.properties,o.calcProperties=t.calcProperties;break}case"xl/_rels/workbook.xml.rels":o.workbookRels=await this.parseRels(e);break;case"xl/sharedStrings.xml":o.sharedStrings=new p,await o.sharedStrings.parseStream(e);break;case"xl/styles.xml":o.styles=new f,await o.styles.parseStream(e);break;case"docProps/app.xml":{const t=await(new g).parseStream(e);o.company=t.company,o.manager=t.manager;break}case"docProps/core.xml":{const t=await(new d).parseStream(e);Object.assign(o,t);break}default:{let r=i.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(r){await this._processWorksheetEntry(e,o,r[1],t,i);break}if(r=i.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),r){await this._processWorksheetRelsEntry(e,o,r[1]);break}if(r=i.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),r){await this._processThemeEntry(e,o,r[1]);break}if(r=i.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),r){await this._processMediaEntry(e,o,r[1]);break}if(r=i.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),r){await this._processDrawingEntry(e,o,r[1]);break}if(r=i.match(/xl\/(comments\d+)[.]xml/),r){await this._processCommentEntry(e,o,r[1]);break}if(r=i.match(/xl\/tables\/(table\d+)[.]xml/),r){await this._processTableEntry(e,o,r[1]);break}if(r=i.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),r){await this._processDrawingRelsEntry(e,o,r[1]);break}if(r=i.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),r){await this._processVmlDrawingEntry(e,o,r[1]);break}}}}return this.reconcile(o,t),this.workbook.model=o,this.workbook}async addMedia(e,t){await Promise.all(t.media.map(async t=>{if("image"===t.type){const n=`xl/media/${t.name}.${t.extension}`;if(t.filename){const s=await(r=t.filename,new Promise((e,t)=>{i.readFile(r,void 0,(r,n)=>{r?t(r):e(n)})}));return e.append(s,{name:n})}if(t.buffer)return e.append(t.buffer,{name:n});if(t.base64){const r=t.base64,i=r.substring(r.indexOf(",")+1);return e.append(i,{name:n,base64:!0})}}var r;throw new Error("Unsupported media")}))}addDrawings(e,t){const r=new w,n=new m;t.worksheets.forEach(t=>{const{drawing:i}=t;if(i){r.prepare(i,{});let t=r.toXml(i);e.append(t,{name:`xl/drawings/${i.name}.xml`}),t=n.toXml(i.rels),e.append(t,{name:`xl/drawings/_rels/${i.name}.xml.rels`})}})}addTables(e,t){const r=new _;t.worksheets.forEach(t=>{const{tables:n}=t;n.forEach(t=>{r.prepare(t,{});const n=r.toXml(t);e.append(n,{name:"xl/tables/"+t.target})})})}async addContentTypes(e,t){const r=(new b).toXml(t);e.append(r,{name:"[Content_Types].xml"})}async addApp(e,t){const r=(new g).toXml(t);e.append(r,{name:"docProps/app.xml"})}async addCore(e,t){const r=new d;e.append(r.toXml(t),{name:"docProps/core.xml"})}async addThemes(e,t){const r=t.themes||{theme1:S};Object.keys(r).forEach(t=>{const n=r[t],i=`xl/theme/${t}.xml`;e.append(n,{name:i})})}async addOfficeRels(e){const t=(new m).toXml([{Id:"rId1",Type:M.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:M.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:M.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);e.append(t,{name:"_rels/.rels"})}async addWorkbookRels(e,t){let r=1;const n=[{Id:"rId"+r++,Type:M.RelType.Styles,Target:"styles.xml"},{Id:"rId"+r++,Type:M.RelType.Theme,Target:"theme/theme1.xml"}];t.sharedStrings.count&&n.push({Id:"rId"+r++,Type:M.RelType.SharedStrings,Target:"sharedStrings.xml"}),t.worksheets.forEach(e=>{e.rId="rId"+r++,n.push({Id:e.rId,Type:M.RelType.Worksheet,Target:`worksheets/sheet${e.id}.xml`})});const i=(new m).toXml(n);e.append(i,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(e,t){t.sharedStrings&&t.sharedStrings.count&&e.append(t.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(e,t){const{xml:r}=t.styles;r&&e.append(r,{name:"xl/styles.xml"})}async addWorkbook(e,t){const r=new y;e.append(r.toXml(t),{name:"xl/workbook.xml"})}async addWorksheets(e,t){const r=new v,n=new m,i=new x,s=new k;t.worksheets.forEach(t=>{let a=new c;r.render(a,t),e.append(a.xml,{name:`xl/worksheets/sheet${t.id}.xml`}),t.rels&&t.rels.length&&(a=new c,n.render(a,t.rels),e.append(a.xml,{name:`xl/worksheets/_rels/sheet${t.id}.xml.rels`})),t.comments.length>0&&(a=new c,i.render(a,t),e.append(a.xml,{name:`xl/comments${t.id}.xml`}),a=new c,s.render(a,t),e.append(a.xml,{name:`xl/drawings/vmlDrawing${t.id}.vml`}))})}_finalize(e){return new Promise((t,r)=>{e.on("finish",()=>{t(this)}),e.on("error",r),e.finalize()})}prepareModel(e,t){e.creator=e.creator||"ExcelJS",e.lastModifiedBy=e.lastModifiedBy||"ExcelJS",e.created=e.created||/* @__PURE__ */new Date,e.modified=e.modified||/* @__PURE__ */new Date,e.useSharedStrings=void 0===t.useSharedStrings||t.useSharedStrings,e.useStyles=void 0===t.useStyles||t.useStyles,e.sharedStrings=new p,e.styles=e.useStyles?new f(!0):new f.Mock;const r=new y,n=new v;r.prepare(e);const i={sharedStrings:e.sharedStrings,styles:e.styles,date1904:e.properties.date1904,drawingsCount:0,media:e.media};i.drawings=e.drawings=[],i.commentRefs=e.commentRefs=[];let s=0;e.tables=[],e.worksheets.forEach(t=>{t.tables.forEach(t=>{s++,t.target=`table${s}.xml`,t.id=s,e.tables.push(t)}),n.prepare(t,i)})}async write(e,t){t=t||{};const{model:r}=this.workbook,n=new o.ZipWriter(t.zip);return n.pipe(e),this.prepareModel(r,t),await this.addContentTypes(n,r),await this.addOfficeRels(n,r),await this.addWorkbookRels(n,r),await this.addWorksheets(n,r),await this.addSharedStrings(n,r),await this.addDrawings(n,r),await this.addTables(n,r),await Promise.all([this.addThemes(n,r),this.addStyles(n,r)]),await this.addMedia(n,r),await Promise.all([this.addApp(n,r),this.addCore(n,r)]),await this.addWorkbook(n,r),this._finalize(n)}writeFile(e,t){const r=i.createWriteStream(e);return new Promise((e,n)=>{r.on("finish",()=>{e()}),r.on("error",e=>{n(e)}),this.write(r,t).then(()=>{r.end()}).catch(e=>{n(e)})})}async writeBuffer(e){const t=new l;return await this.write(t,e),t.read()}}M.RelType=e("./rel-type"),t.exports=M}).call(this)}).call(this,e("_process"),e("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(e,t,r){t.exports='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<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(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.CsvFormatterStream=void 0;const n=e("stream"),i=e("./formatter");class s extends n.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new i.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,r,n){let i=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(e,r)=>e?(i=!0,n(e)):(r&&r.forEach(e=>{this.push(t.from(e,"utf8"))}),i=!0,n()))}catch(s){if(i)throw s;n(s)}}_flush(e){this.rowFormatter.finish((r,n)=>r?e(r):(n&&n.forEach(e=>{this.push(t.from(e,"utf8"))}),e()))}}r.CsvFormatterStream=s}).call(this)}).call(this,e("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.FormatterOptions=void 0,r.FormatterOptions=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",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,e||{}),void 0===(null==e?void 0:e.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==e?void 0:e.quote)?this.quote='"':!1===(null==e?void 0:e.quote)&&(this.quote=""),"string"!=typeof(null==e?void 0:e.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(t=e.writeHeaders)||void 0===t||t),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(e,t,r){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.FieldFormatter=void 0;const i=n(e("lodash.isboolean")),s=n(e("lodash.isnil")),a=n(e("lodash.escaperegexp"));r.FieldFormatter=class{constructor(e){this._headers=null,this.formatterOptions=e,null!==e.headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g");const t=`[${e.delimiter}${a.default(e.rowDelimiter)}|\r|\n]`;this.ESCAPE_REGEXP=new RegExp(t)}set headers(e){this._headers=e}shouldQuote(e,t){const r=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(r)?r:Array.isArray(r)?r[e]:null!==this._headers&&r[this._headers[e]]}format(e,t,r){const n=(""+(s.default(e)?"":e)).replace(/\0/g,""),{formatterOptions:i}=this;return""!==i.quote&&-1!==n.indexOf(i.quote)?this.quoteField(n.replace(this.REPLACE_REGEXP,i.escapedQuote)):-1!==n.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,r)?this.quoteField(n):n}quoteField(e){const{quote:t}=this.formatterOptions;return`${t}${e}${t}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,t,r){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.RowFormatter=void 0;const i=n(e("lodash.isfunction")),s=n(e("lodash.isequal")),a=e("./FieldFormatter"),o=e("../types");class l{constructor(e){this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new a.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}static isRowHashArray(e){return!!Array.isArray(e)&&Array.isArray(e[0])&&2===e[0].length}static isRowArray(e){return Array.isArray(e)&&!this.isRowHashArray(e)}static gatherHeaders(e){return l.isRowHashArray(e)?e.map(e=>e[0]):Array.isArray(e)?e:Object.keys(e)}static createTransform(e){return o.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(i){return r(i)}return r(null,n)}:(t,r)=>{e(t,r)}}set rowTransform(e){if(!i.default(e))throw new TypeError("The transform should be a function");this._rowTransform=l.createTransform(e)}format(e,t){this.callTransformer(e,(r,n)=>{if(r)return t(r);if(!e)return t(null);const i=[];if(n){const{shouldFormatColumns:e,headers:t}=this.checkHeaders(n);if(this.shouldWriteHeaders&&t&&!this.hasWrittenHeaders&&(i.push(this.formatColumns(t,!0)),this.hasWrittenHeaders=!0),e){const e=this.gatherColumns(n);i.push(this.formatColumns(e,!1))}}return t(null,i)})}finish(e){const t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(/* @__PURE__ */new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}checkHeaders(e){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const t=l.gatherHeaders(e);return this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null}}gatherColumns(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?l.isRowHashArray(e)?this.headers.map((t,r)=>{const n=e[r];return n?n[1]:""}):l.isRowArray(e)&&!this.shouldWriteHeaders?e:this.headers.map((t,r)=>e[r]):this.headers.map(t=>e[t])}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}formatColumns(e,t){const r=e.map((e,r)=>this.fieldFormatter.format(e,r,t)).join(this.formatterOptions.delimiter),{rowCount:n}=this;return this.rowCount+=1,n?[this.formatterOptions.rowDelimiter,r].join(""):r}}r.RowFormatter=l},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.FieldFormatter=r.RowFormatter=void 0;var n=e("./RowFormatter");Object.defineProperty(r,"RowFormatter",{enumerable:!0,get:function(){return n.RowFormatter}});var i=e("./FieldFormatter");Object.defineProperty(r,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,t,r){(function(t){(function(){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(r,"__esModule",{value:!0}),r.writeToPath=r.writeToString=r.writeToBuffer=r.writeToStream=r.write=r.format=r.FormatterOptions=r.CsvFormatterStream=void 0;const s=e("util"),a=e("stream"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(e("fs")),l=e("./FormatterOptions"),u=e("./CsvFormatterStream");!function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(e("./types"),r);var c=e("./CsvFormatterStream");Object.defineProperty(r,"CsvFormatterStream",{enumerable:!0,get:function(){return c.CsvFormatterStream}});var h=e("./FormatterOptions");Object.defineProperty(r,"FormatterOptions",{enumerable:!0,get:function(){return h.FormatterOptions}}),r.format=e=>new u.CsvFormatterStream(new l.FormatterOptions(e)),r.write=(e,t)=>{const n=r.format(t),i=s.promisify((e,t)=>{n.write(e,void 0,t)});return e.reduce((e,t)=>e.then(()=>i(t)),Promise.resolve()).then(()=>n.end()).catch(e=>{n.emit("error",e)}),n},r.writeToStream=(e,t,n)=>r.write(t,n).pipe(e),r.writeToBuffer=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[],s=new a.Writable({write(e,t,r){i.push(e),r()}});return new Promise((a,o)=>{s.on("error",o).on("finish",()=>a(t.concat(i))),r.write(e,n).pipe(s)})},r.writeToString=(e,t)=>r.writeToBuffer(e,t).then(e=>e.toString()),r.writeToPath=(e,t,n)=>{const i=o.createWriteStream(e,{encoding:"utf8"});return r.write(t,n).pipe(i)}}).call(this)}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isSyncTransform=void 0,r.isSyncTransform=e=>1===e.length},{}],153:[function(e,t,r){(function(t){(function(){Object.defineProperty(r,"__esModule",{value:!0}),r.CsvParserStream=void 0;const n=e("string_decoder"),i=e("stream"),s=e("./transforms"),a=e("./parser");class o extends i.Transform{constructor(e){super({objectMode:e.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=e,this.parser=new a.Parser(e),this.headerTransformer=new s.HeaderTransformer(e),this.decoder=new n.StringDecoder(e.encoding),this.rowTransformerValidator=new s.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(e){return this.rowTransformerValidator.rowTransform=e,this}validate(e){return this.rowTransformerValidator.rowValidator=e,this}emit(e){if("end"===e)return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return super.emit(e,...r)}_transform(e,t,r){if(this.hasHitRowLimit)return r();const n=o.wrapDoneCallback(r);try{const{lines:t}=this,r=t+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(i){return n(i)}}_flush(e){const t=o.wrapDoneCallback(e);if(this.hasHitRowLimit)return t();try{const e=this.lines+this.decoder.end(),r=this.parse(e,!1);return this.processRows(r,t)}catch(r){return t(r)}}parse(e,t){if(!e)return[];const{line:r,rows:n}=this.parser.parse(e,t);return this.lines=r,n}processRows(e,r){const n=e.length,i=s=>{const a=e=>e?r(e):s%100!=0?i(s+1):void t(()=>i(s+1));if(this.checkAndEmitHeaders(),s>=n||this.hasHitRowLimit)return r();if(this.parsedLineCount+=1,this.shouldSkipLine)return a();const o=e[s];this.rowCount+=1,this.parsedRowCount+=1;const l=this.rowCount;return this.transformRow(o,(e,t)=>{if(e)return this.rowCount-=1,a(e);if(!t)return a(/* @__PURE__ */new Error("expected transform result"));if(t.isValid){if(t.row)return this.pushRow(t.row,a)}else this.emit("data-invalid",t.row,l,t.reason);return a()})};i(0)}transformRow(e,t){try{this.headerTransformer.transform(e,(r,n)=>r?t(r):n?n.isValid?n.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(n.row,t):this.skipRow(t):(this.rowCount-=1,this.parsedRowCount-=1,t(null,{row:null,isValid:!0})):this.shouldEmitRows?t(null,{isValid:!1,row:e}):this.skipRow(t):t(/* @__PURE__ */new Error("Expected result from header transform")))}catch(r){t(r)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(e){return this.rowCount-=1,e(null,{row:null,isValid:!0})}pushRow(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(r){t(r)}}static wrapDoneCallback(e){let t=!1;return function(r){if(r){if(t)throw r;return t=!0,void e(r)}for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e(...i)}}}r.CsvParserStream=o}).call(this)}).call(this,e("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(e,t,r){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.ParserOptions=void 0;const i=n(e("lodash.escaperegexp")),s=n(e("lodash.isnil"));r.ParserOptions=class{constructor(e){var t;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,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(t=this.escape)&&void 0!==t?t:this.quote,this.supportsComments=!s.default(this.comment),this.NEXT_TOKEN_REGEXP=/* @__PURE__ */new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,t,r){var n=Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Object.defineProperty(r,"__esModule",{value:!0}),r.parseString=r.parseFile=r.parseStream=r.parse=r.ParserOptions=r.CsvParserStream=void 0;const s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t}(e("fs")),a=e("stream"),o=e("./ParserOptions"),l=e("./CsvParserStream");!function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)}(e("./types"),r);var u=e("./CsvParserStream");Object.defineProperty(r,"CsvParserStream",{enumerable:!0,get:function(){return u.CsvParserStream}});var c=e("./ParserOptions");Object.defineProperty(r,"ParserOptions",{enumerable:!0,get:function(){return c.ParserOptions}}),r.parse=e=>new l.CsvParserStream(new o.ParserOptions(e)),r.parseStream=(e,t)=>e.pipe(new l.CsvParserStream(new o.ParserOptions(t))),r.parseFile=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.createReadStream(e).pipe(new l.CsvParserStream(new o.ParserOptions(t)))},r.parseString=(e,t)=>{const r=new a.Readable;return r.push(e),r.push(null),r.pipe(new l.CsvParserStream(new o.ParserOptions(t)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Parser=void 0;const n=e("./Scanner"),i=e("./RowParser"),s=e("./Token");class a{constructor(e){this.parserOptions=e,this.rowParser=new i.RowParser(this.parserOptions)}static removeBOM(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}parse(e,t){const r=new n.Scanner({line:a.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t});return this.parserOptions.supportsComments?this.parseWithComments(r):this.parseWithoutComments(r)}parseWithoutComments(e){const t=[];let r=!0;for(;r;)r=this.parseRow(e,t);return{line:e.line,rows:t}}parseWithComments(e){const{parserOptions:t}=this,r=[];for(let n=e.nextCharacterToken;null!==n;n=e.nextCharacterToken)if(s.Token.isTokenComment(n,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:r};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:r};e.truncateToCursor()}else if(!this.parseRow(e,r))break;return{line:e.line,rows:r}}parseRow(e,t){if(!e.nextNonSpaceToken)return!1;const r=this.rowParser.parse(e);return null!==r&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(r)||t.push(r),!0)}}r.Parser=a},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.RowParser=void 0;const n=e("./column"),i=e("./Token");r.RowParser=class{constructor(e){this.parserOptions=e,this.columnParser=new n.ColumnParser(e)}static isEmptyRow(e){return""===e.join("").replace(/\s+/g,"")}parse(e){const{parserOptions:t}=this,{hasMoreData:r}=e,n=e,s=[];let a=this.getStartToken(n,s);for(;a;){if(i.Token.isTokenRowDelimiter(a))return n.advancePastToken(a),!n.hasMoreCharacters&&i.Token.isTokenCarriageReturn(a,t)&&r?null:(n.truncateToCursor(),s);if(!this.shouldSkipColumnParse(n,a,s)){const e=this.columnParser.parse(n);if(null===e)return null;s.push(e)}a=n.nextNonSpaceToken}return r?null:(n.truncateToCursor(),s)}getStartToken(e,t){const r=e.nextNonSpaceToken;return null!==r&&i.Token.isTokenDelimiter(r,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):r}shouldSkipColumnParse(e,t,r){const{parserOptions:n}=this;if(i.Token.isTokenDelimiter(t,n)){e.advancePastToken(t);const s=e.nextCharacterToken;if(!e.hasMoreCharacters||null!==s&&i.Token.isTokenRowDelimiter(s))return r.push(""),!0;if(null!==s&&i.Token.isTokenDelimiter(s,n))return r.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Scanner=void 0;const n=e("./Token"),i=/((?:\r\n)|\n|\r)/;r.Scanner=class{constructor(e){this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:e}=this,t=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===e.search(t))return null;const r=t.exec(e);if(null==r)return null;const i=r[1],s=this.cursor+(r.index||0);return new n.Token({token:i,startCursor:s,endCursor:s+i.length-1})}get nextCharacterToken(){const{cursor:e,lineLength:t}=this;return t<=e?null:new n.Token({token:this.line[e],startCursor:e,endCursor:e})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(e){return this.cursor=e,this}advanceToToken(e){return this.cursor=e.startCursor,this}advancePastToken(e){return this.cursor=e.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Token=void 0,r.Token=class{constructor(e){this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}static isTokenRowDelimiter(e){const t=e.token;return"\r"===t||"\n"===t||"\r\n"===t}static isTokenCarriageReturn(e,t){return e.token===t.carriageReturn}static isTokenComment(e,t){return t.supportsComments&&!!e&&e.token===t.comment}static isTokenEscapeCharacter(e,t){return e.token===t.escapeChar}static isTokenQuote(e,t){return e.token===t.quote}static isTokenDelimiter(e,t){return e.token===t.delimiter}}},{}],160:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnFormatter=void 0,r.ColumnFormatter=class{constructor(e){e.trim?this.format=e=>e.trim():e.ltrim?this.format=e=>e.trimLeft():e.rtrim?this.format=e=>e.trimRight():this.format=e=>e}}},{}],161:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnParser=void 0;const n=e("./NonQuotedColumnParser"),i=e("./QuotedColumnParser"),s=e("../Token");r.ColumnParser=class{constructor(e){this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(e)}parse(e){const{nextNonSpaceToken:t}=e;return null!==t&&s.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser.parse(e)):this.nonQuotedColumnParser.parse(e)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.NonQuotedColumnParser=void 0;const n=e("./ColumnFormatter"),i=e("../Token");r.NonQuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const{parserOptions:t}=this,r=[];let n=e.nextCharacterToken;for(;n&&!i.Token.isTokenDelimiter(n,t)&&!i.Token.isTokenRowDelimiter(n);n=e.nextCharacterToken)r.push(n.token),e.advancePastToken(n);return this.columnFormatter.format(r.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.QuotedColumnParser=void 0;const n=e("./ColumnFormatter"),i=e("../Token");r.QuotedColumnParser=class{constructor(e){this.parserOptions=e,this.columnFormatter=new n.ColumnFormatter(e)}parse(e){if(!e.hasMoreCharacters)return null;const t=e.cursor,{foundClosingQuote:r,col:n}=this.gatherDataBetweenQuotes(e);if(!r){if(e.advanceTo(t),!e.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${e.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(e),n}gatherDataBetweenQuotes(e){const{parserOptions:t}=this;let r=!1,n=!1;const s=[];let a=e.nextCharacterToken;for(;!n&&null!==a;a=e.nextCharacterToken){const o=i.Token.isTokenQuote(a,t);if(!r&&o)r=!0;else if(r)if(i.Token.isTokenEscapeCharacter(a,t)){e.advancePastToken(a);const r=e.nextCharacterToken;null!==r&&(i.Token.isTokenQuote(r,t)||i.Token.isTokenEscapeCharacter(r,t))?(s.push(r.token),a=r):o?n=!0:s.push(a.token)}else o?n=!0:s.push(a.token);e.advancePastToken(a)}return{col:this.columnFormatter.format(s.join("")),foundClosingQuote:n}}checkForMalformedColumn(e){const{parserOptions:t}=this,{nextNonSpaceToken:r}=e;if(r){const n=i.Token.isTokenDelimiter(r,t),s=i.Token.isTokenRowDelimiter(r);if(!n&&!s){const n=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${t.escapedDelimiter}' OR new line got: '${r.token}'. at '${n}`)}e.advanceToToken(r)}else e.hasMoreData||e.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ColumnFormatter=r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=void 0;var n=e("./ColumnParser");Object.defineProperty(r,"ColumnParser",{enumerable:!0,get:function(){return n.ColumnParser}});var i=e("./NonQuotedColumnParser");Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}});var s=e("./QuotedColumnParser");Object.defineProperty(r,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var a=e("./ColumnFormatter");Object.defineProperty(r,"ColumnFormatter",{enumerable:!0,get:function(){return a.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=r.Token=r.Scanner=r.RowParser=r.Parser=void 0;var n=e("./Parser");Object.defineProperty(r,"Parser",{enumerable:!0,get:function(){return n.Parser}});var i=e("./RowParser");Object.defineProperty(r,"RowParser",{enumerable:!0,get:function(){return i.RowParser}});var s=e("./Scanner");Object.defineProperty(r,"Scanner",{enumerable:!0,get:function(){return s.Scanner}});var a=e("./Token");Object.defineProperty(r,"Token",{enumerable:!0,get:function(){return a.Token}});var o=e("./column");Object.defineProperty(r,"ColumnParser",{enumerable:!0,get:function(){return o.ColumnParser}}),Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:!0,get:function(){return o.NonQuotedColumnParser}}),Object.defineProperty(r,"QuotedColumnParser",{enumerable:!0,get:function(){return o.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,t,r){var n=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.HeaderTransformer=void 0;const i=n(e("lodash.isundefined")),s=n(e("lodash.isfunction")),a=n(e("lodash.uniq")),o=n(e("lodash.groupby"));r.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,!0===e.headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):s.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:t}=this;if(!this.headersTransform&&t.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(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:t}=this;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(!t.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return t.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}:{row:this.mapHeaders(e),isValid:!0}}mapHeaders(e){const t={},{headers:r,headersLength:n}=this;for(let s=0;s<n;s+=1){const n=r[s];if(!i.default(n)){const r=e[s];i.default(r)?t[n]="":t[n]=r}}return t}setHeaders(e){var t;const r=e.filter(e=>!!e);if(a.default(r).length!==r.length){const e=o.default(r),t=Object.keys(e).filter(t=>e[t].length>1);throw new Error("Duplicate headers found "+JSON.stringify(t))}this.headers=e,this.receivedHeaders=!0,this.headersLength=(null===(t=this.headers)||void 0===t?void 0:t.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.RowTransformerValidator=void 0;const n=(s=e("lodash.isfunction"))&&s.__esModule?s:{default:s},i=e("../types");var s;class a{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return i.isSyncTransform(e)?(t,r)=>{let n=null;try{n=e(t)}catch(i){return r(i)}return r(null,n)}:e}static createValidator(e){return i.isSyncValidate(e)?(t,r)=>{r(null,{row:t,isValid:e(t)})}:(t,r)=>{e(t,(e,n,i)=>e?r(e):r(null,n?{row:t,isValid:n,reason:i}:{row:t,isValid:!1,reason:i}))}}set rowTransform(e){if(!n.default(e))throw new TypeError("The transform should be a function");this._rowTransform=a.createTransform(e)}set rowValidator(e){if(!n.default(e))throw new TypeError("The validate should be a function");this._rowValidator=a.createValidator(e)}transformAndValidate(e,t){return this.callTransformer(e,(e,r)=>e?t(e):r?this.callValidator(r,(e,n)=>e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0})):t(null,{row:null,isValid:!0}))}callTransformer(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}callValidator(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}}r.RowTransformerValidator=a},{"../types":169,"lodash.isfunction":446}],168:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.HeaderTransformer=r.RowTransformerValidator=void 0;var n=e("./RowTransformerValidator");Object.defineProperty(r,"RowTransformerValidator",{enumerable:!0,get:function(){return n.RowTransformerValidator}});var i=e("./HeaderTransformer");Object.defineProperty(r,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.isSyncValidate=r.isSyncTransform=void 0,r.isSyncTransform=e=>1===e.length,r.isSyncValidate=e=>1===e.length},{}],170:[function(e,t,r){const n=r;n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(e,t,r){const n=e("./encoders"),i=e("./decoders"),s=e("inherits");function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}r.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return s(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,t,r){const n=e("inherits"),i=e("../base/reporter").Reporter,s=e("safer-buffer").Buffer;function a(e,t){i.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function o(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return o.isEncoderBuffer(e)||(e=new o(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,i),r.DecoderBuffer=a,a.isDecoderBuffer=function(e){return e instanceof a||"object"==typeof e&&s.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(e){const t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},r.EncoderBuffer=o,o.isEncoderBuffer=function(e){return e instanceof o||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},o.prototype.join=function(e,t){return e||(e=s.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(r){r.join(e,t),t+=r.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,t,r){const n=r;n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(e,t,r){const n=e("../base/reporter").Reporter,i=e("../base/buffer").EncoderBuffer,s=e("../base/buffer").DecoderBuffer,a=e("minimalistic-assert"),o=["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"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function u(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=u;const c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){const e=this._baseState,t={};c.forEach(function(r){t[r]=e[r]});const r=new this.constructor(t.parent);return r._baseState=t,r},u.prototype._wrap=function(){const e=this._baseState;l.forEach(function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}},this)},u.prototype._init=function(e){const t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),a.equal(t.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(e){const t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r}),t}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){u.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),o.forEach(function(e){u.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}}),u.prototype.use=function(e){a(e);const t=this._baseState;return a(null===t.use),t.use=e,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(e){const t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},u.prototype.explicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},u.prototype.implicit=function(e){const t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},u.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},u.prototype.key=function(e){const t=this._baseState;return a(null===t.key),t.key=e,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(e){const t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},u.prototype.contains=function(e){const t=this._baseState;return a(null===t.use),t.contains=e,this},u.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,a=!0,o=null;if(null!==r.key&&(o=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(a=this._peekTag(e,n,r.any),e.isError(a))return a}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(l){a=!1}e.restore(n)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(e,t)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new s(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&a&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==o&&e.exitKey(o):e.leaveKey(o,r.key,i),i},u.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},u.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some(function(s){const a=e.save(),o=r.choice[s];try{const r=o._decode(e,t);if(e.isError(r))return!1;n={type:s,value:r},i=!0}catch(l){return e.restore(a),!1}return!0},this),i?n:e.error("Choice not matched")},u.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},u.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},u.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let s=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let a=null,o=!1;if(i.any)s=this._createEncoderBuffer(e);else if(i.choice)s=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,r)._encode(e,t),o=!0;else if(i.children)a=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i},this).filter(function(e){return e}),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)},r))}else null!==i.use?s=this._getUse(i.use,r)._encode(e,t):(a=this._encodePrimitive(i.tag,e),o=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(s=this._encodeComposite(e,o,r,a))}return null!==i.explicit&&(s=this._encodeComposite(i.explicit,!1,"context",s)),s},u.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},u.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},u.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},u.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,t,r){const n=e("inherits");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}r.Reporter=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof s;if(t=n?e:new s(r.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:440}],176:[function(e,t,r){function n(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t}r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=n(r.tagClass),r.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"},r.tagByName=n(r.tag)},{}],177:[function(e,t,r){const n=r;n._reverse=function(e){const t={};return Object.keys(e).forEach(function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r}),t},n.der=e("./der")},{"./der":176}],178:[function(e,t,r){const n=e("inherits"),i=e("bn.js"),s=e("../base/buffer").DecoderBuffer,a=e("../base/node"),o=e("../constants/der");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){a.call(this,"der",e)}function c(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=o.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{let n=r;for(r=0;!(128&~n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}return{cls:n,primitive:i,tag:r,tagStr:o.tag[r]}}function h(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let s=0;s<i;s++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}t.exports=l,l.prototype.decode=function(e,t){return s.isDecoderBuffer(e)||(e=new s(e,t)),this.tree._decode(e,t)},n(u,a),u.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=c(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},u.prototype._decodeTag=function(e,t,r){const n=c(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=h(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const s=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(i=e.offset-s.offset,e.restore(s),e.skip(i,'Failed to match body of: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){const r=c(e,t);if(e.isError(r))return r;const n=h(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},u.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const s=r.decode(e,"der",n);if(e.isError(s)&&t)break;i.push(s)}return i},u.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},u.prototype._decodeObjid=function(e,t,r){let n;const i=[];let s=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),s<<=7,s|=127&a,!(128&a)&&(i.push(s),s=0);128&a&&i.push(s);const o=i[0]/40|0,l=i[0]%40;if(n=r?i:[o,l].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},u.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,s,a,o,l;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),o=0|r.slice(10,12),l=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),s=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),l=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,s,a,o,l,0)},u.prototype._decodeNull=function(){return null},u.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){let r=new i(e.raw());return t&&(r=t[r.toString(10)]||r),r},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(e,t,r){const n=r;n.der=e("./der"),n.pem=e("./pem")},{"./der":178,"./pem":180}],180:[function(e,t,r){const n=e("inherits"),i=e("safer-buffer").Buffer,s=e("./der");function a(e){s.call(this,e),this.enc="pem"}n(a,s),t.exports=a,a.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let o=-1,l=-1;for(let i=0;i<r.length;i++){const e=r[i].match(a);if(null!==e&&e[2]===n){if(-1!==o){if("END"!==e[1])break;l=i;break}if("BEGIN"!==e[1])break;o=i}}if(-1===o||-1===l)throw new Error("PEM section not found for: "+n);const u=r.slice(o+1,l).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const c=i.from(u,"base64");return s.prototype.decode.call(this,c,t)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(e,t,r){const n=e("inherits"),i=e("safer-buffer").Buffer,s=e("../base/node"),a=e("../constants/der");function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){s.call(this,"der",e)}function u(e){return e<10?"0"+e:e}t.exports=o,o.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(l,s),l.prototype._encodeComposite=function(e,t,r,n){const s=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=s,e[1]=n.length,this._createEncoderBuffer([e,n])}let o=1;for(let i=n.length;i>=256;i>>=8)o++;const l=i.alloc(2+o);l[0]=s,l[1]=128|o;for(let i=1+o,a=n.length;a>0;i--,a>>=8)l[i]=255&a;return this._createEncoderBuffer([l,n])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):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(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let i=0;i<e.length;i++){let t=e[i];for(n++;t>=128;t>>=7)n++}const s=i.alloc(n);let a=s.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(s[a--]=127&t;(t>>=7)>0;)s[a--]=128|127&t}return this._createEncoderBuffer(s)},l.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[u(n.getUTCFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getUTCFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let i=e;i>=256;i>>=8)r++;const n=new Array(r);for(let i=n.length-1;i>=0;i--)n[i]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const s=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),s.length!==n.defaultBuffer.length)return!1;for(i=0;i<s.length;i++)if(s[i]!==n.defaultBuffer[i])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(e,t,r){const n=r;n.der=e("./der"),n.pem=e("./pem")},{"./der":181,"./pem":183}],183:[function(e,t,r){const n=e("inherits"),i=e("./der");function s(e){i.call(this,e),this.enc="pem"}n(s,i),t.exports=s,s.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let i=0;i<r.length;i+=64)n.push(r.slice(i,i+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},{"./der":181,inherits:440}],184:[function(e,t,r){!function(t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof t?t.exports=i:(void 0).BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(S){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function o(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,s=Math.min(e.length,r),a=t;a<s;a++){var o=e.charCodeAt(a)-48;i*=n,i+=o>=49?o-49+10:o>=17?o-17+10:o}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),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 i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=o(e,t,n)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=o(e,t,n)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,a=s%n,o=Math.min(s,s-a)+r,u=0,c=r;c<o;c+=n)u=l(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=l(e,c,e.length,t),c=0;c<a;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","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"],c=[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],h=[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 f(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;r.words[0]=o;for(var u=1;u<n;u++){for(var c=l>>>26,h=67108863&l,f=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=f;d++){var p=u-d|0;c+=(a=(i=0|e.words[p])*(s=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],l=(16777215&(o<<i|s)).toString(16);n=0!=(s=o>>>24-i&16777215)||a!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,a--)}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var f=c[e],d=h[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);n=(p=p.idivn(d)).isZero()?m+n:u[f-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var a,o,l="le"===t,u=new e(s),c=this.clone();if(l){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[o]=a;for(;o<s;o++)u[o]=0}else{for(o=0;o<s-i;o++)u[o]=0;for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),u[s-o-1]=a}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return!(8191&t)&&(r+=13,t>>>=13),!(127&t)&&(r+=7,t>>>=7),!(15&t)&&(r+=4,t>>>=4),!(3&t)&&(r+=2,t>>>=2),!(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,a=0;a<n.length;a++)s=(t=(0|r.words[a])-(0|n.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<r.length;a++)s=(t=(0|r.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var d=function(e,t,r){var n,i,s,a=e.words,o=t.words,l=r.words,u=0,c=0|a[0],h=8191&c,f=c>>>13,d=0|a[1],p=8191&d,m=d>>>13,b=0|a[2],g=8191&b,y=b>>>13,v=0|a[3],w=8191&v,_=v>>>13,x=0|a[4],k=8191&x,S=x>>>13,M=0|a[5],C=8191&M,T=M>>>13,E=0|a[6],A=8191&E,R=E>>>13,O=0|a[7],j=8191&O,I=O>>>13,P=0|a[8],N=8191&P,B=P>>>13,D=0|a[9],F=8191&D,L=D>>>13,z=0|o[0],U=8191&z,$=z>>>13,V=0|o[1],H=8191&V,q=V>>>13,W=0|o[2],X=8191&W,K=W>>>13,Y=0|o[3],Z=8191&Y,G=Y>>>13,J=0|o[4],Q=8191&J,ee=J>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ue=oe>>>13,ce=0|o[8],he=8191&ce,fe=ce>>>13,de=0|o[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(u+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,$))+Math.imul(f,U)|0))<<13)|0;u=((s=Math.imul(f,$))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,$))+Math.imul(m,U)|0,s=Math.imul(m,$);var ge=(u+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(f,H)|0))<<13)|0;u=((s=s+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,$))+Math.imul(y,U)|0,s=Math.imul(y,$),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,q)|0;var ye=(u+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,X)|0))<<13)|0;u=((s=s+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,$))+Math.imul(_,U)|0,s=Math.imul(_,$),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,H)|0,s=s+Math.imul(y,q)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,K)|0;var ve=(u+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,Z)|0))<<13)|0;u=((s=s+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,$))+Math.imul(S,U)|0,s=Math.imul(S,$),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,H)|0,s=s+Math.imul(_,q)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,K)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var we=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;u=((s=s+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,$))+Math.imul(T,U)|0,s=Math.imul(T,$),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,H)|0,s=s+Math.imul(S,q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,Z)|0,s=s+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((s=s+Math.imul(f,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,$))+Math.imul(R,U)|0,s=Math.imul(R,$),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,H)|0,s=s+Math.imul(T,q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,X)|0,s=s+Math.imul(S,K)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,s=s+Math.imul(_,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,s=s+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(u+(n=n+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(f,se)|0))<<13)|0;u=((s=s+Math.imul(f,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,$))+Math.imul(I,U)|0,s=Math.imul(I,$),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(R,H)|0,s=s+Math.imul(R,q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,Z)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,s=s+Math.imul(y,ne)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var ke=(u+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(f,le)|0))<<13)|0;u=((s=s+Math.imul(f,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,$))+Math.imul(B,U)|0,s=Math.imul(B,$),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(I,H)|0,s=s+Math.imul(I,q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,K)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,Z)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,s=s+Math.imul(_,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(y,se)|0,s=s+Math.imul(y,ae)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;u=((s=s+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,$))+Math.imul(L,U)|0,s=Math.imul(L,$),n=n+Math.imul(N,H)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(B,H)|0,s=s+Math.imul(B,q)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,K)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(R,Z)|0,s=s+Math.imul(R,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,ae)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(y,le)|0,s=s+Math.imul(y,ue)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,fe)|0;var Me=(u+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,pe)|0))<<13)|0;u=((s=s+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,q))+Math.imul(L,H)|0,s=Math.imul(L,q),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,K)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,n=n+Math.imul(g,he)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(y,he)|0,s=s+Math.imul(y,fe)|0;var Ce=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,s=Math.imul(L,K),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(B,Z)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,s=s+Math.imul(R,ne)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,ue)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,fe)|0;var Te=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((s=s+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,G))+Math.imul(L,Z)|0,s=Math.imul(L,G),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,ae)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,ue)|0,n=n+Math.imul(k,he)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,he)|0,s=s+Math.imul(S,fe)|0;var Ee=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(T,he)|0,s=s+Math.imul(T,fe)|0;var Ae=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(L,re)|0,s=Math.imul(L,ne),n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,ae)|0,n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ue)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,fe)|0;var Re=(u+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,se),i=(i=Math.imul(F,ae))+Math.imul(L,se)|0,s=Math.imul(L,ae),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,ue)|0,n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(I,he)|0,s=s+Math.imul(I,fe)|0;var Oe=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,ue))+Math.imul(L,le)|0,s=Math.imul(L,ue),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(B,he)|0,s=s+Math.imul(B,fe)|0;var je=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,he),i=(i=Math.imul(F,fe))+Math.imul(L,he)|0,s=Math.imul(L,fe);var Ie=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Pe=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(L,pe)|0))<<13)|0;return u=((s=Math.imul(L,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,l[0]=be,l[1]=ge,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=xe,l[7]=ke,l[8]=Se,l[9]=Me,l[10]=Ce,l[11]=Te,l[12]=Ee,l[13]=Ae,l[14]=Re,l[15]=Oe,l[16]=je,l[17]=Ie,l[18]=Pe,0!==u&&(l[19]=u,r.length++),r};function p(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(d=f),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var a=i;i=0;for(var o=67108863&n,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),f=67108863&h;o=67108863&(f=f+o|0),i+=(a=(a=a+(h/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}r.words[s]=o,n=a,a=i}return 0!==n?r.words[s]=n:r.length--,r.strip()}(this,e,t):p(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,s){for(var a=0;a<s;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,l=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var h=l,f=u,d=0;d<a;d++){var p=r[c+d],m=n[c+d],b=r[c+d+a],g=n[c+d+a],y=h*b-f*g;g=h*g+f*b,b=y,r[c+d]=p+b,n[c+d]=m+g,r[c+d+a]=p-b,n[c+d+a]=m-g,d!==o&&(y=l*h-u*f,f=l*f+u*h,h=y)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,n,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],n[2*a]=8191&s,s>>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===s),r(!(-8192&s))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),a=new Array(n),o=new Array(n),l=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,u,n),this.transform(a,s,o,l,n,i),this.transform(u,s,c,h,n,i);for(var d=0;d<n;d++){var p=o[d]*c[d]-l[d]*h[d];l[d]=o[d]*h[d]+l[d]*c[d],o[d]=p}return this.conjugate(o,l,n),this.transform(o,l,f,s,n,i),this.conjugate(f,s,n),this.normalize13b(f,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),p(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,s=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=s>>>26,this.words[n]=67108863&s}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var s=r.sqr();n<t.length;n++,s=s.sqr())0!==t[n]&&(r=r.mul(s));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,l=(0|this.words[t])-o<<n;this.words[t]=l|a,a=o>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,l=n;if(i-=a,i=Math.max(0,i),l){for(var u=0;u<a;u++)l.words[u]=this.words[u];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&o}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(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)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,s,a=e.length+n;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+o;var l=(0|e.words[i])*t;o=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)o=(s=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&s;if(0===o)return this.strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),s=e,a=0|s.words[s.length-1];0!=(r=26-this._countBits(a))&&(s=s.ushln(r),n.iushln(r),a=0|s.words[s.length-1]);var o,l=n.length-s.length;if("mod"!==t){(o=new i(null)).length=l+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var c=n.clone()._ishlnsubmul(s,1,l);0===c.negative&&(n=c,o&&(o.words[l]=1));for(var h=l-1;h>=0;h--){var f=67108864*(0|n.words[s.length+h])+(0|n.words[s.length+h-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(s,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(s,1,h),n.isZero()||(n.negative^=1);o&&(o.words[h]=f)}return o&&o.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),l=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(c),a.isub(h)),s.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(c),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o),a.isub(l)):(n.isub(t),o.isub(s),l.isub(a))}return{a:o,b:l,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var h=0,f=1;0==(n.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(n.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,a=n;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new x(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){x.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}g.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},n(y,g),y.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(v,g),n(w,g),n(_,g),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new v;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return b[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);r(!s.isZero());var o=new i(1).toRed(this),l=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,s),f=this.pow(e,s.addn(1).iushrn(1)),d=this.pow(e,s),p=a;0!==d.cmp(o);){for(var m=d,b=0;0!==m.cmp(o);b++)m=m.redSqr();r(b<p);var g=this.pow(h,new i(1).iushln(p-b-1));f=f.redMul(g),h=g.redSqr(),d=d.redMul(h),p=b}return f},x.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},x.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var s=r[0],a=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var h=u>>c&1;s!==r[0]&&(s=this.sqr(s)),0!==h||0!==a?(a<<=1,a|=h,(4===++o||0===n&&0===c)&&(s=this.mul(s,r[a]),o=0,a=0)):o=0}l=26}return s},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new k(e)},n(k,x),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(n).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t)},{buffer:188}],185:[function(e,t,r){r.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n,a=l(e),o=a[0],u=a[1],c=new s(3*(o+(n=u))/4-n),h=0,f=u>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],c[h++]=t>>16&255,c[h++]=t>>8&255,c[h++]=255&t;return 2===u&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[h++]=255&t),1===u&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[h++]=t>>8&255,c[h++]=255&t),c},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],a=0,o=r-i;a<o;a+=16383)s.push(u(e,a,a+16383>o?o:a+16383));return 1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],i[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,r){for(var i,s,a=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],186:[function(e,t,r){!function(t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof t?t.exports=i:(void 0).BN=i,i.BN=i,i.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:e("buffer").Buffer}catch(T){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function o(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function l(e,t,n,i){for(var s=0,a=0,o=Math.min(e.length,n),l=t;l<o;l++){var u=e.charCodeAt(l)-48;s*=i,a=u>=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&a<i,"Invalid character"),s+=a}return s}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){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):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),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 i=0;i<this.length;i++)this.words[i]=0;var s,a,o=0;if("be"===n)for(i=e.length-1,s=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);else if("le"===n)for(i=0,s=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,(o+=24)>=26&&(o-=26,s++);return this._strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=o(e,t,n)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=o(e,t,n)<<s,this.words[a]|=67108863&i,s>=18?(s-=18,a+=1,this.words[a]|=i>>>26):s+=8;this._strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var s=e.length-r,a=s%n,o=Math.min(s,s-a)+r,u=0,c=r;c<o;c+=n)u=l(e,c,c+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var h=1;for(u=l(e,c,e.length,t),c=0;c<a;c++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype._move=function(e){u(e,this)},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(T){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){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"],f=[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],d=[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,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],s=0|t.words[0],a=i*s,o=67108863&a,l=a/67108864|0;r.words[0]=o;for(var u=1;u<n;u++){for(var c=l>>>26,h=67108863&l,f=Math.min(u,t.length-1),d=Math.max(0,u-e.length+1);d<=f;d++){var p=u-d|0;c+=(a=(i=0|e.words[p])*(s=0|t.words[d])+h)/67108864|0,h=67108863&a}r.words[u]=0|h,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r._strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,s=0,a=0;a<this.length;a++){var o=this.words[a],l=(16777215&(o<<i|s)).toString(16);s=o>>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==s||a!==this.length-1?h[6-l.length]+l+n:l+n}for(0!==s&&(n=s.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=f[e],c=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(c).toString(e);n=(p=p.idivn(c)).isZero()?m+n:h[u-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16,2)},s&&(i.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var a,o,l=(o=s,(a=e).allocUnsafe?a.allocUnsafe(o):new a(o));return this["_toArrayLike"+("le"===t?"LE":"BE")](l,i),l},i.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|n;e[r++]=255&a,r<e.length&&(e[r++]=a>>8&255),r<e.length&&(e[r++]=a>>16&255),6===s?(r<e.length&&(e[r++]=a>>24&255),n=0,s=0):(n=a>>>24,s+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},i.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,s=0;i<this.length;i++){var a=this.words[i]<<s|n;e[r--]=255&a,r>=0&&(e[r--]=a>>8&255),r>=0&&(e[r--]=a>>16&255),6===s?(r>=0&&(e[r--]=a>>24&255),n=0,s=0):(n=a>>>24,s+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return!(8191&t)&&(r+=13,t>>>=13),!(127&t)&&(r+=7,t>>>=7),!(15&t)&&(r+=4,t>>>=4),!(3&t)&&(r+=2,t>>>=2),!(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},i.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},i.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},i.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,s=0;s<n.length;s++)t=(0|r.words[s])+(0|n.words[s])+i,this.words[s]=67108863&t,i=t>>>26;for(;0!==i&&s<r.length;s++)t=(0|r.words[s])+i,this.words[s]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,a=0;a<n.length;a++)s=(t=(0|r.words[a])-(0|n.words[a])+s)>>26,this.words[a]=67108863&t;for(;0!==s&&a<r.length;a++)s=(t=(0|r.words[a])+s)>>26,this.words[a]=67108863&t;if(0===s&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,s,a=e.words,o=t.words,l=r.words,u=0,c=0|a[0],h=8191&c,f=c>>>13,d=0|a[1],p=8191&d,m=d>>>13,b=0|a[2],g=8191&b,y=b>>>13,v=0|a[3],w=8191&v,_=v>>>13,x=0|a[4],k=8191&x,S=x>>>13,M=0|a[5],C=8191&M,T=M>>>13,E=0|a[6],A=8191&E,R=E>>>13,O=0|a[7],j=8191&O,I=O>>>13,P=0|a[8],N=8191&P,B=P>>>13,D=0|a[9],F=8191&D,L=D>>>13,z=0|o[0],U=8191&z,$=z>>>13,V=0|o[1],H=8191&V,q=V>>>13,W=0|o[2],X=8191&W,K=W>>>13,Y=0|o[3],Z=8191&Y,G=Y>>>13,J=0|o[4],Q=8191&J,ee=J>>>13,te=0|o[5],re=8191&te,ne=te>>>13,ie=0|o[6],se=8191&ie,ae=ie>>>13,oe=0|o[7],le=8191&oe,ue=oe>>>13,ce=0|o[8],he=8191&ce,fe=ce>>>13,de=0|o[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(u+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,$))+Math.imul(f,U)|0))<<13)|0;u=((s=Math.imul(f,$))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,$))+Math.imul(m,U)|0,s=Math.imul(m,$);var ge=(u+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,q)|0)+Math.imul(f,H)|0))<<13)|0;u=((s=s+Math.imul(f,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,U),i=(i=Math.imul(g,$))+Math.imul(y,U)|0,s=Math.imul(y,$),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,H)|0,s=s+Math.imul(m,q)|0;var ye=(u+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,X)|0))<<13)|0;u=((s=s+Math.imul(f,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,$))+Math.imul(_,U)|0,s=Math.imul(_,$),n=n+Math.imul(g,H)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,H)|0,s=s+Math.imul(y,q)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,K)|0;var ve=(u+(n=n+Math.imul(h,Z)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(f,Z)|0))<<13)|0;u=((s=s+Math.imul(f,G)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,U),i=(i=Math.imul(k,$))+Math.imul(S,U)|0,s=Math.imul(S,$),n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,H)|0,s=s+Math.imul(_,q)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,K)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,K)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,s=s+Math.imul(m,G)|0;var we=(u+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0))<<13)|0;u=((s=s+Math.imul(f,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,$))+Math.imul(T,U)|0,s=Math.imul(T,$),n=n+Math.imul(k,H)|0,i=(i=i+Math.imul(k,q)|0)+Math.imul(S,H)|0,s=s+Math.imul(S,q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,K)|0,n=n+Math.imul(g,Z)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(y,Z)|0,s=s+Math.imul(y,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0;var _e=(u+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(f,re)|0))<<13)|0;u=((s=s+Math.imul(f,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,$))+Math.imul(R,U)|0,s=Math.imul(R,$),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(T,H)|0,s=s+Math.imul(T,q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(S,X)|0,s=s+Math.imul(S,K)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,s=s+Math.imul(_,G)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,s=s+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0;var xe=(u+(n=n+Math.imul(h,se)|0)|0)+((8191&(i=(i=i+Math.imul(h,ae)|0)+Math.imul(f,se)|0))<<13)|0;u=((s=s+Math.imul(f,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,$))+Math.imul(I,U)|0,s=Math.imul(I,$),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(R,H)|0,s=s+Math.imul(R,q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(T,X)|0,s=s+Math.imul(T,K)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(S,Z)|0,s=s+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(y,re)|0,s=s+Math.imul(y,ne)|0,n=n+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ae)|0;var ke=(u+(n=n+Math.imul(h,le)|0)|0)+((8191&(i=(i=i+Math.imul(h,ue)|0)+Math.imul(f,le)|0))<<13)|0;u=((s=s+Math.imul(f,ue)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,$))+Math.imul(B,U)|0,s=Math.imul(B,$),n=n+Math.imul(j,H)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(I,H)|0,s=s+Math.imul(I,q)|0,n=n+Math.imul(A,X)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(R,X)|0,s=s+Math.imul(R,K)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,Z)|0,s=s+Math.imul(T,G)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(S,Q)|0,s=s+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,s=s+Math.imul(_,ne)|0,n=n+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(y,se)|0,s=s+Math.imul(y,ae)|0,n=n+Math.imul(p,le)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,le)|0,s=s+Math.imul(m,ue)|0;var Se=(u+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,fe)|0)+Math.imul(f,he)|0))<<13)|0;u=((s=s+Math.imul(f,fe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,$))+Math.imul(L,U)|0,s=Math.imul(L,$),n=n+Math.imul(N,H)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(B,H)|0,s=s+Math.imul(B,q)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,K)|0,n=n+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(R,Z)|0,s=s+Math.imul(R,G)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(S,re)|0,s=s+Math.imul(S,ne)|0,n=n+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,ae)|0,n=n+Math.imul(g,le)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(y,le)|0,s=s+Math.imul(y,ue)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(m,he)|0,s=s+Math.imul(m,fe)|0;var Me=(u+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(f,pe)|0))<<13)|0;u=((s=s+Math.imul(f,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(F,H),i=(i=Math.imul(F,q))+Math.imul(L,H)|0,s=Math.imul(L,q),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,K)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(I,Z)|0,s=s+Math.imul(I,G)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,Q)|0,s=s+Math.imul(R,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(T,re)|0,s=s+Math.imul(T,ne)|0,n=n+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(S,se)|0,s=s+Math.imul(S,ae)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,le)|0,s=s+Math.imul(_,ue)|0,n=n+Math.imul(g,he)|0,i=(i=i+Math.imul(g,fe)|0)+Math.imul(y,he)|0,s=s+Math.imul(y,fe)|0;var Ce=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((s=s+Math.imul(m,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,s=Math.imul(L,K),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(B,Z)|0,s=s+Math.imul(B,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,s=s+Math.imul(R,ne)|0,n=n+Math.imul(C,se)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,ue)|0)+Math.imul(S,le)|0,s=s+Math.imul(S,ue)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(_,he)|0,s=s+Math.imul(_,fe)|0;var Te=(u+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;u=((s=s+Math.imul(y,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(F,Z),i=(i=Math.imul(F,G))+Math.imul(L,Z)|0,s=Math.imul(L,G),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,ee)|0,n=n+Math.imul(j,re)|0,i=(i=i+Math.imul(j,ne)|0)+Math.imul(I,re)|0,s=s+Math.imul(I,ne)|0,n=n+Math.imul(A,se)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(R,se)|0,s=s+Math.imul(R,ae)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,ue)|0)+Math.imul(T,le)|0,s=s+Math.imul(T,ue)|0,n=n+Math.imul(k,he)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(S,he)|0,s=s+Math.imul(S,fe)|0;var Ee=(u+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;u=((s=s+Math.imul(_,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(L,Q)|0,s=Math.imul(L,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(B,re)|0,s=s+Math.imul(B,ne)|0,n=n+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,n=n+Math.imul(A,le)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(R,le)|0,s=s+Math.imul(R,ue)|0,n=n+Math.imul(C,he)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(T,he)|0,s=s+Math.imul(T,fe)|0;var Ae=(u+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,me)|0)+Math.imul(S,pe)|0))<<13)|0;u=((s=s+Math.imul(S,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(F,re),i=(i=Math.imul(F,ne))+Math.imul(L,re)|0,s=Math.imul(L,ne),n=n+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(B,se)|0,s=s+Math.imul(B,ae)|0,n=n+Math.imul(j,le)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(I,le)|0,s=s+Math.imul(I,ue)|0,n=n+Math.imul(A,he)|0,i=(i=i+Math.imul(A,fe)|0)+Math.imul(R,he)|0,s=s+Math.imul(R,fe)|0;var Re=(u+(n=n+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,me)|0)+Math.imul(T,pe)|0))<<13)|0;u=((s=s+Math.imul(T,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(F,se),i=(i=Math.imul(F,ae))+Math.imul(L,se)|0,s=Math.imul(L,ae),n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,ue)|0)+Math.imul(B,le)|0,s=s+Math.imul(B,ue)|0,n=n+Math.imul(j,he)|0,i=(i=i+Math.imul(j,fe)|0)+Math.imul(I,he)|0,s=s+Math.imul(I,fe)|0;var Oe=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((s=s+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(F,le),i=(i=Math.imul(F,ue))+Math.imul(L,le)|0,s=Math.imul(L,ue),n=n+Math.imul(N,he)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(B,he)|0,s=s+Math.imul(B,fe)|0;var je=(u+(n=n+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,me)|0)+Math.imul(I,pe)|0))<<13)|0;u=((s=s+Math.imul(I,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(F,he),i=(i=Math.imul(F,fe))+Math.imul(L,he)|0,s=Math.imul(L,fe);var Ie=(u+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((s=s+Math.imul(B,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Pe=(u+(n=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(L,pe)|0))<<13)|0;return u=((s=Math.imul(L,me))+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,l[0]=be,l[1]=ge,l[2]=ye,l[3]=ve,l[4]=we,l[5]=_e,l[6]=xe,l[7]=ke,l[8]=Se,l[9]=Me,l[10]=Ce,l[11]=Te,l[12]=Ee,l[13]=Ae,l[14]=Re,l[15]=Oe,l[16]=je,l[17]=Ie,l[18]=Pe,0!==u&&(l[19]=u,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,s=0;s<r.length-1;s++){var a=i;i=0;for(var o=67108863&n,l=Math.min(s,t.length-1),u=Math.max(0,s-e.length+1);u<=l;u++){var c=s-u,h=(0|e.words[c])*(0|t.words[u]),f=67108863&h;o=67108863&(f=f+o|0),i+=(a=(a=a+(h/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}r.words[s]=o,n=a,a=i}return 0!==n?r.words[s]=n:r.length--,r._strip()}function g(e,t,r){return b(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(m=p),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?b(this,e,t):g(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},y.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},y.prototype.permute=function(e,t,r,n,i,s){for(var a=0;a<s;a++)n[a]=t[e[a]],i[a]=r[e[a]]},y.prototype.transform=function(e,t,r,n,i,s){this.permute(s,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var o=a<<1,l=Math.cos(2*Math.PI/o),u=Math.sin(2*Math.PI/o),c=0;c<i;c+=o)for(var h=l,f=u,d=0;d<a;d++){var p=r[c+d],m=n[c+d],b=r[c+d+a],g=n[c+d+a],y=h*b-f*g;g=h*g+f*b,b=y,r[c+d]=p+b,n[c+d]=m+g,r[c+d+a]=p-b,n[c+d+a]=m-g,d!==o&&(y=l*h-u*f,f=l*f+u*h,h=y)}},y.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},y.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},y.prototype.convert13b=function(e,t,n,i){for(var s=0,a=0;a<t;a++)s+=0|e[a],n[2*a]=8191&s,s>>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===s),r(!(-8192&s))},y.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},y.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),s=this.stub(n),a=new Array(n),o=new Array(n),l=new Array(n),u=new Array(n),c=new Array(n),h=new Array(n),f=r.words;f.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,u,n),this.transform(a,s,o,l,n,i),this.transform(u,s,c,h,n,i);for(var d=0;d<n;d++){var p=o[d]*c[d]-l[d]*h[d];l[d]=o[d]*h[d]+l[d]*c[d],o[d]=p}return this.conjugate(o,l,n),this.transform(o,l,f,s,n,i),this.conjugate(f,s,n),this.normalize13b(f,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),g(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*e,a=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var s=r.sqr();n<t.length;n++,s=s.sqr())0!==t[n]&&(r=r.mul(s));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var o=this.words[t]&s,l=(0|this.words[t])-o<<n;this.words[t]=l|a,a=o>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<<s,l=n;if(i-=a,i=Math.max(0,i),l){for(var u=0;u<a;u++)l.words[u]=this.words[u];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var c=0;for(u=this.length-1;u>=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-s|h>>>s,c=h&o}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n||!(this.words[n]&i))},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(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)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,s,a=e.length+n;this._expand(a);var o=0;for(i=0;i<e.length;i++){s=(0|this.words[i+n])+o;var l=(0|e.words[i])*t;o=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)o=(s=(0|this.words[i+n])+o)>>26,this.words[i+n]=67108863&s;if(0===o)return this._strip();for(r(-1===o),o=0,i=0;i<this.length;i++)o=(s=-(0|this.words[i])+o)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),s=e,a=0|s.words[s.length-1];0!=(r=26-this._countBits(a))&&(s=s.ushln(r),n.iushln(r),a=0|s.words[s.length-1]);var o,l=n.length-s.length;if("mod"!==t){(o=new i(null)).length=l+1,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var c=n.clone()._ishlnsubmul(s,1,l);0===c.negative&&(n=c,o&&(o.words[l]=1));for(var h=l-1;h>=0;h--){var f=67108864*(0|n.words[s.length+h])+(0|n.words[s.length+h-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(s,f,h);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(s,1,h),n.isZero()||(n.negative^=1);o&&(o.words[h]=f)}return o&&o._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,t),"mod"!==t&&(s=o.div.neg()),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),t),"mod"!==t&&(s=o.div.neg()),{div:s,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),t),"div"!==t&&(a=o.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:o.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modrn(e.words[0]))}:this._wordDiv(e,t);var s,a,o},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),s=r.cmp(n);return s<0||1===i&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%e;return t?-i:i},i.prototype.modn=function(e){return this.modrn(e)},i.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/e|0,n=s%e}return this._strip(),t?this.ineg():this},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s=new i(1),a=new i(0),o=new i(0),l=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var c=n.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(c),a.isub(h)),s.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(o.isOdd()||l.isOdd())&&(o.iadd(c),l.isub(h)),o.iushrn(1),l.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(o),a.isub(l)):(n.isub(t),o.isub(s),l.isub(a))}return{a:o,b:l,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var s,a=new i(1),o=new i(0),l=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,c=1;0==(t.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var h=0,f=1;0==(n.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(n.iushrn(h);h-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(o)):(n.isub(t),o.isub(a))}return(s=0===t.cmpn(1)?a:o).cmpn(0)<0&&s.iadd(e),s},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var s=t;t=r,r=s}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,a=n;0!==s&&a<this.length;a++){var o=0|this.words[a];s=(o+=s)>>>26,o&=67108863,this.words[a]=o}return 0!==s&&(this.words[a]=s,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new M(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}w.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},n(_,w),_.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,n=10;n<e.length;n++){var s=0|e.words[n];e.words[n-10]=(4194303&s)<<4|i>>>22,i=s}i>>>=22,e.words[n-10]=i,0===i&&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 t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(x,w),n(k,w),n(S,w),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new x;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return v[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);r(!s.isZero());var o=new i(1).toRed(this),l=o.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new i(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var h=this.pow(c,s),f=this.pow(e,s.addn(1).iushrn(1)),d=this.pow(e,s),p=a;0!==d.cmp(o);){for(var m=d,b=0;0!==m.cmp(o);b++)m=m.redSqr();r(b<p);var g=this.pow(h,new i(1).iushln(p-b-1));f=f.redMul(g),h=g.redSqr(),d=d.redMul(h),p=b}return f},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var s=r[0],a=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),n=t.length-1;n>=0;n--){for(var u=t.words[n],c=l-1;c>=0;c--){var h=u>>c&1;s!==r[0]&&(s=this.sqr(s)),0!==h||0!==a?(a<<=1,a|=h,(4===++o||0===n&&0===c)&&(s=this.mul(s,r[a]),o=0,a=0)):o=0}l=26}return s},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new C(e)},n(C,M),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=r.isub(n).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t)},{buffer:188}],187:[function(e,t,r){var n;function i(e){this.rand=e}if(t.exports=function(e){return n||(n=new i(null)),n.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=e("crypto");if("function"!=typeof s.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return s.randomBytes(e)}}catch(a){}},{crypto:188}],188:[function(e,t,r){},{}],189:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function s(e){for(;0<e.length;e++)e[0]=0}function a(e,t,r,n,i){for(var s,a,o,l,u=r[0],c=r[1],h=r[2],f=r[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],b=e[3]^t[3],g=4,y=1;y<i;y++)s=u[d>>>24]^c[p>>>16&255]^h[m>>>8&255]^f[255&b]^t[g++],a=u[p>>>24]^c[m>>>16&255]^h[b>>>8&255]^f[255&d]^t[g++],o=u[m>>>24]^c[b>>>16&255]^h[d>>>8&255]^f[255&p]^t[g++],l=u[b>>>24]^c[d>>>16&255]^h[p>>>8&255]^f[255&m]^t[g++],d=s,p=a,m=o,b=l;return s=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&b])^t[g++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[b>>>8&255]<<8|n[255&d])^t[g++],o=(n[m>>>24]<<24|n[b>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[g++],l=(n[b>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[g++],[s>>>=0,a>>>=0,o>>>=0,l>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],s=[[],[],[],[]],a=0,o=0,l=0;l<256;++l){var u=o^o<<1^o<<2^o<<3^o<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var c=e[a],h=e[c],f=e[h],d=257*e[u]^16843008*u;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*f^65537*h^257*c^16843008*a,s[0][u]=d<<24|d>>>8,s[1][u]=d<<16|d>>>16,s[2][u]=d<<8|d>>>24,s[3][u]=d,0===a?a=o=1:(a=c^e[e[e[f^c]]],o^=e[e[o]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:s}}();function u(e){this._key=i(e),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],s=0;s<t;s++)i[s]=e[s];for(s=t;s<n;s++){var a=i[s-1];s%t==0?(a=a<<8|a>>>24,a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a],a^=o[s/t|0]<<24):t>6&&s%t==4&&(a=l.SBOX[a>>>24]<<24|l.SBOX[a>>>16&255]<<16|l.SBOX[a>>>8&255]<<8|l.SBOX[255&a]),i[s]=i[s-t]^a}for(var u=[],c=0;c<n;c++){var h=n-c,f=i[h-(c%4?0:4)];u[c]=c<4||h<=4?f:l.INV_SUB_MIX[0][l.SBOX[f>>>24]]^l.INV_SUB_MIX[1][l.SBOX[f>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[f>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},u.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},u.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=a(e,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),s=n.allocUnsafe(16);return s.writeUInt32BE(r[0],0),s.writeUInt32BE(r[3],4),s.writeUInt32BE(r[2],8),s.writeUInt32BE(r[1],12),s},u.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},t.exports.AES=u},{"safe-buffer":494}],190:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,s=e("cipher-base"),a=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),u=e("./incr32");function c(e,t,r,a){s.call(this);var l=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(l);this._ghash=new o(c),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new o(r),s=t.length,a=s%16;n.update(t),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var l=8*s,c=i.alloc(8);c.writeUIntBE(l,0,8),n.update(c),e._finID=n.state;var h=i.from(e._finID);return u(h),h}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(c,s),c.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},c.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=c},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(e,t,r){var n=e("./encrypter"),i=e("./decrypter"),s=e("./modes/list.json");r.createCipher=r.Cipher=n.createCipher,r.createCipheriv=r.Cipheriv=n.createCipheriv,r.createDecipher=r.Decipher=i.createDecipher,r.createDecipheriv=r.Decipheriv=i.createDecipheriv,r.listCiphers=r.getCiphers=function(){return Object.keys(s)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(e,t,r){var n=e("./authCipher"),i=e("safe-buffer").Buffer,s=e("./modes"),a=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){o.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function f(e,t,r){var o=s[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===o.type?new a(o.module,t,r,!0):"auth"===o.type?new n(o.module,t,r,!0):new c(o.module,t,r)}e("inherits")(c,o),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(e,t){var r=s[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(t,!1,r.key,r.iv);return f(e,n.key,n.iv)},r.createDecipheriv=f},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(e,t,r){var n=e("./modes"),i=e("./authCipher"),s=e("safe-buffer").Buffer,a=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),u=e("evp_bytestokey");function c(e,t,r){o.call(this),this._cache=new f,this._cipher=new l.AES(t),this._prev=s.from(r),this._mode=e,this._autopadding=!0}e("inherits")(c,o),c.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return s.concat(n)};var h=s.alloc(16,16);function f(){this.cache=s.allocUnsafe(0)}function d(e,t,r){var o=n[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=s.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=s.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new a(o.module,t,r):"auth"===o.type?new i(o.module,t,r):new c(o.module,t,r)}c.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),/* @__PURE__ */new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=s.concat([this.cache,e])},f.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=s.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return s.concat([this.cache,t])},r.createCipheriv=d,r.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.alloc(16,0);function s(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(!!(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=s(i)},a.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(s([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":494}],195:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],196:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;return e._prev=t,n(e._cipher.decryptBlock(t),r)}},{"buffer-xor":219}],197:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("buffer-xor");function s(e,t,r){var s=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(s),e._prev=n.concat([e._prev,r?t:a]),a}r.encrypt=function(e,t,r){for(var i,a=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){a=n.concat([a,s(e,t,r)]);break}i=e._cache.length,a=n.concat([a,s(e,t.slice(0,i),r)]),t=t.slice(i)}return a}},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){for(var n,i,a=-1,o=0;++a<8;)n=t&1<<7-a?128:0,o+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>a%8,e._prev=s(e._prev,r?n:i);return o}function s(e,t){var r=e.length,i=-1,s=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)s[i]=e[i]<<1|e[i+1]>>7;return s}r.encrypt=function(e,t,r){for(var s=t.length,a=n.allocUnsafe(s),o=-1;++o<s;)a[o]=i(e,t[o],r);return a}},{"safe-buffer":494}],199:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}r.encrypt=function(e,t,r){for(var s=t.length,a=n.allocUnsafe(s),o=-1;++o<s;)a[o]=i(e,t[o],r);return a}},{"safe-buffer":494}],200:[function(e,t,r){var n=e("buffer-xor"),i=e("safe-buffer").Buffer,s=e("../incr32");function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}r.encrypt=function(e,t){var r=Math.ceil(t.length/16),s=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var o=0;o<r;o++){var l=a(e),u=s+16*o;e._cache.writeUInt32BE(l[0],u+0),e._cache.writeUInt32BE(l[1],u+4),e._cache.writeUInt32BE(l[2],u+8),e._cache.writeUInt32BE(l[3],u+12)}var c=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,c)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(e,t,r){r.encrypt=function(e,t){return e._cipher.encryptBlock(t)},r.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],202:[function(e,t,r){var n={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},i=e("./list.json");for(var s in i)i[s].module=n[i[s].mode];t.exports=i},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(e,t,r){t.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(e,t,r){(function(t){(function(){var n=e("buffer-xor");function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}r.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var s=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,s)}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,s=e("cipher-base");function a(e,t,r,a){s.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}e("inherits")(a,s),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(e,t,r){var n=e("browserify-des"),i=e("browserify-aes/browser"),s=e("browserify-aes/modes"),a=e("browserify-des/modes"),o=e("evp_bytestokey");function l(e,t,r){if(e=e.toLowerCase(),s[e])return i.createCipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function u(e,t,r){if(e=e.toLowerCase(),s[e])return i.createDecipheriv(e,t,r);if(a[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),s[e])r=s[e].key,n=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=o(t,!1,r,n);return l(e,i.key,i.iv)},r.createCipheriv=r.Cipheriv=l,r.createDecipher=r.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),s[e])r=s[e].key,n=s[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");r=8*a[e].key,n=a[e].iv}var i=o(t,!1,r,n);return u(e,i.key,i.iv)},r.createDecipheriv=r.Decipheriv=u,r.listCiphers=r.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(e,t,r){var n=e("cipher-base"),i=e("des.js"),s=e("inherits"),a=e("safe-buffer").Buffer,o={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),i=o[r];t=e.decrypt?"decrypt":"encrypt";var s=e.key;a.isBuffer(s)||(s=a.from(s)),"des-ede"!==r&&"des-ede-cbc"!==r||(s=a.concat([s,s.slice(0,8)]));var l=e.iv;a.isBuffer(l)||(l=a.from(l)),this._des=i.create({key:s,iv:l,type:t})}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=l,s(l,n),l.prototype._update=function(e){return a.from(this._des.update(e))},l.prototype._final=function(){return a.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(e,t,r){r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},{}],209:[function(e,t,r){(function(r){(function(){var n=e("bn.js"),i=e("randombytes");function s(e){var t,r=e.modulus.byteLength();do{t=new n(i(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var i,a,o={blinder:(a=s(i=t)).toRed(n.mont(i.modulus)).redPow(new n(i.publicExponent)).fromRed(),unblinder:a.invm(i.modulus)},l=t.modulus.byteLength(),u=new n(e).mul(o.blinder).umod(t.modulus),c=u.toRed(n.mont(t.prime1)),h=u.toRed(n.mont(t.prime2)),f=t.coefficient,d=t.prime1,p=t.prime2,m=c.redPow(t.exponent1).fromRed(),b=h.redPow(t.exponent2).fromRed(),g=m.isub(b).imul(f).umod(d).imul(p);return b.iadd(g).imul(o.unblinder).umod(t.modulus).toArrayLike(r,"be",l)}a.getr=s,t.exports=a}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(e,t,r){t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(e,t,r){t.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(e,t,r){t.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(e,t,r){var n=e("safe-buffer").Buffer,i=e("create-hash"),s=e("readable-stream"),a=e("inherits"),o=e("./sign"),l=e("./verify"),u=e("./algorithms.json");function c(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){s.Writable.call(this);var t=u[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new c(e)}function d(e){return new h(e)}Object.keys(u).forEach(function(e){u[e].id=n.from(u[e].id,"hex"),u[e.toLowerCase()]=u[e]}),a(c,s.Writable),c.prototype._write=function(e,t,r){this._hash.update(e),r()},c.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},c.prototype.sign=function(e,t){this.end();var r=o(this._hash.digest(),e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},a(h,s.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return l(t,i,e,this._signType,this._tag)},t.exports={Sign:f,Verify:d,createSign:f,createVerify:d}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("create-hmac"),s=e("browserify-rsa"),a=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),u=e("./curves.json");function c(e,t,r,s){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var o=r.length,l=function(e,t){e=(e=h(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),u=n.alloc(o);u.fill(1);var c=n.alloc(o);return c=i(s,c).update(u).update(n.from([0])).update(e).update(l).digest(),u=i(s,c).update(u).digest(),{k:c=i(s,c).update(u).update(n.from([1])).update(e).update(l).digest(),v:u=i(s,c).update(u).digest()}}function h(e,t){var r=new o(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function f(e,t,r){var s,a;do{for(s=n.alloc(0);8*s.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),s=n.concat([s,t.v]);a=h(s,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function d(e,t,r,n){return e.toRed(o.mont(r)).redPow(t).fromRed().mod(n)}t.exports=function(e,t,r,i,p){var m=l(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=u[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new a(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,s=t.params.priv_key,a=t.params.p,l=t.params.q,u=t.params.g,p=new o(0),m=h(e,l).mod(l),b=!1,g=c(s,l,e,r);!1===b;)p=d(u,i=f(l,g,r),a,l),0===(b=i.invm(l).imul(m.add(s.mul(p))).mod(l)).cmpn(0)&&(b=!1,p=new o(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,b)}(e,m,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var b=m.modulus.byteLength(),g=[0,1];e.length+g.length+1<b;)g.push(255);g.push(0);for(var y=-1;++y<e.length;)g.push(e[y]);return s(g,m)},t.exports.getKey=c,t.exports.makeKey=f},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("bn.js"),s=e("elliptic").ec,a=e("parse-asn1"),o=e("./curves.json");function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}t.exports=function(e,t,r,u,c){var h=a(r);if("ec"===h.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=o[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new s(n),a=r.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,h)}if("dsa"===h.type){if("dsa"!==u)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,s=r.data.q,o=r.data.g,u=r.data.pub_key,c=a.signature.decode(e,"der"),h=c.s,f=c.r;l(h,s),l(f,s);var d=i.mont(n),p=h.invm(s);return 0===o.toRed(d).redPow(new i(t).mul(p).mod(s)).fromRed().mul(u.toRed(d).redPow(f.mul(p).mod(s)).fromRed()).mod(n).mod(s).cmp(f)}(e,t,h)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");t=n.concat([c,t]);for(var f=h.modulus.byteLength(),d=[1],p=0;t.length+d.length+2<f;)d.push(255),p++;d.push(0);for(var m=-1;++m<t.length;)d.push(t[m]);d=n.from(d);var b=i.mont(h.modulus);e=(e=new i(e).toRed(b)).redPow(new i(h.publicExponent)),e=n.from(e.fromRed().toArray());var g=p<8?1:0;for(f=Math.min(e.length,d.length),e.length!==d.length&&(g=1),m=-1;++m<f;)g|=e[m]^d[m];return 0===g}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(e,t,r){},{}],217:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=a),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:220}],218:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":217}],219:[function(e,t,r){(function(e){(function(){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),s=0;s<n;++s)i[s]=t[s]^r[s];return i}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:220}],220:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");function i(e){if(e>2147483647)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=i(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return n.__proto__=s.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return s.from(n,t,r);var a=function(e){if(s.isBuffer(e)){var t=0|c(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||L(e.length)?i(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return o(e),i(e<0?0:0|c(e))}function u(e){for(var t=e.length<0?0:0|c(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function c(e){if(e>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return B(e).length;default:if(i)return n?-1:N(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function p(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),L(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){var s,a=1,o=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(s=r;s<o;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*a}else-1!==c&&(s-=s-c),c=-1}else for(r+l>o&&(r=o-l),s=r;s>=0;s--){for(var h=!0,f=0;f<l;f++)if(u(e,s+f)!==u(t,f)){h=!1;break}if(h)return s}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(L(o))return a;e[r+a]=o}return a}function g(e,t,r,n){return D(N(t,e.length-r),e,r,n)}function y(e,t,r,n){return D(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return y(e,t,r,n)}function w(e,t,r,n){return D(B(t),e,r,n)}function _(e,t,r,n){return D(function(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function x(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function k(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,a,o,l,u=e[i],c=null,h=u>239?4:u>223?3:u>191?2:1;if(i+h<=r)switch(h){case 1:u<128&&(c=u);break;case 2:128==(192&(s=e[i+1]))&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],a=e[i+2],128==(192&s)&&128==(192&a)&&(l=(15&u)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],a=e[i+2],o=e[i+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&u)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(c=l)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function S(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function M(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function C(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=P(e[s]);return i}function T(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function E(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,r,n,i,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function O(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function j(e,t,r,i,s){return t=+t,r>>>=0,s||R(e,0,r,8),n.write(e,t,r,i,52,8),r+8}r.Buffer=s,r.SlowBuffer=function(e){return+e!=e&&(e=0),s.alloc(+e)},r.INSPECT_MAX_BYTES=50,r.kMaxLength=2147483647,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||console.error,Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(e,t,r){return a(e,t,r)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(e,t,r){return s=t,a=r,o(n=e),n<=0?i(n):void 0!==s?"string"==typeof a?i(n).fill(s,a):i(n).fill(s):i(n);var n,s,a},s.allocUnsafe=function(e){return l(e)},s.allocUnsafeSlow=function(e){return l(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).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}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(F(a,Uint8Array)&&(a=s.from(a)),!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},s.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):f.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,i){if(F(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),l=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r),h=0;h<l;++h)if(u[h]!==c[h]){a=u[h],o=c[h];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return p(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return p(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return g(this,e,t,r);case"ascii":return y(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=s.prototype,n},s.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},s.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||E(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},s.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||A(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);A(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a|0)-o&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return O(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return O(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var a=i-1;a>=0;--a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=s.isBuffer(e)?e:s.from(e,n),l=o.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=o[a%l]}return this};var I=/[^+/0-9A-Za-z-_]/g;function P(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var r;t=t||1/0;for(var n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function B(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function L(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("stream").Transform,s=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,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}e("inherits")(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},t.exports=a},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(e,t,r){var n=e("../internals/is-callable"),i=e("../internals/try-to-string"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(e,t,r){var n=e("../internals/is-constructor"),i=e("../internals/try-to-string"),s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(e,t,r){var n=e("../internals/is-callable"),i=String,s=TypeError;t.exports=function(e){if("object"==typeof e||n(e))return e;throw new s("Can't set "+i(e)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(e,t,r){var n=e("../internals/well-known-symbol"),i=e("../internals/object-create"),s=e("../internals/object-define-property").f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&s(o,a,{configurable:!0,value:i(null)}),t.exports=function(e){o[a][e]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(e,t,r){var n=e("../internals/object-is-prototype-of"),i=TypeError;t.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(e,t,r){var n=e("../internals/is-object"),i=String,s=TypeError;t.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not an object")}},{"../internals/is-object":289}],228:[function(e,t,r){var n=e("../internals/to-indexed-object"),i=e("../internals/to-absolute-index"),s=e("../internals/length-of-array-like"),a=function(e){return function(t,r,a){var o,l=n(t),u=s(l),c=i(a,u);if(e&&r!=r){for(;u>c;)if((o=l[c++])!=o)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(e,t,r){var n=e("../internals/function-bind-context"),i=e("../internals/function-uncurry-this"),s=e("../internals/indexed-object"),a=e("../internals/to-object"),o=e("../internals/length-of-array-like"),l=e("../internals/array-species-create"),u=i([].push),c=function(e){var t=1===e,r=2===e,i=3===e,c=4===e,h=6===e,f=7===e,d=5===e||h;return function(p,m,b,g){for(var y,v,w=a(p),_=s(w),x=n(m,b),k=o(_),S=0,M=g||l,C=t?M(p,k):r||f?M(p,0):void 0;k>S;S++)if((d||S in _)&&(v=x(y=_[S],S,w),e))if(t)C[S]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u(C,y)}else switch(e){case 4:return!1;case 7:u(C,y)}return h?-1:i||c?c:C}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},{"../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(e,t,r){var n=e("../internals/to-absolute-index"),i=e("../internals/length-of-array-like"),s=e("../internals/create-property"),a=Array,o=Math.max;t.exports=function(e,t,r){for(var l=i(e),u=n(t,l),c=n(void 0===r?l:r,l),h=a(o(c-u,0)),f=0;u<c;u++,f++)s(h,f,e[u]);return h.length=f,h}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(e,t,r){t.exports=e("../internals/function-uncurry-this")([].slice)},{"../internals/function-uncurry-this":268}],232:[function(e,t,r){var n=e("../internals/is-array"),i=e("../internals/is-constructor"),s=e("../internals/is-object"),a=e("../internals/well-known-symbol")("species"),o=Array;t.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===o||n(t.prototype))||s(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?o:t}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(e,t,r){var n=e("../internals/array-species-constructor");t.exports=function(e,t){return new(n(e))(0===t?0:t)}},{"../internals/array-species-constructor":232}],234:[function(e,t,r){var n=e("../internals/well-known-symbol")("iterator"),i=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){i=!0}};a[n]=function(){return this},Array.from(a,function(){throw 2})}catch(o){}t.exports=function(e,t){try{if(!t&&!i)return!1}catch(a){return!1}var r=!1;try{var s={};s[n]=function(){return{next:function(){return{done:r=!0}}}},e(s)}catch(a){}return r}},{"../internals/well-known-symbol":357}],235:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=n({}.toString),s=n("".slice);t.exports=function(e){return s(i(e),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(e,t,r){var n=e("../internals/to-string-tag-support"),i=e("../internals/is-callable"),s=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("toStringTag"),o=Object,l="Arguments"===s(function(){return arguments}());t.exports=n?s:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(r){}}(t=o(e),a))?r:l?s(t):"Object"===(n=s(t))&&i(t.callee)?"Arguments":n}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(e,t,r){var n=e("../internals/has-own-property"),i=e("../internals/own-keys"),s=e("../internals/object-get-own-property-descriptor"),a=e("../internals/object-define-property");t.exports=function(e,t,r){for(var o=i(t),l=a.f,u=s.f,c=0;c<o.length;c++){var h=o[c];n(e,h)||r&&n(r,h)||l(e,h,u(t,h))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(e,t,r){var n=e("../internals/well-known-symbol")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,"/./"[e](t)}catch(i){}}return!1}},{"../internals/well-known-symbol":357}],239:[function(e,t,r){t.exports=!e("../internals/fails")(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},{"../internals/fails":260}],240:[function(e,t,r){t.exports=function(e,t){return{value:e,done:t}}},{}],241:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/object-define-property"),s=e("../internals/create-property-descriptor");t.exports=n?function(e,t,r){return i.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],243:[function(e,t,r){var n=e("../internals/to-property-key"),i=e("../internals/object-define-property"),s=e("../internals/create-property-descriptor");t.exports=function(e,t,r){var a=n(t);a in e?i.f(e,a,s(0,r)):e[a]=r}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(e,t,r){var n=e("../internals/make-built-in"),i=e("../internals/object-define-property");t.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(e,t,r){var n=e("../internals/is-callable"),i=e("../internals/object-define-property"),s=e("../internals/make-built-in"),a=e("../internals/define-global-property");t.exports=function(e,t,r,o){o||(o={});var l=o.enumerable,u=void 0!==o.name?o.name:t;if(n(r)&&s(r,u,o),o.global)l?e[t]=r:a(t,r);else{try{o.unsafe?e[t]&&(l=!0):delete e[t]}catch(c){}l?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(e,t,r){var n=e("../internals/global"),i=Object.defineProperty;t.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},{"../internals/global":274}],247:[function(e,t,r){t.exports=!e("../internals/fails")(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},{"../internals/fails":260}],248:[function(e,t,r){var n="object"==typeof document&&document.all;t.exports={all:n,IS_HTMLDDA:void 0===n&&void 0!==n}},{}],249:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-object"),s=n.document,a=i(s)&&i(s.createElement);t.exports=function(e){return a?s.createElement(e):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(e,t,r){var n=e("../internals/engine-is-deno"),i=e("../internals/engine-is-node");t.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(e,t,r){t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},{}],252:[function(e,t,r){var n=e("../internals/engine-user-agent");t.exports=/ipad|iphone|ipod/i.test(n)&&"undefined"!=typeof Pebble},{"../internals/engine-user-agent":256}],253:[function(e,t,r){var n=e("../internals/engine-user-agent");t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},{"../internals/engine-user-agent":256}],254:[function(e,t,r){var n=e("../internals/global");t.exports="process"===e("../internals/classof-raw")(n.process)},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(e,t,r){var n=e("../internals/engine-user-agent");t.exports=/web0s(?!.*chrome)/i.test(n)},{"../internals/engine-user-agent":256}],256:[function(e,t,r){t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},{}],257:[function(e,t,r){var n,i,s=e("../internals/global"),a=e("../internals/engine-user-agent"),o=s.process,l=s.Deno,u=o&&o.versions||l&&l.version,c=u&&u.v8;c&&(i=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),t.exports=i},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(e,t,r){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,s=e("../internals/create-non-enumerable-property"),a=e("../internals/define-built-in"),o=e("../internals/define-global-property"),l=e("../internals/copy-constructor-properties"),u=e("../internals/is-forced");t.exports=function(e,t){var r,c,h,f,d,p=e.target,m=e.global,b=e.stat;if(r=m?n:b?n[p]||o(p,{}):(n[p]||{}).prototype)for(c in t){if(f=t[c],h=e.dontCallGetSet?(d=i(r,c))&&d.value:r[c],!u(m?c:p+(b?".":"#")+c,e.forced)&&void 0!==h){if(typeof f==typeof h)continue;l(f,h)}(e.sham||h&&h.sham)&&s(f,"sham",!0),a(r,c,f,e)}}},{"../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(e,t,r){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],261:[function(e,t,r){var n=e("../internals/function-bind-native"),i=Function.prototype,s=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(s):function(){return a.apply(s,arguments)})},{"../internals/function-bind-native":263}],262:[function(e,t,r){var n=e("../internals/function-uncurry-this-clause"),i=e("../internals/a-callable"),s=e("../internals/function-bind-native"),a=n(n.bind);t.exports=function(e,t){return i(e),void 0===t?e:s?a(e,t):function(){return e.apply(t,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,t,r){t.exports=!e("../internals/fails")(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(e,t,r){var n=e("../internals/function-bind-native"),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},{"../internals/function-bind-native":263}],265:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/has-own-property"),s=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,o=i(s,"name");t.exports={EXISTS:o,PROPER:o&&"something"===function(){}.name,CONFIGURABLE:o&&(!n||n&&a(s,"name").configurable)}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/a-callable");t.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(s){}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(e,t,r){var n=e("../internals/classof-raw"),i=e("../internals/function-uncurry-this");t.exports=function(e){if("Function"===n(e))return i(e)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,t,r){var n=e("../internals/function-bind-native"),i=Function.prototype,s=i.call,a=n&&i.bind.bind(s,s);t.exports=n?a:function(e){return function(){return s.apply(e,arguments)}}},{"../internals/function-bind-native":263}],269:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-callable");t.exports=function(e,t){return arguments.length<2?function(e){return i(e)?e:void 0}(n[e]):n[e]&&n[e][t]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,t,r){var n=e("../internals/classof"),i=e("../internals/get-method"),s=e("../internals/is-null-or-undefined"),a=e("../internals/iterators"),o=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(!s(e))return i(e,o)||i(e,"@@iterator")||a[n(e)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(e,t,r){var n=e("../internals/function-call"),i=e("../internals/a-callable"),s=e("../internals/an-object"),a=e("../internals/try-to-string"),o=e("../internals/get-iterator-method"),l=TypeError;t.exports=function(e,t){var r=arguments.length<2?o(e):t;if(i(r))return s(n(r,e));throw new l(a(e)+" 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(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/is-array"),s=e("../internals/is-callable"),a=e("../internals/classof-raw"),o=e("../internals/to-string"),l=n([].push);t.exports=function(e){if(s(e))return e;if(i(e)){for(var t=e.length,r=[],n=0;n<t;n++){var u=e[n];"string"==typeof u?l(r,u):"number"!=typeof u&&"Number"!==a(u)&&"String"!==a(u)||l(r,o(u))}var c=r.length,h=!0;return function(e,t){if(h)return h=!1,t;if(i(this))return t;for(var n=0;n<c;n++)if(r[n]===e)return t}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(e,t,r){var n=e("../internals/a-callable"),i=e("../internals/is-null-or-undefined");t.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(e,t,r){(function(e){(function(){var r=function(e){return e&&e.Math===Math&&e};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||this||Function("return this")()}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],275:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/to-object"),s=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(e,t){return s(i(e),t)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(e,t,r){t.exports={}},{}],277:[function(e,t,r){t.exports=function(e,t){}},{}],278:[function(e,t,r){t.exports=e("../internals/get-built-in")("document","documentElement")},{"../internals/get-built-in":269}],279:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/fails"),s=e("../internals/document-create-element");t.exports=!n&&!i(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),s=e("../internals/classof-raw"),a=Object,o=n("".split);t.exports=i(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?o(e,""):a(e)}:a},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/is-callable"),s=e("../internals/shared-store"),a=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),t.exports=s.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(e,t,r){var n,i,s,a=e("../internals/weak-map-basic-detection"),o=e("../internals/global"),l=e("../internals/is-object"),u=e("../internals/create-non-enumerable-property"),c=e("../internals/has-own-property"),h=e("../internals/shared-store"),f=e("../internals/shared-key"),d=e("../internals/hidden-keys"),p=o.TypeError,m=o.WeakMap;if(a||h.state){var b=h.state||(h.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,n=function(e,t){if(b.has(e))throw new p("Object already initialized");return t.facade=e,b.set(e,t),t},i=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var g=f("state");d[g]=!0,n=function(e,t){if(c(e,g))throw new p("Object already initialized");return t.facade=e,u(e,g,t),t},i=function(e){return c(e,g)?e[g]:{}},s=function(e){return c(e,g)}}t.exports={set:n,get:i,has:s,enforce:function(e){return s(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!l(t)||(r=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}},{"../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(e,t,r){var n=e("../internals/well-known-symbol"),i=e("../internals/iterators"),s=n("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(i.Array===e||a[s]===e)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(e,t,r){var n=e("../internals/classof-raw");t.exports=Array.isArray||function(e){return"Array"===n(e)}},{"../internals/classof-raw":235}],285:[function(e,t,r){var n=e("../internals/document-all"),i=n.all;t.exports=n.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},{"../internals/document-all":248}],286:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),s=e("../internals/is-callable"),a=e("../internals/classof"),o=e("../internals/get-built-in"),l=e("../internals/inspect-source"),u=function(){},c=[],h=o("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=n(f.exec),p=!f.test(u),m=function(e){if(!s(e))return!1;try{return h(u,c,e),!0}catch(t){return!1}},b=function(e){if(!s(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(f,l(e))}catch(t){return!0}};b.sham=!0,t.exports=!h||i(function(){var e;return m(m.call)||!m(Object)||!m(function(){e=!0})||e})?b:m},{"../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(e,t,r){var n=e("../internals/fails"),i=e("../internals/is-callable"),s=/#|\.prototype\./,a=function(e,t){var r=l[o(e)];return r===c||r!==u&&(i(t)?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=a.data={},u=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(e,t,r){t.exports=function(e){return null==e}},{}],289:[function(e,t,r){var n=e("../internals/is-callable"),i=e("../internals/document-all"),s=i.all;t.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===s}:function(e){return"object"==typeof e?null!==e:n(e)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(e,t,r){t.exports=!1},{}],291:[function(e,t,r){var n=e("../internals/is-object"),i=e("../internals/classof-raw"),s=e("../internals/well-known-symbol")("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===i(e))}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(e,t,r){var n=e("../internals/get-built-in"),i=e("../internals/is-callable"),s=e("../internals/object-is-prototype-of"),a=e("../internals/use-symbol-as-uid"),o=Object;t.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&s(t.prototype,o(e))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(e,t,r){var n=e("../internals/function-bind-context"),i=e("../internals/function-call"),s=e("../internals/an-object"),a=e("../internals/try-to-string"),o=e("../internals/is-array-iterator-method"),l=e("../internals/length-of-array-like"),u=e("../internals/object-is-prototype-of"),c=e("../internals/get-iterator"),h=e("../internals/get-iterator-method"),f=e("../internals/iterator-close"),d=TypeError,p=function(e,t){this.stopped=e,this.result=t},m=p.prototype;t.exports=function(e,t,r){var b,g,y,v,w,_,x,k=r&&r.that,S=!(!r||!r.AS_ENTRIES),M=!(!r||!r.IS_RECORD),C=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),E=n(t,k),A=function(e){return b&&f(b,"normal",e),new p(!0,e)},R=function(e){return S?(s(e),T?E(e[0],e[1],A):E(e[0],e[1])):T?E(e,A):E(e)};if(M)b=e.iterator;else if(C)b=e;else{if(!(g=h(e)))throw new d(a(e)+" is not iterable");if(o(g)){for(y=0,v=l(e);v>y;y++)if((w=R(e[y]))&&u(m,w))return w;return new p(!1)}b=c(e,g)}for(_=M?e.next:b.next;!(x=i(_,b)).done;){try{w=R(x.value)}catch(O){f(b,"throw",O)}if("object"==typeof w&&w&&u(m,w))return w}return new p(!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(e,t,r){var n=e("../internals/function-call"),i=e("../internals/an-object"),s=e("../internals/get-method");t.exports=function(e,t,r){var a,o;i(e);try{if(!(a=s(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(l){o=!0,a=l}if("throw"===t)throw r;if(o)throw a;return i(a),r}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(e,t,r){var n=e("../internals/iterators-core").IteratorPrototype,i=e("../internals/object-create"),s=e("../internals/create-property-descriptor"),a=e("../internals/set-to-string-tag"),o=e("../internals/iterators"),l=function(){return this};t.exports=function(e,t,r,u){var c=t+" Iterator";return e.prototype=i(n,{next:s(+!u,r)}),a(e,c,!1,!0),o[c]=l,e}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/function-call"),s=e("../internals/is-pure"),a=e("../internals/function-name"),o=e("../internals/is-callable"),l=e("../internals/iterator-create-constructor"),u=e("../internals/object-get-prototype-of"),c=e("../internals/object-set-prototype-of"),h=e("../internals/set-to-string-tag"),f=e("../internals/create-non-enumerable-property"),d=e("../internals/define-built-in"),p=e("../internals/well-known-symbol"),m=e("../internals/iterators"),b=e("../internals/iterators-core"),g=a.PROPER,y=a.CONFIGURABLE,v=b.IteratorPrototype,w=b.BUGGY_SAFARI_ITERATORS,_=p("iterator"),x=function(){return this};t.exports=function(e,t,r,a,p,b,k){l(r,t,a);var S,M,C,T=function(e){if(e===p&&j)return j;if(!w&&e&&e in R)return R[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},E=t+" Iterator",A=!1,R=e.prototype,O=R[_]||R["@@iterator"]||p&&R[p],j=!w&&O||T(p),I="Array"===t&&R.entries||O;if(I&&(S=u(I.call(new e)))!==Object.prototype&&S.next&&(s||u(S)===v||(c?c(S,v):o(S[_])||d(S,_,x)),h(S,E,!0,!0),s&&(m[E]=x)),g&&"values"===p&&O&&"values"!==O.name&&(!s&&y?f(R,"name","values"):(A=!0,j=function(){return i(O,this)})),p)if(M={values:T("values"),keys:b?j:T("keys"),entries:T("entries")},k)for(C in M)(w||A||!(C in R))&&d(R,C,M[C]);else n({target:t,proto:!0,forced:w||A},M);return s&&!k||R[_]===j||d(R,_,j,{name:p}),m[t]=j,M}},{"../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(e,t,r){var n,i,s,a=e("../internals/fails"),o=e("../internals/is-callable"),l=e("../internals/is-object"),u=e("../internals/object-create"),c=e("../internals/object-get-prototype-of"),h=e("../internals/define-built-in"),f=e("../internals/well-known-symbol"),d=e("../internals/is-pure"),p=f("iterator"),m=!1;[].keys&&("next"in(s=[].keys())?(i=c(c(s)))!==Object.prototype&&(n=i):m=!0),!l(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:d&&(n=u(n)),o(n[p])||h(n,p,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},{"../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(e,t,r){arguments[4][276][0].apply(r,arguments)},{dup:276}],299:[function(e,t,r){var n=e("../internals/to-length");t.exports=function(e){return n(e.length)}},{"../internals/to-length":343}],300:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),s=e("../internals/is-callable"),a=e("../internals/has-own-property"),o=e("../internals/descriptors"),l=e("../internals/function-name").CONFIGURABLE,u=e("../internals/inspect-source"),c=e("../internals/internal-state"),h=c.enforce,f=c.get,d=String,p=Object.defineProperty,m=n("".slice),b=n("".replace),g=n([].join),y=o&&!i(function(){return 8!==p(function(){},"length",{value:8}).length}),v=String(String).split("String"),w=t.exports=function(e,t,r){"Symbol("===m(d(t),0,7)&&(t="["+b(d(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!a(e,"name")||l&&e.name!==t)&&(o?p(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&a(r,"arity")&&e.length!==r.arity&&p(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?o&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var n=h(e);return a(n,"source")||(n.source=g(v,"string"==typeof t?t:"")),e};Function.prototype.toString=w(function(){return s(this)&&f(this).source||u(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(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(e){var t=+e;return(t>0?i:n)(t)}},{}],302:[function(e,t,r){var n,i,s,a,o,l=e("../internals/global"),u=e("../internals/function-bind-context"),c=e("../internals/object-get-own-property-descriptor").f,h=e("../internals/task").set,f=e("../internals/queue"),d=e("../internals/engine-is-ios"),p=e("../internals/engine-is-ios-pebble"),m=e("../internals/engine-is-webos-webkit"),b=e("../internals/engine-is-node"),g=l.MutationObserver||l.WebKitMutationObserver,y=l.document,v=l.process,w=l.Promise,_=c(l,"queueMicrotask"),x=_&&_.value;if(!x){var k=new f,S=function(){var e,t;for(b&&(e=v.domain)&&e.exit();t=k.get();)try{t()}catch(r){throw k.head&&n(),r}e&&e.enter()};d||b||m||!g||!y?!p&&w&&w.resolve?((a=w.resolve(void 0)).constructor=w,o=u(a.then,a),n=function(){o(S)}):b?n=function(){v.nextTick(S)}:(h=u(h,l),n=function(){h(S)}):(i=!0,s=y.createTextNode(""),new g(S).observe(s,{characterData:!0}),n=function(){s.data=i=!i}),x=function(e){k.head||n(),k.add(e)}}t.exports=x},{"../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(e,t,r){var n=e("../internals/a-callable"),i=TypeError,s=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw new i("Bad Promise constructor");t=e,r=n}),this.resolve=n(t),this.reject=n(r)};t.exports.f=function(e){return new s(e)}},{"../internals/a-callable":222}],304:[function(e,t,r){var n=e("../internals/is-regexp"),i=TypeError;t.exports=function(e){if(n(e))throw new i("The method doesn't accept regular expressions");return e}},{"../internals/is-regexp":291}],305:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/function-uncurry-this"),s=e("../internals/function-call"),a=e("../internals/fails"),o=e("../internals/object-keys"),l=e("../internals/object-get-own-property-symbols"),u=e("../internals/object-property-is-enumerable"),c=e("../internals/to-object"),h=e("../internals/indexed-object"),f=Object.assign,d=Object.defineProperty,p=i([].concat);t.exports=!f||a(function(){if(n&&1!==f({b:1},f(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection");return e[r]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==f({},e)[r]||"abcdefghijklmnopqrst"!==o(f({},t)).join("")})?function(e,t){for(var r=c(e),i=arguments.length,a=1,f=l.f,d=u.f;i>a;)for(var m,b=h(arguments[a++]),g=f?p(o(b),f(b)):o(b),y=g.length,v=0;y>v;)m=g[v++],n&&!s(d,b,m)||(r[m]=b[m]);return r}:f},{"../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(e,t,r){var n,i=e("../internals/an-object"),s=e("../internals/object-define-properties"),a=e("../internals/enum-bug-keys"),o=e("../internals/hidden-keys"),l=e("../internals/html"),u=e("../internals/document-create-element"),c=e("../internals/shared-key")("IE_PROTO"),h=function(){},f=function(e){return"<script>"+e+"<\/script>"},d=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{n=new ActiveXObject("htmlfile")}catch(i){}var e,t;p="undefined"!=typeof document?document.domain&&n?d(n):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):d(n);for(var r=a.length;r--;)delete p.prototype[a[r]];return p()};o[c]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(h.prototype=i(e),r=new h,h.prototype=null,r[c]=e):r=p(),void 0===t?r:s.f(r,t)}},{"../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(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/v8-prototype-define-bug"),s=e("../internals/object-define-property"),a=e("../internals/an-object"),o=e("../internals/to-indexed-object"),l=e("../internals/object-keys");r.f=n&&!i?Object.defineProperties:function(e,t){a(e);for(var r,n=o(t),i=l(t),u=i.length,c=0;u>c;)s.f(e,r=i[c++],n[r]);return e}},{"../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(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/ie8-dom-define"),s=e("../internals/v8-prototype-define-bug"),a=e("../internals/an-object"),o=e("../internals/to-property-key"),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;r.f=n?s?function(e,t,r){if(a(e),t=o(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=c(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return u(e,t,r)}:u:function(e,t,r){if(a(e),t=o(t),a(r),i)try{return u(e,t,r)}catch(n){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},{"../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(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/function-call"),s=e("../internals/object-property-is-enumerable"),a=e("../internals/create-property-descriptor"),o=e("../internals/to-indexed-object"),l=e("../internals/to-property-key"),u=e("../internals/has-own-property"),c=e("../internals/ie8-dom-define"),h=Object.getOwnPropertyDescriptor;r.f=n?h:function(e,t){if(e=o(e),t=l(t),c)try{return h(e,t)}catch(r){}if(u(e,t))return a(!i(s.f,e,t),e[t])}},{"../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(e,t,r){var n=e("../internals/classof-raw"),i=e("../internals/to-indexed-object"),s=e("../internals/object-get-own-property-names").f,a=e("../internals/array-slice-simple"),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return o&&"Window"===n(e)?function(e){try{return s(e)}catch(t){return a(o)}}(e):s(i(e))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(e,t,r){var n=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],313:[function(e,t,r){var n=e("../internals/has-own-property"),i=e("../internals/is-callable"),s=e("../internals/to-object"),a=e("../internals/shared-key"),o=e("../internals/correct-prototype-getter"),l=a("IE_PROTO"),u=Object,c=u.prototype;t.exports=o?u.getPrototypeOf:function(e){var t=s(e);if(n(t,l))return t[l];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof u?c: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(e,t,r){t.exports=e("../internals/function-uncurry-this")({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/has-own-property"),s=e("../internals/to-indexed-object"),a=e("../internals/array-includes").indexOf,o=e("../internals/hidden-keys"),l=n([].push);t.exports=function(e,t){var r,n=s(e),u=0,c=[];for(r in n)!i(o,r)&&i(n,r)&&l(c,r);for(;t.length>u;)i(n,r=t[u++])&&(~a(c,r)||l(c,r));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(e,t,r){var n=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(e,t,r){var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;r.f=i&&!n.call({1:2},1)?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},{}],318:[function(e,t,r){var n=e("../internals/function-uncurry-this-accessor"),i=e("../internals/an-object"),s=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=n(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(a){}return function(r,n){return i(r),s(n),t?e(r,n):r.__proto__=n,r}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/fails"),s=e("../internals/function-uncurry-this"),a=e("../internals/object-get-prototype-of"),o=e("../internals/object-keys"),l=e("../internals/to-indexed-object"),u=s(e("../internals/object-property-is-enumerable").f),c=s([].push),h=n&&i(function(){var e=Object.create(null);return e[2]=2,!u(e,2)}),f=function(e){return function(t){for(var r,i=l(t),s=o(i),f=h&&null===a(i),d=s.length,p=0,m=[];d>p;)r=s[p++],n&&!(f?r in i:u(i,r))||c(m,e?[r,i[r]]:i[r]);return m}};t.exports={entries:f(!0),values:f(!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(e,t,r){var n=e("../internals/function-call"),i=e("../internals/is-callable"),s=e("../internals/is-object"),a=TypeError;t.exports=function(e,t){var r,o;if("string"===t&&i(r=e.toString)&&!s(o=n(r,e)))return o;if(i(r=e.valueOf)&&!s(o=n(r,e)))return o;if("string"!==t&&i(r=e.toString)&&!s(o=n(r,e)))return o;throw new a("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(e,t,r){var n=e("../internals/get-built-in"),i=e("../internals/function-uncurry-this"),s=e("../internals/object-get-own-property-names"),a=e("../internals/object-get-own-property-symbols"),o=e("../internals/an-object"),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(e){var t=s.f(o(e)),r=a.f;return r?l(t,r(e)):t}},{"../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(e,t,r){t.exports=e("../internals/global")},{"../internals/global":274}],323:[function(e,t,r){t.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},{}],324:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/promise-native-constructor"),s=e("../internals/is-callable"),a=e("../internals/is-forced"),o=e("../internals/inspect-source"),l=e("../internals/well-known-symbol"),u=e("../internals/engine-is-browser"),c=e("../internals/engine-is-deno"),h=e("../internals/is-pure"),f=e("../internals/engine-v8-version"),d=i&&i.prototype,p=l("species"),m=!1,b=s(n.PromiseRejectionEvent);t.exports={CONSTRUCTOR:a("Promise",function(){var e=o(i),t=e!==String(i);if(!t&&66===f)return!0;if(h&&(!d.catch||!d.finally))return!0;if(!f||f<51||!/native code/.test(e)){var r=new i(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((r.constructor={})[p]=n,!(m=r.then(function(){})instanceof n))return!0}return!t&&(u||c)&&!b}),REJECTION_EVENT:b,SUBCLASSING:m}},{"../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(e,t,r){t.exports=e("../internals/global").Promise},{"../internals/global":274}],326:[function(e,t,r){var n=e("../internals/an-object"),i=e("../internals/is-object"),s=e("../internals/new-promise-capability");t.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;var r=s.f(e);return(0,r.resolve)(t),r.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(e,t,r){var n=e("../internals/promise-native-constructor"),i=e("../internals/check-correctness-of-iteration");t.exports=e("../internals/promise-constructor-detection").CONSTRUCTOR||!i(function(e){n.all(e).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(e,t,r){var n=function(){this.head=null,this.tail=null};n.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},t.exports=n},{}],329:[function(e,t,r){var n=e("../internals/is-null-or-undefined"),i=TypeError;t.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},{"../internals/is-null-or-undefined":288}],330:[function(e,t,r){var n=e("../internals/get-built-in"),i=e("../internals/define-built-in-accessor"),s=e("../internals/well-known-symbol"),a=e("../internals/descriptors"),o=s("species");t.exports=function(e){var t=n(e);a&&t&&!t[o]&&i(t,o,{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(e,t,r){var n=e("../internals/object-define-property").f,i=e("../internals/has-own-property"),s=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,r){e&&!r&&(e=e.prototype),e&&!i(e,s)&&n(e,s,{configurable:!0,value:t})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(e,t,r){var n=e("../internals/shared"),i=e("../internals/uid"),s=n("keys");t.exports=function(e){return s[e]||(s[e]=i(e))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/define-global-property");t.exports=n["__core-js_shared__"]||i("__core-js_shared__",{})},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(e,t,r){var n=e("../internals/is-pure"),i=e("../internals/shared-store");(t.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.0",mode:n?"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(e,t,r){var n=e("../internals/an-object"),i=e("../internals/a-constructor"),s=e("../internals/is-null-or-undefined"),a=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||s(r=n(o)[a])?t:i(r)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(e,t,r){var n=e("../internals/engine-v8-version"),i=e("../internals/fails"),s=e("../internals/global").String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(e,t,r){var n=e("../internals/function-call"),i=e("../internals/get-built-in"),s=e("../internals/well-known-symbol"),a=e("../internals/define-built-in");t.exports=function(){var e=i("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,o=s("toPrimitive");t&&!t[o]&&a(t,o,function(e){return n(r,this)},{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(e,t,r){t.exports=e("../internals/symbol-constructor-detection")&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(e,t,r){var n,i,s,a,o=e("../internals/global"),l=e("../internals/function-apply"),u=e("../internals/function-bind-context"),c=e("../internals/is-callable"),h=e("../internals/has-own-property"),f=e("../internals/fails"),d=e("../internals/html"),p=e("../internals/array-slice"),m=e("../internals/document-create-element"),b=e("../internals/validate-arguments-length"),g=e("../internals/engine-is-ios"),y=e("../internals/engine-is-node"),v=o.setImmediate,w=o.clearImmediate,_=o.process,x=o.Dispatch,k=o.Function,S=o.MessageChannel,M=o.String,C=0,T={};f(function(){n=o.location});var E=function(e){if(h(T,e)){var t=T[e];delete T[e],t()}},A=function(e){return function(){E(e)}},R=function(e){E(e.data)},O=function(e){o.postMessage(M(e),n.protocol+"//"+n.host)};v&&w||(v=function(e){b(arguments.length,1);var t=c(e)?e:k(e),r=p(arguments,1);return T[++C]=function(){l(t,void 0,r)},i(C),C},w=function(e){delete T[e]},y?i=function(e){_.nextTick(A(e))}:x&&x.now?i=function(e){x.now(A(e))}:S&&!g?(a=(s=new S).port2,s.port1.onmessage=R,i=u(a.postMessage,a)):o.addEventListener&&c(o.postMessage)&&!o.importScripts&&n&&"file:"!==n.protocol&&!f(O)?(i=O,o.addEventListener("message",R,!1)):i="onreadystatechange"in m("script")?function(e){d.appendChild(m("script")).onreadystatechange=function(){d.removeChild(this),E(e)}}:function(e){setTimeout(A(e),0)}),t.exports={set:v,clear:w}},{"../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(e,t,r){var n=e("../internals/to-integer-or-infinity"),i=Math.max,s=Math.min;t.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):s(r,t)}},{"../internals/to-integer-or-infinity":342}],341:[function(e,t,r){var n=e("../internals/indexed-object"),i=e("../internals/require-object-coercible");t.exports=function(e){return n(i(e))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(e,t,r){var n=e("../internals/math-trunc");t.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},{"../internals/math-trunc":301}],343:[function(e,t,r){var n=e("../internals/to-integer-or-infinity"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(e,t,r){var n=e("../internals/require-object-coercible"),i=Object;t.exports=function(e){return i(n(e))}},{"../internals/require-object-coercible":329}],345:[function(e,t,r){var n=e("../internals/function-call"),i=e("../internals/is-object"),s=e("../internals/is-symbol"),a=e("../internals/get-method"),o=e("../internals/ordinary-to-primitive"),l=e("../internals/well-known-symbol"),u=TypeError,c=l("toPrimitive");t.exports=function(e,t){if(!i(e)||s(e))return e;var r,l=a(e,c);if(l){if(void 0===t&&(t="default"),r=n(l,e,t),!i(r)||s(r))return r;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},{"../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(e,t,r){var n=e("../internals/to-primitive"),i=e("../internals/is-symbol");t.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(e,t,r){var n={};n[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(n)},{"../internals/well-known-symbol":357}],348:[function(e,t,r){var n=e("../internals/classof"),i=String;t.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},{"../internals/classof":236}],349:[function(e,t,r){var n=String;t.exports=function(e){try{return n(e)}catch(t){return"Object"}}},{}],350:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=0,s=Math.random(),a=n(1..toString);t.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++i+s,36)}},{"../internals/function-uncurry-this":268}],351:[function(e,t,r){t.exports=e("../internals/symbol-constructor-detection")&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/symbol-constructor-detection":336}],352:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/fails");t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(e,t,r){var n=TypeError;t.exports=function(e,t){if(e<t)throw new n("Not enough arguments");return e}},{}],354:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-callable"),s=n.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(e,t,r){var n=e("../internals/path"),i=e("../internals/has-own-property"),s=e("../internals/well-known-symbol-wrapped"),a=e("../internals/object-define-property").f;t.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||a(t,e,{value:s.f(e)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(e,t,r){r.f=e("../internals/well-known-symbol")},{"../internals/well-known-symbol":357}],357:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/shared"),s=e("../internals/has-own-property"),a=e("../internals/uid"),o=e("../internals/symbol-constructor-detection"),l=e("../internals/use-symbol-as-uid"),u=n.Symbol,c=i("wks"),h=l?u.for||u:u&&u.withoutSetter||a;t.exports=function(e){return s(c,e)||(c[e]=o&&s(u,e)?u[e]:h("Symbol."+e)),c[e]}},{"../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(e,t,r){var n=e("../internals/export"),i=e("../internals/array-iteration").findIndex,s=e("../internals/add-to-unscopables"),a=!0;"findIndex"in[]&&Array(1).findIndex(function(){a=!1}),n({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/array-iteration").find,s=e("../internals/add-to-unscopables"),a=!0;"find"in[]&&Array(1).find(function(){a=!1}),n({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),s("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/array-includes").includes,s=e("../internals/fails"),a=e("../internals/add-to-unscopables");n({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(e,t,r){var n=e("../internals/to-indexed-object"),i=e("../internals/add-to-unscopables"),s=e("../internals/iterators"),a=e("../internals/internal-state"),o=e("../internals/object-define-property").f,l=e("../internals/iterator-define"),u=e("../internals/create-iter-result-object"),c=e("../internals/is-pure"),h=e("../internals/descriptors"),f=a.set,d=a.getterFor("Array Iterator");t.exports=l(Array,"Array",function(e,t){f(this,{type:"Array Iterator",target:n(e),index:0,kind:t})},function(){var e=d(this),t=e.target,r=e.kind,n=e.index++;if(!t||n>=t.length)return e.target=void 0,u(void 0,!0);switch(r){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)},"values");var p=s.Arguments=s.Array;if(i("keys"),i("values"),i("entries"),!c&&h&&"values"!==p.name)try{o(p,"name",{value:"values"})}catch(m){}},{"../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(e,t,r){var n=e("../internals/export"),i=e("../internals/get-built-in"),s=e("../internals/function-apply"),a=e("../internals/function-call"),o=e("../internals/function-uncurry-this"),l=e("../internals/fails"),u=e("../internals/is-callable"),c=e("../internals/is-symbol"),h=e("../internals/array-slice"),f=e("../internals/get-json-replacer-function"),d=e("../internals/symbol-constructor-detection"),p=String,m=i("JSON","stringify"),b=o(/./.exec),g=o("".charAt),y=o("".charCodeAt),v=o("".replace),w=o(1..toString),_=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,S=!d||l(function(){var e=i("Symbol")("stringify detection");return"[null]"!==m([e])||"{}"!==m({a:e})||"{}"!==m(Object(e))}),M=l(function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")}),C=function(e,t){var r=h(arguments),n=f(t);if(u(n)||void 0!==e&&!c(e))return r[1]=function(e,t){if(u(n)&&(t=a(n,this,p(e),t)),!c(t))return t},s(m,null,r)},T=function(e,t,r){var n=g(r,t-1),i=g(r,t+1);return b(x,e)&&!b(k,i)||b(k,e)&&!b(x,n)?"\\u"+w(y(e,0),16):e};m&&n({target:"JSON",stat:!0,arity:3,forced:S||M},{stringify:function(e,t,r){var n=h(arguments),i=s(S?C:m,null,n);return M&&"string"==typeof i?v(i,_,T):i}})},{"../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(e,t,r){e("../internals/export")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"../internals/export":259}],364:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/object-assign");n({target:"Object",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/symbol-constructor-detection"),s=e("../internals/fails"),a=e("../internals/object-get-own-property-symbols"),o=e("../internals/to-object");n({target:"Object",stat:!0,forced:!i||s(function(){a.f(1)})},{getOwnPropertySymbols:function(e){var t=a.f;return t?t(o(e)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/to-object"),s=e("../internals/object-keys");n({target:"Object",stat:!0,forced:e("../internals/fails")(function(){s(1)})},{keys:function(e){return s(i(e))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/object-to-array").values;n({target:"Object",stat:!0},{values:function(e){return i(e)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/function-call"),s=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),o=e("../internals/perform"),l=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(e){var t=this,r=a.f(t),n=r.resolve,u=r.reject,c=o(function(){var r=s(t.resolve),a=[],o=0,c=1;l(e,function(e){var s=o++,l=!1;c++,i(r,t,e).then(function(e){l||(l=!0,a[s]=e,--c||n(a))},u)}),--c||n(a)});return c.error&&u(c.value),r.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(e,t,r){var n=e("../internals/export"),i=e("../internals/is-pure"),s=e("../internals/promise-constructor-detection").CONSTRUCTOR,a=e("../internals/promise-native-constructor"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),u=e("../internals/define-built-in"),c=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:s,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&l(a)){var h=o("Promise").prototype.catch;c.catch!==h&&u(c,"catch",h,{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(e,t,r){var n,i,s,a=e("../internals/export"),o=e("../internals/is-pure"),l=e("../internals/engine-is-node"),u=e("../internals/global"),c=e("../internals/function-call"),h=e("../internals/define-built-in"),f=e("../internals/object-set-prototype-of"),d=e("../internals/set-to-string-tag"),p=e("../internals/set-species"),m=e("../internals/a-callable"),b=e("../internals/is-callable"),g=e("../internals/is-object"),y=e("../internals/an-instance"),v=e("../internals/species-constructor"),w=e("../internals/task").set,_=e("../internals/microtask"),x=e("../internals/host-report-errors"),k=e("../internals/perform"),S=e("../internals/queue"),M=e("../internals/internal-state"),C=e("../internals/promise-native-constructor"),T=e("../internals/promise-constructor-detection"),E=e("../internals/new-promise-capability"),A=T.CONSTRUCTOR,R=T.REJECTION_EVENT,O=T.SUBCLASSING,j=M.getterFor("Promise"),I=M.set,P=C&&C.prototype,N=C,B=P,D=u.TypeError,F=u.document,L=u.process,z=E.f,U=z,$=!!(F&&F.createEvent&&u.dispatchEvent),V=function(e){var t;return!(!g(e)||!b(t=e.then))&&t},H=function(e,t){var r,n,i,s=t.value,a=1===t.state,o=a?e.ok:e.fail,l=e.resolve,u=e.reject,h=e.domain;try{o?(a||(2===t.rejection&&Y(t),t.rejection=1),!0===o?r=s:(h&&h.enter(),r=o(s),h&&(h.exit(),i=!0)),r===e.promise?u(new D("Promise-chain cycle")):(n=V(r))?c(n,r,l,u):l(r)):u(s)}catch(f){h&&!i&&h.exit(),u(f)}},q=function(e,t){e.notified||(e.notified=!0,_(function(){for(var r,n=e.reactions;r=n.get();)H(r,e);e.notified=!1,t&&!e.rejection&&X(e)}))},W=function(e,t,r){var n,i;$?((n=F.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!R&&(i=u["on"+e])?i(n):"unhandledrejection"===e&&x("Unhandled promise rejection",r)},X=function(e){c(w,u,function(){var t,r=e.facade,n=e.value;if(K(e)&&(t=k(function(){l?L.emit("unhandledRejection",n,r):W("unhandledrejection",r,n)}),e.rejection=l||K(e)?2:1,t.error))throw t.value})},K=function(e){return 1!==e.rejection&&!e.parent},Y=function(e){c(w,u,function(){var t=e.facade;l?L.emit("rejectionHandled",t):W("rejectionhandled",t,e.value)})},Z=function(e,t,r){return function(n){e(t,n,r)}},G=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,q(e,!0))},J=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new D("Promise can't be resolved itself");var n=V(t);n?_(function(){var r={done:!1};try{c(n,t,Z(J,r,e),Z(G,r,e))}catch(i){G(r,i,e)}}):(e.value=t,e.state=1,q(e,!1))}catch(i){G({done:!1},i,e)}}};if(A&&(B=(N=function(e){y(this,B),m(e),c(n,this);var t=j(this);try{e(Z(J,t),Z(G,t))}catch(r){G(t,r)}}).prototype,(n=function(e){I(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new S,rejection:!1,state:0,value:void 0})}).prototype=h(B,"then",function(e,t){var r=j(this),n=z(v(this,N));return r.parent=!0,n.ok=!b(e)||e,n.fail=b(t)&&t,n.domain=l?L.domain:void 0,0===r.state?r.reactions.add(n):_(function(){H(n,r)}),n.promise}),i=function(){var e=new n,t=j(e);this.promise=e,this.resolve=Z(J,t),this.reject=Z(G,t)},E.f=z=function(e){return e===N||void 0===e?new i(e):U(e)},!o&&b(C)&&P!==Object.prototype)){s=P.then,O||h(P,"then",function(e,t){var r=this;return new N(function(e,t){c(s,r,e,t)}).then(e,t)},{unsafe:!0});try{delete P.constructor}catch(Q){}f&&f(P,B)}a({global:!0,constructor:!0,wrap:!0,forced:A},{Promise:N}),d(N,"Promise",!1,!0),p("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(e,t,r){var n=e("../internals/export"),i=e("../internals/is-pure"),s=e("../internals/promise-native-constructor"),a=e("../internals/fails"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),u=e("../internals/species-constructor"),c=e("../internals/promise-resolve"),h=e("../internals/define-built-in"),f=s&&s.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!s&&a(function(){f.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=u(this,o("Promise")),r=l(e);return this.then(r?function(r){return c(t,e()).then(function(){return r})}:e,r?function(r){return c(t,e()).then(function(){throw r})}:e)}}),!i&&l(s)){var d=o("Promise").prototype.finally;f.finally!==d&&h(f,"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(e,t,r){e("../modules/es.promise.constructor"),e("../modules/es.promise.all"),e("../modules/es.promise.catch"),e("../modules/es.promise.race"),e("../modules/es.promise.reject"),e("../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(e,t,r){var n=e("../internals/export"),i=e("../internals/function-call"),s=e("../internals/a-callable"),a=e("../internals/new-promise-capability"),o=e("../internals/perform"),l=e("../internals/iterate");n({target:"Promise",stat:!0,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(e){var t=this,r=a.f(t),n=r.reject,u=o(function(){var a=s(t.resolve);l(e,function(e){i(a,t,e).then(r.resolve,n)})});return u.error&&n(u.value),r.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(e,t,r){var n=e("../internals/export"),i=e("../internals/function-call"),s=e("../internals/new-promise-capability");n({target:"Promise",stat:!0,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(e){var t=s.f(this);return i(t.reject,void 0,e),t.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/get-built-in"),s=e("../internals/is-pure"),a=e("../internals/promise-native-constructor"),o=e("../internals/promise-constructor-detection").CONSTRUCTOR,l=e("../internals/promise-resolve"),u=i("Promise"),c=s&&!o;n({target:"Promise",stat:!0,forced:s||o},{resolve:function(e){return l(c&&this===u?a:this,e)}})},{"../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(e,t,r){var n=e("../internals/export"),i=e("../internals/function-uncurry-this"),s=e("../internals/to-absolute-index"),a=RangeError,o=String.fromCharCode,l=String.fromCodePoint,u=i([].join);n({target:"String",stat:!0,arity:1,forced:!!l&&1!==l.length},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],s(t,1114111)!==t)throw new a(t+" is not a valid code point");r[i]=t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320)}return u(r,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/function-uncurry-this"),s=e("../internals/not-a-regexp"),a=e("../internals/require-object-coercible"),o=e("../internals/to-string"),l=e("../internals/correct-is-regexp-logic"),u=i("".indexOf);n({target:"String",proto:!0,forced:!l("includes")},{includes:function(e){return!!~u(o(a(this)),o(s(e)),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(e,t,r){e("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/global"),s=e("../internals/function-call"),a=e("../internals/function-uncurry-this"),o=e("../internals/is-pure"),l=e("../internals/descriptors"),u=e("../internals/symbol-constructor-detection"),c=e("../internals/fails"),h=e("../internals/has-own-property"),f=e("../internals/object-is-prototype-of"),d=e("../internals/an-object"),p=e("../internals/to-indexed-object"),m=e("../internals/to-property-key"),b=e("../internals/to-string"),g=e("../internals/create-property-descriptor"),y=e("../internals/object-create"),v=e("../internals/object-keys"),w=e("../internals/object-get-own-property-names"),_=e("../internals/object-get-own-property-names-external"),x=e("../internals/object-get-own-property-symbols"),k=e("../internals/object-get-own-property-descriptor"),S=e("../internals/object-define-property"),M=e("../internals/object-define-properties"),C=e("../internals/object-property-is-enumerable"),T=e("../internals/define-built-in"),E=e("../internals/define-built-in-accessor"),A=e("../internals/shared"),R=e("../internals/shared-key"),O=e("../internals/hidden-keys"),j=e("../internals/uid"),I=e("../internals/well-known-symbol"),P=e("../internals/well-known-symbol-wrapped"),N=e("../internals/well-known-symbol-define"),B=e("../internals/symbol-define-to-primitive"),D=e("../internals/set-to-string-tag"),F=e("../internals/internal-state"),L=e("../internals/array-iteration").forEach,z=R("hidden"),U=F.set,$=F.getterFor("Symbol"),V=Object.prototype,H=i.Symbol,q=H&&H.prototype,W=i.RangeError,X=i.TypeError,K=i.QObject,Y=k.f,Z=S.f,G=_.f,J=C.f,Q=a([].push),ee=A("symbols"),te=A("op-symbols"),re=A("wks"),ne=!K||!K.prototype||!K.prototype.findChild,ie=function(e,t,r){var n=Y(V,t);n&&delete V[t],Z(e,t,r),n&&e!==V&&Z(V,t,n)},se=l&&c(function(){return 7!==y(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a})?ie:Z,ae=function(e,t){var r=ee[e]=y(q);return U(r,{type:"Symbol",tag:e,description:t}),l||(r.description=t),r},oe=function(e,t,r){e===V&&oe(te,t,r),d(e);var n=m(t);return d(r),h(ee,n)?(r.enumerable?(h(e,z)&&e[z][n]&&(e[z][n]=!1),r=y(r,{enumerable:g(0,!1)})):(h(e,z)||Z(e,z,g(1,{})),e[z][n]=!0),se(e,n,r)):Z(e,n,r)},le=function(e,t){d(e);var r=p(t);return L(v(r).concat(fe(r)),function(t){l&&!s(ue,r,t)||oe(e,t,r[t])}),e},ue=function(e){var t=m(e),r=s(J,this,t);return!(this===V&&h(ee,t)&&!h(te,t))&&(!(r||!h(this,t)||!h(ee,t)||h(this,z)&&this[z][t])||r)},ce=function(e,t){var r=p(e),n=m(t);if(r!==V||!h(ee,n)||h(te,n)){var i=Y(r,n);return!i||!h(ee,n)||h(r,z)&&r[z][n]||(i.enumerable=!0),i}},he=function(e){var t=G(p(e)),r=[];return L(t,function(e){h(ee,e)||h(O,e)||Q(r,e)}),r},fe=function(e){var t=e===V,r=G(t?te:p(e)),n=[];return L(r,function(e){!h(ee,e)||t&&!h(V,e)||Q(n,ee[e])}),n};u||(T(q=(H=function(){if(f(q,this))throw new X("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?b(arguments[0]):void 0,t=j(e),r=function(e){this===V&&s(r,te,e),h(this,z)&&h(this[z],t)&&(this[z][t]=!1);var n=g(1,e);try{se(this,t,n)}catch(i){if(!(i instanceof W))throw i;ie(this,t,n)}};return l&&ne&&se(V,t,{configurable:!0,set:r}),ae(t,e)}).prototype,"toString",function(){return $(this).tag}),T(H,"withoutSetter",function(e){return ae(j(e),e)}),C.f=ue,S.f=oe,M.f=le,k.f=ce,w.f=_.f=he,x.f=fe,P.f=function(e){return ae(I(e),e)},l&&(E(q,"description",{configurable:!0,get:function(){return $(this).description}}),o||T(V,"propertyIsEnumerable",ue,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),L(v(re),function(e){N(e)}),n({target:"Symbol",stat:!0,forced:!u},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),n({target:"Object",stat:!0,forced:!u,sham:!l},{create:function(e,t){return void 0===t?y(e):le(y(e),t)},defineProperty:oe,defineProperties:le,getOwnPropertyDescriptor:ce}),n({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:he}),B(),D(H,"Symbol"),O[z]=!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(e,t,r){var n=e("../internals/export"),i=e("../internals/get-built-in"),s=e("../internals/has-own-property"),a=e("../internals/to-string"),o=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),u=o("string-to-symbol-registry"),c=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(s(u,t))return u[t];var r=i("Symbol")(t);return u[t]=r,c[r]=t,r}})},{"../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(e,t,r){e("../modules/es.symbol.constructor"),e("../modules/es.symbol.for"),e("../modules/es.symbol.key-for"),e("../modules/es.json.stringify"),e("../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(e,t,r){var n=e("../internals/export"),i=e("../internals/has-own-property"),s=e("../internals/is-symbol"),a=e("../internals/try-to-string"),o=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),u=o("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!l},{keyFor:function(e){if(!s(e))throw new TypeError(a(e)+" is not a symbol");if(i(u,e))return u[e]}})},{"../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(e,t,r){function n(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===n(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===n(e)},r.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("buffer").Buffer.isBuffer},{buffer:220}],384:[function(e,t,r){(function(r){(function(){var n=e("elliptic"),i=e("bn.js");t.exports=function(e){return new a(e)};var s={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 a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function o(e,t,n){Array.isArray(e)||(e=e.toArray());var i=new r(e);if(n&&i.length<n){var s=new r(n-i.length);s.fill(0),i=r.concat([s,i])}return t?i.toString(t):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,n){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),o(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),o(r,e)},a.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",r.isBuffer(e)||(e=new r(e,t));var n=new i(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this)}).call(this,e("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(e,t,r){arguments[4][184][0].apply(r,arguments)},{buffer:188,dup:184}],386:[function(e,t,r){var n=e("inherits"),i=e("md5.js"),s=e("ripemd160"),a=e("sha.js"),o=e("cipher-base");function l(e){o.call(this,"digest"),this._hash=e}n(l,o),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new s:new l(a(e))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(e,t,r){var n=e("md5.js");t.exports=function(e){return(new n).update(e).digest()}},{"md5.js":450}],388:[function(e,t,r){var n=e("inherits"),i=e("./legacy"),s=e("cipher-base"),a=e("safe-buffer").Buffer,o=e("create-hash/md5"),l=e("ripemd160"),u=e("sha.js"),c=a.alloc(128);function h(e,t){s.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new l:u(e)).update(t).digest():t.length<r&&(t=a.concat([t,c],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),o=0;o<r;o++)n[o]=54^t[o],i[o]=92^t[o];this._hash="rmd160"===e?new l:u(e),this._hash.update(n)}n(h,s),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:u(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(o,t):new h(e,t)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(e,t,r){var n=e("inherits"),i=e("safe-buffer").Buffer,s=e("cipher-base"),a=i.alloc(128);function o(e,t){s.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>64?t=e(t):t.length<64&&(t=i.concat([t,a],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),o=0;o<64;o++)r[o]=54^t[o],n[o]=92^t[o];this._hash=[r]}n(o,s),o.prototype._update=function(e){this._hash.push(e)},o.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},t.exports=o},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(e,t,r){r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=e("randombytes"),r.createHash=r.Hash=e("create-hash"),r.createHmac=r.Hmac=e("create-hmac");var n=e("browserify-sign/algos"),i=Object.keys(n),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return s};var a=e("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var o=e("browserify-cipher");r.Cipher=o.Cipher,r.createCipher=o.createCipher,r.Cipheriv=o.Cipheriv,r.createCipheriv=o.createCipheriv,r.Decipher=o.Decipher,r.createDecipher=o.createDecipher,r.Decipheriv=o.Decipheriv,r.createDecipheriv=o.createDecipheriv,r.getCiphers=o.getCiphers,r.listCiphers=o.listCiphers;var l=e("diffie-hellman");r.DiffieHellmanGroup=l.DiffieHellmanGroup,r.createDiffieHellmanGroup=l.createDiffieHellmanGroup,r.getDiffieHellman=l.getDiffieHellman,r.createDiffieHellman=l.createDiffieHellman,r.DiffieHellman=l.DiffieHellman;var u=e("browserify-sign");r.createSign=u.createSign,r.Sign=u.Sign,r.createVerify=u.createVerify,r.Verify=u.Verify,r.createECDH=e("create-ecdh");var c=e("public-encrypt");r.publicEncrypt=c.publicEncrypt,r.privateEncrypt=c.privateEncrypt,r.publicDecrypt=c.publicDecrypt,r.privateDecrypt=c.privateDecrypt;var h=e("randomfill");r.randomFill=h.randomFill,r.randomFillSync=h.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.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(e,t,r){var n,i;n=void 0,i=function(){var e=6e4,t=36e5,r="millisecond",n="second",i="minute",s="hour",a="day",o="week",l="month",u="quarter",c="year",h="date",f="Invalid Date",d=/^(\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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},b=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:b,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),i=r%60;return(t<=0?"+":"-")+b(n,2,"0")+":"+b(i,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),i=t.clone().add(n,l),s=r-i<0,a=t.clone().add(n+(s?-1:1),l);return+(-(n+(r-i)/(s?i-a:a-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:c,w:o,d:a,D:h,h:s,m:i,s:n,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",v={};v[y]=m;var w="$isDayjsObject",_=function(e){return e instanceof M||!(!e||!e[w])},x=function e(t,r,n){var i;if(!t)return y;if("string"==typeof t){var s=t.toLowerCase();v[s]&&(i=s),r&&(v[s]=r,i=s);var a=t.split("-");if(!i&&a.length>1)return e(a[0])}else{var o=t.name;v[o]=t,i=o}return!n&&i&&(y=i),i||!n&&y},k=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new M(r)},S=g;S.l=x,S.i=_,S.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function m(e){this.$L=x(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var b=m.prototype;return b.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)/* @__PURE__ */return new Date(NaN);if(S.u(t))/* @__PURE__ */return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(d);if(n){var i=n[2]-1||0,s=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.init()},b.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},b.$utils=function(){return S},b.isValid=function(){return!(this.$d.toString()===f)},b.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},b.isAfter=function(e,t){return k(e)<this.startOf(t)},b.isBefore=function(e,t){return this.endOf(t)<k(e)},b.$g=function(e,t,r){return S.u(e)?this[t]:this.set(r,e)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(e,t){var r=this,u=!!S.u(t)||t,f=S.p(e),d=function(e,t){var n=S.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return u?n:n.endOf(a)},p=function(e,t){return S.w(r.toDate()[e].apply(r.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},m=this.$W,b=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(f){case c:return u?d(1,0):d(31,11);case l:return u?d(1,b):d(0,b+1);case o:var v=this.$locale().weekStart||0,w=(m<v?m+7:m)-v;return d(u?g-w:g+(6-w),b);case a:case h:return p(y+"Hours",0);case s:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case n:return p(y+"Milliseconds",3);default:return this.clone()}},b.endOf=function(e){return this.startOf(e,!1)},b.$set=function(e,t){var o,u=S.p(e),f="set"+(this.$u?"UTC":""),d=(o={},o[a]=f+"Date",o[h]=f+"Date",o[l]=f+"Month",o[c]=f+"FullYear",o[s]=f+"Hours",o[i]=f+"Minutes",o[n]=f+"Seconds",o[r]=f+"Milliseconds",o)[u],p=u===a?this.$D+(t-this.$W):t;if(u===l||u===c){var m=this.clone().set(h,1);m.$d[d](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else d&&this.$d[d](p);return this.init(),this},b.set=function(e,t){return this.clone().$set(e,t)},b.get=function(e){return this[S.p(e)]()},b.add=function(r,u){var h,f=this;r=Number(r);var d=S.p(u),p=function(e){var t=k(f);return S.w(t.date(t.date()+Math.round(e*r)),f)};if(d===l)return this.set(l,this.$M+r);if(d===c)return this.set(c,this.$y+r);if(d===a)return p(1);if(d===o)return p(7);var m=(h={},h[i]=e,h[s]=t,h[n]=1e3,h)[d]||1,b=this.$d.getTime()+r*m;return S.w(b,this)},b.subtract=function(e,t){return this.add(-1*e,t)},b.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||f;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),s=this.$H,a=this.$m,o=this.$M,l=r.weekdays,u=r.months,c=r.meridiem,h=function(e,r,i,s){return e&&(e[r]||e(t,n))||i[r].slice(0,s)},d=function(e){return S.s(s%12||12,e,"0")},m=c||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(p,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return S.s(t.$y,4,"0");case"M":return o+1;case"MM":return S.s(o+1,2,"0");case"MMM":return h(r.monthsShort,o,u,3);case"MMMM":return h(u,o);case"D":return t.$D;case"DD":return S.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(r.weekdaysMin,t.$W,l,2);case"ddd":return h(r.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(s);case"HH":return S.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return m(s,a,!0);case"A":return m(s,a,!1);case"m":return String(a);case"mm":return S.s(a,2,"0");case"s":return String(t.$s);case"ss":return S.s(t.$s,2,"0");case"SSS":return S.s(t.$ms,3,"0");case"Z":return i}return null}(e)||i.replace(":","")})},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,h,f){var d,p=this,m=S.p(h),b=k(r),g=(b.utcOffset()-this.utcOffset())*e,y=this-b,v=function(){return S.m(p,b)};switch(m){case c:d=v()/12;break;case l:d=v();break;case u:d=v()/3;break;case o:d=(y-g)/6048e5;break;case a:d=(y-g)/864e5;break;case s:d=y/t;break;case i:d=y/e;break;case n:d=y/1e3;break;default:d=y}return f?d:S.a(d)},b.daysInMonth=function(){return this.endOf(l).$D},b.$locale=function(){return v[this.$L]},b.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=x(e,t,!0);return n&&(r.$L=n),r},b.clone=function(){return S.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},m}(),C=M.prototype;return k.prototype=C,[["$ms",r],["$s",n],["$m",i],["$H",s],["$W",a],["$M",l],["$y",c],["$D",h]].forEach(function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),k.extend=function(e,t){return e.$i||(e(t,M,k),e.$i=!0),k},k.locale=x,k.isDayjs=_,k.unix=function(e){return k(1e3*e)},k.en=v[y],k.Ls=v,k.p={},k},"object"==typeof r&&void 0!==t?t.exports=i():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs=i()},{}],392:[function(e,t,r){var n,i;n=void 0,i=function(){var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d\d/,n=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)},o=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},c=function(e,t){var r,n=s.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},h={A:[i,function(e){this.afternoon=c(e,!1)}],a:[i,function(e){this.afternoon=c(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[n,o("seconds")],ss:[n,o("seconds")],m:[n,o("minutes")],mm:[n,o("minutes")],H:[n,o("hours")],h:[n,o("hours")],HH:[n,o("hours")],hh:[n,o("hours")],D:[n,o("day")],DD:[r,o("day")],Do:[i,function(e){var t=s.ordinal;if(this.day=e.match(/\d+/)[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[n,o("month")],MM:[r,o("month")],MMM:[i,function(e){var t=u("months"),r=(u("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[i,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,o("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,o("year")],Z:l,ZZ:l};return function(r,n,i){i.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(a=r.parseTwoDigitYear);var o=n.prototype,l=o.parse;o.parse=function(r){var n=r.date,a=r.utc,o=r.args;this.$u=a;var u=o[1];if("string"==typeof u){var c=!0===o[2],f=!0===o[3],d=c||f,p=o[2];f&&(p=o[2]),s=this.$locale(),!c&&p&&(s=i.Ls[p]),this.$d=function(r,n,i){try{if(["x","X"].indexOf(n)>-1)/* @__PURE__ */return new Date(("X"===n?1e3:1)*r);var a=function(r){for(var n=r,i=s&&s.formats,a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var s=n&&n.toUpperCase();return r||i[n]||e[n]||i[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),o=a.length,l=0;l<o;l+=1){var u=a[l],c=h[u],f=c&&c[0],d=c&&c[1];a[l]=d?{regex:f,parser:d}:u.replace(/^\[|\]$/g,"")}return function(e){for(var t={},r=0,n=0;r<o;r+=1){var i=a[r];if("string"==typeof i)n+=i.length;else{var s=i.regex,l=i.parser,u=e.slice(n),c=s.exec(u)[0];l.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var r=e.hours;t?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}(t),t}}(n)(r),o=a.year,l=a.month,u=a.day,c=a.hours,f=a.minutes,d=a.seconds,p=a.milliseconds,m=a.zone,b=/* @__PURE__ */new Date,g=u||(o||l?1:b.getDate()),y=o||b.getFullYear(),v=0;o&&!l||(v=l>0?l-1:b.getMonth());var w=c||0,_=f||0,x=d||0,k=p||0;return m?new Date(Date.UTC(y,v,g,w,_,x,k+60*m.offset*1e3)):i?new Date(Date.UTC(y,v,g,w,_,x,k)):new Date(y,v,g,w,_,x,k)}catch(S){/* @__PURE__ */
2
+ return new Date("")}}(n,u,a),this.init(),p&&!0!==p&&(this.$L=this.locale(p).$L),d&&n!=this.format(u)&&(this.$d=/* @__PURE__ */new Date("")),s={}}else if(u instanceof Array)for(var m=u.length,b=1;b<=m;b+=1){o[1]=u[b-1];var g=i.apply(this,o);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}b===m&&(this.$d=/* @__PURE__ */new Date(""))}else l.call(this,r)}}},"object"==typeof r&&void 0!==t?t.exports=i():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_customParseFormat=i()},{}],393:[function(e,t,r){var n,i;n=void 0,i=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,s){var a=i.prototype;s.utc=function(e){return new i({date:e,utc:!0,args:arguments})},a.utc=function(t){var r=s(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=a.utcOffset;a.utcOffset=function(n,i){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?u.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],s=i[0],a=60*+i[1]+ +i[2];return 0===a?0:"+"===s?a:-a}(n)))return this;var a=Math.abs(n)<=16?60*n:n,o=this;if(i)return o.$offset=a,o.$u=0===n,o;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+l,e)).$offset=a,o.$x.$localOffset=l}else o=this.utc();return o};var c=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var f=a.diff;a.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),i=s(e).local();return f.call(n,i,t,r)}}},"object"==typeof r&&void 0!==t?t.exports=i():(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_utc=i()},{}],394:[function(e,t,r){r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits"),s={};function a(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}r.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(s),n=0;n<r.length;n++){var a=r[n];t.prototype[a]=s[a]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){this._cbcState=new a(this.options.iv)},s._update=function(e,t,r,n){var i=this._cbcState,s=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++)a[o]^=e[t+o];for(s._update.call(this,a,0,r,n),o=0;o<this.blockSize;o++)a[o]=r[n+o]}else{for(s._update.call(this,e,t,r,n),o=0;o<this.blockSize;o++)r[n+o]^=a[o];for(o=0;o<this.blockSize;o++)a[o]=e[t+o]}}},{inherits:440,"minimalistic-assert":453}],396:[function(e,t,r){var n=e("minimalistic-assert");function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var s=e.length-(e.length-t)%this.blockSize;t<s;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":453}],397:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits"),s=e("./utils"),a=e("./cipher");function o(){this.tmp=new Array(2),this.keys=null}function l(e){a.call(this,e);var t=new o;this._desState=t,this.deriveKeys(t,e.key)}i(l,a),t.exports=l,l.create=function(e){return new l(e)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=s.readUInt32BE(t,0),i=s.readUInt32BE(t,4);s.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var o=u[a>>>1];r=s.r28shl(r,o),i=s.r28shl(i,o),s.pc2(r,i,e.keys,a)}},l.prototype._update=function(e,t,r,n){var i=this._desState,a=s.readUInt32BE(e,t),o=s.readUInt32BE(e,t+4);s.ip(a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,o,i.tmp,0):this._decrypt(i,a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],s.writeUInt32BE(r,a,n),s.writeUInt32BE(r,o,n+4)},l.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},l.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,r,n,i){for(var a=t,o=r,l=0;l<e.keys.length;l+=2){var u=e.keys[l],c=e.keys[l+1];s.expand(o,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var h=s.substitute(u,c),f=o;o=(a^s.permute(h))>>>0,a=f}s.rip(o,a,n,i)},l.prototype._decrypt=function(e,t,r,n,i){for(var a=r,o=t,l=e.keys.length-2;l>=0;l-=2){var u=e.keys[l],c=e.keys[l+1];s.expand(a,e.tmp,0),u^=e.tmp[0],c^=e.tmp[1];var h=s.substitute(u,c),f=a;a=(o^s.permute(h))>>>0,o=f}s.rip(a,o,n,i)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits"),s=e("./cipher"),a=e("./des");function o(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),s=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:s})]:[a.create({type:"decrypt",key:s}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function l(e){s.call(this,e),this._edeState=new o(this.type,this.options.key)}i(l,s),t.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},l.prototype._pad=a.prototype._pad,l.prototype._unpad=a.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(e,t,r){r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,s=0,a=6;a>=0;a-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>>o+a&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>>o+a&1}for(a=6;a>=0;a-=2){for(o=1;o<=25;o+=8)s<<=1,s|=t>>>o+a&1;for(o=1;o<=25;o+=8)s<<=1,s|=e>>>o+a&1}r[n+0]=i>>>0,r[n+1]=s>>>0},r.rip=function(e,t,r,n){for(var i=0,s=0,a=0;a<4;a++)for(var o=24;o>=0;o-=8)i<<=1,i|=t>>>o+a&1,i<<=1,i|=e>>>o+a&1;for(a=4;a<8;a++)for(o=24;o>=0;o-=8)s<<=1,s|=t>>>o+a&1,s<<=1,s|=e>>>o+a&1;r[n+0]=i>>>0,r[n+1]=s>>>0},r.pc1=function(e,t,r,n){for(var i=0,s=0,a=7;a>=5;a--){for(var o=0;o<=24;o+=8)i<<=1,i|=t>>o+a&1;for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+a&1}for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+a&1;for(a=1;a<=3;a++){for(o=0;o<=24;o+=8)s<<=1,s|=t>>o+a&1;for(o=0;o<=24;o+=8)s<<=1,s|=e>>o+a&1}for(o=0;o<=24;o+=8)s<<=1,s|=e>>o+a&1;r[n+0]=i>>>0,r[n+1]=s>>>0},r.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[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];r.pc2=function(e,t,r,i){for(var s=0,a=0,o=n.length>>>1,l=0;l<o;l++)s<<=1,s|=e>>>n[l]&1;for(l=o;l<n.length;l++)a<<=1,a|=t>>>n[l]&1;r[i+0]=s>>>0,r[i+1]=a>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var s=23;s>=15;s-=4)n<<=6,n|=e>>>s&63;for(s=11;s>=3;s-=4)i|=e>>>s&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[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];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++)r<<=4,r|=i[64*n+(e>>>18-6*n&63)];for(n=0;n<4;n++)r<<=4,r|=i[256+64*n+(t>>>18-6*n&63)];return r>>>0};var s=[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];r.permute=function(e){for(var t=0,r=0;r<s.length;r++)t<<=1,t|=e>>>s[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],s=0;s<t;s+=r)i.push(n.slice(s,s+r));return i.join(" ")}},{}],400:[function(e,t,r){(function(t){(function(){var n=e("./lib/generatePrime"),i=e("./lib/primes.json"),s=e("./lib/dh"),a={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(e){return new s(new t(i[e].prime,"hex"),new t(i[e].gen,"hex"))},r.createDiffieHellman=r.DiffieHellman=function e(r,i,o,l){return t.isBuffer(i)||void 0===a[i]?e(r,"binary",i,o):(i=i||"binary",l=l||"binary",o=o||new t([2]),t.isBuffer(o)||(o=new t(o,l)),"number"==typeof r?new s(n(r,o),o,!0):(t.isBuffer(r)||(r=new t(r,i)),new s(r,o,!0)))}}).call(this)}).call(this,e("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(e,t,r){(function(r){(function(){var n=e("bn.js"),i=new(e("miller-rabin")),s=new n(24),a=new n(11),o=new n(10),l=new n(3),u=new n(7),c=e("./generatePrime"),h=e("randombytes");function f(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._pub=new n(e),this}function d(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this._priv=new n(e),this}t.exports=m;var p={};function m(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=f,this.setPrivateKey=d):this._primeCode=8}function b(e,t){var n=new r(e.toArray());return t?n.toString(t):n}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in p)return p[n];var h,f=0;if(e.isEven()||!c.simpleSieve||!c.fermatTest(e)||!i.test(e))return f+=1,f+="02"===r||"05"===r?8:4,p[n]=f,f;switch(i.test(e.shrn(1))||(f+=2),r){case"02":e.mod(s).cmp(a)&&(f+=8);break;case"05":(h=e.mod(o)).cmp(l)&&h.cmp(u)&&(f+=8);break;default:f+=4}return p[n]=f,f}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new n(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){var t=new r((e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),i=this.getPrime();if(t.length<i.length){var s=new r(i.length-t.length);s.fill(0),t=r.concat([s,t])}return t},m.prototype.getPublicKey=function(e){return b(this._pub,e)},m.prototype.getPrivateKey=function(e){return b(this._priv,e)},m.prototype.getPrime=function(e){return b(this.__prime,e)},m.prototype.getGenerator=function(e){return b(this._gen,e)},m.prototype.setGenerator=function(e,t){return t=t||"utf8",r.isBuffer(e)||(e=new r(e,t)),this.__gen=e,this._gen=new n(e),this}}).call(this)}).call(this,e("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(e,t,r){var n=e("randombytes");t.exports=g,g.simpleSieve=m,g.fermatTest=b;var i=e("bn.js"),s=new i(24),a=new(e("miller-rabin")),o=new i(1),l=new i(2),u=new i(5),c=(new i(16),new i(8),new i(10)),h=new i(3),f=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function b(e){var t=i.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function g(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(l),t.cmp(l)){if(!t.cmp(u))for(;r.mod(c).cmp(h);)r.iadd(d)}else for(;r.mod(s).cmp(f);)r.iadd(d);if(m(p=r.shrn(1))&&m(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(e,t,r){t.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(e,t,r){arguments[4][184][0].apply(r,arguments)},{buffer:188,dup:184}],405:[function(e,t,r){var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),s=i.getNAF,a=i.getJSF,o=i.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(e,t){this.curve=e,this.type=t,this.precomputed=null}t.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){o(e.precomputed);var r=e._getDoubles(),n=s(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,l,u=[];for(a=0;a<n.length;a+=r.step){l=0;for(var c=a+r.step-1;c>=a;c--)l=(l<<1)+n[c];u.push(l)}for(var h=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a<u.length;a++)(l=u[a])===d?f=f.mixedAdd(r.points[a]):l===-d&&(f=f.mixedAdd(r.points[a].neg()));h=h.add(f)}return h.toP()},l.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=s(t,r,this._bitLength),l=this.jpoint(null,null,null),u=a.length-1;u>=0;u--){for(var c=0;u>=0&&0===a[u];u--)c++;if(u>=0&&c++,l=l.dblp(c),u<0)break;var h=a[u];o(0!==h),l="affine"===e.type?h>0?l.mixedAdd(i[h-1>>1]):l.mixedAdd(i[-h-1>>1].neg()):h>0?l.add(i[h-1>>1]):l.add(i[-h-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,r,n,i){var o,l,u,c=this._wnafT1,h=this._wnafT2,f=this._wnafT3,d=0;for(o=0;o<n;o++){var p=(u=t[o])._getNAFPoints(e);c[o]=p.wnd,h[o]=p.points}for(o=n-1;o>=1;o-=2){var m=o-1,b=o;if(1===c[m]&&1===c[b]){var g=[t[m],null,null,t[b]];0===t[m].y.cmp(t[b].y)?(g[1]=t[m].add(t[b]),g[2]=t[m].toJ().mixedAdd(t[b].neg())):0===t[m].y.cmp(t[b].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[b]),g[2]=t[m].add(t[b].neg())):(g[1]=t[m].toJ().mixedAdd(t[b]),g[2]=t[m].toJ().mixedAdd(t[b].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[m],r[b]);for(d=Math.max(v[0].length,d),f[m]=new Array(d),f[b]=new Array(d),l=0;l<d;l++){var w=0|v[0][l],_=0|v[1][l];f[m][l]=y[3*(w+1)+(_+1)],f[b][l]=0,h[m]=g}}else f[m]=s(r[m],c[m],this._bitLength),f[b]=s(r[b],c[b],this._bitLength),d=Math.max(f[m].length,d),d=Math.max(f[b].length,d)}var x=this.jpoint(null,null,null),k=this._wnafT4;for(o=d;o>=0;o--){for(var S=0;o>=0;){var M=!0;for(l=0;l<n;l++)k[l]=0|f[l][o],0!==k[l]&&(M=!1);if(!M)break;S++,o--}if(o>=0&&S++,x=x.dblp(S),o<0)break;for(l=0;l<n;l++){var C=k[l];0!==C&&(C>0?u=h[l][C-1>>1]:C<0&&(u=h[l][-C-1>>1].neg()),x="affine"===u.type?x.mixedAdd(u):x.add(u))}}for(o=0;o<n;o++)h[o]=null;return i?x:x.toP()},l.BasePoint=u,u.prototype.eq=function(){throw new Error("Not implemented")},u.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?o(e[e.length-1]%2==0):7===e[0]&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},u.prototype.encodeCompressed=function(e){return this.encode(e,!0)},u.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},u.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},u.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},u.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},u.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var s=0;s<e;s++)n=n.dbl();r.push(n)}return{step:e,points:r}},u.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},u.prototype._getBeta=function(){return null},u.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},{"../utils":419,"bn.js":420}],407:[function(e,t,r){var n=e("../utils"),i=e("bn.js"),s=e("inherits"),a=e("./base"),o=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function u(e,t,r,n,s){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=s&&new i(s,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()))))}s(l,a),t.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),s=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(s.redInvm()),o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var l=o.fromRed().isOdd();return(t&&!l||!t&&l)&&(o=o.redNeg()),this.point(e,o)},l.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),s=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(s.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var o=a.redSqrt();if(0!==o.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},s(u,a.BasePoint),l.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},l.prototype.point=function(e,t,r,n){return new u(this,e,t,r,n)},u.fromJSON=function(e,t){return new u(e,t[0],t[1],t[2])},u.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)+">"},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),s=n.redAdd(t),a=s.redSub(r),o=n.redSub(t),l=i.redMul(a),u=s.redMul(o),c=i.redMul(o),h=a.redMul(s);return this.curve.point(l,u,h,c)},u.prototype._projDbl=function(){var e,t,r,n,i,s,a=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(o)).redAdd(l);this.zOne?(e=a.redSub(o).redSub(l).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(l)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),s=u.redSub(i).redISub(i),e=a.redSub(o).redISub(l).redMul(s),t=u.redMul(n.redSub(l)),r=u.redMul(s))}else n=o.redAdd(l),i=this.curve._mulC(this.z).redSqr(),s=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(s),t=this.curve._mulC(n).redMul(o.redISub(l)),r=n.redMul(s);return this.curve.point(e,t,r)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),s=r.redSub(t),a=i.redSub(n),o=i.redAdd(n),l=r.redAdd(t),u=s.redMul(a),c=o.redMul(l),h=s.redMul(l),f=a.redMul(o);return this.curve.point(u,c,f,h)},u.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),s=this.x.redMul(e.x),a=this.y.redMul(e.y),o=this.curve.d.redMul(s).redMul(a),l=i.redSub(o),u=i.redAdd(o),c=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(a),h=n.redMul(l).redMul(c);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(s))),r=l.redMul(u)):(t=n.redMul(u).redMul(a.redSub(s)),r=this.curve._mulC(l).redMul(u)),this.curve.point(h,t,r)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(e,t,r){var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(e,t,r){var n=e("bn.js"),i=e("inherits"),s=e("./base"),a=e("../utils");function o(e){s.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){s.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,s),t.exports=o,o.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(l,s.BasePoint),o.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},o.prototype.point=function(e,t){return new l(this,e,t)},o.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.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)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),s=e.x.redSub(e.z).redMul(r),a=i.redMul(n),o=t.z.redMul(s.redAdd(a).redSqr()),l=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(o,l)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var s=i.length-1;s>=0;s--)0===i[s]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(e,t,r){var n=e("../utils"),i=e("bn.js"),s=e("inherits"),a=e("./base"),o=n.assert;function l(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(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 c(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,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}s(l,a),t.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?r=s[0]:(r=s[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new i(e.a,16),b:new i(e.b,16)}}):this._getEndoBasis(r)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),s=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(s).fromRed(),n.redSub(s).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,r,n,s,a,o,l,u,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,d=this.n.clone(),p=new i(1),m=new i(0),b=new i(0),g=new i(1),y=0;0!==f.cmpn(0);){var v=d.div(f);u=d.sub(v.mul(f)),c=b.sub(v.mul(p));var w=g.sub(v.mul(m));if(!n&&u.cmp(h)<0)t=l.neg(),r=p,n=u.neg(),s=c;else if(n&&2==++y)break;l=u,d=f,f=u,b=p,p=c,g=m,m=w}a=u.neg(),o=c;var _=n.sqr().add(s.sqr());return a.sqr().add(o.sqr()).cmp(_)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),s=s.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:s},{a:a,b:o}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),s=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),o=s.mul(n.a),l=i.mul(r.b),u=s.mul(n.b);return{k1:e.sub(a).sub(o),k2:l.add(u).neg()}},l.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var s=n.fromRed().isOdd();return(t&&!s||!t&&s)&&(n=n.redNeg()),this.point(e,n)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,s=0;s<e.length;s++){var a=this._endoSplit(t[s]),o=e[s],l=o._getBeta();a.k1.negative&&(a.k1.ineg(),o=o.neg(!0)),a.k2.negative&&(a.k2.ineg(),l=l.neg(!0)),n[2*s]=o,n[2*s+1]=l,i[2*s]=a.k1,i[2*s+1]=a.k2}for(var u=this._wnafMulAdd(1,n,i,2*s,r),c=0;c<2*s;c++)n[c]=null,i[c]=null;return u},s(u,a.BasePoint),l.prototype.point=function(e,t,r){return new u(this,e,t,r)},l.prototype.pointFromJSON=function(e,t){return u.fromJSON(this,e,t)},u.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},u.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]},u.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var s=t[2];return n.precomputed={beta:null,doubles:s.doubles&&{step:s.doubles.step,points:[n].concat(s.doubles.points.map(i))},naf:s.naf&&{wnd:s.naf.wnd,points:[n].concat(s.naf.points.map(i))}},n},u.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)+">"},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},u.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),s=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,a)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},u.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},u.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},u.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(c,a.BasePoint),l.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),s=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),o=n.redSub(i),l=s.redSub(a);if(0===o.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),h=n.redMul(u),f=l.redSqr().redIAdd(c).redISub(h).redISub(h),d=l.redMul(h.redISub(f)).redISub(s.redMul(c)),p=this.z.redMul(e.z).redMul(o);return this.curve.jpoint(f,d,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,s=e.y.redMul(t).redMul(this.z),a=r.redSub(n),o=i.redSub(s);if(0===a.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),c=r.redMul(l),h=o.redSqr().redIAdd(u).redISub(c).redISub(c),f=o.redMul(c.redISub(h)).redISub(i.redMul(u)),d=this.z.redMul(a);return this.curve.jpoint(h,f,d)},c.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,s=this.x,a=this.y,o=this.z,l=o.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var c=s.redSqr(),h=u.redSqr(),f=h.redSqr(),d=c.redAdd(c).redIAdd(c).redIAdd(n.redMul(l)),p=s.redMul(h),m=d.redSqr().redISub(p.redAdd(p)),b=p.redISub(m),g=d.redMul(b);g=g.redIAdd(g).redISub(f);var y=u.redMul(o);t+1<e&&(l=l.redMul(f)),s=m,o=y,u=g}return this.curve.jpoint(s,u.redMul(i),o)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n),l=o.redSqr().redISub(a).redISub(a),u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),e=l,t=o.redMul(a.redISub(l)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),f=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(c).redISub(f);d=d.redIAdd(d);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),b=f.redIAdd(f);b=(b=b.redIAdd(b)).redIAdd(b),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},c.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),s=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(s);a=a.redIAdd(a);var o=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),l=o.redSqr().redISub(a).redISub(a);e=l;var u=s.redIAdd(s);u=(u=u.redIAdd(u)).redIAdd(u),t=o.redMul(a.redISub(l)).redISub(u),r=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),f=this.x.redMul(h),d=this.x.redSub(c).redMul(this.x.redAdd(c));d=d.redAdd(d).redIAdd(d);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var b=h.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=d.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},c.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),s=t.redSqr(),a=r.redSqr(),o=s.redAdd(s).redIAdd(s).redIAdd(e.redMul(i)),l=t.redAdd(t),u=(l=l.redIAdd(l)).redMul(a),c=o.redSqr().redISub(u.redAdd(u)),h=u.redISub(c),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=o.redMul(h).redISub(f),p=r.redAdd(r).redMul(n);return this.curve.jpoint(c,d,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),s=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),o=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(s)).redSqr(),l=n.redIAdd(n);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var u=i.redIAdd(a).redSqr().redISub(s).redISub(o).redISub(l),c=t.redMul(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(o).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.y.redMul(u.redMul(l.redISub(u)).redISub(a.redMul(o)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=this.z.redAdd(a).redSqr().redISub(r).redISub(o);return this.curve.jpoint(h,f,d)},c.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},c.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},c.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.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)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(e,t,r){var n,i=r,s=e("hash.js"),a=e("./curve"),o=e("./utils").assert;function l(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=l,u("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:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("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:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("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:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("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:s.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"]}),u("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:s.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"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),u("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:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1")}catch(c){n=void 0}u("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:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(e,t,r){var n=e("bn.js"),i=e("hmac-drbg"),s=e("../utils"),a=e("../curves"),o=e("brorand"),l=s.assert,u=e("./key"),c=e("./signature");function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}t.exports=h,h.prototype.keyPair=function(e){return new u(this,e)},h.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),s=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,s){"object"==typeof r&&(s=r,r=null),s||(s={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),o=t.getPrivate().toArray("be",a),l=e.toArray("be",a),u=new i({hash:this.hash,entropy:o,nonce:l,pers:s.pers,persEnc:s.persEnc||"utf8"}),h=this.n.sub(new n(1)),f=0;;f++){var d=s.k?s.k(f):new n(u.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),b=m.umod(this.n);if(0!==b.cmpn(0)){var g=d.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(b)?2:0);return s.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),y^=1),new c({r:b,s:g,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var s=(t=new c(t,"hex")).r,a=t.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var o,l=a.invm(this.n),u=l.mul(e).umod(this.n),h=l.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(u,r.getPublic(),h)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(u,r.getPublic(),h)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},h.prototype.recoverPubKey=function(e,t,r,i){l((3&r)===r,"The recovery param is more than two bits"),t=new c(t,i);var s=this.n,a=new n(e),o=t.r,u=t.s,h=1&r,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");o=f?this.curve.pointFromX(o.add(this.curve.n),h):this.curve.pointFromX(o,h);var d=t.r.invm(s),p=s.sub(a).mul(d).umod(s),m=u.mul(d).umod(s);return this.g.mulAdd(p,o,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new c(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(e,t,i)}catch(a){continue}if(s.eq(r))return i}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(e,t,r){var n=e("bn.js"),i=e("../utils").assert;function s(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}t.exports=s,s.fromPublic=function(e,t,r){return t instanceof s?t:new s(e,{pub:t,pubEnc:r})},s.fromPrivate=function(e,t,r){return t instanceof s?t:new s(e,{priv:t,privEnc:r})},s.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},s.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},s.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},s.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},s.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},s.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},s.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(e,t,r){var n=e("bn.js"),i=e("../utils"),s=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(s(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,s=0,a=t.place;s<n;s++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function c(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}t.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new o;if(48!==e[r.place++])return!1;var s=l(e,r);if(!1===s)return!1;if(s+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=l(e,r);if(!1===a)return!1;var u=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var c=l(e,r);if(!1===c)return!1;if(e.length!==c+r.place)return!1;var h=e.slice(r.place,c+r.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(u),this.s=new n(h),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length);var s=n.concat(r),a=[48];return c(a,s.length),a=a.concat(s),i.encode(a,e)}},{"../utils":419,"bn.js":420}],415:[function(e,t,r){var n=e("hash.js"),i=e("../curves"),s=e("../utils"),a=s.assert,o=s.parseBytes,l=e("./key"),u=e("./signature");function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}t.exports=c,c.prototype.sign=function(e,t){e=o(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),s=this.encodePoint(i),a=this.hashInt(s,r.pubBytes(),e).mul(r.priv()),l=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:l,Rencoded:s})},c.prototype.verify=function(e,t,r){e=o(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),s=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(s)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},c.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},c.prototype.makeSignature=function(e){return e instanceof u?e:new u(this,e)},c.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},c.prototype.decodePoint=function(e){var t=(e=s.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),i=s.intFromLE(r);return this.curve.pointFromY(i,n)},c.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(e){return s.intFromLE(e)},c.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(e,t,r){var n=e("../utils"),i=n.assert,s=n.parseBytes,a=n.cachedProperty;function o(e,t){this.eddsa=e,this._secret=s(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=s(t.pub)}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t})},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t})},o.prototype.secret=function(){return this._secret},a(o,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),a(o,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),a(o,"privBytes",function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),a(o,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),a(o,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),a(o,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),o.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},o.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},o.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},t.exports=o},{"../utils":419}],417:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),s=i.assert,a=i.cachedProperty,o=i.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=o(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),s(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),a(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),a(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),a(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=l},{"../utils":419,"bn.js":420}],418:[function(e,t,r){t.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(e,t,r){var n=r,i=e("bn.js"),s=e("minimalistic-assert"),a=e("minimalistic-crypto-utils");n.assert=s,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,s=e.clone(),a=0;a<n.length;a++){var o,l=s.andln(i-1);s.isOdd()?(o=l>(i>>1)-1?(i>>1)-l:l,s.isubn(o)):o=0,n[a]=o,s.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,s=0;e.cmpn(-i)>0||t.cmpn(-s)>0;){var a,o,l=e.andln(3)+i&3,u=t.andln(3)+s&3;3===l&&(l=-1),3===u&&(u=-1),a=1&l?3!=(n=e.andln(7)+i&7)&&5!==n||2!==u?l:-l:0,r[0].push(a),o=1&u?3!=(n=t.andln(7)+s&7)&&5!==n||2!==l?u:-u:0,r[1].push(o),2*i===a+1&&(i=1-i),2*s===o+1&&(s=1-s),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(e,t,r){arguments[4][184][0].apply(r,arguments)},{buffer:188,dup:184}],421:[function(e,t,r){t.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(e,t,r){var n=Object.create||function(e){var t=function(){};return t.prototype=e,new t},i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return r},s=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var o,l=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),o=0===u.x}catch(g){o=!1}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,r,i){var s,a,o;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=e._events)?(a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]):(a=e._events=n(null),e._eventsCount=0),o){if("function"==typeof o?o=a[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),!o.warned&&(s=c(e))&&s>0&&o.length>s){o.warned=!0;var l=/* @__PURE__ */new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,"object"==typeof console&&console.warn}}else o=a[t]=r,++e._eventsCount;return e}function f(){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 e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=s.call(f,n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(!n)return[];var i=n[t];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):b(i,i.length):[]}function m(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function b(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}o?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e}}):a.defaultMaxListeners=l,a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){var t,r,n,i,s,a,o="error"===e;if(a=this._events)o=o&&null==a.error;else if(!o)return!1;if(o){if(arguments.length>1&&(t=arguments[1]),t instanceof Error)throw t;var l=/* @__PURE__ */new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(r=a[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,i=b(e,n),s=0;s<n;++s)i[s].call(r)}(r,u,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var i=e.length,s=b(e,i),a=0;a<i;++a)s[a].call(r,n)}(r,u,this,arguments[1]);break;case 3:!function(e,t,r,n,i){if(t)e.call(r,n,i);else for(var s=e.length,a=b(e,s),o=0;o<s;++o)a[o].call(r,n,i)}(r,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,i,s){if(t)e.call(r,n,i,s);else for(var a=e.length,o=b(e,a),l=0;l<a;++l)o[l].call(r,n,i,s)}(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),s=1;s<n;s++)i[s-1]=arguments[s];!function(e,t,r,n){if(t)e.apply(r,n);else for(var i=e.length,s=b(e,i),a=0;a<i;++a)s[a].apply(r,n)}(r,u,this,i)}return!0},a.prototype.addListener=function(e,t){return h(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return h(this,e,t,!0)},a.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,i,s,a,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=n(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(s=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,s=a;break}if(s<0)return this;0===s?r.shift():function(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}(r,s),1===r.length&&(i[e]=r[0]),i.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.removeAllListeners=function(e){var t,r,s;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=n(null):delete r[e]),this;if(0===arguments.length){var a,o=i(r);for(s=0;s<o.length;++s)"removeListener"!==(a=o[s])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("md5.js");t.exports=function(e,t,r,s){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,o=n.alloc(a),l=n.alloc(s||0),u=n.alloc(0);a>0||s>0;){var c=new i;c.update(u),c.update(e),t&&c.update(t),u=c.digest();var h=0;if(a>0){var f=o.length-a;h=Math.min(a,u.length),u.copy(o,f,0,h),a-=h}if(h<u.length&&s>0){var d=l.length-s,p=Math.min(s,u.length-h);u.copy(l,d,h,h+p),s-=p}}return u.fill(0),{key:o,iv:l}}},{"md5.js":450,"safe-buffer":494}],424:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.CsvParserStream=r.ParserOptions=r.parseFile=r.parseStream=r.parseString=r.parse=r.FormatterOptions=r.CsvFormatterStream=r.writeToPath=r.writeToString=r.writeToBuffer=r.writeToStream=r.write=r.format=void 0;var n=e("@fast-csv/format");Object.defineProperty(r,"format",{enumerable:!0,get:function(){return n.format}}),Object.defineProperty(r,"write",{enumerable:!0,get:function(){return n.write}}),Object.defineProperty(r,"writeToStream",{enumerable:!0,get:function(){return n.writeToStream}}),Object.defineProperty(r,"writeToBuffer",{enumerable:!0,get:function(){return n.writeToBuffer}}),Object.defineProperty(r,"writeToString",{enumerable:!0,get:function(){return n.writeToString}}),Object.defineProperty(r,"writeToPath",{enumerable:!0,get:function(){return n.writeToPath}}),Object.defineProperty(r,"CsvFormatterStream",{enumerable:!0,get:function(){return n.CsvFormatterStream}}),Object.defineProperty(r,"FormatterOptions",{enumerable:!0,get:function(){return n.FormatterOptions}});var i=e("@fast-csv/parse");Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return i.parse}}),Object.defineProperty(r,"parseString",{enumerable:!0,get:function(){return i.parseString}}),Object.defineProperty(r,"parseStream",{enumerable:!0,get:function(){return i.parseStream}}),Object.defineProperty(r,"parseFile",{enumerable:!0,get:function(){return i.parseFile}}),Object.defineProperty(r,"ParserOptions",{enumerable:!0,get:function(){return i.ParserOptions}}),Object.defineProperty(r,"CsvParserStream",{enumerable:!0,get:function(){return i.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("readable-stream").Transform;function s(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(s,i),s.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},s.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},s.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)r[s++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var a=0,o=8*e.length;o>0;++a)this._length[a]+=o,(o=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*o);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},s.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=s},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(e,t,r){var n=e("./utils"),i=e("minimalistic-assert");function s(){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}r.BlockHash=s,s.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},s.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var s=8;s<this.padLength;s++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,s=8;s<this.padLength;s++)n[i++]=0;return n}},{"./utils":437,"minimalistic-assert":453}],428:[function(e,t,r){var n=e("./utils"),i=e("minimalistic-assert");function s(e,t,r){if(!(this instanceof s))return new s(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}t.exports=s,s.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},s.prototype.update=function(e,t){return this.inner.update(e,t),this},s.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":437,"minimalistic-assert":453}],429:[function(e,t,r){var n=e("./utils"),i=e("./common"),s=n.rotl32,a=n.sum32,o=n.sum32_3,l=n.sum32_4,u=i.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function f(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(c,u),r.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],c=this.h[4],y=r,v=n,w=i,_=u,x=c,k=0;k<80;k++){var S=a(s(l(r,h(k,n,i,u),e[p[k]+t],f(k)),b[k]),c);r=c,c=u,u=s(i,10),i=n,n=S,S=a(s(l(y,h(79-k,v,w,_),e[m[k]+t],d(k)),g[k]),x),y=x,x=_,_=s(w,10),w=v,v=S}S=o(this.h[1],i,_),this.h[1]=o(this.h[2],u,x),this.h[2]=o(this.h[3],c,y),this.h[3]=o(this.h[4],r,v),this.h[4]=o(this.h[0],n,w),this.h[0]=S},c.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],m=[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],b=[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],g=[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(e,t,r){r.sha1=e("./sha/1"),r.sha224=e("./sha/224"),r.sha256=e("./sha/256"),r.sha384=e("./sha/384"),r.sha512=e("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(e,t,r){var n=e("../utils"),i=e("../common"),s=e("./common"),a=n.rotl32,o=n.sum32,l=n.sum32_5,u=s.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,c),t.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],s=this.h[1],c=this.h[2],f=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=l(a(i,5),u(p,s,c,f),d,r[n],h[p]);d=f,f=c,c=a(s,30),s=i,i=m}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],c),this.h[3]=o(this.h[3],f),this.h[4]=o(this.h[4],d)},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(e,t,r){var n=e("../utils"),i=e("./256");function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(s,i),t.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(e,t,r){var n=e("../utils"),i=e("../common"),s=e("./common"),a=e("minimalistic-assert"),o=n.sum32,l=n.sum32_4,u=n.sum32_5,c=s.ch32,h=s.maj32,f=s.s0_256,d=s.s1_256,p=s.g0_256,m=s.g1_256,b=i.BlockHash,g=[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 y(){if(!(this instanceof y))return new y;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(y,b),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=l(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],s=this.h[1],b=this.h[2],g=this.h[3],y=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var x=u(_,d(y),c(y,v,w),this.k[n],r[n]),k=o(f(i),h(i,s,b));_=w,w=v,v=y,y=o(g,x),g=b,b=s,s=i,i=o(x,k)}this.h[0]=o(this.h[0],i),this.h[1]=o(this.h[1],s),this.h[2]=o(this.h[2],b),this.h[3]=o(this.h[3],g),this.h[4]=o(this.h[4],y),this.h[5]=o(this.h[5],v),this.h[6]=o(this.h[6],w),this.h[7]=o(this.h[7],_)},y.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(e,t,r){var n=e("../utils"),i=e("./512");function s(){if(!(this instanceof s))return new s;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(s,i),t.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(e,t,r){var n=e("../utils"),i=e("../common"),s=e("minimalistic-assert"),a=n.rotr64_hi,o=n.rotr64_lo,l=n.shr64_hi,u=n.shr64_lo,c=n.sum64,h=n.sum64_hi,f=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,b=n.sum64_5_lo,g=i.BlockHash,y=[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 v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function w(e,t,r,n,i){var s=e&r^~e&i;return s<0&&(s+=4294967296),s}function _(e,t,r,n,i,s){var a=t&n^~t&s;return a<0&&(a+=4294967296),a}function x(e,t,r,n,i){var s=e&r^e&i^r&i;return s<0&&(s+=4294967296),s}function k(e,t,r,n,i,s){var a=t&n^t&s^n&s;return a<0&&(a+=4294967296),a}function S(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function C(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=o(e,t,14)^o(e,t,18)^o(t,e,9);return r<0&&(r+=4294967296),r}function E(e,t){var r=a(e,t,1)^a(e,t,8)^l(e,t,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=o(e,t,1)^o(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,19)^a(t,e,29)^l(e,t,6);return r<0&&(r+=4294967296),r}function O(e,t){var r=o(e,t,19)^o(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=R(r[n-4],r[n-3]),s=O(r[n-4],r[n-3]),a=r[n-14],o=r[n-13],l=E(r[n-30],r[n-29]),u=A(r[n-30],r[n-29]),c=r[n-32],h=r[n-31];r[n]=d(i,s,a,o,l,u,c,h),r[n+1]=p(i,s,a,o,l,u,c,h)}},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],o=this.h[3],l=this.h[4],u=this.h[5],d=this.h[6],p=this.h[7],g=this.h[8],y=this.h[9],v=this.h[10],E=this.h[11],A=this.h[12],R=this.h[13],O=this.h[14],j=this.h[15];s(this.k.length===r.length);for(var I=0;I<r.length;I+=2){var P=O,N=j,B=C(g,y),D=T(g,y),F=w(g,0,v,0,A),L=_(0,y,0,E,0,R),z=this.k[I],U=this.k[I+1],$=r[I],V=r[I+1],H=m(P,N,B,D,F,L,z,U,$,V),q=b(P,N,B,D,F,L,z,U,$,V);P=S(n,i),N=M(n,i),B=x(n,0,a,0,l),D=k(0,i,0,o,0,u);var W=h(P,N,B,D),X=f(P,N,B,D);O=A,j=R,A=v,R=E,v=g,E=y,g=h(d,p,H,q),y=f(p,p,H,q),d=l,p=u,l=a,u=o,a=n,o=i,n=h(H,q,W,X),i=f(H,q,W,X)}c(this.h,0,n,i),c(this.h,2,a,o),c(this.h,4,l,u),c(this.h,6,d,p),c(this.h,8,g,y),c(this.h,10,v,E),c(this.h,12,A,R),c(this.h,14,O,j)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(e,t,r){var n=e("../utils").rotr32;function i(e,t,r){return e&t^~e&r}function s(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}r.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?s(t,r,n):void 0},r.ch32=i,r.maj32=s,r.p32=a,r.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},r.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},r.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":437}],437:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits");function s(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function l(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):s(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},r.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=o(e[r].toString(16));return t},r.htonl=a,r.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=l(i.toString(16))}return r},r.zero2=o,r.zero8=l,r.join32=function(e,t,r,i){var s=r-t;n(s%4==0);for(var a=new Array(s/4),o=0,l=t;o<a.length;o++,l+=4)a[o]=("big"===i?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l])>>>0;return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var s=e[n];"big"===t?(r[i]=s>>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=255&s):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=255&s)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<<t|e>>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],s=n+e[t+1]>>>0;e[t]=(s<n?1:0)+r+i>>>0,e[t+1]=s},r.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,s,a,o){var l=0,u=t;return l+=(u=u+n>>>0)<t?1:0,l+=(u=u+s>>>0)<s?1:0,e+r+i+a+(l+=(u=u+o>>>0)<o?1:0)>>>0},r.sum64_4_lo=function(e,t,r,n,i,s,a,o){return t+n+s+o>>>0},r.sum64_5_hi=function(e,t,r,n,i,s,a,o,l,u){var c=0,h=t;return c+=(h=h+n>>>0)<t?1:0,c+=(h=h+s>>>0)<s?1:0,c+=(h=h+o>>>0)<o?1:0,e+r+i+a+l+(c+=(h=h+u>>>0)<u?1:0)>>>0},r.sum64_5_lo=function(e,t,r,n,i,s,a,o,l,u){return t+n+s+o+u>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(e,t,r){var n=e("hash.js"),i=e("minimalistic-crypto-utils"),s=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(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 t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");s(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}t.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.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())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),s(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var s=[];s.length<e;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var a=s.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,l=(1<<o)-1,u=l>>1,c=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+e[t+h],h+=f,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+h],h+=f,c-=8);if(0===s)s=1-u;else{if(s===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=u}return(d?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,l,u=8*s-i-1,c=(1<<u)-1,h=c>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?f/l:f*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=c?(o=0,a=c):a+h>=1?(o=(t*l-1)*Math.pow(2,i),a+=h):(o=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&o,d+=p,o/=256,i-=8);for(a=a<<i|o,u+=i;u>0;e[r+d]=255&a,d+=p,a/=256,u-=8);e[r+d-p]|=128*m}},{}],440:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],441:[function(e,t,r){(function(n,i,s,a,o,l,u,c){(function(){!function(e){"object"==typeof r&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==i?i:"undefined"!=typeof self?self:this).JSZip=e()}(function(){return function t(r,n,i){function s(o,l){if(!n[o]){if(!r[o]){var u="function"==typeof e&&e;if(!l&&u)return u(o,!0);if(a)return a(o,!0);var c=/* @__PURE__ */new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[o]={exports:{}};r[o][0].call(h.exports,function(e){return s(r[o][1][e]||e)},h,h.exports,t,r,n,i)}return n[o].exports}for(var a="function"==typeof e&&e,o=0;o<i.length;o++)s(i[o]);return s}({1:[function(e,t,r){var n=e("./utils"),i=e("./support"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,i,a,o,l,u,c=[],h=0,f=e.length,d=f,p="string"!==n.getTypeOf(e);h<e.length;)d=f-h,i=p?(t=e[h++],r=h<f?e[h++]:0,h<f?e[h++]:0):(t=e.charCodeAt(h++),r=h<f?e.charCodeAt(h++):0,h<f?e.charCodeAt(h++):0),a=t>>2,o=(3&t)<<4|r>>4,l=1<d?(15&r)<<2|i>>6:64,u=2<d?63&i:64,c.push(s.charAt(a)+s.charAt(o)+s.charAt(l)+s.charAt(u));return c.join("")},r.decode=function(e){var t,r,n,a,o,l,u=0,c=0,h="data:";if(e.substr(0,5)===h)throw new Error("Invalid base64 input, it looks like a data url.");var f,d=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===s.charAt(64)&&d--,e.charAt(e.length-2)===s.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(f=i.uint8array?new Uint8Array(0|d):new Array(0|d);u<e.length;)t=s.indexOf(e.charAt(u++))<<2|(a=s.indexOf(e.charAt(u++)))>>4,r=(15&a)<<4|(o=s.indexOf(e.charAt(u++)))>>2,n=(3&o)<<6|(l=s.indexOf(e.charAt(u++))),f[c++]=t,64!==o&&(f[c++]=r),64!==l&&(f[c++]=n);return f}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r){var n=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^n[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,r){var n=i,s=0+r;e^=-1;for(var a=0;a<s;a++)e=e>>>8^n[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){t.exports={Promise:"undefined"!=typeof Promise?Promise:e("lie")}},{lie:37}],7:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},r.compressWorker=function(e){return new l("Deflate",e)},r.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,r,i,a,c){var h,f,d=e.file,p=e.compression,m=c!==o.utf8encode,b=s.transformTo("string",c(d.name)),g=s.transformTo("string",o.utf8encode(d.name)),y=d.comment,v=s.transformTo("string",c(y)),w=s.transformTo("string",o.utf8encode(y)),_=g.length!==d.name.length,x=w.length!==y.length,k="",S="",M="",C=d.dir,T=d.date,E={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(E.crc32=e.crc32,E.compressedSize=e.compressedSize,E.uncompressedSize=e.uncompressedSize);var A=0;t&&(A|=8),m||!_&&!x||(A|=2048);var R,O,j,I=0,P=0;C&&(I|=16),"UNIX"===a?(P=798,I|=(R=d.unixPermissions,O=C,j=R,R||(j=O?16893:33204),(65535&j)<<16)):(P=20,I|=function(e){return 63&(e||0)}(d.dosPermissions)),h=T.getUTCHours(),h<<=6,h|=T.getUTCMinutes(),h<<=5,h|=T.getUTCSeconds()/2,f=T.getUTCFullYear()-1980,f<<=4,f|=T.getUTCMonth()+1,f<<=5,f|=T.getUTCDate(),_&&(S=n(1,1)+n(l(b),4)+g,k+="up"+n(S.length,2)+S),x&&(M=n(1,1)+n(l(v),4)+w,k+="uc"+n(M.length,2)+M);var N="";return N+="\n\0",N+=n(A,2),N+=p.magic,N+=n(h,2),N+=n(f,2),N+=n(E.crc32,4),N+=n(E.compressedSize,4),N+=n(E.uncompressedSize,4),N+=n(b.length,2),N+=n(k.length,2),{fileRecord:u.LOCAL_FILE_HEADER+N+b+k,dirRecord:u.CENTRAL_FILE_HEADER+n(P,2)+N+n(v.length,2)+"\0\0\0\0"+n(I,4)+n(i,4)+b+k+v}}var s=e("../utils"),a=e("../stream/GenericWorker"),o=e("../utf8"),l=e("../crc32"),u=e("../signature");function c(e,t,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(c,a),c.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t,r=this.streamFiles&&!e.file.dir,s=i(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(s.dirRecord),r)this.push({data:(t=e,u.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:s.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r,i,a,o,l,c,h=this.bytesWritten-e,f=(r=this.dirRecords.length,i=h,a=e,o=this.zipComment,l=this.encodeFileName,c=s.transformTo("string",l(o)),u.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(i,4)+n(a,4)+n(c.length,2)+c);this.push({data:f,meta:{percent:100}})},c.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},c.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},c.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},c.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(n){}return!0},c.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=c},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),i=e("./ZipFileWorker");r.generateWorker=function(e,t,r){var s=new i(t.streamFiles,r,t.platform,t.encodeFileName),a=0;try{e.forEach(function(e,r){a++;var i=function(e,t){var r=e||t,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,t.compression),o=r.options.compressionOptions||t.compressionOptions||{},l=r.dir,u=r.date;r._compressWorker(i,o).withStreamInfo("file",{name:e,dir:l,date:u,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(s)}),s.entriesCount=a}catch(o){s.error(o)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;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 e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),i=e("./external"),s=e("./utf8"),a=e("./zipEntries"),o=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function u(e){return new i.Promise(function(t,r){var n=e.decompressed.getContentWorker().pipe(new o);n.on("error",function(e){r(e)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?r(/* @__PURE__ */new Error("Corrupted zip : CRC32 mismatch")):t()}).resume()})}t.exports=function(e,t){var r=this;return t=n.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:s.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(/* @__PURE__ */new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then(function(e){var r=new a(t);return r.load(e),r}).then(function(e){var r=[i.Promise.resolve(e)],n=e.files;if(t.checkCRC32)for(var s=0;s<n.length;s++)r.push(u(n[s]));return i.Promise.all(r)}).then(function(e){for(var i=e.shift(),s=i.files,a=0;a<s.length;a++){var o=s[a],l=o.fileNameStr,u=n.resolve(o.fileNameStr);r.file(u,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:t.createFolders}),o.dir||(r.file(u).unsafeOriginalName=l)}return i.zipComment.length&&(r.comment=i.zipComment),r})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function i(e,t,r){n.call(this,t),this._helper=e;var i=this;e.on("data",function(e,t){i.push(e)||i._helper.pause(),r&&r(t)}).on("error",function(e){i.emit("error",e)}).on("end",function(){i.push(null)})}e("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:void 0!==s,newBufferFrom:function(e,t){if(s.from&&s.from!==Uint8Array.from)return s.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new s(e,t)},allocBuffer:function(e){if(s.alloc)return s.alloc(e);var t=new s(e);return t.fill(0),t},isBuffer:function(e){return s.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var n,i=s.getTypeOf(t),o=s.extend(r||{},l);o.date=o.date||/* @__PURE__ */new Date,null!==o.compression&&(o.compression=o.compression.toUpperCase()),"string"==typeof o.unixPermissions&&(o.unixPermissions=parseInt(o.unixPermissions,8)),o.unixPermissions&&16384&o.unixPermissions&&(o.dir=!0),o.dosPermissions&&16&o.dosPermissions&&(o.dir=!0),o.dir&&(e=m(e)),o.createFolders&&(n=p(e))&&b.call(this,n,!0);var h="string"===i&&!1===o.binary&&!1===o.base64;r&&void 0!==r.binary||(o.binary=!h),(t instanceof u&&0===t.uncompressedSize||o.dir||!t||0===t.length)&&(o.base64=!1,o.binary=!0,t="",o.compression="STORE",i="string");var g=t instanceof u||t instanceof a?t:f.isNode&&f.isStream(t)?new d(e,t):s.prepareContent(e,t,o.binary,o.optimizedBinaryString,o.base64),y=new c(e,g,o);this.files[e]=y}var i=e("./utf8"),s=e("./utils"),a=e("./stream/GenericWorker"),o=e("./stream/StreamHelper"),l=e("./defaults"),u=e("./compressedObject"),c=e("./zipObject"),h=e("./generate"),f=e("./nodejsUtils"),d=e("./nodejs/NodejsStreamInputAdapter"),p=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t=void 0!==t?t:l.createFolders,e=m(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function g(e){return"[object RegExp]"===Object.prototype.toString.call(e)}t.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach(function(r,n){e(r,n)&&t.push(n)}),t},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,n.call(this,e,t,r),this;if(g(e)){var i=e;return this.filter(function(e,t){return!t.dir&&i.test(e)})}var s=this.files[this.root+e];return s&&!s.dir?s:null},folder:function(e){if(!e)return this;if(g(e))return this.filter(function(t,r){return r.dir&&e.test(t)});var t=this.root+e,r=b.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(t,r){return r.name.slice(0,e.length)===e}),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=s.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=h.generateWorker(this,r,n)}catch(l){(t=new a("error")).error(l)}return new o(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}}},{"./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(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new l(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"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}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),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 e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},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 e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),i=e("./ConvertWorker"),a=e("./GenericWorker"),o=e("../base64"),l=e("../support"),u=e("../external"),c=null;if(l.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(f){}function h(e,t,r){var s=t;switch(t){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=t,this._mimeType=r,n.checkSupport(s),this._worker=e.pipe(new i(s)),e.lock()}catch(o){this._worker=new a("error"),this._worker.error(o)}}h.prototype={accumulate:function(e){return t=this,r=e,new u.Promise(function(e,i){var a=[],l=t._internalType,u=t._outputType,c=t._mimeType;t.on("data",function(e,t){a.push(e),r&&r(t)}).on("error",function(e){a=[],i(e)}).on("end",function(){try{e(function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(u,function(e,t){var r,n=0,i=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(a),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return s.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(l,a),c))}catch(t){i(t)}a=[]}).resume()});var t,r},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){n.delay(t,arguments,r)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer=void 0!==s,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=/* @__PURE__ */new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(a){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(o){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(a){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),i=e("./support"),s=e("./nodejsUtils"),a=e("./stream/GenericWorker"),o=new Array(256),l=0;l<256;l++)o[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function u(){a.call(this,"utf-8 decode"),this.leftOver=null}function c(){a.call(this,"utf-8 encode")}o[254]=o[254]=1,r.utf8encode=function(e){return i.nodebuffer?s.newBufferFrom(e,"utf-8"):function(e){var t,r,n,s,a,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=i.uint8array?new Uint8Array(l):new Array(l),s=a=0;a<l;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t}(e)},r.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,s,a=e.length,l=new Array(2*a);for(t=r=0;t<a;)if((i=e[t++])<128)l[r++]=i;else if(4<(s=o[i]))l[r++]=65533,t+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&t<a;)i=i<<6|63&e[t++],s--;1<s?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),n.applyFromCharCode(l)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(u,a),u.prototype.processChunk=function(e){var t=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=t;(t=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),t.set(s,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}(t),l=t;a!==t.length&&(i.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:r.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=u,n.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:r.utf8encode(e.data),meta:e.meta})},r.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),i=e("./base64"),s=e("./nodejsUtils"),a=e("./external");function o(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),r.newBlob=function(e,t){r.checkSupport("blob");try{return new Blob([e],{type:t})}catch(i){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(e),n.getBlob(t)}catch(s){throw new Error("Bug : can't construct the Blob.")}}};var u={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(e){return!1}}()}};function h(e){var t=65536,n=r.getTypeOf(e),i=!0;if("uint8array"===n?i=u.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=u.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return u.stringifyByChunk(e,n,t)}catch(s){t=Math.floor(t/2)}return u.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}r.applyFromCharCode=h;var d={};d.string={string:o,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,s.allocBuffer(e.length))}},d.array={string:h,array:o,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(e)}},d.arraybuffer={string:function(e){return h(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:o,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return s.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:h,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:o,nodebuffer:function(e){return s.newBufferFrom(e)}},d.nodebuffer={string:h,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:o},r.transformTo=function(e,t){return t=t||"",e?(r.checkSupport(e),d[r.getTypeOf(t)][e](t)):t},r.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},r.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":n.nodebuffer&&s.isBuffer(e)?"nodebuffer":n.uint8array&&e instanceof Uint8Array?"uint8array":n.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(e){if(!n[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},r.delay=function(e,t,r){c(function(){e.apply(r||null,t||[])})},r.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},r.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},r.prepareContent=function(e,t,s,o,u){return a.Promise.resolve(t).then(function(e){return n.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new a.Promise(function(t,r){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.onerror=function(e){r(e.target.error)},n.readAsArrayBuffer(e)}):e}).then(function(t){var c,h=r.getTypeOf(t);return h?("arraybuffer"===h?t=r.transformTo("uint8array",t):"string"===h&&(u?t=i.decode(t):s&&!0!==o&&(t=l(c=t,n.uint8array?new Uint8Array(c.length):new Array(c.length)))),t):a.Promise.reject(/* @__PURE__ */new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),a=e("./zipEntry"),o=e("./support");function l(e){this.files=[],this.loadOptions=e}l.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},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 e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},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 e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},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 e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,s.LOCAL_FILE_HEADER)?/* @__PURE__ */new Error("Corrupted zip: can't find end of central directory"):/* @__PURE__ */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(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.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(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=l},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),s=e("./compressedObject"),a=e("./crc32"),o=e("./utf8"),l=e("./compressions"),u=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return!(1&~this.bitFlag)},useUTF8:function(){return!(2048&~this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in l)if(Object.prototype.hasOwnProperty.call(l,t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new s(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=i.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var s=i.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(s)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)||a(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=e("./stream/StreamHelper"),s=e("./stream/DataWorker"),a=e("./utf8"),o=e("./compressedObject"),l=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var s=!this._dataBinary;s&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!s&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(o){(t=new l("error")).error(o)}return new i(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof l?this._data:new s(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<u.length;h++)n.prototype[u[h]]=c;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(e){var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var s=0,a=new i(c),o=e.document.createTextNode("");a.observe(o,{characterData:!0}),r=function(){o.data=s=++s%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var l=new e.MessageChannel;l.port1.onmessage=c,r=function(){l.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function i(){}var s={},a=["REJECTED"],o=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&d(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(e,t,r){n(function(){var n;try{n=t(r)}catch(i){return s.reject(e,i)}n===e?s.reject(e,/* @__PURE__ */new TypeError("Cannot resolve promise with itself")):s.resolve(e,n)})}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(e,t){var r=!1;function n(t){r||(r=!0,s.reject(e,t))}function i(t){r||(r=!0,s.resolve(e,t))}var a=p(function(){t(i,n)});"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(n){r.status="error",r.value=n}return r}(t.exports=u).prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===o||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(i);return this.state!==l?h(r,this.state===o?e:t,this.outcome):this.queue.push(new c(r,e,t)),r},c.prototype.callFulfilled=function(e){s.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){s.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},s.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return s.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=o,e.outcome=t;for(var i=-1,a=e.queue.length;++i<a;)e.queue[i].callFulfilled(t)}return e},s.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},u.resolve=function(e){return e instanceof this?e:s.resolve(new this(i),e)},u.reject=function(e){var t=new this(i);return s.reject(t,e)},u.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(/* @__PURE__ */new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=new Array(r),o=0,l=-1,u=new this(i);++l<r;)c(e[l],l);return u;function c(e,i){t.resolve(e).then(function(e){a[i]=e,++o!==r||n||(n=!0,s.resolve(u,a))},function(e){n||(n=!0,s.reject(u,e))})}},u.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(/* @__PURE__ */new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var n,a=-1,o=new this(i);++a<t;)n=e[a],this.resolve(n).then(function(e){r||(r=!0,s.resolve(o,e))},function(e){r||(r=!0,s.reject(o,e))});return o}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),i=e("./utils/common"),s=e("./utils/strings"),a=e("./zlib/messages"),o=e("./zlib/zstream"),l=Object.prototype.toString;function u(e){if(!(this instanceof u))return new u(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(a[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"==typeof t.dictionary?s.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,c)))throw new Error(a[r]);this._dict_set=!0}}function c(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}u.prototype.push=function(e,t){var r,a,o=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?o.input=s.string2buf(e):"[object ArrayBuffer]"===l.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new i.Buf8(u),o.next_out=0,o.avail_out=u),1!==(r=n.deflate(o,a))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==o.avail_out&&(0!==o.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(s.buf2binstring(i.shrinkBuf(o.output,o.next_out))):this.onData(i.shrinkBuf(o.output,o.next_out)))}while((0<o.avail_in||0===o.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),!(o.avail_out=0))},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=u,r.deflate=c,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),i=e("./utils/common"),s=e("./utils/strings"),a=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),u=e("./zlib/gzheader"),c=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==a.Z_OK)throw new Error(o[r]);this.header=new u,n.inflateGetHeader(this.strm,this.header)}function f(e,t){var r=new h(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}h.prototype.push=function(e,t){var r,o,l,u,h,f,d=this.strm,p=this.options.chunkSize,m=this.options.dictionary,b=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?d.input=s.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(p),d.next_out=0,d.avail_out=p),(r=n.inflate(d,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?s.string2buf(m):"[object ArrayBuffer]"===c.call(m)?new Uint8Array(m):m,r=n.inflateSetDictionary(this.strm,f)),r===a.Z_BUF_ERROR&&!0===b&&(r=a.Z_OK,b=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==a.Z_STREAM_END&&(0!==d.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=s.utf8border(d.output,d.next_out),u=d.next_out-l,h=s.buf2string(d.output,l),d.next_out=u,d.avail_out=p-u,u&&i.arraySet(d.output,d.output,l,u,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(b=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=h,r.inflate=f,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(u){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){s=!1}for(var a=new n.Buf8(256),o=0;o<256;o++)a[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",a=0;a<t;a++)r+=String.fromCharCode(e[a]);return r}a[254]=a[254]=1,r.string2buf=function(e){var t,r,i,s,a,o=e.length,l=0;for(s=0;s<o;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(l),s=a=0;a<l;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(i=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(i-56320),s++),r<128?t[a++]=r:(r<2048?t[a++]=192|r>>>6:(r<65536?t[a++]=224|r>>>12:(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63),t[a++]=128|r>>>6&63),t[a++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,o=t||e.length,u=new Array(2*o);for(r=n=0;r<o;)if((i=e[r++])<128)u[n++]=i;else if(4<(s=a[i]))u[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&r<o;)i=i<<6|63&e[r++],s--;1<s?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return l(u,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0||0===r?t:r+a[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e,s=e>>>16&65535,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--a;);i%=65521,s%=65521}return i|s<<16}},{}],44:[function(e,t,r){t.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(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var s=n,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^s[255&(e^t[o])];return-1^e}},{}],46:[function(e,t,r){var n,i=e("../utils/common"),s=e("./trees"),a=e("./adler32"),o=e("./crc32"),l=e("./messages"),u=-2,c=258,h=262,f=113;function d(e,t){return e.msg=l[t],t}function p(e){return(e<<1)-(4<e?9:0)}function m(e){for(var t=e.length;0<=--t;)e[t]=0}function b(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function g(e,t){s._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,b(e.strm)}function y(e,t){e.pending_buf[e.pending++]=t}function v(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function w(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,l=e.strstart>e.w_size-h?e.strstart-(e.w_size-h):0,u=e.window,f=e.w_mask,d=e.prev,p=e.strstart+c,m=u[s+a-1],b=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===b&&u[r+a-1]===m&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<p);if(n=c-(p-s),s=p-c,a<n){if(e.match_start=t,o<=(a=n))break;m=u[s+a-1],b=u[s+a]}}}while((t=d[t&f])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function _(e){var t,r,n,s,l,u,c,f,d,p,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-h)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=r=e.hash_size;n=e.head[--t],e.head[t]=m<=n?n-m:0,--r;);for(t=r=m;n=e.prev[--t],e.prev[t]=m<=n?n-m:0,--r;);s+=m}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,f=e.strstart+e.lookahead,p=void 0,(d=s)<(p=u.avail_in)&&(p=d),r=0===p?0:(u.avail_in-=p,i.arraySet(c,u.input,u.next_in,p,f),1===u.state.wrap?u.adler=a(u.adler,c,p,f):2===u.state.wrap&&(u.adler=o(u.adler,c,p,f)),u.next_in+=p,u.total_in+=p,p),e.lookahead+=r,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<h&&0!==e.strm.avail_in)}function x(e,t){for(var r,n;;){if(e.lookahead<h){if(_(e),e.lookahead<h&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-h&&(e.match_length=w(e,r)),e.match_length>=3)if(n=s._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}function k(e,t){for(var r,n,i;;){if(e.lookahead<h){if(_(e),e.lookahead<h&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-h&&(e.match_length=w(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,n=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(g(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=s._tr_tally(e,0,e.window[e.strstart-1]))&&g(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=s._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}function S(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function M(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),m(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 C(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:f,e.adler=2===t.wrap?0:1,t.last_flush=0,s._tr_init(t),0):d(e,u)}function T(e){var t,r=C(e);return 0===r&&((t=e.state).window_size=2*t.w_size,m(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function E(e,t,r,n,s,a){if(!e)return u;var o=1;if(-1===t&&(t=6),n<0?(o=0,n=-n):15<n&&(o=2,n-=16),s<1||9<s||8!==r||n<8||15<n||t<0||9<t||a<0||4<a)return d(e,u);8===n&&(n=9);var l=new M;return(e.state=l).strm=e,l.wrap=o,l.gzhead=null,l.w_bits=n,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=s+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<s+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,T(e)}n=[new S(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,g(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-h&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(g(e,!1),e.strm.avail_out),1)}),new S(4,4,8,4,x),new S(4,5,16,8,x),new S(4,6,32,32,x),new S(4,4,16,16,k),new S(8,16,32,32,k),new S(8,16,128,128,k),new S(8,32,128,256,k),new S(32,128,258,1024,k),new S(32,258,258,4096,k)],r.deflateInit=function(e,t){return E(e,t,8,15,8,0)},r.deflateInit2=E,r.deflateReset=T,r.deflateResetKeep=C,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},r.deflate=function(e,t){var r,i,a,l;if(!e||!e.state||5<t||t<0)return e?d(e,u):u;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return d(e,0===e.avail_out?-5:u);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=o(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,v(i,h),0!==i.strstart&&(v(i,e.adler>>>16),v(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),b(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=o(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&b(e),i.pending+2<=i.pending_buf_size&&(y(i,255&e.adler),y(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(b(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&p(t)<=p(r)&&4!==t)return d(e,-5);if(666===i.status&&0!==e.avail_in)return d(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var w=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(_(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,o=e.window;;){if(e.lookahead<=c){if(_(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0<e.strstart&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){a=e.strstart+c;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a);e.match_length=c-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=s._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===t?s._tr_align(i):5!==t&&(s._tr_stored_block(i,0,0,!1),3===t&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),b(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&e.adler),y(i,e.adler>>8&255),y(i,e.adler>>16&255),y(i,e.adler>>24&255),y(i,255&e.total_in),y(i,e.total_in>>8&255),y(i,e.total_in>>16&255),y(i,e.total_in>>24&255)):(v(i,e.adler>>>16),v(i,65535&e.adler)),b(e),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&t!==f&&666!==t?d(e,u):(e.state=null,t===f?d(e,-3):0):u},r.deflateSetDictionary=function(e,t){var r,n,s,o,l,c,h,f,d=t.length;if(!e||!e.state)return u;if(2===(o=(r=e.state).wrap)||1===o&&42!==r.status||r.lookahead)return u;for(1===o&&(e.adler=a(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===o&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,t,d-r.w_size,r.w_size,0),t=f,d=r.w_size),l=e.avail_in,c=e.next_in,h=e.input,e.avail_in=d,e.next_in=0,e.input=t,_(r);r.lookahead>=3;){for(n=r.strstart,s=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--s;);r.strstart=n,r.lookahead=2,_(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=c,e.input=h,e.avail_in=l,r.wrap=o,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.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(e,t,r){t.exports=function(e,t){var r,n,i,s,a,o,l,u,c,h,f,d,p,m,b,g,y,v,w,_,x,k,S=e.state,M=e.next_in,C=e.input;r=M+(e.avail_in-5),n=e.next_out,k=e.output,i=n-(t-e.avail_out),s=n+(e.avail_out-257),a=S.dmax,o=S.wsize,l=S.whave,u=S.wnext,c=S.window,h=S.hold,f=S.bits,d=S.lencode,p=S.distcode,m=(1<<S.lenbits)-1,b=(1<<S.distbits)-1;e:do{f<15&&(h+=C[M++]<<f,f+=8,h+=C[M++]<<f,f+=8),g=d[h&m];t:for(;;){if(h>>>=y=g>>>24,f-=y,0==(y=g>>>16&255))k[n++]=65535&g;else{if(!(16&y)){if(!(64&y)){g=d[(65535&g)+(h&(1<<y)-1)];continue t}if(32&y){S.mode=12;break e}e.msg="invalid literal/length code",S.mode=30;break e}v=65535&g,(y&=15)&&(f<y&&(h+=C[M++]<<f,f+=8),v+=h&(1<<y)-1,h>>>=y,f-=y),f<15&&(h+=C[M++]<<f,f+=8,h+=C[M++]<<f,f+=8),g=p[h&b];r:for(;;){if(h>>>=y=g>>>24,f-=y,!(16&(y=g>>>16&255))){if(!(64&y)){g=p[(65535&g)+(h&(1<<y)-1)];continue r}e.msg="invalid distance code",S.mode=30;break e}if(w=65535&g,f<(y&=15)&&(h+=C[M++]<<f,(f+=8)<y&&(h+=C[M++]<<f,f+=8)),a<(w+=h&(1<<y)-1)){e.msg="invalid distance too far back",S.mode=30;break e}if(h>>>=y,f-=y,(y=n-i)<w){if(l<(y=w-y)&&S.sane){e.msg="invalid distance too far back",S.mode=30;break e}if(x=c,(_=0)===u){if(_+=o-y,y<v){for(v-=y;k[n++]=c[_++],--y;);_=n-w,x=k}}else if(u<y){if(_+=o+u-y,(y-=u)<v){for(v-=y;k[n++]=c[_++],--y;);if(_=0,u<v){for(v-=y=u;k[n++]=c[_++],--y;);_=n-w,x=k}}}else if(_+=u-y,y<v){for(v-=y;k[n++]=c[_++],--y;);_=n-w,x=k}for(;2<v;)k[n++]=x[_++],k[n++]=x[_++],k[n++]=x[_++],v-=3;v&&(k[n++]=x[_++],1<v&&(k[n++]=x[_++]))}else{for(_=n-w;k[n++]=k[_++],k[n++]=k[_++],k[n++]=k[_++],2<(v-=3););v&&(k[n++]=k[_++],1<v&&(k[n++]=k[_++]))}break}}break}}while(M<r&&n<s);M-=v=f>>3,h&=(1<<(f-=v<<3))-1,e.next_in=M,e.next_out=n,e.avail_in=M<r?r-M+5:5-(M-r),e.avail_out=n<s?s-n+257:257-(n-s),S.hold=h,S.bits=f}},{}],49:[function(e,t,r){var n=e("../utils/common"),i=e("./adler32"),s=e("./crc32"),a=e("./inffast"),o=e("./inftrees"),l=-2;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):l}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):l}function d(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?l:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,f(e))):l}function p(e,t){var r,n;return e?(n=new c,(e.state=n).window=null,0!==(r=d(e,t))&&(e.state=null),r):l}var m,b,g=!0;function y(e){if(g){var t;for(m=new n.Buf32(512),b=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(1,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(2,e.lens,0,32,b,0,e.work,{bits:5}),g=!1}e.lencode=m,e.lenbits=9,e.distcode=b,e.distbits=5}function v(e,t,r,i){var s,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(s=a.wsize-a.wnext)&&(s=i),n.arraySet(a.window,t,r-i,s,a.wnext),(i-=s)?(n.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0}r.inflateReset=f,r.inflateReset2=d,r.inflateResetKeep=h,r.inflateInit=function(e){return p(e,15)},r.inflateInit2=p,r.inflate=function(e,t){var r,c,h,f,d,p,m,b,g,w,_,x,k,S,M,C,T,E,A,R,O,j,I,P,N=0,B=new n.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return l;12===(r=e.state).mode&&(r.mode=13),d=e.next_out,h=e.output,m=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,b=r.hold,g=r.bits,w=p,_=m,j=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;g<16;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(2&r.wrap&&35615===b){B[r.check=0]=255&b,B[1]=b>>>8&255,r.check=s(r.check,B,2,0),g=b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&b)){e.msg="unknown compression method",r.mode=30;break}if(g-=4,O=8+(15&(b>>>=4)),0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<O,e.adler=r.check=1,r.mode=512&b?10:12,g=b=0;break;case 2:for(;g<16;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(r.flags=b,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=b>>8&1),512&r.flags&&(B[0]=255&b,B[1]=b>>>8&255,r.check=s(r.check,B,2,0)),g=b=0,r.mode=3;case 3:for(;g<32;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.head&&(r.head.time=b),512&r.flags&&(B[0]=255&b,B[1]=b>>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,r.check=s(r.check,B,4,0)),g=b=0,r.mode=4;case 4:for(;g<16;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.head&&(r.head.xflags=255&b,r.head.os=b>>8),512&r.flags&&(B[0]=255&b,B[1]=b>>>8&255,r.check=s(r.check,B,2,0)),g=b=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.length=b,r.head&&(r.head.extra_len=b),512&r.flags&&(B[0]=255&b,B[1]=b>>>8&255,r.check=s(r.check,B,2,0)),g=b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(x=r.length)&&(x=p),x&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,f,x,O)),512&r.flags&&(r.check=s(r.check,c,x,f)),p-=x,f+=x,r.length-=x),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break e;for(x=0;O=c[f+x++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O)),O&&x<p;);if(512&r.flags&&(r.check=s(r.check,c,x,f)),p-=x,f+=x,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break e;for(x=0;O=c[f+x++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O)),O&&x<p;);if(512&r.flags&&(r.check=s(r.check,c,x,f)),p-=x,f+=x,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;g<16;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(b!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}g=b=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}e.adler=r.check=u(b),g=b=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=d,e.avail_out=m,e.next_in=f,e.avail_in=p,r.hold=b,r.bits=g,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){b>>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}switch(r.last=1&b,g-=1,3&(b>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6!==t)break;b>>>=2,g-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}b>>>=2,g-=2;break;case 14:for(b>>>=7&g,g-=7&g;g<32;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&b,g=b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(x=r.length){if(p<x&&(x=p),m<x&&(x=m),0===x)break e;n.arraySet(h,c,f,x,d),p-=x,f+=x,m-=x,d+=x,r.length-=x;break}r.mode=12;break;case 17:for(;g<14;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(r.nlen=257+(31&b),b>>>=5,g-=5,r.ndist=1+(31&b),b>>>=5,g-=5,r.ncode=4+(15&b),b>>>=4,g-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;g<3;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.lens[D[r.have++]]=7&b,b>>>=3,g-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},j=o(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,j){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;C=(N=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,T=65535&N,!((M=N>>>24)<=g);){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(T<16)b>>>=M,g-=M,r.lens[r.have++]=T;else{if(16===T){for(P=M+2;g<P;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(b>>>=M,g-=M,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],x=3+(3&b),b>>>=2,g-=2}else if(17===T){for(P=M+3;g<P;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}g-=M,O=0,x=3+(7&(b>>>=M)),b>>>=3,g-=3}else{for(P=M+7;g<P;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}g-=M,O=0,x=11+(127&(b>>>=M)),b>>>=7,g-=7}if(r.have+x>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,I={bits:r.lenbits},j=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,j){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},j=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,j){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=p&&258<=m){e.next_out=d,e.avail_out=m,e.next_in=f,e.avail_in=p,r.hold=b,r.bits=g,a(e,_),d=e.next_out,h=e.output,m=e.avail_out,f=e.next_in,c=e.input,p=e.avail_in,b=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;C=(N=r.lencode[b&(1<<r.lenbits)-1])>>>16&255,T=65535&N,!((M=N>>>24)<=g);){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(C&&!(240&C)){for(E=M,A=C,R=T;C=(N=r.lencode[R+((b&(1<<E+A)-1)>>E)])>>>16&255,T=65535&N,!(E+(M=N>>>24)<=g);){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}b>>>=E,g-=E,r.back+=E}if(b>>>=M,g-=M,r.back+=M,r.length=T,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=12;break}if(64&C){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(P=r.extra;g<P;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.length+=b&(1<<r.extra)-1,b>>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(N=r.distcode[b&(1<<r.distbits)-1])>>>16&255,T=65535&N,!((M=N>>>24)<=g);){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(!(240&C)){for(E=M,A=C,R=T;C=(N=r.distcode[R+((b&(1<<E+A)-1)>>E)])>>>16&255,T=65535&N,!(E+(M=N>>>24)<=g);){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}b>>>=E,g-=E,r.back+=E}if(b>>>=M,g-=M,r.back+=M,64&C){e.msg="invalid distance code",r.mode=30;break}r.offset=T,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(P=r.extra;g<P;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}r.offset+=b&(1<<r.extra)-1,b>>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break e;if(x=_-m,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}k=x>r.wnext?(x-=r.wnext,r.wsize-x):r.wnext-x,x>r.length&&(x=r.length),S=r.window}else S=h,k=d-r.offset,x=r.length;for(m<x&&(x=m),m-=x,r.length-=x;h[d++]=S[k++],--x;);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;h[d++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===p)break e;p--,b|=c[f++]<<g,g+=8}if(_-=m,e.total_out+=_,r.total+=_,_&&(e.adler=r.check=r.flags?s(r.check,h,_,d-_):i(r.check,h,_,d-_)),_=m,(r.flags?b:u(b))!==r.check){e.msg="incorrect data check",r.mode=30;break}g=b=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;g<32;){if(0===p)break e;p--,b+=c[f++]<<g,g+=8}if(b!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}g=b=0}r.mode=29;case 29:j=1;break e;case 30:j=-3;break e;case 31:return-4;default:return l}return e.next_out=d,e.avail_out=m,e.next_in=f,e.avail_in=p,r.hold=b,r.bits=g,(r.wsize||_!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&v(e,e.output,e.next_out,_-e.avail_out)?(r.mode=31,-4):(w-=e.avail_in,_-=e.avail_out,e.total_in+=w,e.total_out+=_,r.total+=_,r.wrap&&_&&(e.adler=r.check=r.flags?s(r.check,h,_,e.next_out-_):i(r.check,h,_,e.next_out-_)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===_||4===t)&&0===j&&(j=-5),j)},r.inflateEnd=function(e){if(!e||!e.state)return l;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?((r.head=t).done=!1,0):l},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?l:11===r.mode&&i(1,t,n,0)!==r.check?-3:v(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):l},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),i=[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],s=[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],a=[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],o=[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];t.exports=function(e,t,r,l,u,c,h,f){var d,p,m,b,g,y,v,w,_,x=f.bits,k=0,S=0,M=0,C=0,T=0,E=0,A=0,R=0,O=0,j=0,I=null,P=0,N=new n.Buf16(16),B=new n.Buf16(16),D=null,F=0;for(k=0;k<=15;k++)N[k]=0;for(S=0;S<l;S++)N[t[r+S]]++;for(T=x,C=15;1<=C&&0===N[C];C--);if(C<T&&(T=C),0===C)return u[c++]=20971520,u[c++]=20971520,f.bits=1,0;for(M=1;M<C&&0===N[M];M++);for(T<M&&(T=M),k=R=1;k<=15;k++)if(R<<=1,(R-=N[k])<0)return-1;if(0<R&&(0===e||1!==C))return-1;for(B[1]=0,k=1;k<15;k++)B[k+1]=B[k]+N[k];for(S=0;S<l;S++)0!==t[r+S]&&(h[B[t[r+S]]++]=S);if(y=0===e?(I=D=h,19):1===e?(I=i,P-=257,D=s,F-=257,256):(I=a,D=o,-1),k=M,g=c,A=S=j=0,m=-1,b=(O=1<<(E=T))-1,1===e&&852<O||2===e&&592<O)return 1;for(;;){for(v=k-A,_=h[S]<y?(w=0,h[S]):h[S]>y?(w=D[F+h[S]],I[P+h[S]]):(w=96,0),d=1<<k-A,M=p=1<<E;u[g+(j>>A)+(p-=d)]=v<<24|w<<16|_,0!==p;);for(d=1<<k-1;j&d;)d>>=1;if(0!==d?(j&=d-1,j+=d):j=0,S++,0==--N[k]){if(k===C)break;k=t[r+h[S]]}if(T<k&&(j&b)!==m){for(0===A&&(A=T),g+=M,R=1<<(E=k-A);E+A<C&&!((R-=N[E+A])<=0);)E++,R<<=1;if(O+=1<<E,1===e&&852<O||2===e&&592<O)return 1;u[m=j&b]=T<<24|E<<16|g-c}}return 0!==j&&(u[g+j]=k-A<<24|4194304),f.bits=T,0}},{"../utils/common":41}],51:[function(e,t,r){t.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(e,t,r){var n=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var s=[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],a=[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],o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var c=new Array(60);i(c);var h=new Array(512);i(h);var f=new Array(256);i(f);var d=new Array(29);i(d);var p,m,b,g=new Array(30);function y(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?h[e]:h[256+(e>>>7)]}function _(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,_(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function k(e,t,r){x(e,r[2*t],r[2*t+1])}function S(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function M(e,t,r){var n,i,s=new Array(16),a=0;for(n=1;n<=15;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=S(s[o]++,o))}}function C(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function T(e){8<e.bi_valid?_(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function A(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&E(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!E(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function R(e,t,r){var n,i,o,l,u=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===n?k(e,i,t):(k(e,(o=f[i])+256+1,t),0!==(l=s[o])&&x(e,i-=d[o],l),k(e,o=w(--n),r),0!==(l=a[o])&&x(e,n-=g[o],l)),u<e.last_lit;);k(e,256,t)}function O(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<l;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)A(e,s,r);for(i=l;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],A(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,A(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)p<(s=l[2*l[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),l[2*n+1]=s,u<n||(e.bl_count[s]++,a=0,d<=n&&(a=f[n-d]),o=l[2*n],e.opt_len+=o*(s+a),h&&(e.static_len+=o*(c[2*n+1]+a)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2}while(0<m);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)u<(i=e.heap[--r])||(l[2*i+1]!==s&&(e.opt_len+=(s-l[2*i+1])*l[2*i],l[2*i+1]=s),n--)}}(e,t),M(s,u,e.bl_count)}function j(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<l&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=i,u=(o=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4))}function I(e,t,r){var n,i,s=-1,a=t[1],o=0,l=7,u=4;for(0===a&&(l=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<l&&i===a)){if(o<u)for(;k(e,i,e.bl_tree),0!=--o;);else 0!==i?(i!==s&&(k(e,i,e.bl_tree),o--),k(e,16,e.bl_tree),x(e,o-3,2)):o<=10?(k(e,17,e.bl_tree),x(e,o-3,3)):(k(e,18,e.bl_tree),x(e,o-11,7));s=i,u=(o=0)===a?(l=138,3):i===a?(l=6,3):(l=7,4)}}i(g);var P=!1;function N(e,t,r,i){var s,a,o;x(e,0+(i?1:0),3),a=t,o=r,T(s=e),_(s,o),_(s,~o),n.arraySet(s.pending_buf,s.window,a,o,s.pending),s.pending+=o}r._tr_init=function(e){P||(function(){var e,t,r,n,i,l=new Array(16);for(n=r=0;n<28;n++)for(d[n]=r,e=0;e<1<<s[n];e++)f[r++]=n;for(f[r-1]=n,n=i=0;n<16;n++)for(g[n]=i,e=0;e<1<<a[n];e++)h[i++]=n;for(i>>=7;n<30;n++)for(g[n]=i<<7,e=0;e<1<<a[n]-7;e++)h[256+i++]=n;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,l[8]++;for(;e<=255;)u[2*e+1]=9,e++,l[9]++;for(;e<=279;)u[2*e+1]=7,e++,l[7]++;for(;e<=287;)u[2*e+1]=8,e++,l[8]++;for(M(u,287,l),e=0;e<30;e++)c[2*e+1]=5,c[2*e]=S(e,5);p=new y(u,s,257,286,15),m=new y(c,a,0,30,15),b=new y(new Array(0),o,0,19,7)}(),P=!0),e.l_desc=new v(e.dyn_ltree,p),e.d_desc=new v(e.dyn_dtree,m),e.bl_desc=new v(e.bl_tree,b),e.bi_buf=0,e.bi_valid=0,C(e)},r._tr_stored_block=N,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),O(e,e.l_desc),O(e,e.d_desc),a=function(e){var t;for(j(e,e.dyn_ltree,e.l_desc.max_code),j(e,e.dyn_dtree,e.d_desc.max_code),O(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?N(e,t,r,n):4===e.strategy||s===i?(x(e,2+(n?1:0),3),R(e,u,c)):(x(e,4+(n?1:0),3),function(e,t,r,n){var i;for(x(e,t-257,5),x(e,r-1,5),x(e,n-4,4),i=0;i<n;i++)x(e,e.bl_tree[2*l[i]+1],3);I(e,e.dyn_ltree,t-1),I(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),C(e),n&&T(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(f[r]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){var t;x(e,2,3),k(e,256,u),16===(t=e).bi_valid?(_(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},{"../utils/common":41}],53:[function(e,t,r){t.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(e,t,r){(function(e){!function(e){if(!e.setImmediate){var t,r,i,s,a=1,o={},l=!1,u=e.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(e);c=c&&c.setTimeout?c:e,t="[object process]"==={}.toString.call(e.process)?function(e){n.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?(s="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",d,!1):e.attachEvent("onmessage",d),function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},c.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var r=new Array(arguments.length-1),n=0;n<r.length;n++)r[n]=arguments[n+1];return o[a]={callback:e,args:r},t(a),a++},c.clearImmediate=h}function h(e){delete o[e]}function f(e){if(l)setTimeout(f,0,e);else{var t=o[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{h(e),l=!1}}}}function d(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(s)&&f(+t.data.slice(s.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(e,t,r){(function(e){(function(){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source),i="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,a=i||s||Function("return this")(),o=Object.prototype.toString,l=a.Symbol,u=l?l.prototype:void 0,c=u?u.toString:void 0;t.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if("symbol"==typeof(t=e)||(r=t)&&"object"==typeof r&&"[object Symbol]"==o.call(t))return c?c.call(e):"";var t,r,n=e+"";return"0"==n&&1/e==-1/0?"-0":n}(t))&&n.test(e)?e.replace(r,"\\$&"):e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],443:[function(e,t,r){(function(e){(function(){var n="[object Arguments]",i="[object Map]",s="[object Object]",a="[object Set]",o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,d=/^(?: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[n]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[i]=p["[object Number]"]=p[s]=p["[object RegExp]"]=p[a]=p["[object String]"]=p["[object WeakMap]"]=!1;var m="object"==typeof e&&e&&e.Object===Object&&e,b="object"==typeof self&&self&&self.Object===Object&&self,g=m||b||Function("return this")(),y="object"==typeof r&&r&&!r.nodeType&&r,v=y&&"object"==typeof t&&t&&!t.nodeType&&t,w=v&&v.exports===y&&m.process,_=function(){try{return w&&w.binding("util")}catch($e){}}(),x=_&&_.isTypedArray;function k(e,t,r,n){for(var i=-1,s=e?e.length:0;++i<s;){var a=e[i];t(n,a,r(a),e)}return n}function S(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function M(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}function C(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function T(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var E,A,R,O=Array.prototype,j=Function.prototype,I=Object.prototype,P=g["__core-js_shared__"],N=(E=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",B=j.toString,D=I.hasOwnProperty,F=I.toString,L=RegExp("^"+B.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=g.Symbol,U=g.Uint8Array,$=I.propertyIsEnumerable,V=O.splice,H=(A=Object.keys,R=Object,function(e){return A(R(e))}),q=_e(g,"DataView"),W=_e(g,"Map"),X=_e(g,"Promise"),K=_e(g,"Set"),Y=_e(g,"WeakMap"),Z=_e(Object,"create"),G=Ae(q),J=Ae(W),Q=Ae(X),ee=Ae(K),te=Ae(Y),re=z?z.prototype:void 0,ne=re?re.valueOf:void 0,ie=re?re.toString:void 0;function se(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ae(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function le(e){var t=-1,r=e?e.length:0;for(this.__data__=new oe;++t<r;)this.add(e[t])}function ue(e){this.__data__=new ae(e)}function ce(e,t){for(var r=e.length;r--;)if(Ie(e[r][0],t))return r;return-1}function he(e,t,r,n){return de(e,function(e,i,s){t(n,e,r(e),s)}),n}se.prototype.clear=function(){this.__data__=Z?Z(null):{}},se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},se.prototype.get=function(e){var t=this.__data__;if(Z){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return D.call(t,e)?t[e]:void 0},se.prototype.has=function(e){var t=this.__data__;return Z?void 0!==t[e]:D.call(t,e)},se.prototype.set=function(e,t){return this.__data__[e]=Z&&void 0===t?"__lodash_hash_undefined__":t,this},ae.prototype.clear=function(){this.__data__=[]},ae.prototype.delete=function(e){var t=this.__data__,r=ce(t,e);return!(r<0||(r==t.length-1?t.pop():V.call(t,r,1),0))},ae.prototype.get=function(e){var t=this.__data__,r=ce(t,e);return r<0?void 0:t[r][1]},ae.prototype.has=function(e){return ce(this.__data__,e)>-1},ae.prototype.set=function(e,t){var r=this.__data__,n=ce(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},oe.prototype.clear=function(){this.__data__={hash:new se,map:new(W||ae),string:new se}},oe.prototype.delete=function(e){return we(this,e).delete(e)},oe.prototype.get=function(e){return we(this,e).get(e)},oe.prototype.has=function(e){return we(this,e).has(e)},oe.prototype.set=function(e,t){return we(this,e).set(e,t),this},le.prototype.add=le.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},le.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.clear=function(){this.__data__=new ae},ue.prototype.delete=function(e){return this.__data__.delete(e)},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ae){var n=r.__data__;if(!W||n.length<199)return n.push([e,t]),this;r=this.__data__=new oe(n)}return r.set(e,t),this};var fe,de=(fe=function(e,t){return e&&pe(e,t,He)},function(e,t){if(null==e)return e;if(!Be(e))return fe(e,t);for(var r=e.length,n=-1,i=Object(e);++n<r&&!1!==t(i[n],n,i););return e}),pe=function(e,t,r){for(var n=-1,i=Object(e),s=r(e),a=s.length;a--;){var o=s[++n];if(!1===t(i[o],o,i))break}return e};function me(e,t){for(var r=0,n=(t=Se(t,e)?[t]:ye(t)).length;null!=e&&r<n;)e=e[Ee(t[r++])];return r&&r==n?e:void 0}function be(e,t){return null!=e&&t in Object(e)}function ge(e,t,r,o,l){return e===t||(null==e||null==t||!Le(e)&&!ze(t)?e!=e&&t!=t:function(e,t,r,o,l,u){var c=Ne(e),h=Ne(t),f="[object Array]",d="[object Array]";c||(f=(f=xe(e))==n?s:f),h||(d=(d=xe(t))==n?s:d);var p=f==s&&!M(e),m=d==s&&!M(t),b=f==d;if(b&&!p)return u||(u=new ue),c||Ve(e)?ve(e,t,r,o,l,u):function(e,t,r,n,s,o,l){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!n(new U(e),new U(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ie(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var u=C;case a:var c=2&o;if(u||(u=T),e.size!=t.size&&!c)return!1;var h=l.get(e);if(h)return h==t;o|=1,l.set(e,t);var f=ve(u(e),u(t),n,s,o,l);return l.delete(e),f;case"[object Symbol]":if(ne)return ne.call(e)==ne.call(t)}return!1}(e,t,f,r,o,l,u);if(!(2&l)){var g=p&&D.call(e,"__wrapped__"),y=m&&D.call(t,"__wrapped__");if(g||y){var v=g?e.value():e,w=y?t.value():t;return u||(u=new ue),r(v,w,o,l,u)}}return!!b&&(u||(u=new ue),function(e,t,r,n,i,s){var a=2&i,o=He(e),l=o.length;if(l!=He(t).length&&!a)return!1;for(var u=l;u--;){var c=o[u];if(!(a?c in t:D.call(t,c)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var f=!0;s.set(e,t),s.set(t,e);for(var d=a;++u<l;){var p=e[c=o[u]],m=t[c];if(n)var b=a?n(m,p,c,t,e,s):n(p,m,c,e,t,s);if(!(void 0===b?p===m||r(p,m,n,i,s):b)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(f=!1)}return s.delete(e),s.delete(t),f}(e,t,r,o,l,u))}(e,t,ge,r,o,l))}function ye(e){return Ne(e)?e:Te(e)}function ve(e,t,r,n,i,s){var a=2&i,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(e);if(u&&s.get(t))return u==t;var c=-1,h=!0,f=1&i?new le:void 0;for(s.set(e,t),s.set(t,e);++c<o;){var d=e[c],p=t[c];if(n)var m=a?n(p,d,c,t,e,s):n(d,p,c,e,t,s);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!S(t,function(e,t){if(!f.has(t)&&(d===e||r(d,e,n,i,s)))return f.add(t)})){h=!1;break}}else if(d!==p&&!r(d,p,n,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function we(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function _e(e,t){var r,n,i=(n=t,null==(r=e)?void 0:r[n]);return function(e){return!(!Le(e)||(t=e,N&&N in t))&&(De(e)||M(e)?L:f).test(Ae(e));var t}(i)?i:void 0}var xe=function(e){return F.call(e)};function ke(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||d.test(e))&&e>-1&&e%1==0&&e<t}function Se(e,t){if(Ne(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Ue(e))||l.test(e)||!o.test(e)||null!=t&&e in Object(t)}function Me(e){return e==e&&!Le(e)}function Ce(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}(q&&"[object DataView]"!=xe(new q(/* @__PURE__ */new ArrayBuffer(1)))||W&&xe(new W)!=i||X&&"[object Promise]"!=xe(X.resolve())||K&&xe(new K)!=a||Y&&"[object WeakMap]"!=xe(new Y))&&(xe=function(e){var t=F.call(e),r=t==s?e.constructor:void 0,n=r?Ae(r):void 0;if(n)switch(n){case G:return"[object DataView]";case J:return i;case Q:return"[object Promise]";case ee:return a;case te:return"[object WeakMap]"}return t});var Te=je(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Ue(e))return ie?ie.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return u.test(e)&&r.push(""),e.replace(c,function(e,t,n,i){r.push(n?i.replace(h,"$1"):t||e)}),r});function Ee(e){if("string"==typeof e||Ue(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ae(e){if(null!=e){try{return B.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Re,Oe=(Re=function(e,t,r){D.call(e,r)?e[r].push(t):e[r]=[t]},function(e,t){var r={};return(Ne(e)?k:he)(e,Re,function(e){return"function"==typeof e?e:null==e?qe:"object"==typeof e?Ne(e)?(t=e[0],r=e[1],Se(t)&&Me(r)?Ce(Ee(t),r):function(e){var n,i,s=void 0===(i=null==(n=e)?void 0:me(n,t))?void 0:i;return void 0===s&&s===r?function(e,t){return null!=e&&function(e,t,r){for(var n,i=-1,s=(t=Se(t,e)?[t]:ye(t)).length;++i<s;){var a=Ee(t[i]);if(!(n=null!=e&&r(e,a)))break;e=e[a]}return n||!!(s=e?e.length:0)&&Fe(s)&&ke(a,s)&&(Ne(e)||Pe(e))}(e,t,be)}(e,t):ge(r,s,void 0,3)}):function(e){var t=function(e){for(var t=He(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Me(i)]}return t}(e);return 1==t.length&&t[0][2]?Ce(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var i=r.length,s=i;if(null==e)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){var o=(a=r[i])[0],l=e[o],u=a[1];if(a[2]){if(void 0===l&&!(o in e))return!1}else{var c,h=new ue;if(!(void 0===c?ge(u,l,n,3,h):c))return!1}}return!0}(r,0,t)}}(e):Se(n=e)?(i=Ee(n),function(e){return null==e?void 0:e[i]}):function(e){return function(t){return me(t,e)}}(n);var t,r,n,i}(t),r)});function je(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a),a};return r.cache=new(je.Cache||oe),r}function Ie(e,t){return e===t||e!=e&&t!=t}function Pe(e){return ze(t=e)&&Be(t)&&D.call(e,"callee")&&(!$.call(e,"callee")||F.call(e)==n);var t}je.Cache=oe;var Ne=Array.isArray;function Be(e){return null!=e&&Fe(e.length)&&!De(e)}function De(e){var t=Le(e)?F.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function Fe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Le(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ze(e){return!!e&&"object"==typeof e}function Ue(e){return"symbol"==typeof e||ze(e)&&"[object Symbol]"==F.call(e)}var $e,Ve=x?($e=x,function(e){return $e(e)}):function(e){return ze(e)&&Fe(e.length)&&!!p[F.call(e)]};function He(e){return Be(e)?function(e,t){var r=Ne(e)||Pe(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var s in e)!t&&!D.call(e,s)||i&&("length"==s||ke(s,n))||r.push(s);return r}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||I))return H(e);var t,r,n=[];for(var i in Object(e))D.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e)}function qe(e){return e}t.exports=Oe}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],444:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(e){return!0===e||!1===e||!!(t=e)&&"object"==typeof t&&"[object Boolean]"==n.call(e);var t}},{}],445:[function(e,t,r){(function(e){(function(){var n="[object Arguments]",i="[object Map]",s="[object Object]",a="[object Set]",o=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[n]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[i]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u[a]=u["[object String]"]=u["[object WeakMap]"]=!1;var c="object"==typeof e&&e&&e.Object===Object&&e,h="object"==typeof self&&self&&self.Object===Object&&self,f=c||h||Function("return this")(),d="object"==typeof r&&r&&!r.nodeType&&r,p=d&&"object"==typeof t&&t&&!t.nodeType&&t,m=p&&p.exports===d,b=m&&c.process,g=function(){try{return b&&b.binding&&b.binding("util")}catch(Te){}}(),y=g&&g.isTypedArray;function v(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function w(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function _(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var x,k,S,M=Array.prototype,C=Function.prototype,T=Object.prototype,E=f["__core-js_shared__"],A=C.toString,R=T.hasOwnProperty,O=(x=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",j=T.toString,I=RegExp("^"+A.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),P=m?f.Buffer:void 0,N=f.Symbol,B=f.Uint8Array,D=T.propertyIsEnumerable,F=M.splice,L=N?N.toStringTag:void 0,z=Object.getOwnPropertySymbols,U=P?P.isBuffer:void 0,$=(k=Object.keys,S=Object,function(e){return k(S(e))}),V=pe(f,"DataView"),H=pe(f,"Map"),q=pe(f,"Promise"),W=pe(f,"Set"),X=pe(f,"WeakMap"),K=pe(Object,"create"),Y=ye(V),Z=ye(H),G=ye(q),J=ye(W),Q=ye(X),ee=N?N.prototype:void 0,te=ee?ee.valueOf:void 0;function re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function se(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ie;++t<r;)this.add(e[t])}function ae(e){this.size=(this.__data__=new ne(e)).size}function oe(e,t){for(var r=e.length;r--;)if(ve(e[r][0],t))return r;return-1}function le(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?function(e){var t=R.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch(s){}var i=j.call(e);return n&&(t?e[L]=r:delete e[L]),i}(e):(t=e,j.call(t));var t}function ue(e){return Ce(e)&&le(e)==n}function ce(e,t,r,o,l){return e===t||(null==e||null==t||!Ce(e)&&!Ce(t)?e!=e&&t!=t:function(e,t,r,o,l,u){var c=_e(e),h=_e(t),f=c?"[object Array]":be(e),d=h?"[object Array]":be(t),p=(f=f==n?s:f)==s,m=(d=d==n?s:d)==s,b=f==d;if(b&&xe(e)){if(!xe(t))return!1;c=!0,p=!1}if(b&&!p)return u||(u=new ae),c||Ee(e)?he(e,t,r,o,l,u):function(e,t,r,n,s,o,l){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new B(e),new B(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ve(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case i:var u=w;case a:var c=1&n;if(u||(u=_),e.size!=t.size&&!c)return!1;var h=l.get(e);if(h)return h==t;n|=2,l.set(e,t);var f=he(u(e),u(t),n,s,o,l);return l.delete(e),f;case"[object Symbol]":if(te)return te.call(e)==te.call(t)}return!1}(e,t,f,r,o,l,u);if(!(1&r)){var g=p&&R.call(e,"__wrapped__"),y=m&&R.call(t,"__wrapped__");if(g||y){var v=g?e.value():e,x=y?t.value():t;return u||(u=new ae),l(v,x,r,o,u)}}return!!b&&(u||(u=new ae),function(e,t,r,n,i,s){var a=1&r,o=fe(e),l=o.length;if(l!=fe(t).length&&!a)return!1;for(var u=l;u--;){var c=o[u];if(!(a?c in t:R.call(t,c)))return!1}var h=s.get(e);if(h&&s.get(t))return h==t;var f=!0;s.set(e,t),s.set(t,e);for(var d=a;++u<l;){var p=e[c=o[u]],m=t[c];if(n)var b=a?n(m,p,c,t,e,s):n(p,m,c,e,t,s);if(!(void 0===b?p===m||i(p,m,r,n,s):b)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(f=!1)}return s.delete(e),s.delete(t),f}(e,t,r,o,l,u))}(e,t,r,o,ce,l))}function he(e,t,r,n,i,s){var a=1&r,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(e);if(u&&s.get(t))return u==t;var c=-1,h=!0,f=2&r?new se:void 0;for(s.set(e,t),s.set(t,e);++c<o;){var d=e[c],p=t[c];if(n)var m=a?n(p,d,c,t,e,s):n(d,p,c,e,t,s);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!v(t,function(e,t){if(a=t,!f.has(a)&&(d===e||i(d,e,r,n,s)))return f.push(t);var a})){h=!1;break}}else if(d!==p&&!i(d,p,r,n,s)){h=!1;break}}return s.delete(e),s.delete(t),h}function fe(e){return r=me,n=Ae(t=e),_e(t)?n:function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}(n,r(t));var t,r,n}function de(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function pe(e,t){var r,n,i=(n=t,null==(r=e)?void 0:r[n]);return function(e){return!(!Me(e)||(t=e,O&&O in t))&&(ke(e)?I:o).test(ye(e));var t}(i)?i:void 0}re.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},re.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},re.prototype.get=function(e){var t=this.__data__;if(K){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return R.call(t,e)?t[e]:void 0},re.prototype.has=function(e){var t=this.__data__;return K?void 0!==t[e]:R.call(t,e)},re.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=K&&void 0===t?"__lodash_hash_undefined__":t,this},ne.prototype.clear=function(){this.__data__=[],this.size=0},ne.prototype.delete=function(e){var t=this.__data__,r=oe(t,e);return!(r<0||(r==t.length-1?t.pop():F.call(t,r,1),--this.size,0))},ne.prototype.get=function(e){var t=this.__data__,r=oe(t,e);return r<0?void 0:t[r][1]},ne.prototype.has=function(e){return oe(this.__data__,e)>-1},ne.prototype.set=function(e,t){var r=this.__data__,n=oe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new re,map:new(H||ne),string:new re}},ie.prototype.delete=function(e){var t=de(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return de(this,e).get(e)},ie.prototype.has=function(e){return de(this,e).has(e)},ie.prototype.set=function(e,t){var r=de(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},se.prototype.add=se.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},se.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.clear=function(){this.__data__=new ne,this.size=0},ae.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ae.prototype.get=function(e){return this.__data__.get(e)},ae.prototype.has=function(e){return this.__data__.has(e)},ae.prototype.set=function(e,t){var r=this.__data__;if(r instanceof ne){var n=r.__data__;if(!H||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ie(n)}return r.set(e,t),this.size=r.size,this};var me=z?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a)&&(s[i++]=a)}return s}(z(e),function(t){return D.call(e,t)}))}:function(){return[]},be=le;function ge(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||l.test(e))&&e>-1&&e%1==0&&e<t}function ye(e){if(null!=e){try{return A.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function ve(e,t){return e===t||e!=e&&t!=t}(V&&"[object DataView]"!=be(new V(/* @__PURE__ */new ArrayBuffer(1)))||H&&be(new H)!=i||q&&"[object Promise]"!=be(q.resolve())||W&&be(new W)!=a||X&&"[object WeakMap]"!=be(new X))&&(be=function(e){var t=le(e),r=t==s?e.constructor:void 0,n=r?ye(r):"";if(n)switch(n){case Y:return"[object DataView]";case Z:return i;case G:return"[object Promise]";case J:return a;case Q:return"[object WeakMap]"}return t});var we=ue(function(){return arguments}())?ue:function(e){return Ce(e)&&R.call(e,"callee")&&!D.call(e,"callee")},_e=Array.isArray,xe=U||function(){return!1};function ke(e){if(!Me(e))return!1;var t=le(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Me(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ce(e){return null!=e&&"object"==typeof e}var Te,Ee=y?(Te=y,function(e){return Te(e)}):function(e){return Ce(e)&&Se(e.length)&&!!u[le(e)]};function Ae(e){return null!=(t=e)&&Se(t.length)&&!ke(t)?function(e,t){var r=_e(e),n=!r&&we(e),i=!r&&!n&&xe(e),s=!r&&!n&&!i&&Ee(e),a=r||n||i||s,o=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],l=o.length;for(var u in e)!t&&!R.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ge(u,l))||o.push(u);return o}(e):function(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||T))return $(e);var t,r,n=[];for(var i in Object(e))R.call(e,i)&&"constructor"!=i&&n.push(i);return n}(e);var t}t.exports=function(e,t){return ce(e,t)}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],446:[function(e,t,r){(function(e){(function(){var r="object"==typeof e&&e&&e.Object===Object&&e,n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")(),s=Object.prototype,a=s.hasOwnProperty,o=s.toString,l=i.Symbol,u=l?l.toStringTag:void 0;t.exports=function(e){if(r=typeof(t=e),null==t||"object"!=r&&"function"!=r)return!1;var t,r,n=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":u&&u in Object(e)?function(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(s){}var i=o.call(e);return n&&(t?e[u]=r:delete e[u]),i}(e):(t=e,o.call(t));var t}(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],447:[function(e,t,r){t.exports=function(e){return null==e}},{}],448:[function(e,t,r){t.exports=function(e){return void 0===e}},{}],449:[function(e,t,r){(function(e){(function(){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();function a(e,t){return!(!e||!e.length)&&function(e,t){if(t!=t)return function(e,t){for(var r=e.length,n=-1;++n<r;)if(t(e[n],n,e))return n;return-1}(e,o);for(var r=-1,n=e.length;++r<n;)if(e[r]===t)return r;return-1}(e,t)>-1}function o(e){return e!=e}function l(e,t){return e.has(t)}function u(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var c,h=Array.prototype,f=Function.prototype,d=Object.prototype,p=s["__core-js_shared__"],m=(c=/[^.]+$/.exec(p&&p.keys&&p.keys.IE_PROTO||""))?"Symbol(src)_1."+c:"",b=f.toString,g=d.hasOwnProperty,y=d.toString,v=RegExp("^"+b.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=h.splice,_=O(s,"Map"),x=O(s,"Set"),k=O(Object,"create");function S(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function M(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function C(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function T(e){var t=-1,r=e?e.length:0;for(this.__data__=new C;++t<r;)this.add(e[t])}function E(e,t){for(var r,n,i=e.length;i--;)if((r=e[i][0])===(n=t)||r!=r&&n!=n)return i;return-1}S.prototype.clear=function(){this.__data__=k?k(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(k){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return g.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:g.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?"__lodash_hash_undefined__":t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,r=E(t,e);return!(r<0||(r==t.length-1?t.pop():w.call(t,r,1),0))},M.prototype.get=function(e){var t=this.__data__,r=E(t,e);return r<0?void 0:t[r][1]},M.prototype.has=function(e){return E(this.__data__,e)>-1},M.prototype.set=function(e,t){var r=this.__data__,n=E(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new S,map:new(_||M),string:new S}},C.prototype.delete=function(e){return R(this,e).delete(e)},C.prototype.get=function(e){return R(this,e).get(e)},C.prototype.has=function(e){return R(this,e).has(e)},C.prototype.set=function(e,t){return R(this,e).set(e,t),this},T.prototype.add=T.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},T.prototype.has=function(e){return this.__data__.has(e)};var A=x&&1/u(new x([,-0]))[1]==1/0?function(e){return new x(e)}:function(){};function R(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function O(e,t){var n,i,s=(i=t,null==(n=e)?void 0:n[i]);return function(e){return!(!j(e)||(i=e,m&&m in i))&&(t=e,n=j(t)?y.call(t):"","[object Function]"==n||"[object GeneratorFunction]"==n||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}(e)?v:r).test(function(e){if(null!=e){try{return b.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e));var t,n,i}(s)?s:void 0}function j(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=function(e){return e&&e.length?function(e,t,r){var n=-1,i=a,s=e.length,o=!0,c=[],h=c;if(s>=200){var f=A(e);if(f)return u(f);o=!1,i=l,h=new T}else h=c;e:for(;++n<s;){var d=e[n],p=d;if(d=0!==d?d:0,o&&p==p){for(var m=h.length;m--;)if(h[m]===p)continue e;c.push(d)}else i(h,p,r)||(h!==c&&h.push(p),c.push(d))}return c}(e):[]}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],450:[function(e,t,r){var n=e("inherits"),i=e("hash-base"),s=e("safe-buffer").Buffer,a=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function u(e,t,r,n,i,s,a){return l(e+(t&r|~t&n)+i+s|0,a)+t|0}function c(e,t,r,n,i,s,a){return l(e+(t&n|r&~n)+i+s|0,a)+t|0}function h(e,t,r,n,i,s,a){return l(e+(t^r^n)+i+s|0,a)+t|0}function f(e,t,r,n,i,s,a){return l(e+(r^(t|~n))+i+s|0,a)+t|0}n(o,i),o.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,s=this._d;r=u(r,n,i,s,e[0],3614090360,7),s=u(s,r,n,i,e[1],3905402710,12),i=u(i,s,r,n,e[2],606105819,17),n=u(n,i,s,r,e[3],3250441966,22),r=u(r,n,i,s,e[4],4118548399,7),s=u(s,r,n,i,e[5],1200080426,12),i=u(i,s,r,n,e[6],2821735955,17),n=u(n,i,s,r,e[7],4249261313,22),r=u(r,n,i,s,e[8],1770035416,7),s=u(s,r,n,i,e[9],2336552879,12),i=u(i,s,r,n,e[10],4294925233,17),n=u(n,i,s,r,e[11],2304563134,22),r=u(r,n,i,s,e[12],1804603682,7),s=u(s,r,n,i,e[13],4254626195,12),i=u(i,s,r,n,e[14],2792965006,17),r=c(r,n=u(n,i,s,r,e[15],1236535329,22),i,s,e[1],4129170786,5),s=c(s,r,n,i,e[6],3225465664,9),i=c(i,s,r,n,e[11],643717713,14),n=c(n,i,s,r,e[0],3921069994,20),r=c(r,n,i,s,e[5],3593408605,5),s=c(s,r,n,i,e[10],38016083,9),i=c(i,s,r,n,e[15],3634488961,14),n=c(n,i,s,r,e[4],3889429448,20),r=c(r,n,i,s,e[9],568446438,5),s=c(s,r,n,i,e[14],3275163606,9),i=c(i,s,r,n,e[3],4107603335,14),n=c(n,i,s,r,e[8],1163531501,20),r=c(r,n,i,s,e[13],2850285829,5),s=c(s,r,n,i,e[2],4243563512,9),i=c(i,s,r,n,e[7],1735328473,14),r=h(r,n=c(n,i,s,r,e[12],2368359562,20),i,s,e[5],4294588738,4),s=h(s,r,n,i,e[8],2272392833,11),i=h(i,s,r,n,e[11],1839030562,16),n=h(n,i,s,r,e[14],4259657740,23),r=h(r,n,i,s,e[1],2763975236,4),s=h(s,r,n,i,e[4],1272893353,11),i=h(i,s,r,n,e[7],4139469664,16),n=h(n,i,s,r,e[10],3200236656,23),r=h(r,n,i,s,e[13],681279174,4),s=h(s,r,n,i,e[0],3936430074,11),i=h(i,s,r,n,e[3],3572445317,16),n=h(n,i,s,r,e[6],76029189,23),r=h(r,n,i,s,e[9],3654602809,4),s=h(s,r,n,i,e[12],3873151461,11),i=h(i,s,r,n,e[15],530742520,16),r=f(r,n=h(n,i,s,r,e[2],3299628645,23),i,s,e[0],4096336452,6),s=f(s,r,n,i,e[7],1126891415,10),i=f(i,s,r,n,e[14],2878612391,15),n=f(n,i,s,r,e[5],4237533241,21),r=f(r,n,i,s,e[12],1700485571,6),s=f(s,r,n,i,e[3],2399980690,10),i=f(i,s,r,n,e[10],4293915773,15),n=f(n,i,s,r,e[1],2240044497,21),r=f(r,n,i,s,e[8],1873313359,6),s=f(s,r,n,i,e[15],4264355552,10),i=f(i,s,r,n,e[6],2734768916,15),n=f(n,i,s,r,e[13],1309151649,21),r=f(r,n,i,s,e[4],4149444226,6),s=f(s,r,n,i,e[11],3174756917,10),i=f(i,s,r,n,e[2],718787259,15),n=f(n,i,s,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+s|0},o.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 e=s.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=o},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(e,t,r){var n=e("bn.js"),i=e("brorand");function s(e){this.rand=e||new i.Rand}t.exports=s,s.create=function(e){return new s(e)},s.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},s.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},s.prototype.test=function(e,t,r){var i=e.bitLength(),s=n.mont(e),a=new n(1).toRed(s);t||(t=Math.max(1,i/48|0));for(var o=e.subn(1),l=0;!o.testn(l);l++);for(var u=e.shrn(l),c=o.toRed(s);t>0;t--){var h=this._randrange(new n(2),o);r&&r(h);var f=h.toRed(s).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(c)){for(var d=1;d<l;d++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(c))break}if(d===l)return!1}}return!0},s.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),s=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),o=0;!a.testn(o);o++);for(var l=e.shrn(o),u=a.toRed(i);t>0;t--){var c=this._randrange(new n(2),a),h=e.gcd(c);if(0!==h.cmpn(1))return h;var f=c.toRed(i).redPow(l);if(0!==f.cmp(s)&&0!==f.cmp(u)){for(var d=1;d<o;d++){if(0===(f=f.redSqr()).cmp(s))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(u))break}if(d===o)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":452,brorand:187}],452:[function(e,t,r){arguments[4][184][0].apply(r,arguments)},{buffer:188,dup:184}],453:[function(e,t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],454:[function(e,t,r){var n=r;function i(e){return 1===e.length?"0"+e:e}function s(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),s=i>>8,a=255&i;s?r.push(s,a):r.push(a)}return r},n.zero2=i,n.toHex=s,n.encode=function(e,t){return"hex"===t?s(e):e}},{}],455:[function(e,t,r){t.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(e,t,r){var n=e("asn1.js");r.certificate=e("./certificate"),r.RSAPrivateKey=n.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())}),r.RSAPublicKey=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}),r.PublicKey=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())});var i=n.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())});r.PrivateKey=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())}),r.EncryptedPrivateKey=n.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())}),r.DSAPrivateKey=n.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())}),r.DSAparam=n.define("DSAparam",function(){this.int()}),r.ECPrivateKey=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(s),this.key("publicKey").optional().explicit(1).bitstr())});var s=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":170}],457:[function(e,t,r){var n=e("asn1.js"),i=n.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),s=n.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),a=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),o=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}),l=n.define("RelativeDistinguishedName",function(){this.setof(s)}),u=n.define("RDNSequence",function(){this.seqof(l)}),c=n.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),h=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),f=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(c),this.key("validity").use(h),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(o),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())});t.exports=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())})},{"asn1.js":170}],458:[function(e,t,r){var n=/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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(e,t){var r,u=e.toString(),c=u.match(n);if(c){var h="aes"+c[1],f=l.from(c[2],"hex"),d=l.from(c[3].replace(/[\r\n]/g,""),"base64"),p=a(t,f.slice(0,8),parseInt(c[1],10)).key,m=[],b=o.createDecipheriv(h,p,f);m.push(b.update(d)),m.push(b.final()),r=l.concat(m)}else{var g=u.match(s);r=l.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:r}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(e,t,r){var n=e("./asn1"),i=e("./aesid.json"),s=e("./fixProc"),a=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function u(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var r,u,c,h,f,d,p,m,b,g,y,v,w,_=s(e,t),x=_.tag,k=_.data;switch(x){case"CERTIFICATE":u=n.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=n.PublicKey.decode(k,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":c=k=n.EncryptedPrivateKey.decode(k,"der"),h=t,f=c.algorithm.decrypt.kde.kdeparams.salt,d=parseInt(c.algorithm.decrypt.kde.kdeparams.iters.toString(),10),p=i[c.algorithm.decrypt.cipher.algo.join(".")],m=c.algorithm.decrypt.cipher.iv,b=c.subjectPrivateKey,g=parseInt(p.split("-")[1],10)/8,y=o.pbkdf2Sync(h,f,d,g,"sha1"),v=a.createDecipheriv(p,y,m),(w=[]).push(v.update(b)),w.push(v.final()),k=l.concat(w);case"PRIVATE KEY":switch(r=(u=n.PrivateKey.decode(k,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return{curve:(k=n.ECPrivateKey.decode(k,"der")).parameters.value,privateKey:k.privateKey};default:throw new Error("unknown key type "+x)}}t.exports=u,u.signature=n.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(e,t,r){(function(r){(function(){var n,i,s=e("safe-buffer").Buffer,a=e("./precondition"),o=e("./default-encoding"),l=e("./sync"),u=e("./to-buffer"),c=r.crypto&&r.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"},f=[];function d(){return i||(i=r.process&&r.process.nextTick?r.process.nextTick:r.queueMicrotask?r.queueMicrotask:r.setImmediate?r.setImmediate:r.setTimeout)}function p(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)}).then(function(e){return s.from(e)})}t.exports=function(e,t,i,m,b,g){"function"==typeof b&&(g=b,b=void 0);var y,v,w=h[(b=b||"sha1").toLowerCase()];if(w&&"function"==typeof r.Promise){if(a(i,m),e=u(e,o,"Password"),t=u(t,o,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");y=function(e){if(r.process&&!r.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==f[e])return f[e];var t=p(n=n||s.alloc(8),n,10,128,e).then(function(){return!0}).catch(function(){return!1});return f[e]=t,t}(w).then(function(r){return r?p(e,t,i,m,w):l(e,t,i,m,b)}),v=g,y.then(function(e){d()(function(){v(null,e)})},function(e){d()(function(){v(e)})})}else d()(function(){var r;try{r=l(e,t,i,m,b)}catch(y){return g(y)}g(null,r)})}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(e,t,r){(function(e,r){(function(){var n;n=r.process&&r.process.browser?"utf-8":r.process&&r.process.version?parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=n}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:467}],463:[function(e,t,r){var n=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},{}],464:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),s=e("sha.js"),a=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),u=e("./to-buffer"),c=a.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,r){var o,l="rmd160"===(o=e)||"ripemd160"===o?function(e){return(new i).update(e).digest()}:"md5"===o?n:function(e){return s(o).update(e).digest()},u="sha512"===e||"sha384"===e?128:64;t.length>u?t=l(t):t.length<u&&(t=a.concat([t,c],u));for(var f=a.allocUnsafe(u+h[e]),d=a.allocUnsafe(u+h[e]),p=0;p<u;p++)f[p]=54^t[p],d[p]=92^t[p];var m=a.allocUnsafe(u+r+4);f.copy(m,0,0,u),this.ipad1=m,this.ipad2=f,this.opad=d,this.alg=e,this.blocksize=u,this.hash=l,this.size=h[e]}f.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,r,n,i){o(r,n);var s=new f(i=i||"sha1",e=u(e,l,"Password"),(t=u(t,l,"Salt")).length),c=a.allocUnsafe(n),d=a.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,m=h[i],b=Math.ceil(n/m),g=1;g<=b;g++){d.writeUInt32BE(g,t.length);for(var y=s.run(d,s.ipad1),v=y,w=1;w<r;w++){v=s.run(v,s.ipad2);for(var _=0;_<m;_++)y[_]^=v[_]}y.copy(c,p),p+=m}return c}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(e,t,r){var n=e("safe-buffer").Buffer;t.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(e,t,r){(function(e){(function(){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a<s.length;)s[a++]=arguments[a];return e.nextTick(function(){t.apply(null,s)})}}}:t.exports=e}).call(this)}).call(this,e("_process"))},{_process:467}],467:[function(e,t,r){var n,i,s=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{i="function"==typeof clearTimeout?clearTimeout:o}catch(e){i=o}}();var u,c=[],h=!1,f=-1;function d(){h&&u&&(h=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!h){var e=l(d);h=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,h=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(r){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function b(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=b,s.addListener=b,s.once=b,s.off=b,s.removeListener=b,s.removeAllListeners=b,s.emit=b,s.prependListener=b,s.prependOnceListener=b,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],468:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(e,t){return r.publicEncrypt(e,t,!0)},r.publicDecrypt=function(e,t){return r.privateDecrypt(e,t,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(e,t,r){var n=e("create-hash"),i=e("safe-buffer").Buffer;function s(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}t.exports=function(e,t){for(var r,a=i.alloc(0),o=0;a.length<t;)r=s(o++),a=i.concat([a,n("sha1").update(e).update(r).digest()]);return a.slice(0,t)}},{"create-hash":386,"safe-buffer":494}],470:[function(e,t,r){arguments[4][184][0].apply(r,arguments)},{buffer:188,dup:184}],471:[function(e,t,r){var n=e("parse-asn1"),i=e("./mgf"),s=e("./xor"),a=e("bn.js"),o=e("browserify-rsa"),l=e("create-hash"),u=e("./withPublic"),c=e("safe-buffer").Buffer;t.exports=function(e,t,r){var h,f=e.padding?e.padding:r?1:4,d=n(e),p=d.modulus.byteLength();if(t.length>p||new a(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=r?u(new a(t),d):o(t,d);var m=c.alloc(p-h.length);if(h=c.concat([m,h],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=l("sha1").update(c.alloc(0)).digest(),a=n.length;if(0!==t[0])throw new Error("decryption error");var o=t.slice(1,a+1),u=t.slice(a+1),h=s(u,i(s(o,i(u,a)),r-a-1));if(function(e,t){e=c.from(e),t=c.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,h.slice(0,a)))throw new Error("decryption error");for(var f=a;0===h[f];)f++;if(1!==h[f++])throw new Error("decryption error");return h.slice(f)}(d,h);if(1===f)return function(e,t,r){for(var n=t.slice(0,2),i=2,s=0;0!==t[i++];)if(i>=t.length){s++;break}var a=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&s++,a.length<8&&s++,s)throw new Error("decryption error");return t.slice(i)}(0,h,r);if(3===f)return h;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(e,t,r){var n=e("parse-asn1"),i=e("randombytes"),s=e("create-hash"),a=e("./mgf"),o=e("./xor"),l=e("bn.js"),u=e("./withPublic"),c=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,r){var f,d=e.padding?e.padding:r?1:4,p=n(e);if(4===d)f=function(e,t){var r=e.modulus.byteLength(),n=t.length,u=s("sha1").update(h.alloc(0)).digest(),c=u.length,f=2*c;if(n>r-f-2)throw new Error("message too long");var d=h.alloc(r-n-f-2),p=r-c-1,m=i(c),b=o(h.concat([u,d,h.alloc(1,1),t],p),a(m,p)),g=o(m,a(b,c));return new l(h.concat([h.alloc(1),g,b],r))}(p,t);else if(1===d)f=function(e,t,r){var n,s=t.length,a=e.modulus.byteLength();if(s>a-11)throw new Error("message too long");return n=r?h.alloc(a-s-3,255):function(e){for(var t,r=h.allocUnsafe(e),n=0,s=i(2*e),a=0;n<e;)a===s.length&&(s=i(2*e),a=0),(t=s[a++])&&(r[n++]=t);return r}(a-s-3),new l(h.concat([h.from([0,r?1:2]),n,h.alloc(1),t],a))}(p,t,r);else{if(3!==d)throw new Error("unknown padding");if((f=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?c(f,p):u(f,p)}},{"./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(e,t,r){var n=e("bn.js"),i=e("safe-buffer").Buffer;t.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},{}],475:[function(e,t,r){(function(r,n){(function(){var i=e("safe-buffer").Buffer,s=n.crypto||n.msCrypto;s&&s.getRandomValues?t.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)s.getRandomValues(n.slice(a,a+65536));else s.getRandomValues(n);return"function"==typeof t?r.nextTick(function(){t(null,n)}):n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:467,"safe-buffer":494}],476:[function(e,t,r){(function(t,n){(function(){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var s=e("safe-buffer"),a=e("randombytes"),o=s.Buffer,l=s.kMaxLength,u=n.crypto||n.msCrypto,c=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>c||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range")}function f(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>c||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small")}function d(e,r,n,i){if(t.browser){var s=e.buffer,o=new Uint8Array(s,r,n);return u.getRandomValues(o),i?void t.nextTick(function(){i(null,e)}):e}if(!i)return a(n).copy(e,r),e;a(n,function(t,n){if(t)return i(t);n.copy(e,r),i(null,e)})}u&&u.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!(o.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),f(r,t,e.length),d(e,t,r,i)},r.randomFillSync=function(e,t,r){if(void 0===t&&(t=0),!(o.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(t,e.length),void 0===r&&(r=e.length-t),f(r,t,e.length),d(e,t,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,t,r){var n={};function i(e,t,r){r||(r=Error);var i=function(e){var r,n;function i(r,n,i){return e.call(this,(s=r,a=n,o=i,"string"==typeof t?t:t(s,a,o)))||this;var s,a,o}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=e,n[e]=i}function s(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,i,a,o,l,u;if("string"==typeof t&&(i="not ",t.substr(0,4)===i)?(n="must not be",t=t.replace(/^not /,"")):n="must be",o=e,l=" argument",(void 0===u||u>o.length)&&(u=o.length),o.substring(u-9,u)===l)a="The ".concat(e," ").concat(n," ").concat(s(t,"type"));else{var c=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";a='The "'.concat(e,'" ').concat(c," ").concat(n," ").concat(s(t,"type"))}return a+". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],478:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=u;var i=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(u,i);for(var a=n(s.prototype),o=0;o<a.length;o++){var l=a[o];u.prototype[l]||(u.prototype[l]=s.prototype[l])}function u(e){if(!(this instanceof u))return new u(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||r.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":481,inherits:440}],480:[function(e,t,r){(function(r,n){(function(){var i;t.exports=M,M.ReadableState=S,e("events").EventEmitter;var s,a=function(e,t){return e.listeners(t).length},o=e("./internal/streams/stream"),l=e("buffer").Buffer,u=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=e("util");s=c&&c.debuglog?c.debuglog("stream"):function(){};var h,f,d,p=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),b=e("./internal/streams/state").getHighWaterMark,g=e("../errors").codes,y=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(M,o);var x=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function S(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=b(this,t,"readableHighWaterMark",n),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=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=e("string_decoder/").StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function M(t){if(i=i||e("./_stream_duplex"),!(this instanceof M))return new M(t);var r=this instanceof i;this._readableState=new S(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function C(e,t,r,n,i){s("readableAddChunk",t);var a,o,c,h,f,d=e._readableState;if(null===t)d.reading=!1,function(e,t){if(s("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?A(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}}(e,d);else if(i||(o=d,f=c=t,l.isBuffer(f)||f instanceof u||"string"==typeof c||void 0===c||o.objectMode||(h=new y("chunk",["string","Buffer","Uint8Array"],c)),a=h),a)x(e,a);else if(d.objectMode||t&&t.length>0)if("string"==typeof t||d.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n)d.endEmitted?x(e,new _):T(e,d,t,!0);else if(d.ended)x(e,new v);else{if(d.destroyed)return!1;d.reading=!1,d.decoder&&!r?(t=d.decoder.write(t),d.objectMode||0!==t.length?T(e,d,t,!1):O(e,d)):T(e,d,t,!1)}else n||(d.reading=!1,O(e,d));return!d.ended&&(d.length<d.highWaterMark||0===d.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&A(e)),O(e,t)}function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function A(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(R,e))}function R(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function O(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(j,e,t))}function j(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(s("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function I(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){s("readable nexttick read 0"),e.read(0)}function N(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(L,t,e))}function L(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function z(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),M.prototype.destroy=m.destroy,M.prototype._undestroy=m.undestroy,M.prototype._destroy=function(e,t){t(e)},M.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=""),r=!0),C(this,e,t,!1,r)},M.prototype.unshift=function(e){return C(this,e,null,!0,!1)},M.prototype.isPaused=function(){return!1===this._readableState.flowing},M.prototype.setEncoding=function(t){h||(h=e("string_decoder/").StringDecoder);var r=new h(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},M.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):A(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return s("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",i=!0),t.ended||t.reading?s("reading or ended",i=!1):i&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){x(this,new w("_read()"))},M.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,s("pipe count=%d opts=%j",i.pipesCount,t);var o=t&&!1===t.end||e===r.stdout||e===r.stderr?b:l;function l(){s("onend"),e.end()}i.endEmitted?r.nextTick(o):n.once("end",o),e.on("unpipe",function t(r,a){s("onunpipe"),r===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,s("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),n.removeListener("end",l),n.removeListener("end",b),n.removeListener("data",f),h=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c())});var u,c=(u=n,function(){var e=u._readableState;s("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(u,"data")&&(e.flowing=!0,B(u))});e.on("drain",c);var h=!1;function f(t){s("ondata");var r=e.write(t);s("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==z(i.pipes,e))&&!h&&(s("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(t){s("onerror",t),b(),e.removeListener("error",d),0===a(e,"error")&&x(e,t)}function p(){e.removeListener("finish",m),b()}function m(){s("onfinish"),e.removeListener("close",p),b()}function b(){s("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",p),e.once("finish",m),e.emit("pipe",n),i.flowing||(s("pipe resume"),n.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=z(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},M.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,s("on readable",i.length,i.reading),i.length?A(this):i.reading||r.nextTick(P,this))),n},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(I,this),n},M.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(I,this),t},M.prototype.resume=function(){var e,t,n=this._readableState;return n.flowing||(s("resume"),n.flowing=!n.readableListening,e=this,(t=n).resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))),n.paused=!1,this},M.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(s("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){s("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<k.length;a++)e.on(k[a],this.emit.bind(this,k[a]));return this._read=function(t){s("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(M.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=e("./internal/streams/async_iterator")),f(this)}),Object.defineProperty(M.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(M.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(M.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),M._fromList=D,Object.defineProperty(M.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(M.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(M,t,r)})}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,r){t.exports=c;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);l.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush(function(t,r){f(e,t,r)})}function f(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new o;if(e._transformState.transforming)throw new a;return e.push(null)}e("inherits")(c,l),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(e,t,r){(function(r,n){(function(){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var s;t.exports=M,M.WritableState=S;var a,o={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),u=e("buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=e("./internal/streams/destroy"),f=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;function k(){}function S(t,n,a){s=s||e("./_stream_duplex"),t=t||{},"boolean"!=typeof a&&(a=n instanceof s),this.objectMode=!!t.objectMode,a&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===t.decodeStrings),this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n,i=e._writableState,s=i.sync,a=i.writecb;if("function"!=typeof a)throw new b;if((n=i).writing=!1,n.writecb=null,n.length-=n.writelen,n.writelen=0,t)!function(e,t,n,i,s){--t.pendingcb,n?(r.nextTick(s,i),r.nextTick(O,e,t),e._writableState.errorEmitted=!0,x(e,i)):(s(i),e._writableState.errorEmitted=!0,x(e,i),O(e,t))}(e,i,s,t,a);else{var o=A(i)||e.destroyed;o||i.corked||i.bufferProcessing||!i.bufferedRequest||E(e,i),s?r.nextTick(T,e,i,o,a):T(e,i,o,a)}}(n,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function M(t){var r=this instanceof(s=s||e("./_stream_duplex"));if(!r&&!a.call(M,this))return new M(t);this._writableState=new S(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function C(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function T(e,t,r,n){var i,s;r||(i=e,0===(s=t).length&&s.needDrain&&(s.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),O(e,t)}function E(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,s=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var o=0,l=!0;r;)s[o]=r,r.isBuf||(l=!1),r=r.next,o+=1;s.allBuffers=l,C(e,t,!0,t.length,s,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(C(e,t,!1,t.objectMode?1:u.length,u,c,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function R(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)})}function O(e,t){var n,i,s=A(t);if(s&&(n=e,(i=t).prefinished||i.finalCalled||("function"!=typeof n._final||i.destroyed?(i.prefinished=!0,n.emit("prefinish")):(i.pendingcb++,i.finalCalled=!0,r.nextTick(R,n,i))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var a=e._readableState;(!a||a.autoDestroy&&a.endEmitted)&&e.destroy()}return s}e("inherits")(M,l),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===M&&e&&e._writableState instanceof S}})):a=function(e){return e instanceof this},M.prototype.pipe=function(){x(this,new g)},M.prototype.write=function(e,t,n){var i,s,a=this._writableState,o=!1,l=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof c);return l&&!u.isBuffer(e)&&(s=e,e=u.from(s)),"function"==typeof t&&(n=t,t=null),l?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof n&&(n=k),a.ending?function(e,t){var n=new w;x(e,n),r.nextTick(t,n)}(this,n):(l||function(e,t,n,i){var s;return null===n?s=new v:"string"==typeof n||t.objectMode||(s=new p("chunk",["string","Buffer"],n)),!s||(x(e,s),r.nextTick(i,s),!1)}(this,a,e,n))&&(a.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var a=(l=n,c=i,(o=t).objectMode||!1===o.decodeStrings||"string"!=typeof l||(l=u.from(l,c)),l);n!==a&&(r=!0,i="buffer",n=a)}var o,l,c,h=t.objectMode?1:n.length;t.length+=h;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var d=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},d?d.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,h,n,i,s);return f}(this,a,l,e,t,n)),o},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||E(this,e))},M.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,n){var i,s,a,o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(i=this,a=n,(s=o).ending=!0,O(i,s),a&&(s.finished?r.nextTick(a):i.once("finish",a)),s.ended=!0,i.writable=!1),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=h.destroy,M.prototype._undestroy=h.undestroy,M.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,r){(function(r){(function(){var n;function i(e,t,r){return(t="symbol"==typeof(n=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var n}var s=e("./end-of-stream"),a=Symbol("lastResolve"),o=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[f].read();null!==r&&(e[c]=null,e[a]=null,e[o]=null,t(d(r,!1)))}}function m(e){r.nextTick(p,e)}var b=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise(function(t,n){r.nextTick(function(){e[l]?n(e[l]):t(d(void 0,!0))})});var n,i,s,a=this[c];if(a)n=new Promise((i=a,s=this,function(e,t){i.then(function(){s[u]?e(d(void 0,!0)):s[h](e,t)},t)}));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[c]=n,n}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var e=this;return new Promise(function(t,r){e[f].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),n),b);t.exports=function(e){var t,r=Object.create(g,(i(t={},f,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[f].read();n?(r[c]=null,r[a]=null,r[o]=null,e(d(n,!1))):(r[a]=e,r[o]=t)},writable:!0}),t));return r[c]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[o];return null!==t&&(r[c]=null,r[a]=null,r[o]=null,t(e)),void(r[l]=e)}var n=r[a];null!==n&&(r[c]=null,r[a]=null,r[o]=null,n(d(void 0,!0))),r[u]=!0}),e.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":486,_process:467}],484:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){s(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var l=e("buffer").Buffer,u=e("util").inspect,c=u&&u.custom||"inspect";t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,r,n,i=l.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,r=i,n=a,l.prototype.copy.call(t,r,n),a+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},{buffer:220,util:188}],485:[function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,s){var a=this,o=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return o||l?(s?s(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!s&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(n,a):(a._writableState.errorEmitted=!0,e.nextTick(r,a,t)):e.nextTick(r,a,t):s?(e.nextTick(n,a),s(t)):e.nextTick(n,a)}),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,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:467}],486:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);var a,o;r||(r={}),a=s||i,o=!1,s=function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var l=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,c=function(){t.writable||f()},h=t._writableState&&t._writableState.finished,f=function(){u=!1,h=!0,l||s.call(t)},d=t._readableState&&t._readableState.endEmitted,p=function(){l=!1,d=!0,u||s.call(t)},m=function(e){s.call(t,e)},b=function(){var e;return l&&!d?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):u&&!h?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},g=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",b),t.req?g():t.on("request",g)):u&&!t._writableState&&(t.on("end",c),t.on("close",c)),t.on("end",p),t.on("finish",f),!1!==r.error&&t.on("error",m),t.on("close",b),function(){t.removeListener("complete",f),t.removeListener("abort",b),t.removeListener("request",g),t.req&&t.req.removeListener("finish",f),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",f),t.removeListener("end",p),t.removeListener("error",m),t.removeListener("close",b)}}},{"../../../errors":477}],487:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(e,t,r){var n,i=e("../../../errors").codes,s=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function o(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var c,h=function(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o}(r);if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new s("streams");var f=r.map(function(t,i){var s=i<r.length-1;return function(t,r,i,s){var o,l;o=s,l=!1,s=function(){l||(l=!0,o.apply(void 0,arguments))};var u=!1;t.on("close",function(){u=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},function(e){if(e)return s(e);u=!0,s()});var c=!1;return function(e){if(!u&&!c)return c=!0,(r=t).setHeader&&"function"==typeof r.abort?t.abort():"function"==typeof t.destroy?t.destroy():void s(e||new a("pipe"));var r}}(t,s,i>0,function(e){c||(c=e),e&&f.forEach(l),s||(f.forEach(l),h(c))})});return r.reduce(u)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var s,a,o,l=(a=i,o=r,null!=(s=t).highWaterMark?s.highWaterMark:a?s[o]:null);if(null!=l){if(!isFinite(l)||Math.floor(l)!==l||l<0)throw new n(i?r:"highWaterMark",l);return Math.floor(l)}return e.objectMode?16:16384}}},{"../../../errors":477}],490:[function(e,t,r){t.exports=e("events").EventEmitter},{events:422}],491:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),r.finished=e("./lib/internal/streams/end-of-stream.js"),r.pipeline=e("./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(e,t,r){var n=function(e){var t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",o=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(E){l=function(e,t,r){return e[t]=r}}function u(e,t,r,i){var s=t&&t.prototype instanceof f?t:f,a=Object.create(s.prototype);return n(a,"_invoke",{value:_(e,r,new M(i||[]))}),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}e.wrap=u;var h={};function f(){}function d(){}function p(){}var m={};l(m,s,function(){return this});var b=Object.getPrototypeOf,g=b&&b(b(C([])));g&&g!==t&&r.call(g,s)&&(m=g);var y=p.prototype=f.prototype=Object.create(m);function v(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function w(e,t){var i;n(this,"_invoke",{value:function(n,s){function a(){return new t(function(i,a){!function n(i,s,a,o){var l=c(e[i],e,s);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==typeof h&&r.call(h,"__await")?t.resolve(h.__await).then(function(e){n("next",e,a,o)},function(e){n("throw",e,a,o)}):t.resolve(h).then(function(e){u.value=e,a(u)},function(e){return n("throw",e,a,o)})}o(l.arg)}(n,s,i,a)})}return i=i?i.then(a,a):a()}})}function _(e,t,r){var n="suspendedStart";return function(i,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw s;return{value:void 0,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var o=x(a,r);if(o){if(o===h)continue;return o}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=c(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function x(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=/* @__PURE__ */new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=c(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):s:(t.method="throw",t.arg=/* @__PURE__ */new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function C(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=p,n(y,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=l(p,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,l(e,o,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},v(w.prototype),l(w.prototype,a,function(){return this}),e.AsyncIterator=w,e.async=function(t,r,n,i,s){void 0===s&&(s=Promise);var a=new w(u(t,r,n,i),s);return e.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},v(y),l(y,o,"Generator"),l(y,s,function(){return this}),l(y,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},e.values=C,M.prototype={constructor:M,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],a=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var o=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(o&&l){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(o){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var a=s?s.completion:{};return a.type=e,a.arg=t,s?(this.method="next",this.next=s.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:C(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},e}("object"==typeof t?t.exports:{});try{regeneratorRuntime=n}catch(i){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},{}],493:[function(e,t,r){var n=e("buffer").Buffer,i=e("inherits"),s=e("hash-base"),a=new Array(16),o=[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],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function d(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,r,n,i,s,a,o){return p(e+(t^r^n)+s+a|0,o)+i|0}function b(e,t,r,n,i,s,a,o){return p(e+(t&r|~t&n)+s+a|0,o)+i|0}function g(e,t,r,n,i,s,a,o){return p(e+((t|~r)^n)+s+a|0,o)+i|0}function y(e,t,r,n,i,s,a,o){return p(e+(t&n|r&~n)+s+a|0,o)+i|0}function v(e,t,r,n,i,s,a,o){return p(e+(t^(r|~n))+s+a|0,o)+i|0}i(d,s),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,x=0|this._c,k=0|this._d,S=0|this._e,M=0;M<80;M+=1){var C,T;M<16?(C=m(r,n,i,s,d,e[o[M]],h[0],u[M]),T=v(w,_,x,k,S,e[l[M]],f[0],c[M])):M<32?(C=b(r,n,i,s,d,e[o[M]],h[1],u[M]),T=y(w,_,x,k,S,e[l[M]],f[1],c[M])):M<48?(C=g(r,n,i,s,d,e[o[M]],h[2],u[M]),T=g(w,_,x,k,S,e[l[M]],f[2],c[M])):M<64?(C=y(r,n,i,s,d,e[o[M]],h[3],u[M]),T=b(w,_,x,k,S,e[l[M]],f[3],c[M])):(C=v(r,n,i,s,d,e[o[M]],h[4],u[M]),T=m(w,_,x,k,S,e[l[M]],f[4],c[M])),r=d,d=s,s=p(i,10),i=n,n=C,w=S,S=k,k=p(x,10),x=_,_=T}var E=this._b+i+k|0;this._b=this._c+s+S|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+x|0,this._a=E},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 e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=d},{buffer:220,"hash-base":425,inherits:440}],494:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),s(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:220}],495:[function(e,t,r){(function(r){(function(){var n,i=e("buffer"),s=i.Buffer,a={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=i[n]);var o=a.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(o[n]=s[n]);if(a.Buffer.prototype=s.prototype,o.from&&o.from!==Uint8Array.from||(o.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),o.alloc||(o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(l){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this)}).call(this,e("_process"))},{_process:467,buffer:220}],496:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0});const n=e("xmlchars/xml/1.0/ed5"),i=e("xmlchars/xml/1.1/ed2"),s=e("xmlchars/xmlns/1.0/ed3");var a=n.isS,o=n.isChar,l=n.isNameStartChar,u=n.isNameChar,c=n.S_LIST,h=n.NAME_RE,f=i.isChar,d=s.isNCNameStartChar,p=s.isNCNameChar,m=s.NC_NAME_RE;const b="http://www.w3.org/XML/1998/namespace",g="http://www.w3.org/2000/xmlns/",y={__proto__:null,xml:b,xmlns:g},v={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},w=e=>34===e||39===e,_=[34,39],x=[..._,91,62],k=[..._,60,93],S=[61,63,...c],M=[...c,62,38,60];function C(e,t,r){switch(t){case"xml":r!==b&&e.fail(`xml prefix must be bound to ${b}.`);break;case"xmlns":r!==g&&e.fail(`xmlns prefix must be bound to ${g}.`)}switch(r){case g:e.fail(""===t?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${g}.`);break;case b:switch(t){case"xml":break;case"":e.fail(`the default namespace may not be set to ${r}.`);break;default:e.fail("may not assign the xml namespace to another prefix.")}}}const T=e=>m.test(e),E=e=>h.test(e);r.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const A={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"};r.SaxesParser=class{constructor(e){this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;const t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=d,this.nameCheck=p,this.isName=T,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},y);const e=this.opt.additionalNamespaces;null!=e&&(function(e,t){for(const r of Object.keys(t))C(e,r,t[r])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=l,this.nameCheck=u,this.isName=E,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 e;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:t}=this;this.state=t?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:r}=this.opt;if(void 0===r){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");r="1.0"}this.setXMLVersion(r),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(v),null===(e=this.readyHandler)||void 0===e||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[A[e]]=t}off(e){this[A[e]]=void 0}makeError(e){var t;let r=null!==(t=this.fileName)&&void 0!==t?t:"";return this.trackPosition&&(r.length>0&&(r+=":"),r+=`${this.line}:${this.column}`),r.length>0&&(r+=": "),new Error(r+e)}fail(e){const t=this.makeError(e),r=this.errorHandler;if(void 0===r)throw t;return r(t),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let t=!1;null===e?(t=!0,e=""):"object"==typeof e&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let r=e.length;const n=e.charCodeAt(r-1);!t&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[r-1],r--,e=e.slice(0,r));const{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<r;)i[this.state].call(this);return this.chunkPosition+=r,t?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return-1;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return 10===e.charCodeAt(t+1)&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return-1;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const r=e.charCodeAt(t+1);10!==r&&133!==r||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const e=this.getCode();return-2===e?10:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this;const{chunk:r}=this;for(;;){const n=this.getCode(),i=-2===n,s=i?10:n;if(-1===s||e.includes(s))return this.text+=r.slice(t,this.prevI),s;i&&(this.text+=r.slice(t,this.prevI)+"\n",t=this.i)}}captureToChar(e){let{i:t}=this;const{chunk:r}=this;for(;;){let n=this.getCode();switch(n){case-2:this.text+=r.slice(t,this.prevI)+"\n",t=this.i,n=10;break;case-1:return this.text+=r.slice(t),!1}if(n===e)return this.text+=r.slice(t,this.prevI),!0}}captureNameChars(){const{chunk:e,i:t}=this;for(;;){const r=this.getCode();if(-1===r)return this.name+=e.slice(t),-1;if(!u(r))return this.name+=e.slice(t,this.prevI),-2===r?10:r}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(-1===e||!a(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,"1.0"===e?(this.isChar=o,this.getCode=this.getCode10):(this.isChar=f,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case 60:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var e;const t=this.captureTo(x);switch(t){case 62:null===(e=this.doctypeHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:w(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){const e=this.captureTo(k);-1!==e&&(this.text+=String.fromCodePoint(e),93===e?this.state=2:60===e?this.state=6:w(e)&&(this.state=5,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),62===e?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),62===e&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:t}=this;e:for(;;)switch(this.getCode()){case-2:this.entity+=t.slice(e,this.prevI)+"\n",e=this.i;break;case 59:{const{entityReturnState:r}=this,n=this.entity+t.slice(e,this.prevI);let i;this.state=r,""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),13===r&&void 0===this.textHandler||(this.text+=i);break e}case-1:this.entity+=t.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(l(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){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 e;const t=this.getCodeNorm();45===t?(this.state=19,null===(e=this.commentHandler)||void 0===e||e.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(t),this.state=17)}sCommentEnded(){const e=this.getCodeNorm();62!==e?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(e),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const e=this.getCodeNorm();93===e?this.state=22:(this.text+="]"+String.fromCodePoint(e),this.state=20)}sCDataEnding2(){var e;const t=this.getCodeNorm();switch(t){case 62:null===(e=this.cdataHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(t),this.state=20}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):63===e||a(e)?(this.fail("processing instruction without a target."),this.state=63===e?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){const{chunk:e,i:t}=this;for(;;){const r=this.getCodeNorm();if(-1===r)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(r)){this.piTarget+=e.slice(t,this.prevI);const n=63===r;n||a(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?33:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}sPIBody(){if(0===this.text.length){const e=this.getCodeNorm();63===e?this.state=26:a(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var e;const t=this.getCodeNorm();if(62===t){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(e=this.piHandler)||void 0===e||e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=13}else 63===t?this.text+="?":(this.text+="?"+String.fromCodePoint(t),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();63!==e?-1!==e&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=33}sXMLDeclName(){const e=this.captureTo(S);if(63===e)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(a(e)||61===e){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=61===e?30:29}}sXMLDeclEq(){const e=this.getCodeNorm();if(63===e)return this.state=33,void this.fail("XML declaration is incomplete.");a(e)||(61!==e&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(63===e)return this.state=33,void this.fail("XML declaration is incomplete.");a(e)||(w(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const e=this.captureTo([this.q,63]);if(63===e)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(-1===e)return;const t=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}sXMLDeclSeparator(){const e=this.getCodeNorm();63!==e?(a(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var e;62===this.getCodeNorm()?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(e=this.xmldeclHandler)||void 0===e||e.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 e;const t=this.captureNameChars();if(-1===t)return;const r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(e=this.openTagStartHandler)||void 0===e||e.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case 62:this.openTag();break;case 47:this.state=35;break;default:a(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){62===this.getCode()?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const e=this.skipSpaces();-1!==e&&(l(e)?(this.unget(),this.state=37):62===e?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();61===e?this.state=39:a(e)?this.state=38:62===e?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):-1!==e&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",62===e?this.openTag():l(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const e=this.getCodeNorm();w(e)?(this.q=e,this.state=40):a(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:e,chunk:t}=this;let{i:r}=this;for(;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=t.slice(r,this.prevI)+" ",r=this.i;break;case 60:return this.text+=t.slice(r,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=t.slice(r))}}sAttribValueClosed(){const e=this.getCodeNorm();a(e)?this.state=36:62===e?this.openTag():47===e?this.state=35:l(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(M);switch(e){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="",62===e?this.openTag():this.state=36}}sCloseTag(){const e=this.captureNameChars();62===e?this.closeTag():a(e)?this.state=44:-1!==e&&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:e,forbiddenState:t}=this;const{chunk:r,textHandler:n}=this;e:for(;;)switch(this.getCode()){case 60:if(this.state=15,void 0!==n){const{text:t}=this,i=r.slice(e,this.prevI);0!==t.length?(n(t+i),this.text=""):0!==i.length&&n(i)}t=0;break e;case 38:this.state=14,this.entityReturnState=13,void 0!==n&&(this.text+=r.slice(e,this.prevI)),t=0;break e;case 93:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:2===t&&this.fail('the string "]]>" is disallowed in char data.'),t=0;break;case-2:void 0!==n&&(this.text+=r.slice(e,this.prevI)+"\n"),e=this.i,t=0;break;case-1:void 0!==n&&(this.text+=r.slice(e));break e;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this;const{chunk:t,textHandler:r}=this;let n=!1;e:for(;;){const i=this.getCode();switch(i){case 60:if(this.state=15,void 0!==r){const{text:n}=this,i=t.slice(e,this.prevI);0!==n.length?(r(n+i),this.text=""):0!==i.length&&r(i)}break e;case 38:this.state=14,this.entityReturnState=13,void 0!==r&&(this.text+=t.slice(e,this.prevI)),n=!0;break e;case-2:void 0!==r&&(this.text+=t.slice(e,this.prevI)+"\n"),e=this.i;break;case-1:void 0!==r&&(this.text+=t.slice(e));break e;default:a(i)||(n=!0)}}n&&(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(e,t){var r;const{prefix:n,local:i}=this.qname(e),s={name:e,prefix:n,local:i,value:t};if(this.attribList.push(s),null===(r=this.attributeHandler)||void 0===r||r.call(this,s),"xmlns"===n){const e=t.trim();"1.0"===this.currentXMLVersion&&""===e&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=e,C(this,i,e)}else if("xmlns"===e){const e=t.trim();this.topNS[""]=e,C(this,"",e)}}pushAttribPlain(e,t){var r;const n={name:e,value:t};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}end(){var e,t;this.sawRoot||this.fail("document must contain a root element.");const{tags:r}=this;for(;r.length>0;){const e=r.pop();this.fail("unclosed tag: "+e.name)}0!==this.state&&13!==this.state&&this.fail("unexpected end.");const{text:n}=this;return 0!==n.length&&(null===(e=this.textHandler)||void 0===e||e.call(this,n),this.text=""),this._closed=!0,null===(t=this.endHandler)||void 0===t||t.call(this),this._init(),this}resolve(e){var t,r;let n=this.topNS[e];if(void 0!==n)return n;const{tags:i}=this;for(let s=i.length-1;s>=0;s--)if(n=i[s].ns[e],void 0!==n)return n;return n=this.ns[e],void 0!==n?n:null===(r=(t=this.opt).resolvePrefix)||void 0===r?void 0:r.call(t,e)}qname(e){const t=e.indexOf(":");if(-1===t)return{prefix:"",local:e};const r=e.slice(t+1),n=e.slice(0,t);return(""===n||""===r||r.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:r}}processAttribsNS(){var e;const{attribList:t}=this,r=this.tag;{const{prefix:t,local:n}=this.qname(r.name);r.prefix=t,r.local=n;const i=r.uri=null!==(e=this.resolve(t))&&void 0!==e?e:"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),r.uri=t))}if(0===t.length)return;const{attributes:n}=r,i=/* @__PURE__ */new Set;for(const s of t){const{name:e,prefix:t,local:r}=s;let a,o;""===t?(a="xmlns"===e?g:"",o=e):(a=this.resolve(t),void 0===a&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),a=t),o=`{${a}}${r}`),i.has(o)&&this.fail(`duplicate attribute: ${o}.`),i.add(o),s.uri=a,n[e]=s}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,t=this.tag.attributes;for(const{name:r,value:n}of e)void 0!==t[r]&&this.fail(`duplicate attribute: ${r}.`),t[r]=n;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:t}=this,r=this.tag;r.isSelfClosing=!1,null===(e=this.openTagHandler)||void 0===e||e.call(this,r),t.push(r),this.state=13,this.name=""}openSelfClosingTag(){var e,t,r;this.processAttribs();const{tags:n}=this,i=this.tag;i.isSelfClosing=!0,null===(e=this.openTagHandler)||void 0===e||e.call(this,i),null===(t=this.closeTagHandler)||void 0===t||t.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:e,name:t}=this;if(this.state=13,this.name="",""===t)return this.fail("weird empty close tag."),void(this.text+="</>");const r=this.closeTagHandler;let n=e.length;for(;n-- >0;){const n=this.tag=e.pop();if(this.topNS=n.ns,r?.(n),n.name===t)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if("#"!==e[0]){const t=this.ENTITIES[e];return void 0!==t?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let t=NaN;return"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),`&${e};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,s=e.length,a=this._len,o=0;o<s;){for(var l=a%i,u=Math.min(s-o,i-l),c=0;c<u;c++)r[l+c]=e[o+c];o+=u,(a+=u)%i==0&&this._update(r)}return this._len+=s,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var s=this._hash();return e?s.toString(e):s},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":494}],498:[function(e,t,r){var n=t.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(e,t,r){var n=e("inherits"),i=e("./hash"),s=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,i.call(this,64,56)}function u(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,o=0|this._d,l=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var f=0;f<80;++f){var d=~~(f/20),p=0|((t=n)<<5|t>>>27)+c(d,i,s,o)+l+r[f]+a[d];l=o,o=s,s=u(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(e,t,r){var n=e("inherits"),i=e("./hash"),s=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,i.call(this,64,56)}function u(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(l,i),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,o=0|this._d,l=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=(t=r[f-3]^r[f-8]^r[f-14]^r[f-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=u(n)+h(p,i,s,o)+l+r[d]+a[p]|0;l=o,o=s,s=c(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=s.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),s=e("./hash"),a=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,s.call(this,64,56)}n(l,i),l.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},l.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=l},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(e,t,r){var n=e("inherits"),i=e("./hash"),s=e("safe-buffer").Buffer,a=[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],o=new Array(64);function l(){this.init(),this._w=o,i.call(this,64,56)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(l,i),l.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},l.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,s=0|this._c,o=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,b=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+d(r[g-15])+r[g-16];for(var y=0;y<64;++y){var v=b+f(l)+u(l,p,m)+a[y]+r[y]|0,w=h(n)+c(n,i,s)|0;b=m,m=p,p=l,l=o+v|0,o=s,s=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=b+this._h|0},l.prototype._hash=function(){var e=s.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),s=e("./hash"),a=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,s.call(this,128,112)}n(l,i),l.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},l.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=l},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(e,t,r){var n=e("inherits"),i=e("./hash"),s=e("safe-buffer").Buffer,a=[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],o=new Array(160);function l(){this.init(),this._w=o,i.call(this,128,112)}function u(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(l,i),l.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},l.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,s=0|this._dh,o=0|this._eh,l=0|this._fh,y=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,x=0|this._cl,k=0|this._dl,S=0|this._el,M=0|this._fl,C=0|this._gl,T=0|this._hl,E=0;E<32;E+=2)t[E]=e.readInt32BE(4*E),t[E+1]=e.readInt32BE(4*E+4);for(;E<160;E+=2){var A=t[E-30],R=t[E-30+1],O=d(A,R),j=p(R,A),I=m(A=t[E-4],R=t[E-4+1]),P=b(R,A),N=t[E-14],B=t[E-14+1],D=t[E-32],F=t[E-32+1],L=j+B|0,z=O+N+g(L,j)|0;z=(z=z+I+g(L=L+P|0,P)|0)+D+g(L=L+F|0,F)|0,t[E]=z,t[E+1]=L}for(var U=0;U<160;U+=2){z=t[U],L=t[U+1];var $=c(r,n,i),V=c(w,_,x),H=h(r,w),q=h(w,r),W=f(o,S),X=f(S,o),K=a[U],Y=a[U+1],Z=u(o,l,y),G=u(S,M,C),J=T+X|0,Q=v+W+g(J,T)|0;Q=(Q=(Q=Q+Z+g(J=J+G|0,G)|0)+K+g(J=J+Y|0,Y)|0)+z+g(J=J+L|0,L)|0;var ee=q+V|0,te=H+$+g(ee,q)|0;v=y,T=C,y=l,C=M,l=o,M=S,o=s+Q+g(S=k+J|0,k)|0,s=i,k=x,i=n,x=_,n=r,_=w,r=Q+te+g(w=J+ee|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+S|0,this._fl=this._fl+M|0,this._gl=this._gl+C|0,this._hl=this._hl+T|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,_)|0,this._ch=this._ch+i+g(this._cl,x)|0,this._dh=this._dh+s+g(this._dl,k)|0,this._eh=this._eh+o+g(this._el,S)|0,this._fh=this._fh+l+g(this._fl,M)|0,this._gh=this._gh+y+g(this._gl,C)|0,this._hh=this._hh+v+g(this._hl,T)|0},l.prototype._hash=function(){var e=s.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=l},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function s(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",s),e._isStdio||t&&!1===t.end||(r.on("end",o),r.on("close",l));var a=!1;function o(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",s),r.removeListener("end",o),r.removeListener("close",l),r.removeListener("error",u),e.removeListener("error",u),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",u),e.on("error",u),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},{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(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],507:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,t,r){var n=e("process-nextick-args"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=h;var s=Object.create(e("core-util-is"));s.inherits=e("inherits");var a=e("./_stream_readable"),o=e("./_stream_writable");s.inherits(h,a);for(var l=i(o.prototype),u=0;u<l.length;u++){var c=l[u];h.prototype[c]||(h.prototype[c]=o.prototype[c])}function h(e){if(!(this instanceof h))return new h(e);a.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(e,t,r){t.exports=s;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function s(e){if(!(this instanceof s))return new s(e);n.call(this,e)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(e,t,r){(function(r,n){(function(){var i=e("process-nextick-args");t.exports=v;var s,a=e("isarray");v.ReadableState=y,e("events").EventEmitter;var o=function(e,t){return e.listeners(t).length},l=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=Object.create(e("core-util-is"));h.inherits=e("inherits");var f=e("util"),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=e("./internal/streams/BufferList"),b=e("./internal/streams/destroy");h.inherits(v,l);var g=["error","close","destroy","pause","resume"];function y(t,r){t=t||{};var n=r instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:o,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=e("string_decoder/").StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(s=s||e("./_stream_duplex"),!(this instanceof v))return new v(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function w(e,t,r,n,i){var s,a,o,l,h,f=e._readableState;return null===t?(f.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}}(e,f)):(i||(a=f,h=o=t,u.isBuffer(h)||h instanceof c||"string"==typeof o||void 0===o||a.objectMode||(l=/* @__PURE__ */new TypeError("Invalid non-string/buffer chunk")),s=l),s?e.emit("error",s):f.objectMode||t&&t.length>0?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n?f.endEmitted?e.emit("error",/* @__PURE__ */new Error("stream.unshift() after end event")):_(e,f,t,!0):f.ended?e.emit("error",/* @__PURE__ */new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?_(e,f,t,!1):M(e,f)):_(e,f,t,!1))):n||(f.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(f)}function _(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),M(e,t)}function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=((r=e)>=8388608?r=8388608:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(S,e):S(e))}function S(e){d("emit readable"),e.emit("readable"),A(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function T(e){d("readable nexttick read 0"),e.read(0)}function E(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){return 0===t.length?null:(t.objectMode?a=t.buffer.shift():!e||e>=t.length?(a=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):(r=e,n=t.buffer,i=t.decoder,r<n.head.data.length?(s=n.head.data.slice(0,r),n.head.data=n.head.data.slice(r)):s=r===n.head.data.length?n.shift():i?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var s=r.data,a=e>s.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}(r,n):function(e,t){var r=u.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}(r,n),a=s),a);var r,n,i,s,a}function O(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(j,t,e))}function j(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function I(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},v.prototype.unshift=function(e){return w(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=e("string_decoder/").StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this},v.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?O(this):k(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&O(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(r,t))),null===(n=e>0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&O(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",/* @__PURE__ */new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=e;break;case 1:s.pipes=[s.pipes,e];break;default:s.pipes.push(e)}s.pipesCount+=1,d("pipe count=%d opts=%j",s.pipesCount,t);var l=t&&!1===t.end||e===r.stdout||e===r.stderr?v:u;function u(){d("onend"),e.end()}s.endEmitted?i.nextTick(l):n.once("end",l),e.on("unpipe",function t(r,i){d("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",g),e.removeListener("finish",y),e.removeListener("drain",h),e.removeListener("error",b),e.removeListener("unpipe",t),n.removeListener("end",u),n.removeListener("end",v),n.removeListener("data",m),f=!0,!s.awaitDrain||e._writableState&&!e._writableState.needDrain||h())});var c,h=(c=n,function(){var e=c._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(c,"data")&&(e.flowing=!0,A(c))});e.on("drain",h);var f=!1,p=!1;function m(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===s.pipesCount&&s.pipes===e||s.pipesCount>1&&-1!==I(s.pipes,e))&&!f&&(d("false write response, pause",s.awaitDrain),s.awaitDrain++,p=!0),n.pause())}function b(t){d("onerror",t),v(),e.removeListener("error",b),0===o(e,"error")&&e.emit("error",t)}function g(){e.removeListener("finish",y),v()}function y(){d("onfinish"),e.removeListener("close",g),v()}function v(){d("unpipe"),n.unpipe(e)}return n.on("data",m),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",b),e.once("close",g),e.once("finish",y),e.emit("pipe",n),s.flowing||(d("pipe resume"),n.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=I(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(T,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(d("resume"),r.flowing=!0,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,i.nextTick(E,e,t))),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<g.length;s++)e.on(g[s],this.emit.bind(this,g[s]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=R}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,r){t.exports=a;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function s(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",/* @__PURE__ */new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush(function(t,r){l(e,t,r)}):l(this,null,null)}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=e("inherits"),i.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(e,t,r){(function(r,n,i){(function(){var s=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}t.exports=y;var o,l=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:s.nextTick;y.WritableState=g;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c,h={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),d=e("safe-buffer").Buffer,p=(void 0!==n?n:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},m=e("./internal/streams/destroy");function b(){}function g(t,r){o=o||e("./_stream_duplex"),t=t||{};var n=r instanceof o;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,u=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===t.decodeStrings),this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r,n=e._writableState,i=n.sync,a=n.writecb;if((r=n).writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)!function(e,t,r,n,i){--t.pendingcb,r?(s.nextTick(i,n),s.nextTick(S,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),S(e,t))}(e,n,i,t,a);else{var o=x(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||_(e,n),i?l(w,e,n,o,a):w(e,n,o,a)}}(r,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 a(this)}function y(t){if(o=o||e("./_stream_duplex"),!(c.call(y,this)||this instanceof o))return new y(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function v(e,t,r,n,i,s,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function w(e,t,r,n){var i,s;r||(i=e,0===(s=t).length&&s.needDrain&&(s.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),S(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var o=0,l=!0;r;)i[o]=r,r.isBuf||(l=!1),r=r.next,o+=1;i.allBuffers=l,v(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,c=r.encoding,h=r.callback;if(v(e,t,!1,t.objectMode?1:u.length,u,c,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),S(e,t)})}function S(e,t){var r,n,i=x(t);return i&&(r=e,(n=t).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,s.nextTick(k,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}u.inherits(y,f),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===y&&e&&e._writableState instanceof g}})):c=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",/* @__PURE__ */new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,i,a=this._writableState,o=!1,l=!a.objectMode&&(n=e,d.isBuffer(n)||n instanceof p);return l&&!d.isBuffer(e)&&(i=e,e=d.from(i)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=b),a.ended?function(e,t){var r=/* @__PURE__ */new Error("write after end");e.emit("error",r),s.nextTick(t,r)}(this,r):(l||function(e,t,r,n){var i=!0,a=!1;return null===r?a=/* @__PURE__ */new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=/* @__PURE__ */new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),s.nextTick(n,a),i=!1),i}(this,a,e,r))&&(a.pendingcb++,o=function(e,t,r,n,i,s){if(!r){var a=(l=n,u=i,(o=t).objectMode||!1===o.decodeStrings||"string"!=typeof l||(l=d.from(l,u)),l);n!==a&&(r=!0,i="buffer",n=a)}var o,l,u,c=t.objectMode?1:n.length;t.length+=c;var h=t.length<t.highWaterMark;if(h||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else v(e,t,!1,c,n,i,s);return h}(this,a,l,e,t,r)),o},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(/* @__PURE__ */new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n,i,a,o=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(n=this,a=r,(i=o).ending=!0,S(n,i),a&&(i.finished?s.nextTick(a):n.once("finish",a)),i.ended=!0,n.writable=!1)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,t,r){var n=e("safe-buffer").Buffer,i=e("util");t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i=n.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=i,r=a,s.data.copy(t,r),a+=s.data.length,s=s.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":520,util:188}],514:[function(e,t,r){var n=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)}),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(e,t,r){arguments[4][490][0].apply(r,arguments)},{dup:490,events:422}],516:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,t,r){(r=t.exports=e("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./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(e,t,r){t.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,t,r){arguments[4][217][0].apply(r,arguments)},{buffer:220,dup:217}],521:[function(e,t,r){arguments[4][218][0].apply(r,arguments)},{dup:218,"safe-buffer":520}],522:[function(e,t,r){arguments[4][218][0].apply(r,arguments)},{dup:218,"safe-buffer":494}],523:[function(e,t,r){(function(t,n){(function(){var i=e("process/browser.js").nextTick,s=Function.prototype.apply,a=Array.prototype.slice,o={},l=0;function u(e,t){this._id=e,this._clearFn=t}r.setTimeout=function(){return new u(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new u(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(e){e.close()},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},r.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},r._unrefActive=r.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof t?t:function(e){var t=l++,n=!(arguments.length<2)&&a.call(arguments,1);return o[t]=!0,i(function(){o[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof n?n:function(e){delete o[e]}}).call(this)}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation"),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],525:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],526:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],527:[function(e,t,r){(function(t,n){(function(){var i=/%[sdj%]/g;r.format=function(e){if(!g(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,s=n.length,a=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),l=n[r];r<s;l=n[++r])m(l)||!w(l)?a+=" "+l:a+=" "+o(l);return a},r.deprecate=function(e,i){if(y(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var s=!1;return function(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation,s=!0}return e.apply(this,arguments)}};var s,a={};function o(e,t){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),c(n,e,n.depth)}function l(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function u(e,t){return e}function c(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return g(i)||(i=c(e,i,n)),i}var s=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,t);if(s)return s;var a,o=Object.keys(t),l=(a={},o.forEach(function(e,t){a[e]=!0}),a);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),x(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(t);if(0===o.length){if(k(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return h(t)}var w,S="",C=!1,T=["{","}"];return d(t)&&(C=!0,T=["[","]"]),k(t)&&(S=" [Function"+(t.name?": "+t.name:"")+"]"),v(t)&&(S=" "+RegExp.prototype.toString.call(t)),_(t)&&(S=" "+Date.prototype.toUTCString.call(t)),x(t)&&(S=" "+h(t)),0!==o.length||C&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),w=C?function(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)M(t,String(a))?s.push(f(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(f(e,t,r,n,i,!0))}),s}(e,t,n,l,o):o.map(function(r){return f(e,t,n,l,r,C)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(w,S,T)):T[0]+S+T[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i,s){var a,o,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?o=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(o=e.stylize("[Setter]","special")),M(n,i)||(a="["+i+"]"),o||(e.seen.indexOf(l.value)<0?(o=m(r)?c(e,l.value,null):c(e,l.value,r-1)).indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n")):o=e.stylize("[Circular]","special")),y(a)){if(s&&i.match(/^\d+$/))return o;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function b(e){return"number"==typeof e}function g(e){return"string"==typeof e}function y(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===S(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===S(e)}function x(e){return w(e)&&("[object Error]"===S(e)||e instanceof Error)}function k(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}r.debuglog=function(e){if(y(s)&&(s=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(s)){t.pid;a[e]=function(){r.format.apply(r,arguments)}}else a[e]=function(){};return a[e]},r.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=m,r.isNullOrUndefined=function(e){return null==e},r.isNumber=b,r.isString=g,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=y,r.isRegExp=v,r.isObject=w,r.isDate=_,r.isError=x,r.isFunction=k,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return h.default}});var n=f(e("./v1.js")),i=f(e("./v3.js")),s=f(e("./v4.js")),a=f(e("./v5.js")),o=f(e("./nil.js")),l=f(e("./version.js")),u=f(e("./validate.js")),c=f(e("./stringify.js")),h=f(e("./parse.js"));function f(e){return e&&e.__esModule?e:{default:e}}},{"./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(e,t,r){function n(e){return 14+(e+64>>>9<<4)+1}function i(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function s(e,t,r,n,s,a){return i((o=i(i(t,e),i(n,a)))<<(l=s)|o>>>32-l,r);var o,l}function a(e,t,r,n,i,a,o){return s(t&r|~t&n,e,t,i,a,o)}function o(e,t,r,n,i,a,o){return s(t&n|r&~n,e,t,i,a,o)}function l(e,t,r,n,i,a,o){return s(t^r^n,e,t,i,a,o)}function u(e,t,r,n,i,a,o){return s(r^(t|~n),e,t,i,a,o)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r<t.length;++r)e[r]=t.charCodeAt(r)}return function(e){const t=[],r=32*e.length;for(let n=0;n<r;n+=8){const r=e[n>>5]>>>n%32&255,i=parseInt("0123456789abcdef".charAt(r>>>4&15)+"0123456789abcdef".charAt(15&r),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[n(t)-1]=t;let r=1732584193,s=-271733879,c=-1732584194,h=271733878;for(let n=0;n<e.length;n+=16){const t=r,f=s,d=c,p=h;r=a(r,s,c,h,e[n],7,-680876936),h=a(h,r,s,c,e[n+1],12,-389564586),c=a(c,h,r,s,e[n+2],17,606105819),s=a(s,c,h,r,e[n+3],22,-1044525330),r=a(r,s,c,h,e[n+4],7,-176418897),h=a(h,r,s,c,e[n+5],12,1200080426),c=a(c,h,r,s,e[n+6],17,-1473231341),s=a(s,c,h,r,e[n+7],22,-45705983),r=a(r,s,c,h,e[n+8],7,1770035416),h=a(h,r,s,c,e[n+9],12,-1958414417),c=a(c,h,r,s,e[n+10],17,-42063),s=a(s,c,h,r,e[n+11],22,-1990404162),r=a(r,s,c,h,e[n+12],7,1804603682),h=a(h,r,s,c,e[n+13],12,-40341101),c=a(c,h,r,s,e[n+14],17,-1502002290),s=a(s,c,h,r,e[n+15],22,1236535329),r=o(r,s,c,h,e[n+1],5,-165796510),h=o(h,r,s,c,e[n+6],9,-1069501632),c=o(c,h,r,s,e[n+11],14,643717713),s=o(s,c,h,r,e[n],20,-373897302),r=o(r,s,c,h,e[n+5],5,-701558691),h=o(h,r,s,c,e[n+10],9,38016083),c=o(c,h,r,s,e[n+15],14,-660478335),s=o(s,c,h,r,e[n+4],20,-405537848),r=o(r,s,c,h,e[n+9],5,568446438),h=o(h,r,s,c,e[n+14],9,-1019803690),c=o(c,h,r,s,e[n+3],14,-187363961),s=o(s,c,h,r,e[n+8],20,1163531501),r=o(r,s,c,h,e[n+13],5,-1444681467),h=o(h,r,s,c,e[n+2],9,-51403784),c=o(c,h,r,s,e[n+7],14,1735328473),s=o(s,c,h,r,e[n+12],20,-1926607734),r=l(r,s,c,h,e[n+5],4,-378558),h=l(h,r,s,c,e[n+8],11,-2022574463),c=l(c,h,r,s,e[n+11],16,1839030562),s=l(s,c,h,r,e[n+14],23,-35309556),r=l(r,s,c,h,e[n+1],4,-1530992060),h=l(h,r,s,c,e[n+4],11,1272893353),c=l(c,h,r,s,e[n+7],16,-155497632),s=l(s,c,h,r,e[n+10],23,-1094730640),r=l(r,s,c,h,e[n+13],4,681279174),h=l(h,r,s,c,e[n],11,-358537222),c=l(c,h,r,s,e[n+3],16,-722521979),s=l(s,c,h,r,e[n+6],23,76029189),r=l(r,s,c,h,e[n+9],4,-640364487),h=l(h,r,s,c,e[n+12],11,-421815835),c=l(c,h,r,s,e[n+15],16,530742520),s=l(s,c,h,r,e[n+2],23,-995338651),r=u(r,s,c,h,e[n],6,-198630844),h=u(h,r,s,c,e[n+7],10,1126891415),c=u(c,h,r,s,e[n+14],15,-1416354905),s=u(s,c,h,r,e[n+5],21,-57434055),r=u(r,s,c,h,e[n+12],6,1700485571),h=u(h,r,s,c,e[n+3],10,-1894986606),c=u(c,h,r,s,e[n+10],15,-1051523),s=u(s,c,h,r,e[n+1],21,-2054922799),r=u(r,s,c,h,e[n+8],6,1873313359),h=u(h,r,s,c,e[n+15],10,-30611744),c=u(c,h,r,s,e[n+6],15,-1560198380),s=u(s,c,h,r,e[n+13],21,1309151649),r=u(r,s,c,h,e[n+4],6,-145523070),h=u(h,r,s,c,e[n+11],10,-1120210379),c=u(c,h,r,s,e[n+2],15,718787259),s=u(s,c,h,r,e[n+9],21,-343485551),r=i(r,t),s=i(s,f),c=i(c,d),h=i(h,p)}return[r,s,c,h]}(function(e){if(0===e.length)return[];const t=8*e.length,r=new Uint32Array(n(t));for(let n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}},{}],530:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};r.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},{"./validate.js":541}],532:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.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(e,t,r){let n;Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)};const i=new Uint8Array(16)},{}],534:[function(e,t,r){function n(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function i(e,t){return e<<t|e>>>32-t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const s=e.length/4+2,a=Math.ceil(s/16),o=new Array(a);for(let n=0;n<a;++n){const t=new Uint32Array(16);for(let r=0;r<16;++r)t[r]=e[64*n+4*r]<<24|e[64*n+4*r+1]<<16|e[64*n+4*r+2]<<8|e[64*n+4*r+3];o[n]=t}o[a-1][14]=8*(e.length-1)/Math.pow(2,32),o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=8*(e.length-1)&4294967295;for(let l=0;l<a;++l){const e=new Uint32Array(80);for(let t=0;t<16;++t)e[t]=o[l][t];for(let t=16;t<80;++t)e[t]=i(e[t-3]^e[t-8]^e[t-14]^e[t-16],1);let s=r[0],a=r[1],u=r[2],c=r[3],h=r[4];for(let r=0;r<80;++r){const o=Math.floor(r/20),l=i(s,5)+n(o,a,u,c)+h+t[o]+e[r]>>>0;h=c,c=u,u=i(a,30)>>>0,a=s,s=l}r[0]=r[0]+s>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+u>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+h>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}},{}],535:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};const s=[];for(let a=0;a<256;++a)s.push((a+256).toString(16).substr(1));r.default=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r}},{"./validate.js":541}],536:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./rng.js")),i=s(e("./stringify.js"));function s(e){return e&&e.__esModule?e:{default:e}}let a,o,l=0,u=0;r.default=function(e,t,r){let s=t&&r||0;const c=t||new Array(16);let h=(e=e||{}).node||a,f=void 0!==e.clockseq?e.clockseq:o;if(null==h||null==f){const t=e.random||(e.rng||n.default)();h??=a=[1|t[0],t[1],t[2],t[3],t[4],t[5]],f??=o=16383&(t[6]<<8|t[7])}let d=void 0!==e.msecs?e.msecs:Date.now(),p=void 0!==e.nsecs?e.nsecs:u+1;const m=d-l+(p-u)/1e4;if(m<0&&void 0===e.clockseq&&(f=f+1&16383),(m<0||d>l)&&void 0===e.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=d,u=p,o=f,d+=122192928e5;const b=(1e4*(268435455&d)+p)%4294967296;c[s++]=b>>>24&255,c[s++]=b>>>16&255,c[s++]=b>>>8&255,c[s++]=255&b;const g=d/4294967296*1e4&268435455;c[s++]=g>>>8&255,c[s++]=255&g,c[s++]=g>>>24&15|16,c[s++]=g>>>16&255,c[s++]=f>>>8|128,c[s++]=255&f;for(let n=0;n<6;++n)c[s+n]=h[n];return t||(0,i.default)(c)}},{"./rng.js":533,"./stringify.js":535}],537:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./v35.js")),i=s(e("./md5.js"));function s(e){return e&&e.__esModule?e:{default:e}}r.default=(0,n.default)("v3",48,i.default)},{"./md5.js":529,"./v35.js":538}],538:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,t,r){function s(e,s,a,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof s&&(s=(0,i.default)(s)),16!==s.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+e.length);if(l.set(s),l.set(e,s.length),l=r(l),l[6]=15&l[6]|t,l[8]=63&l[8]|128,a){o=o||0;for(let e=0;e<16;++e)a[o+e]=l[e];return a}return(0,n.default)(l)}try{s.name=e}catch(l){}return s.DNS=a,s.URL=o,s},r.URL=r.DNS=void 0;var n=s(e("./stringify.js")),i=s(e("./parse.js"));function s(e){return e&&e.__esModule?e:{default:e}}const a="6ba7b810-9dad-11d1-80b4-00c04fd430c8";r.DNS=a;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";r.URL=o},{"./parse.js":531,"./stringify.js":535}],539:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./rng.js")),i=s(e("./stringify.js"));function s(e){return e&&e.__esModule?e:{default:e}}r.default=function(e,t,r){const s=(e=e||{}).random||(e.rng||n.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=s[e];return t}return(0,i.default)(s)}},{"./rng.js":533,"./stringify.js":535}],540:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=s(e("./v35.js")),i=s(e("./sha1.js"));function s(e){return e&&e.__esModule?e:{default:e}}r.default=(0,n.default)("v5",80,i.default)},{"./sha1.js":534,"./v35.js":538}],541:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./regex.js"))&&n.__esModule?n:{default:n};r.default=function(e){return"string"==typeof e&&i.default.test(e)}},{"./regex.js":532}],542:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};r.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},{"./validate.js":541}],543:[function(e,t,r){function n(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}
3
+ /**
4
+ * Character classes and associated utilities for the 5th edition of XML 1.0.
5
+ *
6
+ * @author Louis-Dominique Dubeau
7
+ * @license MIT
8
+ * @copyright Louis-Dominique Dubeau
9
+ */
10
+ Object.defineProperty(r,"__esModule",{value:!0}),r.CHAR="\t\n\r -퟿-�𐀀-􏿿",r.S=" \t\r\n",r.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",r.NAME_CHAR="-"+r.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",r.CHAR_RE=new RegExp("^["+r.CHAR+"]$","u"),r.S_RE=new RegExp("^["+r.S+"]+$","u"),r.NAME_START_CHAR_RE=new RegExp("^["+r.NAME_START_CHAR+"]$","u"),r.NAME_CHAR_RE=new RegExp("^["+r.NAME_CHAR+"]$","u"),r.NAME_RE=new RegExp("^["+r.NAME_START_CHAR+"]["+r.NAME_CHAR+"]*$","u"),r.NMTOKEN_RE=new RegExp("^["+r.NAME_CHAR+"]+$","u"),r.S_LIST=[32,10,13,9],r.isChar=function(e){return e>=32&&e<=55295||10===e||13===e||9===e||e>=57344&&e<=65533||e>=65536&&e<=1114111},r.isS=function(e){return 32===e||10===e||13===e||9===e},r.isNameStartChar=n,r.isNameChar=function(e){return n(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},{}],544:[function(e,t,r){function n(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}
11
+ /**
12
+ * Character classes and associated utilities for the 2nd edition of XML 1.1.
13
+ *
14
+ * @author Louis-Dominique Dubeau
15
+ * @license MIT
16
+ * @copyright Louis-Dominique Dubeau
17
+ */
18
+ Object.defineProperty(r,"__esModule",{value:!0}),r.CHAR="-퟿-�𐀀-􏿿",r.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",r.S=" \t\r\n",r.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",r.NAME_CHAR="-"+r.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",r.CHAR_RE=new RegExp("^["+r.CHAR+"]$","u"),r.RESTRICTED_CHAR_RE=new RegExp("^["+r.RESTRICTED_CHAR+"]$","u"),r.S_RE=new RegExp("^["+r.S+"]+$","u"),r.NAME_START_CHAR_RE=new RegExp("^["+r.NAME_START_CHAR+"]$","u"),r.NAME_CHAR_RE=new RegExp("^["+r.NAME_CHAR+"]$","u"),r.NAME_RE=new RegExp("^["+r.NAME_START_CHAR+"]["+r.NAME_CHAR+"]*$","u"),r.NMTOKEN_RE=new RegExp("^["+r.NAME_CHAR+"]+$","u"),r.S_LIST=[32,10,13,9],r.isChar=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},r.isRestrictedChar=function(e){return e>=1&&e<=8||11===e||12===e||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159},r.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||e>31&&e<127||133===e||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},r.isS=function(e){return 32===e||10===e||13===e||9===e},r.isNameStartChar=n,r.isNameChar=function(e){return n(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},{}],545:[function(e,t,r){
19
+ /**
20
+ * Character class utilities for XML NS 1.0 edition 3.
21
+ *
22
+ * @author Louis-Dominique Dubeau
23
+ * @license MIT
24
+ * @copyright Louis-Dominique Dubeau
25
+ */
26
+ function n(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(r,"__esModule",{value:!0}),r.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",r.NC_NAME_CHAR="-"+r.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",r.NC_NAME_START_CHAR_RE=new RegExp("^["+r.NC_NAME_START_CHAR+"]$","u"),r.NC_NAME_CHAR_RE=new RegExp("^["+r.NC_NAME_CHAR+"]$","u"),r.NC_NAME_RE=new RegExp("^["+r.NC_NAME_START_CHAR+"]["+r.NC_NAME_CHAR+"]*$","u"),r.isNCNameStartChar=n,r.isNCNameChar=function(e){return n(e)||45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},{}]},{},[15])(15)})})();var lt={class:"mp-enhance-button"},ut=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},ct=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpEnhanceButton",__name:"enhance-button",props:nt,emits:it,setup(e,{emit:i}){const a=c(),o=e,u=i,h=D(),d=P(),p=t(()=>Boolean(a?.vnode?.props?.onClick||a?.vnode?.props?.onclick)),m=t(()=>o.disabled||!p.value&&!o.value);async function b(e){u("copied",await at(o.value),e)}return(e,t)=>(k(),r(I(Ee),{placement:"top",disabled:!(!o.disabled&&!o.value),"show-after":300},{default:$(()=>[s("section",lt,[(k(),r(A(f(I(X),{...o,...I(d),disabled:m.value,onClick:e=>function(e){p.value?u("click",e):b(e)}(e)},I(h))))),p.value?(k(),r(I(X),{key:0,link:"",class:"mp-enhance-button__copy",type:o?.type,size:o?.size,disabled:!o.value,onClick:b},{default:$(()=>[l(I(ae),{size:o.copySize},{default:$(()=>[l(I(Ue))]),_:1},8,["size"])]),_:1},8,["type","size","disabled"])):n("",!0)])]),content:$(()=>[...t[0]||(t[0]=[s("span",null,"复制目标内容为空",-1)])]),_:1},8,["disabled"]))}}),[["__scopeId","data-v-dfbefb7f"]]);const ht=et(/* @__PURE__ */u({name:"MpButton",__name:"button",props:nt,emits:it,setup(e,{emit:n}){const i=c(),s=e,a=P(),o=D(),l=t(()=>tt.includes(s.enhance));return(e,t)=>l.value?(k(),r(A(f(ct,{...s,...I(a),...I(i)?.vnode?.props||{}},I(o))),{key:0})):(k(),r(A(f(I(X),{...s,...I(a),value:"",enhance:"",copySize:"",default:""},I(o))),{key:1}))}})),ft=Symbol("__MpConfiguration__"),dt={},pt={};const mt=et(/* @__PURE__ */u({name:"MpConfiguration",__name:"configuration",props:dt,emits:pt,setup:e=>(S(ft,{configuration:M({}),pageQueue:M({}),layout:M({size:null,currentRem:16}),theme:M({})}),(e,t)=>E(e.$slots,"default"))}));const bt={name:{type:String,default:""},type:{type:String,values:["","material","fa","mdi","fa5","fa5pro","fa5duotone"],default:""},path:{type:String,default:""},size:{type:Number,default:16},viewbox:{type:String},flip:{type:String},rotate:{type:Object}},gt={};var yt={inited:!1,value:{}};async function vt(){if(!yt.inited){const e={...await import("@mdi/js")||{},default:""};yt.inited||(yt.value=e,yt.inited=!0)}return p(yt.value)}var wt=/* @__PURE__ */u({name:"MpIcon",__name:"icon",props:bt,emits:gt,setup(e){const i=e,s=R({}),a=t(()=>s.value[i?.name]||"");return async function(){s.value=await vt()}(),(e,t)=>a.value?(k(),r(I(He),b({key:0},i,{path:a.value,type:"mdi",class:"mp-icon"}),null,16,["path"])):n("",!0)}});const _t=et(wt);var xt=_t;const kt=["none","default","string[enter]"],St={...Ne,type:{type:String,values:kt,default:"none"},appendTo:{type:String,default:"body"}},Mt={...Pe},Ct={type:{type:String,values:kt,default:"default"},value:{type:String,default:""}},Tt={};async function Et(e,t,r){const n={modal:!1,appendToBody:!0,destroyOnClose:!0,draggable:!0,overflow:!0,...r||{},class:["mp-hook-dialog",r?.class||""].filter(Boolean).join(" "),headerClass:["mp-hook-dialog-header",r?.headerClass||""].filter(Boolean).join(" "),bodyClass:["mp-hook-dialog-body",r?.bodyClass||""].filter(Boolean).join(" "),footerClass:["mp-hook-dialog-footer",r?.footerClass||""].filter(Boolean).join(" "),onClosed:function(){r?.onClosed?.(),function(e){requestAnimationFrame(()=>{C(null,e),e.remove()})}(a)},showFooter:!!r?.showFooter,showConfirmButton:!0,showCancelButton:!0,confirmButtonText:r?.confirmButtonText??"确定",cancelButtonText:r?.cancelButtonText??"取消"};let i=null;const s=new Promise(e=>i=e),a=function(e,t){const r=jt(),n=document.createElement("div");return Rt.set(n,t),r.appendChild(n),C(e,n),n}(f({setup(){const s=M(void 0===n?.modelValue||n?.modelValue),a=M(null),o=R(()=>!0),l=M(!1);let u=R(null);async function c(){try{l.value=!0,u.value=await o.value(),(void 0===u.value||u.value)&&(i?.(u.value),s.value=!1)}catch(e){}finally{l.value=!1}}return S(Ot,{ref:a,confirm:c,getDialogStatus:()=>s.value,openDialog:()=>{s.value=!0},closeDialog:()=>{s.value=!1},subscribeConfirmEvent:e=>{o.value=e}}),()=>f(te,{...n,modelValue:s.value,"onUpdate:modelValue":e=>{s.value=e},onVnodeMounted(e){a.value=e?.component?.exposeProxy||null}},{default:()=>f(e,t),header:()=>r?.headerSlot?r.headerSlot:r?.type?f("div",{class:"flex items-center gap-1"},[f(Te,{type:r?.type}),f("span",{},n?.title||"提示")]):null,footer:()=>n.showFooter?f("div",{class:"flex justify-end items-center gap-4 p-4! pt-0!"},[r?.footerStartExtra||null,n.showConfirmButton?f(X,{type:"primary",class:"m-0!",loading:l.value,onClick:c},()=>n.confirmButtonText):null,n.showCancelButton?f(X,{type:"default",class:"m-0!",onClick:()=>{s.value=!1}},()=>n.cancelButtonText):null,r?.footerEndExtra||null]):null})}}),{id:crypto.randomUUID(),type:"dialog",props:t,configs:n});return s}const At="mp-popups-container",Rt=/* @__PURE__ */new WeakMap,Ot=Symbol("__POPUP_PROVIDE_NAME__");function jt(){const e=document.querySelector(`body > div.${At.toString()}`);return e||function(){const e=document.createElement("div");return e.classList.add(`${At.toString()}`),document?.querySelector?.(`body > div.${"mp-popups-container".toString()}`)||document.body.appendChild(e),e}()}new Proxy([],{get:(e,t)=>Reflect.get(e,t),set:()=>!1});var It=`Global-Image-Preview-${window.crypto.randomUUID()||Date.now().toString(36).slice(2)}`,Pt=M([]),Nt=R(null);async function Bt(e){await async function(){if(document.querySelector(`#${It}`))return;const e=f({setup(){function e(e){Nt.value=e}return()=>f(oe,{src:Pt.value?.[0]||"",previewSrcList:Pt.value,previewTeleported:!0,zIndex:9999,fit:"contain",id:It,ref:e,teleported:!0,style:{width:0,height:0,position:"fixed",overflow:"hidden",top:"-999px",left:"-999px"}})}}),t=jt(),r=document.createElement("div");t.appendChild(r),C(e,r)}(),Nt.value&&e?.length&&(Pt.value=e,requestIdleCallback(()=>{Nt.value?.showPreview?.()}))}var Dt={class:"morningfast-plus-input-extra"},Ft=/* @__PURE__ */u({name:"MpInputExtra",__name:"extra",props:Ct,emits:Tt,setup(e,{emit:r}){const n=d(Ot),s=F("inputRef"),a={default:"请输入内容","string[enter]":"请输入内容(回车为分隔符)"},o=e,u=t(()=>a?.[o?.type||"default"]||""),c=M("");function h(){return{value:f(c.value)}}function f(e){return"string[enter]"===o.type?e.trim().split("\n")?.filter(Boolean)?.join(","):e}return x(()=>{requestIdleCallback(()=>{n?.subscribeConfirmEvent(h),s.value?.focus?.(),c.value="default"!==o?.type?"string[enter]"===o?.type?String(o?.value||"").split(",").map(e=>e.trim()).filter(Boolean).join("\n"):o?.value||"":o.value||""})}),(e,t)=>(k(),i("section",Dt,[l(I(le),{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=e=>c.value=e),ref_key:"inputRef",ref:s,rows:6,type:"textarea",placeholder:u.value,"validate-event":!1},null,8,["modelValue","placeholder"])]))}}),Lt={class:"mp-input-suffix"};const zt=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpInput",__name:"input",props:/* @__PURE__ */m(St,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(Mt,["update:modelValue"]),setup(e,{emit:n}){const i=c(),a=e,o=P(),u=B(e,"modelValue"),h=t(()=>a?.placeholder||["default","none"].includes(a?.type)?"请输入内容":"请输入内容(逗号为分隔符)"),f=t(()=>({default:24,small:16,large:32}?.[o?.size||"default"]||0));async function d(){u.value=(await Et(Ft,{type:a?.type||"default",value:String(a?.modelValue||"")},{showFooter:!0,title:"输入框扩展",width:"450px"}))?.value||""}return(e,t)=>(k(),r(I(le),b({...I(o),...a,...I(i)?.vnode?.props||{}},{placeholder:h.value,class:"mp-input"}),{suffix:$(()=>[s("div",Lt,[E(e.$slots,"suffix-before",{},void 0,!0),V(l(I(_t),{class:"mp-input-icon",name:"mdiArrowBottomRightBoldBoxOutline",size:f.value,onClick:d},null,8,["size"]),[[z,"none"!==e.type]]),E(e.$slots,"suffix-after",{},void 0,!0)])]),_:3},16,["placeholder"]))}}),[["__scopeId","data-v-8cc4408f"]])),Ut=["small","default","medium","large"],$t={content:{type:String,default:"加载中 . . ."},autoPlay:{type:Boolean,default:!0},size:{type:String,default:"default",values:Ut},forceSize:{type:Number,default:-1}},Vt={};var Ht={class:"mp-plus-loading"};const qt=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpLoading",__name:"loading",props:$t,emits:Vt,setup(e,{expose:r}){N(e=>({v5c338038:u.value}));const n=e,a=F("textRef"),o={small:.6,default:1,medium:1.4,large:1.8},l=R(null),u=t(()=>(n?.forceSize>=0?n?.forceSize:1.5*(o[n.size]||1)).toFixed(2)+"rem");function c(){l.value?.pause?.(),l.value=qe(Xe.splitText(a.value,{words:!1,chars:!0})?.chars,{y:[{to:"-2.75rem",ease:"outExpo",duration:600},{to:0,ease:"outBounce",duration:800,delay:100}],rotate:{from:"-1turn",delay:0},delay:We(50),ease:"inOutCirc",loopDelay:1e3,loop:!0}),n.autoPlay&&l.value?.play?.()}return U(()=>n.content,c,{flush:"post"}),r({play:function(){l.value?.play()},stop:function(){l.value?.pause()}}),x(c),(e,t)=>(k(),i("section",Ht,[s("span",{ref:"textRef"},O(n.content),513)]))}}),[["__scopeId","data-v-c32b805e"]]));var Wt=qt;const Xt={NORMAL:1,FIXED:2,AFFIX:4,HOME:8},Kt={LIST:1,FORM_CREATE:2,FORM_EDIT:4,FORM_READONLY:8,CHART:16,EXCEL:32,CUSTOM:64},Yt={modelValue:{type:[Object,null],required:!1},defaultValue:{type:Object,required:!1},showHome:{type:Boolean,default:!0},router:{type:Object,default:null,required:!0},proxy:{type:Boolean,default:!1}},Zt={"update:modelValue":e=>!0,change:e=>!0};function Gt(e){return e&&"object"==typeof e&&Array.isArray(e.tabs)&&"object"==typeof e.tabMap}function Jt(){return{id:`mp_page_manager_tab_${window.crypto.randomUUID()}-${Date.now().toString()}-${window.crypto.randomUUID()}`,title:"",type:Xt.NORMAL,sort:1,pages:[]}}function Qt(){return{id:`mp_page_manager_page_${window.crypto.randomUUID()}-${Date.now().toString()}-${window.crypto.randomUUID()}`,parentId:"",name:"",type:Kt.CUSTOM,history:[],originRoute:null}}function er(e,t){const r=Jt(),n=Qt();return n.name=e?.name||e?.originRoute?.meta?.title||"未命名页面",n.originRoute=e?.originRoute||null,n.type=e?.type||Kt.CUSTOM,n.parentId=r.id,r.title=n.name,r.type=t?.type||Xt.NORMAL,r.pages.push(n),r}function tr(e,t){return e.pages.push(t),e.title=t.name,e}function rr(e,t){return e.pages.splice(e.pages.indexOf(t),1),e.title=e.pages.length>0?e.pages[e.pages.length-1].name:"",e}function nr(){const e=Jt(),t=Qt();t.name="主页",t.type=Kt.CUSTOM,t.originRoute=null,e.title=t.name,e.type=Xt.HOME,e.pages.push(t);const r={activeTabId:"",activePageId:"",tabs:[e],tabMap:{}};return r.tabMap[r.tabs[0].id]=r.tabs[0],r.activePageId=r.tabs[0].pages[0].id,r.activeTabId=r.tabs[0].id,r}function ir(e){return Array.isArray(e)?[...e].sort((e,t)=>e.sort-t.sort):[]}var sr="object"==typeof global&&global&&global.Object===Object&&global,ar="object"==typeof self&&self&&self.Object===Object&&self,or=sr||ar||Function("return this")(),lr=or.Symbol,ur=Object.prototype,cr=ur.hasOwnProperty,hr=ur.toString,fr=lr?lr.toStringTag:void 0;var dr=function(e){var t=cr.call(e,fr),r=e[fr];try{e[fr]=void 0;var n=!0}catch(s){}var i=hr.call(e);return n&&(t?e[fr]=r:delete e[fr]),i},pr=Object.prototype.toString;var mr=function(e){return pr.call(e)},br=lr?lr.toStringTag:void 0;var gr=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":br&&br in Object(e)?dr(e):mr(e)};var yr=function(e){return null!=e&&"object"==typeof e};var vr=function(e){return"symbol"==typeof e||yr(e)&&"[object Symbol]"==gr(e)};var wr=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i},_r=Array.isArray,xr=lr?lr.prototype:void 0,kr=xr?xr.toString:void 0;var Sr=function e(t){if("string"==typeof t)return t;if(_r(t))return wr(t,e)+"";if(vr(t))return kr?kr.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r};var Mr=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Cr=function(e){return e};var Tr,Er=function(e){if(!Mr(e))return!1;var t=gr(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Ar=or["__core-js_shared__"],Rr=(Tr=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||""))?"Symbol(src)_1."+Tr:"";var Or=function(e){return!!Rr&&Rr in e},jr=Function.prototype.toString;var Ir=function(e){if(null!=e){try{return jr.call(e)}catch(t){}try{return e+""}catch(t){}}return""},Pr=/^\[object .+?Constructor\]$/,Nr=Function.prototype,Br=Object.prototype,Dr=Nr.toString,Fr=Br.hasOwnProperty,Lr=RegExp("^"+Dr.call(Fr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var zr=function(e){return!(!Mr(e)||Or(e))&&(Er(e)?Lr:Pr).test(Ir(e))};var Ur=function(e,t){return null==e?void 0:e[t]};var $r=function(e,t){var r=Ur(e,t);return zr(r)?r:void 0},Vr=$r(or,"WeakMap"),Hr=function(){try{var e=$r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),qr=/^(?:0|[1-9]\d*)$/;var Wr=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&qr.test(e))&&e>-1&&e%1==0&&e<t};var Xr=function(e,t,r){"__proto__"==t&&Hr?Hr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r};var Kr=function(e,t){return e===t||e!=e&&t!=t};var Yr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Zr=function(e){return null!=e&&Yr(e.length)&&!Er(e)},Gr=Object.prototype;var Jr=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Gr)};var Qr=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var en=function(e){return yr(e)&&"[object Arguments]"==gr(e)},tn=Object.prototype,rn=tn.hasOwnProperty,nn=tn.propertyIsEnumerable,sn=en(function(){return arguments}())?en:function(e){return yr(e)&&rn.call(e,"callee")&&!nn.call(e,"callee")};var an=function(){return!1},on="object"==typeof exports&&exports&&!exports.nodeType&&exports,ln=on&&"object"==typeof module&&module&&!module.nodeType&&module,un=ln&&ln.exports===on?or.Buffer:void 0,cn=(un?un.isBuffer:void 0)||an,hn={};hn["[object Float32Array]"]=hn["[object Float64Array]"]=hn["[object Int8Array]"]=hn["[object Int16Array]"]=hn["[object Int32Array]"]=hn["[object Uint8Array]"]=hn["[object Uint8ClampedArray]"]=hn["[object Uint16Array]"]=hn["[object Uint32Array]"]=!0,hn["[object Arguments]"]=hn["[object Array]"]=hn["[object ArrayBuffer]"]=hn["[object Boolean]"]=hn["[object DataView]"]=hn["[object Date]"]=hn["[object Error]"]=hn["[object Function]"]=hn["[object Map]"]=hn["[object Number]"]=hn["[object Object]"]=hn["[object RegExp]"]=hn["[object Set]"]=hn["[object String]"]=hn["[object WeakMap]"]=!1;var fn=function(e){return yr(e)&&Yr(e.length)&&!!hn[gr(e)]};var dn=function(e){return function(t){return e(t)}},pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,mn=pn&&"object"==typeof module&&module&&!module.nodeType&&module,bn=mn&&mn.exports===pn&&sr.process,gn=function(){try{var e=mn&&mn.require&&mn.require("util").types;return e||bn&&bn.binding&&bn.binding("util")}catch(t){}}(),yn=gn&&gn.isTypedArray,vn=yn?dn(yn):fn,wn=Object.prototype.hasOwnProperty;var _n=function(e,t){var r=_r(e),n=!r&&sn(e),i=!r&&!n&&cn(e),s=!r&&!n&&!i&&vn(e),a=r||n||i||s,o=a?Qr(e.length,String):[],l=o.length;for(var u in e)!t&&!wn.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Wr(u,l))||o.push(u);return o};var xn=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),kn=Object.prototype.hasOwnProperty;var Sn=function(e){if(!Jr(e))return xn(e);var t=[];for(var r in Object(e))kn.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Mn=function(e){return Zr(e)?_n(e):Sn(e)},Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tn=/^\w*$/;var En=function(e,t){if(_r(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!vr(e))||(Tn.test(e)||!Cn.test(e)||null!=t&&e in Object(t))},An=$r(Object,"create");var Rn=function(){this.__data__=An?An(null):{},this.size=0};var On=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jn=Object.prototype.hasOwnProperty;var In=function(e){var t=this.__data__;if(An){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return jn.call(t,e)?t[e]:void 0},Pn=Object.prototype.hasOwnProperty;var Nn=function(e){var t=this.__data__;return An?void 0!==t[e]:Pn.call(t,e)};var Bn=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=An&&void 0===t?"__lodash_hash_undefined__":t,this};function Dn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Dn.prototype.clear=Rn,Dn.prototype.delete=On,Dn.prototype.get=In,Dn.prototype.has=Nn,Dn.prototype.set=Bn;var Fn=Dn;var Ln=function(){this.__data__=[],this.size=0};var zn=function(e,t){for(var r=e.length;r--;)if(Kr(e[r][0],t))return r;return-1},Un=Array.prototype.splice;var $n=function(e){var t=this.__data__,r=zn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Un.call(t,r,1),--this.size,!0)};var Vn=function(e){var t=this.__data__,r=zn(t,e);return r<0?void 0:t[r][1]};var Hn=function(e){return zn(this.__data__,e)>-1};var qn=function(e,t){var r=this.__data__,n=zn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Wn(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wn.prototype.clear=Ln,Wn.prototype.delete=$n,Wn.prototype.get=Vn,Wn.prototype.has=Hn,Wn.prototype.set=qn;var Xn=Wn,Kn=$r(or,"Map");var Yn=function(){this.size=0,this.__data__={hash:new Fn,map:new(Kn||Xn),string:new Fn}};var Zn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Gn=function(e,t){var r=e.__data__;return Zn(t)?r["string"==typeof t?"string":"hash"]:r.map};var Jn=function(e){var t=Gn(this,e).delete(e);return this.size-=t?1:0,t};var Qn=function(e){return Gn(this,e).get(e)};var ei=function(e){return Gn(this,e).has(e)};var ti=function(e,t){var r=Gn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ri(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ri.prototype.clear=Yn,ri.prototype.delete=Jn,ri.prototype.get=Qn,ri.prototype.has=ei,ri.prototype.set=ti;var ni=ri;function ii(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(ii.Cache||ni),r}ii.Cache=ni;var si=ii;var ai=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oi=/\\(\\)?/g,li=function(e){var t=si(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ai,function(e,r,n,i){t.push(n?i.replace(oi,"$1"):r||e)}),t});var ui=function(e){return null==e?"":Sr(e)};var ci=function(e,t){return _r(e)?e:En(e,t)?[e]:li(ui(e))};var hi=function(e){if("string"==typeof e||vr(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var fi=function(e,t){for(var r=0,n=(t=ci(t,e)).length;null!=e&&r<n;)e=e[hi(t[r++])];return r&&r==n?e:void 0};var di=function(e,t,r){var n=null==e?void 0:fi(e,t);return void 0===n?r:n};var pi=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e};var mi=function(){this.__data__=new Xn,this.size=0};var bi=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var gi=function(e){return this.__data__.get(e)};var yi=function(e){return this.__data__.has(e)};var vi=function(e,t){var r=this.__data__;if(r instanceof Xn){var n=r.__data__;if(!Kn||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ni(n)}return r.set(e,t),this.size=r.size,this};function wi(e){this.size=(this.__data__=new Xn(e)).size}wi.prototype.clear=mi,wi.prototype.delete=bi,wi.prototype.get=gi,wi.prototype.has=yi,wi.prototype.set=vi;var _i=wi;var xi=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s};var ki=function(){return[]},Si=Object.prototype.propertyIsEnumerable,Mi=Object.getOwnPropertySymbols,Ci=Mi?function(e){return null==e?[]:(e=Object(e),xi(Mi(e),function(t){return Si.call(e,t)}))}:ki;var Ti=function(e,t,r){var n=t(e);return _r(e)?n:pi(n,r(e))};var Ei=function(e){return Ti(e,Mn,Ci)},Ai=$r(or,"DataView"),Ri=$r(or,"Promise"),Oi=$r(or,"Set"),ji="[object Map]",Ii="[object Promise]",Pi="[object Set]",Ni="[object WeakMap]",Bi="[object DataView]",Di=Ir(Ai),Fi=Ir(Kn),Li=Ir(Ri),zi=Ir(Oi),Ui=Ir(Vr),$i=gr;(Ai&&$i(new Ai(/* @__PURE__ */new ArrayBuffer(1)))!=Bi||Kn&&$i(new Kn)!=ji||Ri&&$i(Ri.resolve())!=Ii||Oi&&$i(new Oi)!=Pi||Vr&&$i(new Vr)!=Ni)&&($i=function(e){var t=gr(e),r="[object Object]"==t?e.constructor:void 0,n=r?Ir(r):"";if(n)switch(n){case Di:return Bi;case Fi:return ji;case Li:return Ii;case zi:return Pi;case Ui:return Ni}return t});var Vi=$i,Hi=or.Uint8Array;var qi=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Wi=function(e){return this.__data__.has(e)};function Xi(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new ni;++t<r;)this.add(e[t])}Xi.prototype.add=Xi.prototype.push=qi,Xi.prototype.has=Wi;var Ki=Xi;var Yi=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var Zi=function(e,t){return e.has(t)};var Gi=function(e,t,r,n,i,s){var a=1&r,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(e),c=s.get(t);if(u&&c)return u==t&&c==e;var h=-1,f=!0,d=2&r?new Ki:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],m=t[h];if(n)var b=a?n(m,p,h,t,e,s):n(p,m,h,e,t,s);if(void 0!==b){if(b)continue;f=!1;break}if(d){if(!Yi(t,function(e,t){if(!Zi(d,t)&&(p===e||i(p,e,r,n,s)))return d.push(t)})){f=!1;break}}else if(p!==m&&!i(p,m,r,n,s)){f=!1;break}}return s.delete(e),s.delete(t),f};var Ji=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r};var Qi=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r},es=lr?lr.prototype:void 0,ts=es?es.valueOf:void 0;var rs=function(e,t,r,n,i,s,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Hi(e),new Hi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Kr(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=Ji;case"[object Set]":var l=1&n;if(o||(o=Qi),e.size!=t.size&&!l)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var c=Gi(o(e),o(t),n,i,s,a);return a.delete(e),c;case"[object Symbol]":if(ts)return ts.call(e)==ts.call(t)}return!1},ns=Object.prototype.hasOwnProperty;var is=function(e,t,r,n,i,s){var a=1&r,o=Ei(e),l=o.length;if(l!=Ei(t).length&&!a)return!1;for(var u=l;u--;){var c=o[u];if(!(a?c in t:ns.call(t,c)))return!1}var h=s.get(e),f=s.get(t);if(h&&f)return h==t&&f==e;var d=!0;s.set(e,t),s.set(t,e);for(var p=a;++u<l;){var m=e[c=o[u]],b=t[c];if(n)var g=a?n(b,m,c,t,e,s):n(m,b,c,e,t,s);if(!(void 0===g?m===b||i(m,b,r,n,s):g)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(d=!1)}return s.delete(e),s.delete(t),d},ss="[object Arguments]",as="[object Array]",os="[object Object]",ls=Object.prototype.hasOwnProperty;var us=function(e,t,r,n,i,s){var a=_r(e),o=_r(t),l=a?as:Vi(e),u=o?as:Vi(t),c=(l=l==ss?os:l)==os,h=(u=u==ss?os:u)==os,f=l==u;if(f&&cn(e)){if(!cn(t))return!1;a=!0,c=!1}if(f&&!c)return s||(s=new _i),a||vn(e)?Gi(e,t,r,n,i,s):rs(e,t,l,r,n,i,s);if(!(1&r)){var d=c&&ls.call(e,"__wrapped__"),p=h&&ls.call(t,"__wrapped__");if(d||p){var m=d?e.value():e,b=p?t.value():t;return s||(s=new _i),i(m,b,r,n,s)}}return!!f&&(s||(s=new _i),is(e,t,r,n,i,s))};var cs=function e(t,r,n,i,s){return t===r||(null==t||null==r||!yr(t)&&!yr(r)?t!=t&&r!=r:us(t,r,n,i,e,s))};var hs=function(e,t,r,n){var i=r.length,s=i,a=!n;if(null==e)return!s;for(e=Object(e);i--;){var o=r[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){var l=(o=r[i])[0],u=e[l],c=o[1];if(a&&o[2]){if(void 0===u&&!(l in e))return!1}else{var h=new _i;if(n)var f=n(u,c,l,e,t,h);if(!(void 0===f?cs(c,u,3,n,h):f))return!1}}return!0};var fs=function(e){return e==e&&!Mr(e)};var ds=function(e){for(var t=Mn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,fs(i)]}return t};var ps=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}};var ms=function(e){var t=ds(e);return 1==t.length&&t[0][2]?ps(t[0][0],t[0][1]):function(r){return r===e||hs(r,e,t)}};var bs=function(e,t){return null!=e&&t in Object(e)};var gs=function(e,t,r){for(var n=-1,i=(t=ci(t,e)).length,s=!1;++n<i;){var a=hi(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=i?s:!!(i=null==e?0:e.length)&&Yr(i)&&Wr(a,i)&&(_r(e)||sn(e))};var ys=function(e,t){return null!=e&&gs(e,t,bs)};var vs=function(e,t){return En(e)&&fs(t)?ps(hi(e),t):function(r){var n=di(r,e);return void 0===n&&n===t?ys(r,e):cs(t,n,3)}};var ws=function(e){return function(t){return null==t?void 0:t[e]}};var _s=function(e){return function(t){return fi(t,e)}};var xs=function(e){return En(e)?ws(hi(e)):_s(e)};var ks=function(e){return"function"==typeof e?e:null==e?Cr:"object"==typeof e?_r(e)?vs(e[0],e[1]):ms(e):xs(e)};var Ss=function(e,t,r,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var a=e[i];t(n,a,r(a),e)}return n};var Ms=function(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var l=a[e?o:++i];if(!1===r(s[l],l,s))break}return t}}();var Cs=function(e,t){return function(r,n){if(null==r)return r;if(!Zr(r))return e(r,n);for(var i=r.length,s=t?i:-1,a=Object(r);(t?s--:++s<i)&&!1!==n(a[s],s,a););return r}}(function(e,t){return e&&Ms(e,t,Mn)});var Ts=function(e,t,r,n){return Cs(e,function(e,i,s){t(n,e,r(e),s)}),n};var Es=function(e,t){return function(r,n){var i=_r(r)?Ss:Ts,s=t?t():{};return i(r,e,ks(n,2),s)}}(function(e,t,r){Xr(e,r,t)});const As={updated(e,t,r){const n=e;n?.__RIGHT_CLICK_HANDLER__&&e.removeEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__),n.__RIGHT_CLICK_HANDLER__=n=>{n.preventDefault(),t.value?.(n,e,r,t.arg)},e.addEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__)},beforeUnmount(e,t,r){const n=e;n?.__RIGHT_CLICK_HANDLER__&&n.removeEventListener("contextmenu",n.__RIGHT_CLICK_HANDLER__)}};var Rs={class:"mp-page-manager"},Os={class:"mp-page-manager-tab-name"},js=["onClick"],Is={key:0,class:"mp-page-manager-tab-icon"},Ps={class:"mp-page-manager-tab-name"},Ns=["onClick"],Bs={class:"mp-page-manager__options"},Ds={class:"mp-page-manager__popup-content"};const Fs=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpPageManager",__name:"page-manager",props:/* @__PURE__ */m(Yt,{modelValue:{default:()=>nr(),required:!1},modelModifiers:{}}),emits:/* @__PURE__ */m(Zt,["update:modelValue"]),setup(a,{expose:o,emit:u}){const c=a,h=u,f=d(ft),p=B(a,"modelValue"),m=F("tabsScrollRef"),b=Ze(m),v=F("tabsContainerRef"),w=Ze(v),x=M({}),S=F("popupContainerRef"),C=F("menuPopupRef"),A=M(null),R=M([]),j=M(!1),P=M(!1),N=M(null),D=t(()=>1.25*(f?.layout?.value?.currentRem||16)),L=t(()=>ir(p.value?.tabs)),H=t(()=>w.width.value>b.width.value);function W(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__back){const e=p?.value?.tabMap?.[p?.value?.activeTabId];return e?.pages?.length<=1?void J(e):(e.pages.pop(),p.value={...p.value},G(e,!0))}}function X(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__forward)return c?.router?.__forward(...e)}function K(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__go)return c?.router?.__go(...e)}function Y(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__push){const t="string"==typeof e?.[0]?R?.value?.find(t=>t.path===e[0]):e?.[0];if(!t)return;const r=p?.value?.tabMap?.[p?.value?.activeTabId],n=r?.pages?.[r?.pages?.length-1];if(t?.path?.startsWith(n?.originRoute?.path)){const e=Qt();return e.originRoute=t,e.name=t?.meta?.title||"未命名页面",tr(r,e),p.value={...p.value},G(r)}{const e=er({name:t?.meta?.title||"未命名页面",type:t?.meta?.page_type||Kt.CUSTOM,originRoute:t},{type:Xt.NORMAL}),r=[...p.value.tabs,e];return p.value={...p.value,tabs:r,tabMap:Es(r,"id")},G(e)}}}function Z(...e){if(c?.proxy&&c?.router&&"function"==typeof c?.router.__replace){const t="string"==typeof e?.[0]?R?.value?.find(t=>t.path===e[0]):e?.[0];if(!t)return null;const r=er({name:t?.meta?.title||"未命名页面",type:t?.meta?.page_type||Kt.CUSTOM,originRoute:t},{type:Xt.NORMAL}),n=[...p.value.tabs,r];return p.value={...p.value,tabs:n,tabMap:Es(n,"id")},G(r)}}function G(e,t){if(p.value.activeTabId===e.id&&!t)return;if(p.value.activeTabId=e.id,p.value.activePageId=e?.pages?.length?e.pages[e.pages.length-1].id:"",p.value={...p.value},!A.value||!p?.value?.tabMap?.[e?.id]?.pages?.length)return;const r=p?.value?.tabMap?.[e?.id]?.pages,n=r[r.length-1]?.originRoute,i=A.value.__replace({path:n?.path||"/page/home",query:n?.query||{},params:n?.params||{},state:{__mp_page_manager_from_tab_id__:p.value.activeTabId,__mp_page_manager_from_page_id__:p.value.activePageId,__mp_page_manager_to_tab_id__:e.id,__mp_page_manager_to_page_id__:e?.pages?.[0].id}});return requestIdleCallback(()=>{m.value?.scrollTo({left:x.value[e.id]?.offsetLeft||0,behavior:"smooth"}),re()}),i}function J(e){const t=p.value.tabs.findIndex(t=>t.id===e.id);if(-1===t)return;if(p.value.tabs.splice(t,1),delete p.value.tabMap[e.id],p.value={...p.value},p?.value?.activeTabId!==e.id)return void re();const r=p.value?.tabs?.[t-1]||p.value?.tabs?.[t];r?G(r?.type===Xt.HOME&&p.value?.tabs?.[t]||r):p.value=nr()}function Q(){N.value=null}function ee(){te()}function te(){j.value=!1,P.value=!1}function re(){h("change",p.value)}return U(()=>c?.router,e=>{A.value=function(e){if(!c?.router)throw new Error("请传入 router 对象");return c.router.__back=c?.router?.back||(()=>{}),c.router.__forward=c?.router?.forward||(()=>{}),c.router.__go=c?.router?.go||(()=>{}),c.router.__push=c?.router?.push||(()=>{}),c.router.__replace=c?.router?.replace||(()=>{}),c?.proxy?(c.router.back=W,c.router.forward=X,c.router.go=K,c.router.push=Y,c.router.replace=Z,e):e}(e),R.value=A.value?.getRoutes?.()||[]},{immediate:!0}),U(()=>c?.defaultValue,e=>{e&&(p.value={...e})},{once:!0,immediate:!0,flush:"post"}),o({hidePopup:te,closeTab:function(e){J(e)},closeOtherTabs:function(e){}}),_(()=>{b?.stop?.(),w?.stop?.()}),(t,a)=>(k(),i("section",Rs,[t.showHome?(k(),i("div",{class:y(["mp-page-manager-tab mp-page-manager-tab-home",{active:p.value.activeTabId===L.value[0]?.id}]),key:L.value[0]?.id,onClick:a[0]||(a[0]=q(()=>G(L.value[0]),["stop"]))},[l(I(_t),{type:"mdi",name:"mdiHomeOutline",size:D.value},null,8,["size"]),s("div",Os,O(L.value[0].title),1)],2)):n("",!0),V(s("div",{ref_key:"tabsScrollRef",ref:m,class:"mp-page-manager-tabs-scroll"},[s("div",{ref_key:"tabsContainerRef",ref:v,class:"mp-page-manager-tabs"},[(k(!0),i(e,null,T(L.value.slice(1),e=>V((k(),i("div",{class:y(["mp-page-manager-tab",{active:p.value.activeTabId===e.id}]),key:e.id,ref_for:!0,ref:t=>function(e,t){t?x.value[e]=t:delete x.value[e]}(e.id,t),onClick:q(()=>G(e),["stop"])},[e?.pages?.[e.pages.length-1]?.originRoute?.meta?.icon?(k(),i("div",Is,[l(I(_t),{type:"mdi",name:e?.pages?.[e.pages.length-1]?.originRoute?.meta?.icon,size:D.value},null,8,["name","size"])])):n("",!0),s("div",Ps,O(e.title),1),s("div",{class:"mp-page-manager-tab-close",onClick:q(()=>J(e),["stop"])},[l(I(_t),{name:"mdiCloseCircleOutline",type:"mdi",size:D.value},null,8,["size"])],8,Ns)],10,js)),[[I(As),(t,r)=>function(e,t){j.value=!1,g(()=>{if(!S?.value||!C?.value)return;const r=e.getBoundingClientRect();S.value.style.left=`${r.left+r.width/2}px`,S.value.style.top=`${r.top+r.height}px`,N.value=t,j.value=!0})}(r,e)]])),128))],512)],512),[[z,L.value?.length>2]]),s("div",Bs,[H.value?(k(),r(I(_t),{key:0,type:"mdi",name:"mdiViewCarousel",size:D.value},null,8,["size"])):n("",!0),l(I(be),{visible:P.value,"onUpdate:visible":a[1]||(a[1]=e=>P.value=e),ref:"addPopupRef","popper-class":"mp-page-manager__popup",disabled:!t.$slots?.["popup-add"],offset:15,"hide-after":0,transition:"",placement:"bottom-start",width:"auto",trigger:"click"},{reference:$(()=>[l(I(_t),{class:"mp-page-manager__popup-add-btn",type:"mdi",name:"mdiPlus",size:D.value},null,8,["size"])]),default:$(()=>[s("div",Ds,[E(t.$slots,"popup-add",{},void 0,!0)])]),_:3},8,["visible","disabled"])]),l(I(be),{visible:j.value,"onUpdate:visible":a[2]||(a[2]=e=>j.value=e),ref_key:"menuPopupRef",ref:C,"popper-class":"mp-page-manager__popup",disabled:!t.$slots?.["popup-menu"],offset:10,"hide-after":0,placement:"bottom",width:"auto",trigger:"click",onHide:Q},{reference:$(()=>[s("div",{class:"mp-page-manager__popup-container",ref_key:"popupContainerRef",ref:S},null,512)]),default:$(()=>[s("div",{class:"mp-page-manager__popup-content",onClick:ee},[E(t.$slots,"popup-menu",{tab:N.value},void 0,!0)])]),_:3},8,["visible","disabled"])]))}}),[["__scopeId","data-v-36a0af9f"]])),Ls={...Ne,modelValue:{type:String,default:""},defaultMode:{type:String,required:!1},autoClean:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!1}},zs={"update:modelValue":e=>!0,scan:e=>!0};var Us={class:"mp-scan-input"},$s={class:"mp-scan-input-scan-controller"},Vs={class:"mp-scan-input-suffix"};const Hs=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpScanInput",__name:"scan-input",props:/* @__PURE__ */m(Ls,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(zs,["update:modelValue"]),setup(e,{expose:r,emit:n}){const a=c(),o=F("scanInputRef"),u=F("hiddenInputRef"),h=e,f=n,d=P(),p=B(e,"modelValue"),m=M(""),v=M("scan"),w=M(!1),_=M(!1),S=t(()=>w.value||_.value),C=t(()=>Boolean(d?.readonly||"scan"===v.value)),T=t(()=>({input:"mdiKeyboard",scan:"mdiBarcodeScan"})),A=t(()=>({default:24,small:16,large:32}?.[d?.size||"default"]||0));function R(){w.value=!0,"scan"===v.value?u.value?.focus():o?.value?.focus(),D()}function O(){w.value=!1,v.value="scan",U()}function j(){_.value=!0,D()}function N(){w.value=!1,_.value=!1,U()}function D(){g(()=>{o.value?.ref?.parentElement?.classList?.add("is-focus")})}function U(){g(()=>{o.value?.ref?.parentElement?.classList?.remove("is-focus")})}function q(){"scan"===v.value&&(p.value=m.value)}function W(){"scan"===v.value&&(f("scan",m.value),h?.autoClean&&(p.value="",m.value=""))}return x(()=>{h.autoFocus&&setTimeout(()=>{R()},300)}),r({ref:o,focus:R,blur:()=>{O(),N()}}),(e,t)=>(k(),i("div",Us,[s("div",$s,[V(s("input",{"onUpdate:modelValue":t[0]||(t[0]=e=>m.value=e),ref:"hiddenInputRef",type:"password",autocomplete:"off",onFocus:j,onBlur:N,onInput:q,onKeydown:H(W,["enter"])},null,544),[[L,m.value]])]),l(I(le),b({...I(d),...h,...I(a)?.vnode?.props||{},modelValue:p.value,"onUpdate:modelValue":e=>f("update:modelValue",e)},{placeholder:e.placeholder,readonly:C.value,autoFocus:!1,ref:"scanInputRef",onFocus:R,onBlur:O}),{suffix:$(()=>[s("div",Vs,[E(e.$slots,"suffix-before",{},void 0,!0),V(l(I(_t),{class:y(["mp-scan-input-icon",{[v.value]:!0,"is-focus":S.value}]),size:A.value,name:T.value[v.value]},null,8,["class","size","name"]),[[z,"none"!==e.type]]),E(e.$slots,"suffix-after",{},void 0,!0)])]),_:3},16,["placeholder","readonly"])]))}}),[["__scopeId","data-v-eea77d91"]])),qs=["element","morningfast"],Ws=["picture","button","list"];var Xs={png:"mdiImage",jpg:"mdiImage",jpeg:"mdiImage",gif:"mdiImage",bmp:"mdiImage",webp:"mdiImage",svg:"mdiImage",mp4:"mdiVideo",avi:"mdiVideo",mov:"mdiVideo",mkv:"mdiVideo",wmv:"mdiVideo",flv:"mdiVideo",rmvb:"mdiVideo",mp3:"mdiMusicBox",wav:"mdiMusicBox",flac:"mdiMusicBox",xlsx:"mdiFileExcelBox",xls:"mdiFileExcelBox",docx:"mdiFileWordBox",doc:"mdiFileWordBox",pptx:"mdiFilePowerpointBox",ppt:"mdiFilePowerpointBox",pdf:"mdiFilePdfBox",csv:"mdiFileDelimited",txt:"mdiFileDocument",zip:"mdiZipBox",rar:"mdiZipBox","7z":"mdiZipBox",xml:"mdiFileXmlBox",json:"mdiCodeJson",js:"mdiFileCode",ts:"mdiFileCode",html:"mdiFileCode",css:"mdiFileCode",vue:"mdiFileCode",php:"mdiFileCode",go:"mdiFileCode",java:"mdiFileCode",pem:"mdiFileKey",key:"mdiFileKey",dmg:"mdiPackageVariant",exe:"mdiPackageVariant",apk:"mdiPackageVariant",ipa:"mdiPackageVariant",msi:"mdiPackageVariant",unknown:"mdiFileQuestion"},Ks=Object.keys(Xs),Ys={ready:"",uploading:"mdiLoading",success:"mdiCheckboxMarkedCircleOutline",fail:"mdiProgressAlert"};function Zs(e){return{ready:"info",uploading:"primary",success:"success",fail:"danger"}?.[e.status]||"info"}function Gs(e){const t=e.name?.split(".").pop()?.toLowerCase();return t&&Ks?.includes(t)?Xs[t]:Xs.unknown}function Js(e){return Ys[e.status]||""}function Qs(e){const t=e.name?.split(".").pop()?.toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t||"")}const ea={...De,type:{type:String,values:qs,default:"morningfast"},renderType:{type:String,values:Ws,default:"button"},fileSize:{type:Number,default:1024},fileTotalSize:{type:Number,default:10240},path:{type:String,default:"",required:!0},size:{type:String,default:"default"},showIcon:{type:Boolean,default:!0}},ta={change:(e,t)=>!0,remove:(e,t)=>!0,preview:e=>!0,success:(e,t,r)=>!0,error:(e,t,r)=>!0,replace:(e,t)=>!0,"update:modelValue":e=>!0},ra={...De,uploadQueue:{type:Array},size:{type:String,default:"default"},showIcon:{type:Boolean,default:!0}},na={trigger:()=>!0,replace:e=>!0,remove:e=>!0,download:e=>!0};var ia={class:"mp-upload-picture"},sa={class:"mp-upload-picture-files"},aa=["src"],oa={class:"mp-upload-picture-file-options"},la=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpUploadPicture",__name:"picture",props:ra,emits:na,setup(n,{emit:a}){const o=n,u=a,c=t(()=>({default:24,small:16,large:32}?.[o?.size||"default"]||0)),h=t(()=>({default:84,small:48,large:128}?.[o?.size||"default"]||0));function f(){u("trigger")}return(t,n)=>(k(),i("section",ia,[s("div",sa,[(k(!0),i(e,null,T(o.uploadQueue,e=>(k(),i("div",{class:"mp-upload-picture-box mp-upload-picture-file",key:e.uid,style:w({width:`${h.value}px`,height:`${h.value}px`})},[e.url&&I(Qs)(e)?(k(),i("img",{key:0,src:e.url,draggable:"false",class:"mp-upload-picture-file-img-controller"},null,8,aa)):(k(),r(I(ae),{key:1,color:"#909399",size:1.5*c.value},{default:$(()=>[l(I(xt),{name:I(Gs)(e)},null,8,["name"])]),_:2},1032,["size"])),s("div",{class:"mp-upload-picture-file-status",style:w({width:`${c.value}px`,height:`${c.value}px`})},[l(I(Te),{type:I(Zs)(e),size:o.size},{default:$(()=>[l(I(ae),{class:y({"is-loading":"uploading"===e.status}),size:.75*c.value},{default:$(()=>[l(I(xt),{name:I(Js)(e)},null,8,["name"])]),_:2},1032,["class","size"])]),_:2},1032,["type","size"])],4),s("div",oa,[l(I(Ee),{content:"更换文件",placement:"top","show-after":240,enterable:!1},{default:$(()=>[l(I(X),{link:"",size:o.size,onClick:()=>function(e){u("replace",e)}(e)},{default:$(()=>[l(I(Te),{type:"primary"},{default:$(()=>[l(I(ae),{size:c.value},{default:$(()=>[l(I(xt),{name:"mdiFileReplaceOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),l(I(Ee),{content:"预览文件",placement:"top","show-after":240,enterable:!1},{default:$(()=>[l(I(X),{link:"",size:o.size,onClick:()=>function(e){e.url&&Bt([e.url])}(e)},{default:$(()=>[l(I(Te),{type:"primary"},{default:$(()=>[l(I(ae),{size:c.value},{default:$(()=>[l(I(xt),{name:"mdiEyeOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),l(I(Ee),{content:"下载文件",placement:"top","show-after":240,enterable:!1},{default:$(()=>[l(I(X),{link:"",size:o.size,onClick:()=>function(e){e.url&&u("download",e)}(e)},{default:$(()=>[l(I(Te),{type:"primary"},{default:$(()=>[l(I(ae),{size:c.value},{default:$(()=>[l(I(xt),{name:"mdiTrayArrowDown",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024),l(I(Ee),{content:"删除文件",placement:"top","show-after":240,enterable:!1},{default:$(()=>[l(I(X),{link:"",size:o.size,onClick:()=>function(e){u("remove",e)}(e)},{default:$(()=>[l(I(Te),{type:"danger"},{default:$(()=>[l(I(ae),{size:c.value},{default:$(()=>[l(I(xt),{name:"mdiDeleteForeverOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["size","onClick"])]),_:2},1024)])],4))),128)),E(t.$slots,"trigger",{trigger:f},()=>[s("div",{class:"mp-upload-picture-box mp-upload-picture-trigger",style:w({width:`${h.value}px`,height:`${h.value}px`}),onClick:f},[l(I(ae),{size:c.value},{default:$(()=>[l(I(xt),{name:"mdiNotePlusOutline",size:c.value},null,8,["size"])]),_:1},8,["size"])],4)],!0)]),E(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-d5c984b0"]]),ua={class:"mp-upload-text"},ca={class:"mp-upload-text-files"},ha={class:"mp-upload-text-tag"},fa=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpUploadText",__name:"button",props:ra,emits:na,setup(n,{emit:a}){const o=n,u=a,c=t(()=>({default:24,small:16,large:32}?.[o?.size||"default"]||0));function h(){u("trigger")}return(t,n)=>(k(),i("section",ua,[s("div",ca,[(k(!0),i(e,null,T(o.uploadQueue,e=>(k(),r(I(Ce),{class:"mp-upload-text-file",key:e.uid,type:I(Zs)(e),size:o.size,closable:["wait","success","fail"].includes(e.status),onClose:()=>{u("remove",e)},onClick:()=>{u("replace",e)}},{default:$(()=>[s("div",ha,[V(l(I(ae),{onClick:q(()=>{var t;(t=e).url&&Bt([t.url])},["stop"])},{default:$(()=>[l(I(xt),{name:I(Gs)(e),size:c.value},null,8,["name","size"])]),_:2},1032,["onClick"]),[[z,o.showIcon&&I(Qs)(e)]]),s("span",null,O(e.name),1),V(l(I(ae),{class:"is-loading"},{default:$(()=>[l(I(xt),{name:"mdiLoading",size:c.value},null,8,["size"])]),_:1},512),[[z,["uploading"].includes(e.status)]])])]),_:2},1032,["type","size","closable","onClose","onClick"]))),128)),E(t.$slots,"trigger",{trigger:h},()=>[l(I(X),{type:"primary",link:"",size:o.size,onClick:h},{default:$(()=>[l(I(xt),{name:"mdiCloudUpload",size:c.value},null,8,["size"]),n[0]||(n[0]=s("span",{class:"mp-upload-text-u-btn"}," 点击上传 ",-1))]),_:1},8,["size"])],!0)]),E(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-38876885"]]),da={class:"mp-upload-list"},pa={class:"mp-upload-list-files"},ma=["src","onClick"],ba={class:"mp-upload-list-file-info"},ga={class:"mp-upload-list-file-info-name-container"},ya={class:"mp-upload-list-file-status"},va={key:1,class:"mp-upload-list-file-info-type-and-size"},wa={class:"mp-upload-list-file-options"},_a={class:"mp-upload-list-trigger"},xa=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpUploadList",__name:"list",props:ra,emits:na,setup(a,{emit:u}){const c=a,h=u,f=t(()=>({default:24,small:16,large:32}?.[c?.size||"default"]||0));function d(){h("trigger")}return(t,a)=>(k(),i("section",da,[s("div",pa,[(k(!0),i(e,null,T(c.uploadQueue,e=>(k(),i("div",{class:"mp-upload-list-file",key:e.uid},[s("div",{class:"mp-upload-list-file-img",style:w({width:2*f.value+"px",height:2*f.value+"px"})},[e.url&&I(Qs)(e)?(k(),i("img",{key:0,src:e.url,draggable:"false",class:"mp-upload-list-file-img-controller",onClick:()=>function(e){e.url&&Bt([e.url])}(e)},null,8,ma)):(k(),r(I(ae),{key:1,color:"#909399",size:1.5*f.value},{default:$(()=>[l(wt,{name:I(Gs)(e)},null,8,["name"])]),_:2},1032,["size"]))],4),s("div",ba,[s("div",ga,[l(I(Te),{style:w({fontSize:.75*f.value+"px"}),class:"mp-upload-list-file-info-name"},{default:$(()=>[o(O(e.name),1)]),_:2},1032,["style"]),s("div",ya,[l(I(Te),{type:I(Zs)(e),size:c.size},{default:$(()=>[l(I(ae),{size:f.value,class:y({"is-loading":"uploading"===e.status})},{default:$(()=>[l(wt,{name:I(Js)(e)},null,8,["name"])]),_:2},1032,["size","class"])]),_:2},1032,["type","size"])])]),["default","large"].includes(c.size)?(k(),r(I(ce),{key:0,size:c.size,class:"mp-upload-list-file-info-url",onClick:()=>function(e){e.url&&h("download",e)}(e)},{default:$(()=>[o(O(e.url),1)]),_:2},1032,["size","onClick"])):n("",!0),["default","large"].includes(c.size)?(k(),i("div",va,[l(I(Ce),{size:c.size,type:"primary",class:"mp-upload-list-file-info-type"},{default:$(()=>[o(O(e?.type||"未知类型"),1)]),_:2},1032,["size"]),l(I(Te),{size:c.size,type:"info",class:"mp-upload-list-file-info-size"},{default:$(()=>[o(O(e?.size?`${(e.size/1048576).toFixed(3)} KB`:"未知大小"),1)]),_:2},1032,["size"])])):n("",!0)]),s("div",wa,[l(I(X),{text:"",backgound:"",class:"mp-upload-list-file-replace",onClick:()=>function(e){h("replace",e)}(e)},{default:$(()=>[l(I(Ee),{content:"更换文件",placement:"top","show-after":240},{default:$(()=>[l(I(Te),{type:"primary",size:c.size},{default:$(()=>[l(I(ae),{size:f.value},{default:$(()=>[l(wt,{name:"mdiFileReplaceOutline"})]),_:1},8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["onClick"]),l(I(X),{text:"",backgound:"",class:"mp-upload-list-file-remove",onClick:()=>function(e){h("remove",e)}(e)},{default:$(()=>[l(I(Ee),{content:"删除文件",placement:"top","show-after":240},{default:$(()=>[l(I(Te),{type:"danger",size:c.size},{default:$(()=>[l(I(ae),{size:f.value},{default:$(()=>[l(wt,{name:"mdiDeleteForeverOutline"})]),_:1},8,["size"])]),_:1},8,["size"])]),_:1})]),_:1},8,["onClick"])])]))),128))]),E(t.$slots,"trigger",{trigger:d},()=>[s("div",_a,[l(I(X),{text:"",type:"primary",size:c.size,onClick:d},{default:$(()=>[l(wt,{name:"mdiCloudUpload",size:f.value},null,8,["size"]),a[0]||(a[0]=s("span",{class:"mp-upload-list-u-btn"}," 点击上传 ",-1))]),_:1},8,["size"])])],!0),E(t.$slots,"tip",{},void 0,!0)]))}}),[["__scopeId","data-v-4ba7f70a"]]);const ka=et(/* @__PURE__ */u({name:"MpUpload",__name:"upload",props:ea,emits:ta,setup(e,{expose:n,emit:i}){const s=c(),a=e,o=i,l=P(),u=D(),h=M([]),d=t(()=>({picture:la,button:fa,list:xa}?.[a?.renderType||""]||null)),p=t(()=>(a?.accept||"*/*").split(",").map(e=>e.trim().toLowerCase()));function m(e){const t=e;return t.uid=Number(String(Math.round(Math.random()*Math.PI*1e3))+String(Date.now())?.slice(-8)+String(e.size)),t.isDirectory=!1,{uid:t.uid,name:e.name,size:e.size,type:e.type,raw:t,status:"ready",percentage:0,response:null,url:""}}async function b(e){try{e.status="uploading";const t=await async function(e,t){const r=await null.put(`${t}/${e.name}`,e,{timeout:/* @__PURE__ */(new Date).getTime()+18e4});return r.name=r.name?.split("/").pop()||e.name,"https:"===window.location.protocol&&(r.url=r.url.replace("http://","https://")),r}(e.raw,a?.path);e.status="success",e.response=t,e.url=t?.url||""}catch(t){e.status="fail",e.response=null}finally{h.value=[...h.value]}}async function g(e){Promise.all(e.map(e=>b(e)))}async function y(e){e||(e=h.value.filter(e=>"ready"===e.status)),g(e=e.filter(e=>"ready"===e.status||"fail"===e.status))}function v(e){if(!(e.reduce((e,t)=>e+t.size/1024,0)+h.value.reduce((e,t)=>e+(t.size||0)/1024,0)<=a.fileTotalSize))throw new Error(`文件总大小超出限制,当前最多上传${a.fileTotalSize}KB`)}async function w(e,t){const r=e.target,n=Array.from(r?.files||[]);try{if(function(e){if(!("number"!=typeof a.limit||a.limit<=0||h.value.length+e.length>a.limit))throw new Error(`文件数量超出限制,当前最多上传${a.limit}个文件`)}(n),v(n),await async function(e){let t=[...e],r=[];if(p.value.includes("*/*"))return!0;if(t=t?.filter(e=>{const t=p.value.includes(e.type.toLowerCase());return t||r.push(e),t}),r.length&&t.length){const n=r.map(e=>e.name).join("、");"confirm"===(await de.confirm(`以下文件类型不匹配,是否保留合法的文件继续上传?<br/><br/>${n}`,"文件类型不匹配",{dangerouslyUseHTMLString:!0,confirmButtonText:"继续上传",cancelButtonText:"取消上传",type:"warning"})).action&&(e.length=0,e.push(...t))}else if(r.length&&!t.length)throw new Error("选择的文件类型不匹配");return!0}(n),async function(e){let t=[...e],r=[];if(t=t?.filter(e=>{const t=e.size/1024<=a.fileSize;return t||r.push(e),t}),r.length&&t.length){const n=r.map(e=>e.name).join("、"),i=await de.confirm(`以下文件大小超出限制,是否保留合法的文件继续上传?<br/><br/>${n}`,"文件大小超出限制",{dangerouslyUseHTMLString:!0,confirmButtonText:"继续上传",cancelButtonText:"取消上传",type:"warning"});"confirm"!==i&&"confirm"!==i.action||(e.length=0,e.push(...t))}else if(r.length&&!t.length)throw new Error(`选择的文件大小超出限制,单个文件最大${a.fileSize}KB`)}(n),t){const e=n.map(m);h.value.push(...e),y(e)}}catch(i){fe.error(i?.message||"文件选择失败")}finally{return n}}function _(e=!0,t=!1){return new Promise(r=>{if(!a?.path)return fe.error("上传路径无效"),void r(null);const n=document.createElement("input");n.type="file",n.multiple=t||!!a.multiple,n.accept=a.accept||"*/*",n.onchange=async function(t){try{r(await w(t,e))}catch(i){r(null)}finally{r(null),n.remove()}},n.click()})}async function x(e){const t=await _(!1,!0);if(!t?.length)return;const r=t?.[0],n=h.value.find(t=>t===e);if(!n||!r)return;const i=m(r);n.name=i.name,n.size=i.size,n.type=i.type,n.raw=i.raw,n.status="ready",n.percentage=0,n.response=null,n.url="",y([n]),o("replace",j(i),j(h.value))}async function S(e){const t=await de.confirm(`确认删除文件「${e.name}」?`,"删除文件",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"});if("confirm"===t||"confirm"===t.action){const t=h.value.indexOf(e);h.value.splice(t,1),o("remove",j(e),j(h.value))}}async function C(e){e?.url&&await ot(e?.url,e.raw)}return n({uploadToOss:b,uploadListToOss:g,updateQueue:async function(e){},queryQueues:async function(){return j(h.value)}}),(e,t)=>"morningfast"===a?.type&&d.value?(k(),r(A(f(d.value,{...a,...I(l),...I(s)?.vnode?.props||{},uploadQueue:h.value,onTrigger:_,onReplace:x,onRemove:S,onDownload:C},I(u))),{key:0})):(k(),r(A(f(I(Re),{...a,...I(l),...I(s)?.vnode?.props||{}},I(u))),{key:1}))}})),Sa={},Ma={...Be};const Ca=et(/* @__PURE__ */u({name:"MpVirtualSelect",__name:"virtual-select",props:{autoOptionPlaceholder:{type:Boolean}},emits:Ma,setup(e){const n=c(),i=e,s=P(),a=D(),o=t(()=>({props:{label:"name",value:"id"},filterable:!0,clearable:!0,valueOnClear:i?.autoOptionPlaceholder?"":null,placeholder:i?.autoOptionPlaceholder?"全部":i?.placeholder||"请选择",emptyValues:i?.autoOptionPlaceholder?[""]:void 0})),l=t(()=>i.autoOptionPlaceholder&&i.options?[{id:"",name:"全部"},...i.options]:i?.options||[]);return(e,t)=>(k(),r(A(f(I(ve),{class:"mp-virtual-select",...i,...I(s),...o.value,...I(n)?.vnode?.props||{},options:l.value},I(a)))))}})),Ta={items:{type:Array,default:()=>[]},fields:{type:Array,default:()=>[]},itemRowsKey:{type:String,default:""},imageKey:{type:String,default:""},rowKey:{type:String,default:"id"},selectable:{type:Boolean,default:!0},showSelectAll:{type:Boolean,default:!0},selectAllText:{type:String,default:"全选"},emptyText:{type:String,default:"暂无数据"},valueMaxWidth:{type:[String,Number],default:"min(100%, 160px)"},tooltipProps:{type:Object,default:()=>({})},tooltipPopperMaxWidth:{type:[String,Number],default:"min(90vw, 320px)"},tooltipZIndex:{type:Number,default:5100}},Ea={change:(e,t)=>!0,"selection-change":(e,t)=>!0};var Aa={class:"mp-product-select"},Ra={key:0,class:"mp-product-select__toolbar"},Oa={key:0,class:"mp-product-select__card-head"},ja={class:"mp-product-select__card-body"},Ia={class:"mp-product-select__fields"},Pa={class:"mp-product-select__field-label"},Na={class:"mp-product-select__field-value-inner"},Ba={class:"mp-product-select__field-value-text"},Da={class:"mp-product-select__field-label"},Fa={class:"mp-product-select__field-value-inner"},La={class:"mp-product-select__field-value-text"},za={key:0,class:"mp-product-select__thumb"};const Ua=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MpProductSelect",__name:"product-select",props:/* @__PURE__ */m(Ta,{modelValue:{default:()=>[]},modelModifiers:{}}),emits:/* @__PURE__ */m(Ea,["update:modelValue"]),setup(a,{emit:u}){const c=a,h=u,f=B(a,"modelValue");function d(e){const t=e[c.rowKey];return null==t?"":t}function p(e,t){const r=e[t];return null==r?"":String(r)}function m(e){if(!c.imageKey)return"";const t=e[c.imageKey];return null==t?"":String(t)}const g=t(()=>c.items.map(e=>d(e)).filter(e=>""!==e)),v=t(()=>{const e=g.value;if(!e.length)return!1;const t=new Set(f.value||[]);return e.every(e=>t.has(e))}),_=t(()=>{const e=g.value;if(!e.length)return!1;const t=new Set(f.value||[]),r=e.filter(e=>t.has(e)).length;return r>0&&r<e.length});function x(e,t){const r=!0===t;!function(e,t){if(!c.selectable||""===e)return;const r=new Set(f.value||[]);t?r.add(e):r.delete(e),f.value=Array.from(r)}(d(e),r)}function S(e){return"number"==typeof e?`${e}px`:e}U([f,()=>c.items],()=>{!function(){const e=f.value||[],t=new Set(e),r=c.items.filter(e=>t.has(d(e))),n=[...e];h("change",n,r),h("selection-change",n,r)}()},{deep:!0,immediate:!0});const M=t(()=>({width:"100%",minWidth:0,maxWidth:S(c.valueMaxWidth)}));function C(e){const t=e||{},r={effect:"light",placement:"top",showAfter:200,zIndex:c.tooltipZIndex,...c.tooltipProps,...t},n=c.tooltipProps?.popperStyle||{},i=t.popperStyle||{};return r.popperStyle={maxWidth:S(c.tooltipPopperMaxWidth),wordBreak:"break-word",overflowWrap:"break-word",...n,...i},delete r.disabled,delete r.content,r}function E(e){return C(e.tooltipProps)}function A(e,t){return!p(e,t.key).length||!0==={...c.tooltipProps,...t.tooltipProps||{}}.disabled}const R=t(()=>Boolean(c.itemRowsKey));function j(e){if(!c.itemRowsKey)return[];const t=e[c.itemRowsKey];return Array.isArray(t)?t:[]}function P(e){return null!=e.label&&String(e.label).length?String(e.label):null!=e.key?String(e.key):""}function N(e){return void 0===e.value||null===e.value?"":String(e.value)}function D(e){return C(e.tooltipProps)}function F(e){return!N(e).length||!0==={...c.tooltipProps,...e.tooltipProps||{}}.disabled}return(t,a)=>(k(),i("div",Aa,[t.items.length&&t.selectable&&t.showSelectAll?(k(),i("div",Ra,[l(I(Z),{indeterminate:_.value,"model-value":v.value,"onUpdate:modelValue":a[0]||(a[0]=e=>{return t=e,void(c.selectable&&(f.value=!0===t?[...g.value]:[]));var t})},{default:$(()=>[o(O(t.selectAllText),1)]),_:1},8,["indeterminate","model-value"])])):n("",!0),t.items.length?(k(),i("div",{key:1,class:y(["mp-product-select__grid",{"mp-product-select__grid--no-image":!t.imageKey}])},[(k(!0),i(e,null,T(t.items,r=>{return k(),i("div",{key:String(d(r)||JSON.stringify(r)),class:"mp-product-select__card"},[t.selectable?(k(),i("div",Oa,[l(I(Z),{"model-value":(a=d(r),(f.value||[]).includes(a)),disabled:""===d(r),"onUpdate:modelValue":e=>x(r,e)},null,8,["model-value","disabled","onUpdate:modelValue"])])):n("",!0),s("div",ja,[s("dl",Ia,[R.value?(k(!0),i(e,{key:0},T(j(r),(e,t)=>(k(),i("div",{key:`${String(d(r))}-${t}`,class:"mp-product-select__field"},[s("dt",Pa,O(P(e)),1),s("dd",{class:"mp-product-select__field-value",style:w(M.value)},[s("div",Na,[l(I(Ee),b({ref_for:!0},D(e),{content:N(e),disabled:F(e)}),{default:$(()=>[s("span",Ba,O(N(e)),1)]),_:2},1040,["content","disabled"])])],4)]))),128)):(k(!0),i(e,{key:1},T(t.fields,e=>(k(),i("div",{key:e.key,class:"mp-product-select__field"},[s("dt",Da,O(e.label),1),s("dd",{class:"mp-product-select__field-value",style:w(M.value)},[s("div",Fa,[l(I(Ee),b({ref_for:!0},E(e),{content:p(r,e.key),disabled:A(r,e)}),{default:$(()=>[s("span",La,O(p(r,e.key)),1)]),_:2},1040,["content","disabled"])])],4)]))),128))]),t.imageKey?(k(),i("div",za,[l(I(oe),{class:"mp-product-select__thumb-img",src:m(r),fit:"contain"},null,8,["src"])])):n("",!0)])]);var a}),128))],2)):(k(),r(I(ie),{key:2,description:t.emptyText},null,8,["description"]))]))}}),[["__scopeId","data-v-6ba7d6d4"]]));var $a={MorningfastPlusChannelsSearch:"",MorningfastPlusProductSearch:"",MorningfastPlusRateSearch:"",MorningfastPlusTaskSearch:"",MorningfastPlusUserSelect:"",MorningfastPlusUserSelectArchitecture:"",MorningfastPlusWarehouseSearch:"",MorningfastPlusProductDetail:"",MorningfastPlusProductDetailChildren:"",MorningfastPlusEnumWarehouse:"",MorningfastPlusEnumTaskStatus:"",MorningfastPlusEnumUser:"",MorningfastPlusEnumTaskType:"",MorningfastPlusEnumProductCategory:""},Va={MorningfastPlusChannelsSearch:"GET",MorningfastPlusProductSearch:"POST",MorningfastPlusRateSearch:"GET",MorningfastPlusTaskSearch:"GET",MorningfastPlusUserSelect:"POST",MorningfastPlusUserSelectArchitecture:"POST",MorningfastPlusWarehouseSearch:"GET",MorningfastPlusProductDetail:"GET",MorningfastPlusProductDetailChildren:"GET",MorningfastPlusEnumWarehouse:"GET",MorningfastPlusEnumTaskStatus:"GET",MorningfastPlusEnumUser:"GET",MorningfastPlusEnumTaskType:"GET",MorningfastPlusEnumProductCategory:"POST"},Ha={global:{},MorningfastPlusChannelsSearch:{},MorningfastPlusProductSearch:{},MorningfastPlusRateSearch:{},MorningfastPlusTaskSearch:{},MorningfastPlusUserSelect:{},MorningfastPlusUserSelectArchitecture:{},MorningfastPlusWarehouseSearch:{},MorningfastPlusProductDetail:{},MorningfastPlusProductDetailChildren:{},MorningfastPlusEnumWarehouse:{},MorningfastPlusEnumTaskStatus:{},MorningfastPlusEnumUser:{},MorningfastPlusEnumTaskType:{},MorningfastPlusEnumProductCategory:{}},qa={MorningfastPlusChannelsSearch:[],MorningfastPlusProductSearch:[],MorningfastPlusRateSearch:[],MorningfastPlusTaskSearch:[],MorningfastPlusUserSelect:[],MorningfastPlusUserSelectArchitecture:[],MorningfastPlusWarehouseSearch:[],MorningfastPlusProductDetail:[]};const Wa=new Proxy($a,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求地址「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1}),Xa=new Proxy(Va,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求方法「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1}),Ka=new Proxy(Ha,{get(e,t){if(t in e)return e[t];throw new Error(`私有请求头「${String(t)}」不存在, 请检查输入是否正确`)},set:()=>!1});function Ya(e,t,r){if(!(e in $a))throw new Error(`私有请求地址「${e}」不存在, 请检查输入是否正确`);{let n=e;$a[n]=t,r&&(Va[n]=r),function(e){if(!qa?.[e])return;qa[e].forEach(e=>requestIdleCallback(()=>e())),qa[e]=[]}(n)}}function Za(e,t){if(!(e in Ha))throw new Error(`私有请求头「${e}」不存在, 请检查输入是否正确`);Ha[e]=t}function Ga(e,t){if(qa?.[e]){if(!(e in qa)||!(e in $a))throw new Error(`私有组件「${e}」不存在, 请检查输入是否正确`);$a[e]?t():qa[e].push(t)}}const Ja={},Qa={};async function eo(e,t){return await Et(po,e,{title:"任务查询器",width:1280,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}async function to(e){let t=null;return t=await Ve({url:Wa[e],method:Xa[e],headers:{...Ka.global,...Ka[e]}}),200===t?.status?t?.data?.data:[]}async function ro(){return Wa.MorningfastPlusWarehouseSearch?await to("MorningfastPlusWarehouseSearch"):[]}async function no(){return Wa.MorningfastPlusEnumProductCategory?await to("MorningfastPlusEnumProductCategory"):[]}async function io(){return Wa.MorningfastPlusEnumTaskType?await to("MorningfastPlusEnumTaskType"):[]}async function so(){return Wa.MorningfastPlusEnumTaskStatus?await to("MorningfastPlusEnumTaskStatus"):[]}async function ao(){return Wa.MorningfastPlusEnumUser?await to("MorningfastPlusEnumUser"):[]}var oo={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}},lo={key:0,class:"mp-p-task-search"},uo={class:"mp-p-task-search-filter"},co={class:"mp-p-task-search-table"},ho={class:"mp-p-task-search-table-column-time"},fo={class:"mp-p-task-search-pagination"},po=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppTaskSearch",__name:"task-search",props:Ja,emits:Qa,setup(t,{emit:a}){const u={1:{icon:"mdiHumanQueue",text:"任务等待被处理"},2:{icon:"mdiDistributeHorizontalCenter",text:"任务开始排队"},3:{icon:"mdiClock",text:"执行中"},4:{icon:"mdiClockCheck",text:"执行成功"},5:{icon:"mdiClockRemove",text:"执行失败"}},c={0:"#909399",1:"#909399",2:"#409EFF",3:"#409EFF",4:"#67C23A",5:"#F56C6C"},h=M(!1),f=R({}),d=M({types:[],status:[],users:[]}),p=M({name:"",type:"",status:"",createdBy:"",createdDate:""}),m=M({page:1,pageSize:20,total:0}),b=M([]),g=M({list:!1,importFile:[],exportFile:[]});async function y(){try{g.value.list=!0;const e=await Ve.get(Wa.MorningfastPlusTaskSearch,{headers:f.value,params:{type:p.value.type,task_status:p.value.status,request_file_name:p.value.name,created_by:p.value.createdBy,created_date:p.value.createdDate,page:m.value.page,limit:m.value.pageSize}});200===e?.status?(b.value=e?.data?.data?.list||[],m.value.total=e?.data?.data?.total||0):fe.error("查询异常,请稍后重试")}catch(e){}finally{g.value.list=!1}}function v(){p.value={name:"",type:"",status:"",createdBy:"",createdDate:""},y()}function _(e){return e?.task_type_name?.includes("导入")?"success":(e?.task_type_name?.includes("导出"),"primary")}return Ga("MorningfastPlusTaskSearch",function(){f.value={...Ka.global,...Ka.MorningfastPlusTaskSearch},h.value=Boolean(Wa.MorningfastPlusTaskSearch),y(),async function(){const e=await Promise.all([io(),so(),ao()]);d.value.types=e?.[0]||[],d.value.status=e?.[1]||[],d.value.users=e?.[2]||[]}()}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[h.value?(k(),i("div",lo,[s("div",uo,[l(I(ye),{class:"mp-p-task-search-filter-item",modelValue:p.value.type,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value.type=e),filterable:"",clearable:"",placeholder:"类型"},{default:$(()=>[(k(!0),i(e,null,T(d.value.types,e=>(k(),r(I(pe),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(I(ye),{class:"mp-p-task-search-filter-item-small",modelValue:p.value.status,"onUpdate:modelValue":a[1]||(a[1]=e=>p.value.status=e),filterable:"",clearable:"",placeholder:"状态"},{default:$(()=>[(k(!0),i(e,null,T(d.value.status,e=>(k(),r(I(pe),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(I(ee),{class:"mp-p-task-search-filter-item-large",modelValue:p.value.createdDate,"onUpdate:modelValue":a[2]||(a[2]=e=>p.value.createdDate=e),type:"date",placeholder:"时间","value-format":"YYYY-MM-DD"},null,8,["modelValue"]),l(I(ve),{class:"mp-p-task-search-filter-item",modelValue:p.value.createdBy,"onUpdate:modelValue":a[3]||(a[3]=e=>p.value.createdBy=e),filterable:"",clearable:"",options:d.value.users,props:{label:"name",value:"id"},placeholder:"操作人"},null,8,["modelValue","options"]),l(I(X),{type:"primary",onClick:y},{default:$(()=>[...a[6]||(a[6]=[o(" 查询 ",-1)])]),_:1}),l(I(X),{type:"info",onClick:v},{default:$(()=>[...a[7]||(a[7]=[o(" 重置 ",-1)])]),_:1})]),s("div",co,[V((k(),r(I(ke),{class:"w-full!",data:b.value,height:"50vh",border:!0},{default:$(()=>[l(I(Se),{prop:"task_type_name",label:"类型","min-width":"200"},{default:$(({row:e})=>[l(I(Ce),{type:_(e)},{default:$(()=>[o(O(e?.task_type_name),1)]),_:2},1032,["type"])]),_:1}),l(I(Se),{prop:"",label:"操作人&时间","min-width":"320"},{default:$(({row:e})=>[s("div",ho,[s("span",null,O(e?.created_name),1),s("span",null,O(e?.created_at),1)])]),_:1}),l(I(Se),{prop:"task_status_name",label:"状态","min-width":"200"},{default:$(({row:e})=>[s("div",{class:"mp-p-task-search-table-column-status",style:w({color:c[e?.task_status]})},[l(I(xt),{path:u[e?.task_status]?.icon,size:16},null,8,["path"]),s("span",null,O(u[e?.task_status]?.text),1)],4)]),_:1}),l(I(Se),{prop:"",label:"操作结果",width:"160",align:"center"},{default:$(({row:e})=>[3===e?.request_type?(k(),r(I(X),{key:0,text:"",type:"primary",size:"small",loading:g.value.importFile.includes(e?.id),onClick:q(()=>async function(e){try{g.value.importFile.push(e?.id);const t=new File([],`${e?.task_type_name}-${e?.created_name}-${Ie(e?.created_at||Date.now()).format("YYYY年MM月DD日HH时mm分ss秒")}.${e?.request_file?.split?.(".")?.pop?.()||"xlsx"}`);await ot(e?.request_file,t)}catch(t){}finally{g.value.importFile=g.value.importFile.filter(t=>t!==e?.id)}}(e),["stop"])},{default:$(()=>[...a[8]||(a[8]=[o(" 下载导入文件 ",-1)])]),_:1},8,["loading","onClick"])):n("",!0),3===e?.response_type?(k(),r(I(X),{key:1,text:"",type:"primary",size:"small",loading:g.value.exportFile.includes(e?.id),onClick:q(()=>async function(e){try{g.value.exportFile.push(e?.id);const t=new File([],`${e?.task_type_name}-${e?.created_name}-${Ie(e?.created_at||Date.now()).format("YYYY年MM月DD日HH时mm分ss秒")}.${e?.response?.split?.(".")?.pop?.()||"xlsx"}`);await ot(e?.response,t)}catch(t){}finally{g.value.exportFile=g.value.exportFile.filter(t=>t!==e?.id)}}(e),["stop"])},{default:$(()=>[...a[9]||(a[9]=[o(" 下载导出文件 ",-1)])]),_:1},8,["loading","onClick"])):n("",!0),3!==e?.response_type?(k(),r(I(X),{key:2,text:"",type:"primary",size:"small",disabled:!e?.response,onClick:q(()=>function(e){fe({type:4===e?.task_status?"success":"error",message:e?.response&&"string"!=typeof e?.response?JSON.stringify(e?.response):e?.response})}(e),["stop"])},{default:$(()=>[...a[10]||(a[10]=[o(" 查看结果 ",-1)])]),_:1},8,["disabled","onClick"])):n("",!0)]),_:1})]),_:1},8,["data"])),[[I(Fe),g.value.list]])]),s("div",fo,[l(I(me),{size:"small",background:"",teleported:!1,layout:"->, prev, pager, sizes, next, jumper, total","current-page":m.value.page,"onUpdate:currentPage":a[4]||(a[4]=e=>m.value.page=e),"page-size":m.value.pageSize,"onUpdate:pageSize":a[5]||(a[5]=e=>m.value.pageSize=e),"default-page-size":20,"page-sizes":[20,40,60,80,100],total:m.value.total,onChange:y},null,8,["current-page","page-size","total"])])])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-e3d9b1f8"]]);const mo=et(po),bo={selection:{type:Boolean,default:!0}},go={},yo={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},vo={click:e=>!0};async function wo(e,t){return await Et(Co,e,{title:"仓库查询器",width:480,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}var _o={class:"mp-p-warehouse-search-item-name"},xo=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppWarehouseSearchItem",__name:"warehouse-item",props:yo,emits:vo,setup(e,{emit:t}){const a=t;return(e,t)=>(k(),i("div",{class:"mp-p-warehouse-search-item",onClick:t[0]||(t[0]=()=>a("click",e.data))},[e.selection?(k(),r(I(Z),{key:0,label:"",value:e.data?.id,onClick:q(e=>{},["stop"])},null,8,["value"])):n("",!0),s("div",_o,O(e.data?.name),1)]))}}),[["__scopeId","data-v-12c0cd15"]]),ko={key:0,class:"mp-p-warehouse-search"},So={class:"mp-p-warehouse-search-filter"},Mo={class:"mp-p-warehouse-search-loading"},Co=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppWarehouseSearch",__name:"warehouse.search",props:bo,emits:go,setup(a,{emit:o}){const u=a,c=d(Ot,{}),h=M(!1),f=R({}),p=M({name:""}),m=M([]),b=M([]),g=M(!1),y=t(()=>p.value.name?m.value.filter(e=>e.name.includes(p.value.name)):m.value);function v(){return b.value}return Ga("MorningfastPlusWarehouseSearch",function(){f.value={...Ka.global,...Ka.MorningfastPlusWarehouseSearch},h.value=Boolean(Wa.MorningfastPlusTaskSearch),async function(){try{g.value=!0;const e=await Ve.get(Wa.MorningfastPlusWarehouseSearch,{headers:f.value});200===e?.status?m.value=e?.data?.data||[]:fe.error("查询异常,请稍后重试")}catch(e){}finally{g.value=!1}}(),c?.subscribeConfirmEvent?.(v)}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[h.value?(k(),i("div",ko,[s("div",So,[l(I(le),{class:"mp-p-warehouse-search-filter-input",modelValue:p.value.name,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value.name=e),placeholder:"请输入仓库名称",clearable:""},null,8,["modelValue"])]),l(I(ge),{height:"50vh"},{default:$(()=>[V(l(I(G),{class:"mp-p-warehouse-search-list",modelValue:b.value,"onUpdate:modelValue":a[1]||(a[1]=e=>b.value=e)},{default:$(()=>[(k(!0),i(e,null,T(y.value,e=>(k(),r(xo,{data:e,key:e.id,selection:u?.selection,onClick:()=>{return t=e,void(b.value.includes(t.id)?b.value=b.value.filter(e=>e!==t.id):b.value.push(t.id));var t}},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),[[z,!g.value]]),s("div",Mo,[g.value?(k(),r(I(Wt),{key:0})):n("",!0)])]),_:1})])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-9712eec9"]]);const To=et(Co),Eo={selection:{type:Boolean,default:!0}},Ao={},Ro={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},Oo={click:e=>!0};async function jo(e,t){return await Et(Fo,e,{title:"物流渠道查询器",width:480,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:!0,...t||{}})}var Io={class:"mp-p-warehouse-search-item-name"},Po=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppChannelsSearchItem",__name:"channels-item",props:Ro,emits:Oo,setup(e,{emit:t}){const a=t;return(e,t)=>(k(),i("div",{class:"mp-p-warehouse-search-item",onClick:t[0]||(t[0]=()=>a("click",e.data))},[e.selection?(k(),r(I(Z),{key:0,label:"",value:e.data?.id,onClick:q(e=>{},["stop"])},null,8,["value"])):n("",!0),s("div",Io,O(e.data?.name),1)]))}}),[["__scopeId","data-v-c5e84b84"]]),No={key:0,class:"mp-p-warehouse-search"},Bo={class:"mp-p-warehouse-search-filter"},Do={class:"mp-p-warehouse-search-loading"},Fo=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppChannelsSearch",__name:"channels-search",props:Eo,emits:Ao,setup(a,{emit:o}){const u=a,c=d(Ot,{}),h=M(!1),f=R({}),p=M({name:""}),m=M([]),b=M([]),g=M(!1),y=t(()=>p.value.name?m.value.filter(e=>e.name.includes(p.value.name)):m.value);function v(){return b.value}return Ga("MorningfastPlusChannelsSearch",function(){f.value={...Ka.global,...Ka.MorningfastPlusChannelsSearch},h.value=Boolean(Wa.MorningfastPlusTaskSearch),async function(){try{g.value=!0;const e=await Ve.get(Wa.MorningfastPlusChannelsSearch,{headers:f.value});200===e?.status?m.value=e?.data?.data||[]:fe.error("查询异常,请稍后重试")}catch(e){}finally{g.value=!1}}(),c?.subscribeConfirmEvent?.(v)}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[h.value?(k(),i("div",No,[s("div",Bo,[l(I(le),{class:"mp-p-warehouse-search-filter-input",modelValue:p.value.name,"onUpdate:modelValue":a[0]||(a[0]=e=>p.value.name=e),placeholder:"请输入物流渠道名称",clearable:""},null,8,["modelValue"])]),l(I(ge),{height:"50vh"},{default:$(()=>[V(l(I(G),{class:"mp-p-warehouse-search-list",modelValue:b.value,"onUpdate:modelValue":a[1]||(a[1]=e=>b.value=e)},{default:$(()=>[(k(!0),i(e,null,T(y.value,e=>(k(),r(Po,{data:e,key:e.id,selection:u?.selection,onClick:()=>{return t=e,void(b.value.includes(t.id)?b.value=b.value.filter(e=>e!==t.id):b.value.push(t.id));var t}},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),[[z,!g.value]]),s("div",Do,[g.value?(k(),r(I(Wt),{key:0})):n("",!0)])]),_:1})])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f96bf035"]]);const Lo=et(Fo),zo={selection:{type:Boolean,default:!0}},Uo={},$o={data:{type:Object,required:!0},selection:{type:Boolean,default:!1}},Vo={click:e=>!0};async function Ho(e,t){const r=e?.selection?1080:960,n=e?.selection?.85:.72,i=window.innerWidth*n;return await Et(wl,e,{title:"产品查询器",width:`${i<r?r:i}px`,appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!1,showFooter:e?.selection,...t||{}})}const qo={sku:{type:String,required:!0,default:""}},Wo={},Xo={data:{type:Array,required:!0,default:()=>[]}},Ko={},Yo={modelValue:{type:Array,required:!0},data:{type:[Object,null],required:!0,default:()=>null},headers:{type:[Object,null],required:!1,default:()=>({})}},Zo={"update:modelValue":e=>!0,searchChildren:()=>!0},Go={data:{type:[Object,null],required:!0,default:()=>null},children:{type:Array,required:!0,default:()=>[]}};async function Jo(e,t){return await Et(hl,e,{title:`产品详情 -「${e?.sku}」`,width:"100%",appendToBody:!0,draggable:!0,alignCenter:!0,closeOnClickModal:!1,modal:!0,showFooter:!1,...t||{}})}var Qo={class:"mp-p-product-detail-children"},el={class:"mp-p-product-detail-children-status"},tl={class:"mp-p-product-detail-children-icon"},rl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppProductDetailChildren",__name:"product-detail-children",props:Xo,emits:Ko,setup(e,{emit:t}){const i=e;return(e,t)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[s("div",Qo,[l(I(ke),{data:i?.data,"max-height":"50vh",border:!0},{default:$(()=>[l(I(Se),{type:"index",label:"序号",width:70,align:"center"}),l(I(Se),{prop:"name_cn",label:"产品中文名称","min-width":180},{default:$(({row:e})=>[s("div",el,[s("span",null,[s("span",null,O(e.name_cn),1),e?.operational_status_name?(k(),r(I(Ee),{key:0,content:e?.operational_status_name,effect:"light",placement:"top"},{default:$(()=>[s("span",tl,[e?.operational_status_name?.includes("正常")?(k(),r(I(_t),{key:0,class:"mp-p-product-detail-children-success",type:"mdi",name:"mdiCheckDecagram",size:16})):(k(),r(I(_t),{key:1,class:"mp-p-product-detail-children-alert",type:"mdi",name:"mdiAlertDecagram",size:16}))])]),_:2},1032,["content"])):n("",!0)])])]),_:1}),l(I(Se),{prop:"stock_sku",label:"子SKU编码",width:180,align:"center"},{default:$(({row:e})=>[l(I(X),{type:"primary",link:"",onClick:()=>{return t=e,void(t?.stock_sku&&Jo({sku:t?.stock_sku}));var t}},{default:$(()=>[o(O(e?.stock_sku),1)]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])])]),_:1},8,["locale"]))}}),[["__scopeId","data-v-c8d0f0ef"]]),nl=/* @__PURE__ */u({name:"MppProductDetailBase",__name:"base",props:/* @__PURE__ */m(Yo,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(Zo,["update:modelValue"]),setup(e){const t=e,r=B(e,"modelValue"),n=M({children:!1});async function s(){r?.value?.length||await async function(){try{n.value.children=!0;const e=await Ve({method:"post",url:Wa.MorningfastPlusProductDetailChildren,headers:t?.headers||{},data:{sales_sku:t?.data?.sales_sku}});200===e?.status?r.value=e?.data?.data||[]:fe.error("查询异常,请稍后重试")}catch(e){}finally{n.value.children=!1}}(),await Et(rl,{data:r?.value||[]},{title:"全部子SKU列表",width:620})}return(e,t)=>(k(),i("div",null,[t[1]||(t[1]=o(" MppProductDetailBase ",-1)),l(I(X),{loading:n.value.children,onClick:s},{default:$(()=>[...t[0]||(t[0]=[o(" 点击查询全部子SKU ",-1)])]),_:1},8,["loading"])]))}}),il=/* @__PURE__ */u({name:"MppProductDetailCustomTag",__name:"custom-tag",props:Go,setup:e=>(e,t)=>(k(),i("div",null,"MppProductDetailCustomTag"))}),sl=/* @__PURE__ */u({name:"MppProductDetailPatentInformation",__name:"patent-information",props:Go,setup:e=>(e,t)=>(k(),i("div",null,"MppProductDetailPatentInformation"))}),al=/* @__PURE__ */u({name:"MppProductDetailSalesInformation",__name:"sales-information",props:Go,setup:e=>(e,t)=>(k(),i("div",null,"MppProductDetailSalesInformation"))}),ol=/* @__PURE__ */u({name:"MppProductDetailLogisticsSmallPack",__name:"logistics-small-pack",props:Go,setup:e=>(e,t)=>(k(),i("div",null,"MppProductDetailLogisticsSmallPack"))}),ll=/* @__PURE__ */u({name:"MppProductDetailPurchaseInformation",__name:"purchase-information",props:Go,setup:e=>(e,t)=>(k(),i("div",null,"MppProductDetailPurchaseInformation"))}),ul=/* @__PURE__ */u({name:"MppProductDetailSalesPlatformInformation",__name:"sales-platform-information",props:Go,setup:e=>(e,t)=>(k(),r(I(ke),{data:e.data?.sales_platform_information||[],"max-height":"45vh",border:!0},{default:$(()=>[l(I(Se),{label:"平台",prop:"platform_name","min-width":"160px",align:"center"}),l(I(Se),{label:"是否可刊登",prop:"sale_status_name","min-width":"200px",align:"center"}),l(I(Se),{label:"禁售类型",prop:"prohibit_type_name","min-width":"120px",align:"center"}),l(I(Se),{label:"备注",prop:"prohibit_remark","min-width":"160px",align:"center"})]),_:1},8,["data"]))}),cl=["loading"],hl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppProductDetail",__name:"product-detail",props:qo,emits:Wo,setup(t,{emit:a}){const o=t,u=[{label:"分类信息",name:"custom_tag",component:il},{label:"专利信息",name:"patent_information",component:sl},{label:"权限信息",name:"sales_platform_information",component:ul},{label:"销售信息",name:"sales_information",component:al},{label:"物流小包",name:"logistics_small_pack",component:ol},{label:"采购信息",name:"purchase_information",component:ll}],c=M(!1),h=R({}),f=M(null),d=M([]),p=M({detail:!1}),m=M(0);return Ga("MorningfastPlusProductDetail",function(){c.value=Boolean(Wa.MorningfastPlusProductDetail)&&Boolean(Wa?.MorningfastPlusProductDetailChildren),h.value={...Ka.global,...Ka.MorningfastPlusProductDetail},async function(){try{p.value.detail=!0;const e=await Ve({method:"post",url:Wa.MorningfastPlusProductDetail,headers:h.value,data:{sku:o?.sku}});200===e?.status?f.value=e?.data?.data||null:fe.error("查询异常,请稍后重试")}catch(e){}finally{p.value.detail=!1}}()}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[c.value?(k(),i("div",{key:0,loading:p.value.detail,class:"mp-p-product-detail"},[l(I(ge),{"max-height":"70vh"},{default:$(()=>[l(I(K),{class:"mp-p-product-detail-card",shadow:"never"},{default:$(()=>[l(I(K),{class:"mp-p-product-detail-card-inner",header:"基本信息",shadow:"never"},{header:$(()=>[...a[2]||(a[2]=[s("span",null,"基本信息",-1)])]),default:$(()=>[l(nl,{modelValue:d.value,"onUpdate:modelValue":a[0]||(a[0]=e=>d.value=e),data:f.value,headers:h.value},null,8,["modelValue","data","headers"])]),_:1}),l(I(K),{class:"mp-p-product-detail-card-inner mp-p-product-detail-tab",shadow:"never"},{header:$(()=>[l(I(Me),{modelValue:m.value,"onUpdate:modelValue":a[1]||(a[1]=e=>m.value=e)},{default:$(()=>[(k(),i(e,null,T(u,(e,t)=>l(I(xe),{key:e.name,label:e.label,name:t},null,8,["label","name"])),64))]),_:1},8,["modelValue"])]),default:$(()=>[u?.[m.value]?.component?(k(),r(A(u?.[m.value]?.component),{key:0,data:f.value,children:d.value},null,8,["data","children"])):n("",!0)]),_:1})]),_:1})]),_:1})],8,cl)):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-f031b443"]]);const fl=et(hl);var dl={class:"mp-p-product-search-item__description"},pl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppProductSearchItem",__name:"product-item",props:$o,emits:Vo,setup(e,{emit:r}){const n=e,a=r,u=t(()=>n?.data?.warehouse_stock?.length>1?n?.data?.warehouse_stock?.[0]?.warehouse_name+`...等${n?.data?.warehouse_stock?.length}个仓库`:n?.data?.warehouse_stock?.[0]?.warehouse_name||""),c=t(()=>{const e=n?.data?.warehouse_stock?.reduce((e,t)=>e+(t?.stock_num||0),0);return e>0?e:0});function h(){n?.data?.sku&&Jo({sku:n?.data?.sku})}function f(){a("click",n?.data)}return(e,t)=>(k(),i("div",{class:"mp-p-product-search-item",onClick:f},[s("div",{onClick:q(e=>{},["stop"])},[V(l(I(Z),{value:e.data?.sku},null,8,["value"]),[[z,e.selection]])]),l(I(oe),{class:"mp-p-product-search-item__image",src:e.data?.image_path,fit:"contain"},null,8,["src"]),s("div",dl,[l(I(X),{class:"mp-p-product-search-item__description__sku",link:"",type:"primary",onClick:q(h,["stop"])},{default:$(()=>[o(O(e.data?.sku),1)]),_:1}),l(I(Te),{class:"mp-p-product-search-item__description__name",size:"small",onClick:q(e=>{},["stop"])},{default:$(()=>[o(O(e.data?.include),1)]),_:1}),l(I(Ee),{effect:"light",placement:"top","show-after":240},{content:$(()=>[l(I(ke),{class:"mp-p-product-search-item__description__warehouse__table",data:e.data?.warehouse_stock||[],border:!0,"max-height":200,size:"small"},{default:$(()=>[l(I(Se),{prop:"warehouse_name",label:"仓库",width:140}),l(I(Se),{prop:"stock_num",label:"库存",width:100})]),_:1},8,["data"])]),default:$(()=>[V(l(I(Te),{class:"mp-p-product-search-item__description__warehouse",onClick:q(e=>{},["stop"])},{default:$(()=>[l(I(Te),{type:"info",size:"small"},{default:$(()=>[o(O(u.value),1)]),_:1}),l(I(Te),{type:"danger",size:"small"},{default:$(()=>[o(" ("+O(c.value)+") ",1)]),_:1})]),_:1},512),[[z,u.value]])]),_:1})])]))}}),[["__scopeId","data-v-25d0bd47"]]),ml={key:0,class:"mp-p-product-search"},bl={class:"mp-p-product-search__filter"},gl={class:"mp-p-product-search__content"},yl={class:"mp-p-product-search__list__empty"},vl={key:0,class:"mp-p-product-search__list__empty"},wl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppProductSearch",__name:"product-search",props:zo,emits:Uo,setup(t,{emit:a}){const u=t,c=M(!1),h=R({}),f=F("listLoadingDom"),d=Ze(f),p=M({category:[],warehouse:[]}),m=M([]),b=M([]),g=M([]),y=M({product_name:"",sku:"",sku_type:[],warehouseCode:[]}),v=M({label:"name",value:"id",children:"children",multiple:!0}),w=M({page:1,pageSize:12,total:0,finish:!1}),_=M({list:!1,scrollLock:!1});function x(){y.value={product_name:"",sku:"",sku_type:[],warehouseCode:[]},b.value=[],g.value=[],w.value={page:1,pageSize:12,total:0,finish:!1},S()}async function S(e="cover"){if("append"!==e||!_.value.scrollLock)try{_.value.list=!0,_.value.scrollLock=!0;const t=await Ve({url:Wa.MorningfastPlusProductSearch,method:"POST",headers:h.value,data:{...y.value,page:w.value.page,limit:w.value.pageSize}});200===t?.status?("cover"===e?m.value=t?.data?.data?.list||[]:"append"===e&&(m.value=[...m.value,...t?.data?.data?.list||[]]),w.value.total=t?.data?.data?.total||0,w.value.finish=m.value.length>=w.value.total):fe.error("查询异常,请稍后重试")}catch(t){}finally{_.value.list=!1,_.value.scrollLock=!1}}const C=Ye((e="cover")=>{S(e)},1e3);function E(){C()}function A(){C()}function j(){m.value.length<w.value.total&&!_.value.list&&(w.value.page+=1,_.value.list=!0,C("append"))}return Ga("MorningfastPlusTaskSearch",function(){h.value={...Ka.global,...Ka.MorningfastPlusProductSearch},c.value=Boolean(Wa.MorningfastPlusProductSearch),S(),async function(){const e=await Promise.all([ro(),no()]);p.value.warehouse=e?.[0]||[],p.value.category=e?.[1]||[]}()}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[c.value?(k(),i("div",ml,[s("div",bl,[l(I(le),{modelValue:y.value.sku,"onUpdate:modelValue":a[0]||(a[0]=e=>y.value.sku=e),clearable:"",placeholder:"请输入产品SKU",class:"mp-p-product-search__filter__component",onInput:a[1]||(a[1]=()=>I(C)())},null,8,["modelValue"]),l(I(le),{modelValue:y.value.product_name,"onUpdate:modelValue":a[2]||(a[2]=e=>y.value.product_name=e),clearable:"",placeholder:"请输入产品名称",class:"mp-p-product-search__filter__component",onInput:a[3]||(a[3]=()=>I(C)())},null,8,["modelValue"]),l(I(ye),{modelValue:y.value.warehouseCode,"onUpdate:modelValue":a[4]||(a[4]=e=>y.value.warehouseCode=e),multiple:"",clearable:"","collapse-tags":"","collapse-tags-tooltip":"","max-collapse-tags-tooltip-height":340,class:"mp-p-product-search__filter__component",placeholder:"请选择仓库",onChange:E},{default:$(()=>[(k(!0),i(e,null,T(p.value.warehouse,e=>(k(),r(I(pe),{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),l(I(Y),{modelValue:y.value.sku_type,"onUpdate:modelValue":a[5]||(a[5]=e=>y.value.sku_type=e),options:p.value.category,props:v.value,clearable:"","collapse-tags":"","collapse-tags-tooltip":"","max-collapse-tags-tooltip-height":340,style:{width:"240px"},placeholder:"请选择产品分类",onChange:A},null,8,["modelValue","options","props"]),l(I(X),{class:"mp-p-product-search__filter__button",type:"primary",onClick:a[6]||(a[6]=()=>S())},{default:$(()=>[...a[8]||(a[8]=[o(" 查询 ",-1)])]),_:1}),l(I(X),{class:"mp-p-product-search__filter__button",type:"info",onClick:x},{default:$(()=>[...a[9]||(a[9]=[o(" 重置 ",-1)])]),_:1})]),s("div",gl,[l(I(ge),{class:"mp-p-product-search__list__scrollbar",height:"50vh",distance:I(d).height.value,onEndReached:j},{default:$(()=>[l(I(G),{class:"mp-p-product-search__list",modelValue:b.value,"onUpdate:modelValue":a[7]||(a[7]=e=>b.value=e)},{default:$(()=>[(k(!0),i(e,null,T(m.value,e=>(k(),r(pl,{data:e,key:e.sku,selection:u?.selection,onClick:()=>function(e){const t=b.value.findIndex(t=>t===e?.sku);-1!==t?(b.value.splice(t,1),g.value.filter(t=>t.sku!==e?.sku)):(b.value.push(e?.sku),g.value.push(e))}(e)},null,8,["data","selection","onClick"]))),128))]),_:1},8,["modelValue"]),V(s("div",{ref_key:"listLoadingDom",ref:f,class:"mp-p-product-search__list__loading"},[l(I(Wt))],512),[[z,m.value.length&&!w.value.finish]]),V(s("div",yl,[l(I(Te),{type:"info",size:"large"},{default:$(()=>[...a[10]||(a[10]=[o("暂无数据",-1)])]),_:1})],512),[[z,!_.value.list&&0===m.value.length]])]),_:1},8,["distance"]),V(l(I(ge),{class:"mp-p-product-search__record__scrollbar","view-class":"mp-p-product-search__record__scrollbar__view",height:"50vh"},{default:$(()=>[(k(!0),i(e,null,T(b.value,e=>(k(),r(I(Ce),{key:e,type:"primary",closable:"","disable-transitions":!1,onClose:()=>{return t=e,b.value=b.value.filter(e=>e!==t),void(g.value=g.value.filter(e=>e.sku!==t));var t}},{default:$(()=>[o(O(e),1)]),_:2},1032,["onClose"]))),128)),b.value.length?n("",!0):(k(),i("div",vl,[l(I(Te),{type:"info"},{default:$(()=>[...a[11]||(a[11]=[o("暂无选中数据",-1)])]),_:1})]))]),_:1},512),[[z,u?.selection]])])])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-1b544793"]]);const _l=et(wl),xl=["default","architecture"],kl={...Sa,modelValue:{type:[String,Number,Array],default:()=>""},multiple:{type:Boolean,default:()=>!1}},Sl={"update:modelValue":e=>!0};var Ml={key:0,class:"mp-p-user-select"};const Cl=et(/* @__PURE__ */u({name:"MppUserSelect",__name:"user-select",props:/* @__PURE__ */m(kl,{modelValue:{},modelModifiers:{}}),emits:/* @__PURE__ */m(Sl,["update:modelValue"]),setup(e,{emit:t}){const s=e,a=P(),o=c(),l=B(e,"modelValue"),u=M(!1),h=R({}),d=M([]),p=M(!1);return Ga("MorningfastPlusUserSelect",function(){u.value=Boolean(Wa.MorningfastPlusUserSelect),h.value={...Ka.global,...Ka.MorningfastPlusUserSelect},async function(){try{p.value=!0;const e=await Ve({method:"POST",url:Wa.MorningfastPlusUserSelect,headers:h.value});200===e?.status?d.value=e?.data?.data||[]:fe.error("查询异常,请稍后重试")}catch(e){}finally{p.value=!1}}()}),(e,t)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[u.value?(k(),i("div",Ml,[(k(),r(A(f(I(Ca),{...I(a),placeholder:"请选择用户",...s,...I(o)?.vnode?.props||{},options:d.value})),{modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=e=>l.value=e)},null,8,["modelValue"]))])):n("",!0)]),_:1},8,["locale"]))}})),Tl={modelValue:{type:Array,required:!1,default:()=>[]},separate:{type:Array,required:!1,default:()=>[]},defaultValue:{type:Array,required:!1,default:()=>[]}},El={"update:modelValue":e=>!0,"update:separate":e=>!0,change:e=>!0};var Al={key:0,class:"mp-p-user-select"};const Rl=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppUserSelectArchitecture",__name:"user-select-architecture",props:/* @__PURE__ */m(Tl,{modelValue:{required:!1,default:()=>[]},modelModifiers:{},separate:{required:!1,default:()=>[]},separateModifiers:{}}),emits:/* @__PURE__ */m(El,["update:modelValue","update:separate"]),setup(a,{expose:u,emit:c}){const h=a,f=c,d=B(a,"modelValue"),p=B(a,"separate"),m=M(!1),b=M(!1),y=R({}),v=F("architectureRef"),w=Ze(v),_=F("treeContainerRef"),x=Ze(_),S=F("inputTagRef"),C=F("treeRef"),E=M(""),A=M(!1),j=M({value:"id",label:"name",children:"user_list"}),P=M([]),N=t(()=>Math.min(Math.max(0,700,w?.width?.value),900)+"px"),D=t(()=>{const e=/* @__PURE__ */new Map;for(const t of P.value)for(const r of t?.user_list||[])r?.name&&e.set(r.name,r);return e}),L=t({get:()=>d?.value?.map(e=>e?.name?.toString())||[],set(e){if(e?.length>d?.value?.length){const t=e?.[e.length-1];if(!D.value?.has(t))return void fe.warning("未找到匹配用户,请重新输入")}d.value=function(e){const t=[];return e?.forEach(e=>{const r=D.value.get(e);r&&t.push(r)}),t}(e),f("change",d.value)}});function z(){A.value=!0,S?.value?.focus()}function V(){z()}function H(e,t){z();const r=[];t?.checkedNodes?.forEach(e=>{e?.user_list||r.push(e)}),d.value=r,f("change",d.value)}const W=Ye(function(e){E.value=e?.trim(),function(){const e=[];if(!E.value)return C?.value?.setData(P.value),void P.value?.forEach(e=>{const t=C?.value?.getNode?.(e?.id);t&&C?.value?.collapseNode(t)});P?.value?.forEach(t=>{const r=[];t?.user_list?.forEach(e=>{e?.name?.includes?.(E.value)&&r?.push(e)}),r.length&&e.push({id:t?.id,name:t?.name,user_list:r})}),C?.value?.setData(e),g(()=>{e?.forEach(e=>{const t=C?.value?.getNode?.(e?.id);t&&C?.value?.expandNode(t)})})}()},240);function X(){d.value?.forEach(e=>{const t=C?.value?.getNode?.(e?.id);t&&C?.value?.setChecked(t?.data?.id,!0)})}function K(e){const t=D?.value?.get(e);if(!t)return;const r=C?.value?.getNode?.(t?.id);r&&C?.value?.setChecked(r?.data?.id,!1)}function Y(){(C?.value?.getCheckedKeys?.(!0)||[])?.forEach(e=>{C?.value?.setChecked(e,!1)})}function Z(e){return(e||d.value)?.map(e=>({...e,id:e?.id?.toString().split("-")?.pop?.()||""}))?.filter(e=>Boolean(e?.id))}function G(e){const t=[],r={};for(const n of P.value){n?.name&&(r[n.name]=n);for(const e of n?.user_list||[])e?.name&&(r[e.name]=e)}e?.forEach(e=>{const n=r[e?.name?.toString()?.split("-")?.shift?.()];n&&t.push({...e,id:n?.id+"-"+e?.id})}),d.value=t}return Ga("MorningfastPlusUserSelectArchitecture",async function(){m.value=Boolean(Wa.MorningfastPlusUserSelectArchitecture),y.value={...Ka.global,...Ka.MorningfastPlusUserSelect},await async function(){try{b.value=!0;const t=await Ve({method:Xa.MorningfastPlusUserSelectArchitecture,url:Wa.MorningfastPlusUserSelectArchitecture,headers:y.value});200===t?.status?P.value=(e=t?.data?.data||[],e?.forEach(e=>{e?.id&&(e.id=e.id.toString(),e?.user_list?.forEach?.(t=>{t?.id&&(t.id=e?.id?.toString()+"-"+t.id.toString())}))}),e):fe.error("查询异常,请稍后重试")}catch(t){}finally{b.value=!1}var e}(),h?.defaultValue&&(p.value=h?.defaultValue,G(h?.defaultValue))}),U(()=>d.value,e=>{p.value=Z(e)},{deep:!0}),u({getCleanValue:Z,setValue:G}),(t,a)=>(k(),r(I(J),{locale:I(oo)},{default:$(()=>[m.value?(k(),i("div",Al,[s("div",{ref_key:"architectureRef",ref:v,class:"mp-p-user-select-architecture"},[l(I(be),{visible:A.value,"onUpdate:visible":a[1]||(a[1]=e=>A.value=e),"popper-class":"mpp-user-select-architecture-popper",placement:"bottom",trigger:"focus","hide-after":100,persistent:!1,width:N.value,"trigger-keys":[],teleported:"",onAfterEnter:X},{reference:$(()=>[l(I(ue),{ref_key:"inputTagRef",ref:S,modelValue:L.value,"onUpdate:modelValue":a[0]||(a[0]=e=>L.value=e),draggable:"",clearable:"","collapse-tags":!0,"collapse-tags-tooltip":!0,"save-on-blur":!1,trigger:"Enter",placeholder:"请选择用户",onInput:I(W),onRemoveTag:K,onClear:Y},null,8,["modelValue","onInput"])]),default:$(()=>[s("div",{class:"mpp-user-select-architecture-content",onClick:q(V,["stop"])},[l(I(we),{onResizeStart:z,onResizeEnd:z},{default:$(()=>[l(I(_e),{size:"50%",min:"50%"},{default:$(()=>[s("div",{ref_key:"treeContainerRef",ref:_,class:"mpp-user-select-architecture-panel-tree"},[l(I(Ae),{ref_key:"treeRef",ref:C,"show-checkbox":"",data:P.value,props:j.value,height:I(x)?.height?.value,onNodeClick:z,onCheck:H,onCurrentChange:z},null,8,["data","props","height"])],512)]),_:1}),l(I(_e),{size:"50%",min:25,collapsible:""},{default:$(()=>[l(I(ge),{"view-class":"mpp-user-select-architecture-panel-values"},{default:$(()=>[(k(!0),i(e,null,T(d.value,(e,t)=>(k(),r(I(Ce),{key:e?.id,type:"primary",closable:"",onClose:()=>function(e){z();const t=d.value.splice(e,1);d.value=[...d.value];const r=t?.[0];if(!r)return;const n=C?.value?.getNode?.(r?.id);n&&C?.value?.setChecked(n?.data?.id,!1)}(t)},{default:$(()=>[o(O(e?.name),1)]),_:2},1032,["onClose"]))),128))]),_:1})]),_:1})]),_:1})])]),_:1},8,["visible","width"])],512)])):n("",!0)]),_:1},8,["locale"]))}}),[["__scopeId","data-v-cd6016b6"]])),Ol={root:{type:Boolean,default:!1},rem:{type:Object,default:()=>({baseFontSize:16,viewportWidth:1920})},userName:{type:String,default:""},logo:{type:String,default:""},currentRoute:{type:Object,default:()=>null},routes:{type:[Array,null],default:()=>null}},jl={"click-logo":()=>!0,"click-router":e=>!0},Il={currentRoute:{type:Object,default:()=>null},route:{type:Object,default:()=>null}},Pl={click:e=>!0};var Nl={class:"mp-p-layout__aside-drawer-content"},Bl={class:"mp-p-layout__aside-drawer-content-title"},Dl=["onClick"],Fl={key:0,class:"mp-p-layout__aside-drawer-group"},Ll=["onClick"],zl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppLayoutAsideDrawer",__name:"aside-drawer",props:Il,emits:Pl,setup(t,{emit:r}){const a=t,o=r;function l(e){e?.children?.length||o("click",e)}return(t,r)=>(k(),i("section",Nl,[s("span",Bl,O(a?.route?.meta?.title),1),(k(!0),i(e,null,T(a?.route?.children,t=>(k(),i("div",{class:y([t?.children?.length?"mp-p-layout__aside-drawer-catalogue":"mp-p-layout__aside-drawer-item"])},[s("div",{class:y(["mp-p-layout__aside-drawer-item-text",{"inner-title":t?.children?.length,active:a?.currentRoute?.value?.path===`${a?.route?.path}${t?.path}`}]),onClick:()=>l(t)},[s("span",null,O(t?.meta?.title),1)],10,Dl),t?.children?.length?(k(),i("div",Fl,[(k(!0),i(e,null,T(t?.children,e=>(k(),i("div",{class:"mp-p-layout__aside-drawer-item",onClick:()=>l(e)},[s("span",{class:y(["mp-p-layout__aside-drawer-item-text",{active:a?.currentRoute?.value?.path===`${a?.route?.path}${t?.path}${e?.path}`}])},[s("span",null,O(e?.meta?.title),1)],2)],8,Ll))),256))])):n("",!0)],2))),256))]))}}),[["__scopeId","data-v-c8169f91"]]),Ul=["src"],$l={class:"mp-p-layout__aside-container"},Vl={class:"mp-p-layout__aside-menus"},Hl=["onClick"],ql={class:"mp-p-layout__aside-menu-text"},Wl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppLayoutAside",__name:"aside",props:Ol,emits:jl,setup(r,{emit:a}){const o=r,u=a,c=d(ft),h=t(()=>2*(c?.layout?.value?.currentRem||16)),f=M(!1),p=M(null);function m(){u?.("click-logo")}function b(e){u?.("click-router",e),v()}function g(e){return!(!o?.currentRoute||!e)&&(p?.value?p.value?.path===e?.path:o?.currentRoute?.value?.path?.startsWith(e?.path))}function v(){f.value=!1,p.value=null}return(t,r)=>(k(),i(e,null,[l(I(W),{class:"mp-p-layout__aside"},{default:$(()=>[o?.logo?(k(),i("div",{key:0,class:"mp-p-layout__aside-logo",onClick:m},[s("img",{src:o.logo,alt:"",draggable:"false"},null,8,Ul)])):n("",!0),s("div",$l,[s("div",Vl,[(k(!0),i(e,null,T(o?.routes,e=>(k(),i("div",{class:y(["mp-p-layout__aside-menu",{active:g(e)}]),onClick:()=>function(e){p.value=e,f.value=!0}(e)},[l(I(xt),{type:"mdi",name:e?.meta?.icon,size:h.value},null,8,["name","size"]),s("span",ql,O(e?.meta?.title),1)],10,Hl))),256))])])]),_:1}),l(I(ne),{modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=e=>f.value=e),direction:"ltr",size:"auto",class:"mp-p-layout__aside-drawer","body-class":"mp-p-layout__aside-drawer-body","z-index":4990,"with-header":!1,onClose:v},{default:$(()=>[l(zl,{route:p.value,"current-route":o?.currentRoute,onClick:b},null,8,["route","current-route"])]),_:1},8,["modelValue"])],64))}}),[["__scopeId","data-v-c5ab8472"]]),Xl={key:0,class:"mp-p-layout__header-page-manager"},Kl={class:"mp-p-layout__header-options"},Yl={key:0,class:"mp-p-layout__header-options-slot"},Zl={class:"mp-p-layout__header-options-user"},Gl=/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppLayoutHeader",__name:"header",props:Ol,emits:jl,setup(e,{emit:t}){const a=e;function o(){eo({},{showFooter:!1})}return(e,t)=>(k(),r(I(se),{class:"mp-p-layout__header"},{default:$(()=>[e.$slots?.tabs?(k(),i("div",Xl,[E(e.$slots,"tabs",{},void 0,!0)])):n("",!0),s("div",Kl,[e.$slots?.["header-option"]?(k(),i("div",Yl,[E(e.$slots,"header-option",{},void 0,!0),l(I(re),{direction:"vertical"})])):n("",!0),l(I(ae),{size:"1rem",onClick:o},{default:$(()=>[l(I($e))]),_:1}),l(I(ae),{size:"1rem"},{default:$(()=>[l(I(Le))]),_:1}),l(I(re),{direction:"vertical"}),l(I(be),{"popper-class":"mpp-layout__popup",disabled:!e.$slots["user-menu"],"show-after":0,offset:10,"hide-after":0,placement:"bottom",width:"auto",trigger:"click"},{reference:$(()=>[s("div",Zl,[s("span",null,"账户:"+O(a?.userName||"-"),1),e.$slots["user-menu"]?(k(),r(I(ae),{key:0,size:"0.75rem"},{default:$(()=>[l(I(ze))]),_:1})):n("",!0)])]),default:$(()=>[E(e.$slots,"user-menu",{},void 0,!0)]),_:3},8,["disabled"])])]),_:3}))}}),[["__scopeId","data-v-ad09aa81"]]);const Jl=et(/* @__PURE__ */ut(/* @__PURE__ */u({name:"MppLayoutMain",__name:"layout",props:Ol,emits:jl,setup(e,{emit:t}){const n=e,i=t,s=d(ft),o=F("mainRef"),u=Ze(o),c=R(!1),f=Ke("--root-font-size",document.documentElement);function p(){i("click-logo")}function m(e){i("click-router",e)}function g(){n?.root&&n?.rem?.viewportWidth&&n?.rem?.baseFontSize?requestIdleCallback(()=>{const e=window.innerWidth/(n?.rem?.viewportWidth||1920)*(n?.rem?.baseFontSize||16);f.value=`${e}px`,s&&(s.layout.value.currentRem=e),c.value=!0}):c.value=!0}return Ge("resize",g),g(),x(()=>{n?.root&&s&&(s?.layout?.value?.size||(s.layout.value.size=u))}),(e,t)=>V((k(),r(I(Q),{class:y(["mp-p-layout",{root:n?.root}])},{default:$(()=>[l(Wl,b(n,{onClickLogo:p,onClickRouter:m}),null,16),l(I(Q),{class:"mp-p-layout__content"},{default:$(()=>[l(Gl,v(h(n)),a({_:2},[T(e.$slots,(t,r)=>({name:r,fn:$(t=>[E(e.$slots,r,v(h(t||{})),void 0,!0)])}))]),1040),l(I(he),{ref_key:"mainRef",ref:o,class:"mp-p-layout__main"},{default:$(()=>[E(e.$slots,"default",{},void 0,!0)]),_:3},512)]),_:3})]),_:3},8,["class"])),[[z,c.value]])}}),[["__scopeId","data-v-7083901b"]]));export{ht as MpButton,it as MpButtonEmits,rt as MpButtonEnhanceProps,tt as MpButtonEnhanceType,nt as MpButtonProps,mt as MpConfiguration,pt as MpConfigurationEmits,dt as MpConfigurationProps,_t as MpIcon,gt as MpIconEmits,bt as MpIconProps,zt as MpInput,Mt as MpInputEmits,Tt as MpInputExtraEmits,Ct as MpInputExtraProps,kt as MpInputExtraType,St as MpInputProps,qt as MpLoading,Vt as MpLoadingEmits,$t as MpLoadingProps,Ut as MpLoadingSize,Fs as MpPageManager,Zt as MpPageManagerEmits,Yt as MpPageManagerProps,Kt as MpPageType,Ua as MpProductSelect,Ea as MpProductSelectEmits,Ta as MpProductSelectProps,Hs as MpScanInput,Xt as MpTabType,ka as MpUpload,ta as MpUploadEmits,ea as MpUploadProps,na as MpUploadRenderComponentEmits,ra as MpUploadRenderComponentProps,Ws as MpUploadRenderTypes,qs as MpUploadTypes,Ca as MpVirtualSelect,Ma as MpVirtualSelectEmits,Sa as MpVirtualSelectProps,Lo as MppChannelsSearch,Ao as MppChannelsSearchEmits,Oo as MppChannelsSearchItemEmits,Ro as MppChannelsSearchItemProps,Eo as MppChannelsSearchProps,Jl as MppLayout,Pl as MppLayoutDrawerEmits,Il as MppLayoutDrawerProps,jl as MppLayoutEmits,Ol as MppLayoutProps,fl as MppProductDetail,Zo as MppProductDetailBaseEmits,Yo as MppProductDetailBaseProps,Ko as MppProductDetailChildrenEmits,Xo as MppProductDetailChildrenProps,Wo as MppProductDetailEmits,qo as MppProductDetailProps,Go as MppProductDetailTabProps,_l as MppProductSearch,Uo as MppProductSearchEmits,Vo as MppProductSearchItemEmits,$o as MppProductSearchItemProps,zo as MppProductSearchProps,mo as MppTaskSearch,Qa as MppTaskSearchEmits,Ja as MppTaskSearchProps,Cl as MppUserSelect,Rl as MppUserSelectArchitecture,El as MppUserSelectArchitectureEmits,Tl as MppUserSelectArchitectureProps,Sl as MppUserSelectEmits,xl as MppUserSelectMode,kl as MppUserSelectProps,To as MppWarehouseSearch,go as MppWarehouseSearchEmits,vo as MppWarehouseSearchItemEmits,yo as MppWarehouseSearchItemProps,bo as MppWarehouseSearchProps,ft as __MpConfigurationKey__,er as addNewTab,tr as addPage,Gs as filterFileIcon,Qs as filterIsImage,Js as filterStatusIcon,Zs as filterTagThemeType,Qt as generatePage,Jt as generateTab,Za as injectPrivateHeaders,Ya as injectPrivateUrls,nr as newState,Ka as privateHeaders,Xa as privateMethods,Wa as privateUrls,rr as removePage,ir as sortTabs,vt as useAllIcon,jo as useChannelsSearchDialog,Jo as useProductDetailDialog,Ho as useProductSearchDialog,eo as useTaskSearchDialog,wo as useWarehouseSearchDialog,Gt as validateStore};