@alaarab/ogrid-react-xlsx-browser 2.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ogrid-xlsx.css +1 -0
- package/dist/ogrid-xlsx.js +183 -0
- package/package.json +58 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
var Q3=Object.create;var Zm=Object.defineProperty;var J3=Object.getOwnPropertyDescriptor;var ex=Object.getOwnPropertyNames;var tx=Object.getPrototypeOf,rx=Object.prototype.hasOwnProperty;var Cs=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Gn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var nx=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ex(t))!rx.call(e,i)&&i!==r&&Zm(e,i,{get:()=>t[i],enumerable:!(n=J3(t,i))||n.enumerable});return e};var Ke=(e,t,r)=>(r=e!=null?Q3(tx(e)):{},nx(t||!e||!e.__esModule?Zm(r,"default",{value:e,enumerable:true}):r,e));var l0=Gn(ut=>{var Sf=Symbol.for("react.transitional.element"),ix=Symbol.for("react.portal"),ax=Symbol.for("react.fragment"),ox=Symbol.for("react.strict_mode"),sx=Symbol.for("react.profiler"),lx=Symbol.for("react.consumer"),ux=Symbol.for("react.context"),cx=Symbol.for("react.forward_ref"),fx=Symbol.for("react.suspense"),dx=Symbol.for("react.memo"),r0=Symbol.for("react.lazy"),hx=Symbol.for("react.activity"),Qm=Symbol.iterator;function px(e){return e===null||typeof e!="object"?null:(e=Qm&&e[Qm]||e["@@iterator"],typeof e=="function"?e:null)}var n0={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},i0=Object.assign,a0={};function co(e,t,r){this.props=e,this.context=t,this.refs=a0,this.updater=r||n0;}co.prototype.isReactComponent={};co.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState");};co.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate");};function o0(){}o0.prototype=co.prototype;function Cf(e,t,r){this.props=e,this.context=t,this.refs=a0,this.updater=r||n0;}var Ef=Cf.prototype=new o0;Ef.constructor=Cf;i0(Ef,co.prototype);Ef.isPureReactComponent=true;var Jm=Array.isArray;function xf(){}var $t={H:null,A:null,T:null,S:null},s0=Object.prototype.hasOwnProperty;function Rf(e,t,r){var n=r.ref;return {$$typeof:Sf,type:e,key:t,ref:n!==void 0?n:null,props:r}}function mx(e,t){return Rf(e.type,t,e.props)}function Af(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sf}function gx(e){var t={"=":"=0",":":"=2"};return "$"+e.replace(/[=:]/g,function(r){return t[r]})}var e0=/\/+/g;function _f(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gx(""+e.key):t.toString(36)}function bx(e){switch(e.status){case "fulfilled":return e.value;case "rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(xf,xf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t);},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t);})),e.status){case "fulfilled":return e.value;case "rejected":throw e.reason}}throw e}function uo(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=false;if(e===null)s=true;else switch(a){case "bigint":case "string":case "number":s=true;break;case "object":switch(e.$$typeof){case Sf:case ix:s=true;break;case r0:return s=e._init,uo(s(e._payload),t,r,n,i)}}if(s)return i=i(e),s=n===""?"."+_f(e,0):n,Jm(i)?(r="",s!=null&&(r=s.replace(e0,"$&/")+"/"),uo(i,t,r,"",function(f){return f})):i!=null&&(Af(i)&&(i=mx(i,r+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(e0,"$&/")+"/")+s)),t.push(i)),1;s=0;var o=n===""?".":n+":";if(Jm(e))for(var l=0;l<e.length;l++)n=e[l],a=o+_f(n,l),s+=uo(n,t,r,a,i);else if(l=px(e),typeof l=="function")for(e=l.call(e),l=0;!(n=e.next()).done;)n=n.value,a=o+_f(n,l++),s+=uo(n,t,r,a,i);else if(a==="object"){if(typeof e.then=="function")return uo(bx(e),t,r,n,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function $l(e,t,r){if(e==null)return e;var n=[],i=0;return uo(e,n,"","",function(a){return t.call(r,a,i++)}),n}function vx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r);},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r);}),e._status===-1&&(e._status=0,e._result=t);}if(e._status===1)return e._result.default;throw e._result}var t0=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e);},yx={map:$l,forEach:function(e,t,r){$l(e,function(){t.apply(this,arguments);},r);},count:function(e){var t=0;return $l(e,function(){t++;}),t},toArray:function(e){return $l(e,function(t){return t})||[]},only:function(e){if(!Af(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ut.Activity=hx;ut.Children=yx;ut.Component=co;ut.Fragment=ax;ut.Profiler=sx;ut.PureComponent=Cf;ut.StrictMode=ox;ut.Suspense=fx;ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$t;ut.__COMPILER_RUNTIME={__proto__:null,c:function(e){return $t.H.useMemoCache(e)}};ut.cache=function(e){return function(){return e.apply(null,arguments)}};ut.cacheSignal=function(){return null};ut.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=i0({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!s0.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(n[a]=t[a]);var a=arguments.length-2;if(a===1)n.children=r;else if(1<a){for(var s=Array(a),o=0;o<a;o++)s[o]=arguments[o+2];n.children=s;}return Rf(e.type,i,n)};ut.createContext=function(e){return e={$$typeof:ux,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:lx,_context:e},e};ut.createElement=function(e,t,r){var n,i={},a=null;if(t!=null)for(n in t.key!==void 0&&(a=""+t.key),t)s0.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(i[n]=t[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];i.children=o;}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return Rf(e,a,i)};ut.createRef=function(){return {current:null}};ut.forwardRef=function(e){return {$$typeof:cx,render:e}};ut.isValidElement=Af;ut.lazy=function(e){return {$$typeof:r0,_payload:{_status:-1,_result:e},_init:vx}};ut.memo=function(e,t){return {$$typeof:dx,type:e,compare:t===void 0?null:t}};ut.startTransition=function(e){var t=$t.T,r={};$t.T=r;try{var n=e(),i=$t.S;i!==null&&i(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(xf,t0);}catch(a){t0(a);}finally{t!==null&&r.types!==null&&(t.types=r.types),$t.T=t;}};ut.unstable_useCacheRefresh=function(){return $t.H.useCacheRefresh()};ut.use=function(e){return $t.H.use(e)};ut.useActionState=function(e,t,r){return $t.H.useActionState(e,t,r)};ut.useCallback=function(e,t){return $t.H.useCallback(e,t)};ut.useContext=function(e){return $t.H.useContext(e)};ut.useDebugValue=function(){};ut.useDeferredValue=function(e,t){return $t.H.useDeferredValue(e,t)};ut.useEffect=function(e,t){return $t.H.useEffect(e,t)};ut.useEffectEvent=function(e){return $t.H.useEffectEvent(e)};ut.useId=function(){return $t.H.useId()};ut.useImperativeHandle=function(e,t,r){return $t.H.useImperativeHandle(e,t,r)};ut.useInsertionEffect=function(e,t){return $t.H.useInsertionEffect(e,t)};ut.useLayoutEffect=function(e,t){return $t.H.useLayoutEffect(e,t)};ut.useMemo=function(e,t){return $t.H.useMemo(e,t)};ut.useOptimistic=function(e,t){return $t.H.useOptimistic(e,t)};ut.useReducer=function(e,t,r){return $t.H.useReducer(e,t,r)};ut.useRef=function(e){return $t.H.useRef(e)};ut.useState=function(e){return $t.H.useState(e)};ut.useSyncExternalStore=function(e,t,r){return $t.H.useSyncExternalStore(e,t,r)};ut.useTransition=function(){return $t.H.useTransition()};ut.version="19.2.5";});var ht=Gn((U9,u0)=>{u0.exports=l0();});var y0=Gn(Qt=>{function Of(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,i=e[n];if(0<Xl(i,t))e[n]=t,e[r]=i,r=n;else break e}}function ei(e){return e.length===0?null:e[0]}function Kl(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,i=e.length,a=i>>>1;n<a;){var s=2*(n+1)-1,o=e[s],l=s+1,f=e[l];if(0>Xl(o,r))l<i&&0>Xl(f,o)?(e[n]=f,e[l]=r,n=l):(e[n]=o,e[s]=r,n=s);else if(l<i&&0>Xl(f,r))e[n]=f,e[l]=r,n=l;else break e}}return t}function Xl(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}Qt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(c0=performance,Qt.unstable_now=function(){return c0.now()}):(Tf=Date,f0=Tf.now(),Qt.unstable_now=function(){return Tf.now()-f0});var c0,Tf,f0,mi=[],Bi=[],wx=1,Cn=null,Lr=3,Df=false,Es=false,Rs=false,Nf=false,p0=typeof setTimeout=="function"?setTimeout:null,m0=typeof clearTimeout=="function"?clearTimeout:null,d0=typeof setImmediate<"u"?setImmediate:null;function Yl(e){for(var t=ei(Bi);t!==null;){if(t.callback===null)Kl(Bi);else if(t.startTime<=e)Kl(Bi),t.sortIndex=t.expirationTime,Of(mi,t);else break;t=ei(Bi);}}function If(e){if(Rs=false,Yl(e),!Es)if(ei(mi)!==null)Es=true,ho||(ho=true,fo());else {var t=ei(Bi);t!==null&&zf(If,t.startTime-e);}}var ho=false,As=-1,g0=5,b0=-1;function v0(){return Nf?true:!(Qt.unstable_now()-b0<g0)}function Mf(){if(Nf=false,ho){var e=Qt.unstable_now();b0=e;var t=true;try{e:{Es=!1,Rs&&(Rs=!1,m0(As),As=-1),Df=!0;var r=Lr;try{t:{for(Yl(e),Cn=ei(mi);Cn!==null&&!(Cn.expirationTime>e&&v0());){var n=Cn.callback;if(typeof n=="function"){Cn.callback=null,Lr=Cn.priorityLevel;var i=n(Cn.expirationTime<=e);if(e=Qt.unstable_now(),typeof i=="function"){Cn.callback=i,Yl(e),t=!0;break t}Cn===ei(mi)&&Kl(mi),Yl(e);}else Kl(mi);Cn=ei(mi);}if(Cn!==null)t=!0;else {var a=ei(Bi);a!==null&&zf(If,a.startTime-e),t=!1;}}break e}finally{Cn=null,Lr=r,Df=!1;}t=void 0;}}finally{t?fo():ho=false;}}}var fo;typeof d0=="function"?fo=function(){d0(Mf);}:typeof MessageChannel<"u"?(kf=new MessageChannel,h0=kf.port2,kf.port1.onmessage=Mf,fo=function(){h0.postMessage(null);}):fo=function(){p0(Mf,0);};var kf,h0;function zf(e,t){As=p0(function(){e(Qt.unstable_now());},t);}Qt.unstable_IdlePriority=5;Qt.unstable_ImmediatePriority=1;Qt.unstable_LowPriority=4;Qt.unstable_NormalPriority=3;Qt.unstable_Profiling=null;Qt.unstable_UserBlockingPriority=2;Qt.unstable_cancelCallback=function(e){e.callback=null;};Qt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g0=0<e?Math.floor(1e3/e):5;};Qt.unstable_getCurrentPriorityLevel=function(){return Lr};Qt.unstable_next=function(e){switch(Lr){case 1:case 2:case 3:var t=3;break;default:t=Lr;}var r=Lr;Lr=t;try{return e()}finally{Lr=r;}};Qt.unstable_requestPaint=function(){Nf=true;};Qt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3;}var r=Lr;Lr=e;try{return t()}finally{Lr=r;}};Qt.unstable_scheduleCallback=function(e,t,r){var n=Qt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3;}return i=r+i,e={id:wx++,callback:t,priorityLevel:e,startTime:r,expirationTime:i,sortIndex:-1},r>n?(e.sortIndex=r,Of(Bi,e),ei(mi)===null&&e===ei(Bi)&&(Rs?(m0(As),As=-1):Rs=true,zf(If,r-n))):(e.sortIndex=i,Of(mi,e),Es||Df||(Es=true,ho||(ho=true,fo()))),e};Qt.unstable_shouldYield=v0;Qt.unstable_wrapCallback=function(e){var t=Lr;return function(){var r=Lr;Lr=t;try{return e.apply(this,arguments)}finally{Lr=r;}}};});var _0=Gn((V9,w0)=>{w0.exports=y0();});var S0=Gn(Hr=>{var _x=ht();function x0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);}return "Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Fi(){}var Ur={d:{f:Fi,r:function(){throw Error(x0(522))},D:Fi,C:Fi,L:Fi,m:Fi,X:Fi,S:Fi,M:Fi},p:0,findDOMNode:null},xx=Symbol.for("react.portal");function Sx(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return {$$typeof:xx,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}var Ts=_x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Zl(e,t){if(e==="font")return "";if(typeof t=="string")return t==="use-credentials"?t:""}Hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ur;Hr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(x0(299));return Sx(e,t,null,r)};Hr.flushSync=function(e){var t=Ts.T,r=Ur.p;try{if(Ts.T=null,Ur.p=2,e)return e()}finally{Ts.T=t,Ur.p=r,Ur.d.f();}};Hr.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ur.d.C(e,t));};Hr.prefetchDNS=function(e){typeof e=="string"&&Ur.d.D(e);};Hr.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,n=Zl(r,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Ur.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:i,fetchPriority:a}):r==="script"&&Ur.d.X(e,{crossOrigin:n,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0});}};Hr.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=Zl(t.as,t.crossOrigin);Ur.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0});}}else t==null&&Ur.d.M(e);};Hr.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,n=Zl(r,t.crossOrigin);Ur.d.L(e,r,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0});}};Hr.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=Zl(t.as,t.crossOrigin);Ur.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0});}else Ur.d.m(e);};Hr.requestFormReset=function(e){Ur.d.r(e);};Hr.unstable_batchedUpdates=function(e,t){return e(t)};Hr.useFormState=function(e,t,r){return Ts.H.useFormState(e,t,r)};Hr.useFormStatus=function(){return Ts.H.useHostTransitionStatus()};Hr.version="19.2.5";});var Pi=Gn((q9,E0)=>{function C0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(C0);}catch(e){console.error(e);}}C0(),E0.exports=S0();});var Lv=Gn(xc=>{var _r=_0(),Zg=ht(),Cx=Pi();function we(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);}return "Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Qg(e){return !(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function pl(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else {e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Jg(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function e1(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function R0(e){if(pl(e)!==e)throw Error(we(188))}function Ex(e){var t=e.alternate;if(!t){if(t=pl(e),t===null)throw Error(we(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return R0(i),e;if(a===n)return R0(i),t;a=a.sibling;}throw Error(we(188))}if(r.return!==n.return)r=i,n=a;else {for(var s=false,o=i.child;o;){if(o===r){s=true,r=i,n=a;break}if(o===n){s=true,n=i,r=a;break}o=o.sibling;}if(!s){for(o=a.child;o;){if(o===r){s=true,r=a,n=i;break}if(o===n){s=true,n=a,r=i;break}o=o.sibling;}if(!s)throw Error(we(189))}}if(r.alternate!==n)throw Error(we(190))}if(r.tag!==3)throw Error(we(188));return r.stateNode.current===r?e:t}function t1(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=t1(e),t!==null)return t;e=e.sibling;}return null}var Kt=Object.assign,Rx=Symbol.for("react.element"),Ql=Symbol.for("react.transitional.element"),js=Symbol.for("react.portal"),yo=Symbol.for("react.fragment"),r1=Symbol.for("react.strict_mode"),md=Symbol.for("react.profiler"),n1=Symbol.for("react.consumer"),Si=Symbol.for("react.context"),ch=Symbol.for("react.forward_ref"),gd=Symbol.for("react.suspense"),bd=Symbol.for("react.suspense_list"),fh=Symbol.for("react.memo"),Ui=Symbol.for("react.lazy"),vd=Symbol.for("react.activity"),Ax=Symbol.for("react.memo_cache_sentinel"),A0=Symbol.iterator;function Ms(e){return e===null||typeof e!="object"?null:(e=A0&&e[A0]||e["@@iterator"],typeof e=="function"?e:null)}var Tx=Symbol.for("react.client.reference");function yd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Tx?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yo:return "Fragment";case md:return "Profiler";case r1:return "StrictMode";case gd:return "Suspense";case bd:return "SuspenseList";case vd:return "Activity"}if(typeof e=="object")switch(e.$$typeof){case js:return "Portal";case Si:return e.displayName||"Context";case n1:return (e._context.displayName||"Context")+".Consumer";case ch:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fh:return t=e.displayName||null,t!==null?t:yd(e.type)||"Memo";case Ui:t=e._payload,e=e._init;try{return yd(e(t))}catch{}}return null}var Ls=Array.isArray,lt=Zg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Rt=Cx.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ma={pending:false,data:null,method:null,action:null},wd=[],wo=-1;function ai(e){return {current:e}}function Mr(e){0>wo||(e.current=wd[wo],wd[wo]=null,wo--);}function Vt(e,t){wo++,wd[wo]=e.current,e.current=t;}var ii=ai(null),el=ai(null),Qi=ai(null),Ou=ai(null);function Du(e,t){switch(Vt(Qi,t),Vt(el,e),Vt(ii,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ig(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ig(t),e=Sv(t,e);else switch(e){case "svg":e=1;break;case "math":e=2;break;default:e=0;}}Mr(ii),Vt(ii,e);}function Bo(){Mr(ii),Mr(el),Mr(Qi);}function _d(e){e.memoizedState!==null&&Vt(Ou,e);var t=ii.current,r=Sv(t,e.type);t!==r&&(Vt(el,e),Vt(ii,r));}function Nu(e){el.current===e&&(Mr(ii),Mr(el)),Ou.current===e&&(Mr(Ou),fl._currentValue=Ma);}var jf,T0;function Ea(e){if(jf===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||"",T0=-1<r.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":"";}return `
|
|
3
|
+
`+jf+e+T0}var Lf=false;function Bf(e,t){if(!e||Lf)return "";Lf=true;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[]);}catch(p){var d=p;}Reflect.construct(e,[],c);}else {try{c.call();}catch(p){d=p;}e.call(c.prototype);}}else {try{throw Error()}catch(p){d=p;}(c=e())&&typeof c.catch=="function"&&c.catch(function(){});}}catch(p){if(p&&d&&typeof p.stack=="string")return [p.stack,d.stack]}return [null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=n.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split(`
|
|
4
|
+
`),f=o.split(`
|
|
5
|
+
`);for(i=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;i<f.length&&!f[i].includes("DetermineComponentFrameRoot");)i++;if(n===l.length||i===f.length)for(n=l.length-1,i=f.length-1;1<=n&&0<=i&&l[n]!==f[i];)i--;for(;1<=n&&0<=i;n--,i--)if(l[n]!==f[i]){if(n!==1||i!==1)do if(n--,i--,0>i||l[n]!==f[i]){var u=`
|
|
6
|
+
`+l[n].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=n&&0<=i);break}}}finally{Lf=false,Error.prepareStackTrace=r;}return (r=e?e.displayName||e.name:"")?Ea(r):""}function Mx(e,t){switch(e.tag){case 26:case 27:case 5:return Ea(e.type);case 16:return Ea("Lazy");case 13:return e.child!==t&&t!==null?Ea("Suspense Fallback"):Ea("Suspense");case 19:return Ea("SuspenseList");case 0:case 15:return Bf(e.type,false);case 11:return Bf(e.type.render,false);case 1:return Bf(e.type,true);case 31:return Ea("Activity");default:return ""}}function M0(e){try{var t="",r=null;do t+=Mx(e,r),r=e,e=e.return;while(e);return t}catch(n){return `
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var xd=Object.prototype.hasOwnProperty,dh=_r.unstable_scheduleCallback,Ff=_r.unstable_cancelCallback,kx=_r.unstable_shouldYield,Ox=_r.unstable_requestPaint,mn=_r.unstable_now,Dx=_r.unstable_getCurrentPriorityLevel,i1=_r.unstable_ImmediatePriority,a1=_r.unstable_UserBlockingPriority,Iu=_r.unstable_NormalPriority,Nx=_r.unstable_LowPriority,o1=_r.unstable_IdlePriority,Ix=_r.log,zx=_r.unstable_setDisableYieldValue,ml=null,gn=null;function $i(e){if(typeof Ix=="function"&&zx(e),gn&&typeof gn.setStrictMode=="function")try{gn.setStrictMode(ml,e);}catch{}}var bn=Math.clz32?Math.clz32:Bx,jx=Math.log,Lx=Math.LN2;function Bx(e){return e>>>=0,e===0?32:31-(jx(e)/Lx|0)|0}var Jl=256,eu=262144,tu=4194304;function Ra(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oc(e,t,r){var n=e.pendingLanes;if(n===0)return 0;var i=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=n&134217727;return o!==0?(n=o&~a,n!==0?i=Ra(n):(s&=o,s!==0?i=Ra(s):r||(r=o&~e,r!==0&&(i=Ra(r))))):(o=n&~a,o!==0?i=Ra(o):s!==0?i=Ra(s):r||(r=n&~e,r!==0&&(i=Ra(r)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,r=t&-t,a>=r||a===32&&(r&4194048)!==0)?t:i}function gl(e,t){return (e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return -1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return -1;default:return -1}}function s1(){var e=tu;return tu<<=1,(tu&62914560)===0&&(tu=4194304),e}function Pf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function bl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0);}function Px(e,t,r,n,i,a){var s=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,f=e.hiddenUpdates;for(r=s&~r;0<r;){var u=31-bn(r),c=1<<u;o[u]=0,l[u]=-1;var d=f[u];if(d!==null)for(f[u]=null,u=0;u<d.length;u++){var p=d[u];p!==null&&(p.lane&=-536870913);}r&=~c;}n!==0&&l1(e,n,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(s&~t));}function l1(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-bn(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|r&261930;}function u1(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-bn(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i;}}function c1(e,t){var r=t&-t;return r=(r&42)!==0?1:hh(r),(r&(e.suspendedLanes|t))!==0?0:r}function hh(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0;}return e}function ph(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function f1(){var e=Rt.p;return e!==0?e:(e=window.event,e===void 0?32:Iv(e.type))}function k0(e,t){var r=Rt.p;try{return Rt.p=e,t()}finally{Rt.p=r;}}var fa=Math.random().toString(36).slice(2),Nr="__reactFiber$"+fa,Jr="__reactProps$"+fa,Yo="__reactContainer$"+fa,Sd="__reactEvents$"+fa,Ux="__reactListeners$"+fa,Hx="__reactHandles$"+fa,O0="__reactResources$"+fa,vl="__reactMarker$"+fa;function mh(e){delete e[Nr],delete e[Jr],delete e[Sd],delete e[Ux],delete e[Hx];}function _o(e){var t=e[Nr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Yo]||r[Nr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Fg(e);e!==null;){if(r=e[Nr])return r;e=Fg(e);}return t}e=r,r=e.parentNode;}return null}function Ko(e){if(e=e[Nr]||e[Yo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Bs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(we(33))}function Oo(e){var t=e[O0];return t||(t=e[O0]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Tr(e){e[vl]=true;}var d1=new Set,h1={};function Fa(e,t){Fo(e,t),Fo(e+"Capture",t);}function Fo(e,t){for(h1[e]=t,e=0;e<t.length;e++)d1.add(t[e]);}var Vx=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),D0={},N0={};function Gx(e){return xd.call(N0,e)?true:xd.call(D0,e)?false:Vx.test(e)?N0[e]=true:(D0[e]=true,false)}function gu(e,t,r){if(Gx(t))if(r===null)e.removeAttribute(t);else {switch(typeof r){case "undefined":case "function":case "symbol":e.removeAttribute(t);return;case "boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r);}}function ru(e,t,r){if(r===null)e.removeAttribute(t);else {switch(typeof r){case "undefined":case "function":case "symbol":case "boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r);}}function gi(e,t,r,n){if(n===null)e.removeAttribute(r);else {switch(typeof n){case "undefined":case "function":case "symbol":case "boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+n);}}function Rn(e){switch(typeof e){case "bigint":case "boolean":case "number":case "string":case "undefined":return e;case "object":return e;default:return ""}}function p1(e){var t=e.type;return (e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qx(e,t,r){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:true,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s);}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s;},stopTracking:function(){e._valueTracker=null,delete e[t];}}}}function Cd(e){if(!e._valueTracker){var t=p1(e)?"checked":"value";e._valueTracker=qx(e,t,""+e[t]);}}function m1(e){if(!e)return false;var t=e._valueTracker;if(!t)return true;var r=t.getValue(),n="";return e&&(n=p1(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),true):false}function zu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Wx=/[\n"\\]/g;function Mn(e){return e.replace(Wx,function(t){return "\\"+t.charCodeAt(0).toString(16)+" "})}function Ed(e,t,r,n,i,a,s,o){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Rn(t)):e.value!==""+Rn(t)&&(e.value=""+Rn(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Rd(e,s,Rn(t)):r!=null?Rd(e,s,Rn(r)):n!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Rn(o):e.removeAttribute("name");}function g1(e,t,r,n,i,a,s,o){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||r!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Cd(e);return}r=r!=null?""+Rn(r):"",t=t!=null?""+Rn(t):r,o||t===e.value||(e.value=t),e.defaultValue=t;}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=o?e.checked:!!n,e.defaultChecked=!!n,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Cd(e);}function Rd(e,t,r){t==="number"&&zu(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r);}function Do(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=true;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=true);}else {for(r=""+Rn(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=true,n&&(e[i].defaultSelected=true);return}t!==null||e[i].disabled||(t=e[i]);}t!==null&&(t.selected=true);}}function b1(e,t,r){if(t!=null&&(t=""+Rn(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+Rn(r):"";}function v1(e,t,r,n){if(t==null){if(n!=null){if(r!=null)throw Error(we(92));if(Ls(n)){if(1<n.length)throw Error(we(93));n=n[0];}r=n;}r==null&&(r=""),t=r;}r=Rn(t),e.defaultValue=r,n=e.textContent,n===r&&n!==""&&n!==null&&(e.value=n),Cd(e);}function Po(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t;}var $x=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function I0(e,t,r){var n=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,r):typeof r!="number"||r===0||$x.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px";}function y1(e,t,r){if(t!=null&&typeof t!="object")throw Error(we(62));if(e=e.style,r!=null){for(var n in r)!r.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&r[i]!==n&&I0(e,i,n);}else for(var a in t)t.hasOwnProperty(a)&&I0(e,a,t[a]);}function gh(e){if(e.indexOf("-")===-1)return false;switch(e){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return false;default:return true}}var Xx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Yx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function bu(e){return Yx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ci(){}var Ad=null;function bh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xo=null,No=null;function z0(e){var t=Ko(e);if(t&&(e=t.stateNode)){var r=e[Jr]||null;e:switch(e=t.stateNode,t.type){case "input":if(Ed(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Mn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=n[Jr]||null;if(!i)throw Error(we(90));Ed(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name);}}for(t=0;t<r.length;t++)n=r[t],n.form===e.form&&m1(n);}break e;case "textarea":b1(e,r.value,r.defaultValue);break e;case "select":t=r.value,t!=null&&Do(e,!!r.multiple,t,false);}}}var Uf=false;function w1(e,t,r){if(Uf)return e(t,r);Uf=true;try{var n=e(t);return n}finally{if(Uf=false,(xo!==null||No!==null)&&(vc(),xo&&(t=xo,e=No,No=xo=null,z0(t),e)))for(t=0;t<e.length;t++)z0(e[t]);}}function tl(e,t){var r=e.stateNode;if(r===null)return null;var n=r[Jr]||null;if(n===null)return null;r=n[t];e:switch(t){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=false;}if(e)return null;if(r&&typeof r!="function")throw Error(we(231,t,typeof r));return r}var Mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Td=false;if(Mi)try{po={},Object.defineProperty(po,"passive",{get:function(){Td=!0;}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po);}catch{Td=false;}var po,Xi=null,vh=null,vu=null;function _1(){if(vu)return vu;var e,t=vh,r=t.length,n,i="value"in Xi?Xi.value:Xi.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===i[a-n];n++);return vu=i.slice(e,1<n?1-n:void 0)}function yu(e){var t=e.keyCode;return "charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nu(){return true}function j0(){return false}function en(e){function t(r,n,i,a,s){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===false)?nu:j0,this.isPropagationStopped=j0,this}return Kt(t.prototype,{preventDefault:function(){this.defaultPrevented=true;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=false),this.isDefaultPrevented=nu);},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=true),this.isPropagationStopped=nu);},persist:function(){},isPersistent:nu}),t}var Pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sc=en(Pa),yl=Kt({},Pa,{view:0,detail:0}),Kx=en(yl),Hf,Vf,ks,lc=Kt({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return "movementX"in e?e.movementX:(e!==ks&&(ks&&e.type==="mousemove"?(Hf=e.screenX-ks.screenX,Vf=e.screenY-ks.screenY):Vf=Hf=0,ks=e),Hf)},movementY:function(e){return "movementY"in e?e.movementY:Vf}}),L0=en(lc),Zx=Kt({},lc,{dataTransfer:0}),Qx=en(Zx),Jx=Kt({},yl,{relatedTarget:0}),Gf=en(Jx),e4=Kt({},Pa,{animationName:0,elapsedTime:0,pseudoElement:0}),t4=en(e4),r4=Kt({},Pa,{clipboardData:function(e){return "clipboardData"in e?e.clipboardData:window.clipboardData}}),n4=en(r4),i4=Kt({},Pa,{data:0}),B0=en(i4),a4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},s4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s4[e])?!!t[e]:false}function yh(){return l4}var u4=Kt({},yl,{key:function(e){if(e.key){var t=a4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?o4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yh,charCode:function(e){return e.type==="keypress"?yu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c4=en(u4),f4=Kt({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),F0=en(f4),d4=Kt({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yh}),h4=en(d4),p4=Kt({},Pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),m4=en(p4),g4=Kt({},lc,{deltaX:function(e){return "deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return "deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),b4=en(g4),v4=Kt({},Pa,{newState:0,oldState:0}),y4=en(v4),w4=[9,13,27,32],wh=Mi&&"CompositionEvent"in window,Us=null;Mi&&"documentMode"in document&&(Us=document.documentMode);var _4=Mi&&"TextEvent"in window&&!Us,x1=Mi&&(!wh||Us&&8<Us&&11>=Us),P0=" ",U0=false;function S1(e,t){switch(e){case "keyup":return w4.indexOf(t.keyCode)!==-1;case "keydown":return t.keyCode!==229;case "keypress":case "mousedown":case "focusout":return true;default:return false}}function C1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=false;function x4(e,t){switch(e){case "compositionend":return C1(t);case "keypress":return t.which!==32?null:(U0=true,P0);case "textInput":return e=t.data,e===P0&&U0?null:e;default:return null}}function S4(e,t){if(So)return e==="compositionend"||!wh&&S1(e,t)?(e=_1(),vu=vh=Xi=null,So=false,e):null;switch(e){case "paste":return null;case "keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case "compositionend":return x1&&t.locale!=="ko"?null:t.data;default:return null}}var C4={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function H0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!C4[e.type]:t==="textarea"}function E1(e,t,r,n){xo?No?No.push(n):No=[n]:xo=n,t=Ju(t,"onChange"),0<t.length&&(r=new sc("onChange","change",null,r,n),e.push({event:r,listeners:t}));}var Hs=null,rl=null;function E4(e){wv(e,0);}function uc(e){var t=Bs(e);if(m1(t))return e}function V0(e,t){if(e==="change")return t}var R1=false;Mi&&(Mi?(au="oninput"in document,au||(qf=document.createElement("div"),qf.setAttribute("oninput","return;"),au=typeof qf.oninput=="function"),iu=au):iu=false,R1=iu&&(!document.documentMode||9<document.documentMode));var iu,au,qf;function G0(){Hs&&(Hs.detachEvent("onpropertychange",A1),rl=Hs=null);}function A1(e){if(e.propertyName==="value"&&uc(rl)){var t=[];E1(t,rl,e,bh(e)),w1(E4,t);}}function R4(e,t,r){e==="focusin"?(G0(),Hs=t,rl=r,Hs.attachEvent("onpropertychange",A1)):e==="focusout"&&G0();}function A4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uc(rl)}function T4(e,t){if(e==="click")return uc(t)}function M4(e,t){if(e==="input"||e==="change")return uc(t)}function k4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yn=typeof Object.is=="function"?Object.is:k4;function nl(e,t){if(yn(e,t))return true;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return false;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return false;for(n=0;n<r.length;n++){var i=r[n];if(!xd.call(t,i)||!yn(e[i],t[i]))return false}return true}function q0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function W0(e,t){var r=q0(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return {node:r,offset:t-e};e=n;}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode;}r=void 0;}r=q0(r);}}function T1(e,t){return e&&t?e===t?true:e&&e.nodeType===3?false:t&&t.nodeType===3?T1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):false:false}function M1(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zu(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string";}catch{r=false;}if(r)e=t.contentWindow;else break;t=zu(e.document);}return t}function _h(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var O4=Mi&&"documentMode"in document&&11>=document.documentMode,Co=null,Md=null,Vs=null,kd=false;function $0(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;kd||Co==null||Co!==zu(n)||(n=Co,"selectionStart"in n&&_h(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Vs&&nl(Vs,n)||(Vs=n,n=Ju(Md,"onSelect"),0<n.length&&(t=new sc("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Co)));}function Ca(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Eo={animationend:Ca("Animation","AnimationEnd"),animationiteration:Ca("Animation","AnimationIteration"),animationstart:Ca("Animation","AnimationStart"),transitionrun:Ca("Transition","TransitionRun"),transitionstart:Ca("Transition","TransitionStart"),transitioncancel:Ca("Transition","TransitionCancel"),transitionend:Ca("Transition","TransitionEnd")},Wf={},k1={};Mi&&(k1=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function Ua(e){if(Wf[e])return Wf[e];if(!Eo[e])return e;var t=Eo[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in k1)return Wf[e]=t[r];return e}var O1=Ua("animationend"),D1=Ua("animationiteration"),N1=Ua("animationstart"),D4=Ua("transitionrun"),N4=Ua("transitionstart"),I4=Ua("transitioncancel"),I1=Ua("transitionend"),z1=new Map,Od="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Od.push("scrollEnd");function $n(e,t){z1.set(e,t),Fa(t,[e]);}var ju=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:true,cancelable:true,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e);},En=[],Ro=0,xh=0;function cc(){for(var e=Ro,t=xh=Ro=0;t<e;){var r=En[t];En[t++]=null;var n=En[t];En[t++]=null;var i=En[t];En[t++]=null;var a=En[t];if(En[t++]=null,n!==null&&i!==null){var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i;}a!==0&&j1(r,i,a);}}function fc(e,t,r,n){En[Ro++]=e,En[Ro++]=t,En[Ro++]=r,En[Ro++]=n,xh|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n);}function Sh(e,t,r,n){return fc(e,t,r,n),Lu(e)}function Ha(e,t){return fc(e,null,null,t),Lu(e)}function j1(e,t,r){e.lanes|=r;var n=e.alternate;n!==null&&(n.lanes|=r);for(var i=false,a=e.return;a!==null;)a.childLanes|=r,n=a.alternate,n!==null&&(n.childLanes|=r),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=true)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-bn(r),e=a.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=r|536870912),a):null}function Lu(e){if(50<Qs)throw Qs=0,Qd=null,Error(we(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ao={};function z4(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null;}function hn(e,t,r,n){return new z4(e,t,r,n)}function Ch(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ri(e,t){var r=e.alternate;return r===null?(r=hn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function L1(e,t){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function wu(e,t,r,n,i,a){var s=0;if(n=e,typeof e=="function")Ch(e)&&(s=1);else if(typeof e=="string")s=B6(e,r,ii.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case vd:return e=hn(31,r,t,i),e.elementType=vd,e.lanes=a,e;case yo:return ka(r.children,i,a,t);case r1:s=8,i|=24;break;case md:return e=hn(12,r,t,i|2),e.elementType=md,e.lanes=a,e;case gd:return e=hn(13,r,t,i),e.elementType=gd,e.lanes=a,e;case bd:return e=hn(19,r,t,i),e.elementType=bd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Si:s=10;break e;case n1:s=9;break e;case ch:s=11;break e;case fh:s=14;break e;case Ui:s=16,n=null;break e}s=29,r=Error(we(130,e===null?"null":typeof e,"")),n=null;}return t=hn(s,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function ka(e,t,r,n){return e=hn(7,e,n,t),e.lanes=r,e}function $f(e,t,r){return e=hn(6,e,null,t),e.lanes=r,e}function B1(e){var t=hn(18,null,null,0);return t.stateNode=e,t}function Xf(e,t,r){return t=hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var X0=new WeakMap;function kn(e,t){if(typeof e=="object"&&e!==null){var r=X0.get(e);return r!==void 0?r:(t={value:e,source:t,stack:M0(t)},X0.set(e,t),t)}return {value:e,source:t,stack:M0(t)}}var To=[],Mo=0,Bu=null,il=0,An=[],Tn=0,sa=null,ti=1,ri="";function _i(e,t){To[Mo++]=il,To[Mo++]=Bu,Bu=e,il=t;}function F1(e,t,r){An[Tn++]=ti,An[Tn++]=ri,An[Tn++]=sa,sa=e;var n=ti;e=ri;var i=32-bn(n)-1;n&=~(1<<i),r+=1;var a=32-bn(t)+i;if(30<a){var s=i-i%5;a=(n&(1<<s)-1).toString(32),n>>=s,i-=s,ti=1<<32-bn(t)+i|r<<i|n,ri=a+e;}else ti=1<<a|r<<i|n,ri=e;}function Eh(e){e.return!==null&&(_i(e,1),F1(e,1,0));}function Rh(e){for(;e===Bu;)Bu=To[--Mo],To[Mo]=null,il=To[--Mo],To[Mo]=null;for(;e===sa;)sa=An[--Tn],An[Tn]=null,ri=An[--Tn],An[Tn]=null,ti=An[--Tn],An[Tn]=null;}function P1(e,t){An[Tn++]=ti,An[Tn++]=ri,An[Tn++]=sa,ti=t.id,ri=t.overflow,sa=e;}var Ir=null,Yt=null,St=false,Ji=null,On=false,Dd=Error(we(519));function la(e){var t=Error(we(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw al(kn(t,e)),Dd}function Y0(e){var t=e.stateNode,r=e.type,n=e.memoizedProps;switch(t[Nr]=e,t[Jr]=n,r){case "dialog":bt("cancel",t),bt("close",t);break;case "iframe":case "object":case "embed":bt("load",t);break;case "video":case "audio":for(r=0;r<ul.length;r++)bt(ul[r],t);break;case "source":bt("error",t);break;case "img":case "image":case "link":bt("error",t),bt("load",t);break;case "details":bt("toggle",t);break;case "input":bt("invalid",t),g1(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,true);break;case "select":bt("invalid",t);break;case "textarea":bt("invalid",t),v1(t,n.value,n.defaultValue,n.children);}r=n.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||n.suppressHydrationWarning===true||xv(t.textContent,r)?(n.popover!=null&&(bt("beforetoggle",t),bt("toggle",t)),n.onScroll!=null&&bt("scroll",t),n.onScrollEnd!=null&&bt("scrollend",t),n.onClick!=null&&(t.onclick=Ci),t=true):t=false,t||la(e,true);}function K0(e){for(Ir=e.return;Ir;)switch(Ir.tag){case 5:case 31:case 13:On=false;return;case 27:case 3:On=true;return;default:Ir=Ir.return;}}function mo(e){if(e!==Ir)return false;if(!St)return K0(e),St=true,false;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||nh(e.type,e.memoizedProps)),r=!r),r&&Yt&&la(e),K0(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(317));Yt=Bg(e);}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(317));Yt=Bg(e);}else t===27?(t=Yt,da(e.type)?(e=sh,sh=null,Yt=e):Yt=t):Yt=Ir?Nn(e.stateNode.nextSibling):null;return true}function Ia(){Yt=Ir=null,St=false;}function Yf(){var e=Ji;return e!==null&&(Zr===null?Zr=e:Zr.push.apply(Zr,e),Ji=null),e}function al(e){Ji===null?Ji=[e]:Ji.push(e);}var Nd=ai(null),Va=null,Ei=null;function Vi(e,t,r){Vt(Nd,t._currentValue),t._currentValue=r;}function Ai(e){e._currentValue=Nd.current,Mr(Nd);}function Id(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return;}}function zd(e,t,r,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;e:for(;a!==null;){var o=a;a=i;for(var l=0;l<t.length;l++)if(o.context===t[l]){a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),Id(a.return,r,e),n||(s=null);break e}a=o.next;}}else if(i.tag===18){if(s=i.return,s===null)throw Error(we(341));s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),Id(s,r,e),s=null;}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return;}i=s;}}function Zo(e,t,r,n){e=null;for(var i=t,a=false;i!==null;){if(!a){if((i.flags&524288)!==0)a=true;else if((i.flags&262144)!==0)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(we(387));if(s=s.memoizedProps,s!==null){var o=i.type;yn(i.pendingProps.value,s.value)||(e!==null?e.push(o):e=[o]);}}else if(i===Ou.current){if(s=i.alternate,s===null)throw Error(we(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(fl):e=[fl]);}i=i.return;}e!==null&&zd(t,e,r,n),t.flags|=262144;}function Fu(e){for(e=e.firstContext;e!==null;){if(!yn(e.context._currentValue,e.memoizedValue))return true;e=e.next;}return false}function za(e){Va=e,Ei=null,e=e.dependencies,e!==null&&(e.firstContext=null);}function zr(e){return U1(Va,e)}function ou(e,t){return Va===null&&za(e),U1(e,t)}function U1(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},Ei===null){if(e===null)throw Error(we(308));Ei=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288;}else Ei=Ei.next=t;return r}var j4=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:false,addEventListener:function(r,n){e.push(n);}};this.abort=function(){t.aborted=true,e.forEach(function(r){return r()});};},L4=_r.unstable_scheduleCallback,B4=_r.unstable_NormalPriority,mr={$$typeof:Si,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ah(){return {controller:new j4,data:new Map,refCount:0}}function wl(e){e.refCount--,e.refCount===0&&L4(B4,function(){e.controller.abort();});}var Gs=null,jd=0,Uo=0,Io=null;function F4(e,t){if(Gs===null){var r=Gs=[];jd=0,Uo=Qh(),Io={status:"pending",value:void 0,then:function(n){r.push(n);}};}return jd++,t.then(Z0,Z0),t}function Z0(){if(--jd===0&&Gs!==null){Io!==null&&(Io.status="fulfilled");var e=Gs;Gs=null,Uo=0,Io=null;for(var t=0;t<e.length;t++)(0, e[t])();}}function P4(e,t){var r=[],n={status:"pending",value:null,reason:null,then:function(i){r.push(i);}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<r.length;i++)(0, r[i])(t);},function(i){for(n.status="rejected",n.reason=i,i=0;i<r.length;i++)(0, r[i])(void 0);}),n}var Q0=lt.S;lt.S=function(e,t){tv=mn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&F4(e,t),Q0!==null&&Q0(e,t);};var Oa=ai(null);function Th(){var e=Oa.current;return e!==null?e:Ut.pooledCache}function _u(e,t){t===null?Vt(Oa,Oa.current):Vt(Oa,t.pool);}function H1(){var e=Th();return e===null?null:{parent:mr._currentValue,pool:e}}var Qo=Error(we(460)),Mh=Error(we(474)),dc=Error(we(542)),Pu={then:function(){}};function J0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function V1(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Ci,Ci),t=r),t.status){case "fulfilled":return t.value;case "rejected":throw e=t.reason,tg(e),e;default:if(typeof t.status=="string")t.then(Ci,Ci);else {if(e=Ut,e!==null&&100<e.shellSuspendCounter)throw Error(we(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n;}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n;}});}switch(t.status){case "fulfilled":return t.value;case "rejected":throw e=t.reason,tg(e),e}throw Da=t,Qo}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Da=r,Qo):r}}var Da=null;function eg(){if(Da===null)throw Error(we(459));var e=Da;return Da=null,e}function tg(e){if(e===Qo||e===dc)throw Error(we(483))}var zo=null,ol=0;function su(e){var t=ol;return ol+=1,zo===null&&(zo=[]),V1(zo,e,t)}function Os(e,t){t=t.props.ref,e.ref=t!==void 0?t:null;}function lu(e,t){throw t.$$typeof===Rx?Error(we(525)):(e=Object.prototype.toString.call(t),Error(we(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function G1(e){function t(v,w){if(e){var C=v.deletions;C===null?(v.deletions=[w],v.flags|=16):C.push(w);}}function r(v,w){if(!e)return null;for(;w!==null;)t(v,w),w=w.sibling;return null}function n(v){for(var w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function i(v,w){return v=Ri(v,w),v.index=0,v.sibling=null,v}function a(v,w,C){return v.index=C,e?(C=v.alternate,C!==null?(C=C.index,C<w?(v.flags|=67108866,w):C):(v.flags|=67108866,w)):(v.flags|=1048576,w)}function s(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function o(v,w,C,T){return w===null||w.tag!==6?(w=$f(C,v.mode,T),w.return=v,w):(w=i(w,C),w.return=v,w)}function l(v,w,C,T){var I=C.type;return I===yo?u(v,w,C.props.children,T,C.key):w!==null&&(w.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ui&&Aa(I)===w.type)?(w=i(w,C.props),Os(w,C),w.return=v,w):(w=wu(C.type,C.key,C.props,null,v.mode,T),Os(w,C),w.return=v,w)}function f(v,w,C,T){return w===null||w.tag!==4||w.stateNode.containerInfo!==C.containerInfo||w.stateNode.implementation!==C.implementation?(w=Xf(C,v.mode,T),w.return=v,w):(w=i(w,C.children||[]),w.return=v,w)}function u(v,w,C,T,I){return w===null||w.tag!==7?(w=ka(C,v.mode,T,I),w.return=v,w):(w=i(w,C),w.return=v,w)}function c(v,w,C){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=$f(""+w,v.mode,C),w.return=v,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ql:return C=wu(w.type,w.key,w.props,null,v.mode,C),Os(C,w),C.return=v,C;case js:return w=Xf(w,v.mode,C),w.return=v,w;case Ui:return w=Aa(w),c(v,w,C)}if(Ls(w)||Ms(w))return w=ka(w,v.mode,C,null),w.return=v,w;if(typeof w.then=="function")return c(v,su(w),C);if(w.$$typeof===Si)return c(v,ou(v,w),C);lu(v,w);}return null}function d(v,w,C,T){var I=w!==null?w.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return I!==null?null:o(v,w,""+C,T);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Ql:return C.key===I?l(v,w,C,T):null;case js:return C.key===I?f(v,w,C,T):null;case Ui:return C=Aa(C),d(v,w,C,T)}if(Ls(C)||Ms(C))return I!==null?null:u(v,w,C,T,null);if(typeof C.then=="function")return d(v,w,su(C),T);if(C.$$typeof===Si)return d(v,w,ou(v,C),T);lu(v,C);}return null}function p(v,w,C,T,I){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return v=v.get(C)||null,o(w,v,""+T,I);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ql:return v=v.get(T.key===null?C:T.key)||null,l(w,v,T,I);case js:return v=v.get(T.key===null?C:T.key)||null,f(w,v,T,I);case Ui:return T=Aa(T),p(v,w,C,T,I)}if(Ls(T)||Ms(T))return v=v.get(C)||null,u(w,v,T,I,null);if(typeof T.then=="function")return p(v,w,C,su(T),I);if(T.$$typeof===Si)return p(v,w,C,ou(w,T),I);lu(w,T);}return null}function h(v,w,C,T){for(var I=null,k=null,D=w,j=w=0,F=null;D!==null&&j<C.length;j++){D.index>j?(F=D,D=null):F=D.sibling;var B=d(v,D,C[j],T);if(B===null){D===null&&(D=F);break}e&&D&&B.alternate===null&&t(v,D),w=a(B,w,j),k===null?I=B:k.sibling=B,k=B,D=F;}if(j===C.length)return r(v,D),St&&_i(v,j),I;if(D===null){for(;j<C.length;j++)D=c(v,C[j],T),D!==null&&(w=a(D,w,j),k===null?I=D:k.sibling=D,k=D);return St&&_i(v,j),I}for(D=n(D);j<C.length;j++)F=p(D,v,j,C[j],T),F!==null&&(e&&F.alternate!==null&&D.delete(F.key===null?j:F.key),w=a(F,w,j),k===null?I=F:k.sibling=F,k=F);return e&&D.forEach(function(E){return t(v,E)}),St&&_i(v,j),I}function m(v,w,C,T){if(C==null)throw Error(we(151));for(var I=null,k=null,D=w,j=w=0,F=null,B=C.next();D!==null&&!B.done;j++,B=C.next()){D.index>j?(F=D,D=null):F=D.sibling;var E=d(v,D,B.value,T);if(E===null){D===null&&(D=F);break}e&&D&&E.alternate===null&&t(v,D),w=a(E,w,j),k===null?I=E:k.sibling=E,k=E,D=F;}if(B.done)return r(v,D),St&&_i(v,j),I;if(D===null){for(;!B.done;j++,B=C.next())B=c(v,B.value,T),B!==null&&(w=a(B,w,j),k===null?I=B:k.sibling=B,k=B);return St&&_i(v,j),I}for(D=n(D);!B.done;j++,B=C.next())B=p(D,v,j,B.value,T),B!==null&&(e&&B.alternate!==null&&D.delete(B.key===null?j:B.key),w=a(B,w,j),k===null?I=B:k.sibling=B,k=B);return e&&D.forEach(function(M){return t(v,M)}),St&&_i(v,j),I}function g(v,w,C,T){if(typeof C=="object"&&C!==null&&C.type===yo&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Ql:e:{for(var I=C.key;w!==null;){if(w.key===I){if(I=C.type,I===yo){if(w.tag===7){r(v,w.sibling),T=i(w,C.props.children),T.return=v,v=T;break e}}else if(w.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ui&&Aa(I)===w.type){r(v,w.sibling),T=i(w,C.props),Os(T,C),T.return=v,v=T;break e}r(v,w);break}else t(v,w);w=w.sibling;}C.type===yo?(T=ka(C.props.children,v.mode,T,C.key),T.return=v,v=T):(T=wu(C.type,C.key,C.props,null,v.mode,T),Os(T,C),T.return=v,v=T);}return s(v);case js:e:{for(I=C.key;w!==null;){if(w.key===I)if(w.tag===4&&w.stateNode.containerInfo===C.containerInfo&&w.stateNode.implementation===C.implementation){r(v,w.sibling),T=i(w,C.children||[]),T.return=v,v=T;break e}else {r(v,w);break}else t(v,w);w=w.sibling;}T=Xf(C,v.mode,T),T.return=v,v=T;}return s(v);case Ui:return C=Aa(C),g(v,w,C,T)}if(Ls(C))return h(v,w,C,T);if(Ms(C)){if(I=Ms(C),typeof I!="function")throw Error(we(150));return C=I.call(C),m(v,w,C,T)}if(typeof C.then=="function")return g(v,w,su(C),T);if(C.$$typeof===Si)return g(v,w,ou(v,C),T);lu(v,C);}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,w!==null&&w.tag===6?(r(v,w.sibling),T=i(w,C),T.return=v,v=T):(r(v,w),T=$f(C,v.mode,T),T.return=v,v=T),s(v)):r(v,w)}return function(v,w,C,T){try{ol=0;var I=g(v,w,C,T);return zo=null,I}catch(D){if(D===Qo||D===dc)throw D;var k=hn(29,D,null,v.mode);return k.lanes=T,k.return=v,k}}}var ja=G1(true),q1=G1(false),Hi=false;function kh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null};}function Ld(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null});}function ea(e){return {lane:e,tag:0,payload:null,callback:null,next:null}}function ta(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Et&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Lu(e),j1(e,null,r),t}return fc(e,n,t,r),Lu(e)}function qs(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,u1(e,r);}}function Kf(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var s={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};a===null?i=a=s:a=a.next=s,r=r.next;}while(r!==null);a===null?i=a=t:a=a.next=t;}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,callbacks:n.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t;}var Bd=false;function Ws(){if(Bd){var e=Io;if(e!==null)throw e}}function $s(e,t,r,n){Bd=false;var i=e.updateQueue;Hi=false;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,f=l.next;l.next=null,s===null?a=f:s.next=f,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==s&&(o===null?u.firstBaseUpdate=f:o.next=f,u.lastBaseUpdate=l));}if(a!==null){var c=i.baseState;s=0,u=f=l=null,o=a;do{var d=o.lane&-536870913,p=d!==o.lane;if(p?(wt&d)===d:(n&d)===d){d!==0&&d===Uo&&(Bd=true),u!==null&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var h=e,m=o;d=t;var g=r;switch(m.tag){case 1:if(h=m.payload,typeof h=="function"){c=h.call(g,c,d);break e}c=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,d=typeof h=="function"?h.call(g,c,d):h,d==null)break e;c=Kt({},c,d);break e;case 2:Hi=true;}}d=o.callback,d!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[d]:p.push(d));}else p={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(f=u=p,l=c):u=u.next=p,s|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;p=o,o=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null;}}while(true);u===null&&(l=c),i.baseState=l,i.firstBaseUpdate=f,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ca|=s,e.lanes=s,e.memoizedState=c;}}function W1(e,t){if(typeof e!="function")throw Error(we(191,e));e.call(t);}function $1(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)W1(r[e],t);}var Ho=ai(null),Uu=ai(0);function rg(e,t){e=Ni,Vt(Uu,e),Vt(Ho,t),Ni=e|t.baseLanes;}function Fd(){Vt(Uu,Ni),Vt(Ho,Ho.current);}function Oh(){Ni=Uu.current,Mr(Ho),Mr(Uu);}var wn=ai(null),Dn=null;function Gi(e){var t=e.alternate;Vt(lr,lr.current&1),Vt(wn,e),Dn===null&&(t===null||Ho.current!==null||t.memoizedState!==null)&&(Dn=e);}function Pd(e){Vt(lr,lr.current),Vt(wn,e),Dn===null&&(Dn=e);}function X1(e){e.tag===22?(Vt(lr,lr.current),Vt(wn,e),Dn===null&&(Dn=e)):qi();}function qi(){Vt(lr,lr.current),Vt(wn,wn.current);}function dn(e){Mr(wn),Dn===e&&(Dn=null),Mr(lr);}var lr=ai(0);function Hu(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||ah(r)||oh(r)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return;}t.sibling.return=t.return,t=t.sibling;}return null}var ki=0,dt=null,Lt=null,hr=null,Vu=false,jo=false,La=false,Gu=0,sl=0,Lo=null,U4=0;function ir(){throw Error(we(321))}function Dh(e,t){if(t===null)return false;for(var r=0;r<t.length&&r<e.length;r++)if(!yn(e[r],t[r]))return false;return true}function Nh(e,t,r,n,i,a){return ki=a,dt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lt.H=e===null||e.memoizedState===null?Eb:Gh,La=false,a=r(n,i),La=false,jo&&(a=K1(t,r,n,i)),Y1(e),a}function Y1(e){lt.H=ll;var t=Lt!==null&&Lt.next!==null;if(ki=0,hr=Lt=dt=null,Vu=false,sl=0,Lo=null,t)throw Error(we(300));e===null||gr||(e=e.dependencies,e!==null&&Fu(e)&&(gr=true));}function K1(e,t,r,n){dt=e;var i=0;do{if(jo&&(Lo=null),sl=0,jo=false,25<=i)throw Error(we(301));if(i+=1,hr=Lt=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0);}lt.H=Rb,a=t(r,n);}while(jo);return a}function H4(){var e=lt.H,t=e.useState()[0];return t=typeof t.then=="function"?_l(t):t,e=e.useState()[0],(Lt!==null?Lt.memoizedState:null)!==e&&(dt.flags|=1024),t}function Ih(){var e=Gu!==0;return Gu=0,e}function zh(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r;}function jh(e){if(Vu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next;}Vu=false;}ki=0,hr=Lt=dt=null,jo=false,sl=Gu=0,Lo=null;}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return hr===null?dt.memoizedState=hr=e:hr=hr.next=e,hr}function ur(){if(Lt===null){var e=dt.alternate;e=e!==null?e.memoizedState:null;}else e=Lt.next;var t=hr===null?dt.memoizedState:hr.next;if(t!==null)hr=t,Lt=e;else {if(e===null)throw dt.alternate===null?Error(we(467)):Error(we(310));Lt=e,e={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},hr===null?dt.memoizedState=hr=e:hr=hr.next=e;}return hr}function hc(){return {lastEffect:null,events:null,stores:null,memoCache:null}}function _l(e){var t=sl;return sl+=1,Lo===null&&(Lo=[]),e=V1(Lo,e,t),t=dt,(hr===null?t.memoizedState:hr.next)===null&&(t=t.alternate,lt.H=t===null||t.memoizedState===null?Eb:Gh),e}function pc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _l(e);if(e.$$typeof===Si)return zr(e)}throw Error(we(438,String(e)))}function Lh(e){var t=null,r=dt.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var n=dt.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})));}if(t==null&&(t={data:[],index:0}),r===null&&(r=hc(),dt.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),n=0;n<e;n++)r[n]=Ax;return t.index++,r}function Oi(e,t){return typeof t=="function"?t(e):t}function xu(e){var t=ur();return Bh(t,Lt,e)}function Bh(e,t,r){var n=e.queue;if(n===null)throw Error(we(311));n.lastRenderedReducer=r;var i=e.baseQueue,a=n.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s;}t.baseQueue=i=a,n.pending=null;}if(a=e.baseState,i===null)e.memoizedState=a;else {t=i.next;var o=s=null,l=null,f=t,u=false;do{var c=f.lane&-536870913;if(c!==f.lane?(wt&c)===c:(ki&c)===c){var d=f.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),c===Uo&&(u=true);else if((ki&d)===d){f=f.next,d===Uo&&(u=true);continue}else c={lane:0,revertLane:f.revertLane,gesture:null,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},l===null?(o=l=c,s=a):l=l.next=c,dt.lanes|=d,ca|=d;c=f.action,La&&r(a,c),a=f.hasEagerState?f.eagerState:r(a,c);}else d={lane:c,revertLane:f.revertLane,gesture:f.gesture,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null},l===null?(o=l=d,s=a):l=l.next=d,dt.lanes|=c,ca|=c;f=f.next;}while(f!==null&&f!==t);if(l===null?s=a:l.next=o,!yn(a,e.memoizedState)&&(gr=true,u&&(r=Io,r!==null)))throw r;e.memoizedState=a,e.baseState=s,e.baseQueue=l,n.lastRenderedState=a;}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Zf(e){var t=ur(),r=t.queue;if(r===null)throw Error(we(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);yn(a,t.memoizedState)||(gr=true),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a;}return [a,n]}function Z1(e,t,r){var n=dt,i=ur(),a=St;if(a){if(r===void 0)throw Error(we(407));r=r();}else r=t();var s=!yn((Lt||i).memoizedState,r);if(s&&(i.memoizedState=r,gr=true),i=i.queue,Fh(eb.bind(null,n,i,e),[e]),i.getSnapshot!==t||s||hr!==null&&hr.memoizedState.tag&1){if(n.flags|=2048,Vo(9,{destroy:void 0},J1.bind(null,n,i,r,t),null),Ut===null)throw Error(we(349));a||(ki&127)!==0||Q1(n,t,r);}return r}function Q1(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=dt.updateQueue,t===null?(t=hc(),dt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e));}function J1(e,t,r,n){t.value=r,t.getSnapshot=n,tb(t)&&rb(e);}function eb(e,t,r){return r(function(){tb(t)&&rb(e);})}function tb(e){var t=e.getSnapshot;e=e.value;try{var r=t();return !yn(e,r)}catch{return true}}function rb(e){var t=Ha(e,2);t!==null&&Qr(t,e,2);}function Ud(e){var t=Vr();if(typeof e=="function"){var r=e;if(e=r(),La){$i(true);try{r();}finally{$i(false);}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:e},t}function nb(e,t,r,n){return e.baseState=r,Bh(e,Lt,typeof n=="function"?n:Oi)}function V4(e,t,r,n,i){if(gc(e))throw Error(we(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:true,status:"pending",value:null,reason:null,listeners:[],then:function(s){a.listeners.push(s);}};lt.T!==null?r(true):a.isTransition=false,n(a),r=t.pending,r===null?(a.next=t.pending=a,ib(t,a)):(a.next=r.next,t.pending=r.next=a);}}function ib(e,t){var r=t.action,n=t.payload,i=e.state;if(t.isTransition){var a=lt.T,s={};lt.T=s;try{var o=r(i,n),l=lt.S;l!==null&&l(s,o),ng(e,t,o);}catch(f){Hd(e,t,f);}finally{a!==null&&s.types!==null&&(a.types=s.types),lt.T=a;}}else try{a=r(i,n),ng(e,t,a);}catch(f){Hd(e,t,f);}}function ng(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(n){ig(e,t,n);},function(n){return Hd(e,t,n)}):ig(e,t,r);}function ig(e,t,r){t.status="fulfilled",t.value=r,ab(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,ib(e,r)));}function Hd(e,t,r){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=r,ab(t),t=t.next;while(t!==n)}e.action=null;}function ab(e){e=e.listeners;for(var t=0;t<e.length;t++)(0, e[t])();}function ob(e,t){return t}function ag(e,t){if(St){var r=Ut.formState;if(r!==null){e:{var n=dt;if(St){if(Yt){t:{for(var i=Yt,a=On;i.nodeType!==8;){if(!a){i=null;break t}if(i=Nn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null;}if(i){Yt=Nn(i.nextSibling),n=i.data==="F!";break e}}la(n);}n=false;}n&&(t=r[0]);}}return r=Vr(),r.memoizedState=r.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ob,lastRenderedState:t},r.queue=n,r=xb.bind(null,dt,n),n.dispatch=r,n=Ud(false),a=Vh.bind(null,dt,false,n.queue),n=Vr(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,r=V4.bind(null,dt,i,a,r),i.dispatch=r,n.memoizedState=e,[t,r,false]}function og(e){var t=ur();return sb(t,Lt,e)}function sb(e,t,r){if(t=Bh(e,t,ob)[0],e=xu(Oi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=_l(t);}catch(s){throw s===Qo?dc:s}else n=t;t=ur();var i=t.queue,a=i.dispatch;return r!==t.memoizedState&&(dt.flags|=2048,Vo(9,{destroy:void 0},G4.bind(null,i,r),null)),[n,a,e]}function G4(e,t){e.action=t;}function sg(e){var t=ur(),r=Lt;if(r!==null)return sb(t,r,e);ur(),t=t.memoizedState,r=ur();var n=r.queue.dispatch;return r.memoizedState=e,[t,n,false]}function Vo(e,t,r,n){return e={tag:e,create:r,deps:n,inst:t,next:null},t=dt.updateQueue,t===null&&(t=hc(),dt.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e),e}function lb(){return ur().memoizedState}function Su(e,t,r,n){var i=Vr();dt.flags|=e,i.memoizedState=Vo(1|t,{destroy:void 0},r,n===void 0?null:n);}function mc(e,t,r,n){var i=ur();n=n===void 0?null:n;var a=i.memoizedState.inst;Lt!==null&&n!==null&&Dh(n,Lt.memoizedState.deps)?i.memoizedState=Vo(t,a,r,n):(dt.flags|=e,i.memoizedState=Vo(1|t,a,r,n));}function lg(e,t){Su(8390656,8,e,t);}function Fh(e,t){mc(2048,8,e,t);}function q4(e){dt.flags|=4;var t=dt.updateQueue;if(t===null)t=hc(),dt.updateQueue=t,t.events=[e];else {var r=t.events;r===null?t.events=[e]:r.push(e);}}function ub(e){var t=ur().memoizedState;return q4({ref:t,nextImpl:e}),function(){if((Et&2)!==0)throw Error(we(440));return t.impl.apply(void 0,arguments)}}function cb(e,t){return mc(4,2,e,t)}function fb(e,t){return mc(4,4,e,t)}function db(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null);}}if(t!=null)return e=e(),t.current=e,function(){t.current=null;}}function hb(e,t,r){r=r!=null?r.concat([e]):null,mc(4,4,db.bind(null,t,e),r);}function Ph(){}function pb(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;return t!==null&&Dh(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function mb(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;if(t!==null&&Dh(t,n[1]))return n[0];if(n=e(),La){$i(true);try{e();}finally{$i(false);}}return r.memoizedState=[n,t],n}function Uh(e,t,r){return r===void 0||(ki&1073741824)!==0&&(wt&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=nv(),dt.lanes|=e,ca|=e,r)}function gb(e,t,r,n){return yn(r,t)?r:Ho.current!==null?(e=Uh(e,r,n),yn(e,t)||(gr=true),e):(ki&42)===0||(ki&1073741824)!==0&&(wt&261930)===0?(gr=true,e.memoizedState=r):(e=nv(),dt.lanes|=e,ca|=e,t)}function bb(e,t,r,n,i){var a=Rt.p;Rt.p=a!==0&&8>a?a:8;var s=lt.T,o={};lt.T=o,Vh(e,false,t,r);try{var l=i(),f=lt.S;if(f!==null&&f(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=P4(l,n);Xs(e,t,u,vn(e));}else Xs(e,t,n,vn(e));}catch(c){Xs(e,t,{then:function(){},status:"rejected",reason:c},vn());}finally{Rt.p=a,s!==null&&o.types!==null&&(s.types=o.types),lt.T=s;}}function W4(){}function Vd(e,t,r,n){if(e.tag!==5)throw Error(we(476));var i=vb(e).queue;bb(e,i,t,Ma,r===null?W4:function(){return yb(e),r(n)});}function vb(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ma,baseState:Ma,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:Ma},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oi,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function yb(e){var t=vb(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},vn());}function Hh(){return zr(fl)}function wb(){return ur().memoizedState}function _b(){return ur().memoizedState}function $4(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=vn();e=ea(r);var n=ta(t,e,r);n!==null&&(Qr(n,t,r),qs(n,t,r)),t={cache:Ah()},e.payload=t;return}t=t.return;}}function X4(e,t,r){var n=vn();r={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:false,eagerState:null,next:null},gc(e)?Sb(t,r):(r=Sh(e,t,r,n),r!==null&&(Qr(r,e,n),Cb(r,t,n)));}function xb(e,t,r){var n=vn();Xs(e,t,r,n);}function Xs(e,t,r,n){var i={lane:n,revertLane:0,gesture:null,action:r,hasEagerState:false,eagerState:null,next:null};if(gc(e))Sb(t,i);else {var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,o=a(s,r);if(i.hasEagerState=!0,i.eagerState=o,yn(o,s))return fc(e,t,i,0),Ut===null&&cc(),!1}catch{}if(r=Sh(e,t,i,n),r!==null)return Qr(r,e,n),Cb(r,t,n),true}return false}function Vh(e,t,r,n){if(n={lane:2,revertLane:Qh(),gesture:null,action:n,hasEagerState:false,eagerState:null,next:null},gc(e)){if(t)throw Error(we(479))}else t=Sh(e,r,n,2),t!==null&&Qr(t,e,2);}function gc(e){var t=e.alternate;return e===dt||t!==null&&t===dt}function Sb(e,t){jo=Vu=true;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t;}function Cb(e,t,r){if((r&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,u1(e,r);}}var ll={readContext:zr,use:pc,useCallback:ir,useContext:ir,useEffect:ir,useImperativeHandle:ir,useLayoutEffect:ir,useInsertionEffect:ir,useMemo:ir,useReducer:ir,useRef:ir,useState:ir,useDebugValue:ir,useDeferredValue:ir,useTransition:ir,useSyncExternalStore:ir,useId:ir,useHostTransitionStatus:ir,useFormState:ir,useActionState:ir,useOptimistic:ir,useMemoCache:ir,useCacheRefresh:ir};ll.useEffectEvent=ir;var Eb={readContext:zr,use:pc,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:zr,useEffect:lg,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Su(4194308,4,db.bind(null,t,e),r);},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){Su(4,2,e,t);},useMemo:function(e,t){var r=Vr();t=t===void 0?null:t;var n=e();if(La){$i(true);try{e();}finally{$i(false);}}return r.memoizedState=[n,t],n},useReducer:function(e,t,r){var n=Vr();if(r!==void 0){var i=r(t);if(La){$i(true);try{r(t);}finally{$i(false);}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=X4.bind(null,dt,e),[n.memoizedState,e]},useRef:function(e){var t=Vr();return e={current:e},t.memoizedState=e},useState:function(e){e=Ud(e);var t=e.queue,r=xb.bind(null,dt,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Ph,useDeferredValue:function(e,t){var r=Vr();return Uh(r,e,t)},useTransition:function(){var e=Ud(false);return e=bb.bind(null,dt,e.queue,true,false),Vr().memoizedState=e,[false,e]},useSyncExternalStore:function(e,t,r){var n=dt,i=Vr();if(St){if(r===void 0)throw Error(we(407));r=r();}else {if(r=t(),Ut===null)throw Error(we(349));(wt&127)!==0||Q1(n,t,r);}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,lg(eb.bind(null,n,a,e),[e]),n.flags|=2048,Vo(9,{destroy:void 0},J1.bind(null,n,a,r,t),null),r},useId:function(){var e=Vr(),t=Ut.identifierPrefix;if(St){var r=ri,n=ti;r=(n&~(1<<32-bn(n)-1)).toString(32)+r,t="_"+t+"R_"+r,r=Gu++,0<r&&(t+="H"+r.toString(32)),t+="_";}else r=U4++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hh,useFormState:ag,useActionState:ag,useOptimistic:function(e){var t=Vr();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=Vh.bind(null,dt,true,r),r.dispatch=t,[e,t]},useMemoCache:Lh,useCacheRefresh:function(){return Vr().memoizedState=$4.bind(null,dt)},useEffectEvent:function(e){var t=Vr(),r={impl:e};return t.memoizedState=r,function(){if((Et&2)!==0)throw Error(we(440));return r.impl.apply(void 0,arguments)}}},Gh={readContext:zr,use:pc,useCallback:pb,useContext:zr,useEffect:Fh,useImperativeHandle:hb,useInsertionEffect:cb,useLayoutEffect:fb,useMemo:mb,useReducer:xu,useRef:lb,useState:function(){return xu(Oi)},useDebugValue:Ph,useDeferredValue:function(e,t){var r=ur();return gb(r,Lt.memoizedState,e,t)},useTransition:function(){var e=xu(Oi)[0],t=ur().memoizedState;return [typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:Z1,useId:wb,useHostTransitionStatus:Hh,useFormState:og,useActionState:og,useOptimistic:function(e,t){var r=ur();return nb(r,Lt,e,t)},useMemoCache:Lh,useCacheRefresh:_b};Gh.useEffectEvent=ub;var Rb={readContext:zr,use:pc,useCallback:pb,useContext:zr,useEffect:Fh,useImperativeHandle:hb,useInsertionEffect:cb,useLayoutEffect:fb,useMemo:mb,useReducer:Zf,useRef:lb,useState:function(){return Zf(Oi)},useDebugValue:Ph,useDeferredValue:function(e,t){var r=ur();return Lt===null?Uh(r,e,t):gb(r,Lt.memoizedState,e,t)},useTransition:function(){var e=Zf(Oi)[0],t=ur().memoizedState;return [typeof e=="boolean"?e:_l(e),t]},useSyncExternalStore:Z1,useId:wb,useHostTransitionStatus:Hh,useFormState:sg,useActionState:sg,useOptimistic:function(e,t){var r=ur();return Lt!==null?nb(r,Lt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Lh,useCacheRefresh:_b};Rb.useEffectEvent=ub;function Qf(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Kt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r);}var Gd={enqueueSetState:function(e,t,r){e=e._reactInternals;var n=vn(),i=ea(n);i.payload=t,r!=null&&(i.callback=r),t=ta(e,i,n),t!==null&&(Qr(t,e,n),qs(t,e,n));},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=vn(),i=ea(n);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ta(e,i,n),t!==null&&(Qr(t,e,n),qs(t,e,n));},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=vn(),n=ea(r);n.tag=2,t!=null&&(n.callback=t),t=ta(e,n,r),t!==null&&(Qr(t,e,r),qs(t,e,r));}};function ug(e,t,r,n,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,s):t.prototype&&t.prototype.isPureReactComponent?!nl(r,n)||!nl(i,a):true}function cg(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Gd.enqueueReplaceState(t,t.state,null);}function Ba(e,t){var r=t;if("ref"in t){r={};for(var n in t)n!=="ref"&&(r[n]=t[n]);}if(e=e.defaultProps){r===t&&(r=Kt({},r));for(var i in e)r[i]===void 0&&(r[i]=e[i]);}return r}function Ab(e){ju(e);}function Tb(e){console.error(e);}function Mb(e){ju(e);}function qu(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack});}catch(n){setTimeout(function(){throw n});}}function fg(e,t,r){try{var n=e.onCaughtError;n(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null});}catch(i){setTimeout(function(){throw i});}}function qd(e,t,r){return r=ea(r),r.tag=3,r.payload={element:null},r.callback=function(){qu(e,t);},r}function kb(e){return e=ea(e),e.tag=3,e}function Ob(e,t,r,n){var i=r.type.getDerivedStateFromError;if(typeof i=="function"){var a=n.value;e.payload=function(){return i(a)},e.callback=function(){fg(t,r,n);};}var s=r.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){fg(t,r,n),typeof i!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var o=n.stack;this.componentDidCatch(n.value,{componentStack:o!==null?o:""});});}function Y4(e,t,r,n,i){if(r.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=r.alternate,t!==null&&Zo(t,r,i,true),r=wn.current,r!==null){switch(r.tag){case 31:case 13:return Dn===null?Ku():r.alternate===null&&ar===0&&(ar=3),r.flags&=-257,r.flags|=65536,r.lanes=i,n===Pu?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([n]):t.add(n),ud(e,n,i)),false;case 22:return r.flags|=65536,n===Pu?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([n]):r.add(n)),ud(e,n,i)),false}throw Error(we(435,r.tag))}return ud(e,n,i),Ku(),false}if(St)return t=wn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Dd&&(e=Error(we(422),{cause:n}),al(kn(e,r)))):(n!==Dd&&(t=Error(we(423),{cause:n}),al(kn(t,r))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=kn(n,r),i=qd(e.stateNode,n,i),Kf(e,i),ar!==4&&(ar=2)),false;var a=Error(we(520),{cause:n});if(a=kn(a,r),Zs===null?Zs=[a]:Zs.push(a),ar!==4&&(ar=2),t===null)return true;n=kn(n,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=i&-i,r.lanes|=e,e=qd(r.stateNode,n,e),Kf(r,e),false;case 1:if(t=r.type,a=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(ra===null||!ra.has(a))))return r.flags|=65536,i&=-i,r.lanes|=i,i=kb(i),Ob(i,e,r,n),Kf(r,i),false}r=r.return;}while(r!==null);return false}var qh=Error(we(461)),gr=false;function Dr(e,t,r,n){t.child=e===null?q1(t,null,r,n):ja(t,e.child,r,n);}function dg(e,t,r,n,i){r=r.render;var a=t.ref;if("ref"in n){var s={};for(var o in n)o!=="ref"&&(s[o]=n[o]);}else s=n;return za(t),n=Nh(e,t,r,s,a,i),o=Ih(),e!==null&&!gr?(zh(e,t,i),Di(e,t,i)):(St&&o&&Eh(t),t.flags|=1,Dr(e,t,n,i),t.child)}function hg(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!Ch(a)&&a.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=a,Db(e,t,a,n,i)):(e=wu(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Wh(e,i)){var s=a.memoizedProps;if(r=r.compare,r=r!==null?r:nl,r(s,n)&&e.ref===t.ref)return Di(e,t,i)}return t.flags|=1,e=Ri(a,n),e.ref=t.ref,e.return=t,t.child=e}function Db(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(nl(a,n)&&e.ref===t.ref)if(gr=false,t.pendingProps=n=a,Wh(e,i))(e.flags&131072)!==0&&(gr=true);else return t.lanes=e.lanes,Di(e,t,i)}return Wd(e,t,r,n,i)}function Nb(e,t,r,n){var i=n.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|r:r,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~a;}else n=0,t.child=null;return pg(e,t,a,r,n)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_u(t,a!==null?a.cachePool:null),a!==null?rg(t,a):Fd(),X1(t);else return n=t.lanes=536870912,pg(e,t,a!==null?a.baseLanes|r:r,r,n)}else a!==null?(_u(t,a.cachePool),rg(t,a),qi(),t.memoizedState=null):(e!==null&&_u(t,null),Fd(),qi());return Dr(e,t,i,r),t.child}function Fs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pg(e,t,r,n,i){var a=Th();return a=a===null?null:{parent:mr._currentValue,pool:a},t.memoizedState={baseLanes:r,cachePool:a},e!==null&&_u(t,null),Fd(),X1(t),e!==null&&Zo(e,t,n,true),t.childLanes=i,null}function Cu(e,t){return t=Wu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mg(e,t,r){return ja(t,e.child,null,r),e=Cu(t,t.pendingProps),e.flags|=2,dn(t),t.memoizedState=null,e}function K4(e,t,r){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(St){if(n.mode==="hidden")return e=Cu(t,n),t.lanes=536870912,Fs(null,e);if(Pd(t),(e=Yt)?(e=Ev(e,On),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sa!==null?{id:ti,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},r=B1(e),r.return=t,t.child=r,Ir=t,Yt=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return Cu(t,n)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(Pd(t),i)if(t.flags&256)t.flags&=-257,t=mg(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(we(558));else if(gr||Zo(e,t,r,false),i=(r&e.childLanes)!==0,gr||i){if(n=Ut,n!==null&&(s=c1(n,r),s!==0&&s!==a.retryLane))throw a.retryLane=s,Ha(e,s),Qr(n,e,s),qh;Ku(),t=mg(e,t,r);}else e=a.treeContext,Yt=Nn(s.nextSibling),Ir=t,St=true,Ji=null,On=false,e!==null&&P1(t,e),t=Cu(t,n),t.flags|=4096;return t}return e=Ri(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Eu(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else {if(typeof r!="function"&&typeof r!="object")throw Error(we(284));(e===null||e.ref!==r)&&(t.flags|=4194816);}}function Wd(e,t,r,n,i){return za(t),r=Nh(e,t,r,n,void 0,i),n=Ih(),e!==null&&!gr?(zh(e,t,i),Di(e,t,i)):(St&&n&&Eh(t),t.flags|=1,Dr(e,t,r,i),t.child)}function gg(e,t,r,n,i,a){return za(t),t.updateQueue=null,r=K1(t,n,r,i),Y1(e),n=Ih(),e!==null&&!gr?(zh(e,t,a),Di(e,t,a)):(St&&n&&Eh(t),t.flags|=1,Dr(e,t,r,a),t.child)}function bg(e,t,r,n,i){if(za(t),t.stateNode===null){var a=Ao,s=r.contextType;typeof s=="object"&&s!==null&&(a=zr(s)),a=new r(n,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Gd,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=n,a.state=t.memoizedState,a.refs={},kh(t),s=r.contextType,a.context=typeof s=="object"&&s!==null?zr(s):Ao,a.state=t.memoizedState,s=r.getDerivedStateFromProps,typeof s=="function"&&(Qf(t,r,s,n),a.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(s=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),s!==a.state&&Gd.enqueueReplaceState(a,a.state,null),$s(t,n,a,i),Ws(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=true;}else if(e===null){a=t.stateNode;var o=t.memoizedProps,l=Ba(r,o);a.props=l;var f=a.context,u=r.contextType;s=Ao,typeof u=="object"&&u!==null&&(s=zr(u));var c=r.getDerivedStateFromProps;u=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o||f!==s)&&cg(t,a,n,s),Hi=false;var d=t.memoizedState;a.state=d,$s(t,n,a,i),Ws(),f=t.memoizedState,o||d!==f||Hi?(typeof c=="function"&&(Qf(t,r,c,n),f=t.memoizedState),(l=Hi||ug(t,r,l,n,d,f,s))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=f),a.props=n,a.state=f,a.context=s,n=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=false);}else {a=t.stateNode,Ld(e,t),s=t.memoizedProps,u=Ba(r,s),a.props=u,c=t.pendingProps,d=a.context,f=r.contextType,l=Ao,typeof f=="object"&&f!==null&&(l=zr(f)),o=r.getDerivedStateFromProps,(f=typeof o=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==c||d!==l)&&cg(t,a,n,l),Hi=false,d=t.memoizedState,a.state=d,$s(t,n,a,i),Ws();var p=t.memoizedState;s!==c||d!==p||Hi||e!==null&&e.dependencies!==null&&Fu(e.dependencies)?(typeof o=="function"&&(Qf(t,r,o,n),p=t.memoizedState),(u=Hi||ug(t,r,u,n,d,p,l)||e!==null&&e.dependencies!==null&&Fu(e.dependencies))?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=false);}return a=n,Eu(e,t),n=(t.flags&128)!==0,a||n?(a=t.stateNode,r=n&&typeof r.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&n?(t.child=ja(t,e.child,null,i),t.child=ja(t,null,r,i)):Dr(e,t,r,i),t.memoizedState=a.state,e=t.child):e=Di(e,t,i),e}function vg(e,t,r,n){return Ia(),t.flags|=256,Dr(e,t,r,n),t.child}var Jf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ed(e){return {baseLanes:e,cachePool:H1()}}function td(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=pn),e}function Ib(e,t,r){var n=t.pendingProps,i=false,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?false:(lr.current&2)!==0),s&&(i=true,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(St){if(i?Gi(t):qi(),(e=Yt)?(e=Ev(e,On),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:sa!==null?{id:ti,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},r=B1(e),r.return=t,t.child=r,Ir=t,Yt=null)):e=null,e===null)throw la(t);return oh(e)?t.lanes=32:t.lanes=536870912,null}var o=n.children;return n=n.fallback,i?(qi(),i=t.mode,o=Wu({mode:"hidden",children:o},i),n=ka(n,i,r,null),o.return=t,n.return=t,o.sibling=n,t.child=o,n=t.child,n.memoizedState=ed(r),n.childLanes=td(e,s,r),t.memoizedState=Jf,Fs(null,n)):(Gi(t),$d(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(a)t.flags&256?(Gi(t),t.flags&=-257,t=rd(e,t,r)):t.memoizedState!==null?(qi(),t.child=e.child,t.flags|=128,t=null):(qi(),o=n.fallback,i=t.mode,n=Wu({mode:"visible",children:n.children},i),o=ka(o,i,r,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,ja(t,e.child,null,r),n=t.child,n.memoizedState=ed(r),n.childLanes=td(e,s,r),t.memoizedState=Jf,t=Fs(null,n));else if(Gi(t),oh(o)){if(s=o.nextSibling&&o.nextSibling.dataset,s)var f=s.dgst;s=f,n=Error(we(419)),n.stack="",n.digest=s,al({value:n,source:null,stack:null}),t=rd(e,t,r);}else if(gr||Zo(e,t,r,false),s=(r&e.childLanes)!==0,gr||s){if(s=Ut,s!==null&&(n=c1(s,r),n!==0&&n!==l.retryLane))throw l.retryLane=n,Ha(e,n),Qr(s,e,n),qh;ah(o)||Ku(),t=rd(e,t,r);}else ah(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Yt=Nn(o.nextSibling),Ir=t,St=true,Ji=null,On=false,e!==null&&P1(t,e),t=$d(t,n.children),t.flags|=4096);return t}return i?(qi(),o=n.fallback,i=t.mode,l=e.child,f=l.sibling,n=Ri(l,{mode:"hidden",children:n.children}),n.subtreeFlags=l.subtreeFlags&65011712,f!==null?o=Ri(f,o):(o=ka(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,Fs(null,n),n=t.child,o=e.child.memoizedState,o===null?o=ed(r):(i=o.cachePool,i!==null?(l=mr._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=H1(),o={baseLanes:o.baseLanes|r,cachePool:i}),n.memoizedState=o,n.childLanes=td(e,s,r),t.memoizedState=Jf,Fs(e.child,n)):(Gi(t),r=e.child,e=r.sibling,r=Ri(r,{mode:"visible",children:n.children}),r.return=t,r.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=r,t.memoizedState=null,r)}function $d(e,t){return t=Wu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Wu(e,t){return e=hn(22,e,null,t),e.lanes=0,e}function rd(e,t,r){return ja(t,e.child,null,r),e=$d(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yg(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Id(e.return,t,r);}function nd(e,t,r,n,i,a){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i,s.treeForkCount=a);}function zb(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;n=n.children;var s=lr.current,o=(s&2)!==0;if(o?(s=s&1|2,t.flags|=128):s&=1,Vt(lr,s),Dr(e,t,n,r),n=St?il:0,!o&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yg(e,r,t);else if(e.tag===19)yg(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return;}e.sibling.return=e.return,e=e.sibling;}switch(i){case "forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Hu(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),nd(t,false,i,r,a,n);break;case "backwards":case "unstable_legacy-backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Hu(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e;}nd(t,true,r,null,a,n);break;case "together":nd(t,false,null,null,void 0,n);break;default:t.memoizedState=null;}return t.child}function Di(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ca|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Zo(e,t,r,false),(r&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(we(153));if(t.child!==null){for(e=t.child,r=Ri(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ri(e,e.pendingProps),r.return=t;r.sibling=null;}return t.child}function Wh(e,t){return (e.lanes&t)!==0?true:(e=e.dependencies,!!(e!==null&&Fu(e)))}function Z4(e,t,r){switch(t.tag){case 3:Du(t,t.stateNode.containerInfo),Vi(t,mr,e.memoizedState.cache),Ia();break;case 27:case 5:_d(t);break;case 4:Du(t,t.stateNode.containerInfo);break;case 10:Vi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Pd(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Gi(t),t.flags|=128,null):(r&t.child.childLanes)!==0?Ib(e,t,r):(Gi(t),e=Di(e,t,r),e!==null?e.sibling:null);Gi(t);break;case 19:var i=(e.flags&128)!==0;if(n=(r&t.childLanes)!==0,n||(Zo(e,t,r,false),n=(r&t.childLanes)!==0),i){if(n)return zb(e,t,r);t.flags|=128;}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Vt(lr,lr.current),n)break;return null;case 22:return t.lanes=0,Nb(e,t,r,t.pendingProps);case 24:Vi(t,mr,e.memoizedState.cache);}return Di(e,t,r)}function jb(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)gr=true;else {if(!Wh(e,r)&&(t.flags&128)===0)return gr=false,Z4(e,t,r);gr=(e.flags&131072)!==0;}else gr=false,St&&(t.flags&1048576)!==0&&F1(t,il,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e=="function")Ch(e)?(n=Ba(e,n),t.tag=1,t=bg(null,t,e,n,r)):(t.tag=0,t=Wd(null,t,e,n,r));else {if(e!=null){var i=e.$$typeof;if(i===ch){t.tag=11,t=dg(null,t,e,n,r);break e}else if(i===fh){t.tag=14,t=hg(null,t,e,n,r);break e}}throw t=yd(e)||e,Error(we(306,t,""))}}return t;case 0:return Wd(e,t,t.type,t.pendingProps,r);case 1:return n=t.type,i=Ba(n,t.pendingProps),bg(e,t,n,i,r);case 3:e:{if(Du(t,t.stateNode.containerInfo),e===null)throw Error(we(387));n=t.pendingProps;var a=t.memoizedState;i=a.element,Ld(e,t),$s(t,n,null,r);var s=t.memoizedState;if(n=s.cache,Vi(t,mr,n),n!==a.cache&&zd(t,[mr],r,true),Ws(),n=s.element,a.isDehydrated)if(a={element:n,isDehydrated:false,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=vg(e,t,n,r);break e}else if(n!==i){i=kn(Error(we(424)),t),al(i),t=vg(e,t,n,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Yt=Nn(e.firstChild),Ir=t,St=true,Ji=null,On=true,r=q1(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else {if(Ia(),n===i){t=Di(e,t,r);break e}Dr(e,t,n,r);}t=t.child;}return t;case 26:return Eu(e,t),e===null?(r=Ug(t.type,null,t.pendingProps,null))?t.memoizedState=r:St||(r=t.type,e=t.pendingProps,n=ec(Qi.current).createElement(r),n[Nr]=t,n[Jr]=e,jr(n,r,e),Tr(n),t.stateNode=n):t.memoizedState=Ug(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _d(t),e===null&&St&&(n=t.stateNode=Rv(t.type,t.pendingProps,Qi.current),Ir=t,On=true,i=Yt,da(t.type)?(sh=i,Yt=Nn(n.firstChild)):Yt=i),Dr(e,t,t.pendingProps.children,r),Eu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&St&&((i=n=Yt)&&(n=E6(n,t.type,t.pendingProps,On),n!==null?(t.stateNode=n,Ir=t,Yt=Nn(n.firstChild),On=false,i=true):i=false),i||la(t)),_d(t),i=t.type,a=t.pendingProps,s=e!==null?e.memoizedProps:null,n=a.children,nh(i,a)?n=null:s!==null&&nh(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Nh(e,t,H4,null,null,r),fl._currentValue=i),Eu(e,t),Dr(e,t,n,r),t.child;case 6:return e===null&&St&&((e=r=Yt)&&(r=R6(r,t.pendingProps,On),r!==null?(t.stateNode=r,Ir=t,Yt=null,e=true):e=false),e||la(t)),null;case 13:return Ib(e,t,r);case 4:return Du(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ja(t,null,n,r):Dr(e,t,n,r),t.child;case 11:return dg(e,t,t.type,t.pendingProps,r);case 7:return Dr(e,t,t.pendingProps,r),t.child;case 8:return Dr(e,t,t.pendingProps.children,r),t.child;case 12:return Dr(e,t,t.pendingProps.children,r),t.child;case 10:return n=t.pendingProps,Vi(t,t.type,n.value),Dr(e,t,n.children,r),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,za(t),i=zr(i),n=n(i),t.flags|=1,Dr(e,t,n,r),t.child;case 14:return hg(e,t,t.type,t.pendingProps,r);case 15:return Db(e,t,t.type,t.pendingProps,r);case 19:return zb(e,t,r);case 31:return K4(e,t,r);case 22:return Nb(e,t,r,t.pendingProps);case 24:return za(t),n=zr(mr),e===null?(i=Th(),i===null&&(i=Ut,a=Ah(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=r),i=a),t.memoizedState={parent:n,cache:i},kh(t),Vi(t,mr,i)):((e.lanes&r)!==0&&(Ld(e,t),$s(t,null,null,r),Ws()),i=e.memoizedState,a=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Vi(t,mr,n)):(n=a.cache,Vi(t,mr,n),n!==i.cache&&zd(t,[mr],r,true))),Dr(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(we(156,t.tag))}function bi(e){e.flags|=4;}function id(e,t,r,n,i){if((t=(e.mode&32)!==0)&&(t=false),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(ov())e.flags|=8192;else throw Da=Pu,Mh}else e.flags&=-16777217;}function wg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Mv(t))if(ov())e.flags|=8192;else throw Da=Pu,Mh}function uu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?s1():536870912,e.lanes|=t,Go|=t);}function Ds(e,t){if(!St)switch(e.tailMode){case "hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case "collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null;}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Q4(e,t,r){var n=t.pendingProps;switch(Rh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return Xt(t),null;case 3:return r=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ai(mr),Bo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(mo(t)?bi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yf())),Xt(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(bi(t),a!==null?(Xt(t),wg(t,a)):(Xt(t),id(t,i,null,n,r))):a?a!==e.memoizedState?(bi(t),Xt(t),wg(t,a)):(Xt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&bi(t),Xt(t),id(t,i,e,n,r)),null;case 27:if(Nu(t),r=Qi.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&bi(t);else {if(!n){if(t.stateNode===null)throw Error(we(166));return Xt(t),null}e=ii.current,mo(t)?Y0(t):(e=Rv(i,n,r),t.stateNode=e,bi(t));}return Xt(t),null;case 5:if(Nu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&bi(t);else {if(!n){if(t.stateNode===null)throw Error(we(166));return Xt(t),null}if(a=ii.current,mo(t))Y0(t);else {var s=ec(Qi.current);switch(a){case 1:a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case "svg":a=s.createElementNS("http://www.w3.org/2000/svg",i);break;case "math":a=s.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case "script":a=s.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case "select":a=typeof n.is=="string"?s.createElement("select",{is:n.is}):s.createElement("select"),n.multiple?a.multiple=true:n.size&&(a.size=n.size);break;default:a=typeof n.is=="string"?s.createElement(i,{is:n.is}):s.createElement(i);}}a[Nr]=t,a[Jr]=n;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return;}s.sibling.return=s.return,s=s.sibling;}t.stateNode=a;e:switch(jr(a,i,n),i){case "button":case "input":case "select":case "textarea":n=!!n.autoFocus;break e;case "img":n=true;break e;default:n=false;}n&&bi(t);}}return Xt(t),id(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&bi(t);else {if(typeof n!="string"&&t.stateNode===null)throw Error(we(166));if(e=Qi.current,mo(t)){if(e=t.stateNode,r=t.memoizedProps,n=null,i=Ir,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps;}e[Nr]=t,e=!!(e.nodeValue===r||n!==null&&n.suppressHydrationWarning===true||xv(e.nodeValue,r)),e||la(t,true);}else e=ec(e).createTextNode(n),e[Nr]=t,t.stateNode=e;}return Xt(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(n=mo(t),r!==null){if(e===null){if(!n)throw Error(we(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(we(557));e[Nr]=t;}else Ia(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xt(t),e=false;}else r=Yf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=true;if(!e)return t.flags&256?(dn(t),t):(dn(t),null);if((t.flags&128)!==0)throw Error(we(558))}return Xt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=mo(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(we(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(we(317));i[Nr]=t;}else Ia(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xt(t),i=false;}else i=Yf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=true;if(!i)return t.flags&256?(dn(t),t):(dn(t),null)}return dn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=n!==null,e=e!==null&&e.memoizedState!==null,r&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==i&&(n.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),uu(t,t.updateQueue),Xt(t),null);case 4:return Bo(),e===null&&Jh(t.stateNode.containerInfo),Xt(t),null;case 10:return Ai(t.type),Xt(t),null;case 19:if(Mr(lr),n=t.memoizedState,n===null)return Xt(t),null;if(i=(t.flags&128)!==0,a=n.rendering,a===null)if(i)Ds(n,false);else {if(ar!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Hu(e),a!==null){for(t.flags|=128,Ds(n,false),e=a.updateQueue,t.updateQueue=e,uu(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)L1(r,e),r=r.sibling;return Vt(lr,lr.current&1|2),St&&_i(t,n.treeForkCount),t.child}e=e.sibling;}n.tail!==null&&mn()>Xu&&(t.flags|=128,i=true,Ds(n,false),t.lanes=4194304);}else {if(!i)if(e=Hu(a),e!==null){if(t.flags|=128,i=true,e=e.updateQueue,t.updateQueue=e,uu(t,e),Ds(n,true),n.tail===null&&n.tailMode==="hidden"&&!a.alternate&&!St)return Xt(t),null}else 2*mn()-n.renderingStartTime>Xu&&r!==536870912&&(t.flags|=128,i=true,Ds(n,false),t.lanes=4194304);n.isBackwards?(a.sibling=t.child,t.child=a):(e=n.last,e!==null?e.sibling=a:t.child=a,n.last=a);}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=mn(),e.sibling=null,r=lr.current,Vt(lr,i?r&1|2:r&1),St&&_i(t,n.treeForkCount),e):(Xt(t),null);case 22:case 23:return dn(t),Oh(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(r&536870912)!==0&&(t.flags&128)===0&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),r=t.updateQueue,r!==null&&uu(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==r&&(t.flags|=2048),e!==null&&Mr(Oa),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ai(mr),Xt(t),null;case 25:return null;case 30:return null}throw Error(we(156,t.tag))}function J4(e,t){switch(Rh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(mr),Bo(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Nu(t),null;case 31:if(t.memoizedState!==null){if(dn(t),t.alternate===null)throw Error(we(340));Ia();}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(we(340));Ia();}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mr(lr),null;case 4:return Bo(),null;case 10:return Ai(t.type),null;case 22:case 23:return dn(t),Oh(),e!==null&&Mr(Oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ai(mr),null;case 25:return null;default:return null}}function Lb(e,t){switch(Rh(t),t.tag){case 3:Ai(mr),Bo();break;case 26:case 27:case 5:Nu(t);break;case 4:Bo();break;case 31:t.memoizedState!==null&&dn(t);break;case 13:dn(t);break;case 19:Mr(lr);break;case 10:Ai(t.type);break;case 22:case 23:dn(t),Oh(),e!==null&&Mr(Oa);break;case 24:Ai(mr);}}function xl(e,t){try{var r=t.updateQueue,n=r!==null?r.lastEffect:null;if(n!==null){var i=n.next;r=i;do{if((r.tag&e)===e){n=void 0;var a=r.create,s=r.inst;n=a(),s.destroy=n;}r=r.next;}while(r!==i)}}catch(o){Dt(t,t.return,o);}}function ua(e,t,r){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next;n=a;do{if((n.tag&e)===e){var s=n.inst,o=s.destroy;if(o!==void 0){s.destroy=void 0,i=t;var l=r,f=o;try{f();}catch(u){Dt(i,l,u);}}}n=n.next;}while(n!==a)}}catch(u){Dt(t,t.return,u);}}function Bb(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{$1(t,r);}catch(n){Dt(e,e.return,n);}}}function Fb(e,t,r){r.props=Ba(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount();}catch(n){Dt(e,t,n);}}function Ys(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode;}typeof r=="function"?e.refCleanup=r(n):r.current=n;}}catch(i){Dt(e,t,i);}}function ni(e,t){var r=e.ref,n=e.refCleanup;if(r!==null)if(typeof n=="function")try{n();}catch(i){Dt(e,t,i);}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null);}else if(typeof r=="function")try{r(null);}catch(i){Dt(e,t,i);}else r.current=null;}function Pb(e){var t=e.type,r=e.memoizedProps,n=e.stateNode;try{e:switch(t){case "button":case "input":case "select":case "textarea":r.autoFocus&&n.focus();break e;case "img":r.src?n.src=r.src:r.srcSet&&(n.srcset=r.srcSet);}}catch(i){Dt(e,e.return,i);}}function ad(e,t,r){try{var n=e.stateNode;y6(n,e.type,r,t),n[Jr]=t;}catch(i){Dt(e,e.return,i);}}function Ub(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&da(e.type)||e.tag===4}function od(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ub(e.return))return null;e=e.return;}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&da(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child;}if(!(e.flags&2))return e.stateNode}}function Xd(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ci));else if(n!==4&&(n===27&&da(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(Xd(e,t,r),e=e.sibling;e!==null;)Xd(e,t,r),e=e.sibling;}function $u(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(n===27&&da(e.type)&&(r=e.stateNode),e=e.child,e!==null))for($u(e,t,r),e=e.sibling;e!==null;)$u(e,t,r),e=e.sibling;}function Hb(e){var t=e.stateNode,r=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);jr(t,n,r),t[Nr]=e,t[Jr]=r;}catch(a){Dt(e,e.return,a);}}var xi=false,pr=false,sd=false,_g=typeof WeakSet=="function"?WeakSet:Set,Ar=null;function e6(e,t){if(e=e.containerInfo,th=ic,e=M1(e),_h(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType;}catch{r=null;break e}var s=0,o=-1,l=-1,f=0,u=0,c=e,d=null;t:for(;;){for(var p;c!==r||i!==0&&c.nodeType!==3||(o=s+i),c!==a||n!==0&&c.nodeType!==3||(l=s+n),c.nodeType===3&&(s+=c.nodeValue.length),(p=c.firstChild)!==null;)d=c,c=p;for(;;){if(c===e)break t;if(d===r&&++f===i&&(o=s),d===a&&++u===n&&(l=s),(p=c.nextSibling)!==null)break;c=d,d=c.parentNode;}c=p;}r=o===-1||l===-1?null:{start:o,end:l};}else r=null;}r=r||{start:0,end:0};}else r=null;for(rh={focusedElem:e,selectionRange:r},ic=false,Ar=t;Ar!==null;)if(t=Ar,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ar=e;else for(;Ar!==null;){switch(t=Ar,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)i=e[r],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,r=t,i=a.memoizedProps,a=a.memoizedState,n=r.stateNode;try{var h=Ba(r.type,i);e=n.getSnapshotBeforeUpdate(h,a),n.__reactInternalSnapshotBeforeUpdate=e;}catch(m){Dt(r,r.return,m);}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)ih(e);else if(r===1)switch(e.nodeName){case "HEAD":case "HTML":case "BODY":ih(e);break;default:e.textContent="";}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(we(163))}if(e=t.sibling,e!==null){e.return=t.return,Ar=e;break}Ar=t.return;}}function Vb(e,t,r){var n=r.flags;switch(r.tag){case 0:case 11:case 15:yi(e,r),n&4&&xl(5,r);break;case 1:if(yi(e,r),n&4)if(e=r.stateNode,t===null)try{e.componentDidMount();}catch(s){Dt(r,r.return,s);}else {var i=Ba(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate);}catch(s){Dt(r,r.return,s);}}n&64&&Bb(r),n&512&&Ys(r,r.return);break;case 3:if(yi(e,r),n&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode;}try{$1(e,t);}catch(s){Dt(r,r.return,s);}}break;case 27:t===null&&n&4&&Hb(r);case 26:case 5:yi(e,r),t===null&&n&4&&Pb(r),n&512&&Ys(r,r.return);break;case 12:yi(e,r);break;case 31:yi(e,r),n&4&&Wb(e,r);break;case 13:yi(e,r),n&4&&$b(e,r),n&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=u6.bind(null,r),A6(e,r))));break;case 22:if(n=r.memoizedState!==null||xi,!n){t=t!==null&&t.memoizedState!==null||pr,i=xi;var a=pr;xi=n,(pr=t)&&!a?wi(e,r,(r.subtreeFlags&8772)!==0):yi(e,r),xi=i,pr=a;}break;case 30:break;default:yi(e,r);}}function Gb(e){var t=e.alternate;t!==null&&(e.alternate=null,Gb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mh(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null;}var Jt=null,Kr=false;function vi(e,t,r){for(r=r.child;r!==null;)qb(e,t,r),r=r.sibling;}function qb(e,t,r){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(ml,r);}catch{}switch(r.tag){case 26:pr||ni(r,t),vi(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:pr||ni(r,t);var n=Jt,i=Kr;da(r.type)&&(Jt=r.stateNode,Kr=false),vi(e,t,r),Js(r.stateNode),Jt=n,Kr=i;break;case 5:pr||ni(r,t);case 6:if(n=Jt,i=Kr,Jt=null,vi(e,t,r),Jt=n,Kr=i,Jt!==null)if(Kr)try{(Jt.nodeType===9?Jt.body:Jt.nodeName==="HTML"?Jt.ownerDocument.body:Jt).removeChild(r.stateNode);}catch(a){Dt(r,t,a);}else try{Jt.removeChild(r.stateNode);}catch(a){Dt(r,t,a);}break;case 18:Jt!==null&&(Kr?(e=Jt,jg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),Xo(e)):jg(Jt,r.stateNode));break;case 4:n=Jt,i=Kr,Jt=r.stateNode.containerInfo,Kr=true,vi(e,t,r),Jt=n,Kr=i;break;case 0:case 11:case 14:case 15:ua(2,r,t),pr||ua(4,r,t),vi(e,t,r);break;case 1:pr||(ni(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"&&Fb(r,t,n)),vi(e,t,r);break;case 21:vi(e,t,r);break;case 22:pr=(n=pr)||r.memoizedState!==null,vi(e,t,r),pr=n;break;default:vi(e,t,r);}}function Wb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xo(e);}catch(r){Dt(t,t.return,r);}}}function $b(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xo(e);}catch(r){Dt(t,t.return,r);}}function t6(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _g),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _g),t;default:throw Error(we(435,e.tag))}}function cu(e,t){var r=t6(e);t.forEach(function(n){if(!r.has(n)){r.add(n);var i=c6.bind(null,e,n);n.then(i,i);}});}function Xr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n],a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 27:if(da(o.type)){Jt=o.stateNode,Kr=false;break e}break;case 5:Jt=o.stateNode,Kr=false;break e;case 3:case 4:Jt=o.stateNode.containerInfo,Kr=true;break e}o=o.return;}if(Jt===null)throw Error(we(160));qb(a,s,i),Jt=null,Kr=false,a=i.alternate,a!==null&&(a.return=null),i.return=null;}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xb(t,e),t=t.sibling;}var Wn=null;function Xb(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Xr(t,e),Yr(e),n&4&&(ua(3,e,e.return),xl(3,e),ua(5,e,e.return));break;case 1:Xr(t,e),Yr(e),n&512&&(pr||r===null||ni(r,r.return)),n&64&&xi&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?n:r.concat(n))));break;case 26:var i=Wn;if(Xr(t,e),Yr(e),n&512&&(pr||r===null||ni(r,r.return)),n&4){var a=r!==null?r.memoizedState:null;if(n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null){e:{n=e.type,r=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case "title":a=i.getElementsByTagName("title")[0],(!a||a[vl]||a[Nr]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(n),i.head.insertBefore(a,i.querySelector("head > title"))),jr(a,n,r),a[Nr]=e,Tr(a),n=a;break e;case "link":var s=Vg("link","href",i).get(n+(r.href||""));if(s){for(var o=0;o<s.length;o++)if(a=s[o],a.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&a.getAttribute("rel")===(r.rel==null?null:r.rel)&&a.getAttribute("title")===(r.title==null?null:r.title)&&a.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){s.splice(o,1);break t}}a=i.createElement(n),jr(a,n,r),i.head.appendChild(a);break;case "meta":if(s=Vg("meta","content",i).get(n+(r.content||""))){for(o=0;o<s.length;o++)if(a=s[o],a.getAttribute("content")===(r.content==null?null:""+r.content)&&a.getAttribute("name")===(r.name==null?null:r.name)&&a.getAttribute("property")===(r.property==null?null:r.property)&&a.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&a.getAttribute("charset")===(r.charSet==null?null:r.charSet)){s.splice(o,1);break t}}a=i.createElement(n),jr(a,n,r),i.head.appendChild(a);break;default:throw Error(we(468,n))}a[Nr]=e,Tr(a),n=a;}e.stateNode=n;}else Gg(i,e.type,e.stateNode);else e.stateNode=Hg(i,n,e.memoizedProps);else a!==n?(a===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):a.count--,n===null?Gg(i,e.type,e.stateNode):Hg(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&ad(e,e.memoizedProps,r.memoizedProps);}break;case 27:Xr(t,e),Yr(e),n&512&&(pr||r===null||ni(r,r.return)),r!==null&&n&4&&ad(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Xr(t,e),Yr(e),n&512&&(pr||r===null||ni(r,r.return)),e.flags&32){i=e.stateNode;try{Po(i,"");}catch(h){Dt(e,e.return,h);}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,ad(e,i,r!==null?r.memoizedProps:i)),n&1024&&(sd=true);break;case 6:if(Xr(t,e),Yr(e),n&4){if(e.stateNode===null)throw Error(we(162));n=e.memoizedProps,r=e.stateNode;try{r.nodeValue=n;}catch(h){Dt(e,e.return,h);}}break;case 3:if(Tu=null,i=Wn,Wn=tc(t.containerInfo),Xr(t,e),Wn=i,Yr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Xo(t.containerInfo);}catch(h){Dt(e,e.return,h);}sd&&(sd=false,Yb(e));break;case 4:n=Wn,Wn=tc(e.stateNode.containerInfo),Xr(t,e),Yr(e),Wn=n;break;case 12:Xr(t,e),Yr(e);break;case 31:Xr(t,e),Yr(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cu(e,n)));break;case 13:Xr(t,e),Yr(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(bc=mn()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cu(e,n)));break;case 22:i=e.memoizedState!==null;var l=r!==null&&r.memoizedState!==null,f=xi,u=pr;if(xi=f||i,pr=u||l,Xr(t,e),pr=u,xi=f,Yr(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(r===null||l||xi||pr||Ta(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){l=r=t;try{if(a=l.stateNode,i)s=a.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else {o=l.stateNode;var c=l.memoizedProps.style,d=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=d==null||typeof d=="boolean"?"":(""+d).trim();}}catch(h){Dt(l,l.return,h);}}}else if(t.tag===6){if(r===null){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps;}catch(h){Dt(l,l.return,h);}}}else if(t.tag===18){if(r===null){l=t;try{var p=l.stateNode;i?Lg(p,!0):Lg(l.stateNode,!1);}catch(h){Dt(l,l.return,h);}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;r===t&&(r=null),t=t.return;}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling;}n&4&&(n=e.updateQueue,n!==null&&(r=n.retryQueue,r!==null&&(n.retryQueue=null,cu(e,r))));break;case 19:Xr(t,e),Yr(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cu(e,n)));break;case 30:break;case 21:break;default:Xr(t,e),Yr(e);}}function Yr(e){var t=e.flags;if(t&2){try{for(var r,n=e.return;n!==null;){if(Ub(n)){r=n;break}n=n.return;}if(r==null)throw Error(we(160));switch(r.tag){case 27:var i=r.stateNode,a=od(e);$u(e,a,i);break;case 5:var s=r.stateNode;r.flags&32&&(Po(s,""),r.flags&=-33);var o=od(e);$u(e,o,s);break;case 3:case 4:var l=r.stateNode.containerInfo,f=od(e);Xd(e,f,l);break;default:throw Error(we(161))}}catch(u){Dt(e,e.return,u);}e.flags&=-3;}t&4096&&(e.flags&=-4097);}function Yb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Yb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling;}}function yi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vb(e,t.alternate,t),t=t.sibling;}function Ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ua(4,t,t.return),Ta(t);break;case 1:ni(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&Fb(t,t.return,r),Ta(t);break;case 27:Js(t.stateNode);case 26:case 5:ni(t,t.return),Ta(t);break;case 22:t.memoizedState===null&&Ta(t);break;case 30:Ta(t);break;default:Ta(t);}e=e.sibling;}}function wi(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,a=t,s=a.flags;switch(a.tag){case 0:case 11:case 15:wi(i,a,r),xl(4,a);break;case 1:if(wi(i,a,r),n=a,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount();}catch(f){Dt(n,n.return,f);}if(n=a,i=n.updateQueue,i!==null){var o=n.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)W1(l[i],o);}catch(f){Dt(n,n.return,f);}}r&&s&64&&Bb(a),Ys(a,a.return);break;case 27:Hb(a);case 26:case 5:wi(i,a,r),r&&n===null&&s&4&&Pb(a),Ys(a,a.return);break;case 12:wi(i,a,r);break;case 31:wi(i,a,r),r&&s&4&&Wb(i,a);break;case 13:wi(i,a,r),r&&s&4&&$b(i,a);break;case 22:a.memoizedState===null&&wi(i,a,r),Ys(a,a.return);break;case 30:break;default:wi(i,a,r);}t=t.sibling;}}function $h(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&wl(r));}function Xh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e));}function qn(e,t,r,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kb(e,t,r,n),t=t.sibling;}function Kb(e,t,r,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:qn(e,t,r,n),i&2048&&xl(9,t);break;case 1:qn(e,t,r,n);break;case 3:qn(e,t,r,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wl(e)));break;case 12:if(i&2048){qn(e,t,r,n),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;typeof o=="function"&&o(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0);}catch(l){Dt(t,t.return,l);}}else qn(e,t,r,n);break;case 31:qn(e,t,r,n);break;case 13:qn(e,t,r,n);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,t.memoizedState!==null?a._visibility&2?qn(e,t,r,n):Ks(e,t):a._visibility&2?qn(e,t,r,n):(a._visibility|=2,bo(e,t,r,n,(t.subtreeFlags&10256)!==0||false)),i&2048&&$h(s,t);break;case 24:qn(e,t,r,n),i&2048&&Xh(t.alternate,t);break;default:qn(e,t,r,n);}}function bo(e,t,r,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||false),t=t.child;t!==null;){var a=e,s=t,o=r,l=n,f=s.flags;switch(s.tag){case 0:case 11:case 15:bo(a,s,o,l,i),xl(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?bo(a,s,o,l,i):Ks(a,s):(u._visibility|=2,bo(a,s,o,l,i)),i&&f&2048&&$h(s.alternate,s);break;case 24:bo(a,s,o,l,i),i&&f&2048&&Xh(s.alternate,s);break;default:bo(a,s,o,l,i);}t=t.sibling;}}function Ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,n=t,i=n.flags;switch(n.tag){case 22:Ks(r,n),i&2048&&$h(n.alternate,n);break;case 24:Ks(r,n),i&2048&&Xh(n.alternate,n);break;default:Ks(r,n);}t=t.sibling;}}var Ps=8192;function go(e,t,r){if(e.subtreeFlags&Ps)for(e=e.child;e!==null;)Zb(e,t,r),e=e.sibling;}function Zb(e,t,r){switch(e.tag){case 26:go(e,t,r),e.flags&Ps&&e.memoizedState!==null&&F6(r,Wn,e.memoizedState,e.memoizedProps);break;case 5:go(e,t,r);break;case 3:case 4:var n=Wn;Wn=tc(e.stateNode.containerInfo),go(e,t,r),Wn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ps,Ps=16777216,go(e,t,r),Ps=n):go(e,t,r));break;default:go(e,t,r);}}function Qb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ns(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Ar=n,ev(n,e);}Qb(e);}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jb(e),e=e.sibling;}function Jb(e){switch(e.tag){case 0:case 11:case 15:Ns(e),e.flags&2048&&ua(9,e,e.return);break;case 3:Ns(e);break;case 12:Ns(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ru(e)):Ns(e);break;default:Ns(e);}}function Ru(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var n=t[r];Ar=n,ev(n,e);}Qb(e);}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ua(8,t,t.return),Ru(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Ru(t));break;default:Ru(t);}e=e.sibling;}}function ev(e,t){for(;Ar!==null;){var r=Ar;switch(r.tag){case 0:case 11:case 15:ua(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var n=r.memoizedState.cachePool.pool;n!=null&&n.refCount++;}break;case 24:wl(r.memoizedState.cache);}if(n=r.child,n!==null)n.return=r,Ar=n;else e:for(r=e;Ar!==null;){n=Ar;var i=n.sibling,a=n.return;if(Gb(n),n===r){Ar=null;break e}if(i!==null){i.return=a,Ar=i;break e}Ar=a;}}}var r6={getCacheForType:function(e){var t=zr(mr),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return zr(mr).controller.signal}},n6=typeof WeakMap=="function"?WeakMap:Map,Et=0,Ut=null,vt=null,wt=0,Ot=0,fn=null,Yi=false,Jo=false,Yh=false,Ni=0,ar=0,ca=0,Na=0,Kh=0,pn=0,Go=0,Zs=null,Zr=null,Yd=false,bc=0,tv=0,Xu=1/0,Yu=null,ra=null,wr=0,na=null,qo=null,Ti=0,Kd=0,Zd=null,rv=null,Qs=0,Qd=null;function vn(){return (Et&2)!==0&&wt!==0?wt&-wt:lt.T!==null?Qh():f1()}function nv(){if(pn===0)if((wt&536870912)===0||St){var e=eu;eu<<=1,(eu&3932160)===0&&(eu=262144),pn=e;}else pn=536870912;return e=wn.current,e!==null&&(e.flags|=32),pn}function Qr(e,t,r){(e===Ut&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)&&(Wo(e,0),Ki(e,wt,pn,false)),bl(e,r),((Et&2)===0||e!==Ut)&&(e===Ut&&((Et&2)===0&&(Na|=r),ar===4&&Ki(e,wt,pn,false)),oi(e));}function iv(e,t,r){if((Et&6)!==0)throw Error(we(327));var n=!r&&(t&127)===0&&(t&e.expiredLanes)===0||gl(e,t),i=n?o6(e,t):ld(e,t,true),a=n;do{if(i===0){Jo&&!n&&Ki(e,t,0,false);break}else {if(r=e.current.alternate,a&&!i6(r)){i=ld(e,t,false),a=false;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var o=e;i=Zs;var l=o.current.memoizedState.isDehydrated;if(l&&(Wo(o,s).flags|=256),s=ld(o,s,false),s!==2){if(Yh&&!l){o.errorRecoveryDisabledLanes|=a,Na|=a,i=4;break e}a=Zr,Zr=i,a!==null&&(Zr===null?Zr=a:Zr.push.apply(Zr,a));}i=s;}if(a=false,i!==2)continue}}if(i===1){Wo(e,0),Ki(e,t,0,true);break}e:{switch(n=e,a=i,a){case 0:case 1:throw Error(we(345));case 4:if((t&4194048)!==t)break;case 6:Ki(n,t,pn,!Yi);break e;case 2:Zr=null;break;case 3:case 5:break;default:throw Error(we(329))}if((t&62914560)===t&&(i=bc+300-mn(),10<i)){if(Ki(n,t,pn,!Yi),oc(n,0,true)!==0)break e;Ti=t,n.timeoutHandle=Cv(xg.bind(null,n,r,Zr,Yu,Yd,t,pn,Na,Go,Yi,a,"Throttled",-0,0),i);break e}xg(n,r,Zr,Yu,Yd,t,pn,Na,Go,Yi,a,null,-0,0);}}break}while(true);oi(e);}function xg(e,t,r,n,i,a,s,o,l,f,u,c,d,p){if(e.timeoutHandle=-1,c=t.subtreeFlags,c&8192||(c&16785408)===16785408){c={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:true,waitingForViewTransition:false,unsuspend:Ci},Zb(t,a,c);var h=(a&62914560)===a?bc-mn():(a&4194048)===a?tv-mn():0;if(h=P6(c,h),h!==null){Ti=a,e.cancelPendingCommit=h(Cg.bind(null,e,t,a,r,n,i,s,o,l,u,c,null,d,p)),Ki(e,a,s,!f);return}}Cg(e,t,a,r,n,i,s,o,l);}function i6(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!yn(a(),i))return !1}catch{return false}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else {if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return true;t=t.return;}t.sibling.return=t.return,t=t.sibling;}}return true}function Ki(e,t,r,n){t&=~Kh,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var a=31-bn(i),s=1<<a;n[a]=-1,i&=~s;}r!==0&&l1(e,r,t);}function vc(){return (Et&6)===0?(Sl(0),false):true}function Zh(){if(vt!==null){if(Ot===0)var e=vt.return;else e=vt,Ei=Va=null,jh(e),zo=null,ol=0,e=vt;for(;e!==null;)Lb(e.alternate,e),e=e.return;vt=null;}}function Wo(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,x6(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ti=0,Zh(),Ut=e,vt=r=Ri(e.current,null),wt=t,Ot=0,fn=null,Yi=false,Jo=gl(e,t),Yh=false,Go=pn=Kh=Na=ca=ar=0,Zr=Zs=null,Yd=false,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-bn(n),a=1<<i;t|=e[i],n&=~a;}return Ni=t,cc(),r}function av(e,t){dt=null,lt.H=ll,t===Qo||t===dc?(t=eg(),Ot=3):t===Mh?(t=eg(),Ot=4):Ot=t===qh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,vt===null&&(ar=1,qu(e,kn(t,e.current)));}function ov(){var e=wn.current;return e===null?true:(wt&4194048)===wt?Dn===null:(wt&62914560)===wt||(wt&536870912)!==0?e===Dn:false}function sv(){var e=lt.H;return lt.H=ll,e===null?ll:e}function lv(){var e=lt.A;return lt.A=r6,e}function Ku(){ar=4,Yi||(wt&4194048)!==wt&&wn.current!==null||(Jo=true),(ca&134217727)===0&&(Na&134217727)===0||Ut===null||Ki(Ut,wt,pn,false);}function ld(e,t,r){var n=Et;Et|=2;var i=sv(),a=lv();(Ut!==e||wt!==t)&&(Yu=null,Wo(e,t)),t=false;var s=ar;e:do try{if(Ot!==0&&vt!==null){var o=vt,l=fn;switch(Ot){case 8:Zh(),s=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(t=!0);var f=Ot;if(Ot=0,fn=null,ko(e,o,l,f),r&&Jo){s=0;break e}break;default:f=Ot,Ot=0,fn=null,ko(e,o,l,f);}}a6(),s=ar;break}catch(u){av(e,u);}while(true);return t&&e.shellSuspendCounter++,Ei=Va=null,Et=n,lt.H=i,lt.A=a,vt===null&&(Ut=null,wt=0,cc()),s}function a6(){for(;vt!==null;)uv(vt);}function o6(e,t){var r=Et;Et|=2;var n=sv(),i=lv();Ut!==e||wt!==t?(Yu=null,Xu=mn()+500,Wo(e,t)):Jo=gl(e,t);e:do try{if(Ot!==0&&vt!==null){t=vt;var a=fn;t:switch(Ot){case 1:Ot=0,fn=null,ko(e,t,a,1);break;case 2:case 9:if(J0(a)){Ot=0,fn=null,Sg(t);break}t=function(){Ot!==2&&Ot!==9||Ut!==e||(Ot=7),oi(e);},a.then(t,t);break e;case 3:Ot=7;break e;case 4:Ot=5;break e;case 7:J0(a)?(Ot=0,fn=null,Sg(t)):(Ot=0,fn=null,ko(e,t,a,7));break;case 5:var s=null;switch(vt.tag){case 26:s=vt.memoizedState;case 5:case 27:var o=vt;if(s?Mv(s):o.stateNode.complete){Ot=0,fn=null;var l=o.sibling;if(l!==null)vt=l;else {var f=o.return;f!==null?(vt=f,yc(f)):vt=null;}break t}}Ot=0,fn=null,ko(e,t,a,5);break;case 6:Ot=0,fn=null,ko(e,t,a,6);break;case 8:Zh(),ar=6;break e;default:throw Error(we(462))}}s6();break}catch(u){av(e,u);}while(true);return Ei=Va=null,lt.H=n,lt.A=i,Et=r,vt!==null?0:(Ut=null,wt=0,cc(),ar)}function s6(){for(;vt!==null&&!kx();)uv(vt);}function uv(e){var t=jb(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,t===null?yc(e):vt=t;}function Sg(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=gg(r,t,t.pendingProps,t.type,void 0,wt);break;case 11:t=gg(r,t,t.pendingProps,t.type.render,t.ref,wt);break;case 5:jh(t);default:Lb(r,t),t=vt=L1(t,Ni),t=jb(r,t,Ni);}e.memoizedProps=e.pendingProps,t===null?yc(e):vt=t;}function ko(e,t,r,n){Ei=Va=null,jh(t),zo=null,ol=0;var i=t.return;try{if(Y4(e,i,t,r,wt)){ar=1,qu(e,kn(r,e.current)),vt=null;return}}catch(a){if(i!==null)throw vt=i,a;ar=1,qu(e,kn(r,e.current)),vt=null;return}t.flags&32768?(St||n===1?e=true:Jo||(wt&536870912)!==0?e=false:(Yi=e=true,(n===2||n===9||n===3||n===6)&&(n=wn.current,n!==null&&n.tag===13&&(n.flags|=16384))),cv(t,e)):yc(t);}function yc(e){var t=e;do{if((t.flags&32768)!==0){cv(t,Yi);return}e=t.return;var r=Q4(t.alternate,t,Ni);if(r!==null){vt=r;return}if(t=t.sibling,t!==null){vt=t;return}vt=t=e;}while(t!==null);ar===0&&(ar=5);}function cv(e,t){do{var r=J4(e.alternate,e);if(r!==null){r.flags&=32767,vt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){vt=e;return}vt=e=r;}while(e!==null);ar=6,vt=null;}function Cg(e,t,r,n,i,a,s,o,l){e.cancelPendingCommit=null;do wc();while(wr!==0);if((Et&6)!==0)throw Error(we(327));if(t!==null){if(t===e.current)throw Error(we(177));if(a=t.lanes|t.childLanes,a|=xh,Px(e,r,a,s,o,l),e===Ut&&(vt=Ut=null,wt=0),qo=t,na=e,Ti=r,Kd=a,Zd=i,rv=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,f6(Iu,function(){return mv(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=lt.T,lt.T=null,i=Rt.p,Rt.p=2,s=Et,Et|=4;try{e6(e,t,r);}finally{Et=s,Rt.p=i,lt.T=n;}}wr=1,fv(),dv(),hv();}}function fv(){if(wr===1){wr=0;var e=na,t=qo,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=lt.T,lt.T=null;var n=Rt.p;Rt.p=2;var i=Et;Et|=4;try{Xb(t,e);var a=rh,s=M1(e.containerInfo),o=a.focusedElem,l=a.selectionRange;if(s!==o&&o&&o.ownerDocument&&T1(o.ownerDocument.documentElement,o)){if(l!==null&&_h(o)){var f=l.start,u=l.end;if(u===void 0&&(u=f),"selectionStart"in o)o.selectionStart=f,o.selectionEnd=Math.min(u,o.value.length);else {var c=o.ownerDocument||document,d=c&&c.defaultView||window;if(d.getSelection){var p=d.getSelection(),h=o.textContent.length,m=Math.min(l.start,h),g=l.end===void 0?m:Math.min(l.end,h);!p.extend&&m>g&&(s=g,g=m,m=s);var v=W0(o,m),w=W0(o,g);if(v&&w&&(p.rangeCount!==1||p.anchorNode!==v.node||p.anchorOffset!==v.offset||p.focusNode!==w.node||p.focusOffset!==w.offset)){var C=c.createRange();C.setStart(v.node,v.offset),p.removeAllRanges(),m>g?(p.addRange(C),p.extend(w.node,w.offset)):(C.setEnd(w.node,w.offset),p.addRange(C));}}}}for(c=[],p=o;p=p.parentNode;)p.nodeType===1&&c.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<c.length;o++){var T=c[o];T.element.scrollLeft=T.left,T.element.scrollTop=T.top;}}ic=!!th,rh=th=null;}finally{Et=i,Rt.p=n,lt.T=r;}}e.current=t,wr=2;}}function dv(){if(wr===2){wr=0;var e=na,t=qo,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=lt.T,lt.T=null;var n=Rt.p;Rt.p=2;var i=Et;Et|=4;try{Vb(e,t.alternate,t);}finally{Et=i,Rt.p=n,lt.T=r;}}wr=3;}}function hv(){if(wr===4||wr===3){wr=0,Ox();var e=na,t=qo,r=Ti,n=rv;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?wr=5:(wr=0,qo=na=null,pv(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ra=null),ph(r),t=t.stateNode,gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(ml,t,void 0,(t.current.flags&128)===128);}catch{}if(n!==null){t=lt.T,i=Rt.p,Rt.p=2,lt.T=null;try{for(var a=e.onRecoverableError,s=0;s<n.length;s++){var o=n[s];a(o.value,{componentStack:o.stack});}}finally{lt.T=t,Rt.p=i;}}(Ti&3)!==0&&wc(),oi(e),i=e.pendingLanes,(r&261930)!==0&&(i&42)!==0?e===Qd?Qs++:(Qs=0,Qd=e):Qs=0,Sl(0);}}function pv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wl(t)));}function wc(){return fv(),dv(),hv(),mv()}function mv(){if(wr!==5)return false;var e=na,t=Kd;Kd=0;var r=ph(Ti),n=lt.T,i=Rt.p;try{Rt.p=32>r?32:r,lt.T=null,r=Zd,Zd=null;var a=na,s=Ti;if(wr=0,qo=na=null,Ti=0,(Et&6)!==0)throw Error(we(331));var o=Et;if(Et|=4,Jb(a.current),Kb(a,a.current,s,r),Et=o,Sl(0,!1),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(ml,a);}catch{}return !0}finally{Rt.p=i,lt.T=n,pv(e,t);}}function Eg(e,t,r){t=kn(r,t),t=qd(e.stateNode,t,2),e=ta(e,t,2),e!==null&&(bl(e,2),oi(e));}function Dt(e,t,r){if(e.tag===3)Eg(e,e,r);else for(;t!==null;){if(t.tag===3){Eg(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ra===null||!ra.has(n))){e=kn(r,e),r=kb(2),n=ta(t,r,2),n!==null&&(Ob(r,n,t,e),bl(n,2),oi(n));break}}t=t.return;}}function ud(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new n6;var i=new Set;n.set(t,i);}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(Yh=true,i.add(r),e=l6.bind(null,e,t,r),t.then(e,e));}function l6(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Ut===e&&(wt&r)===r&&(ar===4||ar===3&&(wt&62914560)===wt&&300>mn()-bc?(Et&2)===0&&Wo(e,0):Kh|=r,Go===wt&&(Go=0)),oi(e);}function gv(e,t){t===0&&(t=s1()),e=Ha(e,t),e!==null&&(bl(e,t),oi(e));}function u6(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),gv(e,r);}function c6(e,t){var r=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(we(314))}n!==null&&n.delete(t),gv(e,r);}function f6(e,t){return dh(e,t)}var Zu=null,vo=null,Jd=false,Qu=false,cd=false,Zi=0;function oi(e){e!==vo&&e.next===null&&(vo===null?Zu=vo=e:vo=vo.next=e),Qu=true,Jd||(Jd=true,h6());}function Sl(e,t){if(!cd&&Qu){cd=true;do for(var r=false,n=Zu;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var a=0;else {var s=n.suspendedLanes,o=n.pingedLanes;a=(1<<31-bn(42|e)+1)-1,a&=i&~(s&~o),a=a&201326741?a&201326741|1:a?a|2:0;}a!==0&&(r=true,Rg(n,a));}else a=wt,a=oc(n,n===Ut?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(a&3)===0||gl(n,a)||(r=true,Rg(n,a));n=n.next;}while(r);cd=false;}}function d6(){bv();}function bv(){Qu=Jd=false;var e=0;Zi!==0&&_6()&&(e=Zi);for(var t=mn(),r=null,n=Zu;n!==null;){var i=n.next,a=vv(n,t);a===0?(n.next=null,r===null?Zu=i:r.next=i,i===null&&(vo=r)):(r=n,(e!==0||(a&3)!==0)&&(Qu=true)),n=i;}wr!==0&&wr!==5||Sl(e),Zi!==0&&(Zi=0);}function vv(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var s=31-bn(a),o=1<<s,l=i[s];l===-1?((o&r)===0||(o&n)!==0)&&(i[s]=Fx(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o;}if(t=Ut,r=wt,r=oc(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,r===0||e===t&&(Ot===2||Ot===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ff(n),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||gl(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(n!==null&&Ff(n),ph(r)){case 2:case 8:r=a1;break;case 32:r=Iu;break;case 268435456:r=o1;break;default:r=Iu;}return n=yv.bind(null,e),r=dh(r,n),e.callbackPriority=t,e.callbackNode=r,t}return n!==null&&n!==null&&Ff(n),e.callbackPriority=2,e.callbackNode=null,2}function yv(e,t){if(wr!==0&&wr!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(wc()&&e.callbackNode!==r)return null;var n=wt;return n=oc(e,e===Ut?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(iv(e,n,t),vv(e,mn()),e.callbackNode!=null&&e.callbackNode===r?yv.bind(null,e):null)}function Rg(e,t){if(wc())return null;iv(e,t,true);}function h6(){S6(function(){(Et&6)!==0?dh(i1,d6):bv();});}function Qh(){if(Zi===0){var e=Uo;e===0&&(e=Jl,Jl<<=1,(Jl&261888)===0&&(Jl=256)),Zi=e;}return Zi}function Ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bu(""+e)}function Tg(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function p6(e,t,r,n,i){if(t==="submit"&&r&&r.stateNode===i){var a=Ag((i[Jr]||null).action),s=n.submitter;s&&(t=(t=s[Jr]||null)?Ag(t.formAction):s.getAttribute("formAction"),t!==null&&(a=t,s=null));var o=new sc("action","action",null,n,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Zi!==0){var l=s?Tg(i,s):new FormData(i);Vd(r,{pending:true,data:l,method:i.method,action:a},null,l);}}else typeof a=="function"&&(o.preventDefault(),l=s?Tg(i,s):new FormData(i),Vd(r,{pending:true,data:l,method:i.method,action:a},a,l));},currentTarget:i}]});}}for(fu=0;fu<Od.length;fu++)du=Od[fu],Mg=du.toLowerCase(),kg=du[0].toUpperCase()+du.slice(1),$n(Mg,"on"+kg);var du,Mg,kg,fu;$n(O1,"onAnimationEnd");$n(D1,"onAnimationIteration");$n(N1,"onAnimationStart");$n("dblclick","onDoubleClick");$n("focusin","onFocus");$n("focusout","onBlur");$n(D4,"onTransitionRun");$n(N4,"onTransitionStart");$n(I4,"onTransitionCancel");$n(I1,"onTransitionEnd");Fo("onMouseEnter",["mouseout","mouseover"]);Fo("onMouseLeave",["mouseout","mouseover"]);Fo("onPointerEnter",["pointerout","pointerover"]);Fo("onPointerLeave",["pointerout","pointerover"]);Fa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),m6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ul));function wv(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,f=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=f;try{a(i);}catch(u){ju(u);}i.currentTarget=null,a=l;}else for(s=0;s<n.length;s++){if(o=n[s],l=o.instance,f=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;a=o,i.currentTarget=f;try{a(i);}catch(u){ju(u);}i.currentTarget=null,a=l;}}}}function bt(e,t){var r=t[Sd];r===void 0&&(r=t[Sd]=new Set);var n=e+"__bubble";r.has(n)||(_v(t,e,2,false),r.add(n));}function fd(e,t,r){var n=0;t&&(n|=4),_v(r,e,n,t);}var hu="_reactListening"+Math.random().toString(36).slice(2);function Jh(e){if(!e[hu]){e[hu]=true,d1.forEach(function(r){r!=="selectionchange"&&(m6.has(r)||fd(r,false,e),fd(r,true,e));});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hu]||(t[hu]=true,fd("selectionchange",false,t));}}function _v(e,t,r,n){switch(Iv(t)){case 2:var i=V6;break;case 8:i=G6;break;default:i=np;}r=i.bind(null,t,r,e),i=void 0,!Td||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=true),n?i!==void 0?e.addEventListener(t,r,{capture:true,passive:i}):e.addEventListener(t,r,true):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,false);}function dd(e,t,r,n,i){var a=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===i)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return;}for(;o!==null;){if(s=_o(o),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){n=a=s;continue e}o=o.parentNode;}}n=n.return;}w1(function(){var f=a,u=bh(r),c=[];e:{var d=z1.get(e);if(d!==void 0){var p=sc,h=e;switch(e){case "keypress":if(yu(r)===0)break e;case "keydown":case "keyup":p=c4;break;case "focusin":h="focus",p=Gf;break;case "focusout":h="blur",p=Gf;break;case "beforeblur":case "afterblur":p=Gf;break;case "click":if(r.button===2)break e;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":p=L0;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":p=Qx;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":p=h4;break;case O1:case D1:case N1:p=t4;break;case I1:p=m4;break;case "scroll":case "scrollend":p=Kx;break;case "wheel":p=b4;break;case "copy":case "cut":case "paste":p=n4;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":p=F0;break;case "toggle":case "beforetoggle":p=y4;}var m=(t&4)!==0,g=!m&&(e==="scroll"||e==="scrollend"),v=m?d!==null?d+"Capture":null:d;m=[];for(var w=f,C;w!==null;){var T=w;if(C=T.stateNode,T=T.tag,T!==5&&T!==26&&T!==27||C===null||v===null||(T=tl(w,v),T!=null&&m.push(cl(w,T,C))),g)break;w=w.return;}0<m.length&&(d=new p(d,h,null,r,u),c.push({event:d,listeners:m}));}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&r!==Ad&&(h=r.relatedTarget||r.fromElement)&&(_o(h)||h[Yo]))break e;if((p||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,p?(h=r.relatedTarget||r.toElement,p=f,h=h?_o(h):null,h!==null&&(g=pl(h),m=h.tag,h!==g||m!==5&&m!==27&&m!==6)&&(h=null)):(p=null,h=f),p!==h)){if(m=L0,T="onMouseLeave",v="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=F0,T="onPointerLeave",v="onPointerEnter",w="pointer"),g=p==null?d:Bs(p),C=h==null?d:Bs(h),d=new m(T,w+"leave",p,r,u),d.target=g,d.relatedTarget=C,T=null,_o(u)===f&&(m=new m(v,w+"enter",h,r,u),m.target=C,m.relatedTarget=g,T=m),g=T,p&&h)t:{for(m=g6,v=p,w=h,C=0,T=v;T;T=m(T))C++;T=0;for(var I=w;I;I=m(I))T++;for(;0<C-T;)v=m(v),C--;for(;0<T-C;)w=m(w),T--;for(;C--;){if(v===w||w!==null&&v===w.alternate){m=v;break t}v=m(v),w=m(w);}m=null;}else m=null;p!==null&&Og(c,d,p,m,!1),h!==null&&g!==null&&Og(c,g,h,m,!0);}}e:{if(d=f?Bs(f):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var k=V0;else if(H0(d))if(R1)k=M4;else {k=A4;var D=R4;}else p=d.nodeName,!p||p.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?f&&gh(f.elementType)&&(k=V0):k=T4;if(k&&(k=k(e,f))){E1(c,k,r,u);break e}D&&D(e,d,f),e==="focusout"&&f&&d.type==="number"&&f.memoizedProps.value!=null&&Rd(d,"number",d.value);}switch(D=f?Bs(f):window,e){case "focusin":(H0(D)||D.contentEditable==="true")&&(Co=D,Md=f,Vs=null);break;case "focusout":Vs=Md=Co=null;break;case "mousedown":kd=!0;break;case "contextmenu":case "mouseup":case "dragend":kd=!1,$0(c,r,u);break;case "selectionchange":if(O4)break;case "keydown":case "keyup":$0(c,r,u);}var j;if(wh)e:{switch(e){case "compositionstart":var F="onCompositionStart";break e;case "compositionend":F="onCompositionEnd";break e;case "compositionupdate":F="onCompositionUpdate";break e}F=void 0;}else So?S1(e,r)&&(F="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(F="onCompositionStart");F&&(x1&&r.locale!=="ko"&&(So||F!=="onCompositionStart"?F==="onCompositionEnd"&&So&&(j=_1()):(Xi=u,vh="value"in Xi?Xi.value:Xi.textContent,So=!0)),D=Ju(f,F),0<D.length&&(F=new B0(F,e,null,r,u),c.push({event:F,listeners:D}),j?F.data=j:(j=C1(r),j!==null&&(F.data=j)))),(j=_4?x4(e,r):S4(e,r))&&(F=Ju(f,"onBeforeInput"),0<F.length&&(D=new B0("onBeforeInput","beforeinput",null,r,u),c.push({event:D,listeners:F}),D.data=j)),p6(c,e,f,r,u);}wv(c,t);});}function cl(e,t,r){return {instance:e,listener:t,currentTarget:r}}function Ju(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=tl(e,r),i!=null&&n.unshift(cl(e,i,a)),i=tl(e,t),i!=null&&n.push(cl(e,i,a))),e.tag===3)return n;e=e.return;}return []}function g6(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Og(e,t,r,n,i){for(var a=t._reactName,s=[];r!==null&&r!==n;){var o=r,l=o.alternate,f=o.stateNode;if(o=o.tag,l!==null&&l===n)break;o!==5&&o!==26&&o!==27||f===null||(l=f,i?(f=tl(r,a),f!=null&&s.unshift(cl(r,f,l))):i||(f=tl(r,a),f!=null&&s.push(cl(r,f,l)))),r=r.return;}s.length!==0&&e.push({event:t,listeners:s});}var b6=/\r\n?/g,v6=/\u0000|\uFFFD/g;function Dg(e){return (typeof e=="string"?e:""+e).replace(b6,`
|
|
9
|
+
`).replace(v6,"")}function xv(e,t){return t=Dg(t),Dg(e)===t}function jt(e,t,r,n,i,a){switch(r){case "children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Po(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Po(e,""+n);break;case "className":ru(e,"class",n);break;case "tabIndex":ru(e,"tabindex",n);break;case "dir":case "role":case "viewBox":case "width":case "height":ru(e,r,n);break;case "style":y1(e,n,a);break;case "data":if(t!=="object"){ru(e,"data",n);break}case "src":case "href":if(n===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=bu(""+n),e.setAttribute(r,n);break;case "action":case "formAction":if(typeof n=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(r==="formAction"?(t!=="input"&&jt(e,t,"name",i.name,i,null),jt(e,t,"formEncType",i.formEncType,i,null),jt(e,t,"formMethod",i.formMethod,i,null),jt(e,t,"formTarget",i.formTarget,i,null)):(jt(e,t,"encType",i.encType,i,null),jt(e,t,"method",i.method,i,null),jt(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(r);break}n=bu(""+n),e.setAttribute(r,n);break;case "onClick":n!=null&&(e.onclick=Ci);break;case "onScroll":n!=null&&bt("scroll",e);break;case "onScrollEnd":n!=null&&bt("scrollend",e);break;case "dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(we(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(we(60));e.innerHTML=r;}}break;case "multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case "muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "defaultValue":case "defaultChecked":case "innerHTML":case "ref":break;case "autoFocus":break;case "xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}r=bu(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case "contentEditable":case "spellCheck":case "draggable":case "value":case "autoReverse":case "externalResourcesRequired":case "focusable":case "preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""+n):e.removeAttribute(r);break;case "inert":case "allowFullScreen":case "async":case "autoPlay":case "controls":case "default":case "defer":case "disabled":case "disablePictureInPicture":case "disableRemotePlayback":case "formNoValidate":case "hidden":case "loop":case "noModule":case "noValidate":case "open":case "playsInline":case "readOnly":case "required":case "reversed":case "scoped":case "seamless":case "itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case "capture":case "download":n===true?e.setAttribute(r,""):n!==false&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(r,n):e.removeAttribute(r);break;case "cols":case "rows":case "size":case "span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(r,n):e.removeAttribute(r);break;case "rowSpan":case "start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(r):e.setAttribute(r,n);break;case "popover":bt("beforetoggle",e),bt("toggle",e),gu(e,"popover",n);break;case "xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case "xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case "xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case "xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case "xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case "xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case "xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case "xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case "xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case "is":gu(e,"is",n);break;case "innerText":case "textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=Xx.get(r)||r,gu(e,r,n));}}function eh(e,t,r,n,i,a){switch(r){case "style":y1(e,n,a);break;case "dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(we(61));if(r=n.__html,r!=null){if(i.children!=null)throw Error(we(60));e.innerHTML=r;}}break;case "children":typeof n=="string"?Po(e,n):(typeof n=="number"||typeof n=="bigint")&&Po(e,""+n);break;case "onScroll":n!=null&&bt("scroll",e);break;case "onScrollEnd":n!=null&&bt("scrollend",e);break;case "onClick":n!=null&&(e.onclick=Ci);break;case "suppressContentEditableWarning":case "suppressHydrationWarning":case "innerHTML":case "ref":break;case "innerText":case "textContent":break;default:if(!h1.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(i=r.endsWith("Capture"),t=r.slice(2,i?r.length-7:void 0),a=e[Jr]||null,a=a!=null?a[r]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof n=="function")){typeof a!="function"&&a!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,n,i);break e}r in e?e[r]=n:n===true?e.setAttribute(r,""):gu(e,r,n);}}}function jr(e,t,r){switch(t){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "img":bt("error",e),bt("load",e);var n=false,i=false,a;for(a in r)if(r.hasOwnProperty(a)){var s=r[a];if(s!=null)switch(a){case "src":n=true;break;case "srcSet":i=true;break;case "children":case "dangerouslySetInnerHTML":throw Error(we(137,t));default:jt(e,t,a,s,r,null);}}i&&jt(e,t,"srcSet",r.srcSet,r,null),n&&jt(e,t,"src",r.src,r,null);return;case "input":bt("invalid",e);var o=a=s=i=null,l=null,f=null;for(n in r)if(r.hasOwnProperty(n)){var u=r[n];if(u!=null)switch(n){case "name":i=u;break;case "type":s=u;break;case "checked":l=u;break;case "defaultChecked":f=u;break;case "value":a=u;break;case "defaultValue":o=u;break;case "children":case "dangerouslySetInnerHTML":if(u!=null)throw Error(we(137,t));break;default:jt(e,t,n,u,r,null);}}g1(e,a,o,l,f,s,i,false);return;case "select":bt("invalid",e),n=s=a=null;for(i in r)if(r.hasOwnProperty(i)&&(o=r[i],o!=null))switch(i){case "value":a=o;break;case "defaultValue":s=o;break;case "multiple":n=o;default:jt(e,t,i,o,r,null);}t=a,r=s,e.multiple=!!n,t!=null?Do(e,!!n,t,false):r!=null&&Do(e,!!n,r,true);return;case "textarea":bt("invalid",e),a=i=n=null;for(s in r)if(r.hasOwnProperty(s)&&(o=r[s],o!=null))switch(s){case "value":n=o;break;case "defaultValue":i=o;break;case "children":a=o;break;case "dangerouslySetInnerHTML":if(o!=null)throw Error(we(91));break;default:jt(e,t,s,o,r,null);}v1(e,n,i,a);return;case "option":for(l in r)r.hasOwnProperty(l)&&(n=r[l],n!=null)&&(l==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":jt(e,t,l,n,r,null));return;case "dialog":bt("beforetoggle",e),bt("toggle",e),bt("cancel",e),bt("close",e);break;case "iframe":case "object":bt("load",e);break;case "video":case "audio":for(n=0;n<ul.length;n++)bt(ul[n],e);break;case "image":bt("error",e),bt("load",e);break;case "details":bt("toggle",e);break;case "embed":case "source":case "link":bt("error",e),bt("load",e);case "area":case "base":case "br":case "col":case "hr":case "keygen":case "meta":case "param":case "track":case "wbr":case "menuitem":for(f in r)if(r.hasOwnProperty(f)&&(n=r[f],n!=null))switch(f){case "children":case "dangerouslySetInnerHTML":throw Error(we(137,t));default:jt(e,t,f,n,r,null);}return;default:if(gh(t)){for(u in r)r.hasOwnProperty(u)&&(n=r[u],n!==void 0&&eh(e,t,u,n,r,void 0));return}}for(o in r)r.hasOwnProperty(o)&&(n=r[o],n!=null&&jt(e,t,o,n,r,null));}function y6(e,t,r,n){switch(t){case "div":case "span":case "svg":case "path":case "a":case "g":case "p":case "li":break;case "input":var i=null,a=null,s=null,o=null,l=null,f=null,u=null;for(p in r){var c=r[p];if(r.hasOwnProperty(p)&&c!=null)switch(p){case "checked":break;case "value":break;case "defaultValue":l=c;default:n.hasOwnProperty(p)||jt(e,t,p,null,n,c);}}for(var d in n){var p=n[d];if(c=r[d],n.hasOwnProperty(d)&&(p!=null||c!=null))switch(d){case "type":a=p;break;case "name":i=p;break;case "checked":f=p;break;case "defaultChecked":u=p;break;case "value":s=p;break;case "defaultValue":o=p;break;case "children":case "dangerouslySetInnerHTML":if(p!=null)throw Error(we(137,t));break;default:p!==c&&jt(e,t,d,p,n,c);}}Ed(e,s,o,l,f,u,a,i);return;case "select":p=s=o=d=null;for(a in r)if(l=r[a],r.hasOwnProperty(a)&&l!=null)switch(a){case "value":break;case "multiple":p=l;default:n.hasOwnProperty(a)||jt(e,t,a,null,n,l);}for(i in n)if(a=n[i],l=r[i],n.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case "value":d=a;break;case "defaultValue":o=a;break;case "multiple":s=a;default:a!==l&&jt(e,t,i,a,n,l);}t=o,r=s,n=p,d!=null?Do(e,!!r,d,false):!!n!=!!r&&(t!=null?Do(e,!!r,t,true):Do(e,!!r,r?[]:"",false));return;case "textarea":p=d=null;for(o in r)if(i=r[o],r.hasOwnProperty(o)&&i!=null&&!n.hasOwnProperty(o))switch(o){case "value":break;case "children":break;default:jt(e,t,o,null,n,i);}for(s in n)if(i=n[s],a=r[s],n.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case "value":d=i;break;case "defaultValue":p=i;break;case "children":break;case "dangerouslySetInnerHTML":if(i!=null)throw Error(we(91));break;default:i!==a&&jt(e,t,s,i,n,a);}b1(e,d,p);return;case "option":for(var h in r)d=r[h],r.hasOwnProperty(h)&&d!=null&&!n.hasOwnProperty(h)&&(h==="selected"?e.selected=false:jt(e,t,h,null,n,d));for(l in n)d=n[l],p=r[l],n.hasOwnProperty(l)&&d!==p&&(d!=null||p!=null)&&(l==="selected"?e.selected=d&&typeof d!="function"&&typeof d!="symbol":jt(e,t,l,d,n,p));return;case "img":case "link":case "area":case "base":case "br":case "col":case "embed":case "hr":case "keygen":case "meta":case "param":case "source":case "track":case "wbr":case "menuitem":for(var m in r)d=r[m],r.hasOwnProperty(m)&&d!=null&&!n.hasOwnProperty(m)&&jt(e,t,m,null,n,d);for(f in n)if(d=n[f],p=r[f],n.hasOwnProperty(f)&&d!==p&&(d!=null||p!=null))switch(f){case "children":case "dangerouslySetInnerHTML":if(d!=null)throw Error(we(137,t));break;default:jt(e,t,f,d,n,p);}return;default:if(gh(t)){for(var g in r)d=r[g],r.hasOwnProperty(g)&&d!==void 0&&!n.hasOwnProperty(g)&&eh(e,t,g,void 0,n,d);for(u in n)d=n[u],p=r[u],!n.hasOwnProperty(u)||d===p||d===void 0&&p===void 0||eh(e,t,u,d,n,p);return}}for(var v in r)d=r[v],r.hasOwnProperty(v)&&d!=null&&!n.hasOwnProperty(v)&&jt(e,t,v,null,n,d);for(c in n)d=n[c],p=r[c],!n.hasOwnProperty(c)||d===p||d==null&&p==null||jt(e,t,c,d,n,p);}function Ng(e){switch(e){case "css":case "script":case "font":case "img":case "image":case "input":case "link":return true;default:return false}}function w6(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),n=0;n<r.length;n++){var i=r[n],a=i.transferSize,s=i.initiatorType,o=i.duration;if(a&&o&&Ng(s)){for(s=0,o=i.responseEnd,n+=1;n<r.length;n++){var l=r[n],f=l.startTime;if(f>o)break;var u=l.transferSize,c=l.initiatorType;u&&Ng(c)&&(l=l.responseEnd,s+=u*(l<o?1:(o-f)/(l-f)));}if(--n,t+=8*(a+s)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var th=null,rh=null;function ec(e){return e.nodeType===9?e:e.ownerDocument}function Ig(e){switch(e){case "http://www.w3.org/2000/svg":return 1;case "http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Sv(e,t){if(e===0)switch(t){case "svg":return 1;case "math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function nh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hd=null;function _6(){var e=window.event;return e&&e.type==="popstate"?e===hd?false:(hd=e,true):(hd=null,false)}var Cv=typeof setTimeout=="function"?setTimeout:void 0,x6=typeof clearTimeout=="function"?clearTimeout:void 0,zg=typeof Promise=="function"?Promise:void 0,S6=typeof queueMicrotask=="function"?queueMicrotask:typeof zg<"u"?function(e){return zg.resolve(null).then(e).catch(C6)}:Cv;function C6(e){setTimeout(function(){throw e});}function da(e){return e==="head"}function jg(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"||r==="/&"){if(n===0){e.removeChild(i),Xo(t);return}n--;}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")n++;else if(r==="html")Js(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Js(r);for(var a=r.firstChild;a;){var s=a.nextSibling,o=a.nodeName;a[vl]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&a.rel.toLowerCase()==="stylesheet"||r.removeChild(a),a=s;}}else r==="body"&&Js(e.ownerDocument.body);r=i;}while(r);Xo(t);}function Lg(e,t){var r=e;e=0;do{var n=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(e===0)break;e--;}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=n;}while(r)}function ih(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case "HTML":case "HEAD":case "BODY":ih(r),mh(r);continue;case "SCRIPT":case "STYLE":continue;case "LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r);}}function E6(e,t,r,n){for(;e.nodeType===1;){var i=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[vl])switch(t){case "meta":if(!e.hasAttribute("itemprop"))break;return e;case "link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case "style":if(e.hasAttribute("data-precedence"))break;return e;case "script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Nn(e.nextSibling),e===null)break}return null}function R6(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Nn(e.nextSibling),e===null))return null;return e}function Ev(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Nn(e.nextSibling),e===null))return null;return e}function ah(e){return e.data==="$?"||e.data==="$~"}function oh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function A6(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else {var n=function(){t(),r.removeEventListener("DOMContentLoaded",n);};r.addEventListener("DOMContentLoaded",n),e._reactRetry=n;}}function Nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var sh=null;function Bg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Nn(e.nextSibling);t--;}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++;}e=e.nextSibling;}return null}function Fg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--;}else r!=="/$"&&r!=="/&"||t++;}e=e.previousSibling;}return null}function Rv(e,t,r){switch(t=ec(r),e){case "html":if(e=t.documentElement,!e)throw Error(we(452));return e;case "head":if(e=t.head,!e)throw Error(we(453));return e;case "body":if(e=t.body,!e)throw Error(we(454));return e;default:throw Error(we(451))}}function Js(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mh(e);}var In=new Map,Pg=new Set;function tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ii=Rt.d;Rt.d={f:T6,r:M6,D:k6,C:O6,L:D6,m:N6,X:z6,S:I6,M:j6};function T6(){var e=Ii.f(),t=vc();return e||t}function M6(e){var t=Ko(e);t!==null&&t.tag===5&&t.type==="form"?yb(t):Ii.r(e);}var es=typeof document>"u"?null:document;function Av(e,t,r){var n=es;if(n&&typeof t=="string"&&t){var i=Mn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof r=="string"&&(i+='[crossorigin="'+r+'"]'),Pg.has(i)||(Pg.add(i),e={rel:e,crossOrigin:r,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),jr(t,"link",e),Tr(t),n.head.appendChild(t)));}}function k6(e){Ii.D(e),Av("dns-prefetch",e,null);}function O6(e,t){Ii.C(e,t),Av("preconnect",e,t);}function D6(e,t,r){Ii.L(e,t,r);var n=es;if(n&&e&&t){var i='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(i+='[imagesrcset="'+Mn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(i+='[imagesizes="'+Mn(r.imageSizes)+'"]')):i+='[href="'+Mn(e)+'"]';var a=i;switch(t){case "style":a=$o(e);break;case "script":a=ts(e);}In.has(a)||(e=Kt({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),In.set(a,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Cl(a))||t==="script"&&n.querySelector(El(a))||(t=n.createElement("link"),jr(t,"link",e),Tr(t),n.head.appendChild(t)));}}function N6(e,t){Ii.m(e,t);var r=es;if(r&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Mn(n)+'"][href="'+Mn(e)+'"]',a=i;switch(n){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":a=ts(e);}if(!In.has(a)&&(e=Kt({rel:"modulepreload",href:e},t),In.set(a,e),r.querySelector(i)===null)){switch(n){case "audioworklet":case "paintworklet":case "serviceworker":case "sharedworker":case "worker":case "script":if(r.querySelector(El(a)))return}n=r.createElement("link"),jr(n,"link",e),Tr(n),r.head.appendChild(n);}}}function I6(e,t,r){Ii.S(e,t,r);var n=es;if(n&&e){var i=Oo(n).hoistableStyles,a=$o(e);t=t||"default";var s=i.get(a);if(!s){var o={loading:0,preload:null};if(s=n.querySelector(Cl(a)))o.loading=5;else {e=Kt({rel:"stylesheet",href:e,"data-precedence":t},r),(r=In.get(a))&&ep(e,r);var l=s=n.createElement("link");Tr(l),jr(l,"link",e),l._p=new Promise(function(f,u){l.onload=f,l.onerror=u;}),l.addEventListener("load",function(){o.loading|=1;}),l.addEventListener("error",function(){o.loading|=2;}),o.loading|=4,Au(s,t,n);}s={type:"stylesheet",instance:s,count:1,state:o},i.set(a,s);}}}function z6(e,t){Ii.X(e,t);var r=es;if(r&&e){var n=Oo(r).hoistableScripts,i=ts(e),a=n.get(i);a||(a=r.querySelector(El(i)),a||(e=Kt({src:e,async:true},t),(t=In.get(i))&&tp(e,t),a=r.createElement("script"),Tr(a),jr(a,"link",e),r.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(i,a));}}function j6(e,t){Ii.M(e,t);var r=es;if(r&&e){var n=Oo(r).hoistableScripts,i=ts(e),a=n.get(i);a||(a=r.querySelector(El(i)),a||(e=Kt({src:e,async:true,type:"module"},t),(t=In.get(i))&&tp(e,t),a=r.createElement("script"),Tr(a),jr(a,"link",e),r.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},n.set(i,a));}}function Ug(e,t,r,n){var i=(i=Qi.current)?tc(i):null;if(!i)throw Error(we(446));switch(e){case "meta":case "title":return null;case "style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=$o(r.href),r=Oo(i).hoistableStyles,n=r.get(t),n||(n={type:"style",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case "link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=$o(r.href);var a=Oo(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Cl(e)))&&!a._p&&(s.instance=a,s.state.loading=5),In.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},In.set(e,r),a||L6(i,e,r,s.state))),t&&n===null)throw Error(we(528,""));return s}if(t&&n!==null)throw Error(we(529,""));return null;case "script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ts(r),r=Oo(i).hoistableScripts,n=r.get(t),n||(n={type:"script",instance:null,count:0,state:null},r.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(we(444,e))}}function $o(e){return 'href="'+Mn(e)+'"'}function Cl(e){return 'link[rel="stylesheet"]['+e+"]"}function Tv(e){return Kt({},e,{"data-precedence":e.precedence,precedence:null})}function L6(e,t,r,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),jr(t,"link",r),Tr(t),e.head.appendChild(t));}function ts(e){return '[src="'+Mn(e)+'"]'}function El(e){return "script[async]"+e}function Hg(e,t,r){if(t.count++,t.instance===null)switch(t.type){case "style":var n=e.querySelector('style[data-href~="'+Mn(r.href)+'"]');if(n)return t.instance=n,Tr(n),n;var i=Kt({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Tr(n),jr(n,"style",i),Au(n,r.precedence,e),t.instance=n;case "stylesheet":i=$o(r.href);var a=e.querySelector(Cl(i));if(a)return t.state.loading|=4,t.instance=a,Tr(a),a;n=Tv(r),(i=In.get(i))&&ep(n,i),a=(e.ownerDocument||e).createElement("link"),Tr(a);var s=a;return s._p=new Promise(function(o,l){s.onload=o,s.onerror=l;}),jr(a,"link",n),t.state.loading|=4,Au(a,r.precedence,e),t.instance=a;case "script":return a=ts(r.src),(i=e.querySelector(El(a)))?(t.instance=i,Tr(i),i):(n=r,(i=In.get(a))&&(n=Kt({},r),tp(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Tr(i),jr(i,"link",n),e.head.appendChild(i),t.instance=i);case "void":return null;default:throw Error(we(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Au(n,r.precedence,e));return t.instance}function Au(e,t,r){for(var n=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,a=i,s=0;s<n.length;s++){var o=n[s];if(o.dataset.precedence===t)a=o;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild));}function ep(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title);}function tp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity);}var Tu=null;function Vg(e,t,r){if(Tu===null){var n=new Map,i=Tu=new Map;i.set(r,n);}else i=Tu,n=i.get(r),n||(n=new Map,i.set(r,n));if(n.has(e))return n;for(n.set(e,null),r=r.getElementsByTagName(e),i=0;i<r.length;i++){var a=r[i];if(!(a[vl]||a[Nr]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var s=a.getAttribute(t)||"";s=e+s;var o=n.get(s);o?o.push(a):n.set(s,[a]);}}return n}function Gg(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null);}function B6(e,t,r){if(r===1||t.itemProp!=null)return false;switch(e){case "meta":case "title":return true;case "style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return true;case "link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):true;case "script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return true}return false}function Mv(e){return !(e.type==="stylesheet"&&(e.state.loading&3)===0)}function F6(e,t,r,n){if(r.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==false)&&(r.state.loading&4)===0){if(r.instance===null){var i=$o(n.href),a=t.querySelector(Cl(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rc.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=a,Tr(a);return}a=t.ownerDocument||t,n=Tv(n),(i=In.get(i))&&ep(n,i),a=a.createElement("link"),Tr(a);var s=a;s._p=new Promise(function(o,l){s.onload=o,s.onerror=l;}),jr(a,"link",n),r.instance=a;}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=rc.bind(e),t.addEventListener("load",r),t.addEventListener("error",r));}}var pd=0;function P6(e,t){return e.stylesheets&&e.count===0&&Mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var n=setTimeout(function(){if(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a();}},6e4+t);0<e.imgBytes&&pd===0&&(pd=62500*w6());var i=setTimeout(function(){if(e.waitingForImages=false,e.count===0&&(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a();}},(e.imgBytes>pd?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i);}}:null}function rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e();}}}var nc=null;function Mu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nc=new Map,t.forEach(U6,e),nc=null,rc.call(e));}function U6(e,t){if(!(t.state.loading&4)){var r=nc.get(e);if(r)var n=r.get(null);else {r=new Map,nc.set(e,r);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var s=i[a];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(r.set(s.dataset.precedence,s),n=s);}n&&r.set(null,n);}i=t.instance,s=i.getAttribute("data-precedence"),a=r.get(s)||n,a===n&&r.set(null,i),r.set(s,i),this.count++,n=rc.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4;}}var fl={$$typeof:Si,Provider:null,Consumer:null,_currentValue:Ma,_currentValue2:Ma,_threadCount:0};function H6(e,t,r,n,i,a,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pf(0),this.hiddenUpdates=Pf(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map;}function kv(e,t,r,n,i,a,s,o,l,f,u,c){return e=new H6(e,t,r,s,l,f,u,c,o),t=1,a===true&&(t|=24),a=hn(3,null,null,t),e.current=a,a.stateNode=e,t=Ah(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:n,isDehydrated:r,cache:t},kh(a),e}function Ov(e){return e?(e=Ao,e):Ao}function Dv(e,t,r,n,i,a){i=Ov(i),n.context===null?n.context=i:n.pendingContext=i,n=ea(t),n.payload={element:r},a=a===void 0?null:a,a!==null&&(n.callback=a),r=ta(e,n,t),r!==null&&(Qr(r,e,t),qs(r,e,t));}function qg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t;}}function rp(e,t){qg(e,t),(e=e.alternate)&&qg(e,t);}function Nv(e){if(e.tag===13||e.tag===31){var t=Ha(e,67108864);t!==null&&Qr(t,e,67108864),rp(e,67108864);}}function Wg(e){if(e.tag===13||e.tag===31){var t=vn();t=hh(t);var r=Ha(e,t);r!==null&&Qr(r,e,t),rp(e,t);}}var ic=true;function V6(e,t,r,n){var i=lt.T;lt.T=null;var a=Rt.p;try{Rt.p=2,np(e,t,r,n);}finally{Rt.p=a,lt.T=i;}}function G6(e,t,r,n){var i=lt.T;lt.T=null;var a=Rt.p;try{Rt.p=8,np(e,t,r,n);}finally{Rt.p=a,lt.T=i;}}function np(e,t,r,n){if(ic){var i=lh(n);if(i===null)dd(e,t,n,ac,r),$g(e,n);else if(W6(i,e,t,r,n))n.stopPropagation();else if($g(e,n),t&4&&-1<q6.indexOf(e)){for(;i!==null;){var a=Ko(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var s=Ra(a.pendingLanes);if(s!==0){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-bn(s);o.entanglements[1]|=l,s&=~l;}oi(a),(Et&6)===0&&(Xu=mn()+500,Sl(0));}}break;case 31:case 13:o=Ha(a,2),o!==null&&Qr(o,a,2),vc(),rp(a,2);}if(a=lh(n),a===null&&dd(e,t,n,ac,r),a===i)break;i=a;}i!==null&&n.stopPropagation();}else dd(e,t,n,null,r);}}function lh(e){return e=bh(e),ip(e)}var ac=null;function ip(e){if(ac=null,e=_o(e),e!==null){var t=pl(e);if(t===null)e=null;else {var r=t.tag;if(r===13){if(e=Jg(t),e!==null)return e;e=null;}else if(r===31){if(e=e1(t),e!==null)return e;e=null;}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null;}else t!==e&&(e=null);}}return ac=e,null}function Iv(e){switch(e){case "beforetoggle":case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "toggle":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 2;case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 8;case "message":switch(Dx()){case i1:return 2;case a1:return 8;case Iu:case Nx:return 32;case o1:return 268435456;default:return 32}default:return 32}}var uh=false,ia=null,aa=null,oa=null,dl=new Map,hl=new Map,Wi=[],q6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function $g(e,t){switch(e){case "focusin":case "focusout":ia=null;break;case "dragenter":case "dragleave":aa=null;break;case "mouseover":case "mouseout":oa=null;break;case "pointerover":case "pointerout":dl.delete(t.pointerId);break;case "gotpointercapture":case "lostpointercapture":hl.delete(t.pointerId);}}function Is(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ko(t),t!==null&&Nv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function W6(e,t,r,n,i){switch(t){case "focusin":return ia=Is(ia,e,t,r,n,i),true;case "dragenter":return aa=Is(aa,e,t,r,n,i),true;case "mouseover":return oa=Is(oa,e,t,r,n,i),true;case "pointerover":var a=i.pointerId;return dl.set(a,Is(dl.get(a)||null,e,t,r,n,i)),true;case "gotpointercapture":return a=i.pointerId,hl.set(a,Is(hl.get(a)||null,e,t,r,n,i)),true}return false}function zv(e){var t=_o(e.target);if(t!==null){var r=pl(t);if(r!==null){if(t=r.tag,t===13){if(t=Jg(r),t!==null){e.blockedOn=t,k0(e.priority,function(){Wg(r);});return}}else if(t===31){if(t=e1(r),t!==null){e.blockedOn=t,k0(e.priority,function(){Wg(r);});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null;}function ku(e){if(e.blockedOn!==null)return false;for(var t=e.targetContainers;0<t.length;){var r=lh(e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ad=n,r.target.dispatchEvent(n),Ad=null;}else return t=Ko(r),t!==null&&Nv(t),e.blockedOn=r,false;t.shift();}return true}function Xg(e,t,r){ku(e)&&r.delete(t);}function $6(){uh=false,ia!==null&&ku(ia)&&(ia=null),aa!==null&&ku(aa)&&(aa=null),oa!==null&&ku(oa)&&(oa=null),dl.forEach(Xg),hl.forEach(Xg);}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,uh||(uh=true,_r.unstable_scheduleCallback(_r.unstable_NormalPriority,$6)));}var mu=null;function Yg(e){mu!==e&&(mu=e,_r.unstable_scheduleCallback(_r.unstable_NormalPriority,function(){mu===e&&(mu=null);for(var t=0;t<e.length;t+=3){var r=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(ip(n||r)===null)continue;break}var a=Ko(r);a!==null&&(e.splice(t,3),t-=3,Vd(a,{pending:true,data:i,method:r.method,action:n},n,i));}}));}function Xo(e){function t(l){return pu(l,e)}ia!==null&&pu(ia,e),aa!==null&&pu(aa,e),oa!==null&&pu(oa,e),dl.forEach(t),hl.forEach(t);for(var r=0;r<Wi.length;r++){var n=Wi[r];n.blockedOn===e&&(n.blockedOn=null);}for(;0<Wi.length&&(r=Wi[0],r.blockedOn===null);)zv(r),r.blockedOn===null&&Wi.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(n=0;n<r.length;n+=3){var i=r[n],a=r[n+1],s=i[Jr]||null;if(typeof a=="function")s||Yg(r);else if(s){var o=null;if(a&&a.hasAttribute("formAction")){if(i=a,s=a[Jr]||null)o=s.formAction;else if(ip(i)!==null)continue}else o=s.action;typeof o=="function"?r[n+1]=o:(r.splice(n,3),n-=3),Yg(r);}}}function jv(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(s){return i=s})},focusReset:"manual",scroll:"manual"});}function t(){i!==null&&(i(),i=null),n||setTimeout(r,20);}function r(){if(!n&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"});}}if(typeof navigation=="object"){var n=false,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){n=true,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null);}}}function ap(e){this._internalRoot=e;}_c.prototype.render=ap.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(we(409));var r=t.current,n=vn();Dv(r,n,e,t,null,null);};_c.prototype.unmount=ap.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dv(e.current,2,null,e,null,null),vc(),t[Yo]=null;}};function _c(e){this._internalRoot=e;}_c.prototype.unstable_scheduleHydration=function(e){if(e){var t=f1();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Wi.length&&t!==0&&t<Wi[r].priority;r++);Wi.splice(r,0,e),r===0&&zv(e);}};var Kg=Zg.version;if(Kg!=="19.2.5")throw Error(we(527,Kg,"19.2.5"));Rt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(we(188)):(e=Object.keys(e).join(","),Error(we(268,e)));return e=Ex(t),e=e!==null?t1(e):null,e=e===null?null:e.stateNode,e};var X6={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:lt,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(zs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!zs.isDisabled&&zs.supportsFiber))try{ml=zs.inject(X6),gn=zs;}catch{}var zs;xc.createRoot=function(e,t){if(!Qg(e))throw Error(we(299));var r=false,n="",i=Ab,a=Tb,s=Mb;return t!=null&&(t.unstable_strictMode===true&&(r=true),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=kv(e,1,false,null,null,r,n,null,i,a,s,jv),e[Yo]=t.current,Jh(e),new ap(t)};xc.hydrateRoot=function(e,t,r){if(!Qg(e))throw Error(we(299));var n=false,i="",a=Ab,s=Tb,o=Mb,l=null;return r!=null&&(r.unstable_strictMode===true&&(n=true),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onUncaughtError!==void 0&&(a=r.onUncaughtError),r.onCaughtError!==void 0&&(s=r.onCaughtError),r.onRecoverableError!==void 0&&(o=r.onRecoverableError),r.formState!==void 0&&(l=r.formState)),t=kv(e,1,true,t,r??null,n,i,l,a,s,o,jv),t.context=Ov(null),r=t.current,n=vn(),n=hh(n),i=ea(n),i.callback=null,ta(r,i,n),r=n,t.current.lanes=r,bl(t,r),oi(t),e[Yo]=t.current,Jh(e),new _c(t)};xc.version="19.2.5";});var Pv=Gn(($9,Fv)=>{function Bv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bv);}catch(e){console.error(e);}}Bv(),Fv.exports=Lv();});var Vy=Gn(Nc=>{var N5=Symbol.for("react.transitional.element"),I5=Symbol.for("react.fragment");function Hy(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var i in t)i!=="key"&&(r[i]=t[i]);}else r=t;return t=r.ref,{$$typeof:N5,type:e,key:n,ref:t!==void 0?t:null,props:r}}Nc.Fragment=I5;Nc.jsx=Hy;Nc.jsxs=Hy;});var rn=Gn((hE,Gy)=>{Gy.exports=Vy();});var U3=Gn((P3,Um)=>{(function(e){typeof P3=="object"&&typeof Um<"u"?Um.exports=e():typeof define=="function"&&define.amd?define([],e):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).ExcelJS=e();})((function(){return (function e(t,r,n){function i(o,l){if(!r[o]){if(!t[o]){var f=typeof Cs=="function"&&Cs;if(!l&&f)return f(o,true);if(a)return a(o,true);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};t[o][0].call(c.exports,(function(d){return i(t[o][1][d]||d)}),c,c.exports,e,t,r,n);}return r[o].exports}for(var a=typeof Cs=="function"&&Cs,s=0;s<n.length;s++)i(n[s]);return i})({1:[function(e,t,r){let n=e("fs"),i=e("fast-csv"),a=e("dayjs/plugin/customParseFormat"),s=e("dayjs/plugin/utc"),o=e("dayjs").extend(a).extend(s),l=e("../utils/stream-buf"),{fs:{exists:f}}=e("../utils/utils"),u={true:true,false:false,"#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(c){this.workbook=c,this.worksheet=null;}async readFile(c,d){if(d=d||{},!await f(c))throw new Error("File not found: "+c);let p=n.createReadStream(c),h=await this.read(p,d);return p.close(),h}read(c,d){return d=d||{},new Promise((p,h)=>{let m=this.workbook.addWorksheet(d.sheetName),g=d.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],v=d.map||function(C){if(C==="")return null;let T=Number(C);if(!Number.isNaN(T)&&T!==1/0)return T;let I=g.reduce((D,j)=>{if(D)return D;let F=o(C,j,true);return F.isValid()?F:null},null);if(I)return new Date(I.valueOf());let k=u[C];return k!==void 0?k:C},w=i.parse(d.parserOptions).on("data",C=>{m.addRow(C.map(v));}).on("end",()=>{w.emit("worksheet",m);});w.on("worksheet",p).on("error",h),c.pipe(w);})}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(c,d){return new Promise((p,h)=>{d=d||{};let m=this.workbook.getWorksheet(d.sheetName||d.sheetId),g=i.format(d.formatterOptions);c.on("finish",()=>{p();}),g.on("error",h),g.pipe(c);let{dateFormat:v,dateUTC:w}=d,C=d.map||(k=>{if(k){if(k.text||k.hyperlink)return k.hyperlink||k.text||"";if(k.formula||k.result)return k.result||"";if(k instanceof Date)return v?w?o.utc(k).format(v):o(k).format(v):w?o.utc(k).format():o(k).format();if(k.error)return k.error;if(typeof k=="object")return JSON.stringify(k)}return k}),T=d.includeEmptyRows===void 0||d.includeEmptyRows,I=1;m&&m.eachRow((k,D)=>{if(T)for(;I++<D-1;)g.write([]);let{values:j}=k;j.shift(),g.write(j.map(C)),I=D;}),g.end();})}writeFile(c,d){let p={encoding:(d=d||{}).encoding||"utf8"},h=n.createWriteStream(c,p);return this.write(h,d)}async writeBuffer(c){let d=new l;return await this.write(d,c),d.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){let n=e("../utils/col-cache");class i{constructor(s,o){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=s,o)if(typeof o=="string"){let f=n.decodeAddress(o);this.nativeCol=f.col+l,this.nativeColOff=0,this.nativeRow=f.row+l,this.nativeRowOff=0;}else o.nativeCol!==void 0?(this.nativeCol=o.nativeCol||0,this.nativeColOff=o.nativeColOff||0,this.nativeRow=o.nativeRow||0,this.nativeRowOff=o.nativeRowOff||0):o.col!==void 0?(this.col=o.col+l,this.row=o.row+l):(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(s){return s instanceof i||s==null?s:new i(s)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(s){this.nativeCol=Math.floor(s),this.nativeColOff=Math.floor((s-this.nativeCol)*this.colWidth);}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(s){this.nativeRow=Math.floor(s),this.nativeRowOff=Math.floor((s-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(s){this.nativeCol=s.nativeCol,this.nativeColOff=s.nativeColOff,this.nativeRow=s.nativeRow,this.nativeRowOff=s.nativeRowOff;}}t.exports=i;},{"../utils/col-cache":19}],3:[function(e,t,r){let n=e("../utils/col-cache"),i=e("../utils/under-dash"),a=e("./enums"),{slideFormula:s}=e("../utils/shared-formula"),o=e("./note");class l{constructor(c,d,p){if(!c||!d)throw new Error("A Cell needs a Row");this._row=c,this._column=d,n.validateAddress(p),this._address=p,this._value=f.create(l.Types.Null,this),this.style=this._mergeStyle(c.style,d.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(c){this.style.numFmt=c;}get font(){return this.style.font}set font(c){this.style.font=c;}get alignment(){return this.style.alignment}set alignment(c){this.style.alignment=c;}get border(){return this.style.border}set border(c){this.style.border=c;}get fill(){return this.style.fill}set fill(c){this.style.fill=c;}get protection(){return this.style.protection}set protection(c){this.style.protection=c;}_mergeStyle(c,d,p){let h=c&&c.numFmt||d&&d.numFmt;h&&(p.numFmt=h);let m=c&&c.font||d&&d.font;m&&(p.font=m);let g=c&&c.alignment||d&&d.alignment;g&&(p.alignment=g);let v=c&&c.border||d&&d.border;v&&(p.border=v);let w=c&&c.fill||d&&d.fill;w&&(p.fill=w);let C=c&&c.protection||d&&d.protection;return C&&(p.protection=C),p}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(c,d){this._value.release(),this._value=f.create(l.Types.Merge,this,c),d||(this.style=c.style);}unmerge(){this.type===l.Types.Merge&&(this._value.release(),this._value=f.create(l.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}));}isMergedTo(c){return this._value.type===l.Types.Merge&&this._value.isMergedTo(c)}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(c){this.type!==l.Types.Merge?(this._value.release(),this._value=f.create(f.getType(c),this,c)):this._value.master.value=c;}get note(){return this._comment&&this._comment.note}set note(c){this._comment=new o(c);}get text(){return this._value.toString()}get html(){return i.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(c){this.type===l.Types.String&&(this._value=f.create(l.Types.Hyperlink,this,{text:this._value.value,hyperlink:c}));}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){let{worksheet:c}=this._row;return {sheetName:c.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(c){this.names=[c];}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(c){let{definedNames:d}=this.workbook;d.removeAllNames(this.fullAddress),c.forEach(p=>{d.addEx(this.fullAddress,p);});}addName(c){this.workbook.definedNames.addEx(this.fullAddress,c);}removeName(c){this.workbook.definedNames.removeEx(this.fullAddress,c);}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress);}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(c){this._dataValidations.add(this.address,c);}get model(){let{model:c}=this._value;return c.style=this.style,this._comment&&(c.comment=this._comment.model),c}set model(c){this._value.release(),this._value=f.create(c.type,this),this._value.model=c,c.comment&&c.comment.type==="note"&&(this._comment=o.fromModel(c.comment)),c.style?this.style=c.style:this.style={};}}l.Types=a.ValueType;let f={getType:u=>u==null?l.Types.Null:u instanceof String||typeof u=="string"?l.Types.String:typeof u=="number"?l.Types.Number:typeof u=="boolean"?l.Types.Boolean:u instanceof Date?l.Types.Date:u.text&&u.hyperlink?l.Types.Hyperlink:u.formula||u.sharedFormula?l.Types.Formula:u.richText?l.Types.RichText:u.sharedString?l.Types.SharedString:u.error?l.Types.Error:l.Types.JSON,types:[{t:l.Types.Null,f:class{constructor(u){this.model={address:u.address,type:l.Types.Null};}get value(){return null}set value(u){}get type(){return l.Types.Null}get effectiveType(){return l.Types.Null}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return ""}release(){}toString(){return ""}}},{t:l.Types.Number,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.Number,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.Number}get effectiveType(){return l.Types.Number}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.String,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.String,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return `"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:l.Types.Date,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.Date,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.Date}get effectiveType(){return l.Types.Date}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Hyperlink,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.Hyperlink,text:c?c.text:void 0,hyperlink:c?c.hyperlink:void 0},c&&c.tooltip&&(this.model.tooltip=c.tooltip);}get value(){let u={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(u.tooltip=this.model.tooltip),u}set value(u){this.model={text:u.text,hyperlink:u.hyperlink},u.tooltip&&(this.model.tooltip=u.tooltip);}get text(){return this.model.text}set text(u){this.model.text=u;}get hyperlink(){return this.model.hyperlink}set hyperlink(u){this.model.hyperlink=u;}get type(){return l.Types.Hyperlink}get effectiveType(){return l.Types.Hyperlink}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:l.Types.Formula,f:class{constructor(u,c){this.cell=u,this.model={address:u.address,type:l.Types.Formula,shareType:c?c.shareType:void 0,ref:c?c.ref:void 0,formula:c?c.formula:void 0,sharedFormula:c?c.sharedFormula:void 0,result:c?c.result:void 0};}_copyModel(u){let c={},d=p=>{let h=u[p];h&&(c[p]=h);};return d("formula"),d("result"),d("ref"),d("shareType"),d("sharedFormula"),c}get value(){return this._copyModel(this.model)}set value(u){this.model=this._copyModel(u);}validate(u){switch(f.getType(u)){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(u){this.model.formula=u;}get formulaType(){return this.model.formula?a.FormulaType.Master:this.model.sharedFormula?a.FormulaType.Shared:a.FormulaType.None}get result(){return this.model.result}set result(u){this.model.result=u;}get type(){return l.Types.Formula}get effectiveType(){let u=this.model.result;return u==null?a.ValueType.Null:u instanceof String||typeof u=="string"?a.ValueType.String:typeof u=="number"?a.ValueType.Number:u instanceof Date?a.ValueType.Date:u.text&&u.hyperlink?a.ValueType.Hyperlink:u.formula?a.ValueType.Formula:a.ValueType.Null}get address(){return this.model.address}set address(u){this.model.address=u;}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){let{worksheet:u}=this.cell,c=u.findCell(this.model.sharedFormula);this._translatedFormula=c&&s(c.formula,c.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(u,c){this.model={address:u.address,type:l.Types.Merge,master:c?c.address:void 0},this._master=c,c&&c.addMergeRef();}get value(){return this._master.value}set value(u){u instanceof l?(this._master&&this._master.releaseMergeRef(),u.addMergeRef(),this._master=u):this._master.value=u;}isMergedTo(u){return u===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(u){this.model.address=u;}toCsvString(){return ""}release(){this._master.releaseMergeRef();}toString(){return this.value.toString()}}},{t:l.Types.JSON,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.String,value:JSON.stringify(c),rawValue:c};}get value(){return this.model.rawValue}set value(u){this.model.rawValue=u,this.model.value=JSON.stringify(u);}get type(){return l.Types.String}get effectiveType(){return l.Types.String}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:l.Types.SharedString,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.SharedString,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.SharedString}get effectiveType(){return l.Types.SharedString}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.RichText,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.String,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}toString(){return this.model.value.richText.map(u=>u.text).join("")}get type(){return l.Types.RichText}get effectiveType(){return l.Types.RichText}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return `"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:l.Types.Boolean,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.Boolean,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.Boolean}get effectiveType(){return l.Types.Boolean}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:l.Types.Error,f:class{constructor(u,c){this.model={address:u.address,type:l.Types.Error,value:c};}get value(){return this.model.value}set value(u){this.model.value=u;}get type(){return l.Types.Error}get effectiveType(){return l.Types.Error}get address(){return this.model.address}set address(u){this.model.address=u;}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((u,c)=>(u[c.t]=c.f,u),[]),create(u,c,d){let p=this.types[u];if(!p)throw new Error("Could not create Value of type "+u);return new p(c,d)}};t.exports=l;},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(e,t,r){let n=e("../utils/under-dash"),i=e("./enums"),a=e("../utils/col-cache");class s{constructor(l,f,u){this._worksheet=l,this._number=f,u!==false&&(this.defn=u);}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return a.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return {header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(l){l?(this.key=l.key,this.width=l.width!==void 0?l.width:9,this.outlineLevel=l.outlineLevel,l.style?this.style=l.style:this.style={},this.header=l.header,this._hidden=!!l.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(l){l!==void 0?(this._header=l,this.headers.forEach((f,u)=>{this._worksheet.getCell(u+1,this.number).value=f;})):this._header=void 0;}get key(){return this._key}set key(l){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=l,l&&this._worksheet.setColumnKey(this._key,this);}get hidden(){return !!this._hidden}set hidden(l){this._hidden=l;}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(l){this._outlineLevel=l;}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(l){return this.width===l.width&&this.hidden===l.hidden&&this.outlineLevel===l.outlineLevel&&n.isEqual(this.style,l.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return false;let l=this.style;return !l||!(l.font||l.numFmt||l.alignment||l.border||l.fill||l.protection)}get headerCount(){return this.headers.length}eachCell(l,f){let u=this.number;f||(f=l,l=null),this._worksheet.eachRow(l,(c,d)=>{f(c.getCell(u),d);});}get values(){let l=[];return this.eachCell((f,u)=>{f&&f.type!==i.ValueType.Null&&(l[u]=f.value);}),l}set values(l){if(!l)return;let f=this.number,u=0;l.hasOwnProperty("0")&&(u=1),l.forEach((c,d)=>{this._worksheet.getCell(d+u,f).value=c;});}_applyStyle(l,f){return this.style[l]=f,this.eachCell(u=>{u[l]=f;}),f}get numFmt(){return this.style.numFmt}set numFmt(l){this._applyStyle("numFmt",l);}get font(){return this.style.font}set font(l){this._applyStyle("font",l);}get alignment(){return this.style.alignment}set alignment(l){this._applyStyle("alignment",l);}get protection(){return this.style.protection}set protection(l){this._applyStyle("protection",l);}get border(){return this.style.border}set border(l){this._applyStyle("border",l);}get fill(){return this.style.fill}set fill(l){this._applyStyle("fill",l);}static toModel(l){let f=[],u=null;return l&&l.forEach((c,d)=>{c.isDefault?u&&(u=null):u&&c.equivalentTo(u)?u.max=d+1:(u={min:d+1,max:d+1,width:c.width!==void 0?c.width:9,style:c.style,isCustomWidth:c.isCustomWidth,hidden:c.hidden,outlineLevel:c.outlineLevel,collapsed:c.collapsed},f.push(u));}),f.length?f:void 0}static fromModel(l,f){let u=[],c=1,d=0;for(f=(f=f||[]).sort((function(p,h){return p.min-h.min}));d<f.length;){let p=f[d++];for(;c<p.min;)u.push(new s(l,c++));for(;c<=p.max;)u.push(new s(l,c++,p));}return u.length?u:null}}t.exports=s;},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(e,t,r){t.exports=class{constructor(n){this.model=n||{};}add(n,i){return this.model[n]=i}find(n){return this.model[n]}remove(n){this.model[n]=void 0;}};},{}],6:[function(e,t,r){let n=e("../utils/under-dash"),i=e("../utils/col-cache"),a=e("../utils/cell-matrix"),s=e("./range"),o=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;t.exports=class{constructor(){this.matrixMap={};}getMatrix(l){return this.matrixMap[l]||(this.matrixMap[l]=new a)}add(l,f){let u=i.decodeEx(l);this.addEx(u,f);}addEx(l,f){let u=this.getMatrix(f);if(l.top)for(let c=l.left;c<=l.right;c++)for(let d=l.top;d<=l.bottom;d++){let p={sheetName:l.sheetName,address:i.n2l(c)+d,row:d,col:c};u.addCellEx(p);}else u.addCellEx(l);}remove(l,f){let u=i.decodeEx(l);this.removeEx(u,f);}removeEx(l,f){this.getMatrix(f).removeCellEx(l);}removeAllNames(l){n.each(this.matrixMap,f=>{f.removeCellEx(l);});}forEach(l){n.each(this.matrixMap,(f,u)=>{f.forEach(c=>{l(u,c);});});}getNames(l){return this.getNamesEx(i.decodeEx(l))}getNamesEx(l){return n.map(this.matrixMap,(f,u)=>f.findCellEx(l)&&u).filter(Boolean)}_explore(l,f){f.mark=false;let{sheetName:u}=f,c=new s(f.row,f.col,f.row,f.col,u),d,p;function h(g,v){let w=l.findCellAt(u,g,f.col);return !(!w||!w.mark)&&(c[v]=g,w.mark=false,true)}for(p=f.row-1;h(p,"top");p--);for(p=f.row+1;h(p,"bottom");p++);function m(g,v){let w=[];for(p=c.top;p<=c.bottom;p++){let C=l.findCellAt(u,p,g);if(!C||!C.mark)return false;w.push(C);}c[v]=g;for(let C=0;C<w.length;C++)w[C].mark=false;return true}for(d=f.col-1;m(d,"left");d--);for(d=f.col+1;m(d,"right");d++);return c}getRanges(l,f){return (f=f||this.matrixMap[l])?(f.forEach(u=>{u.mark=true;}),{name:l,ranges:f.map(u=>u.mark&&this._explore(f,u)).filter(Boolean).map(u=>u.$shortRange)}):{name:l,ranges:[]}}normaliseMatrix(l,f){l.forEachInSheet(f,(u,c,d)=>{u&&(u.row===c&&u.col===d||(u.row=c,u.col=d,u.address=i.n2l(d)+c));});}spliceRows(l,f,u,c){n.each(this.matrixMap,d=>{d.spliceRows(l,f,u,c),this.normaliseMatrix(d,l);});}spliceColumns(l,f,u,c){n.each(this.matrixMap,d=>{d.spliceColumns(l,f,u,c),this.normaliseMatrix(d,l);});}get model(){return n.map(this.matrixMap,(l,f)=>this.getRanges(f,l)).filter(l=>l.ranges.length)}set model(l){let f=this.matrixMap={};l.forEach(u=>{let c=f[u.name]=new a;u.ranges.forEach(d=>{o.test(d.split("!").pop()||"")&&c.addCell(d);});});}};},{"../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){let n=e("../utils/col-cache"),i=e("./anchor");t.exports=class{constructor(a,s){this.worksheet=a,this.model=s;}get model(){switch(this.type){case "background":return {type:this.type,imageId:this.imageId};case "image":return {type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(a){let{type:s,imageId:o,range:l,hyperlinks:f}=a;if(this.type=s,this.imageId=o,s==="image")if(typeof l=="string"){let u=n.decode(l);this.range={tl:new i(this.worksheet,{col:u.left,row:u.top},-1),br:new i(this.worksheet,{col:u.right,row:u.bottom},0),editAs:"oneCell"};}else this.range={tl:new i(this.worksheet,l.tl,0),br:l.br&&new i(this.worksheet,l.br,0),ext:l.ext,editAs:l.editAs,hyperlinks:f||l.hyperlinks};}};},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,t,r){let n=e("../utils/under-dash");class i{constructor(s){this.note=s;}get model(){let s=null;return typeof this.note==="string"?s={type:"note",note:{texts:[{text:this.note}]}}:s={type:"note",note:this.note},n.deepMerge({},i.DEFAULT_CONFIGS,s)}set model(s){let{note:o}=s,{texts:l}=o;l.length===1&&Object.keys(l[0]).length===1?this.note=l[0].text:this.note=o;}static fromModel(s){let o=new i;return o.model=s,o}}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){let n=e("../utils/col-cache");class i{constructor(){this.decode(arguments);}setTLBR(s,o,l,f,u){if(arguments.length<4){let c=n.decodeAddress(s),d=n.decodeAddress(o);this.model={top:Math.min(c.row,d.row),left:Math.min(c.col,d.col),bottom:Math.max(c.row,d.row),right:Math.max(c.col,d.col),sheetName:l},this.setTLBR(c.row,c.col,d.row,d.col,u);}else this.model={top:Math.min(s,l),left:Math.min(o,f),bottom:Math.max(s,l),right:Math.max(o,f),sheetName:u};}decode(s){switch(s.length){case 5:this.setTLBR(s[0],s[1],s[2],s[3],s[4]);break;case 4:this.setTLBR(s[0],s[1],s[2],s[3]);break;case 3:this.setTLBR(s[0],s[1],s[2]);break;case 2:this.setTLBR(s[0],s[1]);break;case 1:{let o=s[0];if(o instanceof i)this.model={top:o.model.top,left:o.model.left,bottom:o.model.bottom,right:o.model.right,sheetName:o.sheetName};else if(o instanceof Array)this.decode(o);else if(o.top&&o.left&&o.bottom&&o.right)this.model={top:o.top,left:o.left,bottom:o.bottom,right:o.right,sheetName:o.sheetName};else {let l=n.decodeEx(o);l.top?this.model={top:l.top,left:l.left,bottom:l.bottom,right:l.right,sheetName:l.sheetName}:this.model={top:l.row,left:l.col,bottom:l.row,right:l.col,sheetName:l.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() - "+s.length)}}get top(){return this.model.top||1}set top(s){this.model.top=s;}get left(){return this.model.left||1}set left(s){this.model.left=s;}get bottom(){return this.model.bottom||1}set bottom(s){this.model.bottom=s;}get right(){return this.model.right||1}set right(s){this.model.right=s;}get sheetName(){return this.model.sheetName}set sheetName(s){this.model.sheetName=s;}get _serialisedSheetName(){let{sheetName:s}=this.model;return s?/^[a-zA-Z0-9]*$/.test(s)?s+"!":`'${s}'!`:""}expand(s,o,l,f){(!this.model.top||s<this.top)&&(this.top=s),(!this.model.left||o<this.left)&&(this.left=o),(!this.model.bottom||l>this.bottom)&&(this.bottom=l),(!this.model.right||f>this.right)&&(this.right=f);}expandRow(s){if(s){let{dimensions:o,number:l}=s;o&&this.expand(l,o.min,l,o.max);}}expandToAddress(s){let o=n.decodeEx(s);this.expand(o.row,o.col,o.row,o.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(s){return (!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&!(s.bottom<this.top)&&!(s.top>this.bottom)&&!(s.right<this.left)&&!(s.left>this.right)}contains(s){let o=n.decodeEx(s);return this.containsEx(o)}containsEx(s){return (!s.sheetName||!this.sheetName||s.sheetName===this.sheetName)&&s.row>=this.top&&s.row<=this.bottom&&s.col>=this.left&&s.col<=this.right}forEachAddress(s){for(let o=this.left;o<=this.right;o++)for(let l=this.top;l<=this.bottom;l++)s(n.encodeAddress(l,o),l,o);}}t.exports=i;},{"../utils/col-cache":19}],11:[function(e,t,r){let n=e("../utils/under-dash"),i=e("./enums"),a=e("../utils/col-cache"),s=e("./cell");t.exports=class{constructor(o,l){this._worksheet=o,this._number=l,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(o){return this._cells[o-1]}getCellEx(o){let l=this._cells[o.col-1];if(!l){let f=this._worksheet.getColumn(o.col);l=new s(this,f,o.address),this._cells[o.col-1]=l;}return l}getCell(o){if(typeof o=="string"){let l=this._worksheet.getColumnKey(o);o=l?l.number:a.l2n(o);}return this._cells[o-1]||this.getCellEx({address:a.encodeAddress(this._number,o),row:this._number,col:o})}splice(o,l){let f=o+l;for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];let p=c.length-l,h=this._cells.length,m,g,v;if(p<0)for(m=o+c.length;m<=h;m++)v=this._cells[m-1],g=this._cells[m-p-1],g?(v=this.getCell(m),v.value=g.value,v.style=g.style,v._comment=g._comment):v&&(v.value=null,v.style={},v._comment=void 0);else if(p>0)for(m=h;m>=f;m--)g=this._cells[m-1],g?(v=this.getCell(m+p),v.value=g.value,v.style=g.style,v._comment=g._comment):this._cells[m+p-1]=void 0;for(m=0;m<c.length;m++)v=this.getCell(o+m),v.value=c[m],v.style={},v._comment=void 0;}eachCell(o,l){if(l||(l=o,o=null),o&&o.includeEmpty){let f=this._cells.length;for(let u=1;u<=f;u++)l(this.getCell(u),u);}else this._cells.forEach((f,u)=>{f&&f.type!==i.ValueType.Null&&l(f,u+1);});}addPageBreak(o,l){let f=this._worksheet,u=Math.max(0,o-1)||0,c=Math.max(0,l-1)||16838,d={id:this._number,max:c,man:1};u&&(d.min=u),f.rowBreaks.push(d);}get values(){let o=[];return this._cells.forEach(l=>{l&&l.type!==i.ValueType.Null&&(o[l.col]=l.value);}),o}set values(o){if(this._cells=[],o)if(o instanceof Array){let l=0;o.hasOwnProperty("0")&&(l=1),o.forEach((f,u)=>{f!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,u+l),row:this._number,col:u+l}).value=f);});}else this._worksheet.eachColumnKey((l,f)=>{o[f]!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,l.number),row:this._number,col:l.number}).value=o[f]);});}get hasValues(){return n.some(this._cells,o=>o&&o.type!==i.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let o=0;return this.eachCell(()=>{o++;}),o}get dimensions(){let o=0,l=0;return this._cells.forEach(f=>{f&&f.type!==i.ValueType.Null&&((!o||o>f.col)&&(o=f.col),l<f.col&&(l=f.col));}),o>0?{min:o,max:l}:null}_applyStyle(o,l){return this.style[o]=l,this._cells.forEach(f=>{f&&(f[o]=l);}),l}get numFmt(){return this.style.numFmt}set numFmt(o){this._applyStyle("numFmt",o);}get font(){return this.style.font}set font(o){this._applyStyle("font",o);}get alignment(){return this.style.alignment}set alignment(o){this._applyStyle("alignment",o);}get protection(){return this.style.protection}set protection(o){this._applyStyle("protection",o);}get border(){return this.style.border}set border(o){this._applyStyle("border",o);}get fill(){return this.style.fill}set fill(o){this._applyStyle("fill",o);}get hidden(){return !!this._hidden}set hidden(o){this._hidden=o;}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(o){this._outlineLevel=o;}get collapsed(){return !!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){let o=[],l=0,f=0;return this._cells.forEach(u=>{if(u){let c=u.model;c&&((!l||l>u.col)&&(l=u.col),f<u.col&&(f=u.col),o.push(c));}}),this.height||o.length?{cells:o,number:this.number,min:l,max:f,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(o){if(o.number!==this._number)throw new Error("Invalid row number in model");let l;this._cells=[],o.cells.forEach(f=>{switch(f.type){case s.Types.Merge:break;default:{let u;if(f.address)u=a.decodeAddress(f.address);else if(l){let{row:c}=l,d=l.col+1;u={row:c,col:d,address:a.encodeAddress(c,d),$col$row:`$${a.n2l(d)}$${c}`};}l=u,this.getCellEx(u).model=f;break}}}),o.height?this.height=o.height:delete this.height,this.hidden=o.hidden,this.outlineLevel=o.outlineLevel||0,this.style=o.style&&JSON.parse(JSON.stringify(o.style))||{};}};},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(e,t,r){let n=e("../utils/col-cache");class i{constructor(s,o,l){this.table=s,this.column=o,this.index=l;}_set(s,o){this.table.cacheState(),this.column[s]=o;}get name(){return this.column.name}set name(s){this._set("name",s);}get filterButton(){return this.column.filterButton}set filterButton(s){this.column.filterButton=s;}get style(){return this.column.style}set style(s){this.column.style=s;}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(s){this._set("totalsRowLabel",s);}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(s){this._set("totalsRowFunction",s);}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(s){this._set("totalsRowResult",s);}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(s){this._set("totalsRowFormula",s);}}t.exports=class{constructor(a,s){this.worksheet=a,s&&(this.table=s,this.validate(),this.store());}getFormula(a){switch(a.totalsRowFunction){case "none":return null;case "average":return `SUBTOTAL(101,${this.table.name}[${a.name}])`;case "countNums":return `SUBTOTAL(102,${this.table.name}[${a.name}])`;case "count":return `SUBTOTAL(103,${this.table.name}[${a.name}])`;case "max":return `SUBTOTAL(104,${this.table.name}[${a.name}])`;case "min":return `SUBTOTAL(105,${this.table.name}[${a.name}])`;case "stdDev":return `SUBTOTAL(106,${this.table.name}[${a.name}])`;case "var":return `SUBTOTAL(107,${this.table.name}[${a.name}])`;case "sum":return `SUBTOTAL(109,${this.table.name}[${a.name}])`;case "custom":return a.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+a.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){let{table:a}=this,s=(p,h,m)=>{p[h]===void 0&&(p[h]=m);};s(a,"headerRow",true),s(a,"totalsRow",false),s(a,"style",{}),s(a.style,"theme","TableStyleMedium2"),s(a.style,"showFirstColumn",false),s(a.style,"showLastColumn",false),s(a.style,"showRowStripes",false),s(a.style,"showColumnStripes",false);let o=(p,h)=>{if(!p)throw new Error(h)};o(a.ref,"Table must have ref"),o(a.columns,"Table must have column definitions"),o(a.rows,"Table must have row definitions"),a.tl=n.decodeAddress(a.ref);let{row:l,col:f}=a.tl;o(l>0,"Table must be on valid row"),o(f>0,"Table must be on valid col");let{width:u,filterHeight:c,tableHeight:d}=this;a.autoFilterRef=n.encode(l,f,l+c-1,f+u-1),a.tableRef=n.encode(l,f,l+d-1,f+u-1),a.columns.forEach((p,h)=>{o(p.name,`Column ${h} must have a name`),h===0?s(p,"totalsRowLabel","Total"):(s(p,"totalsRowFunction","none"),p.totalsRowFormula=this.getFormula(p));});}store(){let a=(c,d)=>{d&&Object.keys(d).forEach(p=>{c[p]=d[p];});},{worksheet:s,table:o}=this,{row:l,col:f}=o.tl,u=0;if(o.headerRow){let c=s.getRow(l+u++);o.columns.forEach((d,p)=>{let{style:h,name:m}=d,g=c.getCell(f+p);g.value=m,a(g,h);});}if(o.rows.forEach(c=>{let d=s.getRow(l+u++);c.forEach((p,h)=>{let m=d.getCell(f+h);m.value=p,a(m,o.columns[h].style);});}),o.totalsRow){let c=s.getRow(l+u++);o.columns.forEach((d,p)=>{let h=c.getCell(f+p);if(p===0)h.value=d.totalsRowLabel;else {let m=this.getFormula(d);h.value=m?{formula:d.totalsRowFormula,result:d.totalsRowResult}:null;}a(h,d.style);});}}load(a){let{table:s}=this,{row:o,col:l}=s.tl,f=0;if(s.headerRow){let u=a.getRow(o+f++);s.columns.forEach((c,d)=>{u.getCell(l+d).value=c.name;});}if(s.rows.forEach(u=>{let c=a.getRow(o+f++);u.forEach((d,p)=>{c.getCell(l+p).value=d;});}),s.totalsRow){let u=a.getRow(o+f++);s.columns.forEach((c,d)=>{let p=u.getCell(l+d);d===0?p.value=c.totalsRowLabel:this.getFormula(c)&&(p.value={formula:c.totalsRowFormula,result:c.totalsRowResult});});}}get model(){return this.table}set model(a){this.table=a;}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight});}commit(){if(!this._cache)return;this.validate();let a=n.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let s=0;s<this._cache.tableHeight;s++){let o=this.worksheet.getRow(a.row+s);for(let l=0;l<this._cache.width;l++)o.getCell(a.col+l).value=null;}else {for(let s=this.tableHeight;s<this._cache.tableHeight;s++){let o=this.worksheet.getRow(a.row+s);for(let l=0;l<this._cache.width;l++)o.getCell(a.col+l).value=null;}for(let s=0;s<this.tableHeight;s++){let o=this.worksheet.getRow(a.row+s);for(let l=this.width;l<this._cache.width;l++)o.getCell(a.col+l).value=null;}}this.store();}addRow(a,s){this.cacheState(),s===void 0?this.table.rows.push(a):this.table.rows.splice(s,0,a);}removeRows(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(a,s);}getColumn(a){let s=this.table.columns[a];return new i(this,s,a)}addColumn(a,s,o){this.cacheState(),o===void 0?(this.table.columns.push(a),this.table.rows.forEach((l,f)=>{l.push(s[f]);})):(this.table.columns.splice(o,0,a),this.table.rows.forEach((l,f)=>{l.splice(o,0,s[f]);}));}removeColumns(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(a,s),this.table.rows.forEach(o=>{o.splice(a,s);});}_assign(a,s,o){this.cacheState(),a[s]=o;}get ref(){return this.table.ref}set ref(a){this._assign(this.table,"ref",a);}get name(){return this.table.name}set name(a){this.table.name=a;}get displayName(){return this.table.displyName||this.table.name}set displayNamename(a){this.table.displayName=a;}get headerRow(){return this.table.headerRow}set headerRow(a){this._assign(this.table,"headerRow",a);}get totalsRow(){return this.table.totalsRow}set totalsRow(a){this._assign(this.table,"totalsRow",a);}get theme(){return this.table.style.name}set theme(a){this.table.style.name=a;}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(a){this.table.style.showFirstColumn=a;}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(a){this.table.style.showLastColumn=a;}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(a){this.table.style.showRowStripes=a;}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(a){this.table.style.showColumnStripes=a;}};},{"../utils/col-cache":19}],13:[function(e,t,r){let n=e("./worksheet"),i=e("./defined-names"),a=e("../xlsx/xlsx"),s=e("../csv/csv");t.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new i;}get xlsx(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}get csv(){return this._csv||(this._csv=new s(this)),this._csv}get nextId(){for(let o=1;o<this._worksheets.length;o++)if(!this._worksheets[o])return o;return this._worksheets.length||1}addWorksheet(o,l){let f=this.nextId;l&&(typeof l=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),l={properties:{tabColor:{argb:l}}}):(l.argb||l.theme||l.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),l={properties:{tabColor:l}}));let u=this._worksheets.reduce((p,h)=>(h&&h.orderNo)>p?h.orderNo:p,0),c=Object.assign({},l,{id:f,name:o,orderNo:u+1,workbook:this}),d=new n(c);return this._worksheets[f]=d,d}removeWorksheetEx(o){delete this._worksheets[o.id];}removeWorksheet(o){let l=this.getWorksheet(o);l&&l.destroy();}getWorksheet(o){return o===void 0?this._worksheets.find(Boolean):typeof o=="number"?this._worksheets[o]:typeof o=="string"?this._worksheets.find(l=>l&&l.name===o):void 0}get worksheets(){return this._worksheets.slice(1).sort((o,l)=>o.orderNo-l.orderNo).filter(Boolean)}eachSheet(o){this.worksheets.forEach(l=>{o(l,l.id);});}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0;}addImage(o){let l=this.media.length;return this.media.push(Object.assign({},o,{type:"image"})),l}getImage(o){return this.media[o]}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(o=>o.model),sheets:this.worksheets.map(o=>o.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(o){this.creator=o.creator,this.lastModifiedBy=o.lastModifiedBy,this.lastPrinted=o.lastPrinted,this.created=o.created,this.modified=o.modified,this.company=o.company,this.manager=o.manager,this.title=o.title,this.subject=o.subject,this.keywords=o.keywords,this.category=o.category,this.description=o.description,this.language=o.language,this.revision=o.revision,this.contentStatus=o.contentStatus,this.properties=o.properties,this.calcProperties=o.calcProperties,this._worksheets=[],o.worksheets.forEach(l=>{let{id:f,name:u,state:c}=l,d=o.sheets&&o.sheets.findIndex(p=>p.id===f);(this._worksheets[f]=new n({id:f,name:u,orderNo:d,state:c,workbook:this})).model=l;}),this._definedNames.model=o.definedNames,this.views=o.views,this._themes=o.themes,this.media=o.media||[];}};},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(e,t,r){let n=e("../utils/under-dash"),i=e("../utils/col-cache"),a=e("./range"),s=e("./row"),o=e("./column"),l=e("./enums"),f=e("./image"),u=e("./table"),c=e("./data-validations"),d=e("../utils/encryptor"),{copyStyle:p}=e("../utils/copy-style");t.exports=class{constructor(h){h=h||{},this._workbook=h.workbook,this.id=h.id,this.orderNo=h.orderNo,this.name=h.name,this.state=h.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},h.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:!(!h.pageSetup||!h.pageSetup.fitToWidth&&!h.pageSetup.fitToHeight||h.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:false,draft:false,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:false,showGridLines:false,firstPageNumber:void 0,horizontalCentered:false,verticalCentered:false,rowBreaks:null,colBreaks:null},h.pageSetup),this.headerFooter=Object.assign({},{differentFirst:false,differentOddEven:false,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},h.headerFooter),this.dataValidations=new c,this.views=h.views||[],this.autoFilter=h.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[];}get name(){return this._name}set name(h){if(h===void 0&&(h="sheet"+this.id),this._name!==h){if(typeof h!="string")throw new Error("The name has to be a string.");if(h==="")throw new Error("The name can't be empty.");if(h==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(h))throw new Error(`Worksheet name ${h} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(h))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+h);if(h&&h.length>31&&(console.warn(`Worksheet name ${h} exceeds 31 chars. This will be truncated`),h=h.substring(0,31)),this._workbook._worksheets.find(m=>m&&m.name.toLowerCase()===h.toLowerCase()))throw new Error("Worksheet name already exists: "+h);this._name=h;}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this);}get dimensions(){let h=new a;return this._rows.forEach(m=>{if(m){let g=m.dimensions;g&&h.expand(m.number,g.min,m.number,g.max);}}),h}get columns(){return this._columns}set columns(h){this._headerRowCount=h.reduce((v,w)=>{let C=(w.header?1:w.headers&&w.headers.length)||0;return Math.max(v,C)},0);let m=1,g=this._columns=[];h.forEach(v=>{let w=new o(this,m++,false);g.push(w),w.defn=v;});}getColumnKey(h){return this._keys[h]}setColumnKey(h,m){this._keys[h]=m;}deleteColumnKey(h){delete this._keys[h];}eachColumnKey(h){n.each(this._keys,h);}getColumn(h){if(typeof h=="string"){let m=this._keys[h];if(m)return m;h=i.l2n(h);}if(this._columns||(this._columns=[]),h>this._columns.length){let m=this._columns.length+1;for(;m<=h;)this._columns.push(new o(this,m++));}return this._columns[h-1]}spliceColumns(h,m){let g=this._rows.length;for(var v=arguments.length,w=new Array(v>2?v-2:0),C=2;C<v;C++)w[C-2]=arguments[C];if(w.length>0)for(let D=0;D<g;D++){let j=[h,m];w.forEach(B=>{j.push(B[D]||null);});let F=this.getRow(D+1);F.splice.apply(F,j);}else this._rows.forEach(D=>{D&&D.splice(h,m);});let T=w.length-m,I=h+m,k=this._columns.length;if(T<0)for(let D=h+w.length;D<=k;D++)this.getColumn(D).defn=this.getColumn(D-T).defn;else if(T>0)for(let D=k;D>=I;D--)this.getColumn(D+T).defn=this.getColumn(D).defn;for(let D=h;D<h+w.length;D++)this.getColumn(D).defn=null;this.workbook.definedNames.spliceColumns(this.name,h,m,w.length);}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let h=0;return this.eachRow(m=>{h=Math.max(h,m.cellCount);}),h}get actualColumnCount(){let h=[],m=0;return this.eachRow(g=>{g.eachCell(v=>{let{col:w}=v;h[w]||(h[w]=true,m++);});}),m}_commitRow(){}get _lastRowNumber(){let h=this._rows,m=h.length;for(;m>0&&h[m-1]===void 0;)m--;return m}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(h){return this._rows[h-1]}findRows(h,m){return this._rows.slice(h-1,h-1+m)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let h=0;return this.eachRow(()=>{h++;}),h}getRow(h){let m=this._rows[h-1];return m||(m=this._rows[h-1]=new s(this,h)),m}getRows(h,m){if(m<1)return;let g=[];for(let v=h;v<h+m;v++)g.push(this.getRow(v));return g}addRow(h){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",g=this._nextRow,v=this.getRow(g);return v.values=h,this._setStyleOption(g,m[0]==="i"?m:"n"),v}addRows(h){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n",g=[];return h.forEach(v=>{g.push(this.addRow(v,m));}),g}insertRow(h,m){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(h,0,m),this._setStyleOption(h,g),this.getRow(h)}insertRows(h,m){let g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(h,0,...m),g!=="n")for(let v=0;v<m.length;v++)g[0]==="o"&&this.findRow(m.length+h+v)!==void 0?this._copyStyle(m.length+h+v,h+v,g[1]==="+"):g[0]==="i"&&this.findRow(h-1)!==void 0&&this._copyStyle(h-1,h+v,g[1]==="+");return this.getRows(h,m.length)}_setStyleOption(h){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";m[0]==="o"&&this.findRow(h+1)!==void 0?this._copyStyle(h+1,h,m[1]==="+"):m[0]==="i"&&this.findRow(h-1)!==void 0&&this._copyStyle(h-1,h,m[1]==="+");}_copyStyle(h,m){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this.getRow(h),w=this.getRow(m);w.style=p(v.style),v.eachCell({includeEmpty:g},(C,T)=>{w.getCell(T).style=p(C.style);}),w.height=v.height;}duplicateRow(h,m){let g=arguments.length>2&&arguments[2]!==void 0&&arguments[2],v=this._rows[h-1],w=new Array(m).fill(v.values);this.spliceRows(h+1,g?0:m,...w);for(let C=0;C<m;C++){let T=this._rows[h+C];T.style=v.style,T.height=v.height,v.eachCell({includeEmpty:true},(I,k)=>{T.getCell(k).style=I.style;});}}spliceRows(h,m){let g=h+m;for(var v=arguments.length,w=new Array(v>2?v-2:0),C=2;C<v;C++)w[C-2]=arguments[C];let T=w.length,I=T-m,k=this._rows.length,D,j;if(I<0)for(h===k&&(this._rows[k-1]=void 0),D=g;D<=k;D++)if(j=this._rows[D-1],j){let F=this.getRow(D+I);F.values=j.values,F.style=j.style,F.height=j.height,j.eachCell({includeEmpty:true},(B,E)=>{F.getCell(E).style=B.style;}),this._rows[D-1]=void 0;}else this._rows[D+I-1]=void 0;else if(I>0)for(D=k;D>=g;D--)if(j=this._rows[D-1],j){let F=this.getRow(D+I);F.values=j.values,F.style=j.style,F.height=j.height,j.eachCell({includeEmpty:true},(B,E)=>{if(F.getCell(E).style=B.style,B._value.constructor.name==="MergeValue"){let M=this.getRow(B._row._number+T).getCell(E),L=B._value._master,b=this.getRow(L._row._number+T).getCell(L._column._number);M.merge(b);}});}else this._rows[D+I-1]=void 0;for(D=0;D<T;D++){let F=this.getRow(h+D);F.style={},F.values=w[D];}this.workbook.definedNames.spliceRows(this.name,h,m,T);}eachRow(h,m){if(m||(m=h,h=void 0),h&&h.includeEmpty){let g=this._rows.length;for(let v=1;v<=g;v++)m(this.getRow(v),v);}else this._rows.forEach(g=>{g&&g.hasValues&&m(g,g.number);});}getSheetValues(){let h=[];return this._rows.forEach(m=>{m&&(h[m.number]=m.values);}),h}findCell(h,m){let g=i.getAddress(h,m),v=this._rows[g.row-1];return v?v.findCell(g.col):void 0}getCell(h,m){let g=i.getAddress(h,m);return this.getRow(g.row).getCellEx(g)}mergeCells(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];let v=new a(m);this._mergeCellsInternal(v);}mergeCellsWithoutStyle(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];let v=new a(m);this._mergeCellsInternal(v,true);}_mergeCellsInternal(h,m){n.each(this._merges,v=>{if(v.intersects(h))throw new Error("Cannot merge already merged cells")});let g=this.getCell(h.top,h.left);for(let v=h.top;v<=h.bottom;v++)for(let w=h.left;w<=h.right;w++)(v>h.top||w>h.left)&&this.getCell(v,w).merge(g,m);this._merges[g.address]=h;}_unMergeMaster(h){let m=this._merges[h.address];if(m){for(let g=m.top;g<=m.bottom;g++)for(let v=m.left;v<=m.right;v++)this.getCell(g,v).unmerge();delete this._merges[h.address];}}get hasMerges(){return n.some(this._merges,Boolean)}unMergeCells(){for(var h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];let v=new a(m);for(let w=v.top;w<=v.bottom;w++)for(let C=v.left;C<=v.right;C++){let T=this.findCell(w,C);T&&(T.type===l.ValueType.Merge?this._unMergeMaster(T.master):this._merges[T.address]&&this._unMergeMaster(T));}}fillFormula(h,m,g){let v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared",w=i.decode(h),{top:C,left:T,bottom:I,right:k}=w,D=k-T+1,j=i.encodeAddress(C,T),F=v==="shared",B;B=typeof g=="function"?g:Array.isArray(g)?Array.isArray(g[0])?(M,L)=>g[M-C][L-T]:(M,L)=>g[(M-C)*D+(L-T)]:()=>{};let E=true;for(let M=C;M<=I;M++)for(let L=T;L<=k;L++)E?(this.getCell(M,L).value={shareType:v,formula:m,ref:h,result:B(M,L)},E=false):this.getCell(M,L).value=F?{sharedFormula:j,result:B(M,L)}:B(M,L);}addImage(h,m){let g={type:"image",imageId:h,range:m};this._media.push(new f(this,g));}getImages(){return this._media.filter(h=>h.type==="image")}addBackgroundImage(h){let m={type:"background",imageId:h};this._media.push(new f(this,m));}getBackgroundImageId(){let h=this._media.find(m=>m.type==="background");return h&&h.imageId}protect(h,m){return new Promise(g=>{this.sheetProtection={sheet:true},m&&"spinCount"in m&&(m.spinCount=Number.isFinite(m.spinCount)?Math.round(Math.max(0,m.spinCount)):1e5),h&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=d.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=m&&"spinCount"in m?m.spinCount:1e5,this.sheetProtection.hashValue=d.convertPasswordToHash(h,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),m&&(this.sheetProtection=Object.assign(this.sheetProtection,m),!h&&"spinCount"in m&&delete this.sheetProtection.spinCount),g();})}unprotect(){this.sheetProtection=null;}addTable(h){let m=new u(this,h);return this.tables[h.name]=m,m}getTable(h){return this.tables[h]}removeTable(h){delete this.tables[h];}getTables(){return Object.values(this.tables)}addConditionalFormatting(h){this.conditionalFormattings.push(h);}removeConditionalFormatting(h){typeof h=="number"?this.conditionalFormattings.splice(h,1):this.conditionalFormattings=h instanceof Function?this.conditionalFormattings.filter(h):[];}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(h){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=h;}get model(){let h={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(v=>v.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(v=>v.model),conditionalFormattings:this.conditionalFormattings};h.cols=o.toModel(this.columns);let m=h.rows=[],g=h.dimensions=new a;return this._rows.forEach(v=>{let w=v&&v.model;w&&(g.expand(w.number,w.min,w.number,w.max),m.push(w));}),h.merges=[],n.each(this._merges,v=>{h.merges.push(v.range);}),h}_parseRows(h){this._rows=[],h.rows.forEach(m=>{let g=new s(this,m.number);this._rows[g.number-1]=g,g.model=m;});}_parseMergeCells(h){n.each(h.mergeCells,m=>{this.mergeCellsWithoutStyle(m);});}set model(h){this.name=h.name,this._columns=o.fromModel(this,h.cols),this._parseRows(h),this._parseMergeCells(h),this.dataValidations=new c(h.dataValidations),this.properties=h.properties,this.pageSetup=h.pageSetup,this.headerFooter=h.headerFooter,this.views=h.views,this.autoFilter=h.autoFilter,this._media=h.media.map(m=>new f(this,m)),this.sheetProtection=h.sheetProtection,this.tables=h.tables.reduce((m,g)=>{let v=new u;return v.model=g,m[g.name]=v,m},{}),this.conditionalFormattings=h.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");let n={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach(a=>{n[a]=i[a];}),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){let n=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");r.bufferToString=function(i){return typeof i=="string"?i:n?n.decode(i):i.toString()};},{}],17:[function(e,t,r){let n=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:i}=e("buffer");r.stringToBuffer=function(a){return typeof a!="string"?a:n?i.from(n.encode(a).buffer):i.from(a)};},{buffer:220}],18:[function(e,t,r){let n=e("./under-dash"),i=e("./col-cache");t.exports=class{constructor(a){this.template=a,this.sheets={};}addCell(a){this.addCellEx(i.decodeEx(a));}getCell(a){return this.findCellEx(i.decodeEx(a),true)}findCell(a){return this.findCellEx(i.decodeEx(a),false)}findCellAt(a,s,o){let l=this.sheets[a],f=l&&l[s];return f&&f[o]}addCellEx(a){if(a.top)for(let s=a.top;s<=a.bottom;s++)for(let o=a.left;o<=a.right;o++)this.getCellAt(a.sheetName,s,o);else this.findCellEx(a,true);}getCellEx(a){return this.findCellEx(a,true)}findCellEx(a,s){let o=this.findSheet(a,s),l=this.findSheetRow(o,a,s);return this.findRowCell(l,a,s)}getCellAt(a,s,o){let l=this.sheets[a]||(this.sheets[a]=[]),f=l[s]||(l[s]=[]);return f[o]||(f[o]={sheetName:a,address:i.n2l(o)+s,row:s,col:o})}removeCellEx(a){let s=this.findSheet(a);if(!s)return;let o=this.findSheetRow(s,a);o&&delete o[a.col];}forEachInSheet(a,s){let o=this.sheets[a];o&&o.forEach((l,f)=>{l&&l.forEach((u,c)=>{u&&s(u,f,c);});});}forEach(a){n.each(this.sheets,(s,o)=>{this.forEachInSheet(o,a);});}map(a){let s=[];return this.forEach(o=>{s.push(a(o));}),s}findSheet(a,s){let o=a.sheetName;return this.sheets[o]?this.sheets[o]:s?this.sheets[o]=[]:void 0}findSheetRow(a,s,o){let{row:l}=s;return a&&a[l]?a[l]:o?a[l]=[]:void 0}findRowCell(a,s,o){let{col:l}=s;return a&&a[l]?a[l]:o?a[l]=this.template?Object.assign(s,JSON.parse(JSON.stringify(this.template))):s:void 0}spliceRows(a,s,o,l){let f=this.sheets[a];if(f){let u=[];for(let c=0;c<l;c++)u.push([]);f.splice(s,o,...u);}}spliceColumns(a,s,o,l){let f=this.sheets[a];if(f){let u=[];for(let c=0;c<l;c++)u.push(null);n.each(f,c=>{c.splice(s,o,...u);});}}};},{"./col-cache":19,"./under-dash":26}],19:[function(e,t,r){let 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:a=>a<=26?1:a<=676?2:3,_fill(a){let s,o,l,f,u,c=1;if(a>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&a>=1){for(;c<=26;)s=this._dictionary[c-1],this._n2l[c]=s,this._l2n[s]=c,c++;this._l2nFill=1;}if(this._l2nFill<2&&a>=2){for(c=27;c<=702;)o=c-27,l=o%26,f=Math.floor(o/26),s=this._dictionary[f]+this._dictionary[l],this._n2l[c]=s,this._l2n[s]=c,c++;this._l2nFill=2;}if(this._l2nFill<3&&a>=3){for(c=703;c<=16384;)o=c-703,l=o%26,f=Math.floor(o/26)%26,u=Math.floor(o/676),s=this._dictionary[u]+this._dictionary[f]+this._dictionary[l],this._n2l[c]=s,this._l2n[s]=c,c++;this._l2nFill=3;}},l2n(a){if(this._l2n[a]||this._fill(a.length),!this._l2n[a])throw new Error("Out of bounds. Invalid column letter: "+a);return this._l2n[a]},n2l(a){if(a<1||a>16384)throw new Error(a+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[a]||this._fill(this._level(a)),this._n2l[a]},_hash:{},validateAddress(a){if(!n.test(a))throw new Error("Invalid Address: "+a);return true},decodeAddress(a){let s=a.length<5&&this._hash[a];if(s)return s;let o=false,l="",f=0,u=false,c="",d=0;for(let h,m=0;m<a.length;m++)if(h=a.charCodeAt(m),!u&&h>=65&&h<=90)o=true,l+=a[m],f=26*f+h-64;else if(h>=48&&h<=57)u=true,c+=a[m],d=10*d+h-48;else if(u&&o&&h!==36)break;if(o){if(f>16384)throw new Error("Out of bounds. Invalid column letter: "+l)}else f=void 0;u||(d=void 0);let p={address:a=l+c,col:f,row:d,$col$row:`$${l}$${c}`};return f<=100&&d<=100&&(this._hash[a]=p,this._hash[p.$col$row]=p),p},getAddress(a,s){if(s){let o=this.n2l(s)+a;return this.decodeAddress(o)}return this.decodeAddress(a)},decode(a){let s=a.split(":");if(s.length===2){let o=this.decodeAddress(s[0]),l=this.decodeAddress(s[1]),f={top:Math.min(o.row,l.row),left:Math.min(o.col,l.col),bottom:Math.max(o.row,l.row),right:Math.max(o.col,l.col)};return f.tl=this.n2l(f.left)+f.top,f.br=this.n2l(f.right)+f.bottom,f.dimensions=`${f.tl}:${f.br}`,f}return this.decodeAddress(a)},decodeEx(a){let s=a.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),o=s[1]||s[2],l=s[3],f=l.split(":");if(f.length>1){let c=this.decodeAddress(f[0]),d=this.decodeAddress(f[1]),p=Math.min(c.row,d.row),h=Math.min(c.col,d.col),m=Math.max(c.row,d.row),g=Math.max(c.col,d.col);return c=this.n2l(h)+p,d=this.n2l(g)+m,{top:p,left:h,bottom:m,right:g,sheetName:o,tl:{address:c,col:h,row:p,$col$row:`$${this.n2l(h)}$${p}`,sheetName:o},br:{address:d,col:g,row:m,$col$row:`$${this.n2l(g)}$${m}`,sheetName:o},dimensions:`${c}:${d}`}}if(l.startsWith("#"))return o?{sheetName:o,error:l}:{error:l};let u=this.decodeAddress(l);return o?{sheetName:o,...u}:u},encodeAddress:(a,s)=>i.n2l(s)+a,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(a,s){let[o,l,,f,u]=a,[c,d]=s;return c>=o&&c<=f&&d>=l&&d<=u}};t.exports=i;},{}],20:[function(e,t,r){let n=(a,s)=>({...a,...s.reduce((o,l)=>(a[l]&&(o[l]={...a[l]}),o),{})}),i=function(a,s,o){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];a[o]&&(s[o]=n(a[o],l));};r.copyStyle=a=>{if(!a)return a;if(s=a,Object.keys(s).length===0)return {};var s;let o={...a};return i(a,o,"font",["color"]),i(a,o,"alignment"),i(a,o,"protection"),a.border&&(i(a,o,"border"),i(a.border,o.border,"top",["color"]),i(a.border,o.border,"left",["color"]),i(a.border,o.border,"bottom",["color"]),i(a.border,o.border,"right",["color"]),i(a.border,o.border,"diagonal",["color"])),a.fill&&(i(a,o,"fill",["fgColor","bgColor","center"]),a.fill.stops&&(o.fill.stops=a.fill.stops.map(l=>n(l,["color"])))),o};},{}],21:[function(e,t,r){(function(n){(function(){let i=e("crypto"),a={hash(s){let o=i.createHash(s);for(var l=arguments.length,f=new Array(l>1?l-1:0),u=1;u<l;u++)f[u-1]=arguments[u];return o.update(n.concat(f)),o.digest()},convertPasswordToHash(s,o,l,f){if(o=o.toLowerCase(),i.getHashes().indexOf(o)<0)throw new Error(`Hash algorithm '${o}' not supported!`);let u=n.from(s,"utf16le"),c=this.hash(o,n.from(l,"base64"),u);for(let d=0;d<f;d++){let p=n.alloc(4);p.writeUInt32LE(d,0),c=this.hash(o,c,p);}return c.toString("base64")},randomBytes:s=>i.randomBytes(s)};t.exports=a;}).call(this);}).call(this,e("buffer").Buffer);},{buffer:220,crypto:390}],22:[function(e,t,r){let{SaxesParser:n}=e("saxes"),{PassThrough:i}=e("readable-stream"),{bufferToString:a}=e("./browser-buffer-decode");t.exports=async function*(s){s.pipe&&!s[Symbol.asyncIterator]&&(s=s.pipe(new i));let o=new n,l;o.on("error",u=>{l=u;});let f=[];o.on("opentag",u=>f.push({eventType:"opentag",value:u})),o.on("text",u=>f.push({eventType:"text",value:u})),o.on("closetag",u=>f.push({eventType:"closetag",value:u}));for await(let u of s){if(o.write(a(u)),l)throw l;yield f,f=[];}};},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(e,t,r){let n=e("./col-cache"),i=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,a=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(s,o,l){let f=n.decode(o),u=n.decode(l);return s.replace(i,(c,d,p,h,m)=>{if(m)return c;let g=a.exec(h);if(g){let v=g[1],w=g[2].toUpperCase(),C=g[3],T=g[4];if(w.length>3||w.length===3&&w>"XFD")return c;let I=n.l2n(w),k=parseInt(T,10);return v||(I+=u.col-f.col),C||(k+=u.row-f.row),(d||"")+(v||"")+n.n2l(I)+(C||"")+k}return c})}};},{"./col-cache":19}],24:[function(e,t,r){(function(n,i){(function(){let a=e("readable-stream"),s=e("./utils"),o=e("./string-buf");class l{constructor(h,m){this._data=h,this._encoding=m;}get length(){return this.toBuffer().length}copy(h,m,g,v){return this.toBuffer().copy(h,m,g,v)}toBuffer(){return this._buffer||(this._buffer=i.from(this._data,this._encoding)),this._buffer}}class f{constructor(h){this._data=h;}get length(){return this._data.length}copy(h,m,g,v){return this._data._buf.copy(h,m,g,v)}toBuffer(){return this._data.toBuffer()}}class u{constructor(h){this._data=h;}get length(){return this._data.length}copy(h,m,g,v){this._data.copy(h,m,g,v);}toBuffer(){return this._data}}class c{constructor(h){this.size=h,this.buffer=i.alloc(h),this.iRead=0,this.iWrite=0;}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;let h=i.alloc(this.iWrite-this.iRead);return this.buffer.copy(h,0,this.iRead,this.iWrite),h}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(h){let m;return h===0?null:h===void 0||h>=this.length?(m=this.toBuffer(),this.iRead=this.iWrite,m):(m=i.alloc(h),this.buffer.copy(m,0,this.iRead,h),this.iRead+=h,m)}write(h,m,g){let v=Math.min(g,this.size-this.iWrite);return h.copy(this.buffer,this.iWrite,m,m+v),this.iWrite+=v,v}}let d=function(p){p=p||{},this.bufSize=p.bufSize||1048576,this.buffers=[],this.batch=p.batch||false,this.corked=false,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=false,this.encoding=null;};s.inherits(d,a.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return i.concat(this.buffers.map(p=>p.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){let h=this.buffers[this.buffers.length-1];if(!h.full)return h}let p=new c(this.bufSize);return this.buffers.push(p),p},async _pipe(p){await Promise.all(this.pipes.map((function(h){return new Promise(m=>{h.write(p.toBuffer(),()=>{m();});})})));},_writeToBuffers(p){let h=0,m=p.length;for(;h<m;)h+=this._getWritableBuffer().write(p,h,m-h);},async write(p,h,m){let g;if(h instanceof Function&&(m=h,h="utf8"),m=m||s.nop,p instanceof o)g=new f(p);else if(p instanceof i)g=new u(p);else {if(!(typeof p=="string"||p instanceof String||p instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");g=new l(p,h);}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(g);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(g),n.nextTick(m)):(await this._pipe(g),m());else this.paused||this.emit("data",g.toBuffer()),this._writeToBuffers(g),this.emit("readable");return true},cork(){this.corked=true;},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift());},uncork(){this.corked=false,this._flush();},end(p,h,m){let g=v=>{v?m(v):(this._flush(),this.pipes.forEach(w=>{w.end();}),this.emit("finish"));};p?this.write(p,h,g):g();},read(p){let h;if(p){for(h=[];p&&this.buffers.length&&!this.buffers[0].eod;){let m=this.buffers[0],g=m.read(p);p-=g.length,h.push(g),m.eod&&m.full&&this.buffers.shift();}return i.concat(h)}return h=this.buffers.map(m=>m.toBuffer()).filter(Boolean),this.buffers=[],i.concat(h)},setEncoding(p){this.encoding=p;},pause(){this.paused=true;},resume(){this.paused=false;},isPaused(){return !!this.paused},pipe(p){this.pipes.push(p),!this.paused&&this.buffers.length&&this.end();},unpipe(p){this.pipes=this.pipes.filter(h=>h!==p);},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),t.exports=d;}).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(n){(function(){t.exports=class{constructor(i){this._buf=n.alloc(i&&i.size||16384),this._encoding=i&&i.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=n.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(i){i=i||0,this._buffer=void 0,this._inPos=i;}_grow(i){let a=2*this._buf.length;for(;a<i;)a*=2;let s=n.alloc(a);this._buf.copy(s,0),this._buf=s;}addText(i){this._buffer=void 0;let a=this._inPos+this._buf.write(i,this._inPos,this._encoding);for(;a>=this._buf.length-4;)this._grow(this._inPos+i.length),a=this._inPos+this._buf.write(i,this._inPos,this._encoding);this._inPos=a;}addStringBuf(i){i.length&&(this._buffer=void 0,this.length+i.length>this.capacity&&this._grow(this.length+i.length),i._buf.copy(this._buf,this._inPos,0,i.length),this._inPos+=i.length);}};}).call(this);}).call(this,e("buffer").Buffer);},{buffer:220}],26:[function(e,t,r){let{toString:n}=Object.prototype,i=/["&<>]/,a={each:function(s,o){s&&(Array.isArray(s)?s.forEach(o):Object.keys(s).forEach(l=>{o(s[l],l);}));},some:function(s,o){return !!s&&(Array.isArray(s)?s.some(o):Object.keys(s).some(l=>o(s[l],l)))},every:function(s,o){return !s||(Array.isArray(s)?s.every(o):Object.keys(s).every(l=>o(s[l],l)))},map:function(s,o){return s?Array.isArray(s)?s.map(o):Object.keys(s).map(l=>o(s[l],l)):[]},keyBy:(s,o)=>s.reduce((l,f)=>(l[f[o]]=f,l),{}),isEqual:function(s,o){let l=typeof s,f=typeof o,u=Array.isArray(s),c=Array.isArray(o),d;if(l!==f)return false;switch(typeof s){case "object":if(u||c)return !(!u||!c)&&s.length===o.length&&s.every((p,h)=>{let m=o[h];return a.isEqual(p,m)});if(s===null||o===null)return s===o;if(d=Object.keys(s),Object.keys(o).length!==d.length)return false;for(let p of d)if(!o.hasOwnProperty(p))return false;return a.every(s,(p,h)=>{let m=o[h];return a.isEqual(p,m)});default:return s===o}},escapeHtml(s){let o=i.exec(s);if(!o)return s;let l="",f="",u=0,c=o.index;for(;c<s.length;c++){switch(s.charAt(c)){case '"':f=""";break;case "&":f="&";break;case "'":f="'";break;case "<":f="<";break;case ">":f=">";break;default:continue}u!==c&&(l+=s.substring(u,c)),u=c+1,l+=f;}return u!==c?l+s.substring(u,c):l},strcmp:(s,o)=>s<o?-1:s>o?1:0,isUndefined:s=>n.call(s)==="[object Undefined]",isObject:s=>n.call(s)==="[object Object]",deepMerge(){let s=arguments[0]||{},{length:o}=arguments,l,f,u;function c(d,p){l=s[p],u=Array.isArray(d),a.isObject(d)||u?(u?(u=false,f=l&&Array.isArray(l)?l:[]):f=l&&a.isObject(l)?l:{},s[p]=a.deepMerge(f,d)):a.isUndefined(d)||(s[p]=d);}for(let d=0;d<o;d++)a.each(arguments[d],c);return s}};t.exports=a;},{}],27:[function(e,t,r){(function(n,i){(function(){let a=e("fs"),s=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,o={nop(){},promiseImmediate:l=>new Promise(f=>{n.setImmediate?i(()=>{f(l);}):setTimeout(()=>{f(l);},1);}),inherits:function(l,f,u,c){l.super_=f,c||(c=u,u=null),u&&Object.keys(u).forEach(p=>{Object.defineProperty(l,p,Object.getOwnPropertyDescriptor(u,p));});let d={constructor:{value:l,enumerable:false,writable:false,configurable:true}};c&&Object.keys(c).forEach(p=>{d[p]=Object.getOwnPropertyDescriptor(c,p);}),l.prototype=Object.create(f.prototype,d);},dateToExcel:(l,f)=>25569+l.getTime()/864e5-(f?1462:0),excelToDate(l,f){let u=Math.round(24*(l-25569+(f?1462:0))*3600*1e3);return new Date(u)},parsePath(l){let f=l.lastIndexOf("/");return {path:l.substring(0,f),name:l.substring(f+1)}},getRelsPath(l){let f=o.parsePath(l);return `${f.path}/_rels/${f.name}.rels`},xmlEncode(l){let f=s.exec(l);if(!f)return l;let u="",c="",d=0,p=f.index;for(;p<l.length;p++){let h=l.charCodeAt(p);switch(h){case 34:c=""";break;case 38:c="&";break;case 39:c="'";break;case 60:c="<";break;case 62:c=">";break;case 127:c="";break;default:if(h<=31&&(h<=8||h>=11&&h!==13)){c="";break}continue}d!==p&&(u+=l.substring(d,p)),d=p+1,c&&(u+=c);}return d!==p?u+l.substring(d,p):u},xmlDecode:l=>l.replace(/&([a-z]*);/g,f=>{switch(f){case "<":return "<";case ">":return ">";case "&":return "&";case "'":return "'";case """:return '"';default:return f}}),validInt(l){let f=parseInt(l,10);return Number.isNaN(f)?0:f},isDateFmt(l){return l?(l=(l=l.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:false},fs:{exists:l=>new Promise(f=>{a.access(l,a.constants.F_OK,u=>{f(!u);});})},toIsoDateString:l=>l.toIsoString().subsstr(0,10),parseBoolean:l=>l===true||l==="true"||l===1||l==="1"};t.exports=o;}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},e("timers").setImmediate);},{fs:216,timers:523}],28:[function(e,t,r){let n=e("./under-dash"),i=e("./utils");function a(l,f,u){l.push(` ${f}="${i.xmlEncode(u.toString())}"`);}function s(l,f){if(f){let u=[];n.each(f,(c,d)=>{c!==void 0&&a(u,d,c);}),l.push(u.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(f){let u=this._xml;u.push("<?xml"),s(u,f),u.push(`?>
|
|
10
|
+
`);}openNode(f,u){let c=this.tos,d=this._xml;c&&this.open&&d.push(">"),this._stack.push(f),d.push("<"),d.push(f),s(d,u),this.leaf=true,this.open=true;}addAttribute(f,u){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");u!==void 0&&a(this._xml,f,u);}addAttributes(f){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");s(this._xml,f);}writeText(f){let u=this._xml;this.open&&(u.push(">"),this.open=false),this.leaf=false,u.push(i.xmlEncode(f.toString()));}writeXml(f){this.open&&(this._xml.push(">"),this.open=false),this.leaf=false,this._xml.push(f);}closeNode(){let f=this._stack.pop(),u=this._xml;this.leaf?u.push("/>"):(u.push("</"),u.push(f),u.push(">")),this.open=false,this.leaf=false;}leafNode(f,u,c){this.openNode(f,u),c!==void 0&&this.writeText(c),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(){let f=this._rollbacks.pop();this._xml.length>f.xml&&this._xml.splice(f.xml,this._xml.length-f.xml),this._stack.length>f.stack&&this._stack.splice(f.stack,this._stack.length-f.stack),this.leaf=f.leaf,this.open=f.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(n){(function(){let i=e("events"),a=e("jszip"),s=e("./stream-buf"),{stringToBuffer:o}=e("./browser-buffer-encode");class l extends i.EventEmitter{constructor(u){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},u),this.zip=new a,this.stream=new s;}append(u,c){c.hasOwnProperty("base64")&&c.base64?this.zip.file(c.name,u,{base64:true}):(n.browser&&typeof u=="string"&&(u=o(u)),this.zip.file(c.name,u));}async finalize(){let u=await this.zip.generateAsync(this.options);this.stream.end(u),this.emit("finish");}read(u){return this.stream.read(u)}setEncoding(u){return this.stream.setEncoding(u)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(u,c){return this.stream.pipe(u,c)}unpipe(u){return this.stream.unpipe(u)}unshift(u){return this.stream.unshift(u)}wrap(u){return this.stream.wrap(u)}}t.exports={ZipWriter:l};}).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"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},28:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"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"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ja-jp":'yyyy"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"'},32:{"zh-tw":'hh"\u6642"mm"\u5206"',"zh-cn":'h"\u65F6"mm"\u5206"',"ja-jp":'h"\u6642"mm"\u5206"',"ko-kr":'h"\uC2DC" mm"\uBD84"'},33:{"zh-tw":'hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'h"\u6642"mm"\u5206"ss"\u79D2"',"ko-kr":'h"\uC2DC" mm"\uBD84" ss"\uCD08"'},34:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},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"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},51:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},52:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"ko-kr":"mm-dd"},55:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"',"ja-jp":'yyyy"\u5E74"m"\u6708"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"',"zh-cn":'\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"',"ja-jp":'m"\u6708"d"\u65E5"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"\u5E74"m"\u6708"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"\u5E74" mm"\u6708" dd"\u65E5"'},58:{"zh-tw":'[$-404]e"\u5E74"m"\u6708"d"\u65E5"',"zh-cn":'m"\u6708"d"\u65E5"',"ja-jp":'[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"',"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){let n=e("../../utils/parse-sax"),i=e("../../utils/xml-stream");class a{prepare(){}render(){}parseOpen(o){}parseText(o){}parseClose(o){}reconcile(o,l){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(o=>{o instanceof a?o.reset():o.xform&&o.xform.reset();});}mergeModel(o){this.model=Object.assign(this.model||{},o);}async parse(o){for await(let l of o)for(let{eventType:f,value:u}of l)if(f==="opentag")this.parseOpen(u);else if(f==="text")this.parseText(u);else if(f==="closetag"&&!this.parseClose(u.name))return this.model;return this.model}async parseStream(o){return this.parse(n(o))}get xml(){return this.toXml(this.model)}toXml(o){let l=new i;return this.render(l,o),l.xml}static toAttribute(o,l){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(o===void 0){if(f)return l}else if(f||o!==l)return o.toString()}static toStringAttribute(o,l){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(o,l,f)}static toStringValue(o,l){return o===void 0?l:o}static toBoolAttribute(o,l){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(o===void 0){if(f)return l}else if(f||o!==l)return o?"1":"0"}static toBoolValue(o,l){return o===void 0?l:o==="1"}static toIntAttribute(o,l){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(o,l,f)}static toIntValue(o,l){return o===void 0?l:parseInt(o,10)}static toFloatAttribute(o,l){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(o,l,f)}static toFloatValue(o,l){return o===void 0?l:parseFloat(o)}}t.exports=a;},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(e,t,r){let n=e("../base-xform"),i=e("../../../utils/col-cache");function a(o){try{return i.decodeEx(o),!0}catch{return false}}function s(o){let l=[],f=false,u="";return o.split(",").forEach(c=>{if(!c)return;let d=(c.match(/'/g)||[]).length;if(!d)return void(f?u+=c+",":a(c)&&l.push(c));let p=d%2==0;!f&&p&&a(c)?l.push(c):f&&!p?(f=false,a(u+c)&&l.push(u+c),u=""):(f=true,u+=c+",");}),l}t.exports=class extends n{render(o,l){o.openNode("definedName",{name:l.name,localSheetId:l.localSheetId}),o.writeText(l.ranges.join(",")),o.closeNode();}parseOpen(o){return o.name==="definedName"?(this._parsedName=o.attributes.name,this._parsedLocalSheetId=o.attributes.localSheetId,this._parsedText=[],true):false}parseText(o){this._parsedText.push(o);}parseClose(){return this.model={name:this._parsedName,ranges:s(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),false}};},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(e,t,r){let n=e("../../../utils/utils"),i=e("../base-xform");t.exports=class extends i{render(a,s){a.leafNode("sheet",{sheetId:s.id,name:s.name,state:s.state,"r:id":s.rId});}parseOpen(a){return a.name==="sheet"&&(this.model={name:n.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},true)}parseText(){}parseClose(){return false}};},{"../../../utils/utils":27,"../base-xform":32}],35:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{render(i,a){i.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0});}parseOpen(i){return i.name==="calcPr"&&(this.model={},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],36:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{render(i,a){i.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1});}parseOpen(i){return i.name==="workbookPr"&&(this.model={date1904:i.attributes.date1904==="1"},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],37:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{render(i,a){let s={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(s.visibility=a.visibility),i.leafNode("workbookView",s);}parseOpen(i){if(i.name==="workbookView"){let a=this.model={},s=function(l,f,u){let c=f!==void 0?a[l]=f:u;c!==void 0&&(a[l]=c);},o=function(l,f,u){let c=f!==void 0?a[l]=parseInt(f,10):u;c!==void 0&&(a[l]=c);};return o("x",i.attributes.xWindow,0),o("y",i.attributes.yWindow,0),o("width",i.attributes.windowWidth,25e3),o("height",i.attributes.windowHeight,1e4),s("visibility",i.attributes.visibility,"visible"),o("activeTab",i.attributes.activeTab,void 0),o("firstSheet",i.attributes.firstSheet,void 0),true}return false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],38:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),a=e("../../../utils/xml-stream"),s=e("../base-xform"),o=e("../static-xform"),l=e("../list-xform"),f=e("./defined-name-xform"),u=e("./sheet-xform"),c=e("./workbook-view-xform"),d=e("./workbook-properties-xform"),p=e("./workbook-calc-properties-xform");class h extends s{constructor(){super(),this.map={fileVersion:h.STATIC_XFORMS.fileVersion,workbookPr:new d,bookViews:new l({tag:"bookViews",count:false,childXform:new c}),sheets:new l({tag:"sheets",count:false,childXform:new u}),definedNames:new l({tag:"definedNames",count:false,childXform:new f}),calcPr:new p};}prepare(g){g.sheets=g.worksheets;let v=[],w=0;g.sheets.forEach(C=>{if(C.pageSetup&&C.pageSetup.printArea&&C.pageSetup.printArea.split("&&").forEach(T=>{let I=T.split(":"),k={name:"_xlnm.Print_Area",ranges:[`'${C.name}'!$${I[0]}:$${I[1]}`],localSheetId:w};v.push(k);}),C.pageSetup&&(C.pageSetup.printTitlesRow||C.pageSetup.printTitlesColumn)){let T=[];if(C.pageSetup.printTitlesColumn){let k=C.pageSetup.printTitlesColumn.split(":");T.push(`'${C.name}'!$${k[0]}:$${k[1]}`);}if(C.pageSetup.printTitlesRow){let k=C.pageSetup.printTitlesRow.split(":");T.push(`'${C.name}'!$${k[0]}:$${k[1]}`);}let I={name:"_xlnm.Print_Titles",ranges:T,localSheetId:w};v.push(I);}w++;}),v.length&&(g.definedNames=g.definedNames.concat(v)),(g.media||[]).forEach((C,T)=>{C.name=C.type+(T+1);});}render(g,v){g.openXml(a.StdDocAttributes),g.openNode("workbook",h.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(g),this.map.workbookPr.render(g,v.properties),this.map.bookViews.render(g,v.views),this.map.sheets.render(g,v.sheets),this.map.definedNames.render(g,v.definedNames),this.map.calcPr.render(g,v.calcProperties),g.closeNode();}parseOpen(g){return this.parser?(this.parser.parseOpen(g),true):(g.name==="workbook"||(this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g)),true)}parseText(g){this.parser&&this.parser.parseText(g);}parseClose(g){return this.parser?(this.parser.parseClose(g)||(this.parser=void 0),true):g==="workbook"?(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),false):true}reconcile(g){let v=(g.workbookRels||[]).reduce((k,D)=>(k[D.Id]=D,k),{}),w=[],C,T=0;(g.sheets||[]).forEach(k=>{let D=v[k.rId];D&&(C=g.worksheetHash["xl/"+D.Target.replace(/^(\s|\/xl\/)+/,"")],C&&(C.name=k.name,C.id=k.id,C.state=k.state,w[T++]=C));});let I=[];n.each(g.definedNames,k=>{if(k.name==="_xlnm.Print_Area"){if(C=w[k.localSheetId],C){C.pageSetup||(C.pageSetup={});let D=i.decodeEx(k.ranges[0]);C.pageSetup.printArea=C.pageSetup.printArea?`${C.pageSetup.printArea}&&${D.dimensions}`:D.dimensions;}}else if(k.name==="_xlnm.Print_Titles"){if(C=w[k.localSheetId],C){C.pageSetup||(C.pageSetup={});let D=k.ranges.join(","),j=/\$/g,F=/\$\d+:\$\d+/,B=D.match(F);if(B&&B.length){let L=B[0];C.pageSetup.printTitlesRow=L.replace(j,"");}let E=/\$[A-Z]+:\$[A-Z]+/,M=D.match(E);if(M&&M.length){let L=M[0];C.pageSetup.printTitlesColumn=L.replace(j,"");}}}else I.push(k);}),g.definedNames=I,g.media.forEach((k,D)=>{k.index=D;});}}h.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"},h.STATIC_XFORMS={fileVersion:new o({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},t.exports=h;},{"../../../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){let n=e("../strings/rich-text-xform"),i=e("../../../utils/utils"),a=e("../base-xform"),s=t.exports=function(o){this.model=o;};i.inherits(s,a,{get tag(){return "r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new n),this._richTextXform},render(o,l){l=l||this.model,o.openNode("comment",{ref:l.ref,authorId:0}),o.openNode("text"),l&&l.note&&l.note.texts&&l.note.texts.forEach(f=>{this.richTextXform.render(o,f);}),o.closeNode(),o.closeNode();},parseOpen(o){if(this.parser)return this.parser.parseOpen(o),true;switch(o.name){case "comment":return this.model={type:"note",note:{texts:[]},...o.attributes},true;case "r":return this.parser=this.richTextXform,this.parser.parseOpen(o),true;default:return false}},parseText(o){this.parser&&this.parser.parseText(o);},parseClose(o){switch(o){case "comment":return false;case "r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,true;default:return this.parser&&this.parser.parseClose(o),true}}});},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../../../utils/utils"),a=e("../base-xform"),s=e("./comment-xform"),o=t.exports=function(){this.map={comment:new s};};i.inherits(o,a,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(l,f){f=f||this.model,l.openXml(n.StdDocAttributes),l.openNode("comments",o.COMMENTS_ATTRIBUTES),l.openNode("authors"),l.leafNode("author",null,"Author"),l.closeNode(),l.openNode("commentList"),f.comments.forEach(u=>{this.map.comment.render(l,u);}),l.closeNode(),l.closeNode();},parseOpen(l){if(this.parser)return this.parser.parseOpen(l),true;switch(l.name){case "commentList":return this.model={comments:[]},true;case "comment":return this.parser=this.map.comment,this.parser.parseOpen(l),true;default:return false}},parseText(l){this.parser&&this.parser.parseText(l);},parseClose(l){switch(l){case "commentList":return false;case "comment":return this.model.comments.push(this.parser.model),this.parser=void 0,true;default:return this.parser&&this.parser.parseClose(l),true}}});},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{constructor(i){super(),this._model=i;}get tag(){return this._model&&this._model.tag}render(i,a,s){(a===s[2]||this.tag==="x:SizeWithCells"&&a===s[1])&&i.leafNode(this.tag);}parseOpen(i){return i.name===this.tag?(this.model={},this.model[this.tag]=true,true):false}parseText(){}parseClose(){return false}};},{"../../base-xform":32}],42:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{constructor(i){super(),this._model=i;}get tag(){return this._model&&this._model.tag}render(i,a){i.leafNode(this.tag,null,a);}parseOpen(i){return i.name===this.tag?(this.text="",true):false}parseText(i){this.text=i;}parseClose(){return false}};},{"../../base-xform":32}],43:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "x:Anchor"}getAnchorRect(i){let a=Math.floor(i.left),s=Math.floor(68*(i.left-a)),o=Math.floor(i.top),l=Math.floor(18*(i.top-o)),f=Math.floor(i.right),u=Math.floor(68*(i.right-f)),c=Math.floor(i.bottom);return [a,s,o,l,f,u,c,Math.floor(18*(i.bottom-c))]}getDefaultRect(i){let a=i.col,s=Math.max(i.row-2,0);return [a,6,s,14,a+2,2,s+4,16]}render(i,a){let s=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);i.leafNode("x:Anchor",null,s.join(", "));}parseOpen(i){return i.name===this.tag?(this.text="",true):false}parseText(i){this.text=i;}parseClose(){return false}};},{"../base-xform":32}],44:[function(e,t,r){let n=e("../base-xform"),i=e("./vml-anchor-xform"),a=e("./style/vml-protection-xform"),s=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 a({tag:"x:Locked"}),"x:LockText":new a({tag:"x:LockText"}),"x:SizeWithCells":new s({tag:"x:SizeWithCells"}),"x:MoveWithCells":new s({tag:"x:MoveWithCells"})};}get tag(){return "x:ClientData"}render(l,f){let{protection:u,editAs:c}=f.note;l.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(l,c,o),this.map["x:SizeWithCells"].render(l,c,o),this.map["x:Anchor"].render(l,f),this.map["x:Locked"].render(l,u.locked),l.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(l,u.lockText),l.leafNode("x:Row",null,f.refAddress.row-1),l.leafNode("x:Column",null,f.refAddress.col-1),l.closeNode();}parseOpen(l){return l.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),true}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),true):l===this.tag?(this.normalizeModel(),false):true}normalizeModel(){let l=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),f=Object.keys(l).length;this.model.editAs=o[f],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){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("./vml-shape-xform");class s extends i{constructor(){super(),this.map={"v:shape":new a};}get tag(){return "xml"}render(l,f){l.openXml(n.StdDocAttributes),l.openNode(this.tag,s.DRAWING_ATTRIBUTES),l.openNode("o:shapelayout",{"v:ext":"edit"}),l.leafNode("o:idmap",{"v:ext":"edit",data:1}),l.closeNode(),l.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),l.leafNode("v:stroke",{joinstyle:"miter"}),l.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),l.closeNode(),f.comments.forEach((u,c)=>{this.map["v:shape"].render(l,u,c);}),l.closeNode();}parseOpen(l){return this.parser?(this.parser.parseOpen(l),true):(l.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),true)}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.model.comments.push(this.parser.model),this.parser=void 0),true):l!==this.tag}reconcile(l,f){l.anchors.forEach(u=>{u.br?this.map["xdr:twoCellAnchor"].reconcile(u,f):this.map["xdr:oneCellAnchor"].reconcile(u,f);});}}s.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=s;},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(e,t,r){let n=e("../base-xform"),i=e("./vml-textbox-xform"),a=e("./vml-client-data-xform");class s extends n{constructor(){super(),this.map={"v:textbox":new i,"x:ClientData":new a};}get tag(){return "v:shape"}render(l,f,u){l.openNode("v:shape",s.V_SHAPE_ATTRIBUTES(f,u)),l.leafNode("v:fill",{color2:"infoBackground [80]"}),l.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),l.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(l,f),this.map["x:ClientData"].render(l,f),l.closeNode();}parseOpen(l){return this.parser?(this.parser.parseOpen(l),true):(l.name===this.tag?(this.reset(),this.model={margins:{insetmode:l.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),true)}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),true):l===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,false):true}}s.V_SHAPE_ATTRIBUTES=(o,l)=>({id:"_x0000_s"+(1025+l),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":o.note.margins&&o.note.margins.insetmode}),t.exports=s;},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "v:textbox"}conversionUnit(i,a,s){return `${parseFloat(i)*a.toFixed(2)}${s}`}reverseConversionUnit(i){return (i||"").split(",").map(a=>Number(parseFloat(this.conversionUnit(parseFloat(a),.1,"")).toFixed(2)))}render(i,a){let s={style:"mso-direction-alt:auto"};if(a&&a.note){let{inset:o}=a.note&&a.note.margins;Array.isArray(o)&&(o=o.map(l=>this.conversionUnit(l,10,"mm")).join(",")),o&&(s.inset=o);}i.openNode("v:textbox",s),i.leafNode("div",{style:"text-align:left"}),i.closeNode();}parseOpen(i){return i.name===this.tag&&(this.model={inset:this.reverseConversionUnit(i.attributes.inset)}),true}parseText(){}parseClose(i){return i!==this.tag}};},{"../base-xform":32}],48:[function(e,t,r){let n=e("./base-xform");t.exports=class extends n{createNewModel(i){return {}}parseOpen(i){return this.parser=this.parser||this.map[i.name],this.parser?(this.parser.parseOpen(i),true):i.name===this.tag&&(this.model=this.createNewModel(i),true)}parseText(i){this.parser&&this.parser.parseText(i);}onParserClose(i,a){this.model[i]=a.model;}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.onParserClose(i,this.parser),this.parser=void 0),true):i!==this.tag}};},{"./base-xform":32}],49:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{render(i,a){i.openNode("HeadingPairs"),i.openNode("vt:vector",{size:2,baseType:"variant"}),i.openNode("vt:variant"),i.leafNode("vt:lpstr",void 0,"Worksheets"),i.closeNode(),i.openNode("vt:variant"),i.leafNode("vt:i4",void 0,a.length),i.closeNode(),i.closeNode(),i.closeNode();}parseOpen(i){return i.name==="HeadingPairs"}parseText(){}parseClose(i){return i!=="HeadingPairs"}};},{"../base-xform":32}],50:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{render(i,a){i.openNode("TitlesOfParts"),i.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(s=>{i.leafNode("vt:lpstr",void 0,s.name);}),i.closeNode(),i.closeNode();}parseOpen(i){return i.name==="TitlesOfParts"}parseText(){}parseClose(i){return i!=="TitlesOfParts"}};},{"../base-xform":32}],51:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("../simple/string-xform"),s=e("./app-heading-pairs-xform"),o=e("./app-titles-of-parts-xform");class l extends i{constructor(){super(),this.map={Company:new a({tag:"Company"}),Manager:new a({tag:"Manager"}),HeadingPairs:new s,TitleOfParts:new o};}render(u,c){u.openXml(n.StdDocAttributes),u.openNode("Properties",l.PROPERTY_ATTRIBUTES),u.leafNode("Application",void 0,"Microsoft Excel"),u.leafNode("DocSecurity",void 0,"0"),u.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(u,c.worksheets),this.map.TitleOfParts.render(u,c.worksheets),this.map.Company.render(u,c.company||""),this.map.Manager.render(u,c.manager),u.leafNode("LinksUpToDate",void 0,"false"),u.leafNode("SharedDoc",void 0,"false"),u.leafNode("HyperlinksChanged",void 0,"false"),u.leafNode("AppVersion",void 0,"16.0300"),u.closeNode();}parseOpen(u){return this.parser?(this.parser.parseOpen(u),true):u.name==="Properties"?true:(this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),true))}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),true):u==="Properties"?(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},false):true}}l.DateFormat=function(f){return f.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){let n=e("../../../utils/xml-stream"),i=e("../base-xform");class a extends i{render(o,l){o.openXml(n.StdDocAttributes),o.openNode("Types",a.PROPERTY_ATTRIBUTES);let f={};(l.media||[]).forEach(u=>{if(u.type==="image"){let c=u.extension;f[c]||(f[c]=true,o.leafNode("Default",{Extension:c,ContentType:"image/"+c}));}}),o.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),o.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),o.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),l.worksheets.forEach(u=>{let c=`/xl/worksheets/sheet${u.id}.xml`;o.leafNode("Override",{PartName:c,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"});}),o.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),o.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),l.sharedStrings&&l.sharedStrings.count&&o.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),l.tables&&l.tables.forEach(u=>{o.leafNode("Override",{PartName:"/xl/tables/"+u.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"});}),l.drawings&&l.drawings.forEach(u=>{o.leafNode("Override",{PartName:`/xl/drawings/${u.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"});}),l.commentRefs&&(o.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),l.commentRefs.forEach(u=>{let{commentName:c}=u;o.leafNode("Override",{PartName:`/xl/${c}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"});})),o.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),o.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),o.closeNode();}parseOpen(){return false}parseText(){}parseClose(){return false}}a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},t.exports=a;},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("../simple/date-xform"),s=e("../simple/string-xform"),o=e("../simple/integer-xform");class l extends i{constructor(){super(),this.map={"dc:creator":new s({tag:"dc:creator"}),"dc:title":new s({tag:"dc:title"}),"dc:subject":new s({tag:"dc:subject"}),"dc:description":new s({tag:"dc:description"}),"dc:identifier":new s({tag:"dc:identifier"}),"dc:language":new s({tag:"dc:language"}),"cp:keywords":new s({tag:"cp:keywords"}),"cp:category":new s({tag:"cp:category"}),"cp:lastModifiedBy":new s({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new a({tag:"cp:lastPrinted",format:l.DateFormat}),"cp:revision":new o({tag:"cp:revision"}),"cp:version":new s({tag:"cp:version"}),"cp:contentStatus":new s({tag:"cp:contentStatus"}),"cp:contentType":new s({tag:"cp:contentType"}),"dcterms:created":new a({tag:"dcterms:created",attrs:l.DateAttrs,format:l.DateFormat}),"dcterms:modified":new a({tag:"dcterms:modified",attrs:l.DateAttrs,format:l.DateFormat})};}render(u,c){u.openXml(n.StdDocAttributes),u.openNode("cp:coreProperties",l.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(u,c.creator),this.map["dc:title"].render(u,c.title),this.map["dc:subject"].render(u,c.subject),this.map["dc:description"].render(u,c.description),this.map["dc:identifier"].render(u,c.identifier),this.map["dc:language"].render(u,c.language),this.map["cp:keywords"].render(u,c.keywords),this.map["cp:category"].render(u,c.category),this.map["cp:lastModifiedBy"].render(u,c.lastModifiedBy),this.map["cp:lastPrinted"].render(u,c.lastPrinted),this.map["cp:revision"].render(u,c.revision),this.map["cp:version"].render(u,c.version),this.map["cp:contentStatus"].render(u,c.contentStatus),this.map["cp:contentType"].render(u,c.contentType),this.map["dcterms:created"].render(u,c.created),this.map["dcterms:modified"].render(u,c.modified),u.closeNode();}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),true;switch(u.name){case "cp:coreProperties":case "coreProperties":return true;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),true;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),true;switch(u){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},false;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}l.DateFormat=function(f){return f.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){let n=e("../base-xform");t.exports=class extends n{render(i,a){i.leafNode("Relationship",a);}parseOpen(i){return i.name==="Relationship"?(this.model=i.attributes,true):false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],55:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("./relationship-xform");class s extends i{constructor(){super(),this.map={Relationship:new a};}render(l,f){f=f||this._values,l.openXml(n.StdDocAttributes),l.openNode("Relationships",s.RELATIONSHIPS_ATTRIBUTES),f.forEach(u=>{this.map.Relationship.render(l,u);}),l.closeNode();}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),true;switch(l.name){case "Relationships":return this.model=[],true;default:if(this.parser=this.map[l.name],this.parser)return this.parser.parseOpen(l),true;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.model.push(this.parser.model),this.parser=void 0),true;if(l==="Relationships")return false;throw new Error("Unexpected xml node in parseClose: "+l)}}s.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t.exports=s;},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{parseOpen(i){return this.parser?(this.parser.parseOpen(i),true):(i.name===this.tag?(this.reset(),this.model={range:{editAs:i.attributes.editAs||"oneCell"}}):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)),true)}parseText(i){this.parser&&this.parser.parseText(i);}reconcilePicture(i,a){if(i&&i.rId){let s=a.rels[i.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(s){let o=s[1],l=a.mediaIndex[o];return a.media[l]}}}};},{"../base-xform":32}],57:[function(e,t,r){let 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(a,s){a.openNode(this.tag),this.map["a:blip"].render(a,s),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode();}parseOpen(a){return this.parser?(this.parser.parseOpen(a),true):(a.name===this.tag?this.reset():(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),true)}parseText(){}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),true):a===this.tag?(this.model=this.map["a:blip"].model,false):true}};},{"../base-xform":32,"./blip-xform":58}],58:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "a:blip"}render(i,a){i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"});}parseOpen(i){return i.name===this.tag&&(this.model={rId:i.attributes["r:embed"]}),true}parseText(){}parseClose(i){return i!==this.tag}};},{"../base-xform":32}],59:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "xdr:cNvPicPr"}render(i){i.openNode(this.tag),i.leafNode("a:picLocks",{noChangeAspect:"1"}),i.closeNode();}parseOpen(i){switch(i.name){case this.tag:default:return true}}parseText(){}parseClose(i){return i!==this.tag}};},{"../base-xform":32}],60:[function(e,t,r){let n=e("../base-xform"),i=e("./hlink-click-xform"),a=e("./ext-lst-xform");t.exports=class extends n{constructor(){super(),this.map={"a:hlinkClick":new i,"a:extLst":new a};}get tag(){return "xdr:cNvPr"}render(s,o){s.openNode(this.tag,{id:o.index,name:"Picture "+o.index}),this.map["a:hlinkClick"].render(s,o),this.map["a:extLst"].render(s,o),s.closeNode();}parseOpen(s){return this.parser?(this.parser.parseOpen(s),true):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),true)}parseText(){}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),true):s===this.tag?(this.model=this.map["a:hlinkClick"].model,false):true}};},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(e,t,r){let n=e("../base-xform"),i=e("../simple/integer-xform");t.exports=class extends n{constructor(a){super(),this.tag=a.tag,this.map={"xdr:col":new i({tag:"xdr:col",zero:true}),"xdr:colOff":new i({tag:"xdr:colOff",zero:true}),"xdr:row":new i({tag:"xdr:row",zero:true}),"xdr:rowOff":new i({tag:"xdr:rowOff",zero:true})};}render(a,s){a.openNode(this.tag),this.map["xdr:col"].render(a,s.nativeCol),this.map["xdr:colOff"].render(a,s.nativeColOff),this.map["xdr:row"].render(a,s.nativeRow),this.map["xdr:rowOff"].render(a,s.nativeRowOff),a.closeNode();}parseOpen(a){return this.parser?(this.parser.parseOpen(a),true):(a.name===this.tag?this.reset():(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),true)}parseText(a){this.parser&&this.parser.parseText(a);}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),true):a===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},false):true}};},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(e,t,r){let n=e("../../../utils/col-cache"),i=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("./two-cell-anchor-xform"),o=e("./one-cell-anchor-xform");class l extends a{constructor(){super(),this.map={"xdr:twoCellAnchor":new s,"xdr:oneCellAnchor":new o};}prepare(u){u.anchors.forEach((c,d)=>{c.anchorType=(function(p){return (typeof p.range=="string"?n.decode(p.range):p.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(c),this.map[c.anchorType].prepare(c,{index:d});});}get tag(){return "xdr:wsDr"}render(u,c){u.openXml(i.StdDocAttributes),u.openNode(this.tag,l.DRAWING_ATTRIBUTES),c.anchors.forEach(d=>{this.map[d.anchorType].render(u,d);}),u.closeNode();}parseOpen(u){return this.parser?(this.parser.parseOpen(u),true):(u.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)),true)}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.model.anchors.push(this.parser.model),this.parser=void 0),true):u!==this.tag}reconcile(u,c){u.anchors.forEach(d=>{d.br?this.map["xdr:twoCellAnchor"].reconcile(d,c):this.map["xdr:oneCellAnchor"].reconcile(d,c);});}}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){let n=e("../base-xform");t.exports=class extends n{get tag(){return "a:extLst"}render(i){i.openNode(this.tag),i.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),i.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),i.closeNode(),i.closeNode();}parseOpen(i){switch(i.name){case this.tag:default:return true}}parseText(){}parseClose(i){return i!==this.tag}};},{"../base-xform":32}],64:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.map={};}render(i,a){i.openNode(this.tag);let s=Math.floor(9525*a.width),o=Math.floor(9525*a.height);i.addAttribute("cx",s),i.addAttribute("cy",o),i.closeNode();}parseOpen(i){return i.name===this.tag&&(this.model={width:parseInt(i.attributes.cx||"0",10)/9525,height:parseInt(i.attributes.cy||"0",10)/9525},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],65:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "a:hlinkClick"}render(i,a){a.hyperlinks&&a.hyperlinks.rId&&i.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip});}parseOpen(i){return i.name===this.tag&&(this.model={hyperlinks:{rId:i.attributes["r:id"],tooltip:i.attributes.tooltip}}),true}parseText(){}parseClose(){return false}};},{"../base-xform":32}],66:[function(e,t,r){let n=e("../base-xform"),i=e("./c-nv-pr-xform"),a=e("./c-nv-pic-pr-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:cNvPr":new i,"xdr:cNvPicPr":new a};}get tag(){return "xdr:nvPicPr"}render(s,o){s.openNode(this.tag),this.map["xdr:cNvPr"].render(s,o),this.map["xdr:cNvPicPr"].render(s,o),s.closeNode();}parseOpen(s){return this.parser?(this.parser.parseOpen(s),true):(s.name===this.tag?this.reset():(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),true)}parseText(){}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),true):s===this.tag?(this.model=this.map["xdr:cNvPr"].model,false):true}};},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(e,t,r){let n=e("./base-cell-anchor-xform"),i=e("../static-xform"),a=e("./cell-position-xform"),s=e("./ext-xform"),o=e("./pic-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:ext":new s({tag:"xdr:ext"}),"xdr:pic":new o,"xdr:clientData":new i({tag:"xdr:clientData"})};}get tag(){return "xdr:oneCellAnchor"}prepare(l,f){this.map["xdr:pic"].prepare(l.picture,f);}render(l,f){l.openNode(this.tag,{editAs:f.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,f.range.tl),this.map["xdr:ext"].render(l,f.range.ext),this.map["xdr:pic"].render(l,f.picture),this.map["xdr:clientData"].render(l,{}),l.closeNode();}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),true):l===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,false):true}reconcile(l,f){l.medium=this.reconcilePicture(l.picture,f);}};},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(e,t,r){let n=e("../base-xform"),i=e("../static-xform"),a=e("./blip-fill-xform"),s=e("./nv-pic-pr-xform"),o=e("./sp-pr");t.exports=class extends n{constructor(){super(),this.map={"xdr:nvPicPr":new s,"xdr:blipFill":new a,"xdr:spPr":new i(o)};}get tag(){return "xdr:pic"}prepare(l,f){l.index=f.index+1;}render(l,f){l.openNode(this.tag),this.map["xdr:nvPicPr"].render(l,f),this.map["xdr:blipFill"].render(l,f),this.map["xdr:spPr"].render(l,f),l.closeNode();}parseOpen(l){return this.parser?(this.parser.parseOpen(l),true):(l.name===this.tag?this.reset():(this.parser=this.map[l.name],this.parser&&this.parser.parseOpen(l)),true)}parseText(){}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.mergeModel(this.parser.model),this.parser=void 0),true):l!==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){let n=e("./base-cell-anchor-xform"),i=e("../static-xform"),a=e("./cell-position-xform"),s=e("./pic-xform");t.exports=class extends n{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:to":new a({tag:"xdr:to"}),"xdr:pic":new s,"xdr:clientData":new i({tag:"xdr:clientData"})};}get tag(){return "xdr:twoCellAnchor"}prepare(o,l){this.map["xdr:pic"].prepare(o.picture,l);}render(o,l){o.openNode(this.tag,{editAs:l.range.editAs||"oneCell"}),this.map["xdr:from"].render(o,l.range.tl),this.map["xdr:to"].render(o,l.range.br),this.map["xdr:pic"].render(o,l.picture),this.map["xdr:clientData"].render(o,{}),o.closeNode();}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.parser=void 0),true):o===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,false):true}reconcile(o,l){o.medium=this.reconcilePicture(o.picture,l);}};},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(e,t,r){let n=e("./base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.always=!!i.always,this.count=i.count,this.empty=i.empty,this.$count=i.$count||"count",this.$=i.$,this.childXform=i.childXform,this.maxItems=i.maxItems;}prepare(i,a){let{childXform:s}=this;i&&i.forEach((o,l)=>{a.index=l,s.prepare(o,a);});}render(i,a){if(this.always||a&&a.length){i.openNode(this.tag,this.$),this.count&&i.addAttribute(this.$count,a&&a.length||0);let{childXform:s}=this;(a||[]).forEach((o,l)=>{s.render(i,o,l);}),i.closeNode();}else this.empty&&i.leafNode(this.tag);}parseOpen(i){return this.parser?(this.parser.parseOpen(i),true):i.name===this.tag?(this.model=[],true):!!this.childXform.parseOpen(i)&&(this.parser=this.childXform,true)}parseText(i){this.parser&&this.parser.parseText(i);}parseClose(i){if(this.parser){if(!this.parser.parseClose(i)&&(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 true}return false}reconcile(i,a){if(i){let{childXform:s}=this;i.forEach(o=>{s.reconcile(o,a);});}}};},{"./base-xform":32}],72:[function(e,t,r){let n=e("../../../utils/col-cache"),i=e("../base-xform");t.exports=class extends i{get tag(){return "autoFilter"}render(a,s){if(s)if(typeof s=="string")a.leafNode("autoFilter",{ref:s});else {let o=function(u){return typeof u=="string"?u:n.getAddress(u.row,u.column).address},l=o(s.from),f=o(s.to);l&&f&&a.leafNode("autoFilter",{ref:`${l}:${f}`});}}parseOpen(a){a.name==="autoFilter"&&(this.model=a.attributes.ref);}};},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(e,t,r){let n=e("../../../utils/utils"),i=e("../base-xform"),a=e("../../../doc/range"),s=e("../../../doc/enums"),o=e("../strings/rich-text-xform");function l(f){if(f==null)return s.ValueType.Null;if(f instanceof String||typeof f=="string")return s.ValueType.String;if(typeof f=="number")return s.ValueType.Number;if(typeof f=="boolean")return s.ValueType.Boolean;if(f instanceof Date)return s.ValueType.Date;if(f.text&&f.hyperlink)return s.ValueType.Hyperlink;if(f.formula)return s.ValueType.Formula;if(f.error)return s.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(f,u){let c=u.styles.addStyleModel(f.style||{},(function(d){return d.type===s.ValueType.Formula?l(d.result):d.type})(f));switch(c&&(f.styleId=c),f.comment&&u.comments.push({...f.comment,ref:f.address}),f.type){case s.ValueType.String:case s.ValueType.RichText:u.sharedStrings&&(f.ssId=u.sharedStrings.add(f.value));break;case s.ValueType.Date:u.date1904&&(f.date1904=true);break;case s.ValueType.Hyperlink:u.sharedStrings&&f.text!==void 0&&f.text!==null&&(f.ssId=u.sharedStrings.add(f.text)),u.hyperlinks.push({address:f.address,target:f.hyperlink,tooltip:f.tooltip});break;case s.ValueType.Merge:u.merges.add(f);break;case s.ValueType.Formula:if(u.date1904&&(f.date1904=true),f.shareType==="shared"&&(f.si=u.siFormulae++),f.formula)u.formulae[f.address]=f;else if(f.sharedFormula){let d=u.formulae[f.sharedFormula];if(!d)throw new Error("Shared Formula master must exist above and or left of clone for cell "+f.address);d.si===void 0?(d.shareType="shared",d.si=u.siFormulae++,d.range=new a(d.address,f.address)):d.range&&d.range.expandToAddress(f.address),f.si=d.si;}}}renderFormula(f,u){let c=null;switch(u.shareType){case "shared":c={t:"shared",ref:u.ref||u.range.range,si:u.si};break;case "array":c={t:"array",ref:u.ref};break;default:u.si!==void 0&&(c={t:"shared",si:u.si});}switch(l(u.result)){case s.ValueType.Null:f.leafNode("f",c,u.formula);break;case s.ValueType.String:f.addAttribute("t","str"),f.leafNode("f",c,u.formula),f.leafNode("v",null,u.result);break;case s.ValueType.Number:f.leafNode("f",c,u.formula),f.leafNode("v",null,u.result);break;case s.ValueType.Boolean:f.addAttribute("t","b"),f.leafNode("f",c,u.formula),f.leafNode("v",null,u.result?1:0);break;case s.ValueType.Error:f.addAttribute("t","e"),f.leafNode("f",c,u.formula),f.leafNode("v",null,u.result.error);break;case s.ValueType.Date:f.leafNode("f",c,u.formula),f.leafNode("v",null,n.dateToExcel(u.result,u.date1904));break;default:throw new Error("I could not understand type of value")}}render(f,u){if(u.type!==s.ValueType.Null||u.styleId){switch(f.openNode("c"),f.addAttribute("r",u.address),u.styleId&&f.addAttribute("s",u.styleId),u.type){case s.ValueType.Null:break;case s.ValueType.Number:f.leafNode("v",null,u.value);break;case s.ValueType.Boolean:f.addAttribute("t","b"),f.leafNode("v",null,u.value?"1":"0");break;case s.ValueType.Error:f.addAttribute("t","e"),f.leafNode("v",null,u.value.error);break;case s.ValueType.String:case s.ValueType.RichText:u.ssId!==void 0?(f.addAttribute("t","s"),f.leafNode("v",null,u.ssId)):u.value&&u.value.richText?(f.addAttribute("t","inlineStr"),f.openNode("is"),u.value.richText.forEach(c=>{this.richTextXForm.render(f,c);}),f.closeNode("is")):(f.addAttribute("t","str"),f.leafNode("v",null,u.value));break;case s.ValueType.Date:f.leafNode("v",null,n.dateToExcel(u.value,u.date1904));break;case s.ValueType.Hyperlink:u.ssId!==void 0?(f.addAttribute("t","s"),f.leafNode("v",null,u.ssId)):(f.addAttribute("t","str"),f.leafNode("v",null,u.text));break;case s.ValueType.Formula:this.renderFormula(f,u);break;case s.ValueType.Merge:}f.closeNode();}}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),true;switch(f.name){case "c":return this.model={address:f.attributes.r},this.t=f.attributes.t,f.attributes.s&&(this.model.styleId=parseInt(f.attributes.s,10)),true;case "f":return this.currentNode="f",this.model.si=f.attributes.si,this.model.shareType=f.attributes.t,this.model.ref=f.attributes.ref,true;case "v":return this.currentNode="v",true;case "t":return this.currentNode="t",true;case "r":return this.parser=this.richTextXForm,this.parser.parseOpen(f),true;default:return false}}parseText(f){if(this.parser)this.parser.parseText(f);else switch(this.currentNode){case "f":this.model.formula=this.model.formula?this.model.formula+f:f;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+f:f:this.model.value=this.model.value?this.model.value+f:f;}}parseClose(f){switch(f){case "c":{let{model:u}=this;if(u.formula||u.shareType)u.type=s.ValueType.Formula,u.value&&(this.t==="str"?u.result=n.xmlDecode(u.value):this.t==="b"?u.result=parseInt(u.value,10)!==0:this.t==="e"?u.result={error:u.value}:u.result=parseFloat(u.value),u.value=void 0);else if(u.value!==void 0)switch(this.t){case "s":u.type=s.ValueType.String,u.value=parseInt(u.value,10);break;case "str":u.type=s.ValueType.String,u.value=n.xmlDecode(u.value);break;case "inlineStr":u.type=s.ValueType.String;break;case "b":u.type=s.ValueType.Boolean,u.value=parseInt(u.value,10)!==0;break;case "e":u.type=s.ValueType.Error,u.value={error:u.value};break;default:u.type=s.ValueType.Number,u.value=parseFloat(u.value);}else u.styleId?u.type=s.ValueType.Null:u.type=s.ValueType.Merge;return false}case "f":case "v":case "is":return this.currentNode=void 0,true;case "t":return this.parser?(this.parser.parseClose(f),true):(this.currentNode=void 0,true);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,true;default:return !!this.parser&&(this.parser.parseClose(f),true)}}reconcile(f,u){let c=f.styleId&&u.styles&&u.styles.getStyleModel(f.styleId);switch(c&&(f.style=c),f.styleId!==void 0&&(f.styleId=void 0),f.type){case s.ValueType.String:typeof f.value=="number"&&u.sharedStrings&&(f.value=u.sharedStrings.getString(f.value)),f.value.richText&&(f.type=s.ValueType.RichText);break;case s.ValueType.Number:c&&n.isDateFmt(c.numFmt)&&(f.type=s.ValueType.Date,f.value=n.excelToDate(f.value,u.date1904));break;case s.ValueType.Formula:f.result!==void 0&&c&&n.isDateFmt(c.numFmt)&&(f.result=n.excelToDate(f.result,u.date1904)),f.shareType==="shared"&&(f.ref?u.formulae[f.si]=f.address:(f.sharedFormula=u.formulae[f.si],delete f.shareType),delete f.si);}let d=u.hyperlinkMap[f.address];d&&(f.type===s.ValueType.Formula?(f.text=f.result,f.result=void 0):(f.text=f.value,f.value=void 0),f.type=s.ValueType.Hyperlink,f.hyperlink=d);let p=u.commentsMap&&u.commentsMap[f.address];p&&(f.comment=p);}};},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{get tag(){return "x14:cfIcon"}render(i,a){i.leafNode(this.tag,{iconSet:a.iconSet,iconId:a.iconId});}parseOpen(i){let{attributes:a}=i;this.model={iconSet:a.iconSet,iconId:n.toIntValue(a.iconId)};}parseClose(i){return i!==this.tag}};},{"../../base-xform":32}],75:[function(e,t,r){let{v4:n}=e("uuid"),i=e("../../base-xform"),a=e("../../composite-xform"),s=e("./databar-ext-xform"),o=e("./icon-set-ext-xform"),l={"3Triangles":true,"3Stars":true,"5Boxes":true};class f extends a{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new s,"x14:iconSet":this.iconSetXform=new o};}get tag(){return "x14:cfRule"}static isExt(c){return c.type==="dataBar"?s.isExt(c):!(c.type!=="iconSet"||!c.custom&&!l[c.iconSet])}prepare(c){f.isExt(c)&&(c.x14Id=`{${n()}}`.toUpperCase());}render(c,d){if(f.isExt(d))switch(d.type){case "dataBar":this.renderDataBar(c,d);break;case "iconSet":this.renderIconSet(c,d);}}renderDataBar(c,d){c.openNode(this.tag,{type:"dataBar",id:d.x14Id}),this.databarXform.render(c,d),c.closeNode();}renderIconSet(c,d){c.openNode(this.tag,{type:"iconSet",priority:d.priority,id:d.x14Id||`{${n()}}`}),this.iconSetXform.render(c,d),c.closeNode();}createNewModel(c){let{attributes:d}=c;return {type:d.type,x14Id:d.id,priority:i.toIntValue(d.priority)}}onParserClose(c,d){Object.assign(this.model,d.model);}}t.exports=f;},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(e,t,r){let 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(a,s){a.openNode(this.tag,{type:s.type}),s.value!==void 0&&this.fExtXform.render(a,s.value),a.closeNode();}createNewModel(a){return {type:a.attributes.type}}onParserClose(a,s){a==="xm:f"&&(this.model.value=s.model?parseFloat(s.model):0);}};},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(e,t,r){let n=e("../../composite-xform"),i=e("./sqref-ext-xform"),a=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 a};}get tag(){return "x14:conditionalFormatting"}prepare(s,o){s.rules.forEach(l=>{this.cfRule.prepare(l,o);});}render(s,o){o.rules.some(a.isExt)&&(s.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),o.rules.filter(a.isExt).forEach(l=>this.cfRule.render(s,l)),this.sqRef.render(s,o.ref),s.closeNode());}createNewModel(){return {rules:[]}}onParserClose(s,o){switch(s){case "xm:sqref":this.model.ref=o.model;break;case "x14:cfRule":this.model.rules.push(o.model);}}};},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(e,t,r){let n=e("../../composite-xform"),i=e("./cf-rule-ext-xform"),a=e("./conditional-formatting-ext-xform");t.exports=class extends n{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new a};}get tag(){return "x14:conditionalFormattings"}hasContent(s){return s.hasExtContent===void 0&&(s.hasExtContent=s.some(o=>o.rules.some(i.isExt))),s.hasExtContent}prepare(s,o){s.forEach(l=>{this.cfXform.prepare(l,o);});}render(s,o){this.hasContent(o)&&(s.openNode(this.tag),o.forEach(l=>this.cfXform.render(s,l)),s.closeNode());}createNewModel(){return []}onParserClose(s,o){this.model.push(o.model);}};},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(e,t,r){let n=e("../../base-xform"),i=e("../../composite-xform"),a=e("../../style/color-xform"),s=e("./cfvo-ext-xform");t.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:borderColor":this.borderColorXform=new a("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new a("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new a("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new a("x14:axisColor")};}static isExt(o){return !o.gradient}get tag(){return "x14:dataBar"}render(o,l){o.openNode(this.tag,{minLength:n.toIntAttribute(l.minLength,0,true),maxLength:n.toIntAttribute(l.maxLength,100,true),border:n.toBoolAttribute(l.border,false),gradient:n.toBoolAttribute(l.gradient,true),negativeBarColorSameAsPositive:n.toBoolAttribute(l.negativeBarColorSameAsPositive,true),negativeBarBorderColorSameAsPositive:n.toBoolAttribute(l.negativeBarBorderColorSameAsPositive,true),axisPosition:n.toAttribute(l.axisPosition,"auto"),direction:n.toAttribute(l.direction,"leftToRight")}),l.cfvo.forEach(f=>{this.cfvoXform.render(o,f);}),this.borderColorXform.render(o,l.borderColor),this.negativeBorderColorXform.render(o,l.negativeBorderColor),this.negativeFillColorXform.render(o,l.negativeFillColor),this.axisColorXform.render(o,l.axisColor),o.closeNode();}createNewModel(o){let{attributes:l}=o;return {cfvo:[],minLength:n.toIntValue(l.minLength,0),maxLength:n.toIntValue(l.maxLength,100),border:n.toBoolValue(l.border,false),gradient:n.toBoolValue(l.gradient,true),negativeBarColorSameAsPositive:n.toBoolValue(l.negativeBarColorSameAsPositive,true),negativeBarBorderColorSameAsPositive:n.toBoolValue(l.negativeBarBorderColorSameAsPositive,true),axisPosition:n.toStringValue(l.axisPosition,"auto"),direction:n.toStringValue(l.direction,"leftToRight")}}onParserClose(o,l){let[,f]=o.split(":");f==="cfvo"?this.model.cfvo.push(l.model):this.model[f]=l.model;}};},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{get tag(){return "xm:f"}render(i,a){i.leafNode(this.tag,null,a);}parseOpen(){this.model="";}parseText(i){this.model+=i;}parseClose(i){return i!==this.tag}};},{"../../base-xform":32}],81:[function(e,t,r){let n=e("../../base-xform"),i=e("../../composite-xform"),a=e("./cfvo-ext-xform"),s=e("./cf-icon-ext-xform");t.exports=class extends i{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:cfIcon":this.cfIconXform=new s};}get tag(){return "x14:iconSet"}render(o,l){o.openNode(this.tag,{iconSet:n.toStringAttribute(l.iconSet),reverse:n.toBoolAttribute(l.reverse,false),showValue:n.toBoolAttribute(l.showValue,true),custom:n.toBoolAttribute(l.icons,false)}),l.cfvo.forEach(f=>{this.cfvoXform.render(o,f);}),l.icons&&l.icons.forEach((f,u)=>{f.iconId=u,this.cfIconXform.render(o,f);}),o.closeNode();}createNewModel(o){let{attributes:l}=o;return {cfvo:[],iconSet:n.toStringValue(l.iconSet,"3TrafficLights"),reverse:n.toBoolValue(l.reverse,false),showValue:n.toBoolValue(l.showValue,true)}}onParserClose(o,l){let[,f]=o.split(":");switch(f){case "cfvo":this.model.cfvo.push(l.model);break;case "cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(l.model);break;default:this.model[f]=l.model;}}};},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{get tag(){return "xm:sqref"}render(i,a){i.leafNode(this.tag,null,a);}parseOpen(){this.model="";}parseText(i){this.model+=i;}parseClose(i){return i!==this.tag}};},{"../../base-xform":32}],83:[function(e,t,r){let n=e("../../base-xform"),i=e("../../composite-xform"),a=e("../../../../doc/range"),s=e("./databar-xform"),o=e("./ext-lst-ref-xform"),l=e("./formula-xform"),f=e("./color-scale-xform"),u=e("./icon-set-xform"),c={"3Triangles":true,"3Stars":true,"5Boxes":true},d=h=>{let{type:m,operator:g}=h;switch(m){case "containsText":case "containsBlanks":case "notContainsBlanks":case "containsErrors":case "notContainsErrors":return {type:"containsText",operator:m};default:return {type:m,operator:g}}};class p extends i{constructor(){super(),this.map={dataBar:this.databarXform=new s,extLst:this.extLstRefXform=new o,formula:this.formulaXform=new l,colorScale:this.colorScaleXform=new f,iconSet:this.iconSetXform=new u};}get tag(){return "cfRule"}static isPrimitive(m){return m.type!=="iconSet"||!m.custom&&!c[m.iconSet]}render(m,g){switch(g.type){case "expression":this.renderExpression(m,g);break;case "cellIs":this.renderCellIs(m,g);break;case "top10":this.renderTop10(m,g);break;case "aboveAverage":this.renderAboveAverage(m,g);break;case "dataBar":this.renderDataBar(m,g);break;case "colorScale":this.renderColorScale(m,g);break;case "iconSet":this.renderIconSet(m,g);break;case "containsText":this.renderText(m,g);break;case "timePeriod":this.renderTimePeriod(m,g);}}renderExpression(m,g){m.openNode(this.tag,{type:"expression",dxfId:g.dxfId,priority:g.priority}),this.formulaXform.render(m,g.formulae[0]),m.closeNode();}renderCellIs(m,g){m.openNode(this.tag,{type:"cellIs",dxfId:g.dxfId,priority:g.priority,operator:g.operator}),g.formulae.forEach(v=>{this.formulaXform.render(m,v);}),m.closeNode();}renderTop10(m,g){m.leafNode(this.tag,{type:"top10",dxfId:g.dxfId,priority:g.priority,percent:n.toBoolAttribute(g.percent,false),bottom:n.toBoolAttribute(g.bottom,false),rank:n.toIntValue(g.rank,10,true)});}renderAboveAverage(m,g){m.leafNode(this.tag,{type:"aboveAverage",dxfId:g.dxfId,priority:g.priority,aboveAverage:n.toBoolAttribute(g.aboveAverage,true)});}renderDataBar(m,g){m.openNode(this.tag,{type:"dataBar",priority:g.priority}),this.databarXform.render(m,g),this.extLstRefXform.render(m,g),m.closeNode();}renderColorScale(m,g){m.openNode(this.tag,{type:"colorScale",priority:g.priority}),this.colorScaleXform.render(m,g),m.closeNode();}renderIconSet(m,g){p.isPrimitive(g)&&(m.openNode(this.tag,{type:"iconSet",priority:g.priority}),this.iconSetXform.render(m,g),m.closeNode());}renderText(m,g){m.openNode(this.tag,{type:g.operator,dxfId:g.dxfId,priority:g.priority,operator:n.toStringAttribute(g.operator,"containsText")});let v=(w=>{if(w.formulae&&w.formulae[0])return w.formulae[0];let C=new a(w.ref),{tl:T}=C;switch(w.operator){case "containsText":return `NOT(ISERROR(SEARCH("${w.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}})(g);v&&this.formulaXform.render(m,v),m.closeNode();}renderTimePeriod(m,g){m.openNode(this.tag,{type:"timePeriod",dxfId:g.dxfId,priority:g.priority,timePeriod:g.timePeriod});let v=(w=>{if(w.formulae&&w.formulae[0])return w.formulae[0];let C=new a(w.ref),{tl:T}=C;switch(w.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}})(g);v&&this.formulaXform.render(m,v),m.closeNode();}createNewModel(m){let{attributes:g}=m;return {...d(g),dxfId:n.toIntValue(g.dxfId),priority:n.toIntValue(g.priority),timePeriod:g.timePeriod,percent:n.toBoolValue(g.percent),bottom:n.toBoolValue(g.bottom),rank:n.toIntValue(g.rank),aboveAverage:n.toBoolValue(g.aboveAverage)}}onParserClose(m,g){switch(m){case "dataBar":case "extLst":case "colorScale":case "iconSet":Object.assign(this.model,g.model);break;case "formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(g.model);}}}t.exports=p;},{"../../../../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){let n=e("../../base-xform");t.exports=class extends n{get tag(){return "cfvo"}render(i,a){i.leafNode(this.tag,{type:a.type,val:a.value});}parseOpen(i){this.model={type:i.attributes.type,value:n.toFloatValue(i.attributes.val)};}parseClose(i){return i!==this.tag}};},{"../../base-xform":32}],85:[function(e,t,r){let n=e("../../composite-xform"),i=e("../../style/color-xform"),a=e("./cfvo-xform");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new i};}get tag(){return "colorScale"}render(s,o){s.openNode(this.tag),o.cfvo.forEach(l=>{this.cfvoXform.render(s,l);}),o.color.forEach(l=>{this.colorXform.render(s,l);}),s.closeNode();}createNewModel(s){return {cfvo:[],color:[]}}onParserClose(s,o){this.model[s].push(o.model);}};},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(e,t,r){let 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(a,s){s.rules.some(i.isPrimitive)&&(a.openNode(this.tag,{sqref:s.ref}),s.rules.forEach(o=>{i.isPrimitive(o)&&(o.ref=s.ref,this.map.cfRule.render(a,o));}),a.closeNode());}createNewModel(a){let{attributes:s}=a;return {ref:s.sqref,rules:[]}}onParserClose(a,s){this.model.rules.push(s.model);}};},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(e,t,r){let 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(a,s){let o=a.reduce((l,f)=>Math.max(l,...f.rules.map(u=>u.priority||0)),1);a.forEach(l=>{l.rules.forEach(f=>{f.priority||(f.priority=o++),f.style&&(f.dxfId=s.styles.addDxfStyle(f.style));});});}render(a,s){s.forEach(o=>{this.cfXform.render(a,o);});}parseOpen(a){return this.parser?(this.parser.parseOpen(a),true):a.name==="conditionalFormatting"?(this.parser=this.cfXform,this.parser.parseOpen(a),true):false}parseText(a){this.parser&&this.parser.parseText(a);}parseClose(a){return !!this.parser&&(!!this.parser.parseClose(a)||(this.model.push(this.parser.model),this.parser=void 0,false))}reconcile(a,s){a.forEach(o=>{o.rules.forEach(l=>{l.dxfId!==void 0&&(l.style=s.styles.getDxfStyle(l.dxfId),delete l.dxfId);});});}};},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(e,t,r){let n=e("../../composite-xform"),i=e("../../style/color-xform"),a=e("./cfvo-xform");t.exports=class extends n{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new i};}get tag(){return "dataBar"}render(s,o){s.openNode(this.tag),o.cfvo.forEach(l=>{this.cfvoXform.render(s,l);}),this.colorXform.render(s,o.color),s.closeNode();}createNewModel(){return {cfvo:[]}}onParserClose(s,o){switch(s){case "cfvo":this.model.cfvo.push(o.model);break;case "color":this.model.color=o.model;}}};},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(e,t,r){let n=e("../../base-xform"),i=e("../../composite-xform");class a extends n{get tag(){return "x14:id"}render(l,f){l.leafNode(this.tag,null,f);}parseOpen(){this.model="";}parseText(l){this.model+=l;}parseClose(l){return l!==this.tag}}class s extends i{constructor(){super(),this.map={"x14:id":this.idXform=new a};}get tag(){return "ext"}render(l,f){l.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(l,f.x14Id),l.closeNode();}createNewModel(){return {}}onParserClose(l,f){this.model.x14Id=f.model;}}t.exports=class extends i{constructor(){super(),this.map={ext:new s};}get tag(){return "extLst"}render(o,l){o.openNode(this.tag),this.map.ext.render(o,l),o.closeNode();}createNewModel(){return {}}onParserClose(o,l){Object.assign(this.model,l.model);}};},{"../../base-xform":32,"../../composite-xform":48}],90:[function(e,t,r){let n=e("../../base-xform");t.exports=class extends n{get tag(){return "formula"}render(i,a){i.leafNode(this.tag,null,a);}parseOpen(){this.model="";}parseText(i){this.model+=i;}parseClose(i){return i!==this.tag}};},{"../../base-xform":32}],91:[function(e,t,r){let n=e("../../base-xform"),i=e("../../composite-xform"),a=e("./cfvo-xform");t.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new a};}get tag(){return "iconSet"}render(s,o){s.openNode(this.tag,{iconSet:n.toStringAttribute(o.iconSet,"3TrafficLights"),reverse:n.toBoolAttribute(o.reverse,false),showValue:n.toBoolAttribute(o.showValue,true)}),o.cfvo.forEach(l=>{this.cfvoXform.render(s,l);}),s.closeNode();}createNewModel(s){let{attributes:o}=s;return {iconSet:n.toStringValue(o.iconSet,"3TrafficLights"),reverse:n.toBoolValue(o.reverse),showValue:n.toBoolValue(o.showValue),cfvo:[]}}onParserClose(s,o){this.model[s].push(o.model);}};},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(e,t,r){let n=e("../../../utils/utils"),i=e("../base-xform");t.exports=class extends i{get tag(){return "col"}prepare(a,s){let o=s.styles.addStyleModel(a.style||{});o&&(a.styleId=o);}render(a,s){a.openNode("col"),a.addAttribute("min",s.min),a.addAttribute("max",s.max),s.width&&a.addAttribute("width",s.width),s.styleId&&a.addAttribute("style",s.styleId),s.hidden&&a.addAttribute("hidden","1"),s.bestFit&&a.addAttribute("bestFit","1"),s.outlineLevel&&a.addAttribute("outlineLevel",s.outlineLevel),s.collapsed&&a.addAttribute("collapsed","1"),a.addAttribute("customWidth","1"),a.closeNode();}parseOpen(a){if(a.name==="col"){let s=this.model={min:parseInt(a.attributes.min||"0",10),max:parseInt(a.attributes.max||"0",10),width:a.attributes.width===void 0?void 0:parseFloat(a.attributes.width||"0")};return a.attributes.style&&(s.styleId=parseInt(a.attributes.style,10)),n.parseBoolean(a.attributes.hidden)&&(s.hidden=true),n.parseBoolean(a.attributes.bestFit)&&(s.bestFit=true),a.attributes.outlineLevel&&(s.outlineLevel=parseInt(a.attributes.outlineLevel,10)),n.parseBoolean(a.attributes.collapsed)&&(s.collapsed=true),true}return false}parseText(){}parseClose(){return false}reconcile(a,s){a.styleId&&(a.style=s.styles.getStyleModel(a.styleId));}};},{"../../../utils/utils":27,"../base-xform":32}],93:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../../../utils/utils"),a=e("../../../utils/col-cache"),s=e("../base-xform"),o=e("../../../doc/range");function l(u,c,d,p){let h=c[d];h!==void 0?u[d]=h:p!==void 0&&(u[d]=p);}function f(u,c,d,p){let h=c[d];h!==void 0?u[d]=i.parseBoolean(h):p!==void 0;}t.exports=class extends s{get tag(){return "dataValidations"}render(u,c){let d=(function(p){let h=n.map(p,(v,w)=>({address:w,dataValidation:v,marked:false})).sort((v,w)=>n.strcmp(v.address,w.address)),m=n.keyBy(h,"address"),g=(v,w,C)=>{for(let T=0;T<w;T++){let I=a.encodeAddress(v.row+T,C);if(!p[I]||!n.isEqual(p[v.address],p[I]))return false}return true};return h.map(v=>{if(!v.marked){let w=a.decodeEx(v.address);if(w.dimensions)return m[w.dimensions].marked=true,{...v.dataValidation,sqref:v.address};let C=1,T=a.encodeAddress(w.row+C,w.col);for(;p[T]&&n.isEqual(v.dataValidation,p[T]);)C++,T=a.encodeAddress(w.row+C,w.col);let I=1;for(;g(w,C,w.col+I);)I++;for(let k=0;k<C;k++)for(let D=0;D<I;D++)T=a.encodeAddress(w.row+k,w.col+D),m[T].marked=true;if(C>1||I>1){let k=w.row+(C-1),D=w.col+(I-1);return {...v.dataValidation,sqref:`${v.address}:${a.encodeAddress(k,D)}`}}return {...v.dataValidation,sqref:v.address}}return null}).filter(Boolean)})(c);d.length&&(u.openNode("dataValidations",{count:d.length}),d.forEach(p=>{u.openNode("dataValidation"),p.type!=="any"&&(u.addAttribute("type",p.type),p.operator&&p.type!=="list"&&p.operator!=="between"&&u.addAttribute("operator",p.operator),p.allowBlank&&u.addAttribute("allowBlank","1")),p.showInputMessage&&u.addAttribute("showInputMessage","1"),p.promptTitle&&u.addAttribute("promptTitle",p.promptTitle),p.prompt&&u.addAttribute("prompt",p.prompt),p.showErrorMessage&&u.addAttribute("showErrorMessage","1"),p.errorStyle&&u.addAttribute("errorStyle",p.errorStyle),p.errorTitle&&u.addAttribute("errorTitle",p.errorTitle),p.error&&u.addAttribute("error",p.error),u.addAttribute("sqref",p.sqref),(p.formulae||[]).forEach((h,m)=>{u.openNode("formula"+(m+1)),p.type==="date"?u.writeText(i.dateToExcel(new Date(h))):u.writeText(h),u.closeNode();}),u.closeNode();}),u.closeNode());}parseOpen(u){switch(u.name){case "dataValidations":return this.model={},true;case "dataValidation":{this._address=u.attributes.sqref;let c={type:u.attributes.type||"any",formulae:[]};switch(u.attributes.type&&f(c,u.attributes,"allowBlank"),f(c,u.attributes,"showInputMessage"),f(c,u.attributes,"showErrorMessage"),c.type){case "any":case "list":case "custom":break;default:l(c,u.attributes,"operator","between");}return l(c,u.attributes,"promptTitle"),l(c,u.attributes,"prompt"),l(c,u.attributes,"errorStyle"),l(c,u.attributes,"errorTitle"),l(c,u.attributes,"error"),this._dataValidation=c,true}case "formula1":case "formula2":return this._formula=[],true;default:return false}}parseText(u){this._formula&&this._formula.push(u);}parseClose(u){switch(u){case "dataValidations":return false;case "dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(c=>{c.includes(":")?new o(c).forEachAddress(d=>{this.model[d]=this._dataValidation;}):this.model[c]=this._dataValidation;}),true;case "formula1":case "formula2":{let c=this._formula.join("");switch(this._dataValidation.type){case "whole":case "textLength":c=parseInt(c,10);break;case "decimal":c=parseFloat(c);break;case "date":c=i.excelToDate(parseFloat(c));}return this._dataValidation.formulae.push(c),this._formula=void 0,true}default:return true}}};},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "dimension"}render(i,a){a&&i.leafNode("dimension",{ref:a});}parseOpen(i){return i.name==="dimension"&&(this.model=i.attributes.ref,true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],95:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "drawing"}render(i,a){a&&i.leafNode(this.tag,{"r:id":a.rId});}parseOpen(i){return i.name===this.tag?(this.model={rId:i.attributes["r:id"]},true):false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],96:[function(e,t,r){let n=e("../composite-xform"),i=e("./cf-ext/conditional-formattings-ext-xform");class a extends n{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new i};}get tag(){return "ext"}hasContent(o){return this.conditionalFormattings.hasContent(o.conditionalFormattings)}prepare(o,l){this.conditionalFormattings.prepare(o.conditionalFormattings,l);}render(o,l){o.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(o,l.conditionalFormattings),o.closeNode();}createNewModel(){return {}}onParserClose(o,l){this.model[o]=l.model;}}t.exports=class extends n{constructor(){super(),this.map={ext:this.ext=new a};}get tag(){return "extLst"}prepare(s,o){this.ext.prepare(s,o);}hasContent(s){return this.ext.hasContent(s)}render(s,o){this.hasContent(o)&&(s.openNode("extLst"),this.ext.render(s,o),s.closeNode());}createNewModel(){return {}}onParserClose(s,o){Object.assign(this.model,o.model);}};},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "headerFooter"}render(i,a){if(a){i.addRollback();let s=false;i.openNode("headerFooter"),a.differentFirst&&(i.addAttribute("differentFirst","1"),s=true),a.differentOddEven&&(i.addAttribute("differentOddEven","1"),s=true),a.oddHeader&&typeof a.oddHeader=="string"&&(i.leafNode("oddHeader",null,a.oddHeader),s=true),a.oddFooter&&typeof a.oddFooter=="string"&&(i.leafNode("oddFooter",null,a.oddFooter),s=true),a.evenHeader&&typeof a.evenHeader=="string"&&(i.leafNode("evenHeader",null,a.evenHeader),s=true),a.evenFooter&&typeof a.evenFooter=="string"&&(i.leafNode("evenFooter",null,a.evenFooter),s=true),a.firstHeader&&typeof a.firstHeader=="string"&&(i.leafNode("firstHeader",null,a.firstHeader),s=true),a.firstFooter&&typeof a.firstFooter=="string"&&(i.leafNode("firstFooter",null,a.firstFooter),s=true),s?(i.closeNode(),i.commit()):i.rollback();}}parseOpen(i){switch(i.name){case "headerFooter":return this.model={},i.attributes.differentFirst&&(this.model.differentFirst=parseInt(i.attributes.differentFirst,0)===1),i.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(i.attributes.differentOddEven,0)===1),true;case "oddHeader":return this.currentNode="oddHeader",true;case "oddFooter":return this.currentNode="oddFooter",true;case "evenHeader":return this.currentNode="evenHeader",true;case "evenFooter":return this.currentNode="evenFooter",true;case "firstHeader":return this.currentNode="firstHeader",true;case "firstFooter":return this.currentNode="firstFooter",true;default:return false}}parseText(i){switch(this.currentNode){case "oddHeader":this.model.oddHeader=i;break;case "oddFooter":this.model.oddFooter=i;break;case "evenHeader":this.model.evenHeader=i;break;case "evenFooter":this.model.evenFooter=i;break;case "firstHeader":this.model.firstHeader=i;break;case "firstFooter":this.model.firstFooter=i;}}parseClose(){switch(this.currentNode){case "oddHeader":case "oddFooter":case "evenHeader":case "evenFooter":case "firstHeader":case "firstFooter":return this.currentNode=void 0,true;default:return false}}};},{"../base-xform":32}],98:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "hyperlink"}render(i,a){this.isInternalLink(a)?i.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip,location:a.target}):i.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip});}parseOpen(i){return i.name==="hyperlink"&&(this.model={address:i.attributes.ref,rId:i.attributes["r:id"],tooltip:i.attributes.tooltip},i.attributes.location&&(this.model.target=i.attributes.location),true)}parseText(){}parseClose(){return false}isInternalLink(i){return i.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(i.target)}};},{"../base-xform":32}],99:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "mergeCell"}render(i,a){i.leafNode("mergeCell",{ref:a});}parseOpen(i){return i.name==="mergeCell"&&(this.model=i.attributes.ref,true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],100:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../../../doc/range"),a=e("../../../utils/col-cache"),s=e("../../../doc/enums");t.exports=class{constructor(){this.merges={};}add(o){if(this.merges[o.master])this.merges[o.master].expandToAddress(o.address);else {let l=`${o.master}:${o.address}`;this.merges[o.master]=new i(l);}}get mergeCells(){return n.map(this.merges,o=>o.range)}reconcile(o,l){n.each(o,f=>{let u=a.decode(f);for(let c=u.top;c<=u.bottom;c++){let d=l[c-1];for(let p=u.left;p<=u.right;p++){let h=d.cells[p-1];h?h.type===s.ValueType.Merge&&(h.master=u.tl):d.cells[p]={type:s.ValueType.Null,address:a.encodeAddress(c,p)};}}});}getMasterAddress(o){let l=this.hash[o];return l&&l.tl}};},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(e,t,r){let n=e("../base-xform"),i=a=>a!==void 0;t.exports=class extends n{get tag(){return "outlinePr"}render(a,s){return !(!s||!i(s.summaryBelow)&&!i(s.summaryRight))&&(a.leafNode(this.tag,{summaryBelow:i(s.summaryBelow)?Number(s.summaryBelow):void 0,summaryRight:i(s.summaryRight)?Number(s.summaryRight):void 0}),true)}parseOpen(a){return a.name===this.tag&&(this.model={summaryBelow:i(a.attributes.summaryBelow)?!!Number(a.attributes.summaryBelow):void 0,summaryRight:i(a.attributes.summaryRight)?!!Number(a.attributes.summaryRight):void 0},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],102:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "brk"}render(i,a){i.leafNode("brk",a);}parseOpen(i){return i.name==="brk"&&(this.model=i.attributes.ref,true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],103:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../base-xform");t.exports=class extends i{get tag(){return "pageMargins"}render(a,s){if(s){let o={left:s.left,right:s.right,top:s.top,bottom:s.bottom,header:s.header,footer:s.footer};n.some(o,l=>l!==void 0)&&a.leafNode(this.tag,o);}}parseOpen(a){return a.name===this.tag?(this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},true):false}parseText(){}parseClose(){return false}};},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "pageSetUpPr"}render(i,a){return !(!a||!a.fitToPage)&&(i.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),true)}parseOpen(i){return i.name===this.tag&&(this.model={fitToPage:i.attributes.fitToPage==="1"},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],105:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../base-xform");function a(f){return f?"1":void 0}function s(f){if(f==="overThenDown")return f}function o(f){switch(f){case "atEnd":case "asDisplyed":return f;default:return}}function l(f){switch(f){case "dash":case "blank":case "NA":return f;default:return}}t.exports=class extends i{get tag(){return "pageSetup"}render(f,u){if(u){let c={paperSize:u.paperSize,orientation:u.orientation,horizontalDpi:u.horizontalDpi,verticalDpi:u.verticalDpi,pageOrder:s(u.pageOrder),blackAndWhite:a(u.blackAndWhite),draft:a(u.draft),cellComments:o(u.cellComments),errors:l(u.errors),scale:u.scale,fitToWidth:u.fitToWidth,fitToHeight:u.fitToHeight,firstPageNumber:u.firstPageNumber,useFirstPageNumber:a(u.firstPageNumber),usePrinterDefaults:a(u.usePrinterDefaults),copies:u.copies};n.some(c,d=>d!==void 0)&&f.leafNode(this.tag,c);}}parseOpen(f){if(f.name===this.tag)return this.model={paperSize:(u=f.attributes.paperSize,u!==void 0?parseInt(u,10):void 0),orientation:f.attributes.orientation||"portrait",horizontalDpi:parseInt(f.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(f.attributes.verticalDpi||"4294967295",10),pageOrder:f.attributes.pageOrder||"downThenOver",blackAndWhite:f.attributes.blackAndWhite==="1",draft:f.attributes.draft==="1",cellComments:f.attributes.cellComments||"None",errors:f.attributes.errors||"displayed",scale:parseInt(f.attributes.scale||"100",10),fitToWidth:parseInt(f.attributes.fitToWidth||"1",10),fitToHeight:parseInt(f.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(f.attributes.firstPageNumber||"1",10),useFirstPageNumber:f.attributes.useFirstPageNumber==="1",usePrinterDefaults:f.attributes.usePrinterDefaults==="1",copies:parseInt(f.attributes.copies||"1",10)},true;return false;var u;}parseText(){}parseClose(){return false}};},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "picture"}render(i,a){a&&i.leafNode(this.tag,{"r:id":a.rId});}parseOpen(i){return i.name===this.tag?(this.model={rId:i.attributes["r:id"]},true):false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],107:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../base-xform");function a(s){return s?"1":void 0}t.exports=class extends i{get tag(){return "printOptions"}render(s,o){if(o){let l={headings:a(o.showRowColHeaders),gridLines:a(o.showGridLines),horizontalCentered:a(o.horizontalCentered),verticalCentered:a(o.verticalCentered)};n.some(l,f=>f!==void 0)&&s.leafNode(this.tag,l);}}parseOpen(s){return s.name===this.tag?(this.model={showRowColHeaders:s.attributes.headings==="1",showGridLines:s.attributes.gridLines==="1",horizontalCentered:s.attributes.horizontalCentered==="1",verticalCentered:s.attributes.verticalCentered==="1"},true):false}parseText(){}parseClose(){return false}};},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(e,t,r){let n=e("./page-breaks-xform"),i=e("../list-xform");t.exports=class extends i{constructor(){super({tag:"rowBreaks",count:true,childXform:new n});}render(a,s){if(s&&s.length){a.openNode(this.tag,this.$),this.count&&(a.addAttribute(this.$count,s.length),a.addAttribute("manualBreakCount",s.length));let{childXform:o}=this;s.forEach(l=>{o.render(a,l);}),a.closeNode();}else this.empty&&a.leafNode(this.tag);}};},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(e,t,r){let n=e("../base-xform"),i=e("../../../utils/utils"),a=e("./cell-xform");t.exports=class extends n{constructor(s){super(),this.maxItems=s&&s.maxItems,this.map={c:new a};}get tag(){return "row"}prepare(s,o){let l=o.styles.addStyleModel(s.style);l&&(s.styleId=l);let f=this.map.c;s.cells.forEach(u=>{f.prepare(u,o);});}render(s,o,l){s.openNode("row"),s.addAttribute("r",o.number),o.height&&(s.addAttribute("ht",o.height),s.addAttribute("customHeight","1")),o.hidden&&s.addAttribute("hidden","1"),o.min>0&&o.max>0&&o.min<=o.max&&s.addAttribute("spans",`${o.min}:${o.max}`),o.styleId&&(s.addAttribute("s",o.styleId),s.addAttribute("customFormat","1")),s.addAttribute("x14ac:dyDescent","0.25"),o.outlineLevel&&s.addAttribute("outlineLevel",o.outlineLevel),o.collapsed&&s.addAttribute("collapsed","1");let f=this.map.c;o.cells.forEach(u=>{f.render(s,u,l);}),s.closeNode();}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),true;if(s.name==="row"){this.numRowsSeen+=1;let o=s.attributes.spans?s.attributes.spans.split(":").map(f=>parseInt(f,10)):[void 0,void 0],l=this.model={number:parseInt(s.attributes.r,10),min:o[0],max:o[1],cells:[]};return s.attributes.s&&(l.styleId=parseInt(s.attributes.s,10)),i.parseBoolean(s.attributes.hidden)&&(l.hidden=true),i.parseBoolean(s.attributes.bestFit)&&(l.bestFit=true),s.attributes.ht&&(l.height=parseFloat(s.attributes.ht)),s.attributes.outlineLevel&&(l.outlineLevel=parseInt(s.attributes.outlineLevel,10)),i.parseBoolean(s.attributes.collapsed)&&(l.collapsed=true),true}return this.parser=this.map[s.name],!!this.parser&&(this.parser.parseOpen(s),true)}parseText(s){this.parser&&this.parser.parseText(s);}parseClose(s){if(this.parser){if(!this.parser.parseClose(s)){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 true}return false}reconcile(s,o){s.style=s.styleId?o.styles.getStyleModel(s.styleId):{},s.styleId!==void 0&&(s.styleId=void 0);let l=this.map.c;s.cells.forEach(f=>{l.reconcile(f,o);});}};},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../base-xform");t.exports=class extends i{get tag(){return "sheetFormatPr"}render(a,s){if(s){let o={defaultRowHeight:s.defaultRowHeight,outlineLevelRow:s.outlineLevelRow,outlineLevelCol:s.outlineLevelCol,"x14ac:dyDescent":s.dyDescent};s.defaultColWidth&&(o.defaultColWidth=s.defaultColWidth),s.defaultRowHeight&&s.defaultRowHeight===15||(o.customHeight="1"),n.some(o,l=>l!==void 0)&&a.leafNode("sheetFormatPr",o);}}parseOpen(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),true)}parseText(){}parseClose(){return false}};},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(e,t,r){let n=e("../base-xform"),i=e("../style/color-xform"),a=e("./page-setup-properties-xform"),s=e("./outline-properties-xform");t.exports=class extends n{constructor(){super(),this.map={tabColor:new i("tabColor"),pageSetUpPr:new a,outlinePr:new s};}get tag(){return "sheetPr"}render(o,l){if(l){o.addRollback(),o.openNode("sheetPr");let f=false;f=this.map.tabColor.render(o,l.tabColor)||f,f=this.map.pageSetUpPr.render(o,l.pageSetup)||f,f=this.map.outlinePr.render(o,l.outlineProperties)||f,f?(o.closeNode(),o.commit()):o.rollback();}}parseOpen(o){return this.parser?(this.parser.parseOpen(o),true):o.name===this.tag?(this.reset(),true):!!this.map[o.name]&&(this.parser=this.map[o.name],this.parser.parseOpen(o),true)}parseText(o){return !!this.parser&&(this.parser.parseText(o),true)}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.parser=void 0),true):(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,false)}};},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../base-xform");function a(o,l){return o?l:void 0}function s(o,l){return o===l||void 0}t.exports=class extends i{get tag(){return "sheetProtection"}render(o,l){if(l){let f={sheet:a(l.sheet,"1"),selectLockedCells:l.selectLockedCells===false?"1":void 0,selectUnlockedCells:l.selectUnlockedCells===false?"1":void 0,formatCells:a(l.formatCells,"0"),formatColumns:a(l.formatColumns,"0"),formatRows:a(l.formatRows,"0"),insertColumns:a(l.insertColumns,"0"),insertRows:a(l.insertRows,"0"),insertHyperlinks:a(l.insertHyperlinks,"0"),deleteColumns:a(l.deleteColumns,"0"),deleteRows:a(l.deleteRows,"0"),sort:a(l.sort,"0"),autoFilter:a(l.autoFilter,"0"),pivotTables:a(l.pivotTables,"0")};l.sheet&&(f.algorithmName=l.algorithmName,f.hashValue=l.hashValue,f.saltValue=l.saltValue,f.spinCount=l.spinCount,f.objects=a(l.objects===false,"1"),f.scenarios=a(l.scenarios===false,"1")),n.some(f,u=>u!==void 0)&&o.leafNode(this.tag,f);}}parseOpen(o){return o.name===this.tag?(this.model={sheet:s(o.attributes.sheet,"1"),objects:o.attributes.objects!=="1"&&void 0,scenarios:o.attributes.scenarios!=="1"&&void 0,selectLockedCells:o.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:o.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:s(o.attributes.formatCells,"0"),formatColumns:s(o.attributes.formatColumns,"0"),formatRows:s(o.attributes.formatRows,"0"),insertColumns:s(o.attributes.insertColumns,"0"),insertRows:s(o.attributes.insertRows,"0"),insertHyperlinks:s(o.attributes.insertHyperlinks,"0"),deleteColumns:s(o.attributes.deleteColumns,"0"),deleteRows:s(o.attributes.deleteRows,"0"),sort:s(o.attributes.sort,"0"),autoFilter:s(o.attributes.autoFilter,"0"),pivotTables:s(o.attributes.pivotTables,"0")},o.attributes.algorithmName&&(this.model.algorithmName=o.attributes.algorithmName,this.model.hashValue=o.attributes.hashValue,this.model.saltValue=o.attributes.saltValue,this.model.spinCount=parseInt(o.attributes.spinCount,10)),true):false}parseText(){}parseClose(){return false}};},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(e,t,r){let n=e("../../../utils/col-cache"),i=e("../base-xform"),a={frozen:"frozen",frozenSplit:"frozen",split:"split"};t.exports=class extends i{get tag(){return "sheetView"}prepare(s){switch(s.state){case "frozen":case "split":break;default:s.state="normal";}}render(s,o){s.openNode("sheetView",{workbookViewId:o.workbookViewId||0});let l=function(p,h,m){m&&s.addAttribute(p,h);},f,u,c,d;switch(l("rightToLeft","1",o.rightToLeft===true),l("tabSelected","1",o.tabSelected),l("showRuler","0",o.showRuler===false),l("showRowColHeaders","0",o.showRowColHeaders===false),l("showGridLines","0",o.showGridLines===false),l("zoomScale",o.zoomScale,o.zoomScale),l("zoomScaleNormal",o.zoomScaleNormal,o.zoomScaleNormal),l("view",o.style,o.style),o.state){case "frozen":u=o.xSplit||0,c=o.ySplit||0,f=o.topLeftCell||n.getAddress(c+1,u+1).address,d=(o.xSplit&&o.ySplit?"bottomRight":o.xSplit&&"topRight")||"bottomLeft",s.leafNode("pane",{xSplit:o.xSplit||void 0,ySplit:o.ySplit||void 0,topLeftCell:f,activePane:d,state:"frozen"}),s.leafNode("selection",{pane:d,activeCell:o.activeCell,sqref:o.activeCell});break;case "split":o.activePane==="topLeft"&&(o.activePane=void 0),s.leafNode("pane",{xSplit:o.xSplit||void 0,ySplit:o.ySplit||void 0,topLeftCell:o.topLeftCell,activePane:o.activePane}),s.leafNode("selection",{pane:o.activePane,activeCell:o.activeCell,sqref:o.activeCell});break;case "normal":o.activeCell&&s.leafNode("selection",{activeCell:o.activeCell,sqref:o.activeCell});}s.closeNode();}parseOpen(s){switch(s.name){case "sheetView":return this.sheetView={workbookViewId:parseInt(s.attributes.workbookViewId,10),rightToLeft:s.attributes.rightToLeft==="1",tabSelected:s.attributes.tabSelected==="1",showRuler:s.attributes.showRuler!=="0",showRowColHeaders:s.attributes.showRowColHeaders!=="0",showGridLines:s.attributes.showGridLines!=="0",zoomScale:parseInt(s.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(s.attributes.zoomScaleNormal||"100",10),style:s.attributes.view},this.pane=void 0,this.selections={},true;case "pane":return this.pane={xSplit:parseInt(s.attributes.xSplit||"0",10),ySplit:parseInt(s.attributes.ySplit||"0",10),topLeftCell:s.attributes.topLeftCell,activePane:s.attributes.activePane||"topLeft",state:s.attributes.state},true;case "selection":{let o=s.attributes.pane||"topLeft";return this.selections[o]={pane:o,activeCell:s.attributes.activeCell},true}default:return false}}parseText(){}parseClose(s){let o,l;return s==="sheetView"?(this.sheetView&&this.pane?(o=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:a[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(o.activePane=this.pane.activePane),l=this.selections[this.pane.activePane],l&&l.activeCell&&(o.activeCell=l.activeCell),this.sheetView.style&&(o.style=this.sheetView.style)):(o=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},l=this.selections.topLeft,l&&l.activeCell&&(o.activeCell=l.activeCell),this.sheetView.style&&(o.style=this.sheetView.style)),false):true}reconcile(){}};},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "tablePart"}render(i,a){a&&i.leafNode(this.tag,{"r:id":a.rId});}parseOpen(i){return i.name===this.tag?(this.model={rId:i.attributes["r:id"]},true):false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],115:[function(e,t,r){let n=e("../../../utils/under-dash"),i=e("../../../utils/col-cache"),a=e("../../../utils/xml-stream"),s=e("../../rel-type"),o=e("./merges"),l=e("../base-xform"),f=e("../list-xform"),u=e("./row-xform"),c=e("./col-xform"),d=e("./dimension-xform"),p=e("./hyperlink-xform"),h=e("./merge-cell-xform"),m=e("./data-validations-xform"),g=e("./sheet-properties-xform"),v=e("./sheet-format-properties-xform"),w=e("./sheet-view-xform"),C=e("./sheet-protection-xform"),T=e("./page-margins-xform"),I=e("./page-setup-xform"),k=e("./print-options-xform"),D=e("./auto-filter-xform"),j=e("./picture-xform"),F=e("./drawing-xform"),B=e("./table-part-xform"),E=e("./row-breaks-xform"),M=e("./header-footer-xform"),L=e("./cf/conditional-formattings-xform"),b=e("./ext-lst-xform"),y=(_,S)=>{if(!S||!S.length)return _;if(!_||!_.length)return S;let R={},z={};return _.forEach(U=>{R[U.ref]=U,U.rules.forEach(H=>{let{x14Id:q}=H;q&&(z[q]=H);});}),S.forEach(U=>{U.rules.forEach(H=>{let q=z[H.x14Id];q?((N,V)=>{Object.keys(V).forEach(O=>{let A=N[O],P=V[O];A===void 0&&P!==void 0&&(N[O]=P);});})(q,H):R[U.ref]?R[U.ref].rules.push(H):_.push({ref:U.ref,rules:[H]});});}),_};class x extends l{constructor(S){super();let{maxRows:R,maxCols:z,ignoreNodes:U}=S||{};this.ignoreNodes=U||[],this.map={sheetPr:new g,dimension:new d,sheetViews:new f({tag:"sheetViews",count:false,childXform:new w}),sheetFormatPr:new v,cols:new f({tag:"cols",count:false,childXform:new c}),sheetData:new f({tag:"sheetData",count:false,empty:true,childXform:new u({maxItems:z}),maxItems:R}),autoFilter:new D,mergeCells:new f({tag:"mergeCells",count:true,childXform:new h}),rowBreaks:new E,hyperlinks:new f({tag:"hyperlinks",count:false,childXform:new p}),pageMargins:new T,dataValidations:new m,pageSetup:new I,headerFooter:new M,printOptions:new k,picture:new j,drawing:new F,sheetProtection:new C,tableParts:new f({tag:"tableParts",count:true,childXform:new B}),conditionalFormatting:new L,extLst:new b};}prepare(S,R){R.merges=new o,S.hyperlinks=R.hyperlinks=[],S.comments=R.comments=[],R.formulae={},R.siFormulae=0,this.map.cols.prepare(S.cols,R),this.map.sheetData.prepare(S.rows,R),this.map.conditionalFormatting.prepare(S.conditionalFormattings,R),S.mergeCells=R.merges.mergeCells;let z=S.rels=[];function U(N){return "rId"+(N.length+1)}if(S.hyperlinks.forEach(N=>{let V=U(z);N.rId=V,z.push({Id:V,Type:s.Hyperlink,Target:N.target,TargetMode:"External"});}),S.comments.length>0){let N={Id:U(z),Type:s.Comments,Target:`../comments${S.id}.xml`};z.push(N);let V={Id:U(z),Type:s.VmlDrawing,Target:`../drawings/vmlDrawing${S.id}.vml`};z.push(V),S.comments.forEach(O=>{O.refAddress=i.decodeAddress(O.ref);}),R.commentRefs.push({commentName:"comments"+S.id,vmlDrawing:"vmlDrawing"+S.id});}let H=[],q;S.media.forEach(N=>{if(N.type==="background"){let V=U(z);q=R.media[N.imageId],z.push({Id:V,Type:s.Image,Target:`../media/${q.name}.${q.extension}`}),S.background={rId:V},S.image=R.media[N.imageId];}else if(N.type==="image"){let{drawing:V}=S;q=R.media[N.imageId],V||(V=S.drawing={rId:U(z),name:"drawing"+ ++R.drawingsCount,anchors:[],rels:[]},R.drawings.push(V),z.push({Id:V.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${V.name}.xml`}));let O=this.preImageId===N.imageId?H[N.imageId]:H[V.rels.length];O||(O=U(V.rels),H[V.rels.length]=O,V.rels.push({Id:O,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${q.name}.${q.extension}`}));let A={picture:{rId:O},range:N.range};if(N.hyperlinks&&N.hyperlinks.hyperlink){let P=U(V.rels);H[V.rels.length]=P,A.picture.hyperlinks={tooltip:N.hyperlinks.tooltip,rId:P},V.rels.push({Id:P,Type:s.Hyperlink,Target:N.hyperlinks.hyperlink,TargetMode:"External"});}this.preImageId=N.imageId,V.anchors.push(A);}}),S.tables.forEach(N=>{let V=U(z);N.rId=V,z.push({Id:V,Type:s.Table,Target:"../tables/"+N.target}),N.columns.forEach(O=>{let{style:A}=O;A&&(O.dxfId=R.styles.addDxfStyle(A));});}),this.map.extLst.prepare(S,R);}render(S,R){S.openXml(a.StdDocAttributes),S.openNode("worksheet",x.WORKSHEET_ATTRIBUTES);let z=R.properties?{defaultRowHeight:R.properties.defaultRowHeight,dyDescent:R.properties.dyDescent,outlineLevelCol:R.properties.outlineLevelCol,outlineLevelRow:R.properties.outlineLevelRow}:void 0;R.properties&&R.properties.defaultColWidth&&(z.defaultColWidth=R.properties.defaultColWidth);let U={outlineProperties:R.properties&&R.properties.outlineProperties,tabColor:R.properties&&R.properties.tabColor,pageSetup:R.pageSetup&&R.pageSetup.fitToPage?{fitToPage:R.pageSetup.fitToPage}:void 0},H=R.pageSetup&&R.pageSetup.margins,q={showRowColHeaders:R.pageSetup&&R.pageSetup.showRowColHeaders,showGridLines:R.pageSetup&&R.pageSetup.showGridLines,horizontalCentered:R.pageSetup&&R.pageSetup.horizontalCentered,verticalCentered:R.pageSetup&&R.pageSetup.verticalCentered},N=R.sheetProtection;this.map.sheetPr.render(S,U),this.map.dimension.render(S,R.dimensions),this.map.sheetViews.render(S,R.views),this.map.sheetFormatPr.render(S,z),this.map.cols.render(S,R.cols),this.map.sheetData.render(S,R.rows),this.map.sheetProtection.render(S,N),this.map.autoFilter.render(S,R.autoFilter),this.map.mergeCells.render(S,R.mergeCells),this.map.conditionalFormatting.render(S,R.conditionalFormattings),this.map.dataValidations.render(S,R.dataValidations),this.map.hyperlinks.render(S,R.hyperlinks),this.map.printOptions.render(S,q),this.map.pageMargins.render(S,H),this.map.pageSetup.render(S,R.pageSetup),this.map.headerFooter.render(S,R.headerFooter),this.map.rowBreaks.render(S,R.rowBreaks),this.map.drawing.render(S,R.drawing),this.map.picture.render(S,R.background),this.map.tableParts.render(S,R.tables),this.map.extLst.render(S,R),R.rels&&R.rels.forEach(V=>{V.Type===s.VmlDrawing&&S.leafNode("legacyDrawing",{"r:id":V.Id});}),S.closeNode();}parseOpen(S){return this.parser?(this.parser.parseOpen(S),true):S.name==="worksheet"?(n.each(this.map,R=>{R.reset();}),true):(this.map[S.name]&&!this.ignoreNodes.includes(S.name)&&(this.parser=this.map[S.name],this.parser.parseOpen(S)),true)}parseText(S){this.parser&&this.parser.parseText(S);}parseClose(S){if(this.parser)return this.parser.parseClose(S)||(this.parser=void 0),true;if(S==="worksheet"){let R=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(R.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(R.outlineProperties=this.map.sheetPr.model.outlineProperties);let z={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||false,margins:this.map.pageMargins.model},U=Object.assign(z,this.map.pageSetup.model,this.map.printOptions.model),H=y(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:R,views:this.map.sheetViews.model,pageSetup:U,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:H},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),false}else return true}reconcile(S,R){let z=(S.relationships||[]).reduce((H,q)=>{if(H[q.Id]=q,q.Type===s.Comments&&(S.comments=R.comments[q.Target].comments),q.Type===s.VmlDrawing&&S.comments&&S.comments.length){let N=R.vmlDrawings[q.Target].comments;S.comments.forEach((V,O)=>{V.note=Object.assign({},V.note,N[O]);});}return H},{});if(R.commentsMap=(S.comments||[]).reduce((H,q)=>(q.ref&&(H[q.ref]=q),H),{}),R.hyperlinkMap=(S.hyperlinks||[]).reduce((H,q)=>(q.rId&&(H[q.address]=z[q.rId].Target),H),{}),R.formulae={},S.rows=S.rows&&S.rows.filter(Boolean)||[],S.rows.forEach(H=>{H.cells=H.cells&&H.cells.filter(Boolean)||[];}),this.map.cols.reconcile(S.cols,R),this.map.sheetData.reconcile(S.rows,R),this.map.conditionalFormatting.reconcile(S.conditionalFormattings,R),S.media=[],S.drawing){let H=z[S.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(H){let q=H[1];R.drawings[q].anchors.forEach(N=>{if(N.medium){let V={type:"image",imageId:N.medium.index,range:N.range,hyperlinks:N.picture.hyperlinks};S.media.push(V);}});}}let U=S.background&&z[S.background.rId];if(U){let H=U.Target.split("/media/")[1],q=R.mediaIndex&&R.mediaIndex[H];q!==void 0&&S.media.push({type:"background",imageId:q});}S.tables=(S.tables||[]).map(H=>{let q=z[H.rId];return R.tables[q.Target]}),delete S.relationships,delete S.hyperlinks,delete S.comments;}}x.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=x;},{"../../../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){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr;}render(i,a){a&&(i.openNode(this.tag),i.closeNode());}parseOpen(i){i.name===this.tag&&(this.model=true);}parseText(){}parseClose(){return false}};},{"../base-xform":32}],117:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs,this._format=i.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return ""}},this._parse=i.parse||function(a){return new Date(a)};}render(i,a){a&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,this._format(a)):i.writeText(this._format(a)),i.closeNode());}parseOpen(i){i.name===this.tag&&(this.attr?this.model=this._parse(i.attributes[this.attr]):this.text=[]);}parseText(i){this.attr||this.text.push(i);}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),false}};},{"../base-xform":32}],118:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs,this.zero=i.zero;}render(i,a){(a||this.zero)&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,a):i.writeText(a),i.closeNode());}parseOpen(i){return i.name===this.tag&&(this.attr?this.model=parseInt(i.attributes[this.attr],10):this.text=[],true)}parseText(i){this.attr||this.text.push(i);}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),false}};},{"../base-xform":32}],119:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.tag=i.tag,this.attr=i.attr,this.attrs=i.attrs;}render(i,a){a!==void 0&&(i.openNode(this.tag),this.attrs&&i.addAttributes(this.attrs),this.attr?i.addAttribute(this.attr,a):i.writeText(a),i.closeNode());}parseOpen(i){i.name===this.tag&&(this.attr?this.model=i.attributes[this.attr]:this.text=[]);}parseText(i){this.attr||this.text.push(i);}parseClose(){return this.attr||(this.model=this.text.join("")),false}};},{"../base-xform":32}],120:[function(e,t,r){let n=e("./base-xform"),i=e("../../utils/xml-stream");t.exports=class extends n{constructor(a){super(),this._model=a;}render(a){if(!this._xml){let s=new i;((function o(l,f){l.openNode(f.tag,f.$),f.c&&f.c.forEach(u=>{o(l,u);}),f.t&&l.writeText(f.t),l.closeNode();}))(s,this._model),this._xml=s.xml;}a.writeXml(this._xml);}parseOpen(){return true}parseText(){}parseClose(a){return a!==this._model.tag}};},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(e,t,r){let n=e("./text-xform"),i=e("./rich-text-xform"),a=e("../base-xform");t.exports=class extends a{constructor(){super(),this.map={r:new i,t:new n};}get tag(){return "rPh"}render(s,o){if(s.openNode(this.tag,{sb:o.sb||0,eb:o.eb||0}),o&&o.hasOwnProperty("richText")&&o.richText){let{r:l}=this.map;o.richText.forEach(f=>{l.render(s,f);});}else o&&this.map.t.render(s,o.text);s.closeNode();}parseOpen(s){let{name:o}=s;return this.parser?(this.parser.parseOpen(s),true):o===this.tag?(this.model={sb:parseInt(s.attributes.sb,10),eb:parseInt(s.attributes.eb,10)},true):(this.parser=this.map[o],!!this.parser&&(this.parser.parseOpen(s),true))}parseText(s){this.parser&&this.parser.parseText(s);}parseClose(s){if(this.parser){if(!this.parser.parseClose(s)){switch(s){case "r":{let o=this.model.richText;o||(o=this.model.richText=[]),o.push(this.parser.model);break}case "t":this.model.text=this.parser.model;}this.parser=void 0;}return true}return s!==this.tag}};},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(e,t,r){let n=e("./text-xform"),i=e("../style/font-xform"),a=e("../base-xform");class s extends a{constructor(l){super(),this.model=l;}get tag(){return "r"}get textXform(){return this._textXform||(this._textXform=new n)}get fontXform(){return this._fontXform||(this._fontXform=new i(s.FONT_OPTIONS))}render(l,f){f=f||this.model,l.openNode("r"),f.font&&this.fontXform.render(l,f.font),this.textXform.render(l,f.text),l.closeNode();}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),true;switch(l.name){case "r":return this.model={},true;case "t":return this.parser=this.textXform,this.parser.parseOpen(l),true;case "rPr":return this.parser=this.fontXform,this.parser.parseOpen(l),true;default:return false}}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){switch(l){case "r":return false;case "t":return this.model.text=this.parser.model,this.parser=void 0,true;case "rPr":return this.model.font=this.parser.model,this.parser=void 0,true;default:return this.parser&&this.parser.parseClose(l),true}}}s.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},t.exports=s;},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(e,t,r){let n=e("./text-xform"),i=e("./rich-text-xform"),a=e("./phonetic-text-xform"),s=e("../base-xform");t.exports=class extends s{constructor(o){super(),this.model=o,this.map={r:new i,t:new n,rPh:new a};}get tag(){return "si"}render(o,l){o.openNode(this.tag),l&&l.hasOwnProperty("richText")&&l.richText?l.richText.length?l.richText.forEach(f=>{this.map.r.render(o,f);}):this.map.t.render(o,""):l!=null&&this.map.t.render(o,l),o.closeNode();}parseOpen(o){let{name:l}=o;return this.parser?(this.parser.parseOpen(o),true):l===this.tag?(this.model={},true):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(o),true))}parseText(o){this.parser&&this.parser.parseText(o);}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)){switch(o){case "r":{let l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break}case "t":this.model=this.parser.model;}this.parser=void 0;}return true}return o!==this.tag}};},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("./shared-string-xform");t.exports=class extends i{constructor(s){super(),this.model=s||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null);}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new a)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(s){return this.model.values[s]}add(s){return s.richText?this.addRichText(s):this.addText(s)}addText(s){let o=this.hash[s];return o===void 0&&(o=this.hash[s]=this.model.values.length,this.model.values.push(s)),this.model.count++,o}addRichText(s){let o=this.sharedStringXform.toXml(s),l=this.rich[o];return l===void 0&&(l=this.rich[o]=this.model.values.length,this.model.values.push(s)),this.model.count++,l}render(s,o){o=o||this._values,s.openXml(n.StdDocAttributes),s.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:o.count,uniqueCount:o.values.length});let l=this.sharedStringXform;o.values.forEach(f=>{l.render(s,f);}),s.closeNode();}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),true;switch(s.name){case "sst":return true;case "si":return this.parser=this.sharedStringXform,this.parser.parseOpen(s),true;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s);}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),true;if(s==="sst")return false;throw new Error("Unexpected xml node in parseClose: "+s)}};},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "t"}render(i,a){i.openNode("t"),/^\s|\n|\s$/.test(a)&&i.addAttribute("xml:space","preserve"),i.writeText(a),i.closeNode();}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(i,a)=>String.fromCharCode(parseInt(a,16)))}parseOpen(i){return i.name==="t"?(this._text=[],true):false}parseText(i){this._text.push(i);}parseClose(){return false}};},{"../base-xform":32}],126:[function(e,t,r){let n=e("../../../doc/enums"),i=e("../../../utils/utils"),a=e("../base-xform"),s={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((l,f)=>(l[f]=true,l),{}),horizontal(l){return this.horizontalValues[l]?l:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((l,f)=>(l[f]=true,l),{}),vertical(l){return l==="middle"?"center":this.verticalValues[l]?l:void 0},wrapText:l=>!!l||void 0,shrinkToFit:l=>!!l||void 0,textRotation(l){return l==="vertical"||(l=i.validInt(l))>=-90&&l<=90?l:void 0},indent:l=>(l=i.validInt(l),Math.max(0,l)),readingOrder(l){switch(l){case "ltr":return n.ReadingOrder.LeftToRight;case "rtl":return n.ReadingOrder.RightToLeft;default:return}}},o={toXml(l){if(l=s.textRotation(l)){if(l==="vertical")return 255;let f=Math.round(l);if(f>=0&&f<=90)return f;if(f<0&&f>=-90)return 90-f}},toModel(l){let f=i.validInt(l);if(f!==void 0){if(f===255)return "vertical";if(f>=0&&f<=90)return f;if(f>90&&f<=180)return 90-f}}};t.exports=class extends a{get tag(){return "alignment"}render(l,f){l.addRollback(),l.openNode("alignment");let u=false;function c(d,p){p&&(l.addAttribute(d,p),u=true);}c("horizontal",s.horizontal(f.horizontal)),c("vertical",s.vertical(f.vertical)),c("wrapText",!!s.wrapText(f.wrapText)&&"1"),c("shrinkToFit",!!s.shrinkToFit(f.shrinkToFit)&&"1"),c("indent",s.indent(f.indent)),c("textRotation",o.toXml(f.textRotation)),c("readingOrder",s.readingOrder(f.readingOrder)),l.closeNode(),u?l.commit():l.rollback();}parseOpen(l){let f={},u=false;function c(d,p,h){d&&(f[p]=h,u=true);}c(l.attributes.horizontal,"horizontal",l.attributes.horizontal),c(l.attributes.vertical,"vertical",l.attributes.vertical==="center"?"middle":l.attributes.vertical),c(l.attributes.wrapText,"wrapText",i.parseBoolean(l.attributes.wrapText)),c(l.attributes.shrinkToFit,"shrinkToFit",i.parseBoolean(l.attributes.shrinkToFit)),c(l.attributes.indent,"indent",parseInt(l.attributes.indent,10)),c(l.attributes.textRotation,"textRotation",o.toModel(l.attributes.textRotation)),c(l.attributes.readingOrder,"readingOrder",l.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=u?f:null;}parseText(){}parseClose(){return false}};},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(e,t,r){let n=e("../base-xform"),i=e("../../../utils/utils"),a=e("./color-xform");class s extends n{constructor(l){super(),this.name=l,this.map={color:new a};}get tag(){return this.name}render(l,f,u){let c=f&&f.color||u||this.defaultColor;l.openNode(this.name),f&&f.style&&(l.addAttribute("style",f.style),c&&this.map.color.render(l,c)),l.closeNode();}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),true;switch(l.name){case this.name:{let{style:f}=l.attributes;return this.model=f?{style:f}:void 0,true}case "color":return this.parser=this.map.color,this.parser.parseOpen(l),true;default:return false}}parseText(l){this.parser&&this.parser.parseText(l);}parseClose(l){return this.parser?(this.parser.parseClose(l)||(this.parser=void 0),true):(l===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),false)}validStyle(l){return s.validStyleValues[l]}}s.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((o,l)=>(o[l]=true,o),{}),t.exports=class extends n{constructor(){super(),this.map={top:new s("top"),left:new s("left"),bottom:new s("bottom"),right:new s("right"),diagonal:new s("diagonal")};}render(o,l){let{color:f}=l;function u(c,d){c&&!c.color&&l.color&&(c={...c,color:l.color}),d.render(o,c,f);}o.openNode("border"),l.diagonal&&l.diagonal.style&&(l.diagonal.up&&o.addAttribute("diagonalUp","1"),l.diagonal.down&&o.addAttribute("diagonalDown","1")),u(l.left,this.map.left),u(l.right,this.map.right),u(l.top,this.map.top),u(l.bottom,this.map.bottom),u(l.diagonal,this.map.diagonal),o.closeNode();}parseOpen(o){return this.parser?(this.parser.parseOpen(o),true):o.name==="border"?(this.reset(),this.diagonalUp=i.parseBoolean(o.attributes.diagonalUp),this.diagonalDown=i.parseBoolean(o.attributes.diagonalDown),true):(this.parser=this.map[o.name],!!this.parser&&(this.parser.parseOpen(o),true))}parseText(o){this.parser&&this.parser.parseText(o);}parseClose(o){if(this.parser)return this.parser.parseClose(o)||(this.parser=void 0),true;if(o==="border"){let l=this.model={},f=function(u,c,d){c&&(d&&Object.assign(c,d),l[u]=c);};f("left",this.map.left.model),f("right",this.map.right.model),f("top",this.map.top.model),f("bottom",this.map.bottom.model),f("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown});}return false}};},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{constructor(i){super(),this.name=i||"color";}get tag(){return this.name}render(i,a){return !!a&&(i.openNode(this.name),a.argb?i.addAttribute("rgb",a.argb):a.theme!==void 0?(i.addAttribute("theme",a.theme),a.tint!==void 0&&i.addAttribute("tint",a.tint)):a.indexed!==void 0?i.addAttribute("indexed",a.indexed):i.addAttribute("auto","1"),i.closeNode(),true)}parseOpen(i){return i.name===this.name&&(i.attributes.rgb?this.model={argb:i.attributes.rgb}:i.attributes.theme?(this.model={theme:parseInt(i.attributes.theme,10)},i.attributes.tint&&(this.model.tint=parseFloat(i.attributes.tint))):i.attributes.indexed?this.model={indexed:parseInt(i.attributes.indexed,10)}:this.model=void 0,true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],129:[function(e,t,r){let n=e("../base-xform"),i=e("./alignment-xform"),a=e("./border-xform"),s=e("./fill-xform"),o=e("./font-xform"),l=e("./numfmt-xform"),f=e("./protection-xform");t.exports=class extends n{constructor(){super(),this.map={alignment:new i,border:new a,fill:new s,font:new o,numFmt:new l,protection:new f};}get tag(){return "dxf"}render(u,c){if(u.openNode(this.tag),c.font&&this.map.font.render(u,c.font),c.numFmt&&c.numFmtId){let d={id:c.numFmtId,formatCode:c.numFmt};this.map.numFmt.render(u,d);}c.fill&&this.map.fill.render(u,c.fill),c.alignment&&this.map.alignment.render(u,c.alignment),c.border&&this.map.border.render(u,c.border),c.protection&&this.map.protection.render(u,c.protection),u.closeNode();}parseOpen(u){return this.parser?(this.parser.parseOpen(u),true):u.name===this.tag?(this.reset(),true):(this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u),true)}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),true):u!==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},false)}};},{"../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){let n=e("../base-xform"),i=e("./color-xform");class a extends n{constructor(){super(),this.map={color:new i};}get tag(){return "stop"}render(u,c){u.openNode("stop"),u.addAttribute("position",c.position),this.map.color.render(u,c.color),u.closeNode();}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),true;switch(u.name){case "stop":return this.model={position:parseFloat(u.attributes.position)},true;case "color":return this.parser=this.map.color,this.parser.parseOpen(u),true;default:return false}}parseText(){}parseClose(u){return !!this.parser&&(this.parser.parseClose(u)||(this.model.color=this.parser.model,this.parser=void 0),true)}}class s extends n{constructor(){super(),this.map={fgColor:new i("fgColor"),bgColor:new i("bgColor")};}get name(){return "pattern"}get tag(){return "patternFill"}render(u,c){u.openNode("patternFill"),u.addAttribute("patternType",c.pattern),c.fgColor&&this.map.fgColor.render(u,c.fgColor),c.bgColor&&this.map.bgColor.render(u,c.bgColor),u.closeNode();}parseOpen(u){return this.parser?(this.parser.parseOpen(u),true):u.name==="patternFill"?(this.model={type:"pattern",pattern:u.attributes.patternType},true):(this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),true))}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return !!this.parser&&(this.parser.parseClose(u)||(this.parser.model&&(this.model[u]=this.parser.model),this.parser=void 0),true)}}class o extends n{constructor(){super(),this.map={stop:new a};}get name(){return "gradient"}get tag(){return "gradientFill"}render(u,c){switch(u.openNode("gradientFill"),c.gradient){case "angle":u.addAttribute("degree",c.degree);break;case "path":u.addAttribute("type","path"),c.center.left&&(u.addAttribute("left",c.center.left),c.center.right===void 0&&u.addAttribute("right",c.center.left)),c.center.right&&u.addAttribute("right",c.center.right),c.center.top&&(u.addAttribute("top",c.center.top),c.center.bottom===void 0&&u.addAttribute("bottom",c.center.top)),c.center.bottom&&u.addAttribute("bottom",c.center.bottom);}let d=this.map.stop;c.stops.forEach(p=>{d.render(u,p);}),u.closeNode();}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),true;switch(u.name){case "gradientFill":{let c=this.model={stops:[]};return u.attributes.degree?(c.gradient="angle",c.degree=parseInt(u.attributes.degree,10)):u.attributes.type==="path"&&(c.gradient="path",c.center={left:u.attributes.left?parseFloat(u.attributes.left):0,top:u.attributes.top?parseFloat(u.attributes.top):0},u.attributes.right!==u.attributes.left&&(c.center.right=u.attributes.right?parseFloat(u.attributes.right):0),u.attributes.bottom!==u.attributes.top&&(c.center.bottom=u.attributes.bottom?parseFloat(u.attributes.bottom):0)),true}case "stop":return this.parser=this.map.stop,this.parser.parseOpen(u),true;default:return false}}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return !!this.parser&&(this.parser.parseClose(u)||(this.model.stops.push(this.parser.model),this.parser=void 0),true)}}class l extends n{constructor(){super(),this.map={patternFill:new s,gradientFill:new o};}get tag(){return "fill"}render(u,c){switch(u.addRollback(),u.openNode("fill"),c.type){case "pattern":this.map.patternFill.render(u,c);break;case "gradient":this.map.gradientFill.render(u,c);break;default:return void u.rollback()}u.closeNode(),u.commit();}parseOpen(u){return this.parser?(this.parser.parseOpen(u),true):u.name==="fill"?(this.model={},true):(this.parser=this.map[u.name],!!this.parser&&(this.parser.parseOpen(u),true))}parseText(u){this.parser&&this.parser.parseText(u);}parseClose(u){return !!this.parser&&(this.parser.parseClose(u)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),true)}validStyle(u){return l.validPatternValues[u]}}l.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((f,u)=>(f[u]=true,f),{}),l.StopXform=a,l.PatternFillXform=s,l.GradientFillXform=o,t.exports=l;},{"../base-xform":32,"./color-xform":128}],131:[function(e,t,r){let n=e("./color-xform"),i=e("../simple/boolean-xform"),a=e("../simple/integer-xform"),s=e("../simple/string-xform"),o=e("./underline-xform"),l=e("../../../utils/under-dash"),f=e("../base-xform");class u extends f{constructor(d){super(),this.options=d||u.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 a({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 a({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new i({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new s({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new s({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 a({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new s({tag:this.options.fontNameTag,attr:"val"})};}get tag(){return this.options.tagName}render(d,p){let{map:h}=this;d.openNode(this.options.tagName),l.each(this.map,(m,g)=>{h[g].xform.render(d,p[m.prop]);}),d.closeNode();}parseOpen(d){return this.parser?(this.parser.parseOpen(d),true):this.map[d.name]?(this.parser=this.map[d.name].xform,this.parser.parseOpen(d)):d.name===this.options.tagName?(this.model={},true):false}parseText(d){this.parser&&this.parser.parseText(d);}parseClose(d){if(this.parser&&!this.parser.parseClose(d)){let p=this.map[d];return this.parser.model&&(this.model[p.prop]=this.parser.model),this.parser=void 0,true}return d!==this.options.tagName}}u.OPTIONS={tagName:"font",fontNameTag:"name"},t.exports=u;},{"../../../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){let n=e("../../../utils/under-dash"),i=e("../../defaultnumformats"),a=e("../base-xform"),s=(function(){let l={};return n.each(i,(f,u)=>{f.f&&(l[f.f]=parseInt(u,10));}),l})();class o extends a{constructor(f,u){super(),this.id=f,this.formatCode=u;}get tag(){return "numFmt"}render(f,u){f.leafNode("numFmt",{numFmtId:u.id,formatCode:u.formatCode});}parseOpen(f){return f.name==="numFmt"?(this.model={id:parseInt(f.attributes.numFmtId,10),formatCode:f.attributes.formatCode.replace(/[\\](.)/g,"$1")},true):false}parseText(){}parseClose(){return false}}o.getDefaultFmtId=function(l){return s[l]},o.getDefaultFmtCode=function(l){return i[l]&&i[l].f},t.exports=o;},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(e,t,r){let n=e("../base-xform"),i={boolean:(a,s)=>a===void 0?s:a};t.exports=class extends n{get tag(){return "protection"}render(a,s){a.addRollback(),a.openNode("protection");let o=false;function l(f,u){u!==void 0&&(a.addAttribute(f,u),o=true);}l("locked",i.boolean(s.locked,true)?void 0:"0"),l("hidden",i.boolean(s.hidden,false)?"1":void 0),a.closeNode(),o?a.commit():a.rollback();}parseOpen(a){let s={locked:a.attributes.locked!=="0",hidden:a.attributes.hidden==="1"},o=!s.locked||s.hidden;this.model=o?s:null;}parseText(){}parseClose(){return false}};},{"../base-xform":32}],134:[function(e,t,r){let n=e("../base-xform"),i=e("./alignment-xform"),a=e("./protection-xform");t.exports=class extends n{constructor(s){super(),this.xfId=!(!s||!s.xfId),this.map={alignment:new i,protection:new a};}get tag(){return "xf"}render(s,o){s.openNode("xf",{numFmtId:o.numFmtId||0,fontId:o.fontId||0,fillId:o.fillId||0,borderId:o.borderId||0}),this.xfId&&s.addAttribute("xfId",o.xfId||0),o.numFmtId&&s.addAttribute("applyNumberFormat","1"),o.fontId&&s.addAttribute("applyFont","1"),o.fillId&&s.addAttribute("applyFill","1"),o.borderId&&s.addAttribute("applyBorder","1"),o.alignment&&s.addAttribute("applyAlignment","1"),o.protection&&s.addAttribute("applyProtection","1"),o.alignment&&this.map.alignment.render(s,o.alignment),o.protection&&this.map.protection.render(s,o.protection),s.closeNode();}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),true;switch(s.name){case "xf":return this.model={numFmtId:parseInt(s.attributes.numFmtId,10),fontId:parseInt(s.attributes.fontId,10),fillId:parseInt(s.attributes.fillId,10),borderId:parseInt(s.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(s.attributes.xfId,10)),true;case "alignment":return this.parser=this.map.alignment,this.parser.parseOpen(s),true;case "protection":return this.parser=this.map.protection,this.parser.parseOpen(s),true;default:return false}}parseText(s){this.parser&&this.parser.parseText(s);}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),true):s!=="xf"}};},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(e,t,r){let n=e("../../../doc/enums"),i=e("../../../utils/xml-stream"),a=e("../base-xform"),s=e("../static-xform"),o=e("../list-xform"),l=e("./font-xform"),f=e("./fill-xform"),u=e("./border-xform"),c=e("./numfmt-xform"),d=e("./style-xform"),p=e("./dxf-xform");class h extends a{constructor(g){super(),this.map={numFmts:new o({tag:"numFmts",count:true,childXform:new c}),fonts:new o({tag:"fonts",count:true,childXform:new l,$:{"x14ac:knownFonts":1}}),fills:new o({tag:"fills",count:true,childXform:new f}),borders:new o({tag:"borders",count:true,childXform:new u}),cellStyleXfs:new o({tag:"cellStyleXfs",count:true,childXform:new d}),cellXfs:new o({tag:"cellXfs",count:true,childXform:new d({xfId:true})}),dxfs:new o({tag:"dxfs",always:true,count:true,childXform:new p}),numFmt:new c,font:new l,fill:new f,border:new u,style:new d({xfId:true}),cellStyles:h.STATIC_XFORMS.cellStyles,tableStyles:h.STATIC_XFORMS.tableStyles,extLst:h.STATIC_XFORMS.extLst},g&&this.init();}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}};}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap;}render(g,v){v=v||this.model,g.openXml(i.StdDocAttributes),g.openNode("styleSheet",h.STYLESHEET_ATTRIBUTES),this.index?(v.numFmts&&v.numFmts.length&&(g.openNode("numFmts",{count:v.numFmts.length}),v.numFmts.forEach(w=>{g.writeXml(w);}),g.closeNode()),v.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),g.openNode("fonts",{count:v.fonts.length,"x14ac:knownFonts":1}),v.fonts.forEach(w=>{g.writeXml(w);}),g.closeNode(),g.openNode("fills",{count:v.fills.length}),v.fills.forEach(w=>{g.writeXml(w);}),g.closeNode(),g.openNode("borders",{count:v.borders.length}),v.borders.forEach(w=>{g.writeXml(w);}),g.closeNode(),this.map.cellStyleXfs.render(g,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),g.openNode("cellXfs",{count:v.styles.length}),v.styles.forEach(w=>{g.writeXml(w);}),g.closeNode()):(this.map.numFmts.render(g,v.numFmts),this.map.fonts.render(g,v.fonts),this.map.fills.render(g,v.fills),this.map.borders.render(g,v.borders),this.map.cellStyleXfs.render(g,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(g,v.styles)),h.STATIC_XFORMS.cellStyles.render(g),this.map.dxfs.render(g,v.dxfs),h.STATIC_XFORMS.tableStyles.render(g),h.STATIC_XFORMS.extLst.render(g),g.closeNode();}parseOpen(g){return this.parser?(this.parser.parseOpen(g),true):g.name==="styleSheet"?(this.initIndex(),true):(this.parser=this.map[g.name],this.parser&&this.parser.parseOpen(g),true)}parseText(g){this.parser&&this.parser.parseText(g);}parseClose(g){if(this.parser)return this.parser.parseClose(g)||(this.parser=void 0),true;switch(g){case "styleSheet":{this.model={};let v=(w,C)=>{C.model&&C.model.length&&(this.model[w]=C.model);};if(v("numFmts",this.map.numFmts),v("fonts",this.map.fonts),v("fills",this.map.fills),v("borders",this.map.borders),v("styles",this.map.cellXfs),v("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){let w=this.index.numFmt;this.model.numFmts.forEach(C=>{w[C.id]=C.formatCode;});}return false}default:return true}}addStyleModel(g,v){if(!g)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(g))return this.weakMap.get(g);let w={};if(v=v||n.ValueType.Number,g.numFmt)w.numFmtId=this._addNumFmtStr(g.numFmt);else switch(v){case n.ValueType.Number:w.numFmtId=this._addNumFmtStr("General");break;case n.ValueType.Date:w.numFmtId=this._addNumFmtStr("mm-dd-yy");}g.font&&(w.fontId=this._addFont(g.font)),g.border&&(w.borderId=this._addBorder(g.border)),g.fill&&(w.fillId=this._addFill(g.fill)),g.alignment&&(w.alignment=g.alignment),g.protection&&(w.protection=g.protection);let C=this._addStyle(w);return this.weakMap&&this.weakMap.set(g,C),C}getStyleModel(g){let v=this.model.styles[g];if(!v)return null;let w=this.index.model[g];if(w)return w;if(w=this.index.model[g]={},v.numFmtId){let T=this.index.numFmt[v.numFmtId]||c.getDefaultFmtCode(v.numFmtId);T&&(w.numFmt=T);}function C(T,I,k){if(k||k===0){let D=I[k];D&&(w[T]=D);}}return C("font",this.model.fonts,v.fontId),C("border",this.model.borders,v.borderId),C("fill",this.model.fills,v.fillId),v.alignment&&(w.alignment=v.alignment),v.protection&&(w.protection=v.protection),w}addDxfStyle(g){return g.numFmt&&(g.numFmtId=this._addNumFmtStr(g.numFmt)),this.model.dxfs.push(g),this.model.dxfs.length-1}getDxfStyle(g){return this.model.dxfs[g]}_addStyle(g){let v=this.map.style.toXml(g),w=this.index.style[v];return w===void 0&&(w=this.index.style[v]=this.model.styles.length,this.model.styles.push(v)),w}_addNumFmtStr(g){let v=c.getDefaultFmtId(g);if(v!==void 0||(v=this.index.numFmt[g],v!==void 0))return v;v=this.index.numFmt[g]=164+this.model.numFmts.length;let w=this.map.numFmt.toXml({id:v,formatCode:g});return this.model.numFmts.push(w),v}_addFont(g){let v=this.map.font.toXml(g),w=this.index.font[v];return w===void 0&&(w=this.index.font[v]=this.model.fonts.length,this.model.fonts.push(v)),w}_addBorder(g){let v=this.map.border.toXml(g),w=this.index.border[v];return w===void 0&&(w=this.index.border[v]=this.model.borders.length,this.model.borders.push(v)),w}_addFill(g){let v=this.map.fill.toXml(g),w=this.index.fill[v];return w===void 0&&(w=this.index.fill[v]=this.model.fills.length,this.model.fills.push(v)),w}}h.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"},h.STATIC_XFORMS={cellStyles:new s({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new s({tag:"dxfs",$:{count:0}}),tableStyles:new s({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new s({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"}}]}]})},h.Mock=class extends h{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(m){return m.autodrain(),Promise.resolve()}addStyleModel(m,g){return g===n.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){let m={numFmtId:c.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(m);}return this._dateStyleId}getStyleModel(){return {}}},t.exports=h;},{"../../../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){let n=e("../base-xform");class i extends n{constructor(s){super(),this.model=s;}get tag(){return "u"}render(s,o){if((o=o||this.model)===true)s.leafNode("u");else {let l=i.Attributes[o];l&&s.leafNode("u",l);}}parseOpen(s){s.name==="u"&&(this.model=s.attributes.val||true);}parseText(){}parseClose(){return false}}i.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},t.exports=i;},{"../base-xform":32}],137:[function(e,t,r){let 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(a){a.columns.forEach((s,o)=>{this.map.filterColumn.prepare(s,{index:o});});}render(a,s){return a.openNode(this.tag,{ref:s.autoFilterRef}),s.columns.forEach(o=>{this.map.filterColumn.render(a,o);}),a.closeNode(),true}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),true;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},true;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),true;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a);}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),true;if(a===this.tag)return false;throw new Error("Unexpected xml node in parseClose: "+a)}};},{"../base-xform":32,"./filter-column-xform":139}],138:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "customFilter"}render(i,a){i.leafNode(this.tag,{val:a.val,operator:a.operator});}parseOpen(i){return i.name===this.tag&&(this.model={val:i.attributes.val,operator:i.attributes.operator},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],139:[function(e,t,r){let n=e("../base-xform"),i=e("../list-xform"),a=e("./custom-filter-xform"),s=e("./filter-xform");t.exports=class extends n{constructor(){super(),this.map={customFilters:new i({tag:"customFilters",count:false,empty:true,childXform:new a}),filters:new i({tag:"filters",count:false,empty:true,childXform:new s})};}get tag(){return "filterColumn"}prepare(o,l){o.colId=l.index.toString();}render(o,l){return l.customFilters?(o.openNode(this.tag,{colId:l.colId,hiddenButton:l.filterButton?"0":"1"}),this.map.customFilters.render(o,l.customFilters),o.closeNode(),true):(o.leafNode(this.tag,{colId:l.colId,hiddenButton:l.filterButton?"0":"1"}),true)}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),true;let{attributes:l}=o;switch(o.name){case this.tag:return this.model={filterButton:l.hiddenButton==="0"},true;default:if(this.parser=this.map[o.name],this.parser)return this.parseOpen(o),true;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(o))}}parseText(){}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.parser=void 0),true):o===this.tag?(this.model.customFilters=this.map.customFilters.model,false):true}};},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "filter"}render(i,a){i.leafNode(this.tag,{val:a.val});}parseOpen(i){return i.name===this.tag&&(this.model={val:i.attributes.val},true)}parseText(){}parseClose(){return false}};},{"../base-xform":32}],141:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "tableColumn"}prepare(i,a){i.id=a.index+1;}render(i,a){return i.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),true}parseOpen(i){if(i.name===this.tag){let{attributes:a}=i;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},true}return false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],142:[function(e,t,r){let n=e("../base-xform");t.exports=class extends n{get tag(){return "tableStyleInfo"}render(i,a){return i.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),true}parseOpen(i){if(i.name===this.tag){let{attributes:a}=i;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},true}return false}parseText(){}parseClose(){return false}};},{"../base-xform":32}],143:[function(e,t,r){let n=e("../../../utils/xml-stream"),i=e("../base-xform"),a=e("../list-xform"),s=e("./auto-filter-xform"),o=e("./table-column-xform"),l=e("./table-style-info-xform");class f extends i{constructor(){super(),this.map={autoFilter:new s,tableColumns:new a({tag:"tableColumns",count:true,empty:true,childXform:new o}),tableStyleInfo:new l};}prepare(c,d){this.map.autoFilter.prepare(c),this.map.tableColumns.prepare(c.columns,d);}get tag(){return "table"}render(c,d){c.openXml(n.StdDocAttributes),c.openNode(this.tag,{...f.TABLE_ATTRIBUTES,id:d.id,name:d.name,displayName:d.displayName||d.name,ref:d.tableRef,totalsRowCount:d.totalsRow?"1":void 0,totalsRowShown:d.totalsRow?void 0:"1",headerRowCount:d.headerRow?"1":"0"}),this.map.autoFilter.render(c,d),this.map.tableColumns.render(c,d.columns),this.map.tableStyleInfo.render(c,d.style),c.closeNode();}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),true;let{name:d,attributes:p}=c;return d===this.tag?(this.reset(),this.model={name:p.name,displayName:p.displayName||p.name,tableRef:p.ref,totalsRow:p.totalsRowCount==="1",headerRow:p.headerRowCount==="1"}):(this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)),true}parseText(c){this.parser&&this.parser.parseText(c);}parseClose(c){return this.parser?(this.parser.parseClose(c)||(this.parser=void 0),true):c===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((d,p)=>{this.model.columns[p].filterButton=d.filterButton;})),this.model.style=this.map.tableStyleInfo.model,false):true}reconcile(c,d){c.columns.forEach(p=>{p.dxfId!==void 0&&(p.style=d.styles.getDxfStyle(p.dxfId));});}}f.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=f;},{"../../../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(n,i){(function(){let a=e("fs"),s=e("jszip"),{PassThrough:o}=e("readable-stream"),l=e("../utils/zip-stream"),f=e("../utils/stream-buf"),u=e("../utils/utils"),c=e("../utils/xml-stream"),{bufferToString:d}=e("../utils/browser-buffer-decode"),p=e("./xform/style/styles-xform"),h=e("./xform/core/core-xform"),m=e("./xform/strings/shared-strings-xform"),g=e("./xform/core/relationships-xform"),v=e("./xform/core/content-types-xform"),w=e("./xform/core/app-xform"),C=e("./xform/book/workbook-xform"),T=e("./xform/sheet/worksheet-xform"),I=e("./xform/drawing/drawing-xform"),k=e("./xform/table/table-xform"),D=e("./xform/comment/comments-xform"),j=e("./xform/comment/vml-notes-xform"),F=e("./xml/theme1");class B{constructor(M){this.workbook=M;}async readFile(M,L){if(!await u.fs.exists(M))throw new Error("File not found: "+M);let b=a.createReadStream(M);try{let y=await this.read(b,L);return b.close(),y}catch(y){throw b.close(),y}}parseRels(M){return new g().parseStream(M)}parseWorkbook(M){return new C().parseStream(M)}parseSharedStrings(M){return new m().parseStream(M)}reconcile(M,L){let b=new C,y=new T(L),x=new I,_=new k;b.reconcile(M);let S={media:M.media,mediaIndex:M.mediaIndex};Object.keys(M.drawings).forEach(U=>{let H=M.drawings[U],q=M.drawingRels[U];q&&(S.rels=q.reduce((N,V)=>(N[V.Id]=V,N),{}),(H.anchors||[]).forEach(N=>{let V=N.picture&&N.picture.hyperlinks;V&&S.rels[V.rId]&&(V.hyperlink=S.rels[V.rId].Target,delete V.rId);}),x.reconcile(H,S));});let R={styles:M.styles};Object.values(M.tables).forEach(U=>{_.reconcile(U,R);});let z={styles:M.styles,sharedStrings:M.sharedStrings,media:M.media,mediaIndex:M.mediaIndex,date1904:M.properties&&M.properties.date1904,drawings:M.drawings,comments:M.comments,tables:M.tables,vmlDrawings:M.vmlDrawings};M.worksheets.forEach(U=>{U.relationships=M.worksheetRels[U.sheetNo],y.reconcile(U,z);}),delete M.worksheetHash,delete M.worksheetRels,delete M.globalRels,delete M.sharedStrings,delete M.workbookRels,delete M.sheetDefs,delete M.styles,delete M.mediaIndex,delete M.drawings,delete M.drawingRels,delete M.vmlDrawings;}async _processWorksheetEntry(M,L,b,y,x){let _=new T(y),S=await _.parseStream(M);S.sheetNo=b,L.worksheetHash[x]=S,L.worksheets.push(S);}async _processCommentEntry(M,L,b){let y=new D,x=await y.parseStream(M);L.comments[`../${b}.xml`]=x;}async _processTableEntry(M,L,b){let y=new k,x=await y.parseStream(M);L.tables[`../tables/${b}.xml`]=x;}async _processWorksheetRelsEntry(M,L,b){let y=new g,x=await y.parseStream(M);L.worksheetRels[b]=x;}async _processMediaEntry(M,L,b){let y=b.lastIndexOf(".");if(y>=1){let x=b.substr(y+1),_=b.substr(0,y);await new Promise((S,R)=>{let z=new f;z.on("finish",()=>{L.mediaIndex[b]=L.media.length,L.mediaIndex[_]=L.media.length;let U={type:"image",name:_,extension:x,buffer:z.toBuffer()};L.media.push(U),S();}),M.on("error",U=>{R(U);}),M.pipe(z);});}}async _processDrawingEntry(M,L,b){let y=new I,x=await y.parseStream(M);L.drawings[b]=x;}async _processDrawingRelsEntry(M,L,b){let y=new g,x=await y.parseStream(M);L.drawingRels[b]=x;}async _processVmlDrawingEntry(M,L,b){let y=new j,x=await y.parseStream(M);L.vmlDrawings[`../drawings/${b}.vml`]=x;}async _processThemeEntry(M,L,b){await new Promise((y,x)=>{let _=new f;M.on("error",x),_.on("error",x),_.on("finish",()=>{L.themes[b]=_.read().toString(),y();}),M.pipe(_);});}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(M,L){!M[Symbol.asyncIterator]&&M.pipe&&(M=M.pipe(new o));let b=[];for await(let y of M)b.push(y);return this.load(i.concat(b),L)}async load(M,L){let b;b=L&&L.base64?i.from(M.toString(),"base64"):M;let y={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},x=await s.loadAsync(b);for(let _ of Object.values(x.files))if(!_.dir){let S,R=_.name;if(R[0]==="/"&&(R=R.substr(1)),R.match(/xl\/media\//)||R.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))S=new o,S.write(await _.async("nodebuffer"));else {let z;S=new o({writableObjectMode:true,readableObjectMode:true}),z=n.browser?d(await _.async("nodebuffer")):await _.async("string");let U=16384;for(let H=0;H<z.length;H+=U)S.write(z.substring(H,H+U));}switch(S.end(),R){case "_rels/.rels":y.globalRels=await this.parseRels(S);break;case "xl/workbook.xml":{let z=await this.parseWorkbook(S);y.sheets=z.sheets,y.definedNames=z.definedNames,y.views=z.views,y.properties=z.properties,y.calcProperties=z.calcProperties;break}case "xl/_rels/workbook.xml.rels":y.workbookRels=await this.parseRels(S);break;case "xl/sharedStrings.xml":y.sharedStrings=new m,await y.sharedStrings.parseStream(S);break;case "xl/styles.xml":y.styles=new p,await y.styles.parseStream(S);break;case "docProps/app.xml":{let z=new w,U=await z.parseStream(S);y.company=U.company,y.manager=U.manager;break}case "docProps/core.xml":{let z=new h,U=await z.parseStream(S);Object.assign(y,U);break}default:{let z=R.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(z){await this._processWorksheetEntry(S,y,z[1],L,R);break}if(z=R.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),z){await this._processWorksheetRelsEntry(S,y,z[1]);break}if(z=R.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),z){await this._processThemeEntry(S,y,z[1]);break}if(z=R.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),z){await this._processMediaEntry(S,y,z[1]);break}if(z=R.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),z){await this._processDrawingEntry(S,y,z[1]);break}if(z=R.match(/xl\/(comments\d+)[.]xml/),z){await this._processCommentEntry(S,y,z[1]);break}if(z=R.match(/xl\/tables\/(table\d+)[.]xml/),z){await this._processTableEntry(S,y,z[1]);break}if(z=R.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),z){await this._processDrawingRelsEntry(S,y,z[1]);break}if(z=R.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),z){await this._processVmlDrawingEntry(S,y,z[1]);break}}}}return this.reconcile(y,L),this.workbook.model=y,this.workbook}async addMedia(M,L){await Promise.all(L.media.map(async b=>{if(b.type==="image"){let y=`xl/media/${b.name}.${b.extension}`;if(b.filename){let x=await(function(_,S){return new Promise((R,z)=>{a.readFile(_,S,(U,H)=>{U?z(U):R(H);});})})(b.filename);return M.append(x,{name:y})}if(b.buffer)return M.append(b.buffer,{name:y});if(b.base64){let x=b.base64,_=x.substring(x.indexOf(",")+1);return M.append(_,{name:y,base64:true})}}throw new Error("Unsupported media")}));}addDrawings(M,L){let b=new I,y=new g;L.worksheets.forEach(x=>{let{drawing:_}=x;if(_){b.prepare(_,{});let S=b.toXml(_);M.append(S,{name:`xl/drawings/${_.name}.xml`}),S=y.toXml(_.rels),M.append(S,{name:`xl/drawings/_rels/${_.name}.xml.rels`});}});}addTables(M,L){let b=new k;L.worksheets.forEach(y=>{let{tables:x}=y;x.forEach(_=>{b.prepare(_,{});let S=b.toXml(_);M.append(S,{name:"xl/tables/"+_.target});});});}async addContentTypes(M,L){let b=new v().toXml(L);M.append(b,{name:"[Content_Types].xml"});}async addApp(M,L){let b=new w().toXml(L);M.append(b,{name:"docProps/app.xml"});}async addCore(M,L){let b=new h;M.append(b.toXml(L),{name:"docProps/core.xml"});}async addThemes(M,L){let b=L.themes||{theme1:F};Object.keys(b).forEach(y=>{let x=b[y],_=`xl/theme/${y}.xml`;M.append(x,{name:_});});}async addOfficeRels(M){let L=new g().toXml([{Id:"rId1",Type:B.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:B.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:B.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);M.append(L,{name:"_rels/.rels"});}async addWorkbookRels(M,L){let b=1,y=[{Id:"rId"+b++,Type:B.RelType.Styles,Target:"styles.xml"},{Id:"rId"+b++,Type:B.RelType.Theme,Target:"theme/theme1.xml"}];L.sharedStrings.count&&y.push({Id:"rId"+b++,Type:B.RelType.SharedStrings,Target:"sharedStrings.xml"}),L.worksheets.forEach(_=>{_.rId="rId"+b++,y.push({Id:_.rId,Type:B.RelType.Worksheet,Target:`worksheets/sheet${_.id}.xml`});});let x=new g().toXml(y);M.append(x,{name:"xl/_rels/workbook.xml.rels"});}async addSharedStrings(M,L){L.sharedStrings&&L.sharedStrings.count&&M.append(L.sharedStrings.xml,{name:"xl/sharedStrings.xml"});}async addStyles(M,L){let{xml:b}=L.styles;b&&M.append(b,{name:"xl/styles.xml"});}async addWorkbook(M,L){let b=new C;M.append(b.toXml(L),{name:"xl/workbook.xml"});}async addWorksheets(M,L){let b=new T,y=new g,x=new D,_=new j;L.worksheets.forEach(S=>{let R=new c;b.render(R,S),M.append(R.xml,{name:`xl/worksheets/sheet${S.id}.xml`}),S.rels&&S.rels.length&&(R=new c,y.render(R,S.rels),M.append(R.xml,{name:`xl/worksheets/_rels/sheet${S.id}.xml.rels`})),S.comments.length>0&&(R=new c,x.render(R,S),M.append(R.xml,{name:`xl/comments${S.id}.xml`}),R=new c,_.render(R,S),M.append(R.xml,{name:`xl/drawings/vmlDrawing${S.id}.vml`}));});}_finalize(M){return new Promise((L,b)=>{M.on("finish",()=>{L(this);}),M.on("error",b),M.finalize();})}prepareModel(M,L){M.creator=M.creator||"ExcelJS",M.lastModifiedBy=M.lastModifiedBy||"ExcelJS",M.created=M.created||new Date,M.modified=M.modified||new Date,M.useSharedStrings=L.useSharedStrings===void 0||L.useSharedStrings,M.useStyles=L.useStyles===void 0||L.useStyles,M.sharedStrings=new m,M.styles=M.useStyles?new p(true):new p.Mock;let b=new C,y=new T;b.prepare(M);let x={sharedStrings:M.sharedStrings,styles:M.styles,date1904:M.properties.date1904,drawingsCount:0,media:M.media};x.drawings=M.drawings=[],x.commentRefs=M.commentRefs=[];let _=0;M.tables=[],M.worksheets.forEach(S=>{S.tables.forEach(R=>{_++,R.target=`table${_}.xml`,R.id=_,M.tables.push(R);}),y.prepare(S,x);});}async write(M,L){L=L||{};let{model:b}=this.workbook,y=new l.ZipWriter(L.zip);return y.pipe(M),this.prepareModel(b,L),await this.addContentTypes(y,b),await this.addOfficeRels(y,b),await this.addWorkbookRels(y,b),await this.addWorksheets(y,b),await this.addSharedStrings(y,b),await this.addDrawings(y,b),await this.addTables(y,b),await Promise.all([this.addThemes(y,b),this.addStyles(y,b)]),await this.addMedia(y,b),await Promise.all([this.addApp(y,b),this.addCore(y,b)]),await this.addWorkbook(y,b),this._finalize(y)}writeFile(M,L){let b=a.createWriteStream(M);return new Promise((y,x)=>{b.on("finish",()=>{y();}),b.on("error",_=>{x(_);}),this.write(b,L).then(()=>{b.end();}).catch(_=>{x(_);});})}async writeBuffer(M){let L=new f;return await this.write(L,M),L.read()}}B.RelType=e("./rel-type"),t.exports=B;}).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"?>
|
|
11
|
+
<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="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <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="\uFF2D\uFF33 \uFF30\u30B4\u30B7\u30C3\u30AF"/> <a:font script="Hang" typeface="\uB9D1\uC740 \uACE0\uB515"/> <a:font script="Hans" typeface="\u5B8B\u4F53"/> <a:font script="Hant" typeface="\u65B0\u7D30\u660E\u9AD4"/> <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(n){(function(){Object.defineProperty(r,"__esModule",{value:true}),r.CsvFormatterStream=void 0;let i=e("stream"),a=e("./formatter");class s extends i.Transform{constructor(l){super({writableObjectMode:l.objectMode}),this.hasWrittenBOM=false,this.formatterOptions=l,this.rowFormatter=new a.RowFormatter(l),this.hasWrittenBOM=!l.writeBOM;}transform(l){return this.rowFormatter.rowTransform=l,this}_transform(l,f,u){let c=false;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(l,(d,p)=>d?(c=!0,u(d)):(p&&p.forEach(h=>{this.push(n.from(h,"utf8"));}),c=!0,u()));}catch(d){if(c)throw d;u(d);}}_flush(l){this.rowFormatter.finish((f,u)=>f?l(f):(u&&u.forEach(c=>{this.push(n.from(c,"utf8"));}),l()));}}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:true}),r.FormatterOptions=void 0,r.FormatterOptions=class{constructor(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var i;this.objectMode=true,this.delimiter=",",this.rowDelimiter=`
|
|
12
|
+
`,this.quote='"',this.escape=this.quote,this.quoteColumns=false,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=false,this.writeBOM=false,this.BOM="\uFEFF",this.alwaysWriteHeaders=false,Object.assign(this,n||{}),n?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),n?.quote===true?this.quote='"':n?.quote===false&&(this.quote=""),typeof n?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((i=n.writeHeaders)===null||i===void 0||i),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`;}};},{}],148:[function(e,t,r){var n=function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(r,"__esModule",{value:true}),r.FieldFormatter=void 0;let i=n(e("lodash.isboolean")),a=n(e("lodash.isnil")),s=n(e("lodash.escaperegexp"));r.FieldFormatter=class{constructor(o){this._headers=null,this.formatterOptions=o,o.headers!==null&&(this.headers=o.headers),this.REPLACE_REGEXP=new RegExp(o.quote,"g");let l=`[${o.delimiter}${s.default(o.rowDelimiter)}|\r|
|
|
13
|
+
]`;this.ESCAPE_REGEXP=new RegExp(l);}set headers(o){this._headers=o;}shouldQuote(o,l){let f=l?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return i.default(f)?f:Array.isArray(f)?f[o]:this._headers!==null&&f[this._headers[o]]}format(o,l,f){let u=(""+(a.default(o)?"":o)).replace(/\0/g,""),{formatterOptions:c}=this;return c.quote!==""&&u.indexOf(c.quote)!==-1?this.quoteField(u.replace(this.REPLACE_REGEXP,c.escapedQuote)):u.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(l,f)?this.quoteField(u):u}quoteField(o){let{quote:l}=this.formatterOptions;return `${l}${o}${l}`}};},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(e,t,r){var n=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(r,"__esModule",{value:true}),r.RowFormatter=void 0;let i=n(e("lodash.isfunction")),a=n(e("lodash.isequal")),s=e("./FieldFormatter"),o=e("../types");class l{constructor(u){this.rowCount=0,this.formatterOptions=u,this.fieldFormatter=new s.FieldFormatter(u),this.headers=u.headers,this.shouldWriteHeaders=u.shouldWriteHeaders,this.hasWrittenHeaders=false,this.headers!==null&&(this.fieldFormatter.headers=this.headers),u.transform&&(this.rowTransform=u.transform);}static isRowHashArray(u){return !!Array.isArray(u)&&Array.isArray(u[0])&&u[0].length===2}static isRowArray(u){return Array.isArray(u)&&!this.isRowHashArray(u)}static gatherHeaders(u){return l.isRowHashArray(u)?u.map(c=>c[0]):Array.isArray(u)?u:Object.keys(u)}static createTransform(u){return o.isSyncTransform(u)?(c,d)=>{let p=null;try{p=u(c);}catch(h){return d(h)}return d(null,p)}:(c,d)=>{u(c,d);}}set rowTransform(u){if(!i.default(u))throw new TypeError("The transform should be a function");this._rowTransform=l.createTransform(u);}format(u,c){this.callTransformer(u,(d,p)=>{if(d)return c(d);if(!u)return c(null);let h=[];if(p){let{shouldFormatColumns:m,headers:g}=this.checkHeaders(p);if(this.shouldWriteHeaders&&g&&!this.hasWrittenHeaders&&(h.push(this.formatColumns(g,true)),this.hasWrittenHeaders=true),m){let v=this.gatherColumns(p);h.push(this.formatColumns(v,false));}}return c(null,h)});}finish(u){let c=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return u(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));c.push(this.formatColumns(this.headers,true));}return this.formatterOptions.includeEndRowDelimiter&&c.push(this.formatterOptions.rowDelimiter),u(null,c)}checkHeaders(u){if(this.headers)return {shouldFormatColumns:true,headers:this.headers};let c=l.gatherHeaders(u);return this.headers=c,this.fieldFormatter.headers=c,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(c,u),headers:c}:{shouldFormatColumns:true,headers:null}}gatherColumns(u){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(u)?l.isRowHashArray(u)?this.headers.map((c,d)=>{let p=u[d];return p?p[1]:""}):l.isRowArray(u)&&!this.shouldWriteHeaders?u:this.headers.map((c,d)=>u[d]):this.headers.map(c=>u[c])}callTransformer(u,c){return this._rowTransform?this._rowTransform(u,c):c(null,u)}formatColumns(u,c){let d=u.map((h,m)=>this.fieldFormatter.format(h,m,c)).join(this.formatterOptions.delimiter),{rowCount:p}=this;return this.rowCount+=1,p?[this.formatterOptions.rowDelimiter,d].join(""):d}}r.RowFormatter=l;},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.FieldFormatter=r.RowFormatter=void 0;var n=e("./RowFormatter");Object.defineProperty(r,"RowFormatter",{enumerable:true,get:function(){return n.RowFormatter}});var i=e("./FieldFormatter");Object.defineProperty(r,"FieldFormatter",{enumerable:true,get:function(){return i.FieldFormatter}});},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(e,t,r){(function(n){(function(){var i=Object.create?function(m,g,v,w){w===void 0&&(w=v),Object.defineProperty(m,w,{enumerable:true,get:function(){return g[v]}});}:function(m,g,v,w){w===void 0&&(w=v),m[w]=g[v];},a=Object.create?function(m,g){Object.defineProperty(m,"default",{enumerable:true,value:g});}:function(m,g){m.default=g;},s=function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var v in m)v!=="default"&&Object.prototype.hasOwnProperty.call(m,v)&&i(g,m,v);return a(g,m),g},o=function(m,g){for(var v in m)v==="default"||Object.prototype.hasOwnProperty.call(g,v)||i(g,m,v);};Object.defineProperty(r,"__esModule",{value:true}),r.writeToPath=r.writeToString=r.writeToBuffer=r.writeToStream=r.write=r.format=r.FormatterOptions=r.CsvFormatterStream=void 0;let l=e("util"),f=e("stream"),u=s(e("fs")),c=e("./FormatterOptions"),d=e("./CsvFormatterStream");o(e("./types"),r);var p=e("./CsvFormatterStream");Object.defineProperty(r,"CsvFormatterStream",{enumerable:true,get:function(){return p.CsvFormatterStream}});var h=e("./FormatterOptions");Object.defineProperty(r,"FormatterOptions",{enumerable:true,get:function(){return h.FormatterOptions}}),r.format=m=>new d.CsvFormatterStream(new c.FormatterOptions(m)),r.write=(m,g)=>{let v=r.format(g),w=l.promisify((C,T)=>{v.write(C,void 0,T);});return m.reduce((C,T)=>C.then(()=>w(T)),Promise.resolve()).then(()=>v.end()).catch(C=>{v.emit("error",C);}),v},r.writeToStream=(m,g,v)=>r.write(g,v).pipe(m),r.writeToBuffer=function(m){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=[],w=new f.Writable({write(C,T,I){v.push(C),I();}});return new Promise((C,T)=>{w.on("error",T).on("finish",()=>C(n.concat(v))),r.write(m,g).pipe(w);})},r.writeToString=(m,g)=>r.writeToBuffer(m,g).then(v=>v.toString()),r.writeToPath=(m,g,v)=>{let w=u.createWriteStream(m,{encoding:"utf8"});return r.write(g,v).pipe(w)};}).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:true}),r.isSyncTransform=void 0,r.isSyncTransform=n=>n.length===1;},{}],153:[function(e,t,r){(function(n){(function(){Object.defineProperty(r,"__esModule",{value:true}),r.CsvParserStream=void 0;let i=e("string_decoder"),a=e("stream"),s=e("./transforms"),o=e("./parser");class l extends a.Transform{constructor(u){super({objectMode:u.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=false,this.headersEmitted=false,this.parserOptions=u,this.parser=new o.Parser(u),this.headerTransformer=new s.HeaderTransformer(u),this.decoder=new i.StringDecoder(u.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(u){return this.rowTransformerValidator.rowTransform=u,this}validate(u){return this.rowTransformerValidator.rowValidator=u,this}emit(u){if(u==="end")return this.endEmitted||(this.endEmitted=true,super.emit("end",this.rowCount)),false;for(var c=arguments.length,d=new Array(c>1?c-1:0),p=1;p<c;p++)d[p-1]=arguments[p];return super.emit(u,...d)}_transform(u,c,d){if(this.hasHitRowLimit)return d();let p=l.wrapDoneCallback(d);try{let{lines:h}=this,m=h+this.decoder.write(u),g=this.parse(m,!0);return this.processRows(g,p)}catch(h){return p(h)}}_flush(u){let c=l.wrapDoneCallback(u);if(this.hasHitRowLimit)return c();try{let d=this.lines+this.decoder.end(),p=this.parse(d,!1);return this.processRows(p,c)}catch(d){return c(d)}}parse(u,c){if(!u)return [];let{line:d,rows:p}=this.parser.parse(u,c);return this.lines=d,p}processRows(u,c){let d=u.length,p=h=>{let m=w=>w?c(w):h%100!=0?p(h+1):void n(()=>p(h+1));if(this.checkAndEmitHeaders(),h>=d||this.hasHitRowLimit)return c();if(this.parsedLineCount+=1,this.shouldSkipLine)return m();let g=u[h];this.rowCount+=1,this.parsedRowCount+=1;let v=this.rowCount;return this.transformRow(g,(w,C)=>{if(w)return this.rowCount-=1,m(w);if(!C)return m(new Error("expected transform result"));if(C.isValid){if(C.row)return this.pushRow(C.row,m)}else this.emit("data-invalid",C.row,v,C.reason);return m()})};p(0);}transformRow(u,c){try{this.headerTransformer.transform(u,(d,p)=>d?c(d):p?p.isValid?p.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(p.row,c):this.skipRow(c):(this.rowCount-=1,this.parsedRowCount-=1,c(null,{row:null,isValid:!0})):this.shouldEmitRows?c(null,{isValid:!1,row:u}):this.skipRow(c):c(new Error("Expected result from header transform")));}catch(d){c(d);}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=true,this.emit("headers",this.headerTransformer.headers));}skipRow(u){return this.rowCount-=1,u(null,{row:null,isValid:true})}pushRow(u,c){try{this.parserOptions.objectMode?this.push(u):this.push(JSON.stringify(u)),c();}catch(d){c(d);}}static wrapDoneCallback(u){let c=false;return function(d){if(d){if(c)throw d;return c=true,void u(d)}for(var p=arguments.length,h=new Array(p>1?p-1:0),m=1;m<p;m++)h[m-1]=arguments[m];u(...h);}}}r.CsvParserStream=l;}).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(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(r,"__esModule",{value:true}),r.ParserOptions=void 0;let i=n(e("lodash.escaperegexp")),a=n(e("lodash.isnil"));r.ParserOptions=class{constructor(s){var o;if(this.objectMode=true,this.delimiter=",",this.ignoreEmpty=false,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=false,this.ltrim=false,this.rtrim=false,this.trim=false,this.headers=null,this.renameHeaders=false,this.strictColumnHandling=false,this.discardUnmappedColumns=false,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=false,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,s||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=(o=this.escape)!==null&&o!==void 0?o:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=true);}};},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(e,t,r){var n=Object.create?function(p,h,m,g){g===void 0&&(g=m),Object.defineProperty(p,g,{enumerable:true,get:function(){return h[m]}});}:function(p,h,m,g){g===void 0&&(g=m),p[g]=h[m];},i=Object.create?function(p,h){Object.defineProperty(p,"default",{enumerable:true,value:h});}:function(p,h){p.default=h;},a=function(p){if(p&&p.__esModule)return p;var h={};if(p!=null)for(var m in p)m!=="default"&&Object.prototype.hasOwnProperty.call(p,m)&&n(h,p,m);return i(h,p),h},s=function(p,h){for(var m in p)m==="default"||Object.prototype.hasOwnProperty.call(h,m)||n(h,p,m);};Object.defineProperty(r,"__esModule",{value:true}),r.parseString=r.parseFile=r.parseStream=r.parse=r.ParserOptions=r.CsvParserStream=void 0;let o=a(e("fs")),l=e("stream"),f=e("./ParserOptions"),u=e("./CsvParserStream");s(e("./types"),r);var c=e("./CsvParserStream");Object.defineProperty(r,"CsvParserStream",{enumerable:true,get:function(){return c.CsvParserStream}});var d=e("./ParserOptions");Object.defineProperty(r,"ParserOptions",{enumerable:true,get:function(){return d.ParserOptions}}),r.parse=p=>new u.CsvParserStream(new f.ParserOptions(p)),r.parseStream=(p,h)=>p.pipe(new u.CsvParserStream(new f.ParserOptions(h))),r.parseFile=function(p){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.createReadStream(p).pipe(new u.CsvParserStream(new f.ParserOptions(h)))},r.parseString=(p,h)=>{let m=new l.Readable;return m.push(p),m.push(null),m.pipe(new u.CsvParserStream(new f.ParserOptions(h)))};},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.Parser=void 0;let n=e("./Scanner"),i=e("./RowParser"),a=e("./Token");class s{constructor(l){this.parserOptions=l,this.rowParser=new i.RowParser(this.parserOptions);}static removeBOM(l){return l&&l.charCodeAt(0)===65279?l.slice(1):l}parse(l,f){let u=new n.Scanner({line:s.removeBOM(l),parserOptions:this.parserOptions,hasMoreData:f});return this.parserOptions.supportsComments?this.parseWithComments(u):this.parseWithoutComments(u)}parseWithoutComments(l){let f=[],u=true;for(;u;)u=this.parseRow(l,f);return {line:l.line,rows:f}}parseWithComments(l){let{parserOptions:f}=this,u=[];for(let c=l.nextCharacterToken;c!==null;c=l.nextCharacterToken)if(a.Token.isTokenComment(c,f)){if(l.advancePastLine()===null)return {line:l.lineFromCursor,rows:u};if(!l.hasMoreCharacters)return {line:l.lineFromCursor,rows:u};l.truncateToCursor();}else if(!this.parseRow(l,u))break;return {line:l.line,rows:u}}parseRow(l,f){if(!l.nextNonSpaceToken)return false;let u=this.rowParser.parse(l);return u!==null&&(this.parserOptions.ignoreEmpty&&i.RowParser.isEmptyRow(u)||f.push(u),true)}}r.Parser=s;},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.RowParser=void 0;let n=e("./column"),i=e("./Token");r.RowParser=class{constructor(a){this.parserOptions=a,this.columnParser=new n.ColumnParser(a);}static isEmptyRow(a){return a.join("").replace(/\s+/g,"")===""}parse(a){let{parserOptions:s}=this,{hasMoreData:o}=a,l=a,f=[],u=this.getStartToken(l,f);for(;u;){if(i.Token.isTokenRowDelimiter(u))return l.advancePastToken(u),!l.hasMoreCharacters&&i.Token.isTokenCarriageReturn(u,s)&&o?null:(l.truncateToCursor(),f);if(!this.shouldSkipColumnParse(l,u,f)){let c=this.columnParser.parse(l);if(c===null)return null;f.push(c);}u=l.nextNonSpaceToken;}return o?null:(l.truncateToCursor(),f)}getStartToken(a,s){let o=a.nextNonSpaceToken;return o!==null&&i.Token.isTokenDelimiter(o,this.parserOptions)?(s.push(""),a.nextNonSpaceToken):o}shouldSkipColumnParse(a,s,o){let{parserOptions:l}=this;if(i.Token.isTokenDelimiter(s,l)){a.advancePastToken(s);let f=a.nextCharacterToken;if(!a.hasMoreCharacters||f!==null&&i.Token.isTokenRowDelimiter(f)||f!==null&&i.Token.isTokenDelimiter(f,l))return o.push(""),true}return false}};},{"./Token":159,"./column":164}],158:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.Scanner=void 0;let n=e("./Token"),i=/((?:\r\n)|\n|\r)/;r.Scanner=class{constructor(a){this.cursor=0,this.line=a.line,this.lineLength=this.line.length,this.parserOptions=a.parserOptions,this.hasMoreData=a.hasMoreData,this.cursor=a.cursor||0;}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){let{lineFromCursor:a}=this,s=this.parserOptions.NEXT_TOKEN_REGEXP;if(a.search(s)===-1)return null;let o=s.exec(a);if(o==null)return null;let l=o[1],f=this.cursor+(o.index||0);return new n.Token({token:l,startCursor:f,endCursor:f+l.length-1})}get nextCharacterToken(){let{cursor:a,lineLength:s}=this;return s<=a?null:new n.Token({token:this.line[a],startCursor:a,endCursor:a})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){let a=i.exec(this.lineFromCursor);return a?(this.cursor+=(a.index||0)+a[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(a){return this.cursor=a,this}advanceToToken(a){return this.cursor=a.startCursor,this}advancePastToken(a){return this.cursor=a.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}};},{"./Token":159}],159:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.Token=void 0,r.Token=class{constructor(n){this.token=n.token,this.startCursor=n.startCursor,this.endCursor=n.endCursor;}static isTokenRowDelimiter(n){let i=n.token;return i==="\r"||i===`
|
|
14
|
+
`||i===`\r
|
|
15
|
+
`}static isTokenCarriageReturn(n,i){return n.token===i.carriageReturn}static isTokenComment(n,i){return i.supportsComments&&!!n&&n.token===i.comment}static isTokenEscapeCharacter(n,i){return n.token===i.escapeChar}static isTokenQuote(n,i){return n.token===i.quote}static isTokenDelimiter(n,i){return n.token===i.delimiter}};},{}],160:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.ColumnFormatter=void 0,r.ColumnFormatter=class{constructor(n){n.trim?this.format=i=>i.trim():n.ltrim?this.format=i=>i.trimLeft():n.rtrim?this.format=i=>i.trimRight():this.format=i=>i;}};},{}],161:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.ColumnParser=void 0;let n=e("./NonQuotedColumnParser"),i=e("./QuotedColumnParser"),a=e("../Token");r.ColumnParser=class{constructor(s){this.parserOptions=s,this.quotedColumnParser=new i.QuotedColumnParser(s),this.nonQuotedColumnParser=new n.NonQuotedColumnParser(s);}parse(s){let{nextNonSpaceToken:o}=s;return o!==null&&a.Token.isTokenQuote(o,this.parserOptions)?(s.advanceToToken(o),this.quotedColumnParser.parse(s)):this.nonQuotedColumnParser.parse(s)}};},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.NonQuotedColumnParser=void 0;let n=e("./ColumnFormatter"),i=e("../Token");r.NonQuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new n.ColumnFormatter(a);}parse(a){if(!a.hasMoreCharacters)return null;let{parserOptions:s}=this,o=[],l=a.nextCharacterToken;for(;l&&!i.Token.isTokenDelimiter(l,s)&&!i.Token.isTokenRowDelimiter(l);l=a.nextCharacterToken)o.push(l.token),a.advancePastToken(l);return this.columnFormatter.format(o.join(""))}};},{"../Token":159,"./ColumnFormatter":160}],163:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.QuotedColumnParser=void 0;let n=e("./ColumnFormatter"),i=e("../Token");r.QuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new n.ColumnFormatter(a);}parse(a){if(!a.hasMoreCharacters)return null;let s=a.cursor,{foundClosingQuote:o,col:l}=this.gatherDataBetweenQuotes(a);if(!o){if(a.advanceTo(s),!a.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${a.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(a),l}gatherDataBetweenQuotes(a){let{parserOptions:s}=this,o=false,l=false,f=[],u=a.nextCharacterToken;for(;!l&&u!==null;u=a.nextCharacterToken){let c=i.Token.isTokenQuote(u,s);if(!o&&c)o=true;else if(o)if(i.Token.isTokenEscapeCharacter(u,s)){a.advancePastToken(u);let d=a.nextCharacterToken;d!==null&&(i.Token.isTokenQuote(d,s)||i.Token.isTokenEscapeCharacter(d,s))?(f.push(d.token),u=d):c?l=true:f.push(u.token);}else c?l=true:f.push(u.token);a.advancePastToken(u);}return {col:this.columnFormatter.format(f.join("")),foundClosingQuote:l}}checkForMalformedColumn(a){let{parserOptions:s}=this,{nextNonSpaceToken:o}=a;if(o){let l=i.Token.isTokenDelimiter(o,s),f=i.Token.isTokenRowDelimiter(o);if(!l&&!f){let u=a.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${s.escapedDelimiter}' OR new line got: '${o.token}'. at '${u}`)}a.advanceToToken(o);}else a.hasMoreData||a.advancePastLine();}};},{"../Token":159,"./ColumnFormatter":160}],164:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.ColumnFormatter=r.QuotedColumnParser=r.NonQuotedColumnParser=r.ColumnParser=void 0;var n=e("./ColumnParser");Object.defineProperty(r,"ColumnParser",{enumerable:true,get:function(){return n.ColumnParser}});var i=e("./NonQuotedColumnParser");Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:true,get:function(){return i.NonQuotedColumnParser}});var a=e("./QuotedColumnParser");Object.defineProperty(r,"QuotedColumnParser",{enumerable:true,get:function(){return a.QuotedColumnParser}});var s=e("./ColumnFormatter");Object.defineProperty(r,"ColumnFormatter",{enumerable:true,get:function(){return s.ColumnFormatter}});},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),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:true,get:function(){return n.Parser}});var i=e("./RowParser");Object.defineProperty(r,"RowParser",{enumerable:true,get:function(){return i.RowParser}});var a=e("./Scanner");Object.defineProperty(r,"Scanner",{enumerable:true,get:function(){return a.Scanner}});var s=e("./Token");Object.defineProperty(r,"Token",{enumerable:true,get:function(){return s.Token}});var o=e("./column");Object.defineProperty(r,"ColumnParser",{enumerable:true,get:function(){return o.ColumnParser}}),Object.defineProperty(r,"NonQuotedColumnParser",{enumerable:true,get:function(){return o.NonQuotedColumnParser}}),Object.defineProperty(r,"QuotedColumnParser",{enumerable:true,get:function(){return o.QuotedColumnParser}});},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(e,t,r){var n=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(r,"__esModule",{value:true}),r.HeaderTransformer=void 0;let i=n(e("lodash.isundefined")),a=n(e("lodash.isfunction")),s=n(e("lodash.uniq")),o=n(e("lodash.groupby"));r.HeaderTransformer=class{constructor(l){this.headers=null,this.receivedHeaders=false,this.shouldUseFirstRow=false,this.processedFirstRow=false,this.headersLength=0,this.parserOptions=l,l.headers===true?this.shouldUseFirstRow=true:Array.isArray(l.headers)?this.setHeaders(l.headers):a.default(l.headers)&&(this.headersTransform=l.headers);}transform(l,f){return this.shouldMapRow(l)?f(null,this.processRow(l)):f(null,{row:null,isValid:true})}shouldMapRow(l){let{parserOptions:f}=this;if(!this.headersTransform&&f.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=true,false}if(!this.receivedHeaders&&Array.isArray(l)){if(this.headersTransform)this.setHeaders(this.headersTransform(l));else {if(!this.shouldUseFirstRow)return true;this.setHeaders(l);}return false}return true}processRow(l){if(!this.headers)return {row:l,isValid:true};let{parserOptions:f}=this;if(!f.discardUnmappedColumns&&l.length>this.headersLength){if(!f.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${l.length}`);return {row:l,isValid:false,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${l.length}`}}return f.strictColumnHandling&&l.length<this.headersLength?{row:l,isValid:false,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${l.length}`}:{row:this.mapHeaders(l),isValid:true}}mapHeaders(l){let f={},{headers:u,headersLength:c}=this;for(let d=0;d<c;d+=1){let p=u[d];if(!i.default(p)){let h=l[d];i.default(h)?f[p]="":f[p]=h;}}return f}setHeaders(l){var f;let u=l.filter(c=>!!c);if(s.default(u).length!==u.length){let c=o.default(u),d=Object.keys(c).filter(p=>c[p].length>1);throw new Error("Duplicate headers found "+JSON.stringify(d))}this.headers=l,this.receivedHeaders=true,this.headersLength=((f=this.headers)===null||f===void 0?void 0:f.length)||0;}};},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(e,t,r){var n=function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(r,"__esModule",{value:true}),r.RowTransformerValidator=void 0;let i=n(e("lodash.isfunction")),a=e("../types");class s{constructor(){this._rowTransform=null,this._rowValidator=null;}static createTransform(l){return a.isSyncTransform(l)?(f,u)=>{let c=null;try{c=l(f);}catch(d){return u(d)}return u(null,c)}:l}static createValidator(l){return a.isSyncValidate(l)?(f,u)=>{u(null,{row:f,isValid:l(f)});}:(f,u)=>{l(f,(c,d,p)=>c?u(c):u(null,d?{row:f,isValid:d,reason:p}:{row:f,isValid:false,reason:p}));}}set rowTransform(l){if(!i.default(l))throw new TypeError("The transform should be a function");this._rowTransform=s.createTransform(l);}set rowValidator(l){if(!i.default(l))throw new TypeError("The validate should be a function");this._rowValidator=s.createValidator(l);}transformAndValidate(l,f){return this.callTransformer(l,(u,c)=>u?f(u):c?this.callValidator(c,(d,p)=>d?f(d):p&&!p.isValid?f(null,{row:c,isValid:false,reason:p.reason}):f(null,{row:c,isValid:true})):f(null,{row:null,isValid:true}))}callTransformer(l,f){return this._rowTransform?this._rowTransform(l,f):f(null,l)}callValidator(l,f){return this._rowValidator?this._rowValidator(l,f):f(null,{row:l,isValid:true})}}r.RowTransformerValidator=s;},{"../types":169,"lodash.isfunction":446}],168:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.HeaderTransformer=r.RowTransformerValidator=void 0;var n=e("./RowTransformerValidator");Object.defineProperty(r,"RowTransformerValidator",{enumerable:true,get:function(){return n.RowTransformerValidator}});var i=e("./HeaderTransformer");Object.defineProperty(r,"HeaderTransformer",{enumerable:true,get:function(){return i.HeaderTransformer}});},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.isSyncValidate=r.isSyncTransform=void 0,r.isSyncTransform=n=>n.length===1,r.isSyncValidate=n=>n.length===1;},{}],170:[function(e,t,r){let 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){let n=e("./encoders"),i=e("./decoders"),a=e("inherits");function s(o,l){this.name=o,this.body=l,this.decoders={},this.encoders={};}r.define=function(o,l){return new s(o,l)},s.prototype._createNamed=function(o){let l=this.name;function f(u){this._initNamed(u,l);}return a(f,o),f.prototype._initNamed=function(u,c){o.call(this,u,c);},new f(this)},s.prototype._getDecoder=function(o){return o=o||"der",this.decoders.hasOwnProperty(o)||(this.decoders[o]=this._createNamed(i[o])),this.decoders[o]},s.prototype.decode=function(o,l,f){return this._getDecoder(l).decode(o,f)},s.prototype._getEncoder=function(o){return o=o||"der",this.encoders.hasOwnProperty(o)||(this.encoders[o]=this._createNamed(n[o])),this.encoders[o]},s.prototype.encode=function(o,l,f){return this._getEncoder(l).encode(o,f)};},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(e,t,r){let n=e("inherits"),i=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(l,f){i.call(this,f),a.isBuffer(l)?(this.base=l,this.offset=0,this.length=l.length):this.error("Input not Buffer");}function o(l,f){if(Array.isArray(l))this.length=0,this.value=l.map((function(u){return o.isEncoderBuffer(u)||(u=new o(u,f)),this.length+=u.length,u}),this);else if(typeof l=="number"){if(!(0<=l&&l<=255))return f.error("non-byte EncoderBuffer value");this.value=l,this.length=1;}else if(typeof l=="string")this.value=l,this.length=a.byteLength(l);else {if(!a.isBuffer(l))return f.error("Unsupported type: "+typeof l);this.value=l,this.length=l.length;}}n(s,i),r.DecoderBuffer=s,s.isDecoderBuffer=function(l){return l instanceof s?true:typeof l=="object"&&a.isBuffer(l.base)&&l.constructor.name==="DecoderBuffer"&&typeof l.offset=="number"&&typeof l.length=="number"&&typeof l.save=="function"&&typeof l.restore=="function"&&typeof l.isEmpty=="function"&&typeof l.readUInt8=="function"&&typeof l.skip=="function"&&typeof l.raw=="function"},s.prototype.save=function(){return {offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(l){let f=new s(this.base);return f.offset=l.offset,f.length=this.offset,this.offset=l.offset,i.prototype.restore.call(this,l.reporter),f},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(l){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,true):this.error(l||"DecoderBuffer overrun")},s.prototype.skip=function(l,f){if(!(this.offset+l<=this.length))return this.error(f||"DecoderBuffer overrun");let u=new s(this.base);return u._reporterState=this._reporterState,u.offset=this.offset,u.length=this.offset+l,this.offset+=l,u},s.prototype.raw=function(l){return this.base.slice(l?l.offset:this.offset,this.length)},r.EncoderBuffer=o,o.isEncoderBuffer=function(l){return l instanceof o?true:typeof l=="object"&&l.constructor.name==="EncoderBuffer"&&typeof l.length=="number"&&typeof l.join=="function"},o.prototype.join=function(l,f){return l||(l=a.alloc(this.length)),f||(f=0),this.length===0||(Array.isArray(this.value)?this.value.forEach((function(u){u.join(l,f),f+=u.length;})):(typeof this.value=="number"?l[f]=this.value:typeof this.value=="string"?l.write(this.value,f):a.isBuffer(this.value)&&this.value.copy(l,f),f+=this.length)),l};},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(e,t,r){let 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){let n=e("../base/reporter").Reporter,i=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=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 f(c,d,p){let h={};this._baseState=h,h.name=p,h.enc=c,h.parent=d||null,h.children=null,h.tag=null,h.args=null,h.reverseArgs=null,h.choice=null,h.optional=false,h.any=false,h.obj=false,h.use=null,h.useDecoder=null,h.key=null,h.default=null,h.explicit=null,h.implicit=null,h.contains=null,h.parent||(h.children=[],this._wrap());}t.exports=f;let u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){let c=this._baseState,d={};u.forEach((function(h){d[h]=c[h];}));let p=new this.constructor(d.parent);return p._baseState=d,p},f.prototype._wrap=function(){let c=this._baseState;l.forEach((function(d){this[d]=function(){let p=new this.constructor(this);return c.children.push(p),p[d].apply(p,arguments)};}),this);},f.prototype._init=function(c){let d=this._baseState;s(d.parent===null),c.call(this),d.children=d.children.filter((function(p){return p._baseState.parent===this}),this),s.equal(d.children.length,1,"Root node can have only one child");},f.prototype._useArgs=function(c){let d=this._baseState,p=c.filter((function(h){return h instanceof this.constructor}),this);c=c.filter((function(h){return !(h instanceof this.constructor)}),this),p.length!==0&&(s(d.children===null),d.children=p,p.forEach((function(h){h._baseState.parent=this;}),this)),c.length!==0&&(s(d.args===null),d.args=c,d.reverseArgs=c.map((function(h){if(typeof h!="object"||h.constructor!==Object)return h;let m={};return Object.keys(h).forEach((function(g){g==(0|g)&&(g|=0);let v=h[g];m[v]=g;})),m})));},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(c){f.prototype[c]=function(){let d=this._baseState;throw new Error(c+" not implemented for encoding: "+d.enc)};})),o.forEach((function(c){f.prototype[c]=function(){let d=this._baseState,p=Array.prototype.slice.call(arguments);return s(d.tag===null),d.tag=c,this._useArgs(p),this};})),f.prototype.use=function(c){s(c);let d=this._baseState;return s(d.use===null),d.use=c,this},f.prototype.optional=function(){return this._baseState.optional=true,this},f.prototype.def=function(c){let d=this._baseState;return s(d.default===null),d.default=c,d.optional=true,this},f.prototype.explicit=function(c){let d=this._baseState;return s(d.explicit===null&&d.implicit===null),d.explicit=c,this},f.prototype.implicit=function(c){let d=this._baseState;return s(d.explicit===null&&d.implicit===null),d.implicit=c,this},f.prototype.obj=function(){let c=this._baseState,d=Array.prototype.slice.call(arguments);return c.obj=true,d.length!==0&&this._useArgs(d),this},f.prototype.key=function(c){let d=this._baseState;return s(d.key===null),d.key=c,this},f.prototype.any=function(){return this._baseState.any=true,this},f.prototype.choice=function(c){let d=this._baseState;return s(d.choice===null),d.choice=c,this._useArgs(Object.keys(c).map((function(p){return c[p]}))),this},f.prototype.contains=function(c){let d=this._baseState;return s(d.use===null),d.contains=c,this},f.prototype._decode=function(c,d){let p=this._baseState;if(p.parent===null)return c.wrapResult(p.children[0]._decode(c,d));let h,m=p.default,g=true,v=null;if(p.key!==null&&(v=c.enterKey(p.key)),p.optional){let w=null;if(p.explicit!==null?w=p.explicit:p.implicit!==null?w=p.implicit:p.tag!==null&&(w=p.tag),w!==null||p.any){if(g=this._peekTag(c,w,p.any),c.isError(g))return g}else {let C=c.save();try{p.choice===null?this._decodeGeneric(p.tag,c,d):this._decodeChoice(c,d),g=!0;}catch{g=false;}c.restore(C);}}if(p.obj&&g&&(h=c.enterObject()),g){if(p.explicit!==null){let C=this._decodeTag(c,p.explicit);if(c.isError(C))return C;c=C;}let w=c.offset;if(p.use===null&&p.choice===null){let C;p.any&&(C=c.save());let T=this._decodeTag(c,p.implicit!==null?p.implicit:p.tag,p.any);if(c.isError(T))return T;p.any?m=c.raw(C):c=T;}if(d&&d.track&&p.tag!==null&&d.track(c.path(),w,c.length,"tagged"),d&&d.track&&p.tag!==null&&d.track(c.path(),c.offset,c.length,"content"),p.any||(m=p.choice===null?this._decodeGeneric(p.tag,c,d):this._decodeChoice(c,d)),c.isError(m))return m;if(p.any||p.choice!==null||p.children===null||p.children.forEach((function(C){C._decode(c,d);})),p.contains&&(p.tag==="octstr"||p.tag==="bitstr")){let C=new a(m);m=this._getUse(p.contains,c._reporterState.obj)._decode(C,d);}}return p.obj&&g&&(m=c.leaveObject(h)),p.key===null||m===null&&g!==true?v!==null&&c.exitKey(v):c.leaveKey(v,p.key,m),m},f.prototype._decodeGeneric=function(c,d,p){let h=this._baseState;return c==="seq"||c==="set"?null:c==="seqof"||c==="setof"?this._decodeList(d,c,h.args[0],p):/str$/.test(c)?this._decodeStr(d,c,p):c==="objid"&&h.args?this._decodeObjid(d,h.args[0],h.args[1],p):c==="objid"?this._decodeObjid(d,null,null,p):c==="gentime"||c==="utctime"?this._decodeTime(d,c,p):c==="null_"?this._decodeNull(d,p):c==="bool"?this._decodeBool(d,p):c==="objDesc"?this._decodeStr(d,c,p):c==="int"||c==="enum"?this._decodeInt(d,h.args&&h.args[0],p):h.use!==null?this._getUse(h.use,d._reporterState.obj)._decode(d,p):d.error("unknown tag: "+c)},f.prototype._getUse=function(c,d){let p=this._baseState;return p.useDecoder=this._use(c,d),s(p.useDecoder._baseState.parent===null),p.useDecoder=p.useDecoder._baseState.children[0],p.implicit!==p.useDecoder._baseState.implicit&&(p.useDecoder=p.useDecoder.clone(),p.useDecoder._baseState.implicit=p.implicit),p.useDecoder},f.prototype._decodeChoice=function(c,d){let p=this._baseState,h=null,m=false;return Object.keys(p.choice).some((function(g){let v=c.save(),w=p.choice[g];try{let C=w._decode(c,d);if(c.isError(C))return !1;h={type:g,value:C},m=!0;}catch{return c.restore(v),false}return true}),this),m?h:c.error("Choice not matched")},f.prototype._createEncoderBuffer=function(c){return new i(c,this.reporter)},f.prototype._encode=function(c,d,p){let h=this._baseState;if(h.default!==null&&h.default===c)return;let m=this._encodeValue(c,d,p);return m===void 0||this._skipDefault(m,d,p)?void 0:m},f.prototype._encodeValue=function(c,d,p){let h=this._baseState;if(h.parent===null)return h.children[0]._encode(c,d||new n);let m=null;if(this.reporter=d,h.optional&&c===void 0){if(h.default===null)return;c=h.default;}let g=null,v=false;if(h.any)m=this._createEncoderBuffer(c);else if(h.choice)m=this._encodeChoice(c,d);else if(h.contains)g=this._getUse(h.contains,p)._encode(c,d),v=true;else if(h.children)g=h.children.map((function(w){if(w._baseState.tag==="null_")return w._encode(null,d,c);if(w._baseState.key===null)return d.error("Child should have a key");let C=d.enterKey(w._baseState.key);if(typeof c!="object")return d.error("Child expected, but input is not object");let T=w._encode(c[w._baseState.key],d,c);return d.leaveKey(C),T}),this).filter((function(w){return w})),g=this._createEncoderBuffer(g);else if(h.tag==="seqof"||h.tag==="setof"){if(!h.args||h.args.length!==1)return d.error("Too many args for : "+h.tag);if(!Array.isArray(c))return d.error("seqof/setof, but data is not Array");let w=this.clone();w._baseState.implicit=null,g=this._createEncoderBuffer(c.map((function(C){let T=this._baseState;return this._getUse(T.args[0],c)._encode(C,d)}),w));}else h.use!==null?m=this._getUse(h.use,p)._encode(c,d):(g=this._encodePrimitive(h.tag,c),v=true);if(!h.any&&h.choice===null){let w=h.implicit!==null?h.implicit:h.tag,C=h.implicit===null?"universal":"context";w===null?h.use===null&&d.error("Tag could be omitted only for .use()"):h.use===null&&(m=this._encodeComposite(w,v,C,g));}return h.explicit!==null&&(m=this._encodeComposite(h.explicit,false,"context",m)),m},f.prototype._encodeChoice=function(c,d){let p=this._baseState,h=p.choice[c.type];return h||s(false,c.type+" not found in "+JSON.stringify(Object.keys(p.choice))),h._encode(c.value,d)},f.prototype._encodePrimitive=function(c,d){let p=this._baseState;if(/str$/.test(c))return this._encodeStr(d,c);if(c==="objid"&&p.args)return this._encodeObjid(d,p.reverseArgs[0],p.args[1]);if(c==="objid")return this._encodeObjid(d,null,null);if(c==="gentime"||c==="utctime")return this._encodeTime(d,c);if(c==="null_")return this._encodeNull();if(c==="int"||c==="enum")return this._encodeInt(d,p.args&&p.reverseArgs[0]);if(c==="bool")return this._encodeBool(d);if(c==="objDesc")return this._encodeStr(d,c);throw new Error("Unsupported tag: "+c)},f.prototype._isNumstr=function(c){return /^[0-9 ]*$/.test(c)},f.prototype._isPrintstr=function(c){return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(c)};},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(e,t,r){let n=e("inherits");function i(s){this._reporterState={obj:null,path:[],options:s||{},errors:[]};}function a(s,o){this.path=s,this.rethrow(o);}r.Reporter=i,i.prototype.isError=function(s){return s instanceof a},i.prototype.save=function(){let s=this._reporterState;return {obj:s.obj,pathLen:s.path.length}},i.prototype.restore=function(s){let o=this._reporterState;o.obj=s.obj,o.path=o.path.slice(0,s.pathLen);},i.prototype.enterKey=function(s){return this._reporterState.path.push(s)},i.prototype.exitKey=function(s){let o=this._reporterState;o.path=o.path.slice(0,s-1);},i.prototype.leaveKey=function(s,o,l){let f=this._reporterState;this.exitKey(s),f.obj!==null&&(f.obj[o]=l);},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){let s=this._reporterState,o=s.obj;return s.obj={},o},i.prototype.leaveObject=function(s){let o=this._reporterState,l=o.obj;return o.obj=s,l},i.prototype.error=function(s){let o,l=this._reporterState,f=s instanceof a;if(o=f?s:new a(l.path.map((function(u){return "["+JSON.stringify(u)+"]"})).join(""),s.message||s,s.stack),!l.options.partial)throw o;return f||l.errors.push(o),o},i.prototype.wrapResult=function(s){let o=this._reporterState;return o.options.partial?{result:this.isError(s)?null:s,errors:o.errors}:s},n(a,Error),a.prototype.rethrow=function(s){if(this.message=s+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(o){this.stack=o.stack;}return this};},{inherits:440}],176:[function(e,t,r){function n(i){let a={};return Object.keys(i).forEach((function(s){(0|s)==s&&(s|=0);let o=i[s];a[o]=s;})),a}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){let n=r;n._reverse=function(i){let a={};return Object.keys(i).forEach((function(s){(0|s)==s&&(s|=0);let o=i[s];a[o]=s;})),a},n.der=e("./der");},{"./der":176}],178:[function(e,t,r){let n=e("inherits"),i=e("bn.js"),a=e("../base/buffer").DecoderBuffer,s=e("../base/node"),o=e("../constants/der");function l(d){this.enc="der",this.name=d.name,this.entity=d,this.tree=new f,this.tree._init(d.body);}function f(d){s.call(this,"der",d);}function u(d,p){let h=d.readUInt8(p);if(d.isError(h))return h;let m=o.tagClass[h>>6],g=(32&h)==0;if((31&h)==31){let v=h;for(h=0;(128&v)==128;){if(v=d.readUInt8(p),d.isError(v))return v;h<<=7,h|=127&v;}}else h&=31;return {cls:m,primitive:g,tag:h,tagStr:o.tag[h]}}function c(d,p,h){let m=d.readUInt8(h);if(d.isError(m))return m;if(!p&&m===128)return null;if((128&m)==0)return m;let g=127&m;if(g>4)return d.error("length octect is too long");m=0;for(let v=0;v<g;v++){m<<=8;let w=d.readUInt8(h);if(d.isError(w))return w;m|=w;}return m}t.exports=l,l.prototype.decode=function(d,p){return a.isDecoderBuffer(d)||(d=new a(d,p)),this.tree._decode(d,p)},n(f,s),f.prototype._peekTag=function(d,p,h){if(d.isEmpty())return false;let m=d.save(),g=u(d,'Failed to peek tag: "'+p+'"');return d.isError(g)?g:(d.restore(m),g.tag===p||g.tagStr===p||g.tagStr+"of"===p||h)},f.prototype._decodeTag=function(d,p,h){let m=u(d,'Failed to decode tag of "'+p+'"');if(d.isError(m))return m;let g=c(d,m.primitive,'Failed to get length of "'+p+'"');if(d.isError(g))return g;if(!h&&m.tag!==p&&m.tagStr!==p&&m.tagStr+"of"!==p)return d.error('Failed to match tag: "'+p+'"');if(m.primitive||g!==null)return d.skip(g,'Failed to match body of: "'+p+'"');let v=d.save(),w=this._skipUntilEnd(d,'Failed to skip indefinite length body: "'+this.tag+'"');return d.isError(w)?w:(g=d.offset-v.offset,d.restore(v),d.skip(g,'Failed to match body of: "'+p+'"'))},f.prototype._skipUntilEnd=function(d,p){for(;;){let h=u(d,p);if(d.isError(h))return h;let m=c(d,h.primitive,p);if(d.isError(m))return m;let g;if(g=h.primitive||m!==null?d.skip(m):this._skipUntilEnd(d,p),d.isError(g))return g;if(h.tagStr==="end")break}},f.prototype._decodeList=function(d,p,h,m){let g=[];for(;!d.isEmpty();){let v=this._peekTag(d,"end");if(d.isError(v))return v;let w=h.decode(d,"der",m);if(d.isError(w)&&v)break;g.push(w);}return g},f.prototype._decodeStr=function(d,p){if(p==="bitstr"){let h=d.readUInt8();return d.isError(h)?h:{unused:h,data:d.raw()}}if(p==="bmpstr"){let h=d.raw();if(h.length%2==1)return d.error("Decoding of string type: bmpstr length mismatch");let m="";for(let g=0;g<h.length/2;g++)m+=String.fromCharCode(h.readUInt16BE(2*g));return m}if(p==="numstr"){let h=d.raw().toString("ascii");return this._isNumstr(h)?h:d.error("Decoding of string type: numstr unsupported characters")}if(p==="octstr"||p==="objDesc")return d.raw();if(p==="printstr"){let h=d.raw().toString("ascii");return this._isPrintstr(h)?h:d.error("Decoding of string type: printstr unsupported characters")}return /str$/.test(p)?d.raw().toString():d.error("Decoding of string type: "+p+" unsupported")},f.prototype._decodeObjid=function(d,p,h){let m,g=[],v=0,w=0;for(;!d.isEmpty();)w=d.readUInt8(),v<<=7,v|=127&w,(128&w)==0&&(g.push(v),v=0);128&w&&g.push(v);let C=g[0]/40|0,T=g[0]%40;if(m=h?g:[C,T].concat(g.slice(1)),p){let I=p[m.join(" ")];I===void 0&&(I=p[m.join(".")]),I!==void 0&&(m=I);}return m},f.prototype._decodeTime=function(d,p){let h=d.raw().toString(),m,g,v,w,C,T;if(p==="gentime")m=0|h.slice(0,4),g=0|h.slice(4,6),v=0|h.slice(6,8),w=0|h.slice(8,10),C=0|h.slice(10,12),T=0|h.slice(12,14);else {if(p!=="utctime")return d.error("Decoding "+p+" time is not supported yet");m=0|h.slice(0,2),g=0|h.slice(2,4),v=0|h.slice(4,6),w=0|h.slice(6,8),C=0|h.slice(8,10),T=0|h.slice(10,12),m=m<70?2e3+m:1900+m;}return Date.UTC(m,g-1,v,w,C,T,0)},f.prototype._decodeNull=function(){return null},f.prototype._decodeBool=function(d){let p=d.readUInt8();return d.isError(p)?p:p!==0},f.prototype._decodeInt=function(d,p){let h=d.raw(),m=new i(h);return p&&(m=p[m.toString(10)]||m),m},f.prototype._use=function(d,p){return typeof d=="function"&&(d=d(p)),d._getDecoder("der").tree};},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(e,t,r){let n=r;n.der=e("./der"),n.pem=e("./pem");},{"./der":178,"./pem":180}],180:[function(e,t,r){let n=e("inherits"),i=e("safer-buffer").Buffer,a=e("./der");function s(o){a.call(this,o),this.enc="pem";}n(s,a),t.exports=s,s.prototype.decode=function(o,l){let f=o.toString().split(/[\r\n]+/g),u=l.label.toUpperCase(),c=/^-----(BEGIN|END) ([^-]+)-----$/,d=-1,p=-1;for(let g=0;g<f.length;g++){let v=f[g].match(c);if(v!==null&&v[2]===u){if(d!==-1){if(v[1]!=="END")break;p=g;break}if(v[1]!=="BEGIN")break;d=g;}}if(d===-1||p===-1)throw new Error("PEM section not found for: "+u);let h=f.slice(d+1,p).join("");h.replace(/[^a-z0-9+/=]+/gi,"");let m=i.from(h,"base64");return a.prototype.decode.call(this,m,l)};},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(e,t,r){let n=e("inherits"),i=e("safer-buffer").Buffer,a=e("../base/node"),s=e("../constants/der");function o(u){this.enc="der",this.name=u.name,this.entity=u,this.tree=new l,this.tree._init(u.body);}function l(u){a.call(this,"der",u);}function f(u){return u<10?"0"+u:u}t.exports=o,o.prototype.encode=function(u,c){return this.tree._encode(u,c).join()},n(l,a),l.prototype._encodeComposite=function(u,c,d,p){let h=(function(v,w,C,T){let I;if(v==="seqof"?v="seq":v==="setof"&&(v="set"),s.tagByName.hasOwnProperty(v))I=s.tagByName[v];else {if(typeof v!="number"||(0|v)!==v)return T.error("Unknown tag: "+v);I=v;}return I>=31?T.error("Multi-octet tag encoding unsupported"):(w||(I|=32),I|=s.tagClassByName[C||"universal"]<<6,I)})(u,c,d,this.reporter);if(p.length<128){let v=i.alloc(2);return v[0]=h,v[1]=p.length,this._createEncoderBuffer([v,p])}let m=1;for(let v=p.length;v>=256;v>>=8)m++;let g=i.alloc(2+m);g[0]=h,g[1]=128|m;for(let v=1+m,w=p.length;w>0;v--,w>>=8)g[v]=255&w;return this._createEncoderBuffer([g,p])},l.prototype._encodeStr=function(u,c){if(c==="bitstr")return this._createEncoderBuffer([0|u.unused,u.data]);if(c==="bmpstr"){let d=i.alloc(2*u.length);for(let p=0;p<u.length;p++)d.writeUInt16BE(u.charCodeAt(p),2*p);return this._createEncoderBuffer(d)}return c==="numstr"?this._isNumstr(u)?this._createEncoderBuffer(u):this.reporter.error("Encoding of string type: numstr supports only digits and space"):c==="printstr"?this._isPrintstr(u)?this._createEncoderBuffer(u):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(c)||c==="objDesc"?this._createEncoderBuffer(u):this.reporter.error("Encoding of string type: "+c+" unsupported")},l.prototype._encodeObjid=function(u,c,d){if(typeof u=="string"){if(!c)return this.reporter.error("string objid given, but no values map found");if(!c.hasOwnProperty(u))return this.reporter.error("objid not found in values map");u=c[u].split(/[\s.]+/g);for(let g=0;g<u.length;g++)u[g]|=0;}else if(Array.isArray(u)){u=u.slice();for(let g=0;g<u.length;g++)u[g]|=0;}if(!Array.isArray(u))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(u));if(!d){if(u[1]>=40)return this.reporter.error("Second objid identifier OOB");u.splice(0,2,40*u[0]+u[1]);}let p=0;for(let g=0;g<u.length;g++){let v=u[g];for(p++;v>=128;v>>=7)p++;}let h=i.alloc(p),m=h.length-1;for(let g=u.length-1;g>=0;g--){let v=u[g];for(h[m--]=127&v;(v>>=7)>0;)h[m--]=128|127&v;}return this._createEncoderBuffer(h)},l.prototype._encodeTime=function(u,c){let d,p=new Date(u);return c==="gentime"?d=[f(p.getUTCFullYear()),f(p.getUTCMonth()+1),f(p.getUTCDate()),f(p.getUTCHours()),f(p.getUTCMinutes()),f(p.getUTCSeconds()),"Z"].join(""):c==="utctime"?d=[f(p.getUTCFullYear()%100),f(p.getUTCMonth()+1),f(p.getUTCDate()),f(p.getUTCHours()),f(p.getUTCMinutes()),f(p.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+c+" time is not supported yet"),this._encodeStr(d,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(u,c){if(typeof u=="string"){if(!c)return this.reporter.error("String int or enum given, but no values map");if(!c.hasOwnProperty(u))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(u));u=c[u];}if(typeof u!="number"&&!i.isBuffer(u)){let h=u.toArray();!u.sign&&128&h[0]&&h.unshift(0),u=i.from(h);}if(i.isBuffer(u)){let h=u.length;u.length===0&&h++;let m=i.alloc(h);return u.copy(m),u.length===0&&(m[0]=0),this._createEncoderBuffer(m)}if(u<128)return this._createEncoderBuffer(u);if(u<256)return this._createEncoderBuffer([0,u]);let d=1;for(let h=u;h>=256;h>>=8)d++;let p=new Array(d);for(let h=p.length-1;h>=0;h--)p[h]=255&u,u>>=8;return 128&p[0]&&p.unshift(0),this._createEncoderBuffer(i.from(p))},l.prototype._encodeBool=function(u){return this._createEncoderBuffer(u?255:0)},l.prototype._use=function(u,c){return typeof u=="function"&&(u=u(c)),u._getEncoder("der").tree},l.prototype._skipDefault=function(u,c,d){let p=this._baseState,h;if(p.default===null)return false;let m=u.join();if(p.defaultBuffer===void 0&&(p.defaultBuffer=this._encodeValue(p.default,c,d).join()),m.length!==p.defaultBuffer.length)return false;for(h=0;h<m.length;h++)if(m[h]!==p.defaultBuffer[h])return false;return true};},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(e,t,r){let n=r;n.der=e("./der"),n.pem=e("./pem");},{"./der":181,"./pem":183}],183:[function(e,t,r){let n=e("inherits"),i=e("./der");function a(s){i.call(this,s),this.enc="pem";}n(a,i),t.exports=a,a.prototype.encode=function(s,o){let l=i.prototype.encode.call(this,s).toString("base64"),f=["-----BEGIN "+o.label+"-----"];for(let u=0;u<l.length;u+=64)f.push(l.slice(u,u+64));return f.push("-----END "+o.label+"-----"),f.join(`
|
|
16
|
+
`)};},{"./der":181,inherits:440}],184:[function(e,t,r){(function(n,i){function a(E,M){if(!E)throw new Error(M||"Assertion failed")}function s(E,M){E.super_=M;var L=function(){};L.prototype=M.prototype,E.prototype=new L,E.prototype.constructor=E;}function o(E,M,L){if(o.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&(M!=="le"&&M!=="be"||(L=M,M=10),this._init(E||0,M||10,L||"be"));}var l;typeof n=="object"?n.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer;}catch{}function f(E,M){var L=E.charCodeAt(M);return L>=65&&L<=70?L-55:L>=97&&L<=102?L-87:L-48&15}function u(E,M,L){var b=f(E,L);return L-1>=M&&(b|=f(E,L-1)<<4),b}function c(E,M,L,b){for(var y=0,x=Math.min(E.length,L),_=M;_<x;_++){var S=E.charCodeAt(_)-48;y*=b,y+=S>=49?S-49+10:S>=17?S-17+10:S;}return y}o.isBN=function(E){return E instanceof o||E!==null&&typeof E=="object"&&E.constructor.wordSize===o.wordSize&&Array.isArray(E.words)},o.max=function(E,M){return E.cmp(M)>0?E:M},o.min=function(E,M){return E.cmp(M)<0?E:M},o.prototype._init=function(E,M,L){if(typeof E=="number")return this._initNumber(E,M,L);if(typeof E=="object")return this._initArray(E,M,L);M==="hex"&&(M=16),a(M===(0|M)&&M>=2&&M<=36);var b=0;(E=E.toString().replace(/\s+/g,""))[0]==="-"&&(b++,this.negative=1),b<E.length&&(M===16?this._parseHex(E,b,L):(this._parseBase(E,M,b),L==="le"&&this._initArray(this.toArray(),M,L)));},o.prototype._initNumber=function(E,M,L){E<0&&(this.negative=1,E=-E),E<67108864?(this.words=[67108863&E],this.length=1):E<4503599627370496?(this.words=[67108863&E,E/67108864&67108863],this.length=2):(a(E<9007199254740992),this.words=[67108863&E,E/67108864&67108863,1],this.length=3),L==="le"&&this._initArray(this.toArray(),M,L);},o.prototype._initArray=function(E,M,L){if(a(typeof E.length=="number"),E.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(E.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var y,x,_=0;if(L==="be")for(b=E.length-1,y=0;b>=0;b-=3)x=E[b]|E[b-1]<<8|E[b-2]<<16,this.words[y]|=x<<_&67108863,this.words[y+1]=x>>>26-_&67108863,(_+=24)>=26&&(_-=26,y++);else if(L==="le")for(b=0,y=0;b<E.length;b+=3)x=E[b]|E[b+1]<<8|E[b+2]<<16,this.words[y]|=x<<_&67108863,this.words[y+1]=x>>>26-_&67108863,(_+=24)>=26&&(_-=26,y++);return this.strip()},o.prototype._parseHex=function(E,M,L){this.length=Math.ceil((E.length-M)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var y,x=0,_=0;if(L==="be")for(b=E.length-1;b>=M;b-=2)y=u(E,M,b)<<x,this.words[_]|=67108863&y,x>=18?(x-=18,_+=1,this.words[_]|=y>>>26):x+=8;else for(b=(E.length-M)%2==0?M+1:M;b<E.length;b+=2)y=u(E,M,b)<<x,this.words[_]|=67108863&y,x>=18?(x-=18,_+=1,this.words[_]|=y>>>26):x+=8;this.strip();},o.prototype._parseBase=function(E,M,L){this.words=[0],this.length=1;for(var b=0,y=1;y<=67108863;y*=M)b++;b--,y=y/M|0;for(var x=E.length-L,_=x%b,S=Math.min(x,x-_)+L,R=0,z=L;z<S;z+=b)R=c(E,z,z+b,M),this.imuln(y),this.words[0]+R<67108864?this.words[0]+=R:this._iaddn(R);if(_!==0){var U=1;for(R=c(E,z,E.length,M),z=0;z<_;z++)U*=M;this.imuln(U),this.words[0]+R<67108864?this.words[0]+=R:this._iaddn(R);}this.strip();},o.prototype.copy=function(E){E.words=new Array(this.length);for(var M=0;M<this.length;M++)E.words[M]=this.words[M];E.length=this.length,E.negative=this.negative,E.red=this.red;},o.prototype.clone=function(){var E=new o(null);return this.copy(E),E},o.prototype._expand=function(E){for(;this.length<E;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},o.prototype.inspect=function(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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 m(E,M,L){L.negative=M.negative^E.negative;var b=E.length+M.length|0;L.length=b,b=b-1|0;var y=0|E.words[0],x=0|M.words[0],_=y*x,S=67108863&_,R=_/67108864|0;L.words[0]=S;for(var z=1;z<b;z++){for(var U=R>>>26,H=67108863&R,q=Math.min(z,M.length-1),N=Math.max(0,z-E.length+1);N<=q;N++){var V=z-N|0;U+=(_=(y=0|E.words[V])*(x=0|M.words[N])+H)/67108864|0,H=67108863&_;}L.words[z]=0|H,R=0|U;}return R!==0?L.words[z]=0|R:L.length--,L.strip()}o.prototype.toString=function(E,M){var L;if(M=0|M||1,(E=E||10)===16||E==="hex"){L="";for(var b=0,y=0,x=0;x<this.length;x++){var _=this.words[x],S=(16777215&(_<<b|y)).toString(16);L=(y=_>>>24-b&16777215)!==0||x!==this.length-1?d[6-S.length]+S+L:S+L,(b+=2)>=26&&(b-=26,x--);}for(y!==0&&(L=y.toString(16)+L);L.length%M!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}if(E===(0|E)&&E>=2&&E<=36){var R=p[E],z=h[E];L="";var U=this.clone();for(U.negative=0;!U.isZero();){var H=U.modn(z).toString(E);L=(U=U.idivn(z)).isZero()?H+L:d[R-H.length]+H+L;}for(this.isZero()&&(L="0"+L);L.length%M!=0;)L="0"+L;return this.negative!==0&&(L="-"+L),L}a(false,"Base should be between 2 and 36");},o.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=67108864*this.words[1]:this.length===3&&this.words[2]===1?E+=4503599627370496+67108864*this.words[1]:this.length>2&&a(false,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(E,M){return a(l!==void 0),this.toArrayLike(l,E,M)},o.prototype.toArray=function(E,M){return this.toArrayLike(Array,E,M)},o.prototype.toArrayLike=function(E,M,L){var b=this.byteLength(),y=L||Math.max(1,b);a(b<=y,"byte array longer than desired length"),a(y>0,"Requested array length <= 0"),this.strip();var x,_,S=M==="le",R=new E(y),z=this.clone();if(S){for(_=0;!z.isZero();_++)x=z.andln(255),z.iushrn(8),R[_]=x;for(;_<y;_++)R[_]=0;}else {for(_=0;_<y-b;_++)R[_]=0;for(_=0;!z.isZero();_++)x=z.andln(255),z.iushrn(8),R[y-_-1]=x;}return R},Math.clz32?o.prototype._countBits=function(E){return 32-Math.clz32(E)}:o.prototype._countBits=function(E){var M=E,L=0;return M>=4096&&(L+=13,M>>>=13),M>=64&&(L+=7,M>>>=7),M>=8&&(L+=4,M>>>=4),M>=2&&(L+=2,M>>>=2),L+M},o.prototype._zeroBits=function(E){if(E===0)return 26;var M=E,L=0;return (8191&M)==0&&(L+=13,M>>>=13),(127&M)==0&&(L+=7,M>>>=7),(15&M)==0&&(L+=4,M>>>=4),(3&M)==0&&(L+=2,M>>>=2),(1&M)==0&&L++,L},o.prototype.bitLength=function(){var E=this.words[this.length-1],M=this._countBits(E);return 26*(this.length-1)+M},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,M=0;M<this.length;M++){var L=this._zeroBits(this.words[M]);if(E+=L,L!==26)break}return E},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(E){return this.negative!==0?this.abs().inotn(E).iaddn(1):this.clone()},o.prototype.fromTwos=function(E){return this.testn(E-1)?this.notn(E).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(E){for(;this.length<E.length;)this.words[this.length++]=0;for(var M=0;M<E.length;M++)this.words[M]=this.words[M]|E.words[M];return this.strip()},o.prototype.ior=function(E){return a((this.negative|E.negative)==0),this.iuor(E)},o.prototype.or=function(E){return this.length>E.length?this.clone().ior(E):E.clone().ior(this)},o.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},o.prototype.iuand=function(E){var M;M=this.length>E.length?E:this;for(var L=0;L<M.length;L++)this.words[L]=this.words[L]&E.words[L];return this.length=M.length,this.strip()},o.prototype.iand=function(E){return a((this.negative|E.negative)==0),this.iuand(E)},o.prototype.and=function(E){return this.length>E.length?this.clone().iand(E):E.clone().iand(this)},o.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},o.prototype.iuxor=function(E){var M,L;this.length>E.length?(M=this,L=E):(M=E,L=this);for(var b=0;b<L.length;b++)this.words[b]=M.words[b]^L.words[b];if(this!==M)for(;b<M.length;b++)this.words[b]=M.words[b];return this.length=M.length,this.strip()},o.prototype.ixor=function(E){return a((this.negative|E.negative)==0),this.iuxor(E)},o.prototype.xor=function(E){return this.length>E.length?this.clone().ixor(E):E.clone().ixor(this)},o.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},o.prototype.inotn=function(E){a(typeof E=="number"&&E>=0);var M=0|Math.ceil(E/26),L=E%26;this._expand(M),L>0&&M--;for(var b=0;b<M;b++)this.words[b]=67108863&~this.words[b];return L>0&&(this.words[b]=~this.words[b]&67108863>>26-L),this.strip()},o.prototype.notn=function(E){return this.clone().inotn(E)},o.prototype.setn=function(E,M){a(typeof E=="number"&&E>=0);var L=E/26|0,b=E%26;return this._expand(L+1),this.words[L]=M?this.words[L]|1<<b:this.words[L]&~(1<<b),this.strip()},o.prototype.iadd=function(E){var M,L,b;if(this.negative!==0&&E.negative===0)return this.negative=0,M=this.isub(E),this.negative^=1,this._normSign();if(this.negative===0&&E.negative!==0)return E.negative=0,M=this.isub(E),E.negative=1,M._normSign();this.length>E.length?(L=this,b=E):(L=E,b=this);for(var y=0,x=0;x<b.length;x++)M=(0|L.words[x])+(0|b.words[x])+y,this.words[x]=67108863&M,y=M>>>26;for(;y!==0&&x<L.length;x++)M=(0|L.words[x])+y,this.words[x]=67108863&M,y=M>>>26;if(this.length=L.length,y!==0)this.words[this.length]=y,this.length++;else if(L!==this)for(;x<L.length;x++)this.words[x]=L.words[x];return this},o.prototype.add=function(E){var M;return E.negative!==0&&this.negative===0?(E.negative=0,M=this.sub(E),E.negative^=1,M):E.negative===0&&this.negative!==0?(this.negative=0,M=E.sub(this),this.negative=1,M):this.length>E.length?this.clone().iadd(E):E.clone().iadd(this)},o.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var M=this.iadd(E);return E.negative=1,M._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var L,b,y=this.cmp(E);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;y>0?(L=this,b=E):(L=E,b=this);for(var x=0,_=0;_<b.length;_++)x=(M=(0|L.words[_])-(0|b.words[_])+x)>>26,this.words[_]=67108863&M;for(;x!==0&&_<L.length;_++)x=(M=(0|L.words[_])+x)>>26,this.words[_]=67108863&M;if(x===0&&_<L.length&&L!==this)for(;_<L.length;_++)this.words[_]=L.words[_];return this.length=Math.max(this.length,_),L!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(E){return this.clone().isub(E)};var g=function(E,M,L){var b,y,x,_=E.words,S=M.words,R=L.words,z=0,U=0|_[0],H=8191&U,q=U>>>13,N=0|_[1],V=8191&N,O=N>>>13,A=0|_[2],P=8191&A,W=A>>>13,Z=0|_[3],$=8191&Z,K=Z>>>13,te=0|_[4],J=8191&te,Y=te>>>13,ne=0|_[5],re=8191&ne,ie=ne>>>13,oe=0|_[6],se=8191&oe,le=oe>>>13,ge=0|_[7],he=8191&ge,be=ge>>>13,Me=0|_[8],ye=8191&Me,Se=Me>>>13,We=0|_[9],Ne=8191&We,Ee=We>>>13,Le=0|S[0],Ce=8191&Le,xe=Le>>>13,Qe=0|S[1],Be=8191&Qe,He=Qe>>>13,At=0|S[2],Ve=8191&At,Ze=At>>>13,Nt=0|S[3],et=8191&Nt,rt=Nt>>>13,fr=0|S[4],Ge=8191&fr,qe=fr>>>13,Gt=0|S[5],Ye=8191&Gt,De=Gt>>>13,Mt=0|S[6],tt=8191&Mt,ee=Mt>>>13,ue=0|S[7],de=8191&ue,_e=ue>>>13,Ie=0|S[8],Te=8191&Ie,Oe=Ie>>>13,ot=0|S[9],ze=8191&ot,Re=ot>>>13;L.negative=E.negative^M.negative,L.length=19;var je=(z+(b=Math.imul(H,Ce))|0)+((8191&(y=(y=Math.imul(H,xe))+Math.imul(q,Ce)|0))<<13)|0;z=((x=Math.imul(q,xe))+(y>>>13)|0)+(je>>>26)|0,je&=67108863,b=Math.imul(V,Ce),y=(y=Math.imul(V,xe))+Math.imul(O,Ce)|0,x=Math.imul(O,xe);var Fe=(z+(b=b+Math.imul(H,Be)|0)|0)+((8191&(y=(y=y+Math.imul(H,He)|0)+Math.imul(q,Be)|0))<<13)|0;z=((x=x+Math.imul(q,He)|0)+(y>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,b=Math.imul(P,Ce),y=(y=Math.imul(P,xe))+Math.imul(W,Ce)|0,x=Math.imul(W,xe),b=b+Math.imul(V,Be)|0,y=(y=y+Math.imul(V,He)|0)+Math.imul(O,Be)|0,x=x+Math.imul(O,He)|0;var st=(z+(b=b+Math.imul(H,Ve)|0)|0)+((8191&(y=(y=y+Math.imul(H,Ze)|0)+Math.imul(q,Ve)|0))<<13)|0;z=((x=x+Math.imul(q,Ze)|0)+(y>>>13)|0)+(st>>>26)|0,st&=67108863,b=Math.imul($,Ce),y=(y=Math.imul($,xe))+Math.imul(K,Ce)|0,x=Math.imul(K,xe),b=b+Math.imul(P,Be)|0,y=(y=y+Math.imul(P,He)|0)+Math.imul(W,Be)|0,x=x+Math.imul(W,He)|0,b=b+Math.imul(V,Ve)|0,y=(y=y+Math.imul(V,Ze)|0)+Math.imul(O,Ve)|0,x=x+Math.imul(O,Ze)|0;var xt=(z+(b=b+Math.imul(H,et)|0)|0)+((8191&(y=(y=y+Math.imul(H,rt)|0)+Math.imul(q,et)|0))<<13)|0;z=((x=x+Math.imul(q,rt)|0)+(y>>>13)|0)+(xt>>>26)|0,xt&=67108863,b=Math.imul(J,Ce),y=(y=Math.imul(J,xe))+Math.imul(Y,Ce)|0,x=Math.imul(Y,xe),b=b+Math.imul($,Be)|0,y=(y=y+Math.imul($,He)|0)+Math.imul(K,Be)|0,x=x+Math.imul(K,He)|0,b=b+Math.imul(P,Ve)|0,y=(y=y+Math.imul(P,Ze)|0)+Math.imul(W,Ve)|0,x=x+Math.imul(W,Ze)|0,b=b+Math.imul(V,et)|0,y=(y=y+Math.imul(V,rt)|0)+Math.imul(O,et)|0,x=x+Math.imul(O,rt)|0;var Bt=(z+(b=b+Math.imul(H,Ge)|0)|0)+((8191&(y=(y=y+Math.imul(H,qe)|0)+Math.imul(q,Ge)|0))<<13)|0;z=((x=x+Math.imul(q,qe)|0)+(y>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,b=Math.imul(re,Ce),y=(y=Math.imul(re,xe))+Math.imul(ie,Ce)|0,x=Math.imul(ie,xe),b=b+Math.imul(J,Be)|0,y=(y=y+Math.imul(J,He)|0)+Math.imul(Y,Be)|0,x=x+Math.imul(Y,He)|0,b=b+Math.imul($,Ve)|0,y=(y=y+Math.imul($,Ze)|0)+Math.imul(K,Ve)|0,x=x+Math.imul(K,Ze)|0,b=b+Math.imul(P,et)|0,y=(y=y+Math.imul(P,rt)|0)+Math.imul(W,et)|0,x=x+Math.imul(W,rt)|0,b=b+Math.imul(V,Ge)|0,y=(y=y+Math.imul(V,qe)|0)+Math.imul(O,Ge)|0,x=x+Math.imul(O,qe)|0;var Tt=(z+(b=b+Math.imul(H,Ye)|0)|0)+((8191&(y=(y=y+Math.imul(H,De)|0)+Math.imul(q,Ye)|0))<<13)|0;z=((x=x+Math.imul(q,De)|0)+(y>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,b=Math.imul(se,Ce),y=(y=Math.imul(se,xe))+Math.imul(le,Ce)|0,x=Math.imul(le,xe),b=b+Math.imul(re,Be)|0,y=(y=y+Math.imul(re,He)|0)+Math.imul(ie,Be)|0,x=x+Math.imul(ie,He)|0,b=b+Math.imul(J,Ve)|0,y=(y=y+Math.imul(J,Ze)|0)+Math.imul(Y,Ve)|0,x=x+Math.imul(Y,Ze)|0,b=b+Math.imul($,et)|0,y=(y=y+Math.imul($,rt)|0)+Math.imul(K,et)|0,x=x+Math.imul(K,rt)|0,b=b+Math.imul(P,Ge)|0,y=(y=y+Math.imul(P,qe)|0)+Math.imul(W,Ge)|0,x=x+Math.imul(W,qe)|0,b=b+Math.imul(V,Ye)|0,y=(y=y+Math.imul(V,De)|0)+Math.imul(O,Ye)|0,x=x+Math.imul(O,De)|0;var qt=(z+(b=b+Math.imul(H,tt)|0)|0)+((8191&(y=(y=y+Math.imul(H,ee)|0)+Math.imul(q,tt)|0))<<13)|0;z=((x=x+Math.imul(q,ee)|0)+(y>>>13)|0)+(qt>>>26)|0,qt&=67108863,b=Math.imul(he,Ce),y=(y=Math.imul(he,xe))+Math.imul(be,Ce)|0,x=Math.imul(be,xe),b=b+Math.imul(se,Be)|0,y=(y=y+Math.imul(se,He)|0)+Math.imul(le,Be)|0,x=x+Math.imul(le,He)|0,b=b+Math.imul(re,Ve)|0,y=(y=y+Math.imul(re,Ze)|0)+Math.imul(ie,Ve)|0,x=x+Math.imul(ie,Ze)|0,b=b+Math.imul(J,et)|0,y=(y=y+Math.imul(J,rt)|0)+Math.imul(Y,et)|0,x=x+Math.imul(Y,rt)|0,b=b+Math.imul($,Ge)|0,y=(y=y+Math.imul($,qe)|0)+Math.imul(K,Ge)|0,x=x+Math.imul(K,qe)|0,b=b+Math.imul(P,Ye)|0,y=(y=y+Math.imul(P,De)|0)+Math.imul(W,Ye)|0,x=x+Math.imul(W,De)|0,b=b+Math.imul(V,tt)|0,y=(y=y+Math.imul(V,ee)|0)+Math.imul(O,tt)|0,x=x+Math.imul(O,ee)|0;var Ft=(z+(b=b+Math.imul(H,de)|0)|0)+((8191&(y=(y=y+Math.imul(H,_e)|0)+Math.imul(q,de)|0))<<13)|0;z=((x=x+Math.imul(q,_e)|0)+(y>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,b=Math.imul(ye,Ce),y=(y=Math.imul(ye,xe))+Math.imul(Se,Ce)|0,x=Math.imul(Se,xe),b=b+Math.imul(he,Be)|0,y=(y=y+Math.imul(he,He)|0)+Math.imul(be,Be)|0,x=x+Math.imul(be,He)|0,b=b+Math.imul(se,Ve)|0,y=(y=y+Math.imul(se,Ze)|0)+Math.imul(le,Ve)|0,x=x+Math.imul(le,Ze)|0,b=b+Math.imul(re,et)|0,y=(y=y+Math.imul(re,rt)|0)+Math.imul(ie,et)|0,x=x+Math.imul(ie,rt)|0,b=b+Math.imul(J,Ge)|0,y=(y=y+Math.imul(J,qe)|0)+Math.imul(Y,Ge)|0,x=x+Math.imul(Y,qe)|0,b=b+Math.imul($,Ye)|0,y=(y=y+Math.imul($,De)|0)+Math.imul(K,Ye)|0,x=x+Math.imul(K,De)|0,b=b+Math.imul(P,tt)|0,y=(y=y+Math.imul(P,ee)|0)+Math.imul(W,tt)|0,x=x+Math.imul(W,ee)|0,b=b+Math.imul(V,de)|0,y=(y=y+Math.imul(V,_e)|0)+Math.imul(O,de)|0,x=x+Math.imul(O,_e)|0;var dr=(z+(b=b+Math.imul(H,Te)|0)|0)+((8191&(y=(y=y+Math.imul(H,Oe)|0)+Math.imul(q,Te)|0))<<13)|0;z=((x=x+Math.imul(q,Oe)|0)+(y>>>13)|0)+(dr>>>26)|0,dr&=67108863,b=Math.imul(Ne,Ce),y=(y=Math.imul(Ne,xe))+Math.imul(Ee,Ce)|0,x=Math.imul(Ee,xe),b=b+Math.imul(ye,Be)|0,y=(y=y+Math.imul(ye,He)|0)+Math.imul(Se,Be)|0,x=x+Math.imul(Se,He)|0,b=b+Math.imul(he,Ve)|0,y=(y=y+Math.imul(he,Ze)|0)+Math.imul(be,Ve)|0,x=x+Math.imul(be,Ze)|0,b=b+Math.imul(se,et)|0,y=(y=y+Math.imul(se,rt)|0)+Math.imul(le,et)|0,x=x+Math.imul(le,rt)|0,b=b+Math.imul(re,Ge)|0,y=(y=y+Math.imul(re,qe)|0)+Math.imul(ie,Ge)|0,x=x+Math.imul(ie,qe)|0,b=b+Math.imul(J,Ye)|0,y=(y=y+Math.imul(J,De)|0)+Math.imul(Y,Ye)|0,x=x+Math.imul(Y,De)|0,b=b+Math.imul($,tt)|0,y=(y=y+Math.imul($,ee)|0)+Math.imul(K,tt)|0,x=x+Math.imul(K,ee)|0,b=b+Math.imul(P,de)|0,y=(y=y+Math.imul(P,_e)|0)+Math.imul(W,de)|0,x=x+Math.imul(W,_e)|0,b=b+Math.imul(V,Te)|0,y=(y=y+Math.imul(V,Oe)|0)+Math.imul(O,Te)|0,x=x+Math.imul(O,Oe)|0;var Q=(z+(b=b+Math.imul(H,ze)|0)|0)+((8191&(y=(y=y+Math.imul(H,Re)|0)+Math.imul(q,ze)|0))<<13)|0;z=((x=x+Math.imul(q,Re)|0)+(y>>>13)|0)+(Q>>>26)|0,Q&=67108863,b=Math.imul(Ne,Be),y=(y=Math.imul(Ne,He))+Math.imul(Ee,Be)|0,x=Math.imul(Ee,He),b=b+Math.imul(ye,Ve)|0,y=(y=y+Math.imul(ye,Ze)|0)+Math.imul(Se,Ve)|0,x=x+Math.imul(Se,Ze)|0,b=b+Math.imul(he,et)|0,y=(y=y+Math.imul(he,rt)|0)+Math.imul(be,et)|0,x=x+Math.imul(be,rt)|0,b=b+Math.imul(se,Ge)|0,y=(y=y+Math.imul(se,qe)|0)+Math.imul(le,Ge)|0,x=x+Math.imul(le,qe)|0,b=b+Math.imul(re,Ye)|0,y=(y=y+Math.imul(re,De)|0)+Math.imul(ie,Ye)|0,x=x+Math.imul(ie,De)|0,b=b+Math.imul(J,tt)|0,y=(y=y+Math.imul(J,ee)|0)+Math.imul(Y,tt)|0,x=x+Math.imul(Y,ee)|0,b=b+Math.imul($,de)|0,y=(y=y+Math.imul($,_e)|0)+Math.imul(K,de)|0,x=x+Math.imul(K,_e)|0,b=b+Math.imul(P,Te)|0,y=(y=y+Math.imul(P,Oe)|0)+Math.imul(W,Te)|0,x=x+Math.imul(W,Oe)|0;var fe=(z+(b=b+Math.imul(V,ze)|0)|0)+((8191&(y=(y=y+Math.imul(V,Re)|0)+Math.imul(O,ze)|0))<<13)|0;z=((x=x+Math.imul(O,Re)|0)+(y>>>13)|0)+(fe>>>26)|0,fe&=67108863,b=Math.imul(Ne,Ve),y=(y=Math.imul(Ne,Ze))+Math.imul(Ee,Ve)|0,x=Math.imul(Ee,Ze),b=b+Math.imul(ye,et)|0,y=(y=y+Math.imul(ye,rt)|0)+Math.imul(Se,et)|0,x=x+Math.imul(Se,rt)|0,b=b+Math.imul(he,Ge)|0,y=(y=y+Math.imul(he,qe)|0)+Math.imul(be,Ge)|0,x=x+Math.imul(be,qe)|0,b=b+Math.imul(se,Ye)|0,y=(y=y+Math.imul(se,De)|0)+Math.imul(le,Ye)|0,x=x+Math.imul(le,De)|0,b=b+Math.imul(re,tt)|0,y=(y=y+Math.imul(re,ee)|0)+Math.imul(ie,tt)|0,x=x+Math.imul(ie,ee)|0,b=b+Math.imul(J,de)|0,y=(y=y+Math.imul(J,_e)|0)+Math.imul(Y,de)|0,x=x+Math.imul(Y,_e)|0,b=b+Math.imul($,Te)|0,y=(y=y+Math.imul($,Oe)|0)+Math.imul(K,Te)|0,x=x+Math.imul(K,Oe)|0;var ve=(z+(b=b+Math.imul(P,ze)|0)|0)+((8191&(y=(y=y+Math.imul(P,Re)|0)+Math.imul(W,ze)|0))<<13)|0;z=((x=x+Math.imul(W,Re)|0)+(y>>>13)|0)+(ve>>>26)|0,ve&=67108863,b=Math.imul(Ne,et),y=(y=Math.imul(Ne,rt))+Math.imul(Ee,et)|0,x=Math.imul(Ee,rt),b=b+Math.imul(ye,Ge)|0,y=(y=y+Math.imul(ye,qe)|0)+Math.imul(Se,Ge)|0,x=x+Math.imul(Se,qe)|0,b=b+Math.imul(he,Ye)|0,y=(y=y+Math.imul(he,De)|0)+Math.imul(be,Ye)|0,x=x+Math.imul(be,De)|0,b=b+Math.imul(se,tt)|0,y=(y=y+Math.imul(se,ee)|0)+Math.imul(le,tt)|0,x=x+Math.imul(le,ee)|0,b=b+Math.imul(re,de)|0,y=(y=y+Math.imul(re,_e)|0)+Math.imul(ie,de)|0,x=x+Math.imul(ie,_e)|0,b=b+Math.imul(J,Te)|0,y=(y=y+Math.imul(J,Oe)|0)+Math.imul(Y,Te)|0,x=x+Math.imul(Y,Oe)|0;var me=(z+(b=b+Math.imul($,ze)|0)|0)+((8191&(y=(y=y+Math.imul($,Re)|0)+Math.imul(K,ze)|0))<<13)|0;z=((x=x+Math.imul(K,Re)|0)+(y>>>13)|0)+(me>>>26)|0,me&=67108863,b=Math.imul(Ne,Ge),y=(y=Math.imul(Ne,qe))+Math.imul(Ee,Ge)|0,x=Math.imul(Ee,qe),b=b+Math.imul(ye,Ye)|0,y=(y=y+Math.imul(ye,De)|0)+Math.imul(Se,Ye)|0,x=x+Math.imul(Se,De)|0,b=b+Math.imul(he,tt)|0,y=(y=y+Math.imul(he,ee)|0)+Math.imul(be,tt)|0,x=x+Math.imul(be,ee)|0,b=b+Math.imul(se,de)|0,y=(y=y+Math.imul(se,_e)|0)+Math.imul(le,de)|0,x=x+Math.imul(le,_e)|0,b=b+Math.imul(re,Te)|0,y=(y=y+Math.imul(re,Oe)|0)+Math.imul(ie,Te)|0,x=x+Math.imul(ie,Oe)|0;var Ae=(z+(b=b+Math.imul(J,ze)|0)|0)+((8191&(y=(y=y+Math.imul(J,Re)|0)+Math.imul(Y,ze)|0))<<13)|0;z=((x=x+Math.imul(Y,Re)|0)+(y>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,b=Math.imul(Ne,Ye),y=(y=Math.imul(Ne,De))+Math.imul(Ee,Ye)|0,x=Math.imul(Ee,De),b=b+Math.imul(ye,tt)|0,y=(y=y+Math.imul(ye,ee)|0)+Math.imul(Se,tt)|0,x=x+Math.imul(Se,ee)|0,b=b+Math.imul(he,de)|0,y=(y=y+Math.imul(he,_e)|0)+Math.imul(be,de)|0,x=x+Math.imul(be,_e)|0,b=b+Math.imul(se,Te)|0,y=(y=y+Math.imul(se,Oe)|0)+Math.imul(le,Te)|0,x=x+Math.imul(le,Oe)|0;var Ue=(z+(b=b+Math.imul(re,ze)|0)|0)+((8191&(y=(y=y+Math.imul(re,Re)|0)+Math.imul(ie,ze)|0))<<13)|0;z=((x=x+Math.imul(ie,Re)|0)+(y>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,b=Math.imul(Ne,tt),y=(y=Math.imul(Ne,ee))+Math.imul(Ee,tt)|0,x=Math.imul(Ee,ee),b=b+Math.imul(ye,de)|0,y=(y=y+Math.imul(ye,_e)|0)+Math.imul(Se,de)|0,x=x+Math.imul(Se,_e)|0,b=b+Math.imul(he,Te)|0,y=(y=y+Math.imul(he,Oe)|0)+Math.imul(be,Te)|0,x=x+Math.imul(be,Oe)|0;var Pe=(z+(b=b+Math.imul(se,ze)|0)|0)+((8191&(y=(y=y+Math.imul(se,Re)|0)+Math.imul(le,ze)|0))<<13)|0;z=((x=x+Math.imul(le,Re)|0)+(y>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,b=Math.imul(Ne,de),y=(y=Math.imul(Ne,_e))+Math.imul(Ee,de)|0,x=Math.imul(Ee,_e),b=b+Math.imul(ye,Te)|0,y=(y=y+Math.imul(ye,Oe)|0)+Math.imul(Se,Te)|0,x=x+Math.imul(Se,Oe)|0;var ct=(z+(b=b+Math.imul(he,ze)|0)|0)+((8191&(y=(y=y+Math.imul(he,Re)|0)+Math.imul(be,ze)|0))<<13)|0;z=((x=x+Math.imul(be,Re)|0)+(y>>>13)|0)+(ct>>>26)|0,ct&=67108863,b=Math.imul(Ne,Te),y=(y=Math.imul(Ne,Oe))+Math.imul(Ee,Te)|0,x=Math.imul(Ee,Oe);var nt=(z+(b=b+Math.imul(ye,ze)|0)|0)+((8191&(y=(y=y+Math.imul(ye,Re)|0)+Math.imul(Se,ze)|0))<<13)|0;z=((x=x+Math.imul(Se,Re)|0)+(y>>>13)|0)+(nt>>>26)|0,nt&=67108863;var Je=(z+(b=Math.imul(Ne,ze))|0)+((8191&(y=(y=Math.imul(Ne,Re))+Math.imul(Ee,ze)|0))<<13)|0;return z=((x=Math.imul(Ee,Re))+(y>>>13)|0)+(Je>>>26)|0,Je&=67108863,R[0]=je,R[1]=Fe,R[2]=st,R[3]=xt,R[4]=Bt,R[5]=Tt,R[6]=qt,R[7]=Ft,R[8]=dr,R[9]=Q,R[10]=fe,R[11]=ve,R[12]=me,R[13]=Ae,R[14]=Ue,R[15]=Pe,R[16]=ct,R[17]=nt,R[18]=Je,z!==0&&(R[19]=z,L.length++),L};function v(E,M,L){return new w().mulp(E,M,L)}function w(E,M){this.x=E,this.y=M;}Math.imul||(g=m),o.prototype.mulTo=function(E,M){var L=this.length+E.length;return this.length===10&&E.length===10?g(this,E,M):L<63?m(this,E,M):L<1024?(function(b,y,x){x.negative=y.negative^b.negative,x.length=b.length+y.length;for(var _=0,S=0,R=0;R<x.length-1;R++){var z=S;S=0;for(var U=67108863&_,H=Math.min(R,y.length-1),q=Math.max(0,R-b.length+1);q<=H;q++){var N=R-q,V=(0|b.words[N])*(0|y.words[q]),O=67108863&V;U=67108863&(O=O+U|0),S+=(z=(z=z+(V/67108864|0)|0)+(O>>>26)|0)>>>26,z&=67108863;}x.words[R]=U,_=z,z=S;}return _!==0?x.words[R]=_:x.length--,x.strip()})(this,E,M):v(this,E,M)},w.prototype.makeRBT=function(E){for(var M=new Array(E),L=o.prototype._countBits(E)-1,b=0;b<E;b++)M[b]=this.revBin(b,L,E);return M},w.prototype.revBin=function(E,M,L){if(E===0||E===L-1)return E;for(var b=0,y=0;y<M;y++)b|=(1&E)<<M-y-1,E>>=1;return b},w.prototype.permute=function(E,M,L,b,y,x){for(var _=0;_<x;_++)b[_]=M[E[_]],y[_]=L[E[_]];},w.prototype.transform=function(E,M,L,b,y,x){this.permute(x,E,M,L,b,y);for(var _=1;_<y;_<<=1)for(var S=_<<1,R=Math.cos(2*Math.PI/S),z=Math.sin(2*Math.PI/S),U=0;U<y;U+=S)for(var H=R,q=z,N=0;N<_;N++){var V=L[U+N],O=b[U+N],A=L[U+N+_],P=b[U+N+_],W=H*A-q*P;P=H*P+q*A,A=W,L[U+N]=V+A,b[U+N]=O+P,L[U+N+_]=V-A,b[U+N+_]=O-P,N!==S&&(W=R*H-z*q,q=R*q+z*H,H=W);}},w.prototype.guessLen13b=function(E,M){var L=1|Math.max(M,E),b=1&L,y=0;for(L=L/2|0;L;L>>>=1)y++;return 1<<y+1+b},w.prototype.conjugate=function(E,M,L){if(!(L<=1))for(var b=0;b<L/2;b++){var y=E[b];E[b]=E[L-b-1],E[L-b-1]=y,y=M[b],M[b]=-M[L-b-1],M[L-b-1]=-y;}},w.prototype.normalize13b=function(E,M){for(var L=0,b=0;b<M/2;b++){var y=8192*Math.round(E[2*b+1]/M)+Math.round(E[2*b]/M)+L;E[b]=67108863&y,L=y<67108864?0:y/67108864|0;}return E},w.prototype.convert13b=function(E,M,L,b){for(var y=0,x=0;x<M;x++)y+=0|E[x],L[2*x]=8191&y,y>>>=13,L[2*x+1]=8191&y,y>>>=13;for(x=2*M;x<b;++x)L[x]=0;a(y===0),a((-8192&y)==0);},w.prototype.stub=function(E){for(var M=new Array(E),L=0;L<E;L++)M[L]=0;return M},w.prototype.mulp=function(E,M,L){var b=2*this.guessLen13b(E.length,M.length),y=this.makeRBT(b),x=this.stub(b),_=new Array(b),S=new Array(b),R=new Array(b),z=new Array(b),U=new Array(b),H=new Array(b),q=L.words;q.length=b,this.convert13b(E.words,E.length,_,b),this.convert13b(M.words,M.length,z,b),this.transform(_,x,S,R,b,y),this.transform(z,x,U,H,b,y);for(var N=0;N<b;N++){var V=S[N]*U[N]-R[N]*H[N];R[N]=S[N]*H[N]+R[N]*U[N],S[N]=V;}return this.conjugate(S,R,b),this.transform(S,R,q,x,b,y),this.conjugate(q,x,b),this.normalize13b(q,b),L.negative=E.negative^M.negative,L.length=E.length+M.length,L.strip()},o.prototype.mul=function(E){var M=new o(null);return M.words=new Array(this.length+E.length),this.mulTo(E,M)},o.prototype.mulf=function(E){var M=new o(null);return M.words=new Array(this.length+E.length),v(this,E,M)},o.prototype.imul=function(E){return this.clone().mulTo(E,this)},o.prototype.imuln=function(E){a(typeof E=="number"),a(E<67108864);for(var M=0,L=0;L<this.length;L++){var b=(0|this.words[L])*E,y=(67108863&b)+(67108863&M);M>>=26,M+=b/67108864|0,M+=y>>>26,this.words[L]=67108863&y;}return M!==0&&(this.words[L]=M,this.length++),this},o.prototype.muln=function(E){return this.clone().imuln(E)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(E){var M=(function(x){for(var _=new Array(x.bitLength()),S=0;S<_.length;S++){var R=S/26|0,z=S%26;_[S]=(x.words[R]&1<<z)>>>z;}return _})(E);if(M.length===0)return new o(1);for(var L=this,b=0;b<M.length&&M[b]===0;b++,L=L.sqr());if(++b<M.length)for(var y=L.sqr();b<M.length;b++,y=y.sqr())M[b]!==0&&(L=L.mul(y));return L},o.prototype.iushln=function(E){a(typeof E=="number"&&E>=0);var M,L=E%26,b=(E-L)/26,y=67108863>>>26-L<<26-L;if(L!==0){var x=0;for(M=0;M<this.length;M++){var _=this.words[M]&y,S=(0|this.words[M])-_<<L;this.words[M]=S|x,x=_>>>26-L;}x&&(this.words[M]=x,this.length++);}if(b!==0){for(M=this.length-1;M>=0;M--)this.words[M+b]=this.words[M];for(M=0;M<b;M++)this.words[M]=0;this.length+=b;}return this.strip()},o.prototype.ishln=function(E){return a(this.negative===0),this.iushln(E)},o.prototype.iushrn=function(E,M,L){var b;a(typeof E=="number"&&E>=0),b=M?(M-M%26)/26:0;var y=E%26,x=Math.min((E-y)/26,this.length),_=67108863^67108863>>>y<<y,S=L;if(b-=x,b=Math.max(0,b),S){for(var R=0;R<x;R++)S.words[R]=this.words[R];S.length=x;}if(x!==0)if(this.length>x)for(this.length-=x,R=0;R<this.length;R++)this.words[R]=this.words[R+x];else this.words[0]=0,this.length=1;var z=0;for(R=this.length-1;R>=0&&(z!==0||R>=b);R--){var U=0|this.words[R];this.words[R]=z<<26-y|U>>>y,z=U&_;}return S&&z!==0&&(S.words[S.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(E,M,L){return a(this.negative===0),this.iushrn(E,M,L)},o.prototype.shln=function(E){return this.clone().ishln(E)},o.prototype.ushln=function(E){return this.clone().iushln(E)},o.prototype.shrn=function(E){return this.clone().ishrn(E)},o.prototype.ushrn=function(E){return this.clone().iushrn(E)},o.prototype.testn=function(E){a(typeof E=="number"&&E>=0);var M=E%26,L=(E-M)/26,b=1<<M;return !(this.length<=L)&&!!(this.words[L]&b)},o.prototype.imaskn=function(E){a(typeof E=="number"&&E>=0);var M=E%26,L=(E-M)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=L)return this;if(M!==0&&L++,this.length=Math.min(L,this.length),M!==0){var b=67108863^67108863>>>M<<M;this.words[this.length-1]&=b;}return this.strip()},o.prototype.maskn=function(E){return this.clone().imaskn(E)},o.prototype.iaddn=function(E){return a(typeof E=="number"),a(E<67108864),E<0?this.isubn(-E):this.negative!==0?this.length===1&&(0|this.words[0])<E?(this.words[0]=E-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(E),this.negative=1,this):this._iaddn(E)},o.prototype._iaddn=function(E){this.words[0]+=E;for(var M=0;M<this.length&&this.words[M]>=67108864;M++)this.words[M]-=67108864,M===this.length-1?this.words[M+1]=1:this.words[M+1]++;return this.length=Math.max(this.length,M+1),this},o.prototype.isubn=function(E){if(a(typeof E=="number"),a(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var M=0;M<this.length&&this.words[M]<0;M++)this.words[M]+=67108864,this.words[M+1]-=1;return this.strip()},o.prototype.addn=function(E){return this.clone().iaddn(E)},o.prototype.subn=function(E){return this.clone().isubn(E)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(E,M,L){var b,y,x=E.length+L;this._expand(x);var _=0;for(b=0;b<E.length;b++){y=(0|this.words[b+L])+_;var S=(0|E.words[b])*M;_=((y-=67108863&S)>>26)-(S/67108864|0),this.words[b+L]=67108863&y;}for(;b<this.length-L;b++)_=(y=(0|this.words[b+L])+_)>>26,this.words[b+L]=67108863&y;if(_===0)return this.strip();for(a(_===-1),_=0,b=0;b<this.length;b++)_=(y=-(0|this.words[b])+_)>>26,this.words[b]=67108863&y;return this.negative=1,this.strip()},o.prototype._wordDiv=function(E,M){var L=(this.length,E.length),b=this.clone(),y=E,x=0|y.words[y.length-1];(L=26-this._countBits(x))!==0&&(y=y.ushln(L),b.iushln(L),x=0|y.words[y.length-1]);var _,S=b.length-y.length;if(M!=="mod"){(_=new o(null)).length=S+1,_.words=new Array(_.length);for(var R=0;R<_.length;R++)_.words[R]=0;}var z=b.clone()._ishlnsubmul(y,1,S);z.negative===0&&(b=z,_&&(_.words[S]=1));for(var U=S-1;U>=0;U--){var H=67108864*(0|b.words[y.length+U])+(0|b.words[y.length+U-1]);for(H=Math.min(H/x|0,67108863),b._ishlnsubmul(y,H,U);b.negative!==0;)H--,b.negative=0,b._ishlnsubmul(y,1,U),b.isZero()||(b.negative^=1);_&&(_.words[U]=H);}return _&&_.strip(),b.strip(),M!=="div"&&L!==0&&b.iushrn(L),{div:_||null,mod:b}},o.prototype.divmod=function(E,M,L){return a(!E.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:this.negative!==0&&E.negative===0?(x=this.neg().divmod(E,M),M!=="mod"&&(b=x.div.neg()),M!=="div"&&(y=x.mod.neg(),L&&y.negative!==0&&y.iadd(E)),{div:b,mod:y}):this.negative===0&&E.negative!==0?(x=this.divmod(E.neg(),M),M!=="mod"&&(b=x.div.neg()),{div:b,mod:x.mod}):(this.negative&E.negative)!=0?(x=this.neg().divmod(E.neg(),M),M!=="div"&&(y=x.mod.neg(),L&&y.negative!==0&&y.isub(E)),{div:x.div,mod:y}):E.length>this.length||this.cmp(E)<0?{div:new o(0),mod:this}:E.length===1?M==="div"?{div:this.divn(E.words[0]),mod:null}:M==="mod"?{div:null,mod:new o(this.modn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new o(this.modn(E.words[0]))}:this._wordDiv(E,M);var b,y,x;},o.prototype.div=function(E){return this.divmod(E,"div",false).div},o.prototype.mod=function(E){return this.divmod(E,"mod",false).mod},o.prototype.umod=function(E){return this.divmod(E,"mod",true).mod},o.prototype.divRound=function(E){var M=this.divmod(E);if(M.mod.isZero())return M.div;var L=M.div.negative!==0?M.mod.isub(E):M.mod,b=E.ushrn(1),y=E.andln(1),x=L.cmp(b);return x<0||y===1&&x===0?M.div:M.div.negative!==0?M.div.isubn(1):M.div.iaddn(1)},o.prototype.modn=function(E){a(E<=67108863);for(var M=(1<<26)%E,L=0,b=this.length-1;b>=0;b--)L=(M*L+(0|this.words[b]))%E;return L},o.prototype.idivn=function(E){a(E<=67108863);for(var M=0,L=this.length-1;L>=0;L--){var b=(0|this.words[L])+67108864*M;this.words[L]=b/E|0,M=b%E;}return this.strip()},o.prototype.divn=function(E){return this.clone().idivn(E)},o.prototype.egcd=function(E){a(E.negative===0),a(!E.isZero());var M=this,L=E.clone();M=M.negative!==0?M.umod(E):M.clone();for(var b=new o(1),y=new o(0),x=new o(0),_=new o(1),S=0;M.isEven()&&L.isEven();)M.iushrn(1),L.iushrn(1),++S;for(var R=L.clone(),z=M.clone();!M.isZero();){for(var U=0,H=1;(M.words[0]&H)==0&&U<26;++U,H<<=1);if(U>0)for(M.iushrn(U);U-- >0;)(b.isOdd()||y.isOdd())&&(b.iadd(R),y.isub(z)),b.iushrn(1),y.iushrn(1);for(var q=0,N=1;(L.words[0]&N)==0&&q<26;++q,N<<=1);if(q>0)for(L.iushrn(q);q-- >0;)(x.isOdd()||_.isOdd())&&(x.iadd(R),_.isub(z)),x.iushrn(1),_.iushrn(1);M.cmp(L)>=0?(M.isub(L),b.isub(x),y.isub(_)):(L.isub(M),x.isub(b),_.isub(y));}return {a:x,b:_,gcd:L.iushln(S)}},o.prototype._invmp=function(E){a(E.negative===0),a(!E.isZero());var M=this,L=E.clone();M=M.negative!==0?M.umod(E):M.clone();for(var b,y=new o(1),x=new o(0),_=L.clone();M.cmpn(1)>0&&L.cmpn(1)>0;){for(var S=0,R=1;(M.words[0]&R)==0&&S<26;++S,R<<=1);if(S>0)for(M.iushrn(S);S-- >0;)y.isOdd()&&y.iadd(_),y.iushrn(1);for(var z=0,U=1;(L.words[0]&U)==0&&z<26;++z,U<<=1);if(z>0)for(L.iushrn(z);z-- >0;)x.isOdd()&&x.iadd(_),x.iushrn(1);M.cmp(L)>=0?(M.isub(L),y.isub(x)):(L.isub(M),x.isub(y));}return (b=M.cmpn(1)===0?y:x).cmpn(0)<0&&b.iadd(E),b},o.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var M=this.clone(),L=E.clone();M.negative=0,L.negative=0;for(var b=0;M.isEven()&&L.isEven();b++)M.iushrn(1),L.iushrn(1);for(;;){for(;M.isEven();)M.iushrn(1);for(;L.isEven();)L.iushrn(1);var y=M.cmp(L);if(y<0){var x=M;M=L,L=x;}else if(y===0||L.cmpn(1)===0)break;M.isub(L);}return L.iushln(b)},o.prototype.invm=function(E){return this.egcd(E).a.umod(E)},o.prototype.isEven=function(){return (1&this.words[0])==0},o.prototype.isOdd=function(){return (1&this.words[0])==1},o.prototype.andln=function(E){return this.words[0]&E},o.prototype.bincn=function(E){a(typeof E=="number");var M=E%26,L=(E-M)/26,b=1<<M;if(this.length<=L)return this._expand(L+1),this.words[L]|=b,this;for(var y=b,x=L;y!==0&&x<this.length;x++){var _=0|this.words[x];y=(_+=y)>>>26,_&=67108863,this.words[x]=_;}return y!==0&&(this.words[x]=y,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(E){var M,L=E<0;if(this.negative!==0&&!L)return -1;if(this.negative===0&&L)return 1;if(this.strip(),this.length>1)M=1;else {L&&(E=-E),a(E<=67108863,"Number is too big");var b=0|this.words[0];M=b===E?0:b<E?-1:1;}return this.negative!==0?0|-M:M},o.prototype.cmp=function(E){if(this.negative!==0&&E.negative===0)return -1;if(this.negative===0&&E.negative!==0)return 1;var M=this.ucmp(E);return this.negative!==0?0|-M:M},o.prototype.ucmp=function(E){if(this.length>E.length)return 1;if(this.length<E.length)return -1;for(var M=0,L=this.length-1;L>=0;L--){var b=0|this.words[L],y=0|E.words[L];if(b!==y){b<y?M=-1:b>y&&(M=1);break}}return M},o.prototype.gtn=function(E){return this.cmpn(E)===1},o.prototype.gt=function(E){return this.cmp(E)===1},o.prototype.gten=function(E){return this.cmpn(E)>=0},o.prototype.gte=function(E){return this.cmp(E)>=0},o.prototype.ltn=function(E){return this.cmpn(E)===-1},o.prototype.lt=function(E){return this.cmp(E)===-1},o.prototype.lten=function(E){return this.cmpn(E)<=0},o.prototype.lte=function(E){return this.cmp(E)<=0},o.prototype.eqn=function(E){return this.cmpn(E)===0},o.prototype.eq=function(E){return this.cmp(E)===0},o.red=function(E){return new F(E)},o.prototype.toRed=function(E){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},o.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(E){return this.red=E,this},o.prototype.forceRed=function(E){return a(!this.red,"Already a number in reduction context"),this._forceRed(E)},o.prototype.redAdd=function(E){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},o.prototype.redIAdd=function(E){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},o.prototype.redSub=function(E){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},o.prototype.redISub=function(E){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},o.prototype.redShl=function(E){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},o.prototype.redMul=function(E){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},o.prototype.redIMul=function(E){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},o.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(E){return a(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var C={k256:null,p224:null,p192:null,p25519:null};function T(E,M){this.name=E,this.p=new o(M,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function I(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function k(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function D(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function j(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function F(E){if(typeof E=="string"){var M=o._prime(E);this.m=M.p,this.prime=M;}else a(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null;}function B(E){F.call(this,E),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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);}T.prototype._tmp=function(){var E=new o(null);return E.words=new Array(Math.ceil(this.n/13)),E},T.prototype.ireduce=function(E){var M,L=E;do this.split(L,this.tmp),M=(L=(L=this.imulK(L)).iadd(this.tmp)).bitLength();while(M>this.n);var b=M<this.n?-1:L.ucmp(this.p);return b===0?(L.words[0]=0,L.length=1):b>0?L.isub(this.p):L.strip!==void 0?L.strip():L._strip(),L},T.prototype.split=function(E,M){E.iushrn(this.n,0,M);},T.prototype.imulK=function(E){return E.imul(this.k)},s(I,T),I.prototype.split=function(E,M){for(var L=Math.min(E.length,9),b=0;b<L;b++)M.words[b]=E.words[b];if(M.length=L,E.length<=9)return E.words[0]=0,void(E.length=1);var y=E.words[9];for(M.words[M.length++]=4194303&y,b=10;b<E.length;b++){var x=0|E.words[b];E.words[b-10]=(4194303&x)<<4|y>>>22,y=x;}y>>>=22,E.words[b-10]=y,y===0&&E.length>10?E.length-=10:E.length-=9;},I.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var M=0,L=0;L<E.length;L++){var b=0|E.words[L];M+=977*b,E.words[L]=67108863&M,M=64*b+(M/67108864|0);}return E.words[E.length-1]===0&&(E.length--,E.words[E.length-1]===0&&E.length--),E},s(k,T),s(D,T),s(j,T),j.prototype.imulK=function(E){for(var M=0,L=0;L<E.length;L++){var b=19*(0|E.words[L])+M,y=67108863&b;b>>>=26,E.words[L]=y,M=b;}return M!==0&&(E.words[E.length++]=M),E},o._prime=function(E){if(C[E])return C[E];var M;if(E==="k256")M=new I;else if(E==="p224")M=new k;else if(E==="p192")M=new D;else {if(E!=="p25519")throw new Error("Unknown prime "+E);M=new j;}return C[E]=M,M},F.prototype._verify1=function(E){a(E.negative===0,"red works only with positives"),a(E.red,"red works only with red numbers");},F.prototype._verify2=function(E,M){a((E.negative|M.negative)==0,"red works only with positives"),a(E.red&&E.red===M.red,"red works only with red numbers");},F.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):E.umod(this.m)._forceRed(this)},F.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},F.prototype.add=function(E,M){this._verify2(E,M);var L=E.add(M);return L.cmp(this.m)>=0&&L.isub(this.m),L._forceRed(this)},F.prototype.iadd=function(E,M){this._verify2(E,M);var L=E.iadd(M);return L.cmp(this.m)>=0&&L.isub(this.m),L},F.prototype.sub=function(E,M){this._verify2(E,M);var L=E.sub(M);return L.cmpn(0)<0&&L.iadd(this.m),L._forceRed(this)},F.prototype.isub=function(E,M){this._verify2(E,M);var L=E.isub(M);return L.cmpn(0)<0&&L.iadd(this.m),L},F.prototype.shl=function(E,M){return this._verify1(E),this.imod(E.ushln(M))},F.prototype.imul=function(E,M){return this._verify2(E,M),this.imod(E.imul(M))},F.prototype.mul=function(E,M){return this._verify2(E,M),this.imod(E.mul(M))},F.prototype.isqr=function(E){return this.imul(E,E.clone())},F.prototype.sqr=function(E){return this.mul(E,E)},F.prototype.sqrt=function(E){if(E.isZero())return E.clone();var M=this.m.andln(3);if(a(M%2==1),M===3){var L=this.m.add(new o(1)).iushrn(2);return this.pow(E,L)}for(var b=this.m.subn(1),y=0;!b.isZero()&&b.andln(1)===0;)y++,b.iushrn(1);a(!b.isZero());var x=new o(1).toRed(this),_=x.redNeg(),S=this.m.subn(1).iushrn(1),R=this.m.bitLength();for(R=new o(2*R*R).toRed(this);this.pow(R,S).cmp(_)!==0;)R.redIAdd(_);for(var z=this.pow(R,b),U=this.pow(E,b.addn(1).iushrn(1)),H=this.pow(E,b),q=y;H.cmp(x)!==0;){for(var N=H,V=0;N.cmp(x)!==0;V++)N=N.redSqr();a(V<q);var O=this.pow(z,new o(1).iushln(q-V-1));U=U.redMul(O),z=O.redSqr(),H=H.redMul(z),q=V;}return U},F.prototype.invm=function(E){var M=E._invmp(this.m);return M.negative!==0?(M.negative=0,this.imod(M).redNeg()):this.imod(M)},F.prototype.pow=function(E,M){if(M.isZero())return new o(1).toRed(this);if(M.cmpn(1)===0)return E.clone();var L=new Array(16);L[0]=new o(1).toRed(this),L[1]=E;for(var b=2;b<L.length;b++)L[b]=this.mul(L[b-1],E);var y=L[0],x=0,_=0,S=M.bitLength()%26;for(S===0&&(S=26),b=M.length-1;b>=0;b--){for(var R=M.words[b],z=S-1;z>=0;z--){var U=R>>z&1;y!==L[0]&&(y=this.sqr(y)),U!==0||x!==0?(x<<=1,x|=U,(++_===4||b===0&&z===0)&&(y=this.mul(y,L[x]),_=0,x=0)):_=0;}S=26;}return y},F.prototype.convertTo=function(E){var M=E.umod(this.m);return M===E?M.clone():M},F.prototype.convertFrom=function(E){var M=E.clone();return M.red=null,M},o.mont=function(E){return new B(E)},s(B,F),B.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},B.prototype.convertFrom=function(E){var M=this.imod(E.mul(this.rinv));return M.red=null,M},B.prototype.imul=function(E,M){if(E.isZero()||M.isZero())return E.words[0]=0,E.length=1,E;var L=E.imul(M),b=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=L.isub(b).iushrn(this.shift),x=y;return y.cmp(this.m)>=0?x=y.isub(this.m):y.cmpn(0)<0&&(x=y.iadd(this.m)),x._forceRed(this)},B.prototype.mul=function(E,M){if(E.isZero()||M.isZero())return new o(0)._forceRed(this);var L=E.mul(M),b=L.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=L.isub(b).iushrn(this.shift),x=y;return y.cmp(this.m)>=0?x=y.isub(this.m):y.cmpn(0)<0&&(x=y.iadd(this.m)),x._forceRed(this)},B.prototype.invm=function(E){return this.imod(E._invmp(this.m).mul(this.r2))._forceRed(this)};})(t===void 0||t);},{buffer:188}],185:[function(e,t,r){r.byteLength=function(c){var d=f(c),p=d[0],h=d[1];return 3*(p+h)/4-h},r.toByteArray=function(c){var d,p,h=f(c),m=h[0],g=h[1],v=new a((function(T,I,k){return 3*(I+k)/4-k})(0,m,g)),w=0,C=g>0?m-4:m;for(p=0;p<C;p+=4)d=i[c.charCodeAt(p)]<<18|i[c.charCodeAt(p+1)]<<12|i[c.charCodeAt(p+2)]<<6|i[c.charCodeAt(p+3)],v[w++]=d>>16&255,v[w++]=d>>8&255,v[w++]=255&d;return g===2&&(d=i[c.charCodeAt(p)]<<2|i[c.charCodeAt(p+1)]>>4,v[w++]=255&d),g===1&&(d=i[c.charCodeAt(p)]<<10|i[c.charCodeAt(p+1)]<<4|i[c.charCodeAt(p+2)]>>2,v[w++]=d>>8&255,v[w++]=255&d),v},r.fromByteArray=function(c){for(var d,p=c.length,h=p%3,m=[],g=0,v=p-h;g<v;g+=16383)m.push(u(c,g,g+16383>v?v:g+16383));return h===1?(d=c[p-1],m.push(n[d>>2]+n[d<<4&63]+"==")):h===2&&(d=(c[p-2]<<8)+c[p-1],m.push(n[d>>10]+n[d>>4&63]+n[d<<2&63]+"=")),m.join("")};for(var n=[],i=[],a=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=s.length;o<l;++o)n[o]=s[o],i[s.charCodeAt(o)]=o;function f(c){var d=c.length;if(d%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var p=c.indexOf("=");return p===-1&&(p=d),[p,p===d?0:4-p%4]}function u(c,d,p){for(var h,m,g=[],v=d;v<p;v+=3)h=(c[v]<<16&16711680)+(c[v+1]<<8&65280)+(255&c[v+2]),g.push(n[(m=h)>>18&63]+n[m>>12&63]+n[m>>6&63]+n[63&m]);return g.join("")}i[45]=62,i[95]=63;},{}],186:[function(e,t,r){(function(n,i){function a(b,y){if(!b)throw new Error(y||"Assertion failed")}function s(b,y){b.super_=y;var x=function(){};x.prototype=y.prototype,b.prototype=new x,b.prototype.constructor=b;}function o(b,y,x){if(o.isBN(b))return b;this.negative=0,this.words=null,this.length=0,this.red=null,b!==null&&(y!=="le"&&y!=="be"||(x=y,y=10),this._init(b||0,y||10,x||"be"));}var l;typeof n=="object"?n.exports=o:(void 0).BN=o,o.BN=o,o.wordSize=26;try{l=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:e("buffer").Buffer;}catch{}function f(b,y){var x=b.charCodeAt(y);return x>=48&&x<=57?x-48:x>=65&&x<=70?x-55:x>=97&&x<=102?x-87:void a(false,"Invalid character in "+b)}function u(b,y,x){var _=f(b,x);return x-1>=y&&(_|=f(b,x-1)<<4),_}function c(b,y,x,_){for(var S=0,R=0,z=Math.min(b.length,x),U=y;U<z;U++){var H=b.charCodeAt(U)-48;S*=_,R=H>=49?H-49+10:H>=17?H-17+10:H,a(H>=0&&R<_,"Invalid character"),S+=R;}return S}function d(b,y){b.words=y.words,b.length=y.length,b.negative=y.negative,b.red=y.red;}if(o.isBN=function(b){return b instanceof o||b!==null&&typeof b=="object"&&b.constructor.wordSize===o.wordSize&&Array.isArray(b.words)},o.max=function(b,y){return b.cmp(y)>0?b:y},o.min=function(b,y){return b.cmp(y)<0?b:y},o.prototype._init=function(b,y,x){if(typeof b=="number")return this._initNumber(b,y,x);if(typeof b=="object")return this._initArray(b,y,x);y==="hex"&&(y=16),a(y===(0|y)&&y>=2&&y<=36);var _=0;(b=b.toString().replace(/\s+/g,""))[0]==="-"&&(_++,this.negative=1),_<b.length&&(y===16?this._parseHex(b,_,x):(this._parseBase(b,y,_),x==="le"&&this._initArray(this.toArray(),y,x)));},o.prototype._initNumber=function(b,y,x){b<0&&(this.negative=1,b=-b),b<67108864?(this.words=[67108863&b],this.length=1):b<4503599627370496?(this.words=[67108863&b,b/67108864&67108863],this.length=2):(a(b<9007199254740992),this.words=[67108863&b,b/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),y,x);},o.prototype._initArray=function(b,y,x){if(a(typeof b.length=="number"),b.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(b.length/3),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var S,R,z=0;if(x==="be")for(_=b.length-1,S=0;_>=0;_-=3)R=b[_]|b[_-1]<<8|b[_-2]<<16,this.words[S]|=R<<z&67108863,this.words[S+1]=R>>>26-z&67108863,(z+=24)>=26&&(z-=26,S++);else if(x==="le")for(_=0,S=0;_<b.length;_+=3)R=b[_]|b[_+1]<<8|b[_+2]<<16,this.words[S]|=R<<z&67108863,this.words[S+1]=R>>>26-z&67108863,(z+=24)>=26&&(z-=26,S++);return this._strip()},o.prototype._parseHex=function(b,y,x){this.length=Math.ceil((b.length-y)/6),this.words=new Array(this.length);for(var _=0;_<this.length;_++)this.words[_]=0;var S,R=0,z=0;if(x==="be")for(_=b.length-1;_>=y;_-=2)S=u(b,y,_)<<R,this.words[z]|=67108863&S,R>=18?(R-=18,z+=1,this.words[z]|=S>>>26):R+=8;else for(_=(b.length-y)%2==0?y+1:y;_<b.length;_+=2)S=u(b,y,_)<<R,this.words[z]|=67108863&S,R>=18?(R-=18,z+=1,this.words[z]|=S>>>26):R+=8;this._strip();},o.prototype._parseBase=function(b,y,x){this.words=[0],this.length=1;for(var _=0,S=1;S<=67108863;S*=y)_++;_--,S=S/y|0;for(var R=b.length-x,z=R%_,U=Math.min(R,R-z)+x,H=0,q=x;q<U;q+=_)H=c(b,q,q+_,y),this.imuln(S),this.words[0]+H<67108864?this.words[0]+=H:this._iaddn(H);if(z!==0){var N=1;for(H=c(b,q,b.length,y),q=0;q<z;q++)N*=y;this.imuln(N),this.words[0]+H<67108864?this.words[0]+=H:this._iaddn(H);}this._strip();},o.prototype.copy=function(b){b.words=new Array(this.length);for(var y=0;y<this.length;y++)b.words[y]=this.words[y];b.length=this.length,b.negative=this.negative,b.red=this.red;},o.prototype._move=function(b){d(b,this);},o.prototype.clone=function(){var b=new o(null);return this.copy(b),b},o.prototype._expand=function(b){for(;this.length<b;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=p;}catch{o.prototype.inspect=p;}else o.prototype.inspect=p;function p(){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"],m=[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],g=[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];o.prototype.toString=function(b,y){var x;if(y=0|y||1,(b=b||10)===16||b==="hex"){x="";for(var _=0,S=0,R=0;R<this.length;R++){var z=this.words[R],U=(16777215&(z<<_|S)).toString(16);S=z>>>24-_&16777215,(_+=2)>=26&&(_-=26,R--),x=S!==0||R!==this.length-1?h[6-U.length]+U+x:U+x;}for(S!==0&&(x=S.toString(16)+x);x.length%y!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(b===(0|b)&&b>=2&&b<=36){var H=m[b],q=g[b];x="";var N=this.clone();for(N.negative=0;!N.isZero();){var V=N.modrn(q).toString(b);x=(N=N.idivn(q)).isZero()?V+x:h[H-V.length]+V+x;}for(this.isZero()&&(x="0"+x);x.length%y!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}a(false,"Base should be between 2 and 36");},o.prototype.toNumber=function(){var b=this.words[0];return this.length===2?b+=67108864*this.words[1]:this.length===3&&this.words[2]===1?b+=4503599627370496+67108864*this.words[1]:this.length>2&&a(false,"Number can only safely store up to 53 bits"),this.negative!==0?-b:b},o.prototype.toJSON=function(){return this.toString(16,2)},l&&(o.prototype.toBuffer=function(b,y){return this.toArrayLike(l,b,y)}),o.prototype.toArray=function(b,y){return this.toArrayLike(Array,b,y)};function v(b,y,x){x.negative=y.negative^b.negative;var _=b.length+y.length|0;x.length=_,_=_-1|0;var S=0|b.words[0],R=0|y.words[0],z=S*R,U=67108863&z,H=z/67108864|0;x.words[0]=U;for(var q=1;q<_;q++){for(var N=H>>>26,V=67108863&H,O=Math.min(q,y.length-1),A=Math.max(0,q-b.length+1);A<=O;A++){var P=q-A|0;N+=(z=(S=0|b.words[P])*(R=0|y.words[A])+V)/67108864|0,V=67108863&z;}x.words[q]=0|V,H=0|N;}return H!==0?x.words[q]=0|H:x.length--,x._strip()}o.prototype.toArrayLike=function(b,y,x){this._strip();var _=this.byteLength(),S=x||Math.max(1,_);a(_<=S,"byte array longer than desired length"),a(S>0,"Requested array length <= 0");var R=(function(z,U){return z.allocUnsafe?z.allocUnsafe(U):new z(U)})(b,S);return this["_toArrayLike"+(y==="le"?"LE":"BE")](R,_),R},o.prototype._toArrayLikeLE=function(b,y){for(var x=0,_=0,S=0,R=0;S<this.length;S++){var z=this.words[S]<<R|_;b[x++]=255&z,x<b.length&&(b[x++]=z>>8&255),x<b.length&&(b[x++]=z>>16&255),R===6?(x<b.length&&(b[x++]=z>>24&255),_=0,R=0):(_=z>>>24,R+=2);}if(x<b.length)for(b[x++]=_;x<b.length;)b[x++]=0;},o.prototype._toArrayLikeBE=function(b,y){for(var x=b.length-1,_=0,S=0,R=0;S<this.length;S++){var z=this.words[S]<<R|_;b[x--]=255&z,x>=0&&(b[x--]=z>>8&255),x>=0&&(b[x--]=z>>16&255),R===6?(x>=0&&(b[x--]=z>>24&255),_=0,R=0):(_=z>>>24,R+=2);}if(x>=0)for(b[x--]=_;x>=0;)b[x--]=0;},Math.clz32?o.prototype._countBits=function(b){return 32-Math.clz32(b)}:o.prototype._countBits=function(b){var y=b,x=0;return y>=4096&&(x+=13,y>>>=13),y>=64&&(x+=7,y>>>=7),y>=8&&(x+=4,y>>>=4),y>=2&&(x+=2,y>>>=2),x+y},o.prototype._zeroBits=function(b){if(b===0)return 26;var y=b,x=0;return (8191&y)==0&&(x+=13,y>>>=13),(127&y)==0&&(x+=7,y>>>=7),(15&y)==0&&(x+=4,y>>>=4),(3&y)==0&&(x+=2,y>>>=2),(1&y)==0&&x++,x},o.prototype.bitLength=function(){var b=this.words[this.length-1],y=this._countBits(b);return 26*(this.length-1)+y},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var b=0,y=0;y<this.length;y++){var x=this._zeroBits(this.words[y]);if(b+=x,x!==26)break}return b},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(b){return this.negative!==0?this.abs().inotn(b).iaddn(1):this.clone()},o.prototype.fromTwos=function(b){return this.testn(b-1)?this.notn(b).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(b){for(;this.length<b.length;)this.words[this.length++]=0;for(var y=0;y<b.length;y++)this.words[y]=this.words[y]|b.words[y];return this._strip()},o.prototype.ior=function(b){return a((this.negative|b.negative)==0),this.iuor(b)},o.prototype.or=function(b){return this.length>b.length?this.clone().ior(b):b.clone().ior(this)},o.prototype.uor=function(b){return this.length>b.length?this.clone().iuor(b):b.clone().iuor(this)},o.prototype.iuand=function(b){var y;y=this.length>b.length?b:this;for(var x=0;x<y.length;x++)this.words[x]=this.words[x]&b.words[x];return this.length=y.length,this._strip()},o.prototype.iand=function(b){return a((this.negative|b.negative)==0),this.iuand(b)},o.prototype.and=function(b){return this.length>b.length?this.clone().iand(b):b.clone().iand(this)},o.prototype.uand=function(b){return this.length>b.length?this.clone().iuand(b):b.clone().iuand(this)},o.prototype.iuxor=function(b){var y,x;this.length>b.length?(y=this,x=b):(y=b,x=this);for(var _=0;_<x.length;_++)this.words[_]=y.words[_]^x.words[_];if(this!==y)for(;_<y.length;_++)this.words[_]=y.words[_];return this.length=y.length,this._strip()},o.prototype.ixor=function(b){return a((this.negative|b.negative)==0),this.iuxor(b)},o.prototype.xor=function(b){return this.length>b.length?this.clone().ixor(b):b.clone().ixor(this)},o.prototype.uxor=function(b){return this.length>b.length?this.clone().iuxor(b):b.clone().iuxor(this)},o.prototype.inotn=function(b){a(typeof b=="number"&&b>=0);var y=0|Math.ceil(b/26),x=b%26;this._expand(y),x>0&&y--;for(var _=0;_<y;_++)this.words[_]=67108863&~this.words[_];return x>0&&(this.words[_]=~this.words[_]&67108863>>26-x),this._strip()},o.prototype.notn=function(b){return this.clone().inotn(b)},o.prototype.setn=function(b,y){a(typeof b=="number"&&b>=0);var x=b/26|0,_=b%26;return this._expand(x+1),this.words[x]=y?this.words[x]|1<<_:this.words[x]&~(1<<_),this._strip()},o.prototype.iadd=function(b){var y,x,_;if(this.negative!==0&&b.negative===0)return this.negative=0,y=this.isub(b),this.negative^=1,this._normSign();if(this.negative===0&&b.negative!==0)return b.negative=0,y=this.isub(b),b.negative=1,y._normSign();this.length>b.length?(x=this,_=b):(x=b,_=this);for(var S=0,R=0;R<_.length;R++)y=(0|x.words[R])+(0|_.words[R])+S,this.words[R]=67108863&y,S=y>>>26;for(;S!==0&&R<x.length;R++)y=(0|x.words[R])+S,this.words[R]=67108863&y,S=y>>>26;if(this.length=x.length,S!==0)this.words[this.length]=S,this.length++;else if(x!==this)for(;R<x.length;R++)this.words[R]=x.words[R];return this},o.prototype.add=function(b){var y;return b.negative!==0&&this.negative===0?(b.negative=0,y=this.sub(b),b.negative^=1,y):b.negative===0&&this.negative!==0?(this.negative=0,y=b.sub(this),this.negative=1,y):this.length>b.length?this.clone().iadd(b):b.clone().iadd(this)},o.prototype.isub=function(b){if(b.negative!==0){b.negative=0;var y=this.iadd(b);return b.negative=1,y._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(b),this.negative=1,this._normSign();var x,_,S=this.cmp(b);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;S>0?(x=this,_=b):(x=b,_=this);for(var R=0,z=0;z<_.length;z++)R=(y=(0|x.words[z])-(0|_.words[z])+R)>>26,this.words[z]=67108863&y;for(;R!==0&&z<x.length;z++)R=(y=(0|x.words[z])+R)>>26,this.words[z]=67108863&y;if(R===0&&z<x.length&&x!==this)for(;z<x.length;z++)this.words[z]=x.words[z];return this.length=Math.max(this.length,z),x!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(b){return this.clone().isub(b)};var w=function(b,y,x){var _,S,R,z=b.words,U=y.words,H=x.words,q=0,N=0|z[0],V=8191&N,O=N>>>13,A=0|z[1],P=8191&A,W=A>>>13,Z=0|z[2],$=8191&Z,K=Z>>>13,te=0|z[3],J=8191&te,Y=te>>>13,ne=0|z[4],re=8191&ne,ie=ne>>>13,oe=0|z[5],se=8191&oe,le=oe>>>13,ge=0|z[6],he=8191&ge,be=ge>>>13,Me=0|z[7],ye=8191&Me,Se=Me>>>13,We=0|z[8],Ne=8191&We,Ee=We>>>13,Le=0|z[9],Ce=8191&Le,xe=Le>>>13,Qe=0|U[0],Be=8191&Qe,He=Qe>>>13,At=0|U[1],Ve=8191&At,Ze=At>>>13,Nt=0|U[2],et=8191&Nt,rt=Nt>>>13,fr=0|U[3],Ge=8191&fr,qe=fr>>>13,Gt=0|U[4],Ye=8191&Gt,De=Gt>>>13,Mt=0|U[5],tt=8191&Mt,ee=Mt>>>13,ue=0|U[6],de=8191&ue,_e=ue>>>13,Ie=0|U[7],Te=8191&Ie,Oe=Ie>>>13,ot=0|U[8],ze=8191&ot,Re=ot>>>13,je=0|U[9],Fe=8191&je,st=je>>>13;x.negative=b.negative^y.negative,x.length=19;var xt=(q+(_=Math.imul(V,Be))|0)+((8191&(S=(S=Math.imul(V,He))+Math.imul(O,Be)|0))<<13)|0;q=((R=Math.imul(O,He))+(S>>>13)|0)+(xt>>>26)|0,xt&=67108863,_=Math.imul(P,Be),S=(S=Math.imul(P,He))+Math.imul(W,Be)|0,R=Math.imul(W,He);var Bt=(q+(_=_+Math.imul(V,Ve)|0)|0)+((8191&(S=(S=S+Math.imul(V,Ze)|0)+Math.imul(O,Ve)|0))<<13)|0;q=((R=R+Math.imul(O,Ze)|0)+(S>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,_=Math.imul($,Be),S=(S=Math.imul($,He))+Math.imul(K,Be)|0,R=Math.imul(K,He),_=_+Math.imul(P,Ve)|0,S=(S=S+Math.imul(P,Ze)|0)+Math.imul(W,Ve)|0,R=R+Math.imul(W,Ze)|0;var Tt=(q+(_=_+Math.imul(V,et)|0)|0)+((8191&(S=(S=S+Math.imul(V,rt)|0)+Math.imul(O,et)|0))<<13)|0;q=((R=R+Math.imul(O,rt)|0)+(S>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,_=Math.imul(J,Be),S=(S=Math.imul(J,He))+Math.imul(Y,Be)|0,R=Math.imul(Y,He),_=_+Math.imul($,Ve)|0,S=(S=S+Math.imul($,Ze)|0)+Math.imul(K,Ve)|0,R=R+Math.imul(K,Ze)|0,_=_+Math.imul(P,et)|0,S=(S=S+Math.imul(P,rt)|0)+Math.imul(W,et)|0,R=R+Math.imul(W,rt)|0;var qt=(q+(_=_+Math.imul(V,Ge)|0)|0)+((8191&(S=(S=S+Math.imul(V,qe)|0)+Math.imul(O,Ge)|0))<<13)|0;q=((R=R+Math.imul(O,qe)|0)+(S>>>13)|0)+(qt>>>26)|0,qt&=67108863,_=Math.imul(re,Be),S=(S=Math.imul(re,He))+Math.imul(ie,Be)|0,R=Math.imul(ie,He),_=_+Math.imul(J,Ve)|0,S=(S=S+Math.imul(J,Ze)|0)+Math.imul(Y,Ve)|0,R=R+Math.imul(Y,Ze)|0,_=_+Math.imul($,et)|0,S=(S=S+Math.imul($,rt)|0)+Math.imul(K,et)|0,R=R+Math.imul(K,rt)|0,_=_+Math.imul(P,Ge)|0,S=(S=S+Math.imul(P,qe)|0)+Math.imul(W,Ge)|0,R=R+Math.imul(W,qe)|0;var Ft=(q+(_=_+Math.imul(V,Ye)|0)|0)+((8191&(S=(S=S+Math.imul(V,De)|0)+Math.imul(O,Ye)|0))<<13)|0;q=((R=R+Math.imul(O,De)|0)+(S>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,_=Math.imul(se,Be),S=(S=Math.imul(se,He))+Math.imul(le,Be)|0,R=Math.imul(le,He),_=_+Math.imul(re,Ve)|0,S=(S=S+Math.imul(re,Ze)|0)+Math.imul(ie,Ve)|0,R=R+Math.imul(ie,Ze)|0,_=_+Math.imul(J,et)|0,S=(S=S+Math.imul(J,rt)|0)+Math.imul(Y,et)|0,R=R+Math.imul(Y,rt)|0,_=_+Math.imul($,Ge)|0,S=(S=S+Math.imul($,qe)|0)+Math.imul(K,Ge)|0,R=R+Math.imul(K,qe)|0,_=_+Math.imul(P,Ye)|0,S=(S=S+Math.imul(P,De)|0)+Math.imul(W,Ye)|0,R=R+Math.imul(W,De)|0;var dr=(q+(_=_+Math.imul(V,tt)|0)|0)+((8191&(S=(S=S+Math.imul(V,ee)|0)+Math.imul(O,tt)|0))<<13)|0;q=((R=R+Math.imul(O,ee)|0)+(S>>>13)|0)+(dr>>>26)|0,dr&=67108863,_=Math.imul(he,Be),S=(S=Math.imul(he,He))+Math.imul(be,Be)|0,R=Math.imul(be,He),_=_+Math.imul(se,Ve)|0,S=(S=S+Math.imul(se,Ze)|0)+Math.imul(le,Ve)|0,R=R+Math.imul(le,Ze)|0,_=_+Math.imul(re,et)|0,S=(S=S+Math.imul(re,rt)|0)+Math.imul(ie,et)|0,R=R+Math.imul(ie,rt)|0,_=_+Math.imul(J,Ge)|0,S=(S=S+Math.imul(J,qe)|0)+Math.imul(Y,Ge)|0,R=R+Math.imul(Y,qe)|0,_=_+Math.imul($,Ye)|0,S=(S=S+Math.imul($,De)|0)+Math.imul(K,Ye)|0,R=R+Math.imul(K,De)|0,_=_+Math.imul(P,tt)|0,S=(S=S+Math.imul(P,ee)|0)+Math.imul(W,tt)|0,R=R+Math.imul(W,ee)|0;var Q=(q+(_=_+Math.imul(V,de)|0)|0)+((8191&(S=(S=S+Math.imul(V,_e)|0)+Math.imul(O,de)|0))<<13)|0;q=((R=R+Math.imul(O,_e)|0)+(S>>>13)|0)+(Q>>>26)|0,Q&=67108863,_=Math.imul(ye,Be),S=(S=Math.imul(ye,He))+Math.imul(Se,Be)|0,R=Math.imul(Se,He),_=_+Math.imul(he,Ve)|0,S=(S=S+Math.imul(he,Ze)|0)+Math.imul(be,Ve)|0,R=R+Math.imul(be,Ze)|0,_=_+Math.imul(se,et)|0,S=(S=S+Math.imul(se,rt)|0)+Math.imul(le,et)|0,R=R+Math.imul(le,rt)|0,_=_+Math.imul(re,Ge)|0,S=(S=S+Math.imul(re,qe)|0)+Math.imul(ie,Ge)|0,R=R+Math.imul(ie,qe)|0,_=_+Math.imul(J,Ye)|0,S=(S=S+Math.imul(J,De)|0)+Math.imul(Y,Ye)|0,R=R+Math.imul(Y,De)|0,_=_+Math.imul($,tt)|0,S=(S=S+Math.imul($,ee)|0)+Math.imul(K,tt)|0,R=R+Math.imul(K,ee)|0,_=_+Math.imul(P,de)|0,S=(S=S+Math.imul(P,_e)|0)+Math.imul(W,de)|0,R=R+Math.imul(W,_e)|0;var fe=(q+(_=_+Math.imul(V,Te)|0)|0)+((8191&(S=(S=S+Math.imul(V,Oe)|0)+Math.imul(O,Te)|0))<<13)|0;q=((R=R+Math.imul(O,Oe)|0)+(S>>>13)|0)+(fe>>>26)|0,fe&=67108863,_=Math.imul(Ne,Be),S=(S=Math.imul(Ne,He))+Math.imul(Ee,Be)|0,R=Math.imul(Ee,He),_=_+Math.imul(ye,Ve)|0,S=(S=S+Math.imul(ye,Ze)|0)+Math.imul(Se,Ve)|0,R=R+Math.imul(Se,Ze)|0,_=_+Math.imul(he,et)|0,S=(S=S+Math.imul(he,rt)|0)+Math.imul(be,et)|0,R=R+Math.imul(be,rt)|0,_=_+Math.imul(se,Ge)|0,S=(S=S+Math.imul(se,qe)|0)+Math.imul(le,Ge)|0,R=R+Math.imul(le,qe)|0,_=_+Math.imul(re,Ye)|0,S=(S=S+Math.imul(re,De)|0)+Math.imul(ie,Ye)|0,R=R+Math.imul(ie,De)|0,_=_+Math.imul(J,tt)|0,S=(S=S+Math.imul(J,ee)|0)+Math.imul(Y,tt)|0,R=R+Math.imul(Y,ee)|0,_=_+Math.imul($,de)|0,S=(S=S+Math.imul($,_e)|0)+Math.imul(K,de)|0,R=R+Math.imul(K,_e)|0,_=_+Math.imul(P,Te)|0,S=(S=S+Math.imul(P,Oe)|0)+Math.imul(W,Te)|0,R=R+Math.imul(W,Oe)|0;var ve=(q+(_=_+Math.imul(V,ze)|0)|0)+((8191&(S=(S=S+Math.imul(V,Re)|0)+Math.imul(O,ze)|0))<<13)|0;q=((R=R+Math.imul(O,Re)|0)+(S>>>13)|0)+(ve>>>26)|0,ve&=67108863,_=Math.imul(Ce,Be),S=(S=Math.imul(Ce,He))+Math.imul(xe,Be)|0,R=Math.imul(xe,He),_=_+Math.imul(Ne,Ve)|0,S=(S=S+Math.imul(Ne,Ze)|0)+Math.imul(Ee,Ve)|0,R=R+Math.imul(Ee,Ze)|0,_=_+Math.imul(ye,et)|0,S=(S=S+Math.imul(ye,rt)|0)+Math.imul(Se,et)|0,R=R+Math.imul(Se,rt)|0,_=_+Math.imul(he,Ge)|0,S=(S=S+Math.imul(he,qe)|0)+Math.imul(be,Ge)|0,R=R+Math.imul(be,qe)|0,_=_+Math.imul(se,Ye)|0,S=(S=S+Math.imul(se,De)|0)+Math.imul(le,Ye)|0,R=R+Math.imul(le,De)|0,_=_+Math.imul(re,tt)|0,S=(S=S+Math.imul(re,ee)|0)+Math.imul(ie,tt)|0,R=R+Math.imul(ie,ee)|0,_=_+Math.imul(J,de)|0,S=(S=S+Math.imul(J,_e)|0)+Math.imul(Y,de)|0,R=R+Math.imul(Y,_e)|0,_=_+Math.imul($,Te)|0,S=(S=S+Math.imul($,Oe)|0)+Math.imul(K,Te)|0,R=R+Math.imul(K,Oe)|0,_=_+Math.imul(P,ze)|0,S=(S=S+Math.imul(P,Re)|0)+Math.imul(W,ze)|0,R=R+Math.imul(W,Re)|0;var me=(q+(_=_+Math.imul(V,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(V,st)|0)+Math.imul(O,Fe)|0))<<13)|0;q=((R=R+Math.imul(O,st)|0)+(S>>>13)|0)+(me>>>26)|0,me&=67108863,_=Math.imul(Ce,Ve),S=(S=Math.imul(Ce,Ze))+Math.imul(xe,Ve)|0,R=Math.imul(xe,Ze),_=_+Math.imul(Ne,et)|0,S=(S=S+Math.imul(Ne,rt)|0)+Math.imul(Ee,et)|0,R=R+Math.imul(Ee,rt)|0,_=_+Math.imul(ye,Ge)|0,S=(S=S+Math.imul(ye,qe)|0)+Math.imul(Se,Ge)|0,R=R+Math.imul(Se,qe)|0,_=_+Math.imul(he,Ye)|0,S=(S=S+Math.imul(he,De)|0)+Math.imul(be,Ye)|0,R=R+Math.imul(be,De)|0,_=_+Math.imul(se,tt)|0,S=(S=S+Math.imul(se,ee)|0)+Math.imul(le,tt)|0,R=R+Math.imul(le,ee)|0,_=_+Math.imul(re,de)|0,S=(S=S+Math.imul(re,_e)|0)+Math.imul(ie,de)|0,R=R+Math.imul(ie,_e)|0,_=_+Math.imul(J,Te)|0,S=(S=S+Math.imul(J,Oe)|0)+Math.imul(Y,Te)|0,R=R+Math.imul(Y,Oe)|0,_=_+Math.imul($,ze)|0,S=(S=S+Math.imul($,Re)|0)+Math.imul(K,ze)|0,R=R+Math.imul(K,Re)|0;var Ae=(q+(_=_+Math.imul(P,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(P,st)|0)+Math.imul(W,Fe)|0))<<13)|0;q=((R=R+Math.imul(W,st)|0)+(S>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,_=Math.imul(Ce,et),S=(S=Math.imul(Ce,rt))+Math.imul(xe,et)|0,R=Math.imul(xe,rt),_=_+Math.imul(Ne,Ge)|0,S=(S=S+Math.imul(Ne,qe)|0)+Math.imul(Ee,Ge)|0,R=R+Math.imul(Ee,qe)|0,_=_+Math.imul(ye,Ye)|0,S=(S=S+Math.imul(ye,De)|0)+Math.imul(Se,Ye)|0,R=R+Math.imul(Se,De)|0,_=_+Math.imul(he,tt)|0,S=(S=S+Math.imul(he,ee)|0)+Math.imul(be,tt)|0,R=R+Math.imul(be,ee)|0,_=_+Math.imul(se,de)|0,S=(S=S+Math.imul(se,_e)|0)+Math.imul(le,de)|0,R=R+Math.imul(le,_e)|0,_=_+Math.imul(re,Te)|0,S=(S=S+Math.imul(re,Oe)|0)+Math.imul(ie,Te)|0,R=R+Math.imul(ie,Oe)|0,_=_+Math.imul(J,ze)|0,S=(S=S+Math.imul(J,Re)|0)+Math.imul(Y,ze)|0,R=R+Math.imul(Y,Re)|0;var Ue=(q+(_=_+Math.imul($,Fe)|0)|0)+((8191&(S=(S=S+Math.imul($,st)|0)+Math.imul(K,Fe)|0))<<13)|0;q=((R=R+Math.imul(K,st)|0)+(S>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,_=Math.imul(Ce,Ge),S=(S=Math.imul(Ce,qe))+Math.imul(xe,Ge)|0,R=Math.imul(xe,qe),_=_+Math.imul(Ne,Ye)|0,S=(S=S+Math.imul(Ne,De)|0)+Math.imul(Ee,Ye)|0,R=R+Math.imul(Ee,De)|0,_=_+Math.imul(ye,tt)|0,S=(S=S+Math.imul(ye,ee)|0)+Math.imul(Se,tt)|0,R=R+Math.imul(Se,ee)|0,_=_+Math.imul(he,de)|0,S=(S=S+Math.imul(he,_e)|0)+Math.imul(be,de)|0,R=R+Math.imul(be,_e)|0,_=_+Math.imul(se,Te)|0,S=(S=S+Math.imul(se,Oe)|0)+Math.imul(le,Te)|0,R=R+Math.imul(le,Oe)|0,_=_+Math.imul(re,ze)|0,S=(S=S+Math.imul(re,Re)|0)+Math.imul(ie,ze)|0,R=R+Math.imul(ie,Re)|0;var Pe=(q+(_=_+Math.imul(J,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(J,st)|0)+Math.imul(Y,Fe)|0))<<13)|0;q=((R=R+Math.imul(Y,st)|0)+(S>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,_=Math.imul(Ce,Ye),S=(S=Math.imul(Ce,De))+Math.imul(xe,Ye)|0,R=Math.imul(xe,De),_=_+Math.imul(Ne,tt)|0,S=(S=S+Math.imul(Ne,ee)|0)+Math.imul(Ee,tt)|0,R=R+Math.imul(Ee,ee)|0,_=_+Math.imul(ye,de)|0,S=(S=S+Math.imul(ye,_e)|0)+Math.imul(Se,de)|0,R=R+Math.imul(Se,_e)|0,_=_+Math.imul(he,Te)|0,S=(S=S+Math.imul(he,Oe)|0)+Math.imul(be,Te)|0,R=R+Math.imul(be,Oe)|0,_=_+Math.imul(se,ze)|0,S=(S=S+Math.imul(se,Re)|0)+Math.imul(le,ze)|0,R=R+Math.imul(le,Re)|0;var ct=(q+(_=_+Math.imul(re,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(re,st)|0)+Math.imul(ie,Fe)|0))<<13)|0;q=((R=R+Math.imul(ie,st)|0)+(S>>>13)|0)+(ct>>>26)|0,ct&=67108863,_=Math.imul(Ce,tt),S=(S=Math.imul(Ce,ee))+Math.imul(xe,tt)|0,R=Math.imul(xe,ee),_=_+Math.imul(Ne,de)|0,S=(S=S+Math.imul(Ne,_e)|0)+Math.imul(Ee,de)|0,R=R+Math.imul(Ee,_e)|0,_=_+Math.imul(ye,Te)|0,S=(S=S+Math.imul(ye,Oe)|0)+Math.imul(Se,Te)|0,R=R+Math.imul(Se,Oe)|0,_=_+Math.imul(he,ze)|0,S=(S=S+Math.imul(he,Re)|0)+Math.imul(be,ze)|0,R=R+Math.imul(be,Re)|0;var nt=(q+(_=_+Math.imul(se,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(se,st)|0)+Math.imul(le,Fe)|0))<<13)|0;q=((R=R+Math.imul(le,st)|0)+(S>>>13)|0)+(nt>>>26)|0,nt&=67108863,_=Math.imul(Ce,de),S=(S=Math.imul(Ce,_e))+Math.imul(xe,de)|0,R=Math.imul(xe,_e),_=_+Math.imul(Ne,Te)|0,S=(S=S+Math.imul(Ne,Oe)|0)+Math.imul(Ee,Te)|0,R=R+Math.imul(Ee,Oe)|0,_=_+Math.imul(ye,ze)|0,S=(S=S+Math.imul(ye,Re)|0)+Math.imul(Se,ze)|0,R=R+Math.imul(Se,Re)|0;var Je=(q+(_=_+Math.imul(he,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(he,st)|0)+Math.imul(be,Fe)|0))<<13)|0;q=((R=R+Math.imul(be,st)|0)+(S>>>13)|0)+(Je>>>26)|0,Je&=67108863,_=Math.imul(Ce,Te),S=(S=Math.imul(Ce,Oe))+Math.imul(xe,Te)|0,R=Math.imul(xe,Oe),_=_+Math.imul(Ne,ze)|0,S=(S=S+Math.imul(Ne,Re)|0)+Math.imul(Ee,ze)|0,R=R+Math.imul(Ee,Re)|0;var at=(q+(_=_+Math.imul(ye,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(ye,st)|0)+Math.imul(Se,Fe)|0))<<13)|0;q=((R=R+Math.imul(Se,st)|0)+(S>>>13)|0)+(at>>>26)|0,at&=67108863,_=Math.imul(Ce,ze),S=(S=Math.imul(Ce,Re))+Math.imul(xe,ze)|0,R=Math.imul(xe,Re);var It=(q+(_=_+Math.imul(Ne,Fe)|0)|0)+((8191&(S=(S=S+Math.imul(Ne,st)|0)+Math.imul(Ee,Fe)|0))<<13)|0;q=((R=R+Math.imul(Ee,st)|0)+(S>>>13)|0)+(It>>>26)|0,It&=67108863;var Pt=(q+(_=Math.imul(Ce,Fe))|0)+((8191&(S=(S=Math.imul(Ce,st))+Math.imul(xe,Fe)|0))<<13)|0;return q=((R=Math.imul(xe,st))+(S>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,H[0]=xt,H[1]=Bt,H[2]=Tt,H[3]=qt,H[4]=Ft,H[5]=dr,H[6]=Q,H[7]=fe,H[8]=ve,H[9]=me,H[10]=Ae,H[11]=Ue,H[12]=Pe,H[13]=ct,H[14]=nt,H[15]=Je,H[16]=at,H[17]=It,H[18]=Pt,q!==0&&(H[19]=q,x.length++),x};function C(b,y,x){x.negative=y.negative^b.negative,x.length=b.length+y.length;for(var _=0,S=0,R=0;R<x.length-1;R++){var z=S;S=0;for(var U=67108863&_,H=Math.min(R,y.length-1),q=Math.max(0,R-b.length+1);q<=H;q++){var N=R-q,V=(0|b.words[N])*(0|y.words[q]),O=67108863&V;U=67108863&(O=O+U|0),S+=(z=(z=z+(V/67108864|0)|0)+(O>>>26)|0)>>>26,z&=67108863;}x.words[R]=U,_=z,z=S;}return _!==0?x.words[R]=_:x.length--,x._strip()}function T(b,y,x){return C(b,y,x)}Math.imul||(w=v),o.prototype.mulTo=function(b,y){var x=this.length+b.length;return this.length===10&&b.length===10?w(this,b,y):x<63?v(this,b,y):x<1024?C(this,b,y):T(this,b,y)},o.prototype.mul=function(b){var y=new o(null);return y.words=new Array(this.length+b.length),this.mulTo(b,y)},o.prototype.mulf=function(b){var y=new o(null);return y.words=new Array(this.length+b.length),T(this,b,y)},o.prototype.imul=function(b){return this.clone().mulTo(b,this)},o.prototype.imuln=function(b){var y=b<0;y&&(b=-b),a(typeof b=="number"),a(b<67108864);for(var x=0,_=0;_<this.length;_++){var S=(0|this.words[_])*b,R=(67108863&S)+(67108863&x);x>>=26,x+=S/67108864|0,x+=R>>>26,this.words[_]=67108863&R;}return x!==0&&(this.words[_]=x,this.length++),y?this.ineg():this},o.prototype.muln=function(b){return this.clone().imuln(b)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(b){var y=(function(R){for(var z=new Array(R.bitLength()),U=0;U<z.length;U++){var H=U/26|0,q=U%26;z[U]=R.words[H]>>>q&1;}return z})(b);if(y.length===0)return new o(1);for(var x=this,_=0;_<y.length&&y[_]===0;_++,x=x.sqr());if(++_<y.length)for(var S=x.sqr();_<y.length;_++,S=S.sqr())y[_]!==0&&(x=x.mul(S));return x},o.prototype.iushln=function(b){a(typeof b=="number"&&b>=0);var y,x=b%26,_=(b-x)/26,S=67108863>>>26-x<<26-x;if(x!==0){var R=0;for(y=0;y<this.length;y++){var z=this.words[y]&S,U=(0|this.words[y])-z<<x;this.words[y]=U|R,R=z>>>26-x;}R&&(this.words[y]=R,this.length++);}if(_!==0){for(y=this.length-1;y>=0;y--)this.words[y+_]=this.words[y];for(y=0;y<_;y++)this.words[y]=0;this.length+=_;}return this._strip()},o.prototype.ishln=function(b){return a(this.negative===0),this.iushln(b)},o.prototype.iushrn=function(b,y,x){var _;a(typeof b=="number"&&b>=0),_=y?(y-y%26)/26:0;var S=b%26,R=Math.min((b-S)/26,this.length),z=67108863^67108863>>>S<<S,U=x;if(_-=R,_=Math.max(0,_),U){for(var H=0;H<R;H++)U.words[H]=this.words[H];U.length=R;}if(R!==0)if(this.length>R)for(this.length-=R,H=0;H<this.length;H++)this.words[H]=this.words[H+R];else this.words[0]=0,this.length=1;var q=0;for(H=this.length-1;H>=0&&(q!==0||H>=_);H--){var N=0|this.words[H];this.words[H]=q<<26-S|N>>>S,q=N&z;}return U&&q!==0&&(U.words[U.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(b,y,x){return a(this.negative===0),this.iushrn(b,y,x)},o.prototype.shln=function(b){return this.clone().ishln(b)},o.prototype.ushln=function(b){return this.clone().iushln(b)},o.prototype.shrn=function(b){return this.clone().ishrn(b)},o.prototype.ushrn=function(b){return this.clone().iushrn(b)},o.prototype.testn=function(b){a(typeof b=="number"&&b>=0);var y=b%26,x=(b-y)/26,_=1<<y;return !(this.length<=x)&&!!(this.words[x]&_)},o.prototype.imaskn=function(b){a(typeof b=="number"&&b>=0);var y=b%26,x=(b-y)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(y!==0&&x++,this.length=Math.min(x,this.length),y!==0){var _=67108863^67108863>>>y<<y;this.words[this.length-1]&=_;}return this._strip()},o.prototype.maskn=function(b){return this.clone().imaskn(b)},o.prototype.iaddn=function(b){return a(typeof b=="number"),a(b<67108864),b<0?this.isubn(-b):this.negative!==0?this.length===1&&(0|this.words[0])<=b?(this.words[0]=b-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(b),this.negative=1,this):this._iaddn(b)},o.prototype._iaddn=function(b){this.words[0]+=b;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},o.prototype.isubn=function(b){if(a(typeof b=="number"),a(b<67108864),b<0)return this.iaddn(-b);if(this.negative!==0)return this.negative=0,this.iaddn(b),this.negative=1,this;if(this.words[0]-=b,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this._strip()},o.prototype.addn=function(b){return this.clone().iaddn(b)},o.prototype.subn=function(b){return this.clone().isubn(b)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(b,y,x){var _,S,R=b.length+x;this._expand(R);var z=0;for(_=0;_<b.length;_++){S=(0|this.words[_+x])+z;var U=(0|b.words[_])*y;z=((S-=67108863&U)>>26)-(U/67108864|0),this.words[_+x]=67108863&S;}for(;_<this.length-x;_++)z=(S=(0|this.words[_+x])+z)>>26,this.words[_+x]=67108863&S;if(z===0)return this._strip();for(a(z===-1),z=0,_=0;_<this.length;_++)z=(S=-(0|this.words[_])+z)>>26,this.words[_]=67108863&S;return this.negative=1,this._strip()},o.prototype._wordDiv=function(b,y){var x=(this.length,b.length),_=this.clone(),S=b,R=0|S.words[S.length-1];(x=26-this._countBits(R))!==0&&(S=S.ushln(x),_.iushln(x),R=0|S.words[S.length-1]);var z,U=_.length-S.length;if(y!=="mod"){(z=new o(null)).length=U+1,z.words=new Array(z.length);for(var H=0;H<z.length;H++)z.words[H]=0;}var q=_.clone()._ishlnsubmul(S,1,U);q.negative===0&&(_=q,z&&(z.words[U]=1));for(var N=U-1;N>=0;N--){var V=67108864*(0|_.words[S.length+N])+(0|_.words[S.length+N-1]);for(V=Math.min(V/R|0,67108863),_._ishlnsubmul(S,V,N);_.negative!==0;)V--,_.negative=0,_._ishlnsubmul(S,1,N),_.isZero()||(_.negative^=1);z&&(z.words[N]=V);}return z&&z._strip(),_._strip(),y!=="div"&&x!==0&&_.iushrn(x),{div:z||null,mod:_}},o.prototype.divmod=function(b,y,x){return a(!b.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:this.negative!==0&&b.negative===0?(R=this.neg().divmod(b,y),y!=="mod"&&(_=R.div.neg()),y!=="div"&&(S=R.mod.neg(),x&&S.negative!==0&&S.iadd(b)),{div:_,mod:S}):this.negative===0&&b.negative!==0?(R=this.divmod(b.neg(),y),y!=="mod"&&(_=R.div.neg()),{div:_,mod:R.mod}):(this.negative&b.negative)!=0?(R=this.neg().divmod(b.neg(),y),y!=="div"&&(S=R.mod.neg(),x&&S.negative!==0&&S.isub(b)),{div:R.div,mod:S}):b.length>this.length||this.cmp(b)<0?{div:new o(0),mod:this}:b.length===1?y==="div"?{div:this.divn(b.words[0]),mod:null}:y==="mod"?{div:null,mod:new o(this.modrn(b.words[0]))}:{div:this.divn(b.words[0]),mod:new o(this.modrn(b.words[0]))}:this._wordDiv(b,y);var _,S,R;},o.prototype.div=function(b){return this.divmod(b,"div",false).div},o.prototype.mod=function(b){return this.divmod(b,"mod",false).mod},o.prototype.umod=function(b){return this.divmod(b,"mod",true).mod},o.prototype.divRound=function(b){var y=this.divmod(b);if(y.mod.isZero())return y.div;var x=y.div.negative!==0?y.mod.isub(b):y.mod,_=b.ushrn(1),S=b.andln(1),R=x.cmp(_);return R<0||S===1&&R===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},o.prototype.modrn=function(b){var y=b<0;y&&(b=-b),a(b<=67108863);for(var x=(1<<26)%b,_=0,S=this.length-1;S>=0;S--)_=(x*_+(0|this.words[S]))%b;return y?-_:_},o.prototype.modn=function(b){return this.modrn(b)},o.prototype.idivn=function(b){var y=b<0;y&&(b=-b),a(b<=67108863);for(var x=0,_=this.length-1;_>=0;_--){var S=(0|this.words[_])+67108864*x;this.words[_]=S/b|0,x=S%b;}return this._strip(),y?this.ineg():this},o.prototype.divn=function(b){return this.clone().idivn(b)},o.prototype.egcd=function(b){a(b.negative===0),a(!b.isZero());var y=this,x=b.clone();y=y.negative!==0?y.umod(b):y.clone();for(var _=new o(1),S=new o(0),R=new o(0),z=new o(1),U=0;y.isEven()&&x.isEven();)y.iushrn(1),x.iushrn(1),++U;for(var H=x.clone(),q=y.clone();!y.isZero();){for(var N=0,V=1;(y.words[0]&V)==0&&N<26;++N,V<<=1);if(N>0)for(y.iushrn(N);N-- >0;)(_.isOdd()||S.isOdd())&&(_.iadd(H),S.isub(q)),_.iushrn(1),S.iushrn(1);for(var O=0,A=1;(x.words[0]&A)==0&&O<26;++O,A<<=1);if(O>0)for(x.iushrn(O);O-- >0;)(R.isOdd()||z.isOdd())&&(R.iadd(H),z.isub(q)),R.iushrn(1),z.iushrn(1);y.cmp(x)>=0?(y.isub(x),_.isub(R),S.isub(z)):(x.isub(y),R.isub(_),z.isub(S));}return {a:R,b:z,gcd:x.iushln(U)}},o.prototype._invmp=function(b){a(b.negative===0),a(!b.isZero());var y=this,x=b.clone();y=y.negative!==0?y.umod(b):y.clone();for(var _,S=new o(1),R=new o(0),z=x.clone();y.cmpn(1)>0&&x.cmpn(1)>0;){for(var U=0,H=1;(y.words[0]&H)==0&&U<26;++U,H<<=1);if(U>0)for(y.iushrn(U);U-- >0;)S.isOdd()&&S.iadd(z),S.iushrn(1);for(var q=0,N=1;(x.words[0]&N)==0&&q<26;++q,N<<=1);if(q>0)for(x.iushrn(q);q-- >0;)R.isOdd()&&R.iadd(z),R.iushrn(1);y.cmp(x)>=0?(y.isub(x),S.isub(R)):(x.isub(y),R.isub(S));}return (_=y.cmpn(1)===0?S:R).cmpn(0)<0&&_.iadd(b),_},o.prototype.gcd=function(b){if(this.isZero())return b.abs();if(b.isZero())return this.abs();var y=this.clone(),x=b.clone();y.negative=0,x.negative=0;for(var _=0;y.isEven()&&x.isEven();_++)y.iushrn(1),x.iushrn(1);for(;;){for(;y.isEven();)y.iushrn(1);for(;x.isEven();)x.iushrn(1);var S=y.cmp(x);if(S<0){var R=y;y=x,x=R;}else if(S===0||x.cmpn(1)===0)break;y.isub(x);}return x.iushln(_)},o.prototype.invm=function(b){return this.egcd(b).a.umod(b)},o.prototype.isEven=function(){return (1&this.words[0])==0},o.prototype.isOdd=function(){return (1&this.words[0])==1},o.prototype.andln=function(b){return this.words[0]&b},o.prototype.bincn=function(b){a(typeof b=="number");var y=b%26,x=(b-y)/26,_=1<<y;if(this.length<=x)return this._expand(x+1),this.words[x]|=_,this;for(var S=_,R=x;S!==0&&R<this.length;R++){var z=0|this.words[R];S=(z+=S)>>>26,z&=67108863,this.words[R]=z;}return S!==0&&(this.words[R]=S,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(b){var y,x=b<0;if(this.negative!==0&&!x)return -1;if(this.negative===0&&x)return 1;if(this._strip(),this.length>1)y=1;else {x&&(b=-b),a(b<=67108863,"Number is too big");var _=0|this.words[0];y=_===b?0:_<b?-1:1;}return this.negative!==0?0|-y:y},o.prototype.cmp=function(b){if(this.negative!==0&&b.negative===0)return -1;if(this.negative===0&&b.negative!==0)return 1;var y=this.ucmp(b);return this.negative!==0?0|-y:y},o.prototype.ucmp=function(b){if(this.length>b.length)return 1;if(this.length<b.length)return -1;for(var y=0,x=this.length-1;x>=0;x--){var _=0|this.words[x],S=0|b.words[x];if(_!==S){_<S?y=-1:_>S&&(y=1);break}}return y},o.prototype.gtn=function(b){return this.cmpn(b)===1},o.prototype.gt=function(b){return this.cmp(b)===1},o.prototype.gten=function(b){return this.cmpn(b)>=0},o.prototype.gte=function(b){return this.cmp(b)>=0},o.prototype.ltn=function(b){return this.cmpn(b)===-1},o.prototype.lt=function(b){return this.cmp(b)===-1},o.prototype.lten=function(b){return this.cmpn(b)<=0},o.prototype.lte=function(b){return this.cmp(b)<=0},o.prototype.eqn=function(b){return this.cmpn(b)===0},o.prototype.eq=function(b){return this.cmp(b)===0},o.red=function(b){return new M(b)},o.prototype.toRed=function(b){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),b.convertTo(this)._forceRed(b)},o.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(b){return this.red=b,this},o.prototype.forceRed=function(b){return a(!this.red,"Already a number in reduction context"),this._forceRed(b)},o.prototype.redAdd=function(b){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,b)},o.prototype.redIAdd=function(b){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,b)},o.prototype.redSub=function(b){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,b)},o.prototype.redISub=function(b){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,b)},o.prototype.redShl=function(b){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,b)},o.prototype.redMul=function(b){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,b),this.red.mul(this,b)},o.prototype.redIMul=function(b){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,b),this.red.imul(this,b)},o.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(b){return a(this.red&&!b.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,b)};var k={k256:null,p224:null,p192:null,p25519:null};function D(b,y){this.name=b,this.p=new o(y,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function j(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function B(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function E(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function M(b){if(typeof b=="string"){var y=o._prime(b);this.m=y.p,this.prime=y;}else a(b.gtn(1),"modulus must be greater than 1"),this.m=b,this.prime=null;}function L(b){M.call(this,b),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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);}D.prototype._tmp=function(){var b=new o(null);return b.words=new Array(Math.ceil(this.n/13)),b},D.prototype.ireduce=function(b){var y,x=b;do this.split(x,this.tmp),y=(x=(x=this.imulK(x)).iadd(this.tmp)).bitLength();while(y>this.n);var _=y<this.n?-1:x.ucmp(this.p);return _===0?(x.words[0]=0,x.length=1):_>0?x.isub(this.p):x.strip!==void 0?x.strip():x._strip(),x},D.prototype.split=function(b,y){b.iushrn(this.n,0,y);},D.prototype.imulK=function(b){return b.imul(this.k)},s(j,D),j.prototype.split=function(b,y){for(var x=Math.min(b.length,9),_=0;_<x;_++)y.words[_]=b.words[_];if(y.length=x,b.length<=9)return b.words[0]=0,void(b.length=1);var S=b.words[9];for(y.words[y.length++]=4194303&S,_=10;_<b.length;_++){var R=0|b.words[_];b.words[_-10]=(4194303&R)<<4|S>>>22,S=R;}S>>>=22,b.words[_-10]=S,S===0&&b.length>10?b.length-=10:b.length-=9;},j.prototype.imulK=function(b){b.words[b.length]=0,b.words[b.length+1]=0,b.length+=2;for(var y=0,x=0;x<b.length;x++){var _=0|b.words[x];y+=977*_,b.words[x]=67108863&y,y=64*_+(y/67108864|0);}return b.words[b.length-1]===0&&(b.length--,b.words[b.length-1]===0&&b.length--),b},s(F,D),s(B,D),s(E,D),E.prototype.imulK=function(b){for(var y=0,x=0;x<b.length;x++){var _=19*(0|b.words[x])+y,S=67108863&_;_>>>=26,b.words[x]=S,y=_;}return y!==0&&(b.words[b.length++]=y),b},o._prime=function(b){if(k[b])return k[b];var y;if(b==="k256")y=new j;else if(b==="p224")y=new F;else if(b==="p192")y=new B;else {if(b!=="p25519")throw new Error("Unknown prime "+b);y=new E;}return k[b]=y,y},M.prototype._verify1=function(b){a(b.negative===0,"red works only with positives"),a(b.red,"red works only with red numbers");},M.prototype._verify2=function(b,y){a((b.negative|y.negative)==0,"red works only with positives"),a(b.red&&b.red===y.red,"red works only with red numbers");},M.prototype.imod=function(b){return this.prime?this.prime.ireduce(b)._forceRed(this):(d(b,b.umod(this.m)._forceRed(this)),b)},M.prototype.neg=function(b){return b.isZero()?b.clone():this.m.sub(b)._forceRed(this)},M.prototype.add=function(b,y){this._verify2(b,y);var x=b.add(y);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},M.prototype.iadd=function(b,y){this._verify2(b,y);var x=b.iadd(y);return x.cmp(this.m)>=0&&x.isub(this.m),x},M.prototype.sub=function(b,y){this._verify2(b,y);var x=b.sub(y);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},M.prototype.isub=function(b,y){this._verify2(b,y);var x=b.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},M.prototype.shl=function(b,y){return this._verify1(b),this.imod(b.ushln(y))},M.prototype.imul=function(b,y){return this._verify2(b,y),this.imod(b.imul(y))},M.prototype.mul=function(b,y){return this._verify2(b,y),this.imod(b.mul(y))},M.prototype.isqr=function(b){return this.imul(b,b.clone())},M.prototype.sqr=function(b){return this.mul(b,b)},M.prototype.sqrt=function(b){if(b.isZero())return b.clone();var y=this.m.andln(3);if(a(y%2==1),y===3){var x=this.m.add(new o(1)).iushrn(2);return this.pow(b,x)}for(var _=this.m.subn(1),S=0;!_.isZero()&&_.andln(1)===0;)S++,_.iushrn(1);a(!_.isZero());var R=new o(1).toRed(this),z=R.redNeg(),U=this.m.subn(1).iushrn(1),H=this.m.bitLength();for(H=new o(2*H*H).toRed(this);this.pow(H,U).cmp(z)!==0;)H.redIAdd(z);for(var q=this.pow(H,_),N=this.pow(b,_.addn(1).iushrn(1)),V=this.pow(b,_),O=S;V.cmp(R)!==0;){for(var A=V,P=0;A.cmp(R)!==0;P++)A=A.redSqr();a(P<O);var W=this.pow(q,new o(1).iushln(O-P-1));N=N.redMul(W),q=W.redSqr(),V=V.redMul(q),O=P;}return N},M.prototype.invm=function(b){var y=b._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},M.prototype.pow=function(b,y){if(y.isZero())return new o(1).toRed(this);if(y.cmpn(1)===0)return b.clone();var x=new Array(16);x[0]=new o(1).toRed(this),x[1]=b;for(var _=2;_<x.length;_++)x[_]=this.mul(x[_-1],b);var S=x[0],R=0,z=0,U=y.bitLength()%26;for(U===0&&(U=26),_=y.length-1;_>=0;_--){for(var H=y.words[_],q=U-1;q>=0;q--){var N=H>>q&1;S!==x[0]&&(S=this.sqr(S)),N!==0||R!==0?(R<<=1,R|=N,(++z===4||_===0&&q===0)&&(S=this.mul(S,x[R]),z=0,R=0)):z=0;}U=26;}return S},M.prototype.convertTo=function(b){var y=b.umod(this.m);return y===b?y.clone():y},M.prototype.convertFrom=function(b){var y=b.clone();return y.red=null,y},o.mont=function(b){return new L(b)},s(L,M),L.prototype.convertTo=function(b){return this.imod(b.ushln(this.shift))},L.prototype.convertFrom=function(b){var y=this.imod(b.mul(this.rinv));return y.red=null,y},L.prototype.imul=function(b,y){if(b.isZero()||y.isZero())return b.words[0]=0,b.length=1,b;var x=b.imul(y),_=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(_).iushrn(this.shift),R=S;return S.cmp(this.m)>=0?R=S.isub(this.m):S.cmpn(0)<0&&(R=S.iadd(this.m)),R._forceRed(this)},L.prototype.mul=function(b,y){if(b.isZero()||y.isZero())return new o(0)._forceRed(this);var x=b.mul(y),_=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=x.isub(_).iushrn(this.shift),R=S;return S.cmp(this.m)>=0?R=S.isub(this.m):S.cmpn(0)<0&&(R=S.iadd(this.m)),R._forceRed(this)},L.prototype.invm=function(b){return this.imod(b._invmp(this.m).mul(this.r2))._forceRed(this)};})(t===void 0||t);},{buffer:188}],187:[function(e,t,r){var n;function i(s){this.rand=s;}if(t.exports=function(s){return n||(n=new i(null)),n.generate(s)},t.exports.Rand=i,i.prototype.generate=function(s){return this._rand(s)},i.prototype._rand=function(s){if(this.rand.getBytes)return this.rand.getBytes(s);for(var o=new Uint8Array(s),l=0;l<o.length;l++)o[l]=this.rand.getByte();return o},typeof self=="object")self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(s){var o=new Uint8Array(s);return self.crypto.getRandomValues(o),o}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(s){var o=new Uint8Array(s);return self.msCrypto.getRandomValues(o),o}:typeof window=="object"&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=e("crypto");if(typeof a.randomBytes!="function")throw new Error("Not supported");i.prototype._rand=function(s){return a.randomBytes(s)};}catch{}},{crypto:188}],188:[function(e,t,r){},{}],189:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(u){n.isBuffer(u)||(u=n.from(u));for(var c=u.length/4|0,d=new Array(c),p=0;p<c;p++)d[p]=u.readUInt32BE(4*p);return d}function a(u){for(;0<u.length;u++)u[0]=0;}function s(u,c,d,p,h){for(var m,g,v,w,C=d[0],T=d[1],I=d[2],k=d[3],D=u[0]^c[0],j=u[1]^c[1],F=u[2]^c[2],B=u[3]^c[3],E=4,M=1;M<h;M++)m=C[D>>>24]^T[j>>>16&255]^I[F>>>8&255]^k[255&B]^c[E++],g=C[j>>>24]^T[F>>>16&255]^I[B>>>8&255]^k[255&D]^c[E++],v=C[F>>>24]^T[B>>>16&255]^I[D>>>8&255]^k[255&j]^c[E++],w=C[B>>>24]^T[D>>>16&255]^I[j>>>8&255]^k[255&F]^c[E++],D=m,j=g,F=v,B=w;return m=(p[D>>>24]<<24|p[j>>>16&255]<<16|p[F>>>8&255]<<8|p[255&B])^c[E++],g=(p[j>>>24]<<24|p[F>>>16&255]<<16|p[B>>>8&255]<<8|p[255&D])^c[E++],v=(p[F>>>24]<<24|p[B>>>16&255]<<16|p[D>>>8&255]<<8|p[255&j])^c[E++],w=(p[B>>>24]<<24|p[D>>>16&255]<<16|p[j>>>8&255]<<8|p[255&F])^c[E++],[m>>>=0,g>>>=0,v>>>=0,w>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],l=(function(){for(var u=new Array(256),c=0;c<256;c++)u[c]=c<128?c<<1:c<<1^283;for(var d=[],p=[],h=[[],[],[],[]],m=[[],[],[],[]],g=0,v=0,w=0;w<256;++w){var C=v^v<<1^v<<2^v<<3^v<<4;C=C>>>8^255&C^99,d[g]=C,p[C]=g;var T=u[g],I=u[T],k=u[I],D=257*u[C]^16843008*C;h[0][g]=D<<24|D>>>8,h[1][g]=D<<16|D>>>16,h[2][g]=D<<8|D>>>24,h[3][g]=D,D=16843009*k^65537*I^257*T^16843008*g,m[0][C]=D<<24|D>>>8,m[1][C]=D<<16|D>>>16,m[2][C]=D<<8|D>>>24,m[3][C]=D,g===0?g=v=1:(g=T^u[u[u[k^T]]],v^=u[u[v]]);}return {SBOX:d,INV_SBOX:p,SUB_MIX:h,INV_SUB_MIX:m}})();function f(u){this._key=i(u),this._reset();}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var u=this._key,c=u.length,d=c+6,p=4*(d+1),h=[],m=0;m<c;m++)h[m]=u[m];for(m=c;m<p;m++){var g=h[m-1];m%c==0?(g=g<<8|g>>>24,g=l.SBOX[g>>>24]<<24|l.SBOX[g>>>16&255]<<16|l.SBOX[g>>>8&255]<<8|l.SBOX[255&g],g^=o[m/c|0]<<24):c>6&&m%c==4&&(g=l.SBOX[g>>>24]<<24|l.SBOX[g>>>16&255]<<16|l.SBOX[g>>>8&255]<<8|l.SBOX[255&g]),h[m]=h[m-c]^g;}for(var v=[],w=0;w<p;w++){var C=p-w,T=h[C-(w%4?0:4)];v[w]=w<4||C<=4?T:l.INV_SUB_MIX[0][l.SBOX[T>>>24]]^l.INV_SUB_MIX[1][l.SBOX[T>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[T>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&T]];}this._nRounds=d,this._keySchedule=h,this._invKeySchedule=v;},f.prototype.encryptBlockRaw=function(u){return s(u=i(u),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},f.prototype.encryptBlock=function(u){var c=this.encryptBlockRaw(u),d=n.allocUnsafe(16);return d.writeUInt32BE(c[0],0),d.writeUInt32BE(c[1],4),d.writeUInt32BE(c[2],8),d.writeUInt32BE(c[3],12),d},f.prototype.decryptBlock=function(u){var c=(u=i(u))[1];u[1]=u[3],u[3]=c;var d=s(u,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),p=n.allocUnsafe(16);return p.writeUInt32BE(d[0],0),p.writeUInt32BE(d[3],4),p.writeUInt32BE(d[2],8),p.writeUInt32BE(d[1],12),p},f.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key);},t.exports.AES=f;},{"safe-buffer":494}],190:[function(e,t,r){var n=e("./aes"),i=e("safe-buffer").Buffer,a=e("cipher-base"),s=e("inherits"),o=e("./ghash"),l=e("buffer-xor"),f=e("./incr32");function u(c,d,p,h){a.call(this);var m=i.alloc(4,0);this._cipher=new n.AES(d);var g=this._cipher.encryptBlock(m);this._ghash=new o(g),p=(function(v,w,C){if(w.length===12)return v._finID=i.concat([w,i.from([0,0,0,1])]),i.concat([w,i.from([0,0,0,2])]);var T=new o(C),I=w.length,k=I%16;T.update(w),k&&(k=16-k,T.update(i.alloc(k,0))),T.update(i.alloc(8,0));var D=8*I,j=i.alloc(8);j.writeUIntBE(D,0,8),T.update(j),v._finID=T.state;var F=i.from(v._finID);return f(F),F})(this,p,g),this._prev=i.from(p),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=h,this._alen=0,this._len=0,this._mode=c,this._authTag=null,this._called=false;}s(u,a),u.prototype._update=function(c){if(!this._called&&this._alen){var d=16-this._alen%16;d<16&&(d=i.alloc(d,0),this._ghash.update(d));}this._called=true;var p=this._mode.encrypt(this,c);return this._decrypt?this._ghash.update(c):this._ghash.update(p),this._len+=c.length,p},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var c=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&(function(d,p){var h=0;d.length!==p.length&&h++;for(var m=Math.min(d.length,p.length),g=0;g<m;++g)h+=d[g]^p[g];return h})(c,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=c,this._cipher.scrub();},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(c){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=c;},u.prototype.setAAD=function(c){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(c),this._alen+=c.length;},t.exports=u;},{"./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"),a=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(a)};},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(e,t,r){var n=e("./authCipher"),i=e("safe-buffer").Buffer,a=e("./modes"),s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(p,h,m){o.call(this),this._cache=new c,this._last=void 0,this._cipher=new l.AES(h),this._prev=i.from(m),this._mode=p,this._autopadding=true;}function c(){this.cache=i.allocUnsafe(0);}function d(p,h,m){var g=a[p.toLowerCase()];if(!g)throw new TypeError("invalid suite type");if(typeof m=="string"&&(m=i.from(m)),g.mode!=="GCM"&&m.length!==g.iv)throw new TypeError("invalid iv length "+m.length);if(typeof h=="string"&&(h=i.from(h)),h.length!==g.key/8)throw new TypeError("invalid key length "+h.length);return g.type==="stream"?new s(g.module,h,m,true):g.type==="auth"?new n(g.module,h,m,true):new u(g.module,h,m)}e("inherits")(u,o),u.prototype._update=function(p){var h,m;this._cache.add(p);for(var g=[];h=this._cache.get(this._autopadding);)m=this._mode.decrypt(this,h),g.push(m);return i.concat(g)},u.prototype._final=function(){var p=this._cache.flush();if(this._autopadding)return (function(h){var m=h[15];if(m<1||m>16)throw new Error("unable to decrypt data");for(var g=-1;++g<m;)if(h[g+(16-m)]!==m)throw new Error("unable to decrypt data");if(m!==16)return h.slice(0,16-m)})(this._mode.decrypt(this,p));if(p)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(p){return this._autopadding=!!p,this},c.prototype.add=function(p){this.cache=i.concat([this.cache,p]);},c.prototype.get=function(p){var h;if(p){if(this.cache.length>16)return h=this.cache.slice(0,16),this.cache=this.cache.slice(16),h}else if(this.cache.length>=16)return h=this.cache.slice(0,16),this.cache=this.cache.slice(16),h;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(p,h){var m=a[p.toLowerCase()];if(!m)throw new TypeError("invalid suite type");var g=f(h,false,m.key,m.iv);return d(p,g.key,g.iv)},r.createDecipheriv=d;},{"./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"),a=e("safe-buffer").Buffer,s=e("./streamCipher"),o=e("cipher-base"),l=e("./aes"),f=e("evp_bytestokey");function u(h,m,g){o.call(this),this._cache=new d,this._cipher=new l.AES(m),this._prev=a.from(g),this._mode=h,this._autopadding=true;}e("inherits")(u,o),u.prototype._update=function(h){var m,g;this._cache.add(h);for(var v=[];m=this._cache.get();)g=this._mode.encrypt(this,m),v.push(g);return a.concat(v)};var c=a.alloc(16,16);function d(){this.cache=a.allocUnsafe(0);}function p(h,m,g){var v=n[h.toLowerCase()];if(!v)throw new TypeError("invalid suite type");if(typeof m=="string"&&(m=a.from(m)),m.length!==v.key/8)throw new TypeError("invalid key length "+m.length);if(typeof g=="string"&&(g=a.from(g)),v.mode!=="GCM"&&g.length!==v.iv)throw new TypeError("invalid iv length "+g.length);return v.type==="stream"?new s(v.module,m,g):v.type==="auth"?new i(v.module,m,g):new u(v.module,m,g)}u.prototype._final=function(){var h=this._cache.flush();if(this._autopadding)return h=this._mode.encrypt(this,h),this._cipher.scrub(),h;if(!h.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(h){return this._autopadding=!!h,this},d.prototype.add=function(h){this.cache=a.concat([this.cache,h]);},d.prototype.get=function(){if(this.cache.length>15){var h=this.cache.slice(0,16);return this.cache=this.cache.slice(16),h}return null},d.prototype.flush=function(){for(var h=16-this.cache.length,m=a.allocUnsafe(h),g=-1;++g<h;)m.writeUInt8(h,g);return a.concat([this.cache,m])},r.createCipheriv=p,r.createCipher=function(h,m){var g=n[h.toLowerCase()];if(!g)throw new TypeError("invalid suite type");var v=f(m,false,g.key,g.iv);return p(h,v.key,v.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 a(o){var l=n.allocUnsafe(16);return l.writeUInt32BE(o[0]>>>0,0),l.writeUInt32BE(o[1]>>>0,4),l.writeUInt32BE(o[2]>>>0,8),l.writeUInt32BE(o[3]>>>0,12),l}function s(o){this.h=o,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0);}s.prototype.ghash=function(o){for(var l=-1;++l<o.length;)this.state[l]^=o[l];this._multiply();},s.prototype._multiply=function(){for(var o,l,f,u=[(o=this.h).readUInt32BE(0),o.readUInt32BE(4),o.readUInt32BE(8),o.readUInt32BE(12)],c=[0,0,0,0],d=-1;++d<128;){for((this.state[~~(d/8)]&1<<7-d%8)!=0&&(c[0]^=u[0],c[1]^=u[1],c[2]^=u[2],c[3]^=u[3]),f=(1&u[3])!=0,l=3;l>0;l--)u[l]=u[l]>>>1|(1&u[l-1])<<31;u[0]=u[0]>>>1,f&&(u[0]=u[0]^225<<24);}this.state=a(c);},s.prototype.update=function(o){var l;for(this.cache=n.concat([this.cache,o]);this.cache.length>=16;)l=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(l);},s.prototype.final=function(o,l){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,o,0,l])),this.state},t.exports=s;},{"safe-buffer":494}],195:[function(e,t,r){t.exports=function(n){for(var i,a=n.length;a--;){if((i=n.readUInt8(a))!==255){i++,n.writeUInt8(i,a);break}n.writeUInt8(0,a);}};},{}],196:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(i,a){var s=n(a,i._prev);return i._prev=i._cipher.encryptBlock(s),i._prev},r.decrypt=function(i,a){var s=i._prev;i._prev=a;var o=i._cipher.decryptBlock(a);return n(o,s)};},{"buffer-xor":219}],197:[function(e,t,r){var n=e("safe-buffer").Buffer,i=e("buffer-xor");function a(s,o,l){var f=o.length,u=i(o,s._cache);return s._cache=s._cache.slice(f),s._prev=n.concat([s._prev,l?o:u]),u}r.encrypt=function(s,o,l){for(var f,u=n.allocUnsafe(0);o.length;){if(s._cache.length===0&&(s._cache=s._cipher.encryptBlock(s._prev),s._prev=n.allocUnsafe(0)),!(s._cache.length<=o.length)){u=n.concat([u,a(s,o,l)]);break}f=s._cache.length,u=n.concat([u,a(s,o.slice(0,f),l)]),o=o.slice(f);}return u};},{"buffer-xor":219,"safe-buffer":494}],198:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(s,o,l){for(var f,u,c=-1,d=0;++c<8;)f=o&1<<7-c?128:0,d+=(128&(u=s._cipher.encryptBlock(s._prev)[0]^f))>>c%8,s._prev=a(s._prev,l?f:u);return d}function a(s,o){var l=s.length,f=-1,u=n.allocUnsafe(s.length);for(s=n.concat([s,n.from([o])]);++f<l;)u[f]=s[f]<<1|s[f+1]>>7;return u}r.encrypt=function(s,o,l){for(var f=o.length,u=n.allocUnsafe(f),c=-1;++c<f;)u[c]=i(s,o[c],l);return u};},{"safe-buffer":494}],199:[function(e,t,r){var n=e("safe-buffer").Buffer;function i(a,s,o){var l=a._cipher.encryptBlock(a._prev)[0]^s;return a._prev=n.concat([a._prev.slice(1),n.from([o?s:l])]),l}r.encrypt=function(a,s,o){for(var l=s.length,f=n.allocUnsafe(l),u=-1;++u<l;)f[u]=i(a,s[u],o);return f};},{"safe-buffer":494}],200:[function(e,t,r){var n=e("buffer-xor"),i=e("safe-buffer").Buffer,a=e("../incr32");function s(o){var l=o._cipher.encryptBlockRaw(o._prev);return a(o._prev),l}r.encrypt=function(o,l){var f=Math.ceil(l.length/16),u=o._cache.length;o._cache=i.concat([o._cache,i.allocUnsafe(16*f)]);for(var c=0;c<f;c++){var d=s(o),p=u+16*c;o._cache.writeUInt32BE(d[0],p+0),o._cache.writeUInt32BE(d[1],p+4),o._cache.writeUInt32BE(d[2],p+8),o._cache.writeUInt32BE(d[3],p+12);}var h=o._cache.slice(0,l.length);return o._cache=o._cache.slice(l.length),n(l,h)};},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(e,t,r){r.encrypt=function(n,i){return n._cipher.encryptBlock(i)},r.decrypt=function(n,i){return n._cipher.decryptBlock(i)};},{}],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 a in i)i[a].module=n[i[a].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(n){(function(){var i=e("buffer-xor");function a(s){return s._prev=s._cipher.encryptBlock(s._prev),s._prev}r.encrypt=function(s,o){for(;s._cache.length<o.length;)s._cache=n.concat([s._cache,a(s)]);var l=s._cache.slice(0,o.length);return s._cache=s._cache.slice(o.length),i(o,l)};}).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,a=e("cipher-base");function s(o,l,f,u){a.call(this),this._cipher=new n.AES(l),this._prev=i.from(f),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=u,this._mode=o;}e("inherits")(s,a),s.prototype._update=function(o){return this._mode.encrypt(this,o,this._decrypt)},s.prototype._final=function(){this._cipher.scrub();},t.exports=s;},{"./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"),a=e("browserify-aes/modes"),s=e("browserify-des/modes"),o=e("evp_bytestokey");function l(u,c,d){if(u=u.toLowerCase(),a[u])return i.createCipheriv(u,c,d);if(s[u])return new n({key:c,iv:d,mode:u});throw new TypeError("invalid suite type")}function f(u,c,d){if(u=u.toLowerCase(),a[u])return i.createDecipheriv(u,c,d);if(s[u])return new n({key:c,iv:d,mode:u,decrypt:true});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function(u,c){var d,p;if(u=u.toLowerCase(),a[u])d=a[u].key,p=a[u].iv;else {if(!s[u])throw new TypeError("invalid suite type");d=8*s[u].key,p=s[u].iv;}var h=o(c,false,d,p);return l(u,h.key,h.iv)},r.createCipheriv=r.Cipheriv=l,r.createDecipher=r.Decipher=function(u,c){var d,p;if(u=u.toLowerCase(),a[u])d=a[u].key,p=a[u].iv;else {if(!s[u])throw new TypeError("invalid suite type");d=8*s[u].key,p=s[u].iv;}var h=o(c,false,d,p);return f(u,h.key,h.iv)},r.createDecipheriv=r.Decipheriv=f,r.listCiphers=r.getCiphers=function(){return Object.keys(s).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"),a=e("inherits"),s=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(f){n.call(this);var u,c=f.mode.toLowerCase(),d=o[c];u=f.decrypt?"decrypt":"encrypt";var p=f.key;s.isBuffer(p)||(p=s.from(p)),c!=="des-ede"&&c!=="des-ede-cbc"||(p=s.concat([p,p.slice(0,8)]));var h=f.iv;s.isBuffer(h)||(h=s.from(h)),this._des=d.create({key:p,iv:h,type:u});}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=l,a(l,n),l.prototype._update=function(f){return s.from(this._des.update(f))},l.prototype._final=function(){return s.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(n){(function(){var i=e("bn.js"),a=e("randombytes");function s(l){var f,u=l.modulus.byteLength();do f=new i(a(u));while(f.cmp(l.modulus)>=0||!f.umod(l.prime1)||!f.umod(l.prime2));return f}function o(l,f){var u=(function(I){var k=s(I);return {blinder:k.toRed(i.mont(I.modulus)).redPow(new i(I.publicExponent)).fromRed(),unblinder:k.invm(I.modulus)}})(f),c=f.modulus.byteLength(),d=new i(l).mul(u.blinder).umod(f.modulus),p=d.toRed(i.mont(f.prime1)),h=d.toRed(i.mont(f.prime2)),m=f.coefficient,g=f.prime1,v=f.prime2,w=p.redPow(f.exponent1).fromRed(),C=h.redPow(f.exponent2).fromRed(),T=w.isub(C).imul(m).umod(g).imul(v);return C.iadd(T).imul(u.unblinder).umod(f.modulus).toArrayLike(n,"be",c)}o.getr=s,t.exports=o;}).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"),a=e("readable-stream"),s=e("inherits"),o=e("./sign"),l=e("./verify"),f=e("./algorithms.json");function u(h){a.Writable.call(this);var m=f[h];if(!m)throw new Error("Unknown message digest");this._hashType=m.hash,this._hash=i(m.hash),this._tag=m.id,this._signType=m.sign;}function c(h){a.Writable.call(this);var m=f[h];if(!m)throw new Error("Unknown message digest");this._hash=i(m.hash),this._tag=m.id,this._signType=m.sign;}function d(h){return new u(h)}function p(h){return new c(h)}Object.keys(f).forEach((function(h){f[h].id=n.from(f[h].id,"hex"),f[h.toLowerCase()]=f[h];})),s(u,a.Writable),u.prototype._write=function(h,m,g){this._hash.update(h),g();},u.prototype.update=function(h,m){return typeof h=="string"&&(h=n.from(h,m)),this._hash.update(h),this},u.prototype.sign=function(h,m){this.end();var g=this._hash.digest(),v=o(g,h,this._hashType,this._signType,this._tag);return m?v.toString(m):v},s(c,a.Writable),c.prototype._write=function(h,m,g){this._hash.update(h),g();},c.prototype.update=function(h,m){return typeof h=="string"&&(h=n.from(h,m)),this._hash.update(h),this},c.prototype.verify=function(h,m,g){typeof m=="string"&&(m=n.from(m,g)),this.end();var v=this._hash.digest();return l(m,v,h,this._signType,this._tag)},t.exports={Sign:d,Verify:p,createSign:d,createVerify:p};},{"./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"),a=e("browserify-rsa"),s=e("elliptic").ec,o=e("bn.js"),l=e("parse-asn1"),f=e("./curves.json");function u(h,m,g,v){if((h=n.from(h.toArray())).length<m.byteLength()){var w=n.alloc(m.byteLength()-h.length);h=n.concat([w,h]);}var C=g.length,T=(function(D,j){D=(D=c(D,j)).mod(j);var F=n.from(D.toArray());if(F.length<j.byteLength()){var B=n.alloc(j.byteLength()-F.length);F=n.concat([B,F]);}return F})(g,m),I=n.alloc(C);I.fill(1);var k=n.alloc(C);return k=i(v,k).update(I).update(n.from([0])).update(h).update(T).digest(),I=i(v,k).update(I).digest(),{k:k=i(v,k).update(I).update(n.from([1])).update(h).update(T).digest(),v:I=i(v,k).update(I).digest()}}function c(h,m){var g=new o(h),v=(h.length<<3)-m.bitLength();return v>0&&g.ishrn(v),g}function d(h,m,g){var v,w;do{for(v=n.alloc(0);8*v.length<h.bitLength();)m.v=i(g,m.k).update(m.v).digest(),v=n.concat([v,m.v]);w=c(v,h),m.k=i(g,m.k).update(m.v).update(n.from([0])).digest(),m.v=i(g,m.k).update(m.v).digest();}while(w.cmp(h)!==-1);return w}function p(h,m,g,v){return h.toRed(o.mont(g)).redPow(m).fromRed().mod(v)}t.exports=function(h,m,g,v,w){var C=l(m);if(C.curve){if(v!=="ecdsa"&&v!=="ecdsa/rsa")throw new Error("wrong private key type");return (function(D,j){var F=f[j.curve.join(".")];if(!F)throw new Error("unknown curve "+j.curve.join("."));var B=new s(F).keyFromPrivate(j.privateKey).sign(D);return n.from(B.toDER())})(h,C)}if(C.type==="dsa"){if(v!=="dsa")throw new Error("wrong private key type");return (function(D,j,F){for(var B,E=j.params.priv_key,M=j.params.p,L=j.params.q,b=j.params.g,y=new o(0),x=c(D,L).mod(L),_=false,S=u(E,L,D,F);_===false;)B=d(L,S,F),y=p(b,B,M,L),(_=B.invm(L).imul(x.add(E.mul(y))).mod(L)).cmpn(0)===0&&(_=false,y=new o(0));return (function(R,z){R=R.toArray(),z=z.toArray(),128&R[0]&&(R=[0].concat(R)),128&z[0]&&(z=[0].concat(z));var U=[48,R.length+z.length+4,2,R.length];return U=U.concat(R,[2,z.length],z),n.from(U)})(y,_)})(h,C,g)}if(v!=="rsa"&&v!=="ecdsa/rsa")throw new Error("wrong private key type");h=n.concat([w,h]);for(var T=C.modulus.byteLength(),I=[0,1];h.length+I.length+1<T;)I.push(255);I.push(0);for(var k=-1;++k<h.length;)I.push(h[k]);return a(I,C)},t.exports.getKey=u,t.exports.makeKey=d;},{"./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"),a=e("elliptic").ec,s=e("parse-asn1"),o=e("./curves.json");function l(f,u){if(f.cmpn(0)<=0)throw new Error("invalid sig");if(f.cmp(u)>=u)throw new Error("invalid sig")}t.exports=function(f,u,c,d,p){var h=s(c);if(h.type==="ec"){if(d!=="ecdsa"&&d!=="ecdsa/rsa")throw new Error("wrong public key type");return (function(I,k,D){var j=o[D.data.algorithm.curve.join(".")];if(!j)throw new Error("unknown curve "+D.data.algorithm.curve.join("."));var F=new a(j),B=D.data.subjectPrivateKey.data;return F.verify(k,I,B)})(f,u,h)}if(h.type==="dsa"){if(d!=="dsa")throw new Error("wrong public key type");return (function(I,k,D){var j=D.data.p,F=D.data.q,B=D.data.g,E=D.data.pub_key,M=s.signature.decode(I,"der"),L=M.s,b=M.r;l(L,F),l(b,F);var y=i.mont(j),x=L.invm(F);return B.toRed(y).redPow(new i(k).mul(x).mod(F)).fromRed().mul(E.toRed(y).redPow(b.mul(x).mod(F)).fromRed()).mod(j).mod(F).cmp(b)===0})(f,u,h)}if(d!=="rsa"&&d!=="ecdsa/rsa")throw new Error("wrong public key type");u=n.concat([p,u]);for(var m=h.modulus.byteLength(),g=[1],v=0;u.length+g.length+2<m;)g.push(255),v++;g.push(0);for(var w=-1;++w<u.length;)g.push(u[w]);g=n.from(g);var C=i.mont(h.modulus);f=(f=new i(f).toRed(C)).redPow(new i(h.publicExponent)),f=n.from(f.fromRed().toArray());var T=v<8?1:0;for(m=Math.min(f.length,g.length),f.length!==g.length&&(T=1),w=-1;++w<m;)T|=f[w]^g[w];return T===0};},{"./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 a(o,l){for(var f in o)l[f]=o[f];}function s(o,l,f){return i(o,l,f)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,r),r.Buffer=s),a(i,s),s.from=function(o,l,f){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,l,f)},s.alloc=function(o,l,f){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=i(o);return l!==void 0?typeof f=="string"?u.fill(l,f):u.fill(l):u.fill(0),u},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)};},{buffer:220}],218:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(h){switch((h=""+h)&&h.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 true;default:return false}};function a(h){var m;switch(this.encoding=(function(g){var v=(function(w){if(!w)return "utf8";for(var C;;)switch(w){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 w;default:if(C)return;w=(""+w).toLowerCase(),C=true;}})(g);if(typeof v!="string"&&(n.isEncoding===i||!i(g)))throw new Error("Unknown encoding: "+g);return v||g})(h),this.encoding){case "utf16le":this.text=l,this.end=f,m=4;break;case "utf8":this.fillLast=o,m=4;break;case "base64":this.text=u,this.end=c,m=3;break;default:return this.write=d,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(m);}function s(h){return h<=127?0:h>>5==6?2:h>>4==14?3:h>>3==30?4:h>>6==2?-1:-2}function o(h){var m=this.lastTotal-this.lastNeed,g=(function(v,w,C){if((192&w[0])!=128)return v.lastNeed=0,"\uFFFD";if(v.lastNeed>1&&w.length>1){if((192&w[1])!=128)return v.lastNeed=1,"\uFFFD";if(v.lastNeed>2&&w.length>2&&(192&w[2])!=128)return v.lastNeed=2,"\uFFFD"}})(this,h);return g!==void 0?g:this.lastNeed<=h.length?(h.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(h.copy(this.lastChar,m,0,h.length),void(this.lastNeed-=h.length))}function l(h,m){if((h.length-m)%2==0){var g=h.toString("utf16le",m);if(g){var v=g.charCodeAt(g.length-1);if(v>=55296&&v<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1],g.slice(0,-1)}return g}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=h[h.length-1],h.toString("utf16le",m,h.length-1)}function f(h){var m=h&&h.length?this.write(h):"";if(this.lastNeed){var g=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,g)}return m}function u(h,m){var g=(h.length-m)%3;return g===0?h.toString("base64",m):(this.lastNeed=3-g,this.lastTotal=3,g===1?this.lastChar[0]=h[h.length-1]:(this.lastChar[0]=h[h.length-2],this.lastChar[1]=h[h.length-1]),h.toString("base64",m,h.length-g))}function c(h){var m=h&&h.length?this.write(h):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function d(h){return h.toString(this.encoding)}function p(h){return h&&h.length?this.write(h):""}r.StringDecoder=a,a.prototype.write=function(h){if(h.length===0)return "";var m,g;if(this.lastNeed){if((m=this.fillLast(h))===void 0)return "";g=this.lastNeed,this.lastNeed=0;}else g=0;return g<h.length?m?m+this.text(h,g):this.text(h,g):m||""},a.prototype.end=function(h){var m=h&&h.length?this.write(h):"";return this.lastNeed?m+"\uFFFD":m},a.prototype.text=function(h,m){var g=(function(w,C,T){var I=C.length-1;if(I<T)return 0;var k=s(C[I]);return k>=0?(k>0&&(w.lastNeed=k-1),k):--I<T||k===-2?0:(k=s(C[I]))>=0?(k>0&&(w.lastNeed=k-2),k):--I<T||k===-2?0:(k=s(C[I]))>=0?(k>0&&(k===2?k=0:w.lastNeed=k-3),k):0})(this,h,m);if(!this.lastNeed)return h.toString("utf8",m);this.lastTotal=g;var v=h.length-(g-this.lastNeed);return h.copy(this.lastChar,0,v),h.toString("utf8",m,v)},a.prototype.fillLast=function(h){if(this.lastNeed<=h.length)return h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);h.copy(this.lastChar,this.lastTotal-this.lastNeed,0,h.length),this.lastNeed-=h.length;};},{"safe-buffer":217}],219:[function(e,t,r){(function(n){(function(){t.exports=function(i,a){for(var s=Math.min(i.length,a.length),o=new n(s),l=0;l<s;++l)o[l]=i[l]^a[l];return o};}).call(this);}).call(this,e("buffer").Buffer);},{buffer:220}],220:[function(e,t,r){(function(n){(function(){var i=e("base64-js"),a=e("ieee754");r.Buffer=o,r.SlowBuffer=function(O){return +O!=O&&(O=0),o.alloc(+O)},r.INSPECT_MAX_BYTES=50;function s(O){if(O>2147483647)throw new RangeError('The value "'+O+'" is invalid for option "size"');var A=new Uint8Array(O);return A.__proto__=o.prototype,A}function o(O,A,P){if(typeof O=="number"){if(typeof A=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(O)}return l(O,A,P)}function l(O,A,P){if(typeof O=="string")return (function($,K){if(typeof K=="string"&&K!==""||(K="utf8"),!o.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var te=0|p($,K),J=s(te),Y=J.write($,K);return Y!==te&&(J=J.slice(0,Y)),J})(O,A);if(ArrayBuffer.isView(O))return c(O);if(O==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O);if(N(O,ArrayBuffer)||O&&N(O.buffer,ArrayBuffer))return (function($,K,te){if(K<0||$.byteLength<K)throw new RangeError('"offset" is outside of buffer bounds');if($.byteLength<K+(te||0))throw new RangeError('"length" is outside of buffer bounds');var J;return J=K===void 0&&te===void 0?new Uint8Array($):te===void 0?new Uint8Array($,K):new Uint8Array($,K,te),J.__proto__=o.prototype,J})(O,A,P);if(typeof O=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var W=O.valueOf&&O.valueOf();if(W!=null&&W!==O)return o.from(W,A,P);var Z=(function($){if(o.isBuffer($)){var K=0|d($.length),te=s(K);return te.length===0||$.copy(te,0,0,K),te}if($.length!==void 0)return typeof $.length!="number"||V($.length)?s(0):c($);if($.type==="Buffer"&&Array.isArray($.data))return c($.data)})(O);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof O[Symbol.toPrimitive]=="function")return o.from(O[Symbol.toPrimitive]("string"),A,P);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof O)}function f(O){if(typeof O!="number")throw new TypeError('"size" argument must be of type number');if(O<0)throw new RangeError('The value "'+O+'" is invalid for option "size"')}function u(O){return f(O),s(O<0?0:0|d(O))}function c(O){for(var A=O.length<0?0:0|d(O.length),P=s(A),W=0;W<A;W+=1)P[W]=255&O[W];return P}function d(O){if(O>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|O}function p(O,A){if(o.isBuffer(O))return O.length;if(ArrayBuffer.isView(O)||N(O,ArrayBuffer))return O.byteLength;if(typeof O!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof O);var P=O.length,W=arguments.length>2&&arguments[2]===true;if(!W&&P===0)return 0;for(var Z=false;;)switch(A){case "ascii":case "latin1":case "binary":return P;case "utf8":case "utf-8":return U(O).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*P;case "hex":return P>>>1;case "base64":return H(O).length;default:if(Z)return W?-1:U(O).length;A=(""+A).toLowerCase(),Z=true;}}function h(O,A,P){var W=false;if((A===void 0||A<0)&&(A=0),A>this.length||((P===void 0||P>this.length)&&(P=this.length),P<=0)||(P>>>=0)<=(A>>>=0))return "";for(O||(O="utf8");;)switch(O){case "hex":return M(this,A,P);case "utf8":case "utf-8":return F(this,A,P);case "ascii":return B(this,A,P);case "latin1":case "binary":return E(this,A,P);case "base64":return j(this,A,P);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return L(this,A,P);default:if(W)throw new TypeError("Unknown encoding: "+O);O=(O+"").toLowerCase(),W=true;}}function m(O,A,P){var W=O[A];O[A]=O[P],O[P]=W;}function g(O,A,P,W,Z){if(O.length===0)return -1;if(typeof P=="string"?(W=P,P=0):P>2147483647?P=2147483647:P<-2147483648&&(P=-2147483648),V(P=+P)&&(P=Z?0:O.length-1),P<0&&(P=O.length+P),P>=O.length){if(Z)return -1;P=O.length-1;}else if(P<0){if(!Z)return -1;P=0;}if(typeof A=="string"&&(A=o.from(A,W)),o.isBuffer(A))return A.length===0?-1:v(O,A,P,W,Z);if(typeof A=="number")return A&=255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(O,A,P):Uint8Array.prototype.lastIndexOf.call(O,A,P):v(O,[A],P,W,Z);throw new TypeError("val must be string, number or Buffer")}function v(O,A,P,W,Z){var $,K=1,te=O.length,J=A.length;if(W!==void 0&&((W=String(W).toLowerCase())==="ucs2"||W==="ucs-2"||W==="utf16le"||W==="utf-16le")){if(O.length<2||A.length<2)return -1;K=2,te/=2,J/=2,P/=2;}function Y(oe,se){return K===1?oe[se]:oe.readUInt16BE(se*K)}if(Z){var ne=-1;for($=P;$<te;$++)if(Y(O,$)===Y(A,ne===-1?0:$-ne)){if(ne===-1&&(ne=$),$-ne+1===J)return ne*K}else ne!==-1&&($-=$-ne),ne=-1;}else for(P+J>te&&(P=te-J),$=P;$>=0;$--){for(var re=true,ie=0;ie<J;ie++)if(Y(O,$+ie)!==Y(A,ie)){re=false;break}if(re)return $}return -1}function w(O,A,P,W){P=Number(P)||0;var Z=O.length-P;W?(W=Number(W))>Z&&(W=Z):W=Z;var $=A.length;W>$/2&&(W=$/2);for(var K=0;K<W;++K){var te=parseInt(A.substr(2*K,2),16);if(V(te))return K;O[P+K]=te;}return K}function C(O,A,P,W){return q(U(A,O.length-P),O,P,W)}function T(O,A,P,W){return q((function(Z){for(var $=[],K=0;K<Z.length;++K)$.push(255&Z.charCodeAt(K));return $})(A),O,P,W)}function I(O,A,P,W){return T(O,A,P,W)}function k(O,A,P,W){return q(H(A),O,P,W)}function D(O,A,P,W){return q((function(Z,$){for(var K,te,J,Y=[],ne=0;ne<Z.length&&!(($-=2)<0);++ne)K=Z.charCodeAt(ne),te=K>>8,J=K%256,Y.push(J),Y.push(te);return Y})(A,O.length-P),O,P,W)}function j(O,A,P){return A===0&&P===O.length?i.fromByteArray(O):i.fromByteArray(O.slice(A,P))}function F(O,A,P){P=Math.min(O.length,P);for(var W=[],Z=A;Z<P;){var $,K,te,J,Y=O[Z],ne=null,re=Y>239?4:Y>223?3:Y>191?2:1;if(Z+re<=P)switch(re){case 1:Y<128&&(ne=Y);break;case 2:(192&($=O[Z+1]))==128&&(J=(31&Y)<<6|63&$)>127&&(ne=J);break;case 3:$=O[Z+1],K=O[Z+2],(192&$)==128&&(192&K)==128&&(J=(15&Y)<<12|(63&$)<<6|63&K)>2047&&(J<55296||J>57343)&&(ne=J);break;case 4:$=O[Z+1],K=O[Z+2],te=O[Z+3],(192&$)==128&&(192&K)==128&&(192&te)==128&&(J=(15&Y)<<18|(63&$)<<12|(63&K)<<6|63&te)>65535&&J<1114112&&(ne=J);}ne===null?(ne=65533,re=1):ne>65535&&(ne-=65536,W.push(ne>>>10&1023|55296),ne=56320|1023&ne),W.push(ne),Z+=re;}return (function(ie){var oe=ie.length;if(oe<=4096)return String.fromCharCode.apply(String,ie);for(var se="",le=0;le<oe;)se+=String.fromCharCode.apply(String,ie.slice(le,le+=4096));return se})(W)}r.kMaxLength=2147483647,o.TYPED_ARRAY_SUPPORT=(function(){try{var O=new Uint8Array(1);return O.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},O.foo()===42}catch{return false}})(),o.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:true,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:true,get:function(){if(o.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:true,enumerable:false,writable:false}),o.poolSize=8192,o.from=function(O,A,P){return l(O,A,P)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(O,A,P){return (function(W,Z,$){return f(W),W<=0?s(W):Z!==void 0?typeof $=="string"?s(W).fill(Z,$):s(W).fill(Z):s(W)})(O,A,P)},o.allocUnsafe=function(O){return u(O)},o.allocUnsafeSlow=function(O){return u(O)},o.isBuffer=function(O){return O!=null&&O._isBuffer===true&&O!==o.prototype},o.compare=function(O,A){if(N(O,Uint8Array)&&(O=o.from(O,O.offset,O.byteLength)),N(A,Uint8Array)&&(A=o.from(A,A.offset,A.byteLength)),!o.isBuffer(O)||!o.isBuffer(A))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(O===A)return 0;for(var P=O.length,W=A.length,Z=0,$=Math.min(P,W);Z<$;++Z)if(O[Z]!==A[Z]){P=O[Z],W=A[Z];break}return P<W?-1:W<P?1:0},o.isEncoding=function(O){switch(String(O).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 true;default:return false}},o.concat=function(O,A){if(!Array.isArray(O))throw new TypeError('"list" argument must be an Array of Buffers');if(O.length===0)return o.alloc(0);var P;if(A===void 0)for(A=0,P=0;P<O.length;++P)A+=O[P].length;var W=o.allocUnsafe(A),Z=0;for(P=0;P<O.length;++P){var $=O[P];if(N($,Uint8Array)&&($=o.from($)),!o.isBuffer($))throw new TypeError('"list" argument must be an Array of Buffers');$.copy(W,Z),Z+=$.length;}return W},o.byteLength=p,o.prototype._isBuffer=true,o.prototype.swap16=function(){var O=this.length;if(O%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var A=0;A<O;A+=2)m(this,A,A+1);return this},o.prototype.swap32=function(){var O=this.length;if(O%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var A=0;A<O;A+=4)m(this,A,A+3),m(this,A+1,A+2);return this},o.prototype.swap64=function(){var O=this.length;if(O%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var A=0;A<O;A+=8)m(this,A,A+7),m(this,A+1,A+6),m(this,A+2,A+5),m(this,A+3,A+4);return this},o.prototype.toString=function(){var O=this.length;return O===0?"":arguments.length===0?F(this,0,O):h.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(O){if(!o.isBuffer(O))throw new TypeError("Argument must be a Buffer");return this===O||o.compare(this,O)===0},o.prototype.inspect=function(){var O="",A=r.INSPECT_MAX_BYTES;return O=this.toString("hex",0,A).replace(/(.{2})/g,"$1 ").trim(),this.length>A&&(O+=" ... "),"<Buffer "+O+">"},o.prototype.compare=function(O,A,P,W,Z){if(N(O,Uint8Array)&&(O=o.from(O,O.offset,O.byteLength)),!o.isBuffer(O))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof O);if(A===void 0&&(A=0),P===void 0&&(P=O?O.length:0),W===void 0&&(W=0),Z===void 0&&(Z=this.length),A<0||P>O.length||W<0||Z>this.length)throw new RangeError("out of range index");if(W>=Z&&A>=P)return 0;if(W>=Z)return -1;if(A>=P)return 1;if(this===O)return 0;for(var $=(Z>>>=0)-(W>>>=0),K=(P>>>=0)-(A>>>=0),te=Math.min($,K),J=this.slice(W,Z),Y=O.slice(A,P),ne=0;ne<te;++ne)if(J[ne]!==Y[ne]){$=J[ne],K=Y[ne];break}return $<K?-1:K<$?1:0},o.prototype.includes=function(O,A,P){return this.indexOf(O,A,P)!==-1},o.prototype.indexOf=function(O,A,P){return g(this,O,A,P,true)},o.prototype.lastIndexOf=function(O,A,P){return g(this,O,A,P,false)},o.prototype.write=function(O,A,P,W){if(A===void 0)W="utf8",P=this.length,A=0;else if(P===void 0&&typeof A=="string")W=A,P=this.length,A=0;else {if(!isFinite(A))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");A>>>=0,isFinite(P)?(P>>>=0,W===void 0&&(W="utf8")):(W=P,P=void 0);}var Z=this.length-A;if((P===void 0||P>Z)&&(P=Z),O.length>0&&(P<0||A<0)||A>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var $=false;;)switch(W){case "hex":return w(this,O,A,P);case "utf8":case "utf-8":return C(this,O,A,P);case "ascii":return T(this,O,A,P);case "latin1":case "binary":return I(this,O,A,P);case "base64":return k(this,O,A,P);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return D(this,O,A,P);default:if($)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),$=true;}},o.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(O,A,P){var W="";P=Math.min(O.length,P);for(var Z=A;Z<P;++Z)W+=String.fromCharCode(127&O[Z]);return W}function E(O,A,P){var W="";P=Math.min(O.length,P);for(var Z=A;Z<P;++Z)W+=String.fromCharCode(O[Z]);return W}function M(O,A,P){var W=O.length;(!A||A<0)&&(A=0),(!P||P<0||P>W)&&(P=W);for(var Z="",$=A;$<P;++$)Z+=z(O[$]);return Z}function L(O,A,P){for(var W=O.slice(A,P),Z="",$=0;$<W.length;$+=2)Z+=String.fromCharCode(W[$]+256*W[$+1]);return Z}function b(O,A,P){if(O%1!=0||O<0)throw new RangeError("offset is not uint");if(O+A>P)throw new RangeError("Trying to access beyond buffer length")}function y(O,A,P,W,Z,$){if(!o.isBuffer(O))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>Z||A<$)throw new RangeError('"value" argument is out of bounds');if(P+W>O.length)throw new RangeError("Index out of range")}function x(O,A,P,W,Z,$){if(P+W>O.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("Index out of range")}function _(O,A,P,W,Z){return A=+A,P>>>=0,Z||x(O,0,P,4),a.write(O,A,P,W,23,4),P+4}function S(O,A,P,W,Z){return A=+A,P>>>=0,Z||x(O,0,P,8),a.write(O,A,P,W,52,8),P+8}o.prototype.slice=function(O,A){var P=this.length;(O=~~O)<0?(O+=P)<0&&(O=0):O>P&&(O=P),(A=A===void 0?P:~~A)<0?(A+=P)<0&&(A=0):A>P&&(A=P),A<O&&(A=O);var W=this.subarray(O,A);return W.__proto__=o.prototype,W},o.prototype.readUIntLE=function(O,A,P){O>>>=0,A>>>=0,P||b(O,A,this.length);for(var W=this[O],Z=1,$=0;++$<A&&(Z*=256);)W+=this[O+$]*Z;return W},o.prototype.readUIntBE=function(O,A,P){O>>>=0,A>>>=0,P||b(O,A,this.length);for(var W=this[O+--A],Z=1;A>0&&(Z*=256);)W+=this[O+--A]*Z;return W},o.prototype.readUInt8=function(O,A){return O>>>=0,A||b(O,1,this.length),this[O]},o.prototype.readUInt16LE=function(O,A){return O>>>=0,A||b(O,2,this.length),this[O]|this[O+1]<<8},o.prototype.readUInt16BE=function(O,A){return O>>>=0,A||b(O,2,this.length),this[O]<<8|this[O+1]},o.prototype.readUInt32LE=function(O,A){return O>>>=0,A||b(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+16777216*this[O+3]},o.prototype.readUInt32BE=function(O,A){return O>>>=0,A||b(O,4,this.length),16777216*this[O]+(this[O+1]<<16|this[O+2]<<8|this[O+3])},o.prototype.readIntLE=function(O,A,P){O>>>=0,A>>>=0,P||b(O,A,this.length);for(var W=this[O],Z=1,$=0;++$<A&&(Z*=256);)W+=this[O+$]*Z;return W>=(Z*=128)&&(W-=Math.pow(2,8*A)),W},o.prototype.readIntBE=function(O,A,P){O>>>=0,A>>>=0,P||b(O,A,this.length);for(var W=A,Z=1,$=this[O+--W];W>0&&(Z*=256);)$+=this[O+--W]*Z;return $>=(Z*=128)&&($-=Math.pow(2,8*A)),$},o.prototype.readInt8=function(O,A){return O>>>=0,A||b(O,1,this.length),128&this[O]?-1*(255-this[O]+1):this[O]},o.prototype.readInt16LE=function(O,A){O>>>=0,A||b(O,2,this.length);var P=this[O]|this[O+1]<<8;return 32768&P?4294901760|P:P},o.prototype.readInt16BE=function(O,A){O>>>=0,A||b(O,2,this.length);var P=this[O+1]|this[O]<<8;return 32768&P?4294901760|P:P},o.prototype.readInt32LE=function(O,A){return O>>>=0,A||b(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},o.prototype.readInt32BE=function(O,A){return O>>>=0,A||b(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},o.prototype.readFloatLE=function(O,A){return O>>>=0,A||b(O,4,this.length),a.read(this,O,true,23,4)},o.prototype.readFloatBE=function(O,A){return O>>>=0,A||b(O,4,this.length),a.read(this,O,false,23,4)},o.prototype.readDoubleLE=function(O,A){return O>>>=0,A||b(O,8,this.length),a.read(this,O,true,52,8)},o.prototype.readDoubleBE=function(O,A){return O>>>=0,A||b(O,8,this.length),a.read(this,O,false,52,8)},o.prototype.writeUIntLE=function(O,A,P,W){O=+O,A>>>=0,P>>>=0,W||y(this,O,A,P,Math.pow(2,8*P)-1,0);var Z=1,$=0;for(this[A]=255&O;++$<P&&(Z*=256);)this[A+$]=O/Z&255;return A+P},o.prototype.writeUIntBE=function(O,A,P,W){O=+O,A>>>=0,P>>>=0,W||y(this,O,A,P,Math.pow(2,8*P)-1,0);var Z=P-1,$=1;for(this[A+Z]=255&O;--Z>=0&&($*=256);)this[A+Z]=O/$&255;return A+P},o.prototype.writeUInt8=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,1,255,0),this[A]=255&O,A+1},o.prototype.writeUInt16LE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,2,65535,0),this[A]=255&O,this[A+1]=O>>>8,A+2},o.prototype.writeUInt16BE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,2,65535,0),this[A]=O>>>8,this[A+1]=255&O,A+2},o.prototype.writeUInt32LE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,4,4294967295,0),this[A+3]=O>>>24,this[A+2]=O>>>16,this[A+1]=O>>>8,this[A]=255&O,A+4},o.prototype.writeUInt32BE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,4,4294967295,0),this[A]=O>>>24,this[A+1]=O>>>16,this[A+2]=O>>>8,this[A+3]=255&O,A+4},o.prototype.writeIntLE=function(O,A,P,W){if(O=+O,A>>>=0,!W){var Z=Math.pow(2,8*P-1);y(this,O,A,P,Z-1,-Z);}var $=0,K=1,te=0;for(this[A]=255&O;++$<P&&(K*=256);)O<0&&te===0&&this[A+$-1]!==0&&(te=1),this[A+$]=(O/K>>0)-te&255;return A+P},o.prototype.writeIntBE=function(O,A,P,W){if(O=+O,A>>>=0,!W){var Z=Math.pow(2,8*P-1);y(this,O,A,P,Z-1,-Z);}var $=P-1,K=1,te=0;for(this[A+$]=255&O;--$>=0&&(K*=256);)O<0&&te===0&&this[A+$+1]!==0&&(te=1),this[A+$]=(O/K>>0)-te&255;return A+P},o.prototype.writeInt8=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,1,127,-128),O<0&&(O=255+O+1),this[A]=255&O,A+1},o.prototype.writeInt16LE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,2,32767,-32768),this[A]=255&O,this[A+1]=O>>>8,A+2},o.prototype.writeInt16BE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,2,32767,-32768),this[A]=O>>>8,this[A+1]=255&O,A+2},o.prototype.writeInt32LE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,4,2147483647,-2147483648),this[A]=255&O,this[A+1]=O>>>8,this[A+2]=O>>>16,this[A+3]=O>>>24,A+4},o.prototype.writeInt32BE=function(O,A,P){return O=+O,A>>>=0,P||y(this,O,A,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),this[A]=O>>>24,this[A+1]=O>>>16,this[A+2]=O>>>8,this[A+3]=255&O,A+4},o.prototype.writeFloatLE=function(O,A,P){return _(this,O,A,true,P)},o.prototype.writeFloatBE=function(O,A,P){return _(this,O,A,false,P)},o.prototype.writeDoubleLE=function(O,A,P){return S(this,O,A,true,P)},o.prototype.writeDoubleBE=function(O,A,P){return S(this,O,A,false,P)},o.prototype.copy=function(O,A,P,W){if(!o.isBuffer(O))throw new TypeError("argument should be a Buffer");if(P||(P=0),W||W===0||(W=this.length),A>=O.length&&(A=O.length),A||(A=0),W>0&&W<P&&(W=P),W===P||O.length===0||this.length===0)return 0;if(A<0)throw new RangeError("targetStart out of bounds");if(P<0||P>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),O.length-A<W-P&&(W=O.length-A+P);var Z=W-P;if(this===O&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(A,P,W);else if(this===O&&P<A&&A<W)for(var $=Z-1;$>=0;--$)O[$+A]=this[$+P];else Uint8Array.prototype.set.call(O,this.subarray(P,W),A);return Z},o.prototype.fill=function(O,A,P,W){if(typeof O=="string"){if(typeof A=="string"?(W=A,A=0,P=this.length):typeof P=="string"&&(W=P,P=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!o.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(O.length===1){var Z=O.charCodeAt(0);(W==="utf8"&&Z<128||W==="latin1")&&(O=Z);}}else typeof O=="number"&&(O&=255);if(A<0||this.length<A||this.length<P)throw new RangeError("Out of range index");if(P<=A)return this;var $;if(A>>>=0,P=P===void 0?this.length:P>>>0,O||(O=0),typeof O=="number")for($=A;$<P;++$)this[$]=O;else {var K=o.isBuffer(O)?O:o.from(O,W),te=K.length;if(te===0)throw new TypeError('The value "'+O+'" is invalid for argument "value"');for($=0;$<P-A;++$)this[$+A]=K[$%te];}return this};var R=/[^+/0-9A-Za-z-_]/g;function z(O){return O<16?"0"+O.toString(16):O.toString(16)}function U(O,A){var P;A=A||1/0;for(var W=O.length,Z=null,$=[],K=0;K<W;++K){if((P=O.charCodeAt(K))>55295&&P<57344){if(!Z){if(P>56319){(A-=3)>-1&&$.push(239,191,189);continue}if(K+1===W){(A-=3)>-1&&$.push(239,191,189);continue}Z=P;continue}if(P<56320){(A-=3)>-1&&$.push(239,191,189),Z=P;continue}P=65536+(Z-55296<<10|P-56320);}else Z&&(A-=3)>-1&&$.push(239,191,189);if(Z=null,P<128){if((A-=1)<0)break;$.push(P);}else if(P<2048){if((A-=2)<0)break;$.push(P>>6|192,63&P|128);}else if(P<65536){if((A-=3)<0)break;$.push(P>>12|224,P>>6&63|128,63&P|128);}else {if(!(P<1114112))throw new Error("Invalid code point");if((A-=4)<0)break;$.push(P>>18|240,P>>12&63|128,P>>6&63|128,63&P|128);}}return $}function H(O){return i.toByteArray((function(A){if((A=(A=A.split("=")[0]).trim().replace(R,"")).length<2)return "";for(;A.length%4!=0;)A+="=";return A})(O))}function q(O,A,P,W){for(var Z=0;Z<W&&!(Z+P>=A.length||Z>=O.length);++Z)A[Z+P]=O[Z];return Z}function N(O,A){return O instanceof A||O!=null&&O.constructor!=null&&O.constructor.name!=null&&O.constructor.name===A.name}function V(O){return O!=O}}).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,a=e("string_decoder").StringDecoder;function s(o){i.call(this),this.hashMode=typeof o=="string",this.hashMode?this[o]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null;}e("inherits")(s,i),s.prototype.update=function(o,l,f){typeof o=="string"&&(o=n.from(o,l));var u=this._update(o);return this.hashMode?this:(f&&(u=this._toString(u,f)),u)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(o,l,f){var u;try{this.hashMode?this._update(o):this.push(this._update(o));}catch(c){u=c;}finally{f(u);}},s.prototype._flush=function(o){var l;try{this.push(this.__final());}catch(f){l=f;}o(l);},s.prototype._finalOrDigest=function(o){var l=this.__final()||n.alloc(0);return o&&(l=this._toString(l,o,true)),l},s.prototype._toString=function(o,l,f){if(this._decoder||(this._decoder=new a(l),this._encoding=l),this._encoding!==l)throw new Error("can't switch encodings");var u=this._decoder.write(o);return f&&(u+=this._decoder.end()),u},t.exports=s;},{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"),a=TypeError;t.exports=function(s){if(n(s))return s;throw new a(i(s)+" 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"),a=TypeError;t.exports=function(s){if(n(s))return s;throw new a(i(s)+" 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,a=TypeError;t.exports=function(s){if(typeof s=="object"||n(s))return s;throw new a("Can't set "+i(s)+" as a prototype")};},{"../internals/is-callable":285}],225:[function(e,t,r){var n=e("../internals/well-known-symbol"),i=e("../internals/object-create"),a=e("../internals/object-define-property").f,s=n("unscopables"),o=Array.prototype;o[s]===void 0&&a(o,s,{configurable:true,value:i(null)}),t.exports=function(l){o[s][l]=true;};},{"../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(a,s){if(n(s,a))return a;throw new i("Incorrect invocation")};},{"../internals/object-is-prototype-of":314}],227:[function(e,t,r){var n=e("../internals/is-object"),i=String,a=TypeError;t.exports=function(s){if(n(s))return s;throw new a(i(s)+" 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"),a=e("../internals/length-of-array-like"),s=function(o){return function(l,f,u){var c,d=n(l),p=a(d),h=i(u,p);if(o&&f!=f){for(;p>h;)if((c=d[h++])!=c)return true}else for(;p>h;h++)if((o||h in d)&&d[h]===f)return o||h||0;return !o&&-1}};t.exports={includes:s(true),indexOf:s(false)};},{"../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"),a=e("../internals/indexed-object"),s=e("../internals/to-object"),o=e("../internals/length-of-array-like"),l=e("../internals/array-species-create"),f=i([].push),u=function(c){var d=c===1,p=c===2,h=c===3,m=c===4,g=c===6,v=c===7,w=c===5||g;return function(C,T,I,k){for(var D,j,F=s(C),B=a(F),E=n(T,I),M=o(B),L=0,b=k||l,y=d?b(C,M):p||v?b(C,0):void 0;M>L;L++)if((w||L in B)&&(j=E(D=B[L],L,F),c))if(d)y[L]=j;else if(j)switch(c){case 3:return true;case 5:return D;case 6:return L;case 2:f(y,D);}else switch(c){case 4:return false;case 7:f(y,D);}return g?-1:h||m?m:y}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(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"),a=e("../internals/create-property"),s=Array,o=Math.max;t.exports=function(l,f,u){for(var c=i(l),d=n(f,c),p=n(u===void 0?c:u,c),h=s(o(p-d,0)),m=0;d<p;d++,m++)a(h,m,l[d]);return h.length=m,h};},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(e,t,r){var n=e("../internals/function-uncurry-this");t.exports=n([].slice);},{"../internals/function-uncurry-this":268}],232:[function(e,t,r){var n=e("../internals/is-array"),i=e("../internals/is-constructor"),a=e("../internals/is-object"),s=e("../internals/well-known-symbol")("species"),o=Array;t.exports=function(l){var f;return n(l)&&(f=l.constructor,(i(f)&&(f===o||n(f.prototype))||a(f)&&(f=f[s])===null)&&(f=void 0)),f===void 0?o:f};},{"../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(i,a){return new(n(i))(a===0?0:a)};},{"../internals/array-species-constructor":232}],234:[function(e,t,r){var n=e("../internals/well-known-symbol")("iterator"),i=false;try{var a=0,s={next:function(){return {done:!!a++}},return:function(){i=!0;}};s[n]=function(){return this},Array.from(s,(function(){throw 2}));}catch{}t.exports=function(o,l){try{if(!l&&!i)return !1}catch{return false}var f=false;try{var u={};u[n]=function(){return {next:function(){return {done:f=!0}}}},o(u);}catch{}return f};},{"../internals/well-known-symbol":357}],235:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=n({}.toString),a=n("".slice);t.exports=function(s){return a(i(s),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"),a=e("../internals/classof-raw"),s=e("../internals/well-known-symbol")("toStringTag"),o=Object,l=a((function(){return arguments})())==="Arguments";t.exports=n?a:function(f){var u,c,d;return f===void 0?"Undefined":f===null?"Null":typeof(c=(function(p,h){try{return p[h]}catch{}})(u=o(f),s))=="string"?c:l?a(u):(d=a(u))==="Object"&&i(u.callee)?"Arguments":d};},{"../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"),a=e("../internals/object-get-own-property-descriptor"),s=e("../internals/object-define-property");t.exports=function(o,l,f){for(var u=i(l),c=s.f,d=a.f,p=0;p<u.length;p++){var h=u[p];n(o,h)||f&&n(f,h)||c(o,h,d(l,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(i){var a=/./;try{"/./"[i](a);}catch{try{return a[n]=!1,"/./"[i](a)}catch{}}return false};},{"../internals/well-known-symbol":357}],239:[function(e,t,r){var n=e("../internals/fails");t.exports=!n((function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}));},{"../internals/fails":260}],240:[function(e,t,r){t.exports=function(n,i){return {value:n,done:i}};},{}],241:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=n?function(s,o,l){return i.f(s,o,a(1,l))}:function(s,o,l){return s[o]=l,s};},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(e,t,r){t.exports=function(n,i){return {enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:i}};},{}],243:[function(e,t,r){var n=e("../internals/to-property-key"),i=e("../internals/object-define-property"),a=e("../internals/create-property-descriptor");t.exports=function(s,o,l){var f=n(o);f in s?i.f(s,f,a(0,l)):s[f]=l;};},{"../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(a,s,o){return o.get&&n(o.get,s,{getter:true}),o.set&&n(o.set,s,{setter:true}),i.f(a,s,o)};},{"../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"),a=e("../internals/make-built-in"),s=e("../internals/define-global-property");t.exports=function(o,l,f,u){u||(u={});var c=u.enumerable,d=u.name!==void 0?u.name:l;if(n(f)&&a(f,d,u),u.global)c?o[l]=f:s(l,f);else {try{u.unsafe?o[l]&&(c=!0):delete o[l];}catch{}c?o[l]=f:i.f(o,l,{value:f,enumerable:false,configurable:!u.nonConfigurable,writable:!u.nonWritable});}return o};},{"../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(a,s){try{i(n,a,{value:s,configurable:!0,writable:!0});}catch{n[a]=s;}return s};},{"../internals/global":274}],247:[function(e,t,r){var n=e("../internals/fails");t.exports=!n((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}));},{"../internals/fails":260}],248:[function(e,t,r){var n=typeof document=="object"&&document.all,i=n===void 0&&n!==void 0;t.exports={all:n,IS_HTMLDDA:i};},{}],249:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-object"),a=n.document,s=i(a)&&i(a.createElement);t.exports=function(o){return s?a.createElement(o):{}};},{"../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&&typeof window=="object"&&typeof document=="object";},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(e,t,r){t.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object";},{}],252:[function(e,t,r){var n=e("../internals/engine-user-agent");t.exports=/ipad|iphone|ipod/i.test(n)&&typeof Pebble<"u";},{"../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"),i=e("../internals/classof-raw");t.exports=i(n.process)==="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=typeof navigator<"u"&&String(navigator.userAgent)||"";},{}],257:[function(e,t,r){var n,i,a=e("../internals/global"),s=e("../internals/engine-user-agent"),o=a.process,l=a.Deno,f=o&&o.versions||l&&l.version,u=f&&f.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.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,a=e("../internals/create-non-enumerable-property"),s=e("../internals/define-built-in"),o=e("../internals/define-global-property"),l=e("../internals/copy-constructor-properties"),f=e("../internals/is-forced");t.exports=function(u,c){var d,p,h,m,g,v=u.target,w=u.global,C=u.stat;if(d=w?n:C?n[v]||o(v,{}):(n[v]||{}).prototype)for(p in c){if(m=c[p],h=u.dontCallGetSet?(g=i(d,p))&&g.value:d[p],!f(w?p:v+(C?".":"#")+p,u.forced)&&h!==void 0){if(typeof m==typeof h)continue;l(m,h);}(u.sham||h&&h.sham)&&a(m,"sham",true),s(d,p,m,u);}};},{"../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(n){try{return !!n()}catch{return true}};},{}],261:[function(e,t,r){var n=e("../internals/function-bind-native"),i=Function.prototype,a=i.apply,s=i.call;t.exports=typeof Reflect=="object"&&Reflect.apply||(n?s.bind(a):function(){return s.apply(a,arguments)});},{"../internals/function-bind-native":263}],262:[function(e,t,r){var n=e("../internals/function-uncurry-this-clause"),i=e("../internals/a-callable"),a=e("../internals/function-bind-native"),s=n(n.bind);t.exports=function(o,l){return i(o),l===void 0?o:a?s(o,l):function(){return o.apply(l,arguments)}};},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(e,t,r){var n=e("../internals/fails");t.exports=!n((function(){var i=function(){}.bind();return typeof i!="function"||i.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"),a=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,o=i(a,"name"),l=o&&function(){}.name==="something",f=o&&(!n||n&&s(a,"name").configurable);t.exports={EXISTS:o,PROPER:l,CONFIGURABLE:f};},{"../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(a,s,o){try{return n(i(Object.getOwnPropertyDescriptor(a,s)[o]))}catch{}};},{"../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(a){if(n(a)==="Function")return i(a)};},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(e,t,r){var n=e("../internals/function-bind-native"),i=Function.prototype,a=i.call,s=n&&i.bind.bind(a,a);t.exports=n?s:function(o){return function(){return a.apply(o,arguments)}};},{"../internals/function-bind-native":263}],269:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-callable"),a=function(s){return i(s)?s:void 0};t.exports=function(s,o){return arguments.length<2?a(n[s]):n[s]&&n[s][o]};},{"../internals/global":274,"../internals/is-callable":285}],270:[function(e,t,r){var n=e("../internals/classof"),i=e("../internals/get-method"),a=e("../internals/is-null-or-undefined"),s=e("../internals/iterators"),o=e("../internals/well-known-symbol")("iterator");t.exports=function(l){if(!a(l))return i(l,o)||i(l,"@@iterator")||s[n(l)]};},{"../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"),a=e("../internals/an-object"),s=e("../internals/try-to-string"),o=e("../internals/get-iterator-method"),l=TypeError;t.exports=function(f,u){var c=arguments.length<2?o(f):u;if(i(c))return a(n(c,f));throw new l(s(f)+" 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"),a=e("../internals/is-callable"),s=e("../internals/classof-raw"),o=e("../internals/to-string"),l=n([].push);t.exports=function(f){if(a(f))return f;if(i(f)){for(var u=f.length,c=[],d=0;d<u;d++){var p=f[d];typeof p=="string"?l(c,p):typeof p!="number"&&s(p)!=="Number"&&s(p)!=="String"||l(c,o(p));}var h=c.length,m=true;return function(g,v){if(m)return m=false,v;if(i(this))return v;for(var w=0;w<h;w++)if(c[w]===g)return v}}};},{"../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(a,s){var o=a[s];return i(o)?void 0:n(o)};},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(e,t,r){(function(n){(function(){var i=function(a){return a&&a.Math===Math&&a};t.exports=i(typeof globalThis=="object"&&globalThis)||i(typeof window=="object"&&window)||i(typeof self=="object"&&self)||i(typeof n=="object"&&n)||(function(){return this})()||this||Function("return this")();}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],275:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/to-object"),a=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(s,o){return a(i(s),o)};},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(e,t,r){t.exports={};},{}],277:[function(e,t,r){t.exports=function(n,i){try{arguments.length===1?console.error(n):console.error(n,i);}catch{}};},{}],278:[function(e,t,r){var n=e("../internals/get-built-in");t.exports=n("document","documentElement");},{"../internals/get-built-in":269}],279:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/fails"),a=e("../internals/document-create-element");t.exports=!n&&!i((function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!==7}));},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/classof-raw"),s=Object,o=n("".split);t.exports=i((function(){return !s("z").propertyIsEnumerable(0)}))?function(l){return a(l)==="String"?o(l,""):s(l)}:s;},{"../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"),a=e("../internals/shared-store"),s=n(Function.toString);i(a.inspectSource)||(a.inspectSource=function(o){return s(o)}),t.exports=a.inspectSource;},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(e,t,r){var n,i,a,s=e("../internals/weak-map-basic-detection"),o=e("../internals/global"),l=e("../internals/is-object"),f=e("../internals/create-non-enumerable-property"),u=e("../internals/has-own-property"),c=e("../internals/shared-store"),d=e("../internals/shared-key"),p=e("../internals/hidden-keys"),h=o.TypeError,m=o.WeakMap;if(s||c.state){var g=c.state||(c.state=new m);g.get=g.get,g.has=g.has,g.set=g.set,n=function(w,C){if(g.has(w))throw new h("Object already initialized");return C.facade=w,g.set(w,C),C},i=function(w){return g.get(w)||{}},a=function(w){return g.has(w)};}else {var v=d("state");p[v]=true,n=function(w,C){if(u(w,v))throw new h("Object already initialized");return C.facade=w,f(w,v,C),C},i=function(w){return u(w,v)?w[v]:{}},a=function(w){return u(w,v)};}t.exports={set:n,get:i,has:a,enforce:function(w){return a(w)?i(w):n(w,{})},getterFor:function(w){return function(C){var T;if(!l(C)||(T=i(C)).type!==w)throw new h("Incompatible receiver, "+w+" required");return T}}};},{"../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"),a=n("iterator"),s=Array.prototype;t.exports=function(o){return o!==void 0&&(i.Array===o||s[a]===o)};},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(e,t,r){var n=e("../internals/classof-raw");t.exports=Array.isArray||function(i){return n(i)==="Array"};},{"../internals/classof-raw":235}],285:[function(e,t,r){var n=e("../internals/document-all"),i=n.all;t.exports=n.IS_HTMLDDA?function(a){return typeof a=="function"||a===i}:function(a){return typeof a=="function"};},{"../internals/document-all":248}],286:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/is-callable"),s=e("../internals/classof"),o=e("../internals/get-built-in"),l=e("../internals/inspect-source"),f=function(){},u=[],c=o("Reflect","construct"),d=/^\s*(?:class|function)\b/,p=n(d.exec),h=!d.test(f),m=function(v){if(!a(v))return false;try{return c(f,u,v),!0}catch{return false}},g=function(v){if(!a(v))return false;switch(s(v)){case "AsyncFunction":case "GeneratorFunction":case "AsyncGeneratorFunction":return false}try{return h||!!p(d,l(v))}catch{return true}};g.sham=true,t.exports=!c||i((function(){var v;return m(m.call)||!m(Object)||!m((function(){v=true;}))||v}))?g: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"),a=/#|\.prototype\./,s=function(c,d){var p=l[o(c)];return p===u||p!==f&&(i(d)?n(d):!!d)},o=s.normalize=function(c){return String(c).replace(a,".").toLowerCase()},l=s.data={},f=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s;},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(e,t,r){t.exports=function(n){return n==null};},{}],289:[function(e,t,r){var n=e("../internals/is-callable"),i=e("../internals/document-all"),a=i.all;t.exports=i.IS_HTMLDDA?function(s){return typeof s=="object"?s!==null:n(s)||s===a}:function(s){return typeof s=="object"?s!==null:n(s)};},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(e,t,r){t.exports=false;},{}],291:[function(e,t,r){var n=e("../internals/is-object"),i=e("../internals/classof-raw"),a=e("../internals/well-known-symbol")("match");t.exports=function(s){var o;return n(s)&&((o=s[a])!==void 0?!!o:i(s)==="RegExp")};},{"../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"),a=e("../internals/object-is-prototype-of"),s=e("../internals/use-symbol-as-uid"),o=Object;t.exports=s?function(l){return typeof l=="symbol"}:function(l){var f=n("Symbol");return i(f)&&a(f.prototype,o(l))};},{"../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"),a=e("../internals/an-object"),s=e("../internals/try-to-string"),o=e("../internals/is-array-iterator-method"),l=e("../internals/length-of-array-like"),f=e("../internals/object-is-prototype-of"),u=e("../internals/get-iterator"),c=e("../internals/get-iterator-method"),d=e("../internals/iterator-close"),p=TypeError,h=function(g,v){this.stopped=g,this.result=v;},m=h.prototype;t.exports=function(g,v,w){var C,T,I,k,D,j,F,B=w&&w.that,E=!(!w||!w.AS_ENTRIES),M=!(!w||!w.IS_RECORD),L=!(!w||!w.IS_ITERATOR),b=!(!w||!w.INTERRUPTED),y=n(v,B),x=function(S){return C&&d(C,"normal",S),new h(true,S)},_=function(S){return E?(a(S),b?y(S[0],S[1],x):y(S[0],S[1])):b?y(S,x):y(S)};if(M)C=g.iterator;else if(L)C=g;else {if(!(T=c(g)))throw new p(s(g)+" is not iterable");if(o(T)){for(I=0,k=l(g);k>I;I++)if((D=_(g[I]))&&f(m,D))return D;return new h(false)}C=u(g,T);}for(j=M?g.next:C.next;!(F=i(j,C)).done;){try{D=_(F.value);}catch(S){d(C,"throw",S);}if(typeof D=="object"&&D&&f(m,D))return D}return new h(false)};},{"../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"),a=e("../internals/get-method");t.exports=function(s,o,l){var f,u;i(s);try{if(!(f=a(s,"return"))){if(o==="throw")throw l;return l}f=n(f,s);}catch(c){u=true,f=c;}if(o==="throw")throw l;if(u)throw f;return i(f),l};},{"../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"),a=e("../internals/create-property-descriptor"),s=e("../internals/set-to-string-tag"),o=e("../internals/iterators"),l=function(){return this};t.exports=function(f,u,c,d){var p=u+" Iterator";return f.prototype=i(n,{next:a(+!d,c)}),s(f,p,false,true),o[p]=l,f};},{"../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"),a=e("../internals/is-pure"),s=e("../internals/function-name"),o=e("../internals/is-callable"),l=e("../internals/iterator-create-constructor"),f=e("../internals/object-get-prototype-of"),u=e("../internals/object-set-prototype-of"),c=e("../internals/set-to-string-tag"),d=e("../internals/create-non-enumerable-property"),p=e("../internals/define-built-in"),h=e("../internals/well-known-symbol"),m=e("../internals/iterators"),g=e("../internals/iterators-core"),v=s.PROPER,w=s.CONFIGURABLE,C=g.IteratorPrototype,T=g.BUGGY_SAFARI_ITERATORS,I=h("iterator"),k=function(){return this};t.exports=function(D,j,F,B,E,M,L){l(F,j,B);var b,y,x,_=function(N){if(N===E&&H)return H;if(!T&&N&&N in z)return z[N];switch(N){case "keys":case "values":case "entries":return function(){return new F(this,N)}}return function(){return new F(this)}},S=j+" Iterator",R=false,z=D.prototype,U=z[I]||z["@@iterator"]||E&&z[E],H=!T&&U||_(E),q=j==="Array"&&z.entries||U;if(q&&(b=f(q.call(new D)))!==Object.prototype&&b.next&&(a||f(b)===C||(u?u(b,C):o(b[I])||p(b,I,k)),c(b,S,true,true),a&&(m[S]=k)),v&&E==="values"&&U&&U.name!=="values"&&(!a&&w?d(z,"name","values"):(R=true,H=function(){return i(U,this)})),E)if(y={values:_("values"),keys:M?H:_("keys"),entries:_("entries")},L)for(x in y)(T||R||!(x in z))&&p(z,x,y[x]);else n({target:j,proto:true,forced:T||R},y);return a&&!L||z[I]===H||p(z,I,H,{name:E}),m[j]=H,y};},{"../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,a,s=e("../internals/fails"),o=e("../internals/is-callable"),l=e("../internals/is-object"),f=e("../internals/object-create"),u=e("../internals/object-get-prototype-of"),c=e("../internals/define-built-in"),d=e("../internals/well-known-symbol"),p=e("../internals/is-pure"),h=d("iterator"),m=false;[].keys&&("next"in(a=[].keys())?(i=u(u(a)))!==Object.prototype&&(n=i):m=true),!l(n)||s((function(){var g={};return n[h].call(g)!==g}))?n={}:p&&(n=f(n)),o(n[h])||c(n,h,(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(i){return n(i.length)};},{"../internals/to-length":343}],300:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/fails"),a=e("../internals/is-callable"),s=e("../internals/has-own-property"),o=e("../internals/descriptors"),l=e("../internals/function-name").CONFIGURABLE,f=e("../internals/inspect-source"),u=e("../internals/internal-state"),c=u.enforce,d=u.get,p=String,h=Object.defineProperty,m=n("".slice),g=n("".replace),v=n([].join),w=o&&!i((function(){return h((function(){}),"length",{value:8}).length!==8})),C=String(String).split("String"),T=t.exports=function(I,k,D){m(p(k),0,7)==="Symbol("&&(k="["+g(p(k),/^Symbol\(([^)]*)\)/,"$1")+"]"),D&&D.getter&&(k="get "+k),D&&D.setter&&(k="set "+k),(!s(I,"name")||l&&I.name!==k)&&(o?h(I,"name",{value:k,configurable:true}):I.name=k),w&&D&&s(D,"arity")&&I.length!==D.arity&&h(I,"length",{value:D.arity});try{D&&s(D,"constructor")&&D.constructor?o&&h(I,"prototype",{writable:!1}):I.prototype&&(I.prototype=void 0);}catch{}var j=c(I);return s(j,"source")||(j.source=v(C,typeof k=="string"?k:"")),I};Function.prototype.toString=T((function(){return a(this)&&d(this).source||f(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(a){var s=+a;return (s>0?i:n)(s)};},{}],302:[function(e,t,r){var n,i,a,s,o,l=e("../internals/global"),f=e("../internals/function-bind-context"),u=e("../internals/object-get-own-property-descriptor").f,c=e("../internals/task").set,d=e("../internals/queue"),p=e("../internals/engine-is-ios"),h=e("../internals/engine-is-ios-pebble"),m=e("../internals/engine-is-webos-webkit"),g=e("../internals/engine-is-node"),v=l.MutationObserver||l.WebKitMutationObserver,w=l.document,C=l.process,T=l.Promise,I=u(l,"queueMicrotask"),k=I&&I.value;if(!k){var D=new d,j=function(){var F,B;for(g&&(F=C.domain)&&F.exit();B=D.get();)try{B();}catch(E){throw D.head&&n(),E}F&&F.enter();};p||g||m||!v||!w?!h&&T&&T.resolve?((s=T.resolve(void 0)).constructor=T,o=f(s.then,s),n=function(){o(j);}):g?n=function(){C.nextTick(j);}:(c=f(c,l),n=function(){c(j);}):(i=true,a=w.createTextNode(""),new v(j).observe(a,{characterData:true}),n=function(){a.data=i=!i;}),k=function(F){D.head||n(),D.add(F);};}t.exports=k;},{"../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,a=function(s){var o,l;this.promise=new s((function(f,u){if(o!==void 0||l!==void 0)throw new i("Bad Promise constructor");o=f,l=u;})),this.resolve=n(o),this.reject=n(l);};t.exports.f=function(s){return new a(s)};},{"../internals/a-callable":222}],304:[function(e,t,r){var n=e("../internals/is-regexp"),i=TypeError;t.exports=function(a){if(n(a))throw new i("The method doesn't accept regular expressions");return a};},{"../internals/is-regexp":291}],305:[function(e,t,r){var n=e("../internals/descriptors"),i=e("../internals/function-uncurry-this"),a=e("../internals/function-call"),s=e("../internals/fails"),o=e("../internals/object-keys"),l=e("../internals/object-get-own-property-symbols"),f=e("../internals/object-property-is-enumerable"),u=e("../internals/to-object"),c=e("../internals/indexed-object"),d=Object.assign,p=Object.defineProperty,h=i([].concat);t.exports=!d||s((function(){if(n&&d({b:1},d(p({},"a",{enumerable:true,get:function(){p(this,"b",{value:3,enumerable:false});}}),{b:2})).b!==1)return true;var m={},g={},v=Symbol("assign detection");return m[v]=7,"abcdefghijklmnopqrst".split("").forEach((function(w){g[w]=w;})),d({},m)[v]!==7||o(d({},g)).join("")!=="abcdefghijklmnopqrst"}))?function(m,g){for(var v=u(m),w=arguments.length,C=1,T=l.f,I=f.f;w>C;)for(var k,D=c(arguments[C++]),j=T?h(o(D),T(D)):o(D),F=j.length,B=0;F>B;)k=j[B++],n&&!a(I,D,k)||(v[k]=D[k]);return v}:d;},{"../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"),a=e("../internals/object-define-properties"),s=e("../internals/enum-bug-keys"),o=e("../internals/hidden-keys"),l=e("../internals/html"),f=e("../internals/document-create-element"),u=e("../internals/shared-key"),c=u("IE_PROTO"),d=function(){},p=function(g){return "<script>"+g+"<\/script>"},h=function(g){g.write(p("")),g.close();var v=g.parentWindow.Object;return g=null,v},m=function(){try{n=new ActiveXObject("htmlfile");}catch{}var g,v;m=typeof document<"u"?document.domain&&n?h(n):((v=f("iframe")).style.display="none",l.appendChild(v),v.src="javascript:",(g=v.contentWindow.document).open(),g.write(p("document.F=Object")),g.close(),g.F):h(n);for(var w=s.length;w--;)delete m.prototype[s[w]];return m()};o[c]=true,t.exports=Object.create||function(g,v){var w;return g!==null?(d.prototype=i(g),w=new d,d.prototype=null,w[c]=g):w=m(),v===void 0?w:a.f(w,v)};},{"../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"),a=e("../internals/object-define-property"),s=e("../internals/an-object"),o=e("../internals/to-indexed-object"),l=e("../internals/object-keys");r.f=n&&!i?Object.defineProperties:function(f,u){s(f);for(var c,d=o(u),p=l(u),h=p.length,m=0;h>m;)a.f(f,c=p[m++],d[c]);return f};},{"../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"),a=e("../internals/v8-prototype-define-bug"),s=e("../internals/an-object"),o=e("../internals/to-property-key"),l=TypeError,f=Object.defineProperty,u=Object.getOwnPropertyDescriptor;r.f=n?a?function(c,d,p){if(s(c),d=o(d),s(p),typeof c=="function"&&d==="prototype"&&"value"in p&&"writable"in p&&!p.writable){var h=u(c,d);h&&h.writable&&(c[d]=p.value,p={configurable:"configurable"in p?p.configurable:h.configurable,enumerable:"enumerable"in p?p.enumerable:h.enumerable,writable:false});}return f(c,d,p)}:f:function(c,d,p){if(s(c),d=o(d),s(p),i)try{return f(c,d,p)}catch{}if("get"in p||"set"in p)throw new l("Accessors not supported");return "value"in p&&(c[d]=p.value),c};},{"../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"),a=e("../internals/object-property-is-enumerable"),s=e("../internals/create-property-descriptor"),o=e("../internals/to-indexed-object"),l=e("../internals/to-property-key"),f=e("../internals/has-own-property"),u=e("../internals/ie8-dom-define"),c=Object.getOwnPropertyDescriptor;r.f=n?c:function(d,p){if(d=o(d),p=l(p),u)try{return c(d,p)}catch{}if(f(d,p))return s(!i(a.f,d,p),d[p])};},{"../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"),a=e("../internals/object-get-own-property-names").f,s=e("../internals/array-slice-simple"),o=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(l){return o&&n(l)==="Window"?(function(f){try{return a(f)}catch{return s(o)}})(l):a(i(l))};},{"../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(a){return n(a,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"),a=e("../internals/to-object"),s=e("../internals/shared-key"),o=e("../internals/correct-prototype-getter"),l=s("IE_PROTO"),f=Object,u=f.prototype;t.exports=o?f.getPrototypeOf:function(c){var d=a(c);if(n(d,l))return d[l];var p=d.constructor;return i(p)&&d instanceof p?p.prototype:d instanceof f?u: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){var n=e("../internals/function-uncurry-this");t.exports=n({}.isPrototypeOf);},{"../internals/function-uncurry-this":268}],315:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=e("../internals/has-own-property"),a=e("../internals/to-indexed-object"),s=e("../internals/array-includes").indexOf,o=e("../internals/hidden-keys"),l=n([].push);t.exports=function(f,u){var c,d=a(f),p=0,h=[];for(c in d)!i(o,c)&&i(d,c)&&l(h,c);for(;u.length>p;)i(d,c=u[p++])&&(~s(h,c)||l(h,c));return h};},{"../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(a){return n(a,i)};},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(e,t,r){var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);r.f=a?function(s){var o=i(this,s);return !!o&&o.enumerable}:n;},{}],318:[function(e,t,r){var n=e("../internals/function-uncurry-this-accessor"),i=e("../internals/an-object"),a=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var s,o=false,l={};try{(s=n(Object.prototype,"__proto__","set"))(l,[]),o=l instanceof Array;}catch{}return function(f,u){return i(f),a(u),o?s(f,u):f.__proto__=u,f}})():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"),a=e("../internals/function-uncurry-this"),s=e("../internals/object-get-prototype-of"),o=e("../internals/object-keys"),l=e("../internals/to-indexed-object"),f=a(e("../internals/object-property-is-enumerable").f),u=a([].push),c=n&&i((function(){var p=Object.create(null);return p[2]=2,!f(p,2)})),d=function(p){return function(h){for(var m,g=l(h),v=o(g),w=c&&s(g)===null,C=v.length,T=0,I=[];C>T;)m=v[T++],n&&!(w?m in g:f(g,m))||u(I,p?[m,g[m]]:g[m]);return I}};t.exports={entries:d(true),values:d(false)};},{"../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"),a=e("../internals/is-object"),s=TypeError;t.exports=function(o,l){var f,u;if(l==="string"&&i(f=o.toString)&&!a(u=n(f,o))||i(f=o.valueOf)&&!a(u=n(f,o))||l!=="string"&&i(f=o.toString)&&!a(u=n(f,o)))return u;throw new s("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"),a=e("../internals/object-get-own-property-names"),s=e("../internals/object-get-own-property-symbols"),o=e("../internals/an-object"),l=i([].concat);t.exports=n("Reflect","ownKeys")||function(f){var u=a.f(o(f)),c=s.f;return c?l(u,c(f)):u};},{"../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){var n=e("../internals/global");t.exports=n;},{"../internals/global":274}],323:[function(e,t,r){t.exports=function(n){try{return {error:!1,value:n()}}catch(i){return {error:true,value:i}}};},{}],324:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/promise-native-constructor"),a=e("../internals/is-callable"),s=e("../internals/is-forced"),o=e("../internals/inspect-source"),l=e("../internals/well-known-symbol"),f=e("../internals/engine-is-browser"),u=e("../internals/engine-is-deno"),c=e("../internals/is-pure"),d=e("../internals/engine-v8-version"),p=i&&i.prototype,h=l("species"),m=false,g=a(n.PromiseRejectionEvent),v=s("Promise",(function(){var w=o(i),C=w!==String(i);if(!C&&d===66||c&&(!p.catch||!p.finally))return true;if(!d||d<51||!/native code/.test(w)){var T=new i((function(k){k(1);})),I=function(k){k((function(){}),(function(){}));};if((T.constructor={})[h]=I,!(m=T.then((function(){}))instanceof I))return true}return !C&&(f||u)&&!g}));t.exports={CONSTRUCTOR:v,REJECTION_EVENT:g,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){var n=e("../internals/global");t.exports=n.Promise;},{"../internals/global":274}],326:[function(e,t,r){var n=e("../internals/an-object"),i=e("../internals/is-object"),a=e("../internals/new-promise-capability");t.exports=function(s,o){if(n(s),i(o)&&o.constructor===s)return o;var l=a.f(s);return (0, l.resolve)(o),l.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"),a=e("../internals/promise-constructor-detection").CONSTRUCTOR;t.exports=a||!i((function(s){n.all(s).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(i){var a={item:i,next:null},s=this.tail;s?s.next=a:this.head=a,this.tail=a;},get:function(){var i=this.head;if(i)return (this.head=i.next)===null&&(this.tail=null),i.item}},t.exports=n;},{}],329:[function(e,t,r){var n=e("../internals/is-null-or-undefined"),i=TypeError;t.exports=function(a){if(n(a))throw new i("Can't call method on "+a);return a};},{"../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"),a=e("../internals/well-known-symbol"),s=e("../internals/descriptors"),o=a("species");t.exports=function(l){var f=n(l);s&&f&&!f[o]&&i(f,o,{configurable:true,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"),a=e("../internals/well-known-symbol")("toStringTag");t.exports=function(s,o,l){s&&!l&&(s=s.prototype),s&&!i(s,a)&&n(s,a,{configurable:true,value:o});};},{"../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"),a=n("keys");t.exports=function(s){return a[s]||(a[s]=i(s))};},{"../internals/shared":334,"../internals/uid":350}],333:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/define-global-property"),a=n["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=a;},{"../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(a,s){return i[a]||(i[a]=s!==void 0?s:{})})("versions",[]).push({version:"3.33.0",mode:n?"pure":"global",copyright:"\xA9 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"),a=e("../internals/is-null-or-undefined"),s=e("../internals/well-known-symbol")("species");t.exports=function(o,l){var f,u=n(o).constructor;return u===void 0||a(f=n(u)[s])?l:i(f)};},{"../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"),a=e("../internals/global").String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var s=Symbol("symbol detection");return !a(s)||!(Object(s)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"),a=e("../internals/well-known-symbol"),s=e("../internals/define-built-in");t.exports=function(){var o=i("Symbol"),l=o&&o.prototype,f=l&&l.valueOf,u=a("toPrimitive");l&&!l[u]&&s(l,u,(function(c){return n(f,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){var n=e("../internals/symbol-constructor-detection");t.exports=n&&!!Symbol.for&&!!Symbol.keyFor;},{"../internals/symbol-constructor-detection":336}],339:[function(e,t,r){var n,i,a,s,o=e("../internals/global"),l=e("../internals/function-apply"),f=e("../internals/function-bind-context"),u=e("../internals/is-callable"),c=e("../internals/has-own-property"),d=e("../internals/fails"),p=e("../internals/html"),h=e("../internals/array-slice"),m=e("../internals/document-create-element"),g=e("../internals/validate-arguments-length"),v=e("../internals/engine-is-ios"),w=e("../internals/engine-is-node"),C=o.setImmediate,T=o.clearImmediate,I=o.process,k=o.Dispatch,D=o.Function,j=o.MessageChannel,F=o.String,B=0,E={};d((function(){n=o.location;}));var M=function(x){if(c(E,x)){var _=E[x];delete E[x],_();}},L=function(x){return function(){M(x);}},b=function(x){M(x.data);},y=function(x){o.postMessage(F(x),n.protocol+"//"+n.host);};C&&T||(C=function(x){g(arguments.length,1);var _=u(x)?x:D(x),S=h(arguments,1);return E[++B]=function(){l(_,void 0,S);},i(B),B},T=function(x){delete E[x];},w?i=function(x){I.nextTick(L(x));}:k&&k.now?i=function(x){k.now(L(x));}:j&&!v?(s=(a=new j).port2,a.port1.onmessage=b,i=f(s.postMessage,s)):o.addEventListener&&u(o.postMessage)&&!o.importScripts&&n&&n.protocol!=="file:"&&!d(y)?(i=y,o.addEventListener("message",b,false)):i="onreadystatechange"in m("script")?function(x){p.appendChild(m("script")).onreadystatechange=function(){p.removeChild(this),M(x);};}:function(x){setTimeout(L(x),0);}),t.exports={set:C,clear:T};},{"../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,a=Math.min;t.exports=function(s,o){var l=n(s);return l<0?i(l+o,0):a(l,o)};},{"../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(a){return n(i(a))};},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(e,t,r){var n=e("../internals/math-trunc");t.exports=function(i){var a=+i;return a!=a||a===0?0:n(a)};},{"../internals/math-trunc":301}],343:[function(e,t,r){var n=e("../internals/to-integer-or-infinity"),i=Math.min;t.exports=function(a){return a>0?i(n(a),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(a){return i(n(a))};},{"../internals/require-object-coercible":329}],345:[function(e,t,r){var n=e("../internals/function-call"),i=e("../internals/is-object"),a=e("../internals/is-symbol"),s=e("../internals/get-method"),o=e("../internals/ordinary-to-primitive"),l=e("../internals/well-known-symbol"),f=TypeError,u=l("toPrimitive");t.exports=function(c,d){if(!i(c)||a(c))return c;var p,h=s(c,u);if(h){if(d===void 0&&(d="default"),p=n(h,c,d),!i(p)||a(p))return p;throw new f("Can't convert object to primitive value")}return d===void 0&&(d="number"),o(c,d)};},{"../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(a){var s=n(a,"string");return i(s)?s:s+""};},{"../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=String(n)==="[object z]";},{"../internals/well-known-symbol":357}],348:[function(e,t,r){var n=e("../internals/classof"),i=String;t.exports=function(a){if(n(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return i(a)};},{"../internals/classof":236}],349:[function(e,t,r){var n=String;t.exports=function(i){try{return n(i)}catch{return "Object"}};},{}],350:[function(e,t,r){var n=e("../internals/function-uncurry-this"),i=0,a=Math.random(),s=n(1 .toString);t.exports=function(o){return "Symbol("+(o===void 0?"":o)+")_"+s(++i+a,36)};},{"../internals/function-uncurry-this":268}],351:[function(e,t,r){var n=e("../internals/symbol-constructor-detection");t.exports=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol";},{"../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 Object.defineProperty((function(){}),"prototype",{value:42,writable:false}).prototype!==42}));},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(e,t,r){var n=TypeError;t.exports=function(i,a){if(i<a)throw new n("Not enough arguments");return i};},{}],354:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/is-callable"),a=n.WeakMap;t.exports=i(a)&&/native code/.test(String(a));},{"../internals/global":274,"../internals/is-callable":285}],355:[function(e,t,r){var n=e("../internals/path"),i=e("../internals/has-own-property"),a=e("../internals/well-known-symbol-wrapped"),s=e("../internals/object-define-property").f;t.exports=function(o){var l=n.Symbol||(n.Symbol={});i(l,o)||s(l,o,{value:a.f(o)});};},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(e,t,r){var n=e("../internals/well-known-symbol");r.f=n;},{"../internals/well-known-symbol":357}],357:[function(e,t,r){var n=e("../internals/global"),i=e("../internals/shared"),a=e("../internals/has-own-property"),s=e("../internals/uid"),o=e("../internals/symbol-constructor-detection"),l=e("../internals/use-symbol-as-uid"),f=n.Symbol,u=i("wks"),c=l?f.for||f:f&&f.withoutSetter||s;t.exports=function(d){return a(u,d)||(u[d]=o&&a(f,d)?f[d]:c("Symbol."+d)),u[d]};},{"../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,a=e("../internals/add-to-unscopables"),s=true;"findIndex"in[]&&Array(1).findIndex((function(){s=false;})),n({target:"Array",proto:true,forced:s},{findIndex:function(o){return i(this,o,arguments.length>1?arguments[1]:void 0)}}),a("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,a=e("../internals/add-to-unscopables"),s=true;"find"in[]&&Array(1).find((function(){s=false;})),n({target:"Array",proto:true,forced:s},{find:function(o){return i(this,o,arguments.length>1?arguments[1]:void 0)}}),a("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,a=e("../internals/fails"),s=e("../internals/add-to-unscopables");n({target:"Array",proto:true,forced:a((function(){return !Array(1).includes()}))},{includes:function(o){return i(this,o,arguments.length>1?arguments[1]:void 0)}}),s("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"),a=e("../internals/iterators"),s=e("../internals/internal-state"),o=e("../internals/object-define-property").f,l=e("../internals/iterator-define"),f=e("../internals/create-iter-result-object"),u=e("../internals/is-pure"),c=e("../internals/descriptors"),d=s.set,p=s.getterFor("Array Iterator");t.exports=l(Array,"Array",(function(m,g){d(this,{type:"Array Iterator",target:n(m),index:0,kind:g});}),(function(){var m=p(this),g=m.target,v=m.kind,w=m.index++;if(!g||w>=g.length)return m.target=void 0,f(void 0,true);switch(v){case "keys":return f(w,false);case "values":return f(g[w],false)}return f([w,g[w]],false)}),"values");var h=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!u&&c&&h.name!=="values")try{o(h,"name",{value:"values"});}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/get-built-in"),a=e("../internals/function-apply"),s=e("../internals/function-call"),o=e("../internals/function-uncurry-this"),l=e("../internals/fails"),f=e("../internals/is-callable"),u=e("../internals/is-symbol"),c=e("../internals/array-slice"),d=e("../internals/get-json-replacer-function"),p=e("../internals/symbol-constructor-detection"),h=String,m=i("JSON","stringify"),g=o(/./.exec),v=o("".charAt),w=o("".charCodeAt),C=o("".replace),T=o(1 .toString),I=/[\uD800-\uDFFF]/g,k=/^[\uD800-\uDBFF]$/,D=/^[\uDC00-\uDFFF]$/,j=!p||l((function(){var M=i("Symbol")("stringify detection");return m([M])!=="[null]"||m({a:M})!=="{}"||m(Object(M))!=="{}"})),F=l((function(){return m("\uDF06\uD834")!=='"\\udf06\\ud834"'||m("\uDEAD")!=='"\\udead"'})),B=function(M,L){var b=c(arguments),y=d(L);if(f(y)||M!==void 0&&!u(M))return b[1]=function(x,_){if(f(y)&&(_=s(y,this,h(x),_)),!u(_))return _},a(m,null,b)},E=function(M,L,b){var y=v(b,L-1),x=v(b,L+1);return g(k,M)&&!g(D,x)||g(D,M)&&!g(k,y)?"\\u"+T(w(M,0),16):M};m&&n({target:"JSON",stat:true,arity:3,forced:j||F},{stringify:function(M,L,b){var y=c(arguments),x=a(j?B:m,null,y);return F&&typeof x=="string"?C(x,I,E):x}});},{"../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:true},{isNaN:function(n){return n!=n}});},{"../internals/export":259}],364:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/object-assign");n({target:"Object",stat:true,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"),a=e("../internals/fails"),s=e("../internals/object-get-own-property-symbols"),o=e("../internals/to-object");n({target:"Object",stat:true,forced:!i||a((function(){s.f(1);}))},{getOwnPropertySymbols:function(l){var f=s.f;return f?f(o(l)):[]}});},{"../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"),a=e("../internals/object-keys");n({target:"Object",stat:true,forced:e("../internals/fails")((function(){a(1);}))},{keys:function(s){return a(i(s))}});},{"../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:true},{values:function(a){return i(a)}});},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(e,t,r){var n=e("../internals/export"),i=e("../internals/function-call"),a=e("../internals/a-callable"),s=e("../internals/new-promise-capability"),o=e("../internals/perform"),l=e("../internals/iterate");n({target:"Promise",stat:true,forced:e("../internals/promise-statics-incorrect-iteration")},{all:function(f){var u=this,c=s.f(u),d=c.resolve,p=c.reject,h=o((function(){var m=a(u.resolve),g=[],v=0,w=1;l(f,(function(C){var T=v++,I=false;w++,i(m,u,C).then((function(k){I||(I=true,g[T]=k,--w||d(g));}),p);})),--w||d(g);}));return h.error&&p(h.value),c.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"),a=e("../internals/promise-constructor-detection").CONSTRUCTOR,s=e("../internals/promise-native-constructor"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),f=e("../internals/define-built-in"),u=s&&s.prototype;if(n({target:"Promise",proto:true,forced:a,real:true},{catch:function(d){return this.then(void 0,d)}}),!i&&l(s)){var c=o("Promise").prototype.catch;u.catch!==c&&f(u,"catch",c,{unsafe:true});}},{"../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,a,s=e("../internals/export"),o=e("../internals/is-pure"),l=e("../internals/engine-is-node"),f=e("../internals/global"),u=e("../internals/function-call"),c=e("../internals/define-built-in"),d=e("../internals/object-set-prototype-of"),p=e("../internals/set-to-string-tag"),h=e("../internals/set-species"),m=e("../internals/a-callable"),g=e("../internals/is-callable"),v=e("../internals/is-object"),w=e("../internals/an-instance"),C=e("../internals/species-constructor"),T=e("../internals/task").set,I=e("../internals/microtask"),k=e("../internals/host-report-errors"),D=e("../internals/perform"),j=e("../internals/queue"),F=e("../internals/internal-state"),B=e("../internals/promise-native-constructor"),E=e("../internals/promise-constructor-detection"),M=e("../internals/new-promise-capability"),L=E.CONSTRUCTOR,b=E.REJECTION_EVENT,y=E.SUBCLASSING,x=F.getterFor("Promise"),_=F.set,S=B&&B.prototype,R=B,z=S,U=f.TypeError,H=f.document,q=f.process,N=M.f,V=N,O=!!(H&&H.createEvent&&f.dispatchEvent),A=function(re){var ie;return !(!v(re)||!g(ie=re.then))&&ie},P=function(re,ie){var oe,se,le,ge=ie.value,he=ie.state===1,be=he?re.ok:re.fail,Me=re.resolve,ye=re.reject,Se=re.domain;try{be?(he||(ie.rejection===2&&te(ie),ie.rejection=1),be===!0?oe=ge:(Se&&Se.enter(),oe=be(ge),Se&&(Se.exit(),le=!0)),oe===re.promise?ye(new U("Promise-chain cycle")):(se=A(oe))?u(se,oe,Me,ye):Me(oe)):ye(ge);}catch(We){Se&&!le&&Se.exit(),ye(We);}},W=function(re,ie){re.notified||(re.notified=true,I((function(){for(var oe,se=re.reactions;oe=se.get();)P(oe,re);re.notified=false,ie&&!re.rejection&&$(re);})));},Z=function(re,ie,oe){var se,le;O?((se=H.createEvent("Event")).promise=ie,se.reason=oe,se.initEvent(re,false,true),f.dispatchEvent(se)):se={promise:ie,reason:oe},!b&&(le=f["on"+re])?le(se):re==="unhandledrejection"&&k("Unhandled promise rejection",oe);},$=function(re){u(T,f,(function(){var ie,oe=re.facade,se=re.value;if(K(re)&&(ie=D((function(){l?q.emit("unhandledRejection",se,oe):Z("unhandledrejection",oe,se);})),re.rejection=l||K(re)?2:1,ie.error))throw ie.value}));},K=function(re){return re.rejection!==1&&!re.parent},te=function(re){u(T,f,(function(){var ie=re.facade;l?q.emit("rejectionHandled",ie):Z("rejectionhandled",ie,re.value);}));},J=function(re,ie,oe){return function(se){re(ie,se,oe);}},Y=function(re,ie,oe){re.done||(re.done=true,oe&&(re=oe),re.value=ie,re.state=2,W(re,true));},ne=function(re,ie,oe){if(!re.done){re.done=true,oe&&(re=oe);try{if(re.facade===ie)throw new U("Promise can't be resolved itself");var se=A(ie);se?I((function(){var le={done:!1};try{u(se,ie,J(ne,le,re),J(Y,le,re));}catch(ge){Y(le,ge,re);}})):(re.value=ie,re.state=1,W(re,!1));}catch(le){Y({done:false},le,re);}}};if(L&&(z=(R=function(re){w(this,z),m(re),u(n,this);var ie=x(this);try{re(J(ne,ie),J(Y,ie));}catch(oe){Y(ie,oe);}}).prototype,(n=function(re){_(this,{type:"Promise",done:false,notified:false,parent:false,reactions:new j,rejection:false,state:0,value:void 0});}).prototype=c(z,"then",(function(re,ie){var oe=x(this),se=N(C(this,R));return oe.parent=true,se.ok=!g(re)||re,se.fail=g(ie)&&ie,se.domain=l?q.domain:void 0,oe.state===0?oe.reactions.add(se):I((function(){P(se,oe);})),se.promise})),i=function(){var re=new n,ie=x(re);this.promise=re,this.resolve=J(ne,ie),this.reject=J(Y,ie);},M.f=N=function(re){return re===R||re===void 0?new i(re):V(re)},!o&&g(B)&&S!==Object.prototype)){a=S.then,y||c(S,"then",(function(re,ie){var oe=this;return new R((function(se,le){u(a,oe,se,le);})).then(re,ie)}),{unsafe:true});try{delete S.constructor;}catch{}d&&d(S,z);}s({global:true,constructor:true,wrap:true,forced:L},{Promise:R}),p(R,"Promise",false,true),h("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"),a=e("../internals/promise-native-constructor"),s=e("../internals/fails"),o=e("../internals/get-built-in"),l=e("../internals/is-callable"),f=e("../internals/species-constructor"),u=e("../internals/promise-resolve"),c=e("../internals/define-built-in"),d=a&&a.prototype;if(n({target:"Promise",proto:true,real:true,forced:!!a&&s((function(){d.finally.call({then:function(){}},(function(){}));}))},{finally:function(h){var m=f(this,o("Promise")),g=l(h);return this.then(g?function(v){return u(m,h()).then((function(){return v}))}:h,g?function(v){return u(m,h()).then((function(){throw v}))}:h)}}),!i&&l(a)){var p=o("Promise").prototype.finally;d.finally!==p&&c(d,"finally",p,{unsafe:true});}},{"../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"),a=e("../internals/a-callable"),s=e("../internals/new-promise-capability"),o=e("../internals/perform"),l=e("../internals/iterate");n({target:"Promise",stat:true,forced:e("../internals/promise-statics-incorrect-iteration")},{race:function(f){var u=this,c=s.f(u),d=c.reject,p=o((function(){var h=a(u.resolve);l(f,(function(m){i(h,u,m).then(c.resolve,d);}));}));return p.error&&d(p.value),c.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"),a=e("../internals/new-promise-capability");n({target:"Promise",stat:true,forced:e("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(s){var o=a.f(this);return i(o.reject,void 0,s),o.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"),a=e("../internals/is-pure"),s=e("../internals/promise-native-constructor"),o=e("../internals/promise-constructor-detection").CONSTRUCTOR,l=e("../internals/promise-resolve"),f=i("Promise"),u=a&&!o;n({target:"Promise",stat:true,forced:a||o},{resolve:function(c){return l(u&&this===f?s:this,c)}});},{"../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"),a=e("../internals/to-absolute-index"),s=RangeError,o=String.fromCharCode,l=String.fromCodePoint,f=i([].join);n({target:"String",stat:true,arity:1,forced:!!l&&l.length!==1},{fromCodePoint:function(u){for(var c,d=[],p=arguments.length,h=0;p>h;){if(c=+arguments[h++],a(c,1114111)!==c)throw new s(c+" is not a valid code point");d[h]=c<65536?o(c):o(55296+((c-=65536)>>10),c%1024+56320);}return f(d,"")}});},{"../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"),a=e("../internals/not-a-regexp"),s=e("../internals/require-object-coercible"),o=e("../internals/to-string"),l=e("../internals/correct-is-regexp-logic"),f=i("".indexOf);n({target:"String",proto:true,forced:!l("includes")},{includes:function(u){return !!~f(o(s(this)),o(a(u)),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"),a=e("../internals/function-call"),s=e("../internals/function-uncurry-this"),o=e("../internals/is-pure"),l=e("../internals/descriptors"),f=e("../internals/symbol-constructor-detection"),u=e("../internals/fails"),c=e("../internals/has-own-property"),d=e("../internals/object-is-prototype-of"),p=e("../internals/an-object"),h=e("../internals/to-indexed-object"),m=e("../internals/to-property-key"),g=e("../internals/to-string"),v=e("../internals/create-property-descriptor"),w=e("../internals/object-create"),C=e("../internals/object-keys"),T=e("../internals/object-get-own-property-names"),I=e("../internals/object-get-own-property-names-external"),k=e("../internals/object-get-own-property-symbols"),D=e("../internals/object-get-own-property-descriptor"),j=e("../internals/object-define-property"),F=e("../internals/object-define-properties"),B=e("../internals/object-property-is-enumerable"),E=e("../internals/define-built-in"),M=e("../internals/define-built-in-accessor"),L=e("../internals/shared"),b=e("../internals/shared-key"),y=e("../internals/hidden-keys"),x=e("../internals/uid"),_=e("../internals/well-known-symbol"),S=e("../internals/well-known-symbol-wrapped"),R=e("../internals/well-known-symbol-define"),z=e("../internals/symbol-define-to-primitive"),U=e("../internals/set-to-string-tag"),H=e("../internals/internal-state"),q=e("../internals/array-iteration").forEach,N=b("hidden"),V=H.set,O=H.getterFor("Symbol"),A=Object.prototype,P=i.Symbol,W=P&&P.prototype,Z=i.RangeError,$=i.TypeError,K=i.QObject,te=D.f,J=j.f,Y=I.f,ne=B.f,re=s([].push),ie=L("symbols"),oe=L("op-symbols"),se=L("wks"),le=!K||!K.prototype||!K.prototype.findChild,ge=function(Le,Ce,xe){var Qe=te(A,Ce);Qe&&delete A[Ce],J(Le,Ce,xe),Qe&&Le!==A&&J(A,Ce,Qe);},he=l&&u((function(){return w(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a!==7}))?ge:J,be=function(Le,Ce){var xe=ie[Le]=w(W);return V(xe,{type:"Symbol",tag:Le,description:Ce}),l||(xe.description=Ce),xe},Me=function(Le,Ce,xe){Le===A&&Me(oe,Ce,xe),p(Le);var Qe=m(Ce);return p(xe),c(ie,Qe)?(xe.enumerable?(c(Le,N)&&Le[N][Qe]&&(Le[N][Qe]=false),xe=w(xe,{enumerable:v(0,false)})):(c(Le,N)||J(Le,N,v(1,{})),Le[N][Qe]=true),he(Le,Qe,xe)):J(Le,Qe,xe)},ye=function(Le,Ce){p(Le);var xe=h(Ce),Qe=C(xe).concat(Ee(xe));return q(Qe,(function(Be){l&&!a(Se,xe,Be)||Me(Le,Be,xe[Be]);})),Le},Se=function(Le){var Ce=m(Le),xe=a(ne,this,Ce);return !(this===A&&c(ie,Ce)&&!c(oe,Ce))&&(!(xe||!c(this,Ce)||!c(ie,Ce)||c(this,N)&&this[N][Ce])||xe)},We=function(Le,Ce){var xe=h(Le),Qe=m(Ce);if(xe!==A||!c(ie,Qe)||c(oe,Qe)){var Be=te(xe,Qe);return !Be||!c(ie,Qe)||c(xe,N)&&xe[N][Qe]||(Be.enumerable=true),Be}},Ne=function(Le){var Ce=Y(h(Le)),xe=[];return q(Ce,(function(Qe){c(ie,Qe)||c(y,Qe)||re(xe,Qe);})),xe},Ee=function(Le){var Ce=Le===A,xe=Y(Ce?oe:h(Le)),Qe=[];return q(xe,(function(Be){!c(ie,Be)||Ce&&!c(A,Be)||re(Qe,ie[Be]);})),Qe};f||(E(W=(P=function(){if(d(W,this))throw new $("Symbol is not a constructor");var Le=arguments.length&&arguments[0]!==void 0?g(arguments[0]):void 0,Ce=x(Le),xe=function(Qe){this===A&&a(xe,oe,Qe),c(this,N)&&c(this[N],Ce)&&(this[N][Ce]=false);var Be=v(1,Qe);try{he(this,Ce,Be);}catch(He){if(!(He instanceof Z))throw He;ge(this,Ce,Be);}};return l&&le&&he(A,Ce,{configurable:true,set:xe}),be(Ce,Le)}).prototype,"toString",(function(){return O(this).tag})),E(P,"withoutSetter",(function(Le){return be(x(Le),Le)})),B.f=Se,j.f=Me,F.f=ye,D.f=We,T.f=I.f=Ne,k.f=Ee,S.f=function(Le){return be(_(Le),Le)},l&&(M(W,"description",{configurable:true,get:function(){return O(this).description}}),o||E(A,"propertyIsEnumerable",Se,{unsafe:true}))),n({global:true,constructor:true,wrap:true,forced:!f,sham:!f},{Symbol:P}),q(C(se),(function(Le){R(Le);})),n({target:"Symbol",stat:true,forced:!f},{useSetter:function(){le=true;},useSimple:function(){le=false;}}),n({target:"Object",stat:true,forced:!f,sham:!l},{create:function(Le,Ce){return Ce===void 0?w(Le):ye(w(Le),Ce)},defineProperty:Me,defineProperties:ye,getOwnPropertyDescriptor:We}),n({target:"Object",stat:true,forced:!f},{getOwnPropertyNames:Ne}),z(),U(P,"Symbol"),y[N]=true;},{"../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"),a=e("../internals/has-own-property"),s=e("../internals/to-string"),o=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),f=o("string-to-symbol-registry"),u=o("symbol-to-string-registry");n({target:"Symbol",stat:true,forced:!l},{for:function(c){var d=s(c);if(a(f,d))return f[d];var p=i("Symbol")(d);return f[d]=p,u[p]=d,p}});},{"../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"),a=e("../internals/is-symbol"),s=e("../internals/try-to-string"),o=e("../internals/shared"),l=e("../internals/symbol-registry-detection"),f=o("symbol-to-string-registry");n({target:"Symbol",stat:true,forced:!l},{keyFor:function(u){if(!a(u))throw new TypeError(s(u)+" is not a symbol");if(i(f,u))return f[u]}});},{"../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(i){return Object.prototype.toString.call(i)}r.isArray=function(i){return Array.isArray?Array.isArray(i):n(i)==="[object Array]"},r.isBoolean=function(i){return typeof i=="boolean"},r.isNull=function(i){return i===null},r.isNullOrUndefined=function(i){return i==null},r.isNumber=function(i){return typeof i=="number"},r.isString=function(i){return typeof i=="string"},r.isSymbol=function(i){return typeof i=="symbol"},r.isUndefined=function(i){return i===void 0},r.isRegExp=function(i){return n(i)==="[object RegExp]"},r.isObject=function(i){return typeof i=="object"&&i!==null},r.isDate=function(i){return n(i)==="[object Date]"},r.isError=function(i){return n(i)==="[object Error]"||i instanceof Error},r.isFunction=function(i){return typeof i=="function"},r.isPrimitive=function(i){return i===null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||typeof i=="symbol"||i===void 0},r.isBuffer=e("buffer").Buffer.isBuffer;},{buffer:220}],384:[function(e,t,r){(function(n){(function(){var i=e("elliptic"),a=e("bn.js");t.exports=function(f){return new o(f)};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 o(f){this.curveType=s[f],this.curveType||(this.curveType={name:f}),this.curve=new i.ec(this.curveType.name),this.keys=void 0;}function l(f,u,c){Array.isArray(f)||(f=f.toArray());var d=new n(f);if(c&&d.length<c){var p=new n(c-d.length);p.fill(0),d=n.concat([p,d]);}return u?d.toString(u):d}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,o.prototype.generateKeys=function(f,u){return this.keys=this.curve.genKeyPair(),this.getPublicKey(f,u)},o.prototype.computeSecret=function(f,u,c){return u=u||"utf8",n.isBuffer(f)||(f=new n(f,u)),l(this.curve.keyFromPublic(f).getPublic().mul(this.keys.getPrivate()).getX(),c,this.curveType.byteLength)},o.prototype.getPublicKey=function(f,u){var c=this.keys.getPublic(u==="compressed",true);return u==="hybrid"&&(c[c.length-1]%2?c[0]=7:c[0]=6),l(c,f)},o.prototype.getPrivateKey=function(f){return l(this.keys.getPrivate(),f)},o.prototype.setPublicKey=function(f,u){return u=u||"utf8",n.isBuffer(f)||(f=new n(f,u)),this.keys._importPublic(f),this},o.prototype.setPrivateKey=function(f,u){u=u||"utf8",n.isBuffer(f)||(f=new n(f,u));var c=new a(f);return c=c.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(c),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"),a=e("ripemd160"),s=e("sha.js"),o=e("cipher-base");function l(f){o.call(this,"digest"),this._hash=f;}n(l,o),l.prototype._update=function(f){this._hash.update(f);},l.prototype._final=function(){return this._hash.digest()},t.exports=function(f){return (f=f.toLowerCase())==="md5"?new i:f==="rmd160"||f==="ripemd160"?new a:new l(s(f))};},{"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(i){return new n().update(i).digest()};},{"md5.js":450}],388:[function(e,t,r){var n=e("inherits"),i=e("./legacy"),a=e("cipher-base"),s=e("safe-buffer").Buffer,o=e("create-hash/md5"),l=e("ripemd160"),f=e("sha.js"),u=s.alloc(128);function c(d,p){a.call(this,"digest"),typeof p=="string"&&(p=s.from(p));var h=d==="sha512"||d==="sha384"?128:64;this._alg=d,this._key=p,p.length>h?p=(d==="rmd160"?new l:f(d)).update(p).digest():p.length<h&&(p=s.concat([p,u],h));for(var m=this._ipad=s.allocUnsafe(h),g=this._opad=s.allocUnsafe(h),v=0;v<h;v++)m[v]=54^p[v],g[v]=92^p[v];this._hash=d==="rmd160"?new l:f(d),this._hash.update(m);}n(c,a),c.prototype._update=function(d){this._hash.update(d);},c.prototype._final=function(){var d=this._hash.digest();return (this._alg==="rmd160"?new l:f(this._alg)).update(this._opad).update(d).digest()},t.exports=function(d,p){return (d=d.toLowerCase())==="rmd160"||d==="ripemd160"?new c("rmd160",p):d==="md5"?new i(o,p):new c(d,p)};},{"./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,a=e("cipher-base"),s=i.alloc(128);function o(l,f){a.call(this,"digest"),typeof f=="string"&&(f=i.from(f)),this._alg=l,this._key=f,f.length>64?f=l(f):f.length<64&&(f=i.concat([f,s],64));for(var u=this._ipad=i.allocUnsafe(64),c=this._opad=i.allocUnsafe(64),d=0;d<64;d++)u[d]=54^f[d],c[d]=92^f[d];this._hash=[u];}n(o,a),o.prototype._update=function(l){this._hash.push(l);},o.prototype._final=function(){var l=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,l]))},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),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return a};var s=e("pbkdf2");r.pbkdf2=s.pbkdf2,r.pbkdf2Sync=s.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 f=e("browserify-sign");r.createSign=f.createSign,r.Sign=f.Sign,r.createVerify=f.createVerify,r.Verify=f.Verify,r.createECDH=e("create-ecdh");var u=e("public-encrypt");r.publicEncrypt=u.publicEncrypt,r.privateEncrypt=u.privateEncrypt,r.publicDecrypt=u.publicDecrypt,r.privateDecrypt=u.privateDecrypt;var c=e("randomfill");r.randomFill=c.randomFill,r.randomFillSync=c.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(`
|
|
17
|
+
`))},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){(function(n,i){typeof r=="object"&&t!==void 0?t.exports=i():(n=typeof globalThis<"u"?globalThis:n||self).dayjs=i();})(void 0,(function(){var n=6e4,i=36e5,a="millisecond",s="second",o="minute",l="hour",f="day",u="week",c="month",d="quarter",p="year",h="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(b){var y=["th","st","nd","rd"],x=b%100;return "["+b+(y[(x-20)%10]||y[x]||y[0])+"]"}},C=function(b,y,x){var _=String(b);return !_||_.length>=y?b:""+Array(y+1-_.length).join(x)+b},T={s:C,z:function(b){var y=-b.utcOffset(),x=Math.abs(y),_=Math.floor(x/60),S=x%60;return (y<=0?"+":"-")+C(_,2,"0")+":"+C(S,2,"0")},m:function b(y,x){if(y.date()<x.date())return -b(x,y);var _=12*(x.year()-y.year())+(x.month()-y.month()),S=y.clone().add(_,c),R=x-S<0,z=y.clone().add(_+(R?-1:1),c);return +(-(_+(x-S)/(R?S-z:z-S))||0)},a:function(b){return b<0?Math.ceil(b)||0:Math.floor(b)},p:function(b){return {M:c,y:p,w:u,d:f,D:h,h:l,m:o,s,ms:a,Q:d}[b]||String(b||"").toLowerCase().replace(/s$/,"")},u:function(b){return b===void 0}},I="en",k={};k[I]=w;var D="$isDayjsObject",j=function(b){return b instanceof M||!(!b||!b[D])},F=function b(y,x,_){var S;if(!y)return I;if(typeof y=="string"){var R=y.toLowerCase();k[R]&&(S=R),x&&(k[R]=x,S=R);var z=y.split("-");if(!S&&z.length>1)return b(z[0])}else {var U=y.name;k[U]=y,S=U;}return !_&&S&&(I=S),S||!_&&I},B=function(b,y){if(j(b))return b.clone();var x=typeof y=="object"?y:{};return x.date=b,x.args=arguments,new M(x)},E=T;E.l=F,E.i=j,E.w=function(b,y){return B(b,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var M=(function(){function b(x){this.$L=F(x.locale,null,true),this.parse(x),this.$x=this.$x||x.x||{},this[D]=true;}var y=b.prototype;return y.parse=function(x){this.$d=(function(_){var S=_.date,R=_.utc;if(S===null)return new Date(NaN);if(E.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var z=S.match(g);if(z){var U=z[2]-1||0,H=(z[7]||"0").substring(0,3);return R?new Date(Date.UTC(z[1],U,z[3]||1,z[4]||0,z[5]||0,z[6]||0,H)):new Date(z[1],U,z[3]||1,z[4]||0,z[5]||0,z[6]||0,H)}}return new Date(S)})(x),this.init();},y.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds();},y.$utils=function(){return E},y.isValid=function(){return this.$d.toString()!==m},y.isSame=function(x,_){var S=B(x);return this.startOf(_)<=S&&S<=this.endOf(_)},y.isAfter=function(x,_){return B(x)<this.startOf(_)},y.isBefore=function(x,_){return this.endOf(_)<B(x)},y.$g=function(x,_,S){return E.u(x)?this[_]:this.set(S,x)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(x,_){var S=this,R=!!E.u(_)||_,z=E.p(x),U=function(W,Z){var $=E.w(S.$u?Date.UTC(S.$y,Z,W):new Date(S.$y,Z,W),S);return R?$:$.endOf(f)},H=function(W,Z){return E.w(S.toDate()[W].apply(S.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(Z)),S)},q=this.$W,N=this.$M,V=this.$D,O="set"+(this.$u?"UTC":"");switch(z){case p:return R?U(1,0):U(31,11);case c:return R?U(1,N):U(0,N+1);case u:var A=this.$locale().weekStart||0,P=(q<A?q+7:q)-A;return U(R?V-P:V+(6-P),N);case f:case h:return H(O+"Hours",0);case l:return H(O+"Minutes",1);case o:return H(O+"Seconds",2);case s:return H(O+"Milliseconds",3);default:return this.clone()}},y.endOf=function(x){return this.startOf(x,false)},y.$set=function(x,_){var S,R=E.p(x),z="set"+(this.$u?"UTC":""),U=(S={},S[f]=z+"Date",S[h]=z+"Date",S[c]=z+"Month",S[p]=z+"FullYear",S[l]=z+"Hours",S[o]=z+"Minutes",S[s]=z+"Seconds",S[a]=z+"Milliseconds",S)[R],H=R===f?this.$D+(_-this.$W):_;if(R===c||R===p){var q=this.clone().set(h,1);q.$d[U](H),q.init(),this.$d=q.set(h,Math.min(this.$D,q.daysInMonth())).$d;}else U&&this.$d[U](H);return this.init(),this},y.set=function(x,_){return this.clone().$set(x,_)},y.get=function(x){return this[E.p(x)]()},y.add=function(x,_){var S,R=this;x=Number(x);var z=E.p(_),U=function(N){var V=B(R);return E.w(V.date(V.date()+Math.round(N*x)),R)};if(z===c)return this.set(c,this.$M+x);if(z===p)return this.set(p,this.$y+x);if(z===f)return U(1);if(z===u)return U(7);var H=(S={},S[o]=n,S[l]=i,S[s]=1e3,S)[z]||1,q=this.$d.getTime()+x*H;return E.w(q,this)},y.subtract=function(x,_){return this.add(-1*x,_)},y.format=function(x){var _=this,S=this.$locale();if(!this.isValid())return S.invalidDate||m;var R=x||"YYYY-MM-DDTHH:mm:ssZ",z=E.z(this),U=this.$H,H=this.$m,q=this.$M,N=S.weekdays,V=S.months,O=S.meridiem,A=function(Z,$,K,te){return Z&&(Z[$]||Z(_,R))||K[$].slice(0,te)},P=function(Z){return E.s(U%12||12,Z,"0")},W=O||function(Z,$,K){var te=Z<12?"AM":"PM";return K?te.toLowerCase():te};return R.replace(v,(function(Z,$){return $||(function(K){switch(K){case "YY":return String(_.$y).slice(-2);case "YYYY":return E.s(_.$y,4,"0");case "M":return q+1;case "MM":return E.s(q+1,2,"0");case "MMM":return A(S.monthsShort,q,V,3);case "MMMM":return A(V,q);case "D":return _.$D;case "DD":return E.s(_.$D,2,"0");case "d":return String(_.$W);case "dd":return A(S.weekdaysMin,_.$W,N,2);case "ddd":return A(S.weekdaysShort,_.$W,N,3);case "dddd":return N[_.$W];case "H":return String(U);case "HH":return E.s(U,2,"0");case "h":return P(1);case "hh":return P(2);case "a":return W(U,H,true);case "A":return W(U,H,false);case "m":return String(H);case "mm":return E.s(H,2,"0");case "s":return String(_.$s);case "ss":return E.s(_.$s,2,"0");case "SSS":return E.s(_.$ms,3,"0");case "Z":return z}return null})(Z)||z.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(x,_,S){var R,z=this,U=E.p(_),H=B(x),q=(H.utcOffset()-this.utcOffset())*n,N=this-H,V=function(){return E.m(z,H)};switch(U){case p:R=V()/12;break;case c:R=V();break;case d:R=V()/3;break;case u:R=(N-q)/6048e5;break;case f:R=(N-q)/864e5;break;case l:R=N/i;break;case o:R=N/n;break;case s:R=N/1e3;break;default:R=N;}return S?R:E.a(R)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return k[this.$L]},y.locale=function(x,_){if(!x)return this.$L;var S=this.clone(),R=F(x,_,true);return R&&(S.$L=R),S},y.clone=function(){return E.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},b})(),L=M.prototype;return B.prototype=L,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",f],["$M",c],["$y",p],["$D",h]].forEach((function(b){L[b[1]]=function(y){return this.$g(y,b[0],b[1])};})),B.extend=function(b,y){return b.$i||(b(y,M,B),b.$i=true),B},B.locale=F,B.isDayjs=j,B.unix=function(b){return B(1e3*b)},B.en=k[I],B.Ls=k,B.p={},B}));},{}],392:[function(e,t,r){(function(n,i){typeof r=="object"&&t!==void 0?t.exports=i():(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_customParseFormat=i();})(void 0,(function(){var n={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"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,s=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,l={},f=function(g){return (g=+g)+(g>68?1900:2e3)},u=function(g){return function(v){this[g]=+v;}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(v){if(!v||v==="Z")return 0;var w=v.match(/([+-]|\d\d)/g),C=60*w[1]+(+w[2]||0);return C===0?0:w[0]==="+"?-C:C})(g);}],d=function(g){var v=l[g];return v&&(v.indexOf?v:v.s.concat(v.f))},p=function(g,v){var w,C=l.meridiem;if(C){for(var T=1;T<=24;T+=1)if(g.indexOf(C(T,0,v))>-1){w=T>12;break}}else w=g===(v?"pm":"PM");return w},h={A:[o,function(g){this.afternoon=p(g,false);}],a:[o,function(g){this.afternoon=p(g,true);}],S:[/\d/,function(g){this.milliseconds=100*+g;}],SS:[a,function(g){this.milliseconds=10*+g;}],SSS:[/\d{3}/,function(g){this.milliseconds=+g;}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[a,u("day")],Do:[o,function(g){var v=l.ordinal,w=g.match(/\d+/);if(this.day=w[0],v)for(var C=1;C<=31;C+=1)v(C).replace(/\[|\]/g,"")===g&&(this.day=C);}],M:[s,u("month")],MM:[a,u("month")],MMM:[o,function(g){var v=d("months"),w=(d("monthsShort")||v.map((function(C){return C.slice(0,3)}))).indexOf(g)+1;if(w<1)throw new Error;this.month=w%12||w;}],MMMM:[o,function(g){var v=d("months").indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v;}],Y:[/[+-]?\d+/,u("year")],YY:[a,function(g){this.year=f(g);}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function m(g){var v,w;v=g,w=l&&l.formats;for(var C=(g=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(B,E,M){var L=M&&M.toUpperCase();return E||w[M]||n[M]||w[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(b,y,x){return y||x.slice(1)}))}))).match(i),T=C.length,I=0;I<T;I+=1){var k=C[I],D=h[k],j=D&&D[0],F=D&&D[1];C[I]=F?{regex:j,parser:F}:k.replace(/^\[|\]$/g,"");}return function(B){for(var E={},M=0,L=0;M<T;M+=1){var b=C[M];if(typeof b=="string")L+=b.length;else {var y=b.regex,x=b.parser,_=B.slice(L),S=y.exec(_)[0];x.call(E,S),B=B.replace(S,"");}}return (function(R){var z=R.afternoon;if(z!==void 0){var U=R.hours;z?U<12&&(R.hours+=12):U===12&&(R.hours=0),delete R.afternoon;}})(E),E}}return function(g,v,w){w.p.customParseFormat=true,g&&g.parseTwoDigitYear&&(f=g.parseTwoDigitYear);var C=v.prototype,T=C.parse;C.parse=function(I){var k=I.date,D=I.utc,j=I.args;this.$u=D;var F=j[1];if(typeof F=="string"){var B=j[2]===true,E=j[3]===true,M=B||E,L=j[2];E&&(L=j[2]),l=this.$locale(),!B&&L&&(l=w.Ls[L]),this.$d=(function(_,S,R){try{if(["x","X"].indexOf(S)>-1)return new Date((S==="X"?1e3:1)*_);var z=m(S)(_),U=z.year,H=z.month,q=z.day,N=z.hours,V=z.minutes,O=z.seconds,A=z.milliseconds,P=z.zone,W=new Date,Z=q||(U||H?1:W.getDate()),$=U||W.getFullYear(),K=0;U&&!H||(K=H>0?H-1:W.getMonth());var te=N||0,J=V||0,Y=O||0,ne=A||0;return P?new Date(Date.UTC($,K,Z,te,J,Y,ne+60*P.offset*1e3)):R?new Date(Date.UTC($,K,Z,te,J,Y,ne)):new Date($,K,Z,te,J,Y,ne)}catch{return new Date("")}})(k,F,D),this.init(),L&&L!==true&&(this.$L=this.locale(L).$L),M&&k!=this.format(F)&&(this.$d=new Date("")),l={};}else if(F instanceof Array)for(var b=F.length,y=1;y<=b;y+=1){j[1]=F[y-1];var x=w.apply(this,j);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}y===b&&(this.$d=new Date(""));}else T.call(this,I);};}}));},{}],393:[function(e,t,r){(function(n,i){typeof r=="object"&&t!==void 0?t.exports=i():(n=typeof globalThis<"u"?globalThis:n||self).dayjs_plugin_utc=i();})(void 0,(function(){var n="minute",i=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,o,l){var f=o.prototype;l.utc=function(g){var v={date:g,utc:true,args:arguments};return new o(v)},f.utc=function(g){var v=l(this.toDate(),{locale:this.$L,utc:true});return g?v.add(this.utcOffset(),n):v},f.local=function(){return l(this.toDate(),{locale:this.$L,utc:false})};var u=f.parse;f.parse=function(g){g.utc&&(this.$u=true),this.$utils().u(g.$offset)||(this.$offset=g.$offset),u.call(this,g);};var c=f.init;f.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds();}else c.call(this);};var d=f.utcOffset;f.utcOffset=function(g,v){var w=this.$utils().u;if(w(g))return this.$u?0:w(this.$offset)?d.call(this):this.$offset;if(typeof g=="string"&&(g=(function(k){k===void 0&&(k="");var D=k.match(i);if(!D)return null;var j=(""+D[0]).match(a)||["-",0,0],F=j[0],B=60*+j[1]+ +j[2];return B===0?0:F==="+"?B:-B})(g))===null)return this;var C=Math.abs(g)<=16?60*g:g,T=this;if(v)return T.$offset=C,T.$u=g===0,T;if(g!==0){var I=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(T=this.local().add(C+I,n)).$offset=C,T.$x.$localOffset=I;}else T=this.utc();return T};var p=f.format;f.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,v)},f.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},f.isUTC=function(){return !!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var h=f.toDate;f.toDate=function(g){return g==="s"&&this.$offset?l(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var m=f.diff;f.diff=function(g,v,w){if(g&&this.$u===g.$u)return m.call(this,g,v,w);var C=this.local(),T=l(g).local();return m.call(C,T,v,w)};}}));},{}],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"),a={};function s(o){n.equal(o.length,8,"Invalid IV length"),this.iv=new Array(8);for(var l=0;l<this.iv.length;l++)this.iv[l]=o[l];}r.instantiate=function(o){function l(d){o.call(this,d),this._cbcInit();}i(l,o);for(var f=Object.keys(a),u=0;u<f.length;u++){var c=f[u];l.prototype[c]=a[c];}return l.create=function(d){return new l(d)},l},a._cbcInit=function(){var o=new s(this.options.iv);this._cbcState=o;},a._update=function(o,l,f,u){var c=this._cbcState,d=this.constructor.super_.prototype,p=c.iv;if(this.type==="encrypt"){for(var h=0;h<this.blockSize;h++)p[h]^=o[l+h];for(d._update.call(this,p,0,f,u),h=0;h<this.blockSize;h++)p[h]=f[u+h];}else {for(d._update.call(this,o,l,f,u),h=0;h<this.blockSize;h++)f[u+h]^=p[h];for(h=0;h<this.blockSize;h++)p[h]=o[l+h];}};},{inherits:440,"minimalistic-assert":453}],396:[function(e,t,r){var n=e("minimalistic-assert");function i(a){this.options=a,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=a.padding!==false;}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(a){return a.length===0?[]:this.type==="decrypt"?this._updateDecrypt(a):this._updateEncrypt(a)},i.prototype._buffer=function(a,s){for(var o=Math.min(this.buffer.length-this.bufferOff,a.length-s),l=0;l<o;l++)this.buffer[this.bufferOff+l]=a[s+l];return this.bufferOff+=o,o},i.prototype._flushBuffer=function(a,s){return this._update(this.buffer,0,a,s),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(a){var s=0,o=0,l=(this.bufferOff+a.length)/this.blockSize|0,f=new Array(l*this.blockSize);this.bufferOff!==0&&(s+=this._buffer(a,s),this.bufferOff===this.buffer.length&&(o+=this._flushBuffer(f,o)));for(var u=a.length-(a.length-s)%this.blockSize;s<u;s+=this.blockSize)this._update(a,s,f,o),o+=this.blockSize;for(;s<a.length;s++,this.bufferOff++)this.buffer[this.bufferOff]=a[s];return f},i.prototype._updateDecrypt=function(a){for(var s=0,o=0,l=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,f=new Array(l*this.blockSize);l>0;l--)s+=this._buffer(a,s),o+=this._flushBuffer(f,o);return s+=this._buffer(a,s),f},i.prototype.final=function(a){var s,o;return a&&(s=this.update(a)),o=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),s?s.concat(o):o},i.prototype._pad=function(a,s){if(s===0)return false;for(;s<a.length;)a[s++]=0;return true},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return [];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},i.prototype._unpad=function(a){return a},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)};},{"minimalistic-assert":453}],397:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits"),a=e("./utils"),s=e("./cipher");function o(){this.tmp=new Array(2),this.keys=null;}function l(u){s.call(this,u);var c=new o;this._desState=c,this.deriveKeys(c,u.key);}i(l,s),t.exports=l,l.create=function(u){return new l(u)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(u,c){u.keys=new Array(32),n.equal(c.length,this.blockSize,"Invalid key length");var d=a.readUInt32BE(c,0),p=a.readUInt32BE(c,4);a.pc1(d,p,u.tmp,0),d=u.tmp[0],p=u.tmp[1];for(var h=0;h<u.keys.length;h+=2){var m=f[h>>>1];d=a.r28shl(d,m),p=a.r28shl(p,m),a.pc2(d,p,u.keys,h);}},l.prototype._update=function(u,c,d,p){var h=this._desState,m=a.readUInt32BE(u,c),g=a.readUInt32BE(u,c+4);a.ip(m,g,h.tmp,0),m=h.tmp[0],g=h.tmp[1],this.type==="encrypt"?this._encrypt(h,m,g,h.tmp,0):this._decrypt(h,m,g,h.tmp,0),m=h.tmp[0],g=h.tmp[1],a.writeUInt32BE(d,m,p),a.writeUInt32BE(d,g,p+4);},l.prototype._pad=function(u,c){if(this.padding===false)return false;for(var d=u.length-c,p=c;p<u.length;p++)u[p]=d;return true},l.prototype._unpad=function(u){if(this.padding===false)return u;for(var c=u[u.length-1],d=u.length-c;d<u.length;d++)n.equal(u[d],c);return u.slice(0,u.length-c)},l.prototype._encrypt=function(u,c,d,p,h){for(var m=c,g=d,v=0;v<u.keys.length;v+=2){var w=u.keys[v],C=u.keys[v+1];a.expand(g,u.tmp,0),w^=u.tmp[0],C^=u.tmp[1];var T=a.substitute(w,C),I=g;g=(m^a.permute(T))>>>0,m=I;}a.rip(g,m,p,h);},l.prototype._decrypt=function(u,c,d,p,h){for(var m=d,g=c,v=u.keys.length-2;v>=0;v-=2){var w=u.keys[v],C=u.keys[v+1];a.expand(m,u.tmp,0),w^=u.tmp[0],C^=u.tmp[1];var T=a.substitute(w,C),I=m;m=(g^a.permute(T))>>>0,g=I;}a.rip(m,g,p,h);};},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits"),a=e("./cipher"),s=e("./des");function o(f,u){n.equal(u.length,24,"Invalid key length");var c=u.slice(0,8),d=u.slice(8,16),p=u.slice(16,24);this.ciphers=f==="encrypt"?[s.create({type:"encrypt",key:c}),s.create({type:"decrypt",key:d}),s.create({type:"encrypt",key:p})]:[s.create({type:"decrypt",key:p}),s.create({type:"encrypt",key:d}),s.create({type:"decrypt",key:c})];}function l(f){a.call(this,f);var u=new o(this.type,this.options.key);this._edeState=u;}i(l,a),t.exports=l,l.create=function(f){return new l(f)},l.prototype._update=function(f,u,c,d){var p=this._edeState;p.ciphers[0]._update(f,u,c,d),p.ciphers[1]._update(c,d,c,d),p.ciphers[2]._update(c,d,c,d);},l.prototype._pad=s.prototype._pad,l.prototype._unpad=s.prototype._unpad;},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(e,t,r){r.readUInt32BE=function(s,o){return (s[0+o]<<24|s[1+o]<<16|s[2+o]<<8|s[3+o])>>>0},r.writeUInt32BE=function(s,o,l){s[0+l]=o>>>24,s[1+l]=o>>>16&255,s[2+l]=o>>>8&255,s[3+l]=255&o;},r.ip=function(s,o,l,f){for(var u=0,c=0,d=6;d>=0;d-=2){for(var p=0;p<=24;p+=8)u<<=1,u|=o>>>p+d&1;for(p=0;p<=24;p+=8)u<<=1,u|=s>>>p+d&1;}for(d=6;d>=0;d-=2){for(p=1;p<=25;p+=8)c<<=1,c|=o>>>p+d&1;for(p=1;p<=25;p+=8)c<<=1,c|=s>>>p+d&1;}l[f+0]=u>>>0,l[f+1]=c>>>0;},r.rip=function(s,o,l,f){for(var u=0,c=0,d=0;d<4;d++)for(var p=24;p>=0;p-=8)u<<=1,u|=o>>>p+d&1,u<<=1,u|=s>>>p+d&1;for(d=4;d<8;d++)for(p=24;p>=0;p-=8)c<<=1,c|=o>>>p+d&1,c<<=1,c|=s>>>p+d&1;l[f+0]=u>>>0,l[f+1]=c>>>0;},r.pc1=function(s,o,l,f){for(var u=0,c=0,d=7;d>=5;d--){for(var p=0;p<=24;p+=8)u<<=1,u|=o>>p+d&1;for(p=0;p<=24;p+=8)u<<=1,u|=s>>p+d&1;}for(p=0;p<=24;p+=8)u<<=1,u|=o>>p+d&1;for(d=1;d<=3;d++){for(p=0;p<=24;p+=8)c<<=1,c|=o>>p+d&1;for(p=0;p<=24;p+=8)c<<=1,c|=s>>p+d&1;}for(p=0;p<=24;p+=8)c<<=1,c|=s>>p+d&1;l[f+0]=u>>>0,l[f+1]=c>>>0;},r.r28shl=function(s,o){return s<<o&268435455|s>>>28-o};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(s,o,l,f){for(var u=0,c=0,d=n.length>>>1,p=0;p<d;p++)u<<=1,u|=s>>>n[p]&1;for(p=d;p<n.length;p++)c<<=1,c|=o>>>n[p]&1;l[f+0]=u>>>0,l[f+1]=c>>>0;},r.expand=function(s,o,l){var f=0,u=0;f=(1&s)<<5|s>>>27;for(var c=23;c>=15;c-=4)f<<=6,f|=s>>>c&63;for(c=11;c>=3;c-=4)u|=s>>>c&63,u<<=6;u|=(31&s)<<1|s>>>31,o[l+0]=f>>>0,o[l+1]=u>>>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(s,o){for(var l=0,f=0;f<4;f++)l<<=4,l|=i[64*f+(s>>>18-6*f&63)];for(f=0;f<4;f++)l<<=4,l|=i[256+64*f+(o>>>18-6*f&63)];return l>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(s){for(var o=0,l=0;l<a.length;l++)o<<=1,o|=s>>>a[l]&1;return o>>>0},r.padSplit=function(s,o,l){for(var f=s.toString(2);f.length<o;)f="0"+f;for(var u=[],c=0;c<o;c+=l)u.push(f.slice(c,c+l));return u.join(" ")};},{}],400:[function(e,t,r){(function(n){(function(){var i=e("./lib/generatePrime"),a=e("./lib/primes.json"),s=e("./lib/dh"),o={binary:true,hex:true,base64:true};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function(l){var f=new n(a[l].prime,"hex"),u=new n(a[l].gen,"hex");return new s(f,u)},r.createDiffieHellman=r.DiffieHellman=function l(f,u,c,d){return n.isBuffer(u)||o[u]===void 0?l(f,"binary",u,c):(u=u||"binary",d=d||"binary",c=c||new n([2]),n.isBuffer(c)||(c=new n(c,d)),typeof f=="number"?new s(i(f,c),c,true):(n.isBuffer(f)||(f=new n(f,u)),new s(f,c,true)))};}).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(n){(function(){var i=e("bn.js"),a=new(e("miller-rabin")),s=new i(24),o=new i(11),l=new i(10),f=new i(3),u=new i(7),c=e("./generatePrime"),d=e("randombytes");function p(w,C){return C=C||"utf8",n.isBuffer(w)||(w=new n(w,C)),this._pub=new i(w),this}function h(w,C){return C=C||"utf8",n.isBuffer(w)||(w=new n(w,C)),this._priv=new i(w),this}t.exports=g;var m={};function g(w,C,T){this.setGenerator(C),this.__prime=new i(w),this._prime=i.mont(this.__prime),this._primeLen=w.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,T?(this.setPublicKey=p,this.setPrivateKey=h):this._primeCode=8;}function v(w,C){var T=new n(w.toArray());return C?T.toString(C):T}Object.defineProperty(g.prototype,"verifyError",{enumerable:true,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=(function(w,C){var T=C.toString("hex"),I=[T,w.toString(16)].join("_");if(I in m)return m[I];var k,D=0;if(w.isEven()||!c.simpleSieve||!c.fermatTest(w)||!a.test(w))return D+=1,D+=T==="02"||T==="05"?8:4,m[I]=D,D;switch(a.test(w.shrn(1))||(D+=2),T){case "02":w.mod(s).cmp(o)&&(D+=8);break;case "05":(k=w.mod(l)).cmp(f)&&k.cmp(u)&&(D+=8);break;default:D+=4;}return m[I]=D,D})(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(w){var C=(w=(w=new i(w)).toRed(this._prime)).redPow(this._priv).fromRed(),T=new n(C.toArray()),I=this.getPrime();if(T.length<I.length){var k=new n(I.length-T.length);k.fill(0),T=n.concat([k,T]);}return T},g.prototype.getPublicKey=function(w){return v(this._pub,w)},g.prototype.getPrivateKey=function(w){return v(this._priv,w)},g.prototype.getPrime=function(w){return v(this.__prime,w)},g.prototype.getGenerator=function(w){return v(this._gen,w)},g.prototype.setGenerator=function(w,C){return C=C||"utf8",n.isBuffer(w)||(w=new n(w,C)),this.__gen=w,this._gen=new i(w),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=w,w.simpleSieve=g,w.fermatTest=v;var i=e("bn.js"),a=new i(24),s=new(e("miller-rabin")),o=new i(1),l=new i(2),f=new i(5),u=(new i(16),new i(8),new i(10)),c=new i(3),d=(new i(7),new i(11)),p=new i(4),h=(new i(12),null);function m(){if(h!==null)return h;var C=[];C[0]=2;for(var T=1,I=3;I<1048576;I+=2){for(var k=Math.ceil(Math.sqrt(I)),D=0;D<T&&C[D]<=k&&I%C[D]!=0;D++);T!==D&&C[D]<=k||(C[T++]=I);}return h=C,C}function g(C){for(var T=m(),I=0;I<T.length;I++)if(C.modn(T[I])===0)return C.cmpn(T[I])===0;return true}function v(C){var T=i.mont(C);return l.toRed(T).redPow(C.subn(1)).fromRed().cmpn(1)===0}function w(C,T){if(C<16)return new i(T===2||T===5?[140,123]:[140,39]);var I,k;for(T=new i(T);;){for(I=new i(n(Math.ceil(C/8)));I.bitLength()>C;)I.ishrn(1);if(I.isEven()&&I.iadd(o),I.testn(1)||I.iadd(l),T.cmp(l)){if(!T.cmp(f))for(;I.mod(u).cmp(c);)I.iadd(p);}else for(;I.mod(a).cmp(d);)I.iadd(p);if(g(k=I.shrn(1))&&g(I)&&v(k)&&v(I)&&s.test(k)&&s.test(I))return I}}},{"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"),a=i.getNAF,s=i.getJSF,o=i.assert;function l(u,c){this.type=u,this.p=new n(c.p,16),this.red=c.prime?n.red(c.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=c.n&&new n(c.n,16),this.g=c.g&&this.pointFromJSON(c.g,c.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 d=this.n&&this.p.div(this.n);!d||d.cmpn(100)>0?this.redN=null:(this._maxwellTrick=true,this.redN=this.n.toRed(this.red));}function f(u,c){this.curve=u,this.type=c,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(u,c){o(u.precomputed);var d=u._getDoubles(),p=a(c,1,this._bitLength),h=(1<<d.step+1)-(d.step%2==0?2:1);h/=3;var m,g,v=[];for(m=0;m<p.length;m+=d.step){g=0;for(var w=m+d.step-1;w>=m;w--)g=(g<<1)+p[w];v.push(g);}for(var C=this.jpoint(null,null,null),T=this.jpoint(null,null,null),I=h;I>0;I--){for(m=0;m<v.length;m++)(g=v[m])===I?T=T.mixedAdd(d.points[m]):g===-I&&(T=T.mixedAdd(d.points[m].neg()));C=C.add(T);}return C.toP()},l.prototype._wnafMul=function(u,c){var d=4,p=u._getNAFPoints(d);d=p.wnd;for(var h=p.points,m=a(c,d,this._bitLength),g=this.jpoint(null,null,null),v=m.length-1;v>=0;v--){for(var w=0;v>=0&&m[v]===0;v--)w++;if(v>=0&&w++,g=g.dblp(w),v<0)break;var C=m[v];o(C!==0),g=u.type==="affine"?C>0?g.mixedAdd(h[C-1>>1]):g.mixedAdd(h[-C-1>>1].neg()):C>0?g.add(h[C-1>>1]):g.add(h[-C-1>>1].neg());}return u.type==="affine"?g.toP():g},l.prototype._wnafMulAdd=function(u,c,d,p,h){var m,g,v,w=this._wnafT1,C=this._wnafT2,T=this._wnafT3,I=0;for(m=0;m<p;m++){var k=(v=c[m])._getNAFPoints(u);w[m]=k.wnd,C[m]=k.points;}for(m=p-1;m>=1;m-=2){var D=m-1,j=m;if(w[D]===1&&w[j]===1){var F=[c[D],null,null,c[j]];c[D].y.cmp(c[j].y)===0?(F[1]=c[D].add(c[j]),F[2]=c[D].toJ().mixedAdd(c[j].neg())):c[D].y.cmp(c[j].y.redNeg())===0?(F[1]=c[D].toJ().mixedAdd(c[j]),F[2]=c[D].add(c[j].neg())):(F[1]=c[D].toJ().mixedAdd(c[j]),F[2]=c[D].toJ().mixedAdd(c[j].neg()));var B=[-3,-1,-5,-7,0,7,5,1,3],E=s(d[D],d[j]);for(I=Math.max(E[0].length,I),T[D]=new Array(I),T[j]=new Array(I),g=0;g<I;g++){var M=0|E[0][g],L=0|E[1][g];T[D][g]=B[3*(M+1)+(L+1)],T[j][g]=0,C[D]=F;}}else T[D]=a(d[D],w[D],this._bitLength),T[j]=a(d[j],w[j],this._bitLength),I=Math.max(T[D].length,I),I=Math.max(T[j].length,I);}var b=this.jpoint(null,null,null),y=this._wnafT4;for(m=I;m>=0;m--){for(var x=0;m>=0;){var _=true;for(g=0;g<p;g++)y[g]=0|T[g][m],y[g]!==0&&(_=false);if(!_)break;x++,m--;}if(m>=0&&x++,b=b.dblp(x),m<0)break;for(g=0;g<p;g++){var S=y[g];S!==0&&(S>0?v=C[g][S-1>>1]:S<0&&(v=C[g][-S-1>>1].neg()),b=v.type==="affine"?b.mixedAdd(v):b.add(v));}}for(m=0;m<p;m++)C[m]=null;return h?b:b.toP()},l.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(u,c){u=i.toArray(u,c);var d=this.p.byteLength();if((u[0]===4||u[0]===6||u[0]===7)&&u.length-1==2*d)return u[0]===6?o(u[u.length-1]%2==0):u[0]===7&&o(u[u.length-1]%2==1),this.point(u.slice(1,1+d),u.slice(1+d,1+2*d));if((u[0]===2||u[0]===3)&&u.length-1===d)return this.pointFromX(u.slice(1,1+d),u[0]===3);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(u){return this.encode(u,true)},f.prototype._encode=function(u){var c=this.curve.p.byteLength(),d=this.getX().toArray("be",c);return u?[this.getY().isEven()?2:3].concat(d):[4].concat(d,this.getY().toArray("be",c))},f.prototype.encode=function(u,c){return i.encode(this._encode(c),u)},f.prototype.precompute=function(u){if(this.precomputed)return this;var c={doubles:null,naf:null,beta:null};return c.naf=this._getNAFPoints(8),c.doubles=this._getDoubles(4,u),c.beta=this._getBeta(),this.precomputed=c,this},f.prototype._hasDoubles=function(u){if(!this.precomputed)return false;var c=this.precomputed.doubles;return !!c&&c.points.length>=Math.ceil((u.bitLength()+1)/c.step)},f.prototype._getDoubles=function(u,c){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var d=[this],p=this,h=0;h<c;h+=u){for(var m=0;m<u;m++)p=p.dbl();d.push(p);}return {step:u,points:d}},f.prototype._getNAFPoints=function(u){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var c=[this],d=(1<<u)-1,p=d===1?null:this.dbl(),h=1;h<d;h++)c[h]=c[h-1].add(p);return {wnd:u,points:c}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(u){for(var c=this,d=0;d<u;d++)c=c.dbl();return c};},{"../utils":419,"bn.js":420}],407:[function(e,t,r){var n=e("../utils"),i=e("bn.js"),a=e("inherits"),s=e("./base"),o=n.assert;function l(u){this.twisted=(0|u.a)!=1,this.mOneA=this.twisted&&(0|u.a)==-1,this.extended=this.mOneA,s.call(this,"edwards",u),this.a=new i(u.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(u.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(u.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|u.c)==1;}function f(u,c,d,p,h){s.BasePoint.call(this,u,"projective"),c===null&&d===null&&p===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=true):(this.x=new i(c,16),this.y=new i(d,16),this.z=p?new i(p,16):this.curve.one,this.t=h&&new i(h,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))));}a(l,s),t.exports=l,l.prototype._mulA=function(u){return this.mOneA?u.redNeg():this.a.redMul(u)},l.prototype._mulC=function(u){return this.oneC?u:this.c.redMul(u)},l.prototype.jpoint=function(u,c,d,p){return this.point(u,c,d,p)},l.prototype.pointFromX=function(u,c){(u=new i(u,16)).red||(u=u.toRed(this.red));var d=u.redSqr(),p=this.c2.redSub(this.a.redMul(d)),h=this.one.redSub(this.c2.redMul(this.d).redMul(d)),m=p.redMul(h.redInvm()),g=m.redSqrt();if(g.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");var v=g.fromRed().isOdd();return (c&&!v||!c&&v)&&(g=g.redNeg()),this.point(u,g)},l.prototype.pointFromY=function(u,c){(u=new i(u,16)).red||(u=u.toRed(this.red));var d=u.redSqr(),p=d.redSub(this.c2),h=d.redMul(this.d).redMul(this.c2).redSub(this.a),m=p.redMul(h.redInvm());if(m.cmp(this.zero)===0){if(c)throw new Error("invalid point");return this.point(this.zero,u)}var g=m.redSqrt();if(g.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");return g.fromRed().isOdd()!==c&&(g=g.redNeg()),this.point(g,u)},l.prototype.validate=function(u){if(u.isInfinity())return true;u.normalize();var c=u.x.redSqr(),d=u.y.redSqr(),p=c.redMul(this.a).redAdd(d),h=this.c2.redMul(this.one.redAdd(this.d.redMul(c).redMul(d)));return p.cmp(h)===0},a(f,s.BasePoint),l.prototype.pointFromJSON=function(u){return f.fromJSON(this,u)},l.prototype.point=function(u,c,d,p){return new f(this,u,c,d,p)},f.fromJSON=function(u,c){return new f(u,c[0],c[1],c[2])},f.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)+">"},f.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},f.prototype._extDbl=function(){var u=this.x.redSqr(),c=this.y.redSqr(),d=this.z.redSqr();d=d.redIAdd(d);var p=this.curve._mulA(u),h=this.x.redAdd(this.y).redSqr().redISub(u).redISub(c),m=p.redAdd(c),g=m.redSub(d),v=p.redSub(c),w=h.redMul(g),C=m.redMul(v),T=h.redMul(v),I=g.redMul(m);return this.curve.point(w,C,I,T)},f.prototype._projDbl=function(){var u,c,d,p,h,m,g=this.x.redAdd(this.y).redSqr(),v=this.x.redSqr(),w=this.y.redSqr();if(this.curve.twisted){var C=(p=this.curve._mulA(v)).redAdd(w);this.zOne?(u=g.redSub(v).redSub(w).redMul(C.redSub(this.curve.two)),c=C.redMul(p.redSub(w)),d=C.redSqr().redSub(C).redSub(C)):(h=this.z.redSqr(),m=C.redSub(h).redISub(h),u=g.redSub(v).redISub(w).redMul(m),c=C.redMul(p.redSub(w)),d=C.redMul(m));}else p=v.redAdd(w),h=this.curve._mulC(this.z).redSqr(),m=p.redSub(h).redSub(h),u=this.curve._mulC(g.redISub(p)).redMul(m),c=this.curve._mulC(p).redMul(v.redISub(w)),d=p.redMul(m);return this.curve.point(u,c,d)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(u){var c=this.y.redSub(this.x).redMul(u.y.redSub(u.x)),d=this.y.redAdd(this.x).redMul(u.y.redAdd(u.x)),p=this.t.redMul(this.curve.dd).redMul(u.t),h=this.z.redMul(u.z.redAdd(u.z)),m=d.redSub(c),g=h.redSub(p),v=h.redAdd(p),w=d.redAdd(c),C=m.redMul(g),T=v.redMul(w),I=m.redMul(w),k=g.redMul(v);return this.curve.point(C,T,k,I)},f.prototype._projAdd=function(u){var c,d,p=this.z.redMul(u.z),h=p.redSqr(),m=this.x.redMul(u.x),g=this.y.redMul(u.y),v=this.curve.d.redMul(m).redMul(g),w=h.redSub(v),C=h.redAdd(v),T=this.x.redAdd(this.y).redMul(u.x.redAdd(u.y)).redISub(m).redISub(g),I=p.redMul(w).redMul(T);return this.curve.twisted?(c=p.redMul(C).redMul(g.redSub(this.curve._mulA(m))),d=w.redMul(C)):(c=p.redMul(C).redMul(g.redSub(m)),d=this.curve._mulC(w).redMul(C)),this.curve.point(I,c,d)},f.prototype.add=function(u){return this.isInfinity()?u:u.isInfinity()?this:this.curve.extended?this._extAdd(u):this._projAdd(u)},f.prototype.mul=function(u){return this._hasDoubles(u)?this.curve._fixedNafMul(this,u):this.curve._wnafMul(this,u)},f.prototype.mulAdd=function(u,c,d){return this.curve._wnafMulAdd(1,[this,c],[u,d],2,false)},f.prototype.jmulAdd=function(u,c,d){return this.curve._wnafMulAdd(1,[this,c],[u,d],2,true)},f.prototype.normalize=function(){if(this.zOne)return this;var u=this.z.redInvm();return this.x=this.x.redMul(u),this.y=this.y.redMul(u),this.t&&(this.t=this.t.redMul(u)),this.z=this.curve.one,this.zOne=true,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(u){return this===u||this.getX().cmp(u.getX())===0&&this.getY().cmp(u.getY())===0},f.prototype.eqXToP=function(u){var c=u.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(c)===0)return true;for(var d=u.clone(),p=this.curve.redN.redMul(this.z);;){if(d.iadd(this.curve.n),d.cmp(this.curve.p)>=0)return false;if(c.redIAdd(p),this.x.cmp(c)===0)return true}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.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"),a=e("./base"),s=e("../utils");function o(f){a.call(this,"mont",f),this.a=new n(f.a,16).toRed(this.red),this.b=new n(f.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(f,u,c){a.BasePoint.call(this,f,"projective"),u===null&&c===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(u,16),this.z=new n(c,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,a),t.exports=o,o.prototype.validate=function(f){var u=f.normalize().x,c=u.redSqr(),d=c.redMul(u).redAdd(c.redMul(this.a)).redAdd(u);return d.redSqrt().redSqr().cmp(d)===0},i(l,a.BasePoint),o.prototype.decodePoint=function(f,u){return this.point(s.toArray(f,u),1)},o.prototype.point=function(f,u){return new l(this,f,u)},o.prototype.pointFromJSON=function(f){return l.fromJSON(this,f)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(f,u){return new l(f,u[0],u[1]||f.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 this.z.cmpn(0)===0},l.prototype.dbl=function(){var f=this.x.redAdd(this.z).redSqr(),u=this.x.redSub(this.z).redSqr(),c=f.redSub(u),d=f.redMul(u),p=c.redMul(u.redAdd(this.curve.a24.redMul(c)));return this.curve.point(d,p)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(f,u){var c=this.x.redAdd(this.z),d=this.x.redSub(this.z),p=f.x.redAdd(f.z),h=f.x.redSub(f.z).redMul(c),m=p.redMul(d),g=u.z.redMul(h.redAdd(m).redSqr()),v=u.x.redMul(h.redISub(m).redSqr());return this.curve.point(g,v)},l.prototype.mul=function(f){for(var u=f.clone(),c=this,d=this.curve.point(null,null),p=[];u.cmpn(0)!==0;u.iushrn(1))p.push(u.andln(1));for(var h=p.length-1;h>=0;h--)p[h]===0?(c=c.diffAdd(d,this),d=d.dbl()):(d=c.diffAdd(d,this),c=c.dbl());return d},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(f){return this.getX().cmp(f.getX())===0},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"),a=e("inherits"),s=e("./base"),o=n.assert;function l(c){s.call(this,"short",c),this.a=new i(c.a,16).toRed(this.red),this.b=new i(c.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(c),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4);}function f(c,d,p,h){s.BasePoint.call(this,c,"affine"),d===null&&p===null?(this.x=null,this.y=null,this.inf=true):(this.x=new i(d,16),this.y=new i(p,16),h&&(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=false);}function u(c,d,p,h){s.BasePoint.call(this,c,"jacobian"),d===null&&p===null&&h===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(d,16),this.y=new i(p,16),this.z=new i(h,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one;}a(l,s),t.exports=l,l.prototype._getEndomorphism=function(c){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var d,p;if(c.beta)d=new i(c.beta,16).toRed(this.red);else {var h=this._getEndoRoots(this.p);d=(d=h[0].cmp(h[1])<0?h[0]:h[1]).toRed(this.red);}if(c.lambda)p=new i(c.lambda,16);else {var m=this._getEndoRoots(this.n);this.g.mul(m[0]).x.cmp(this.g.x.redMul(d))===0?p=m[0]:(p=m[1],o(this.g.mul(p).x.cmp(this.g.x.redMul(d))===0));}return {beta:d,lambda:p,basis:c.basis?c.basis.map((function(g){return {a:new i(g.a,16),b:new i(g.b,16)}})):this._getEndoBasis(p)}}},l.prototype._getEndoRoots=function(c){var d=c===this.p?this.red:i.mont(c),p=new i(2).toRed(d).redInvm(),h=p.redNeg(),m=new i(3).toRed(d).redNeg().redSqrt().redMul(p);return [h.redAdd(m).fromRed(),h.redSub(m).fromRed()]},l.prototype._getEndoBasis=function(c){for(var d,p,h,m,g,v,w,C,T,I=this.n.ushrn(Math.floor(this.n.bitLength()/2)),k=c,D=this.n.clone(),j=new i(1),F=new i(0),B=new i(0),E=new i(1),M=0;k.cmpn(0)!==0;){var L=D.div(k);C=D.sub(L.mul(k)),T=B.sub(L.mul(j));var b=E.sub(L.mul(F));if(!h&&C.cmp(I)<0)d=w.neg(),p=j,h=C.neg(),m=T;else if(h&&++M==2)break;w=C,D=k,k=C,B=j,j=T,E=F,F=b;}g=C.neg(),v=T;var y=h.sqr().add(m.sqr());return g.sqr().add(v.sqr()).cmp(y)>=0&&(g=d,v=p),h.negative&&(h=h.neg(),m=m.neg()),g.negative&&(g=g.neg(),v=v.neg()),[{a:h,b:m},{a:g,b:v}]},l.prototype._endoSplit=function(c){var d=this.endo.basis,p=d[0],h=d[1],m=h.b.mul(c).divRound(this.n),g=p.b.neg().mul(c).divRound(this.n),v=m.mul(p.a),w=g.mul(h.a),C=m.mul(p.b),T=g.mul(h.b);return {k1:c.sub(v).sub(w),k2:C.add(T).neg()}},l.prototype.pointFromX=function(c,d){(c=new i(c,16)).red||(c=c.toRed(this.red));var p=c.redSqr().redMul(c).redIAdd(c.redMul(this.a)).redIAdd(this.b),h=p.redSqrt();if(h.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");var m=h.fromRed().isOdd();return (d&&!m||!d&&m)&&(h=h.redNeg()),this.point(c,h)},l.prototype.validate=function(c){if(c.inf)return true;var d=c.x,p=c.y,h=this.a.redMul(d),m=d.redSqr().redMul(d).redIAdd(h).redIAdd(this.b);return p.redSqr().redISub(m).cmpn(0)===0},l.prototype._endoWnafMulAdd=function(c,d,p){for(var h=this._endoWnafT1,m=this._endoWnafT2,g=0;g<c.length;g++){var v=this._endoSplit(d[g]),w=c[g],C=w._getBeta();v.k1.negative&&(v.k1.ineg(),w=w.neg(true)),v.k2.negative&&(v.k2.ineg(),C=C.neg(true)),h[2*g]=w,h[2*g+1]=C,m[2*g]=v.k1,m[2*g+1]=v.k2;}for(var T=this._wnafMulAdd(1,h,m,2*g,p),I=0;I<2*g;I++)h[I]=null,m[I]=null;return T},a(f,s.BasePoint),l.prototype.point=function(c,d,p){return new f(this,c,d,p)},l.prototype.pointFromJSON=function(c,d){return f.fromJSON(this,c,d)},f.prototype._getBeta=function(){if(this.curve.endo){var c=this.precomputed;if(c&&c.beta)return c.beta;var d=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(c){var p=this.curve,h=function(m){return p.point(m.x.redMul(p.endo.beta),m.y)};c.beta=d,d.precomputed={beta:null,naf:c.naf&&{wnd:c.naf.wnd,points:c.naf.points.map(h)},doubles:c.doubles&&{step:c.doubles.step,points:c.doubles.points.map(h)}};}return d}},f.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]},f.fromJSON=function(c,d,p){typeof d=="string"&&(d=JSON.parse(d));var h=c.point(d[0],d[1],p);if(!d[2])return h;function m(v){return c.point(v[0],v[1],p)}var g=d[2];return h.precomputed={beta:null,doubles:g.doubles&&{step:g.doubles.step,points:[h].concat(g.doubles.points.map(m))},naf:g.naf&&{wnd:g.naf.wnd,points:[h].concat(g.naf.points.map(m))}},h},f.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)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(c){if(this.inf)return c;if(c.inf)return this;if(this.eq(c))return this.dbl();if(this.neg().eq(c))return this.curve.point(null,null);if(this.x.cmp(c.x)===0)return this.curve.point(null,null);var d=this.y.redSub(c.y);d.cmpn(0)!==0&&(d=d.redMul(this.x.redSub(c.x).redInvm()));var p=d.redSqr().redISub(this.x).redISub(c.x),h=d.redMul(this.x.redSub(p)).redISub(this.y);return this.curve.point(p,h)},f.prototype.dbl=function(){if(this.inf)return this;var c=this.y.redAdd(this.y);if(c.cmpn(0)===0)return this.curve.point(null,null);var d=this.curve.a,p=this.x.redSqr(),h=c.redInvm(),m=p.redAdd(p).redIAdd(p).redIAdd(d).redMul(h),g=m.redSqr().redISub(this.x.redAdd(this.x)),v=m.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,v)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(c){return c=new i(c,16),this.isInfinity()?this:this._hasDoubles(c)?this.curve._fixedNafMul(this,c):this.curve.endo?this.curve._endoWnafMulAdd([this],[c]):this.curve._wnafMul(this,c)},f.prototype.mulAdd=function(c,d,p){var h=[this,d],m=[c,p];return this.curve.endo?this.curve._endoWnafMulAdd(h,m):this.curve._wnafMulAdd(1,h,m,2)},f.prototype.jmulAdd=function(c,d,p){var h=[this,d],m=[c,p];return this.curve.endo?this.curve._endoWnafMulAdd(h,m,true):this.curve._wnafMulAdd(1,h,m,2,true)},f.prototype.eq=function(c){return this===c||this.inf===c.inf&&(this.inf||this.x.cmp(c.x)===0&&this.y.cmp(c.y)===0)},f.prototype.neg=function(c){if(this.inf)return this;var d=this.curve.point(this.x,this.y.redNeg());if(c&&this.precomputed){var p=this.precomputed,h=function(m){return m.neg()};d.precomputed={naf:p.naf&&{wnd:p.naf.wnd,points:p.naf.points.map(h)},doubles:p.doubles&&{step:p.doubles.step,points:p.doubles.points.map(h)}};}return d},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(u,s.BasePoint),l.prototype.jpoint=function(c,d,p){return new u(this,c,d,p)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var c=this.z.redInvm(),d=c.redSqr(),p=this.x.redMul(d),h=this.y.redMul(d).redMul(c);return this.curve.point(p,h)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(c){if(this.isInfinity())return c;if(c.isInfinity())return this;var d=c.z.redSqr(),p=this.z.redSqr(),h=this.x.redMul(d),m=c.x.redMul(p),g=this.y.redMul(d.redMul(c.z)),v=c.y.redMul(p.redMul(this.z)),w=h.redSub(m),C=g.redSub(v);if(w.cmpn(0)===0)return C.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=w.redSqr(),I=T.redMul(w),k=h.redMul(T),D=C.redSqr().redIAdd(I).redISub(k).redISub(k),j=C.redMul(k.redISub(D)).redISub(g.redMul(I)),F=this.z.redMul(c.z).redMul(w);return this.curve.jpoint(D,j,F)},u.prototype.mixedAdd=function(c){if(this.isInfinity())return c.toJ();if(c.isInfinity())return this;var d=this.z.redSqr(),p=this.x,h=c.x.redMul(d),m=this.y,g=c.y.redMul(d).redMul(this.z),v=p.redSub(h),w=m.redSub(g);if(v.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var C=v.redSqr(),T=C.redMul(v),I=p.redMul(C),k=w.redSqr().redIAdd(T).redISub(I).redISub(I),D=w.redMul(I.redISub(k)).redISub(m.redMul(T)),j=this.z.redMul(v);return this.curve.jpoint(k,D,j)},u.prototype.dblp=function(c){if(c===0)return this;if(this.isInfinity())return this;if(!c)return this.dbl();var d;if(this.curve.zeroA||this.curve.threeA){var p=this;for(d=0;d<c;d++)p=p.dbl();return p}var h=this.curve.a,m=this.curve.tinv,g=this.x,v=this.y,w=this.z,C=w.redSqr().redSqr(),T=v.redAdd(v);for(d=0;d<c;d++){var I=g.redSqr(),k=T.redSqr(),D=k.redSqr(),j=I.redAdd(I).redIAdd(I).redIAdd(h.redMul(C)),F=g.redMul(k),B=j.redSqr().redISub(F.redAdd(F)),E=F.redISub(B),M=j.redMul(E);M=M.redIAdd(M).redISub(D);var L=T.redMul(w);d+1<c&&(C=C.redMul(D)),g=B,w=L,T=M;}return this.curve.jpoint(g,T.redMul(m),w)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var c,d,p;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),g=m.redSqr(),v=this.x.redAdd(m).redSqr().redISub(h).redISub(g);v=v.redIAdd(v);var w=h.redAdd(h).redIAdd(h),C=w.redSqr().redISub(v).redISub(v),T=g.redIAdd(g);T=(T=T.redIAdd(T)).redIAdd(T),c=C,d=w.redMul(v.redISub(C)).redISub(T),p=this.y.redAdd(this.y);}else {var I=this.x.redSqr(),k=this.y.redSqr(),D=k.redSqr(),j=this.x.redAdd(k).redSqr().redISub(I).redISub(D);j=j.redIAdd(j);var F=I.redAdd(I).redIAdd(I),B=F.redSqr(),E=D.redIAdd(D);E=(E=E.redIAdd(E)).redIAdd(E),c=B.redISub(j).redISub(j),d=F.redMul(j.redISub(c)).redISub(E),p=(p=this.y.redMul(this.z)).redIAdd(p);}return this.curve.jpoint(c,d,p)},u.prototype._threeDbl=function(){var c,d,p;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),g=m.redSqr(),v=this.x.redAdd(m).redSqr().redISub(h).redISub(g);v=v.redIAdd(v);var w=h.redAdd(h).redIAdd(h).redIAdd(this.curve.a),C=w.redSqr().redISub(v).redISub(v);c=C;var T=g.redIAdd(g);T=(T=T.redIAdd(T)).redIAdd(T),d=w.redMul(v.redISub(C)).redISub(T),p=this.y.redAdd(this.y);}else {var I=this.z.redSqr(),k=this.y.redSqr(),D=this.x.redMul(k),j=this.x.redSub(I).redMul(this.x.redAdd(I));j=j.redAdd(j).redIAdd(j);var F=D.redIAdd(D),B=(F=F.redIAdd(F)).redAdd(F);c=j.redSqr().redISub(B),p=this.y.redAdd(this.z).redSqr().redISub(k).redISub(I);var E=k.redSqr();E=(E=(E=E.redIAdd(E)).redIAdd(E)).redIAdd(E),d=j.redMul(F.redISub(c)).redISub(E);}return this.curve.jpoint(c,d,p)},u.prototype._dbl=function(){var c=this.curve.a,d=this.x,p=this.y,h=this.z,m=h.redSqr().redSqr(),g=d.redSqr(),v=p.redSqr(),w=g.redAdd(g).redIAdd(g).redIAdd(c.redMul(m)),C=d.redAdd(d),T=(C=C.redIAdd(C)).redMul(v),I=w.redSqr().redISub(T.redAdd(T)),k=T.redISub(I),D=v.redSqr();D=(D=(D=D.redIAdd(D)).redIAdd(D)).redIAdd(D);var j=w.redMul(k).redISub(D),F=p.redAdd(p).redMul(h);return this.curve.jpoint(I,j,F)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var c=this.x.redSqr(),d=this.y.redSqr(),p=this.z.redSqr(),h=d.redSqr(),m=c.redAdd(c).redIAdd(c),g=m.redSqr(),v=this.x.redAdd(d).redSqr().redISub(c).redISub(h),w=(v=(v=(v=v.redIAdd(v)).redAdd(v).redIAdd(v)).redISub(g)).redSqr(),C=h.redIAdd(h);C=(C=(C=C.redIAdd(C)).redIAdd(C)).redIAdd(C);var T=m.redIAdd(v).redSqr().redISub(g).redISub(w).redISub(C),I=d.redMul(T);I=(I=I.redIAdd(I)).redIAdd(I);var k=this.x.redMul(w).redISub(I);k=(k=k.redIAdd(k)).redIAdd(k);var D=this.y.redMul(T.redMul(C.redISub(T)).redISub(v.redMul(w)));D=(D=(D=D.redIAdd(D)).redIAdd(D)).redIAdd(D);var j=this.z.redAdd(v).redSqr().redISub(p).redISub(w);return this.curve.jpoint(k,D,j)},u.prototype.mul=function(c,d){return c=new i(c,d),this.curve._wnafMul(this,c)},u.prototype.eq=function(c){if(c.type==="affine")return this.eq(c.toJ());if(this===c)return true;var d=this.z.redSqr(),p=c.z.redSqr();if(this.x.redMul(p).redISub(c.x.redMul(d)).cmpn(0)!==0)return false;var h=d.redMul(this.z),m=p.redMul(c.z);return this.y.redMul(m).redISub(c.y.redMul(h)).cmpn(0)===0},u.prototype.eqXToP=function(c){var d=this.z.redSqr(),p=c.toRed(this.curve.red).redMul(d);if(this.x.cmp(p)===0)return true;for(var h=c.clone(),m=this.curve.redN.redMul(d);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return false;if(p.redIAdd(m),this.x.cmp(p)===0)return true}},u.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)+">"},u.prototype.isInfinity=function(){return this.z.cmpn(0)===0};},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(e,t,r){var n,i=r,a=e("hash.js"),s=e("./curve"),o=e("./utils").assert;function l(u){u.type==="short"?this.curve=new s.short(u):u.type==="edwards"?this.curve=new s.edwards(u):this.curve=new s.mont(u),this.g=this.curve.g,this.n=this.curve.n,this.hash=u.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}function f(u,c){Object.defineProperty(i,u,{configurable:true,enumerable:true,get:function(){var d=new l(c);return Object.defineProperty(i,u,{configurable:true,enumerable:true,value:d}),d}});}i.PresetCurve=l,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:false,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:false,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:false,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:false,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"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:false,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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:false,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:false,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=e("./precomputed/secp256k1");}catch{n=void 0;}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:false,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"),a=e("../utils"),s=e("../curves"),o=e("brorand"),l=a.assert,f=e("./key"),u=e("./signature");function c(d){if(!(this instanceof c))return new c(d);typeof d=="string"&&(l(Object.prototype.hasOwnProperty.call(s,d),"Unknown curve "+d),d=s[d]),d instanceof s.PresetCurve&&(d={curve:d}),this.curve=d.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=d.curve.g,this.g.precompute(d.curve.n.bitLength()+1),this.hash=d.hash||d.curve.hash;}t.exports=c,c.prototype.keyPair=function(d){return new f(this,d)},c.prototype.keyFromPrivate=function(d,p){return f.fromPrivate(this,d,p)},c.prototype.keyFromPublic=function(d,p){return f.fromPublic(this,d,p)},c.prototype.genKeyPair=function(d){d||(d={});for(var p=new i({hash:this.hash,pers:d.pers,persEnc:d.persEnc||"utf8",entropy:d.entropy||o(this.hash.hmacStrength),entropyEnc:d.entropy&&d.entropyEnc||"utf8",nonce:this.n.toArray()}),h=this.n.byteLength(),m=this.n.sub(new n(2));;){var g=new n(p.generate(h));if(!(g.cmp(m)>0))return g.iaddn(1),this.keyFromPrivate(g)}},c.prototype._truncateToN=function(d,p){var h=8*d.byteLength()-this.n.bitLength();return h>0&&(d=d.ushrn(h)),!p&&d.cmp(this.n)>=0?d.sub(this.n):d},c.prototype.sign=function(d,p,h,m){typeof h=="object"&&(m=h,h=null),m||(m={}),p=this.keyFromPrivate(p,h),d=this._truncateToN(new n(d,16));for(var g=this.n.byteLength(),v=p.getPrivate().toArray("be",g),w=d.toArray("be",g),C=new i({hash:this.hash,entropy:v,nonce:w,pers:m.pers,persEnc:m.persEnc||"utf8"}),T=this.n.sub(new n(1)),I=0;;I++){var k=m.k?m.k(I):new n(C.generate(this.n.byteLength()));if(!((k=this._truncateToN(k,true)).cmpn(1)<=0||k.cmp(T)>=0)){var D=this.g.mul(k);if(!D.isInfinity()){var j=D.getX(),F=j.umod(this.n);if(F.cmpn(0)!==0){var B=k.invm(this.n).mul(F.mul(p.getPrivate()).iadd(d));if((B=B.umod(this.n)).cmpn(0)!==0){var E=(D.getY().isOdd()?1:0)|(j.cmp(F)!==0?2:0);return m.canonical&&B.cmp(this.nh)>0&&(B=this.n.sub(B),E^=1),new u({r:F,s:B,recoveryParam:E})}}}}}},c.prototype.verify=function(d,p,h,m){d=this._truncateToN(new n(d,16)),h=this.keyFromPublic(h,m);var g=(p=new u(p,"hex")).r,v=p.s;if(g.cmpn(1)<0||g.cmp(this.n)>=0||v.cmpn(1)<0||v.cmp(this.n)>=0)return false;var w,C=v.invm(this.n),T=C.mul(d).umod(this.n),I=C.mul(g).umod(this.n);return this.curve._maxwellTrick?!(w=this.g.jmulAdd(T,h.getPublic(),I)).isInfinity()&&w.eqXToP(g):!(w=this.g.mulAdd(T,h.getPublic(),I)).isInfinity()&&w.getX().umod(this.n).cmp(g)===0},c.prototype.recoverPubKey=function(d,p,h,m){l((3&h)===h,"The recovery param is more than two bits"),p=new u(p,m);var g=this.n,v=new n(d),w=p.r,C=p.s,T=1&h,I=h>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&I)throw new Error("Unable to find sencond key candinate");w=I?this.curve.pointFromX(w.add(this.curve.n),T):this.curve.pointFromX(w,T);var k=p.r.invm(g),D=g.sub(v).mul(k).umod(g),j=C.mul(k).umod(g);return this.g.mulAdd(D,w,j)},c.prototype.getKeyRecoveryParam=function(d,p,h,m){if((p=new u(p,m)).recoveryParam!==null)return p.recoveryParam;for(var g=0;g<4;g++){var v;try{v=this.recoverPubKey(d,p,g);}catch{continue}if(v.eq(h))return g}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 a(s,o){this.ec=s,this.priv=null,this.pub=null,o.priv&&this._importPrivate(o.priv,o.privEnc),o.pub&&this._importPublic(o.pub,o.pubEnc);}t.exports=a,a.fromPublic=function(s,o,l){return o instanceof a?o:new a(s,{pub:o,pubEnc:l})},a.fromPrivate=function(s,o,l){return o instanceof a?o:new a(s,{priv:o,privEnc:l})},a.prototype.validate=function(){var s=this.getPublic();return s.isInfinity()?{result:false,reason:"Invalid public key"}:s.validate()?s.mul(this.ec.curve.n).isInfinity()?{result:true,reason:null}:{result:false,reason:"Public key * N != O"}:{result:false,reason:"Public key is not a point"}},a.prototype.getPublic=function(s,o){return typeof s=="string"&&(o=s,s=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),o?this.pub.encode(o,s):this.pub},a.prototype.getPrivate=function(s){return s==="hex"?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(s,o){this.priv=new n(s,o||16),this.priv=this.priv.umod(this.ec.curve.n);},a.prototype._importPublic=function(s,o){if(s.x||s.y)return this.ec.curve.type==="mont"?i(s.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||i(s.x&&s.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(s.x,s.y));this.pub=this.ec.curve.decodePoint(s,o);},a.prototype.derive=function(s){return s.validate()||i(s.validate(),"public point not validated"),s.mul(this.priv).getX()},a.prototype.sign=function(s,o,l){return this.ec.sign(s,this,o,l)},a.prototype.verify=function(s,o){return this.ec.verify(s,o,this)},a.prototype.inspect=function(){return "<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};},{"../utils":419,"bn.js":420}],414:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),a=i.assert;function s(c,d){if(c instanceof s)return c;this._importDER(c,d)||(a(c.r&&c.s,"Signature without r or s"),this.r=new n(c.r,16),this.s=new n(c.s,16),c.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=c.recoveryParam);}function o(){this.place=0;}function l(c,d){var p=c[d.place++];if(!(128&p))return p;var h=15&p;if(h===0||h>4)return false;for(var m=0,g=0,v=d.place;g<h;g++,v++)m<<=8,m|=c[v],m>>>=0;return !(m<=127)&&(d.place=v,m)}function f(c){for(var d=0,p=c.length-1;!c[d]&&!(128&c[d+1])&&d<p;)d++;return d===0?c:c.slice(d)}function u(c,d){if(d<128)c.push(d);else {var p=1+(Math.log(d)/Math.LN2>>>3);for(c.push(128|p);--p;)c.push(d>>>(p<<3)&255);c.push(d);}}t.exports=s,s.prototype._importDER=function(c,d){c=i.toArray(c,d);var p=new o;if(c[p.place++]!==48)return false;var h=l(c,p);if(h===false||h+p.place!==c.length||c[p.place++]!==2)return false;var m=l(c,p);if(m===false)return false;var g=c.slice(p.place,m+p.place);if(p.place+=m,c[p.place++]!==2)return false;var v=l(c,p);if(v===false||c.length!==v+p.place)return false;var w=c.slice(p.place,v+p.place);if(g[0]===0){if(!(128&g[1]))return false;g=g.slice(1);}if(w[0]===0){if(!(128&w[1]))return false;w=w.slice(1);}return this.r=new n(g),this.s=new n(w),this.recoveryParam=null,true},s.prototype.toDER=function(c){var d=this.r.toArray(),p=this.s.toArray();for(128&d[0]&&(d=[0].concat(d)),128&p[0]&&(p=[0].concat(p)),d=f(d),p=f(p);!(p[0]||128&p[1]);)p=p.slice(1);var h=[2];u(h,d.length),(h=h.concat(d)).push(2),u(h,p.length);var m=h.concat(p),g=[48];return u(g,m.length),g=g.concat(m),i.encode(g,c)};},{"../utils":419,"bn.js":420}],415:[function(e,t,r){var n=e("hash.js"),i=e("../curves"),a=e("../utils"),s=a.assert,o=a.parseBytes,l=e("./key"),f=e("./signature");function u(c){if(s(c==="ed25519","only tested with ed25519 so far"),!(this instanceof u))return new u(c);c=i[c].curve,this.curve=c,this.g=c.g,this.g.precompute(c.n.bitLength()+1),this.pointClass=c.point().constructor,this.encodingLength=Math.ceil(c.n.bitLength()/8),this.hash=n.sha512;}t.exports=u,u.prototype.sign=function(c,d){c=o(c);var p=this.keyFromSecret(d),h=this.hashInt(p.messagePrefix(),c),m=this.g.mul(h),g=this.encodePoint(m),v=this.hashInt(g,p.pubBytes(),c).mul(p.priv()),w=h.add(v).umod(this.curve.n);return this.makeSignature({R:m,S:w,Rencoded:g})},u.prototype.verify=function(c,d,p){c=o(c),d=this.makeSignature(d);var h=this.keyFromPublic(p),m=this.hashInt(d.Rencoded(),h.pubBytes(),c),g=this.g.mul(d.S());return d.R().add(h.pub().mul(m)).eq(g)},u.prototype.hashInt=function(){for(var c=this.hash(),d=0;d<arguments.length;d++)c.update(arguments[d]);return a.intFromLE(c.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(c){return l.fromPublic(this,c)},u.prototype.keyFromSecret=function(c){return l.fromSecret(this,c)},u.prototype.makeSignature=function(c){return c instanceof f?c:new f(this,c)},u.prototype.encodePoint=function(c){var d=c.getY().toArray("le",this.encodingLength);return d[this.encodingLength-1]|=c.getX().isOdd()?128:0,d},u.prototype.decodePoint=function(c){var d=(c=a.parseBytes(c)).length-1,p=c.slice(0,d).concat(-129&c[d]),h=(128&c[d])!=0,m=a.intFromLE(p);return this.curve.pointFromY(m,h)},u.prototype.encodeInt=function(c){return c.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(c){return a.intFromLE(c)},u.prototype.isPoint=function(c){return c 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,a=n.parseBytes,s=n.cachedProperty;function o(l,f){this.eddsa=l,this._secret=a(f.secret),l.isPoint(f.pub)?this._pub=f.pub:this._pubBytes=a(f.pub);}o.fromPublic=function(l,f){return f instanceof o?f:new o(l,{pub:f})},o.fromSecret=function(l,f){return f instanceof o?f:new o(l,{secret:f})},o.prototype.secret=function(){return this._secret},s(o,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(o,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(o,"privBytes",(function(){var l=this.eddsa,f=this.hash(),u=l.encodingLength-1,c=f.slice(0,l.encodingLength);return c[0]&=248,c[u]&=127,c[u]|=64,c})),s(o,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(o,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(o,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),o.prototype.sign=function(l){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(l,this)},o.prototype.verify=function(l,f){return this.eddsa.verify(l,f,this)},o.prototype.getSecret=function(l){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),l)},o.prototype.getPublic=function(l){return n.encode(this.pubBytes(),l)},t.exports=o;},{"../utils":419}],417:[function(e,t,r){var n=e("bn.js"),i=e("../utils"),a=i.assert,s=i.cachedProperty,o=i.parseBytes;function l(f,u){this.eddsa=f,typeof u!="object"&&(u=o(u)),Array.isArray(u)&&(u={R:u.slice(0,f.encodingLength),S:u.slice(f.encodingLength)}),a(u.R&&u.S,"Signature without R or S"),f.isPoint(u.R)&&(this._R=u.R),u.S instanceof n&&(this._S=u.S),this._Rencoded=Array.isArray(u.R)?u.R:u.Rencoded,this._Sencoded=Array.isArray(u.S)?u.S:u.Sencoded;}s(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(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"),a=e("minimalistic-assert"),s=e("minimalistic-crypto-utils");n.assert=a,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(o,l,f){var u=new Array(Math.max(o.bitLength(),f)+1);u.fill(0);for(var c=1<<l+1,d=o.clone(),p=0;p<u.length;p++){var h,m=d.andln(c-1);d.isOdd()?(h=m>(c>>1)-1?(c>>1)-m:m,d.isubn(h)):h=0,u[p]=h,d.iushrn(1);}return u},n.getJSF=function(o,l){var f=[[],[]];o=o.clone(),l=l.clone();for(var u,c=0,d=0;o.cmpn(-c)>0||l.cmpn(-d)>0;){var p,h,m=o.andln(3)+c&3,g=l.andln(3)+d&3;m===3&&(m=-1),g===3&&(g=-1),p=(1&m)==0?0:(u=o.andln(7)+c&7)!==3&&u!==5||g!==2?m:-m,f[0].push(p),h=(1&g)==0?0:(u=l.andln(7)+d&7)!==3&&u!==5||m!==2?g:-g,f[1].push(h),2*c===p+1&&(c=1-c),2*d===h+1&&(d=1-d),o.iushrn(1),l.iushrn(1);}return f},n.cachedProperty=function(o,l,f){var u="_"+l;o.prototype[l]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)};},n.parseBytes=function(o){return typeof o=="string"?n.toArray(o,"hex"):o},n.intFromLE=function(o){return new i(o,"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(k){var D=function(){};return D.prototype=k,new D},i=Object.keys||function(k){var D=[];for(var j in k)Object.prototype.hasOwnProperty.call(k,j)&&D.push(j);return j},a=Function.prototype.bind||function(k){var D=this;return function(){return D.apply(k,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;}t.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var o,l=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),o=f.x===0;}catch{o=false;}function u(k){return k._maxListeners===void 0?s.defaultMaxListeners:k._maxListeners}function c(k,D,j){if(D)k.call(j);else for(var F=k.length,B=I(k,F),E=0;E<F;++E)B[E].call(j);}function d(k,D,j,F){if(D)k.call(j,F);else for(var B=k.length,E=I(k,B),M=0;M<B;++M)E[M].call(j,F);}function p(k,D,j,F,B){if(D)k.call(j,F,B);else for(var E=k.length,M=I(k,E),L=0;L<E;++L)M[L].call(j,F,B);}function h(k,D,j,F,B,E){if(D)k.call(j,F,B,E);else for(var M=k.length,L=I(k,M),b=0;b<M;++b)L[b].call(j,F,B,E);}function m(k,D,j,F){if(D)k.apply(j,F);else for(var B=k.length,E=I(k,B),M=0;M<B;++M)E[M].apply(j,F);}function g(k,D,j,F){var B,E,M;if(typeof j!="function")throw new TypeError('"listener" argument must be a function');if((E=k._events)?(E.newListener&&(k.emit("newListener",D,j.listener?j.listener:j),E=k._events),M=E[D]):(E=k._events=n(null),k._eventsCount=0),M){if(typeof M=="function"?M=E[D]=F?[j,M]:[M,j]:F?M.unshift(j):M.push(j),!M.warned&&(B=u(k))&&B>0&&M.length>B){M.warned=true;var L=new Error("Possible EventEmitter memory leak detected. "+M.length+' "'+String(D)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');L.name="MaxListenersExceededWarning",L.emitter=k,L.type=D,L.count=M.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",L.name,L.message);}}else M=E[D]=j,++k._eventsCount;return k}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=true,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 k=new Array(arguments.length),D=0;D<k.length;++D)k[D]=arguments[D];this.listener.apply(this.target,k);}}function w(k,D,j){var F={fired:false,wrapFn:void 0,target:k,type:D,listener:j},B=a.call(v,F);return B.listener=j,F.wrapFn=B,B}function C(k,D,j){var F=k._events;if(!F)return [];var B=F[D];return B?typeof B=="function"?j?[B.listener||B]:[B]:j?(function(E){for(var M=new Array(E.length),L=0;L<M.length;++L)M[L]=E[L].listener||E[L];return M})(B):I(B,B.length):[]}function T(k){var D=this._events;if(D){var j=D[k];if(typeof j=="function")return 1;if(j)return j.length}return 0}function I(k,D){for(var j=new Array(D),F=0;F<D;++F)j[F]=k[F];return j}o?Object.defineProperty(s,"defaultMaxListeners",{enumerable:true,get:function(){return l},set:function(k){if(typeof k!="number"||k<0||k!=k)throw new TypeError('"defaultMaxListeners" must be a positive number');l=k;}}):s.defaultMaxListeners=l,s.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||isNaN(k))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=k,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(k){var D,j,F,B,E,M,L=k==="error";if(M=this._events)L=L&&M.error==null;else if(!L)return false;if(L){if(arguments.length>1&&(D=arguments[1]),D instanceof Error)throw D;var b=new Error('Unhandled "error" event. ('+D+")");throw b.context=D,b}if(!(j=M[k]))return false;var y=typeof j=="function";switch(F=arguments.length){case 1:c(j,y,this);break;case 2:d(j,y,this,arguments[1]);break;case 3:p(j,y,this,arguments[1],arguments[2]);break;case 4:h(j,y,this,arguments[1],arguments[2],arguments[3]);break;default:for(B=new Array(F-1),E=1;E<F;E++)B[E-1]=arguments[E];m(j,y,this,B);}return true},s.prototype.addListener=function(k,D){return g(this,k,D,false)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(k,D){return g(this,k,D,true)},s.prototype.once=function(k,D){if(typeof D!="function")throw new TypeError('"listener" argument must be a function');return this.on(k,w(this,k,D)),this},s.prototype.prependOnceListener=function(k,D){if(typeof D!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(k,w(this,k,D)),this},s.prototype.removeListener=function(k,D){var j,F,B,E,M;if(typeof D!="function")throw new TypeError('"listener" argument must be a function');if(!(F=this._events))return this;if(!(j=F[k]))return this;if(j===D||j.listener===D)--this._eventsCount==0?this._events=n(null):(delete F[k],F.removeListener&&this.emit("removeListener",k,j.listener||D));else if(typeof j!="function"){for(B=-1,E=j.length-1;E>=0;E--)if(j[E]===D||j[E].listener===D){M=j[E].listener,B=E;break}if(B<0)return this;B===0?j.shift():(function(L,b){for(var y=b,x=y+1,_=L.length;x<_;y+=1,x+=1)L[y]=L[x];L.pop();})(j,B),j.length===1&&(F[k]=j[0]),F.removeListener&&this.emit("removeListener",k,M||D);}return this},s.prototype.removeAllListeners=function(k){var D,j,F;if(!(j=this._events))return this;if(!j.removeListener)return arguments.length===0?(this._events=n(null),this._eventsCount=0):j[k]&&(--this._eventsCount==0?this._events=n(null):delete j[k]),this;if(arguments.length===0){var B,E=i(j);for(F=0;F<E.length;++F)(B=E[F])!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if(typeof(D=j[k])=="function")this.removeListener(k,D);else if(D)for(F=D.length-1;F>=0;F--)this.removeListener(k,D[F]);return this},s.prototype.listeners=function(k){return C(this,k,true)},s.prototype.rawListeners=function(k){return C(this,k,false)},s.listenerCount=function(k,D){return typeof k.listenerCount=="function"?k.listenerCount(D):T.call(k,D)},s.prototype.listenerCount=T,s.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(a,s,o,l){if(n.isBuffer(a)||(a=n.from(a,"binary")),s&&(n.isBuffer(s)||(s=n.from(s,"binary")),s.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=o/8,u=n.alloc(f),c=n.alloc(l||0),d=n.alloc(0);f>0||l>0;){var p=new i;p.update(d),p.update(a),s&&p.update(s),d=p.digest();var h=0;if(f>0){var m=u.length-f;h=Math.min(f,d.length),d.copy(u,m,0,h),f-=h;}if(h<d.length&&l>0){var g=c.length-l,v=Math.min(l,d.length-h);d.copy(c,g,h,h+v),l-=v;}}return d.fill(0),{key:u,iv:c}};},{"md5.js":450,"safe-buffer":494}],424:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),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:true,get:function(){return n.format}}),Object.defineProperty(r,"write",{enumerable:true,get:function(){return n.write}}),Object.defineProperty(r,"writeToStream",{enumerable:true,get:function(){return n.writeToStream}}),Object.defineProperty(r,"writeToBuffer",{enumerable:true,get:function(){return n.writeToBuffer}}),Object.defineProperty(r,"writeToString",{enumerable:true,get:function(){return n.writeToString}}),Object.defineProperty(r,"writeToPath",{enumerable:true,get:function(){return n.writeToPath}}),Object.defineProperty(r,"CsvFormatterStream",{enumerable:true,get:function(){return n.CsvFormatterStream}}),Object.defineProperty(r,"FormatterOptions",{enumerable:true,get:function(){return n.FormatterOptions}});var i=e("@fast-csv/parse");Object.defineProperty(r,"parse",{enumerable:true,get:function(){return i.parse}}),Object.defineProperty(r,"parseString",{enumerable:true,get:function(){return i.parseString}}),Object.defineProperty(r,"parseStream",{enumerable:true,get:function(){return i.parseStream}}),Object.defineProperty(r,"parseFile",{enumerable:true,get:function(){return i.parseFile}}),Object.defineProperty(r,"ParserOptions",{enumerable:true,get:function(){return i.ParserOptions}}),Object.defineProperty(r,"CsvParserStream",{enumerable:true,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 a(s){i.call(this),this._block=n.allocUnsafe(s),this._blockSize=s,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=false;}e("inherits")(a,i),a.prototype._transform=function(s,o,l){var f=null;try{this.update(s,o);}catch(u){f=u;}l(f);},a.prototype._flush=function(s){var o=null;try{this.push(this.digest());}catch(l){o=l;}s(o);},a.prototype.update=function(s,o){if((function(p,h){if(!n.isBuffer(p)&&typeof p!="string")throw new TypeError(h+" must be a string or a buffer")})(s,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(s)||(s=n.from(s,o));for(var l=this._block,f=0;this._blockOffset+s.length-f>=this._blockSize;){for(var u=this._blockOffset;u<this._blockSize;)l[u++]=s[f++];this._update(),this._blockOffset=0;}for(;f<s.length;)l[this._blockOffset++]=s[f++];for(var c=0,d=8*s.length;d>0;++c)this._length[c]+=d,(d=this._length[c]/4294967296|0)>0&&(this._length[c]-=4294967296*d);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(s){if(this._finalized)throw new Error("Digest already called");this._finalized=true;var o=this._digest();s!==void 0&&(o=o.toString(s)),this._block.fill(0),this._blockOffset=0;for(var l=0;l<4;++l)this._length[l]=0;return o},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a;},{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 a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32;}r.BlockHash=a,a.prototype.update=function(s,o){if(s=n.toArray(s,o),this.pending?this.pending=this.pending.concat(s):this.pending=s,this.pendingTotal+=s.length,this.pending.length>=this._delta8){var l=(s=this.pending).length%this._delta8;this.pending=s.slice(s.length-l,s.length),this.pending.length===0&&(this.pending=null),s=n.join32(s,0,s.length-l,this.endian);for(var f=0;f<s.length;f+=this._delta32)this._update(s,f,f+this._delta32);}return this},a.prototype.digest=function(s){return this.update(this._pad()),i(this.pending===null),this._digest(s)},a.prototype._pad=function(){var s=this.pendingTotal,o=this._delta8,l=o-(s+this.padLength)%o,f=new Array(l+this.padLength);f[0]=128;for(var u=1;u<l;u++)f[u]=0;if(s<<=3,this.endian==="big"){for(var c=8;c<this.padLength;c++)f[u++]=0;f[u++]=0,f[u++]=0,f[u++]=0,f[u++]=0,f[u++]=s>>>24&255,f[u++]=s>>>16&255,f[u++]=s>>>8&255,f[u++]=255&s;}else for(f[u++]=255&s,f[u++]=s>>>8&255,f[u++]=s>>>16&255,f[u++]=s>>>24&255,f[u++]=0,f[u++]=0,f[u++]=0,f[u++]=0,c=8;c<this.padLength;c++)f[u++]=0;return f};},{"./utils":437,"minimalistic-assert":453}],428:[function(e,t,r){var n=e("./utils"),i=e("minimalistic-assert");function a(s,o,l){if(!(this instanceof a))return new a(s,o,l);this.Hash=s,this.blockSize=s.blockSize/8,this.outSize=s.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(o,l));}t.exports=a,a.prototype._init=function(s){s.length>this.blockSize&&(s=new this.Hash().update(s).digest()),i(s.length<=this.blockSize);for(var o=s.length;o<this.blockSize;o++)s.push(0);for(o=0;o<s.length;o++)s[o]^=54;for(this.inner=new this.Hash().update(s),o=0;o<s.length;o++)s[o]^=106;this.outer=new this.Hash().update(s);},a.prototype.update=function(s,o){return this.inner.update(s,o),this},a.prototype.digest=function(s){return this.outer.update(this.inner.digest()),this.outer.digest(s)};},{"./utils":437,"minimalistic-assert":453}],429:[function(e,t,r){var n=e("./utils"),i=e("./common"),a=n.rotl32,s=n.sum32,o=n.sum32_3,l=n.sum32_4,f=i.BlockHash;function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little";}function c(w,C,T,I){return w<=15?C^T^I:w<=31?C&T|~C&I:w<=47?(C|~T)^I:w<=63?C&I|T&~I:C^(T|~I)}function d(w){return w<=15?0:w<=31?1518500249:w<=47?1859775393:w<=63?2400959708:2840853838}function p(w){return w<=15?1352829926:w<=31?1548603684:w<=47?1836072691:w<=63?2053994217:0}n.inherits(u,f),r.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(w,C){for(var T=this.h[0],I=this.h[1],k=this.h[2],D=this.h[3],j=this.h[4],F=T,B=I,E=k,M=D,L=j,b=0;b<80;b++){var y=s(a(l(T,c(b,I,k,D),w[h[b]+C],d(b)),g[b]),j);T=j,j=D,D=a(k,10),k=I,I=y,y=s(a(l(F,c(79-b,B,E,M),w[m[b]+C],p(b)),v[b]),L),F=L,L=M,M=a(E,10),E=B,B=y;}y=o(this.h[1],k,M),this.h[1]=o(this.h[2],D,L),this.h[2]=o(this.h[3],j,F),this.h[3]=o(this.h[4],T,B),this.h[4]=o(this.h[0],I,E),this.h[0]=y;},u.prototype._digest=function(w){return w==="hex"?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var h=[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],g=[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],v=[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"),a=e("./common"),s=n.rotl32,o=n.sum32,l=n.sum32_5,f=a.ft_1,u=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80);}n.inherits(d,u),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(p,h){for(var m=this.W,g=0;g<16;g++)m[g]=p[h+g];for(;g<m.length;g++)m[g]=s(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);var v=this.h[0],w=this.h[1],C=this.h[2],T=this.h[3],I=this.h[4];for(g=0;g<m.length;g++){var k=~~(g/20),D=l(s(v,5),f(k,w,C,T),I,m[g],c[k]);I=T,T=C,C=s(w,30),w=v,v=D;}this.h[0]=o(this.h[0],v),this.h[1]=o(this.h[1],w),this.h[2]=o(this.h[2],C),this.h[3]=o(this.h[3],T),this.h[4]=o(this.h[4],I);},d.prototype._digest=function(p){return p==="hex"?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 a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428];}n.inherits(a,i),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(s){return s==="hex"?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"),a=e("./common"),s=e("minimalistic-assert"),o=n.sum32,l=n.sum32_4,f=n.sum32_5,u=a.ch32,c=a.maj32,d=a.s0_256,p=a.s1_256,h=a.g0_256,m=a.g1_256,g=i.BlockHash,v=[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 w(){if(!(this instanceof w))return new w;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64);}n.inherits(w,g),t.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(C,T){for(var I=this.W,k=0;k<16;k++)I[k]=C[T+k];for(;k<I.length;k++)I[k]=l(m(I[k-2]),I[k-7],h(I[k-15]),I[k-16]);var D=this.h[0],j=this.h[1],F=this.h[2],B=this.h[3],E=this.h[4],M=this.h[5],L=this.h[6],b=this.h[7];for(s(this.k.length===I.length),k=0;k<I.length;k++){var y=f(b,p(E),u(E,M,L),this.k[k],I[k]),x=o(d(D),c(D,j,F));b=L,L=M,M=E,E=o(B,y),B=F,F=j,j=D,D=o(y,x);}this.h[0]=o(this.h[0],D),this.h[1]=o(this.h[1],j),this.h[2]=o(this.h[2],F),this.h[3]=o(this.h[3],B),this.h[4]=o(this.h[4],E),this.h[5]=o(this.h[5],M),this.h[6]=o(this.h[6],L),this.h[7]=o(this.h[7],b);},w.prototype._digest=function(C){return C==="hex"?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 a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428];}n.inherits(a,i),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(s){return s==="hex"?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"),a=e("minimalistic-assert"),s=n.rotr64_hi,o=n.rotr64_lo,l=n.shr64_hi,f=n.shr64_lo,u=n.sum64,c=n.sum64_hi,d=n.sum64_lo,p=n.sum64_4_hi,h=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=i.BlockHash,w=[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 C(){if(!(this instanceof C))return new C;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160);}function T(x,_,S,R,z){var U=x&S^~x&z;return U<0&&(U+=4294967296),U}function I(x,_,S,R,z,U){var H=_&R^~_&U;return H<0&&(H+=4294967296),H}function k(x,_,S,R,z){var U=x&S^x&z^S&z;return U<0&&(U+=4294967296),U}function D(x,_,S,R,z,U){var H=_&R^_&U^R&U;return H<0&&(H+=4294967296),H}function j(x,_){var S=s(x,_,28)^s(_,x,2)^s(_,x,7);return S<0&&(S+=4294967296),S}function F(x,_){var S=o(x,_,28)^o(_,x,2)^o(_,x,7);return S<0&&(S+=4294967296),S}function B(x,_){var S=s(x,_,14)^s(x,_,18)^s(_,x,9);return S<0&&(S+=4294967296),S}function E(x,_){var S=o(x,_,14)^o(x,_,18)^o(_,x,9);return S<0&&(S+=4294967296),S}function M(x,_){var S=s(x,_,1)^s(x,_,8)^l(x,_,7);return S<0&&(S+=4294967296),S}function L(x,_){var S=o(x,_,1)^o(x,_,8)^f(x,_,7);return S<0&&(S+=4294967296),S}function b(x,_){var S=s(x,_,19)^s(_,x,29)^l(x,_,6);return S<0&&(S+=4294967296),S}function y(x,_){var S=o(x,_,19)^o(_,x,29)^f(x,_,6);return S<0&&(S+=4294967296),S}n.inherits(C,v),t.exports=C,C.blockSize=1024,C.outSize=512,C.hmacStrength=192,C.padLength=128,C.prototype._prepareBlock=function(x,_){for(var S=this.W,R=0;R<32;R++)S[R]=x[_+R];for(;R<S.length;R+=2){var z=b(S[R-4],S[R-3]),U=y(S[R-4],S[R-3]),H=S[R-14],q=S[R-13],N=M(S[R-30],S[R-29]),V=L(S[R-30],S[R-29]),O=S[R-32],A=S[R-31];S[R]=p(z,U,H,q,N,V,O,A),S[R+1]=h(z,U,H,q,N,V,O,A);}},C.prototype._update=function(x,_){this._prepareBlock(x,_);var S=this.W,R=this.h[0],z=this.h[1],U=this.h[2],H=this.h[3],q=this.h[4],N=this.h[5],V=this.h[6],O=this.h[7],A=this.h[8],P=this.h[9],W=this.h[10],Z=this.h[11],$=this.h[12],K=this.h[13],te=this.h[14],J=this.h[15];a(this.k.length===S.length);for(var Y=0;Y<S.length;Y+=2){var ne=te,re=J,ie=B(A,P),oe=E(A,P),se=T(A,P,W,Z,$),le=I(A,P,W,Z,$,K),ge=this.k[Y],he=this.k[Y+1],be=S[Y],Me=S[Y+1],ye=m(ne,re,ie,oe,se,le,ge,he,be,Me),Se=g(ne,re,ie,oe,se,le,ge,he,be,Me);ne=j(R,z),re=F(R,z),ie=k(R,z,U,H,q),oe=D(R,z,U,H,q,N);var We=c(ne,re,ie,oe),Ne=d(ne,re,ie,oe);te=$,J=K,$=W,K=Z,W=A,Z=P,A=c(V,O,ye,Se),P=d(O,O,ye,Se),V=q,O=N,q=U,N=H,U=R,H=z,R=c(ye,Se,We,Ne),z=d(ye,Se,We,Ne);}u(this.h,0,R,z),u(this.h,2,U,H),u(this.h,4,q,N),u(this.h,6,V,O),u(this.h,8,A,P),u(this.h,10,W,Z),u(this.h,12,$,K),u(this.h,14,te,J);},C.prototype._digest=function(x){return x==="hex"?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(o,l,f){return o&l^~o&f}function a(o,l,f){return o&l^o&f^l&f}function s(o,l,f){return o^l^f}r.ft_1=function(o,l,f,u){return o===0?i(l,f,u):o===1||o===3?s(l,f,u):o===2?a(l,f,u):void 0},r.ch32=i,r.maj32=a,r.p32=s,r.s0_256=function(o){return n(o,2)^n(o,13)^n(o,22)},r.s1_256=function(o){return n(o,6)^n(o,11)^n(o,25)},r.g0_256=function(o){return n(o,7)^n(o,18)^o>>>3},r.g1_256=function(o){return n(o,17)^n(o,19)^o>>>10};},{"../utils":437}],437:[function(e,t,r){var n=e("minimalistic-assert"),i=e("inherits");function a(f,u){return (64512&f.charCodeAt(u))==55296&&!(u<0||u+1>=f.length)&&(64512&f.charCodeAt(u+1))==56320}function s(f){return (f>>>24|f>>>8&65280|f<<8&16711680|(255&f)<<24)>>>0}function o(f){return f.length===1?"0"+f:f}function l(f){return f.length===7?"0"+f:f.length===6?"00"+f:f.length===5?"000"+f:f.length===4?"0000"+f:f.length===3?"00000"+f:f.length===2?"000000"+f:f.length===1?"0000000"+f:f}r.inherits=i,r.toArray=function(f,u){if(Array.isArray(f))return f.slice();if(!f)return [];var c=[];if(typeof f=="string")if(u){if(u==="hex")for((f=f.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(f="0"+f),p=0;p<f.length;p+=2)c.push(parseInt(f[p]+f[p+1],16));}else for(var d=0,p=0;p<f.length;p++){var h=f.charCodeAt(p);h<128?c[d++]=h:h<2048?(c[d++]=h>>6|192,c[d++]=63&h|128):a(f,p)?(h=65536+((1023&h)<<10)+(1023&f.charCodeAt(++p)),c[d++]=h>>18|240,c[d++]=h>>12&63|128,c[d++]=h>>6&63|128,c[d++]=63&h|128):(c[d++]=h>>12|224,c[d++]=h>>6&63|128,c[d++]=63&h|128);}else for(p=0;p<f.length;p++)c[p]=0|f[p];return c},r.toHex=function(f){for(var u="",c=0;c<f.length;c++)u+=o(f[c].toString(16));return u},r.htonl=s,r.toHex32=function(f,u){for(var c="",d=0;d<f.length;d++){var p=f[d];u==="little"&&(p=s(p)),c+=l(p.toString(16));}return c},r.zero2=o,r.zero8=l,r.join32=function(f,u,c,d){var p=c-u;n(p%4==0);for(var h=new Array(p/4),m=0,g=u;m<h.length;m++,g+=4){var v;v=d==="big"?f[g]<<24|f[g+1]<<16|f[g+2]<<8|f[g+3]:f[g+3]<<24|f[g+2]<<16|f[g+1]<<8|f[g],h[m]=v>>>0;}return h},r.split32=function(f,u){for(var c=new Array(4*f.length),d=0,p=0;d<f.length;d++,p+=4){var h=f[d];u==="big"?(c[p]=h>>>24,c[p+1]=h>>>16&255,c[p+2]=h>>>8&255,c[p+3]=255&h):(c[p+3]=h>>>24,c[p+2]=h>>>16&255,c[p+1]=h>>>8&255,c[p]=255&h);}return c},r.rotr32=function(f,u){return f>>>u|f<<32-u},r.rotl32=function(f,u){return f<<u|f>>>32-u},r.sum32=function(f,u){return f+u>>>0},r.sum32_3=function(f,u,c){return f+u+c>>>0},r.sum32_4=function(f,u,c,d){return f+u+c+d>>>0},r.sum32_5=function(f,u,c,d,p){return f+u+c+d+p>>>0},r.sum64=function(f,u,c,d){var p=f[u],h=d+f[u+1]>>>0,m=(h<d?1:0)+c+p;f[u]=m>>>0,f[u+1]=h;},r.sum64_hi=function(f,u,c,d){return (u+d>>>0<u?1:0)+f+c>>>0},r.sum64_lo=function(f,u,c,d){return u+d>>>0},r.sum64_4_hi=function(f,u,c,d,p,h,m,g){var v=0,w=u;return v+=(w=w+d>>>0)<u?1:0,v+=(w=w+h>>>0)<h?1:0,f+c+p+m+(v+=(w=w+g>>>0)<g?1:0)>>>0},r.sum64_4_lo=function(f,u,c,d,p,h,m,g){return u+d+h+g>>>0},r.sum64_5_hi=function(f,u,c,d,p,h,m,g,v,w){var C=0,T=u;return C+=(T=T+d>>>0)<u?1:0,C+=(T=T+h>>>0)<h?1:0,C+=(T=T+g>>>0)<g?1:0,f+c+p+m+v+(C+=(T=T+w>>>0)<w?1:0)>>>0},r.sum64_5_lo=function(f,u,c,d,p,h,m,g,v,w){return u+d+h+g+w>>>0},r.rotr64_hi=function(f,u,c){return (u<<32-c|f>>>c)>>>0},r.rotr64_lo=function(f,u,c){return (f<<32-c|u>>>c)>>>0},r.shr64_hi=function(f,u,c){return f>>>c},r.shr64_lo=function(f,u,c){return (f<<32-c|u>>>c)>>>0};},{inherits:440,"minimalistic-assert":453}],438:[function(e,t,r){var n=e("hash.js"),i=e("minimalistic-crypto-utils"),a=e("minimalistic-assert");function s(o){if(!(this instanceof s))return new s(o);this.hash=o.hash,this.predResist=!!o.predResist,this.outLen=this.hash.outSize,this.minEntropy=o.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var l=i.toArray(o.entropy,o.entropyEnc||"hex"),f=i.toArray(o.nonce,o.nonceEnc||"hex"),u=i.toArray(o.pers,o.persEnc||"hex");a(l.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(l,f,u);}t.exports=s,s.prototype._init=function(o,l,f){var u=o.concat(l).concat(f);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var c=0;c<this.V.length;c++)this.K[c]=0,this.V[c]=1;this._update(u),this._reseed=1,this.reseedInterval=281474976710656;},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(o){var l=this._hmac().update(this.V).update([0]);o&&(l=l.update(o)),this.K=l.digest(),this.V=this._hmac().update(this.V).digest(),o&&(this.K=this._hmac().update(this.V).update([1]).update(o).digest(),this.V=this._hmac().update(this.V).digest());},s.prototype.reseed=function(o,l,f,u){typeof l!="string"&&(u=f,f=l,l=null),o=i.toArray(o,l),f=i.toArray(f,u),a(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(o.concat(f||[])),this._reseed=1;},s.prototype.generate=function(o,l,f,u){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof l!="string"&&(u=f,f=l,l=null),f&&(f=i.toArray(f,u||"hex"),this._update(f));for(var c=[];c.length<o;)this.V=this._hmac().update(this.V).digest(),c=c.concat(this.V);var d=c.slice(0,o);return this._update(f),this._reseed++,i.encode(d,l)};},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(e,t,r){r.read=function(n,i,a,s,o){var l,f,u=8*o-s-1,c=(1<<u)-1,d=c>>1,p=-7,h=a?o-1:0,m=a?-1:1,g=n[i+h];for(h+=m,l=g&(1<<-p)-1,g>>=-p,p+=u;p>0;l=256*l+n[i+h],h+=m,p-=8);for(f=l&(1<<-p)-1,l>>=-p,p+=s;p>0;f=256*f+n[i+h],h+=m,p-=8);if(l===0)l=1-d;else {if(l===c)return f?NaN:1/0*(g?-1:1);f+=Math.pow(2,s),l-=d;}return (g?-1:1)*f*Math.pow(2,l-s)},r.write=function(n,i,a,s,o,l){var f,u,c,d=8*l-o-1,p=(1<<d)-1,h=p>>1,m=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=s?0:l-1,v=s?1:-1,w=i<0||i===0&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(u=isNaN(i)?1:0,f=p):(f=Math.floor(Math.log(i)/Math.LN2),i*(c=Math.pow(2,-f))<1&&(f--,c*=2),(i+=f+h>=1?m/c:m*Math.pow(2,1-h))*c>=2&&(f++,c/=2),f+h>=p?(u=0,f=p):f+h>=1?(u=(i*c-1)*Math.pow(2,o),f+=h):(u=i*Math.pow(2,h-1)*Math.pow(2,o),f=0));o>=8;n[a+g]=255&u,g+=v,u/=256,o-=8);for(f=f<<o|u,d+=o;d>0;n[a+g]=255&f,g+=v,f/=256,d-=8);n[a+g-v]|=128*w;};},{}],440:[function(e,t,r){typeof Object.create=="function"?t.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:false,writable:true,configurable:true}}));}:t.exports=function(n,i){if(i){n.super_=i;var a=function(){};a.prototype=i.prototype,n.prototype=new a,n.prototype.constructor=n;}};},{}],441:[function(e,t,r){(function(n,i,a,s,o,l,f,u){(function(){(function(c){typeof r=="object"&&t!==void 0?t.exports=c():(typeof window<"u"?window:i!==void 0?i:typeof self<"u"?self:this).JSZip=c();})((function(){return (function c(d,p,h){function m(w,C){if(!p[w]){if(!d[w]){var T=typeof e=="function"&&e;if(!C&&T)return T(w,true);if(g)return g(w,true);var I=new Error("Cannot find module '"+w+"'");throw I.code="MODULE_NOT_FOUND",I}var k=p[w]={exports:{}};d[w][0].call(k.exports,(function(D){return m(d[w][1][D]||D)}),k,k.exports,c,d,p,h);}return p[w].exports}for(var g=typeof e=="function"&&e,v=0;v<h.length;v++)m(h[v]);return m})({1:[function(c,d,p){var h=c("./utils"),m=c("./support"),g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";p.encode=function(v){for(var w,C,T,I,k,D,j,F=[],B=0,E=v.length,M=E,L=h.getTypeOf(v)!=="string";B<v.length;)M=E-B,T=L?(w=v[B++],C=B<E?v[B++]:0,B<E?v[B++]:0):(w=v.charCodeAt(B++),C=B<E?v.charCodeAt(B++):0,B<E?v.charCodeAt(B++):0),I=w>>2,k=(3&w)<<4|C>>4,D=1<M?(15&C)<<2|T>>6:64,j=2<M?63&T:64,F.push(g.charAt(I)+g.charAt(k)+g.charAt(D)+g.charAt(j));return F.join("")},p.decode=function(v){var w,C,T,I,k,D,j=0,F=0,B="data:";if(v.substr(0,B.length)===B)throw new Error("Invalid base64 input, it looks like a data url.");var E,M=3*(v=v.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(v.charAt(v.length-1)===g.charAt(64)&&M--,v.charAt(v.length-2)===g.charAt(64)&&M--,M%1!=0)throw new Error("Invalid base64 input, bad content length.");for(E=m.uint8array?new Uint8Array(0|M):new Array(0|M);j<v.length;)w=g.indexOf(v.charAt(j++))<<2|(I=g.indexOf(v.charAt(j++)))>>4,C=(15&I)<<4|(k=g.indexOf(v.charAt(j++)))>>2,T=(3&k)<<6|(D=g.indexOf(v.charAt(j++))),E[F++]=w,k!==64&&(E[F++]=C),D!==64&&(E[F++]=T);return E};},{"./support":30,"./utils":32}],2:[function(c,d,p){var h=c("./external"),m=c("./stream/DataWorker"),g=c("./stream/Crc32Probe"),v=c("./stream/DataLengthProbe");function w(C,T,I,k,D){this.compressedSize=C,this.uncompressedSize=T,this.crc32=I,this.compression=k,this.compressedContent=D;}w.prototype={getContentWorker:function(){var C=new m(h.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new v("data_length")),T=this;return C.on("end",(function(){if(this.streamInfo.data_length!==T.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),C},getCompressedWorker:function(){return new m(h.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},w.createWorkerFrom=function(C,T,I){return C.pipe(new g).pipe(new v("uncompressedSize")).pipe(T.compressWorker(I)).pipe(new v("compressedSize")).withStreamInfo("compression",T)},d.exports=w;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(c,d,p){var h=c("./stream/GenericWorker");p.STORE={magic:"\0\0",compressWorker:function(){return new h("STORE compression")},uncompressWorker:function(){return new h("STORE decompression")}},p.DEFLATE=c("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(c,d,p){var h=c("./utils"),m=(function(){for(var g,v=[],w=0;w<256;w++){g=w;for(var C=0;C<8;C++)g=1&g?3988292384^g>>>1:g>>>1;v[w]=g;}return v})();d.exports=function(g,v){return g!==void 0&&g.length?h.getTypeOf(g)!=="string"?(function(w,C,T,I){var k=m,D=0+T;w^=-1;for(var j=0;j<D;j++)w=w>>>8^k[255&(w^C[j])];return -1^w})(0|v,g,g.length):(function(w,C,T,I){var k=m,D=0+T;w^=-1;for(var j=0;j<D;j++)w=w>>>8^k[255&(w^C.charCodeAt(j))];return -1^w})(0|v,g,g.length):0};},{"./utils":32}],5:[function(c,d,p){p.base64=false,p.binary=false,p.dir=false,p.createFolders=true,p.date=null,p.compression=null,p.compressionOptions=null,p.comment=null,p.unixPermissions=null,p.dosPermissions=null;},{}],6:[function(c,d,p){var h;h=typeof Promise<"u"?Promise:c("lie"),d.exports={Promise:h};},{lie:37}],7:[function(c,d,p){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=c("pako"),g=c("./utils"),v=c("./stream/GenericWorker"),w=h?"uint8array":"array";function C(T,I){v.call(this,"FlateWorker/"+T),this._pako=null,this._pakoAction=T,this._pakoOptions=I,this.meta={};}p.magic="\b\0",g.inherits(C,v),C.prototype.processChunk=function(T){this.meta=T.meta,this._pako===null&&this._createPako(),this._pako.push(g.transformTo(w,T.data),false);},C.prototype.flush=function(){v.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],true);},C.prototype.cleanUp=function(){v.prototype.cleanUp.call(this),this._pako=null;},C.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var T=this;this._pako.onData=function(I){T.push({data:I,meta:T.meta});};},p.compressWorker=function(T){return new C("Deflate",T)},p.uncompressWorker=function(){return new C("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(c,d,p){function h(k,D){var j,F="";for(j=0;j<D;j++)F+=String.fromCharCode(255&k),k>>>=8;return F}function m(k,D,j,F,B,E){var M,L,b=k.file,y=k.compression,x=E!==w.utf8encode,_=g.transformTo("string",E(b.name)),S=g.transformTo("string",w.utf8encode(b.name)),R=b.comment,z=g.transformTo("string",E(R)),U=g.transformTo("string",w.utf8encode(R)),H=S.length!==b.name.length,q=U.length!==R.length,N="",V="",O="",A=b.dir,P=b.date,W={crc32:0,compressedSize:0,uncompressedSize:0};D&&!j||(W.crc32=k.crc32,W.compressedSize=k.compressedSize,W.uncompressedSize=k.uncompressedSize);var Z=0;D&&(Z|=8),x||!H&&!q||(Z|=2048);var $=0,K=0;A&&($|=16),B==="UNIX"?(K=798,$|=(function(J,Y){var ne=J;return J||(ne=Y?16893:33204),(65535&ne)<<16})(b.unixPermissions,A)):(K=20,$|=(function(J){return 63&(J||0)})(b.dosPermissions)),M=P.getUTCHours(),M<<=6,M|=P.getUTCMinutes(),M<<=5,M|=P.getUTCSeconds()/2,L=P.getUTCFullYear()-1980,L<<=4,L|=P.getUTCMonth()+1,L<<=5,L|=P.getUTCDate(),H&&(V=h(1,1)+h(C(_),4)+S,N+="up"+h(V.length,2)+V),q&&(O=h(1,1)+h(C(z),4)+U,N+="uc"+h(O.length,2)+O);var te="";return te+=`
|
|
18
|
+
\0`,te+=h(Z,2),te+=y.magic,te+=h(M,2),te+=h(L,2),te+=h(W.crc32,4),te+=h(W.compressedSize,4),te+=h(W.uncompressedSize,4),te+=h(_.length,2),te+=h(N.length,2),{fileRecord:T.LOCAL_FILE_HEADER+te+_+N,dirRecord:T.CENTRAL_FILE_HEADER+h(K,2)+te+h(z.length,2)+"\0\0\0\0"+h($,4)+h(F,4)+_+N+z}}var g=c("../utils"),v=c("../stream/GenericWorker"),w=c("../utf8"),C=c("../crc32"),T=c("../signature");function I(k,D,j,F){v.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=D,this.zipPlatform=j,this.encodeFileName=F,this.streamFiles=k,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}g.inherits(I,v),I.prototype.push=function(k){var D=k.meta.percent||0,j=this.entriesCount,F=this._sources.length;this.accumulate?this.contentBuffer.push(k):(this.bytesWritten+=k.data.length,v.prototype.push.call(this,{data:k.data,meta:{currentFile:this.currentFile,percent:j?(D+100*(j-F-1))/j:100}}));},I.prototype.openedSource=function(k){this.currentSourceOffset=this.bytesWritten,this.currentFile=k.file.name;var D=this.streamFiles&&!k.file.dir;if(D){var j=m(k,D,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:j.fileRecord,meta:{percent:0}});}else this.accumulate=true;},I.prototype.closedSource=function(k){this.accumulate=false;var D=this.streamFiles&&!k.file.dir,j=m(k,D,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(j.dirRecord),D)this.push({data:(function(F){return T.DATA_DESCRIPTOR+h(F.crc32,4)+h(F.compressedSize,4)+h(F.uncompressedSize,4)})(k),meta:{percent:100}});else for(this.push({data:j.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},I.prototype.flush=function(){for(var k=this.bytesWritten,D=0;D<this.dirRecords.length;D++)this.push({data:this.dirRecords[D],meta:{percent:100}});var j=this.bytesWritten-k,F=(function(B,E,M,L,b){var y=g.transformTo("string",b(L));return T.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(B,2)+h(B,2)+h(E,4)+h(M,4)+h(y.length,2)+y})(this.dirRecords.length,j,k,this.zipComment,this.encodeFileName);this.push({data:F,meta:{percent:100}});},I.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();},I.prototype.registerPrevious=function(k){this._sources.push(k);var D=this;return k.on("data",(function(j){D.processChunk(j);})),k.on("end",(function(){D.closedSource(D.previous.streamInfo),D._sources.length?D.prepareNextSource():D.end();})),k.on("error",(function(j){D.error(j);})),this},I.prototype.resume=function(){return !!v.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),true):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),true))},I.prototype.error=function(k){var D=this._sources;if(!v.prototype.error.call(this,k))return false;for(var j=0;j<D.length;j++)try{D[j].error(k);}catch{}return true},I.prototype.lock=function(){v.prototype.lock.call(this);for(var k=this._sources,D=0;D<k.length;D++)k[D].lock();},d.exports=I;},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(c,d,p){var h=c("../compressions"),m=c("./ZipFileWorker");p.generateWorker=function(g,v,w){var C=new m(v.streamFiles,w,v.platform,v.encodeFileName),T=0;try{g.forEach((function(I,k){T++;var D=(function(E,M){var L=E||M,b=h[L];if(!b)throw new Error(L+" is not a valid compression method !");return b})(k.options.compression,v.compression),j=k.options.compressionOptions||v.compressionOptions||{},F=k.dir,B=k.date;k._compressWorker(D,j).withStreamInfo("file",{name:I,dir:F,date:B,comment:k.comment||"",unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions}).pipe(C);})),C.entriesCount=T;}catch(I){C.error(I);}return C};},{"../compressions":3,"./ZipFileWorker":8}],10:[function(c,d,p){function h(){if(!(this instanceof h))return new h;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 m=new h;for(var g in this)typeof this[g]!="function"&&(m[g]=this[g]);return m};}(h.prototype=c("./object")).loadAsync=c("./load"),h.support=c("./support"),h.defaults=c("./defaults"),h.version="3.10.1",h.loadAsync=function(m,g){return new h().loadAsync(m,g)},h.external=c("./external"),d.exports=h;},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(c,d,p){var h=c("./utils"),m=c("./external"),g=c("./utf8"),v=c("./zipEntries"),w=c("./stream/Crc32Probe"),C=c("./nodejsUtils");function T(I){return new m.Promise((function(k,D){var j=I.decompressed.getContentWorker().pipe(new w);j.on("error",(function(F){D(F);})).on("end",(function(){j.streamInfo.crc32!==I.decompressed.crc32?D(new Error("Corrupted zip : CRC32 mismatch")):k();})).resume();}))}d.exports=function(I,k){var D=this;return k=h.extend(k||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:g.utf8decode}),C.isNode&&C.isStream(I)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):h.prepareContent("the loaded zip file",I,true,k.optimizedBinaryString,k.base64).then((function(j){var F=new v(k);return F.load(j),F})).then((function(j){var F=[m.Promise.resolve(j)],B=j.files;if(k.checkCRC32)for(var E=0;E<B.length;E++)F.push(T(B[E]));return m.Promise.all(F)})).then((function(j){for(var F=j.shift(),B=F.files,E=0;E<B.length;E++){var M=B[E],L=M.fileNameStr,b=h.resolve(M.fileNameStr);D.file(b,M.decompressed,{binary:true,optimizedBinaryString:true,date:M.date,dir:M.dir,comment:M.fileCommentStr.length?M.fileCommentStr:null,unixPermissions:M.unixPermissions,dosPermissions:M.dosPermissions,createFolders:k.createFolders}),M.dir||(D.file(b).unsafeOriginalName=L);}return F.zipComment.length&&(D.comment=F.zipComment),D}))};},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(c,d,p){var h=c("../utils"),m=c("../stream/GenericWorker");function g(v,w){m.call(this,"Nodejs stream input adapter for "+v),this._upstreamEnded=false,this._bindStream(w);}h.inherits(g,m),g.prototype._bindStream=function(v){var w=this;(this._stream=v).pause(),v.on("data",(function(C){w.push({data:C,meta:{percent:0}});})).on("error",(function(C){w.isPaused?this.generatedError=C:w.error(C);})).on("end",(function(){w.isPaused?w._upstreamEnded=true:w.end();}));},g.prototype.pause=function(){return !!m.prototype.pause.call(this)&&(this._stream.pause(),true)},g.prototype.resume=function(){return !!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),true)},d.exports=g;},{"../stream/GenericWorker":28,"../utils":32}],13:[function(c,d,p){var h=c("readable-stream").Readable;function m(g,v,w){h.call(this,v),this._helper=g;var C=this;g.on("data",(function(T,I){C.push(T)||C._helper.pause(),w&&w(I);})).on("error",(function(T){C.emit("error",T);})).on("end",(function(){C.push(null);}));}c("../utils").inherits(m,h),m.prototype._read=function(){this._helper.resume();},d.exports=m;},{"../utils":32,"readable-stream":16}],14:[function(c,d,p){d.exports={isNode:a!==void 0,newBufferFrom:function(h,m){if(a.from&&a.from!==Uint8Array.from)return a.from(h,m);if(typeof h=="number")throw new Error('The "data" argument must not be a number');return new a(h,m)},allocBuffer:function(h){if(a.alloc)return a.alloc(h);var m=new a(h);return m.fill(0),m},isBuffer:function(h){return a.isBuffer(h)},isStream:function(h){return h&&typeof h.on=="function"&&typeof h.pause=="function"&&typeof h.resume=="function"}};},{}],15:[function(c,d,p){function h(b,y,x){var _,S=g.getTypeOf(y),R=g.extend(x||{},C);R.date=R.date||new Date,R.compression!==null&&(R.compression=R.compression.toUpperCase()),typeof R.unixPermissions=="string"&&(R.unixPermissions=parseInt(R.unixPermissions,8)),R.unixPermissions&&16384&R.unixPermissions&&(R.dir=true),R.dosPermissions&&16&R.dosPermissions&&(R.dir=true),R.dir&&(b=B(b)),R.createFolders&&(_=F(b))&&E.call(this,_,true);var z=S==="string"&&R.binary===false&&R.base64===false;x&&x.binary!==void 0||(R.binary=!z),(y instanceof T&&y.uncompressedSize===0||R.dir||!y||y.length===0)&&(R.base64=false,R.binary=true,y="",R.compression="STORE",S="string");var U;U=y instanceof T||y instanceof v?y:D.isNode&&D.isStream(y)?new j(b,y):g.prepareContent(b,y,R.binary,R.optimizedBinaryString,R.base64);var H=new I(b,U,R);this.files[b]=H;}var m=c("./utf8"),g=c("./utils"),v=c("./stream/GenericWorker"),w=c("./stream/StreamHelper"),C=c("./defaults"),T=c("./compressedObject"),I=c("./zipObject"),k=c("./generate"),D=c("./nodejsUtils"),j=c("./nodejs/NodejsStreamInputAdapter"),F=function(b){b.slice(-1)==="/"&&(b=b.substring(0,b.length-1));var y=b.lastIndexOf("/");return 0<y?b.substring(0,y):""},B=function(b){return b.slice(-1)!=="/"&&(b+="/"),b},E=function(b,y){return y=y!==void 0?y:C.createFolders,b=B(b),this.files[b]||h.call(this,b,null,{dir:true,createFolders:y}),this.files[b]};function M(b){return Object.prototype.toString.call(b)==="[object RegExp]"}var L={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b){var y,x,_;for(y in this.files)_=this.files[y],(x=y.slice(this.root.length,y.length))&&y.slice(0,this.root.length)===this.root&&b(x,_);},filter:function(b){var y=[];return this.forEach((function(x,_){b(x,_)&&y.push(_);})),y},file:function(b,y,x){if(arguments.length!==1)return b=this.root+b,h.call(this,b,y,x),this;if(M(b)){var _=b;return this.filter((function(R,z){return !z.dir&&_.test(R)}))}var S=this.files[this.root+b];return S&&!S.dir?S:null},folder:function(b){if(!b)return this;if(M(b))return this.filter((function(S,R){return R.dir&&b.test(S)}));var y=this.root+b,x=E.call(this,y),_=this.clone();return _.root=x.name,_},remove:function(b){b=this.root+b;var y=this.files[b];if(y||(b.slice(-1)!=="/"&&(b+="/"),y=this.files[b]),y&&!y.dir)delete this.files[b];else for(var x=this.filter((function(S,R){return R.name.slice(0,b.length)===b})),_=0;_<x.length;_++)delete this.files[x[_].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b){var y,x={};try{if((x=g.extend(b||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");g.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var _=x.comment||this.comment||"";y=k.generateWorker(this,x,_);}catch(S){(y=new v("error")).error(S);}return new w(y,x.type||"string",x.mimeType)},generateAsync:function(b,y){return this.generateInternalStream(b).accumulate(y)},generateNodeStream:function(b,y){return (b=b||{}).type||(b.type="nodebuffer"),this.generateInternalStream(b).toNodejsStream(y)}};d.exports=L;},{"./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(c,d,p){d.exports=c("stream");},{stream:void 0}],17:[function(c,d,p){var h=c("./DataReader");function m(g){h.call(this,g);for(var v=0;v<this.data.length;v++)g[v]=255&g[v];}c("../utils").inherits(m,h),m.prototype.byteAt=function(g){return this.data[this.zero+g]},m.prototype.lastIndexOfSignature=function(g){for(var v=g.charCodeAt(0),w=g.charCodeAt(1),C=g.charCodeAt(2),T=g.charCodeAt(3),I=this.length-4;0<=I;--I)if(this.data[I]===v&&this.data[I+1]===w&&this.data[I+2]===C&&this.data[I+3]===T)return I-this.zero;return -1},m.prototype.readAndCheckSignature=function(g){var v=g.charCodeAt(0),w=g.charCodeAt(1),C=g.charCodeAt(2),T=g.charCodeAt(3),I=this.readData(4);return v===I[0]&&w===I[1]&&C===I[2]&&T===I[3]},m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return [];var v=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,v},d.exports=m;},{"../utils":32,"./DataReader":18}],18:[function(c,d,p){var h=c("../utils");function m(g){this.data=g,this.length=g.length,this.index=0,this.zero=0;}m.prototype={checkOffset:function(g){this.checkIndex(this.index+g);},checkIndex:function(g){if(this.length<this.zero+g||g<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+g+"). Corrupted zip ?")},setIndex:function(g){this.checkIndex(g),this.index=g;},skip:function(g){this.setIndex(this.index+g);},byteAt:function(){},readInt:function(g){var v,w=0;for(this.checkOffset(g),v=this.index+g-1;v>=this.index;v--)w=(w<<8)+this.byteAt(v);return this.index+=g,w},readString:function(g){return h.transformTo("string",this.readData(g))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var g=this.readInt(4);return new Date(Date.UTC(1980+(g>>25&127),(g>>21&15)-1,g>>16&31,g>>11&31,g>>5&63,(31&g)<<1))}},d.exports=m;},{"../utils":32}],19:[function(c,d,p){var h=c("./Uint8ArrayReader");function m(g){h.call(this,g);}c("../utils").inherits(m,h),m.prototype.readData=function(g){this.checkOffset(g);var v=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,v},d.exports=m;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(c,d,p){var h=c("./DataReader");function m(g){h.call(this,g);}c("../utils").inherits(m,h),m.prototype.byteAt=function(g){return this.data.charCodeAt(this.zero+g)},m.prototype.lastIndexOfSignature=function(g){return this.data.lastIndexOf(g)-this.zero},m.prototype.readAndCheckSignature=function(g){return g===this.readData(4)},m.prototype.readData=function(g){this.checkOffset(g);var v=this.data.slice(this.zero+this.index,this.zero+this.index+g);return this.index+=g,v},d.exports=m;},{"../utils":32,"./DataReader":18}],21:[function(c,d,p){var h=c("./ArrayReader");function m(g){h.call(this,g);}c("../utils").inherits(m,h),m.prototype.readData=function(g){if(this.checkOffset(g),g===0)return new Uint8Array(0);var v=this.data.subarray(this.zero+this.index,this.zero+this.index+g);return this.index+=g,v},d.exports=m;},{"../utils":32,"./ArrayReader":17}],22:[function(c,d,p){var h=c("../utils"),m=c("../support"),g=c("./ArrayReader"),v=c("./StringReader"),w=c("./NodeBufferReader"),C=c("./Uint8ArrayReader");d.exports=function(T){var I=h.getTypeOf(T);return h.checkSupport(I),I!=="string"||m.uint8array?I==="nodebuffer"?new w(T):m.uint8array?new C(h.transformTo("uint8array",T)):new g(h.transformTo("array",T)):new v(T)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(c,d,p){p.LOCAL_FILE_HEADER="PK",p.CENTRAL_FILE_HEADER="PK",p.CENTRAL_DIRECTORY_END="PK",p.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",p.ZIP64_CENTRAL_DIRECTORY_END="PK",p.DATA_DESCRIPTOR="PK\x07\b";},{}],24:[function(c,d,p){var h=c("./GenericWorker"),m=c("../utils");function g(v){h.call(this,"ConvertWorker to "+v),this.destType=v;}m.inherits(g,h),g.prototype.processChunk=function(v){this.push({data:m.transformTo(this.destType,v.data),meta:v.meta});},d.exports=g;},{"../utils":32,"./GenericWorker":28}],25:[function(c,d,p){var h=c("./GenericWorker"),m=c("../crc32");function g(){h.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}c("../utils").inherits(g,h),g.prototype.processChunk=function(v){this.streamInfo.crc32=m(v.data,this.streamInfo.crc32||0),this.push(v);},d.exports=g;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(c,d,p){var h=c("../utils"),m=c("./GenericWorker");function g(v){m.call(this,"DataLengthProbe for "+v),this.propName=v,this.withStreamInfo(v,0);}h.inherits(g,m),g.prototype.processChunk=function(v){if(v){var w=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=w+v.data.length;}m.prototype.processChunk.call(this,v);},d.exports=g;},{"../utils":32,"./GenericWorker":28}],27:[function(c,d,p){var h=c("../utils"),m=c("./GenericWorker");function g(v){m.call(this,"DataWorker");var w=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,v.then((function(C){w.dataIsReady=true,w.data=C,w.max=C&&C.length||0,w.type=h.getTypeOf(C),w.isPaused||w._tickAndRepeat();}),(function(C){w.error(C);}));}h.inherits(g,m),g.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null;},g.prototype.resume=function(){return !!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,h.delay(this._tickAndRepeat,[],this)),true)},g.prototype._tickAndRepeat=function(){this._tickScheduled=false,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));},g.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var v=null,w=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case "string":v=this.data.substring(this.index,w);break;case "uint8array":v=this.data.subarray(this.index,w);break;case "array":case "nodebuffer":v=this.data.slice(this.index,w);}return this.index=w,this.push({data:v,meta:{percent:this.max?this.index/this.max*100:0}})},d.exports=g;},{"../utils":32,"./GenericWorker":28}],28:[function(c,d,p){function h(m){this.name=m||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null;}h.prototype={push:function(m){this.emit("data",m);},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(m){this.emit("error",m);}return true},error:function(m){return !this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=true,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),true)},on:function(m,g){return this._listeners[m].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(m,g){if(this._listeners[m])for(var v=0;v<this._listeners[m].length;v++)this._listeners[m][v].call(this,g);},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var g=this;return m.on("data",(function(v){g.processChunk(v);})),m.on("end",(function(){g.end();})),m.on("error",(function(v){g.error(v);})),this},pause:function(){return !this.isPaused&&!this.isFinished&&(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;var m=this.isPaused=false;return this.generatedError&&(this.error(this.generatedError),m=true),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m);},withStreamInfo:function(m,g){return this.extraStreamInfo[m]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock();},toString:function(){var m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},d.exports=h;},{}],29:[function(c,d,p){var h=c("../utils"),m=c("./ConvertWorker"),g=c("./GenericWorker"),v=c("../base64"),w=c("../support"),C=c("../external"),T=null;if(w.nodestream)try{T=c("../nodejs/NodejsStreamOutputAdapter");}catch{}function I(k,D,j){var F=D;switch(D){case "blob":case "arraybuffer":F="uint8array";break;case "base64":F="string";}try{this._internalType=F,this._outputType=D,this._mimeType=j,h.checkSupport(F),this._worker=k.pipe(new m(F)),k.lock();}catch(B){this._worker=new g("error"),this._worker.error(B);}}I.prototype={accumulate:function(k){return (function(D,j){return new C.Promise((function(F,B){var E=[],M=D._internalType,L=D._outputType,b=D._mimeType;D.on("data",(function(y,x){E.push(y),j&&j(x);})).on("error",(function(y){E=[],B(y);})).on("end",(function(){try{var y=(function(x,_,S){switch(x){case "blob":return h.newBlob(h.transformTo("arraybuffer",_),S);case "base64":return v.encode(_);default:return h.transformTo(x,_)}})(L,(function(x,_){var S,R=0,z=null,U=0;for(S=0;S<_.length;S++)U+=_[S].length;switch(x){case "string":return _.join("");case "array":return Array.prototype.concat.apply([],_);case "uint8array":for(z=new Uint8Array(U),S=0;S<_.length;S++)z.set(_[S],R),R+=_[S].length;return z;case "nodebuffer":return a.concat(_);default:throw new Error("concat : unsupported type '"+x+"'")}})(M,E),b);F(y);}catch(x){B(x);}E=[];})).resume();}))})(this,k)},on:function(k,D){var j=this;return k==="data"?this._worker.on(k,(function(F){D.call(j,F.data,F.meta);})):this._worker.on(k,(function(){h.delay(D,arguments,j);})),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(k){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new T(this,{objectMode:this._outputType!=="nodebuffer"},k)}},d.exports=I;},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(c,d,p){if(p.base64=true,p.array=true,p.string=true,p.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",p.nodebuffer=a!==void 0,p.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")p.blob=false;else {var h=new ArrayBuffer(0);try{p.blob=new Blob([h],{type:"application/zip"}).size===0;}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(h),p.blob=m.getBlob("application/zip").size===0;}catch{p.blob=false;}}}try{p.nodestream=!!c("readable-stream").Readable;}catch{p.nodestream=false;}},{"readable-stream":16}],31:[function(c,d,p){for(var h=c("./utils"),m=c("./support"),g=c("./nodejsUtils"),v=c("./stream/GenericWorker"),w=new Array(256),C=0;C<256;C++)w[C]=252<=C?6:248<=C?5:240<=C?4:224<=C?3:192<=C?2:1;function T(){v.call(this,"utf-8 decode"),this.leftOver=null;}function I(){v.call(this,"utf-8 encode");}w[254]=w[254]=1,p.utf8encode=function(k){return m.nodebuffer?g.newBufferFrom(k,"utf-8"):(function(D){var j,F,B,E,M,L=D.length,b=0;for(E=0;E<L;E++)(64512&(F=D.charCodeAt(E)))==55296&&E+1<L&&(64512&(B=D.charCodeAt(E+1)))==56320&&(F=65536+(F-55296<<10)+(B-56320),E++),b+=F<128?1:F<2048?2:F<65536?3:4;for(j=m.uint8array?new Uint8Array(b):new Array(b),E=M=0;M<b;E++)(64512&(F=D.charCodeAt(E)))==55296&&E+1<L&&(64512&(B=D.charCodeAt(E+1)))==56320&&(F=65536+(F-55296<<10)+(B-56320),E++),F<128?j[M++]=F:(F<2048?j[M++]=192|F>>>6:(F<65536?j[M++]=224|F>>>12:(j[M++]=240|F>>>18,j[M++]=128|F>>>12&63),j[M++]=128|F>>>6&63),j[M++]=128|63&F);return j})(k)},p.utf8decode=function(k){return m.nodebuffer?h.transformTo("nodebuffer",k).toString("utf-8"):(function(D){var j,F,B,E,M=D.length,L=new Array(2*M);for(j=F=0;j<M;)if((B=D[j++])<128)L[F++]=B;else if(4<(E=w[B]))L[F++]=65533,j+=E-1;else {for(B&=E===2?31:E===3?15:7;1<E&&j<M;)B=B<<6|63&D[j++],E--;1<E?L[F++]=65533:B<65536?L[F++]=B:(B-=65536,L[F++]=55296|B>>10&1023,L[F++]=56320|1023&B);}return L.length!==F&&(L.subarray?L=L.subarray(0,F):L.length=F),h.applyFromCharCode(L)})(k=h.transformTo(m.uint8array?"uint8array":"array",k))},h.inherits(T,v),T.prototype.processChunk=function(k){var D=h.transformTo(m.uint8array?"uint8array":"array",k.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var j=D;(D=new Uint8Array(j.length+this.leftOver.length)).set(this.leftOver,0),D.set(j,this.leftOver.length);}else D=this.leftOver.concat(D);this.leftOver=null;}var F=(function(E,M){var L;for((M=M||E.length)>E.length&&(M=E.length),L=M-1;0<=L&&(192&E[L])==128;)L--;return L<0||L===0?M:L+w[E[L]]>M?L:M})(D),B=D;F!==D.length&&(m.uint8array?(B=D.subarray(0,F),this.leftOver=D.subarray(F,D.length)):(B=D.slice(0,F),this.leftOver=D.slice(F,D.length))),this.push({data:p.utf8decode(B),meta:k.meta});},T.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:p.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},p.Utf8DecodeWorker=T,h.inherits(I,v),I.prototype.processChunk=function(k){this.push({data:p.utf8encode(k.data),meta:k.meta});},p.Utf8EncodeWorker=I;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(c,d,p){var h=c("./support"),m=c("./base64"),g=c("./nodejsUtils"),v=c("./external");function w(j){return j}function C(j,F){for(var B=0;B<j.length;++B)F[B]=255&j.charCodeAt(B);return F}c("setimmediate"),p.newBlob=function(j,F){p.checkSupport("blob");try{return new Blob([j],{type:F})}catch{try{var B=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return B.append(j),B.getBlob(F)}catch{throw new Error("Bug : can't construct the Blob.")}}};var T={stringifyByChunk:function(j,F,B){var E=[],M=0,L=j.length;if(L<=B)return String.fromCharCode.apply(null,j);for(;M<L;)F==="array"||F==="nodebuffer"?E.push(String.fromCharCode.apply(null,j.slice(M,Math.min(M+B,L)))):E.push(String.fromCharCode.apply(null,j.subarray(M,Math.min(M+B,L)))),M+=B;return E.join("")},stringifyByChar:function(j){for(var F="",B=0;B<j.length;B++)F+=String.fromCharCode(j[B]);return F},applyCanBeUsed:{uint8array:(function(){try{return h.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return false}})(),nodebuffer:(function(){try{return h.nodebuffer&&String.fromCharCode.apply(null,g.allocBuffer(1)).length===1}catch{return false}})()}};function I(j){var F=65536,B=p.getTypeOf(j),E=true;if(B==="uint8array"?E=T.applyCanBeUsed.uint8array:B==="nodebuffer"&&(E=T.applyCanBeUsed.nodebuffer),E)for(;1<F;)try{return T.stringifyByChunk(j,B,F)}catch{F=Math.floor(F/2);}return T.stringifyByChar(j)}function k(j,F){for(var B=0;B<j.length;B++)F[B]=j[B];return F}p.applyFromCharCode=I;var D={};D.string={string:w,array:function(j){return C(j,new Array(j.length))},arraybuffer:function(j){return D.string.uint8array(j).buffer},uint8array:function(j){return C(j,new Uint8Array(j.length))},nodebuffer:function(j){return C(j,g.allocBuffer(j.length))}},D.array={string:I,array:w,arraybuffer:function(j){return new Uint8Array(j).buffer},uint8array:function(j){return new Uint8Array(j)},nodebuffer:function(j){return g.newBufferFrom(j)}},D.arraybuffer={string:function(j){return I(new Uint8Array(j))},array:function(j){return k(new Uint8Array(j),new Array(j.byteLength))},arraybuffer:w,uint8array:function(j){return new Uint8Array(j)},nodebuffer:function(j){return g.newBufferFrom(new Uint8Array(j))}},D.uint8array={string:I,array:function(j){return k(j,new Array(j.length))},arraybuffer:function(j){return j.buffer},uint8array:w,nodebuffer:function(j){return g.newBufferFrom(j)}},D.nodebuffer={string:I,array:function(j){return k(j,new Array(j.length))},arraybuffer:function(j){return D.nodebuffer.uint8array(j).buffer},uint8array:function(j){return k(j,new Uint8Array(j.length))},nodebuffer:w},p.transformTo=function(j,F){if(F=F||"",!j)return F;p.checkSupport(j);var B=p.getTypeOf(F);return D[B][j](F)},p.resolve=function(j){for(var F=j.split("/"),B=[],E=0;E<F.length;E++){var M=F[E];M==="."||M===""&&E!==0&&E!==F.length-1||(M===".."?B.pop():B.push(M));}return B.join("/")},p.getTypeOf=function(j){return typeof j=="string"?"string":Object.prototype.toString.call(j)==="[object Array]"?"array":h.nodebuffer&&g.isBuffer(j)?"nodebuffer":h.uint8array&&j instanceof Uint8Array?"uint8array":h.arraybuffer&&j instanceof ArrayBuffer?"arraybuffer":void 0},p.checkSupport=function(j){if(!h[j.toLowerCase()])throw new Error(j+" is not supported by this platform")},p.MAX_VALUE_16BITS=65535,p.MAX_VALUE_32BITS=-1,p.pretty=function(j){var F,B,E="";for(B=0;B<(j||"").length;B++)E+="\\x"+((F=j.charCodeAt(B))<16?"0":"")+F.toString(16).toUpperCase();return E},p.delay=function(j,F,B){u((function(){j.apply(B||null,F||[]);}));},p.inherits=function(j,F){function B(){}B.prototype=F.prototype,j.prototype=new B;},p.extend=function(){var j,F,B={};for(j=0;j<arguments.length;j++)for(F in arguments[j])Object.prototype.hasOwnProperty.call(arguments[j],F)&&B[F]===void 0&&(B[F]=arguments[j][F]);return B},p.prepareContent=function(j,F,B,E,M){return v.Promise.resolve(F).then((function(L){return h.blob&&(L instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(L))!==-1)&&typeof FileReader<"u"?new v.Promise((function(b,y){var x=new FileReader;x.onload=function(_){b(_.target.result);},x.onerror=function(_){y(_.target.error);},x.readAsArrayBuffer(L);})):L})).then((function(L){var b=p.getTypeOf(L);return b?(b==="arraybuffer"?L=p.transformTo("uint8array",L):b==="string"&&(M?L=m.decode(L):B&&E!==true&&(L=(function(y){return C(y,h.uint8array?new Uint8Array(y.length):new Array(y.length))})(L))),L):v.Promise.reject(new Error("Can't read the data of '"+j+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))};},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(c,d,p){var h=c("./reader/readerFor"),m=c("./utils"),g=c("./signature"),v=c("./zipEntry"),w=c("./support");function C(T){this.files=[],this.loadOptions=T;}C.prototype={checkSignature:function(T){if(!this.reader.readAndCheckSignature(T)){this.reader.index-=4;var I=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(I)+", expected "+m.pretty(T)+")")}},isSignature:function(T,I){var k=this.reader.index;this.reader.setIndex(T);var D=this.reader.readString(4)===I;return this.reader.setIndex(k),D},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 T=this.reader.readData(this.zipCommentLength),I=w.uint8array?"uint8array":"array",k=m.transformTo(I,T);this.zipComment=this.loadOptions.decodeFileName(k);},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 T,I,k,D=this.zip64EndOfCentralSize-44;0<D;)T=this.reader.readInt(2),I=this.reader.readInt(4),k=this.reader.readData(I),this.zip64ExtensibleData[T]={id:T,length:I,value:k};},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 T,I;for(T=0;T<this.files.length;T++)I=this.files[T],this.reader.setIndex(I.localHeaderOffset),this.checkSignature(g.LOCAL_FILE_HEADER),I.readLocalPart(this.reader),I.handleUTF8(),I.processAttributes();},readCentralDir:function(){var T;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(g.CENTRAL_FILE_HEADER);)(T=new v({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(T);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var T=this.reader.lastIndexOfSignature(g.CENTRAL_DIRECTORY_END);if(T<0)throw this.isSignature(0,g.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(T);var I=T;if(this.checkSignature(g.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=true,(T=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(T),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,g.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(g.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var k=this.centralDirOffset+this.centralDirSize;this.zip64&&(k+=20,k+=12+this.zip64EndOfCentralSize);var D=I-k;if(0<D)this.isSignature(I,g.CENTRAL_FILE_HEADER)||(this.reader.zero=D);else if(D<0)throw new Error("Corrupted zip: missing "+Math.abs(D)+" bytes.")},prepareReader:function(T){this.reader=h(T);},load:function(T){this.prepareReader(T),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}},d.exports=C;},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(c,d,p){var h=c("./reader/readerFor"),m=c("./utils"),g=c("./compressedObject"),v=c("./crc32"),w=c("./utf8"),C=c("./compressions"),T=c("./support");function I(k,D){this.options=k,this.loadOptions=D;}I.prototype={isEncrypted:function(){return (1&this.bitFlag)==1},useUTF8:function(){return (2048&this.bitFlag)==2048},readLocalPart:function(k){var D,j;if(k.skip(22),this.fileNameLength=k.readInt(2),j=k.readInt(2),this.fileName=k.readData(this.fileNameLength),k.skip(j),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((D=(function(F){for(var B in C)if(Object.prototype.hasOwnProperty.call(C,B)&&C[B].magic===F)return C[B];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new g(this.compressedSize,this.uncompressedSize,this.crc32,D,k.readData(this.compressedSize));},readCentralPart:function(k){this.versionMadeBy=k.readInt(2),k.skip(2),this.bitFlag=k.readInt(2),this.compressionMethod=k.readString(2),this.date=k.readDate(),this.crc32=k.readInt(4),this.compressedSize=k.readInt(4),this.uncompressedSize=k.readInt(4);var D=k.readInt(2);if(this.extraFieldsLength=k.readInt(2),this.fileCommentLength=k.readInt(2),this.diskNumberStart=k.readInt(2),this.internalFileAttributes=k.readInt(2),this.externalFileAttributes=k.readInt(4),this.localHeaderOffset=k.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");k.skip(D),this.readExtraFields(k),this.parseZIP64ExtraField(k),this.fileComment=k.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var k=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),k==0&&(this.dosPermissions=63&this.externalFileAttributes),k==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var k=h(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=k.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=k.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=k.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=k.readInt(4));}},readExtraFields:function(k){var D,j,F,B=k.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});k.index+4<B;)D=k.readInt(2),j=k.readInt(2),F=k.readData(j),this.extraFields[D]={id:D,length:j,value:F};k.setIndex(B);},handleUTF8:function(){var k=T.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=w.utf8decode(this.fileName),this.fileCommentStr=w.utf8decode(this.fileComment);else {var D=this.findExtraFieldUnicodePath();if(D!==null)this.fileNameStr=D;else {var j=m.transformTo(k,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(j);}var F=this.findExtraFieldUnicodeComment();if(F!==null)this.fileCommentStr=F;else {var B=m.transformTo(k,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(B);}}},findExtraFieldUnicodePath:function(){var k=this.extraFields[28789];if(k){var D=h(k.value);return D.readInt(1)!==1||v(this.fileName)!==D.readInt(4)?null:w.utf8decode(D.readData(k.length-5))}return null},findExtraFieldUnicodeComment:function(){var k=this.extraFields[25461];if(k){var D=h(k.value);return D.readInt(1)!==1||v(this.fileComment)!==D.readInt(4)?null:w.utf8decode(D.readData(k.length-5))}return null}},d.exports=I;},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(c,d,p){function h(D,j,F){this.name=D,this.dir=F.dir,this.date=F.date,this.comment=F.comment,this.unixPermissions=F.unixPermissions,this.dosPermissions=F.dosPermissions,this._data=j,this._dataBinary=F.binary,this.options={compression:F.compression,compressionOptions:F.compressionOptions};}var m=c("./stream/StreamHelper"),g=c("./stream/DataWorker"),v=c("./utf8"),w=c("./compressedObject"),C=c("./stream/GenericWorker");h.prototype={internalStream:function(D){var j=null,F="string";try{if(!D)throw new Error("No output type specified.");var B=(F=D.toLowerCase())==="string"||F==="text";F!=="binarystring"&&F!=="text"||(F="string"),j=this._decompressWorker();var E=!this._dataBinary;E&&!B&&(j=j.pipe(new v.Utf8EncodeWorker)),!E&&B&&(j=j.pipe(new v.Utf8DecodeWorker));}catch(M){(j=new C("error")).error(M);}return new m(j,F,"")},async:function(D,j){return this.internalStream(D).accumulate(j)},nodeStream:function(D,j){return this.internalStream(D||"nodebuffer").toNodejsStream(j)},_compressWorker:function(D,j){if(this._data instanceof w&&this._data.compression.magic===D.magic)return this._data.getCompressedWorker();var F=this._decompressWorker();return this._dataBinary||(F=F.pipe(new v.Utf8EncodeWorker)),w.createWorkerFrom(F,D,j)},_decompressWorker:function(){return this._data instanceof w?this._data.getContentWorker():this._data instanceof C?this._data:new g(this._data)}};for(var T=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],I=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},k=0;k<T.length;k++)h.prototype[T[k]]=I;d.exports=h;},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(c,d,p){(function(h){var m,g,v=h.MutationObserver||h.WebKitMutationObserver;if(v){var w=0,C=new v(D),T=h.document.createTextNode("");C.observe(T,{characterData:true}),m=function(){T.data=w=++w%2;};}else if(h.setImmediate||h.MessageChannel===void 0)m="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var j=h.document.createElement("script");j.onreadystatechange=function(){D(),j.onreadystatechange=null,j.parentNode.removeChild(j),j=null;},h.document.documentElement.appendChild(j);}:function(){setTimeout(D,0);};else {var I=new h.MessageChannel;I.port1.onmessage=D,m=function(){I.port2.postMessage(0);};}var k=[];function D(){var j,F;g=true;for(var B=k.length;B;){for(F=k,k=[],j=-1;++j<B;)F[j]();B=k.length;}g=false;}d.exports=function(j){k.push(j)!==1||g||m();};}).call(this,i!==void 0?i:typeof self<"u"?self:typeof window<"u"?window:{});},{}],37:[function(c,d,p){var h=c("immediate");function m(){}var g={},v=["REJECTED"],w=["FULFILLED"],C=["PENDING"];function T(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=C,this.queue=[],this.outcome=void 0,B!==m&&j(this,B);}function I(B,E,M){this.promise=B,typeof E=="function"&&(this.onFulfilled=E,this.callFulfilled=this.otherCallFulfilled),typeof M=="function"&&(this.onRejected=M,this.callRejected=this.otherCallRejected);}function k(B,E,M){h((function(){var L;try{L=E(M);}catch(b){return g.reject(B,b)}L===B?g.reject(B,new TypeError("Cannot resolve promise with itself")):g.resolve(B,L);}));}function D(B){var E=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof E=="function")return function(){E.apply(B,arguments);}}function j(B,E){var M=false;function L(x){M||(M=true,g.reject(B,x));}function b(x){M||(M=true,g.resolve(B,x));}var y=F((function(){E(b,L);}));y.status==="error"&&L(y.value);}function F(B,E){var M={};try{M.value=B(E),M.status="success";}catch(L){M.status="error",M.value=L;}return M}(d.exports=T).prototype.finally=function(B){if(typeof B!="function")return this;var E=this.constructor;return this.then((function(M){return E.resolve(B()).then((function(){return M}))}),(function(M){return E.resolve(B()).then((function(){throw M}))}))},T.prototype.catch=function(B){return this.then(null,B)},T.prototype.then=function(B,E){if(typeof B!="function"&&this.state===w||typeof E!="function"&&this.state===v)return this;var M=new this.constructor(m);return this.state!==C?k(M,this.state===w?B:E,this.outcome):this.queue.push(new I(M,B,E)),M},I.prototype.callFulfilled=function(B){g.resolve(this.promise,B);},I.prototype.otherCallFulfilled=function(B){k(this.promise,this.onFulfilled,B);},I.prototype.callRejected=function(B){g.reject(this.promise,B);},I.prototype.otherCallRejected=function(B){k(this.promise,this.onRejected,B);},g.resolve=function(B,E){var M=F(D,E);if(M.status==="error")return g.reject(B,M.value);var L=M.value;if(L)j(B,L);else {B.state=w,B.outcome=E;for(var b=-1,y=B.queue.length;++b<y;)B.queue[b].callFulfilled(E);}return B},g.reject=function(B,E){B.state=v,B.outcome=E;for(var M=-1,L=B.queue.length;++M<L;)B.queue[M].callRejected(E);return B},T.resolve=function(B){return B instanceof this?B:g.resolve(new this(m),B)},T.reject=function(B){var E=new this(m);return g.reject(E,B)},T.all=function(B){var E=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var M=B.length,L=false;if(!M)return this.resolve([]);for(var b=new Array(M),y=0,x=-1,_=new this(m);++x<M;)S(B[x],x);return _;function S(R,z){E.resolve(R).then((function(U){b[z]=U,++y!==M||L||(L=true,g.resolve(_,b));}),(function(U){L||(L=true,g.reject(_,U));}));}},T.race=function(B){if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=B.length,M=false;if(!E)return this.resolve([]);for(var L,b=-1,y=new this(m);++b<E;)L=B[b],this.resolve(L).then((function(x){M||(M=true,g.resolve(y,x));}),(function(x){M||(M=true,g.reject(y,x));}));return y};},{immediate:36}],38:[function(c,d,p){var h={};(0, c("./lib/utils/common").assign)(h,c("./lib/deflate"),c("./lib/inflate"),c("./lib/zlib/constants")),d.exports=h;},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(c,d,p){var h=c("./zlib/deflate"),m=c("./utils/common"),g=c("./utils/strings"),v=c("./zlib/messages"),w=c("./zlib/zstream"),C=Object.prototype.toString;function T(k){if(!(this instanceof T))return new T(k);this.options=m.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},k||{});var D=this.options;D.raw&&0<D.windowBits?D.windowBits=-D.windowBits:D.gzip&&0<D.windowBits&&D.windowBits<16&&(D.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var j=h.deflateInit2(this.strm,D.level,D.method,D.windowBits,D.memLevel,D.strategy);if(j!==0)throw new Error(v[j]);if(D.header&&h.deflateSetHeader(this.strm,D.header),D.dictionary){var F;if(F=typeof D.dictionary=="string"?g.string2buf(D.dictionary):C.call(D.dictionary)==="[object ArrayBuffer]"?new Uint8Array(D.dictionary):D.dictionary,(j=h.deflateSetDictionary(this.strm,F))!==0)throw new Error(v[j]);this._dict_set=true;}}function I(k,D){var j=new T(D);if(j.push(k,true),j.err)throw j.msg||v[j.err];return j.result}T.prototype.push=function(k,D){var j,F,B=this.strm,E=this.options.chunkSize;if(this.ended)return false;F=D===~~D?D:D===true?4:0,typeof k=="string"?B.input=g.string2buf(k):C.call(k)==="[object ArrayBuffer]"?B.input=new Uint8Array(k):B.input=k,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new m.Buf8(E),B.next_out=0,B.avail_out=E),(j=h.deflate(B,F))!==1&&j!==0)return this.onEnd(j),!(this.ended=true);B.avail_out!==0&&(B.avail_in!==0||F!==4&&F!==2)||(this.options.to==="string"?this.onData(g.buf2binstring(m.shrinkBuf(B.output,B.next_out))):this.onData(m.shrinkBuf(B.output,B.next_out)));}while((0<B.avail_in||B.avail_out===0)&&j!==1);return F===4?(j=h.deflateEnd(this.strm),this.onEnd(j),this.ended=true,j===0):F!==2||(this.onEnd(0),!(B.avail_out=0))},T.prototype.onData=function(k){this.chunks.push(k);},T.prototype.onEnd=function(k){k===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg;},p.Deflate=T,p.deflate=I,p.deflateRaw=function(k,D){return (D=D||{}).raw=true,I(k,D)},p.gzip=function(k,D){return (D=D||{}).gzip=true,I(k,D)};},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(c,d,p){var h=c("./zlib/inflate"),m=c("./utils/common"),g=c("./utils/strings"),v=c("./zlib/constants"),w=c("./zlib/messages"),C=c("./zlib/zstream"),T=c("./zlib/gzheader"),I=Object.prototype.toString;function k(j){if(!(this instanceof k))return new k(j);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},j||{});var F=this.options;F.raw&&0<=F.windowBits&&F.windowBits<16&&(F.windowBits=-F.windowBits,F.windowBits===0&&(F.windowBits=-15)),!(0<=F.windowBits&&F.windowBits<16)||j&&j.windowBits||(F.windowBits+=32),15<F.windowBits&&F.windowBits<48&&(15&F.windowBits)==0&&(F.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new C,this.strm.avail_out=0;var B=h.inflateInit2(this.strm,F.windowBits);if(B!==v.Z_OK)throw new Error(w[B]);this.header=new T,h.inflateGetHeader(this.strm,this.header);}function D(j,F){var B=new k(F);if(B.push(j,true),B.err)throw B.msg||w[B.err];return B.result}k.prototype.push=function(j,F){var B,E,M,L,b,y,x=this.strm,_=this.options.chunkSize,S=this.options.dictionary,R=false;if(this.ended)return false;E=F===~~F?F:F===true?v.Z_FINISH:v.Z_NO_FLUSH,typeof j=="string"?x.input=g.binstring2buf(j):I.call(j)==="[object ArrayBuffer]"?x.input=new Uint8Array(j):x.input=j,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new m.Buf8(_),x.next_out=0,x.avail_out=_),(B=h.inflate(x,v.Z_NO_FLUSH))===v.Z_NEED_DICT&&S&&(y=typeof S=="string"?g.string2buf(S):I.call(S)==="[object ArrayBuffer]"?new Uint8Array(S):S,B=h.inflateSetDictionary(this.strm,y)),B===v.Z_BUF_ERROR&&R===true&&(B=v.Z_OK,R=false),B!==v.Z_STREAM_END&&B!==v.Z_OK)return this.onEnd(B),!(this.ended=true);x.next_out&&(x.avail_out!==0&&B!==v.Z_STREAM_END&&(x.avail_in!==0||E!==v.Z_FINISH&&E!==v.Z_SYNC_FLUSH)||(this.options.to==="string"?(M=g.utf8border(x.output,x.next_out),L=x.next_out-M,b=g.buf2string(x.output,M),x.next_out=L,x.avail_out=_-L,L&&m.arraySet(x.output,x.output,M,L,0),this.onData(b)):this.onData(m.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(R=true);}while((0<x.avail_in||x.avail_out===0)&&B!==v.Z_STREAM_END);return B===v.Z_STREAM_END&&(E=v.Z_FINISH),E===v.Z_FINISH?(B=h.inflateEnd(this.strm),this.onEnd(B),this.ended=true,B===v.Z_OK):E!==v.Z_SYNC_FLUSH||(this.onEnd(v.Z_OK),!(x.avail_out=0))},k.prototype.onData=function(j){this.chunks.push(j);},k.prototype.onEnd=function(j){j===v.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=j,this.msg=this.strm.msg;},p.Inflate=k,p.inflate=D,p.inflateRaw=function(j,F){return (F=F||{}).raw=true,D(j,F)},p.ungzip=D;},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(c,d,p){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";p.assign=function(v){for(var w=Array.prototype.slice.call(arguments,1);w.length;){var C=w.shift();if(C){if(typeof C!="object")throw new TypeError(C+"must be non-object");for(var T in C)C.hasOwnProperty(T)&&(v[T]=C[T]);}}return v},p.shrinkBuf=function(v,w){return v.length===w?v:v.subarray?v.subarray(0,w):(v.length=w,v)};var m={arraySet:function(v,w,C,T,I){if(w.subarray&&v.subarray)v.set(w.subarray(C,C+T),I);else for(var k=0;k<T;k++)v[I+k]=w[C+k];},flattenChunks:function(v){var w,C,T,I,k,D;for(w=T=0,C=v.length;w<C;w++)T+=v[w].length;for(D=new Uint8Array(T),w=I=0,C=v.length;w<C;w++)k=v[w],D.set(k,I),I+=k.length;return D}},g={arraySet:function(v,w,C,T,I){for(var k=0;k<T;k++)v[I+k]=w[C+k];},flattenChunks:function(v){return [].concat.apply([],v)}};p.setTyped=function(v){v?(p.Buf8=Uint8Array,p.Buf16=Uint16Array,p.Buf32=Int32Array,p.assign(p,m)):(p.Buf8=Array,p.Buf16=Array,p.Buf32=Array,p.assign(p,g));},p.setTyped(h);},{}],42:[function(c,d,p){var h=c("./common"),m=true,g=true;try{String.fromCharCode.apply(null,[0]);}catch{m=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{g=false;}for(var v=new h.Buf8(256),w=0;w<256;w++)v[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;function C(T,I){if(I<65537&&(T.subarray&&g||!T.subarray&&m))return String.fromCharCode.apply(null,h.shrinkBuf(T,I));for(var k="",D=0;D<I;D++)k+=String.fromCharCode(T[D]);return k}v[254]=v[254]=1,p.string2buf=function(T){var I,k,D,j,F,B=T.length,E=0;for(j=0;j<B;j++)(64512&(k=T.charCodeAt(j)))==55296&&j+1<B&&(64512&(D=T.charCodeAt(j+1)))==56320&&(k=65536+(k-55296<<10)+(D-56320),j++),E+=k<128?1:k<2048?2:k<65536?3:4;for(I=new h.Buf8(E),j=F=0;F<E;j++)(64512&(k=T.charCodeAt(j)))==55296&&j+1<B&&(64512&(D=T.charCodeAt(j+1)))==56320&&(k=65536+(k-55296<<10)+(D-56320),j++),k<128?I[F++]=k:(k<2048?I[F++]=192|k>>>6:(k<65536?I[F++]=224|k>>>12:(I[F++]=240|k>>>18,I[F++]=128|k>>>12&63),I[F++]=128|k>>>6&63),I[F++]=128|63&k);return I},p.buf2binstring=function(T){return C(T,T.length)},p.binstring2buf=function(T){for(var I=new h.Buf8(T.length),k=0,D=I.length;k<D;k++)I[k]=T.charCodeAt(k);return I},p.buf2string=function(T,I){var k,D,j,F,B=I||T.length,E=new Array(2*B);for(k=D=0;k<B;)if((j=T[k++])<128)E[D++]=j;else if(4<(F=v[j]))E[D++]=65533,k+=F-1;else {for(j&=F===2?31:F===3?15:7;1<F&&k<B;)j=j<<6|63&T[k++],F--;1<F?E[D++]=65533:j<65536?E[D++]=j:(j-=65536,E[D++]=55296|j>>10&1023,E[D++]=56320|1023&j);}return C(E,D)},p.utf8border=function(T,I){var k;for((I=I||T.length)>T.length&&(I=T.length),k=I-1;0<=k&&(192&T[k])==128;)k--;return k<0||k===0?I:k+v[T[k]]>I?k:I};},{"./common":41}],43:[function(c,d,p){d.exports=function(h,m,g,v){for(var w=65535&h|0,C=h>>>16&65535|0,T=0;g!==0;){for(g-=T=2e3<g?2e3:g;C=C+(w=w+m[v++]|0)|0,--T;);w%=65521,C%=65521;}return w|C<<16|0};},{}],44:[function(c,d,p){d.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(c,d,p){var h=(function(){for(var m,g=[],v=0;v<256;v++){m=v;for(var w=0;w<8;w++)m=1&m?3988292384^m>>>1:m>>>1;g[v]=m;}return g})();d.exports=function(m,g,v,w){var C=h,T=w+v;m^=-1;for(var I=w;I<T;I++)m=m>>>8^C[255&(m^g[I])];return -1^m};},{}],46:[function(c,d,p){var h,m=c("../utils/common"),g=c("./trees"),v=c("./adler32"),w=c("./crc32"),C=c("./messages"),T=-2,I=258,k=262,D=113;function j(N,V){return N.msg=C[V],V}function F(N){return (N<<1)-(4<N?9:0)}function B(N){for(var V=N.length;0<=--V;)N[V]=0;}function E(N){var V=N.state,O=V.pending;O>N.avail_out&&(O=N.avail_out),O!==0&&(m.arraySet(N.output,V.pending_buf,V.pending_out,O,N.next_out),N.next_out+=O,V.pending_out+=O,N.total_out+=O,N.avail_out-=O,V.pending-=O,V.pending===0&&(V.pending_out=0));}function M(N,V){g._tr_flush_block(N,0<=N.block_start?N.block_start:-1,N.strstart-N.block_start,V),N.block_start=N.strstart,E(N.strm);}function L(N,V){N.pending_buf[N.pending++]=V;}function b(N,V){N.pending_buf[N.pending++]=V>>>8&255,N.pending_buf[N.pending++]=255&V;}function y(N,V){var O,A,P=N.max_chain_length,W=N.strstart,Z=N.prev_length,$=N.nice_match,K=N.strstart>N.w_size-k?N.strstart-(N.w_size-k):0,te=N.window,J=N.w_mask,Y=N.prev,ne=N.strstart+I,re=te[W+Z-1],ie=te[W+Z];N.prev_length>=N.good_match&&(P>>=2),$>N.lookahead&&($=N.lookahead);do if(te[(O=V)+Z]===ie&&te[O+Z-1]===re&&te[O]===te[W]&&te[++O]===te[W+1]){W+=2,O++;do;while(te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&te[++W]===te[++O]&&W<ne);if(A=I-(ne-W),W=ne-I,Z<A){if(N.match_start=V,$<=(Z=A))break;re=te[W+Z-1],ie=te[W+Z];}}while((V=Y[V&J])>K&&--P!=0);return Z<=N.lookahead?Z:N.lookahead}function x(N){var V,O,A,P,W,Z,$,K,te,J,Y=N.w_size;do{if(P=N.window_size-N.lookahead-N.strstart,N.strstart>=Y+(Y-k)){for(m.arraySet(N.window,N.window,Y,Y,0),N.match_start-=Y,N.strstart-=Y,N.block_start-=Y,V=O=N.hash_size;A=N.head[--V],N.head[V]=Y<=A?A-Y:0,--O;);for(V=O=Y;A=N.prev[--V],N.prev[V]=Y<=A?A-Y:0,--O;);P+=Y;}if(N.strm.avail_in===0)break;if(Z=N.strm,$=N.window,K=N.strstart+N.lookahead,J=void 0,(te=P)<(J=Z.avail_in)&&(J=te),O=J===0?0:(Z.avail_in-=J,m.arraySet($,Z.input,Z.next_in,J,K),Z.state.wrap===1?Z.adler=v(Z.adler,$,J,K):Z.state.wrap===2&&(Z.adler=w(Z.adler,$,J,K)),Z.next_in+=J,Z.total_in+=J,J),N.lookahead+=O,N.lookahead+N.insert>=3)for(W=N.strstart-N.insert,N.ins_h=N.window[W],N.ins_h=(N.ins_h<<N.hash_shift^N.window[W+1])&N.hash_mask;N.insert&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[W+3-1])&N.hash_mask,N.prev[W&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=W,W++,N.insert--,!(N.lookahead+N.insert<3)););}while(N.lookahead<k&&N.strm.avail_in!==0)}function _(N,V){for(var O,A;;){if(N.lookahead<k){if(x(N),N.lookahead<k&&V===0)return 1;if(N.lookahead===0)break}if(O=0,N.lookahead>=3&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,O=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),O!==0&&N.strstart-O<=N.w_size-k&&(N.match_length=y(N,O)),N.match_length>=3)if(A=g._tr_tally(N,N.strstart-N.match_start,N.match_length-3),N.lookahead-=N.match_length,N.match_length<=N.max_lazy_match&&N.lookahead>=3){for(N.match_length--;N.strstart++,N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,O=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart,--N.match_length!=0;);N.strstart++;}else N.strstart+=N.match_length,N.match_length=0,N.ins_h=N.window[N.strstart],N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+1])&N.hash_mask;else A=g._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++;if(A&&(M(N,false),N.strm.avail_out===0))return 1}return N.insert=N.strstart<2?N.strstart:2,V===4?(M(N,true),N.strm.avail_out===0?3:4):N.last_lit&&(M(N,false),N.strm.avail_out===0)?1:2}function S(N,V){for(var O,A,P;;){if(N.lookahead<k){if(x(N),N.lookahead<k&&V===0)return 1;if(N.lookahead===0)break}if(O=0,N.lookahead>=3&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,O=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),N.prev_length=N.match_length,N.prev_match=N.match_start,N.match_length=2,O!==0&&N.prev_length<N.max_lazy_match&&N.strstart-O<=N.w_size-k&&(N.match_length=y(N,O),N.match_length<=5&&(N.strategy===1||N.match_length===3&&4096<N.strstart-N.match_start)&&(N.match_length=2)),N.prev_length>=3&&N.match_length<=N.prev_length){for(P=N.strstart+N.lookahead-3,A=g._tr_tally(N,N.strstart-1-N.prev_match,N.prev_length-3),N.lookahead-=N.prev_length-1,N.prev_length-=2;++N.strstart<=P&&(N.ins_h=(N.ins_h<<N.hash_shift^N.window[N.strstart+3-1])&N.hash_mask,O=N.prev[N.strstart&N.w_mask]=N.head[N.ins_h],N.head[N.ins_h]=N.strstart),--N.prev_length!=0;);if(N.match_available=0,N.match_length=2,N.strstart++,A&&(M(N,false),N.strm.avail_out===0))return 1}else if(N.match_available){if((A=g._tr_tally(N,0,N.window[N.strstart-1]))&&M(N,false),N.strstart++,N.lookahead--,N.strm.avail_out===0)return 1}else N.match_available=1,N.strstart++,N.lookahead--;}return N.match_available&&(A=g._tr_tally(N,0,N.window[N.strstart-1]),N.match_available=0),N.insert=N.strstart<2?N.strstart:2,V===4?(M(N,true),N.strm.avail_out===0?3:4):N.last_lit&&(M(N,false),N.strm.avail_out===0)?1:2}function R(N,V,O,A,P){this.good_length=N,this.max_lazy=V,this.nice_length=O,this.max_chain=A,this.func=P;}function z(){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 m.Buf16(1146),this.dyn_dtree=new m.Buf16(122),this.bl_tree=new m.Buf16(78),B(this.dyn_ltree),B(this.dyn_dtree),B(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(16),this.heap=new m.Buf16(573),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(573),B(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 U(N){var V;return N&&N.state?(N.total_in=N.total_out=0,N.data_type=2,(V=N.state).pending=0,V.pending_out=0,V.wrap<0&&(V.wrap=-V.wrap),V.status=V.wrap?42:D,N.adler=V.wrap===2?0:1,V.last_flush=0,g._tr_init(V),0):j(N,T)}function H(N){var V=U(N);return V===0&&(function(O){O.window_size=2*O.w_size,B(O.head),O.max_lazy_match=h[O.level].max_lazy,O.good_match=h[O.level].good_length,O.nice_match=h[O.level].nice_length,O.max_chain_length=h[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=2,O.match_available=0,O.ins_h=0;})(N.state),V}function q(N,V,O,A,P,W){if(!N)return T;var Z=1;if(V===-1&&(V=6),A<0?(Z=0,A=-A):15<A&&(Z=2,A-=16),P<1||9<P||O!==8||A<8||15<A||V<0||9<V||W<0||4<W)return j(N,T);A===8&&(A=9);var $=new z;return (N.state=$).strm=N,$.wrap=Z,$.gzhead=null,$.w_bits=A,$.w_size=1<<$.w_bits,$.w_mask=$.w_size-1,$.hash_bits=P+7,$.hash_size=1<<$.hash_bits,$.hash_mask=$.hash_size-1,$.hash_shift=~~(($.hash_bits+3-1)/3),$.window=new m.Buf8(2*$.w_size),$.head=new m.Buf16($.hash_size),$.prev=new m.Buf16($.w_size),$.lit_bufsize=1<<P+6,$.pending_buf_size=4*$.lit_bufsize,$.pending_buf=new m.Buf8($.pending_buf_size),$.d_buf=1*$.lit_bufsize,$.l_buf=3*$.lit_bufsize,$.level=V,$.strategy=W,$.method=O,H(N)}h=[new R(0,0,0,0,(function(N,V){var O=65535;for(O>N.pending_buf_size-5&&(O=N.pending_buf_size-5);;){if(N.lookahead<=1){if(x(N),N.lookahead===0&&V===0)return 1;if(N.lookahead===0)break}N.strstart+=N.lookahead,N.lookahead=0;var A=N.block_start+O;if((N.strstart===0||N.strstart>=A)&&(N.lookahead=N.strstart-A,N.strstart=A,M(N,false),N.strm.avail_out===0)||N.strstart-N.block_start>=N.w_size-k&&(M(N,false),N.strm.avail_out===0))return 1}return N.insert=0,V===4?(M(N,true),N.strm.avail_out===0?3:4):(N.strstart>N.block_start&&(M(N,false),N.strm.avail_out),1)})),new R(4,4,8,4,_),new R(4,5,16,8,_),new R(4,6,32,32,_),new R(4,4,16,16,S),new R(8,16,32,32,S),new R(8,16,128,128,S),new R(8,32,128,256,S),new R(32,128,258,1024,S),new R(32,258,258,4096,S)],p.deflateInit=function(N,V){return q(N,V,8,15,8,0)},p.deflateInit2=q,p.deflateReset=H,p.deflateResetKeep=U,p.deflateSetHeader=function(N,V){return N&&N.state?N.state.wrap!==2?T:(N.state.gzhead=V,0):T},p.deflate=function(N,V){var O,A,P,W;if(!N||!N.state||5<V||V<0)return N?j(N,T):T;if(A=N.state,!N.output||!N.input&&N.avail_in!==0||A.status===666&&V!==4)return j(N,N.avail_out===0?-5:T);if(A.strm=N,O=A.last_flush,A.last_flush=V,A.status===42)if(A.wrap===2)N.adler=0,L(A,31),L(A,139),L(A,8),A.gzhead?(L(A,(A.gzhead.text?1:0)+(A.gzhead.hcrc?2:0)+(A.gzhead.extra?4:0)+(A.gzhead.name?8:0)+(A.gzhead.comment?16:0)),L(A,255&A.gzhead.time),L(A,A.gzhead.time>>8&255),L(A,A.gzhead.time>>16&255),L(A,A.gzhead.time>>24&255),L(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),L(A,255&A.gzhead.os),A.gzhead.extra&&A.gzhead.extra.length&&(L(A,255&A.gzhead.extra.length),L(A,A.gzhead.extra.length>>8&255)),A.gzhead.hcrc&&(N.adler=w(N.adler,A.pending_buf,A.pending,0)),A.gzindex=0,A.status=69):(L(A,0),L(A,0),L(A,0),L(A,0),L(A,0),L(A,A.level===9?2:2<=A.strategy||A.level<2?4:0),L(A,3),A.status=D);else {var Z=8+(A.w_bits-8<<4)<<8;Z|=(2<=A.strategy||A.level<2?0:A.level<6?1:A.level===6?2:3)<<6,A.strstart!==0&&(Z|=32),Z+=31-Z%31,A.status=D,b(A,Z),A.strstart!==0&&(b(A,N.adler>>>16),b(A,65535&N.adler)),N.adler=1;}if(A.status===69)if(A.gzhead.extra){for(P=A.pending;A.gzindex<(65535&A.gzhead.extra.length)&&(A.pending!==A.pending_buf_size||(A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),E(N),P=A.pending,A.pending!==A.pending_buf_size));)L(A,255&A.gzhead.extra[A.gzindex]),A.gzindex++;A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),A.gzindex===A.gzhead.extra.length&&(A.gzindex=0,A.status=73);}else A.status=73;if(A.status===73)if(A.gzhead.name){P=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),E(N),P=A.pending,A.pending===A.pending_buf_size)){W=1;break}W=A.gzindex<A.gzhead.name.length?255&A.gzhead.name.charCodeAt(A.gzindex++):0,L(A,W);}while(W!==0);A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),W===0&&(A.gzindex=0,A.status=91);}else A.status=91;if(A.status===91)if(A.gzhead.comment){P=A.pending;do{if(A.pending===A.pending_buf_size&&(A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),E(N),P=A.pending,A.pending===A.pending_buf_size)){W=1;break}W=A.gzindex<A.gzhead.comment.length?255&A.gzhead.comment.charCodeAt(A.gzindex++):0,L(A,W);}while(W!==0);A.gzhead.hcrc&&A.pending>P&&(N.adler=w(N.adler,A.pending_buf,A.pending-P,P)),W===0&&(A.status=103);}else A.status=103;if(A.status===103&&(A.gzhead.hcrc?(A.pending+2>A.pending_buf_size&&E(N),A.pending+2<=A.pending_buf_size&&(L(A,255&N.adler),L(A,N.adler>>8&255),N.adler=0,A.status=D)):A.status=D),A.pending!==0){if(E(N),N.avail_out===0)return A.last_flush=-1,0}else if(N.avail_in===0&&F(V)<=F(O)&&V!==4)return j(N,-5);if(A.status===666&&N.avail_in!==0)return j(N,-5);if(N.avail_in!==0||A.lookahead!==0||V!==0&&A.status!==666){var $=A.strategy===2?(function(K,te){for(var J;;){if(K.lookahead===0&&(x(K),K.lookahead===0)){if(te===0)return 1;break}if(K.match_length=0,J=g._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++,J&&(M(K,false),K.strm.avail_out===0))return 1}return K.insert=0,te===4?(M(K,true),K.strm.avail_out===0?3:4):K.last_lit&&(M(K,false),K.strm.avail_out===0)?1:2})(A,V):A.strategy===3?(function(K,te){for(var J,Y,ne,re,ie=K.window;;){if(K.lookahead<=I){if(x(K),K.lookahead<=I&&te===0)return 1;if(K.lookahead===0)break}if(K.match_length=0,K.lookahead>=3&&0<K.strstart&&(Y=ie[ne=K.strstart-1])===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]){re=K.strstart+I;do;while(Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&Y===ie[++ne]&&ne<re);K.match_length=I-(re-ne),K.match_length>K.lookahead&&(K.match_length=K.lookahead);}if(K.match_length>=3?(J=g._tr_tally(K,1,K.match_length-3),K.lookahead-=K.match_length,K.strstart+=K.match_length,K.match_length=0):(J=g._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++),J&&(M(K,false),K.strm.avail_out===0))return 1}return K.insert=0,te===4?(M(K,true),K.strm.avail_out===0?3:4):K.last_lit&&(M(K,false),K.strm.avail_out===0)?1:2})(A,V):h[A.level].func(A,V);if($!==3&&$!==4||(A.status=666),$===1||$===3)return N.avail_out===0&&(A.last_flush=-1),0;if($===2&&(V===1?g._tr_align(A):V!==5&&(g._tr_stored_block(A,0,0,false),V===3&&(B(A.head),A.lookahead===0&&(A.strstart=0,A.block_start=0,A.insert=0))),E(N),N.avail_out===0))return A.last_flush=-1,0}return V!==4?0:A.wrap<=0?1:(A.wrap===2?(L(A,255&N.adler),L(A,N.adler>>8&255),L(A,N.adler>>16&255),L(A,N.adler>>24&255),L(A,255&N.total_in),L(A,N.total_in>>8&255),L(A,N.total_in>>16&255),L(A,N.total_in>>24&255)):(b(A,N.adler>>>16),b(A,65535&N.adler)),E(N),0<A.wrap&&(A.wrap=-A.wrap),A.pending!==0?0:1)},p.deflateEnd=function(N){var V;return N&&N.state?(V=N.state.status)!==42&&V!==69&&V!==73&&V!==91&&V!==103&&V!==D&&V!==666?j(N,T):(N.state=null,V===D?j(N,-3):0):T},p.deflateSetDictionary=function(N,V){var O,A,P,W,Z,$,K,te,J=V.length;if(!N||!N.state||(W=(O=N.state).wrap)===2||W===1&&O.status!==42||O.lookahead)return T;for(W===1&&(N.adler=v(N.adler,V,J,0)),O.wrap=0,J>=O.w_size&&(W===0&&(B(O.head),O.strstart=0,O.block_start=0,O.insert=0),te=new m.Buf8(O.w_size),m.arraySet(te,V,J-O.w_size,O.w_size,0),V=te,J=O.w_size),Z=N.avail_in,$=N.next_in,K=N.input,N.avail_in=J,N.next_in=0,N.input=V,x(O);O.lookahead>=3;){for(A=O.strstart,P=O.lookahead-2;O.ins_h=(O.ins_h<<O.hash_shift^O.window[A+3-1])&O.hash_mask,O.prev[A&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=A,A++,--P;);O.strstart=A,O.lookahead=2,x(O);}return O.strstart+=O.lookahead,O.block_start=O.strstart,O.insert=O.lookahead,O.lookahead=0,O.match_length=O.prev_length=2,O.match_available=0,N.next_in=$,N.input=K,N.avail_in=Z,O.wrap=W,0},p.deflateInfo="pako deflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(c,d,p){d.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=false;};},{}],48:[function(c,d,p){d.exports=function(h,m){var g,v,w,C,T,I,k,D,j,F,B,E,M,L,b,y,x,_,S,R,z,U,H,q,N;g=h.state,v=h.next_in,q=h.input,w=v+(h.avail_in-5),C=h.next_out,N=h.output,T=C-(m-h.avail_out),I=C+(h.avail_out-257),k=g.dmax,D=g.wsize,j=g.whave,F=g.wnext,B=g.window,E=g.hold,M=g.bits,L=g.lencode,b=g.distcode,y=(1<<g.lenbits)-1,x=(1<<g.distbits)-1;e:do{M<15&&(E+=q[v++]<<M,M+=8,E+=q[v++]<<M,M+=8),_=L[E&y];t:for(;;){if(E>>>=S=_>>>24,M-=S,(S=_>>>16&255)==0)N[C++]=65535&_;else {if(!(16&S)){if((64&S)==0){_=L[(65535&_)+(E&(1<<S)-1)];continue t}if(32&S){g.mode=12;break e}h.msg="invalid literal/length code",g.mode=30;break e}R=65535&_,(S&=15)&&(M<S&&(E+=q[v++]<<M,M+=8),R+=E&(1<<S)-1,E>>>=S,M-=S),M<15&&(E+=q[v++]<<M,M+=8,E+=q[v++]<<M,M+=8),_=b[E&x];r:for(;;){if(E>>>=S=_>>>24,M-=S,!(16&(S=_>>>16&255))){if((64&S)==0){_=b[(65535&_)+(E&(1<<S)-1)];continue r}h.msg="invalid distance code",g.mode=30;break e}if(z=65535&_,M<(S&=15)&&(E+=q[v++]<<M,(M+=8)<S&&(E+=q[v++]<<M,M+=8)),k<(z+=E&(1<<S)-1)){h.msg="invalid distance too far back",g.mode=30;break e}if(E>>>=S,M-=S,(S=C-T)<z){if(j<(S=z-S)&&g.sane){h.msg="invalid distance too far back",g.mode=30;break e}if(H=B,(U=0)===F){if(U+=D-S,S<R){for(R-=S;N[C++]=B[U++],--S;);U=C-z,H=N;}}else if(F<S){if(U+=D+F-S,(S-=F)<R){for(R-=S;N[C++]=B[U++],--S;);if(U=0,F<R){for(R-=S=F;N[C++]=B[U++],--S;);U=C-z,H=N;}}}else if(U+=F-S,S<R){for(R-=S;N[C++]=B[U++],--S;);U=C-z,H=N;}for(;2<R;)N[C++]=H[U++],N[C++]=H[U++],N[C++]=H[U++],R-=3;R&&(N[C++]=H[U++],1<R&&(N[C++]=H[U++]));}else {for(U=C-z;N[C++]=N[U++],N[C++]=N[U++],N[C++]=N[U++],2<(R-=3););R&&(N[C++]=N[U++],1<R&&(N[C++]=N[U++]));}break}}break}}while(v<w&&C<I);v-=R=M>>3,E&=(1<<(M-=R<<3))-1,h.next_in=v,h.next_out=C,h.avail_in=v<w?w-v+5:5-(v-w),h.avail_out=C<I?I-C+257:257-(C-I),g.hold=E,g.bits=M;};},{}],49:[function(c,d,p){var h=c("../utils/common"),m=c("./adler32"),g=c("./crc32"),v=c("./inffast"),w=c("./inftrees"),C=-2;function T(y){return (y>>>24&255)+(y>>>8&65280)+((65280&y)<<8)+((255&y)<<24)}function I(){this.mode=0,this.last=false,this.wrap=0,this.havedict=false,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 h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function k(y){var x;return y&&y.state?(x=y.state,y.total_in=y.total_out=x.total=0,y.msg="",x.wrap&&(y.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new h.Buf32(852),x.distcode=x.distdyn=new h.Buf32(592),x.sane=1,x.back=-1,0):C}function D(y){var x;return y&&y.state?((x=y.state).wsize=0,x.whave=0,x.wnext=0,k(y)):C}function j(y,x){var _,S;return y&&y.state?(S=y.state,x<0?(_=0,x=-x):(_=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?C:(S.window!==null&&S.wbits!==x&&(S.window=null),S.wrap=_,S.wbits=x,D(y))):C}function F(y,x){var _,S;return y?(S=new I,(y.state=S).window=null,(_=j(y,x))!==0&&(y.state=null),_):C}var B,E,M=true;function L(y){if(M){var x;for(B=new h.Buf32(512),E=new h.Buf32(32),x=0;x<144;)y.lens[x++]=8;for(;x<256;)y.lens[x++]=9;for(;x<280;)y.lens[x++]=7;for(;x<288;)y.lens[x++]=8;for(w(1,y.lens,0,288,B,0,y.work,{bits:9}),x=0;x<32;)y.lens[x++]=5;w(2,y.lens,0,32,E,0,y.work,{bits:5}),M=false;}y.lencode=B,y.lenbits=9,y.distcode=E,y.distbits=5;}function b(y,x,_,S){var R,z=y.state;return z.window===null&&(z.wsize=1<<z.wbits,z.wnext=0,z.whave=0,z.window=new h.Buf8(z.wsize)),S>=z.wsize?(h.arraySet(z.window,x,_-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(S<(R=z.wsize-z.wnext)&&(R=S),h.arraySet(z.window,x,_-S,R,z.wnext),(S-=R)?(h.arraySet(z.window,x,_-S,S,0),z.wnext=S,z.whave=z.wsize):(z.wnext+=R,z.wnext===z.wsize&&(z.wnext=0),z.whave<z.wsize&&(z.whave+=R))),0}p.inflateReset=D,p.inflateReset2=j,p.inflateResetKeep=k,p.inflateInit=function(y){return F(y,15)},p.inflateInit2=F,p.inflate=function(y,x){var _,S,R,z,U,H,q,N,V,O,A,P,W,Z,$,K,te,J,Y,ne,re,ie,oe,se,le=0,ge=new h.Buf8(4),he=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!y||!y.state||!y.output||!y.input&&y.avail_in!==0)return C;(_=y.state).mode===12&&(_.mode=13),U=y.next_out,R=y.output,q=y.avail_out,z=y.next_in,S=y.input,H=y.avail_in,N=_.hold,V=_.bits,O=H,A=q,ie=0;e:for(;;)switch(_.mode){case 1:if(_.wrap===0){_.mode=13;break}for(;V<16;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(2&_.wrap&&N===35615){ge[_.check=0]=255&N,ge[1]=N>>>8&255,_.check=g(_.check,ge,2,0),V=N=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=false),!(1&_.wrap)||(((255&N)<<8)+(N>>8))%31){y.msg="incorrect header check",_.mode=30;break}if((15&N)!=8){y.msg="unknown compression method",_.mode=30;break}if(V-=4,re=8+(15&(N>>>=4)),_.wbits===0)_.wbits=re;else if(re>_.wbits){y.msg="invalid window size",_.mode=30;break}_.dmax=1<<re,y.adler=_.check=1,_.mode=512&N?10:12,V=N=0;break;case 2:for(;V<16;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(_.flags=N,(255&_.flags)!=8){y.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){y.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=N>>8&1),512&_.flags&&(ge[0]=255&N,ge[1]=N>>>8&255,_.check=g(_.check,ge,2,0)),V=N=0,_.mode=3;case 3:for(;V<32;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.head&&(_.head.time=N),512&_.flags&&(ge[0]=255&N,ge[1]=N>>>8&255,ge[2]=N>>>16&255,ge[3]=N>>>24&255,_.check=g(_.check,ge,4,0)),V=N=0,_.mode=4;case 4:for(;V<16;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.head&&(_.head.xflags=255&N,_.head.os=N>>8),512&_.flags&&(ge[0]=255&N,ge[1]=N>>>8&255,_.check=g(_.check,ge,2,0)),V=N=0,_.mode=5;case 5:if(1024&_.flags){for(;V<16;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.length=N,_.head&&(_.head.extra_len=N),512&_.flags&&(ge[0]=255&N,ge[1]=N>>>8&255,_.check=g(_.check,ge,2,0)),V=N=0;}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(H<(P=_.length)&&(P=H),P&&(_.head&&(re=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),h.arraySet(_.head.extra,S,z,P,re)),512&_.flags&&(_.check=g(_.check,S,P,z)),H-=P,z+=P,_.length-=P),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(H===0)break e;for(P=0;re=S[z+P++],_.head&&re&&_.length<65536&&(_.head.name+=String.fromCharCode(re)),re&&P<H;);if(512&_.flags&&(_.check=g(_.check,S,P,z)),H-=P,z+=P,re)break e}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(H===0)break e;for(P=0;re=S[z+P++],_.head&&re&&_.length<65536&&(_.head.comment+=String.fromCharCode(re)),re&&P<H;);if(512&_.flags&&(_.check=g(_.check,S,P,z)),H-=P,z+=P,re)break e}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;V<16;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(N!==(65535&_.check)){y.msg="header crc mismatch",_.mode=30;break}V=N=0;}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=true),y.adler=_.check=0,_.mode=12;break;case 10:for(;V<32;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}y.adler=_.check=T(N),V=N=0,_.mode=11;case 11:if(_.havedict===0)return y.next_out=U,y.avail_out=q,y.next_in=z,y.avail_in=H,_.hold=N,_.bits=V,2;y.adler=_.check=1,_.mode=12;case 12:if(x===5||x===6)break e;case 13:if(_.last){N>>>=7&V,V-=7&V,_.mode=27;break}for(;V<3;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}switch(_.last=1&N,V-=1,3&(N>>>=1)){case 0:_.mode=14;break;case 1:if(L(_),_.mode=20,x!==6)break;N>>>=2,V-=2;break e;case 2:_.mode=17;break;case 3:y.msg="invalid block type",_.mode=30;}N>>>=2,V-=2;break;case 14:for(N>>>=7&V,V-=7&V;V<32;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if((65535&N)!=(N>>>16^65535)){y.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&N,V=N=0,_.mode=15,x===6)break e;case 15:_.mode=16;case 16:if(P=_.length){if(H<P&&(P=H),q<P&&(P=q),P===0)break e;h.arraySet(R,S,z,P,U),H-=P,z+=P,q-=P,U+=P,_.length-=P;break}_.mode=12;break;case 17:for(;V<14;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(_.nlen=257+(31&N),N>>>=5,V-=5,_.ndist=1+(31&N),N>>>=5,V-=5,_.ncode=4+(15&N),N>>>=4,V-=4,286<_.nlen||30<_.ndist){y.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;V<3;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.lens[he[_.have++]]=7&N,N>>>=3,V-=3;}for(;_.have<19;)_.lens[he[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,oe={bits:_.lenbits},ie=w(0,_.lens,0,19,_.lencode,0,_.work,oe),_.lenbits=oe.bits,ie){y.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;K=(le=_.lencode[N&(1<<_.lenbits)-1])>>>16&255,te=65535&le,!(($=le>>>24)<=V);){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(te<16)N>>>=$,V-=$,_.lens[_.have++]=te;else {if(te===16){for(se=$+2;V<se;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(N>>>=$,V-=$,_.have===0){y.msg="invalid bit length repeat",_.mode=30;break}re=_.lens[_.have-1],P=3+(3&N),N>>>=2,V-=2;}else if(te===17){for(se=$+3;V<se;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}V-=$,re=0,P=3+(7&(N>>>=$)),N>>>=3,V-=3;}else {for(se=$+7;V<se;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}V-=$,re=0,P=11+(127&(N>>>=$)),N>>>=7,V-=7;}if(_.have+P>_.nlen+_.ndist){y.msg="invalid bit length repeat",_.mode=30;break}for(;P--;)_.lens[_.have++]=re;}}if(_.mode===30)break;if(_.lens[256]===0){y.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,oe={bits:_.lenbits},ie=w(1,_.lens,0,_.nlen,_.lencode,0,_.work,oe),_.lenbits=oe.bits,ie){y.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,oe={bits:_.distbits},ie=w(2,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,oe),_.distbits=oe.bits,ie){y.msg="invalid distances set",_.mode=30;break}if(_.mode=20,x===6)break e;case 20:_.mode=21;case 21:if(6<=H&&258<=q){y.next_out=U,y.avail_out=q,y.next_in=z,y.avail_in=H,_.hold=N,_.bits=V,v(y,A),U=y.next_out,R=y.output,q=y.avail_out,z=y.next_in,S=y.input,H=y.avail_in,N=_.hold,V=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;K=(le=_.lencode[N&(1<<_.lenbits)-1])>>>16&255,te=65535&le,!(($=le>>>24)<=V);){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(K&&(240&K)==0){for(J=$,Y=K,ne=te;K=(le=_.lencode[ne+((N&(1<<J+Y)-1)>>J)])>>>16&255,te=65535&le,!(J+($=le>>>24)<=V);){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}N>>>=J,V-=J,_.back+=J;}if(N>>>=$,V-=$,_.back+=$,_.length=te,K===0){_.mode=26;break}if(32&K){_.back=-1,_.mode=12;break}if(64&K){y.msg="invalid literal/length code",_.mode=30;break}_.extra=15&K,_.mode=22;case 22:if(_.extra){for(se=_.extra;V<se;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.length+=N&(1<<_.extra)-1,N>>>=_.extra,V-=_.extra,_.back+=_.extra;}_.was=_.length,_.mode=23;case 23:for(;K=(le=_.distcode[N&(1<<_.distbits)-1])>>>16&255,te=65535&le,!(($=le>>>24)<=V);){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if((240&K)==0){for(J=$,Y=K,ne=te;K=(le=_.distcode[ne+((N&(1<<J+Y)-1)>>J)])>>>16&255,te=65535&le,!(J+($=le>>>24)<=V);){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}N>>>=J,V-=J,_.back+=J;}if(N>>>=$,V-=$,_.back+=$,64&K){y.msg="invalid distance code",_.mode=30;break}_.offset=te,_.extra=15&K,_.mode=24;case 24:if(_.extra){for(se=_.extra;V<se;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}_.offset+=N&(1<<_.extra)-1,N>>>=_.extra,V-=_.extra,_.back+=_.extra;}if(_.offset>_.dmax){y.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(q===0)break e;if(P=A-q,_.offset>P){if((P=_.offset-P)>_.whave&&_.sane){y.msg="invalid distance too far back",_.mode=30;break}W=P>_.wnext?(P-=_.wnext,_.wsize-P):_.wnext-P,P>_.length&&(P=_.length),Z=_.window;}else Z=R,W=U-_.offset,P=_.length;for(q<P&&(P=q),q-=P,_.length-=P;R[U++]=Z[W++],--P;);_.length===0&&(_.mode=21);break;case 26:if(q===0)break e;R[U++]=_.length,q--,_.mode=21;break;case 27:if(_.wrap){for(;V<32;){if(H===0)break e;H--,N|=S[z++]<<V,V+=8;}if(A-=q,y.total_out+=A,_.total+=A,A&&(y.adler=_.check=_.flags?g(_.check,R,A,U-A):m(_.check,R,A,U-A)),A=q,(_.flags?N:T(N))!==_.check){y.msg="incorrect data check",_.mode=30;break}V=N=0;}_.mode=28;case 28:if(_.wrap&&_.flags){for(;V<32;){if(H===0)break e;H--,N+=S[z++]<<V,V+=8;}if(N!==(4294967295&_.total)){y.msg="incorrect length check",_.mode=30;break}V=N=0;}_.mode=29;case 29:ie=1;break e;case 30:ie=-3;break e;case 31:return -4;default:return C}return y.next_out=U,y.avail_out=q,y.next_in=z,y.avail_in=H,_.hold=N,_.bits=V,(_.wsize||A!==y.avail_out&&_.mode<30&&(_.mode<27||x!==4))&&b(y,y.output,y.next_out,A-y.avail_out)?(_.mode=31,-4):(O-=y.avail_in,A-=y.avail_out,y.total_in+=O,y.total_out+=A,_.total+=A,_.wrap&&A&&(y.adler=_.check=_.flags?g(_.check,R,A,y.next_out-A):m(_.check,R,A,y.next_out-A)),y.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(O==0&&A===0||x===4)&&ie===0&&(ie=-5),ie)},p.inflateEnd=function(y){if(!y||!y.state)return C;var x=y.state;return x.window&&(x.window=null),y.state=null,0},p.inflateGetHeader=function(y,x){var _;return y&&y.state?(2&(_=y.state).wrap)==0?C:((_.head=x).done=false,0):C},p.inflateSetDictionary=function(y,x){var _,S=x.length;return y&&y.state?(_=y.state).wrap!==0&&_.mode!==11?C:_.mode===11&&m(1,x,S,0)!==_.check?-3:b(y,x,S,S)?(_.mode=31,-4):(_.havedict=1,0):C},p.inflateInfo="pako inflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(c,d,p){var h=c("../utils/common"),m=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[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],w=[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];d.exports=function(C,T,I,k,D,j,F,B){var E,M,L,b,y,x,_,S,R,z=B.bits,U=0,H=0,q=0,N=0,V=0,O=0,A=0,P=0,W=0,Z=0,$=null,K=0,te=new h.Buf16(16),J=new h.Buf16(16),Y=null,ne=0;for(U=0;U<=15;U++)te[U]=0;for(H=0;H<k;H++)te[T[I+H]]++;for(V=z,N=15;1<=N&&te[N]===0;N--);if(N<V&&(V=N),N===0)return D[j++]=20971520,D[j++]=20971520,B.bits=1,0;for(q=1;q<N&&te[q]===0;q++);for(V<q&&(V=q),U=P=1;U<=15;U++)if(P<<=1,(P-=te[U])<0)return -1;if(0<P&&(C===0||N!==1))return -1;for(J[1]=0,U=1;U<15;U++)J[U+1]=J[U]+te[U];for(H=0;H<k;H++)T[I+H]!==0&&(F[J[T[I+H]]++]=H);if(x=C===0?($=Y=F,19):C===1?($=m,K-=257,Y=g,ne-=257,256):($=v,Y=w,-1),U=q,y=j,A=H=Z=0,L=-1,b=(W=1<<(O=V))-1,C===1&&852<W||C===2&&592<W)return 1;for(;;){for(_=U-A,R=F[H]<x?(S=0,F[H]):F[H]>x?(S=Y[ne+F[H]],$[K+F[H]]):(S=96,0),E=1<<U-A,q=M=1<<O;D[y+(Z>>A)+(M-=E)]=_<<24|S<<16|R|0,M!==0;);for(E=1<<U-1;Z&E;)E>>=1;if(E!==0?(Z&=E-1,Z+=E):Z=0,H++,--te[U]==0){if(U===N)break;U=T[I+F[H]];}if(V<U&&(Z&b)!==L){for(A===0&&(A=V),y+=q,P=1<<(O=U-A);O+A<N&&!((P-=te[O+A])<=0);)O++,P<<=1;if(W+=1<<O,C===1&&852<W||C===2&&592<W)return 1;D[L=Z&b]=V<<24|O<<16|y-j|0;}}return Z!==0&&(D[y+Z]=U-A<<24|64<<16|0),B.bits=V,0};},{"../utils/common":41}],51:[function(c,d,p){d.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(c,d,p){var h=c("../utils/common");function m(Y){for(var ne=Y.length;0<=--ne;)Y[ne]=0;}var g=256,v=286,w=30,C=15,T=[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],I=[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],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],j=new Array(576);m(j);var F=new Array(60);m(F);var B=new Array(512);m(B);var E=new Array(256);m(E);var M=new Array(29);m(M);var L,b,y,x=new Array(w);function _(Y,ne,re,ie,oe){this.static_tree=Y,this.extra_bits=ne,this.extra_base=re,this.elems=ie,this.max_length=oe,this.has_stree=Y&&Y.length;}function S(Y,ne){this.dyn_tree=Y,this.max_code=0,this.stat_desc=ne;}function R(Y){return Y<256?B[Y]:B[256+(Y>>>7)]}function z(Y,ne){Y.pending_buf[Y.pending++]=255&ne,Y.pending_buf[Y.pending++]=ne>>>8&255;}function U(Y,ne,re){Y.bi_valid>16-re?(Y.bi_buf|=ne<<Y.bi_valid&65535,z(Y,Y.bi_buf),Y.bi_buf=ne>>16-Y.bi_valid,Y.bi_valid+=re-16):(Y.bi_buf|=ne<<Y.bi_valid&65535,Y.bi_valid+=re);}function H(Y,ne,re){U(Y,re[2*ne],re[2*ne+1]);}function q(Y,ne){for(var re=0;re|=1&Y,Y>>>=1,re<<=1,0<--ne;);return re>>>1}function N(Y,ne,re){var ie,oe,se=new Array(16),le=0;for(ie=1;ie<=C;ie++)se[ie]=le=le+re[ie-1]<<1;for(oe=0;oe<=ne;oe++){var ge=Y[2*oe+1];ge!==0&&(Y[2*oe]=q(se[ge]++,ge));}}function V(Y){var ne;for(ne=0;ne<v;ne++)Y.dyn_ltree[2*ne]=0;for(ne=0;ne<w;ne++)Y.dyn_dtree[2*ne]=0;for(ne=0;ne<19;ne++)Y.bl_tree[2*ne]=0;Y.dyn_ltree[512]=1,Y.opt_len=Y.static_len=0,Y.last_lit=Y.matches=0;}function O(Y){8<Y.bi_valid?z(Y,Y.bi_buf):0<Y.bi_valid&&(Y.pending_buf[Y.pending++]=Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0;}function A(Y,ne,re,ie){var oe=2*ne,se=2*re;return Y[oe]<Y[se]||Y[oe]===Y[se]&&ie[ne]<=ie[re]}function P(Y,ne,re){for(var ie=Y.heap[re],oe=re<<1;oe<=Y.heap_len&&(oe<Y.heap_len&&A(ne,Y.heap[oe+1],Y.heap[oe],Y.depth)&&oe++,!A(ne,ie,Y.heap[oe],Y.depth));)Y.heap[re]=Y.heap[oe],re=oe,oe<<=1;Y.heap[re]=ie;}function W(Y,ne,re){var ie,oe,se,le,ge=0;if(Y.last_lit!==0)for(;ie=Y.pending_buf[Y.d_buf+2*ge]<<8|Y.pending_buf[Y.d_buf+2*ge+1],oe=Y.pending_buf[Y.l_buf+ge],ge++,ie===0?H(Y,oe,ne):(H(Y,(se=E[oe])+g+1,ne),(le=T[se])!==0&&U(Y,oe-=M[se],le),H(Y,se=R(--ie),re),(le=I[se])!==0&&U(Y,ie-=x[se],le)),ge<Y.last_lit;);H(Y,256,ne);}function Z(Y,ne){var re,ie,oe,se=ne.dyn_tree,le=ne.stat_desc.static_tree,ge=ne.stat_desc.has_stree,he=ne.stat_desc.elems,be=-1;for(Y.heap_len=0,Y.heap_max=573,re=0;re<he;re++)se[2*re]!==0?(Y.heap[++Y.heap_len]=be=re,Y.depth[re]=0):se[2*re+1]=0;for(;Y.heap_len<2;)se[2*(oe=Y.heap[++Y.heap_len]=be<2?++be:0)]=1,Y.depth[oe]=0,Y.opt_len--,ge&&(Y.static_len-=le[2*oe+1]);for(ne.max_code=be,re=Y.heap_len>>1;1<=re;re--)P(Y,se,re);for(oe=he;re=Y.heap[1],Y.heap[1]=Y.heap[Y.heap_len--],P(Y,se,1),ie=Y.heap[1],Y.heap[--Y.heap_max]=re,Y.heap[--Y.heap_max]=ie,se[2*oe]=se[2*re]+se[2*ie],Y.depth[oe]=(Y.depth[re]>=Y.depth[ie]?Y.depth[re]:Y.depth[ie])+1,se[2*re+1]=se[2*ie+1]=oe,Y.heap[1]=oe++,P(Y,se,1),2<=Y.heap_len;);Y.heap[--Y.heap_max]=Y.heap[1],(function(Me,ye){var Se,We,Ne,Ee,Le,Ce,xe=ye.dyn_tree,Qe=ye.max_code,Be=ye.stat_desc.static_tree,He=ye.stat_desc.has_stree,At=ye.stat_desc.extra_bits,Ve=ye.stat_desc.extra_base,Ze=ye.stat_desc.max_length,Nt=0;for(Ee=0;Ee<=C;Ee++)Me.bl_count[Ee]=0;for(xe[2*Me.heap[Me.heap_max]+1]=0,Se=Me.heap_max+1;Se<573;Se++)Ze<(Ee=xe[2*xe[2*(We=Me.heap[Se])+1]+1]+1)&&(Ee=Ze,Nt++),xe[2*We+1]=Ee,Qe<We||(Me.bl_count[Ee]++,Le=0,Ve<=We&&(Le=At[We-Ve]),Ce=xe[2*We],Me.opt_len+=Ce*(Ee+Le),He&&(Me.static_len+=Ce*(Be[2*We+1]+Le)));if(Nt!==0){do{for(Ee=Ze-1;Me.bl_count[Ee]===0;)Ee--;Me.bl_count[Ee]--,Me.bl_count[Ee+1]+=2,Me.bl_count[Ze]--,Nt-=2;}while(0<Nt);for(Ee=Ze;Ee!==0;Ee--)for(We=Me.bl_count[Ee];We!==0;)Qe<(Ne=Me.heap[--Se])||(xe[2*Ne+1]!==Ee&&(Me.opt_len+=(Ee-xe[2*Ne+1])*xe[2*Ne],xe[2*Ne+1]=Ee),We--);}})(Y,ne),N(se,be,Y.bl_count);}function $(Y,ne,re){var ie,oe,se=-1,le=ne[1],ge=0,he=7,be=4;for(le===0&&(he=138,be=3),ne[2*(re+1)+1]=65535,ie=0;ie<=re;ie++)oe=le,le=ne[2*(ie+1)+1],++ge<he&&oe===le||(ge<be?Y.bl_tree[2*oe]+=ge:oe!==0?(oe!==se&&Y.bl_tree[2*oe]++,Y.bl_tree[32]++):ge<=10?Y.bl_tree[34]++:Y.bl_tree[36]++,se=oe,be=(ge=0)===le?(he=138,3):oe===le?(he=6,3):(he=7,4));}function K(Y,ne,re){var ie,oe,se=-1,le=ne[1],ge=0,he=7,be=4;for(le===0&&(he=138,be=3),ie=0;ie<=re;ie++)if(oe=le,le=ne[2*(ie+1)+1],!(++ge<he&&oe===le)){if(ge<be)for(;H(Y,oe,Y.bl_tree),--ge!=0;);else oe!==0?(oe!==se&&(H(Y,oe,Y.bl_tree),ge--),H(Y,16,Y.bl_tree),U(Y,ge-3,2)):ge<=10?(H(Y,17,Y.bl_tree),U(Y,ge-3,3)):(H(Y,18,Y.bl_tree),U(Y,ge-11,7));se=oe,be=(ge=0)===le?(he=138,3):oe===le?(he=6,3):(he=7,4);}}m(x);var te=false;function J(Y,ne,re,ie){U(Y,0+(ie?1:0),3),(function(oe,se,le,ge){O(oe),z(oe,le),z(oe,~le),h.arraySet(oe.pending_buf,oe.window,se,le,oe.pending),oe.pending+=le;})(Y,ne,re);}p._tr_init=function(Y){te||((function(){var ne,re,ie,oe,se,le=new Array(16);for(oe=ie=0;oe<28;oe++)for(M[oe]=ie,ne=0;ne<1<<T[oe];ne++)E[ie++]=oe;for(E[ie-1]=oe,oe=se=0;oe<16;oe++)for(x[oe]=se,ne=0;ne<1<<I[oe];ne++)B[se++]=oe;for(se>>=7;oe<w;oe++)for(x[oe]=se<<7,ne=0;ne<1<<I[oe]-7;ne++)B[256+se++]=oe;for(re=0;re<=C;re++)le[re]=0;for(ne=0;ne<=143;)j[2*ne+1]=8,ne++,le[8]++;for(;ne<=255;)j[2*ne+1]=9,ne++,le[9]++;for(;ne<=279;)j[2*ne+1]=7,ne++,le[7]++;for(;ne<=287;)j[2*ne+1]=8,ne++,le[8]++;for(N(j,287,le),ne=0;ne<w;ne++)F[2*ne+1]=5,F[2*ne]=q(ne,5);L=new _(j,T,257,v,C),b=new _(F,I,0,w,C),y=new _(new Array(0),k,0,19,7);})(),te=true),Y.l_desc=new S(Y.dyn_ltree,L),Y.d_desc=new S(Y.dyn_dtree,b),Y.bl_desc=new S(Y.bl_tree,y),Y.bi_buf=0,Y.bi_valid=0,V(Y);},p._tr_stored_block=J,p._tr_flush_block=function(Y,ne,re,ie){var oe,se,le=0;0<Y.level?(Y.strm.data_type===2&&(Y.strm.data_type=(function(ge){var he,be=4093624447;for(he=0;he<=31;he++,be>>>=1)if(1&be&&ge.dyn_ltree[2*he]!==0)return 0;if(ge.dyn_ltree[18]!==0||ge.dyn_ltree[20]!==0||ge.dyn_ltree[26]!==0)return 1;for(he=32;he<g;he++)if(ge.dyn_ltree[2*he]!==0)return 1;return 0})(Y)),Z(Y,Y.l_desc),Z(Y,Y.d_desc),le=(function(ge){var he;for($(ge,ge.dyn_ltree,ge.l_desc.max_code),$(ge,ge.dyn_dtree,ge.d_desc.max_code),Z(ge,ge.bl_desc),he=18;3<=he&&ge.bl_tree[2*D[he]+1]===0;he--);return ge.opt_len+=3*(he+1)+5+5+4,he})(Y),oe=Y.opt_len+3+7>>>3,(se=Y.static_len+3+7>>>3)<=oe&&(oe=se)):oe=se=re+5,re+4<=oe&&ne!==-1?J(Y,ne,re,ie):Y.strategy===4||se===oe?(U(Y,2+(ie?1:0),3),W(Y,j,F)):(U(Y,4+(ie?1:0),3),(function(ge,he,be,Me){var ye;for(U(ge,he-257,5),U(ge,be-1,5),U(ge,Me-4,4),ye=0;ye<Me;ye++)U(ge,ge.bl_tree[2*D[ye]+1],3);K(ge,ge.dyn_ltree,he-1),K(ge,ge.dyn_dtree,be-1);})(Y,Y.l_desc.max_code+1,Y.d_desc.max_code+1,le+1),W(Y,Y.dyn_ltree,Y.dyn_dtree)),V(Y),ie&&O(Y);},p._tr_tally=function(Y,ne,re){return Y.pending_buf[Y.d_buf+2*Y.last_lit]=ne>>>8&255,Y.pending_buf[Y.d_buf+2*Y.last_lit+1]=255&ne,Y.pending_buf[Y.l_buf+Y.last_lit]=255&re,Y.last_lit++,ne===0?Y.dyn_ltree[2*re]++:(Y.matches++,ne--,Y.dyn_ltree[2*(E[re]+g+1)]++,Y.dyn_dtree[2*R(ne)]++),Y.last_lit===Y.lit_bufsize-1},p._tr_align=function(Y){U(Y,2,3),H(Y,256,j),(function(ne){ne.bi_valid===16?(z(ne,ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0):8<=ne.bi_valid&&(ne.pending_buf[ne.pending++]=255&ne.bi_buf,ne.bi_buf>>=8,ne.bi_valid-=8);})(Y);};},{"../utils/common":41}],53:[function(c,d,p){d.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(c,d,p){(function(h){(function(m,g){if(!m.setImmediate){var v,w,C,T,I=1,k={},D=false,j=m.document,F=Object.getPrototypeOf&&Object.getPrototypeOf(m);F=F&&F.setTimeout?F:m,v={}.toString.call(m.process)==="[object process]"?function(L){n.nextTick((function(){E(L);}));}:(function(){if(m.postMessage&&!m.importScripts){var L=true,b=m.onmessage;return m.onmessage=function(){L=false;},m.postMessage("","*"),m.onmessage=b,L}})()?(T="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",M,false):m.attachEvent("onmessage",M),function(L){m.postMessage(T+L,"*");}):m.MessageChannel?((C=new MessageChannel).port1.onmessage=function(L){E(L.data);},function(L){C.port2.postMessage(L);}):j&&"onreadystatechange"in j.createElement("script")?(w=j.documentElement,function(L){var b=j.createElement("script");b.onreadystatechange=function(){E(L),b.onreadystatechange=null,w.removeChild(b),b=null;},w.appendChild(b);}):function(L){setTimeout(E,0,L);},F.setImmediate=function(L){typeof L!="function"&&(L=new Function(""+L));for(var b=new Array(arguments.length-1),y=0;y<b.length;y++)b[y]=arguments[y+1];var x={callback:L,args:b};return k[I]=x,v(I),I++},F.clearImmediate=B;}function B(L){delete k[L];}function E(L){if(D)setTimeout(E,0,L);else {var b=k[L];if(b){D=true;try{(function(y){var x=y.callback,_=y.args;switch(_.length){case 0:x();break;case 1:x(_[0]);break;case 2:x(_[0],_[1]);break;case 3:x(_[0],_[1],_[2]);break;default:x.apply(void 0,_);}})(b);}finally{B(L),D=false;}}}}function M(L){L.source===m&&typeof L.data=="string"&&L.data.indexOf(T)===0&&E(+L.data.slice(T.length));}})(typeof self>"u"?h===void 0?this:h:self);}).call(this,i!==void 0?i:typeof self<"u"?self:typeof window<"u"?window:{});},{}]},{},[10])(10)}));}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?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(n){(function(){var i=/[\\^$.*+?()[\]{}|]/g,a=RegExp(i.source),s=typeof n=="object"&&n&&n.Object===Object&&n,o=typeof self=="object"&&self&&self.Object===Object&&self,l=s||o||Function("return this")(),f=Object.prototype.toString,u=l.Symbol,c=u?u.prototype:void 0,d=c?c.toString:void 0;function p(h){if(typeof h=="string")return h;if((function(g){return typeof g=="symbol"||(function(v){return !!v&&typeof v=="object"})(g)&&f.call(g)=="[object Symbol]"})(h))return d?d.call(h):"";var m=h+"";return m=="0"&&1/h==-1/0?"-0":m}t.exports=function(h){var m;return (h=(m=h)==null?"":p(m))&&a.test(h)?h.replace(i,"\\$&"):h};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],443:[function(e,t,r){(function(n){(function(){var i="[object Arguments]",a="[object Map]",s="[object Object]",o="[object Set]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/,u=/^\./,c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g,p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=true,m[i]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m["[object Function]"]=m[a]=m["[object Number]"]=m[s]=m["[object RegExp]"]=m[o]=m["[object String]"]=m["[object WeakMap]"]=false;var g=typeof n=="object"&&n&&n.Object===Object&&n,v=typeof self=="object"&&self&&self.Object===Object&&self,w=g||v||Function("return this")(),C=typeof r=="object"&&r&&!r.nodeType&&r,T=C&&typeof t=="object"&&t&&!t.nodeType&&t,I=T&&T.exports===C&&g.process,k=(function(){try{return I&&I.binding("util")}catch{}})(),D=k&&k.isTypedArray;function j(Q,fe,ve,me){for(var Ae=-1,Ue=Q?Q.length:0;++Ae<Ue;){var Pe=Q[Ae];fe(me,Pe,ve(Pe),Q);}return me}function F(Q,fe){for(var ve=-1,me=Q?Q.length:0;++ve<me;)if(fe(Q[ve],ve,Q))return true;return false}function B(Q){var fe=false;if(Q!=null&&typeof Q.toString!="function")try{fe=!!(Q+"");}catch{}return fe}function E(Q){var fe=-1,ve=Array(Q.size);return Q.forEach((function(me,Ae){ve[++fe]=[Ae,me];})),ve}function M(Q){var fe=-1,ve=Array(Q.size);return Q.forEach((function(me){ve[++fe]=me;})),ve}var L,b,y,x=Array.prototype,_=Function.prototype,S=Object.prototype,R=w["__core-js_shared__"],z=(L=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"",U=_.toString,H=S.hasOwnProperty,q=S.toString,N=RegExp("^"+U.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=w.Symbol,O=w.Uint8Array,A=S.propertyIsEnumerable,P=x.splice,W=(b=Object.keys,y=Object,function(Q){return b(y(Q))}),Z=qe(w,"DataView"),$=qe(w,"Map"),K=qe(w,"Promise"),te=qe(w,"Set"),J=qe(w,"WeakMap"),Y=qe(Object,"create"),ne=de(Z),re=de($),ie=de(K),oe=de(te),se=de(J),le=V?V.prototype:void 0,ge=le?le.valueOf:void 0,he=le?le.toString:void 0;function be(Q){var fe=-1,ve=Q?Q.length:0;for(this.clear();++fe<ve;){var me=Q[fe];this.set(me[0],me[1]);}}function Me(Q){var fe=-1,ve=Q?Q.length:0;for(this.clear();++fe<ve;){var me=Q[fe];this.set(me[0],me[1]);}}function ye(Q){var fe=-1,ve=Q?Q.length:0;for(this.clear();++fe<ve;){var me=Q[fe];this.set(me[0],me[1]);}}function Se(Q){var fe=-1,ve=Q?Q.length:0;for(this.__data__=new ye;++fe<ve;)this.add(Q[fe]);}function We(Q){this.__data__=new Me(Q);}function Ne(Q,fe){var ve=Re(Q)||ze(Q)?(function(Pe,ct){for(var nt=-1,Je=Array(Pe);++nt<Pe;)Je[nt]=ct(nt);return Je})(Q.length,String):[],me=ve.length,Ae=!!me;for(var Ue in Q)!H.call(Q,Ue)||Ae&&(Ue=="length"||Ye(Ue,me))||ve.push(Ue);return ve}function Ee(Q,fe){for(var ve=Q.length;ve--;)if(ot(Q[ve][0],fe))return ve;return -1}function Le(Q,fe,ve,me){return Qe(Q,(function(Ae,Ue,Pe){fe(me,Ae,ve(Ae),Pe);})),me}be.prototype.clear=function(){this.__data__=Y?Y(null):{};},be.prototype.delete=function(Q){return this.has(Q)&&delete this.__data__[Q]},be.prototype.get=function(Q){var fe=this.__data__;if(Y){var ve=fe[Q];return ve==="__lodash_hash_undefined__"?void 0:ve}return H.call(fe,Q)?fe[Q]:void 0},be.prototype.has=function(Q){var fe=this.__data__;return Y?fe[Q]!==void 0:H.call(fe,Q)},be.prototype.set=function(Q,fe){return this.__data__[Q]=Y&&fe===void 0?"__lodash_hash_undefined__":fe,this},Me.prototype.clear=function(){this.__data__=[];},Me.prototype.delete=function(Q){var fe=this.__data__,ve=Ee(fe,Q);return !(ve<0)&&(ve==fe.length-1?fe.pop():P.call(fe,ve,1),true)},Me.prototype.get=function(Q){var fe=this.__data__,ve=Ee(fe,Q);return ve<0?void 0:fe[ve][1]},Me.prototype.has=function(Q){return Ee(this.__data__,Q)>-1},Me.prototype.set=function(Q,fe){var ve=this.__data__,me=Ee(ve,Q);return me<0?ve.push([Q,fe]):ve[me][1]=fe,this},ye.prototype.clear=function(){this.__data__={hash:new be,map:new($||Me),string:new be};},ye.prototype.delete=function(Q){return Ge(this,Q).delete(Q)},ye.prototype.get=function(Q){return Ge(this,Q).get(Q)},ye.prototype.has=function(Q){return Ge(this,Q).has(Q)},ye.prototype.set=function(Q,fe){return Ge(this,Q).set(Q,fe),this},Se.prototype.add=Se.prototype.push=function(Q){return this.__data__.set(Q,"__lodash_hash_undefined__"),this},Se.prototype.has=function(Q){return this.__data__.has(Q)},We.prototype.clear=function(){this.__data__=new Me;},We.prototype.delete=function(Q){return this.__data__.delete(Q)},We.prototype.get=function(Q){return this.__data__.get(Q)},We.prototype.has=function(Q){return this.__data__.has(Q)},We.prototype.set=function(Q,fe){var ve=this.__data__;if(ve instanceof Me){var me=ve.__data__;if(!$||me.length<199)return me.push([Q,fe]),this;ve=this.__data__=new ye(me);}return ve.set(Q,fe),this};var Ce,Qe=(Ce=function(Q,fe){return Q&&Be(Q,fe,Ft)},function(Q,fe){if(Q==null)return Q;if(!je(Q))return Ce(Q,fe);for(var ve=Q.length,me=-1,Ae=Object(Q);(++me<ve)&&fe(Ae[me],me,Ae)!==false;);return Q}),Be=(function(Q){return function(fe,ve,me){for(var Ae=-1,Ue=Object(fe),Pe=me(fe),ct=Pe.length;ct--;){var nt=Pe[++Ae];if(ve(Ue[nt],nt,Ue)===false)break}return fe}})();function He(Q,fe){for(var ve=0,me=(fe=De(fe,Q)?[fe]:rt(fe)).length;Q!=null&&ve<me;)Q=Q[ue(fe[ve++])];return ve&&ve==me?Q:void 0}function At(Q,fe){return Q!=null&&fe in Object(Q)}function Ve(Q,fe,ve,me,Ae){return Q===fe||(Q==null||fe==null||!xt(Q)&&!Bt(fe)?Q!=Q&&fe!=fe:(function(Ue,Pe,ct,nt,Je,at){var It=Re(Ue),Pt=Re(Pe),gt="[object Array]",Ct="[object Array]";It||(gt=(gt=Gt(Ue))==i?s:gt),Pt||(Ct=(Ct=Gt(Pe))==i?s:Ct);var nr=gt==s&&!B(Ue),Cr=Ct==s&&!B(Pe),Er=gt==Ct;if(Er&&!nr)return at||(at=new We),It||qt(Ue)?fr(Ue,Pe,ct,nt,Je,at):(function(mt,ft,or,zt,Ht,Wt,Rr){switch(or){case "[object DataView]":if(mt.byteLength!=ft.byteLength||mt.byteOffset!=ft.byteOffset)return false;mt=mt.buffer,ft=ft.buffer;case "[object ArrayBuffer]":return !(mt.byteLength!=ft.byteLength||!zt(new O(mt),new O(ft)));case "[object Boolean]":case "[object Date]":case "[object Number]":return ot(+mt,+ft);case "[object Error]":return mt.name==ft.name&&mt.message==ft.message;case "[object RegExp]":case "[object String]":return mt==ft+"";case a:var cn=E;case o:var kt=2&Wt;if(cn||(cn=M),mt.size!=ft.size&&!kt)return false;var Jn=Rr.get(mt);if(Jn)return Jn==ft;Wt|=1,Rr.set(mt,ft);var Un=fr(cn(mt),cn(ft),zt,Ht,Wt,Rr);return Rr.delete(mt),Un;case "[object Symbol]":if(ge)return ge.call(mt)==ge.call(ft)}return false})(Ue,Pe,gt,ct,nt,Je,at);if(!(2&Je)){var kr=nr&&H.call(Ue,"__wrapped__"),Or=Cr&&H.call(Pe,"__wrapped__");if(kr||Or){var pi=kr?Ue.value():Ue,$r=Or?Pe.value():Pe;return at||(at=new We),ct(pi,$r,nt,Je,at)}}return Er?(at||(at=new We),(function(mt,ft,or,zt,Ht,Wt){var Rr=2&Ht,cn=Ft(mt),kt=cn.length,Jn=Ft(ft).length;if(kt!=Jn&&!Rr)return false;for(var Un=kt;Un--;){var Hn=cn[Un];if(!(Rr?Hn in ft:H.call(ft,Hn)))return false}var xs=Wt.get(mt);if(xs&&Wt.get(ft))return xs==ft;var Vn=true;Wt.set(mt,ft),Wt.set(ft,mt);for(var so=Rr;++Un<kt;){Hn=cn[Un];var Li=mt[Hn],lo=ft[Hn];if(zt)var Ss=Rr?zt(lo,Li,Hn,ft,mt,Wt):zt(Li,lo,Hn,mt,ft,Wt);if(!(Ss===void 0?Li===lo||or(Li,lo,zt,Ht,Wt):Ss)){Vn=false;break}so||(so=Hn=="constructor");}if(Vn&&!so){var xa=mt.constructor,Sa=ft.constructor;xa==Sa||!("constructor"in mt)||!("constructor"in ft)||typeof xa=="function"&&xa instanceof xa&&typeof Sa=="function"&&Sa instanceof Sa||(Vn=false);}return Wt.delete(mt),Wt.delete(ft),Vn})(Ue,Pe,ct,nt,Je,at)):false})(Q,fe,Ve,ve,me,Ae))}function Ze(Q){return !(!xt(Q)||(function(fe){return !!z&&z in fe})(Q))&&(Fe(Q)||B(Q)?N:p).test(de(Q))}function Nt(Q){return typeof Q=="function"?Q:Q==null?dr:typeof Q=="object"?Re(Q)?(function(me,Ae){return De(me)&&Mt(Ae)?tt(ue(me),Ae):function(Ue){var Pe=(function(ct,nt,Je){var at=ct==null?void 0:He(ct,nt);return at===void 0?Je:at})(Ue,me);return Pe===void 0&&Pe===Ae?(function(ct,nt){return ct!=null&&(function(Je,at,It){at=De(at,Je)?[at]:rt(at);for(var Pt,gt=-1,Ct=at.length;++gt<Ct;){var nr=ue(at[gt]);if(!(Pt=Je!=null&&It(Je,nr)))break;Je=Je[nr];}return Pt||!!(Ct=Je?Je.length:0)&&st(Ct)&&Ye(nr,Ct)&&(Re(Je)||ze(Je))})(ct,nt,At)})(Ue,me):Ve(Ae,Pe,void 0,3)}})(Q[0],Q[1]):(function(me){var Ae=(function(Ue){for(var Pe=Ft(Ue),ct=Pe.length;ct--;){var nt=Pe[ct],Je=Ue[nt];Pe[ct]=[nt,Je,Mt(Je)];}return Pe})(me);return Ae.length==1&&Ae[0][2]?tt(Ae[0][0],Ae[0][1]):function(Ue){return Ue===me||(function(Pe,ct,nt,Je){var at=nt.length,It=at;if(Pe==null)return !It;for(Pe=Object(Pe);at--;){var gt=nt[at];if(gt[2]?gt[1]!==Pe[gt[0]]:!(gt[0]in Pe))return false}for(;++at<It;){var Ct=(gt=nt[at])[0],nr=Pe[Ct],Cr=gt[1];if(gt[2]){if(nr===void 0&&!(Ct in Pe))return false}else {var Er=new We;var kr; if(!(kr===void 0?Ve(Cr,nr,Je,3,Er):kr))return false}}return true})(Ue,me,Ae)}})(Q):De(fe=Q)?(ve=ue(fe),function(me){return me?.[ve]}):(function(me){return function(Ae){return He(Ae,me)}})(fe);var fe,ve;}function et(Q){if(ve=(fe=Q)&&fe.constructor,me=typeof ve=="function"&&ve.prototype||S,fe!==me)return W(Q);var fe,ve,me,Ae=[];for(var Ue in Object(Q))H.call(Q,Ue)&&Ue!="constructor"&&Ae.push(Ue);return Ae}function rt(Q){return Re(Q)?Q:ee(Q)}function fr(Q,fe,ve,me,Ae,Ue){var Pe=2&Ae,ct=Q.length,nt=fe.length;if(ct!=nt&&!(Pe&&nt>ct))return false;var Je=Ue.get(Q);if(Je&&Ue.get(fe))return Je==fe;var at=-1,It=true,Pt=1&Ae?new Se:void 0;for(Ue.set(Q,fe),Ue.set(fe,Q);++at<ct;){var gt=Q[at],Ct=fe[at];if(me)var nr=Pe?me(Ct,gt,at,fe,Q,Ue):me(gt,Ct,at,Q,fe,Ue);if(nr!==void 0){if(nr)continue;It=false;break}if(Pt){if(!F(fe,(function(Cr,Er){if(!Pt.has(Er)&&(gt===Cr||ve(gt,Cr,me,Ae,Ue)))return Pt.add(Er)}))){It=false;break}}else if(gt!==Ct&&!ve(gt,Ct,me,Ae,Ue)){It=false;break}}return Ue.delete(Q),Ue.delete(fe),It}function Ge(Q,fe){var ve,me,Ae=Q.__data__;return ((me=typeof(ve=fe))=="string"||me=="number"||me=="symbol"||me=="boolean"?ve!=="__proto__":ve===null)?Ae[typeof fe=="string"?"string":"hash"]:Ae.map}function qe(Q,fe){var ve=(function(me,Ae){return me?.[Ae]})(Q,fe);return Ze(ve)?ve:void 0}var Gt=function(Q){return q.call(Q)};function Ye(Q,fe){return !!(fe=fe??9007199254740991)&&(typeof Q=="number"||h.test(Q))&&Q>-1&&Q%1==0&&Q<fe}function De(Q,fe){if(Re(Q))return false;var ve=typeof Q;return !(ve!="number"&&ve!="symbol"&&ve!="boolean"&&Q!=null&&!Tt(Q))||f.test(Q)||!l.test(Q)||fe!=null&&Q in Object(fe)}function Mt(Q){return Q==Q&&!xt(Q)}function tt(Q,fe){return function(ve){return ve!=null&&ve[Q]===fe&&(fe!==void 0||Q in Object(ve))}}(Z&&Gt(new Z(new ArrayBuffer(1)))!="[object DataView]"||$&&Gt(new $)!=a||K&&Gt(K.resolve())!="[object Promise]"||te&&Gt(new te)!=o||J&&Gt(new J)!="[object WeakMap]")&&(Gt=function(Q){var fe=q.call(Q),ve=fe==s?Q.constructor:void 0,me=ve?de(ve):void 0;if(me)switch(me){case ne:return "[object DataView]";case re:return a;case ie:return "[object Promise]";case oe:return o;case se:return "[object WeakMap]"}return fe});var ee=Oe((function(Q){var fe;Q=(fe=Q)==null?"":(function(me){if(typeof me=="string")return me;if(Tt(me))return he?he.call(me):"";var Ae=me+"";return Ae=="0"&&1/me==-1/0?"-0":Ae})(fe);var ve=[];return u.test(Q)&&ve.push(""),Q.replace(c,(function(me,Ae,Ue,Pe){ve.push(Ue?Pe.replace(d,"$1"):Ae||me);})),ve}));function ue(Q){if(typeof Q=="string"||Tt(Q))return Q;var fe=Q+"";return fe=="0"&&1/Q==-1/0?"-0":fe}function de(Q){if(Q!=null){try{return U.call(Q)}catch{}try{return Q+""}catch{}}return ""}var _e,Te=(_e=function(Q,fe,ve){H.call(Q,ve)?Q[ve].push(fe):Q[ve]=[fe];},function(Q,fe){var ve=Re(Q)?j:Le,me={};return ve(Q,_e,Nt(fe),me)});function Oe(Q,fe){if(typeof Q!="function"||fe&&typeof fe!="function")throw new TypeError("Expected a function");var ve=function(){var me=arguments,Ae=fe?fe.apply(this,me):me[0],Ue=ve.cache;if(Ue.has(Ae))return Ue.get(Ae);var Pe=Q.apply(this,me);return ve.cache=Ue.set(Ae,Pe),Pe};return ve.cache=new(Oe.Cache||ye),ve}function ot(Q,fe){return Q===fe||Q!=Q&&fe!=fe}function ze(Q){return (function(fe){return Bt(fe)&&je(fe)})(Q)&&H.call(Q,"callee")&&(!A.call(Q,"callee")||q.call(Q)==i)}Oe.Cache=ye;var Re=Array.isArray;function je(Q){return Q!=null&&st(Q.length)&&!Fe(Q)}function Fe(Q){var fe=xt(Q)?q.call(Q):"";return fe=="[object Function]"||fe=="[object GeneratorFunction]"}function st(Q){return typeof Q=="number"&&Q>-1&&Q%1==0&&Q<=9007199254740991}function xt(Q){var fe=typeof Q;return !!Q&&(fe=="object"||fe=="function")}function Bt(Q){return !!Q&&typeof Q=="object"}function Tt(Q){return typeof Q=="symbol"||Bt(Q)&&q.call(Q)=="[object Symbol]"}var qt=D?(function(Q){return function(fe){return Q(fe)}})(D):function(Q){return Bt(Q)&&st(Q.length)&&!!m[q.call(Q)]};function Ft(Q){return je(Q)?Ne(Q):et(Q)}function dr(Q){return Q}t.exports=Te;}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],444:[function(e,t,r){var n=Object.prototype.toString;t.exports=function(i){return i===true||i===false||(function(a){return !!a&&typeof a=="object"})(i)&&n.call(i)=="[object Boolean]"};},{}],445:[function(e,t,r){(function(n){(function(){var i="[object Arguments]",a="[object Map]",s="[object Object]",o="[object Set]",l=/^\[object .+?Constructor\]$/,f=/^(?: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]"]=true,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u[a]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u[o]=u["[object String]"]=u["[object WeakMap]"]=false;var c=typeof n=="object"&&n&&n.Object===Object&&n,d=typeof self=="object"&&self&&self.Object===Object&&self,p=c||d||Function("return this")(),h=typeof r=="object"&&r&&!r.nodeType&&r,m=h&&typeof t=="object"&&t&&!t.nodeType&&t,g=m&&m.exports===h,v=g&&c.process,w=(function(){try{return v&&v.binding&&v.binding("util")}catch{}})(),C=w&&w.isTypedArray;function T(ee,ue){for(var de=-1,_e=ee==null?0:ee.length;++de<_e;)if(ue(ee[de],de,ee))return true;return false}function I(ee){var ue=-1,de=Array(ee.size);return ee.forEach((function(_e,Ie){de[++ue]=[Ie,_e];})),de}function k(ee){var ue=-1,de=Array(ee.size);return ee.forEach((function(_e){de[++ue]=_e;})),de}var D,j,F,B=Array.prototype,E=Function.prototype,M=Object.prototype,L=p["__core-js_shared__"],b=E.toString,y=M.hasOwnProperty,x=(D=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"",_=M.toString,S=RegExp("^"+b.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=g?p.Buffer:void 0,z=p.Symbol,U=p.Uint8Array,H=M.propertyIsEnumerable,q=B.splice,N=z?z.toStringTag:void 0,V=Object.getOwnPropertySymbols,O=R?R.isBuffer:void 0,A=(j=Object.keys,F=Object,function(ee){return j(F(ee))}),P=He(p,"DataView"),W=He(p,"Map"),Z=He(p,"Promise"),$=He(p,"Set"),K=He(p,"WeakMap"),te=He(Object,"create"),J=Nt(P),Y=Nt(W),ne=Nt(Z),re=Nt($),ie=Nt(K),oe=z?z.prototype:void 0,se=oe?oe.valueOf:void 0;function le(ee){var ue=-1,de=ee==null?0:ee.length;for(this.clear();++ue<de;){var _e=ee[ue];this.set(_e[0],_e[1]);}}function ge(ee){var ue=-1,de=ee==null?0:ee.length;for(this.clear();++ue<de;){var _e=ee[ue];this.set(_e[0],_e[1]);}}function he(ee){var ue=-1,de=ee==null?0:ee.length;for(this.clear();++ue<de;){var _e=ee[ue];this.set(_e[0],_e[1]);}}function be(ee){var ue=-1,de=ee==null?0:ee.length;for(this.__data__=new he;++ue<de;)this.add(ee[ue]);}function Me(ee){var ue=this.__data__=new ge(ee);this.size=ue.size;}function ye(ee,ue){var de=fr(ee),_e=!de&&rt(ee),Ie=!de&&!_e&&Ge(ee),Te=!de&&!_e&&!Ie&&Mt(ee),Oe=de||_e||Ie||Te,ot=Oe?(function(je,Fe){for(var st=-1,xt=Array(je);++st<je;)xt[st]=Fe(st);return xt})(ee.length,String):[],ze=ot.length;for(var Re in ee)!y.call(ee,Re)||Oe&&(Re=="length"||Ie&&(Re=="offset"||Re=="parent")||Te&&(Re=="buffer"||Re=="byteLength"||Re=="byteOffset")||Ze(Re,ze))||ot.push(Re);return ot}function Se(ee,ue){for(var de=ee.length;de--;)if(et(ee[de][0],ue))return de;return -1}function We(ee){return ee==null?ee===void 0?"[object Undefined]":"[object Null]":N&&N in Object(ee)?(function(ue){var de=y.call(ue,N),_e=ue[N];try{ue[N]=void 0;var Ie=!0;}catch{}var Te=_.call(ue);return Ie&&(de?ue[N]=_e:delete ue[N]),Te})(ee):(function(ue){return _.call(ue)})(ee)}function Ne(ee){return De(ee)&&We(ee)==i}function Ee(ee,ue,de,_e,Ie){return ee===ue||(ee==null||ue==null||!De(ee)&&!De(ue)?ee!=ee&&ue!=ue:(function(Te,Oe,ot,ze,Re,je){var Fe=fr(Te),st=fr(Oe),xt=Fe?"[object Array]":Ve(Te),Bt=st?"[object Array]":Ve(Oe),Tt=(xt=xt==i?s:xt)==s,qt=(Bt=Bt==i?s:Bt)==s,Ft=xt==Bt;if(Ft&&Ge(Te)){if(!Ge(Oe))return false;Fe=true,Tt=false;}if(Ft&&!Tt)return je||(je=new Me),Fe||Mt(Te)?xe(Te,Oe,ot,ze,Re,je):(function(me,Ae,Ue,Pe,ct,nt,Je){switch(Ue){case "[object DataView]":if(me.byteLength!=Ae.byteLength||me.byteOffset!=Ae.byteOffset)return false;me=me.buffer,Ae=Ae.buffer;case "[object ArrayBuffer]":return !(me.byteLength!=Ae.byteLength||!nt(new U(me),new U(Ae)));case "[object Boolean]":case "[object Date]":case "[object Number]":return et(+me,+Ae);case "[object Error]":return me.name==Ae.name&&me.message==Ae.message;case "[object RegExp]":case "[object String]":return me==Ae+"";case a:var at=I;case o:var It=1&Pe;if(at||(at=k),me.size!=Ae.size&&!It)return false;var Pt=Je.get(me);if(Pt)return Pt==Ae;Pe|=2,Je.set(me,Ae);var gt=xe(at(me),at(Ae),Pe,ct,nt,Je);return Je.delete(me),gt;case "[object Symbol]":if(se)return se.call(me)==se.call(Ae)}return false})(Te,Oe,xt,ot,ze,Re,je);if(!(1&ot)){var dr=Tt&&y.call(Te,"__wrapped__"),Q=qt&&y.call(Oe,"__wrapped__");if(dr||Q){var fe=dr?Te.value():Te,ve=Q?Oe.value():Oe;return je||(je=new Me),Re(fe,ve,ot,ze,je)}}return Ft?(je||(je=new Me),(function(me,Ae,Ue,Pe,ct,nt){var Je=1&Ue,at=Qe(me),It=at.length,Pt=Qe(Ae).length;if(It!=Pt&&!Je)return false;for(var gt=It;gt--;){var Ct=at[gt];if(!(Je?Ct in Ae:y.call(Ae,Ct)))return false}var nr=nt.get(me);if(nr&&nt.get(Ae))return nr==Ae;var Cr=true;nt.set(me,Ae),nt.set(Ae,me);for(var Er=Je;++gt<It;){Ct=at[gt];var kr=me[Ct],Or=Ae[Ct];if(Pe)var pi=Je?Pe(Or,kr,Ct,Ae,me,nt):Pe(kr,Or,Ct,me,Ae,nt);if(!(pi===void 0?kr===Or||ct(kr,Or,Ue,Pe,nt):pi)){Cr=false;break}Er||(Er=Ct=="constructor");}if(Cr&&!Er){var $r=me.constructor,mt=Ae.constructor;$r==mt||!("constructor"in me)||!("constructor"in Ae)||typeof $r=="function"&&$r instanceof $r&&typeof mt=="function"&&mt instanceof mt||(Cr=false);}return nt.delete(me),nt.delete(Ae),Cr})(Te,Oe,ot,ze,Re,je)):false})(ee,ue,de,_e,Ee,Ie))}function Le(ee){return !(!Ye(ee)||(function(ue){return !!x&&x in ue})(ee))&&(qe(ee)?S:l).test(Nt(ee))}function Ce(ee){if(de=(ue=ee)&&ue.constructor,_e=typeof de=="function"&&de.prototype||M,ue!==_e)return A(ee);var ue,de,_e,Ie=[];for(var Te in Object(ee))y.call(ee,Te)&&Te!="constructor"&&Ie.push(Te);return Ie}function xe(ee,ue,de,_e,Ie,Te){var Oe=1&de,ot=ee.length,ze=ue.length;if(ot!=ze&&!(Oe&&ze>ot))return false;var Re=Te.get(ee);if(Re&&Te.get(ue))return Re==ue;var je=-1,Fe=true,st=2&de?new be:void 0;for(Te.set(ee,ue),Te.set(ue,ee);++je<ot;){var xt=ee[je],Bt=ue[je];if(_e)var Tt=Oe?_e(Bt,xt,je,ue,ee,Te):_e(xt,Bt,je,ee,ue,Te);if(Tt!==void 0){if(Tt)continue;Fe=false;break}if(st){if(!T(ue,(function(qt,Ft){if(dr=Ft,!st.has(dr)&&(xt===qt||Ie(xt,qt,de,_e,Te)))return st.push(Ft);var dr;}))){Fe=false;break}}else if(xt!==Bt&&!Ie(xt,Bt,de,_e,Te)){Fe=false;break}}return Te.delete(ee),Te.delete(ue),Fe}function Qe(ee){return (function(ue,de,_e){var Ie=de(ue);return fr(ue)?Ie:(function(Te,Oe){for(var ot=-1,ze=Oe.length,Re=Te.length;++ot<ze;)Te[Re+ot]=Oe[ot];return Te})(Ie,_e(ue))})(ee,tt,At)}function Be(ee,ue){var de,_e,Ie=ee.__data__;return ((_e=typeof(de=ue))=="string"||_e=="number"||_e=="symbol"||_e=="boolean"?de!=="__proto__":de===null)?Ie[typeof ue=="string"?"string":"hash"]:Ie.map}function He(ee,ue){var de=(function(_e,Ie){return _e?.[Ie]})(ee,ue);return Le(de)?de:void 0}le.prototype.clear=function(){this.__data__=te?te(null):{},this.size=0;},le.prototype.delete=function(ee){var ue=this.has(ee)&&delete this.__data__[ee];return this.size-=ue?1:0,ue},le.prototype.get=function(ee){var ue=this.__data__;if(te){var de=ue[ee];return de==="__lodash_hash_undefined__"?void 0:de}return y.call(ue,ee)?ue[ee]:void 0},le.prototype.has=function(ee){var ue=this.__data__;return te?ue[ee]!==void 0:y.call(ue,ee)},le.prototype.set=function(ee,ue){var de=this.__data__;return this.size+=this.has(ee)?0:1,de[ee]=te&&ue===void 0?"__lodash_hash_undefined__":ue,this},ge.prototype.clear=function(){this.__data__=[],this.size=0;},ge.prototype.delete=function(ee){var ue=this.__data__,de=Se(ue,ee);return !(de<0)&&(de==ue.length-1?ue.pop():q.call(ue,de,1),--this.size,true)},ge.prototype.get=function(ee){var ue=this.__data__,de=Se(ue,ee);return de<0?void 0:ue[de][1]},ge.prototype.has=function(ee){return Se(this.__data__,ee)>-1},ge.prototype.set=function(ee,ue){var de=this.__data__,_e=Se(de,ee);return _e<0?(++this.size,de.push([ee,ue])):de[_e][1]=ue,this},he.prototype.clear=function(){this.size=0,this.__data__={hash:new le,map:new(W||ge),string:new le};},he.prototype.delete=function(ee){var ue=Be(this,ee).delete(ee);return this.size-=ue?1:0,ue},he.prototype.get=function(ee){return Be(this,ee).get(ee)},he.prototype.has=function(ee){return Be(this,ee).has(ee)},he.prototype.set=function(ee,ue){var de=Be(this,ee),_e=de.size;return de.set(ee,ue),this.size+=de.size==_e?0:1,this},be.prototype.add=be.prototype.push=function(ee){return this.__data__.set(ee,"__lodash_hash_undefined__"),this},be.prototype.has=function(ee){return this.__data__.has(ee)},Me.prototype.clear=function(){this.__data__=new ge,this.size=0;},Me.prototype.delete=function(ee){var ue=this.__data__,de=ue.delete(ee);return this.size=ue.size,de},Me.prototype.get=function(ee){return this.__data__.get(ee)},Me.prototype.has=function(ee){return this.__data__.has(ee)},Me.prototype.set=function(ee,ue){var de=this.__data__;if(de instanceof ge){var _e=de.__data__;if(!W||_e.length<199)return _e.push([ee,ue]),this.size=++de.size,this;de=this.__data__=new he(_e);}return de.set(ee,ue),this.size=de.size,this};var At=V?function(ee){return ee==null?[]:(ee=Object(ee),(function(ue,de){for(var _e=-1,Ie=ue==null?0:ue.length,Te=0,Oe=[];++_e<Ie;){var ot=ue[_e];de(ot,_e,ue)&&(Oe[Te++]=ot);}return Oe})(V(ee),(function(ue){return H.call(ee,ue)})))}:function(){return []},Ve=We;function Ze(ee,ue){return !!(ue=ue??9007199254740991)&&(typeof ee=="number"||f.test(ee))&&ee>-1&&ee%1==0&&ee<ue}function Nt(ee){if(ee!=null){try{return b.call(ee)}catch{}try{return ee+""}catch{}}return ""}function et(ee,ue){return ee===ue||ee!=ee&&ue!=ue}(P&&Ve(new P(new ArrayBuffer(1)))!="[object DataView]"||W&&Ve(new W)!=a||Z&&Ve(Z.resolve())!="[object Promise]"||$&&Ve(new $)!=o||K&&Ve(new K)!="[object WeakMap]")&&(Ve=function(ee){var ue=We(ee),de=ue==s?ee.constructor:void 0,_e=de?Nt(de):"";if(_e)switch(_e){case J:return "[object DataView]";case Y:return a;case ne:return "[object Promise]";case re:return o;case ie:return "[object WeakMap]"}return ue});var rt=Ne((function(){return arguments})())?Ne:function(ee){return De(ee)&&y.call(ee,"callee")&&!H.call(ee,"callee")},fr=Array.isArray,Ge=O||function(){return false};function qe(ee){if(!Ye(ee))return false;var ue=We(ee);return ue=="[object Function]"||ue=="[object GeneratorFunction]"||ue=="[object AsyncFunction]"||ue=="[object Proxy]"}function Gt(ee){return typeof ee=="number"&&ee>-1&&ee%1==0&&ee<=9007199254740991}function Ye(ee){var ue=typeof ee;return ee!=null&&(ue=="object"||ue=="function")}function De(ee){return ee!=null&&typeof ee=="object"}var Mt=C?(function(ee){return function(ue){return ee(ue)}})(C):function(ee){return De(ee)&&Gt(ee.length)&&!!u[We(ee)]};function tt(ee){return (ue=ee)!=null&&Gt(ue.length)&&!qe(ue)?ye(ee):Ce(ee);var ue;}t.exports=function(ee,ue){return Ee(ee,ue)};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],446:[function(e,t,r){(function(n){(function(){var i=typeof n=="object"&&n&&n.Object===Object&&n,a=typeof self=="object"&&self&&self.Object===Object&&self,s=i||a||Function("return this")(),o=Object.prototype,l=o.hasOwnProperty,f=o.toString,u=s.Symbol,c=u?u.toStringTag:void 0;function d(p){return p==null?p===void 0?"[object Undefined]":"[object Null]":c&&c in Object(p)?(function(h){var m=l.call(h,c),g=h[c];try{h[c]=void 0;var v=!0;}catch{}var w=f.call(h);return v&&(m?h[c]=g:delete h[c]),w})(p):(function(h){return f.call(h)})(p)}t.exports=function(p){if(!(function(m){var g=typeof m;return m!=null&&(g=="object"||g=="function")})(p))return false;var h=d(p);return h=="[object Function]"||h=="[object GeneratorFunction]"||h=="[object AsyncFunction]"||h=="[object Proxy]"};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],447:[function(e,t,r){t.exports=function(n){return n==null};},{}],448:[function(e,t,r){t.exports=function(n){return n===void 0};},{}],449:[function(e,t,r){(function(n){(function(){var i=/^\[object .+?Constructor\]$/,a=typeof n=="object"&&n&&n.Object===Object&&n,s=typeof self=="object"&&self&&self.Object===Object&&self,o=a||s||Function("return this")();function l(U,H){return !!(U&&U.length)&&(function(q,N,V){if(N!=N)return (function(P,W,Z,$){for(var K=P.length,te=Z+(-1);++te<K;)if(W(P[te],te,P))return te;return -1})(q,u,V);for(var O=V-1,A=q.length;++O<A;)if(q[O]===N)return O;return -1})(U,H,0)>-1}function u(U){return U!=U}function c(U,H){return U.has(H)}function d(U){var H=-1,q=Array(U.size);return U.forEach((function(N){q[++H]=N;})),q}var p,h=Array.prototype,m=Function.prototype,g=Object.prototype,v=o["__core-js_shared__"],w=(p=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",C=m.toString,T=g.hasOwnProperty,I=g.toString,k=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=h.splice,j=R(o,"Map"),F=R(o,"Set"),B=R(Object,"create");function E(U){var H=-1,q=U?U.length:0;for(this.clear();++H<q;){var N=U[H];this.set(N[0],N[1]);}}function M(U){var H=-1,q=U?U.length:0;for(this.clear();++H<q;){var N=U[H];this.set(N[0],N[1]);}}function L(U){var H=-1,q=U?U.length:0;for(this.clear();++H<q;){var N=U[H];this.set(N[0],N[1]);}}function b(U){var H=-1,q=U?U.length:0;for(this.__data__=new L;++H<q;)this.add(U[H]);}function y(U,H){for(var q,N,V=U.length;V--;)if((q=U[V][0])===(N=H)||q!=q&&N!=N)return V;return -1}function x(U){return !(!z(U)||(H=U,w&&w in H))&&((function(q){var N=z(q)?I.call(q):"";return N=="[object Function]"||N=="[object GeneratorFunction]"})(U)||(function(q){var N=false;if(q!=null&&typeof q.toString!="function")try{N=!!(q+"");}catch{}return N})(U)?k:i).test((function(q){if(q!=null){try{return C.call(q)}catch{}try{return q+""}catch{}}return ""})(U));var H;}E.prototype.clear=function(){this.__data__=B?B(null):{};},E.prototype.delete=function(U){return this.has(U)&&delete this.__data__[U]},E.prototype.get=function(U){var H=this.__data__;if(B){var q=H[U];return q==="__lodash_hash_undefined__"?void 0:q}return T.call(H,U)?H[U]:void 0},E.prototype.has=function(U){var H=this.__data__;return B?H[U]!==void 0:T.call(H,U)},E.prototype.set=function(U,H){return this.__data__[U]=B&&H===void 0?"__lodash_hash_undefined__":H,this},M.prototype.clear=function(){this.__data__=[];},M.prototype.delete=function(U){var H=this.__data__,q=y(H,U);return !(q<0)&&(q==H.length-1?H.pop():D.call(H,q,1),true)},M.prototype.get=function(U){var H=this.__data__,q=y(H,U);return q<0?void 0:H[q][1]},M.prototype.has=function(U){return y(this.__data__,U)>-1},M.prototype.set=function(U,H){var q=this.__data__,N=y(q,U);return N<0?q.push([U,H]):q[N][1]=H,this},L.prototype.clear=function(){this.__data__={hash:new E,map:new(j||M),string:new E};},L.prototype.delete=function(U){return S(this,U).delete(U)},L.prototype.get=function(U){return S(this,U).get(U)},L.prototype.has=function(U){return S(this,U).has(U)},L.prototype.set=function(U,H){return S(this,U).set(U,H),this},b.prototype.add=b.prototype.push=function(U){return this.__data__.set(U,"__lodash_hash_undefined__"),this},b.prototype.has=function(U){return this.__data__.has(U)};var _=F&&1/d(new F([,-0]))[1]==1/0?function(U){return new F(U)}:function(){};function S(U,H){var q,N,V=U.__data__;return ((N=typeof(q=H))=="string"||N=="number"||N=="symbol"||N=="boolean"?q!=="__proto__":q===null)?V[typeof H=="string"?"string":"hash"]:V.map}function R(U,H){var q=(function(N,V){return N?.[V]})(U,H);return x(q)?q:void 0}function z(U){var H=typeof U;return !!U&&(H=="object"||H=="function")}t.exports=function(U){return U&&U.length?(function(H,q,N){var V=-1,O=l,A=H.length,P=true,W=[],Z=W;if(A>=200){var $=_(H);if($)return d($);P=false,O=c,Z=new b;}else Z=W;e:for(;++V<A;){var K=H[V],te=K;if(K=K!==0?K:0,P&&te==te){for(var J=Z.length;J--;)if(Z[J]===te)continue e;W.push(K);}else O(Z,te,N)||(Z!==W&&Z.push(te),W.push(K));}return W})(U):[]};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],450:[function(e,t,r){var n=e("inherits"),i=e("hash-base"),a=e("safe-buffer").Buffer,s=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878;}function l(p,h){return p<<h|p>>>32-h}function f(p,h,m,g,v,w,C){return l(p+(h&m|~h&g)+v+w|0,C)+h|0}function u(p,h,m,g,v,w,C){return l(p+(h&g|m&~g)+v+w|0,C)+h|0}function c(p,h,m,g,v,w,C){return l(p+(h^m^g)+v+w|0,C)+h|0}function d(p,h,m,g,v,w,C){return l(p+(m^(h|~g))+v+w|0,C)+h|0}n(o,i),o.prototype._update=function(){for(var p=s,h=0;h<16;++h)p[h]=this._block.readInt32LE(4*h);var m=this._a,g=this._b,v=this._c,w=this._d;m=f(m,g,v,w,p[0],3614090360,7),w=f(w,m,g,v,p[1],3905402710,12),v=f(v,w,m,g,p[2],606105819,17),g=f(g,v,w,m,p[3],3250441966,22),m=f(m,g,v,w,p[4],4118548399,7),w=f(w,m,g,v,p[5],1200080426,12),v=f(v,w,m,g,p[6],2821735955,17),g=f(g,v,w,m,p[7],4249261313,22),m=f(m,g,v,w,p[8],1770035416,7),w=f(w,m,g,v,p[9],2336552879,12),v=f(v,w,m,g,p[10],4294925233,17),g=f(g,v,w,m,p[11],2304563134,22),m=f(m,g,v,w,p[12],1804603682,7),w=f(w,m,g,v,p[13],4254626195,12),v=f(v,w,m,g,p[14],2792965006,17),m=u(m,g=f(g,v,w,m,p[15],1236535329,22),v,w,p[1],4129170786,5),w=u(w,m,g,v,p[6],3225465664,9),v=u(v,w,m,g,p[11],643717713,14),g=u(g,v,w,m,p[0],3921069994,20),m=u(m,g,v,w,p[5],3593408605,5),w=u(w,m,g,v,p[10],38016083,9),v=u(v,w,m,g,p[15],3634488961,14),g=u(g,v,w,m,p[4],3889429448,20),m=u(m,g,v,w,p[9],568446438,5),w=u(w,m,g,v,p[14],3275163606,9),v=u(v,w,m,g,p[3],4107603335,14),g=u(g,v,w,m,p[8],1163531501,20),m=u(m,g,v,w,p[13],2850285829,5),w=u(w,m,g,v,p[2],4243563512,9),v=u(v,w,m,g,p[7],1735328473,14),m=c(m,g=u(g,v,w,m,p[12],2368359562,20),v,w,p[5],4294588738,4),w=c(w,m,g,v,p[8],2272392833,11),v=c(v,w,m,g,p[11],1839030562,16),g=c(g,v,w,m,p[14],4259657740,23),m=c(m,g,v,w,p[1],2763975236,4),w=c(w,m,g,v,p[4],1272893353,11),v=c(v,w,m,g,p[7],4139469664,16),g=c(g,v,w,m,p[10],3200236656,23),m=c(m,g,v,w,p[13],681279174,4),w=c(w,m,g,v,p[0],3936430074,11),v=c(v,w,m,g,p[3],3572445317,16),g=c(g,v,w,m,p[6],76029189,23),m=c(m,g,v,w,p[9],3654602809,4),w=c(w,m,g,v,p[12],3873151461,11),v=c(v,w,m,g,p[15],530742520,16),m=d(m,g=c(g,v,w,m,p[2],3299628645,23),v,w,p[0],4096336452,6),w=d(w,m,g,v,p[7],1126891415,10),v=d(v,w,m,g,p[14],2878612391,15),g=d(g,v,w,m,p[5],4237533241,21),m=d(m,g,v,w,p[12],1700485571,6),w=d(w,m,g,v,p[3],2399980690,10),v=d(v,w,m,g,p[10],4293915773,15),g=d(g,v,w,m,p[1],2240044497,21),m=d(m,g,v,w,p[8],1873313359,6),w=d(w,m,g,v,p[15],4264355552,10),v=d(v,w,m,g,p[6],2734768916,15),g=d(g,v,w,m,p[13],1309151649,21),m=d(m,g,v,w,p[4],4149444226,6),w=d(w,m,g,v,p[11],3174756917,10),v=d(v,w,m,g,p[2],718787259,15),g=d(g,v,w,m,p[9],3951481745,21),this._a=this._a+m|0,this._b=this._b+g|0,this._c=this._c+v|0,this._d=this._d+w|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 p=a.allocUnsafe(16);return p.writeInt32LE(this._a,0),p.writeInt32LE(this._b,4),p.writeInt32LE(this._c,8),p.writeInt32LE(this._d,12),p},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 a(s){this.rand=s||new i.Rand;}t.exports=a,a.create=function(s){return new a(s)},a.prototype._randbelow=function(s){var o=s.bitLength(),l=Math.ceil(o/8);do var f=new n(this.rand.generate(l));while(f.cmp(s)>=0);return f},a.prototype._randrange=function(s,o){var l=o.sub(s);return s.add(this._randbelow(l))},a.prototype.test=function(s,o,l){var f=s.bitLength(),u=n.mont(s),c=new n(1).toRed(u);o||(o=Math.max(1,f/48|0));for(var d=s.subn(1),p=0;!d.testn(p);p++);for(var h=s.shrn(p),m=d.toRed(u);o>0;o--){var g=this._randrange(new n(2),d);l&&l(g);var v=g.toRed(u).redPow(h);if(v.cmp(c)!==0&&v.cmp(m)!==0){for(var w=1;w<p;w++){if((v=v.redSqr()).cmp(c)===0)return false;if(v.cmp(m)===0)break}if(w===p)return false}}return true},a.prototype.getDivisor=function(s,o){var l=s.bitLength(),f=n.mont(s),u=new n(1).toRed(f);o||(o=Math.max(1,l/48|0));for(var c=s.subn(1),d=0;!c.testn(d);d++);for(var p=s.shrn(d),h=c.toRed(f);o>0;o--){var m=this._randrange(new n(2),c),g=s.gcd(m);if(g.cmpn(1)!==0)return g;var v=m.toRed(f).redPow(p);if(v.cmp(u)!==0&&v.cmp(h)!==0){for(var w=1;w<d;w++){if((v=v.redSqr()).cmp(u)===0)return v.fromRed().subn(1).gcd(s);if(v.cmp(h)===0)break}if(w===d)return (v=v.redSqr()).fromRed().subn(1).gcd(s)}}return false};},{"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(i,a){if(!i)throw new Error(a||"Assertion failed")}t.exports=n,n.equal=function(i,a,s){if(i!=a)throw new Error(s||"Assertion failed: "+i+" != "+a)};},{}],454:[function(e,t,r){var n=r;function i(s){return s.length===1?"0"+s:s}function a(s){for(var o="",l=0;l<s.length;l++)o+=i(s[l].toString(16));return o}n.toArray=function(s,o){if(Array.isArray(s))return s.slice();if(!s)return [];var l=[];if(typeof s!="string"){for(var f=0;f<s.length;f++)l[f]=0|s[f];return l}if(o==="hex")for((s=s.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(s="0"+s),f=0;f<s.length;f+=2)l.push(parseInt(s[f]+s[f+1],16));else for(f=0;f<s.length;f++){var u=s.charCodeAt(f),c=u>>8,d=255&u;c?l.push(c,d):l.push(d);}return l},n.zero2=i,n.toHex=a,n.encode=function(s,o){return o==="hex"?a(s):s};},{}],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");var i=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.RSAPrivateKey=i;var a=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int());}));r.RSAPublicKey=a;var s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr());}));r.PublicKey=s;var o=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());})),l=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr());}));r.PrivateKey=l;var f=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.EncryptedPrivateKey=f;var u=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.DSAPrivateKey=u,r.DSAparam=n.define("DSAparam",(function(){this.int();}));var c=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr());}));r.ECPrivateKey=c;var d=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()});})),a=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any());})),s=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(s),this.key("subjectPublicKey").bitstr());})),l=n.define("RelativeDistinguishedName",(function(){this.setof(a);})),f=n.define("RDNSequence",(function(){this.seqof(l);})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(f)});})),c=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i));})),d=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(false),this.key("extnValue").octstr());})),p=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),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(d).optional());})),h=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr());}));t.exports=h;},{"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,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=e("evp_bytestokey"),o=e("browserify-aes"),l=e("safe-buffer").Buffer;t.exports=function(f,u){var c,d=f.toString(),p=d.match(n);if(p){var h="aes"+p[1],m=l.from(p[2],"hex"),g=l.from(p[3].replace(/[\r\n]/g,""),"base64"),v=s(u,m.slice(0,8),parseInt(p[1],10)).key,w=[],C=o.createDecipheriv(h,v,m);w.push(C.update(g)),w.push(C.final()),c=l.concat(w);}else {var T=d.match(a);c=l.from(T[2].replace(/[\r\n]/g,""),"base64");}return {tag:d.match(i)[1],data:c}};},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(e,t,r){var n=e("./asn1"),i=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),o=e("pbkdf2"),l=e("safe-buffer").Buffer;function f(u){var c;typeof u!="object"||l.isBuffer(u)||(c=u.passphrase,u=u.key),typeof u=="string"&&(u=l.from(u));var d,p,h=a(u,c),m=h.tag,g=h.data;switch(m){case "CERTIFICATE":p=n.certificate.decode(g,"der").tbsCertificate.subjectPublicKeyInfo;case "PUBLIC KEY":switch(p||(p=n.PublicKey.decode(g,"der")),d=p.algorithm.algorithm.join(".")){case "1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(p.subjectPublicKey.data,"der");case "1.2.840.10045.2.1":return p.subjectPrivateKey=p.subjectPublicKey,{type:"ec",data:p};case "1.2.840.10040.4.1":return p.algorithm.params.pub_key=n.DSAparam.decode(p.subjectPublicKey.data,"der"),{type:"dsa",data:p.algorithm.params};default:throw new Error("unknown key id "+d)}case "ENCRYPTED PRIVATE KEY":g=(function(v,w){var C=v.algorithm.decrypt.kde.kdeparams.salt,T=parseInt(v.algorithm.decrypt.kde.kdeparams.iters.toString(),10),I=i[v.algorithm.decrypt.cipher.algo.join(".")],k=v.algorithm.decrypt.cipher.iv,D=v.subjectPrivateKey,j=parseInt(I.split("-")[1],10)/8,F=o.pbkdf2Sync(w,C,T,j,"sha1"),B=s.createDecipheriv(I,F,k),E=[];return E.push(B.update(D)),E.push(B.final()),l.concat(E)})(g=n.EncryptedPrivateKey.decode(g,"der"),c);case "PRIVATE KEY":switch(d=(p=n.PrivateKey.decode(g,"der")).algorithm.algorithm.join(".")){case "1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(p.subjectPrivateKey,"der");case "1.2.840.10045.2.1":return {curve:p.algorithm.curve,privateKey:n.ECPrivateKey.decode(p.subjectPrivateKey,"der").privateKey};case "1.2.840.10040.4.1":return p.algorithm.params.priv_key=n.DSAparam.decode(p.subjectPrivateKey,"der"),{type:"dsa",params:p.algorithm.params};default:throw new Error("unknown key id "+d)}case "RSA PUBLIC KEY":return n.RSAPublicKey.decode(g,"der");case "RSA PRIVATE KEY":return n.RSAPrivateKey.decode(g,"der");case "DSA PRIVATE KEY":return {type:"dsa",params:n.DSAPrivateKey.decode(g,"der")};case "EC PRIVATE KEY":return {curve:(g=n.ECPrivateKey.decode(g,"der")).parameters.value,privateKey:g.privateKey};default:throw new Error("unknown key type "+m)}}t.exports=f,f.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(n){(function(){var i,a,s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./sync"),u=e("./to-buffer"),c=n.crypto&&n.crypto.subtle,d={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"},p=[];function h(){return a||(a=n.process&&n.process.nextTick?n.process.nextTick:n.queueMicrotask?n.queueMicrotask:n.setImmediate?n.setImmediate:n.setTimeout)}function m(g,v,w,C,T){return c.importKey("raw",g,{name:"PBKDF2"},false,["deriveBits"]).then((function(I){return c.deriveBits({name:"PBKDF2",salt:v,iterations:w,hash:{name:T}},I,C<<3)})).then((function(I){return s.from(I)}))}t.exports=function(g,v,w,C,T,I){typeof T=="function"&&(I=T,T=void 0);var k=d[(T=T||"sha1").toLowerCase()];if(k&&typeof n.Promise=="function"){if(o(w,C),g=u(g,l,"Password"),v=u(v,l,"Salt"),typeof I!="function")throw new Error("No callback provided to pbkdf2");(function(D,j){D.then((function(F){h()((function(){j(null,F);}));}),(function(F){h()((function(){j(F);}));}));})((function(D){if(n.process&&!n.process.browser||!c||!c.importKey||!c.deriveBits)return Promise.resolve(false);if(p[D]!==void 0)return p[D];var j=m(i=i||s.alloc(8),i,10,128,D).then((function(){return true})).catch((function(){return false}));return p[D]=j,j})(k).then((function(D){return D?m(g,v,w,C,k):f(g,v,w,C,T)})),I);}else h()((function(){var D;try{D=f(g,v,w,C,T);}catch(j){return I(j)}I(null,D);}));};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(e,t,r){(function(n,i){(function(){var a;i.process&&i.process.browser?a="utf-8":i.process&&i.process.version?a=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":a="utf-8",t.exports=a;}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{_process:467}],463:[function(e,t,r){var n=Math.pow(2,30)-1;t.exports=function(i,a){if(typeof i!="number")throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if(typeof a!="number")throw new TypeError("Key length not a number");if(a<0||a>n||a!=a)throw new TypeError("Bad key length")};},{}],464:[function(e,t,r){var n=e("create-hash/md5"),i=e("ripemd160"),a=e("sha.js"),s=e("safe-buffer").Buffer,o=e("./precondition"),l=e("./default-encoding"),f=e("./to-buffer"),u=s.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(p,h,m){var g=(function(k){function D(j){return a(k).update(j).digest()}return k==="rmd160"||k==="ripemd160"?function(j){return new i().update(j).digest()}:k==="md5"?n:D})(p),v=p==="sha512"||p==="sha384"?128:64;h.length>v?h=g(h):h.length<v&&(h=s.concat([h,u],v));for(var w=s.allocUnsafe(v+c[p]),C=s.allocUnsafe(v+c[p]),T=0;T<v;T++)w[T]=54^h[T],C[T]=92^h[T];var I=s.allocUnsafe(v+m+4);w.copy(I,0,0,v),this.ipad1=I,this.ipad2=w,this.opad=C,this.alg=p,this.blocksize=v,this.hash=g,this.size=c[p];}d.prototype.run=function(p,h){return p.copy(h,this.blocksize),this.hash(h).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(p,h,m,g,v){o(m,g);var w=new d(v=v||"sha1",p=f(p,l,"Password"),(h=f(h,l,"Salt")).length),C=s.allocUnsafe(g),T=s.allocUnsafe(h.length+4);h.copy(T,0,0,h.length);for(var I=0,k=c[v],D=Math.ceil(g/k),j=1;j<=D;j++){T.writeUInt32BE(j,h.length);for(var F=w.run(T,w.ipad1),B=F,E=1;E<m;E++){B=w.run(B,w.ipad2);for(var M=0;M<k;M++)F[M]^=B[M];}F.copy(C,I),I+=k;}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(i,a,s){if(n.isBuffer(i))return i;if(typeof i=="string")return n.from(i,a);if(ArrayBuffer.isView(i))return n.from(i.buffer);throw new TypeError(s+" must be a string, a Buffer, a typed array or a DataView")};},{"safe-buffer":494}],466:[function(e,t,r){(function(n){(function(){n===void 0||!n.version||n.version.indexOf("v0.")===0||n.version.indexOf("v1.")===0&&n.version.indexOf("v1.8.")!==0?t.exports={nextTick:function(i,a,s,o){if(typeof i!="function")throw new TypeError('"callback" argument must be a function');var l,f,u=arguments.length;switch(u){case 0:case 1:return n.nextTick(i);case 2:return n.nextTick((function(){i.call(null,a);}));case 3:return n.nextTick((function(){i.call(null,a,s);}));case 4:return n.nextTick((function(){i.call(null,a,s,o);}));default:for(l=new Array(u-1),f=0;f<l.length;)l[f++]=arguments[f];return n.nextTick((function(){i.apply(null,l);}))}}}:t.exports=n;}).call(this);}).call(this,e("_process"));},{_process:467}],467:[function(e,t,r){var n,i,a=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(v){if(n===setTimeout)return setTimeout(v,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(v,0);try{return n(v,0)}catch{try{return n.call(null,v,0)}catch{return n.call(this,v,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:s;}catch{n=s;}try{i=typeof clearTimeout=="function"?clearTimeout:o;}catch{i=o;}})();var f,u=[],c=false,d=-1;function p(){c&&f&&(c=false,f.length?u=f.concat(u):d=-1,u.length&&h());}function h(){if(!c){var v=l(p);c=true;for(var w=u.length;w;){for(f=u,u=[];++d<w;)f&&f[d].run();d=-1,w=u.length;}f=null,c=false,(function(C){if(i===clearTimeout)return clearTimeout(C);if((i===o||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(C);try{i(C);}catch{try{return i.call(null,C)}catch{return i.call(this,C)}}})(v);}}function m(v,w){this.fun=v,this.array=w;}function g(){}a.nextTick=function(v){var w=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)w[C-1]=arguments[C];u.push(new m(v,w)),u.length!==1||c||l(h);},m.prototype.run=function(){this.fun.apply(null,this.array);},a.title="browser",a.browser=true,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(v){return []},a.binding=function(v){throw new Error("process.binding is not supported")},a.cwd=function(){return "/"},a.chdir=function(v){throw new Error("process.chdir is not supported")},a.umask=function(){return 0};},{}],468:[function(e,t,r){r.publicEncrypt=e("./publicEncrypt"),r.privateDecrypt=e("./privateDecrypt"),r.privateEncrypt=function(n,i){return r.publicEncrypt(n,i,true)},r.publicDecrypt=function(n,i){return r.privateDecrypt(n,i,true)};},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(e,t,r){var n=e("create-hash"),i=e("safe-buffer").Buffer;function a(s){var o=i.allocUnsafe(4);return o.writeUInt32BE(s,0),o}t.exports=function(s,o){for(var l,f=i.alloc(0),u=0;f.length<o;)l=a(u++),f=i.concat([f,n("sha1").update(s).update(l).digest()]);return f.slice(0,o)};},{"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"),a=e("./xor"),s=e("bn.js"),o=e("browserify-rsa"),l=e("create-hash"),f=e("./withPublic"),u=e("safe-buffer").Buffer;t.exports=function(c,d,p){var h;h=c.padding?c.padding:p?1:4;var m,g=n(c),v=g.modulus.byteLength();if(d.length>v||new s(d).cmp(g.modulus)>=0)throw new Error("decryption error");m=p?f(new s(d),g):o(d,g);var w=u.alloc(v-m.length);if(m=u.concat([w,m],v),h===4)return (function(C,T){var I=C.modulus.byteLength(),k=l("sha1").update(u.alloc(0)).digest(),D=k.length;if(T[0]!==0)throw new Error("decryption error");var j=T.slice(1,D+1),F=T.slice(D+1),B=a(j,i(F,D)),E=a(F,i(B,I-D-1));if((function(L,b){L=u.from(L),b=u.from(b);var y=0,x=L.length;L.length!==b.length&&(y++,x=Math.min(L.length,b.length));for(var _=-1;++_<x;)y+=L[_]^b[_];return y})(k,E.slice(0,D)))throw new Error("decryption error");for(var M=D;E[M]===0;)M++;if(E[M++]!==1)throw new Error("decryption error");return E.slice(M)})(g,m);if(h===1)return (function(C,T,I){for(var k=T.slice(0,2),D=2,j=0;T[D++]!==0;)if(D>=T.length){j++;break}var F=T.slice(2,D-1);if((k.toString("hex")!=="0002"&&!I||k.toString("hex")!=="0001"&&I)&&j++,F.length<8&&j++,j)throw new Error("decryption error");return T.slice(D)})(0,m,p);if(h===3)return m;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"),a=e("create-hash"),s=e("./mgf"),o=e("./xor"),l=e("bn.js"),f=e("./withPublic"),u=e("browserify-rsa"),c=e("safe-buffer").Buffer;t.exports=function(d,p,h){var m;m=d.padding?d.padding:h?1:4;var g,v=n(d);if(m===4)g=(function(w,C){var T=w.modulus.byteLength(),I=C.length,k=a("sha1").update(c.alloc(0)).digest(),D=k.length,j=2*D;if(I>T-j-2)throw new Error("message too long");var F=c.alloc(T-I-j-2),B=T-D-1,E=i(D),M=o(c.concat([k,F,c.alloc(1,1),C],B),s(E,B)),L=o(E,s(M,D));return new l(c.concat([c.alloc(1),L,M],T))})(v,p);else if(m===1)g=(function(w,C,T){var I,k=C.length,D=w.modulus.byteLength();if(k>D-11)throw new Error("message too long");return I=T?c.alloc(D-k-3,255):(function(j){for(var F,B=c.allocUnsafe(j),E=0,M=i(2*j),L=0;E<j;)L===M.length&&(M=i(2*j),L=0),(F=M[L++])&&(B[E++]=F);return B})(D-k-3),new l(c.concat([c.from([0,T?1:2]),I,c.alloc(1),C],D))})(v,p,h);else {if(m!==3)throw new Error("unknown padding");if((g=new l(p)).cmp(v.modulus)>=0)throw new Error("data too long for modulus")}return h?u(g,v):f(g,v)};},{"./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(a,s){return i.from(a.toRed(n.mont(s.modulus)).redPow(new n(s.publicExponent)).fromRed().toArray())};},{"bn.js":470,"safe-buffer":494}],474:[function(e,t,r){t.exports=function(n,i){for(var a=n.length,s=-1;++s<a;)n[s]^=i[s];return n};},{}],475:[function(e,t,r){(function(n,i){(function(){var a=e("safe-buffer").Buffer,s=i.crypto||i.msCrypto;s&&s.getRandomValues?t.exports=function(o,l){if(o>4294967295)throw new RangeError("requested too many random bytes");var f=a.allocUnsafe(o);if(o>0)if(o>65536)for(var u=0;u<o;u+=65536)s.getRandomValues(f.slice(u,u+65536));else s.getRandomValues(f);return typeof l=="function"?n.nextTick((function(){l(null,f);})):f}:t.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
19
|
+
Use Chrome, Firefox or Internet Explorer 11`)};}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{_process:467,"safe-buffer":494}],476:[function(e,t,r){(function(n,i){(function(){function a(){throw new Error(`secure random number generation not supported by this browser
|
|
20
|
+
use chrome, FireFox or Internet Explorer 11`)}var s=e("safe-buffer"),o=e("randombytes"),l=s.Buffer,f=s.kMaxLength,u=i.crypto||i.msCrypto,c=Math.pow(2,32)-1;function d(m,g){if(typeof m!="number"||m!=m)throw new TypeError("offset must be a number");if(m>c||m<0)throw new TypeError("offset must be a uint32");if(m>f||m>g)throw new RangeError("offset out of range")}function p(m,g,v){if(typeof m!="number"||m!=m)throw new TypeError("size must be a number");if(m>c||m<0)throw new TypeError("size must be a uint32");if(m+g>v||m>f)throw new RangeError("buffer too small")}function h(m,g,v,w){if(n.browser){var C=m.buffer,T=new Uint8Array(C,g,v);return u.getRandomValues(T),w?void n.nextTick((function(){w(null,m);})):m}if(!w)return o(v).copy(m,g),m;o(v,(function(I,k){if(I)return w(I);k.copy(m,g),w(null,m);}));}u&&u.getRandomValues||!n.browser?(r.randomFill=function(m,g,v,w){if(!(l.isBuffer(m)||m instanceof i.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof g=="function")w=g,g=0,v=m.length;else if(typeof v=="function")w=v,v=m.length-g;else if(typeof w!="function")throw new TypeError('"cb" argument must be a function');return d(g,m.length),p(v,g,m.length),h(m,g,v,w)},r.randomFillSync=function(m,g,v){if(g===void 0&&(g=0),!(l.isBuffer(m)||m instanceof i.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return d(g,m.length),v===void 0&&(v=m.length-g),p(v,g,m.length),h(m,g,v)}):(r.randomFill=a,r.randomFillSync=a);}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,t,r){var n={};function i(s,o,l){l||(l=Error);var f=(function(u){var c,d;function p(h,m,g){return u.call(this,(function(v,w,C){return typeof o=="string"?o:o(v,w,C)})(h,m,g))||this}return d=u,(c=p).prototype=Object.create(d.prototype),c.prototype.constructor=c,c.__proto__=d,p})(l);f.prototype.name=l.name,f.prototype.code=s,n[s]=f;}function a(s,o){if(Array.isArray(s)){var l=s.length;return s=s.map((function(f){return String(f)})),l>2?"one of ".concat(o," ").concat(s.slice(0,l-1).join(", "),", or ")+s[l-1]:l===2?"one of ".concat(o," ").concat(s[0]," or ").concat(s[1]):"of ".concat(o," ").concat(s[0])}return "of ".concat(o," ").concat(String(s))}i("ERR_INVALID_OPT_VALUE",(function(s,o){return 'The value "'+o+'" is invalid for option "'+s+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(s,o,l){var f,u,d;if(typeof o=="string"&&(u="not ",o.substr(0,u.length)===u)?(f="must not be",o=o.replace(/^not /,"")):f="must be",(function(h,m,g){return (g===void 0||g>h.length)&&(g=h.length),h.substring(g-m.length,g)===m})(s," argument"))d="The ".concat(s," ").concat(f," ").concat(a(o,"type"));else {var p=(function(h,m,g){return typeof g!="number"&&(g=0),!(g+m.length>h.length)&&h.indexOf(m,g)!==-1})(s,".")?"property":"argument";d='The "'.concat(s,'" ').concat(p," ").concat(f," ").concat(a(o,"type"));}return d+=". Received type ".concat(typeof l)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(s){return "The "+s+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(s){return "Cannot call "+s+" 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(s){return "Unknown encoding: "+s}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n;},{}],478:[function(e,t,r){(function(n){(function(){var i=Object.keys||function(p){var h=[];for(var m in p)h.push(m);return h};t.exports=u;var a=e("./_stream_readable"),s=e("./_stream_writable");e("inherits")(u,a);for(var o=i(s.prototype),l=0;l<o.length;l++){var f=o[l];u.prototype[f]||(u.prototype[f]=s.prototype[f]);}function u(p){if(!(this instanceof u))return new u(p);a.call(this,p),s.call(this,p),this.allowHalfOpen=true,p&&(p.readable===false&&(this.readable=false),p.writable===false&&(this.writable=false),p.allowHalfOpen===false&&(this.allowHalfOpen=false,this.once("end",c)));}function c(){this._writableState.ended||n.nextTick(d,this);}function d(p){p.end();}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:false,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:false,get:function(){return this._writableState.length}}),Object.defineProperty(u.prototype,"destroyed",{enumerable:false,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=p,this._writableState.destroyed=p);}});}).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(a){if(!(this instanceof i))return new i(a);n.call(this,a);}e("inherits")(i,n),i.prototype._transform=function(a,s,o){o(null,a);};},{"./_stream_transform":481,inherits:440}],480:[function(e,t,r){(function(n,i){(function(){var a;t.exports=B,B.ReadableState=F,e("events").EventEmitter;var s=function(O,A){return O.listeners(A).length},o=e("./internal/streams/stream"),l=e("buffer").Buffer,f=(i!==void 0?i:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},u,c=e("util");u=c&&c.debuglog?c.debuglog("stream"):function(){};var d,p,h,m=e("./internal/streams/buffer_list"),g=e("./internal/streams/destroy"),v=e("./internal/streams/state").getHighWaterMark,w=e("../errors").codes,C=w.ERR_INVALID_ARG_TYPE,T=w.ERR_STREAM_PUSH_AFTER_EOF,I=w.ERR_METHOD_NOT_IMPLEMENTED,k=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(B,o);var D=g.errorOrDestroy,j=["error","close","destroy","pause","resume"];function F(O,A,P){a=a||e("./_stream_duplex"),O=O||{},typeof P!="boolean"&&(P=A instanceof a),this.objectMode=!!O.objectMode,P&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=v(this,O,"readableHighWaterMark",P),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.paused=true,this.emitClose=O.emitClose!==false,this.autoDestroy=!!O.autoDestroy,this.destroyed=false,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,O.encoding&&(d||(d=e("string_decoder/").StringDecoder),this.decoder=new d(O.encoding),this.encoding=O.encoding);}function B(O){if(a=a||e("./_stream_duplex"),!(this instanceof B))return new B(O);var A=this instanceof a;this._readableState=new F(O,this,A),this.readable=true,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),o.call(this);}function E(O,A,P,W,Z){u("readableAddChunk",A);var $,K=O._readableState;if(A===null)K.reading=false,(function(te,J){if(u("onEofChunk"),!J.ended){if(J.decoder){var Y=J.decoder.end();Y&&Y.length&&(J.buffer.push(Y),J.length+=J.objectMode?1:Y.length);}J.ended=true,J.sync?b(te):(J.needReadable=false,J.emittedReadable||(J.emittedReadable=true,y(te)));}})(O,K);else if(Z||($=(function(te,J){var Y;ne=J,l.isBuffer(ne)||ne instanceof f||typeof J=="string"||J===void 0||te.objectMode||(Y=new C("chunk",["string","Buffer","Uint8Array"],J));var ne;return Y})(K,A)),$)D(O,$);else if(K.objectMode||A&&A.length>0)if(typeof A=="string"||K.objectMode||Object.getPrototypeOf(A)===l.prototype||(A=(function(te){return l.from(te)})(A)),W)K.endEmitted?D(O,new k):M(O,K,A,true);else if(K.ended)D(O,new T);else {if(K.destroyed)return false;K.reading=false,K.decoder&&!P?(A=K.decoder.write(A),K.objectMode||A.length!==0?M(O,K,A,false):x(O,K)):M(O,K,A,false);}else W||(K.reading=false,x(O,K));return !K.ended&&(K.length<K.highWaterMark||K.length===0)}function M(O,A,P,W){A.flowing&&A.length===0&&!A.sync?(A.awaitDrain=0,O.emit("data",P)):(A.length+=A.objectMode?1:P.length,W?A.buffer.unshift(P):A.buffer.push(P),A.needReadable&&b(O)),x(O,A);}Object.defineProperty(B.prototype,"destroyed",{enumerable:false,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(O){this._readableState&&(this._readableState.destroyed=O);}}),B.prototype.destroy=g.destroy,B.prototype._undestroy=g.undestroy,B.prototype._destroy=function(O,A){A(O);},B.prototype.push=function(O,A){var P,W=this._readableState;return W.objectMode?P=true:typeof O=="string"&&((A=A||W.defaultEncoding)!==W.encoding&&(O=l.from(O,A),A=""),P=true),E(this,O,A,false,P)},B.prototype.unshift=function(O){return E(this,O,null,true,false)},B.prototype.isPaused=function(){return this._readableState.flowing===false},B.prototype.setEncoding=function(O){d||(d=e("string_decoder/").StringDecoder);var A=new d(O);this._readableState.decoder=A,this._readableState.encoding=this._readableState.decoder.encoding;for(var P=this._readableState.buffer.head,W="";P!==null;)W+=A.write(P.data),P=P.next;return this._readableState.buffer.clear(),W!==""&&this._readableState.buffer.push(W),this._readableState.length=W.length,this};function L(O,A){return O<=0||A.length===0&&A.ended?0:A.objectMode?1:O!=O?A.flowing&&A.length?A.buffer.head.data.length:A.length:(O>A.highWaterMark&&(A.highWaterMark=(function(P){return P>=1073741824?P=1073741824:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P})(O)),O<=A.length?O:A.ended?A.length:(A.needReadable=true,0))}function b(O){var A=O._readableState;u("emitReadable",A.needReadable,A.emittedReadable),A.needReadable=false,A.emittedReadable||(u("emitReadable",A.flowing),A.emittedReadable=true,n.nextTick(y,O));}function y(O){var A=O._readableState;u("emitReadable_",A.destroyed,A.length,A.ended),A.destroyed||!A.length&&!A.ended||(O.emit("readable"),A.emittedReadable=false),A.needReadable=!A.flowing&&!A.ended&&A.length<=A.highWaterMark,U(O);}function x(O,A){A.readingMore||(A.readingMore=true,n.nextTick(_,O,A));}function _(O,A){for(;!A.reading&&!A.ended&&(A.length<A.highWaterMark||A.flowing&&A.length===0);){var P=A.length;if(u("maybeReadMore read 0"),O.read(0),P===A.length)break}A.readingMore=false;}function S(O){var A=O._readableState;A.readableListening=O.listenerCount("readable")>0,A.resumeScheduled&&!A.paused?A.flowing=true:O.listenerCount("data")>0&&O.resume();}function R(O){u("readable nexttick read 0"),O.read(0);}function z(O,A){u("resume",A.reading),A.reading||O.read(0),A.resumeScheduled=false,O.emit("resume"),U(O),A.flowing&&!A.reading&&O.read(0);}function U(O){var A=O._readableState;for(u("flow",A.flowing);A.flowing&&O.read()!==null;);}function H(O,A){return A.length===0?null:(A.objectMode?P=A.buffer.shift():!O||O>=A.length?(P=A.decoder?A.buffer.join(""):A.buffer.length===1?A.buffer.first():A.buffer.concat(A.length),A.buffer.clear()):P=A.buffer.consume(O,A.decoder),P);var P;}function q(O){var A=O._readableState;u("endReadable",A.endEmitted),A.endEmitted||(A.ended=true,n.nextTick(N,A,O));}function N(O,A){if(u("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=true,A.readable=false,A.emit("end"),O.autoDestroy)){var P=A._writableState;(!P||P.autoDestroy&&P.finished)&&A.destroy();}}function V(O,A){for(var P=0,W=O.length;P<W;P++)if(O[P]===A)return P;return -1}B.prototype.read=function(O){u("read",O),O=parseInt(O,10);var A=this._readableState,P=O;if(O!==0&&(A.emittedReadable=false),O===0&&A.needReadable&&((A.highWaterMark!==0?A.length>=A.highWaterMark:A.length>0)||A.ended))return u("read: emitReadable",A.length,A.ended),A.length===0&&A.ended?q(this):b(this),null;if((O=L(O,A))===0&&A.ended)return A.length===0&&q(this),null;var W,Z=A.needReadable;return u("need readable",Z),(A.length===0||A.length-O<A.highWaterMark)&&u("length less than watermark",Z=true),A.ended||A.reading?u("reading or ended",Z=false):Z&&(u("do read"),A.reading=true,A.sync=true,A.length===0&&(A.needReadable=true),this._read(A.highWaterMark),A.sync=false,A.reading||(O=L(P,A))),(W=O>0?H(O,A):null)===null?(A.needReadable=A.length<=A.highWaterMark,O=0):(A.length-=O,A.awaitDrain=0),A.length===0&&(A.ended||(A.needReadable=true),P!==O&&A.ended&&q(this)),W!==null&&this.emit("data",W),W},B.prototype._read=function(O){D(this,new I("_read()"));},B.prototype.pipe=function(O,A){var P=this,W=this._readableState;switch(W.pipesCount){case 0:W.pipes=O;break;case 1:W.pipes=[W.pipes,O];break;default:W.pipes.push(O);}W.pipesCount+=1,u("pipe count=%d opts=%j",W.pipesCount,A);var Z=(!A||A.end!==false)&&O!==n.stdout&&O!==n.stderr?K:oe;function $(se,le){u("onunpipe"),se===P&&le&&le.hasUnpiped===false&&(le.hasUnpiped=true,u("cleanup"),O.removeListener("close",re),O.removeListener("finish",ie),O.removeListener("drain",te),O.removeListener("error",ne),O.removeListener("unpipe",$),P.removeListener("end",K),P.removeListener("end",oe),P.removeListener("data",Y),J=true,!W.awaitDrain||O._writableState&&!O._writableState.needDrain||te());}function K(){u("onend"),O.end();}W.endEmitted?n.nextTick(Z):P.once("end",Z),O.on("unpipe",$);var te=(function(se){return function(){var le=se._readableState;u("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&s(se,"data")&&(le.flowing=true,U(se));}})(P);O.on("drain",te);var J=false;function Y(se){u("ondata");var le=O.write(se);u("dest.write",le),le===false&&((W.pipesCount===1&&W.pipes===O||W.pipesCount>1&&V(W.pipes,O)!==-1)&&!J&&(u("false write response, pause",W.awaitDrain),W.awaitDrain++),P.pause());}function ne(se){u("onerror",se),oe(),O.removeListener("error",ne),s(O,"error")===0&&D(O,se);}function re(){O.removeListener("finish",ie),oe();}function ie(){u("onfinish"),O.removeListener("close",re),oe();}function oe(){u("unpipe"),P.unpipe(O);}return P.on("data",Y),(function(se,le,ge){if(typeof se.prependListener=="function")return se.prependListener(le,ge);se._events&&se._events[le]?Array.isArray(se._events[le])?se._events[le].unshift(ge):se._events[le]=[ge,se._events[le]]:se.on(le,ge);})(O,"error",ne),O.once("close",re),O.once("finish",ie),O.emit("pipe",P),W.flowing||(u("pipe resume"),P.resume()),O},B.prototype.unpipe=function(O){var A=this._readableState,P={hasUnpiped:false};if(A.pipesCount===0)return this;if(A.pipesCount===1)return O&&O!==A.pipes||(O||(O=A.pipes),A.pipes=null,A.pipesCount=0,A.flowing=false,O&&O.emit("unpipe",this,P)),this;if(!O){var W=A.pipes,Z=A.pipesCount;A.pipes=null,A.pipesCount=0,A.flowing=false;for(var $=0;$<Z;$++)W[$].emit("unpipe",this,{hasUnpiped:false});return this}var K=V(A.pipes,O);return K===-1||(A.pipes.splice(K,1),A.pipesCount-=1,A.pipesCount===1&&(A.pipes=A.pipes[0]),O.emit("unpipe",this,P)),this},B.prototype.on=function(O,A){var P=o.prototype.on.call(this,O,A),W=this._readableState;return O==="data"?(W.readableListening=this.listenerCount("readable")>0,W.flowing!==false&&this.resume()):O==="readable"&&(W.endEmitted||W.readableListening||(W.readableListening=W.needReadable=true,W.flowing=false,W.emittedReadable=false,u("on readable",W.length,W.reading),W.length?b(this):W.reading||n.nextTick(R,this))),P},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(O,A){var P=o.prototype.removeListener.call(this,O,A);return O==="readable"&&n.nextTick(S,this),P},B.prototype.removeAllListeners=function(O){var A=o.prototype.removeAllListeners.apply(this,arguments);return O!=="readable"&&O!==void 0||n.nextTick(S,this),A},B.prototype.resume=function(){var O=this._readableState;return O.flowing||(u("resume"),O.flowing=!O.readableListening,(function(A,P){P.resumeScheduled||(P.resumeScheduled=true,n.nextTick(z,A,P));})(this,O)),O.paused=false,this},B.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(u("pause"),this._readableState.flowing=false,this.emit("pause")),this._readableState.paused=true,this},B.prototype.wrap=function(O){var A=this,P=this._readableState,W=false;for(var Z in O.on("end",(function(){if(u("wrapped end"),P.decoder&&!P.ended){var K=P.decoder.end();K&&K.length&&A.push(K);}A.push(null);})),O.on("data",(function(K){u("wrapped data"),P.decoder&&(K=P.decoder.write(K)),P.objectMode&&K==null||(P.objectMode||K&&K.length)&&(A.push(K)||(W=true,O.pause()));})),O)this[Z]===void 0&&typeof O[Z]=="function"&&(this[Z]=(function(K){return function(){return O[K].apply(O,arguments)}})(Z));for(var $=0;$<j.length;$++)O.on(j[$],this.emit.bind(this,j[$]));return this._read=function(K){u("wrapped _read",K),W&&(W=false,O.resume());},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return p===void 0&&(p=e("./internal/streams/async_iterator")),p(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:false,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:false,get:function(){return this._readableState.flowing},set:function(O){this._readableState&&(this._readableState.flowing=O);}}),B._fromList=H,Object.defineProperty(B.prototype,"readableLength",{enumerable:false,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(B.from=function(O,A){return h===void 0&&(h=e("./internal/streams/from")),h(B,O,A)});}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(e,t,r){t.exports=u;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=n.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function f(p,h){var m=this._transformState;m.transforming=false;var g=m.writecb;if(g===null)return this.emit("error",new a);m.writechunk=null,m.writecb=null,h!=null&&this.push(h),g(p);var v=this._readableState;v.reading=false,(v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark);}function u(p){if(!(this instanceof u))return new u(p);l.call(this,p),this._transformState={afterTransform:f.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",c);}function c(){var p=this;typeof this._flush!="function"||this._readableState.destroyed?d(this,null,null):this._flush((function(h,m){d(p,h,m);}));}function d(p,h,m){if(h)return p.emit("error",h);if(m!=null&&p.push(m),p._writableState.length)throw new o;if(p._transformState.transforming)throw new s;return p.push(null)}e("inherits")(u,l),u.prototype.push=function(p,h){return this._transformState.needTransform=false,l.prototype.push.call(this,p,h)},u.prototype._transform=function(p,h,m){m(new i("_transform()"));},u.prototype._write=function(p,h,m){var g=this._transformState;if(g.writecb=m,g.writechunk=p,g.writeencoding=h,!g.transforming){var v=this._readableState;(g.needTransform||v.needReadable||v.length<v.highWaterMark)&&this._read(v.highWaterMark);}},u.prototype._read=function(p){var h=this._transformState;h.writechunk===null||h.transforming?h.needTransform=true:(h.transforming=true,this._transform(h.writechunk,h.writeencoding,h.afterTransform));},u.prototype._destroy=function(p,h){l.prototype._destroy.call(this,p,(function(m){h(m);}));};},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(e,t,r){(function(n,i){(function(){function a(_){var S=this;this.next=null,this.entry=null,this.finish=function(){(function(R,z,U){var H=R.entry;for(R.entry=null;H;){var q=H.callback;z.pendingcb--,q(U),H=H.next;}z.corkedRequestsFree.next=R;})(S,_);};}var s;t.exports=B,B.WritableState=F;var o={deprecate:e("util-deprecate")},l=e("./internal/streams/stream"),f=e("buffer").Buffer,u=(i!==void 0?i:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},c,d=e("./internal/streams/destroy"),p=e("./internal/streams/state").getHighWaterMark,h=e("../errors").codes,m=h.ERR_INVALID_ARG_TYPE,g=h.ERR_METHOD_NOT_IMPLEMENTED,v=h.ERR_MULTIPLE_CALLBACK,w=h.ERR_STREAM_CANNOT_PIPE,C=h.ERR_STREAM_DESTROYED,T=h.ERR_STREAM_NULL_VALUES,I=h.ERR_STREAM_WRITE_AFTER_END,k=h.ERR_UNKNOWN_ENCODING,D=d.errorOrDestroy;function j(){}function F(_,S,R){s=s||e("./_stream_duplex"),_=_||{},typeof R!="boolean"&&(R=S instanceof s),this.objectMode=!!_.objectMode,R&&(this.objectMode=this.objectMode||!!_.writableObjectMode),this.highWaterMark=p(this,_,"writableHighWaterMark",R),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var z=_.decodeStrings===false;this.decodeStrings=!z,this.defaultEncoding=_.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(U){(function(H,q){var N=H._writableState,V=N.sync,O=N.writecb;if(typeof O!="function")throw new v;if((function(P){P.writing=false,P.writecb=null,P.length-=P.writelen,P.writelen=0;})(N),q)(function(P,W,Z,$,K){--W.pendingcb,Z?(n.nextTick(K,$),n.nextTick(x,P,W),P._writableState.errorEmitted=true,D(P,$)):(K($),P._writableState.errorEmitted=true,D(P,$),x(P,W));})(H,N,V,q,O);else {var A=b(N)||H.destroyed;A||N.corked||N.bufferProcessing||!N.bufferedRequest||L(H,N),V?n.nextTick(M,H,N,A,O):M(H,N,A,O);}})(S,U);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.emitClose=_.emitClose!==false,this.autoDestroy=!!_.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this);}function B(_){var S=this instanceof(s=s||e("./_stream_duplex"));if(!S&&!c.call(B,this))return new B(_);this._writableState=new F(_,this,S),this.writable=true,_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final)),l.call(this);}function E(_,S,R,z,U,H,q){S.writelen=z,S.writecb=q,S.writing=true,S.sync=true,S.destroyed?S.onwrite(new C("write")):R?_._writev(U,S.onwrite):_._write(U,H,S.onwrite),S.sync=false;}function M(_,S,R,z){R||(function(U,H){H.length===0&&H.needDrain&&(H.needDrain=false,U.emit("drain"));})(_,S),S.pendingcb--,z(),x(_,S);}function L(_,S){S.bufferProcessing=true;var R=S.bufferedRequest;if(_._writev&&R&&R.next){var z=S.bufferedRequestCount,U=new Array(z),H=S.corkedRequestsFree;H.entry=R;for(var q=0,N=true;R;)U[q]=R,R.isBuf||(N=false),R=R.next,q+=1;U.allBuffers=N,E(_,S,true,S.length,U,"",H.finish),S.pendingcb++,S.lastBufferedRequest=null,H.next?(S.corkedRequestsFree=H.next,H.next=null):S.corkedRequestsFree=new a(S),S.bufferedRequestCount=0;}else {for(;R;){var V=R.chunk,O=R.encoding,A=R.callback;if(E(_,S,false,S.objectMode?1:V.length,V,O,A),R=R.next,S.bufferedRequestCount--,S.writing)break}R===null&&(S.lastBufferedRequest=null);}S.bufferedRequest=R,S.bufferProcessing=false;}function b(_){return _.ending&&_.length===0&&_.bufferedRequest===null&&!_.finished&&!_.writing}function y(_,S){_._final((function(R){S.pendingcb--,R&&D(_,R),S.prefinished=true,_.emit("prefinish"),x(_,S);}));}function x(_,S){var R=b(S);if(R&&((function(U,H){H.prefinished||H.finalCalled||(typeof U._final!="function"||H.destroyed?(H.prefinished=true,U.emit("prefinish")):(H.pendingcb++,H.finalCalled=true,n.nextTick(y,U,H)));})(_,S),S.pendingcb===0&&(S.finished=true,_.emit("finish"),S.autoDestroy))){var z=_._readableState;(!z||z.autoDestroy&&z.endEmitted)&&_.destroy();}return R}e("inherits")(B,l),F.prototype.getBuffer=function(){for(var _=this.bufferedRequest,S=[];_;)S.push(_),_=_.next;return S},(function(){try{Object.defineProperty(F.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(_){return !!c.call(this,_)||this===B&&_&&_._writableState instanceof F}})):c=function(_){return _ instanceof this},B.prototype.pipe=function(){D(this,new w);},B.prototype.write=function(_,S,R){var z,U=this._writableState,H=false,q=!U.objectMode&&(z=_,f.isBuffer(z)||z instanceof u);return q&&!f.isBuffer(_)&&(_=(function(N){return f.from(N)})(_)),typeof S=="function"&&(R=S,S=null),q?S="buffer":S||(S=U.defaultEncoding),typeof R!="function"&&(R=j),U.ending?(function(N,V){var O=new I;D(N,O),n.nextTick(V,O);})(this,R):(q||(function(N,V,O,A){var P;return O===null?P=new T:typeof O=="string"||V.objectMode||(P=new m("chunk",["string","Buffer"],O)),!P||(D(N,P),n.nextTick(A,P),false)})(this,U,_,R))&&(U.pendingcb++,H=(function(N,V,O,A,P,W){if(!O){var Z=(function(J,Y,ne){return J.objectMode||J.decodeStrings===false||typeof Y!="string"||(Y=f.from(Y,ne)),Y})(V,A,P);A!==Z&&(O=true,P="buffer",A=Z);}var $=V.objectMode?1:A.length;V.length+=$;var K=V.length<V.highWaterMark;if(K||(V.needDrain=true),V.writing||V.corked){var te=V.lastBufferedRequest;V.lastBufferedRequest={chunk:A,encoding:P,isBuf:O,callback:W,next:null},te?te.next=V.lastBufferedRequest:V.bufferedRequest=V.lastBufferedRequest,V.bufferedRequestCount+=1;}else E(N,V,false,$,A,P,W);return K})(this,U,q,_,S,R)),H},B.prototype.cork=function(){this._writableState.corked++;},B.prototype.uncork=function(){var _=this._writableState;_.corked&&(_.corked--,_.writing||_.corked||_.bufferProcessing||!_.bufferedRequest||L(this,_));},B.prototype.setDefaultEncoding=function(_){if(typeof _=="string"&&(_=_.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((_+"").toLowerCase())>-1))throw new k(_);return this._writableState.defaultEncoding=_,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:false,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(_,S,R){R(new g("_write()"));},B.prototype._writev=null,B.prototype.end=function(_,S,R){var z=this._writableState;return typeof _=="function"?(R=_,_=null,S=null):typeof S=="function"&&(R=S,S=null),_!=null&&this.write(_,S),z.corked&&(z.corked=1,this.uncork()),z.ending||(function(U,H,q){H.ending=true,x(U,H),q&&(H.finished?n.nextTick(q):U.once("finish",q)),H.ended=true,U.writable=false;})(this,z,R),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:false,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:false,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(_){this._writableState&&(this._writableState.destroyed=_);}}),B.prototype.destroy=d.destroy,B.prototype._undestroy=d.undestroy,B.prototype._destroy=function(_,S){S(_);};}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(e,t,r){(function(n){(function(){var i;function a(C,T,I){return (T=(function(k){var D=(function(j,F){if(typeof j!="object"||j===null)return j;var B=j[Symbol.toPrimitive];if(B!==void 0){var E=B.call(j,F);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return (F==="string"?String:Number)(j)})(k,"string");return typeof D=="symbol"?D:String(D)})(T))in C?Object.defineProperty(C,T,{value:I,enumerable:true,configurable:true,writable:true}):C[T]=I,C}var s=e("./end-of-stream"),o=Symbol("lastResolve"),l=Symbol("lastReject"),f=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function h(C,T){return {value:C,done:T}}function m(C){var T=C[o];if(T!==null){var I=C[p].read();I!==null&&(C[c]=null,C[o]=null,C[l]=null,T(h(I,false)));}}function g(C){n.nextTick(m,C);}var v=Object.getPrototypeOf((function(){})),w=Object.setPrototypeOf((a(i={get stream(){return this[p]},next:function(){var C=this,T=this[f];if(T!==null)return Promise.reject(T);if(this[u])return Promise.resolve(h(void 0,true));if(this[p].destroyed)return new Promise((function(j,F){n.nextTick((function(){C[f]?F(C[f]):j(h(void 0,true));}));}));var I,k=this[c];if(k)I=new Promise((function(j,F){return function(B,E){j.then((function(){F[u]?B(h(void 0,true)):F[d](B,E);}),E);}})(k,this));else {var D=this[p].read();if(D!==null)return Promise.resolve(h(D,false));I=new Promise(this[d]);}return this[c]=I,I}},Symbol.asyncIterator,(function(){return this})),a(i,"return",(function(){var C=this;return new Promise((function(T,I){C[p].destroy(null,(function(k){k?I(k):T(h(void 0,true));}));}))})),i),v);t.exports=function(C){var T,I=Object.create(w,(a(T={},p,{value:C,writable:true}),a(T,o,{value:null,writable:true}),a(T,l,{value:null,writable:true}),a(T,f,{value:null,writable:true}),a(T,u,{value:C._readableState.endEmitted,writable:true}),a(T,d,{value:function(k,D){var j=I[p].read();j?(I[c]=null,I[o]=null,I[l]=null,k(h(j,false))):(I[o]=k,I[l]=D);},writable:true}),T));return I[c]=null,s(C,(function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=I[l];return D!==null&&(I[c]=null,I[o]=null,I[l]=null,D(k)),void(I[f]=k)}var j=I[o];j!==null&&(I[c]=null,I[o]=null,I[l]=null,j(h(void 0,true))),I[u]=true;})),C.on("readable",g.bind(null,I)),I};}).call(this);}).call(this,e("_process"));},{"./end-of-stream":486,_process:467}],484:[function(e,t,r){function n(c,d){var p=Object.keys(c);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(c);d&&(h=h.filter((function(m){return Object.getOwnPropertyDescriptor(c,m).enumerable}))),p.push.apply(p,h);}return p}function i(c){for(var d=1;d<arguments.length;d++){var p=arguments[d]!=null?arguments[d]:{};d%2?n(Object(p),true).forEach((function(h){a(c,h,p[h]);})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach((function(h){Object.defineProperty(c,h,Object.getOwnPropertyDescriptor(p,h));}));}return c}function a(c,d,p){return (d=o(d))in c?Object.defineProperty(c,d,{value:p,enumerable:true,configurable:true,writable:true}):c[d]=p,c}function s(c,d){for(var p=0;p<d.length;p++){var h=d[p];h.enumerable=h.enumerable||false,h.configurable=true,"value"in h&&(h.writable=true),Object.defineProperty(c,o(h.key),h);}}function o(c){var d=(function(p,h){if(typeof p!="object"||p===null)return p;var m=p[Symbol.toPrimitive];if(m!==void 0){var g=m.call(p,h);if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return (h==="string"?String:Number)(p)})(c,"string");return typeof d=="symbol"?d:String(d)}var l=e("buffer").Buffer,f=e("util").inspect,u=f&&f.custom||"inspect";t.exports=(function(){function c(){((function(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}))(this,c),this.head=null,this.tail=null,this.length=0;}var d,p;return d=c,(p=[{key:"push",value:function(m){var g={data:m,next:null};this.length>0?this.tail.next=g:this.head=g,this.tail=g,++this.length;}},{key:"unshift",value:function(m){var g={data:m,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(m){if(this.length===0)return "";for(var g=this.head,v=""+g.data;g=g.next;)v+=m+g.data;return v}},{key:"concat",value:function(m){if(this.length===0)return l.alloc(0);for(var g,v,w,C=l.allocUnsafe(m>>>0),T=this.head,I=0;T;)g=T.data,v=C,w=I,l.prototype.copy.call(g,v,w),I+=T.data.length,T=T.next;return C}},{key:"consume",value:function(m,g){var v;return m<this.head.data.length?(v=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):v=m===this.head.data.length?this.shift():g?this._getString(m):this._getBuffer(m),v}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var g=this.head,v=1,w=g.data;for(m-=w.length;g=g.next;){var C=g.data,T=m>C.length?C.length:m;if(T===C.length?w+=C:w+=C.slice(0,m),(m-=T)==0){T===C.length?(++v,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=C.slice(T));break}++v;}return this.length-=v,w}},{key:"_getBuffer",value:function(m){var g=l.allocUnsafe(m),v=this.head,w=1;for(v.data.copy(g),m-=v.data.length;v=v.next;){var C=v.data,T=m>C.length?C.length:m;if(C.copy(g,g.length-m,0,T),(m-=T)==0){T===C.length?(++w,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=C.slice(T));break}++w;}return this.length-=w,g}},{key:u,value:function(m,g){return f(this,i(i({},g),{},{depth:0,customInspect:false}))}}])&&s(d.prototype,p),Object.defineProperty(d,"prototype",{writable:false}),c})();},{buffer:220,util:188}],485:[function(e,t,r){(function(n){(function(){function i(o,l){s(o,l),a(o);}function a(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close");}function s(o,l){o.emit("error",l);}t.exports={destroy:function(o,l){var f=this,u=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return u||c?(l?l(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,n.nextTick(s,this,o)):n.nextTick(s,this,o)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(o||null,(function(d){!l&&d?f._writableState?f._writableState.errorEmitted?n.nextTick(a,f):(f._writableState.errorEmitted=true,n.nextTick(i,f,d)):n.nextTick(i,f,d):l?(n.nextTick(a,f),l(d)):n.nextTick(a,f);})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);},errorOrDestroy:function(o,l){var f=o._readableState,u=o._writableState;f&&f.autoDestroy||u&&u.autoDestroy?o.destroy(l):o.emit("error",l);}};}).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 a(s,o,l){if(typeof o=="function")return a(s,null,o);o||(o={}),l=(function(C){var T=false;return function(){if(!T){T=true;for(var I=arguments.length,k=new Array(I),D=0;D<I;D++)k[D]=arguments[D];C.apply(this,k);}}})(l||i);var f=o.readable||o.readable!==false&&s.readable,u=o.writable||o.writable!==false&&s.writable,c=function(){s.writable||p();},d=s._writableState&&s._writableState.finished,p=function(){u=false,d=true,f||l.call(s);},h=s._readableState&&s._readableState.endEmitted,m=function(){f=false,h=true,u||l.call(s);},g=function(C){l.call(s,C);},v=function(){var C;return f&&!h?(s._readableState&&s._readableState.ended||(C=new n),l.call(s,C)):u&&!d?(s._writableState&&s._writableState.ended||(C=new n),l.call(s,C)):void 0},w=function(){s.req.on("finish",p);};return (function(C){return C.setHeader&&typeof C.abort=="function"})(s)?(s.on("complete",p),s.on("abort",v),s.req?w():s.on("request",w)):u&&!s._writableState&&(s.on("end",c),s.on("close",c)),s.on("end",m),s.on("finish",p),o.error!==false&&s.on("error",g),s.on("close",v),function(){s.removeListener("complete",p),s.removeListener("abort",v),s.removeListener("request",w),s.req&&s.req.removeListener("finish",p),s.removeListener("end",c),s.removeListener("close",c),s.removeListener("finish",p),s.removeListener("end",m),s.removeListener("error",g),s.removeListener("close",v);}};},{"../../../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,a=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function o(d){if(d)throw d}function l(d,p,h,m){m=(function(w){var C=false;return function(){C||(C=true,w.apply(void 0,arguments));}})(m);var g=false;d.on("close",(function(){g=true;})),n===void 0&&(n=e("./end-of-stream")),n(d,{readable:p,writable:h},(function(w){if(w)return m(w);g=true,m();}));var v=false;return function(w){if(!g&&!v)return v=true,(function(C){return C.setHeader&&typeof C.abort=="function"})(d)?d.abort():typeof d.destroy=="function"?d.destroy():void m(w||new s("pipe"))}}function f(d){d();}function u(d,p){return d.pipe(p)}function c(d){return d.length?typeof d[d.length-1]!="function"?o:d.pop():o}t.exports=function(){for(var d=arguments.length,p=new Array(d),h=0;h<d;h++)p[h]=arguments[h];var m,g=c(p);if(Array.isArray(p[0])&&(p=p[0]),p.length<2)throw new a("streams");var v=p.map((function(w,C){var T=C<p.length-1;return l(w,T,C>0,(function(I){m||(m=I),I&&v.forEach(f),T||(v.forEach(f),g(m));}))}));return p.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(i,a,s,o){var l=(function(f,u,c){return f.highWaterMark!=null?f.highWaterMark:u?f[c]:null})(a,o,s);if(l!=null){if(!isFinite(l)||Math.floor(l)!==l||l<0)throw new n(o?s:"highWaterMark",l);return Math.floor(l)}return i.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(i){var a=Object.prototype,s=a.hasOwnProperty,o=Object.defineProperty||function(x,_,S){x[_]=S.value;},l=typeof Symbol=="function"?Symbol:{},f=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function d(x,_,S){return Object.defineProperty(x,_,{value:S,enumerable:true,configurable:true,writable:true}),x[_]}try{d({},"");}catch{d=function(_,S,R){return _[S]=R};}function p(x,_,S,R){var z=_&&_.prototype instanceof g?_:g,U=Object.create(z.prototype),H=new L(R||[]);return o(U,"_invoke",{value:F(x,S,H)}),U}function h(x,_,S){try{return {type:"normal",arg:x.call(_,S)}}catch(R){return {type:"throw",arg:R}}}i.wrap=p;var m={};function g(){}function v(){}function w(){}var C={};d(C,f,(function(){return this}));var T=Object.getPrototypeOf,I=T&&T(T(b([])));I&&I!==a&&s.call(I,f)&&(C=I);var k=w.prototype=g.prototype=Object.create(C);function D(x){["next","throw","return"].forEach((function(_){d(x,_,(function(S){return this._invoke(_,S)}));}));}function j(x,_){var S;o(this,"_invoke",{value:function(R,z){function U(){return new _((function(H,q){(function N(V,O,A,P){var W=h(x[V],x,O);if(W.type!=="throw"){var Z=W.arg,$=Z.value;return $&&typeof $=="object"&&s.call($,"__await")?_.resolve($.__await).then((function(K){N("next",K,A,P);}),(function(K){N("throw",K,A,P);})):_.resolve($).then((function(K){Z.value=K,A(Z);}),(function(K){return N("throw",K,A,P)}))}P(W.arg);})(R,z,H,q);}))}return S=S?S.then(U,U):U()}});}function F(x,_,S){var R="suspendedStart";return function(z,U){if(R==="executing")throw new Error("Generator is already running");if(R==="completed"){if(z==="throw")throw U;return y()}for(S.method=z,S.arg=U;;){var H=S.delegate;if(H){var q=B(H,S);if(q){if(q===m)continue;return q}}if(S.method==="next")S.sent=S._sent=S.arg;else if(S.method==="throw"){if(R==="suspendedStart")throw R="completed",S.arg;S.dispatchException(S.arg);}else S.method==="return"&&S.abrupt("return",S.arg);R="executing";var N=h(x,_,S);if(N.type==="normal"){if(R=S.done?"completed":"suspendedYield",N.arg===m)continue;return {value:N.arg,done:S.done}}N.type==="throw"&&(R="completed",S.method="throw",S.arg=N.arg);}}}function B(x,_){var S=_.method,R=x.iterator[S];if(R===void 0)return _.delegate=null,S==="throw"&&x.iterator.return&&(_.method="return",_.arg=void 0,B(x,_),_.method==="throw")||S!=="return"&&(_.method="throw",_.arg=new TypeError("The iterator does not provide a '"+S+"' method")),m;var z=h(R,x.iterator,_.arg);if(z.type==="throw")return _.method="throw",_.arg=z.arg,_.delegate=null,m;var U=z.arg;return U?U.done?(_[x.resultName]=U.value,_.next=x.nextLoc,_.method!=="return"&&(_.method="next",_.arg=void 0),_.delegate=null,m):U:(_.method="throw",_.arg=new TypeError("iterator result is not an object"),_.delegate=null,m)}function E(x){var _={tryLoc:x[0]};1 in x&&(_.catchLoc=x[1]),2 in x&&(_.finallyLoc=x[2],_.afterLoc=x[3]),this.tryEntries.push(_);}function M(x){var _=x.completion||{};_.type="normal",delete _.arg,x.completion=_;}function L(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(E,this),this.reset(true);}function b(x){if(x){var _=x[f];if(_)return _.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var S=-1,R=function z(){for(;++S<x.length;)if(s.call(x,S))return z.value=x[S],z.done=false,z;return z.value=void 0,z.done=true,z};return R.next=R}}return {next:y}}function y(){return {value:void 0,done:true}}return v.prototype=w,o(k,"constructor",{value:w,configurable:true}),o(w,"constructor",{value:v,configurable:true}),v.displayName=d(w,c,"GeneratorFunction"),i.isGeneratorFunction=function(x){var _=typeof x=="function"&&x.constructor;return !!_&&(_===v||(_.displayName||_.name)==="GeneratorFunction")},i.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,w):(x.__proto__=w,d(x,c,"GeneratorFunction")),x.prototype=Object.create(k),x},i.awrap=function(x){return {__await:x}},D(j.prototype),d(j.prototype,u,(function(){return this})),i.AsyncIterator=j,i.async=function(x,_,S,R,z){z===void 0&&(z=Promise);var U=new j(p(x,_,S,R),z);return i.isGeneratorFunction(_)?U:U.next().then((function(H){return H.done?H.value:U.next()}))},D(k),d(k,c,"Generator"),d(k,f,(function(){return this})),d(k,"toString",(function(){return "[object Generator]"})),i.keys=function(x){var _=Object(x),S=[];for(var R in _)S.push(R);return S.reverse(),function z(){for(;S.length;){var U=S.pop();if(U in _)return z.value=U,z.done=false,z}return z.done=true,z}},i.values=b,L.prototype={constructor:L,reset:function(x){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=false,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(M),!x)for(var _ in this)_.charAt(0)==="t"&&s.call(this,_)&&!isNaN(+_.slice(1))&&(this[_]=void 0);},stop:function(){this.done=true;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var _=this;function S(N,V){return U.type="throw",U.arg=x,_.next=N,V&&(_.method="next",_.arg=void 0),!!V}for(var R=this.tryEntries.length-1;R>=0;--R){var z=this.tryEntries[R],U=z.completion;if(z.tryLoc==="root")return S("end");if(z.tryLoc<=this.prev){var H=s.call(z,"catchLoc"),q=s.call(z,"finallyLoc");if(H&&q){if(this.prev<z.catchLoc)return S(z.catchLoc,true);if(this.prev<z.finallyLoc)return S(z.finallyLoc)}else if(H){if(this.prev<z.catchLoc)return S(z.catchLoc,true)}else {if(!q)throw new Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return S(z.finallyLoc)}}}},abrupt:function(x,_){for(var S=this.tryEntries.length-1;S>=0;--S){var R=this.tryEntries[S];if(R.tryLoc<=this.prev&&s.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var z=R;break}}z&&(x==="break"||x==="continue")&&z.tryLoc<=_&&_<=z.finallyLoc&&(z=null);var U=z?z.completion:{};return U.type=x,U.arg=_,z?(this.method="next",this.next=z.finallyLoc,m):this.complete(U)},complete:function(x,_){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&_&&(this.next=_),m},finish:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var S=this.tryEntries[_];if(S.finallyLoc===x)return this.complete(S.completion,S.afterLoc),M(S),m}},catch:function(x){for(var _=this.tryEntries.length-1;_>=0;--_){var S=this.tryEntries[_];if(S.tryLoc===x){var R=S.completion;if(R.type==="throw"){var z=R.arg;M(S);}return z}}throw new Error("illegal catch attempt")},delegateYield:function(x,_,S){return this.delegate={iterator:b(x),resultName:_,nextLoc:S},this.method==="next"&&(this.arg=void 0),m}},i})(typeof t=="object"?t.exports:{});try{regeneratorRuntime=n;}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n);}},{}],493:[function(e,t,r){var n=e("buffer").Buffer,i=e("inherits"),a=e("hash-base"),s=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],f=[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],u=[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],c=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function p(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520;}function h(T,I){return T<<I|T>>>32-I}function m(T,I,k,D,j,F,B,E){return h(T+(I^k^D)+F+B|0,E)+j|0}function g(T,I,k,D,j,F,B,E){return h(T+(I&k|~I&D)+F+B|0,E)+j|0}function v(T,I,k,D,j,F,B,E){return h(T+((I|~k)^D)+F+B|0,E)+j|0}function w(T,I,k,D,j,F,B,E){return h(T+(I&D|k&~D)+F+B|0,E)+j|0}function C(T,I,k,D,j,F,B,E){return h(T+(I^(k|~D))+F+B|0,E)+j|0}i(p,a),p.prototype._update=function(){for(var T=s,I=0;I<16;++I)T[I]=this._block.readInt32LE(4*I);for(var k=0|this._a,D=0|this._b,j=0|this._c,F=0|this._d,B=0|this._e,E=0|this._a,M=0|this._b,L=0|this._c,b=0|this._d,y=0|this._e,x=0;x<80;x+=1){var _,S;x<16?(_=m(k,D,j,F,B,T[o[x]],c[0],f[x]),S=C(E,M,L,b,y,T[l[x]],d[0],u[x])):x<32?(_=g(k,D,j,F,B,T[o[x]],c[1],f[x]),S=w(E,M,L,b,y,T[l[x]],d[1],u[x])):x<48?(_=v(k,D,j,F,B,T[o[x]],c[2],f[x]),S=v(E,M,L,b,y,T[l[x]],d[2],u[x])):x<64?(_=w(k,D,j,F,B,T[o[x]],c[3],f[x]),S=g(E,M,L,b,y,T[l[x]],d[3],u[x])):(_=C(k,D,j,F,B,T[o[x]],c[4],f[x]),S=m(E,M,L,b,y,T[l[x]],d[4],u[x])),k=B,B=F,F=h(j,10),j=D,D=_,E=y,y=b,b=h(L,10),L=M,M=S;}var R=this._b+j+b|0;this._b=this._c+F+y|0,this._c=this._d+B+E|0,this._d=this._e+k+M|0,this._e=this._a+D+L|0,this._a=R;},p.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 T=n.alloc?n.alloc(20):new n(20);return T.writeInt32LE(this._a,0),T.writeInt32LE(this._b,4),T.writeInt32LE(this._c,8),T.writeInt32LE(this._d,12),T.writeInt32LE(this._e,16),T},t.exports=p;},{buffer:220,"hash-base":425,inherits:440}],494:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function a(o,l){for(var f in o)l[f]=o[f];}function s(o,l,f){return i(o,l,f)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,r),r.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(o,l,f){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,l,f)},s.alloc=function(o,l,f){if(typeof o!="number")throw new TypeError("Argument must be a number");var u=i(o);return l!==void 0?typeof f=="string"?u.fill(l,f):u.fill(l):u.fill(0),u},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)};},{buffer:220}],495:[function(e,t,r){(function(n){(function(){var i,a=e("buffer"),s=a.Buffer,o={};for(i in a)a.hasOwnProperty(i)&&i!=="SlowBuffer"&&i!=="Buffer"&&(o[i]=a[i]);var l=o.Buffer={};for(i in s)s.hasOwnProperty(i)&&i!=="allocUnsafe"&&i!=="allocUnsafeSlow"&&(l[i]=s[i]);if(o.Buffer.prototype=s.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(f,u,c){if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof f);if(f&&f.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);return s(f,u,c)}),l.alloc||(l.alloc=function(f,u,c){if(typeof f!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof f);if(f<0||f>=2*(1<<30))throw new RangeError('The value "'+f+'" is invalid for option "size"');var d=s(f);return u&&u.length!==0?typeof c=="string"?d.fill(u,c):d.fill(u):d.fill(0),d}),!o.kStringMaxLength)try{o.kStringMaxLength=n.binding("buffer").kStringMaxLength;}catch{}o.constants||(o.constants={MAX_LENGTH:o.kMaxLength},o.kStringMaxLength&&(o.constants.MAX_STRING_LENGTH=o.kStringMaxLength)),t.exports=o;}).call(this);}).call(this,e("_process"));},{_process:467,buffer:220}],496:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true});let n=e("xmlchars/xml/1.0/ed5"),i=e("xmlchars/xml/1.1/ed2"),a=e("xmlchars/xmlns/1.0/ed3");var s=n.isS,o=n.isChar,l=n.isNameStartChar,f=n.isNameChar,u=n.S_LIST,c=n.NAME_RE,d=i.isChar,p=a.isNCNameStartChar,h=a.isNCNameChar,m=a.NC_NAME_RE;let g="http://www.w3.org/XML/1998/namespace",v="http://www.w3.org/2000/xmlns/",w={__proto__:null,xml:g,xmlns:v},C={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},T=b=>b===34||b===39,I=[34,39],k=[...I,91,62],D=[...I,60,93],j=[61,63,...u],F=[...u,62,38,60];function B(b,y,x){switch(y){case "xml":x!==g&&b.fail(`xml prefix must be bound to ${g}.`);break;case "xmlns":x!==v&&b.fail(`xmlns prefix must be bound to ${v}.`);}switch(x){case v:b.fail(y===""?`the default namespace may not be set to ${x}.`:`may not assign a prefix (even "xmlns") to the URI ${v}.`);break;case g:switch(y){case "xml":break;case "":b.fail(`the default namespace may not be set to ${x}.`);break;default:b.fail("may not assign the xml namespace to another prefix.");}}}let E=b=>m.test(b),M=b=>c.test(b);r.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];let L={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(b){this.opt=b??{},this.fragmentOpt=!!this.opt.fragment;let y=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==false,this.fileName=this.opt.fileName,y){this.nameStartCheck=p,this.nameCheck=h,this.isName=E,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},w);let x=this.opt.additionalNamespaces;x!=null&&((function(_,S){for(let R of Object.keys(S))B(_,R,S[R]);})(this,x),Object.assign(this.ns,x));}else this.nameStartCheck=l,this.nameCheck=f,this.isName=M,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init();}get closed(){return this._closed}_init(){var b;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=[];let{fragmentOpt:y}=this;this.state=y?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=y,this.xmlDeclPossible=!y,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:x}=this.opt;if(x===void 0){if(this.opt.forceXMLVersion===true)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");x="1.0";}this.setXMLVersion(x),this.positionAtNewLine=0,this.doctype=false,this._closed=false,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(C),(b=this.readyHandler)===null||b===void 0||b.call(this);}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(b,y){this[L[b]]=y;}off(b){this[L[b]]=void 0;}makeError(b){var y;let x=(y=this.fileName)!==null&&y!==void 0?y:"";return this.trackPosition&&(x.length>0&&(x+=":"),x+=`${this.line}:${this.column}`),x.length>0&&(x+=": "),new Error(x+b)}fail(b){let y=this.makeError(b),x=this.errorHandler;if(x===void 0)throw y;return x(y),this}write(b){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let y=false;b===null?(y=true,b=""):typeof b=="object"&&(b=b.toString()),this.carriedFromPrevious!==void 0&&(b=`${this.carriedFromPrevious}${b}`,this.carriedFromPrevious=void 0);let x=b.length,_=b.charCodeAt(x-1);!y&&(_===13||_>=55296&&_<=56319)&&(this.carriedFromPrevious=b[x-1],x--,b=b.slice(0,x));let{stateTable:S}=this;for(this.chunk=b,this.i=0;this.i<x;)S[this.state].call(this);return this.chunkPosition+=x,y?this.end():this}close(){return this.write(null)}getCode10(){let{chunk:b,i:y}=this;if(this.prevI=y,this.i=y+1,y>=b.length)return -1;let x=b.charCodeAt(y);if(this.column++,x<55296){if(x>=32||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return b.charCodeAt(y+1)===10&&(this.i=y+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;let _=65536+1024*(x-55296)+(b.charCodeAt(y+1)-56320);return this.i=y+2,_>1114111&&this.fail("disallowed character."),_}getCode11(){let{chunk:b,i:y}=this;if(this.prevI=y,this.i=y+1,y>=b.length)return -1;let x=b.charCodeAt(y);if(this.column++,x<55296){if(x>31&&x<127||x>159&&x!==8232||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{let S=b.charCodeAt(y+1);S!==10&&S!==133||(this.i=y+2);}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;let _=65536+1024*(x-55296)+(b.charCodeAt(y+1)-56320);return this.i=y+2,_>1114111&&this.fail("disallowed character."),_}getCodeNorm(){let b=this.getCode();return b===-2?10:b}unget(){this.i=this.prevI,this.column--;}captureTo(b){let{i:y}=this,{chunk:x}=this;for(;;){let _=this.getCode(),S=_===-2,R=S?10:_;if(R===-1||b.includes(R))return this.text+=x.slice(y,this.prevI),R;S&&(this.text+=x.slice(y,this.prevI)+`
|
|
21
|
+
`,y=this.i);}}captureToChar(b){let{i:y}=this,{chunk:x}=this;for(;;){let _=this.getCode();switch(_){case -2:this.text+=x.slice(y,this.prevI)+`
|
|
22
|
+
`,y=this.i,_=10;break;case -1:return this.text+=x.slice(y),false}if(_===b)return this.text+=x.slice(y,this.prevI),true}}captureNameChars(){let{chunk:b,i:y}=this;for(;;){let x=this.getCode();if(x===-1)return this.name+=b.slice(y),-1;if(!f(x))return this.name+=b.slice(y,this.prevI),x===-2?10:x}}skipSpaces(){for(;;){let b=this.getCodeNorm();if(b===-1||!s(b))return b}}setXMLVersion(b){this.currentXMLVersion=b,b==="1.0"?(this.isChar=o,this.getCode=this.getCode10):(this.isChar=d,this.getCode=this.getCode11);}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1;}sBeginWhitespace(){let b=this.i,y=this.skipSpaces();switch(this.prevI!==b&&(this.xmlDeclPossible=false),y){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case -1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=false;}}sDoctype(){var b;let y=this.captureTo(k);switch(y){case 62:(b=this.doctypeHandler)===null||b===void 0||b.call(this,this.text),this.text="",this.state=13,this.doctype=true;break;case -1:break;default:this.text+=String.fromCodePoint(y),y===91?this.state=4:T(y)&&(this.state=3,this.q=y);}}sDoctypeQuote(){let b=this.q;this.captureToChar(b)&&(this.text+=String.fromCodePoint(b),this.q=null,this.state=2);}sDTD(){let b=this.captureTo(D);b!==-1&&(this.text+=String.fromCodePoint(b),b===93?this.state=2:b===60?this.state=6:T(b)&&(this.state=5,this.q=b));}sDTDQuoted(){let b=this.q;this.captureToChar(b)&&(this.text+=String.fromCodePoint(b),this.state=4,this.q=null);}sDTDOpenWaka(){let b=this.getCodeNorm();switch(this.text+=String.fromCodePoint(b),b){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4;}}sDTDOpenWakaBang(){let b=String.fromCodePoint(this.getCodeNorm()),y=this.openWakaBang+=b;this.text+=b,y!=="-"&&(this.state=y==="--"?8:4,this.openWakaBang="");}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9);}sDTDCommentEnding(){let b=this.getCodeNorm();this.text+=String.fromCodePoint(b),this.state=b===45?10:8;}sDTDCommentEnded(){let b=this.getCodeNorm();this.text+=String.fromCodePoint(b),b===62?this.state=4:(this.fail("malformed comment."),this.state=8);}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12);}sDTDPIEnding(){let b=this.getCodeNorm();this.text+=String.fromCodePoint(b),b===62&&(this.state=4);}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot();}sEntity(){let{i:b}=this,{chunk:y}=this;e:for(;;)switch(this.getCode()){case -2:this.entity+=y.slice(b,this.prevI)+`
|
|
23
|
+
`,b=this.i;break;case 59:{let{entityReturnState:x}=this,_=this.entity+y.slice(b,this.prevI),S;this.state=x,_===""?(this.fail("empty entity name."),S="&;"):(S=this.parseEntity(_),this.entity=""),x===13&&this.textHandler===void 0||(this.text+=S);break e}case -1:this.entity+=y.slice(b);break e}}sOpenWaka(){let b=this.getCode();if(l(b))this.state=34,this.unget(),this.xmlDeclPossible=false;else switch(b){case 47:this.state=43,this.xmlDeclPossible=false;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=false;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=false;}}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=true),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=true),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 b;let y=this.getCodeNorm();y===45?(this.state=19,(b=this.commentHandler)===null||b===void 0||b.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(y),this.state=17);}sCommentEnded(){let b=this.getCodeNorm();b!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(b),this.state=17):this.state=13;}sCData(){this.captureToChar(93)&&(this.state=21);}sCDataEnding(){let b=this.getCodeNorm();b===93?this.state=22:(this.text+="]"+String.fromCodePoint(b),this.state=20);}sCDataEnding2(){var b;let y=this.getCodeNorm();switch(y){case 62:(b=this.cdataHandler)===null||b===void 0||b.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(y),this.state=20;}}sPIFirstChar(){let b=this.getCodeNorm();this.nameStartCheck(b)?(this.piTarget+=String.fromCodePoint(b),this.state=24):b===63||s(b)?(this.fail("processing instruction without a target."),this.state=b===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(b),this.state=24);}sPIRest(){let{chunk:b,i:y}=this;for(;;){let x=this.getCodeNorm();if(x===-1)return void(this.piTarget+=b.slice(y));if(!this.nameCheck(x)){this.piTarget+=b.slice(y,this.prevI);let _=x===63;_||s(x)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=_?33:27):this.state=_?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(x));break}}}sPIBody(){if(this.text.length===0){let b=this.getCodeNorm();b===63?this.state=26:s(b)||(this.text=String.fromCodePoint(b));}else this.captureToChar(63)&&(this.state=26);}sPIEnding(){var b;let y=this.getCodeNorm();if(y===62){let{piTarget:x}=this;x.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(b=this.piHandler)===null||b===void 0||b.call(this,{target:x,body:this.text}),this.piTarget=this.text="",this.state=13;}else y===63?this.text+="?":(this.text+="?"+String.fromCodePoint(y),this.state=25);this.xmlDeclPossible=false;}sXMLDeclNameStart(){let b=this.skipSpaces();b!==63?b!==-1&&(this.state=28,this.name=String.fromCodePoint(b)):this.state=33;}sXMLDeclName(){let b=this.captureTo(j);if(b===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(s(b)||b===61){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "));}this.state=b===61?30:29;}}sXMLDeclEq(){let b=this.getCodeNorm();if(b===63)return this.state=33,void this.fail("XML declaration is incomplete.");s(b)||(b!==61&&this.fail("value required."),this.state=30);}sXMLDeclValueStart(){let b=this.getCodeNorm();if(b===63)return this.state=33,void this.fail("XML declaration is incomplete.");s(b)||(T(b)?this.q=b:(this.fail("value must be quoted."),this.q=32),this.state=31);}sXMLDeclValue(){let b=this.captureTo([this.q,63]);if(b===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(b===-1)return;let y=this.text;switch(this.text="",this.name){case "version":{this.xmlDeclExpects=["encoding","standalone"];let x=y;this.xmlDecl.version=x,/^1\.[0-9]+$/.test(x)?this.opt.forceXMLVersion||this.setXMLVersion(x):this.fail("version number must match /^1\\.[0-9]+$/.");break}case "encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(y)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=y;break;case "standalone":y!=="yes"&&y!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=y;}this.name="",this.state=32;}sXMLDeclSeparator(){let b=this.getCodeNorm();b!==63?(s(b)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33;}sXMLDeclEnding(){var b;this.getCodeNorm()===62?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(b=this.xmldeclHandler)===null||b===void 0||b.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=false;}sOpenTag(){var b;let y=this.captureNameChars();if(y===-1)return;let x=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=x.ns=Object.create(null)),(b=this.openTagStartHandler)===null||b===void 0||b.call(this,x),this.sawRoot=true,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),y){case 62:this.openTag();break;case 47:this.state=35;break;default:s(y)||this.fail("disallowed character in tag name."),this.state=36;}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36);}sAttrib(){let b=this.skipSpaces();b!==-1&&(l(b)?(this.unget(),this.state=37):b===62?this.openTag():b===47?this.state=35:this.fail("disallowed character in attribute name."));}sAttribName(){let b=this.captureNameChars();b===61?this.state=39:s(b)?this.state=38:b===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):b!==-1&&this.fail("disallowed character in attribute name.");}sAttribNameSawWhite(){let b=this.skipSpaces();switch(b){case -1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",b===62?this.openTag():l(b)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36);}}sAttribValue(){let b=this.getCodeNorm();T(b)?(this.q=b,this.state=40):s(b)||(this.fail("unquoted attribute value."),this.state=42,this.unget());}sAttribValueQuoted(){let{q:b,chunk:y}=this,{i:x}=this;for(;;)switch(this.getCode()){case b:return this.pushAttrib(this.name,this.text+y.slice(x,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=y.slice(x,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case -2:case 9:this.text+=y.slice(x,this.prevI)+" ",x=this.i;break;case 60:return this.text+=y.slice(x,this.prevI),void this.fail("disallowed character.");case -1:return void(this.text+=y.slice(x))}}sAttribValueClosed(){let b=this.getCodeNorm();s(b)?this.state=36:b===62?this.openTag():b===47?this.state=35:l(b)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.");}sAttribValueUnquoted(){let b=this.captureTo(F);switch(b){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="",b===62?this.openTag():this.state=36;}}sCloseTag(){let b=this.captureNameChars();b===62?this.closeTag():s(b)?this.state=44:b!==-1&&this.fail("disallowed character in closing tag.");}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case -1:break;default:this.fail("disallowed character in closing tag.");}}handleTextInRoot(){let{i:b,forbiddenState:y}=this,{chunk:x,textHandler:_}=this;e:for(;;)switch(this.getCode()){case 60:if(this.state=15,_!==void 0){let{text:S}=this,R=x.slice(b,this.prevI);S.length!==0?(_(S+R),this.text=""):R.length!==0&&_(R);}y=0;break e;case 38:this.state=14,this.entityReturnState=13,_!==void 0&&(this.text+=x.slice(b,this.prevI)),y=0;break e;case 93:switch(y){case 0:y=1;break;case 1:y=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:y===2&&this.fail('the string "]]>" is disallowed in char data.'),y=0;break;case -2:_!==void 0&&(this.text+=x.slice(b,this.prevI)+`
|
|
24
|
+
`),b=this.i,y=0;break;case -1:_!==void 0&&(this.text+=x.slice(b));break e;default:y=0;}this.forbiddenState=y;}handleTextOutsideRoot(){let{i:b}=this,{chunk:y,textHandler:x}=this,_=false;e:for(;;){let S=this.getCode();switch(S){case 60:if(this.state=15,x!==void 0){let{text:R}=this,z=y.slice(b,this.prevI);R.length!==0?(x(R+z),this.text=""):z.length!==0&&x(z);}break e;case 38:this.state=14,this.entityReturnState=13,x!==void 0&&(this.text+=y.slice(b,this.prevI)),_=true;break e;case -2:x!==void 0&&(this.text+=y.slice(b,this.prevI)+`
|
|
25
|
+
`),b=this.i;break;case -1:x!==void 0&&(this.text+=y.slice(b));break e;default:s(S)||(_=true);}}_&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=true),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=true));}pushAttribNS(b,y){var x;let{prefix:_,local:S}=this.qname(b),R={name:b,prefix:_,local:S,value:y};if(this.attribList.push(R),(x=this.attributeHandler)===null||x===void 0||x.call(this,R),_==="xmlns"){let z=y.trim();this.currentXMLVersion==="1.0"&&z===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[S]=z,B(this,S,z);}else if(b==="xmlns"){let z=y.trim();this.topNS[""]=z,B(this,"",z);}}pushAttribPlain(b,y){var x;let _={name:b,value:y};this.attribList.push(_),(x=this.attributeHandler)===null||x===void 0||x.call(this,_);}end(){var b,y;this.sawRoot||this.fail("document must contain a root element.");let{tags:x}=this;for(;x.length>0;){let S=x.pop();this.fail("unclosed tag: "+S.name);}this.state!==0&&this.state!==13&&this.fail("unexpected end.");let{text:_}=this;return _.length!==0&&((b=this.textHandler)===null||b===void 0||b.call(this,_),this.text=""),this._closed=true,(y=this.endHandler)===null||y===void 0||y.call(this),this._init(),this}resolve(b){var y,x;let _=this.topNS[b];if(_!==void 0)return _;let{tags:S}=this;for(let R=S.length-1;R>=0;R--)if(_=S[R].ns[b],_!==void 0)return _;return _=this.ns[b],_!==void 0?_:(x=(y=this.opt).resolvePrefix)===null||x===void 0?void 0:x.call(y,b)}qname(b){let y=b.indexOf(":");if(y===-1)return {prefix:"",local:b};let x=b.slice(y+1),_=b.slice(0,y);return (_===""||x===""||x.includes(":"))&&this.fail(`malformed name: ${b}.`),{prefix:_,local:x}}processAttribsNS(){var b;let{attribList:y}=this,x=this.tag;{let{prefix:R,local:z}=this.qname(x.name);x.prefix=R,x.local=z;let U=x.uri=(b=this.resolve(R))!==null&&b!==void 0?b:"";R!==""&&(R==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),U===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(R)}.`),x.uri=R));}if(y.length===0)return;let{attributes:_}=x,S=new Set;for(let R of y){let{name:z,prefix:U,local:H}=R,q,N;U===""?(q=z==="xmlns"?v:"",N=z):(q=this.resolve(U),q===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(U)}.`),q=U),N=`{${q}}${H}`),S.has(N)&&this.fail(`duplicate attribute: ${N}.`),S.add(N),R.uri=q,_[z]=R;}this.attribList=[];}processAttribsPlain(){let{attribList:b}=this,y=this.tag.attributes;for(let{name:x,value:_}of b)y[x]!==void 0&&this.fail(`duplicate attribute: ${x}.`),y[x]=_;this.attribList=[];}openTag(){var b;this.processAttribs();let{tags:y}=this,x=this.tag;x.isSelfClosing=false,(b=this.openTagHandler)===null||b===void 0||b.call(this,x),y.push(x),this.state=13,this.name="";}openSelfClosingTag(){var b,y,x;this.processAttribs();let{tags:_}=this,S=this.tag;S.isSelfClosing=true,(b=this.openTagHandler)===null||b===void 0||b.call(this,S),(y=this.closeTagHandler)===null||y===void 0||y.call(this,S),(this.tag=(x=_[_.length-1])!==null&&x!==void 0?x:null)===null&&(this.closedRoot=true),this.state=13,this.name="";}closeTag(){let{tags:b,name:y}=this;if(this.state=13,this.name="",y==="")return this.fail("weird empty close tag."),void(this.text+="</>");let x=this.closeTagHandler,_=b.length;for(;_-- >0;){let S=this.tag=b.pop();if(this.topNS=S.ns,x?.(S),S.name===y)break;this.fail("unexpected close tag.");}_===0?this.closedRoot=true:_<0&&(this.fail(`unmatched closing tag: ${y}.`),this.text+=`</${y}>`);}parseEntity(b){if(b[0]!=="#"){let x=this.ENTITIES[b];return x!==void 0?x:(this.fail(this.isName(b)?"undefined entity.":"disallowed character in entity name."),`&${b};`)}let y=NaN;return b[1]==="x"&&/^#x[0-9a-f]+$/i.test(b)?y=parseInt(b.slice(2),16):/^#[0-9]+$/.test(b)&&(y=parseInt(b.slice(1),10)),this.isChar(y)?String.fromCodePoint(y):(this.fail("malformed character entity."),`&${b};`)}};},{"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(a,s){this._block=n.alloc(a),this._finalSize=s,this._blockSize=a,this._len=0;}i.prototype.update=function(a,s){typeof a=="string"&&(s=s||"utf8",a=n.from(a,s));for(var o=this._block,l=this._blockSize,f=a.length,u=this._len,c=0;c<f;){for(var d=u%l,p=Math.min(f-c,l-d),h=0;h<p;h++)o[d+h]=a[c+h];c+=p,(u+=p)%l==0&&this._update(o);}return this._len+=f,this},i.prototype.digest=function(a){var s=this._len%this._blockSize;this._block[s]=128,this._block.fill(0,s+1),s>=this._finalSize&&(this._update(this._block),this._block.fill(0));var o=8*this._len;if(o<=4294967295)this._block.writeUInt32BE(o,this._blockSize-4);else {var l=(4294967295&o)>>>0,f=(o-l)/4294967296;this._block.writeUInt32BE(f,this._blockSize-8),this._block.writeUInt32BE(l,this._blockSize-4);}this._update(this._block);var u=this._hash();return a?u.toString(a):u},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(i){i=i.toLowerCase();var a=n[i];if(!a)throw new Error(i+" is not supported (we accept pull requests)");return new a};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"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,i.call(this,64,56);}function f(c){return c<<30|c>>>2}function u(c,d,p,h){return c===0?d&p|~d&h:c===2?d&p|d&h|p&h:d^p^h}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(c){for(var d,p=this._w,h=0|this._a,m=0|this._b,g=0|this._c,v=0|this._d,w=0|this._e,C=0;C<16;++C)p[C]=c.readInt32BE(4*C);for(;C<80;++C)p[C]=p[C-3]^p[C-8]^p[C-14]^p[C-16];for(var T=0;T<80;++T){var I=~~(T/20),k=0|((d=h)<<5|d>>>27)+u(I,m,g,v)+w+p[T]+s[I];w=v,v=g,g=f(m),m=h,h=k;}this._a=h+this._a|0,this._b=m+this._b|0,this._c=g+this._c|0,this._d=v+this._d|0,this._e=w+this._e|0;},l.prototype._hash=function(){var c=a.allocUnsafe(20);return c.writeInt32BE(0|this._a,0),c.writeInt32BE(0|this._b,4),c.writeInt32BE(0|this._c,8),c.writeInt32BE(0|this._d,12),c.writeInt32BE(0|this._e,16),c},t.exports=l;},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(e,t,r){var n=e("inherits"),i=e("./hash"),a=e("safe-buffer").Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function l(){this.init(),this._w=o,i.call(this,64,56);}function f(d){return d<<5|d>>>27}function u(d){return d<<30|d>>>2}function c(d,p,h,m){return d===0?p&h|~p&m:d===2?p&h|p&m|h&m:p^h^m}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(d){for(var p,h=this._w,m=0|this._a,g=0|this._b,v=0|this._c,w=0|this._d,C=0|this._e,T=0;T<16;++T)h[T]=d.readInt32BE(4*T);for(;T<80;++T)h[T]=(p=h[T-3]^h[T-8]^h[T-14]^h[T-16])<<1|p>>>31;for(var I=0;I<80;++I){var k=~~(I/20),D=f(m)+c(k,g,v,w)+C+h[I]+s[k]|0;C=w,w=v,v=u(g),g=m,m=D;}this._a=m+this._a|0,this._b=g+this._b|0,this._c=v+this._c|0,this._d=w+this._d|0,this._e=C+this._e|0;},l.prototype._hash=function(){var d=a.allocUnsafe(20);return d.writeInt32BE(0|this._a,0),d.writeInt32BE(0|this._b,4),d.writeInt32BE(0|this._c,8),d.writeInt32BE(0|this._d,12),d.writeInt32BE(0|this._e,16),d},t.exports=l;},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(e,t,r){var n=e("inherits"),i=e("./sha256"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(64);function l(){this.init(),this._w=o,a.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 f=s.allocUnsafe(28);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f},t.exports=l;},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(e,t,r){var n=e("inherits"),i=e("./hash"),a=e("safe-buffer").Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],o=new Array(64);function l(){this.init(),this._w=o,i.call(this,64,56);}function f(h,m,g){return g^h&(m^g)}function u(h,m,g){return h&m|g&(h|m)}function c(h){return (h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10)}function d(h){return (h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7)}function p(h){return (h>>>7|h<<25)^(h>>>18|h<<14)^h>>>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(h){for(var m,g=this._w,v=0|this._a,w=0|this._b,C=0|this._c,T=0|this._d,I=0|this._e,k=0|this._f,D=0|this._g,j=0|this._h,F=0;F<16;++F)g[F]=h.readInt32BE(4*F);for(;F<64;++F)g[F]=0|(((m=g[F-2])>>>17|m<<15)^(m>>>19|m<<13)^m>>>10)+g[F-7]+p(g[F-15])+g[F-16];for(var B=0;B<64;++B){var E=j+d(I)+f(I,k,D)+s[B]+g[B]|0,M=c(v)+u(v,w,C)|0;j=D,D=k,k=I,I=T+E|0,T=C,C=w,w=v,v=E+M|0;}this._a=v+this._a|0,this._b=w+this._b|0,this._c=C+this._c|0,this._d=T+this._d|0,this._e=I+this._e|0,this._f=k+this._f|0,this._g=D+this._g|0,this._h=j+this._h|0;},l.prototype._hash=function(){var h=a.allocUnsafe(32);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h.writeInt32BE(this._h,28),h},t.exports=l;},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(e,t,r){var n=e("inherits"),i=e("./sha512"),a=e("./hash"),s=e("safe-buffer").Buffer,o=new Array(160);function l(){this.init(),this._w=o,a.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 f=s.allocUnsafe(48);function u(c,d,p){f.writeInt32BE(c,p),f.writeInt32BE(d,p+4);}return u(this._ah,this._al,0),u(this._bh,this._bl,8),u(this._ch,this._cl,16),u(this._dh,this._dl,24),u(this._eh,this._el,32),u(this._fh,this._fl,40),f},t.exports=l;},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(e,t,r){var n=e("inherits"),i=e("./hash"),a=e("safe-buffer").Buffer,s=[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 f(w,C,T){return T^w&(C^T)}function u(w,C,T){return w&C|T&(w|C)}function c(w,C){return (w>>>28|C<<4)^(C>>>2|w<<30)^(C>>>7|w<<25)}function d(w,C){return (w>>>14|C<<18)^(w>>>18|C<<14)^(C>>>9|w<<23)}function p(w,C){return (w>>>1|C<<31)^(w>>>8|C<<24)^w>>>7}function h(w,C){return (w>>>1|C<<31)^(w>>>8|C<<24)^(w>>>7|C<<25)}function m(w,C){return (w>>>19|C<<13)^(C>>>29|w<<3)^w>>>6}function g(w,C){return (w>>>19|C<<13)^(C>>>29|w<<3)^(w>>>6|C<<26)}function v(w,C){return w>>>0<C>>>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(w){for(var C=this._w,T=0|this._ah,I=0|this._bh,k=0|this._ch,D=0|this._dh,j=0|this._eh,F=0|this._fh,B=0|this._gh,E=0|this._hh,M=0|this._al,L=0|this._bl,b=0|this._cl,y=0|this._dl,x=0|this._el,_=0|this._fl,S=0|this._gl,R=0|this._hl,z=0;z<32;z+=2)C[z]=w.readInt32BE(4*z),C[z+1]=w.readInt32BE(4*z+4);for(;z<160;z+=2){var U=C[z-30],H=C[z-30+1],q=p(U,H),N=h(H,U),V=m(U=C[z-4],H=C[z-4+1]),O=g(H,U),A=C[z-14],P=C[z-14+1],W=C[z-32],Z=C[z-32+1],$=N+P|0,K=q+A+v($,N)|0;K=(K=K+V+v($=$+O|0,O)|0)+W+v($=$+Z|0,Z)|0,C[z]=K,C[z+1]=$;}for(var te=0;te<160;te+=2){K=C[te],$=C[te+1];var J=u(T,I,k),Y=u(M,L,b),ne=c(T,M),re=c(M,T),ie=d(j,x),oe=d(x,j),se=s[te],le=s[te+1],ge=f(j,F,B),he=f(x,_,S),be=R+oe|0,Me=E+ie+v(be,R)|0;Me=(Me=(Me=Me+ge+v(be=be+he|0,he)|0)+se+v(be=be+le|0,le)|0)+K+v(be=be+$|0,$)|0;var ye=re+Y|0,Se=ne+J+v(ye,re)|0;E=B,R=S,B=F,S=_,F=j,_=x,j=D+Me+v(x=y+be|0,y)|0,D=k,y=b,k=I,b=L,I=T,L=M,T=Me+Se+v(M=be+ye|0,be)|0;}this._al=this._al+M|0,this._bl=this._bl+L|0,this._cl=this._cl+b|0,this._dl=this._dl+y|0,this._el=this._el+x|0,this._fl=this._fl+_|0,this._gl=this._gl+S|0,this._hl=this._hl+R|0,this._ah=this._ah+T+v(this._al,M)|0,this._bh=this._bh+I+v(this._bl,L)|0,this._ch=this._ch+k+v(this._cl,b)|0,this._dh=this._dh+D+v(this._dl,y)|0,this._eh=this._eh+j+v(this._el,x)|0,this._fh=this._fh+F+v(this._fl,_)|0,this._gh=this._gh+B+v(this._gl,S)|0,this._hh=this._hh+E+v(this._hl,R)|0;},l.prototype._hash=function(){var w=a.allocUnsafe(64);function C(T,I,k){w.writeInt32BE(T,k),w.writeInt32BE(I,k+4);}return C(this._ah,this._al,0),C(this._bh,this._bl,8),C(this._ch,this._cl,16),C(this._dh,this._dl,24),C(this._eh,this._el,32),C(this._fh,this._fl,40),C(this._gh,this._gl,48),C(this._hh,this._hl,56),w},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(a,s){var o=this;function l(m){a.writable&&a.write(m)===false&&o.pause&&o.pause();}function f(){o.readable&&o.resume&&o.resume();}o.on("data",l),a.on("drain",f),a._isStdio||s&&s.end===false||(o.on("end",c),o.on("close",d));var u=false;function c(){u||(u=true,a.end());}function d(){u||(u=true,typeof a.destroy=="function"&&a.destroy());}function p(m){if(h(),n.listenerCount(this,"error")===0)throw m}function h(){o.removeListener("data",l),a.removeListener("drain",f),o.removeListener("end",c),o.removeListener("close",d),o.removeListener("error",p),a.removeListener("error",p),o.removeListener("end",h),o.removeListener("close",h),a.removeListener("close",h);}return o.on("error",p),a.on("error",p),o.on("end",h),o.on("close",h),a.on("close",h),a.emit("pipe",o),a};},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(i){return n.call(i)=="[object Array]"};},{}],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(h){var m=[];for(var g in h)m.push(g);return m};t.exports=c;var a=Object.create(e("core-util-is"));a.inherits=e("inherits");var s=e("./_stream_readable"),o=e("./_stream_writable");a.inherits(c,s);for(var l=i(o.prototype),f=0;f<l.length;f++){var u=l[f];c.prototype[u]||(c.prototype[u]=o.prototype[u]);}function c(h){if(!(this instanceof c))return new c(h);s.call(this,h),o.call(this,h),h&&h.readable===false&&(this.readable=false),h&&h.writable===false&&(this.writable=false),this.allowHalfOpen=true,h&&h.allowHalfOpen===false&&(this.allowHalfOpen=false),this.once("end",d);}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this);}function p(h){h.end();}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=h,this._writableState.destroyed=h);}}),c.prototype._destroy=function(h,m){this.push(null),this.end(),n.nextTick(m,h);};},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(e,t,r){t.exports=a;var n=e("./_stream_transform"),i=Object.create(e("core-util-is"));function a(s){if(!(this instanceof a))return new a(s);n.call(this,s);}i.inherits=e("inherits"),i.inherits(a,n),a.prototype._transform=function(s,o,l){l(null,s);};},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(e,t,r){(function(n,i){(function(){var a=e("process-nextick-args");t.exports=T;var s,o=e("isarray");T.ReadableState=C,e("events").EventEmitter;var l=function(R,z){return R.listeners(z).length},f=e("./internal/streams/stream"),u=e("safe-buffer").Buffer,c=(i!==void 0?i:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},d=Object.create(e("core-util-is"));d.inherits=e("inherits");var p=e("util"),h=void 0;h=p&&p.debuglog?p.debuglog("stream"):function(){};var m,g=e("./internal/streams/BufferList"),v=e("./internal/streams/destroy");d.inherits(T,f);var w=["error","close","destroy","pause","resume"];function C(R,z){R=R||{};var U=z instanceof(s=s||e("./_stream_duplex"));this.objectMode=!!R.objectMode,U&&(this.objectMode=this.objectMode||!!R.readableObjectMode);var H=R.highWaterMark,q=R.readableHighWaterMark,N=this.objectMode?16:16384;this.highWaterMark=H||H===0?H:U&&(q||q===0)?q:N,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.destroyed=false,this.defaultEncoding=R.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,R.encoding&&(m||(m=e("string_decoder/").StringDecoder),this.decoder=new m(R.encoding),this.encoding=R.encoding);}function T(R){if(s=s||e("./_stream_duplex"),!(this instanceof T))return new T(R);this._readableState=new C(R,this),this.readable=true,R&&(typeof R.read=="function"&&(this._read=R.read),typeof R.destroy=="function"&&(this._destroy=R.destroy)),f.call(this);}function I(R,z,U,H,q){var N,V=R._readableState;return z===null?(V.reading=false,(function(O,A){if(!A.ended){if(A.decoder){var P=A.decoder.end();P&&P.length&&(A.buffer.push(P),A.length+=A.objectMode?1:P.length);}A.ended=true,j(O);}})(R,V)):(q||(N=(function(O,A){var P;W=A,u.isBuffer(W)||W instanceof c||typeof A=="string"||A===void 0||O.objectMode||(P=new TypeError("Invalid non-string/buffer chunk"));var W;return P})(V,z)),N?R.emit("error",N):V.objectMode||z&&z.length>0?(typeof z=="string"||V.objectMode||Object.getPrototypeOf(z)===u.prototype||(z=(function(O){return u.from(O)})(z)),H?V.endEmitted?R.emit("error",new Error("stream.unshift() after end event")):k(R,V,z,true):V.ended?R.emit("error",new Error("stream.push() after EOF")):(V.reading=false,V.decoder&&!U?(z=V.decoder.write(z),V.objectMode||z.length!==0?k(R,V,z,false):B(R,V)):k(R,V,z,false))):H||(V.reading=false)),(function(O){return !O.ended&&(O.needReadable||O.length<O.highWaterMark||O.length===0)})(V)}function k(R,z,U,H){z.flowing&&z.length===0&&!z.sync?(R.emit("data",U),R.read(0)):(z.length+=z.objectMode?1:U.length,H?z.buffer.unshift(U):z.buffer.push(U),z.needReadable&&j(R)),B(R,z);}Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(R){this._readableState&&(this._readableState.destroyed=R);}}),T.prototype.destroy=v.destroy,T.prototype._undestroy=v.undestroy,T.prototype._destroy=function(R,z){this.push(null),z(R);},T.prototype.push=function(R,z){var U,H=this._readableState;return H.objectMode?U=true:typeof R=="string"&&((z=z||H.defaultEncoding)!==H.encoding&&(R=u.from(R,z),z=""),U=true),I(this,R,z,false,U)},T.prototype.unshift=function(R){return I(this,R,null,true,false)},T.prototype.isPaused=function(){return this._readableState.flowing===false},T.prototype.setEncoding=function(R){return m||(m=e("string_decoder/").StringDecoder),this._readableState.decoder=new m(R),this._readableState.encoding=R,this};function D(R,z){return R<=0||z.length===0&&z.ended?0:z.objectMode?1:R!=R?z.flowing&&z.length?z.buffer.head.data.length:z.length:(R>z.highWaterMark&&(z.highWaterMark=(function(U){return U>=8388608?U=8388608:(U--,U|=U>>>1,U|=U>>>2,U|=U>>>4,U|=U>>>8,U|=U>>>16,U++),U})(R)),R<=z.length?R:z.ended?z.length:(z.needReadable=true,0))}function j(R){var z=R._readableState;z.needReadable=false,z.emittedReadable||(h("emitReadable",z.flowing),z.emittedReadable=true,z.sync?a.nextTick(F,R):F(R));}function F(R){h("emit readable"),R.emit("readable"),b(R);}function B(R,z){z.readingMore||(z.readingMore=true,a.nextTick(E,R,z));}function E(R,z){for(var U=z.length;!z.reading&&!z.flowing&&!z.ended&&z.length<z.highWaterMark&&(h("maybeReadMore read 0"),R.read(0),U!==z.length);)U=z.length;z.readingMore=false;}function M(R){h("readable nexttick read 0"),R.read(0);}function L(R,z){z.reading||(h("resume read 0"),R.read(0)),z.resumeScheduled=false,z.awaitDrain=0,R.emit("resume"),b(R),z.flowing&&!z.reading&&R.read(0);}function b(R){var z=R._readableState;for(h("flow",z.flowing);z.flowing&&R.read()!==null;);}function y(R,z){return z.length===0?null:(z.objectMode?U=z.buffer.shift():!R||R>=z.length?(U=z.decoder?z.buffer.join(""):z.buffer.length===1?z.buffer.head.data:z.buffer.concat(z.length),z.buffer.clear()):U=(function(H,q,N){var V;return H<q.head.data.length?(V=q.head.data.slice(0,H),q.head.data=q.head.data.slice(H)):V=H===q.head.data.length?q.shift():N?(function(O,A){var P=A.head,W=1,Z=P.data;for(O-=Z.length;P=P.next;){var $=P.data,K=O>$.length?$.length:O;if(K===$.length?Z+=$:Z+=$.slice(0,O),(O-=K)===0){K===$.length?(++W,P.next?A.head=P.next:A.head=A.tail=null):(A.head=P,P.data=$.slice(K));break}++W;}return A.length-=W,Z})(H,q):(function(O,A){var P=u.allocUnsafe(O),W=A.head,Z=1;for(W.data.copy(P),O-=W.data.length;W=W.next;){var $=W.data,K=O>$.length?$.length:O;if($.copy(P,P.length-O,0,K),(O-=K)===0){K===$.length?(++Z,W.next?A.head=W.next:A.head=A.tail=null):(A.head=W,W.data=$.slice(K));break}++Z;}return A.length-=Z,P})(H,q),V})(R,z.buffer,z.decoder),U);var U;}function x(R){var z=R._readableState;if(z.length>0)throw new Error('"endReadable()" called on non-empty stream');z.endEmitted||(z.ended=true,a.nextTick(_,z,R));}function _(R,z){R.endEmitted||R.length!==0||(R.endEmitted=true,z.readable=false,z.emit("end"));}function S(R,z){for(var U=0,H=R.length;U<H;U++)if(R[U]===z)return U;return -1}T.prototype.read=function(R){h("read",R),R=parseInt(R,10);var z=this._readableState,U=R;if(R!==0&&(z.emittedReadable=false),R===0&&z.needReadable&&(z.length>=z.highWaterMark||z.ended))return h("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?x(this):j(this),null;if((R=D(R,z))===0&&z.ended)return z.length===0&&x(this),null;var H,q=z.needReadable;return h("need readable",q),(z.length===0||z.length-R<z.highWaterMark)&&h("length less than watermark",q=true),z.ended||z.reading?h("reading or ended",q=false):q&&(h("do read"),z.reading=true,z.sync=true,z.length===0&&(z.needReadable=true),this._read(z.highWaterMark),z.sync=false,z.reading||(R=D(U,z))),(H=R>0?y(R,z):null)===null?(z.needReadable=true,R=0):z.length-=R,z.length===0&&(z.ended||(z.needReadable=true),U!==R&&z.ended&&x(this)),H!==null&&this.emit("data",H),H},T.prototype._read=function(R){this.emit("error",new Error("_read() is not implemented"));},T.prototype.pipe=function(R,z){var U=this,H=this._readableState;switch(H.pipesCount){case 0:H.pipes=R;break;case 1:H.pipes=[H.pipes,R];break;default:H.pipes.push(R);}H.pipesCount+=1,h("pipe count=%d opts=%j",H.pipesCount,z);var q=(!z||z.end!==false)&&R!==n.stdout&&R!==n.stderr?V:te;function N(J,Y){h("onunpipe"),J===U&&Y&&Y.hasUnpiped===false&&(Y.hasUnpiped=true,h("cleanup"),R.removeListener("close",$),R.removeListener("finish",K),R.removeListener("drain",O),R.removeListener("error",Z),R.removeListener("unpipe",N),U.removeListener("end",V),U.removeListener("end",te),U.removeListener("data",W),A=true,!H.awaitDrain||R._writableState&&!R._writableState.needDrain||O());}function V(){h("onend"),R.end();}H.endEmitted?a.nextTick(q):U.once("end",q),R.on("unpipe",N);var O=(function(J){return function(){var Y=J._readableState;h("pipeOnDrain",Y.awaitDrain),Y.awaitDrain&&Y.awaitDrain--,Y.awaitDrain===0&&l(J,"data")&&(Y.flowing=true,b(J));}})(U);R.on("drain",O);var A=false,P=false;function W(J){h("ondata"),P=false,R.write(J)!==false||P||((H.pipesCount===1&&H.pipes===R||H.pipesCount>1&&S(H.pipes,R)!==-1)&&!A&&(h("false write response, pause",H.awaitDrain),H.awaitDrain++,P=true),U.pause());}function Z(J){h("onerror",J),te(),R.removeListener("error",Z),l(R,"error")===0&&R.emit("error",J);}function $(){R.removeListener("finish",K),te();}function K(){h("onfinish"),R.removeListener("close",$),te();}function te(){h("unpipe"),U.unpipe(R);}return U.on("data",W),(function(J,Y,ne){if(typeof J.prependListener=="function")return J.prependListener(Y,ne);J._events&&J._events[Y]?o(J._events[Y])?J._events[Y].unshift(ne):J._events[Y]=[ne,J._events[Y]]:J.on(Y,ne);})(R,"error",Z),R.once("close",$),R.once("finish",K),R.emit("pipe",U),H.flowing||(h("pipe resume"),U.resume()),R},T.prototype.unpipe=function(R){var z=this._readableState,U={hasUnpiped:false};if(z.pipesCount===0)return this;if(z.pipesCount===1)return R&&R!==z.pipes||(R||(R=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=false,R&&R.emit("unpipe",this,U)),this;if(!R){var H=z.pipes,q=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=false;for(var N=0;N<q;N++)H[N].emit("unpipe",this,{hasUnpiped:false});return this}var V=S(z.pipes,R);return V===-1||(z.pipes.splice(V,1),z.pipesCount-=1,z.pipesCount===1&&(z.pipes=z.pipes[0]),R.emit("unpipe",this,U)),this},T.prototype.on=function(R,z){var U=f.prototype.on.call(this,R,z);if(R==="data")this._readableState.flowing!==false&&this.resume();else if(R==="readable"){var H=this._readableState;H.endEmitted||H.readableListening||(H.readableListening=H.needReadable=true,H.emittedReadable=false,H.reading?H.length&&j(this):a.nextTick(M,this));}return U},T.prototype.addListener=T.prototype.on,T.prototype.resume=function(){var R=this._readableState;return R.flowing||(h("resume"),R.flowing=true,(function(z,U){U.resumeScheduled||(U.resumeScheduled=true,a.nextTick(L,z,U));})(this,R)),this},T.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(h("pause"),this._readableState.flowing=false,this.emit("pause")),this},T.prototype.wrap=function(R){var z=this,U=this._readableState,H=false;for(var q in R.on("end",(function(){if(h("wrapped end"),U.decoder&&!U.ended){var V=U.decoder.end();V&&V.length&&z.push(V);}z.push(null);})),R.on("data",(function(V){h("wrapped data"),U.decoder&&(V=U.decoder.write(V)),U.objectMode&&V==null||(U.objectMode||V&&V.length)&&(z.push(V)||(H=true,R.pause()));})),R)this[q]===void 0&&typeof R[q]=="function"&&(this[q]=(function(V){return function(){return R[V].apply(R,arguments)}})(q));for(var N=0;N<w.length;N++)R.on(w[N],this.emit.bind(this,w[N]));return this._read=function(V){h("wrapped _read",V),H&&(H=false,R.resume());},this},Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}}),T._fromList=y;}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,events:422,inherits:440,isarray:506,"process-nextick-args":466,"safe-buffer":520,"string_decoder/":521,util:188}],511:[function(e,t,r){t.exports=s;var n=e("./_stream_duplex"),i=Object.create(e("core-util-is"));function a(f,u){var c=this._transformState;c.transforming=false;var d=c.writecb;if(!d)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,u!=null&&this.push(u),d(f);var p=this._readableState;p.reading=false,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark);}function s(f){if(!(this instanceof s))return new s(f);n.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",o);}function o(){var f=this;typeof this._flush=="function"?this._flush((function(u,c){l(f,u,c);})):l(this,null,null);}function l(f,u,c){if(u)return f.emit("error",u);if(c!=null&&f.push(c),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}i.inherits=e("inherits"),i.inherits(s,n),s.prototype.push=function(f,u){return this._transformState.needTransform=false,n.prototype.push.call(this,f,u)},s.prototype._transform=function(f,u,c){throw new Error("_transform() is not implemented")},s.prototype._write=function(f,u,c){var d=this._transformState;if(d.writecb=c,d.writechunk=f,d.writeencoding=u,!d.transforming){var p=this._readableState;(d.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark);}},s.prototype._read=function(f){var u=this._transformState;u.writechunk!==null&&u.writecb&&!u.transforming?(u.transforming=true,this._transform(u.writechunk,u.writeencoding,u.afterTransform)):u.needTransform=true;},s.prototype._destroy=function(f,u){var c=this;n.prototype._destroy.call(this,f,(function(d){u(d),c.emit("close");}));};},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(e,t,r){(function(n,i,a){(function(){var s=e("process-nextick-args");function o(B){var E=this;this.next=null,this.entry=null,this.finish=function(){(function(M,L,b){var y=M.entry;for(M.entry=null;y;){var x=y.callback;L.pendingcb--,x(b),y=y.next;}L.corkedRequestsFree.next=M;})(E,B);};}t.exports=C;var l,f=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?a:s.nextTick;C.WritableState=w;var u=Object.create(e("core-util-is"));u.inherits=e("inherits");var c={deprecate:e("util-deprecate")},d=e("./internal/streams/stream"),p=e("safe-buffer").Buffer,h=(i!==void 0?i:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},m,g=e("./internal/streams/destroy");function v(){}function w(B,E){l=l||e("./_stream_duplex"),B=B||{};var M=E instanceof l;this.objectMode=!!B.objectMode,M&&(this.objectMode=this.objectMode||!!B.writableObjectMode);var L=B.highWaterMark,b=B.writableHighWaterMark,y=this.objectMode?16:16384;this.highWaterMark=L||L===0?L:M&&(b||b===0)?b:y,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var x=B.decodeStrings===false;this.decodeStrings=!x,this.defaultEncoding=B.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(_){(function(S,R){var z=S._writableState,U=z.sync,H=z.writecb;if((function(N){N.writing=false,N.writecb=null,N.length-=N.writelen,N.writelen=0;})(z),R)(function(N,V,O,A,P){--V.pendingcb,O?(s.nextTick(P,A),s.nextTick(F,N,V),N._writableState.errorEmitted=true,N.emit("error",A)):(P(A),N._writableState.errorEmitted=true,N.emit("error",A),F(N,V));})(S,z,U,R,H);else {var q=D(z);q||z.corked||z.bufferProcessing||!z.bufferedRequest||k(S,z),U?f(I,S,z,q,H):I(S,z,q,H);}})(E,_);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this);}function C(B){if(l=l||e("./_stream_duplex"),!(m.call(C,this)||this instanceof l))return new C(B);this._writableState=new w(B,this),this.writable=true,B&&(typeof B.write=="function"&&(this._write=B.write),typeof B.writev=="function"&&(this._writev=B.writev),typeof B.destroy=="function"&&(this._destroy=B.destroy),typeof B.final=="function"&&(this._final=B.final)),d.call(this);}function T(B,E,M,L,b,y,x){E.writelen=L,E.writecb=x,E.writing=true,E.sync=true,M?B._writev(b,E.onwrite):B._write(b,y,E.onwrite),E.sync=false;}function I(B,E,M,L){M||(function(b,y){y.length===0&&y.needDrain&&(y.needDrain=false,b.emit("drain"));})(B,E),E.pendingcb--,L(),F(B,E);}function k(B,E){E.bufferProcessing=true;var M=E.bufferedRequest;if(B._writev&&M&&M.next){var L=E.bufferedRequestCount,b=new Array(L),y=E.corkedRequestsFree;y.entry=M;for(var x=0,_=true;M;)b[x]=M,M.isBuf||(_=false),M=M.next,x+=1;b.allBuffers=_,T(B,E,true,E.length,b,"",y.finish),E.pendingcb++,E.lastBufferedRequest=null,y.next?(E.corkedRequestsFree=y.next,y.next=null):E.corkedRequestsFree=new o(E),E.bufferedRequestCount=0;}else {for(;M;){var S=M.chunk,R=M.encoding,z=M.callback;if(T(B,E,false,E.objectMode?1:S.length,S,R,z),M=M.next,E.bufferedRequestCount--,E.writing)break}M===null&&(E.lastBufferedRequest=null);}E.bufferedRequest=M,E.bufferProcessing=false;}function D(B){return B.ending&&B.length===0&&B.bufferedRequest===null&&!B.finished&&!B.writing}function j(B,E){B._final((function(M){E.pendingcb--,M&&B.emit("error",M),E.prefinished=true,B.emit("prefinish"),F(B,E);}));}function F(B,E){var M=D(E);return M&&((function(L,b){b.prefinished||b.finalCalled||(typeof L._final=="function"?(b.pendingcb++,b.finalCalled=true,s.nextTick(j,L,b)):(b.prefinished=true,L.emit("prefinish")));})(B,E),E.pendingcb===0&&(E.finished=true,B.emit("finish"))),M}u.inherits(C,d),w.prototype.getBuffer=function(){for(var B=this.bufferedRequest,E=[];B;)E.push(B),B=B.next;return E},(function(){try{Object.defineProperty(w.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(m=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(B){return !!m.call(this,B)||this===C&&B&&B._writableState instanceof w}})):m=function(B){return B instanceof this},C.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));},C.prototype.write=function(B,E,M){var L,b=this._writableState,y=false,x=!b.objectMode&&(L=B,p.isBuffer(L)||L instanceof h);return x&&!p.isBuffer(B)&&(B=(function(_){return p.from(_)})(B)),typeof E=="function"&&(M=E,E=null),x?E="buffer":E||(E=b.defaultEncoding),typeof M!="function"&&(M=v),b.ended?(function(_,S){var R=new Error("write after end");_.emit("error",R),s.nextTick(S,R);})(this,M):(x||(function(_,S,R,z){var U=true,H=false;return R===null?H=new TypeError("May not write null values to stream"):typeof R=="string"||R===void 0||S.objectMode||(H=new TypeError("Invalid non-string/buffer chunk")),H&&(_.emit("error",H),s.nextTick(z,H),U=false),U})(this,b,B,M))&&(b.pendingcb++,y=(function(_,S,R,z,U,H){if(!R){var q=(function(A,P,W){return A.objectMode||A.decodeStrings===false||typeof P!="string"||(P=p.from(P,W)),P})(S,z,U);z!==q&&(R=true,U="buffer",z=q);}var N=S.objectMode?1:z.length;S.length+=N;var V=S.length<S.highWaterMark;if(V||(S.needDrain=true),S.writing||S.corked){var O=S.lastBufferedRequest;S.lastBufferedRequest={chunk:z,encoding:U,isBuf:R,callback:H,next:null},O?O.next=S.lastBufferedRequest:S.bufferedRequest=S.lastBufferedRequest,S.bufferedRequestCount+=1;}else T(_,S,false,N,z,U,H);return V})(this,b,x,B,E,M)),y},C.prototype.cork=function(){this._writableState.corked++;},C.prototype.uncork=function(){var B=this._writableState;B.corked&&(B.corked--,B.writing||B.corked||B.bufferProcessing||!B.bufferedRequest||k(this,B));},C.prototype.setDefaultEncoding=function(B){if(typeof B=="string"&&(B=B.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((B+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+B);return this._writableState.defaultEncoding=B,this},Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(B,E,M){M(new Error("_write() is not implemented"));},C.prototype._writev=null,C.prototype.end=function(B,E,M){var L=this._writableState;typeof B=="function"?(M=B,B=null,E=null):typeof E=="function"&&(M=E,E=null),B!=null&&this.write(B,E),L.corked&&(L.corked=1,this.uncork()),L.ending||(function(b,y,x){y.ending=true,F(b,y),x&&(y.finished?s.nextTick(x):b.once("finish",x)),y.ended=true,b.writable=false;})(this,L,M);},Object.defineProperty(C.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(B){this._writableState&&(this._writableState.destroyed=B);}}),C.prototype.destroy=g.destroy,C.prototype._undestroy=g.undestroy,C.prototype._destroy=function(B,E){this.end(),E(B);};}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?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 a(){((function(s,o){if(!(s instanceof o))throw new TypeError("Cannot call a class as a function")}))(this,a),this.head=null,this.tail=null,this.length=0;}return a.prototype.push=function(s){var o={data:s,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length;},a.prototype.unshift=function(s){var o={data:s,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length;},a.prototype.shift=function(){if(this.length!==0){var s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0;},a.prototype.join=function(s){if(this.length===0)return "";for(var o=this.head,l=""+o.data;o=o.next;)l+=s+o.data;return l},a.prototype.concat=function(s){if(this.length===0)return n.alloc(0);for(var o,l,f,u=n.allocUnsafe(s>>>0),c=this.head,d=0;c;)o=c.data,l=u,f=d,o.copy(l,f),d+=c.data.length,c=c.next;return u},a})(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var a=i.inspect({length:this.length});return this.constructor.name+" "+a});},{"safe-buffer":520,util:188}],514:[function(e,t,r){var n=e("process-nextick-args");function i(a,s){a.emit("error",s);}t.exports={destroy:function(a,s){var o=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(s?s(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,n.nextTick(i,this,a)):n.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(a||null,(function(u){!s&&u?o._writableState?o._writableState.errorEmitted||(o._writableState.errorEmitted=true,n.nextTick(i,o,u)):n.nextTick(i,o,u):s&&s(u);})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}};},{"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(n,i){(function(){var a=e("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,l={},f=0;function u(c,d){this._id=c,this._clearFn=d;}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(c){c.close();},u.prototype.unref=u.prototype.ref=function(){},u.prototype.close=function(){this._clearFn.call(window,this._id);},r.enroll=function(c,d){clearTimeout(c._idleTimeoutId),c._idleTimeout=d;},r.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1;},r._unrefActive=r.active=function(c){clearTimeout(c._idleTimeoutId);var d=c._idleTimeout;d>=0&&(c._idleTimeoutId=setTimeout((function(){c._onTimeout&&c._onTimeout();}),d));},r.setImmediate=typeof n=="function"?n:function(c){var d=f++,p=!(arguments.length<2)&&o.call(arguments,1);return l[d]=true,a((function(){l[d]&&(p?c.apply(null,p):c.call(null),r.clearImmediate(d));})),d},r.clearImmediate=typeof i=="function"?i:function(c){delete l[c];};}).call(this);}).call(this,e("timers").setImmediate,e("timers").clearImmediate);},{"process/browser.js":467,timers:523}],524:[function(e,t,r){(function(n){(function(){function i(a){try{if(!n.localStorage)return !1}catch{return false}var s=n.localStorage[a];return s!=null&&String(s).toLowerCase()==="true"}t.exports=function(a,s){if(i("noDeprecation"))return a;var o=false;return function(){if(!o){if(i("throwDeprecation"))throw new Error(s);i("traceDeprecation")?console.trace(s):console.warn(s),o=true;}return a.apply(this,arguments)}};}).call(this);}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{}],525:[function(e,t,r){typeof Object.create=="function"?t.exports=function(n,i){n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:false,writable:true,configurable:true}});}:t.exports=function(n,i){n.super_=i;var a=function(){};a.prototype=i.prototype,n.prototype=new a,n.prototype.constructor=n;};},{}],526:[function(e,t,r){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"};},{}],527:[function(e,t,r){(function(n,i){(function(){var a=/%[sdj%]/g;r.format=function(b){if(!w(b)){for(var y=[],x=0;x<arguments.length;x++)y.push(l(arguments[x]));return y.join(" ")}x=1;for(var _=arguments,S=_.length,R=String(b).replace(a,(function(U){if(U==="%%")return "%";if(x>=S)return U;switch(U){case "%s":return String(_[x++]);case "%d":return Number(_[x++]);case "%j":try{return JSON.stringify(_[x++])}catch{return "[Circular]"}default:return U}})),z=_[x];x<S;z=_[++x])g(z)||!I(z)?R+=" "+z:R+=" "+l(z);return R},r.deprecate=function(b,y){if(C(i.process))return function(){return r.deprecate(b,y).apply(this,arguments)};if(n.noDeprecation===true)return b;var x=false;return function(){if(!x){if(n.throwDeprecation)throw new Error(y);n.traceDeprecation?console.trace(y):console.error(y),x=true;}return b.apply(this,arguments)}};var s,o={};function l(b,y){var x={seen:[],stylize:u};return arguments.length>=3&&(x.depth=arguments[2]),arguments.length>=4&&(x.colors=arguments[3]),m(y)?x.showHidden=y:y&&r._extend(x,y),C(x.showHidden)&&(x.showHidden=false),C(x.depth)&&(x.depth=2),C(x.colors)&&(x.colors=false),C(x.customInspect)&&(x.customInspect=true),x.colors&&(x.stylize=f),c(x,b,x.depth)}function f(b,y){var x=l.styles[y];return x?"\x1B["+l.colors[x][0]+"m"+b+"\x1B["+l.colors[x][1]+"m":b}function u(b,y){return b}function c(b,y,x){if(b.customInspect&&y&&j(y.inspect)&&y.inspect!==r.inspect&&(!y.constructor||y.constructor.prototype!==y)){var _=y.inspect(x,b);return w(_)||(_=c(b,_,x)),_}var S=(function(O,A){if(C(A))return O.stylize("undefined","undefined");if(w(A)){var P="'"+JSON.stringify(A).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(P,"string")}if(v(A))return O.stylize(""+A,"number");if(m(A))return O.stylize(""+A,"boolean");if(g(A))return O.stylize("null","null")})(b,y);if(S)return S;var R=Object.keys(y),z=(function(O){var A={};return O.forEach((function(P,W){A[P]=true;})),A})(R);if(b.showHidden&&(R=Object.getOwnPropertyNames(y)),D(y)&&(R.indexOf("message")>=0||R.indexOf("description")>=0))return d(y);if(R.length===0){if(j(y)){var U=y.name?": "+y.name:"";return b.stylize("[Function"+U+"]","special")}if(T(y))return b.stylize(RegExp.prototype.toString.call(y),"regexp");if(k(y))return b.stylize(Date.prototype.toString.call(y),"date");if(D(y))return d(y)}var H,q="",N=false,V=["{","}"];return h(y)&&(N=true,V=["[","]"]),j(y)&&(q=" [Function"+(y.name?": "+y.name:"")+"]"),T(y)&&(q=" "+RegExp.prototype.toString.call(y)),k(y)&&(q=" "+Date.prototype.toUTCString.call(y)),D(y)&&(q=" "+d(y)),R.length!==0||N&&y.length!=0?x<0?T(y)?b.stylize(RegExp.prototype.toString.call(y),"regexp"):b.stylize("[Object]","special"):(b.seen.push(y),H=N?(function(O,A,P,W,Z){for(var $=[],K=0,te=A.length;K<te;++K)L(A,String(K))?$.push(p(O,A,P,W,String(K),true)):$.push("");return Z.forEach((function(J){J.match(/^\d+$/)||$.push(p(O,A,P,W,J,true));})),$})(b,y,x,z,R):R.map((function(O){return p(b,y,x,z,O,N)})),b.seen.pop(),(function(O,A,P){return O.reduce((function(W,Z){return Z.indexOf(`
|
|
26
|
+
`)>=0,W+Z.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?P[0]+(A===""?"":A+`
|
|
27
|
+
`)+" "+O.join(`,
|
|
28
|
+
`)+" "+P[1]:P[0]+A+" "+O.join(", ")+" "+P[1]})(H,q,V)):V[0]+q+V[1]}function d(b){return "["+Error.prototype.toString.call(b)+"]"}function p(b,y,x,_,S,R){var z,U,H;if((H=Object.getOwnPropertyDescriptor(y,S)||{value:y[S]}).get?U=H.set?b.stylize("[Getter/Setter]","special"):b.stylize("[Getter]","special"):H.set&&(U=b.stylize("[Setter]","special")),L(_,S)||(z="["+S+"]"),U||(b.seen.indexOf(H.value)<0?(U=g(x)?c(b,H.value,null):c(b,H.value,x-1)).indexOf(`
|
|
29
|
+
`)>-1&&(U=R?U.split(`
|
|
30
|
+
`).map((function(q){return " "+q})).join(`
|
|
31
|
+
`).substr(2):`
|
|
32
|
+
`+U.split(`
|
|
33
|
+
`).map((function(q){return " "+q})).join(`
|
|
34
|
+
`)):U=b.stylize("[Circular]","special")),C(z)){if(R&&S.match(/^\d+$/))return U;(z=JSON.stringify(""+S)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=b.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=b.stylize(z,"string"));}return z+": "+U}function h(b){return Array.isArray(b)}function m(b){return typeof b=="boolean"}function g(b){return b===null}function v(b){return typeof b=="number"}function w(b){return typeof b=="string"}function C(b){return b===void 0}function T(b){return I(b)&&F(b)==="[object RegExp]"}function I(b){return typeof b=="object"&&b!==null}function k(b){return I(b)&&F(b)==="[object Date]"}function D(b){return I(b)&&(F(b)==="[object Error]"||b instanceof Error)}function j(b){return typeof b=="function"}function F(b){return Object.prototype.toString.call(b)}function B(b){return b<10?"0"+b.toString(10):b.toString(10)}r.debuglog=function(b){if(C(s)&&(s=n.env.NODE_DEBUG||""),b=b.toUpperCase(),!o[b])if(new RegExp("\\b"+b+"\\b","i").test(s)){var y=n.pid;o[b]=function(){var x=r.format.apply(r,arguments);console.error("%s %d: %s",b,y,x);};}else o[b]=function(){};return o[b]},r.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=h,r.isBoolean=m,r.isNull=g,r.isNullOrUndefined=function(b){return b==null},r.isNumber=v,r.isString=w,r.isSymbol=function(b){return typeof b=="symbol"},r.isUndefined=C,r.isRegExp=T,r.isObject=I,r.isDate=k,r.isError=D,r.isFunction=j,r.isPrimitive=function(b){return b===null||typeof b=="boolean"||typeof b=="number"||typeof b=="string"||typeof b=="symbol"||b===void 0},r.isBuffer=e("./support/isBuffer");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(){var b=new Date,y=[B(b.getHours()),B(b.getMinutes()),B(b.getSeconds())].join(":");return [b.getDate(),E[b.getMonth()],y].join(" ")}function L(b,y){return Object.prototype.hasOwnProperty.call(b,y)}r.log=function(){console.log("%s - %s",M(),r.format.apply(r,arguments));},r.inherits=e("inherits"),r._extend=function(b,y){if(!y||!I(y))return b;for(var x=Object.keys(y),_=x.length;_--;)b[x[_]]=y[x[_]];return b};}).call(this);}).call(this,e("_process"),typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{});},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),Object.defineProperty(r,"v1",{enumerable:true,get:function(){return n.default}}),Object.defineProperty(r,"v3",{enumerable:true,get:function(){return i.default}}),Object.defineProperty(r,"v4",{enumerable:true,get:function(){return a.default}}),Object.defineProperty(r,"v5",{enumerable:true,get:function(){return s.default}}),Object.defineProperty(r,"NIL",{enumerable:true,get:function(){return o.default}}),Object.defineProperty(r,"version",{enumerable:true,get:function(){return l.default}}),Object.defineProperty(r,"validate",{enumerable:true,get:function(){return f.default}}),Object.defineProperty(r,"stringify",{enumerable:true,get:function(){return u.default}}),Object.defineProperty(r,"parse",{enumerable:true,get:function(){return c.default}});var n=d(e("./v1.js")),i=d(e("./v3.js")),a=d(e("./v4.js")),s=d(e("./v5.js")),o=d(e("./nil.js")),l=d(e("./version.js")),f=d(e("./validate.js")),u=d(e("./stringify.js")),c=d(e("./parse.js"));function d(p){return p&&p.__esModule?p:{default:p}}},{"./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(c){return 14+(c+64>>>9<<4)+1}function i(c,d){let p=(65535&c)+(65535&d);return (c>>16)+(d>>16)+(p>>16)<<16|65535&p}function a(c,d,p,h,m,g){return i((v=i(i(d,c),i(h,g)))<<(w=m)|v>>>32-w,p);var v,w;}function s(c,d,p,h,m,g,v){return a(d&p|~d&h,c,d,m,g,v)}function o(c,d,p,h,m,g,v){return a(d&h|p&~h,c,d,m,g,v)}function l(c,d,p,h,m,g,v){return a(d^p^h,c,d,m,g,v)}function f(c,d,p,h,m,g,v){return a(p^(d|~h),c,d,m,g,v)}Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var u=function(c){if(typeof c=="string"){let d=unescape(encodeURIComponent(c));c=new Uint8Array(d.length);for(let p=0;p<d.length;++p)c[p]=d.charCodeAt(p);}return (function(d){let p=[],h=32*d.length;for(let m=0;m<h;m+=8){let g=d[m>>5]>>>m%32&255,v=parseInt("0123456789abcdef".charAt(g>>>4&15)+"0123456789abcdef".charAt(15&g),16);p.push(v);}return p})((function(d,p){d[p>>5]|=128<<p%32,d[n(p)-1]=p;let h=1732584193,m=-271733879,g=-1732584194,v=271733878;for(let w=0;w<d.length;w+=16){let C=h,T=m,I=g,k=v;h=s(h,m,g,v,d[w],7,-680876936),v=s(v,h,m,g,d[w+1],12,-389564586),g=s(g,v,h,m,d[w+2],17,606105819),m=s(m,g,v,h,d[w+3],22,-1044525330),h=s(h,m,g,v,d[w+4],7,-176418897),v=s(v,h,m,g,d[w+5],12,1200080426),g=s(g,v,h,m,d[w+6],17,-1473231341),m=s(m,g,v,h,d[w+7],22,-45705983),h=s(h,m,g,v,d[w+8],7,1770035416),v=s(v,h,m,g,d[w+9],12,-1958414417),g=s(g,v,h,m,d[w+10],17,-42063),m=s(m,g,v,h,d[w+11],22,-1990404162),h=s(h,m,g,v,d[w+12],7,1804603682),v=s(v,h,m,g,d[w+13],12,-40341101),g=s(g,v,h,m,d[w+14],17,-1502002290),m=s(m,g,v,h,d[w+15],22,1236535329),h=o(h,m,g,v,d[w+1],5,-165796510),v=o(v,h,m,g,d[w+6],9,-1069501632),g=o(g,v,h,m,d[w+11],14,643717713),m=o(m,g,v,h,d[w],20,-373897302),h=o(h,m,g,v,d[w+5],5,-701558691),v=o(v,h,m,g,d[w+10],9,38016083),g=o(g,v,h,m,d[w+15],14,-660478335),m=o(m,g,v,h,d[w+4],20,-405537848),h=o(h,m,g,v,d[w+9],5,568446438),v=o(v,h,m,g,d[w+14],9,-1019803690),g=o(g,v,h,m,d[w+3],14,-187363961),m=o(m,g,v,h,d[w+8],20,1163531501),h=o(h,m,g,v,d[w+13],5,-1444681467),v=o(v,h,m,g,d[w+2],9,-51403784),g=o(g,v,h,m,d[w+7],14,1735328473),m=o(m,g,v,h,d[w+12],20,-1926607734),h=l(h,m,g,v,d[w+5],4,-378558),v=l(v,h,m,g,d[w+8],11,-2022574463),g=l(g,v,h,m,d[w+11],16,1839030562),m=l(m,g,v,h,d[w+14],23,-35309556),h=l(h,m,g,v,d[w+1],4,-1530992060),v=l(v,h,m,g,d[w+4],11,1272893353),g=l(g,v,h,m,d[w+7],16,-155497632),m=l(m,g,v,h,d[w+10],23,-1094730640),h=l(h,m,g,v,d[w+13],4,681279174),v=l(v,h,m,g,d[w],11,-358537222),g=l(g,v,h,m,d[w+3],16,-722521979),m=l(m,g,v,h,d[w+6],23,76029189),h=l(h,m,g,v,d[w+9],4,-640364487),v=l(v,h,m,g,d[w+12],11,-421815835),g=l(g,v,h,m,d[w+15],16,530742520),m=l(m,g,v,h,d[w+2],23,-995338651),h=f(h,m,g,v,d[w],6,-198630844),v=f(v,h,m,g,d[w+7],10,1126891415),g=f(g,v,h,m,d[w+14],15,-1416354905),m=f(m,g,v,h,d[w+5],21,-57434055),h=f(h,m,g,v,d[w+12],6,1700485571),v=f(v,h,m,g,d[w+3],10,-1894986606),g=f(g,v,h,m,d[w+10],15,-1051523),m=f(m,g,v,h,d[w+1],21,-2054922799),h=f(h,m,g,v,d[w+8],6,1873313359),v=f(v,h,m,g,d[w+15],10,-30611744),g=f(g,v,h,m,d[w+6],15,-1560198380),m=f(m,g,v,h,d[w+13],21,1309151649),h=f(h,m,g,v,d[w+4],6,-145523070),v=f(v,h,m,g,d[w+11],10,-1120210379),g=f(g,v,h,m,d[w+2],15,718787259),m=f(m,g,v,h,d[w+9],21,-343485551),h=i(h,C),m=i(m,T),g=i(g,I),v=i(v,k);}return [h,m,g,v]})((function(d){if(d.length===0)return [];let p=8*d.length,h=new Uint32Array(n(p));for(let m=0;m<p;m+=8)h[m>>5]|=(255&d[m/8])<<m%32;return h})(c),8*c.length))};r.default=u;},{}],530:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0,r.default="00000000-0000-0000-0000-000000000000";},{}],531:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n},a=function(s){if(!(0, i.default)(s))throw TypeError("Invalid UUID");let o,l=new Uint8Array(16);return l[0]=(o=parseInt(s.slice(0,8),16))>>>24,l[1]=o>>>16&255,l[2]=o>>>8&255,l[3]=255&o,l[4]=(o=parseInt(s.slice(9,13),16))>>>8,l[5]=255&o,l[6]=(o=parseInt(s.slice(14,18),16))>>>8,l[7]=255&o,l[8]=(o=parseInt(s.slice(19,23),16))>>>8,l[9]=255&o,l[10]=(o=parseInt(s.slice(24,36),16))/1099511627776&255,l[11]=o/4294967296&255,l[12]=o>>>24&255,l[13]=o>>>16&255,l[14]=o>>>8&255,l[15]=255&o,l};r.default=a;},{"./validate.js":541}],532:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),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:true}),r.default=function(){if(!n&&(n=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)};let i=new Uint8Array(16);},{}],534:[function(e,t,r){function n(s,o,l,f){switch(s){case 0:return o&l^~o&f;case 1:return o^l^f;case 2:return o&l^o&f^l&f;case 3:return o^l^f}}function i(s,o){return s<<o|s>>>32-o}Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var a=function(s){let o=[1518500249,1859775393,2400959708,3395469782],l=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof s=="string"){let d=unescape(encodeURIComponent(s));s=[];for(let p=0;p<d.length;++p)s.push(d.charCodeAt(p));}else Array.isArray(s)||(s=Array.prototype.slice.call(s));s.push(128);let f=s.length/4+2,u=Math.ceil(f/16),c=new Array(u);for(let d=0;d<u;++d){let p=new Uint32Array(16);for(let h=0;h<16;++h)p[h]=s[64*d+4*h]<<24|s[64*d+4*h+1]<<16|s[64*d+4*h+2]<<8|s[64*d+4*h+3];c[d]=p;}c[u-1][14]=8*(s.length-1)/Math.pow(2,32),c[u-1][14]=Math.floor(c[u-1][14]),c[u-1][15]=8*(s.length-1)&4294967295;for(let d=0;d<u;++d){let p=new Uint32Array(80);for(let C=0;C<16;++C)p[C]=c[d][C];for(let C=16;C<80;++C)p[C]=i(p[C-3]^p[C-8]^p[C-14]^p[C-16],1);let h=l[0],m=l[1],g=l[2],v=l[3],w=l[4];for(let C=0;C<80;++C){let T=Math.floor(C/20),I=i(h,5)+n(T,m,g,v)+w+o[T]+p[C]>>>0;w=v,v=g,g=i(m,30)>>>0,m=h,h=I;}l[0]=l[0]+h>>>0,l[1]=l[1]+m>>>0,l[2]=l[2]+g>>>0,l[3]=l[3]+v>>>0,l[4]=l[4]+w>>>0;}return [l[0]>>24&255,l[0]>>16&255,l[0]>>8&255,255&l[0],l[1]>>24&255,l[1]>>16&255,l[1]>>8&255,255&l[1],l[2]>>24&255,l[2]>>16&255,l[2]>>8&255,255&l[2],l[3]>>24&255,l[3]>>16&255,l[3]>>8&255,255&l[3],l[4]>>24&255,l[4]>>16&255,l[4]>>8&255,255&l[4]]};r.default=a;},{}],535:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n};let a=[];for(let o=0;o<256;++o)a.push((o+256).toString(16).substr(1));var s=function(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,f=(a[o[l+0]]+a[o[l+1]]+a[o[l+2]]+a[o[l+3]]+"-"+a[o[l+4]]+a[o[l+5]]+"-"+a[o[l+6]]+a[o[l+7]]+"-"+a[o[l+8]]+a[o[l+9]]+"-"+a[o[l+10]]+a[o[l+11]]+a[o[l+12]]+a[o[l+13]]+a[o[l+14]]+a[o[l+15]]).toLowerCase();if(!(0, i.default)(f))throw TypeError("Stringified UUID is invalid");return f};r.default=s;},{"./validate.js":541}],536:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n=a(e("./rng.js")),i=a(e("./stringify.js"));function a(c){return c&&c.__esModule?c:{default:c}}let s,o,l=0,f=0;var u=function(c,d,p){let h=d&&p||0,m=d||new Array(16),g=(c=c||{}).node||s,v=c.clockseq!==void 0?c.clockseq:o;if(g==null||v==null){let D=c.random||(c.rng||n.default)();g==null&&(g=s=[1|D[0],D[1],D[2],D[3],D[4],D[5]]),v==null&&(v=o=16383&(D[6]<<8|D[7]));}let w=c.msecs!==void 0?c.msecs:Date.now(),C=c.nsecs!==void 0?c.nsecs:f+1,T=w-l+(C-f)/1e4;if(T<0&&c.clockseq===void 0&&(v=v+1&16383),(T<0||w>l)&&c.nsecs===void 0&&(C=0),C>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=w,f=C,o=v,w+=122192928e5;let I=(1e4*(268435455&w)+C)%4294967296;m[h++]=I>>>24&255,m[h++]=I>>>16&255,m[h++]=I>>>8&255,m[h++]=255&I;let k=w/4294967296*1e4&268435455;m[h++]=k>>>8&255,m[h++]=255&k,m[h++]=k>>>24&15|16,m[h++]=k>>>16&255,m[h++]=v>>>8|128,m[h++]=255&v;for(let D=0;D<6;++D)m[h+D]=g[D];return d||(0, i.default)(m)};r.default=u;},{"./rng.js":533,"./stringify.js":535}],537:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n=a(e("./v35.js")),i=a(e("./md5.js"));function a(o){return o&&o.__esModule?o:{default:o}}var s=(0, n.default)("v3",48,i.default);r.default=s;},{"./md5.js":529,"./v35.js":538}],538:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=function(l,f,u){function c(d,p,h,m){if(typeof d=="string"&&(d=(function(v){v=unescape(encodeURIComponent(v));let w=[];for(let C=0;C<v.length;++C)w.push(v.charCodeAt(C));return w})(d)),typeof p=="string"&&(p=(0, i.default)(p)),p.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+d.length);if(g.set(p),g.set(d,p.length),g=u(g),g[6]=15&g[6]|f,g[8]=63&g[8]|128,h){m=m||0;for(let v=0;v<16;++v)h[m+v]=g[v];return h}return (0, n.default)(g)}try{c.name=l;}catch{}return c.DNS=s,c.URL=o,c},r.URL=r.DNS=void 0;var n=a(e("./stringify.js")),i=a(e("./parse.js"));function a(l){return l&&l.__esModule?l:{default:l}}let s="6ba7b810-9dad-11d1-80b4-00c04fd430c8";r.DNS=s;let 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:true}),r.default=void 0;var n=a(e("./rng.js")),i=a(e("./stringify.js"));function a(o){return o&&o.__esModule?o:{default:o}}var s=function(o,l,f){let u=(o=o||{}).random||(o.rng||n.default)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,l){f=f||0;for(let c=0;c<16;++c)l[f+c]=u[c];return l}return (0, i.default)(u)};r.default=s;},{"./rng.js":533,"./stringify.js":535}],540:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n=a(e("./v35.js")),i=a(e("./sha1.js"));function a(o){return o&&o.__esModule?o:{default:o}}var s=(0, n.default)("v5",80,i.default);r.default=s;},{"./sha1.js":534,"./v35.js":538}],541:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n,i=(n=e("./regex.js"))&&n.__esModule?n:{default:n},a=function(s){return typeof s=="string"&&i.default.test(s)};r.default=a;},{"./regex.js":532}],542:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.default=void 0;var n,i=(n=e("./validate.js"))&&n.__esModule?n:{default:n},a=function(s){if(!(0, i.default)(s))throw TypeError("Invalid UUID");return parseInt(s.substr(14,1),16)};r.default=a;},{"./validate.js":541}],543:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.CHAR=`
|
|
35
|
+
\r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}`,r.S=` \r
|
|
36
|
+
`,r.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",r.NAME_CHAR="-"+r.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",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");function n(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}r.S_LIST=[32,10,13,9],r.isChar=function(i){return i>=32&&i<=55295||i===10||i===13||i===9||i>=57344&&i<=65533||i>=65536&&i<=1114111},r.isS=function(i){return i===32||i===10||i===13||i===9},r.isNameStartChar=n,r.isNameChar=function(i){return n(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256};},{}],544:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:true}),r.CHAR="-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}",r.RESTRICTED_CHAR="-\b\v\f-\x7F-\x84\x86-\x9F",r.S=` \r
|
|
37
|
+
`,r.NAME_START_CHAR=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",r.NAME_CHAR="-"+r.NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",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");function n(i){return i>=65&&i<=90||i>=97&&i<=122||i===58||i===95||i===8204||i===8205||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}r.S_LIST=[32,10,13,9],r.isChar=function(i){return i>=1&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},r.isRestrictedChar=function(i){return i>=1&&i<=8||i===11||i===12||i>=14&&i<=31||i>=127&&i<=132||i>=134&&i<=159},r.isCharAndNotRestricted=function(i){return i===9||i===10||i===13||i>31&&i<127||i===133||i>159&&i<=55295||i>=57344&&i<=65533||i>=65536&&i<=1114111},r.isS=function(i){return i===32||i===10||i===13||i===9},r.isNameStartChar=n,r.isNameChar=function(i){return n(i)||i>=48&&i<=57||i===45||i===46||i===183||i>=768&&i<=879||i>=8255&&i<=8256};},{}],545:[function(e,t,r){function n(i){return i>=65&&i<=90||i===95||i>=97&&i<=122||i>=192&&i<=214||i>=216&&i<=246||i>=248&&i<=767||i>=880&&i<=893||i>=895&&i<=8191||i>=8204&&i<=8205||i>=8304&&i<=8591||i>=11264&&i<=12271||i>=12289&&i<=55295||i>=63744&&i<=64975||i>=65008&&i<=65533||i>=65536&&i<=983039}Object.defineProperty(r,"__esModule",{value:true}),r.NC_NAME_START_CHAR="A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",r.NC_NAME_CHAR="-"+r.NC_NAME_START_CHAR+".0-9\xB7\u0300-\u036F\u203F-\u2040",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(i){return n(i)||i===45||i===46||i>=48&&i<=57||i===183||i>=768&&i<=879||i>=8255&&i<=8256};},{}]},{},[15])(15)}));});var Pn=Ke(ht()),V3=Ke(Pv());function kl(e){return !!e&&typeof e.getRowCount=="function"&&typeof e.getRows=="function"}function qa(e,t,r){let n=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow),a=Math.min(e.startCol,e.endCol),s=Math.max(e.startCol,e.endCol);return t>=n&&t<=i&&r>=a&&r<=s}function tn(e){return {startRow:Math.min(e.startRow,e.endRow),endRow:Math.max(e.startRow,e.endRow),startCol:Math.min(e.startCol,e.endCol),endCol:Math.max(e.startCol,e.endCol)}}function cr(e,t){return t.valueGetter?t.valueGetter(e):e[t.columnId]}function is(e,t){return e.editable===true||typeof e.editable=="function"&&e.editable(t)}function qv(e,t){return {getCellValue:(r,n)=>n<0||n>=e.length||r<0||r>=t.length?null:cr(e[n],t[r]),getRowCount:()=>e.length,getColumnCount:()=>t.length}}function Al(e){return "children"in e&&Array.isArray(e.children)}function as(e){let t=[];for(let r of e)Al(r)?t.push(...as(r.children)):t.push(r);return t}function lp(e,t){function r(f,u){let c=u;for(let d of f)Al(d)&&(c=Math.max(c,r(d.children,u+1)));return c}let n=r(e,0);if(n===0){let f=[];for(let u of e)if(!Al(u)){if(t&&!t.has(u.columnId))continue;f.push({label:u.name,colSpan:1,isGroup:false,columnDef:u,depth:0});}return [f]}let i=n+1,a=Array.from({length:i},()=>[]),s=new Map;function o(f){let u=s.get(f);if(u!==void 0)return u;let c=0;for(let d of f)Al(d)?c+=o(d.children):(!t||t.has(d.columnId))&&c++;return s.set(f,c),c}function l(f,u){for(let c of f)if(Al(c)){let d=o(c.children);if(d===0)continue;a[u].push({label:c.headerName,colSpan:d,isGroup:true,depth:u}),l(c.children,u+1);}else {if(t&&!t.has(c.columnId))continue;a[u].push({label:c.name,colSpan:1,isGroup:false,columnDef:c,depth:u});}}return l(e,0),a.filter(f=>f.length>0)}function Sc(e){return e!=null&&typeof e=="object"&&"type"in e}function Ol(e){return (Sc(e.filterable)?e.filterable:null)?.filterField??e.columnId}function up(e,t,r){if(r===void 0||r.type==="text"&&r.value.trim()===""||r.type==="multiSelect"&&r.value.length===0||r.type==="date"&&!r.value.from&&!r.value.to||r.type==="people"&&!r.value){let{[t]:n,...i}=e;return i}return {...e,[t]:r}}function cp(e,t){let r=[];for(let a=0;a<t.length;a++){let s=t[a];(Sc(s.filterable)?s.filterable:null)?.type==="multiSelect"&&r.push({col:s,field:Ol(s)});}if(r.length===0)return {};let n=new Map;for(let a=0;a<r.length;a++)n.set(r[a].field,new Set);for(let a=0;a<e.length;a++){let s=e[a];for(let o=0;o<r.length;o++){let l=cr(s,r[o].col),f=n.get(r[o].field);l!=null&&l!==""&&f&&f.add(String(l));}}let i={};for(let a=0;a<r.length;a++){let s=n.get(r[a].field);i[r[a].field]=s?Array.from(s).sort():[];}return i}function fp(e){let t=[];for(let r of e)(Sc(r.filterable)?r.filterable:null)?.type==="multiSelect"&&t.push(Ol(r));return t}function dp(e){let{totalCount:t,filteredCount:r,selectedCount:n,selectedCellCount:i,aggregation:a,suppressRowCount:s}=e,o=[];return s||o.push({key:"total",label:"Rows:",value:t}),r!==void 0&&r!==t&&o.push({key:"filtered",label:"Filtered:",value:r}),n!==void 0&&n>0&&o.push({key:"selected",label:"Selected:",value:n}),i!==void 0&&i>1&&o.push({key:"cells",label:"Cells:",value:i}),a&&(o.push({key:"sum",label:"Sum:",value:a.sum}),o.push({key:"avg",label:"Avg:",value:Math.round(a.avg*100)/100}),o.push({key:"min",label:"Min:",value:a.min}),o.push({key:"max",label:"Max:",value:a.max}),o.push({key:"count",label:"Count:",value:a.count})),o}function hp(e,t,r,n){return e?typeof e=="object"?e:{totalCount:t,selectedCount:r>0?r:void 0,filteredCount:void 0}:null}var Wv=[10,25,50,100];function Y6(e,t){return t.includes(e)?t:[...t,e].sort((r,n)=>r-n)}var $v=5;function pp(e,t,r,n){if(r<=0)return null;let i=n?.maxPageButtons??$v,a=Math.ceil(r/t),s,o,l;if(a<=i){s=[];for(let c=1;c<=a;c++)s.push(c);o=false,l=false;}else {let c=Math.max(1,e-2),d=Math.min(a,e+2);d-c+1<i&&(c===1?d=Math.min(a,c+i-1):d===a&&(c=Math.max(1,d-i+1))),s=[];for(let p=c;p<=d;p++)s.push(p);o=c>1,l=d<a;}let f=Math.max(1,(e-1)*t+1),u=Math.min(e*t,r);return {totalPages:a,pageNumbers:s,showStartEllipsis:o,showEndEllipsis:l,startItem:f,endItem:u,pageSizeOptions:Y6(t,n?.pageSizeOptions??Wv)}}var Cc=[{id:"undo",label:"Undo",shortcut:"Ctrl+Z"},{id:"redo",label:"Redo",shortcut:"Ctrl+Y"},{id:"copy",label:"Copy",shortcut:"Ctrl+C",disabledWhenNoSelection:true,dividerBefore:true},{id:"cut",label:"Cut",shortcut:"Ctrl+X",disabledWhenNoSelection:true},{id:"paste",label:"Paste",shortcut:"Ctrl+V"},{id:"selectAll",label:"Select all",shortcut:"Ctrl+A",dividerBefore:true}];function mp(e){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent)?e.replace("Ctrl","\u2318"):e}function gp(e){let{onCopy:t,onCut:r,onPaste:n,onSelectAll:i,onUndo:a,onRedo:s,onClose:o}=e;return {undo:()=>{a(),o();},redo:()=>{s(),o();},copy:()=>{t(),o();},cut:()=>{r(),o();},paste:()=>{n(),o();},selectAll:()=>{i(),o();}}}function bp(e){let{canPinLeft:t,canPinRight:r,canUnpin:n,currentSort:i,isSortable:a=true,isResizable:s=true}=e,o=[];if(o.push({id:"pinLeft",label:"Pin left",disabled:!t},{id:"pinRight",label:"Pin right",disabled:!r},{id:"unpin",label:"Unpin",disabled:!n,divider:a||s}),a)if(!i)o.push({id:"sortAsc",label:"Sort ascending"},{id:"sortDesc",label:"Sort descending",divider:s});else {let l=i==="asc"?"desc":"asc",f=i==="asc"?"Sort descending":"Sort ascending";o.push({id:`sort${l==="asc"?"Asc":"Desc"}`,label:f},{id:"clearSort",label:"Clear sort",divider:s});}return s&&o.push({id:"autosizeThis",label:"Autosize this column"},{id:"autosizeAll",label:"Autosize all columns"}),o}function Wa(e,t,r,n){if(n.valueParser){let a={newValue:e,oldValue:t,data:r,column:n},s=n.valueParser(a);return s===void 0?{valid:false,value:void 0}:{valid:true,value:s}}if(n.cellEditor==="select"&&n.cellEditorParams?.values!=null&&Array.isArray(n.cellEditorParams.values)){let a=n.cellEditorParams.values,s=typeof e=="string"?e:String(e??"");if(s==="")return {valid:true,value:""};let o=a.find(l=>String(l).toLowerCase()===s.toLowerCase());return o!==void 0?{valid:true,value:o}:{valid:false,value:void 0}}let i=n.type;if(i==="date"){let a=Yv({newValue:e});return a===void 0?{valid:false,value:void 0}:{valid:true,value:a}}if(i==="boolean"){let a=Kv({newValue:e});return a===void 0?{valid:false,value:void 0}:{valid:true,value:a}}if(i==="numeric"){let a=Xv({newValue:e});return a===void 0?{valid:false,value:void 0}:{valid:true,value:a}}return {valid:true,value:e}}function Xv(e){let{newValue:t}=e;if(t===""||t==null)return null;let r=String(t).replace(/[\s,]/g,""),n=Number(r);return Number.isNaN(n)?void 0:n}function Yv(e){let{newValue:t}=e;if(t===""||t==null)return null;let r=String(t).trim(),n=new Date(r);if(!Number.isNaN(n.getTime()))return n.toISOString().substring(0,10)}function Kv(e){let{newValue:t}=e;if(t===""||t==null)return null;let r=String(t).trim().toLowerCase();if(["true","yes","1"].includes(r))return true;if(["false","no","0"].includes(r))return false}function vp(e,t,r){if(!r)return null;let n=tn(r),i=0,a=0,s=1/0,o=-1/0,l=0;for(let f=n.startRow;f<=n.endRow;f++)for(let u=n.startCol;u<=n.endCol;u++){if(f>=e.length||u>=t.length)continue;i++;let c=e[f],d=t[u],p=cr(c,d),h=typeof p=="number"?p:Number(p);!isNaN(h)&&isFinite(h)&&(a+=h,h<s&&(s=h),h>o&&(o=h),l++);}return i<2||l===0?null:{sum:a,avg:a/l,min:s,max:o,count:l}}var Uv=new WeakMap;function ns(e,t,r,n,i){let a=Uv.get(t);if(!a){a=new Map;for(let f=0;f<t.length;f++)a.set(t[f].columnId,t[f]);Uv.set(t,a);}let s=[];for(let f=0;f<t.length;f++){let u=t[f],c=Ol(u),d=r[c];if(d)switch(d.type){case "multiSelect":if(d.value.length>0){let p=new Set(d.value),h=new Map;for(let m=0;m<e.length;m++)h.set(e[m],String(cr(e[m],u)));s.push(m=>p.has(h.get(m)??""));}break;case "text":{let p=d.value.trim();if(p){let h=p.toLowerCase(),m=new Map;for(let g=0;g<e.length;g++)m.set(e[g],String(cr(e[g],u)??"").toLowerCase());s.push(g=>(m.get(g)??"").includes(h));}break}case "people":{let p=d.value.email.toLowerCase(),h=new Map;for(let m=0;m<e.length;m++)h.set(e[m],String(cr(e[m],u)??"").toLowerCase());s.push(m=>(h.get(m)??"")===p);break}case "date":{let p=d.value,h=p.from?new Date(p.from+"T00:00:00").getTime():NaN,m=p.to?new Date(p.to+"T23:59:59.999").getTime():NaN,g=new Map;for(let v=0;v<e.length;v++){let w=cr(e[v],u);if(w==null)g.set(e[v],NaN);else {let C=new Date(String(w)).getTime();g.set(e[v],Number.isNaN(C)?NaN:C);}}s.push(v=>{let w=g.get(v)??NaN;return !(Number.isNaN(w)||!Number.isNaN(h)&&w<h||!Number.isNaN(m)&&w>m)});break}}}let o=s.length>0,l=o?e.filter(f=>{for(let u=0;u<s.length;u++)if(!s[u](f))return false;return true}):e;if(n){let f=o?l:l.slice(),u=a.get(n),c=u?.compare,d=i==="asc"?1:-1;if(u?.type==="date"&&!c){let p=new Map;for(let h=0;h<f.length;h++){let m=f[h],g=u?cr(m,u):m[n];if(g==null)p.set(m,NaN);else {let v=new Date(String(g)).getTime();p.set(m,Number.isNaN(v)?0:v);}}f.sort((h,m)=>{let g=p.get(h)??NaN,v=p.get(m)??NaN;return Number.isNaN(g)&&Number.isNaN(v)?0:Number.isNaN(g)?-1*d:Number.isNaN(v)?1*d:g===v?0:g>v?d:-d});}else if(c)f.sort((p,h)=>c(p,h)*d);else {let p=new Map;for(let h=0;h<f.length;h++){let m=f[h],g=u?cr(m,u):m[n];g==null?p.set(m,void 0):typeof g=="number"?p.set(m,g):p.set(m,String(g).toLowerCase());}f.sort((h,m)=>{let g=p.get(h),v=p.get(m);return g===void 0&&v===void 0?0:g===void 0?-1*d:v===void 0?1*d:g===v?0:g>v?d:-d});}return f}return l}function Ga(e,t){if(!e)return false;let r=Math.min(e.startRow,e.endRow),n=Math.max(e.startRow,e.endRow);return t>=r&&t<=n}function yp(e,t){if(e.item!==t.item||e.isSelected!==t.isSelected||e.hasCheckboxCol!==t.hasCheckboxCol||e.visibleCols!==t.visibleCols||e.columnMeta!==t.columnMeta||e.cellClassMap!==t.cellClassMap||e.columnLayouts!==t.columnLayouts)return false;let r=e.rowIndex;if(e.editingRowId!==t.editingRowId&&(e.editingRowId===e.rowId||t.editingRowId===t.rowId))return false;let n=e.activeCell?.rowIndex===r,i=t.activeCell?.rowIndex===r;if(n!==i||n&&i&&e.activeCell?.columnIndex!==t.activeCell?.columnIndex)return false;let a=Ga(e.selectionRange,r),s=Ga(t.selectionRange,r);if(a!==s||a&&s&&(e.selectionRange?.startCol!==t.selectionRange?.startCol||e.selectionRange?.endCol!==t.selectionRange?.endCol))return false;let o=e.selectionRange?.endRow===r,l=t.selectionRange?.endRow===r;return !(o!==l||(o||l)&&e.isDragging!==t.isDragging||e.cutRange!==t.cutRange&&(Ga(e.cutRange,r)||Ga(t.cutRange,r))||e.copyRange!==t.copyRange&&(Ga(e.copyRange,r)||Ga(t.copyRange,r)))}function wp(e,t){return t?t.left?.includes(e)?"left":t.right?.includes(e)?"right":"unpinned":"unpinned"}function Zv(e,t,r){let n=e.filter(s=>s!==t),i=Math.max(0,Math.min(r,n.length)),a=[...n];return a.splice(i,0,t),a}function Qv(e){let{mouseX:t,columnOrder:r,draggedColumnId:n,draggedPinState:i,tableElement:a,pinnedColumns:s}=e,o=a.querySelectorAll("[data-column-id]");if(o.length===0)return null;let l=[];if(o.forEach(d=>{let p=d.getAttribute("data-column-id");if(!p||wp(p,s)!==i)return;let h=d.getBoundingClientRect(),m=r.indexOf(p);m!==-1&&l.push({columnId:p,left:h.left,right:h.right,midX:h.left+h.width/2,orderIndex:m});}),l.length===0)return null;l.sort((d,p)=>d.left-p.left);let f,u;if(t<=l[0].midX)f=l[0].orderIndex,u=l[0].left;else if(t>=l[l.length-1].midX){let d=l[l.length-1];f=d.orderIndex+1,u=d.right;}else {let d=-1;for(let p=0;p<l.length-1;p++)if(t>=l[p].midX&&t<l[p+1].midX){d=p;break}if(d===-1)return null;f=l[d].orderIndex+1,u=l[d].right;}let c=r.indexOf(n);return c===f||c+1===f?{targetIndex:f,indicatorX:null}:{targetIndex:f,indicatorX:u}}function Jv(e,t,r,n=2){if(t.length===0||r<=0)return {startIndex:0,endIndex:-1,leftOffset:0,rightOffset:0};let i=0,a=t.length,s=-1;for(let c=0;c<t.length;c++){let d=i;i+=t[c],i>e&&a===t.length&&(a=c),d<e+r&&(s=c);}if(a>s)return {startIndex:0,endIndex:-1,leftOffset:0,rightOffset:0};let o=Math.max(0,a-n),l=Math.min(t.length-1,s+n),f=0;for(let c=0;c<o;c++)f+=t[c];let u=0;for(let c=l+1;c<t.length;c++)u+=t[c];return {startIndex:o,endIndex:l,leftOffset:f,rightOffset:u}}function _p(e,t,r){let n=[],i=[],a=[];for(let o of e){let l=r?.[o.columnId];l==="left"?n.push(o):l==="right"?i.push(o):a.push(o);}if(!t||t.endIndex<0)return {pinnedLeft:n,virtualizedUnpinned:a,pinnedRight:i,leftSpacerWidth:0,rightSpacerWidth:0};let s=a.slice(t.startIndex,t.endIndex+1);return {pinnedLeft:n,virtualizedUnpinned:s,pinnedRight:i,leftSpacerWidth:t.leftOffset,rightSpacerWidth:t.rightOffset}}function ey(e,t,r,n="start"){let i=e*t;switch(n){case "start":return i;case "center":return Math.max(0,i-(r-t)/2);case "end":return Math.max(0,i-r+t)}}var K6=32e6;function ty(e){let t=e.maxSpacerPx??K6,r=Math.max(0,e.totalRows)*Math.max(0,e.rowHeight);return r<=t?{realHeight:r,spacerHeight:r,scaled:false,scale:1}:{realHeight:r,spacerHeight:t,scaled:true,scale:r/t}}function ry(e,t,r,n=8){let{rowHeight:i,totalRows:a,viewportHeight:s}=r;if(a<=0||i<=0)return {startIndex:0,endIndex:-1,offsetPx:0,realScrollTop:0};let o=Math.max(1,t.spacerHeight-s),l=Math.min(1,Math.max(0,e/o)),f=Math.max(0,t.realHeight-s),u=t.scaled?l*f:e,c=Math.floor(u/i),d=Math.ceil(s/i),p=Math.max(0,c-n),h=Math.min(a-1,c+d+n),m=p*i/t.scale;return {startIndex:p,endIndex:h,offsetPx:m,realScrollTop:u}}function ny(e,t,r){let n=Math.max(0,e)*r.rowHeight,i=Math.max(0,t.spacerHeight-r.viewportHeight);if(!t.scaled)return Math.min(n,i);let a=Math.max(1,t.realHeight-r.viewportHeight);return Math.min(1,n/a)*i}function Rl(e,t){return Math.floor(e/t)*t}var xp=class{constructor(e){this.rows=new Map,this.inFlight=new Map,this.failedBlocks=new Set,this.context={filters:{}},this.generation=0,this.lastRequestCenter=0,this.dataSource=e.dataSource,this.blockSize=Math.max(1,e.blockSize??200),this.maxCachedRows=Math.max(0,e.maxCachedRows??5e3),this.onChange=e.onChange;}getRowCount(){return this.rowCount}getRow(e){let t=this.rows.get(e);if(t!==void 0)return {status:"loaded",row:t};let r=Rl(e,this.blockSize);return this.failedBlocks.has(r)?{status:"error",error:new Error(`Failed to load rows [${r}, ${r+this.blockSize})`)}:{status:"loading"}}hasRow(e){return this.rows.has(e)}setContext(e){this.context={sort:e.sort,filters:e.filters},this.invalidate(),this.refreshRowCount();}invalidate(){this.generation++;for(let e of this.inFlight.values())e.abort();this.inFlight.clear(),this.rows.clear(),this.failedBlocks.clear(),this.notify();}ensureRange(e,t){if(t<=e)return;this.lastRequestCenter=Math.floor((e+t)/2);let r=this.rowCount,n=r!==void 0?Math.min(t,r):t;if(n<=e)return;let i=Rl(Math.max(0,e),this.blockSize),a=Rl(n-1,this.blockSize);for(let s=i;s<=a;s+=this.blockSize)this.ensureBlock(s);this.evictIfNeeded();}retry(e){let t=Rl(e,this.blockSize);this.failedBlocks.has(t)&&(this.failedBlocks.delete(t),this.ensureBlock(t));}dispose(){this.generation++;for(let e of this.inFlight.values())e.abort();this.inFlight.clear(),this.rows.clear(),this.failedBlocks.clear();}ensureBlock(e){if(this.inFlight.has(e)||this.failedBlocks.has(e))return;let t=true,r=e+this.blockSize;for(let a=e;a<r&&!(this.rowCount!==void 0&&a>=this.rowCount);a++)if(!this.rows.has(a)){t=false;break}if(t)return;let n=this.generation,i=new AbortController;this.inFlight.set(e,i),this.dataSource.getRows({start:e,end:r,sort:this.context.sort,filters:this.context.filters,signal:i.signal}).then(a=>{n!==this.generation||i.signal.aborted||(this.inFlight.delete(e),a.items.forEach((s,o)=>{this.rows.set(e+o,s);}),a.totalCount!==void 0&&(this.rowCount=a.totalCount),this.evictIfNeeded(),this.notify());}).catch(a=>{n!==this.generation||i.signal.aborted||(this.inFlight.delete(e),this.failedBlocks.add(e),this.notify());});}async refreshRowCount(){let e=this.generation,t=new AbortController;try{let r=await this.dataSource.getRowCount({sort:this.context.sort,filters:this.context.filters,signal:t.signal});if(e!==this.generation)return;this.rowCount=r,this.notify();}catch{if(e!==this.generation)return}}evictIfNeeded(){if(this.maxCachedRows===0||this.rows.size<=this.maxCachedRows)return;let e=new Set;for(let r of this.rows.keys())e.add(Rl(r,this.blockSize));let t=[...e].sort((r,n)=>Math.abs(n-this.lastRequestCenter)-Math.abs(r-this.lastRequestCenter));for(let r of t){if(this.rows.size<=this.maxCachedRows)break;if(!this.inFlight.has(r))for(let n=r;n<r+this.blockSize;n++)this.rows.delete(n);}}notify(){this.onChange?.();}};function Z6(){let e=self;e.onmessage=t=>{let r=t.data;if(r.type!=="sort-filter")return;let{requestId:n,values:i,filters:a,sort:s}=r,o=i.length,l=[],f=Object.entries(a);if(f.length===0){l=new Array(o);for(let c=0;c<o;c++)l[c]=c;}else {let c=f.map(([d,p])=>{let h=Number(d);return p.type==="text"?{colIdx:h,type:"text",trimmed:p.value.trim().toLowerCase()}:p.type==="multiSelect"?{colIdx:h,type:"multiSelect",set:new Set(p.value),empty:p.value.length===0}:{colIdx:h,type:"date",from:p.value.from,to:p.value.to}});for(let d=0;d<o;d++){let p=true;for(let h=0;h<c.length;h++){let m=c[h],g=i[d][m.colIdx];switch(m.type){case "text":{m.trimmed&&!String(g??"").toLowerCase().includes(m.trimmed)&&(p=false);break}case "multiSelect":{!m.empty&&!m.set.has(String(g??""))&&(p=false);break}case "date":{if(g==null){p=false;break}let v=new Date(String(g)).getTime();if(Number.isNaN(v)){p=false;break}if(m.from){let w=new Date(m.from+"T00:00:00").getTime();if(v<w){p=false;break}}if(m.to){let w=new Date(m.to+"T23:59:59.999").getTime();if(v>w){p=false;break}}break}}if(!p)break}p&&l.push(d);}}if(s){let{columnIndex:c,direction:d}=s,p=d==="asc"?1:-1;l.sort((h,m)=>{let g=i[h][c],v=i[m][c];if(g==null&&v==null)return 0;if(g==null)return -1*p;if(v==null)return 1*p;if(typeof g=="number"&&typeof v=="number")return g===v?0:g>v?p:-p;let w=String(g).toLowerCase(),C=String(v).toLowerCase();return w===C?0:w>C?p:-p});}let u={type:"sort-filter-result",requestId:n,indices:l};e.postMessage(u);};}var rs=null,Q6=0,Tl=new Map;function J6(){if(rs)return rs;if(typeof Worker>"u"||typeof Blob>"u"||typeof URL>"u")return null;try{let e=Z6.toString(),t=new Blob([`(${e})()`],{type:"application/javascript"}),r=URL.createObjectURL(t);return rs=new Worker(r),URL.revokeObjectURL(r),rs.onmessage=n=>{let{requestId:i,indices:a}=n.data,s=Tl.get(i);s&&(Tl.delete(i),s.resolve(a));},rs.onerror=n=>{for(let[i,a]of Tl)a.reject(new Error(n.message||"Worker error")),Tl.delete(i);},rs}catch{return null}}function e5(e,t){let r=new Array(e.length);for(let n=0;n<e.length;n++){let i=new Array(t.length);for(let a=0;a<t.length;a++){let s=cr(e[n],t[a]);s==null?i[a]=null:typeof s=="string"||typeof s=="number"||typeof s=="boolean"?i[a]=s:i[a]=String(s);}r[n]=i;}return r}function iy(e,t,r,n,i){if(n&&t.find(d=>d.columnId===n)?.compare)return Promise.resolve(ns(e,t,r,n,i));let a=J6();if(!a)return Promise.resolve(ns(e,t,r,n,i));let s=new Map;for(let d=0;d<t.length;d++)s.set(t[d].columnId,d);let o=e5(e,t),l=t.map((d,p)=>({type:d.type??"text",index:p})),f={};for(let d of t){let p=Ol(d),h=r[p];if(!h)continue;let m=s.get(d.columnId);if(m!==void 0)switch(h.type){case "text":f[m]={type:"text",value:h.value};break;case "multiSelect":f[m]={type:"multiSelect",value:h.value};break;case "date":f[m]={type:"date",value:{from:h.value.from,to:h.value.to}};break;case "people":return Promise.resolve(ns(e,t,r,n,i))}}let u;if(n){let d=s.get(n);d!==void 0&&(u={columnIndex:d,direction:i??"asc"});}let c=++Q6;return new Promise((d,p)=>{Tl.set(c,{resolve:m=>{let g=new Array(m.length);for(let v=0;v<m.length;v++)g[v]=e[m[v]];d(g);},reject:p});let h={type:"sort-filter",requestId:c,values:o,columnMeta:l,filters:f,sort:u};a.postMessage(h);})}function ay(e,t,r){return !(!(e===true||e==="auto"&&t>5e3)||r?.filters&&Object.values(r.filters).some(n=>n?.type==="people")||r?.sortBy&&r.columns&&r.columns.find(n=>n.columnId===r.sortBy)?.compare)}var Ec="YYYY-MM-DD";function Sp(e,t,r="UTC"){if(e==null)return null;let n=e instanceof Date?e:new Date(String(e));if(Number.isNaN(n.getTime()))return null;let i,a,s;if(r==="UTC")i=n.getUTCFullYear(),a=n.getUTCMonth()+1,s=n.getUTCDate();else {let u=new Intl.DateTimeFormat("en-CA",{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(n);i=parseInt(u.find(c=>c.type==="year")?.value??"0",10),a=parseInt(u.find(c=>c.type==="month")?.value??"0",10),s=parseInt(u.find(c=>c.type==="day")?.value??"0",10);}let o=String(i).padStart(4,"0"),l=String(a).padStart(2,"0"),f=String(s).padStart(2,"0");return t.replace("YYYY",o).replace("MM",l).replace("DD",f)}function oy(e,t){if(!e||!e.trim())return null;let r=e.trim().split(/[/\-.\s]+/).filter(Boolean);if(r.length===0)return null;let n=new Date().getUTCFullYear(),i=t5(t),a,s,o;if(r.length===3){let[f,u,c]=r.map(Number);i==="YMD"?(a=f,s=u,o=c):i==="DMY"?(o=f,s=u,a=c):(s=f,o=u,a=c),a!==void 0&&a<100&&(a=a<50?2e3+a:1900+a);}else if(r.length===2){let[f,u]=r.map(Number);i==="DMY"?(o=f,s=u):(s=f,o=u),a=n;}else if(r.length===1){let f=r[0];if(/^\d+$/.test(f))if(f.length===8)a=parseInt(f.slice(0,4),10),s=parseInt(f.slice(4,6),10),o=parseInt(f.slice(6,8),10);else if(f.length===4)s=parseInt(f.slice(0,2),10),o=parseInt(f.slice(2,4),10),a=n;else return null;else return null}else return null;if(!r5(a,s,o))return null;let l=new Date(Date.UTC(a,s-1,o));return l.getUTCFullYear()!==a||l.getUTCMonth()+1!==s||l.getUTCDate()!==o?null:l}function t5(e){let t=e.indexOf("Y"),r=e.indexOf("M"),n=e.indexOf("D");return t===-1||r===-1||n===-1?"MDY":t<r&&r<n?"YMD":n<r&&r<t?"DMY":"MDY"}function r5(e,t,r){return !(e==null||t==null||r==null||!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(r)||t<1||t>12||r<1||r>31)}var sy=class{constructor(e,t){this.type=e,this.message=t;}toString(){return this.type}};function Cp(e,t){let r=Sc(e.filterable)?e.filterable:null,n=r?.type??"none",i=r?.filterField??e.columnId,a=e.sortable!==false,s=t.filters[i],o={columnKey:e.columnId,columnName:e.name,filterType:n,isSorted:t.sortBy===e.columnId,isSortedDescending:t.sortBy===e.columnId&&t.sortDirection==="desc",onSort:a?()=>t.onColumnSort(e.columnId):void 0};return n==="text"?{...o,textValue:s?.type==="text"?s.value:"",onTextChange:l=>t.onFilterChange(i,l.trim()?{type:"text",value:l}:void 0)}:n==="people"?{...o,selectedUser:s?.type==="people"?s.value:void 0,onUserChange:l=>t.onFilterChange(i,l?{type:"people",value:l}:void 0),peopleSearch:t.peopleSearch}:n==="multiSelect"?{...o,options:t.filterOptions[i]??[],isLoadingOptions:t.loadingFilterOptions[i]??false,selectedValues:s?.type==="multiSelect"?s.value:[],onFilterChange:l=>t.onFilterChange(i,l.length?{type:"multiSelect",value:l}:void 0)}:n==="date"?{...o,dateValue:s?.type==="date"?s.value:void 0,onDateChange:l=>t.onFilterChange(i,l?{type:"date",value:l}:void 0)}:o}function Hv(e){return e!=null&&typeof e!="string"}var op=class sp{constructor(){this.cache=new Map,this.lastVersion="";}static computeVersion(t){let r=t.editingCell,n=t.activeCell,i=t.selectionRange,a=t.cutRange,s=t.copyRange;return (r?`${String(r.rowId)}\0${r.columnId}`:"")+""+(n?`${n.rowIndex}\0${n.columnIndex}`:"")+""+(i?`${i.startRow}\0${i.startCol}\0${i.endRow}\0${i.endCol}`:"")+""+(a?`${a.startRow}\0${a.startCol}\0${a.endRow}\0${a.endCol}`:"")+""+(s?`${s.startRow}\0${s.startCol}\0${s.endRow}\0${s.endCol}`:"")+""+(t.isDragging?"1":"0")+""+(t.editable!==false?"1":"0")+""+(t.onCellValueChanged?"1":"0")+""+(t.formulaVersion??0)}get(t,r,n,i){let a=t*sp.MAX_COL_STRIDE+r,s=this.cache.get(a);if(s!==void 0&&s.version===n)return s.descriptor;let o=i();return this.cache.size>=sp.MAX_ENTRIES&&this.cache.clear(),this.cache.set(a,{version:n,descriptor:o}),o}updateVersion(t){this.lastVersion=t;}get currentVersion(){return this.lastVersion}clear(){this.cache.clear();}};op.MAX_COL_STRIDE=1024,op.MAX_ENTRIES=1e5;var Rc=op;function Ep(e,t,r,n,i,a){return a!==void 0?a.get(r,n,a.currentVersion,()=>Vv(e,t,r,n,i)):Vv(e,t,r,n,i)}function Vv(e,t,r,n,i){let a=i.getRowId(e),s=n+i.colOffset,o=is(t,e),l=i.editable!==false&&o&&!!i.onCellValueChanged&&!Hv(t.cellEditor),f=i.editable!==false&&o&&!!i.onCellValueChanged&&Hv(t.cellEditor)&&t.cellEditorPopup!==false,u=l||f,c=i.editingCell?.rowId===a&&i.editingCell?.columnId===t.columnId,d=!i.isDragging&&i.activeCell?.rowIndex===r&&i.activeCell?.columnIndex===s,p=i.selectionRange!=null&&i.selectionRange.startRow===i.selectionRange.endRow&&i.selectionRange.startCol===i.selectionRange.endCol,h=i.selectionRange!=null&&!p&&qa(i.selectionRange,r,n),m=i.cutRange!=null&&qa(i.cutRange,r,n),g=i.copyRange!=null&&qa(i.copyRange,r,n),v=!i.isDragging&&i.copyRange==null&&i.cutRange==null&&i.selectionRange!=null&&r===i.selectionRange.endRow&&n===i.selectionRange.endCol,w=t.pinned!=null,C=t.pinned??void 0,T=cr(e,t),I=i.hasFormula?.(n,r)??false,k=I?i.getFormulaValue?.(n,r):void 0,D="display",j;c&&l?(D="editing-inline",t.cellEditor==="text"||t.cellEditor==="select"||t.cellEditor==="checkbox"||t.cellEditor==="richSelect"||t.cellEditor==="date"?j=t.cellEditor:t.type==="date"?j="date":t.type==="boolean"?j="checkbox":j="text"):c&&f&&(D="editing-popover");let F=c&&I?i.getFormula?.(n,r)??T:T;return {mode:D,editorType:j,value:F,isActive:d,isInRange:h,isInCutRange:m,isInCopyRange:g,isSelectionEndCell:v,canEditAny:u,isPinned:w,pinnedSide:C,globalColIndex:s,rowId:a,rowIndex:r,displayValue:k!==void 0?k:T,columnType:t.type}}function ly(e,t,r){if(r instanceof sy)return r.toString();let n=e;if(n.renderCell&&typeof n.renderCell=="function")return n.renderCell(t);if(e.valueFormatter)return e.valueFormatter(r,t);if(r==null)return null;if(e.type==="date"){let i=e.dateFormat??Ec,a=Sp(r,i);if(a!==null)return a}return e.type==="boolean"?r?"True":"False":String(r)}function uy(e,t,r){let n=e,i=r instanceof sy,a=n.cellStyle?typeof n.cellStyle=="function"?n.cellStyle(t):n.cellStyle:void 0;return i?{...a,color:"var(--ogrid-formula-error-color, #d32f2f)"}:a}function cy(e,t,r,n){let i=r.editorType??"text";return {value:r.value,item:e,column:t,rowIndex:r.rowIndex,editorType:i,onCommit:a=>n.commitCellEdit(e,t.columnId,r.value,a,r.rowIndex,r.globalColIndex,i==="checkbox"?{skipAdvance:true}:void 0),onCancel:()=>n.setEditingCell(null)}}function fy(e,t,r,n,i){let a=r.value,s=n!==void 0?n:a,o=n;return {value:s,onValueChange:l=>{o=l,i.setPendingEditorValue(l);},onCommit:()=>{let l=o!==void 0?o:a;i.commitCellEdit(e,t.columnId,a,l,r.rowIndex,r.globalColIndex);},onCancel:i.cancelPopoverEdit,item:e,column:t,cellEditorParams:t.cellEditorParams}}function Rp(e,t,r){let n=t.startCol+r,i=t.endCol+r,a=e.querySelector(`[data-row-index="${t.startRow}"][data-col-index="${n}"]`),s=e.querySelector(`[data-row-index="${t.endRow}"][data-col-index="${i}"]`);if(!a||!s)return null;let o=e.getBoundingClientRect(),l=a.getBoundingClientRect(),f=s.getBoundingClientRect();return {top:l.top-o.top,left:l.left-o.left,width:f.right-l.left,height:f.bottom-l.top}}var dy=2048;function Dl(e,t){return e*dy+t}function os(e){let t=new Map;if(!e)return t;let r=e.querySelectorAll("[data-row-index][data-col-index]");for(let n=0;n<r.length;n++){let i=r[n],a=parseInt(i.getAttribute("data-row-index")??"",10),s=parseInt(i.getAttribute("data-col-index")??"",10);!Number.isNaN(a)&&!Number.isNaN(s)&&t.set(a*dy+s,i);}return t}function hy(e,t){if(typeof document>"u"||document.getElementById(e))return;let r=document.createElement("style");r.id=e,r.textContent=t,document.head.appendChild(r);}function py(e,t,r){return r===null?{field:"",direction:"asc"}:r?{field:t,direction:r}:{field:t,direction:e.field===t&&e.direction==="asc"?"desc":"asc"}}var Nl=48,Ac=50,Il=80,Tc=16,Ap=30,$a="__row_number__",Tp=6,n5=16,i5=520,a5=44,o5=8;function Mc(e){return Math.max(80,Math.ceil(e.length*o5+a5))}function s5(e){let t=getComputedStyle(e),r=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0),n=(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),i=0;for(let c=0;c<e.children.length;c++){let d=e.children[c],p=d.className||"";if(p.includes("resizeHandle")||p.includes("resize-handle")||p.includes("ogrid-resize-handle")){i=d.offsetWidth;break}}let a=e.firstElementChild;if(!a)return e.offsetWidth;let s=[],o=c=>{for(let d=0;d<c.children.length;d++){let p=c.children[d],h=getComputedStyle(p);(h.overflow==="hidden"||h.flexShrink!=="0")&&(s.push({el:p,overflow:p.style.overflow,flexShrink:p.style.flexShrink,width:p.style.width,minWidth:p.style.minWidth,maxWidth:p.style.maxWidth}),p.style.overflow="visible",p.style.flexShrink="0",p.style.width="max-content",p.style.minWidth="max-content",p.style.maxWidth="none"),o(p);}},l=a.style.position,f=a.style.width;a.style.position="absolute",a.style.width="max-content",o(a);let u=a.offsetWidth;a.style.position=l,a.style.width=f;for(let c of s)c.el.style.overflow=c.overflow,c.el.style.flexShrink=c.flexShrink,c.el.style.width=c.width,c.el.style.minWidth=c.minWidth,c.el.style.maxWidth=c.maxWidth;return u+i+r+n}function kc(e,t,r){let n=t??80,i=(r??document).querySelectorAll(`[data-column-id="${e}"]`);if(i.length===0)return n;let a=n,s=[],o=[],l=[];if(i.forEach(f=>{let u=f;if(u.querySelector?.("[data-header-label]"))a=Math.max(a,s5(u));else {let c=u.firstElementChild??u;s.push(c);}}),s.length>0){for(let f=0;f<s.length;f++){let u=s[f];o.push(u.style.position),l.push(u.style.width),u.style.position="absolute",u.style.width="max-content";}for(let f=0;f<s.length;f++)a=Math.max(a,s[f].offsetWidth+n5);for(let f=0;f<s.length;f++)s[f].style.position=o[f],s[f].style.width=l[f];}return Math.min(i5,Math.max(n,Math.ceil(a)))}function Ml(e,t,r,n){if(e===t)return e;let i=e+r;if(!n(e)&&!n(i)){let s=i;for(;s!==t;){if(n(s+r))return s;s+=r;}return t}let a=i;for(;a!==t;){if(!n(a))return a;a+=r;}return t}function Mp(e,t,r,n,i,a){let s=e,o=t;return a?t>i?o=t-1:e>0&&(s=e-1,o=n):t<n?o=t+1:e<r&&(s=e+1,o=i),{rowIndex:s,columnIndex:o}}function my(e){let{direction:t,rowIndex:r,columnIndex:n,dataColIndex:i,colOffset:a,maxRowIndex:s,maxColIndex:o,visibleColCount:l,isCtrl:f,isShift:u,selectionRange:c,isEmptyAt:d}=e,p=r,h=n;t==="ArrowDown"?p=f?Ml(r,s,1,w=>d(w,Math.max(0,i))):Math.min(r+1,s):t==="ArrowUp"?p=f?Ml(r,0,-1,w=>d(w,Math.max(0,i))):Math.max(r-1,0):t==="ArrowRight"?f&&i>=0?h=Ml(i,l-1,1,w=>d(r,w))+a:h=Math.min(n+1,o):f&&i>=0?h=Ml(i,0,-1,w=>d(r,w))+a:h=Math.max(n-1,a);let m=h-a,g=t==="ArrowDown"||t==="ArrowUp",v;return u?g?v=tn({startRow:c?.startRow??r,startCol:c?.startCol??i,endRow:p,endCol:c?.endCol??i}):v=tn({startRow:c?.startRow??r,startCol:c?.startCol??i,endRow:c?.endRow??r,endCol:m}):v={startRow:p,startCol:m,endRow:p,endCol:m},{newRowIndex:p,newColumnIndex:h,newDataColIndex:m,newRange:v}}function gy(e,t,r){let n=tn(e),i=[];for(let a=n.startRow;a<=n.endRow;a++)for(let s=n.startCol;s<=n.endCol;s++){if(a>=t.length||s>=r.length)continue;let o=t[a],l=r[s];if(!is(l,o))continue;let f=cr(o,l),u=Wa("",f,o,l);u.valid&&i.push({item:o,columnId:l.columnId,oldValue:f,newValue:u.value,rowIndex:a});}return i}function kp(e,t){return e===t?true:!e||!t?false:e.startRow===t.startRow&&e.endRow===t.endRow&&e.startCol===t.startCol&&e.endCol===t.endCol}function si(e,t=40,r=2,n=20){let i=Math.min(e/t,1);return r+i*(n-r)}function by(e,t,r,n,i,a){let s=new Set(a),o=Math.min(e,t),l=Math.max(e,t);for(let f=o;f<=l;f++)if(f<n.length){let u=i(n[f]);r?s.add(u):s.delete(u);}return s}function vy(e,t,r){if(e.size===0||t.length===0)return {allSelected:false,someSelected:false};let n=e.size>=t.length&&t.every(a=>e.has(r(a))),i=!n&&e.size>0;return {allSelected:n,someSelected:i}}function yy(e,t){let r=t!=null&&t!==""?t:e;if(r==null||r==="")return "";try{return String(r).replace(/[\t\n]/g," ")}catch{return "[Object]"}}function Op(e,t,r,n){let i=tn(r),a=[];for(let s=i.startRow;s<=i.endRow;s++){let o=[];for(let l=i.startCol;l<=i.endCol&&!(s>=e.length||l>=t.length);l++){let f=e[s],u=t[l];if(n?.hasFormula&&n?.getFormula){let p=n.flatColumns.findIndex(h=>h.columnId===u.columnId);if(p>=0&&n.hasFormula(p,s)){let h=n.getFormula(p,s);if(h){o.push(h);continue}}}let c=cr(f,u),d=(u.clipboardFormatter?u.clipboardFormatter(c,f):null)??(u.valueFormatter?u.valueFormatter(c,f):c);o.push(yy(c,d));}a.push(o.join(" "));}return a.join(`\r
|
|
38
|
+
`)}function Dp(e){return e.trim()?e.split(/\r?\n/).filter(t=>t.length>0).map(t=>t.split(" ")):[]}function wy(e,t,r,n,i,a){let s=[];for(let o=0;o<e.length;o++){let l=e[o];for(let f=0;f<l.length;f++){let u=t+o,c=r+f;if(u>=n.length||c>=i.length)continue;let d=n[u],p=i[c];if(!is(p,d))continue;let h=l[f]??"";if(h.startsWith("=")&&a?.setFormula){let v=a.flatColumns.findIndex(w=>w.columnId===p.columnId);if(v>=0){a.setFormula(v,u,h);continue}}let m=cr(d,p),g=Wa(h,m,d,p);g.valid&&s.push({item:d,columnId:p.columnId,oldValue:m,newValue:g.value,rowIndex:u});}}return s}function _y(e,t,r){let n=[];for(let i=e.startRow;i<=e.endRow;i++)for(let a=e.startCol;a<=e.endCol;a++){if(i>=t.length||a>=r.length)continue;let s=t[i],o=r[a];if(!is(o,s))continue;let l=cr(s,o),f=Wa("",l,s,o);f.valid&&n.push({item:s,columnId:o.columnId,oldValue:l,newValue:f.value,rowIndex:i});}return n}function zl(e){let t="",r=e;for(;r>=0;)t=String.fromCharCode(r%26+65)+t,r=Math.floor(r/26)-1;return t}function Np(e){let t=0,r=e.toUpperCase();for(let n=0;n<r.length;n++)t=t*26+(r.charCodeAt(n)-64);return t-1}function Oc(e,t){return `${zl(e)}${t}`}var Gv=/(?:'[^']*'!|[A-Za-z_]\w*!)?(\$?)([A-Z]+)(\$?)(\d+)/g;function l5(e,t,r){return Gv.lastIndex=0,e.replace(Gv,(n,i,a,s,o)=>{let l=n.indexOf(i+a),f=l>0?n.substring(0,l):"",u=a,c=o;if(i!=="$"){let d=Np(a)+t;if(d<0)return "#REF!";u=zl(d);}if(s!=="$"){let d=parseInt(o,10)+r;if(d<1)return "#REF!";c=String(d);}return `${f}${i}${u}${s}${c}`})}function u5(e,t){if(e.columnId===t.columnId)return true;let r=e.type??"text",n=t.type??"text";return !(r!==n||e.cellEditor!==t.cellEditor)}function Ip(e,t,r,n,i,a){let s=[],o=n[e.startRow],l=i[e.startCol];if(!o||!l)return s;let f=cr(o,l),u=a?a.flatColumns.findIndex(d=>d.columnId===l.columnId):-1,c=new Set;for(let d=e.startCol;d<=e.endCol;d++)d<i.length&&u5(l,i[d])&&c.add(d);for(let d=e.startRow;d<=e.endRow;d++)for(let p=e.startCol;p<=e.endCol;p++){if(d===t&&p===r||d>=n.length||!c.has(p))continue;let h=n[d],m=i[p];if(!is(m,h))continue;if(a&&a.hasFormula&&a.getFormula&&a.setFormula&&u>=0&&a.hasFormula(u,t)){let w=a.getFormula(u,t);if(w){let C=d-t,T=p-r,I=l5(w,T,C),k=a.flatColumns.findIndex(D=>D.columnId===m.columnId);if(k>=0){a.setFormula(k,d,I);continue}}}let g=cr(h,m),v=Wa(f,g,h,m);v.valid&&s.push({item:h,columnId:m.columnId,oldValue:g,newValue:v.value,rowIndex:d});}return s}var zp=class{constructor(e=100){this.history=[],this.redoStack=[],this.batch=null,this.maxDepth=e;}get canUndo(){return this.history.length>0}get canRedo(){return this.redoStack.length>0}get historyLength(){return this.history.length}get redoLength(){return this.redoStack.length}get isBatching(){return this.batch!==null}push(e){e.length!==0&&(this.batch!==null?this.batch.push(...e):(this.history.push(e),this.history.length>this.maxDepth&&this.history.splice(0,this.history.length-this.maxDepth),this.redoStack.length=0));}record(e){this.push([e]);}beginBatch(){this.batch===null&&(this.batch=[]);}endBatch(){let e=this.batch;this.batch=null,!(!e||e.length===0)&&(this.history.push(e),this.history.length>this.maxDepth&&this.history.splice(0,this.history.length-this.maxDepth),this.redoStack.length=0);}undo(){let e=this.history.pop();return e?(this.redoStack.push(e),e):null}redo(){let e=this.redoStack.pop();return e?(this.history.push(e),e):null}clear(){this.history=[],this.redoStack=[];}};function xy(e){if(!Array.isArray(e)||e.length===0){console.warn("[OGrid] columns prop is empty or not an array");return}let r=new Set;for(let n of e)n.columnId||console.warn("[OGrid] Column missing columnId:",n),r.has(n.columnId)&&console.warn(`[OGrid] Duplicate columnId: "${n.columnId}"`),r.add(n.columnId);}function Sy(e){typeof process<"u"||e.enabled===true&&(!e.rowHeight||e.rowHeight<=0)&&console.warn("[OGrid] virtualScroll.enabled is true but rowHeight is missing or <= 0. Set a positive rowHeight (e.g. virtualScroll: { enabled: true, rowHeight: 36 }) for correct virtual scrolling behavior.");}function Cy(e,t){if(typeof process<"u"||!t)return;let r=new Set,n=Math.min(e.length,100);for(let i=0;i<n;i++){let a=t(e[i]);if(a==null){console.warn(`[OGrid] getRowId returned null/undefined for row ${i}`);return}if(r.has(a)){console.warn(`[OGrid] Duplicate row ID "${a}" at index ${i}. getRowId must return unique values.`);return}r.add(a);}}var c5=[{minWidth:0,maxPriority:0},{minWidth:576,maxPriority:1},{minWidth:768,maxPriority:2},{minWidth:992,maxPriority:3},{minWidth:1200,maxPriority:1/0}];function f5(e,t,r){let n=r?.breakpoints??c5,i=new Set;if(e<=0||t.length===0)return i;let a=1/0;for(let s=n.length-1;s>=0;s--)if(e>=n[s].minWidth){a=n[s].maxPriority;break}if(a===1/0)return i;for(let s of t)s.responsivePriority!=null&&(s.required||s.responsivePriority>a&&i.add(s.columnId));return i}function Ey(e){return e===true?{}:e||void 0}function Ry(e,t,r){if(!r||t<=0)return e;let n=f5(t,e,r);return n.size===0?e:e.filter(i=>!n.has(i.columnId))}function jp(e,t,r,n,i){e.stopPropagation();let a=r-n;i.setActiveCell({rowIndex:t,columnIndex:r}),i.setSelectionRange({startRow:t,startCol:a,endRow:t,endCol:a});}var Ay=300;var _t=Ke(ht()),X=Ke(ht());var G=class{constructor(e,t){this.type=e,this.message=t;}toString(){return this.type}};function d5(e){let t="",r=e;for(;r>=0;)t=String.fromCharCode(r%26+65)+t,r=Math.floor(r/26)-1;return t}function Iy(e){let t=0,r=e.toUpperCase();for(let n=0;n<r.length;n++)t=t*26+(r.charCodeAt(n)-64);return t-1}var h5=/^(\$?)([A-Za-z]+)(\$?)(\d+)$/;function li(e){let t=e.match(h5);if(!t)return null;let r=t[1]==="$",n=t[2],i=t[3]==="$",a=parseInt(t[4],10);return a<1?null:{col:Iy(n),row:a-1,absCol:r,absRow:i}}function Dc(e){let t=e.split(":");if(t.length!==2)return null;let r=li(t[0]),n=li(t[1]);return !r||!n?null:{start:r,end:n}}function Gr(e,t,r){return r?`${r}:${e},${t}`:`${e},${t}`}function ss(e){let t=e.indexOf(":");if(t>=0&&isNaN(parseInt(e.substring(0,t),10))){let n=e.substring(0,t),i=e.substring(t+1),a=i.indexOf(",");return {col:parseInt(i.substring(0,a),10),row:parseInt(i.substring(a+1),10),sheet:n}}let r=e.indexOf(",");return {col:parseInt(e.substring(0,r),10),row:parseInt(e.substring(r+1),10)}}var p5=/^\$?[A-Za-z]+\$?\d+$/,Ty={"+":"PLUS","-":"MINUS","*":"MULTIPLY","/":"DIVIDE","^":"POWER","%":"PERCENT","&":"AMPERSAND","=":"EQ"},My={"(":"LPAREN",")":"RPAREN",",":"COMMA",":":"COLON"};function Fp(e){let t=[],r=0;for(;r<e.length;){let n=e[r];if(n===" "||n===" "||n==="\r"||n===`
|
|
39
|
+
`){r++;continue}if(n>="0"&&n<="9"||n==="."&&r+1<e.length&&e[r+1]>="0"&&e[r+1]<="9"){let i=r;for(;r<e.length&&e[r]>="0"&&e[r]<="9";)r++;if(r<e.length&&e[r]===".")for(r++;r<e.length&&e[r]>="0"&&e[r]<="9";)r++;t.push({type:"NUMBER",value:e.slice(i,r),position:i});continue}if(n==="'"){let i=r;r++;let a=r;for(;r<e.length&&e[r]!=="'";)r++;let s=e.slice(a,r);if(r<e.length&&e[r]==="'"&&(r++,r<e.length&&e[r]==="!")){r++,t.push({type:"SHEET_REF",value:s,position:i});continue}throw new G("#ERROR!",`Invalid sheet reference at position ${i}`)}if(n==='"'){let i=r;r++;let a=r,s=false;for(;r<e.length;)if(e[r]==='"')if(r+1<e.length&&e[r+1]==='"')s=true,r+=2;else break;else r++;let o;s?o=e.slice(a,r).replace(/""/g,'"'):o=e.slice(a,r),r<e.length&&r++,t.push({type:"STRING",value:o,position:i});continue}if(n===">"&&r+1<e.length&&e[r+1]==="="){t.push({type:"GTE",value:">=",position:r}),r+=2;continue}if(n==="<"&&r+1<e.length&&e[r+1]==="="){t.push({type:"LTE",value:"<=",position:r}),r+=2;continue}if(n==="<"&&r+1<e.length&&e[r+1]===">"){t.push({type:"NEQ",value:"<>",position:r}),r+=2;continue}if(n===">"||n==="<"){let i=n===">"?"GT":"LT";t.push({type:i,value:n,position:r}),r++;continue}if(Ty[n]){t.push({type:Ty[n],value:n,position:r}),r++;continue}if(My[n]){t.push({type:My[n],value:n,position:r}),r++;continue}if(n==="$"||n>="A"&&n<="Z"||n>="a"&&n<="z"){let i=r;for(;r<e.length&&(e[r]>="A"&&e[r]<="Z"||e[r]>="a"&&e[r]<="z"||e[r]>="0"&&e[r]<="9"||e[r]==="$"||e[r]==="_");)r++;if(r<e.length&&e[r]==="."&&r+1<e.length&&(e[r+1]>="A"&&e[r+1]<="Z"||e[r+1]>="a"&&e[r+1]<="z"))for(r++;r<e.length&&(e[r]>="A"&&e[r]<="Z"||e[r]>="a"&&e[r]<="z"||e[r]>="0"&&e[r]<="9"||e[r]==="_");)r++;let a=e.slice(i,r);if(r<e.length&&e[r]==="!"){r++,t.push({type:"SHEET_REF",value:a,position:i});continue}if(r<e.length&&e[r]==="("){t.push({type:"FUNCTION",value:a,position:i});continue}let s=a.toUpperCase();if(s==="TRUE"||s==="FALSE"){t.push({type:"BOOLEAN",value:s,position:i});continue}if(p5.test(a)){t.push({type:"CELL_REF",value:a,position:i});continue}t.push({type:"IDENTIFIER",value:a,position:i});continue}throw new G("#ERROR!",`Unexpected character: ${n}`)}return t.push({type:"EOF",value:"",position:r}),t}function ky(e,t){let r=0;function n(){return e[r]}function i(){let I=e[r];return r++,I}function a(I){let k=n();return k&&k.type===I?i():null}function s(I){return {kind:"error",error:new G("#ERROR!",I)}}function o(){return l()}function l(){let I=f();for(;n();){let k=n(),D=null;if(k.type==="GT")D=">";else if(k.type==="LT")D="<";else if(k.type==="GTE")D=">=";else if(k.type==="LTE")D="<=";else if(k.type==="EQ")D="=";else if(k.type==="NEQ")D="<>";else break;i();let j=f();I={kind:"binaryOp",op:D,left:I,right:j};}return I}function f(){let I=u();for(;n()&&n().type==="AMPERSAND";){i();let k=u();I={kind:"binaryOp",op:"&",left:I,right:k};}return I}function u(){let I=c();for(;n();){let k=n(),D=null;if(k.type==="PLUS")D="+";else if(k.type==="MINUS")D="-";else break;i();let j=c();I={kind:"binaryOp",op:D,left:I,right:j};}return I}function c(){let I=d();for(;n();){let k=n(),D=null;if(k.type==="MULTIPLY")D="*";else if(k.type==="DIVIDE")D="/";else break;i();let j=d();I={kind:"binaryOp",op:D,left:I,right:j};}return I}function d(){let I=p();for(;n()&&n().type==="POWER";){i();let k=p();I={kind:"binaryOp",op:"^",left:I,right:k};}return I}function p(){let I=n();if(I&&(I.type==="MINUS"||I.type==="PLUS")){let k=I.type==="MINUS"?"-":"+";i();let D=p();return {kind:"unaryOp",op:k,operand:D}}return h()}function h(){let I=m();return n()&&n().type==="PERCENT"&&(i(),I={kind:"binaryOp",op:"%",left:I,right:{kind:"number",value:100}}),I}function m(){let I=n();if(!I||I.type==="EOF")return s("Unexpected end of expression");if(I.type==="NUMBER")return i(),{kind:"number",value:parseFloat(I.value)};if(I.type==="STRING")return i(),{kind:"string",value:I.value};if(I.type==="BOOLEAN")return i(),{kind:"boolean",value:I.value.toUpperCase()==="TRUE"};if(I.type==="CELL_REF")return g();if(I.type==="FUNCTION")return v();if(I.type==="IDENTIFIER")return w();if(I.type==="SHEET_REF")return C();if(I.type==="LPAREN"){i();let k=o();return a("RPAREN")?k:s("Expected closing parenthesis")}return i(),s(`Unexpected token: ${I.value}`)}function g(){let I=i(),k=li(I.value);if(!k)return s(`Invalid cell reference: ${I.value}`);if(n()&&n().type==="COLON"){i();let D=a("CELL_REF");if(!D)return s('Expected cell reference after ":"');let j=li(D.value);return j?{kind:"range",start:k,end:j,raw:`${I.value}:${D.value}`}:s(`Invalid cell reference: ${D.value}`)}return {kind:"cellRef",address:k,raw:I.value}}function v(){let I=i().value.toUpperCase();if(!a("LPAREN"))return s(`Expected "(" after function name "${I}"`);let k=[];if(n()&&n().type!=="RPAREN"&&n().type!=="EOF")for(k.push(o());n()&&n().type==="COMMA";)i(),k.push(o());return a("RPAREN")?{kind:"functionCall",name:I,args:k}:s(`Expected ")" after function arguments for "${I}"`)}function w(){let I=i(),k=I.value.toUpperCase(),D=t?.get(k);if(!D)return {kind:"error",error:new G("#NAME?",`Unknown name: ${I.value}`)};if(D.includes(":")){let F=Dc(D);if(F)return {kind:"range",start:F.start,end:F.end,raw:D}}let j=li(D);return j?{kind:"cellRef",address:j,raw:D}:{kind:"error",error:new G("#REF!",`Invalid named range reference: ${D}`)}}function C(){let I=i().value,k=a("CELL_REF");if(!k)return s(`Expected cell reference after sheet "${I}!"`);let D=li(k.value);if(!D)return s(`Invalid cell reference: ${k.value}`);if(D.sheet=I,n()&&n().type==="COLON"){i();let j=a("CELL_REF");if(!j)return s('Expected cell reference after ":"');let F=li(j.value);return F?(F.sheet=I,{kind:"range",start:D,end:F,raw:`${I}!${k.value}:${j.value}`}):s(`Invalid cell reference: ${j.value}`)}return {kind:"cellRef",address:D,raw:`${I}!${k.value}`}}let T=o();return n()&&n().type!=="EOF"?s(`Unexpected token after expression: ${n().value}`):T}function pe(e){if(e instanceof G)return e;if(e==null||e==="")return 0;if(typeof e=="boolean")return e?1:0;if(typeof e=="number")return e;if(e instanceof Date)return e.getTime();let t=Number(e);return isNaN(t)?new G("#VALUE!",`Cannot convert "${e}" to number`):t}function pt(e){return e==null?"":e instanceof G?e.toString():e instanceof Date?e.toLocaleDateString():String(e)}function _n(e,t,r){let n=[];for(let i of e)if(i.kind==="range"){let a=t.getRangeValues({start:i.start,end:i.end});for(let s of a)for(let o of s)n.push(o);}else n.push(r.evaluate(i,t));return n}var m5=class{constructor(e){this.functions=new Map(e);}registerFunction(e,t){this.functions.set(e.toUpperCase(),t);}evaluate(e,t){switch(e.kind){case "number":return e.value;case "string":return e.value;case "boolean":return e.value;case "error":return e.error;case "cellRef":return t.getCellValue(e.address);case "range":return t.getCellValue(e.start);case "functionCall":return this.evaluateFunction(e.name,e.args,t);case "binaryOp":return this.evaluateBinaryOp(e.op,e.left,e.right,t);case "unaryOp":return this.evaluateUnaryOp(e.op,e.operand,t)}}evaluateFunction(e,t,r){let n=this.functions.get(e);return n?t.length<n.minArgs?new G("#ERROR!",`${e} requires at least ${n.minArgs} argument(s)`):n.maxArgs>=0&&t.length>n.maxArgs?new G("#ERROR!",`${e} accepts at most ${n.maxArgs} argument(s)`):n.evaluate(t,r,this):new G("#NAME?",`Unknown function: ${e}`)}evaluateBinaryOp(e,t,r,n){if(e==="&"){let l=this.evaluate(t,n);if(l instanceof G)return l;let f=this.evaluate(r,n);return f instanceof G?f:pt(l)+pt(f)}if(e===">"||e==="<"||e===">="||e==="<="||e==="="||e==="<>"){let l=this.evaluate(t,n);if(l instanceof G)return l;let f=this.evaluate(r,n);return f instanceof G?f:this.compare(e,l,f)}let i=this.evaluate(t,n);if(i instanceof G)return i;let a=this.evaluate(r,n);if(a instanceof G)return a;let s=pe(i);if(s instanceof G)return s;let o=pe(a);if(o instanceof G)return o;switch(e){case "+":return s+o;case "-":return s-o;case "*":return s*o;case "/":return o===0?new G("#DIV/0!"):s/o;case "^":return s**o;case "%":return s*o/100;default:return new G("#ERROR!",`Unknown operator: ${e}`)}}evaluateUnaryOp(e,t,r){let n=this.evaluate(t,r);if(n instanceof G)return n;let i=pe(n);return i instanceof G?i:e==="-"?-i:i}compare(e,t,r){if(typeof t=="number"&&typeof r=="number")return this.numCompare(e,t,r);if(typeof t=="string"&&typeof r=="string")return this.strCompare(e,t,r);if(typeof t=="boolean"&&typeof r=="boolean")return this.numCompare(e,t?1:0,r?1:0);let n=pe(t),i=pe(r);return typeof n=="number"&&typeof i=="number"?this.numCompare(e,n,i):this.strCompare(e,pt(t),pt(r))}numCompare(e,t,r){switch(e){case ">":return t>r;case "<":return t<r;case ">=":return t>=r;case "<=":return t<=r;case "=":return t===r;case "<>":return t!==r;default:return false}}strCompare(e,t,r){let n=t.toLowerCase(),i=r.toLowerCase();switch(e){case ">":return n>i;case "<":return n<i;case ">=":return n>=i;case "<=":return n<=i;case "=":return n===i;case "<>":return n!==i;default:return false}}},Oy=Object.freeze(new Set),g5=class{constructor(){this.dependencies=new Map,this.dependents=new Map;}setDependencies(e,t){this.removeDependenciesInternal(e),this.dependencies.set(e,t);for(let r of t){let n=this.dependents.get(r);n||(n=new Set,this.dependents.set(r,n)),n.add(e);}}removeDependencies(e){this.removeDependenciesInternal(e),this.dependencies.delete(e);}getRecalcOrder(e){return this.topologicalSort(new Set([e]))}getRecalcOrderBatch(e){return this.topologicalSort(new Set(e))}wouldCreateCycle(e,t){if(t.has(e))return true;let r=new Set;for(let n of t)if(this.canReach(n,e,r))return true;return false}getDependents(e){return this.dependents.get(e)??Oy}getDependencies(e){return this.dependencies.get(e)??Oy}clear(){this.dependencies.clear(),this.dependents.clear();}removeDependenciesInternal(e){let t=this.dependencies.get(e);if(t){for(let r of t){let n=this.dependents.get(r);n&&(n.delete(e),n.size===0&&this.dependents.delete(r));}this.dependencies.delete(e);}}canReach(e,t,r){if(e===t)return true;if(r.has(e))return false;let n=[e];for(r.add(e);n.length>0;){let i=n.pop(),a=this.dependencies.get(i);if(a)for(let s of a){if(s===t)return true;r.has(s)||(r.add(s),n.push(s));}}return false}topologicalSort(e){let t=new Set,r=[];for(let l of e){let f=this.dependents.get(l);if(f)for(let u of f)t.has(u)||(t.add(u),r.push(u));}let n=0;for(;n<r.length;){let l=r[n++],f=this.dependents.get(l);if(f)for(let u of f)t.has(u)||(t.add(u),r.push(u));}if(t.size===0)return [];let i=new Map;for(let l of t){let f=0,u=this.dependencies.get(l);if(u)for(let c of u)t.has(c)&&f++;i.set(l,f);}let a=[];for(let[l,f]of i)f===0&&a.push(l);let s=[],o=0;for(;o<a.length;){let l=a[o++];s.push(l);let f=this.dependents.get(l);if(f){for(let u of f)if(t.has(u)){let c=(i.get(u)??0)-1;i.set(u,c),c===0&&a.push(u);}}}if(s.length<t.size){let l=new Set(s);for(let f of t)l.has(f)||s.push(f);}return s}};function b5(e){e.set("SUM",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=0;for(let s of i){if(s instanceof G)return s;typeof s=="number"?a+=s:typeof s=="boolean"&&(a+=s?1:0);}return a}}),e.set("AVERAGE",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=0,s=0;for(let o of i){if(o instanceof G)return o;typeof o=="number"?(a+=o,s++):typeof o=="boolean"&&(a+=o?1:0,s++);}return s===0?new G("#DIV/0!","No numeric values for AVERAGE"):a/s}}),e.set("MIN",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=1/0;for(let s of i){if(s instanceof G)return s;if(typeof s=="number")s<a&&(a=s);else if(typeof s=="boolean"){let o=s?1:0;o<a&&(a=o);}}return a===1/0?0:a}}),e.set("MAX",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=-1/0;for(let s of i){if(s instanceof G)return s;if(typeof s=="number")s>a&&(a=s);else if(typeof s=="boolean"){let o=s?1:0;o>a&&(a=o);}}return a===-1/0?0:a}}),e.set("COUNT",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=0;for(let s of i){if(s instanceof G)return s;typeof s=="number"&&a++;}return a}}),e.set("COUNTA",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=0;for(let s of i){if(s instanceof G)return s;s!=null&&s!==""&&a++;}return a}}),e.set("ROUND",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=10**Math.trunc(o);return Math.round(a*l)/l}}),e.set("ABS",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:Math.abs(a)}}),e.set("CEILING",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:o===0?0:Math.ceil(a/o)*o}}),e.set("FLOOR",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:o===0?0:Math.floor(a/o)*o}}),e.set("MOD",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:o===0?new G("#DIV/0!","Division by zero in MOD"):a%o}}),e.set("POWER",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:a**o}}),e.set("SQRT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:a<0?new G("#VALUE!","Cannot take square root of negative number"):Math.sqrt(a)}}),e.set("ROUNDUP",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=10**Math.trunc(o);return a>=0?Math.ceil(a*l)/l:Math.floor(a*l)/l}}),e.set("ROUNDDOWN",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=10**Math.trunc(o);return Math.trunc(a*l)/l}}),e.set("INT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:Math.floor(a)}}),e.set("TRUNC",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=0;if(t.length>=2){let l=n.evaluate(t[1],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;s=Math.trunc(f);}let o=10**s;return Math.trunc(a*o)/o}}),e.set("PRODUCT",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=1,s=false;for(let o of i){if(o instanceof G)return o;typeof o=="number"&&(a*=o,s=true);}return s?a:0}}),e.set("SUMPRODUCT",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=[];for(let l of t){if(l.kind!=="range")return new G("#VALUE!","SUMPRODUCT arguments must be ranges");i.push(r.getRangeValues({start:l.start,end:l.end}));}if(i.length===0)return 0;let a=i[0].length,s=a>0?i[0][0].length:0;for(let l=1;l<i.length;l++)if(i[l].length!==a||a>0&&i[l][0].length!==s)return new G("#VALUE!","SUMPRODUCT arrays must have same dimensions");let o=0;for(let l=0;l<a;l++)for(let f=0;f<s;f++){let u=1;for(let c=0;c<i.length;c++){let d=pe(i[c][l][f]);if(d instanceof G){u=0;break}u*=d;}o+=u;}return o}}),e.set("MEDIAN",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=[];for(let o of i){if(o instanceof G)return o;typeof o=="number"&&a.push(o);}if(a.length===0)return new G("#NUM!","No numeric values for MEDIAN");a.sort((o,l)=>o-l);let s=Math.floor(a.length/2);return a.length%2!==0?a[s]:(a[s-1]+a[s])/2}}),e.set("LARGE",{minArgs:2,maxArgs:2,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","LARGE first argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=pe(a);if(s instanceof G)return s;let o=[];for(let f of i)for(let u of f)typeof u=="number"&&o.push(u);let l=Math.trunc(s);return l<1||l>o.length?new G("#NUM!","LARGE k out of range"):(o.sort((f,u)=>u-f),o[l-1])}}),e.set("SMALL",{minArgs:2,maxArgs:2,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","SMALL first argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=pe(a);if(s instanceof G)return s;let o=[];for(let f of i)for(let u of f)typeof u=="number"&&o.push(u);let l=Math.trunc(s);return l<1||l>o.length?new G("#NUM!","SMALL k out of range"):(o.sort((f,u)=>f-u),o[l-1])}}),e.set("RANK",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;if(t[1].kind!=="range")return new G("#VALUE!","RANK second argument must be a range");let s=r.getRangeValues({start:t[1].start,end:t[1].end}),o=0;if(t.length>=3){let u=n.evaluate(t[2],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;o=c;}let l=[];for(let u of s)for(let c of u)typeof c=="number"&&l.push(c);if(!l.includes(a))return new G("#N/A","RANK value not found in range");let f=1;for(let u of l)(o===0?u>a:u<a)&&f++;return f}}),e.set("SIGN",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:a>0?1:a<0?-1:0}}),e.set("LOG",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;if(a<=0)return new G("#NUM!","LOG requires a positive number");let s=10;if(t.length>=2){let o=n.evaluate(t[1],r);if(o instanceof G)return o;let l=pe(o);if(l instanceof G)return l;if(l<=0||l===1)return new G("#NUM!","LOG base must be positive and not 1");s=l;}return Math.log(a)/Math.log(s)}}),e.set("LN",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:a<=0?new G("#NUM!","LN requires a positive number"):Math.log(a)}}),e.set("EXP",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);return a instanceof G?a:Math.exp(a)}}),e.set("PI",{minArgs:0,maxArgs:0,evaluate(){return Math.PI}}),e.set("RAND",{minArgs:0,maxArgs:0,evaluate(){return Math.random()}}),e.set("RANDBETWEEN",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.ceil(a),f=Math.floor(o);return l>f?new G("#NUM!","RANDBETWEEN bottom must be <= top"):Math.floor(Math.random()*(f-l+1))+l}}),e.set("MROUND",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:o===0?0:a>0&&o<0||a<0&&o>0?new G("#NUM!","MROUND: number and multiple must have the same sign"):Math.round(a/o)*o}}),e.set("QUOTIENT",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:o===0?new G("#DIV/0!","QUOTIENT: division by zero"):Math.trunc(a/o)}}),e.set("COMBIN",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(a),f=Math.trunc(o);if(l<0||f<0)return new G("#NUM!","COMBIN: n and k must be non-negative");if(f>l)return new G("#NUM!","COMBIN: k must be <= n");if(f===0||f===l)return 1;let u=Math.min(f,l-f),c=1;for(let d=0;d<u;d++)c=c*(l-d)/(d+1);return Math.round(c)}}),e.set("PERMUT",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(a),f=Math.trunc(o);if(l<0||f<0)return new G("#NUM!","PERMUT: n and k must be non-negative");if(f>l)return new G("#NUM!","PERMUT: k must be <= n");let u=1;for(let c=0;c<f;c++)u*=l-c;return u}}),e.set("FACT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=Math.trunc(a);if(s<0)return new G("#NUM!","FACT: argument must be non-negative");if(s>170)return new G("#NUM!","FACT: argument too large (>170)");let o=1;for(let l=2;l<=s;l++)o*=l;return o}}),e.set("GCD",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=[];for(let s of t){let o=n.evaluate(s,r);if(o instanceof G)return o;let l=pe(o);if(l instanceof G)return l;let f=Math.trunc(Math.abs(l));i.push(f);}if(i.length===0)return new G("#NUM!","GCD: no arguments");let a=i[0];for(let s=1;s<i.length;s++)a=Dy(a,i[s]);return a}}),e.set("LCM",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=[];for(let s of t){let o=n.evaluate(s,r);if(o instanceof G)return o;let l=pe(o);if(l instanceof G)return l;let f=Math.trunc(Math.abs(l));i.push(f);}if(i.length===0)return new G("#NUM!","LCM: no arguments");let a=i[0];for(let s=1;s<i.length;s++){let o=Dy(a,i[s]);if(o===0){a=0;break}a=a/o*i[s];}return a}});}function Dy(e,t){for(;t!==0;){let r=t;t=e%t,e=r;}return e}function Lp(e,t,r){let n=[];for(let i of e)if(i.kind==="range"){let a=t.getRangeValues({start:i.start,end:i.end});for(let s of a)for(let o of s)n.push(o);}else n.push(r.evaluate(i,t));return n}function v5(e){e.set("IF",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:i?n.evaluate(t[1],r):t.length>=3?n.evaluate(t[2],r):false}}),e.set("AND",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=Lp(t,r,n);for(let a of i){if(a instanceof G)return a;if(!a)return false}return true}}),e.set("OR",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=Lp(t,r,n);for(let a of i){if(a instanceof G)return a;if(a)return true}return false}}),e.set("NOT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:!i}}),e.set("IFERROR",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?n.evaluate(t[1],r):i}}),e.set("IFNA",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G&&i.type==="#N/A"?n.evaluate(t[1],r):i}}),e.set("IFS",{minArgs:2,maxArgs:-1,evaluate(t,r,n){if(t.length%2!==0)return new G("#VALUE!","IFS requires pairs of condition, value");for(let i=0;i<t.length;i+=2){let a=n.evaluate(t[i],r);if(a instanceof G)return a;if(a)return n.evaluate(t[i+1],r)}return new G("#N/A","IFS no condition was TRUE")}}),e.set("SWITCH",{minArgs:3,maxArgs:-1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=(t.length-1)%2!==0,s=a?(t.length-2)/2:(t.length-1)/2;for(let o=0;o<s;o++){let l=n.evaluate(t[1+o*2],r);if(l instanceof G)return l;if(i===l)return n.evaluate(t[2+o*2],r)}return a?n.evaluate(t[t.length-1],r):new G("#N/A","SWITCH no match found")}}),e.set("CHOOSE",{minArgs:2,maxArgs:-1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(typeof i!="number")return new G("#VALUE!","CHOOSE index must be a number");let a=Math.trunc(i);return a<1||a>=t.length?new G("#VALUE!","CHOOSE index out of range"):n.evaluate(t[a],r)}}),e.set("XOR",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=Lp(t,r,n),a=0;for(let s of i){if(s instanceof G)return s;s&&a++;}return a%2===1}});}function y5(e){e.set("VLOOKUP",{minArgs:3,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(t[1].kind!=="range")return new G("#VALUE!","VLOOKUP table_array must be a range");let a=r.getRangeValues({start:t[1].start,end:t[1].end}),s=n.evaluate(t[2],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;if(o<1)return new G("#VALUE!","VLOOKUP col_index must be >= 1");if(a.length>0&&o>a[0].length)return new G("#REF!","VLOOKUP col_index exceeds table columns");let l=true;if(t.length>=4){let c=n.evaluate(t[3],r);if(c instanceof G)return c;l=!!c;}let f=Math.trunc(o)-1,u=typeof i=="string"?i.toLowerCase():null;if(l){let c=-1;for(let d=0;d<a.length;d++){let p=a[d][0];if(p!=null){if(typeof i=="number"&&typeof p=="number")if(p<=i)c=d;else break;else if(u!==null&&typeof p=="string")if(p.toLowerCase()<=u)c=d;else break}}return c===-1?new G("#N/A","VLOOKUP no match found"):a[c][f]??null}else {for(let c=0;c<a.length;c++){let d=a[c][0];if(u!==null&&typeof d=="string"){if(d.toLowerCase()===u)return a[c][f]??null}else if(d===i)return a[c][f]??null}return new G("#N/A","VLOOKUP no exact match found")}}}),e.set("INDEX",{minArgs:2,maxArgs:3,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","INDEX first argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=pe(a);if(s instanceof G)return s;let o=1;if(t.length>=3){let u=n.evaluate(t[2],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;o=c;}let l=Math.trunc(s)-1,f=Math.trunc(o)-1;return l<0||l>=i.length?new G("#REF!","INDEX row out of bounds"):f<0||i.length>0&&f>=i[0].length?new G("#REF!","INDEX column out of bounds"):i[l][f]??null}}),e.set("HLOOKUP",{minArgs:3,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(t[1].kind!=="range")return new G("#VALUE!","HLOOKUP table_array must be a range");let a=r.getRangeValues({start:t[1].start,end:t[1].end}),s=n.evaluate(t[2],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;if(o<1)return new G("#VALUE!","HLOOKUP row_index must be >= 1");if(o>a.length)return new G("#REF!","HLOOKUP row_index exceeds table rows");let l=true;if(t.length>=4){let d=n.evaluate(t[3],r);if(d instanceof G)return d;l=!!d;}let f=Math.trunc(o)-1,u=a[0]||[],c=typeof i=="string"?i.toLowerCase():null;if(l){let d=-1;for(let p=0;p<u.length;p++){let h=u[p];if(h!=null){if(typeof i=="number"&&typeof h=="number")if(h<=i)d=p;else break;else if(c!==null&&typeof h=="string")if(h.toLowerCase()<=c)d=p;else break}}return d===-1?new G("#N/A","HLOOKUP no match found"):a[f][d]??null}else {for(let d=0;d<u.length;d++){let p=u[d];if(c!==null&&typeof p=="string"){if(p.toLowerCase()===c)return a[f][d]??null}else if(p===i)return a[f][d]??null}return new G("#N/A","HLOOKUP no exact match found")}}}),e.set("XLOOKUP",{minArgs:3,maxArgs:6,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(t[1].kind!=="range")return new G("#VALUE!","XLOOKUP lookup_array must be a range");let a=r.getRangeValues({start:t[1].start,end:t[1].end});if(t[2].kind!=="range")return new G("#VALUE!","XLOOKUP return_array must be a range");let s=r.getRangeValues({start:t[2].start,end:t[2].end}),o=new G("#N/A","XLOOKUP no match found");t.length>=4&&(o=n.evaluate(t[3],r));let l=0;if(t.length>=5){let g=n.evaluate(t[4],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;l=Math.trunc(v);}let f=1;if(t.length>=6){let g=n.evaluate(t[5],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;f=Math.trunc(v);}let u=a.length===1,c=u?a[0].length:a.length,d=u?g=>a[0][g]:g=>a[g][0],p=typeof i=="string"?i.toLowerCase():null,h=(g,v)=>p!==null&&typeof g=="string"?g.toLowerCase()===p:g===v,m=-1;if(l===0){let g=f>=0?0:c-1,v=f>=0?c:-1,w=f>=0?1:-1;for(let C=g;C!==v;C+=w)if(h(d(C),i)){m=C;break}}else if(l===-1){let g=-1;for(let v=0;v<c;v++){let w=d(v);if(h(w,i)){m=v;break}typeof i=="number"&&typeof w=="number"&&w<i&&(g===-1||w>d(g))&&(g=v);}m===-1&&(m=g);}else if(l===1){let g=-1;for(let v=0;v<c;v++){let w=d(v);if(h(w,i)){m=v;break}typeof i=="number"&&typeof w=="number"&&w>i&&(g===-1||w<d(g))&&(g=v);}m===-1&&(m=g);}return m===-1?o:s.length===1?s[0][m]??null:s[m]?.[0]??null}}),e.set("MATCH",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(t[1].kind!=="range")return new G("#VALUE!","MATCH lookup_array must be a range");let a=r.getRangeValues({start:t[1].start,end:t[1].end}),s=a.length===1,o=s?a[0]:a,l=s?d=>o[d]:d=>o[d][0],f=o.length,u=1;if(t.length>=3){let d=n.evaluate(t[2],r);if(d instanceof G)return d;let p=pe(d);if(p instanceof G)return p;u=p;}let c=typeof i=="string"?i.toLowerCase():null;if(u===0){for(let d=0;d<f;d++){let p=l(d);if(c!==null&&typeof p=="string"){if(p.toLowerCase()===c)return d+1}else if(p===i)return d+1}return new G("#N/A","MATCH no exact match found")}else if(u===1){let d=-1;for(let p=0;p<f;p++){let h=l(p);if(h!=null){if(typeof i=="number"&&typeof h=="number")if(h<=i)d=p;else break;else if(c!==null&&typeof h=="string")if(h.toLowerCase()<=c)d=p;else break}}return d===-1?new G("#N/A","MATCH no match found"):d+1}else {let d=-1;for(let p=0;p<f;p++){let h=l(p);if(h!=null){if(typeof i=="number"&&typeof h=="number")if(h>=i)d=p;else break;else if(c!==null&&typeof h=="string")if(h.toLowerCase()>=c)d=p;else break}}return d===-1?new G("#N/A","MATCH no match found"):d+1}}});}function w5(e){e.set("CONCATENATE",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=[];for(let s of i){if(s instanceof G)return s;a.push(pt(s));}return a.join("")}}),e.set("CONCAT",{minArgs:1,maxArgs:-1,evaluate(t,r,n){let i=_n(t,r,n),a=[];for(let s of i){if(s instanceof G)return s;a.push(pt(s));}return a.join("")}}),e.set("UPPER",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).toUpperCase()}}),e.set("LOWER",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).toLowerCase()}}),e.set("TRIM",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).trim()}}),e.set("LEFT",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=1;if(t.length>=2){let o=n.evaluate(t[1],r);if(o instanceof G)return o;let l=pe(o);if(l instanceof G)return l;s=Math.trunc(l);}return s<0?new G("#VALUE!","LEFT num_chars must be >= 0"):a.substring(0,s)}}),e.set("RIGHT",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=1;if(t.length>=2){let o=n.evaluate(t[1],r);if(o instanceof G)return o;let l=pe(o);if(l instanceof G)return l;s=Math.trunc(l);}return s<0?new G("#VALUE!","RIGHT num_chars must be >= 0"):a.substring(Math.max(0,a.length-s))}}),e.set("MID",{minArgs:3,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=Math.trunc(o),c=Math.trunc(f);return u<1?new G("#VALUE!","MID start_num must be >= 1"):c<0?new G("#VALUE!","MID num_chars must be >= 0"):a.substring(u-1,u-1+c)}}),e.set("LEN",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).length}}),e.set("SUBSTITUTE",{minArgs:3,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pt(s),l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pt(l);if(t.length>=4){let u=n.evaluate(t[3],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;let d=Math.trunc(c);if(d<1)return new G("#VALUE!","SUBSTITUTE instance_num must be >= 1");let p=0,h="",m=0;for(;m<=a.length;){let g=a.indexOf(o,m);if(g===-1){h+=a.substring(m);break}if(p++,p===d){h+=a.substring(m,g)+f,h+=a.substring(g+o.length);break}else h+=a.substring(m,g+o.length),m=g+o.length;}return h}else return o===""?a:a.split(o).join(f)}}),e.set("FIND",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pt(s),l=1;if(t.length>=3){let u=n.evaluate(t[2],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;l=Math.trunc(c);}if(l<1)return new G("#VALUE!","FIND start_num must be >= 1");let f=o.indexOf(a,l-1);return f===-1?new G("#VALUE!","FIND text not found"):f+1}}),e.set("SEARCH",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i).toLowerCase(),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pt(s).toLowerCase(),l=1;if(t.length>=3){let u=n.evaluate(t[2],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;l=Math.trunc(c);}if(l<1)return new G("#VALUE!","SEARCH start_num must be >= 1");let f=o.indexOf(a,l-1);return f===-1?new G("#VALUE!","SEARCH text not found"):f+1}}),e.set("REPLACE",{minArgs:4,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=n.evaluate(t[3],r);if(u instanceof G)return u;let c=pt(u),d=Math.trunc(o)-1,p=Math.trunc(f);return a.substring(0,d)+c+a.substring(d+p)}}),e.set("REPT",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(o);return l<0?new G("#VALUE!","REPT number must be >= 0"):a.repeat(l)}}),e.set("EXACT",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=n.evaluate(t[1],r);return a instanceof G?a:pt(i)===pt(a)}}),e.set("PROPER",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).toLowerCase().replace(/\b\w/g,a=>a.toUpperCase())}}),e.set("CLEAN",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i).replace(/[\x00-\x1F]/g,"")}}),e.set("CHAR",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=Math.trunc(a);return s<1||s>65535?new G("#VALUE!","CHAR number must be 1-65535"):String.fromCharCode(s)}}),e.set("CODE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i);return a.length===0?new G("#VALUE!","CODE requires non-empty text"):a.charCodeAt(0)}}),e.set("TEXT",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=pt(a),o=pe(i);if(o instanceof G)return pt(i);if(s.includes("%")){let d=(s.match(/0/g)||[]).length-1;return (o*100).toFixed(Math.max(0,d))+"%"}let l=s.match(/\.(0+)/),f=l?l[1].length:0,u=s.includes(","),c=o.toFixed(f);if(u){let[d,p]=c.split("."),h=d.replace(/\B(?=(\d{3})+(?!\d))/g,",");return p?h+"."+p:h}return c}}),e.set("VALUE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G||typeof i=="number")return i;let a=pt(i).trim(),s=a.endsWith("%"),o=a.replace(/[,$%\s]/g,""),l=Number(o);return isNaN(l)?new G("#VALUE!","VALUE cannot convert text to number"):s?l/100:l}}),e.set("TEXTJOIN",{minArgs:3,maxArgs:-1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pt(i),s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=!!s,l=[];for(let f=2;f<t.length;f++){let u=t[f];if(u.kind==="range"){let c=r.getRangeValues({start:u.start,end:u.end});for(let d of c)for(let p of d){if(p instanceof G)return p;let h=pt(p);(!o||h!=="")&&l.push(h);}}else {let c=n.evaluate(t[f],r);if(c instanceof G)return c;let d=pt(c);(!o||d!=="")&&l.push(d);}}return l.join(a)}}),e.set("DOLLAR",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=2;if(t.length>=2){let p=n.evaluate(t[1],r);if(p instanceof G)return p;let h=pe(p);if(h instanceof G)return h;s=Math.trunc(h);}let o=Math.abs(a),l=s>=0?o.toFixed(s):(Math.round(o/10**-s)*10**-s).toFixed(0),[f,u]=l.split("."),c=f.replace(/\B(?=(\d{3})+(?!\d))/g,","),d=u!==void 0?`${c}.${u}`:c;return a<0?`($${d})`:`$${d}`}}),e.set("FIXED",{minArgs:1,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=2;if(t.length>=2){let h=n.evaluate(t[1],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;s=Math.trunc(m);}let o=false;if(t.length>=3){let h=n.evaluate(t[2],r);if(h instanceof G)return h;o=!!h;}let l=Math.abs(a),f=s>=0?l.toFixed(s):(Math.round(l/10**-s)*10**-s).toFixed(0);if(o)return a<0?`-${f}`:f;let[u,c]=f.split("."),d=u.replace(/\B(?=(\d{3})+(?!\d))/g,","),p=c!==void 0?`${d}.${c}`:d;return a<0?`-${p}`:p}}),e.set("T",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G||typeof i=="string"?i:""}}),e.set("N",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G||typeof i=="number"?i:typeof i=="boolean"?i?1:0:i instanceof Date?i.getTime():0}}),e.set("FORMULATEXT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=t[0];if(i.kind!=="cellRef")return new G("#N/A","FORMULATEXT requires a cell reference");if(!r.getCellFormula)return new G("#N/A","FORMULATEXT not supported in this context");let a=r.getCellFormula(i.address);return a===void 0?new G("#N/A","Cell does not contain a formula"):a}}),e.set("NUMBERVALUE",{minArgs:1,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G||typeof i=="number")return i;let a=pt(i).trim(),s=".",o=",",l=t.length>=2,f=t.length>=3;if(l){let p=n.evaluate(t[1],r);if(p instanceof G)return p;if(s=pt(p),s.length!==1)return new G("#VALUE!","NUMBERVALUE decimal separator must be 1 character");f||(o=s===","?".":",");}if(f){let p=n.evaluate(t[2],r);if(p instanceof G)return p;if(o=pt(p),o.length!==1)return new G("#VALUE!","NUMBERVALUE group separator must be 1 character")}if(s===o)return new G("#VALUE!","NUMBERVALUE separators must be different");let u=a.endsWith("%");u&&(a=a.slice(0,-1).trim());let c=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(a=a.replace(new RegExp(c,"g"),""),s!=="."){let p=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");a=a.replace(new RegExp(p),".");}let d=Number(a);return isNaN(d)?new G("#VALUE!",`NUMBERVALUE cannot parse "${pt(i)}"`):u?d/100:d}}),e.set("PHONETIC",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?i:pt(i)}});}function er(e){if(e instanceof G)return e;if(e instanceof Date)return isNaN(e.getTime())?new G("#VALUE!","Invalid date"):e;if(typeof e=="string"){let t=new Date(e);return isNaN(t.getTime())?new G("#VALUE!",`Cannot parse "${e}" as date`):t}if(typeof e=="number"){let t=new Date(e);return isNaN(t.getTime())?new G("#VALUE!","Invalid numeric date"):t}return new G("#VALUE!","Cannot convert value to date")}function _5(e){e.set("TODAY",{minArgs:0,maxArgs:0,evaluate(t,r){let n=r.now();return new Date(n.getFullYear(),n.getMonth(),n.getDate())}}),e.set("NOW",{minArgs:0,maxArgs:0,evaluate(t,r){return r.now()}}),e.set("YEAR",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getFullYear()}}),e.set("MONTH",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getMonth()+1}}),e.set("DAY",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getDate()}}),e.set("DATE",{minArgs:3,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);return f instanceof G?f:new Date(Math.trunc(a),Math.trunc(o)-1,Math.trunc(f))}}),e.set("DATEDIF",{minArgs:3,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=er(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=String(l).toUpperCase();if(a>o)return new G("#NUM!","DATEDIF start date must be <= end date");switch(f){case "Y":{let u=o.getFullYear()-a.getFullYear();return (o.getMonth()<a.getMonth()||o.getMonth()===a.getMonth()&&o.getDate()<a.getDate())&&u--,u}case "M":{let u=(o.getFullYear()-a.getFullYear())*12+o.getMonth()-a.getMonth();return o.getDate()<a.getDate()&&u--,u}case "D":return Math.floor((o.getTime()-a.getTime())/864e5);default:return new G("#VALUE!","DATEDIF unit must be Y, M, or D")}}}),e.set("EDATE",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=new Date(a);return l.setMonth(l.getMonth()+Math.trunc(o)),l}}),e.set("EOMONTH",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);return o instanceof G?o:new Date(a.getFullYear(),a.getMonth()+Math.trunc(o)+1,0)}}),e.set("WEEKDAY",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=1;if(t.length>=2){let l=n.evaluate(t[1],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;s=Math.trunc(f);}let o=a.getDay();switch(s){case 1:return o+1;case 2:return o===0?7:o;case 3:return o===0?6:o-1;default:return new G("#VALUE!","WEEKDAY return_type must be 1, 2, or 3")}}}),e.set("HOUR",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getHours()}}),e.set("MINUTE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getMinutes()}}),e.set("SECOND",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);return a instanceof G?a:a.getSeconds()}}),e.set("NETWORKDAYS",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=er(s);if(o instanceof G)return o;let l=new Date(a.getFullYear(),a.getMonth(),a.getDate()),f=new Date(o.getFullYear(),o.getMonth(),o.getDate()),u=f>=l?1:-1,[c,d]=u===1?[l,f]:[f,l],p=0,h=new Date(c);for(;h<=d;){let m=h.getDay();m!==0&&m!==6&&p++,h.setDate(h.getDate()+1);}return p*u}}),e.set("DAYS",{minArgs:2,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=er(s);if(o instanceof G)return o;let l=Date.UTC(a.getFullYear(),a.getMonth(),a.getDate()),f=Date.UTC(o.getFullYear(),o.getMonth(),o.getDate());return Math.round((l-f)/864e5)}}),e.set("DAYS360",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=er(s);if(o instanceof G)return o;let l=false;if(t.length>=3){let m=n.evaluate(t[2],r);if(m instanceof G)return m;l=!!m;}let f=a.getMonth()+1,u=o.getMonth()+1,c=a.getDate(),d=o.getDate(),p=a.getFullYear(),h=o.getFullYear();return l?(c===31&&(c=30),d===31&&(d=30)):(c===31&&(c=30),d===31&&c===30&&(d=30)),(h-p)*360+(u-f)*30+(d-c)}}),e.set("ISOWEEKNUM",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate())),o=s.getUTCDay()||7;s.setUTCDate(s.getUTCDate()+4-o);let l=new Date(Date.UTC(s.getUTCFullYear(),0,1));return Math.ceil(((s.getTime()-l.getTime())/864e5+1)/7)}}),e.set("YEARFRAC",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=er(s);if(o instanceof G)return o;let l=0;if(t.length>=3){let m=n.evaluate(t[2],r);if(m instanceof G)return m;let g=pe(m);if(g instanceof G)return g;l=Math.trunc(g);}let f=a.getFullYear(),u=a.getMonth()+1,c=a.getDate(),d=o.getFullYear(),p=o.getMonth()+1,h=o.getDate();switch(l){case 0:{let m=c===31?30:c,g=h===31&&m===30?30:h;return ((d-f)*360+(p-u)*30+(g-m))/360}case 1:{let m=(Date.UTC(d,p-1,h)-Date.UTC(f,u-1,c))/864e5,g=d===f?x5(f)?366:365:(Date.UTC(d+1,0,1)-Date.UTC(f,0,1))/864e5/(d-f+1);return m/g}case 3:return (Date.UTC(d,p-1,h)-Date.UTC(f,u-1,c))/864e5/365;default:return new G("#VALUE!","YEARFRAC basis must be 0, 1, or 3")}}}),e.set("DATEVALUE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=typeof i=="string"?i:String(i),s=new Date(a);return isNaN(s.getTime())?new G("#VALUE!",`DATEVALUE cannot parse "${a}"`):new Date(s.getFullYear(),s.getMonth(),s.getDate())}}),e.set("TIMEVALUE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=typeof i=="string"?i:String(i),s=a.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?(?:\s*(AM|PM))?$/i);if(!s)return new G("#VALUE!",`TIMEVALUE cannot parse "${a}"`);let o=parseInt(s[1],10),l=parseInt(s[2],10),f=s[3]?parseInt(s[3],10):0,u=s[4]?s[4].toUpperCase():null;return u==="PM"&&o<12&&(o+=12),u==="AM"&&o===12&&(o=0),o>23||l>59||f>59?new G("#VALUE!","TIMEVALUE: invalid time component"):(o*3600+l*60+f)/86400}}),e.set("TIME",{minArgs:3,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);return f instanceof G?f:(Math.trunc(a)*3600+Math.trunc(o)*60+Math.trunc(f))%86400/86400}}),e.set("WORKDAY",{minArgs:2,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(o),f=new Set;if(t.length>=3){let p=t[2],h;p.kind==="range"?h=r.getRangeValues({start:p.start,end:p.end}).flat():h=[n.evaluate(p,r)];for(let m of h){if(m==null)continue;let g=er(m);g instanceof G||f.add(`${g.getFullYear()}-${g.getMonth()}-${g.getDate()}`);}}let u=new Date(a.getFullYear(),a.getMonth(),a.getDate()),c=l>=0?1:-1,d=Math.abs(l);for(;d>0;){u.setDate(u.getDate()+c);let p=u.getDay();if(p===0||p===6)continue;let h=`${u.getFullYear()}-${u.getMonth()}-${u.getDate()}`;f.has(h)||d--;}return u}}),e.set("WORKDAY.INTL",{minArgs:2,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=er(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(o),f=[false,false,false,false,false,true,true];if(t.length>=3){let h=n.evaluate(t[2],r);if(h instanceof G)return h;if(typeof h=="string"&&/^[01]{7}$/.test(h))f=h.split("").map(m=>m==="1");else {let m=pe(h);if(m instanceof G)return m;let g=S5(Math.trunc(m));if(!g)return new G("#VALUE!","WORKDAY.INTL invalid weekend number");f=g;}}let u=new Set;if(t.length>=4){let h=t[3],m;h.kind==="range"?m=r.getRangeValues({start:h.start,end:h.end}).flat():m=[n.evaluate(h,r)];for(let g of m){if(g==null)continue;let v=er(g);v instanceof G||u.add(`${v.getFullYear()}-${v.getMonth()}-${v.getDate()}`);}}let c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=l>=0?1:-1,p=Math.abs(l);for(;p>0;){c.setDate(c.getDate()+d);let h=c.getDay(),m=h===0?6:h-1;if(f[m])continue;let g=`${c.getFullYear()}-${c.getMonth()}-${c.getDate()}`;u.has(g)||p--;}return c}});}function x5(e){return e%4===0&&e%100!==0||e%400===0}function S5(e){let t=[[5,6],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5]];if(e>=1&&e<=7){let r=[false,false,false,false,false,false,false],[n,i]=t[e-1];return r[n]=true,r[i]=true,r}if(e>=11&&e<=17){let r=[false,false,false,false,false,false,false],n=[6,0,1,2,3,4,5];return r[n[e-11]]=true,r}return null}function ha(e,t){return {op:e,value:t,valueLower:typeof t=="string"?t.toLowerCase():null}}function ls(e){if(typeof e=="number"||typeof e!="string")return ha("=",e);let t=e.trim();return t.startsWith(">=")?ha(">=",Xa(t.substring(2).trim())):t.startsWith("<=")?ha("<=",Xa(t.substring(2).trim())):t.startsWith("<>")?ha("<>",Xa(t.substring(2).trim())):t.startsWith(">")?ha(">",Xa(t.substring(1).trim())):t.startsWith("<")?ha("<",Xa(t.substring(1).trim())):t.startsWith("=")?ha("=",Xa(t.substring(1).trim())):ha("=",Xa(t))}function Xa(e){let t=Number(e);return !isNaN(t)&&e!==""?t:e}function us(e,t){let{op:r,value:n}=t,i=e;if(typeof n=="number"&&typeof e!="number"){let a=pe(e);if(a instanceof G)return false;i=a;}if(typeof i=="string"&&t.valueLower!==null){let a=i.toLowerCase(),s=t.valueLower;switch(r){case "=":return a===s;case "<>":return a!==s;case ">":return a>s;case "<":return a<s;case ">=":return a>=s;case "<=":return a<=s}}if(typeof i=="number"&&typeof n=="number")switch(r){case "=":return i===n;case "<>":return i!==n;case ">":return i>n;case "<":return i<n;case ">=":return i>=n;case "<=":return i<=n}return r==="="?i===n:r==="<>"?i!==n:false}function C5(e){e.set("SUMIF",{minArgs:2,maxArgs:3,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","SUMIF range must be a cell range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=ls(a),o;if(t.length>=3){if(t[2].kind!=="range")return new G("#VALUE!","SUMIF sum_range must be a cell range");o=r.getRangeValues({start:t[2].start,end:t[2].end});}else o=i;let l=0;for(let f=0;f<i.length;f++)for(let u=0;u<i[f].length;u++)if(us(i[f][u],s)){let c=o[f]&&o[f][u]!==void 0?o[f][u]:null,d=pe(c);typeof d=="number"&&(l+=d);}return l}}),e.set("COUNTIF",{minArgs:2,maxArgs:2,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","COUNTIF range must be a cell range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=ls(a),o=0;for(let l=0;l<i.length;l++)for(let f=0;f<i[l].length;f++)us(i[l][f],s)&&o++;return o}}),e.set("AVERAGEIF",{minArgs:2,maxArgs:3,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","AVERAGEIF range must be a cell range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=n.evaluate(t[1],r);if(a instanceof G)return a;let s=ls(a),o;if(t.length>=3){if(t[2].kind!=="range")return new G("#VALUE!","AVERAGEIF avg_range must be a cell range");o=r.getRangeValues({start:t[2].start,end:t[2].end});}else o=i;let l=0,f=0;for(let u=0;u<i.length;u++)for(let c=0;c<i[u].length;c++)if(us(i[u][c],s)){let d=o[u]&&o[u][c]!==void 0?o[u][c]:null,p=pe(d);typeof p=="number"&&(l+=p,f++);}return f===0?new G("#DIV/0!","No matching values for AVERAGEIF"):l/f}}),e.set("SUMIFS",{minArgs:3,maxArgs:-1,evaluate(t,r,n){if((t.length-1)%2!==0)return new G("#VALUE!","SUMIFS requires sum_range + pairs of criteria_range, criteria");if(t[0].kind!=="range")return new G("#VALUE!","SUMIFS sum_range must be a cell range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=[];for(let o=1;o<t.length;o+=2){let l=t[o];if(l.kind!=="range")return new G("#VALUE!","SUMIFS criteria_range must be a cell range");let f=r.getRangeValues({start:l.start,end:l.end}),u=n.evaluate(t[o+1],r);if(u instanceof G)return u;a.push({range:f,criteria:ls(u)});}let s=0;for(let o=0;o<i.length;o++)for(let l=0;l<i[o].length;l++){let f=true;for(let u of a){let c=u.range[o]?.[l];if(!us(c,u.criteria)){f=false;break}}if(f){let u=pe(i[o][l]);typeof u=="number"&&(s+=u);}}return s}}),e.set("COUNTIFS",{minArgs:2,maxArgs:-1,evaluate(t,r,n){if(t.length%2!==0)return new G("#VALUE!","COUNTIFS requires pairs of criteria_range, criteria");let i=[];for(let o=0;o<t.length;o+=2){let l=t[o];if(l.kind!=="range")return new G("#VALUE!","COUNTIFS criteria_range must be a cell range");let f=r.getRangeValues({start:l.start,end:l.end}),u=n.evaluate(t[o+1],r);if(u instanceof G)return u;i.push({range:f,criteria:ls(u)});}let a=i[0].range,s=0;for(let o=0;o<a.length;o++)for(let l=0;l<a[o].length;l++){let f=true;for(let u of i){let c=u.range[o]?.[l];if(!us(c,u.criteria)){f=false;break}}f&&s++;}return s}}),e.set("AVERAGEIFS",{minArgs:3,maxArgs:-1,evaluate(t,r,n){if((t.length-1)%2!==0)return new G("#VALUE!","AVERAGEIFS requires avg_range + pairs of criteria_range, criteria");if(t[0].kind!=="range")return new G("#VALUE!","AVERAGEIFS avg_range must be a cell range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=[];for(let l=1;l<t.length;l+=2){let f=t[l];if(f.kind!=="range")return new G("#VALUE!","AVERAGEIFS criteria_range must be a cell range");let u=r.getRangeValues({start:f.start,end:f.end}),c=n.evaluate(t[l+1],r);if(c instanceof G)return c;a.push({range:u,criteria:ls(c)});}let s=0,o=0;for(let l=0;l<i.length;l++)for(let f=0;f<i[l].length;f++){let u=true;for(let c of a){let d=c.range[l]?.[f];if(!us(d,c.criteria)){u=false;break}}if(u){let c=pe(i[l][f]);typeof c=="number"&&(s+=c,o++);}}return o===0?new G("#DIV/0!","No matching values for AVERAGEIFS"):s/o}});}function E5(e){e.set("ISBLANK",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i==null||i===""}}),e.set("ISNUMBER",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return typeof i=="number"&&!isNaN(i)}}),e.set("ISTEXT",{minArgs:1,maxArgs:1,evaluate(t,r,n){return typeof n.evaluate(t[0],r)=="string"}}),e.set("ISERROR",{minArgs:1,maxArgs:1,evaluate(t,r,n){return n.evaluate(t[0],r)instanceof G}}),e.set("ISNA",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G&&i.type==="#N/A"}}),e.set("TYPE",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?16:typeof i=="number"?1:typeof i=="string"?2:typeof i=="boolean"?4:1}}),e.set("ISODD",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(typeof i=="boolean")return new G("#VALUE!","ISODD requires a number");let a=pe(i);return a instanceof G?a:Math.trunc(a)%2!==0}}),e.set("ISEVEN",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;if(typeof i=="boolean")return new G("#VALUE!","ISEVEN requires a number");let a=pe(i);return a instanceof G?a:Math.trunc(a)%2===0}}),e.set("ISFORMULA",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=t[0];return i.kind!=="cellRef"||!r.getCellFormula?false:r.getCellFormula(i.address)!==void 0}}),e.set("ISLOGICAL",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?false:typeof i=="boolean"}}),e.set("ISNONTEXT",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=n.evaluate(t[0],r);return i instanceof G?true:typeof i!="string"}}),e.set("ISREF",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=t[0];return i.kind==="cellRef"||i.kind==="range"}});}function R5(e){e.set("PMT",{minArgs:3,maxArgs:5,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=0;if(t.length>=4){let h=n.evaluate(t[3],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;u=m;}let c=0;if(t.length>=5){let h=n.evaluate(t[4],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;c=m;}if(o===0)return new G("#NUM!","PMT: nper cannot be 0");if(a===0)return -(f+u)/o;let d=(1+a)**o,p=c!==0?1+a:1;return -(f*d+u)/((d-1)/a*p)}}),e.set("FV",{minArgs:3,maxArgs:5,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=0;if(t.length>=4){let h=n.evaluate(t[3],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;u=m;}let c=0;if(t.length>=5){let h=n.evaluate(t[4],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;c=m;}if(a===0)return -(u+f*o);let d=(1+a)**o,p=c!==0?1+a:1;return -(u*d+f*p*(d-1)/a)}}),e.set("PV",{minArgs:3,maxArgs:5,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=0;if(t.length>=4){let h=n.evaluate(t[3],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;u=m;}let c=0;if(t.length>=5){let h=n.evaluate(t[4],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;c=m;}if(a===0)return -f*o-u;let d=(1+a)**o,p=c!==0?1+a:1;return -(u+f*p*(d-1)/a)/d}}),e.set("NPER",{minArgs:3,maxArgs:5,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=0;if(t.length>=4){let g=n.evaluate(t[3],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;u=v;}let c=0;if(t.length>=5){let g=n.evaluate(t[4],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;c=v;}if(a===0)return o===0?new G("#NUM!","NPER: pmt cannot be 0 when rate is 0"):-(f+u)/o;let d=c!==0?1+a:1,p=o*d,h=p-u*a,m=p+f*a;return m===0?new G("#DIV/0!","NPER: division by zero"):h/m<=0?new G("#NUM!","NPER: logarithm of non-positive number"):Math.log(h/m)/Math.log(1+a)}}),e.set("RATE",{minArgs:3,maxArgs:6,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=0;if(t.length>=4){let g=n.evaluate(t[3],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;u=v;}let c=0;if(t.length>=5){let g=n.evaluate(t[4],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;c=v;}let d=.1;if(t.length>=6){let g=n.evaluate(t[5],r);if(g instanceof G)return g;let v=pe(g);if(v instanceof G)return v;d=v;}let p=20,h=1e-7,m=d;for(let g=0;g<p;g++){if(m<=-1)return new G("#NUM!","RATE: rate converged to invalid value");let v=(1+m)**a,w=c!==0?1+m:1,C,T;if(Math.abs(m)<1e-10)C=f+o*a+u,T=f*a+o*a*(a-1)/2;else {C=f*v+o*w*(v-1)/m+u;let k=a*(1+m)**(a-1),D=c!==0?1:0;T=f*k+o*(D*(v-1)/m+w*(k*m-(v-1))/(m*m));}if(Math.abs(T)<1e-15)return new G("#NUM!","RATE: derivative too small, no convergence");let I=C/T;if(m=m-I,Math.abs(I)<h)return m}return new G("#NUM!","RATE: did not converge")}}),e.set("NPV",{minArgs:2,maxArgs:-1,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=_n(t.slice(1),r,n),o=0,l=1;for(let f of s){if(f instanceof G)return f;(typeof f=="number"||typeof f=="boolean")&&(o+=(typeof f=="boolean"?f?1:0:f)/(1+a)**l,l++);}return o}}),e.set("IRR",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=_n([t[0]],r,n),a=[];for(let u of i){if(u instanceof G)return u;typeof u=="number"?a.push(u):typeof u=="boolean"&&a.push(u?1:0);}if(a.length===0)return new G("#NUM!","IRR: no values");let s=.1;if(t.length>=2){let u=n.evaluate(t[1],r);if(u instanceof G)return u;let c=pe(u);if(c instanceof G)return c;s=c;}let o=20,l=1e-7,f=s;for(let u=0;u<o;u++){if(f<=-1)return new G("#NUM!","IRR: rate converged below -1");let c=0,d=0;for(let h=0;h<a.length;h++){let m=(1+f)**h;c+=a[h]/m,h>0&&(d-=h*a[h]/(1+f)**(h+1));}if(Math.abs(d)<1e-15)return new G("#NUM!","IRR: derivative too small");let p=c/d;if(f=f-p,Math.abs(p)<l)return f}return new G("#NUM!","IRR: did not converge")}}),e.set("SLN",{minArgs:3,maxArgs:3,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);return f instanceof G?f:f===0?new G("#DIV/0!","SLN: life cannot be 0"):(a-o)/f}});}function Xn(e,t,r){let n=_n(e,t,r),i=[];for(let a of n){if(a instanceof G)return a;typeof a=="number"?i.push(a):typeof a=="boolean"&&i.push(a?1:0);}return i}function cs(e){let t=0;for(let r of e)t+=r;return t/e.length}function A5(e){let t={minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length<2)return new G("#DIV/0!","STDEV requires at least 2 values");let p=cs(d),h=0;for(let m of d)h+=(m-p)*(m-p);return Math.sqrt(h/(d.length-1))}};e.set("STDEV",t),e.set("STDEV.S",t);let r={minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length===0)return new G("#DIV/0!","STDEVP requires at least 1 value");let p=cs(d),h=0;for(let m of d)h+=(m-p)*(m-p);return Math.sqrt(h/d.length)}};e.set("STDEVP",r),e.set("STDEV.P",r);let n={minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length<2)return new G("#DIV/0!","VAR requires at least 2 values");let p=cs(d),h=0;for(let m of d)h+=(m-p)*(m-p);return h/(d.length-1)}};e.set("VAR",n),e.set("VAR.S",n);let i={minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length===0)return new G("#DIV/0!","VARP requires at least 1 value");let p=cs(d),h=0;for(let m of d)h+=(m-p)*(m-p);return h/d.length}};e.set("VARP",i),e.set("VAR.P",i),e.set("CORREL",{minArgs:2,maxArgs:2,evaluate(f,u,c){let d=Xn([f[0]],u,c);if(d instanceof G)return d;let p=Xn([f[1]],u,c);if(p instanceof G)return p;if(d.length!==p.length)return new G("#N/A","CORREL: arrays must have same number of values");if(d.length<2)return new G("#DIV/0!","CORREL requires at least 2 paired values");let h=cs(d),m=cs(p),g=0,v=0,w=0;for(let T=0;T<d.length;T++){let I=d[T]-h,k=p[T]-m;g+=I*k,v+=I*I,w+=k*k;}let C=Math.sqrt(v*w);return C===0?new G("#DIV/0!","CORREL: zero variance"):g/C}});function a(f,u){if(u<0||u>1)return new G("#NUM!","PERCENTILE: k must be between 0 and 1");if(f.length===0)return new G("#NUM!","PERCENTILE: empty array");let c=[...f].sort((g,v)=>g-v),d=u*(c.length-1),p=Math.floor(d),h=Math.ceil(d);if(p===h)return c[p];let m=d-p;return c[p]+m*(c[h]-c[p])}let s={minArgs:2,maxArgs:2,evaluate(f,u,c){let d=Xn([f[0]],u,c);if(d instanceof G)return d;let p=c.evaluate(f[1],u);if(p instanceof G)return p;let h=pe(p);return h instanceof G?h:a(d,h)}};e.set("PERCENTILE",s),e.set("PERCENTILE.INC",s);let o={minArgs:2,maxArgs:2,evaluate(f,u,c){let d=Xn([f[0]],u,c);if(d instanceof G)return d;let p=c.evaluate(f[1],u);if(p instanceof G)return p;let h=pe(p);if(h instanceof G)return h;let m=Math.trunc(h);return m<0||m>4?new G("#NUM!","QUARTILE: quart must be 0, 1, 2, 3, or 4"):a(d,m*.25)}};e.set("QUARTILE",o),e.set("QUARTILE.INC",o);let l={minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length===0)return new G("#N/A","MODE: no numeric values");let p=new Map;for(let g of d)p.set(g,(p.get(g)??0)+1);let h=0,m=null;for(let g of d){let v=p.get(g)??0;v>h&&(h=v,m=g);}return h<1||m===null?new G("#N/A","MODE: no values"):m}};e.set("MODE",l),e.set("MODE.SNGL",l),e.set("GEOMEAN",{minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length===0)return new G("#NUM!","GEOMEAN: no numeric values");let p=0;for(let h of d){if(h<=0)return new G("#NUM!","GEOMEAN: all values must be positive");p+=Math.log(h);}return Math.exp(p/d.length)}}),e.set("HARMEAN",{minArgs:1,maxArgs:-1,evaluate(f,u,c){let d=Xn(f,u,c);if(d instanceof G)return d;if(d.length===0)return new G("#NUM!","HARMEAN: no numeric values");let p=0;for(let h of d){if(h<=0)return new G("#NUM!","HARMEAN: all values must be positive");p+=1/h;}return p===0?new G("#DIV/0!","HARMEAN: sum of reciprocals is zero"):d.length/p}});}function T5(e){e.set("INDIRECT",{minArgs:1,maxArgs:2,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=String(i??""),s=Dc(a);if(s){let l=s.start,f=s.end;return l.row===f.row&&(l.col,f.col),r.getCellValue(l)}let o=li(a);return o?r.getCellValue(o):new G("#REF!",`INDIRECT: invalid reference "${a}"`)}}),e.set("OFFSET",{minArgs:3,maxArgs:5,evaluate(t,r,n){let i,a;if(t[0].kind==="cellRef")i=t[0].address.col,a=t[0].address.row;else if(t[0].kind==="range")i=t[0].start.col,a=t[0].start.row;else return new G("#VALUE!","OFFSET: first argument must be a cell reference");let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=n.evaluate(t[2],r);if(l instanceof G)return l;let f=pe(l);if(f instanceof G)return f;let u=a+Math.trunc(o),c=i+Math.trunc(f);if(u<0||c<0)return new G("#REF!","OFFSET: reference out of bounds");let d=1;if(t.length>=4){let h=n.evaluate(t[3],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;d=Math.trunc(m);}let p=1;if(t.length>=5){let h=n.evaluate(t[4],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;p=Math.trunc(m);}return d<=0||p<=0?new G("#VALUE!","OFFSET: height and width must be >= 1"):d===1&&p===1?r.getCellValue({col:c,row:u,absCol:false,absRow:false}):r.getCellValue({col:c,row:u,absCol:false,absRow:false})}}),e.set("ADDRESS",{minArgs:2,maxArgs:5,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=n.evaluate(t[1],r);if(s instanceof G)return s;let o=pe(s);if(o instanceof G)return o;let l=Math.trunc(a),f=Math.trunc(o);if(l<1||f<1)return new G("#VALUE!","ADDRESS: row and column must be >= 1");let u=1;if(t.length>=3){let h=n.evaluate(t[2],r);if(h instanceof G)return h;let m=pe(h);if(m instanceof G)return m;u=Math.trunc(m);}let c="";if(t.length>=5){let h=n.evaluate(t[4],r);if(h instanceof G)return h;h!=null&&h!==false&&(c=String(h));}let d=d5(f-1),p;switch(u){case 1:p=`$${d}$${l}`;break;case 2:p=`${d}$${l}`;break;case 3:p=`$${d}${l}`;break;case 4:p=`${d}${l}`;break;default:p=`$${d}$${l}`;}return c?`${c.includes(" ")?`'${c}'`:c}!${p}`:p}}),e.set("ROW",{minArgs:0,maxArgs:1,evaluate(t,r,n){if(t.length===0)return 1;let i=t[0];if(i.kind==="cellRef")return i.address.row+1;if(i.kind==="range")return i.start.row+1;let a=n.evaluate(i,r);if(a instanceof G)return a;let s=String(a??""),o=li(s);if(!o){let l=Dc(s);return l?l.start.row+1:new G("#VALUE!","ROW: invalid reference")}return o.row+1}}),e.set("COLUMN",{minArgs:0,maxArgs:1,evaluate(t,r,n){if(t.length===0)return 1;let i=t[0];if(i.kind==="cellRef")return i.address.col+1;if(i.kind==="range")return i.start.col+1;let a=n.evaluate(i,r);if(a instanceof G)return a;let s=String(a??""),o=li(s);if(!o){let l=Dc(s);return l?l.start.col+1:new G("#VALUE!","COLUMN: invalid reference")}return o.col+1}}),e.set("ROWS",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=t[0];return i.kind==="range"?Math.abs(i.end.row-i.start.row)+1:i.kind==="cellRef"?1:new G("#VALUE!","ROWS: argument must be a range reference")}}),e.set("COLUMNS",{minArgs:1,maxArgs:1,evaluate(t,r,n){let i=t[0];return i.kind==="range"?Math.abs(i.end.col-i.start.col)+1:i.kind==="cellRef"?1:new G("#VALUE!","COLUMNS: argument must be a range reference")}}),e.set("SEQUENCE",{minArgs:1,maxArgs:4,evaluate(t,r,n){let i=n.evaluate(t[0],r);if(i instanceof G)return i;let a=pe(i);if(a instanceof G)return a;let s=1;if(t.length>=2){let p=n.evaluate(t[1],r);if(p instanceof G)return p;let h=pe(p);if(h instanceof G)return h;s=Math.trunc(h);}let o=1;if(t.length>=3){let p=n.evaluate(t[2],r);if(p instanceof G)return p;let h=pe(p);if(h instanceof G)return h;o=h;}let l=1;if(t.length>=4){let p=n.evaluate(t[3],r);if(p instanceof G)return p;let h=pe(p);if(h instanceof G)return h;l=h;}let f=Math.trunc(a),u=Math.max(1,s);if(f<1)return new G("#VALUE!","SEQUENCE: rows must be >= 1");let c=[],d=o;for(let p=0;p<f;p++){let h=[];for(let m=0;m<u;m++)h.push(d),d+=l;c.push(h);}return c[0][0]}}),e.set("TRANSPOSE",{minArgs:1,maxArgs:1,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","TRANSPOSE: argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end});if(i.length===0)return null;let a=i.length,s=i[0].length,o=[];for(let l=0;l<s;l++){let f=[];for(let u=0;u<a;u++)f.push(i[u][l]);o.push(f);}return o[0][0]??null}}),e.set("MMULT",{minArgs:2,maxArgs:2,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","MMULT: array1 must be a range");if(t[1].kind!=="range")return new G("#VALUE!","MMULT: array2 must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end}),a=r.getRangeValues({start:t[1].start,end:t[1].end});if(i.length===0||a.length===0)return new G("#VALUE!","MMULT: empty array");let s=i.length,o=i[0].length,l=a.length,f=a[0].length;if(o!==l)return new G("#VALUE!",`MMULT: columns of array1 (${o}) must equal rows of array2 (${l})`);let u=[];for(let c=0;c<s;c++){let d=[];for(let p=0;p<f;p++){let h=0;for(let m=0;m<o;m++){let g=pe(i[c][m]),v=pe(a[m][p]);if(g instanceof G)return g;if(v instanceof G)return v;h+=g*v;}d.push(h);}u.push(d);}return u[0][0]}}),e.set("MDETERM",{minArgs:1,maxArgs:1,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","MDETERM: argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end});if(i.length===0)return new G("#VALUE!","MDETERM: empty array");let a=i.length;if(i.some(o=>o.length!==a))return new G("#VALUE!","MDETERM: array must be square");let s=[];for(let o=0;o<a;o++){let l=[];for(let f=0;f<a;f++){let u=pe(i[o][f]);if(u instanceof G)return u;l.push(u);}s.push(l);}return zy(s)}}),e.set("MINVERSE",{minArgs:1,maxArgs:1,evaluate(t,r,n){if(t[0].kind!=="range")return new G("#VALUE!","MINVERSE: argument must be a range");let i=r.getRangeValues({start:t[0].start,end:t[0].end});if(i.length===0)return new G("#VALUE!","MINVERSE: empty array");let a=i.length;if(i.some(l=>l.length!==a))return new G("#VALUE!","MINVERSE: array must be square");let s=[];for(let l=0;l<a;l++){let f=[];for(let u=0;u<a;u++){let c=pe(i[l][u]);if(c instanceof G)return c;f.push(c);}s.push(f);}let o=M5(s,a);return o instanceof G?o:o[0][0]}});}function zy(e){let t=e.length;if(t===1)return e[0][0];if(t===2)return e[0][0]*e[1][1]-e[0][1]*e[1][0];let r=0;for(let n=0;n<t;n++){let i=[];for(let a=1;a<t;a++){let s=[];for(let o=0;o<t;o++)o!==n&&s.push(e[a][o]);i.push(s);}r+=(n%2===0?1:-1)*e[0][n]*zy(i);}return r}function M5(e,t){let r=[];for(let i=0;i<t;i++){let a=[...e[i]];for(let s=0;s<t;s++)a.push(s===i?1:0);r.push(a);}for(let i=0;i<t;i++){let a=-1,s=0;for(let l=i;l<t;l++)Math.abs(r[l][i])>Math.abs(s)&&(s=r[l][i],a=l);if(a===-1||Math.abs(s)<1e-12)return new G("#NUM!","MINVERSE: matrix is singular");a!==i&&([r[i],r[a]]=[r[a],r[i]]);let o=r[i][i];for(let l=0;l<2*t;l++)r[i][l]/=o;for(let l=0;l<t;l++)if(l!==i){let f=r[l][i];for(let u=0;u<2*t;u++)r[l][u]-=f*r[i][u];}}let n=[];for(let i=0;i<t;i++)n.push(r[i].slice(t));return n}function k5(){let e=new Map;return b5(e),v5(e),y5(e),w5(e),_5(e),C5(e),E5(e),R5(e),A5(e),T5(e),e}function Ny(e){let t=new Set;function r(n){switch(n.kind){case "cellRef":t.add(Gr(n.address.col,n.address.row,n.address.sheet));break;case "range":{let i=n.start.sheet,a=Math.min(n.start.row,n.end.row),s=Math.max(n.start.row,n.end.row),o=Math.min(n.start.col,n.end.col),l=Math.max(n.start.col,n.end.col);for(let f=a;f<=s;f++)for(let u=o;u<=l;u++)t.add(Gr(u,f,i));break}case "functionCall":for(let i of n.args)r(i);break;case "binaryOp":r(n.left),r(n.right);break;case "unaryOp":r(n.operand);break}}return r(e),t}var jy=class{constructor(e){this.formulas=new Map,this.parsedFormulas=new Map,this.values=new Map,this.depGraph=new g5,this.namedRanges=new Map,this.sheetAccessors=new Map;let t=k5();if(e?.customFunctions)for(let[r,n]of Object.entries(e.customFunctions))t.set(r.toUpperCase(),n);if(e?.namedRanges)for(let[r,n]of Object.entries(e.namedRanges))this.namedRanges.set(r.toUpperCase(),n);this.evaluator=new m5(t),this.maxChainLength=e?.maxChainLength??1e3;}setFormula(e,t,r,n){let i=Gr(e,t);if(r===null||r===""){let p=this.values.get(i);return this.formulas.delete(i),this.parsedFormulas.delete(i),this.values.delete(i),this.depGraph.removeDependencies(i),{updatedCells:p!==void 0?[{cellKey:i,col:e,row:t,oldValue:p,newValue:void 0}]:[]}}let a=r.startsWith("=")?r.slice(1):r,s;try{let p=Fp(a);s=ky(p,this.namedRanges);}catch(p){s={kind:"error",error:p instanceof G?p:new G("#ERROR!",String(p))};}let o=Ny(s);if(o.has(i)||this.depGraph.wouldCreateCycle(i,o)){let p=this.values.get(i),h=new G("#CIRC!","Circular reference detected");return this.formulas.set(i,r),this.parsedFormulas.set(i,s),this.values.set(i,h),this.depGraph.setDependencies(i,o),{updatedCells:[{cellKey:i,col:e,row:t,oldValue:p,newValue:h}]}}this.depGraph.setDependencies(i,o),this.formulas.set(i,r),this.parsedFormulas.set(i,s);let l=this.values.get(i),f=this.createContext(n),u=this.evaluator.evaluate(s,f);this.values.set(i,u);let c=[{cellKey:i,col:e,row:t,oldValue:l,newValue:u}],d=this.depGraph.getRecalcOrder(i);return this.recalcCells(d,n,c),{updatedCells:c}}onCellChanged(e,t,r){let n=Gr(e,t),i=this.depGraph.getRecalcOrder(n);if(i.length===0)return {updatedCells:[]};let a=[];return this.recalcCells(i,r,a),{updatedCells:a}}onCellsChanged(e,t){let r=e.map(a=>Gr(a.col,a.row)),n=this.depGraph.getRecalcOrderBatch(r);if(n.length===0)return {updatedCells:[]};let i=[];return this.recalcCells(n,t,i),{updatedCells:i}}getValue(e,t){return this.values.get(Gr(e,t))}getFormula(e,t){return this.formulas.get(Gr(e,t))}hasFormula(e,t){return this.formulas.has(Gr(e,t))}registerFunction(e,t){this.evaluator.registerFunction(e,t);}recalcAll(e){let t=[],r=this.createContext(e);if(this.formulas.size===0)return {updatedCells:t};let n=[];for(let s of this.formulas.keys())n.push(s);let i=this.depGraph.getRecalcOrderBatch(n),a=new Set(i);for(let s of n)if(!a.has(s)){let{col:o,row:l}=ss(s),f=this.parsedFormulas.get(s);if(!f)continue;let u=this.values.get(s),c=this.evaluator.evaluate(f,r);this.values.set(s,c),t.push({cellKey:s,col:o,row:l,oldValue:u,newValue:c});}return this.recalcCells(i,e,t),{updatedCells:t}}clear(){this.formulas.clear(),this.parsedFormulas.clear(),this.values.clear(),this.depGraph.clear();}getAllFormulas(){let e=[];for(let[t,r]of this.formulas){let{col:n,row:i}=ss(t);e.push({col:n,row:i,formula:r});}return e}loadFormulas(e,t){this.clear();for(let{col:r,row:n,formula:i}of e){let a=Gr(r,n),s=i.startsWith("=")?i.slice(1):i,o;try{let f=Fp(s);o=ky(f,this.namedRanges);}catch(f){o={kind:"error",error:f instanceof G?f:new G("#ERROR!",String(f))};}this.formulas.set(a,i),this.parsedFormulas.set(a,o);let l=Ny(o);this.depGraph.setDependencies(a,l);}return this.recalcAll(t)}defineNamedRange(e,t){this.namedRanges.set(e.toUpperCase(),t);}removeNamedRange(e){this.namedRanges.delete(e.toUpperCase());}getNamedRanges(){return this.namedRanges}registerSheet(e,t){this.sheetAccessors.set(e,t);}unregisterSheet(e){this.sheetAccessors.delete(e);}getPrecedents(e,t){let r=Gr(e,t),n=[],i=new Set,a=[],s=this.depGraph.getDependencies(r);for(let l of s)i.has(l)||(i.add(l),a.push(l));let o=0;for(;o<a.length;){let l=a[o++],f=ss(l);n.push({cellKey:l,col:f.col,row:f.row,formula:this.formulas.get(l),value:this.values.has(l)?this.values.get(l):void 0});let u=this.depGraph.getDependencies(l);for(let c of u)i.has(c)||(i.add(c),a.push(c));}return n}getDependents(e,t){let r=Gr(e,t),n=[],i=new Set,a=[],s=this.depGraph.getDependents(r);for(let l of s)i.has(l)||(i.add(l),a.push(l));let o=0;for(;o<a.length;){let l=a[o++],f=ss(l);n.push({cellKey:l,col:f.col,row:f.row,formula:this.formulas.get(l),value:this.values.has(l)?this.values.get(l):void 0});let u=this.depGraph.getDependents(l);for(let c of u)i.has(c)||(i.add(c),a.push(c));}return n}getAuditTrail(e,t){let r=Gr(e,t);return {target:{cellKey:r,col:e,row:t,formula:this.formulas.get(r),value:this.values.has(r)?this.values.get(r):void 0},precedents:this.getPrecedents(e,t),dependents:this.getDependents(e,t)}}createContext(e){let t=new Date;return {getCellValue:r=>{let n=Gr(r.col,r.row,r.sheet);if(this.values.has(n))return this.values.get(n);if(r.sheet){let i=this.sheetAccessors.get(r.sheet);return i?i.getCellValue(r.col,r.row):new G("#REF!",`Unknown sheet: ${r.sheet}`)}return e.getCellValue(r.col,r.row)},getRangeValues:r=>{let n=[],i=r.start.sheet,a=i?this.sheetAccessors.get(i):e;if(i&&!a)return [[new G("#REF!",`Unknown sheet: ${i}`)]];let s=Math.min(r.start.row,r.end.row),o=Math.max(r.start.row,r.end.row),l=Math.min(r.start.col,r.end.col),f=Math.max(r.start.col,r.end.col);for(let u=s;u<=o;u++){let c=[];for(let d=l;d<=f;d++){let p=Gr(d,u,i);this.values.has(p)?c.push(this.values.get(p)):c.push(a?.getCellValue(d,u));}n.push(c);}return n},now:()=>t,getCellFormula:r=>{let n=Gr(r.col,r.row,r.sheet);return this.formulas.get(n)}}}recalcCells(e,t,r){let n=this.createContext(t),i=0;for(let a of e){if(i++>this.maxChainLength){let{col:c,row:d}=ss(a),p=this.values.get(a),h=new G("#CIRC!","Dependency chain too long");this.values.set(a,h),r.push({cellKey:a,col:c,row:d,oldValue:p,newValue:h});continue}let s=this.parsedFormulas.get(a);if(!s)continue;let{col:o,row:l}=ss(a),f=this.values.get(a),u=this.evaluator.evaluate(s,n);this.values.set(a,u),r.push({cellKey:a,col:o,row:l,oldValue:f,newValue:u});}}},O5=/^\$?([A-Za-z]+)\$?(\d+)$/;function Bp(e){let t=e.match(O5);return t?{col:Iy(t[1]),row:parseInt(t[2],10)-1}:null}function Ly(e,t,r,n){e==="Enter"?(t(),r()):e==="Escape"&&(t(),n());}function By(e,t,r,n,i){let a=e.trim();a.startsWith("=")?n(t,r,a):(n(t,r,null),i?.(t,r,a));}function Fy(e,t,r,n){if(e==null||t==null)return "";let i=r?.(e,t);if(i)return i;let a=n?.(e,t);return a!=null?String(a):""}function D5(e,t){if(!e.startsWith("="))return false;if(t<=1)return true;let r=e[t-1];return /[+\-*/^%&=<>(,:\s]/.test(r)}function Py(e,t,r){if(D5(e,t))return {text:e.substring(0,t)+r+e.substring(t),cursorPos:t+r.length};let n=t;for(;n>1&&/[A-Za-z0-9$]/.test(e[n-1]);)n--;return {text:e.substring(0,n)+r+e.substring(t),cursorPos:n+r.length}}function Uy(e){if(!e||e[0]!=="=")return [];let t=[],r=0;try{let n=Fp(e.substring(1));for(let i=0;i<n.length;i++){let a=n[i];if(a.type==="CELL_REF"){if(i+2<n.length&&n[i+1].type==="COLON"&&n[i+2].type==="CELL_REF"){let o=Bp(a.value),l=Bp(n[i+2].value);if(o&&l){t.push({type:"range",col:o.col,row:o.row,endCol:l.col,endRow:l.row,colorIndex:r++%6}),i+=2;continue}}let s=Bp(a.value);s&&t.push({type:"cell",col:s.col,row:s.row,colorIndex:r++%6});}}}catch{}return t}var Pp=["var(--ogrid-formula-ref-0, #4285f4)","var(--ogrid-formula-ref-1, #ea4335)","var(--ogrid-formula-ref-2, #34a853)","var(--ogrid-formula-ref-3, #9334e6)","var(--ogrid-formula-ref-4, #ff6d01)","var(--ogrid-formula-ref-5, #46bdc6)"];var jl={bar:{display:"flex",alignItems:"center",borderBottom:"1px solid var(--ogrid-border, #e0e0e0)",background:"var(--ogrid-bg, #fff)",minHeight:"28px",fontSize:"13px"},nameBox:{fontFamily:"monospace",fontSize:"12px",fontWeight:500,padding:"2px 8px",borderRight:"1px solid var(--ogrid-border, #e0e0e0)",background:"var(--ogrid-bg, #fff)",color:"var(--ogrid-fg, #242424)",minWidth:"52px",textAlign:"center",lineHeight:"24px",userSelect:"none",whiteSpace:"nowrap"},fxLabel:{padding:"2px 8px",fontStyle:"italic",fontWeight:600,color:"var(--ogrid-muted-fg, #888)",userSelect:"none",borderRight:"1px solid var(--ogrid-border, #e0e0e0)",lineHeight:"24px",fontSize:"12px"},input:{flex:1,border:"none",outline:"none",padding:"2px 8px",fontFamily:"monospace",fontSize:"12px",lineHeight:"24px",background:"transparent",color:"var(--ogrid-fg, #242424)",minWidth:0}};var ae=Ke(rn());var pa=Ke(ht(),1),t2=Ke(Pi(),1);function Ya(e,t,r){let n=r.initialDeps??[],i,a=true;function s(){var o,l,f;let u;r.key&&((o=r.debug)!=null&&o.call(r))&&(u=Date.now());let c=e();if(!(c.length!==n.length||c.some((h,m)=>n[m]!==h)))return i;n=c;let p;if(r.key&&((l=r.debug)!=null&&l.call(r))&&(p=Date.now()),i=t(...c),r.key&&((f=r.debug)!=null&&f.call(r))){let h=Math.round((Date.now()-u)*100)/100,m=Math.round((Date.now()-p)*100)/100,g=m/16,v=(w,C)=>{for(w=String(w);w.length<C;)w=" "+w;return w};console.info(`%c\u23F1 ${v(m,5)} /${v(h,5)} ms`,`
|
|
40
|
+
font-size: .6rem;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,r?.key);}return r?.onChange&&!(a&&r.skipInitialOnChange)&&r.onChange(i),a=false,i}return s.updateDeps=o=>{n=o;},s}function Up(e,t){if(e===void 0)throw new Error(`Unexpected undefined${""}`);return e}var qy=(e,t)=>Math.abs(e-t)<1.01,Wy=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r);}};var $y=e=>{let{offsetWidth:t,offsetHeight:r}=e;return {width:t,height:r}},z5=e=>e,j5=e=>{let t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let i=t;i<=r;i++)n.push(i);return n},Ky=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let i=s=>{let{width:o,height:l}=s;t({width:Math.round(o),height:Math.round(l)});};if(i($y(r)),!n.ResizeObserver)return ()=>{};let a=new n.ResizeObserver(s=>{let o=()=>{let l=s[0];if(l?.borderBoxSize){let f=l.borderBoxSize[0];if(f){i({width:f.inlineSize,height:f.blockSize});return}}i($y(r));};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o();});return a.observe(r,{box:"border-box"}),()=>{a.unobserve(r);}},Xy={passive:true};var Yy=typeof window>"u"?true:"onscrollend"in window,Zy=(e,t)=>{let r=e.scrollElement;if(!r)return;let n=e.targetWindow;if(!n)return;let i=0,a=e.options.useScrollendEvent&&Yy?()=>{}:Wy(n,()=>{t(i,false);},e.options.isScrollingResetDelay),s=u=>()=>{let{horizontal:c,isRtl:d}=e.options;i=c?r.scrollLeft*(d&&-1||1):r.scrollTop,a(),t(i,u);},o=s(true),l=s(false);r.addEventListener("scroll",o,Xy);let f=e.options.useScrollendEvent&&Yy;return f&&r.addEventListener("scrollend",l,Xy),()=>{r.removeEventListener("scroll",o),f&&r.removeEventListener("scrollend",l);}};var L5=(e,t,r)=>{if(t?.borderBoxSize){let n=t.borderBoxSize[0];if(n)return Math.round(n[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]};var Qy=(e,{adjustments:t=0,behavior:r},n)=>{var i,a;let s=e+t;(a=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||a.call(i,{[n.options.horizontal?"left":"top"]:s,behavior:r});},Ic=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=false,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=false,this.lanesSettling=false,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var r,n,i;return ((i=(n=(r=this.targetWindow)==null?void 0:r.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let r=null,n=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(a=>{let s=()=>{let o=a.target,l=this.indexFromElement(o);if(!o.isConnected){this.observer.unobserve(o);return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(o,a,this));};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s();});}));return {disconnect:()=>{var i;(i=n())==null||i.disconnect(),r=null;},observe:i=>{var a;return (a=n())==null?void 0:a.observe(i,{box:"border-box"})},unobserve:i=>{var a;return (a=n())==null?void 0:a.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([n,i])=>{typeof i>"u"&&delete r[n];}),this.options={debug:false,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:false,getItemKey:z5,rangeExtractor:j5,onChange:()=>{},measureElement:L5,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:true,isRtl:false,useScrollendEvent:false,useAnimationFrameWithResizeObserver:false,laneAssignmentMode:"estimate",...r};},this.notify=r=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,r);},this.maybeNotify=Ya(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r);},{key:false,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null;},this._didMount=()=>()=>{this.cleanup();},this._willUpdate=()=>{var r;let n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i);}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify();})),this.unsubs.push(this.options.observeElementOffset(this,(i,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify();})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0});}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,n)=>{let i=new Map,a=new Map;for(let s=n-1;s>=0;s--){let o=r[s];if(i.has(o.lane))continue;let l=a.get(o.lane);if(l==null||o.end>l.end?a.set(o.lane,o):o.end<l.end&&i.set(o.lane,true),i.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((s,o)=>s.end===o.end?s.index-o.index:s.end-o.end)[0]:void 0},this.getMeasurementOptions=Ya(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(r,n,i,a,s,o,l)=>(this.prevLanes!==void 0&&this.prevLanes!==o&&(this.lanesChangedFlag=true),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:a,enabled:s,lanes:o,laneAssignmentMode:l}),{key:false}),this.getMeasurements=Ya(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:a,enabled:s,lanes:o,laneAssignmentMode:l},f)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(let p of this.laneAssignments.keys())p>=r&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=false,this.lanesSettling=true,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size);}));let u=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=false);let c=this.measurementsCache.slice(0,u),d=new Array(o).fill(void 0);for(let p=0;p<u;p++){let h=c[p];h&&(d[h.lane]=p);}for(let p=u;p<r;p++){let h=a(p),m=this.laneAssignments.get(p),g,v,w=l==="estimate"||f.has(h);if(m!==void 0&&this.options.lanes>1){g=m;let k=d[g],D=k!==void 0?c[k]:void 0;v=D?D.end+this.options.gap:n+i;}else {let k=this.options.lanes===1?c[p-1]:this.getFurthestMeasurement(c,p);v=k?k.end+this.options.gap:n+i,g=k?k.lane:p%this.options.lanes,this.options.lanes>1&&w&&this.laneAssignments.set(p,g);}let C=f.get(h),T=typeof C=="number"?C:this.options.estimateSize(p),I=v+T;c[p]={index:p,start:v,size:T,end:I,key:h,lane:g},d[g]=p;}return this.measurementsCache=c,c},{key:false,debug:()=>this.options.debug}),this.calculateRange=Ya(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,a)=>this.range=r.length>0&&n>0?B5({measurements:r,outerSize:n,scrollOffset:i,lanes:a}):null,{key:false,debug:()=>this.options.debug}),this.getVirtualIndexes=Ya(()=>{let r=null,n=null,i=this.calculateRange();return i&&(r=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,n]},(r,n,i,a,s)=>a===null||s===null?[]:r({startIndex:a,endIndex:s,overscan:n,count:i}),{key:false,debug:()=>this.options.debug}),this.indexFromElement=r=>{let n=this.options.indexAttribute,i=r.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=r=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return true;let i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){let a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),s=Math.max(0,i-a),o=Math.min(this.options.count-1,i+a);return r>=s&&r<=o}return true},this.measureElement=r=>{if(!r){this.elementsCache.forEach((s,o)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(o));});return}let n=this.indexFromElement(r),i=this.options.getItemKey(n),a=this.elementsCache.get(i);a!==r&&(a&&this.observer.unobserve(a),this.observer.observe(r),this.elementsCache.set(i,r)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(r,void 0,this));},this.resizeItem=(r,n)=>{var i;let a=this.measurementsCache[r];if(!a)return;let s=this.itemSizeCache.get(a.key)??a.size,o=n-s;o!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,o,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,n)),this.notify(false));},this.getVirtualItems=Ya(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{let i=[];for(let a=0,s=r.length;a<s;a++){let o=r[a],l=n[o];i.push(l);}return i},{key:false,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{let n=this.getMeasurements();if(n.length!==0)return Up(n[Jy(0,n.length-1,i=>Up(n[i]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,n,i=0)=>{if(!this.scrollElement)return 0;let a=this.getSize(),s=this.getScrollOffset();n==="auto"&&(n=r>=s+a?"end":"start"),n==="center"?r+=(i-a)/2:n==="end"&&(r-=a);let o=this.getMaxScrollOffset();return Math.max(Math.min(o,r),0)},this.getOffsetForIndex=(r,n="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));let i=this.getSize(),a=this.getScrollOffset(),s=this.measurementsCache[r];if(!s)return;if(n==="auto")if(s.end>=a+i-this.options.scrollPaddingEnd)n="end";else if(s.start<=a+this.options.scrollPaddingStart)n="start";else return [a,n];if(n==="end"&&r===this.options.count-1)return [this.getMaxScrollOffset(),n];let o=n==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return [this.getOffsetForAlignment(o,n,s.size),n]},this.scrollToOffset=(r,{align:n="start",behavior:i="auto"}={})=>{let a=this.getOffsetForAlignment(r,n),s=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:s,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile();},this.scrollToIndex=(r,{align:n="auto",behavior:i="auto"}={})=>{r=Math.max(0,Math.min(r,this.options.count-1));let a=this.getOffsetForIndex(r,n);if(!a)return;let[s,o]=a,l=this.now();this.scrollState={index:r,align:o,behavior:i,startedAt:l,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile();},this.scrollBy=(r,{behavior:n="auto"}={})=>{let i=this.getScrollOffset()+r,a=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:a,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile();},this.getTotalSize=()=>{var r;let n=this.getMeasurements(),i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=n[n.length-1])==null?void 0:r.end)??0;else {let a=Array(this.options.lanes).fill(null),s=n.length-1;for(;s>=0&&a.some(o=>o===null);){let o=n[s];a[o.lane]===null&&(a[o.lane]=o.end),s--;}i=Math.max(...a.filter(o=>o!==null));}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:n,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:n},this);},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(false);},this.setOptions(t);}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll();}));}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,a=1,s=i!==this.scrollState.lastTargetOffset;if(!s&&qy(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,s&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile();}},Jy=(e,t,r,n)=>{for(;e<=t;){let i=(e+t)/2|0,a=r(i);if(a<n)e=i+1;else if(a>n)t=i-1;else return i}return e>0?e-1:0};function B5({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){let i=e.length-1,a=l=>e[l].start;if(e.length<=n)return {startIndex:0,endIndex:i};let s=Jy(0,i,a,r),o=s;if(n===1)for(;o<i&&e[o].end<r+t;)o++;else if(n>1){let l=Array(n).fill(0);for(;o<i&&l.some(u=>u<r+t);){let u=e[o];l[u.lane]=u.end,o++;}let f=Array(n).fill(r+t);for(;s>=0&&f.some(u=>u>=r);){let u=e[s];f[u.lane]=u.start,s--;}s=Math.max(0,s-s%n),o=Math.min(i,o+(n-1-o%n));}return {startIndex:s,endIndex:o}}var e2=typeof document<"u"?pa.useLayoutEffect:pa.useEffect;function F5({useFlushSync:e=true,...t}){let r=pa.useReducer(()=>({}),{})[1],n={...t,onChange:(a,s)=>{var o;e&&s?(0, t2.flushSync)(r):r(),(o=t.onChange)==null||o.call(t,a,s);}},[i]=pa.useState(()=>new Ic(n));return i.setOptions(n),e2(()=>i._didMount(),[]),e2(()=>i._willUpdate()),i}function r2(e){return F5({observeElementRect:Ky,observeElementOffset:Zy,scrollToFn:Qy,...e})}var Bc=Ke(Pi());function $e(e){let t=(0, X.useRef)(e);return t.current=e,t}function P5(e,t){if(e.length!==t.length)return false;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return false;return true}var n2={},Hp={};function U5(e,t){let r=(0, X.useRef)(t);P5(r.current,t)||(r.current=t);let n=r.current,i=$e(e),[a,s]=(0, X.useState)(n2),[o,l]=(0, X.useState)(Hp),f=(0, X.useCallback)(async()=>{let u=i.current,c="fetchFilterOptions"in u&&typeof u.fetchFilterOptions=="function"?u.fetchFilterOptions.bind(u):void 0;if(!c){s(n2),l(Hp);return}let d={};n.forEach(h=>{d[h]=true;}),l(d);let p={};await Promise.all(n.map(async h=>{try{p[h]=await c(h);}catch{p[h]=[];}})),s(p),l(Hp);},[n,i]);return (0, X.useEffect)(()=>{f().catch(()=>{});},[f]),{filterOptions:a,loadingOptions:o}}function Xp(e,t,r){return ly(e,t,r)}function Yp(e,t,r){return uy(e,t,r)}function w2(e,t,r,n){return {...cy(e,t,r,n),column:t}}function _2(e,t,r,n,i){return {...fy(e,t,r,n,i),column:t}}function x2(e,t,r,n){let i=r.handleLongPressEnd,a={"data-row-index":e.rowIndex,"data-col-index":e.globalColIndex,tabIndex:e.isActive?0:-1,onPointerUp:i,onPointerLeave:i,onPointerCancel:i,onContextMenu:r.handleCellContextMenu};return n?(a.onPointerDown=n.onPointerDown,a.onClick=n.onClick,e.canEditAny&&(a["data-can-edit"]="",a.role="button",a.onDoubleClick=n.onDoubleClick)):(a.onPointerDown=s=>{r.setEditingCell(null),r.handleCellMouseDown(s,e.rowIndex,e.globalColIndex),r.handleLongPressStart?.(s);},a.onClick=()=>r.setActiveCell({rowIndex:e.rowIndex,columnIndex:e.globalColIndex}),e.canEditAny&&(a.role="button",a.onDoubleClick=()=>r.setEditingCell({rowId:e.rowId,columnId:t}))),e.isActive&&(a["data-active-cell"]="true"),e.isInRange&&(a["data-in-range"]="true"),a}var H5=Object.freeze({isActiveRangeCell:false,isRangeCell:false,isCutCell:false});function S2(e){let{rowIndex:t,columnIndex:r,selectionRange:n,activeCell:i,cutRange:a}=e,s=n!=null&&n.startRow===n.endRow&&n.startCol===n.endCol,o=n!=null&&!s&&qa(n,t,r),l=i?.rowIndex===t&&i?.columnIndex===r,f=o&&l,u=o&&!l,c=a!=null&&qa(a,t,r);return !f&&!u&&!c?H5:{isActiveRangeCell:f,isRangeCell:u,isCutCell:c}}var V5={getFormulaValue:()=>{},hasFormula:()=>false,getFormula:()=>{},setFormula:()=>{},onCellChanged:()=>{},getPrecedents:()=>[],getDependents:()=>[],getAuditTrail:()=>null,enabled:false};function G5(e){let{formulas:t,items:r,flatColumns:n,initialFormulas:i,onFormulaRecalc:a,formulaFunctions:s,namedRanges:o,sheets:l}=e,f=$e(r),u=$e(n),c=$e(a),d=(0, X.useRef)(null);t&&!d.current?d.current=new jy({customFunctions:s,namedRanges:o}):!t&&d.current&&(d.current=null),(0, X.useEffect)(()=>{if(!(!d.current||!l)){for(let[D,j]of Object.entries(l))d.current.registerSheet(D,j);return ()=>{if(!(!d.current||!l))for(let D of Object.keys(l))d.current.unregisterSheet(D);}}},[l]);let p=(0, X.useCallback)(()=>qv(f.current,u.current),[f,u]),h=(0, X.useRef)(false);(0, X.useEffect)(()=>{if(t&&d.current&&i&&!h.current){h.current=true;let D=p(),j=d.current.loadFormulas(i,D);j.updatedCells.length>0&&c.current?.(j);}},[t,i,p,c]);let m=(0, X.useCallback)((D,j)=>d.current?.getValue(D,j),[]),g=(0, X.useCallback)((D,j)=>d.current?.hasFormula(D,j)??false,[]),v=(0, X.useCallback)((D,j)=>d.current?.getFormula(D,j),[]),w=(0, X.useCallback)((D,j,F)=>{if(!d.current)return;let B=p(),E=d.current.setFormula(D,j,F,B);E.updatedCells.length>0&&c.current?.(E);},[p,c]),C=(0, X.useCallback)((D,j)=>{if(!d.current)return;let F=p(),B=d.current.onCellChanged(D,j,F);B.updatedCells.length>0&&c.current?.(B);},[p,c]),T=(0, X.useCallback)((D,j)=>d.current?.getPrecedents(D,j)??[],[]),I=(0, X.useCallback)((D,j)=>d.current?.getDependents(D,j)??[],[]),k=(0, X.useCallback)((D,j)=>d.current?.getAuditTrail(D,j)??null,[]);return t?{getFormulaValue:m,hasFormula:g,getFormula:v,setFormula:w,onCellChanged:C,getPrecedents:T,getDependents:I,getAuditTrail:k,enabled:true}:V5}function q5(e){let{activeCol:t,activeRow:r,activeCellRef:n,getFormula:i,getRawValue:a,setFormula:s,onCellValueChanged:o}=e,[l,f]=(0, X.useState)(false),[u,c]=(0, X.useState)(""),d=(0, X.useRef)(false),p=(0, X.useRef)(null),h=(0, X.useMemo)(()=>Fy(t,r,i,a),[t,r,i,a]);(0, X.useEffect)(()=>{f(false),d.current=false;},[t,r]);let m=(0, X.useCallback)(()=>{c(h),f(true),d.current=true;},[h]),g=(0, X.useCallback)(k=>{c(k);},[]),v=(0, X.useCallback)(()=>{t==null||r==null||!s||(By(u,t,r,s,o),f(false),d.current=false);},[t,r,u,s,o]),w=(0, X.useCallback)(()=>{f(false),d.current=false,c("");},[]),C=(0, X.useCallback)(k=>{if(!d.current||!u.startsWith("="))return false;let D=p.current?.selectionStart??u.length,j=Py(u,D,k);return c(j.text),setTimeout(()=>{p.current&&(p.current.selectionStart=j.cursorPos,p.current.selectionEnd=j.cursorPos,p.current.focus());},0),true},[u]),T=l?u:h,I=(0, X.useMemo)(()=>Uy(T),[T]);return {cellRef:n,formulaText:l?u:h,isEditing:l,onInputChange:g,onCommit:v,onCancel:w,startEditing:m,referencedCells:I,isFormulaBarEditing:d,insertReference:C,inputRef:p}}function W5({cellRef:e,formulaText:t,isEditing:r,onInputChange:n,onCommit:i,onCancel:a,startEditing:s,inputRef:o}){let l=(0, X.useRef)(null),f=o??l;return (0, X.useEffect)(()=>{r&&f.current&&f.current.focus();},[r,f]),(0, ae.jsxs)("div",{style:jl.bar,role:"toolbar","aria-label":"Formula bar",children:[(0, ae.jsx)("div",{style:jl.nameBox,"aria-label":"Active cell reference",children:e??"\u2014"}),(0, ae.jsx)("div",{style:jl.fxLabel,"aria-hidden":"true",children:"fx"}),(0, ae.jsx)("input",{ref:f,type:"text",style:jl.input,value:t,readOnly:!r,onChange:u=>n(u.target.value),onKeyDown:u=>Ly(u.key,()=>u.preventDefault(),i,a),onClick:()=>{r||s();},onDoubleClick:()=>{r||s();},"aria-label":"Formula input",spellCheck:false,autoComplete:"off"})]})}var $5={display:"flex",alignItems:"center",borderTop:"1px solid var(--ogrid-border, #e0e0e0)",background:"var(--ogrid-header-bg, #f5f5f5)",minHeight:30,overflowX:"auto",overflowY:"hidden",gap:0,fontSize:12},X5={background:"none",border:"none",cursor:"pointer",padding:"4px 10px",fontSize:16,lineHeight:"22px",color:"var(--ogrid-fg-secondary, #666)",flexShrink:0},C2={background:"none",border:"none",borderBottom:"2px solid transparent",cursor:"pointer",padding:"4px 16px",fontSize:12,lineHeight:"22px",color:"var(--ogrid-fg, #242424)",whiteSpace:"nowrap",position:"relative"},Y5={...C2,fontWeight:600,borderBottomColor:"var(--ogrid-primary, #217346)",background:"var(--ogrid-bg, #fff)"};function K5({sheets:e,activeSheet:t,onSheetChange:r,onSheetAdd:n}){let i=(0, X.useCallback)(a=>{let s=a.currentTarget.dataset.sheetId;s&&r(s);},[r]);return (0, ae.jsxs)("div",{style:$5,role:"tablist","aria-label":"Sheet tabs",children:[n&&(0, ae.jsx)("button",{type:"button",style:X5,onClick:n,title:"Add sheet","aria-label":"Add sheet",children:"+"}),e.map(a=>{let s=a.id===t,o=s?Y5:C2,l=a.color?{...o,borderBottomColor:a.color}:o;return (0, ae.jsx)("button",{type:"button",role:"tab","aria-selected":s,style:l,"data-sheet-id":a.id,onClick:i,children:a.name},a.id)})]})}function Z5(e){let{controlledPage:t,controlledPageSize:r,defaultPageSize:n,onPageChange:i,onPageSizeChange:a}=e,[s,o]=(0, X.useState)(1),[l,f]=(0, X.useState)(n),u=t??s,c=r??l,d=(0, X.useCallback)(h=>{t===void 0&&o(h),i?.(h);},[t,i]),p=(0, X.useCallback)(h=>{r===void 0&&f(h),a?.(h),d(1);},[r,a,d]);return {page:u,pageSize:c,setPage:d,setPageSize:p}}function Q5(e){let{controlledSort:t,defaultSortField:r,defaultSortDirection:n,onSortChange:i,setPage:a}=e,[s,o]=(0, X.useState)({field:r,direction:n}),[l,f]=(0, X.useState)(0),u=t??s,c=(0, X.useCallback)(p=>{t===void 0&&o(p),i?.(p),a(1),f(h=>h+1);},[t,i,a]),d=(0, X.useCallback)((p,h)=>{c(py(u,p,h));},[u,c]);return {sort:u,setSort:c,handleSort:d,defaultSortField:r,defaultSortDirection:n,sortVersion:l}}function J5(e,t){let r=(0, X.useRef)(e);return t(e,r.current)||(r.current=e),r.current}function e8(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return false;for(let i=0;i<n.length;i++)if(e[n[i]]!==t[n[i]])return false;return true}var t8={},r8={fetchFilterOptions:void 0};function n8(e){let{controlledFilters:t,onFiltersChange:r,setPage:n,columns:i,displayData:a,dataSource:s}=e,[o,l]=(0, X.useState)({}),f=t??o,u=(0, X.useCallback)(T=>{t===void 0&&l(T),r?.(T),n(1);},[t,r,n]),c=(0, X.useCallback)((T,I)=>{u(up(f,T,I));},[f,u]),d=J5(f,(T,I)=>e8(T,I)),p=(0, X.useMemo)(()=>Object.values(f).some(T=>T!==void 0),[f]),h=(0, X.useMemo)(()=>fp(i),[i]),m=s??r8,{filterOptions:g,loadingOptions:v}=U5(m,h),w=s?.fetchFilterOptions!=null,C=(0, X.useMemo)(()=>w?g:cp(a,i),[w,a,i,g]);return {filters:f,setFilters:u,handleFilterChange:c,stableFilters:d,hasActiveFilters:p,clientFilterOptions:C,loadingFilterOptions:s?.fetchFilterOptions?v:t8}}function i8(e){let{isServerSide:t,dataSource:r,displayData:n,columns:i,stableFilters:a,sort:s,sortVersion:o,page:l,pageSize:f,paginate:u=true,onError:c,onFirstDataRendered:d,workerSort:p}=e,h=!t,m=ay(p,n.length,{columns:i,filters:a,sortBy:s.field}),g=(0, X.useRef)(null),v=(0, X.useRef)(-1),w=(0, X.useRef)(null),C=(0, X.useRef)(null),T=(0, X.useRef)(-1),I=(0, X.useRef)(null),k=(0, X.useRef)(null);(o!==v.current||a!==w.current||i!==C.current||n.length!==T.current||s.field!==I.current||s.direction!==k.current)&&(v.current=o,w.current=a,C.current=i,T.current=n.length,I.current=s.field,k.current=s.direction,g.current=null);let D=(0, X.useMemo)(()=>{if(!h||m)return null;let he;if(g.current===null){let ye=ns(n,i,a,s.field,s.direction),Se=new Map;for(let Ne=0;Ne<n.length;Ne++)Se.set(n[Ne],Ne);let We=ye.map(Ne=>{let Ee=Se.get(Ne);return Ee!==void 0?Ee:-1}).filter(Ne=>Ne!==-1);g.current=We,he=ye;}else he=g.current.map(ye=>n[ye]).filter(ye=>ye!==void 0);let be=he.length;if(!u)return {items:he,totalCount:be};let Me=(l-1)*f;return {items:he.slice(Me,Me+f),totalCount:be}},[h,m,n,i,a,o,s.field,s.direction,l,f,u]),[j,F]=(0, X.useState)(null),B=(0, X.useRef)(0),E=(0, X.useRef)(null),M=(0, X.useRef)(-1),L=(0, X.useRef)(null),b=(0, X.useRef)(null),y=(0, X.useRef)(-1);(0, X.useEffect)(()=>{if(!h||!m){F(null);return}(o!==M.current||a!==L.current||i!==b.current||n.length!==y.current)&&(M.current=o,L.current=a,b.current=i,y.current=n.length,E.current=null);let he=++B.current;if(E.current===null)iy(n,i,a,s.field,s.direction).then(be=>{if(he!==B.current)return;let Me=new Map;for(let Ee=0;Ee<n.length;Ee++)Me.set(n[Ee],Ee);let ye=be.map(Ee=>{let Le=Me.get(Ee);return Le!==void 0?Le:-1}).filter(Ee=>Ee!==-1);E.current=ye;let Se=be.length;if(!u){F({items:be,totalCount:Se});return}let We=(l-1)*f,Ne=be.slice(We,We+f);F({items:Ne,totalCount:Se});});else {let be=E.current.map(ye=>n[ye]).filter(ye=>ye!==void 0),Me=be.length;if(!u)F({items:be,totalCount:Me});else {let ye=(l-1)*f,Se=be.slice(ye,ye+f);F({items:Se,totalCount:Me});}}},[h,m,n,i,a,o,s.field,s.direction,l,f,u]);let[x,_]=(0, X.useState)([]),[S,R]=(0, X.useState)(0),[z,U]=(0, X.useState)(true),H=(0, X.useRef)(0),[q,N]=(0, X.useState)(0),V=$e(r),O=$e(c);(0, X.useEffect)(()=>{let he=V.current,be=!!he&&typeof he.fetchPage=="function"&&!kl(he);if(!t||!be){U(false);return}let Me=++H.current,ye=new AbortController;return U(true),he.fetchPage({page:l,pageSize:f,sort:{field:s.field,direction:s.direction},filters:a,signal:ye.signal}).then(Se=>{Me!==H.current||ye.signal.aborted||(_(Se.items),R(Se.totalCount));}).catch(Se=>{Me!==H.current||ye.signal.aborted||(O.current?.(Se),_([]),R(0));}).finally(()=>{Me===H.current&&!ye.signal.aborted&&U(false);}),()=>{ye.abort();}},[t,l,f,s.field,s.direction,a,q,V,O]);let A=t&&kl(r),[P,W]=(0, X.useState)(0),[Z,$]=(0, X.useState)(0),K=(0, X.useRef)(null);(0, X.useEffect)(()=>{let he=V.current;if(!t||!kl(he)){K.current?.dispose(),K.current=null;return}let be=new xp({dataSource:he,onChange:()=>{$(be.getRowCount()??0),W(Me=>Me+1);}});return K.current=be,()=>{be.dispose(),K.current===be&&(K.current=null);}},[t,A,V]);let te=JSON.stringify(a);(0, X.useEffect)(()=>{let he=K.current;he&&he.setContext({sort:{field:s.field,direction:s.direction},filters:a});},[A,s.field,s.direction,te,q]);let J=(0, X.useCallback)((he,be)=>{K.current?.ensureRange(he,be);},[]),Y=(0, X.useCallback)(he=>K.current?.getRow(he)??{status:"loading"},[]),ne=(0, X.useCallback)(he=>{K.current?.retry(he);},[]),re=(0, X.useMemo)(()=>A?{rowCount:Z,getRow:Y,requestWindow:J,retryRow:ne}:null,[A,Z,P,Y,J,ne]),ie=D??j,oe=h&&ie?ie.items:x,se=A?Z:h&&ie?ie.totalCount:S,le=$e(d),ge=(0, X.useRef)(false);return (0, X.useEffect)(()=>{!ge.current&&oe.length>0&&(ge.current=true,le.current?.());},[oe.length,le]),{displayItems:oe,displayTotalCount:se,serverLoading:z,refreshData:()=>N(he=>he+1),windowed:re}}var i2=["columns","filters"];function a8(e){let{config:t}=e,r=t!=null&&t!==false,n=(0, X.useMemo)(()=>{if(!r||t===true)return {panels:i2,position:"right",defaultPanel:null};let l=t;return {panels:l.panels??i2,position:l.position??"right",defaultPanel:l.defaultPanel??null}},[r,t]),[i,a]=(0, X.useState)(n.defaultPanel),s=(0, X.useCallback)(l=>{a(f=>f===l?null:l);},[]),o=(0, X.useCallback)(()=>{a(null);},[]);return {isEnabled:r,activePanel:i,setActivePanel:a,panels:n.panels,position:n.position,isOpen:i!==null,toggle:s,close:o}}var o8=25,s8={},l8={fontFamily:"monospace",fontSize:"12px",fontWeight:500,padding:"2px 8px",border:"1px solid var(--ogrid-border, #e0e0e0)",borderRadius:3,background:"var(--ogrid-bg, #fff)",color:"var(--ogrid-fg, #242424)",minWidth:48,textAlign:"center",lineHeight:"20px",userSelect:"none"};function u8(e,t){let{columns:r,getRowId:n,data:i,dataSource:a,page:s,pageSize:o,sort:l,filters:f,visibleColumns:u,isLoading:c,onPageChange:d,onPageSizeChange:p,onSortChange:h,onFiltersChange:m,onVisibleColumnsChange:g,columnOrder:v,onColumnOrderChange:w,onColumnResized:C,onColumnPinned:T,defaultPageSize:I=o8,defaultSortBy:k,defaultSortDirection:D="asc",toolbar:j,toolbarBelow:F,emptyState:B,entityLabelPlural:E="items",className:M,layoutMode:L="fill",suppressHorizontalScroll:b,editable:y,cellSelection:x,onCellValueChanged:_,onUndo:S,onRedo:R,canUndo:z,canRedo:U,rowSelection:H="none",selectedRows:q,onSelectionChange:N,showRowNumbers:V,cellReferences:O,statusBar:A,pageSizeOptions:P,sideBar:W,stickyHeader:Z,fullScreen:$,onFirstDataRendered:K,onError:te,columnChooser:J,columnReorder:Y,responsiveColumns:ne,virtualScroll:re,rowHeight:ie,density:oe="normal",workerSort:se,formulas:le,initialFormulas:ge,onFormulaRecalc:he,formulaFunctions:be,namedRanges:Me,sheets:ye,sheetDefs:Se,activeSheet:We,onSheetChange:Ne,onSheetAdd:Ee,"aria-label":Le,"aria-labelledby":Ce}=e,xe=$e(n),Qe=(0, X.useCallback)(ke=>xe.current(ke),[xe]),Be=$e(w),He=w!=null,At=(0, X.useMemo)(()=>He?ke=>Be.current?.(ke):void 0,[He,Be]),Ve=$e(_),Ze=_!=null,Nt=(0, X.useMemo)(()=>Ze?ke=>Ve.current?.(ke):void 0,[Ze,Ve]),et=$e(S),rt=S!=null,fr=(0, X.useMemo)(()=>rt?()=>et.current?.():void 0,[rt,et]),Ge=$e(R),qe=R!=null,Gt=(0, X.useMemo)(()=>qe?()=>Ge.current?.():void 0,[qe,Ge]),Ye=J===false?"none":J==="sidebar"?"sidebar":"toolbar",De=(0, X.useMemo)(()=>as(r),[r]),Mt=a!=null,tt=!Mt&&re?.enabled===true&&re?.paginate===false,ee=(0, X.useRef)(false);(0, X.useEffect)(()=>{xy(De);},[De]);let ue=k??De[0]?.columnId??"",[de,_e]=(0, X.useState)([]),[Ie,Te]=(0, X.useState)(false),Oe=i??de,ot=c??Ie,ze=Z5({controlledPage:s,controlledPageSize:o,defaultPageSize:I,onPageChange:d,onPageSizeChange:p}),Re=Q5({controlledSort:l,defaultSortField:ue,defaultSortDirection:D,onSortChange:h,setPage:ze.setPage}),je=n8({controlledFilters:f,onFiltersChange:m,setPage:ze.setPage,columns:De,displayData:Oe,dataSource:a}),Fe=i8({isServerSide:Mt,dataSource:a,displayData:Oe,columns:De,stableFilters:je.stableFilters,sort:Re.sort,sortVersion:Re.sortVersion,page:ze.page,pageSize:ze.pageSize,paginate:!tt,onError:te,onFirstDataRendered:K,workerSort:se});(0, X.useEffect)(()=>{let ke=Fe.displayItems;!ee.current&&ke.length>0&&(ee.current=true,Cy(ke,Qe));},[Fe.displayItems,Qe]);let[st,xt]=(0, X.useState)(()=>{let ke=De.filter(yt=>yt.defaultVisible!==false).map(yt=>yt.columnId);return new Set(ke.length>0?ke:De.map(yt=>yt.columnId))}),Bt=(0, X.useRef)(De.length);(0, X.useEffect)(()=>{let ke=Bt.current;if(Bt.current=De.length,u===void 0&&ke===0&&De.length>0&&st.size===0){let yt=De.filter(yr=>yr.defaultVisible!==false).map(yr=>yr.columnId);xt(new Set(yt.length>0?yt:De.map(yr=>yr.columnId)));}},[De,u,st.size]);let Tt=u??st,qt=(0, X.useCallback)(ke=>{u===void 0&&xt(ke),g?.(ke);},[u,g]),Ft=(0, X.useCallback)((ke,yt)=>{let yr=new Set(Tt);yt?yr.add(ke):yr.delete(ke),qt(yr);},[Tt,qt]),[dr,Q]=(0, X.useState)(new Set),fe=q??dr,ve=(0, X.useCallback)(ke=>{q===void 0&&Q(new Set(ke.selectedRowIds)),N?.(ke);},[q,N]),[me,Ae]=(0, X.useState)(void 0),Ue=v??me,[Pe,ct]=(0, X.useState)({}),[nt,Je]=(0, X.useState)(()=>{let ke={};for(let yt of as(r))yt.pinned&&(ke[yt.columnId]=yt.pinned);return ke}),at=(0, X.useCallback)((ke,yt)=>{ct(yr=>({...yr,[ke]:yt})),C?.(ke,yt);},[C]),It=(0, X.useCallback)((ke,yt)=>{Je(yr=>{if(yt===null){let{[ke]:wf,...Z3}=yr;return Z3}return {...yr,[ke]:yt}}),T?.(ke,yt);},[T]),Pt=$e(Tt),gt=$e(Re.sort),Ct=$e(Ue),nr=$e(Pe),Cr=$e(nt),Er=$e(je.filters),kr=$e(fe),Or=$e(Fe.displayItems),pi=$e(Qe),$r=$e(De);(0, X.useImperativeHandle)(t,()=>({setRowData:ke=>{Mt||_e(ke);},setLoading:Te,getColumnState:()=>({visibleColumns:Array.from(Pt.current),sort:gt.current,columnOrder:Ct.current??void 0,columnWidths:Object.keys(nr.current).length>0?nr.current:void 0,filters:Object.keys(Er.current).length>0?Er.current:void 0,pinnedColumns:Object.keys(Cr.current).length>0?Cr.current:void 0}),applyColumnState:ke=>{ke.visibleColumns&&qt(new Set(ke.visibleColumns)),ke.sort&&Re.setSort(ke.sort),ke.columnOrder&&(v===void 0&&Ae(ke.columnOrder),At?.(ke.columnOrder)),ke.columnWidths&&ct(ke.columnWidths),ke.filters&&je.setFilters(ke.filters),ke.pinnedColumns&&Je(ke.pinnedColumns);},setFilterModel:je.setFilters,getSelectedRows:()=>Array.from(kr.current),setSelectedRows:ke=>{q===void 0&&Q(new Set(ke));},selectAll:()=>{let ke=Or.current,yt=new Set(ke.map(yr=>pi.current(yr)));q===void 0&&Q(yt),N?.({selectedRowIds:Array.from(yt),selectedItems:ke});},deselectAll:()=>{q===void 0&&Q(new Set),N?.({selectedRowIds:[],selectedItems:[]});},clearFilters:()=>je.setFilters({}),clearSort:()=>Re.setSort({field:Re.defaultSortField,direction:Re.defaultSortDirection}),resetGridState:ke=>{je.setFilters({}),Re.setSort({field:Re.defaultSortField,direction:Re.defaultSortDirection}),ke?.keepSelection||(q===void 0&&Q(new Set),N?.({selectedRowIds:[],selectedItems:[]}));},getDisplayedRows:()=>Or.current,refreshData:()=>{Mt&&Fe.refreshData();},getColumnOrder:()=>Ct.current??$r.current.map(ke=>ke.columnId),setColumnOrder:ke=>{v===void 0&&Ae(ke),At?.(ke);},scrollToRow:()=>{}}),[Mt,qt,Re,je,v,At,q,N,Fe,Ct,nr,$r,Or,kr,Er,pi,Cr,gt,Pt]);let mt=(0, X.useMemo)(()=>{if(!A)return;if(typeof A=="object")return A;let ke=Mt?Fe.displayTotalCount:i?.length??0,yt=Fe.displayTotalCount;return {totalCount:ke,filteredCount:je.hasActiveFilters?yt:void 0,selectedCount:fe.size,suppressRowCount:true}},[A,Mt,i,Fe.displayTotalCount,je.hasActiveFilters,fe.size]),ft=a8({config:W}),or=(0, X.useMemo)(()=>De.map(ke=>({columnId:ke.columnId,name:ke.name,required:ke.required===true})),[De]),zt=(0, X.useMemo)(()=>De.filter(ke=>ke.filterable&&ke.filterable.type).map(ke=>({columnId:ke.columnId,name:ke.name,filterField:ke.filterable?.filterField??ke.columnId,filterType:ke.filterable?.type})),[De]),Ht=(0, X.useMemo)(()=>ft.isEnabled?{activePanel:ft.activePanel,onPanelChange:ft.setActivePanel,panels:ft.panels,position:ft.position,columns:or,visibleColumns:Tt,onVisibilityChange:Ft,onSetVisibleColumns:qt,filterableColumns:zt,filters:je.filters,onFilterChange:je.handleFilterChange,filterOptions:je.clientFilterOptions}:null,[ft.isEnabled,ft.activePanel,ft.setActivePanel,ft.panels,ft.position,or,Tt,Ft,qt,zt,je.filters,je.handleFilterChange,je.clientFilterOptions]),[Wt,Rr]=(0, X.useState)(0),cn=(0, X.useCallback)(ke=>{Rr(yt=>yt+1),he?.(ke);},[he]),kt=G5({formulas:le,items:Fe.displayItems,flatColumns:De,initialFormulas:ge,onFormulaRecalc:cn,formulaFunctions:be,namedRanges:Me,sheets:ye}),Jn=(0, X.useCallback)(()=>je.setFilters({}),[je]),Un=Mt&&Fe.serverLoading||ot,Hn=V||O||le,xs=!!(O||le),Vn=!!O&&!le,so=!!(O||le),[Li,lo]=(0, X.useState)(null),[Ss,xa]=(0, X.useState)(null),Sa=(0, X.useCallback)(ke=>{if(lo(ke),ke){let yt=ke.match(/^([A-Z]+)(\d+)$/);xa(yt?{col:Np(yt[1]),row:parseInt(yt[2],10)-1}:null);}else xa(null);},[]),q3=(0, X.useCallback)((ke,yt)=>{let yr=Or.current,wf=$r.current;if(!(yt<0||yt>=yr.length||ke<0||ke>=wf.length))return cr(yr[yt],wf[ke])},[Or,$r]),sr=q5({activeCol:Ss?.col??null,activeRow:Ss?.row??null,activeCellRef:Li,getFormula:kt.enabled?kt.getFormula:void 0,getRawValue:q3,setFormula:kt.enabled?kt.setFormula:void 0}),Gm=(0, X.useMemo)(()=>({filters:je.filters,onFilterChange:je.handleFilterChange,filterOptions:je.clientFilterOptions,loadingFilterOptions:a?.fetchFilterOptions?je.loadingFilterOptions:s8,peopleSearch:a?.searchPeople,getUserByEmail:a?.getUserByEmail}),[je.filters,je.handleFilterChange,je.clientFilterOptions,a,je.loadingFilterOptions]),qm=(0, X.useMemo)(()=>({hasActiveFilters:je.hasActiveFilters,onClearAll:Jn,message:B?.message,render:B?.render}),[je.hasActiveFilters,Jn,B]),Wm=(0, X.useMemo)(()=>({formulas:le,getFormulaValue:kt.enabled?kt.getFormulaValue:void 0,hasFormula:kt.enabled?kt.hasFormula:void 0,getFormula:kt.enabled?kt.getFormula:void 0,setFormula:kt.enabled?kt.setFormula:void 0,onFormulaCellChanged:kt.enabled?kt.onCellChanged:void 0,getPrecedents:kt.enabled?kt.getPrecedents:void 0,getDependents:kt.enabled?kt.getDependents:void 0,getAuditTrail:kt.enabled?kt.getAuditTrail:void 0,formulaVersion:Wt,formulaReferences:sr.referencedCells.length>0?sr.referencedCells:void 0,onFormulaInsertReference:sr.insertReference}),[le,kt,Wt,sr.referencedCells,sr.insertReference]),W3=(0, X.useMemo)(()=>({items:Fe.displayItems,windowed:Fe.windowed,columns:r,getRowId:Qe,sortBy:Re.sort.field,sortDirection:Re.sort.direction,onColumnSort:Re.handleSort,visibleColumns:Tt,columnOrder:Ue,onColumnOrderChange:At,onColumnResized:at,onColumnPinned:It,pinnedColumns:nt,initialColumnWidths:Pe,editable:y,cellSelection:x,onCellValueChanged:Nt,onUndo:fr,onRedo:Gt,canUndo:z,canRedo:U,rowSelection:H,selectedRows:fe,onSelectionChange:ve,showRowNumbers:Hn,showColumnLetters:xs,showNameBox:Vn,onActiveCellChange:so?Sa:void 0,currentPage:ze.page,pageSize:ze.pageSize,statusBar:mt,isLoading:Un,...Gm,layoutMode:L,suppressHorizontalScroll:b,stickyHeader:Z??true,columnReorder:Y,responsiveColumns:ne,virtualScroll:re,rowHeight:ie,density:oe,"aria-label":Le,"aria-labelledby":Ce,emptyState:qm,...Wm}),[Fe.displayItems,Fe.windowed,r,Qe,Re.sort.field,Re.sort.direction,Re.handleSort,Tt,Ue,At,at,It,nt,Pe,y,x,Nt,fr,Gt,z,U,H,fe,ve,Hn,xs,Vn,so,Sa,ze.page,ze.pageSize,mt,Un,Gm,L,b,Z,Y,ne,re,ie,oe,Le,Ce,qm,Wm]),$3=(0, X.useMemo)(()=>({page:ze.page,pageSize:ze.pageSize,displayTotalCount:Fe.displayTotalCount,setPage:ze.setPage,setPageSize:ze.setPageSize,pageSizeOptions:P,entityLabelPlural:E,hidden:tt}),[ze.page,ze.pageSize,Fe.displayTotalCount,ze.setPage,ze.setPageSize,P,E,tt]),X3=(0, X.useMemo)(()=>({columns:or,visibleColumns:Tt,onVisibilityChange:Ft,onSetVisibleColumns:qt,placement:Ye}),[or,Tt,Ft,qt,Ye]),$m=(0, X.useMemo)(()=>Vn?_t.createElement("div",{style:l8,"aria-label":"Active cell reference"},Li??"\u2014"):null,[Vn,Li]),Xm=(0, X.useMemo)(()=>Vn?_t.createElement(_t.Fragment,null,$m,j):j,[Vn,$m,j]),Ym=(0, X.useMemo)(()=>{if(le)return _t.createElement(W5,{cellRef:sr.cellRef,formulaText:sr.formulaText,isEditing:sr.isEditing,onInputChange:sr.onInputChange,onCommit:sr.onCommit,onCancel:sr.onCancel,startEditing:sr.startEditing,inputRef:sr.inputRef})},[le,sr.cellRef,sr.formulaText,sr.isEditing,sr.onInputChange,sr.onCommit,sr.onCancel,sr.startEditing,sr.inputRef]),Km=(0, X.useMemo)(()=>{if(!(!Se||Se.length===0||!We||!Ne))return _t.createElement(K5,{sheets:Se,activeSheet:We,onSheetChange:Ne,onSheetAdd:Ee})},[Se,We,Ne,Ee]),Y3=(0, X.useMemo)(()=>({toolbar:Xm,toolbarBelow:F,className:M,emptyState:B,sideBarProps:Ht,fullScreen:$,formulaBar:Ym,sheetTabs:Km}),[Xm,F,M,B,Ht,$,Ym,Km]),K3=(0, X.useMemo)(()=>({hasActiveFilters:je.hasActiveFilters,setFilters:je.setFilters}),[je.hasActiveFilters,je.setFilters]);return {dataGridProps:W3,pagination:$3,columnChooser:X3,layout:Y3,filters:K3}}function c8(e,t){let[r,n]=(0, X.useState)(null),i=(0, X.useRef)(r);i.current=r;let a=(0, X.useCallback)(o=>{let l=i.current;l!==o&&(l&&o&&l.rowIndex===o.rowIndex&&l.columnIndex===o.columnIndex||n(o));},[]),s=(0, X.useRef)(0);return (0, X.useLayoutEffect)(()=>{if(r==null||e?.current==null||t!=null)return;let o=e.current,{rowIndex:l,columnIndex:f}=r,u=`[data-row-index="${l}"][data-col-index="${f}"]`,c=o.querySelector(u);return c&&document.activeElement!==c&&typeof c.focus=="function"&&c.focus({preventScroll:true}),cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(!c||!o.isConnected)return;let d=o.querySelector("thead"),p=d?d.getBoundingClientRect().height:0,h=o.getBoundingClientRect(),m=c.getBoundingClientRect(),g=h.top+p;m.top<g?o.scrollTop-=g-m.top:m.bottom>h.bottom&&(o.scrollTop+=m.bottom-h.bottom),o.scrollWidth>o.clientWidth&&(m.left<h.left?o.scrollLeft-=h.left-m.left:m.right>h.right&&(o.scrollLeft+=m.right-h.right));}),()=>cancelAnimationFrame(s.current)},[r,t,e]),{activeCell:r,setActiveCell:a}}function f8(){let[e,t]=(0, X.useState)(null),[r,n]=(0, X.useState)(void 0);return {editingCell:e,setEditingCell:t,pendingEditorValue:r,setPendingEditorValue:n}}var d8=500;function h8(){let[e,t]=(0, X.useState)(null),r=(0, X.useRef)(null),n=(0, X.useRef)(null),i=(0, X.useCallback)(f=>{f.preventDefault?.(),t({x:f.clientX,y:f.clientY});},[]),a=(0, X.useCallback)(()=>{t(null);},[]),s=(0, X.useCallback)(()=>{r.current&&(clearTimeout(r.current),r.current=null),n.current=null;},[]),o=(0, X.useCallback)(f=>{if(f.pointerType!=="touch")return;s();let u={x:f.clientX,y:f.clientY};n.current=u,r.current=setTimeout(()=>{let c=n.current;c&&t(c),r.current=null,n.current=null;},d8);},[s]),l=(0, X.useCallback)(()=>{s();},[s]);return (0, X.useEffect)(()=>()=>{r.current&&clearTimeout(r.current);},[]),{contextMenuPosition:e,setContextMenuPosition:t,handleCellContextMenu:i,closeContextMenu:a,handleLongPressStart:o,handleLongPressEnd:l}}var Vp="data-drag-range",Ll="data-drag-anchor",Br=40;function p8(e){let{colOffset:t,rowCount:r,visibleColCount:n,setActiveCell:i,wrapperRef:a}=e,s=$e(t),[o,l]=(0, X.useState)(null),f=(0, X.useRef)(false),[u,c]=(0, X.useState)(false),d=(0, X.useRef)(false),p=(0, X.useRef)(null),h=(0, X.useRef)(0),m=(0, X.useRef)(null),g=(0, X.useRef)(null),v=(0, X.useRef)(o);v.current=o;let w=(0, X.useCallback)(D=>{kp(v.current,D)||l(D);},[]),C=(0, X.useCallback)((D,j,F)=>{if(D.button!==0)return;let B=s.current;if(F<B)return;D.preventDefault();let E=F-B,M=v.current;if(D.shiftKey&&M!=null)w(tn({startRow:M.startRow,startCol:M.startCol,endRow:j,endCol:E})),i({rowIndex:j,columnIndex:F});else {p.current={row:j,col:E},d.current=false;let L={startRow:j,startCol:E,endRow:j,endCol:E};w(L),m.current=L,i({rowIndex:j,columnIndex:F}),f.current=true,k.current?.(L);}},[i,s,w]),T=(0, X.useCallback)(()=>{r===0||n===0||(w({startRow:0,startCol:0,endRow:r-1,endCol:n-1}),i({rowIndex:0,columnIndex:s.current}));},[r,n,i,s,w]),I=(0, X.useRef)(null),k=(0, X.useRef)(null);return (0, X.useEffect)(()=>{let D=new Set,j=null,F=null,B=null,E=(N,V,O,A,P,W,Z,$)=>{N.hasAttribute(Vp)||N.setAttribute(Vp,""),$&&V===$.row&&O===$.col?N.hasAttribute(Ll)||N.setAttribute(Ll,""):N.hasAttribute(Ll)&&N.removeAttribute(Ll),D.add(N);},M=N=>{N.removeAttribute(Vp),N.removeAttribute(Ll);},L=(N,V,O,A,P)=>{let W=j?.get(Dl(N,O+P)),Z=j?.get(Dl(V,A+P));if(!W||!Z)return;let $=W.closest("td"),K=Z.closest("td");if(!$||!K||!B&&(B=W.closest("table")?.parentElement,!B))return;F||(F=document.createElement("div"),F.style.position="absolute",F.style.border="2px solid var(--ogrid-selection, #217346)",F.style.pointerEvents="none",F.style.zIndex="4",F.style.boxSizing="border-box",B.appendChild(F));let te=B.getBoundingClientRect(),J=$.getBoundingClientRect(),Y=K.getBoundingClientRect();F.style.top=`${Math.round(J.top-te.top)}px`,F.style.left=`${Math.round(J.left-te.left)}px`,F.style.width=`${Math.round(Y.right-J.left)}px`,F.style.height=`${Math.round(Y.bottom-J.top)}px`,F.style.display="block";},b=()=>{F&&(F.style.display="none");},y=()=>{F?.remove(),F=null,B=null;},x=N=>{if(!a.current||!f.current)return;let V=Math.min(N.startRow,N.endRow),O=Math.max(N.startRow,N.endRow),A=Math.min(N.startCol,N.endCol),P=Math.max(N.startCol,N.endCol),W=p.current,Z=s.current;for(let K of D){let te=parseInt(K.getAttribute("data-row-index")??"",10),J=parseInt(K.getAttribute("data-col-index")??"",10)-Z;te>=V&&te<=O&&J>=A&&J<=P||(M(K),D.delete(K));}j||(j=os(a.current));let $=false;for(let K=V;K<=O;K++)for(let te=A;te<=P;te++){let J=Dl(K,te+Z),Y=j?.get(J);Y&&!Y.isConnected&&!$&&($=true,j=os(a.current),Y=j?.get(J)),Y&&Y.isConnected&&E(Y,K,te,V,O,A,P,W);}L(V,O,A,P,Z);};k.current=x;let _=()=>{for(let N of D)M(N);D.clear(),j=null,b();},S=(N,V)=>{if(!p.current)return null;let O=document.elementFromPoint(N,V)?.closest?.("[data-row-index][data-col-index]");if(!O)return null;let A=parseInt(O.getAttribute("data-row-index")??"",10),P=parseInt(O.getAttribute("data-col-index")??"",10),W=s.current;if(Number.isNaN(A)||Number.isNaN(P)||P<W)return null;let Z=P-W,$=p.current;return tn({startRow:$.row,startCol:$.col,endRow:A,endCol:Z})},R=()=>{let N=a.current,V=I.current;if(!N||!V||!f.current){g.current=null;return}let O=N.getBoundingClientRect(),A=0,P=0;if(V.cy<O.top+Br?P=-si(O.top+Br-V.cy):V.cy>O.bottom-Br&&(P=si(V.cy-(O.bottom-Br))),V.cx<O.left+Br?A=-si(O.left+Br-V.cx):V.cx>O.right-Br&&(A=si(V.cx-(O.right-Br))),A===0&&P===0){g.current=null;return}N.scrollTop+=P,N.scrollLeft+=A;let W=S(V.cx,V.cy);W&&(m.current=W,x(W)),g.current=requestAnimationFrame(R);},z=()=>{let N=a.current,V=I.current;if(!N||!V||!f.current){U();return}let O=N.getBoundingClientRect(),A=0,P=0;if(V.cy<O.top+Br?P=-si(O.top+Br-V.cy):V.cy>O.bottom-Br&&(P=si(V.cy-(O.bottom-Br))),V.cx<O.left+Br?A=-si(O.left+Br-V.cx):V.cx>O.right-Br&&(A=si(V.cx-(O.right-Br))),A===0&&P===0){U();return}g.current||(g.current=requestAnimationFrame(R));},U=()=>{g.current&&(cancelAnimationFrame(g.current),g.current=null);},H=N=>{!f.current||!p.current||(d.current||(d.current=true,c(true),j=os(a.current)),I.current={cx:N.clientX,cy:N.clientY},z(),h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{h.current=0;let V=I.current;if(!V)return;let O=S(V.cx,V.cy);if(!O)return;let A=m.current;A&&A.startRow===O.startRow&&A.startCol===O.startCol&&A.endRow===O.endRow&&A.endCol===O.endCol||(m.current=O,x(O));}));},q=()=>{if(!f.current)return;U(),h.current&&(cancelAnimationFrame(h.current),h.current=0),f.current=false;let N=d.current;if(N){let V=I.current;if(V){let A=S(V.cx,V.cy);A&&(m.current=A);}let O=m.current;if(O){w(O);let A=p.current;A&&i({rowIndex:A.row,columnIndex:A.col+s.current});}}m.current=null,I.current=null,p.current=null,N&&c(false),requestAnimationFrame(()=>{_();});};return window.addEventListener("pointermove",H,true),window.addEventListener("pointerup",q,true),()=>{window.removeEventListener("pointermove",H,true),window.removeEventListener("pointerup",q,true),h.current&&cancelAnimationFrame(h.current),U(),y();}},[i,s,w,a]),{selectionRange:o,setSelectionRange:w,handleCellMouseDown:C,handleSelectAllCells:T,isDragging:u}}function m8(e){let{colOffset:t,beginBatch:r,endBatch:n}=e,i=$e(e.items),a=$e(e.visibleCols),s=$e(e.selectionRange),o=$e(e.activeCell),l=$e(e.editable),f=$e(e.onCellValueChanged),u=$e(e.formulas),c=$e(e.flatColumns),d=$e(e.getFormula),p=$e(e.hasFormula),h=$e(e.setFormula),m=(0, X.useRef)(null),[g,v]=(0, X.useState)(null),[w,C]=(0, X.useState)(null),T=(0, X.useRef)(null),I=(0, X.useRef)(true);(0, X.useEffect)(()=>()=>{I.current=false;},[]);let k=(0, X.useCallback)(()=>{let E=s.current,M=o.current;return E??(M!=null?{startRow:M.rowIndex,startCol:M.columnIndex-t,endRow:M.rowIndex,endCol:M.columnIndex-t}:null)},[t,s,o]),D=(0, X.useCallback)(()=>{let E=k();if(E==null)return;let M=tn(E),L=u.current&&c.current?{colOffset:t,flatColumns:c.current,getFormula:d.current,hasFormula:p.current}:void 0,b=Op(i.current,a.current,M,L);T.current=b,C(M),navigator.clipboard.writeText(b).catch(()=>{});},[k,i,a,u,c,d,p,t]),j=(0, X.useCallback)(()=>{if(l.current===false)return;let E=k();if(E==null||f.current==null)return;let M=tn(E);m.current=M,v(M),C(null),D(),C(null);},[k,D,l,f]),F=(0, X.useCallback)(async()=>{if(l.current===false)return;let E=f.current;if(E==null)return;let M;try{M=await navigator.clipboard.readText();}catch{M="";}if(!I.current||(!M.trim()&&T.current!=null&&(M=T.current),!M.trim()))return;let L=k(),b=L?L.startRow:0,y=L?L.startCol:0,x=i.current,_=a.current,S=Dp(M),R=u.current&&c.current?{colOffset:t,flatColumns:c.current,setFormula:h.current}:void 0;r?.();let z=wy(S,b,y,x,_,R);for(let U of z)E(U);if(m.current){let U=_y(m.current,x,_);for(let H of U)E(H);m.current=null,v(null);}n?.(),C(null);},[k,i,a,l,f,r,n,u,c,h,t]),B=(0, X.useCallback)(()=>{C(null),v(null),m.current=null;},[]);return {handleCopy:D,handleCut:j,handlePaste:F,cutRange:g,copyRange:w,clearClipboardRanges:B}}function g8(e){let{items:t,getRowId:r,rowSelection:n,controlledSelectedRows:i,onSelectionChange:a}=e,[s,o]=(0, X.useState)(new Set),l=(0, X.useRef)(-1),f=(0, X.useMemo)(()=>i!=null?i instanceof Set?i:new Set(i):s,[i,s]),u=(0, X.useCallback)(v=>{i===void 0&&o(v),a?.({selectedRowIds:Array.from(v),selectedItems:t.filter(w=>v.has(r(w)))});},[i,a,t,r]),c=$e(f),d=$e(t),p=(0, X.useCallback)((v,w,C,T)=>{if(n==="single"){u(w?new Set([v]):new Set),l.current=C;return}let I=d.current,k;T&&l.current>=0&&l.current!==C?k=by(l.current,C,w,I,r,c.current):(k=new Set(c.current),w?k.add(v):k.delete(v)),l.current=C,u(k);},[n,r,u,d,c]),h=(0, X.useCallback)(v=>{u(v?new Set(t.map(w=>r(w))):new Set);},[t,r,u]),{allSelected:m,someSelected:g}=(0, X.useMemo)(()=>vy(f,t,r),[t,f,r]);return {selectedRowIds:f,updateSelection:u,handleRowCheckboxChange:p,handleSelectAll:h,allSelected:m,someSelected:g}}function b8(e){let t=(0, X.useRef)(e);t.current=e;let r=(0, X.useRef)(null),n=(0, X.useRef)(null);return {handleGridKeyDown:(0, X.useCallback)(i=>{let{data:a,state:s,handlers:o,features:l}=t.current,{items:f,visibleCols:u,colOffset:c,hasCheckboxCol:d,visibleColumnCount:p,getRowId:h}=a,{activeCell:m,selectionRange:g,editingCell:v,selectedRowIds:w}=s,{setActiveCell:C,setSelectionRange:T,setEditingCell:I,handleRowCheckboxChange:k,handleCopy:D,handleCut:j,handlePaste:F,setContextMenu:B,onUndo:E,onRedo:M,clearClipboardRanges:L}=o,{editable:b,onCellValueChanged:y,rowSelection:x,wrapperRef:_,onKeyDown:S,fillDown:R}=l;if(S&&(S(i),i.defaultPrevented))return;let z=f.length-1,U=p-1+c;if(f.length===0)return;if(m===null){["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Tab","Enter","Home","End","PageDown","PageUp"].includes(i.key)&&(C({rowIndex:0,columnIndex:c}),i.preventDefault());return}let{rowIndex:H,columnIndex:q}=m,N=q-c,V=i.shiftKey,O=(A,P)=>{if(A<0||A>=f.length||P<0||P>=u.length)return true;let W=cr(f[A],u[P]);return W==null||W===""};switch(i.key){case "c":if(i.ctrlKey||i.metaKey){if(v!=null)break;i.preventDefault(),D();}break;case "x":if(i.ctrlKey||i.metaKey){if(v!=null)break;i.preventDefault(),j();}break;case "v":if(i.ctrlKey||i.metaKey){if(v!=null)break;i.preventDefault(),F();}break;case "ArrowDown":case "ArrowUp":case "ArrowRight":case "ArrowLeft":{if(v!=null)break;i.preventDefault();let{newRowIndex:A,newColumnIndex:P,newRange:W}=my({direction:i.key,rowIndex:H,columnIndex:q,dataColIndex:N,colOffset:c,maxRowIndex:z,maxColIndex:U,visibleColCount:u.length,isCtrl:i.ctrlKey||i.metaKey,isShift:V,selectionRange:g,isEmptyAt:O});T(W),C({rowIndex:A,columnIndex:P});break}case "Tab":{i.preventDefault();let{rowIndex:A,columnIndex:P}=Mp(H,q,z,U,c,i.shiftKey),W=P-c;T({startRow:A,startCol:W,endRow:A,endCol:W}),C({rowIndex:A,columnIndex:P});break}case "Home":{i.preventDefault();let A=i.ctrlKey?0:H;T({startRow:A,startCol:0,endRow:A,endCol:0}),C({rowIndex:A,columnIndex:c});break}case "End":{i.preventDefault();let A=i.ctrlKey?z:H;T({startRow:A,startCol:p-1,endRow:A,endCol:p-1}),C({rowIndex:A,columnIndex:U});break}case "PageDown":case "PageUp":{i.preventDefault();let A=_.current,P=10,W=36;if(A)if(r.current&&n.current===A)W=r.current.rowHeight,P=r.current.pageSize;else {let K=A.querySelector("tbody tr");K&&K.offsetHeight>0&&(W=K.offsetHeight,P=Math.max(1,Math.floor(A.clientHeight/W))),r.current={rowHeight:W,pageSize:P},n.current=A;}let Z=i.key==="PageDown"?1:-1,$=Math.max(0,Math.min(H+Z*P,z));T(V?{startRow:g?.startRow??H,startCol:g?.startCol??N,endRow:$,endCol:g?.endCol??N}:{startRow:$,startCol:N,endRow:$,endCol:N}),C({rowIndex:$,columnIndex:q}),A&&(A.scrollTop=ey($,W,A.clientHeight,"center"));break}case "Enter":case "F2":{if(i.preventDefault(),N>=0&&N<u.length){let A=u[N],P=f[H];if(P&&A){let W=A.editable===true||typeof A.editable=="function"&&A.editable(P);b!==false&&W&&y!=null&&I({rowId:h(P),columnId:A.columnId});}}break}case "Escape":i.preventDefault(),v!=null?I(null):(L?.(),C(null),T(null));break;case " ":if(x!=="none"&&q===0&&d){i.preventDefault();let A=f[H];if(A){let P=h(A),W=w.has(P);k(P,!W,H,i.shiftKey);}}break;case "z":(i.ctrlKey||i.metaKey)&&v==null&&(i.shiftKey&&M?(i.preventDefault(),M()):!i.shiftKey&&E&&(i.preventDefault(),E()));break;case "y":(i.ctrlKey||i.metaKey)&&v==null&&M&&(i.preventDefault(),M());break;case "a":if(i.ctrlKey||i.metaKey){if(v!=null)break;i.preventDefault(),f.length>0&&p>0&&(T({startRow:0,startCol:0,endRow:f.length-1,endCol:p-1}),C({rowIndex:0,columnIndex:c}));}break;case "d":if(i.ctrlKey||i.metaKey){if(v!=null)break;b!==false&&R&&(i.preventDefault(),R());}break;case "Delete":case "Backspace":{if(v!=null||b===false||y==null)break;let A=g??(m!=null?{startRow:m.rowIndex,startCol:m.columnIndex-c,endRow:m.rowIndex,endCol:m.columnIndex-c}:null);if(A==null)break;i.preventDefault();let P=gy(A,f,u);for(let W of P)y(W);break}case "F10":if(i.shiftKey)if(i.preventDefault(),m!=null&&_.current){let A=`[data-row-index="${m.rowIndex}"][data-col-index="${m.columnIndex}"]`,P=_.current.querySelector(A);if(P){let W=P.getBoundingClientRect();B({x:W.left+W.width/2,y:W.top+W.height/2});}else B({x:100,y:100});}else B({x:100,y:100});break}},[])}}function v8(e){let{onCellValueChanged:t,maxUndoDepth:r=100}=e,n=$e(t),i=(0, X.useRef)(null);i.current===null&&(i.current=new zp(r));let[a,s]=(0, X.useState)(0),[o,l]=(0, X.useState)(0),f=(0, X.useCallback)(()=>{let m=i.current;if(!m)throw new Error("UndoRedoStack not initialized");return m},[]),u=(0, X.useCallback)(m=>{if(!n.current)return;let g=f();g.record(m),g.isBatching||(s(g.historyLength),l(g.redoLength)),n.current(m);},[f,n]),c=(0, X.useCallback)(()=>{f().beginBatch();},[f]),d=(0, X.useCallback)(()=>{let m=f();m.endBatch(),s(m.historyLength),l(m.redoLength);},[f]),p=(0, X.useCallback)(()=>{if(!n.current)return;let m=f(),g=m.undo();if(g){s(m.historyLength),l(m.redoLength);for(let v=g.length-1;v>=0;v--){let w=g[v];n.current({...w,oldValue:w.newValue,newValue:w.oldValue});}}},[f,n]),h=(0, X.useCallback)(()=>{if(!n.current)return;let m=f(),g=m.redo();if(g){s(m.historyLength),l(m.redoLength);for(let v of g)n.current(v);}},[f,n]);return {onCellValueChanged:t?u:void 0,undo:p,redo:h,canUndo:a>0,canRedo:o>0,beginBatch:c,endBatch:d,maxUndoDepth:r}}function y8(e,t){let[r,n]=(0, X.useState)(e);return (0, X.useEffect)(()=>{let i=setTimeout(()=>{n(e);},t);return ()=>clearTimeout(i)},[e,t]),r}function w8(e){let{wrapperRef:t,visibleCols:r,flatColumns:n,hasCheckboxCol:i,initialColumnWidths:a,onColumnResized:s}=e,[o,l]=(0, X.useState)(0);(0, X.useEffect)(()=>{let p=t.current;if(!p)return;let h=0,m=()=>{let w=p.getBoundingClientRect(),C=window.getComputedStyle(p),T=(parseFloat(C.borderLeftWidth||"0")||0)+(parseFloat(C.borderRightWidth||"0")||0),I=Math.round(Math.max(0,w.width-T));l(k=>k===I?k:I);},g=()=>{h||(h=requestAnimationFrame(()=>{h=0,m();}));},v=new ResizeObserver(g);return v.observe(p),m(),()=>{v.disconnect(),h&&cancelAnimationFrame(h);}},[t]);let[f,u]=(0, X.useState)(()=>{if(!a)return {};let p={};for(let[h,m]of Object.entries(a))p[h]={widthPx:m};return p}),c=(0, X.useMemo)(()=>{let p=i?Nl:0;return r.reduce((h,m)=>h+(m.minWidth??Mc(m.name))+Tc,p)},[r,i]);(0, X.useEffect)(()=>{let p=new Set(n.map(h=>h.columnId));u(h=>{let m=Object.fromEntries(Object.entries(h).filter(([g])=>p.has(g)));return Object.keys(m).length!==Object.keys(h).length?m:h});},[n]);let d=(0, X.useMemo)(()=>{let p=i?Nl:0;return r.reduce((h,m)=>{let g=f[m.columnId],v=m.minWidth??Mc(m.name),w=g?g.widthPx:m.idealWidth??m.defaultWidth??v;return h+Math.max(v,w)+Tc},p)},[r,f,i]);return {containerWidth:o,minTableWidth:c,desiredTableWidth:d,columnSizingOverrides:f,setColumnSizingOverrides:u,onColumnResized:s}}function _8(e){let{columns:t,pinnedColumns:r,onColumnPinned:n}=e,[i,a]=(0, X.useState)(()=>{let d={};for(let p of t)p.pinned&&(d[p.columnId]=p.pinned);return d}),s=r??i,o=(0, X.useCallback)((d,p)=>{let h={...s,[d]:p};r||a(h),n?.(d,p);},[s,r,n]),l=(0, X.useCallback)(d=>{let{[d]:p,...h}=s;r||a(h),n?.(d,null);},[s,r,n]),f=(0, X.useCallback)(d=>s[d],[s]),u=(0, X.useCallback)((d,p,h,m,g)=>{let v={},w=m?g:0;for(let C of d)s[C.columnId]==="left"&&(v[C.columnId]=w,w+=p[C.columnId]??h);return v},[s]),c=(0, X.useCallback)((d,p,h)=>{let m={},g=0;for(let v=d.length-1;v>=0;v--){let w=d[v];s[w.columnId]==="right"&&(m[w.columnId]=g,g+=p[w.columnId]??h);}return m},[s]);return {pinnedColumns:s,pinColumn:o,unpinColumn:l,isPinned:f,computeLeftOffsets:u,computeRightOffsets:c}}function x8(e){let{pinnedColumns:t,onPinColumn:r,onUnpinColumn:n,sortBy:i,sortDirection:a,onColumnSort:s,onColumnResized:o,onAutosizeColumn:l,columns:f}=e,[u,c]=(0, X.useState)(false),[d,p]=(0, X.useState)(null),[h,m]=(0, X.useState)(null),g=(0, X.useCallback)((S,R)=>{p(S),m(R),c(true);},[]),v=(0, X.useCallback)(()=>{c(false),p(null),m(null);},[]),w=d?t[d]:void 0,C=w!=="left",T=w!=="right",I=!!w,k=f.find(S=>S.columnId===d),D=d===i?a:null,j=k?.sortable!==false,F=k?.resizable!==false,B=(0, X.useCallback)(()=>{d&&C&&(r(d,"left"),v());},[d,C,r,v]),E=(0, X.useCallback)(()=>{d&&T&&(r(d,"right"),v());},[d,T,r,v]),M=(0, X.useCallback)(()=>{d&&I&&(n(d),v());},[d,I,n,v]),L=(0, X.useCallback)(()=>{d&&j&&(s(d,"asc"),v());},[d,j,s,v]),b=(0, X.useCallback)(()=>{d&&j&&(s(d,"desc"),v());},[d,j,s,v]),y=(0, X.useCallback)(()=>{d&&j&&(s(d,null),v());},[d,j,s,v]),x=(0, X.useCallback)(()=>{let S=l??o;if(!d||!S||!F)return;let R=f.find(z=>z.columnId===d);S(d,kc(d,R?.minWidth)),v();},[d,l,o,F,f,v]),_=(0, X.useCallback)(()=>{let S=l??o;S&&(f.forEach(R=>{R.resizable!==false&&S(R.columnId,kc(R.columnId,R.minWidth));}),v());},[f,l,o,v]);return {isOpen:u,openForColumn:d,anchorElement:h,open:g,close:v,handlePinLeft:B,handlePinRight:E,handleUnpin:M,handleSortAsc:L,handleSortDesc:b,handleClearSort:y,handleAutosizeThis:x,handleAutosizeAll:_,canPinLeft:C,canPinRight:T,canUnpin:I,currentSort:D,isSortable:j,isResizable:F}}function E2(e){return {isOpen:e.isOpen,anchorElement:e.anchorElement,onClose:e.close,onPinLeft:e.handlePinLeft,onPinRight:e.handlePinRight,onUnpin:e.handleUnpin,onSortAsc:e.handleSortAsc,onSortDesc:e.handleSortDesc,onClearSort:e.handleClearSort,onAutosizeThis:e.handleAutosizeThis,onAutosizeAll:e.handleAutosizeAll,canPinLeft:e.canPinLeft,canPinRight:e.canPinRight,canUnpin:e.canUnpin,currentSort:e.currentSort,isSortable:e.isSortable,isResizable:e.isResizable}}function S8(e){let{columns:t,items:r,getRowId:n,visibleColumns:i,columnOrder:a,rowSelection:s="none",showRowNumbers:o,initialColumnWidths:l,onColumnResized:f,onAutosizeColumn:u,pinnedColumns:c,onColumnPinned:d,sortBy:p,sortDirection:h,onColumnSort:m,responsiveColumns:g,wrapperRef:v}=e,w=(0, X.useMemo)(()=>as(t),[t]),C=(0, X.useMemo)(()=>!c||Object.keys(c).length===0?w:w.map(K=>{let te=c[K.columnId];return te&&K.pinned!==te?{...K,pinned:te}:K}),[w,c]),T=(0, X.useMemo)(()=>Ey(g),[g]),I=(0, X.useMemo)(()=>{let K=i?C.filter(J=>i.has(J.columnId)):C;if(!a?.length)return K;let te=new Map;for(let J=0;J<a.length;J++)te.set(a[J],J);return [...K].sort((J,Y)=>{let ne=te.get(J.columnId)??-1,re=te.get(Y.columnId)??-1;return ne===-1&&re===-1?0:ne===-1?1:re===-1?-1:ne-re})},[C,i,a]),k=s==="multiple",D=!!o,j=(0, X.useMemo)(()=>{let K=new Map;return r.forEach((te,J)=>K.set(n(te),J)),K},[r,n]),{containerWidth:F,minTableWidth:B,desiredTableWidth:E,columnSizingOverrides:M,setColumnSizingOverrides:L}=w8({wrapperRef:v,visibleCols:I,flatColumns:C,hasCheckboxCol:k,initialColumnWidths:l,onColumnResized:f}),b=(0, X.useMemo)(()=>Ry(I,F,T),[I,F,T]),y=b.length,x=(k?1:0)+(D?1:0),_=y+x,S=x,R=_8({columns:C,pinnedColumns:c,onColumnPinned:d}),z=(0, X.useMemo)(()=>{let K=Object.entries(M);return K.length===0?"":K.map(([te,J])=>`${te}:${Math.round(J.widthPx)}`).join(",")},[M]),[U,H]=(0, X.useState)({});(0, X.useLayoutEffect)(()=>{let K=v.current;if(!K)return;let te=K.querySelectorAll("th[data-column-id]");if(te.length===0)return;let J={};te.forEach(Y=>{let ne=Y.getAttribute("data-column-id");ne&&(J[ne]=Y.offsetWidth);}),H(Y=>{for(let ne in J)if(Y[ne]!==J[ne])return J;return Object.keys(Y).length!==Object.keys(J).length?J:Y});},[b,z,v]);let q=(0, X.useMemo)(()=>{let K={};for(let te of b){let J=M[te.columnId];K[te.columnId]=J?J.widthPx:U[te.columnId]??te.idealWidth??te.defaultWidth??te.minWidth??Il;}return K},[b,M,U]),N=(0, X.useMemo)(()=>R.computeLeftOffsets(b,q,Il,k,Nl),[R,b,q,k]),V=(0, X.useMemo)(()=>R.computeRightOffsets(b,q,Il),[R,b,q]),O=$e(m),A=(0, X.useCallback)((K,te)=>O.current?.(K,te),[O]),P=(0, X.useCallback)((K,te)=>{L(J=>({...J,[K]:{widthPx:te}})),(u??f)?.(K,te);},[L,u,f]),W=x8({pinnedColumns:R.pinnedColumns,onPinColumn:R.pinColumn,onUnpinColumn:R.unpinColumn,sortBy:p,sortDirection:h??"asc",onColumnSort:A,onColumnResized:f,onAutosizeColumn:P,columns:C}),Z=(0, X.useMemo)(()=>({flatColumns:C,visibleCols:b,visibleColumnCount:y,totalColCount:_,colOffset:S,hasCheckboxCol:k,hasRowNumbersCol:D,rowIndexByRowId:j,containerWidth:F,minTableWidth:B,desiredTableWidth:E,columnSizingOverrides:M,setColumnSizingOverrides:L,onColumnResized:f,measuredColumnWidths:U}),[C,b,y,_,S,k,D,j,F,B,E,M,L,f,U]),$=(0, X.useMemo)(()=>({pinnedColumns:R.pinnedColumns,pinColumn:R.pinColumn,unpinColumn:R.unpinColumn,isPinned:R.isPinned,leftOffsets:N,rightOffsets:V,headerMenu:W}),[R.pinnedColumns,R.pinColumn,R.unpinColumn,R.isPinned,N,V,W]);return {layout:Z,pinning:$,flatColumns:C,visibleCols:b,visibleColumnCount:y,totalColCount:_,colOffset:S,hasCheckboxCol:k,hasRowNumbersCol:D,columnSizingOverrides:M,setColumnSizingOverrides:L,handleAutosizeColumn:P,stableOnColumnSort:A}}function C8(e){let{editingCell:t,setEditingCell:r,pendingEditorValue:n,setPendingEditorValue:i,onCellValueChanged:a,setActiveCell:s,setSelectionRange:o,colOffset:l,setFormula:f,onFormulaCellChanged:u,formulas:c,flatColumns:d}=e,[p,h]=(0, X.useState)(null),m=$e(e.visibleCols),g=$e(e.itemsLength),v=$e(a),w=$e(f),C=$e(u),T=$e(d),I=(0, X.useCallback)((D,j,F,B,E,M,L)=>{if(c&&typeof B=="string"&&B.startsWith("=")&&w.current){let y=T.current,x=y?y.findIndex(_=>_.columnId===j):-1;if(x>=0){if(w.current(x,E,B),r(null),h(null),i(void 0),E<g.current-1){let _=E+1,S=M-l;s({rowIndex:_,columnIndex:M}),o({startRow:_,startCol:S,endRow:_,endCol:S});}return}}let b=m.current.find(y=>y.columnId===j);if(b){let y=Wa(B,F,D,b);if(!y.valid){r(null),h(null),i(void 0);return}B=y.value;}if(v.current?.({item:D,columnId:j,oldValue:F,newValue:B,rowIndex:E}),c&&C.current&&T.current){let y=T.current.findIndex(x=>x.columnId===j);y>=0&&C.current(y,E);}if(r(null),h(null),i(void 0),!L?.skipAdvance&&E<g.current-1){let y=E+1,x=M-l;s({rowIndex:y,columnIndex:M}),o({startRow:y,startCol:x,endRow:y,endCol:x});}},[c,r,i,s,o,l,m,g,v,w,C,T]),k=(0, X.useCallback)(()=>{r(null),h(null),i(void 0);},[r,i]);return {editing:(0, X.useMemo)(()=>({editingCell:t,setEditingCell:r,pendingEditorValue:n,setPendingEditorValue:i,commitCellEdit:I,cancelPopoverEdit:k,popoverAnchorEl:p,setPopoverAnchorEl:h}),[t,r,n,i,I,k,p,h])}}var zc="data-drag-range";function E8(e){let{items:t,visibleCols:r,editable:n,onCellValueChanged:i,selectionRange:a,setSelectionRange:s,setActiveCell:o,colOffset:l,wrapperRef:f,beginBatch:u,endBatch:c,formulaOptions:d}=e,p=$e(i),[h,m]=(0, X.useState)(null),g=(0, X.useRef)({endRow:0,endCol:0}),v=(0, X.useRef)(0),w=(0, X.useRef)(null),C=$e(l),T=$e(t),I=$e(r),k=$e(d);(0, X.useEffect)(()=>{if(!h||n===false||!p.current||!f.current)return;g.current={endRow:h.startRow,endCol:h.startCol},w.current=null;let B=new Set,E=os(f.current),M=S=>{if(!f.current)return;let R=Math.min(S.startRow,S.endRow),z=Math.max(S.startRow,S.endRow),U=Math.min(S.startCol,S.endCol),H=Math.max(S.startCol,S.endCol),q=C.current;for(let N of B){let V=parseInt(N.getAttribute("data-row-index")??"",10),O=parseInt(N.getAttribute("data-col-index")??"",10)-q;V>=R&&V<=z&&O>=U&&O<=H||(N.removeAttribute(zc),B.delete(N));}for(let N=R;N<=z;N++)for(let V=U;V<=H;V++){let O=Dl(N,V+q),A=E?.get(O);A&&!A.isConnected&&(E=os(f.current),A=E.get(O)),A&&(A.hasAttribute(zc)||A.setAttribute(zc,""),B.add(A));}},L=()=>{for(let S of B)S.removeAttribute(zc);B.clear();},b=null,y=(S,R)=>{let z=document.elementFromPoint(S,R)?.closest?.("[data-row-index][data-col-index]");if(!z||!f.current?.contains(z))return null;let U=parseInt(z.getAttribute("data-row-index")??"",10),H=parseInt(z.getAttribute("data-col-index")??"",10);if(Number.isNaN(U)||Number.isNaN(H)||H<C.current)return null;let q=H-C.current;return tn({startRow:h.startRow,startCol:h.startCol,endRow:U,endCol:q})},x=S=>{b={cx:S.clientX,cy:S.clientY},v.current&&cancelAnimationFrame(v.current),v.current=requestAnimationFrame(()=>{if(v.current=0,!b)return;let R=y(b.cx,b.cy);if(!R)return;let z=w.current;z&&z.startRow===R.startRow&&z.startCol===R.startCol&&z.endRow===R.endRow&&z.endCol===R.endCol||(w.current=R,g.current={endRow:R.endRow,endCol:R.endCol},M(R));});},_=()=>{if(v.current&&(cancelAnimationFrame(v.current),v.current=0),b){let U=y(b.cx,b.cy);U&&(w.current=U,g.current={endRow:U.endRow,endCol:U.endCol});}L();let S=g.current,R=tn({startRow:h.startRow,startCol:h.startCol,endRow:S.endRow,endCol:S.endCol});s(R),o({rowIndex:h.startRow,columnIndex:h.startCol+C.current});let z=Ip(R,h.startRow,h.startCol,t,r,k.current);if(z.length>0){u?.();for(let U of z)p.current?.(U);c?.();}m(null),w.current=null;};return window.addEventListener("pointermove",x,true),window.addEventListener("pointerup",_,true),()=>{window.removeEventListener("pointermove",x,true),window.removeEventListener("pointerup",_,true),v.current&&cancelAnimationFrame(v.current);}},[h,n,t,r,s,o,u,c,C,f,p,k]);let D=(0, X.useRef)(a);D.current=a;let j=(0, X.useCallback)(B=>{B.preventDefault(),B.stopPropagation();let E=D.current;E&&m({startRow:E.startRow,startCol:E.startCol});},[]),F=(0, X.useCallback)(()=>{let B=D.current;if(!B||n===false||!p.current)return;let E=tn(B),M=Ip(E,E.startRow,E.startCol,T.current,I.current,k.current);if(M.length>0){u?.();for(let L of M)p.current(L);c?.();}},[n,u,c,p,T,I,k]);return {fillDrag:h,setFillDrag:m,handleFillHandleMouseDown:j,fillDown:F}}var Ka=()=>{},R8=async()=>{},A8=(e,t,r)=>{},T8=e=>{};function M8(e){let{items:t,visibleCols:r,colOffset:n,hasCheckboxCol:i,visibleColumnCount:a,getRowId:s,editable:o,onCellValueChangedProp:l,cellSelection:f,rowSelection:u,selectedRowIds:c,editingCell:d,setEditingCell:p,activeCell:h,setActiveCell:m,handleRowCheckboxChange:g,setContextMenuPosition:v,wrapperRef:w,onKeyDown:C,formulas:T,flatColumns:I,getFormula:k,hasFormula:D,setFormula:j,onFormulaInsertReference:F}=e,B=$e(F),E=v8({onCellValueChanged:l}),M=E.onCellValueChanged,{selectionRange:L,setSelectionRange:b,handleCellMouseDown:y,handleSelectAllCells:x,isDragging:_}=p8({colOffset:n,rowCount:t.length,visibleColCount:r.length,setActiveCell:m,wrapperRef:w}),{handleCopy:S,handleCut:R,handlePaste:z,cutRange:U,copyRange:H,clearClipboardRanges:q}=m8({items:t,visibleCols:r,colOffset:n,selectionRange:L,activeCell:h,editable:o,onCellValueChanged:M,beginBatch:E.beginBatch,endBatch:E.endBatch,formulas:T,flatColumns:I,getFormula:k,hasFormula:D,setFormula:j}),N=(0, X.useCallback)((Z,$,K)=>{if(Z.button!==0)return;let te=B.current;if(te){let J=K-n;if(J>=0){let Y=Oc(J,$+1);if(te(Y)){Z.preventDefault();return}}}w.current?.focus({preventScroll:true}),q(),y(Z,$,K);},[y,q,w,B,n]),V=(0, X.useMemo)(()=>{if(!(!T||!I))return {flatColumns:I,getFormula:k,hasFormula:D,setFormula:j}},[T,I,k,D,j]),{handleFillHandleMouseDown:O,fillDown:A}=E8({items:t,visibleCols:r,editable:o,onCellValueChanged:M,selectionRange:L,setSelectionRange:b,setActiveCell:m,colOffset:n,wrapperRef:w,beginBatch:E.beginBatch,endBatch:E.endBatch,formulaOptions:V}),{handleGridKeyDown:P}=b8({data:{items:t,visibleCols:r,colOffset:n,hasCheckboxCol:i,visibleColumnCount:a,getRowId:s},state:{activeCell:h,selectionRange:L,editingCell:d,selectedRowIds:c},handlers:{setActiveCell:m,setSelectionRange:b,setEditingCell:p,handleRowCheckboxChange:g,handleCopy:S,handleCut:R,handlePaste:z,setContextMenu:v,onUndo:E.undo,onRedo:E.redo,clearClipboardRanges:q},features:{editable:o,onCellValueChanged:M,rowSelection:u??"none",wrapperRef:w,onKeyDown:C,fillDown:A}}),W=L!=null||h!=null;return {interaction:(0, X.useMemo)(()=>({activeCell:f?h:null,setActiveCell:f?m:Ka,selectionRange:f?L:null,setSelectionRange:f?b:Ka,handleCellMouseDown:f?N:A8,handleSelectAllCells:f?x:Ka,hasCellSelection:f?W:false,handleGridKeyDown:f?P:T8,handleFillHandleMouseDown:f?O:Ka,handleCopy:f?S:Ka,handleCut:f?R:Ka,handlePaste:f?z:R8,cutRange:f?U:null,copyRange:f?H:null,clearClipboardRanges:f?q:Ka,canUndo:E.canUndo,canRedo:E.canRedo,onUndo:E.undo,onRedo:E.redo,isDragging:f?_:false}),[f,h,m,L,b,N,x,W,P,O,S,R,z,U,H,q,E.canUndo,E.canRedo,E.undo,E.redo,_]),selectionRange:L,setSelectionRange:b,cutRange:U,copyRange:H,clearClipboardRanges:q,isDragging:_,onCellValueChanged:M,canUndo:E.canUndo,canRedo:E.canRedo}}var Gp=()=>{},k8=e=>{},O8=e=>{};function D8(e){let{cellSelection:t}=e,{contextMenuPosition:r,setContextMenuPosition:n,handleCellContextMenu:i,closeContextMenu:a,handleLongPressStart:s,handleLongPressEnd:o}=h8();return {contextMenu:(0, X.useMemo)(()=>({menuPosition:t?r:null,setMenuPosition:t?n:Gp,handleCellContextMenu:t?i:k8,closeContextMenu:t?a:Gp,handleLongPressStart:t?s:O8,handleLongPressEnd:t?o:Gp}),[t,r,n,i,a,s,o]),contextMenuPosition:r,setContextMenuPosition:n}}function N8(e){let{props:t,wrapperRef:r}=e,{items:n,columns:i,getRowId:a,visibleColumns:s,columnOrder:o,rowSelection:l="none",selectedRows:f,onSelectionChange:u,showRowNumbers:c,statusBar:d,emptyState:p,editable:h,cellSelection:m,onCellValueChanged:g,initialColumnWidths:v,onColumnResized:w,onAutosizeColumn:C,pinnedColumns:T,onColumnPinned:I,responsiveColumns:k,onCellError:D,onKeyDown:j}=t,F=m!==false,{editingCell:B,setEditingCell:E,pendingEditorValue:M,setPendingEditorValue:L}=f8(),{activeCell:b,setActiveCell:y}=c8(r,B),x=S8({columns:i,items:n,getRowId:a,visibleColumns:s,columnOrder:o,rowSelection:l,showRowNumbers:c,initialColumnWidths:v,onColumnResized:w,onAutosizeColumn:C,pinnedColumns:T,onColumnPinned:I,sortBy:t.sortBy,sortDirection:t.sortDirection,onColumnSort:t.onColumnSort,responsiveColumns:k,wrapperRef:r}),{visibleCols:_,visibleColumnCount:S,colOffset:R,hasCheckboxCol:z}=x,U=g8({items:n,getRowId:a,rowSelection:l,controlledSelectedRows:f,onSelectionChange:u}),{selectedRowIds:H,updateSelection:q,handleRowCheckboxChange:N,handleSelectAll:V,allSelected:O,someSelected:A}=U,P=D8({cellSelection:F}),{setContextMenuPosition:W}=P,Z=M8({items:n,visibleCols:_,colOffset:R,hasCheckboxCol:z,visibleColumnCount:S,getRowId:a,editable:h,onCellValueChangedProp:g,cellSelection:F,rowSelection:l,selectedRowIds:H,editingCell:B,setEditingCell:E,activeCell:b,setActiveCell:y,handleRowCheckboxChange:N,setContextMenuPosition:W,wrapperRef:r,onKeyDown:j,formulas:t.formulas,flatColumns:x.layout.flatColumns,getFormula:t.getFormula,hasFormula:t.hasFormula,setFormula:t.setFormula,onFormulaInsertReference:t.onFormulaInsertReference}),{selectionRange:$,setSelectionRange:K,cutRange:te,copyRange:J,isDragging:Y,onCellValueChanged:ne}=Z,re=C8({editingCell:B,setEditingCell:E,pendingEditorValue:M,setPendingEditorValue:L,visibleCols:_,itemsLength:n.length,onCellValueChanged:ne,setActiveCell:y,setSelectionRange:K,colOffset:R,setFormula:t.setFormula,onFormulaCellChanged:t.onFormulaCellChanged,formulas:t.formulas,flatColumns:x.layout.flatColumns}),{sortBy:ie,sortDirection:oe,filters:se,onFilterChange:le,filterOptions:ge,loadingFilterOptions:he,peopleSearch:be}=t,Me=!!be,ye=$e(le),Se=$e(be),We=(0, X.useCallback)((...At)=>ye.current?.(...At),[ye]),Ne=(0, X.useCallback)((...At)=>Se.current?.(...At)??Promise.resolve([]),[Se]),Ee=(0, X.useMemo)(()=>({sortBy:ie,sortDirection:oe,onColumnSort:x.stableOnColumnSort,filters:se,onFilterChange:We,filterOptions:ge,loadingFilterOptions:he,peopleSearch:Me?Ne:void 0}),[ie,oe,x.stableOnColumnSort,se,We,ge,he,Me,Ne]),Le=(0, X.useMemo)(()=>({editingCell:B,activeCell:F?b:null,selectionRange:F?$:null,cutRange:F?te:null,copyRange:F?J:null,colOffset:R,itemsLength:n.length,getRowId:a,editable:h,onCellValueChanged:ne,isDragging:F?Y:false,getFormulaValue:t.getFormulaValue,hasFormula:t.hasFormula,getFormula:t.getFormula,formulaVersion:t.formulaVersion}),[B,b,$,te,J,R,n.length,a,h,ne,F,Y,t.getFormulaValue,t.hasFormula,t.getFormula,t.formulaVersion]),Ce=(0, X.useMemo)(()=>vp(n,_,F?$:null),[n,_,$,F]),xe=(0, X.useMemo)(()=>{let At=hp(d,n.length,H.size);return At?{...At,aggregation:Ce??void 0}:null},[d,n.length,H.size,Ce]),Qe=n.length===0&&!t.windowed&&!!p&&!t.isLoading,Be=(0, X.useMemo)(()=>({selectedRowIds:H,updateSelection:q,handleRowCheckboxChange:N,handleSelectAll:V,allSelected:O,someSelected:A}),[H,q,N,V,O,A]),He=(0, X.useMemo)(()=>({headerFilterInput:Ee,cellDescriptorInput:Le,statusBarConfig:xe,showEmptyInGrid:Qe,onCellError:D}),[Ee,Le,xe,Qe,D]);return {layout:x.layout,rowSelection:Be,editing:re.editing,interaction:Z.interaction,contextMenu:P.contextMenu,viewModels:He,pinning:x.pinning}}function I8(e){let{textValue:t="",onTextChange:r,isFilterOpen:n}=e,[i,a]=(0, X.useState)(t);(0, X.useEffect)(()=>{n&&a(t);},[n,t]);let s=(0, X.useCallback)(()=>{r?.(i.trim());},[r,i]),o=(0, X.useCallback)(()=>a(""),[]);return {tempTextValue:i,setTempTextValue:a,handleTextApply:s,handleTextClear:o}}var z8=150,a2=[];function j8(e){let{selectedValues:t,onFilterChange:r,options:n,isFilterOpen:i}=e,a=t??a2,s=n??a2,[o,l]=(0, X.useState)(()=>new Set(a)),[f,u]=(0, X.useState)(""),c=y8(f,z8);(0, X.useEffect)(()=>{i&&(l(new Set(a)),u(""));},[i,a]);let d=(0, X.useMemo)(()=>{let v=c.trim();if(!v)return s;let w=v.toLowerCase();return s.filter(C=>C.toLowerCase().includes(w))},[s,c]),p=(0, X.useCallback)((v,w)=>{l(C=>{let T=new Set(C);return w?T.add(v):T.delete(v),T});},[]),h=(0, X.useCallback)(()=>{l(v=>{let w=new Set(v);for(let C of d)w.add(C);return w});},[d]),m=(0, X.useCallback)(()=>l(new Set),[]),g=(0, X.useCallback)(()=>{r?.(Array.from(o));},[r,o]);return {tempSelected:o,setTempSelected:l,searchText:f,setSearchText:u,debouncedSearchText:c,filteredOptions:d,handleCheckboxChange:p,handleSelectAll:h,handleClearSelection:m,handleApplyMultiSelect:g}}function L8(e){let{onUserChange:t,peopleSearch:r,isFilterOpen:n,filterType:i}=e,a=(0, X.useRef)(null),s=(0, X.useRef)(void 0),o=(0, X.useRef)(void 0),[l,f]=(0, X.useState)([]),[u,c]=(0, X.useState)(false),[d,p]=(0, X.useState)("");(0, X.useEffect)(()=>(n&&(p(""),f([]),i==="people"&&(s.current=window.setTimeout(()=>a.current?.focus(),50))),()=>{s.current&&window.clearTimeout(s.current);}),[n,i]),(0, X.useEffect)(()=>{if(!(!r||!n||i!=="people")){if(o.current&&window.clearTimeout(o.current),!d.trim()){f([]);return}return c(true),o.current=window.setTimeout(async()=>{try{let g=await r(d);f(g.slice(0,10));}catch{f([]);}finally{c(false);}},Ay),()=>{o.current&&window.clearTimeout(o.current);}}},[d,r,n,i]);let h=(0, X.useCallback)(g=>{t?.(g);},[t]),m=(0, X.useCallback)(()=>{t?.(void 0);},[t]);return {peopleSuggestions:l,isPeopleLoading:u,peopleSearchText:d,setPeopleSearchText:p,peopleInputRef:a,handleUserSelect:h,handleClearUser:m}}function B8(e){let{dateValue:t,onDateChange:r,isFilterOpen:n}=e,[i,a]=(0, X.useState)(t?.from??""),[s,o]=(0, X.useState)(t?.to??"");(0, X.useEffect)(()=>{n&&(a(t?.from??""),o(t?.to??""));},[n,t]);let l=(0, X.useCallback)(()=>{let u=i||void 0,c=s||void 0;r?.(u||c?{from:u,to:c}:void 0);},[r,i,s]),f=(0, X.useCallback)(()=>{a(""),o("");},[]);return {tempDateFrom:i,setTempDateFrom:a,tempDateTo:s,setTempDateTo:o,handleDateApply:l,handleDateClear:f}}var F8=[];function R2(e){let{filterType:t,onSort:r,selectedValues:n,onFilterChange:i,options:a,textValue:s="",onTextChange:o,selectedUser:l,onUserChange:f,peopleSearch:u,dateValue:c,onDateChange:d}=e,p=n??F8,h=(0, X.useRef)(null),m=(0, X.useRef)(null),[g,v]=(0, X.useState)(false),[w,C]=(0, X.useState)(null),T=I8({textValue:s,onTextChange:o,isFilterOpen:g}),I=j8({selectedValues:n,onFilterChange:i,options:a,isFilterOpen:g}),k=L8({onUserChange:f,peopleSearch:u,isFilterOpen:g,filterType:t}),D=B8({dateValue:c,onDateChange:d,isFilterOpen:g});(0, X.useEffect)(()=>{g||C(null);},[g]),(0, X.useEffect)(()=>{if(!g)return;let P=$=>{let K=$.target;m.current&&!m.current.contains(K)&&h.current&&!h.current.contains(K)&&v(false);},W=$=>{($.key==="Escape"||$.key==="Esc")&&($.preventDefault(),$.stopPropagation(),v(false));},Z=setTimeout(()=>document.addEventListener("mousedown",P),0);return document.addEventListener("keydown",W,true),()=>{clearTimeout(Z),document.removeEventListener("mousedown",P),document.removeEventListener("keydown",W,true);}},[g]);let j=(0, X.useCallback)(P=>{P.stopPropagation(),P.preventDefault(),v(W=>{if(!W&&h.current){let Z=h.current.getBoundingClientRect();C({top:Z.bottom+4,left:Z.left});}return !W});},[]),F=(0, X.useCallback)(P=>{P.stopPropagation(),r?.();},[r]),{handleApplyMultiSelect:B}=I,{handleTextApply:E,handleTextClear:M}=T,{handleUserSelect:L,handleClearUser:b}=k,{handleDateApply:y}=D,x=(0, X.useCallback)(()=>{B(),v(false);},[B]),_=(0, X.useCallback)(()=>{E(),v(false);},[E]),S=(0, X.useCallback)(()=>{M(),o?.(""),v(false);},[M,o]),R=(0, X.useCallback)(P=>{L(P),v(false);},[L]),z=(0, X.useCallback)(()=>{b(),v(false);},[b]),U=(0, X.useCallback)(()=>{y(),v(false);},[y]),H=(0, X.useCallback)(P=>P.stopPropagation(),[]),q=(0, X.useCallback)(P=>P.stopPropagation(),[]),N=(0, X.useCallback)(P=>P.stopPropagation(),[]),V=(0, X.useCallback)(P=>P.stopPropagation(),[]),O=(0, X.useCallback)(P=>{P.key!=="Escape"&&P.key!=="Esc"&&P.stopPropagation();},[]),A=(0, X.useMemo)(()=>t==="multiSelect"?p.length>0:t==="text"?!!s.trim():t==="people"?!!l:t==="date"?!!(c?.from||c?.to):false,[t,p,s,l,c]);return {headerRef:h,popoverRef:m,peopleInputRef:k.peopleInputRef,isFilterOpen:g,setFilterOpen:v,tempSelected:I.tempSelected,setTempSelected:I.setTempSelected,tempTextValue:T.tempTextValue,setTempTextValue:T.setTempTextValue,searchText:I.searchText,setSearchText:I.setSearchText,debouncedSearchText:I.debouncedSearchText,filteredOptions:I.filteredOptions,peopleSuggestions:k.peopleSuggestions,isPeopleLoading:k.isPeopleLoading,peopleSearchText:k.peopleSearchText,setPeopleSearchText:k.setPeopleSearchText,tempDateFrom:D.tempDateFrom,setTempDateFrom:D.setTempDateFrom,tempDateTo:D.tempDateTo,setTempDateTo:D.setTempDateTo,hasActiveFilter:A,popoverPosition:w,handlers:{handleFilterIconClick:j,handleApplyMultiSelect:x,handleTextApply:_,handleTextClear:S,handleUserSelect:R,handleClearUser:z,handleDateApply:U,handleDateClear:D.handleDateClear,handleCheckboxChange:I.handleCheckboxChange,handleSelectAll:I.handleSelectAll,handleClearSelection:I.handleClearSelection,handlePopoverClick:H,handleInputFocus:q,handleInputMouseDown:N,handleInputClick:V,handleInputKeyDown:O,handleSortClick:F}}}function A2(e){let{columns:t,visibleColumns:r,onVisibilityChange:n,onSetVisibleColumns:i}=e,[a,s]=(0, X.useState)(false);(0, X.useEffect)(()=>{if(!a)return;let h=m=>{m.key==="Escape"&&(m.preventDefault(),s(false));};return document.addEventListener("keydown",h,true),()=>document.removeEventListener("keydown",h,true)},[a]);let o=(0, X.useCallback)(()=>{s(h=>!h);},[]),l=(0, X.useCallback)(()=>{s(false);},[]),f=(0, X.useCallback)(h=>m=>{n(h,m);},[n]),u=(0, X.useCallback)(()=>{i?i(new Set(t.map(h=>h.columnId))):t.forEach(h=>{r.has(h.columnId)||n(h.columnId,true);});},[t,r,n,i]),c=(0, X.useCallback)(()=>{if(i){let h=new Set(t.filter(m=>m.required).map(m=>m.columnId));i(h);}else t.forEach(h=>{!h.required&&r.has(h.columnId)&&n(h.columnId,false);});},[t,r,n,i]),d=r.size,p=t.length;return {open:a,setOpen:s,handleToggle:o,handleClose:l,handleCheckboxChange:f,handleSelectAll:u,handleClearAll:c,visibleCount:d,totalCount:p}}function o2(e,t){if(e==="")return "";let r=oy(e,t);return r===null?e:r.toISOString().substring(0,10)}function P8(e){let{value:t,editorType:r,onCommit:n,onCancel:i,dateFormat:a,dateEditorType:s}=e,o=a??Ec,[l,f]=(0, X.useState)(()=>{if(t==null)return "";if(r==="date"){let d=String(t);return s==="native"?d.match(/^\d{4}-\d{2}-\d{2}/)?d.substring(0,10):d:Sp(d,o)??d}return String(t)}),u=(0, X.useCallback)(d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),i()),d.key==="Enter"&&(r==="text"||r==="date")&&(d.preventDefault(),d.stopPropagation(),n(r==="date"&&s!=="native"?o2(l,o):l));},[i,n,l,r,o,s]),c=(0, X.useCallback)(()=>{r==="text"?n(l):r==="date"&&n(s==="native"?l:o2(l,o));},[r,l,n,o,s]);return {localValue:l,setLocalValue:f,handleKeyDown:u,handleBlur:c,commit:n,cancel:i}}function U8({columnSizingOverrides:e,setColumnSizingOverrides:t,minWidth:r=80,defaultWidth:n=120,onColumnResized:i}){let a=(0, X.useRef)(0),s=(0, X.useRef)(i);s.current=i;let o=$e(e),l=(0, X.useRef)(null);(0, X.useEffect)(()=>()=>{l.current&&(l.current(),l.current=null);},[]);let f=(0, X.useCallback)((d,p)=>{d.preventDefault(),d.stopPropagation(),l.current&&(l.current(),l.current=null);let h=d.clientX,m=p.columnId,g=d.currentTarget.closest("th"),v=g?g.getBoundingClientRect().width:o.current[m]?.widthPx??p.idealWidth??p.defaultWidth??n,w=v,C=g?.closest("thead");if(C){let E=C.querySelectorAll("th[data-column-id]");E.length>0&&t(M=>{let L={...M};return E.forEach(b=>{let y=b.dataset.columnId;y&&!L[y]&&(L[y]={widthPx:b.getBoundingClientRect().width});}),L[m]={widthPx:v},L});}let T=document.body.style.cursor,I=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let k=()=>{t(E=>({...E,[m]:{widthPx:w}}));},D=m===$a?Ap:r,j=E=>{let M=E.clientX-h;w=Math.max(D,v+M),a.current||(a.current=requestAnimationFrame(()=>{a.current=0,k();}));},F=()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",B),l.current=null,document.body.style.cursor=T,document.body.style.userSelect=I,a.current&&(cancelAnimationFrame(a.current),a.current=0);},B=()=>{F(),k();let E=g?.closest("[tabindex]");E?E.focus({preventScroll:true}):document.activeElement instanceof HTMLElement&&document.activeElement.blur(),s.current&&s.current(m,w);};document.addEventListener("pointermove",j),document.addEventListener("pointerup",B),l.current=F;},[n,r,t,o]),u=(0, X.useCallback)((d,p)=>{d.preventDefault(),d.stopPropagation();let h=p.columnId,m=d.currentTarget.closest("th")?.closest("table")?.parentElement??void 0,g=kc(h,r,m);t(v=>({...v,[h]:{widthPx:g}})),s.current&&s.current(h,g);},[r,t]),c=(0, X.useCallback)(d=>e[d.columnId]?.widthPx??d.idealWidth??d.defaultWidth??n,[e,n]);return {handleResizeStart:f,handleResizeDoubleClick:u,getColumnWidth:c}}function T2(e,t){return t?t(e):e!=null?String(e):""}function H8(e){let{values:t,formatValue:r,initialValue:n,onCommit:i,onCancel:a}=e,[s,o]=(0, X.useState)(""),l=t.findIndex(m=>String(m)===String(n)),[f,u]=(0, X.useState)(Math.max(l,0));(0, X.useEffect)(()=>{let m=t.findIndex(g=>String(g)===String(n));u(Math.max(m,0));},[n,t]);let c=(0, X.useCallback)(m=>T2(m,r),[r]),d=(0, X.useMemo)(()=>{if(!s.trim())return t;let m=s.toLowerCase();return t.filter(g=>c(g).toLowerCase().includes(m))},[t,s,c]),p=(0, X.useCallback)(m=>{i(m);},[i]),h=(0, X.useCallback)(m=>{switch(m.key){case "ArrowDown":m.preventDefault(),u(g=>Math.min(g+1,d.length-1));break;case "ArrowUp":m.preventDefault(),u(g=>Math.max(g-1,0));break;case "Enter":m.preventDefault(),m.stopPropagation(),d.length>0&&f<d.length&&p(d[f]);break;case "Escape":m.preventDefault(),m.stopPropagation(),a();break}},[d,f,p,a]);return {searchText:s,setSearchText:o,filteredValues:d,highlightedIndex:f,handleKeyDown:h,selectValue:p,getDisplayText:c}}function V8(e){let{values:t,formatValue:r,initialValue:n,onCommit:i,onCancel:a}=e,s=(0, X.useRef)(null),o=(0, X.useCallback)(p=>T2(p,r),[r]),l=t.findIndex(p=>String(p)===String(n)),[f,u]=(0, X.useState)(Math.max(l,0));(0, X.useEffect)(()=>{let p=t.findIndex(h=>String(h)===String(n));u(Math.max(p,0));},[n,t]),(0, X.useEffect)(()=>{let p=s.current;p&&p.children[f]?.scrollIntoView({block:"nearest"});},[f]);let c=(0, X.useCallback)(p=>{i(p);},[i]),d=(0, X.useCallback)(p=>{switch(p.key){case "ArrowDown":p.preventDefault(),u(h=>Math.min(h+1,t.length-1));break;case "ArrowUp":p.preventDefault(),u(h=>Math.max(h-1,0));break;case "Enter":p.preventDefault(),p.stopPropagation(),t.length>0&&f<t.length&&c(t[f]);break;case "Tab":p.preventDefault(),t.length>0&&f<t.length&&c(t[f]);break;case "Escape":p.preventDefault(),p.stopPropagation(),a();break}},[t,f,c,a]);return {highlightedIndex:f,handleKeyDown:d,selectValue:c,getDisplayText:o,dropdownRef:s}}var G8=8;function q8(e){if(!e)return;let t=[],r=[];for(let[n,i]of Object.entries(e))i==="left"?t.push(n):i==="right"&&r.push(n);if(!(t.length===0&&r.length===0))return {...t.length>0?{left:t}:{},...r.length>0?{right:r}:{}}}function W8(e){let{columns:t,columnOrder:r,onColumnOrderChange:n,enabled:i=true,pinnedColumns:a,wrapperRef:s}=e,[o,l]=(0, X.useState)(false),[f,u]=(0, X.useState)(null),c=(0, X.useRef)(0),d=(0, X.useRef)(t);d.current=t;let p=(0, X.useRef)(r);p.current=r;let h=(0, X.useRef)(n);h.current=n;let m=(0, X.useRef)(a);m.current=a;let g=(0, X.useRef)(null);(0, X.useEffect)(()=>()=>{g.current&&(g.current(),g.current=null);},[]);let v=(0, X.useCallback)((w,C)=>{if(!i||!h.current||C.button!==0)return;let T=C.currentTarget.getBoundingClientRect();if(C.clientX>T.right-G8||d.current.findIndex(y=>y.columnId===w)===-1)return;C.preventDefault();let I=C.clientX,k=false,D=null,j=q8(m.current),F=wp(w,j),B=document.body.style.userSelect,E=document.body.style.cursor;document.body.style.userSelect="none",document.body.style.cursor="grabbing";let M=y=>{!k&&Math.abs(y.clientX-I)<5||(k||(k=true,l(true)),c.current&&cancelAnimationFrame(c.current),c.current=requestAnimationFrame(()=>{c.current=0;let x=s.current;if(!x)return;let _=p.current??d.current.map(R=>R.columnId),S=Qv({mouseX:y.clientX,columnOrder:_,draggedColumnId:w,draggedPinState:F,tableElement:x,pinnedColumns:j});S&&(D=S.targetIndex,u(S.indicatorX));}));},L=()=>{window.removeEventListener("pointermove",M,true),window.removeEventListener("pointerup",b,true),g.current=null,document.body.style.userSelect=B,document.body.style.cursor=E,c.current&&(cancelAnimationFrame(c.current),c.current=0);},b=()=>{if(L(),k&&D!=null){let y=p.current??d.current.map(_=>_.columnId),x=Zv(y,w,D);h.current?.(x);}l(false),u(null);};window.addEventListener("pointermove",M,true),window.addEventListener("pointerup",b,true),g.current=L;},[i,s]);return {isDragging:o,dropIndicatorX:f,handleHeaderMouseDown:v}}var $8=100;function X8(e){let{totalRows:t,rowHeight:r,enabled:n,overscan:i=5,threshold:a=$8,containerRef:s,columnVirtualization:o=false,columnWidths:l,columnOverscan:f=2}=e;(0, X.useEffect)(()=>{Sy({enabled:n,rowHeight:r});},[n,r]);let u=n&&t>=a,[c,d]=(0, X.useState)(0),[p,h]=(0, X.useState)(0),[m,g]=(0, X.useState)(0),v=(0, X.useMemo)(()=>ty({totalRows:t,rowHeight:r}),[t,r,c]),w=u&&v.scaled,C=(0, X.useCallback)(()=>s.current,[s]),T=u&&!w,I=r2({count:T?t:0,getScrollElement:C,estimateSize:()=>r,overscan:i,enabled:T});(0, X.useEffect)(()=>{if(!u&&!o)return;let _=s.current;if(!_||(d(_.clientHeight),h(_.clientWidth),typeof ResizeObserver>"u"))return;let S=new ResizeObserver(R=>{R&&R.length>0&&(d(R[0].contentRect.height),h(R[0].contentRect.width));});return S.observe(_),()=>S.disconnect()},[u,o,s]);let k=(0, X.useRef)(0);(0, X.useEffect)(()=>{if(!w)return;let _=s.current;if(!_)return;g(_.scrollTop);let S=()=>{k.current||(k.current=requestAnimationFrame(()=>{k.current=0,g(_.scrollTop);}));};return _.addEventListener("scroll",S,{passive:true}),()=>{_.removeEventListener("scroll",S),k.current&&(cancelAnimationFrame(k.current),k.current=0);}},[w,s]);let D=(0, X.useMemo)(()=>({startIndex:0,endIndex:Math.max(0,t-1),offsetTop:0,offsetBottom:0}),[t]),j;if(!u)j=D;else if(w){let _=ry(m,v,{totalRows:t,rowHeight:r,viewportHeight:c},i),S=(_.endIndex>=_.startIndex?_.endIndex-_.startIndex+1:0)*r,R=Math.max(0,v.spacerHeight-S),z=Math.min(_.offsetPx,R),U=Math.max(0,v.spacerHeight-z-S);j={startIndex:_.startIndex,endIndex:_.endIndex,offsetTop:z,offsetBottom:U};}else {let _=I.getVirtualItems();if(_.length===0)j={startIndex:0,endIndex:-1,offsetTop:0,offsetBottom:0};else {let S=_[0],R=_[_.length-1],z=I.getTotalSize();j={startIndex:S.index,endIndex:R.index,offsetTop:S.start,offsetBottom:Math.max(0,z-R.end)};}}let F=w?v.spacerHeight:u?I.getTotalSize():t*r,B=(0, X.useRef)(I);B.current=I;let E=(0, X.useCallback)(_=>{let S=s.current;w?S&&S.scrollTo({top:ny(_,v,{rowHeight:r,viewportHeight:S.clientHeight}),behavior:"auto"}):T?B.current?.scrollToIndex(_,{align:"auto"}):S&&S.scrollTo({top:_*r,behavior:"auto"});},[w,T,s,r,t,v]),[M,L]=(0, X.useState)(0),b=(0, X.useRef)(0),y=(0, X.useCallback)(_=>{b.current&&cancelAnimationFrame(b.current),b.current=requestAnimationFrame(()=>{b.current=0,L(_);});},[]);(0, X.useEffect)(()=>()=>{b.current&&cancelAnimationFrame(b.current);},[]);let x=(0, X.useMemo)(()=>!o||!l||l.length===0||p<=0?null:Jv(M,l,p,f),[o,l,p,M,f]);return {virtualizer:T?I:null,totalHeight:F,visibleRange:j,scaled:w,scrollToIndex:E,columnRange:x,onHorizontalScroll:o?y:void 0}}function M2(e){let{count:t,itemHeight:r,containerHeight:n=250,overscan:i=5}=e,a=(0, X.useRef)(null),[s,o]=(0, X.useState)(0),l=(0, X.useCallback)(()=>{a.current&&o(a.current.scrollTop);},[]),f=t*r,u=(0, X.useMemo)(()=>{if(t===0)return [];let c=Math.max(0,Math.floor(s/r)-i),d=Math.ceil(n/r),p=Math.min(t-1,c+d+i*2),h=[];for(let m=c;m<=p;m++)h.push({index:m,offsetTop:m*r});return h},[t,r,n,i,s]);return {totalHeight:f,visibleItems:u,containerRef:a,onScroll:l}}function Y8(e){let{currentPage:t,pageSize:r,totalCount:n,onPageSizeChange:i,pageSizeOptions:a,entityLabelPlural:s}=e,o=s??"items",l=(0, X.useMemo)(()=>pp(t,r,n,a?{pageSizeOptions:a}:void 0),[t,r,n,a]);return {labelPlural:o,vm:l,handlePageSizeChange:i}}var fs=12,s2=.06,l2=25;function K8({wrapperRef:e}){(0, X.useEffect)(()=>{let t=e.current;if(!t)return;let r=t,n=false,i=false,a=0,s=0,o=0,l=0,f=null,u=0;function c(k,D){let j=document.createElement("div");return j.setAttribute("data-ogrid-scroll-indicator",""),j.innerHTML='<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="11" cy="11" r="10" fill="rgba(255,255,255,0.92)" stroke="rgba(0,0,0,0.3)" stroke-width="1.2"/><circle cx="11" cy="11" r="2" fill="rgba(0,0,0,0.45)"/><polygon points="11,3 8.5,6 13.5,6" fill="rgba(0,0,0,0.35)"/><polygon points="11,19 8.5,16 13.5,16" fill="rgba(0,0,0,0.35)"/><polygon points="3,11 6,8.5 6,13.5" fill="rgba(0,0,0,0.35)"/><polygon points="19,11 16,8.5 16,13.5" fill="rgba(0,0,0,0.35)"/></svg>',j.style.cssText=`position:fixed;left:${k-11}px;top:${D-11}px;width:22px;height:22px;z-index:10000;pointer-events:none;`,document.body.appendChild(j),j}function d(){f?.remove(),f=null;}function p(k,D){let j=Math.abs(k),F=Math.abs(D);if(j<=fs&&F<=fs){document.body.style.cursor="all-scroll";return}let B=Math.atan2(D,k)*(180/Math.PI),E;B>-22.5&&B<=22.5?E="e-resize":B>22.5&&B<=67.5?E="se-resize":B>67.5&&B<=112.5?E="s-resize":B>112.5&&B<=157.5?E="sw-resize":B>157.5||B<=-157.5?E="w-resize":B>-157.5&&B<=-112.5?E="nw-resize":B>-112.5&&B<=-67.5?E="n-resize":E="ne-resize",document.body.style.cursor=E;}function h(){if(!n)return;let k=o-a,D=l-s,j=Math.abs(k),F=Math.abs(D),B=0,E=0;j>fs&&(B=Math.sign(k)*Math.min((j-fs)*s2,l2)),F>fs&&(E=Math.sign(D)*Math.min((F-fs)*s2,l2)),(B!==0||E!==0)&&(r.scrollLeft+=B,r.scrollTop+=E),u=requestAnimationFrame(h);}function m(k){o=k.clientX,l=k.clientY,p(o-a,l-s);}function g(){C();}function v(k){k.key==="Escape"&&(k.preventDefault(),C());}function w(k,D){n=true,a=k,s=D,o=k,l=D,f=c(k,D),document.body.style.cursor="all-scroll",u=requestAnimationFrame(h),setTimeout(()=>{n&&(window.addEventListener("mousemove",m),window.addEventListener("mousedown",g,true),window.addEventListener("keydown",v,true));},0);}function C(){n&&(n=false,i=true,u&&(cancelAnimationFrame(u),u=0),d(),document.body.style.cursor="",window.removeEventListener("mousemove",m),window.removeEventListener("mousedown",g,true),window.removeEventListener("keydown",v,true),setTimeout(()=>{i=false;},0));}function T(k){if(k.button===1&&(k.preventDefault(),!i)){if(n){C();return}w(k.clientX,k.clientY);}}function I(k){k.button===1&&k.preventDefault();}return r.addEventListener("mousedown",T),r.addEventListener("auxclick",I),()=>{r.removeEventListener("mousedown",T),r.removeEventListener("auxclick",I),n&&C();}},[e]);}function k2(e){let{props:t}=e,r=(0, X.useRef)(null),n=(0, X.useRef)(null),i=(0, X.useRef)(false),a=N8({props:t,wrapperRef:r}),{layout:s,rowSelection:o,editing:l,interaction:f,contextMenu:u,viewModels:c,pinning:d}=a,{visibleCols:p,totalColCount:h,hasCheckboxCol:m,hasRowNumbersCol:g,colOffset:v,containerWidth:w,minTableWidth:C,desiredTableWidth:T,columnSizingOverrides:I,setColumnSizingOverrides:k,measuredColumnWidths:D}=s,j=p,{selectedRowIds:F,updateSelection:B,handleRowCheckboxChange:E,handleSelectAll:M,allSelected:L,someSelected:b}=o,{editingCell:y,setEditingCell:x,pendingEditorValue:_,setPendingEditorValue:S,commitCellEdit:R,cancelPopoverEdit:z,popoverAnchorEl:U,setPopoverAnchorEl:H}=l,{setActiveCell:q,handleCellMouseDown:N,selectionRange:V,hasCellSelection:O,handleGridKeyDown:A,handleFillHandleMouseDown:P,handleCopy:W,handleCut:Z,handlePaste:$,cutRange:K,copyRange:te,canUndo:J,canRedo:Y,onUndo:ne,onRedo:re,isDragging:ie}=f,{menuPosition:oe,handleCellContextMenu:se,closeContextMenu:le,handleLongPressStart:ge,handleLongPressEnd:he}=u,{headerFilterInput:be,cellDescriptorInput:Me,statusBarConfig:ye,showEmptyInGrid:Se,onCellError:We}=c,{headerMenu:Ne}=d,Ee=(0, X.useCallback)(()=>{$();},[$]),{items:Le,windowed:Ce,columns:xe,getRowId:Qe,emptyState:Be,layoutMode:He="fill",rowSelection:At="none",suppressHorizontalScroll:Ve,stickyHeader:Ze=true,isLoading:Nt=false,loadingMessage:et="Loading\u2026","aria-label":rt,"aria-labelledby":fr,visibleColumns:Ge,columnOrder:qe,onColumnOrderChange:Gt,columnReorder:Ye,virtualScroll:De,rowHeight:Mt,density:tt="normal",pinnedColumns:ee,currentPage:ue=1,pageSize:de=25,showColumnLetters:_e=false,showNameBox:Ie=false,onActiveCellChange:Te}=t,Oe=g?(ue-1)*de:0,ot=(0, X.useMemo)(()=>lp(xe,Ge),[xe,Ge]),ze=!Ve&&w>0&&(C>w||T>w),Re=He==="content",je=(0, X.useRef)(Te);je.current=Te,(0, X.useEffect)(()=>{if(!je.current)return;let or=f.activeCell;or?je.current(Oc(or.columnIndex-v,Oe+or.rowIndex+1)):je.current(null);},[f.activeCell,Oe,v]);let{handleResizeStart:Fe,handleResizeDoubleClick:st,getColumnWidth:xt}=U8({columnSizingOverrides:I,setColumnSizingOverrides:k}),{isDragging:Bt,dropIndicatorX:Tt,handleHeaderMouseDown:qt}=W8({columns:j,columnOrder:qe,onColumnOrderChange:Gt,enabled:Ye===true,pinnedColumns:ee,wrapperRef:r}),Ft=De?.enabled===true||!!Ce,dr=De?.rowHeight??36,Q=De?.columns===true,fe=(0, X.useMemo)(()=>{if(!Q)return;let or=[];for(let zt of j)ee?.[zt.columnId]||or.push(xt(zt));return or},[Q,j,ee,xt]),ve=Ce?Ce.rowCount:Le.length,{visibleRange:me,columnRange:Ae,onHorizontalScroll:Ue}=X8({totalRows:ve,rowHeight:dr,enabled:Ft,overscan:De?.overscan,threshold:Ce?0:De?.threshold,containerRef:r,columnVirtualization:Q,columnWidths:fe,columnOverscan:De?.columnOverscan}),Pe=Ce?.requestWindow;(0, X.useEffect)(()=>{Pe&&(me.endIndex<me.startIndex||Pe(me.startIndex,me.endIndex+1));},[Pe,me.startIndex,me.endIndex]),K8({wrapperRef:r});let ct=(0, X.useMemo)(()=>({commitCellEdit:R,setEditingCell:x,setPendingEditorValue:S,cancelPopoverEdit:z}),[R,x,S,z]),nt=(0, X.useMemo)(()=>({handleCellMouseDown:N,setActiveCell:q,setEditingCell:x,handleCellContextMenu:se,handleLongPressStart:ge,handleLongPressEnd:he}),[N,q,x,se,ge,he]),Je=$e(nt),at=$e(Le),It=$e(Qe),Pt=$e(j),gt=$e(v),Ct=(0, X.useMemo)(()=>{let or=zt=>{let Ht=zt.currentTarget;if(!Ht)return null;let Wt=parseInt(Ht.getAttribute("data-row-index")??"",10),Rr=parseInt(Ht.getAttribute("data-col-index")??"",10);return !Number.isNaN(Wt)&&!Number.isNaN(Rr)?{row:Wt,col:Rr}:null};return {onPointerDown:zt=>{let Ht=or(zt);if(!Ht)return;let Wt=Je.current;Wt.setEditingCell(null),Wt.handleCellMouseDown(zt,Ht.row,Ht.col),Wt.handleLongPressStart?.(zt);},onClick:zt=>{let Ht=or(zt);Ht&&Je.current.setActiveCell({rowIndex:Ht.row,columnIndex:Ht.col});},onDoubleClick:zt=>{if(!zt.currentTarget?.hasAttribute("data-can-edit"))return;let Ht=or(zt);if(!Ht)return;let Wt=gt.current,Rr=Ht.col-Wt,cn=Pt.current;if(Rr<0||Rr>=cn.length)return;let kt=cn[Rr],Jn=at.current;if(Ht.row>=Jn.length)return;let Un=It.current(Jn[Ht.row]);Je.current.setEditingCell({rowId:Un,columnId:kt.columnId});}}},[Je,at,It,Pt,gt]),nr=$e(Me),Cr=$e(_),Er=$e(U),kr=$e(F),Or=(0, X.useRef)(new Rc),pi=Rc.computeVersion(Me);Or.current.updateVersion(pi);let $r=(0, X.useRef)(Le),mt=(0, X.useRef)(j);($r.current!==Le||mt.current!==j)&&($r.current=Le,mt.current=j,Or.current.clear());let ft=(0, X.useCallback)(or=>{if(At!=="single")return;let zt=or.currentTarget.dataset.rowId;if(!zt)return;let Ht=kr.current;B(Ht.has(zt)?new Set:new Set([zt]));},[At,B,kr]);return {wrapperRef:r,tableContainerRef:n,lastMouseShiftRef:i,layout:s,rowSel:o,editing:l,interaction:f,ctxMenu:u,viewModels:c,pinning:d,handleResizeStart:Fe,handleResizeDoubleClick:st,getColumnWidth:xt,isReorderDragging:Bt,dropIndicatorX:Tt,handleHeaderMouseDown:qt,virtualScrollEnabled:Ft,virtualRowHeight:dr,visibleRange:me,columnRange:Ae,onHorizontalScroll:Ue,items:Le,windowed:Ce,columns:xe,getRowId:Qe,emptyState:Be,layoutMode:He,rowSelection:At,suppressHorizontalScroll:Ve,stickyHeader:Ze,isLoading:Nt,loadingMessage:et,ariaLabel:rt,ariaLabelledBy:fr,visibleColumns:Ge,columnOrder:qe,columnReorder:Ye,density:tt,rowHeight:Mt,pinnedColumns:ee,currentPage:ue,propPageSize:de,rowNumberOffset:Oe,headerRows:ot,allowOverflowX:ze,fitToContent:Re,showColumnLetters:_e,showNameBox:Ie,editCallbacks:ct,interactionHandlers:nt,delegatedCellHandlers:Ct,cellDescriptorInputRef:nr,cellDescriptorCacheRef:Or,pendingEditorValueRef:Cr,popoverAnchorElRef:Er,selectedRowIdsRef:kr,handleSingleRowClick:ft,handlePasteVoid:Ee,visibleCols:j,totalColCount:h,hasCheckboxCol:m,hasRowNumbersCol:g,colOffset:v,containerWidth:w,minTableWidth:C,desiredTableWidth:T,columnSizingOverrides:I,setColumnSizingOverrides:k,measuredColumnWidths:D,selectedRowIds:F,updateSelection:B,handleRowCheckboxChange:E,handleSelectAll:M,allSelected:L,someSelected:b,editingCell:y,setPopoverAnchorEl:H,cancelPopoverEdit:z,setActiveCell:q,selectionRange:V,hasCellSelection:O,handleGridKeyDown:A,handleFillHandleMouseDown:P,handleCopy:W,handleCut:Z,cutRange:K,copyRange:te,canUndo:J,canRedo:Y,onUndo:ne,onRedo:re,isDragging:ie,menuPosition:oe,handleCellContextMenu:se,closeContextMenu:le,headerFilterInput:be,cellDescriptorInput:Me,statusBarConfig:ye,showEmptyInGrid:Se,onCellError:We,headerMenu:Ne}}function O2(e){let{visibleCols:t,getColumnWidth:r,columnSizingOverrides:n,measuredColumnWidths:i,pinnedColumns:a,leftOffsets:s,rightOffsets:o,pinnedColLeftClass:l,pinnedColRightClass:f,addStickyPosition:u=false}=e;return (0, X.useMemo)(()=>{let c={},d={},p={},h={};for(let m=0;m<t.length;m++){let g=t[m],v=r(g),w=!!(n[g.columnId]||g.idealWidth!=null||g.defaultWidth!=null),C=a[g.columnId]==="left",T=a[g.columnId]==="right",I=C||T,k=!!n[g.columnId],D=i[g.columnId],j=g.minWidth??Mc(g.name),F=k||w?v:Math.max(j,D??0),B=u&&I?{position:"sticky"}:void 0,E=g.width,M=E??(w?v:0),L=E?void 0:w?v:void 0;c[g.columnId]={minWidth:F,width:M,maxWidth:L,textAlign:g.type==="numeric"?"right":g.type==="boolean"?"center":void 0,...B,...C&&s[g.columnId]!=null?{left:s[g.columnId]}:void 0,...T&&o[g.columnId]!=null?{right:o[g.columnId]}:void 0},p[g.columnId]={minWidth:F,width:M,maxWidth:L,...B,...C&&s[g.columnId]!=null?{left:s[g.columnId]}:void 0,...T&&o[g.columnId]!=null?{right:o[g.columnId]}:void 0};let b=[];C&&b.push(l),T&&b.push(f);let y=b.join(" ");d[g.columnId]=y,h[g.columnId]=y;}return {cellStyles:c,cellClasses:d,hdrStyles:p,hdrClasses:h}},[t,r,n,i,a,s,o,l,f,u])}var D2={position:"relative",flex:1,minHeight:0,display:"flex",flexDirection:"column"},N2={position:"relative",flex:1,minHeight:"var(--ogrid-virtual-scroll-min-height, 480px)",display:"flex",flexDirection:"column"},I2={cursor:"cell"},z2={position:"absolute",inset:0,display:"flex",alignItems:"center",padding:"var(--ogrid-cell-padding, 6px 10px)",overflow:"hidden"},Fc=e=>{e.preventDefault();},Kp=()=>{},j2=e=>{e.stopPropagation();},Z8=240,Wp=36,jc={columns:"Columns",filters:"Filters"},L2={display:"flex",flexDirection:"column",width:Wp,background:"var(--ogrid-header-bg, #f5f5f5)"},Q8={...L2,borderLeft:"1px solid var(--ogrid-border, #e0e0e0)"},J8={...L2,borderRight:"1px solid var(--ogrid-border, #e0e0e0)"},B2={width:Wp,height:Wp,border:"none",cursor:"pointer",color:"var(--ogrid-fg, #242424)",fontSize:14,display:"flex",alignItems:"center",justifyContent:"center"},eS={...B2,background:"var(--ogrid-bg, #fff)",fontWeight:"bold"},tS={...B2,background:"transparent",fontWeight:"normal"},F2={width:Z8,display:"flex",flexDirection:"column",overflow:"hidden",background:"var(--ogrid-bg, #fff)",color:"var(--ogrid-fg, #242424)"},rS={...F2,borderLeft:"1px solid var(--ogrid-border, #e0e0e0)"},nS={...F2,borderRight:"1px solid var(--ogrid-border, #e0e0e0)"},iS={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 12px",borderBottom:"1px solid var(--ogrid-border, #e0e0e0)",fontWeight:600},aS={border:"none",background:"transparent",cursor:"pointer",fontSize:16,color:"var(--ogrid-fg, #242424)"},oS={flex:1,overflowY:"auto",padding:"8px 12px"},sS={display:"flex",flexDirection:"row",flexShrink:0},lS={display:"flex",gap:8,marginBottom:8},u2={flex:1,cursor:"pointer",background:"var(--ogrid-bg-subtle, #f3f2f1)",color:"var(--ogrid-fg, #242424)",border:"1px solid var(--ogrid-border, #e0e0e0)",borderRadius:4,padding:"4px 8px"},uS={display:"flex",alignItems:"center",gap:6,padding:"2px 0",cursor:"pointer"},cS={color:"var(--ogrid-muted, #999)",fontStyle:"italic"},fS={marginBottom:12},dS={fontWeight:500,marginBottom:4,fontSize:13},hS={width:"100%",boxSizing:"border-box",padding:"4px 6px",background:"var(--ogrid-bg, #fff)",color:"var(--ogrid-fg, #242424)",border:"1px solid var(--ogrid-border, #e0e0e0)",borderRadius:4},pS={display:"flex",flexDirection:"column",gap:4},c2={display:"flex",alignItems:"center",gap:4,fontSize:12},f2={flex:1,padding:"2px 4px",background:"var(--ogrid-bg, #fff)",color:"var(--ogrid-fg, #242424)",border:"1px solid var(--ogrid-border, #e0e0e0)",borderRadius:4},mS={maxHeight:120,overflowY:"auto"},gS={display:"flex",alignItems:"center",gap:4,padding:"1px 0",cursor:"pointer",fontSize:13};function d2(e){let{activePanel:t,onPanelChange:r,panels:n,position:i,columns:a,visibleColumns:s,onVisibilityChange:o,onSetVisibleColumns:l,filterableColumns:f,filters:u,onFilterChange:c,filterOptions:d}=e,p=t!==null,h=C=>{r(t===C?null:C);},m=i==="right"?Q8:J8,g=i==="right"?rS:nS,v=(0, ae.jsx)("div",{style:m,role:"tablist","aria-label":"Side bar tabs",children:n.map(C=>(0, ae.jsx)("button",{role:"tab","aria-selected":t===C,"aria-label":jc[C],onClick:()=>h(C),title:jc[C],style:t===C?eS:tS,children:C==="columns"?"\u2261":"\u2A65"},C))}),w=p&&t?(0, ae.jsxs)("div",{role:"tabpanel","aria-label":jc[t],style:g,children:[(0, ae.jsxs)("div",{style:iS,children:[(0, ae.jsx)("span",{children:jc[t]}),(0, ae.jsx)("button",{onClick:()=>r(null),style:aS,"aria-label":"Close panel",children:"\xD7"})]}),(0, ae.jsxs)("div",{style:oS,children:[t==="columns"&&(0, ae.jsx)(bS,{columns:a,visibleColumns:s,onVisibilityChange:o,onSetVisibleColumns:l}),t==="filters"&&(0, ae.jsx)(vS,{filterableColumns:f,filters:u,onFilterChange:c,filterOptions:d})]})]}):null;return (0, ae.jsxs)("div",{style:sS,role:"complementary","aria-label":"Side bar",children:[i==="left"&&v,i==="left"&&w,i==="right"&&w,i==="right"&&v]})}function bS(e){let{columns:t,visibleColumns:r,onVisibilityChange:n,onSetVisibleColumns:i}=e,a=t.every(s=>r.has(s.columnId));return (0, ae.jsxs)(ae.Fragment,{children:[(0, ae.jsxs)("div",{style:lS,children:[(0, ae.jsx)("button",{onClick:()=>{let s=new Set(r);t.forEach(o=>s.add(o.columnId)),i(s);},disabled:a,style:u2,children:"Select All"}),(0, ae.jsx)("button",{onClick:()=>{let s=new Set;t.forEach(o=>{o.required&&r.has(o.columnId)&&s.add(o.columnId);}),i(s);},style:u2,children:"Clear All"})]}),t.map(s=>(0, ae.jsxs)("label",{style:uS,children:[(0, ae.jsx)("input",{type:"checkbox",checked:r.has(s.columnId),onChange:o=>n(s.columnId,o.target.checked),disabled:s.required}),(0, ae.jsx)("span",{children:s.name})]},s.columnId))]})}function vS(e){let{filterableColumns:t,filters:r,onFilterChange:n,filterOptions:i}=e;return t.length===0?(0, ae.jsx)("div",{style:cS,children:"No filterable columns"}):(0, ae.jsx)(ae.Fragment,{children:t.map(a=>{let s=a.filterField,o=r[s];return (0, ae.jsxs)("div",{style:fS,children:[(0, ae.jsx)("div",{style:dS,children:a.name}),a.filterType==="text"&&(0, ae.jsx)("input",{type:"text",value:o?.type==="text"?o.value:"",onChange:l=>n(s,l.target.value?{type:"text",value:l.target.value}:void 0),placeholder:`Filter ${a.name}...`,"aria-label":`Filter ${a.name}`,style:hS}),a.filterType==="date"&&(0, ae.jsxs)("div",{style:pS,children:[(0, ae.jsxs)("label",{style:c2,children:["From:",(0, ae.jsx)("input",{type:"date",value:o?.type==="date"?o.value.from??"":"",onChange:l=>{let f=l.target.value||void 0,u=(o?.type==="date"?o.value:{}).to;n(s,f||u?{type:"date",value:{from:f,to:u}}:void 0);},"aria-label":`${a.name} from date`,style:f2})]}),(0, ae.jsxs)("label",{style:c2,children:["To:",(0, ae.jsx)("input",{type:"date",value:o?.type==="date"?o.value.to??"":"",onChange:l=>{let f=l.target.value||void 0,u=(o?.type==="date"?o.value:{}).from;n(s,u||f?{type:"date",value:{from:u,to:f}}:void 0);},"aria-label":`${a.name} to date`,style:f2})]})]}),a.filterType==="multiSelect"&&(0, ae.jsx)("div",{style:mS,role:"group","aria-label":`${a.name} options`,children:(i[s]??[]).map(l=>{let f=o?.type==="multiSelect"?o.value.includes(l):false;return (0, ae.jsxs)("label",{style:gS,children:[(0, ae.jsx)("input",{type:"checkbox",checked:f,onChange:u=>{let c=o?.type==="multiSelect"?o.value:[],d=u.target.checked?[...c,l]:c.filter(p=>p!==l);n(s,d.length>0?{type:"multiSelect",value:d}:void 0);}}),(0, ae.jsx)("span",{children:l})]},l)})})]},a.columnId)})})}var P2={border:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",borderRadius:Tp,overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0,background:"var(--ogrid-bg, #fff)"},yS={...P2,borderRadius:0,border:"none"},U2={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 12px",background:"var(--ogrid-header-bg, #f5f5f5)",gap:8,flexWrap:"wrap",minHeight:0},wS={...U2,borderBottom:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))"},_S=U2,h2={display:"flex",alignItems:"center",gap:8},xS={borderBottom:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",padding:"6px 12px",background:"var(--ogrid-header-bg, #f5f5f5)"},SS={borderTop:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",background:"var(--ogrid-header-bg, #f5f5f5)",padding:"6px 12px"},CS={width:"100%",minWidth:0,minHeight:0,flex:1,display:"flex"},ES={width:"100%",minWidth:0,minHeight:0,flex:1,display:"flex",flexDirection:"column"},RS={flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column"},AS={display:"flex",flexDirection:"column",height:"100%"},TS={position:"fixed",inset:0,zIndex:9999,display:"flex",flexDirection:"column",background:"var(--ogrid-bg, #fff)"},MS={background:"none",border:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",borderRadius:4,padding:"4px 6px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--ogrid-fg, #242424)"},kS=()=>(0, ae.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0, ae.jsx)("polyline",{points:"10 2 14 2 14 6"}),(0, ae.jsx)("polyline",{points:"6 14 2 14 2 10"}),(0, ae.jsx)("line",{x1:"14",y1:"2",x2:"10",y2:"6"}),(0, ae.jsx)("line",{x1:"2",y1:"14",x2:"6",y2:"10"})]}),OS=()=>(0, ae.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0, ae.jsx)("polyline",{points:"4 10 0 10 0 14"}),(0, ae.jsx)("polyline",{points:"12 6 16 6 16 2"}),(0, ae.jsx)("line",{x1:"0",y1:"10",x2:"4",y2:"6"}),(0, ae.jsx)("line",{x1:"16",y1:"6",x2:"12",y2:"10"})]});function DS(e){let{className:t,toolbar:r,toolbarEnd:n,toolbarBelow:i,children:a,pagination:s,sideBar:o,fullScreen:l,formulaBar:f,sheetTabs:u}=e,[c,d]=(0, X.useState)(false),p=(0, X.useCallback)(()=>{d(v=>!v);},[]);(0, X.useEffect)(()=>{if(!c)return;let v=w=>{w.key==="Escape"&&d(false);};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[c]);let h=o!=null,m=o?.position??"right",g=r!=null||n!=null||l;return (0, ae.jsx)("div",{className:t,style:c?TS:AS,children:(0, ae.jsxs)("div",{style:c?yS:P2,children:[g&&(0, ae.jsxs)("div",{style:i?_S:wS,children:[(0, ae.jsx)("div",{style:h2,children:r}),(0, ae.jsxs)("div",{style:h2,children:[n,l?(0, ae.jsx)("button",{type:"button",style:MS,onClick:p,title:c?"Exit fullscreen":"Fullscreen","aria-label":c?"Exit fullscreen":"Fullscreen",children:c?(0, ae.jsx)(OS,{}):(0, ae.jsx)(kS,{})}):null]})]}),i&&(0, ae.jsx)("div",{style:xS,children:i}),f,h?(0, ae.jsxs)("div",{style:CS,children:[m==="left"&&(0, ae.jsx)(d2,{...o}),(0, ae.jsx)("div",{style:RS,children:a}),m!=="left"&&(0, ae.jsx)(d2,{...o})]}):(0, ae.jsx)("div",{style:ES,children:a}),u,s&&(0, ae.jsx)("div",{style:SS,children:s})]})})}function H2({classNames:e,...t}){let r=dp(t);return (0, ae.jsx)("div",{className:e?.statusBar,role:"status","aria-live":"polite",children:r.map(n=>(0, ae.jsxs)("span",{className:e?.statusBarItem,children:[(0, ae.jsx)("span",{className:e?.statusBarLabel,children:n.label}),(0, ae.jsx)("span",{className:e?.statusBarValue,children:n.value.toLocaleString()})]},n.key))})}var Lc={width:"100%",height:"100%",display:"flex",alignItems:"center",paddingTop:"var(--ogrid-cell-padding-vertical, 6px)",paddingBottom:"var(--ogrid-cell-padding-vertical, 6px)",paddingLeft:"var(--ogrid-cell-padding-horizontal, 10px)",paddingRight:"var(--ogrid-cell-padding-horizontal, 10px)",boxSizing:"border-box",overflow:"hidden",minWidth:0},qp={width:"100%",padding:0,border:"none",background:"transparent",color:"inherit",font:"inherit",fontSize:"var(--ogrid-cell-font-size, 13px)",lineHeight:"inherit",outline:"none",minWidth:0},p2={width:"100%",height:"100%",display:"flex",alignItems:"center",paddingTop:"var(--ogrid-cell-padding-vertical, 6px)",paddingBottom:"var(--ogrid-cell-padding-vertical, 6px)",paddingLeft:"var(--ogrid-cell-padding-horizontal, 10px)",paddingRight:"var(--ogrid-cell-padding-horizontal, 10px)",boxSizing:"border-box",overflow:"hidden",minWidth:0,position:"relative"},NS={position:"absolute",top:"100%",left:0,right:0,maxHeight:200,overflowY:"auto",background:"var(--ogrid-bg, #fff)",border:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",zIndex:10,boxShadow:"var(--ogrid-shadow, 0 4px 16px rgba(0,0,0,0.2))",textAlign:"left",fontSize:"var(--ogrid-cell-font-size, 13px)",fontFamily:"inherit"},$p={padding:"6px 8px",cursor:"pointer",color:"var(--ogrid-fg, #242424)",fontSize:"var(--ogrid-cell-font-size, 13px)"},m2={...$p,background:"var(--ogrid-bg-hover, #e8f0fe)",fontSize:"var(--ogrid-cell-font-size, 13px)"},IS={padding:"6px 8px",color:"var(--ogrid-muted, #999)",fontSize:"var(--ogrid-cell-font-size, 13px)"};var zS={width:"100%",padding:"6px 8px",border:"none",borderBottom:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",background:"var(--ogrid-bg, #fff)",color:"inherit",font:"inherit",fontSize:"var(--ogrid-cell-font-size, 13px)",outline:"none",boxSizing:"border-box",position:"sticky",top:0,zIndex:1};var g2={display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",cursor:"pointer",fontSize:"var(--ogrid-cell-font-size, 13px)",color:"inherit"},b2={marginLeft:4,fontSize:"10px",opacity:.5};function V2(e){let{value:t,column:r,editorType:n,onCommit:i,onCancel:a,renderCheckbox:s}=e,o=_t.useRef(null),l=_t.useRef(a);l.current=a;let f=r.cellEditorParams?.dateFormat??r.dateFormat??Ec,u=r.cellEditorParams?.editorType??"text",{localValue:c,setLocalValue:d,handleKeyDown:p,handleBlur:h,commit:m,cancel:g}=P8({value:t,editorType:n,onCommit:i,onCancel:a,dateFormat:f,dateEditorType:u}),v=r.cellEditorParams?.values??[],w=r.cellEditorParams?.formatValue,C=H8({values:v,formatValue:w,initialValue:t,onCommit:i,onCancel:a}),T=V8({values:v,formatValue:w,initialValue:t,onCommit:i,onCancel:a}),[I,k]=_t.useState(null);_t.useLayoutEffect(()=>{if(n!=="select"&&n!=="richSelect")return;let F=o.current;if(!F)return;let B=F.getBoundingClientRect(),E=200,M=window.innerHeight-B.bottom,L=M<E&&B.top>M,b=getComputedStyle(F),y=b.getPropertyValue("--ogrid-cell-font-size").trim()||"13px";k({position:"fixed",...L?{bottom:window.innerHeight-B.top}:{top:B.bottom},left:B.left,width:B.width,maxHeight:E,overflowY:"auto",background:"var(--ogrid-bg, #fff)",border:"1px solid var(--ogrid-border, rgba(0, 0, 0, 0.12))",zIndex:9999,boxShadow:"var(--ogrid-shadow, 0 4px 16px rgba(0,0,0,0.2))",textAlign:"left",fontSize:y,fontFamily:b.fontFamily??"inherit"});let x=F.closest("[data-ogrid-scroll-container]")??F.closest('[style*="overflow"]'),_=()=>l.current(),S=requestAnimationFrame(()=>{x&&x.addEventListener("scroll",_,{passive:true}),window.addEventListener("scroll",_,{passive:true});});return ()=>{cancelAnimationFrame(S),x&&x.removeEventListener("scroll",_),window.removeEventListener("scroll",_);}},[n]);let D=I??NS;_t.useEffect(()=>{if(n==="richSelect")return;let F=o.current;if(!F)return;let B=F.querySelector("input");B?(B.focus({preventScroll:true}),B.select()):F.focus({preventScroll:true});},[n]);let j=I!=null;if(n==="richSelect"){let F=(0, ae.jsxs)("div",{style:D,role:"listbox",children:[(0, ae.jsx)("input",{type:"text",value:C.searchText,onChange:B=>C.setSearchText(B.target.value),onKeyDown:C.handleKeyDown,placeholder:"Search...",autoFocus:true,style:zS}),C.filteredValues.map((B,E)=>(0, ae.jsx)("div",{role:"option","aria-selected":E===C.highlightedIndex,onClick:()=>C.selectValue(B),style:E===C.highlightedIndex?m2:$p,children:C.getDisplayText(B)},String(B))),C.filteredValues.length===0&&(0, ae.jsx)("div",{style:IS,children:"No matches"})]});return (0, ae.jsxs)("div",{ref:o,style:p2,children:[(0, ae.jsxs)("div",{style:g2,children:[(0, ae.jsx)("span",{children:C.getDisplayText(t)}),(0, ae.jsx)("span",{style:b2,children:"\u25BE"})]}),j?(0, Bc.createPortal)(F,document.body):F]})}if(n==="checkbox"){let F=t===true;return (0, ae.jsx)("div",{style:{...Lc,justifyContent:"flex-start"},children:s(F,B=>m(B),g)})}if(n==="select"){let F=(0, ae.jsx)("div",{style:D,ref:T.dropdownRef,role:"listbox",children:v.map((B,E)=>(0, ae.jsx)("div",{role:"option","aria-selected":E===T.highlightedIndex,onClick:()=>T.selectValue(B),style:E===T.highlightedIndex?m2:$p,children:T.getDisplayText(B)},String(B)))});return (0, ae.jsxs)("div",{ref:o,style:p2,onKeyDown:T.handleKeyDown,tabIndex:0,children:[(0, ae.jsxs)("div",{style:g2,children:[(0, ae.jsx)("span",{children:T.getDisplayText(t)}),(0, ae.jsx)("span",{style:b2,children:"\u25BE"})]}),j?(0, Bc.createPortal)(F,document.body):F]})}if(n==="date"){let F=f;return u==="native"?(0, ae.jsx)("div",{ref:o,style:Lc,children:(0, ae.jsx)("input",{type:"date",value:c,onChange:B=>d(B.target.value),onBlur:h,onKeyDown:p,style:qp,autoFocus:true})}):(0, ae.jsx)("div",{ref:o,style:Lc,children:(0, ae.jsx)("input",{type:"text",value:c,onChange:B=>d(B.target.value),onBlur:h,onKeyDown:p,placeholder:F,style:qp,autoFocus:true})})}return (0, ae.jsx)("div",{ref:o,style:Lc,children:(0, ae.jsx)("input",{type:"text",value:c,onChange:F=>d(F.target.value),onBlur:h,onKeyDown:p,style:qp,autoFocus:true})})}function G2(e){let{x:t,y:r,hasSelection:n,canUndo:i,canRedo:a,onClose:s,onCopy:o,onCut:l,onPaste:f,onSelectAll:u,onUndo:c,onRedo:d,classNames:p}=e,h=_t.useRef(null),m=_t.useMemo(()=>gp({onCopy:o,onCut:l,onPaste:f,onSelectAll:u,onUndo:c,onRedo:d,onClose:s}),[o,l,f,u,c,d,s]),g=_t.useCallback(w=>!!(w.disabledWhenNoSelection&&!n||w.id==="undo"&&!i||w.id==="redo"&&!a),[n,i,a]);_t.useEffect(()=>{let w=T=>{h.current&&!h.current.contains(T.target)&&s();},C=T=>{T.key==="Escape"&&s();};return document.addEventListener("pointerdown",w,true),document.addEventListener("keydown",C,true),()=>{document.removeEventListener("pointerdown",w,true),document.removeEventListener("keydown",C,true);}},[s]);let v=_t.useMemo(()=>{let w=Cc.length*44+16,C=window.innerWidth,T=window.innerHeight,I=t+200>C?Math.max(0,C-200-8):t,k=r+w>T?Math.max(0,T-w-8):r;return {left:I,top:k}},[t,r]);return (0, ae.jsx)("div",{ref:h,className:p?.contextMenu,role:"menu",style:v,"aria-label":"Grid context menu",children:Cc.map(w=>(0, ae.jsxs)(_t.Fragment,{children:[w.dividerBefore&&(0, ae.jsx)("div",{className:p?.contextMenuDivider}),(0, ae.jsxs)("button",{type:"button",className:p?.contextMenuItem,onClick:m[w.id],disabled:g(w),children:[(0, ae.jsx)("span",{className:p?.contextMenuItemLabel,children:w.label}),w.shortcut&&(0, ae.jsx)("span",{className:p?.contextMenuItemShortcut,children:mp(w.shortcut)})]})]},w.id))})}var jS={animation:"ogrid-marching-ants 0.5s linear infinite"},LS={shapeRendering:"crispEdges"},BS={...jS,shapeRendering:"crispEdges"};function q2({containerRef:e,selectionRange:t,copyRange:r,cutRange:n,colOffset:i,items:a,visibleColumns:s,columnSizingOverrides:o,columnOrder:l,isDragging:f}){let[u,c]=(0, X.useState)(null),[d,p]=(0, X.useState)(null),h=(0, X.useRef)(0),m=r??n,g=(0, X.useCallback)(()=>{let I=e.current;if(!I){c(null),p(null);return}c(t?Rp(I,t,i):null),p(m?Rp(I,m,i):null);},[t,m,e,i]);if((0, X.useEffect)(()=>{hy("ogrid-marching-ants-keyframes","@keyframes ogrid-marching-ants{to{stroke-dashoffset:-8}}");},[]),(0, X.useEffect)(()=>{if(!t&&!m){c(null),p(null);return}h.current=requestAnimationFrame(g);let I=e.current,k;return I&&(k=new ResizeObserver(g),k.observe(I)),()=>{cancelAnimationFrame(h.current),k?.disconnect();}},[t,m,g,e,a,s,o,l]),!u&&!d)return null;let v=t!=null&&m!=null&&t.startRow===m.startRow&&t.startCol===m.startCol&&t.endRow===m.endRow&&t.endCol===m.endCol,w=I=>({top:Math.round(I.top),left:Math.round(I.left),width:Math.round(I.width),height:Math.round(I.height)}),C=u?w(u):null,T=d?w(d):null;return (0, ae.jsxs)(ae.Fragment,{children:[C&&!f&&!v&&!(t&&t.startRow===t.endRow&&t.startCol===t.endCol)&&(0, ae.jsx)("svg",{style:{position:"absolute",top:C.top,left:C.left,width:C.width,height:C.height,pointerEvents:"none",zIndex:4,overflow:"visible"},"aria-hidden":"true",children:(0, ae.jsx)("rect",{x:"1",y:"1",width:Math.max(0,C.width-2),height:Math.max(0,C.height-2),fill:"none",stroke:"var(--ogrid-selection, #217346)",strokeWidth:"2",style:LS})}),T&&(0, ae.jsx)("svg",{style:{position:"absolute",top:T.top,left:T.left,width:T.width,height:T.height,pointerEvents:"none",zIndex:5,overflow:"visible"},"aria-hidden":"true",children:(0, ae.jsx)("rect",{x:"1",y:"1",width:Math.max(0,T.width-2),height:Math.max(0,T.height-2),fill:"none",stroke:"var(--ogrid-selection, #217346)",strokeWidth:"2",strokeDasharray:"4 4",style:BS})})]})}var FS={shapeRendering:"crispEdges"};function PS(e,t,r){let n=t.col+r,i=(t.endCol??t.col)+r,a=t.endRow??t.row,s=e.querySelector(`[data-row-index="${t.row}"][data-col-index="${n}"]`),o=e.querySelector(`[data-row-index="${a}"][data-col-index="${i}"]`);if(!s||!o)return null;let l=e.getBoundingClientRect(),f=s.getBoundingClientRect(),u=o.getBoundingClientRect();return {top:Math.round(f.top-l.top),left:Math.round(f.left-l.left),width:Math.round(u.right-f.left),height:Math.round(u.bottom-f.top),color:Pp[t.colorIndex%Pp.length]}}function US({containerRef:e,references:t,colOffset:r}){let[n,i]=(0, X.useState)([]),a=(0, X.useRef)(0),s=(0, X.useCallback)(()=>{let o=e.current;if(!o||t.length===0){i([]);return}let l=[];for(let f of t){let u=PS(o,f,r);u&&l.push(u);}i(l);},[t,e,r]);return (0, X.useEffect)(()=>{if(t.length===0){i([]);return}return a.current=requestAnimationFrame(s),()=>cancelAnimationFrame(a.current)},[t,s]),n.length===0?null:(0, ae.jsx)(ae.Fragment,{children:n.map((o,l)=>(0, ae.jsx)("svg",{style:{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,pointerEvents:"none",zIndex:3,overflow:"visible"},"aria-hidden":"true",children:(0, ae.jsx)("rect",{x:"1",y:"1",width:Math.max(0,o.width-2),height:Math.max(0,o.height-2),fill:"none",stroke:o.color,strokeWidth:"2",style:FS})},l))})}var W2=(0, X.memo)(US);function $2(e){let{isOpen:t,anchorElement:r,onClose:n,onPinLeft:i,onPinRight:a,onUnpin:s,onSortAsc:o,onSortDesc:l,onClearSort:f,onAutosizeThis:u,onAutosizeAll:c,canPinLeft:d,canPinRight:p,canUnpin:h,currentSort:m,isSortable:g,isResizable:v,classNames:w,getPortalTarget:C}=e,[T,I]=_t.useState(null),k=_t.useRef(null);_t.useEffect(()=>{if(!t||!r){I(null);return}let E=r.getBoundingClientRect();I({top:E.bottom+4,left:E.left});let M=b=>{let y=b.target;k.current&&k.current.contains(y)||r&&!r.contains(y)&&n();},L=b=>{b.key==="Escape"&&n();};return document.addEventListener("mousedown",M),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",M),document.removeEventListener("keydown",L);}},[t,r,n]);let D=_t.useMemo(()=>({canPinLeft:d,canPinRight:p,canUnpin:h,currentSort:m,isSortable:g,isResizable:v}),[d,p,h,m,g,v]),j=_t.useMemo(()=>bp(D),[D]),F=_t.useMemo(()=>({pinLeft:i,pinRight:a,unpin:s,sortAsc:o,sortDesc:l,clearSort:f,autosizeThis:u,autosizeAll:c}),[i,a,s,o,l,f,u,c]);if(!t||!T)return null;let B=r&&C?C(r):document.body;return (0, Bc.createPortal)((0, ae.jsx)("div",{ref:k,className:w?.content,style:{position:"fixed",top:T.top,left:T.left,zIndex:1e3},children:j.map((E,M)=>(0, ae.jsxs)(_t.Fragment,{children:[(0, ae.jsx)("button",{className:w?.item,disabled:E.disabled,onClick:()=>{F[E.id](),n();},children:E.label}),E.divider&&M<j.length-1&&(0, ae.jsx)("div",{className:w?.separator})]},E.id))}),B)}var Zp=_t.memo(e=>{let{currentPage:t,pageSize:r,totalCount:n,onPageChange:i,onPageSizeChange:a,pageSizeOptions:s,entityLabelPlural:o,className:l,slots:f,classNames:u={}}=e,{labelPlural:c,vm:d,handlePageSizeChange:p}=Y8({currentPage:t,pageSize:r,totalCount:n,onPageSizeChange:a,pageSizeOptions:s,entityLabelPlural:o});if(!d)return null;let{pageNumbers:h,showStartEllipsis:m,showEndEllipsis:g,totalPages:v,startItem:w,endItem:C}=d,{NavButton:T,PageButton:I,PageSizeSelect:k,OuterContainer:D,InfoText:j,NavButtonsContainer:F,PageSizeContainer:B,PageSizeLabel:E,Ellipsis:M}=f,L=`Showing ${w} to ${C} of ${n.toLocaleString()} ${c}`,b=j?(0, ae.jsx)(j,{children:L}):(0, ae.jsx)("div",{className:u.paginationInfo,children:L}),y=M?(0, ae.jsx)(M,{}):(0, ae.jsx)("span",{className:u.ellipsis,"aria-hidden":true,children:"\u2026"}),x=E?(0, ae.jsx)(E,{}):(0, ae.jsx)("span",{className:u.pageSizeLabel,children:"Rows"}),_=(0, ae.jsxs)("div",{className:u.pageNumbers,children:[m&&(0, ae.jsxs)(ae.Fragment,{children:[(0, ae.jsx)(I,{onClick:()=>i(1),active:false,"aria-label":"Page 1",className:u.pageBtn,children:"1"}),y]}),h.map(V=>(0, ae.jsx)(I,{onClick:()=>i(V),active:t===V,"aria-label":`Page ${V}`,"aria-current":t===V?"page":void 0,className:u.pageBtn,children:V},V)),g&&(0, ae.jsxs)(ae.Fragment,{children:[y,(0, ae.jsx)(I,{onClick:()=>i(v),active:false,"aria-label":`Page ${v}`,className:u.pageBtn,children:v})]})]}),S=(0, ae.jsxs)(ae.Fragment,{children:[(0, ae.jsx)(T,{variant:"first",onClick:()=>i(1),disabled:t===1,"aria-label":"First page",className:u.navBtn}),(0, ae.jsx)(T,{variant:"prev",onClick:()=>i(t-1),disabled:t===1,"aria-label":"Previous page",className:u.navBtn}),_,(0, ae.jsx)(T,{variant:"next",onClick:()=>i(t+1),disabled:t>=v,"aria-label":"Next page",className:u.navBtn}),(0, ae.jsx)(T,{variant:"last",onClick:()=>i(v),disabled:t>=v,"aria-label":"Last page",className:u.navBtn})]}),R=F?(0, ae.jsx)(F,{className:u.paginationControls,children:S}):(0, ae.jsx)("div",{className:u.paginationControls,children:S}),z=(0, ae.jsxs)(ae.Fragment,{children:[x,(0, ae.jsx)(k,{value:r,options:d.pageSizeOptions,onChange:p,"aria-label":"Rows per page",className:u.pageSizeSelect})]}),U=B?(0, ae.jsx)(B,{className:u.pageSizeSelector,children:z}):(0, ae.jsx)("div",{className:u.pageSizeSelector,children:z}),H=`${u.pagination??""} ${l||""}`.trim(),q="navigation",N="Pagination";return D?(0, ae.jsxs)(D,{className:H,role:q,"aria-label":N,children:[b,R,U]}):(0, ae.jsxs)("div",{className:H,role:q,"aria-label":N,children:[b,R,U]})});Zp.displayName="PaginationControlsBase";var Qp=({columns:e,visibleColumns:t,visibleCount:r,totalCount:n,handleSelectAll:i,handleClearAll:a,handleCheckboxChange:s,CheckboxItem:o,classNames:l={},Header:f,OptionsListContainer:u,OptionItemContainer:c,Actions:d})=>{let p=f?(0, ae.jsx)(f,{visibleCount:r,totalCount:n}):(0, ae.jsxs)("div",{className:l.header,children:["Select Columns (",r," of ",n,")"]}),h=e.map(v=>{let w=(0, ae.jsx)(o,{columnId:v.columnId,columnName:v.name,checked:t.has(v.columnId),disabled:v.required===true,onChange:s(v.columnId)});return c?(0, ae.jsx)(c,{columnId:v.columnId,children:w},v.columnId):(0, ae.jsx)("div",{className:l.optionItem,children:w},v.columnId)}),m=u?(0, ae.jsx)(u,{children:h}):(0, ae.jsx)("div",{className:l.optionsList,children:h}),g=d?(0, ae.jsx)(d,{onClearAll:a,onSelectAll:i}):(0, ae.jsxs)("div",{className:l.actions,children:[(0, ae.jsx)("button",{type:"button",className:l.clearButton,onClick:a,children:"Clear All"}),(0, ae.jsx)("button",{type:"button",className:l.selectAllButton,onClick:i,children:"Select All"})]});return (0, ae.jsxs)(ae.Fragment,{children:[p,m,g]})};Qp.displayName="ColumnChooserContent";function X2(e){let{DataGridTable:t,ColumnChooser:r,PaginationControls:n}=e,i=(0, X.forwardRef)(function(a,s){let{dataGridProps:o,pagination:l,columnChooser:f,layout:u}=u8(a,s);return (0, ae.jsx)(DS,{className:u.className,sideBar:u.sideBarProps,toolbar:u.toolbar,toolbarBelow:u.toolbarBelow,fullScreen:u.fullScreen,formulaBar:u.formulaBar,sheetTabs:u.sheetTabs,toolbarEnd:f.placement==="toolbar"?(0, ae.jsx)(r,{columns:f.columns,visibleColumns:f.visibleColumns,onVisibilityChange:f.onVisibilityChange,onSetVisibleColumns:f.onSetVisibleColumns}):void 0,pagination:l.hidden?void 0:(0, ae.jsx)(n,{currentPage:l.page,pageSize:l.pageSize,totalCount:l.displayTotalCount,onPageChange:l.setPage,onPageSizeChange:l.setPageSize,pageSizeOptions:l.pageSizeOptions,entityLabelPlural:l.entityLabelPlural}),children:(0, ae.jsx)(t,{...o})})});return i.displayName="OGrid",_t.memo(i)}var HS={color:"var(--ogrid-error, #d32f2f)",fontSize:"0.75rem",padding:"2px 4px"},Y2=class extends _t.Component{constructor(e){super(e),this.state={hasError:false};}static getDerivedStateFromError(){return {hasError:true}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t);}componentDidUpdate(e){e.children!==this.props.children&&this.state.hasError&&this.setState({hasError:false});}resetErrorBoundary(){this.setState({hasError:false});}render(){return this.state.hasError?this.props.fallback!==void 0?this.props.fallback:(0, ae.jsx)("span",{style:HS,children:"\u26A0 Error"}):this.props.children}},VS={padding:"0 12px",color:"var(--ogrid-muted, #8a8a8a)",fontSize:13,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},GS={display:"inline-block",height:10,width:"40%",maxWidth:240,borderRadius:3,background:"var(--ogrid-skeleton-bg, rgba(0, 0, 0, 0.08))",verticalAlign:"middle"},qS={marginLeft:8,padding:"2px 8px",font:"inherit",fontSize:12,cursor:"pointer",color:"var(--ogrid-accent, #217346)",background:"transparent",border:"1px solid var(--ogrid-border, #d0d0d0)",borderRadius:4};function K2({status:e,rowIndex:t,colSpan:r,rowHeight:n,onRetry:i}){return (0, ae.jsx)("tr",{style:{height:n},"data-windowed-row":e,"aria-hidden":e==="loading"||void 0,children:(0, ae.jsx)("td",{colSpan:r,style:VS,children:e==="error"?(0, ae.jsxs)(ae.Fragment,{children:[(0, ae.jsxs)("span",{role:"alert",children:["Couldn\u2019t load row ",t+1,"."]}),i&&(0, ae.jsx)("button",{type:"button",style:qS,onClick:i,children:"Retry"})]}):(0, ae.jsx)("span",{style:GS,"aria-label":`Loading row ${t+1}`})})})}function Z2({emptyState:e,classNames:t,icon:r}){return (0, ae.jsx)("div",{className:t.emptyStateInGrid,children:(0, ae.jsx)("div",{className:t.emptyStateInGridInner,children:e.render?e.render():(0, ae.jsxs)(ae.Fragment,{children:[r!=null&&(0, ae.jsx)("span",{className:t.emptyStateInGridIcon,"aria-hidden":true,children:r}),(0, ae.jsx)("div",{className:t.emptyStateInGridTitle,children:"No results found"}),(0, ae.jsx)("div",{className:t.emptyStateInGridMessage,children:e.message!=null?e.message:e.hasActiveFilters?(0, ae.jsxs)(ae.Fragment,{children:["No items match your current filters. Try adjusting your search or"," ",(0, ae.jsx)("button",{type:"button",className:t.emptyStateInGridLink,onClick:e.onClearAll,children:"clear all filters"})," ","to see all items."]}):"There are no items available at this time."})]})})})}function Q2({message:e,classNames:t}){return (0, ae.jsx)("div",{className:t.loadingOverlay,"aria-live":"polite",children:(0, ae.jsxs)("div",{className:t.loadingOverlayContent,children:[(0, ae.jsx)("div",{className:t.spinner}),(0, ae.jsx)("span",{className:t.loadingOverlayText,children:e})]})})}function J2({dropIndicatorX:e,wrapperLeft:t,className:r}){return (0, ae.jsx)("div",{className:r,style:{left:e-t}})}var WS={padding:"8px 12px",display:"flex",flexDirection:"column",gap:6},v2={display:"flex",alignItems:"center",gap:6,fontSize:12},y2={flex:1},ew=({tempDateFrom:e,setTempDateFrom:t,tempDateTo:r,setTempDateTo:n,onApply:i,onClear:a,classNames:s})=>(0, ae.jsxs)(ae.Fragment,{children:[(0, ae.jsxs)("div",{style:WS,children:[(0, ae.jsxs)("label",{style:v2,children:["From:",(0, ae.jsx)("input",{type:"date",value:e,onChange:o=>t(o.target.value),style:y2})]}),(0, ae.jsxs)("label",{style:v2,children:["To:",(0, ae.jsx)("input",{type:"date",value:r,onChange:o=>n(o.target.value),style:y2})]})]}),(0, ae.jsxs)("div",{className:s?.popoverActions,children:[(0, ae.jsx)("button",{className:s?.clearButton,onClick:a,disabled:!e&&!r,children:"Clear"}),(0, ae.jsx)("button",{className:s?.applyButton,onClick:i,children:"Apply"})]})]});ew.displayName="DateFilterContent";function tw(e){return {filterType:e.filterType,onSort:e.onSort,selectedValues:e.selectedValues,onFilterChange:e.onFilterChange,options:e.options,isLoadingOptions:e.isLoadingOptions??false,textValue:e.textValue??"",onTextChange:e.onTextChange,selectedUser:e.selectedUser,onUserChange:e.onUserChange,peopleSearch:e.peopleSearch,dateValue:e.dateValue,onDateChange:e.onDateChange}}function rw(e,t,r,n,i,a){return e==="multiSelect"?a.renderMultiSelect({searchText:t.searchText,onSearchChange:t.setSearchText,options:r,filteredOptions:t.filteredOptions,selected:t.tempSelected,onOptionToggle:t.handlers.handleCheckboxChange,onSelectAll:t.handlers.handleSelectAll,onClearSelection:t.handlers.handleClearSelection,onApply:t.handlers.handleApplyMultiSelect,isLoading:n}):e==="text"?a.renderText({value:t.tempTextValue,onValueChange:t.setTempTextValue,onApply:t.handlers.handleTextApply,onClear:t.handlers.handleTextClear}):e==="people"?a.renderPeople({selectedUser:i,searchText:t.peopleSearchText,onSearchChange:t.setPeopleSearchText,suggestions:t.peopleSuggestions,isLoading:t.isPeopleLoading,onUserSelect:t.handlers.handleUserSelect,onClearUser:t.handlers.handleClearUser,inputRef:t.peopleInputRef}):e==="date"?a.renderDate({tempDateFrom:t.tempDateFrom,setTempDateFrom:t.setTempDateFrom,tempDateTo:t.tempDateTo,setTempDateTo:t.setTempDateTo,onApply:t.handlers.handleDateApply,onClear:t.handlers.handleDateClear}):null}function nw(e,t){return {renderMultiSelect:r=>(0, ae.jsx)(e.MultiSelectFilterPopover,{...r}),renderText:r=>(0, ae.jsx)(e.TextFilterPopover,{...r}),renderPeople:r=>(0, ae.jsx)(e.PeopleFilterPopover,{...r}),renderDate:r=>(0, ae.jsx)(ew,{...r,classNames:t})}}var _a=Ke(ht()),Pm=Ke(ht()),N3=Ke(Pi());var tr=Ke(ht(),1);function xn(e,t,{checkForDefaultPrevented:r=true}={}){return function(i){if(e?.(i),r===false||!i.defaultPrevented)return t?.(i)}}var aw=Ke(ht(),1);function iw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t);}function Jp(...e){return t=>{let r=false,n=e.map(i=>{let a=iw(i,t);return !r&&typeof a=="function"&&(r=true),a});if(r)return ()=>{for(let i=0;i<n.length;i++){let a=n[i];typeof a=="function"?a():iw(e[i],null);}}}}function Fr(...e){return aw.useCallback(Jp(...e),e)}var zi=Ke(ht(),1),ow=Ke(rn(),1);function ds(e,t=[]){let r=[];function n(a,s){let o=zi.createContext(s),l=r.length;r=[...r,s];let f=c=>{let{scope:d,children:p,...h}=c,m=d?.[e]?.[l]||o,g=zi.useMemo(()=>h,Object.values(h));return (0, ow.jsx)(m.Provider,{value:g,children:p})};f.displayName=a+"Provider";function u(c,d){let p=d?.[e]?.[l]||o,h=zi.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return [f,u]}let i=()=>{let a=r.map(s=>zi.createContext(s));return function(o){let l=o?.[e]||a;return zi.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[n,$S(i,...t)]}function $S(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){let s=n.reduce((o,{useScope:l,scopeName:f})=>{let c=l(a)[`__scope${f}`];return {...o,...c}},{});return zi.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var rr=Ke(ht(),1);var sw=Ke(ht(),1),lw=Ke(Pi(),1);var xr=Ke(ht(),1);var Pc=Ke(rn(),1);function Uc(e){let t=XS(e),r=xr.forwardRef((n,i)=>{let{children:a,...s}=n,o=xr.Children.toArray(a),l=o.find(KS);if(l){let f=l.props.children,u=o.map(c=>c===l?xr.Children.count(f)>1?xr.Children.only(null):xr.isValidElement(f)?f.props.children:null:c);return (0, Pc.jsx)(t,{...s,ref:i,children:xr.isValidElement(f)?xr.cloneElement(f,void 0,u):null})}return (0, Pc.jsx)(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function XS(e){let t=xr.forwardRef((r,n)=>{let{children:i,...a}=r;if(xr.isValidElement(i)){let s=QS(i),o=ZS(a,i.props);return i.type!==xr.Fragment&&(o.ref=n?Jp(n,s):s),xr.cloneElement(i,o)}return xr.Children.count(i)>1?xr.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YS=Symbol("radix.slottable");function KS(e){return xr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YS}function ZS(e,t){let r={...t};for(let n in t){let i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...o)=>{let l=a(...o);return i(...o),l}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "));}return {...e,...r}}function QS(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var uw=Ke(rn(),1),JS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sr=JS.reduce((e,t)=>{let r=Uc(`Primitive.${t}`),n=sw.forwardRef((i,a)=>{let{asChild:s,...o}=i,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=true),(0, uw.jsx)(l,{...o,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cw(e,t){e&&lw.flushSync(()=>e.dispatchEvent(t));}var hs=Ke(ht(),1);function ui(e){let t=hs.useRef(e);return hs.useEffect(()=>{t.current=e;}),hs.useMemo(()=>(...r)=>t.current?.(...r),[])}var fw=Ke(ht(),1);function dw(e,t=globalThis?.document){let r=ui(e);fw.useEffect(()=>{let n=i=>{i.key==="Escape"&&r(i);};return t.addEventListener("keydown",n,{capture:true}),()=>t.removeEventListener("keydown",n,{capture:true})},[r,t]);}var tm=Ke(rn(),1),eC="DismissableLayer",em="dismissableLayer.update",tC="dismissableLayer.pointerDownOutside",rC="dismissableLayer.focusOutside",hw,mw=rr.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),rm=rr.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=false,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...l}=e,f=rr.useContext(mw),[u,c]=rr.useState(null),d=u?.ownerDocument??globalThis?.document,[,p]=rr.useState({}),h=Fr(t,D=>c(D)),m=Array.from(f.layers),[g]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),w=u?m.indexOf(u):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,T=w>=v,I=aC(D=>{let j=D.target,F=[...f.branches].some(B=>B.contains(j));!T||F||(i?.(D),s?.(D),D.defaultPrevented||o?.());},d),k=oC(D=>{let j=D.target;[...f.branches].some(B=>B.contains(j))||(a?.(D),s?.(D),D.defaultPrevented||o?.());},d);return dw(D=>{w===f.layers.size-1&&(n?.(D),!D.defaultPrevented&&o&&(D.preventDefault(),o()));},d),rr.useEffect(()=>{if(u)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(hw=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),pw(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=hw);}},[u,d,r,f]),rr.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),pw());},[u,f]),rr.useEffect(()=>{let D=()=>p({});return document.addEventListener(em,D),()=>document.removeEventListener(em,D)},[]),(0, tm.jsx)(Sr.div,{...l,ref:h,style:{pointerEvents:C?T?"auto":"none":void 0,...e.style},onFocusCapture:xn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:xn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:xn(e.onPointerDownCapture,I.onPointerDownCapture)})});rm.displayName=eC;var nC="DismissableLayerBranch",iC=rr.forwardRef((e,t)=>{let r=rr.useContext(mw),n=rr.useRef(null),i=Fr(t,n);return rr.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a);}},[r.branches]),(0, tm.jsx)(Sr.div,{...e,ref:i})});iC.displayName=nC;function aC(e,t=globalThis?.document){let r=ui(e),n=rr.useRef(false),i=rr.useRef(()=>{});return rr.useEffect(()=>{let a=o=>{if(o.target&&!n.current){let f=function(){gw(tC,r,u,{discrete:true});};let u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:true})):f();}else t.removeEventListener("click",i.current);n.current=false;},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a);},0);return ()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current);}},[t,r]),{onPointerDownCapture:()=>n.current=true}}function oC(e,t=globalThis?.document){let r=ui(e),n=rr.useRef(false);return rr.useEffect(()=>{let i=a=>{a.target&&!n.current&&gw(rC,r,{originalEvent:a},{discrete:false});};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=true,onBlurCapture:()=>n.current=false}}function pw(){let e=new CustomEvent(em);document.dispatchEvent(e);}function gw(e,t,r,{discrete:n}){let i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:false,cancelable:true,detail:r});t&&i.addEventListener(e,t,{once:true}),n?cw(i,a):i.dispatchEvent(a);}var vw=Ke(ht(),1),nm=0;function yw(){vw.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bw()),document.body.insertAdjacentElement("beforeend",e[1]??bw()),nm++,()=>{nm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nm--;}},[]);}function bw(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var zn=Ke(ht(),1);var Cw=Ke(rn(),1),im="focusScope.autoFocusOnMount",am="focusScope.autoFocusOnUnmount",ww={bubbles:false,cancelable:true},sC="FocusScope",om=zn.forwardRef((e,t)=>{let{loop:r=false,trapped:n=false,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,l]=zn.useState(null),f=ui(i),u=ui(a),c=zn.useRef(null),d=Fr(t,m=>l(m)),p=zn.useRef({paused:false,pause(){this.paused=true;},resume(){this.paused=false;}}).current;zn.useEffect(()=>{if(n){let w=function(k){if(p.paused||!o)return;let D=k.target;o.contains(D)?c.current=D:ma(c.current,{select:true});},C=function(k){if(p.paused||!o)return;let D=k.relatedTarget;D!==null&&(o.contains(D)||ma(c.current,{select:true}));},T=function(k){if(document.activeElement===document.body)for(let j of k)j.removedNodes.length>0&&ma(o);};document.addEventListener("focusin",w),document.addEventListener("focusout",C);let I=new MutationObserver(T);return o&&I.observe(o,{childList:true,subtree:true}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",C),I.disconnect();}}},[n,o,p.paused]),zn.useEffect(()=>{if(o){xw.add(p);let m=document.activeElement;if(!o.contains(m)){let v=new CustomEvent(im,ww);o.addEventListener(im,f),o.dispatchEvent(v),v.defaultPrevented||(lC(hC(Ew(o)),{select:true}),document.activeElement===m&&ma(o));}return ()=>{o.removeEventListener(im,f),setTimeout(()=>{let v=new CustomEvent(am,ww);o.addEventListener(am,u),o.dispatchEvent(v),v.defaultPrevented||ma(m??document.body,{select:true}),o.removeEventListener(am,u),xw.remove(p);},0);}}},[o,f,u,p]);let h=zn.useCallback(m=>{if(!r&&!n||p.paused)return;let g=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(g&&v){let w=m.currentTarget,[C,T]=uC(w);C&&T?!m.shiftKey&&v===T?(m.preventDefault(),r&&ma(C,{select:true})):m.shiftKey&&v===C&&(m.preventDefault(),r&&ma(T,{select:true})):v===w&&m.preventDefault();}},[r,n,p.paused]);return (0, Cw.jsx)(Sr.div,{tabIndex:-1,...s,ref:d,onKeyDown:h})});om.displayName=sC;function lC(e,{select:t=false}={}){let r=document.activeElement;for(let n of e)if(ma(n,{select:t}),document.activeElement!==r)return}function uC(e){let t=Ew(e),r=_w(t,e),n=_w(t.reverse(),e);return [r,n]}function Ew(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _w(e,t){for(let r of e)if(!cC(r,{upTo:t}))return r}function cC(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t!==void 0&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement;}return false}function fC(e){return e instanceof HTMLInputElement&&"select"in e}function ma(e,{select:t=false}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:true}),e!==r&&fC(e)&&t&&e.select();}}var xw=dC();function dC(){let e=[];return {add(t){let r=e[0];t!==r&&r?.pause(),e=Sw(e,t),e.unshift(t);},remove(t){e=Sw(e,t),e[0]?.resume();}}}function Sw(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hC(e){return e.filter(t=>t.tagName!=="A")}var sm=Ke(ht(),1);var Rw=Ke(ht(),1),nn=globalThis?.document?Rw.useLayoutEffect:()=>{};var pC=sm[" useId ".trim().toString()]||(()=>{}),mC=0;function Aw(e){let[t,r]=sm.useState(pC());return nn(()=>{r(n=>n??String(mC++));},[e]),e||(t?`radix-${t}`:"")}var on=Ke(ht(),1);var kw=["top","right","bottom","left"];var ci=Math.min,qr=Math.max,Fl=Math.round,Pl=Math.floor,Yn=e=>({x:e,y:e}),gC={left:"right",right:"left",bottom:"top",top:"bottom"};function Vc(e,t,r){return qr(e,ci(t,r))}function fi(e,t){return typeof e=="function"?e(t):e}function di(e){return e.split("-")[0]}function Za(e){return e.split("-")[1]}function Gc(e){return e==="x"?"y":"x"}function qc(e){return e==="y"?"height":"width"}function Kn(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Wc(e){return Gc(Kn(e))}function Ow(e,t,r){r===void 0&&(r=false);let n=Za(e),i=Wc(e),a=qc(i),s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bl(s)),[s,Bl(s)]}function Dw(e){let t=Bl(e);return [Hc(e),t,Hc(t)]}function Hc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Tw=["left","right"],Mw=["right","left"],bC=["top","bottom"],vC=["bottom","top"];function yC(e,t,r){switch(e){case "top":case "bottom":return r?t?Mw:Tw:t?Tw:Mw;case "left":case "right":return t?bC:vC;default:return []}}function Nw(e,t,r,n){let i=Za(e),a=yC(di(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Hc)))),a}function Bl(e){let t=di(e);return gC[t]+e.slice(t.length)}function wC(e){return {top:0,right:0,bottom:0,left:0,...e}}function lm(e){return typeof e!="number"?wC(e):{top:e,right:e,bottom:e,left:e}}function Qa(e){let{x:t,y:r,width:n,height:i}=e;return {width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function Iw(e,t,r){let{reference:n,floating:i}=e,a=Kn(t),s=Wc(t),o=qc(s),l=di(t),f=a==="y",u=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2,d=n[o]/2-i[o]/2,p;switch(l){case "top":p={x:u,y:n.y-i.height};break;case "bottom":p={x:u,y:n.y+n.height};break;case "right":p={x:n.x+n.width,y:c};break;case "left":p={x:n.x-i.width,y:c};break;default:p={x:n.x,y:n.y};}switch(Za(t)){case "start":p[s]-=d*(r&&f?-1:1);break;case "end":p[s]+=d*(r&&f?-1:1);break}return p}async function Lw(e,t){var r;t===void 0&&(t={});let{x:n,y:i,platform:a,rects:s,elements:o,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:c="floating",altBoundary:d=false,padding:p=0}=fi(t,e),h=lm(p),g=o[d?c==="floating"?"reference":"floating":c],v=Qa(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:f,rootBoundary:u,strategy:l})),w=c==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),T=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},I=Qa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:w,offsetParent:C,strategy:l}):w);return {top:(v.top-I.top+h.top)/T.y,bottom:(I.bottom-v.bottom+h.bottom)/T.y,left:(v.left-I.left+h.left)/T.x,right:(I.right-v.right+h.right)/T.x}}var _C=50,Bw=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,o=s.detectOverflow?s:{...s,detectOverflow:Lw},l=await(s.isRTL==null?void 0:s.isRTL(t)),f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:c}=Iw(f,n,l),d=n,p=0,h={};for(let m=0;m<a.length;m++){let g=a[m];if(!g)continue;let{name:v,fn:w}=g,{x:C,y:T,data:I,reset:k}=await w({x:u,y:c,initialPlacement:n,placement:d,strategy:i,middlewareData:h,rects:f,platform:o,elements:{reference:e,floating:t}});u=C??u,c=T??c,h[v]={...h[v],...I},k&&p<_C&&(p++,typeof k=="object"&&(k.placement&&(d=k.placement),k.rects&&(f=k.rects===true?await s.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:u,y:c}=Iw(f,d,l)),m=-1);}return {x:u,y:c,placement:d,strategy:i,middlewareData:h}},Fw=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:a,platform:s,elements:o,middlewareData:l}=t,{element:f,padding:u=0}=fi(e,t)||{};if(f==null)return {};let c=lm(u),d={x:r,y:n},p=Wc(i),h=qc(p),m=await s.getDimensions(f),g=p==="y",v=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",T=a.reference[h]+a.reference[p]-d[p]-a.floating[h],I=d[p]-a.reference[p],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f)),D=k?k[C]:0;(!D||!await(s.isElement==null?void 0:s.isElement(k)))&&(D=o.floating[C]||a.floating[h]);let j=T/2-I/2,F=D/2-m[h]/2-1,B=ci(c[v],F),E=ci(c[w],F),M=B,L=D-m[h]-E,b=D/2-m[h]/2+j,y=Vc(M,b,L),x=!l.arrow&&Za(i)!=null&&b!==y&&a.reference[h]/2-(b<M?B:E)-m[h]/2<0,_=x?b<M?b-M:b-L:0;return {[p]:d[p]+_,data:{[p]:y,centerOffset:b-y-_,...x&&{alignmentOffset:_}},reset:x}}});var Pw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:l,elements:f}=t,{mainAxis:u=true,crossAxis:c=true,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=true,...g}=fi(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return {};let v=di(i),w=Kn(o),C=di(o)===o,T=await(l.isRTL==null?void 0:l.isRTL(f.floating)),I=d||(C||!m?[Bl(o)]:Dw(o)),k=h!=="none";!d&&k&&I.push(...Nw(o,m,h,T));let D=[o,...I],j=await l.detectOverflow(t,g),F=[],B=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&F.push(j[v]),c){let b=Ow(i,s,T);F.push(j[b[0]],j[b[1]]);}if(B=[...B,{placement:i,overflows:F}],!F.every(b=>b<=0)){var E,M;let b=(((E=a.flip)==null?void 0:E.index)||0)+1,y=D[b];if(y&&(!(c==="alignment"?w!==Kn(y):false)||B.every(S=>Kn(S.placement)===w?S.overflows[0]>0:true)))return {data:{index:b,overflows:B},reset:{placement:y}};let x=(M=B.filter(_=>_.overflows[0]<=0).sort((_,S)=>_.overflows[1]-S.overflows[1])[0])==null?void 0:M.placement;if(!x)switch(p){case "bestFit":{var L;let _=(L=B.filter(S=>{if(k){let R=Kn(S.placement);return R===w||R==="y"}return true}).map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,z)=>R+z,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];_&&(x=_);break}case "initialPlacement":x=o;break}if(i!==x)return {reset:{placement:x}}}return {}}}};function zw(e,t){return {top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jw(e){return kw.some(t=>e[t]>=0)}var Uw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=fi(e,t);switch(i){case "referenceHidden":{let s=await n.detectOverflow(t,{...a,elementContext:"reference"}),o=zw(s,r.reference);return {data:{referenceHiddenOffsets:o,referenceHidden:jw(o)}}}case "escaped":{let s=await n.detectOverflow(t,{...a,altBoundary:true}),o=zw(s,r.floating);return {data:{escapedOffsets:o,escaped:jw(o)}}}default:return {}}}}};var Hw=new Set(["left","top"]);async function xC(e,t){let{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=di(r),o=Za(r),l=Kn(r)==="y",f=Hw.has(s)?-1:1,u=a&&l?-1:1,c=fi(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&typeof h=="number"&&(p=o==="end"?h*-1:h),l?{x:p*u,y:d*f}:{x:d*f,y:p*u}}var Vw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:a,placement:s,middlewareData:o}=t,l=await xC(t,e);return s===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:s}}}}},Gw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=true,crossAxis:o=false,limiter:l={fn:v=>{let{x:w,y:C}=v;return {x:w,y:C}}},...f}=fi(e,t),u={x:r,y:n},c=await a.detectOverflow(t,f),d=Kn(di(i)),p=Gc(d),h=u[p],m=u[d];if(s){let v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",C=h+c[v],T=h-c[w];h=Vc(C,h,T);}if(o){let v=d==="y"?"top":"left",w=d==="y"?"bottom":"right",C=m+c[v],T=m-c[w];m=Vc(C,m,T);}let g=l.fn({...t,[p]:h,[d]:m});return {...g,data:{x:g.x-r,y:g.y-n,enabled:{[p]:s,[d]:o}}}}}},qw=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:l=true,crossAxis:f=true}=fi(e,t),u={x:r,y:n},c=Kn(i),d=Gc(c),p=u[d],h=u[c],m=fi(o,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let C=d==="y"?"height":"width",T=a.reference[d]-a.floating[C]+g.mainAxis,I=a.reference[d]+a.reference[C]-g.mainAxis;p<T?p=T:p>I&&(p=I);}if(f){var v,w;let C=d==="y"?"width":"height",T=Hw.has(di(i)),I=a.reference[c]-a.floating[C]+(T&&((v=s.offset)==null?void 0:v[c])||0)+(T?0:g.crossAxis),k=a.reference[c]+a.reference[C]+(T?0:((w=s.offset)==null?void 0:w[c])||0)-(T?g.crossAxis:0);h<I?h=I:h>k&&(h=k);}return {[d]:p,[c]:h}}}},Ww=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:i,rects:a,platform:s,elements:o}=t,{apply:l=()=>{},...f}=fi(e,t),u=await s.detectOverflow(t,f),c=di(i),d=Za(i),p=Kn(i)==="y",{width:h,height:m}=a.floating,g,v;c==="top"||c==="bottom"?(g=c,v=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=c,g=d==="end"?"top":"bottom");let w=m-u.top-u.bottom,C=h-u.left-u.right,T=ci(m-u[g],w),I=ci(h-u[v],C),k=!t.middlewareData.shift,D=T,j=I;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(D=w),k&&!d){let B=qr(u.left,0),E=qr(u.right,0),M=qr(u.top,0),L=qr(u.bottom,0);p?j=h-2*(B!==0||E!==0?B+E:qr(u.left,u.right)):D=m-2*(M!==0||L!==0?M+L:qr(u.top,u.bottom));}await l({...t,availableWidth:j,availableHeight:D});let F=await s.getDimensions(o.floating);return h!==F.width||m!==F.height?{reset:{rects:true}}:{}}}};function $c(){return typeof window<"u"}function to(e){return Xw(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var t;return (e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zn(e){var t;return (t=(Xw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xw(e){return $c()?e instanceof Node||e instanceof an(e).Node:false}function jn(e){return $c()?e instanceof Element||e instanceof an(e).Element:false}function hi(e){return $c()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:false}function $w(e){return !$c()||typeof ShadowRoot>"u"?false:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}function ps(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=Ln(e);return /auto|scroll|overlay|hidden|clip/.test(t+n+r)&&i!=="inline"&&i!=="contents"}function Yw(e){return /^(table|td|th)$/.test(to(e))}function Ul(e){try{if(e.matches(":popover-open"))return !0}catch{}try{return e.matches(":modal")}catch{return false}}var SC=/transform|translate|scale|rotate|perspective|filter/,CC=/paint|layout|strict|content/,Ja=e=>!!e&&e!=="none",um;function Xc(e){let t=jn(e)?Ln(e):e;return Ja(t.transform)||Ja(t.translate)||Ja(t.scale)||Ja(t.rotate)||Ja(t.perspective)||!Yc()&&(Ja(t.backdropFilter)||Ja(t.filter))||SC.test(t.willChange||"")||CC.test(t.contain||"")}function Kw(e){let t=ji(e);for(;hi(t)&&!ro(t);){if(Xc(t))return t;if(Ul(t))return null;t=ji(t);}return null}function Yc(){return um==null&&(um=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),um}function ro(e){return /^(html|body|#document)$/.test(to(e))}function Ln(e){return an(e).getComputedStyle(e)}function Hl(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ji(e){if(to(e)==="html")return e;let t=e.assignedSlot||e.parentNode||$w(e)&&e.host||Zn(e);return $w(t)?t.host:t}function Zw(e){let t=ji(e);return ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:hi(t)&&ps(t)?t:Zw(t)}function eo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=true);let i=Zw(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=an(i);if(a){let o=Kc(s);return t.concat(s,s.visualViewport||[],ps(i)?i:[],o&&r?eo(o):[])}else return t.concat(i,eo(i,[],r))}function Kc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function t_(e){let t=Ln(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=hi(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,o=Fl(r)!==a||Fl(n)!==s;return o&&(r=a,n=s),{width:r,height:n,$:o}}function fm(e){return jn(e)?e:e.contextElement}function ms(e){let t=fm(e);if(!hi(t))return Yn(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:a}=t_(t),s=(a?Fl(r.width):r.width)/n,o=(a?Fl(r.height):r.height)/i;return (!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}var EC=Yn(0);function r_(e){let t=an(e);return !Yc()||!t.visualViewport?EC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RC(e,t,r){return t===void 0&&(t=false),!r||t&&r!==an(e)?false:t}function no(e,t,r,n){t===void 0&&(t=false),r===void 0&&(r=false);let i=e.getBoundingClientRect(),a=fm(e),s=Yn(1);t&&(n?jn(n)&&(s=ms(n)):s=ms(e));let o=RC(a,r,n)?r_(a):Yn(0),l=(i.left+o.x)/s.x,f=(i.top+o.y)/s.y,u=i.width/s.x,c=i.height/s.y;if(a){let d=an(a),p=n&&jn(n)?an(n):n,h=d,m=Kc(h);for(;m&&n&&p!==h;){let g=ms(m),v=m.getBoundingClientRect(),w=Ln(m),C=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*g.x,T=v.top+(m.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,f*=g.y,u*=g.x,c*=g.y,l+=C,f+=T,h=an(m),m=Kc(h);}}return Qa({width:u,height:c,x:l,y:f})}function Zc(e,t){let r=Hl(e).scrollLeft;return t?t.left+r:no(Zn(e)).left+r}function n_(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Zc(e,r),i=r.top+t.scrollTop;return {x:n,y:i}}function AC(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,a=i==="fixed",s=Zn(n),o=t?Ul(t.floating):false;if(n===s||o&&a)return r;let l={scrollLeft:0,scrollTop:0},f=Yn(1),u=Yn(0),c=hi(n);if((c||!c&&!a)&&((to(n)!=="body"||ps(s))&&(l=Hl(n)),c)){let p=no(n);f=ms(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop;}let d=s&&!c&&!a?n_(s,l):Yn(0);return {width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-l.scrollLeft*f.x+u.x+d.x,y:r.y*f.y-l.scrollTop*f.y+u.y+d.y}}function TC(e){return Array.from(e.getClientRects())}function MC(e){let t=Zn(e),r=Hl(e),n=e.ownerDocument.body,i=qr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=qr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+Zc(e),o=-r.scrollTop;return Ln(n).direction==="rtl"&&(s+=qr(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:o}}var Qw=25;function kC(e,t){let r=an(e),n=Zn(e),i=r.visualViewport,a=n.clientWidth,s=n.clientHeight,o=0,l=0;if(i){a=i.width,s=i.height;let u=Yc();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop);}let f=Zc(n);if(f<=0){let u=n.ownerDocument,c=u.body,d=getComputedStyle(c),p=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,h=Math.abs(n.clientWidth-c.clientWidth-p);h<=Qw&&(a-=h);}else f<=Qw&&(a+=f);return {width:a,height:s,x:o,y:l}}function OC(e,t){let r=no(e,true,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=hi(e)?ms(e):Yn(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,l=i*a.x,f=n*a.y;return {width:s,height:o,x:l,y:f}}function Jw(e,t,r){let n;if(t==="viewport")n=kC(e,r);else if(t==="document")n=MC(Zn(e));else if(jn(t))n=OC(t,r);else {let i=r_(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height};}return Qa(n)}function i_(e,t){let r=ji(e);return r===t||!jn(r)||ro(r)?false:Ln(r).position==="fixed"||i_(r,t)}function DC(e,t){let r=t.get(e);if(r)return r;let n=eo(e,[],false).filter(o=>jn(o)&&to(o)!=="body"),i=null,a=Ln(e).position==="fixed",s=a?ji(e):e;for(;jn(s)&&!ro(s);){let o=Ln(s),l=Xc(s);!l&&o.position==="fixed"&&(i=null),(a?!l&&!i:!l&&o.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ps(s)&&!l&&i_(e,s))?n=n.filter(u=>u!==s):i=o,s=ji(s);}return t.set(e,n),n}function NC(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[...r==="clippingAncestors"?Ul(t)?[]:DC(t,this._c):[].concat(r),n],o=Jw(t,s[0],i),l=o.top,f=o.right,u=o.bottom,c=o.left;for(let d=1;d<s.length;d++){let p=Jw(t,s[d],i);l=qr(p.top,l),f=ci(p.right,f),u=ci(p.bottom,u),c=qr(p.left,c);}return {width:f-c,height:u-l,x:c,y:l}}function IC(e){let{width:t,height:r}=t_(e);return {width:t,height:r}}function zC(e,t,r){let n=hi(t),i=Zn(t),a=r==="fixed",s=no(e,true,a,t),o={scrollLeft:0,scrollTop:0},l=Yn(0);function f(){l.x=Zc(i);}if(n||!n&&!a)if((to(t)!=="body"||ps(i))&&(o=Hl(t)),n){let p=no(t,true,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop;}else i&&f();a&&!n&&i&&f();let u=i&&!n&&!a?n_(i,o):Yn(0),c=s.left+o.scrollLeft-l.x-u.x,d=s.top+o.scrollTop-l.y-u.y;return {x:c,y:d,width:s.width,height:s.height}}function cm(e){return Ln(e).position==="static"}function e_(e,t){if(!hi(e)||Ln(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Zn(e)===r&&(r=r.ownerDocument.body),r}function a_(e,t){let r=an(e);if(Ul(e))return r;if(!hi(e)){let i=ji(e);for(;i&&!ro(i);){if(jn(i)&&!cm(i))return i;i=ji(i);}return r}let n=e_(e,t);for(;n&&Yw(n)&&cm(n);)n=e_(n,t);return n&&ro(n)&&cm(n)&&!Xc(n)?r:n||Kw(e)||r}var jC=async function(e){let t=this.getOffsetParent||a_,r=this.getDimensions,n=await r(e.floating);return {reference:zC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function LC(e){return Ln(e).direction==="rtl"}var o_={convertOffsetParentRelativeRectToViewportRelativeRect:AC,getDocumentElement:Zn,getClippingRect:NC,getOffsetParent:a_,getElementRects:jC,getClientRects:TC,getDimensions:IC,getScale:ms,isElement:jn,isRTL:LC};function s_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BC(e,t){let r=null,n,i=Zn(e);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null;}function s(o,l){o===void 0&&(o=false),l===void 0&&(l=1),a();let f=e.getBoundingClientRect(),{left:u,top:c,width:d,height:p}=f;if(o||t(),!d||!p)return;let h=Pl(c),m=Pl(i.clientWidth-(u+d)),g=Pl(i.clientHeight-(c+p)),v=Pl(u),C={rootMargin:-h+"px "+-m+"px "+-g+"px "+-v+"px",threshold:qr(0,ci(1,l))||1},T=true;function I(k){let D=k[0].intersectionRatio;if(D!==l){if(!T)return s();D?s(false,D):n=setTimeout(()=>{s(false,1e-7);},1e3);}D===1&&!s_(f,e.getBoundingClientRect())&&s(),T=false;}try{r=new IntersectionObserver(I,{...C,root:i.ownerDocument});}catch{r=new IntersectionObserver(I,C);}r.observe(e);}return s(true),a}function dm(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:i=true,ancestorResize:a=true,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=false}=n,f=fm(e),u=i||a?[...f?eo(f):[],...t?eo(t):[]]:[];u.forEach(v=>{i&&v.addEventListener("scroll",r,{passive:true}),a&&v.addEventListener("resize",r);});let c=f&&o?BC(f,r):null,d=-1,p=null;s&&(p=new ResizeObserver(v=>{let[w]=v;w&&w.target===f&&p&&t&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t);})),r();}),f&&!l&&p.observe(f),t&&p.observe(t));let h,m=l?no(e):null;l&&g();function g(){let v=no(e);m&&!s_(m,v)&&r(),m=v,h=requestAnimationFrame(g);}return r(),()=>{var v;u.forEach(w=>{i&&w.removeEventListener("scroll",r),a&&w.removeEventListener("resize",r);}),c?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h);}}var l_=Vw;var u_=Gw,c_=Pw,f_=Ww,d_=Uw,hm=Fw;var h_=qw,pm=(e,t,r)=>{let n=new Map,i={platform:o_,...r},a={...i.platform,_c:n};return Bw(e,t,{...i,platform:a})};var br=Ke(ht(),1),m_=Ke(ht(),1),g_=Ke(Pi(),1),FC=typeof document<"u",PC=function(){},Qc=FC?m_.useLayoutEffect:PC;function Jc(e,t){if(e===t)return true;if(typeof e!=typeof t)return false;if(typeof e=="function"&&e.toString()===t.toString())return true;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return false;for(n=r;n--!==0;)if(!Jc(e[n],t[n]))return false;return true}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return false;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return false;for(n=r;n--!==0;){let a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Jc(e[a],t[a]))return false}return true}return e!==e&&t!==t}function b_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function p_(e,t){let r=b_(e);return Math.round(t*r)/r}function mm(e){let t=br.useRef(e);return Qc(()=>{t.current=e;}),t}function v_(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:o=true,whileElementsMounted:l,open:f}=e,[u,c]=br.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:false}),[d,p]=br.useState(n);Jc(d,n)||p(n);let[h,m]=br.useState(null),[g,v]=br.useState(null),w=br.useCallback(S=>{S!==k.current&&(k.current=S,m(S));},[]),C=br.useCallback(S=>{S!==D.current&&(D.current=S,v(S));},[]),T=a||h,I=s||g,k=br.useRef(null),D=br.useRef(null),j=br.useRef(u),F=l!=null,B=mm(l),E=mm(i),M=mm(f),L=br.useCallback(()=>{if(!k.current||!D.current)return;let S={placement:t,strategy:r,middleware:d};E.current&&(S.platform=E.current),pm(k.current,D.current,S).then(R=>{let z={...R,isPositioned:M.current!==false};b.current&&!Jc(j.current,z)&&(j.current=z,g_.flushSync(()=>{c(z);}));});},[d,t,r,E,M]);Qc(()=>{f===false&&j.current.isPositioned&&(j.current.isPositioned=false,c(S=>({...S,isPositioned:false})));},[f]);let b=br.useRef(false);Qc(()=>(b.current=true,()=>{b.current=false;}),[]),Qc(()=>{if(T&&(k.current=T),I&&(D.current=I),T&&I){if(B.current)return B.current(T,I,L);L();}},[T,I,L,B,F]);let y=br.useMemo(()=>({reference:k,floating:D,setReference:w,setFloating:C}),[w,C]),x=br.useMemo(()=>({reference:T,floating:I}),[T,I]),_=br.useMemo(()=>{let S={position:r,left:0,top:0};if(!x.floating)return S;let R=p_(x.floating,u.x),z=p_(x.floating,u.y);return o?{...S,transform:"translate("+R+"px, "+z+"px)",...b_(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:z}},[r,o,x.floating,u.x,u.y]);return br.useMemo(()=>({...u,update:L,refs:y,elements:x,floatingStyles:_}),[u,L,y,x,_])}var UC=e=>{function t(r){return {}.hasOwnProperty.call(r,"current")}return {name:"arrow",options:e,fn(r){let{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?hm({element:n.current,padding:i}).fn(r):{}:n?hm({element:n,padding:i}).fn(r):{}}}},y_=(e,t)=>{let r=l_(e);return {name:r.name,fn:r.fn,options:[e,t]}},w_=(e,t)=>{let r=u_(e);return {name:r.name,fn:r.fn,options:[e,t]}},__=(e,t)=>({fn:h_(e).fn,options:[e,t]}),x_=(e,t)=>{let r=c_(e);return {name:r.name,fn:r.fn,options:[e,t]}},S_=(e,t)=>{let r=f_(e);return {name:r.name,fn:r.fn,options:[e,t]}};var C_=(e,t)=>{let r=d_(e);return {name:r.name,fn:r.fn,options:[e,t]}};var E_=(e,t)=>{let r=UC(e);return {name:r.name,fn:r.fn,options:[e,t]}};var R_=Ke(ht(),1);var gm=Ke(rn(),1),HC="Arrow",A_=R_.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...a}=e;return (0, gm.jsx)(Sr.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0, gm.jsx)("polygon",{points:"0,0 30,0 15,10"})})});A_.displayName=HC;var T_=A_;var M_=Ke(ht(),1);function ef(e){let[t,r]=M_.useState(void 0);return nn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;let a=i[0],s,o;if("borderBoxSize"in a){let l=a.borderBoxSize,f=Array.isArray(l)?l[0]:l;s=f.inlineSize,o=f.blockSize;}else s=e.offsetWidth,o=e.offsetHeight;r({width:s,height:o});});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0);},[e]),t}var ga=Ke(rn(),1);var bm="Popper",[k_,vm]=ds(bm),[GC,O_]=k_(bm),D_=e=>{let{__scopePopper:t,children:r}=e,[n,i]=on.useState(null);return (0, ga.jsx)(GC,{scope:t,anchor:n,onAnchorChange:i,children:r})};D_.displayName=bm;var N_="PopperAnchor",I_=on.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,a=O_(N_,r),s=on.useRef(null),o=Fr(t,s),l=on.useRef(null);return on.useEffect(()=>{let f=l.current;l.current=n?.current||s.current,f!==l.current&&a.onAnchorChange(l.current);}),n?null:(0, ga.jsx)(Sr.div,{...i,ref:o})});I_.displayName=N_;var ym="PopperContent",[qC,WC]=k_(ym),z_=on.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:l=true,collisionBoundary:f=[],collisionPadding:u=0,sticky:c="partial",hideWhenDetached:d=false,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,g=O_(ym,r),[v,w]=on.useState(null),C=Fr(t,A=>w(A)),[T,I]=on.useState(null),k=ef(T),D=k?.width??0,j=k?.height??0,F=n+(a!=="center"?"-"+a:""),B=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},E=Array.isArray(f)?f:[f],M=E.length>0,L={padding:B,boundary:E.filter(XC),altBoundary:M},{refs:b,floatingStyles:y,placement:x,isPositioned:_,middlewareData:S}=v_({strategy:"fixed",placement:F,whileElementsMounted:(...A)=>dm(...A,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[y_({mainAxis:i+j,alignmentAxis:s}),l&&w_({mainAxis:true,crossAxis:false,limiter:c==="partial"?__():void 0,...L}),l&&x_({...L}),S_({...L,apply:({elements:A,rects:P,availableWidth:W,availableHeight:Z})=>{let{width:$,height:K}=P.reference,te=A.floating.style;te.setProperty("--radix-popper-available-width",`${W}px`),te.setProperty("--radix-popper-available-height",`${Z}px`),te.setProperty("--radix-popper-anchor-width",`${$}px`),te.setProperty("--radix-popper-anchor-height",`${K}px`);}}),T&&E_({element:T,padding:o}),YC({arrowWidth:D,arrowHeight:j}),d&&C_({strategy:"referenceHidden",...L})]}),[R,z]=B_(x),U=ui(h);nn(()=>{_&&U?.();},[_,U]);let H=S.arrow?.x,q=S.arrow?.y,N=S.arrow?.centerOffset!==0,[V,O]=on.useState();return nn(()=>{v&&O(window.getComputedStyle(v).zIndex);},[v]),(0, ga.jsx)("div",{ref:b.setFloating,"data-radix-popper-content-wrapper":"",style:{...y,transform:_?y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[S.transformOrigin?.x,S.transformOrigin?.y].join(" "),...S.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0, ga.jsx)(qC,{scope:r,placedSide:R,onArrowChange:I,arrowX:H,arrowY:q,shouldHideArrow:N,children:(0, ga.jsx)(Sr.div,{"data-side":R,"data-align":z,...m,ref:C,style:{...m.style,animation:_?void 0:"none"}})})})});z_.displayName=ym;var j_="PopperArrow",$C={top:"bottom",right:"left",bottom:"top",left:"right"},L_=on.forwardRef(function(t,r){let{__scopePopper:n,...i}=t,a=WC(j_,n),s=$C[a.placedSide];return (0, ga.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0, ga.jsx)(T_,{...i,ref:r,style:{...i.style,display:"block"}})})});L_.displayName=j_;function XC(e){return e!==null}var YC=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,o=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[f,u]=B_(r),c={start:"0%",center:"50%",end:"100%"}[u],d=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+l/2,h="",m="";return f==="bottom"?(h=s?c:`${d}px`,m=`${-l}px`):f==="top"?(h=s?c:`${d}px`,m=`${n.floating.height+l}px`):f==="right"?(h=`${-l}px`,m=s?c:`${p}px`):f==="left"&&(h=`${n.floating.width+l}px`,m=s?c:`${p}px`),{data:{x:h,y:m}}}});function B_(e){let[t,r="center"]=e.split("-");return [t,r]}var F_=D_,wm=I_,P_=z_,U_=L_;var tf=Ke(ht(),1),H_=Ke(Pi(),1);var V_=Ke(rn(),1),ZC="Portal",_m=tf.forwardRef((e,t)=>{let{container:r,...n}=e,[i,a]=tf.useState(false);nn(()=>a(true),[]);let s=r||i&&globalThis?.document?.body;return s?H_.default.createPortal((0, V_.jsx)(Sr.div,{...n,ref:t}),s):null});_m.displayName=ZC;var sn=Ke(ht(),1);var G_=Ke(ht(),1);function QC(e,t){return G_.useReducer((r,n)=>t[r][n]??r,e)}var gs=e=>{let{present:t,children:r}=e,n=JC(t),i=typeof r=="function"?r({present:n.isPresent}):sn.Children.only(r),a=Fr(n.ref,e7(i));return typeof r=="function"||n.isPresent?sn.cloneElement(i,{ref:a}):null};gs.displayName="Presence";function JC(e){let[t,r]=sn.useState(),n=sn.useRef(null),i=sn.useRef(e),a=sn.useRef("none"),s=e?"mounted":"unmounted",[o,l]=QC(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return sn.useEffect(()=>{let f=rf(n.current);a.current=o==="mounted"?f:"none";},[o]),nn(()=>{let f=n.current,u=i.current;if(u!==e){let d=a.current,p=rf(f);e?l("MOUNT"):p==="none"||f?.display==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e;}},[e,l]),nn(()=>{if(t){let f,u=t.ownerDocument.defaultView??window,c=p=>{let m=rf(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",f=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g);});}},d=p=>{p.target===t&&(a.current=rf(n.current));};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{u.clearTimeout(f),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c);}}else l("ANIMATION_END");},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:sn.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f);},[])}}function rf(e){return e?.animationName||"none"}function e7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Bn=Ke(ht(),1);Ke(ht(),1);var t7=Bn[" useInsertionEffect ".trim().toString()]||nn;function nf({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[i,a,s]=r7({defaultProp:t,onChange:r}),o=e!==void 0,l=o?e:i;{let u=Bn.useRef(e!==void 0);Bn.useEffect(()=>{let c=u.current;c!==o&&console.warn(`${n} is changing from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=o;},[o,n]);}let f=Bn.useCallback(u=>{if(o){let c=n7(u)?u(e):u;c!==e&&s.current?.(c);}else a(u);},[o,e,a,s]);return [l,f]}function r7({defaultProp:e,onChange:t}){let[r,n]=Bn.useState(e),i=Bn.useRef(r),a=Bn.useRef(t);return t7(()=>{a.current=t;},[t]),Bn.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r);},[r,i]),[r,n,a]}function n7(e){return typeof e=="function"}var i7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bs=new WeakMap,of=new WeakMap,sf={},xm=0,q_=function(e){return e&&(e.host||q_(e.parentNode))},a7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=q_(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return !!r})},o7=function(e,t,r,n){var i=a7(t,Array.isArray(e)?e:[e]);sf[r]||(sf[r]=new WeakMap);var a=sf[r],s=[],o=new Set,l=new Set(i),f=function(c){!c||o.has(c)||(o.add(c),f(c.parentNode));};i.forEach(f);var u=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(d){if(o.has(d))u(d);else try{var p=d.getAttribute(n),h=p!==null&&p!=="false",m=(bs.get(d)||0)+1,g=(a.get(d)||0)+1;bs.set(d,m),a.set(d,g),s.push(d),m===1&&h&&of.set(d,!0),g===1&&d.setAttribute(r,"true"),h||d.setAttribute(n,"true");}catch(v){console.error("aria-hidden: cannot operate on ",d,v);}});};return u(t),o.clear(),xm++,function(){s.forEach(function(c){var d=bs.get(c)-1,p=a.get(c)-1;bs.set(c,d),a.set(c,p),d||(of.has(c)||c.removeAttribute(n),of.delete(c)),p||c.removeAttribute(r);}),xm--,xm||(bs=new WeakMap,bs=new WeakMap,of=new WeakMap,sf={});}},W_=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=i7(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),o7(n,i,r,"aria-hidden")):function(){return null}};var ln=function(){return ln=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a]);}return t},ln.apply(this,arguments)};function lf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function $_(e,t,r){for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var hf=Ke(ht());var Pr=Ke(ht());var io="right-scroll-bar-position",ao="width-before-scroll-bar",Sm="with-scroll-bars-hidden",Cm="--removed-body-scroll-bar-size";function uf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var X_=Ke(ht());function Y_(e,t){var r=(0, X_.useState)(function(){return {value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i));}}}})[0];return r.callback=t,r.facade}var cf=Ke(ht());var s7=typeof window<"u"?cf.useLayoutEffect:cf.useEffect,K_=new WeakMap;function Em(e,t){var r=Y_(null,function(n){return e.forEach(function(i){return uf(i,n)})});return s7(function(){var n=K_.get(r);if(n){var i=new Set(n),a=new Set(e),s=r.current;i.forEach(function(o){a.has(o)||uf(o,null);}),a.forEach(function(o){i.has(o)||uf(o,s);});}K_.set(r,e);},[e]),r}function l7(e){return e}function u7(e,t){t===void 0&&(t=l7);var r=[],n=false,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(o){return o!==s});}},assignSyncMedium:function(a){for(n=true;r.length;){var s=r;r=[],s.forEach(a);}r={push:function(o){return a(o)},filter:function(){return r}};},assignMedium:function(a){n=true;var s=[];if(r.length){var o=r;r=[],o.forEach(a),s=r;}var l=function(){var u=s;s=[],u.forEach(a);},f=function(){return Promise.resolve().then(l)};f(),r={push:function(u){s.push(u),f();},filter:function(u){return s=s.filter(u),r}};}};return i}function Rm(e){e===void 0&&(e={});var t=u7(null);return t.options=ln({async:true,ssr:false},e),t}var Z_=Ke(ht()),Q_=function(e){var t=e.sideCar,r=lf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return Z_.createElement(n,ln({},r))};Q_.isSideCarExport=true;function Am(e,t){return e.useMedium(t),Q_}var ff=Rm();var Tm=function(){},Vl=Pr.forwardRef(function(e,t){var r=Pr.useRef(null),n=Pr.useState({onScrollCapture:Tm,onWheelCapture:Tm,onTouchMoveCapture:Tm}),i=n[0],a=n[1],s=e.forwardProps,o=e.children,l=e.className,f=e.removeScrollBar,u=e.enabled,c=e.shards,d=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,C=e.gapMode,T=lf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=d,k=Em([r,t]),D=ln(ln({},T),i);return Pr.createElement(Pr.Fragment,null,u&&Pr.createElement(I,{sideCar:ff,removeScrollBar:f,shards:c,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:C}),s?Pr.cloneElement(Pr.Children.only(o),ln(ln({},D),{ref:k})):Pr.createElement(w,ln({},D,{className:l,ref:k}),o))});Vl.defaultProps={enabled:true,removeScrollBar:true,inert:false};Vl.classNames={fullWidth:ao,zeroRight:io};var Zt=Ke(ht());var ys=Ke(ht());var t3=Ke(ht());var e3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function c7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e3();return t&&e.setAttribute("nonce",t),e}function f7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t));}function d7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e);}var Mm=function(){var e=0,t=null;return {add:function(r){e==0&&(t=c7())&&(f7(t,r),d7(t)),e++;},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null);}}};var km=function(){var e=Mm();return function(t,r){t3.useEffect(function(){return e.add(t),function(){e.remove();}},[t&&r]);}};var Gl=function(){var e=km(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t};var h7={left:0,top:0,right:0,gap:0},Om=function(e){return parseInt(e||"",10)||0},p7=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return [Om(r),Om(n),Om(i)]},Dm=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return h7;var t=p7(e),r=document.documentElement.clientWidth,n=window.innerWidth;return {left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var m7=Gl(),vs="data-scroll-locked",g7=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,o=e.gap;return r===void 0&&(r="margin"),`
|
|
43
|
+
.`.concat(Sm,` {
|
|
44
|
+
overflow: hidden `).concat(n,`;
|
|
45
|
+
padding-right: `).concat(o,"px ").concat(n,`;
|
|
46
|
+
}
|
|
47
|
+
body[`).concat(vs,`] {
|
|
48
|
+
overflow: hidden `).concat(n,`;
|
|
49
|
+
overscroll-behavior: contain;
|
|
50
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
51
|
+
padding-left: `.concat(i,`px;
|
|
52
|
+
padding-top: `).concat(a,`px;
|
|
53
|
+
padding-right: `).concat(s,`px;
|
|
54
|
+
margin-left:0;
|
|
55
|
+
margin-top:0;
|
|
56
|
+
margin-right: `).concat(o,"px ").concat(n,`;
|
|
57
|
+
`),r==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.`).concat(io,` {
|
|
61
|
+
right: `).concat(o,"px ").concat(n,`;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.`).concat(ao,` {
|
|
65
|
+
margin-right: `).concat(o,"px ").concat(n,`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.`).concat(io," .").concat(io,` {
|
|
69
|
+
right: 0 `).concat(n,`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.`).concat(ao," .").concat(ao,` {
|
|
73
|
+
margin-right: 0 `).concat(n,`;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
body[`).concat(vs,`] {
|
|
77
|
+
`).concat(Cm,": ").concat(o,`px;
|
|
78
|
+
}
|
|
79
|
+
`)},r3=function(){var e=parseInt(document.body.getAttribute(vs)||"0",10);return isFinite(e)?e:0},b7=function(){ys.useEffect(function(){return document.body.setAttribute(vs,(r3()+1).toString()),function(){var e=r3()-1;e<=0?document.body.removeAttribute(vs):document.body.setAttribute(vs,e.toString());}},[]);},Nm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;b7();var a=ys.useMemo(function(){return Dm(i)},[i]);return ys.createElement(m7,{styles:g7(a,!t,i,r?"":"!important")})};var Im=false;if(typeof window<"u")try{ql=Object.defineProperty({},"passive",{get:function(){return Im=!0,!0}}),window.addEventListener("test",ql,ql),window.removeEventListener("test",ql,ql);}catch{Im=false;}var ql,oo=Im?{passive:false}:false;var v7=function(e){return e.tagName==="TEXTAREA"},n3=function(e,t){if(!(e instanceof Element))return false;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!v7(e)&&r[t]==="visible")},y7=function(e){return n3(e,"overflowY")},w7=function(e){return n3(e,"overflowX")},zm=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=i3(e,n);if(i){var a=a3(e,n),s=a[1],o=a[2];if(s>o)return true}n=n.parentNode;}while(n&&n!==r.body);return false},_7=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return [t,r,n]},x7=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return [t,r,n]},i3=function(e,t){return e==="v"?y7(t):w7(t)},a3=function(e,t){return e==="v"?_7(t):x7(t)},S7=function(e,t){return e==="h"&&t==="rtl"?-1:1},o3=function(e,t,r,n,i){var a=S7(e,window.getComputedStyle(t).direction),s=a*n,o=r.target,l=t.contains(o),f=false,u=s>0,c=0,d=0;do{if(!o)break;var p=a3(e,o),h=p[0],m=p[1],g=p[2],v=m-g-a*h;(h||v)&&i3(e,o)&&(c+=v,d+=h);var w=o.parentNode;o=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w;}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return (u&&(Math.abs(c)<1||false)||!u&&(Math.abs(d)<1||false))&&(f=true),f};var df=function(e){return "changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},s3=function(e){return [e.deltaX,e.deltaY]},l3=function(e){return e&&"current"in e?e.current:e},C7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},E7=function(e){return `
|
|
80
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
81
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
82
|
+
`)},R7=0,ws=[];function u3(e){var t=Zt.useRef([]),r=Zt.useRef([0,0]),n=Zt.useRef(),i=Zt.useState(R7++)[0],a=Zt.useState(Gl)[0],s=Zt.useRef(e);Zt.useEffect(function(){s.current=e;},[e]),Zt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=$_([e.lockRef.current],(e.shards||[]).map(l3)).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))});}}},[e.inert,e.lockRef.current,e.shards]);var o=Zt.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return !s.current.allowPinchZoom;var v=df(m),w=r.current,C="deltaX"in m?m.deltaX:w[0]-v[0],T="deltaY"in m?m.deltaY:w[1]-v[1],I,k=m.target,D=Math.abs(C)>Math.abs(T)?"h":"v";if("touches"in m&&D==="h"&&k.type==="range")return false;var j=window.getSelection(),F=j&&j.anchorNode,B=F?F===k||F.contains(k):false;if(B)return false;var E=zm(D,k);if(!E)return true;if(E?I=D:(I=D==="v"?"h":"v",E=zm(D,k)),!E)return false;if(!n.current&&"changedTouches"in m&&(C||T)&&(n.current=I),!I)return true;var M=n.current||I;return o3(M,g,m,M==="h"?C:T)},[]),l=Zt.useCallback(function(m){var g=m;if(!(!ws.length||ws[ws.length-1]!==a)){var v="deltaY"in g?s3(g):df(g),w=t.current.filter(function(I){return I.name===g.type&&(I.target===g.target||g.target===I.shadowParent)&&C7(I.delta,v)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var C=(s.current.shards||[]).map(l3).filter(Boolean).filter(function(I){return I.contains(g.target)}),T=C.length>0?o(g,C[0]):!s.current.noIsolation;T&&g.cancelable&&g.preventDefault();}}},[]),f=Zt.useCallback(function(m,g,v,w){var C={name:m,delta:g,target:v,should:w,shadowParent:A7(v)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(T){return T!==C});},1);},[]),u=Zt.useCallback(function(m){r.current=df(m),n.current=void 0;},[]),c=Zt.useCallback(function(m){f(m.type,s3(m),m.target,o(m,e.lockRef.current));},[]),d=Zt.useCallback(function(m){f(m.type,df(m),m.target,o(m,e.lockRef.current));},[]);Zt.useEffect(function(){return ws.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:d}),document.addEventListener("wheel",l,oo),document.addEventListener("touchmove",l,oo),document.addEventListener("touchstart",u,oo),function(){ws=ws.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,oo),document.removeEventListener("touchmove",l,oo),document.removeEventListener("touchstart",u,oo);}},[]);var p=e.removeScrollBar,h=e.inert;return Zt.createElement(Zt.Fragment,null,h?Zt.createElement(a,{styles:E7(i)}):null,p?Zt.createElement(Nm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function A7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var c3=Am(ff,u3);var f3=hf.forwardRef(function(e,t){return hf.createElement(Vl,ln({},e,{ref:t,sideCar:c3}))});f3.classNames=Vl.classNames;var jm=f3;var vr=Ke(rn(),1),pf="Popover",[d3]=ds(pf,[vm]),Wl=vm(),[T7,ba]=d3(pf),h3=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=false}=e,o=Wl(t),l=tr.useRef(null),[f,u]=tr.useState(false),[c,d]=nf({prop:n,defaultProp:i??false,onChange:a,caller:pf});return (0, vr.jsx)(F_,{...o,children:(0, vr.jsx)(T7,{scope:t,contentId:Aw(),triggerRef:l,open:c,onOpenChange:d,onOpenToggle:tr.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:f,onCustomAnchorAdd:tr.useCallback(()=>u(true),[]),onCustomAnchorRemove:tr.useCallback(()=>u(false),[]),modal:s,children:r})})};h3.displayName=pf;var p3="PopoverAnchor",m3=tr.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ba(p3,r),a=Wl(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return tr.useEffect(()=>(s(),()=>o()),[s,o]),(0, vr.jsx)(wm,{...a,...n,ref:t})});m3.displayName=p3;var g3="PopoverTrigger",b3=tr.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ba(g3,r),a=Wl(r),s=Fr(t,i.triggerRef),o=(0, vr.jsx)(Sr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":x3(i.open),...n,ref:s,onClick:xn(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:(0, vr.jsx)(wm,{asChild:true,...a,children:o})});b3.displayName=g3;var Lm="PopoverPortal",[M7,k7]=d3(Lm,{forceMount:void 0}),v3=e=>{let{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=ba(Lm,t);return (0, vr.jsx)(M7,{scope:t,forceMount:r,children:(0, vr.jsx)(gs,{present:r||a.open,children:(0, vr.jsx)(_m,{asChild:true,container:i,children:n})})})};v3.displayName=Lm;var _s="PopoverContent",y3=tr.forwardRef((e,t)=>{let r=k7(_s,e.__scopePopover),{forceMount:n=r.forceMount,...i}=e,a=ba(_s,e.__scopePopover);return (0, vr.jsx)(gs,{present:n||a.open,children:a.modal?(0, vr.jsx)(D7,{...i,ref:t}):(0, vr.jsx)(N7,{...i,ref:t})})});y3.displayName=_s;var O7=Uc("PopoverContent.RemoveScroll"),D7=tr.forwardRef((e,t)=>{let r=ba(_s,e.__scopePopover),n=tr.useRef(null),i=Fr(t,n),a=tr.useRef(false);return tr.useEffect(()=>{let s=n.current;if(s)return W_(s)},[]),(0, vr.jsx)(jm,{as:O7,allowPinchZoom:true,children:(0, vr.jsx)(w3,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:true,onCloseAutoFocus:xn(e.onCloseAutoFocus,s=>{s.preventDefault(),a.current||r.triggerRef.current?.focus();}),onPointerDownOutside:xn(e.onPointerDownOutside,s=>{let o=s.detail.originalEvent,l=o.button===0&&o.ctrlKey===true,f=o.button===2||l;a.current=f;},{checkForDefaultPrevented:false}),onFocusOutside:xn(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:false})})})}),N7=tr.forwardRef((e,t)=>{let r=ba(_s,e.__scopePopover),n=tr.useRef(false),i=tr.useRef(false);return (0, vr.jsx)(w3,{...e,ref:t,trapFocus:false,disableOutsidePointerEvents:false,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=false,i.current=false;},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=true,a.detail.originalEvent.type==="pointerdown"&&(i.current=true));let s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault();}})}),w3=tr.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:u,...c}=e,d=ba(_s,r),p=Wl(r);return yw(),(0, vr.jsx)(om,{asChild:true,loop:true,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0, vr.jsx)(rm,{asChild:true,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:f,onDismiss:()=>d.onOpenChange(false),children:(0, vr.jsx)(P_,{"data-state":x3(d.open),role:"dialog",id:d.contentId,...p,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),_3="PopoverClose",I7=tr.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=ba(_3,r);return (0, vr.jsx)(Sr.button,{type:"button",...n,ref:t,onClick:xn(e.onClick,()=>i.onOpenChange(false))})});I7.displayName=_3;var z7="PopoverArrow",j7=tr.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,i=Wl(r);return (0, vr.jsx)(U_,{...i,...n,ref:t})});j7.displayName=z7;function x3(e){return e?"open":"closed"}var mf=h3,S3=m3,Bm=b3,gf=v3,bf=y3;var Wr=Ke(ht(),1);var vf=Ke(ht(),1);function C3(e){let t=vf.useRef({value:e,previous:e});return vf.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sn=Ke(rn(),1),yf="Checkbox",[B7]=ds(yf),[F7,Fm]=B7(yf);function P7(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:o,onCheckedChange:l,required:f,value:u="on",internal_do_not_use_render:c}=e,[d,p]=nf({prop:r,defaultProp:i??false,onChange:l,caller:yf}),[h,m]=Wr.useState(null),[g,v]=Wr.useState(null),w=Wr.useRef(false),C=h?!!s||!!h.closest("form"):true,T={checked:d,disabled:a,setChecked:p,control:h,setControl:m,name:o,form:s,value:u,hasConsumerStoppedPropagationRef:w,required:f,defaultChecked:va(i)?false:i,isFormControl:C,bubbleInput:g,setBubbleInput:v};return (0, Sn.jsx)(F7,{scope:t,...T,children:U7(c)?c(T):n})}var E3="CheckboxTrigger",R3=Wr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{let{control:a,value:s,disabled:o,checked:l,required:f,setControl:u,setChecked:c,hasConsumerStoppedPropagationRef:d,isFormControl:p,bubbleInput:h}=Fm(E3,e),m=Fr(i,u),g=Wr.useRef(l);return Wr.useEffect(()=>{let v=a?.form;if(v){let w=()=>c(g.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[a,c]),(0, Sn.jsx)(Sr.button,{type:"button",role:"checkbox","aria-checked":va(l)?"mixed":l,"aria-required":f,"data-state":k3(l),"data-disabled":o?"":void 0,disabled:o,value:s,...n,ref:m,onKeyDown:xn(t,v=>{v.key==="Enter"&&v.preventDefault();}),onClick:xn(r,v=>{c(w=>va(w)?true:!w),h&&p&&(d.current=v.isPropagationStopped(),d.current||v.stopPropagation());})})});R3.displayName=E3;var ya=Wr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:o,value:l,onCheckedChange:f,form:u,...c}=e;return (0, Sn.jsx)(P7,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:o,required:s,onCheckedChange:f,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:d})=>(0, Sn.jsxs)(Sn.Fragment,{children:[(0, Sn.jsx)(R3,{...c,ref:t,__scopeCheckbox:r}),d&&(0, Sn.jsx)(M3,{__scopeCheckbox:r})]})})});ya.displayName=yf;var A3="CheckboxIndicator",wa=Wr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...i}=e,a=Fm(A3,r);return (0, Sn.jsx)(gs,{present:n||va(a.checked)||a.checked===true,children:(0, Sn.jsx)(Sr.span,{"data-state":k3(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});wa.displayName=A3;var T3="CheckboxBubbleInput",M3=Wr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:o,disabled:l,name:f,value:u,form:c,bubbleInput:d,setBubbleInput:p}=Fm(T3,e),h=Fr(r,p),m=C3(a),g=ef(n);Wr.useEffect(()=>{let w=d;if(!w)return;let C=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(C,"checked").set,k=!i.current;if(m!==a&&I){let D=new Event("click",{bubbles:k});w.indeterminate=va(a),I.call(w,va(a)?false:a),w.dispatchEvent(D);}},[d,m,a,i]);let v=Wr.useRef(va(a)?false:a);return (0, Sn.jsx)(Sr.input,{type:"checkbox","aria-hidden":true,defaultChecked:s??v.current,required:o,disabled:l,name:f,value:u,form:c,...t,tabIndex:-1,ref:h,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});M3.displayName=T3;function U7(e){return typeof e=="function"}function va(e){return e==="indeterminate"}function k3(e){return va(e)?"indeterminate":e?"checked":"unchecked"}var ce=Ke(rn()),it={columnHeader:"ogrid-radix__ColumnHeaderFilter-module__columnHeader",headerContent:"ogrid-radix__ColumnHeaderFilter-module__headerContent",columnName:"ogrid-radix__ColumnHeaderFilter-module__columnName",headerActions:"ogrid-radix__ColumnHeaderFilter-module__headerActions",filterIcon:"ogrid-radix__ColumnHeaderFilter-module__filterIcon",filterActive:"ogrid-radix__ColumnHeaderFilter-module__filterActive",filterOpen:"ogrid-radix__ColumnHeaderFilter-module__filterOpen",filterBadge:"ogrid-radix__ColumnHeaderFilter-module__filterBadge",popoverContent:"ogrid-radix__ColumnHeaderFilter-module__popoverContent",popoverHeader:"ogrid-radix__ColumnHeaderFilter-module__popoverHeader",popoverSearch:"ogrid-radix__ColumnHeaderFilter-module__popoverSearch",searchInput:"ogrid-radix__ColumnHeaderFilter-module__searchInput",nativeInputWrapper:"ogrid-radix__ColumnHeaderFilter-module__nativeInputWrapper",nativeInput:"ogrid-radix__ColumnHeaderFilter-module__nativeInput",resultCount:"ogrid-radix__ColumnHeaderFilter-module__resultCount",selectAllRow:"ogrid-radix__ColumnHeaderFilter-module__selectAllRow",selectAllButton:"ogrid-radix__ColumnHeaderFilter-module__selectAllButton",popoverOptions:"ogrid-radix__ColumnHeaderFilter-module__popoverOptions",popoverOption:"ogrid-radix__ColumnHeaderFilter-module__popoverOption",filterCheckbox:"ogrid-radix__ColumnHeaderFilter-module__filterCheckbox",personOption:"ogrid-radix__ColumnHeaderFilter-module__personOption",loadingContainer:"ogrid-radix__ColumnHeaderFilter-module__loadingContainer",noResults:"ogrid-radix__ColumnHeaderFilter-module__noResults",selectedUserSection:"ogrid-radix__ColumnHeaderFilter-module__selectedUserSection",selectedUserLabel:"ogrid-radix__ColumnHeaderFilter-module__selectedUserLabel",selectedUser:"ogrid-radix__ColumnHeaderFilter-module__selectedUser",userInfo:"ogrid-radix__ColumnHeaderFilter-module__userInfo",userText:"ogrid-radix__ColumnHeaderFilter-module__userText",userSecondary:"ogrid-radix__ColumnHeaderFilter-module__userSecondary",removeUserButton:"ogrid-radix__ColumnHeaderFilter-module__removeUserButton",popoverActions:"ogrid-radix__ColumnHeaderFilter-module__popoverActions",clearButton:"ogrid-radix__ColumnHeaderFilter-module__clearButton",applyButton:"ogrid-radix__ColumnHeaderFilter-module__applyButton"},I3=({value:e,onValueChange:t,onApply:r,onClear:n})=>(0, ce.jsxs)(ce.Fragment,{children:[(0, ce.jsx)("div",{className:it.popoverSearch,children:(0, ce.jsx)("input",{type:"text",className:it.searchInput,placeholder:"Enter search term...",value:e,onChange:i=>t(i.target.value),onKeyDown:i=>i.key==="Enter"&&(i.preventDefault(),r()),autoComplete:"off"})}),(0, ce.jsxs)("div",{className:it.popoverActions,children:[(0, ce.jsx)("button",{type:"button",className:it.clearButton,onClick:n,disabled:!e,children:"Clear"}),(0, ce.jsx)("button",{type:"button",className:it.applyButton,onClick:r,children:"Apply"})]})]});I3.displayName="TextFilterPopover";var O3=34,z3=({searchText:e,onSearchChange:t,options:r,filteredOptions:n,selected:i,onOptionToggle:a,onSelectAll:s,onClearSelection:o,onApply:l,isLoading:f})=>{let u=M2({count:n.length,itemHeight:O3});return (0, ce.jsxs)(ce.Fragment,{children:[(0, ce.jsxs)("div",{className:it.popoverSearch,children:[(0, ce.jsx)("input",{type:"text",className:it.searchInput,placeholder:"Search...",value:e,onChange:c=>t(c.target.value),autoComplete:"off"}),(0, ce.jsxs)("div",{className:it.resultCount,children:[n.length," of ",r.length," options"]})]}),(0, ce.jsxs)("div",{className:it.selectAllRow,children:[(0, ce.jsxs)("button",{type:"button",className:it.selectAllButton,onClick:s,children:["Select All (",n.length,")"]}),(0, ce.jsx)("button",{type:"button",className:it.selectAllButton,onClick:o,children:"Clear"})]}),(0, ce.jsx)("div",{ref:u.containerRef,onScroll:u.onScroll,className:it.popoverOptions,children:f?(0, ce.jsx)("div",{className:it.loadingContainer,children:"Loading..."}):n.length===0?(0, ce.jsx)("div",{className:it.noResults,children:"No options found"}):(0, ce.jsx)("div",{style:{height:u.totalHeight,position:"relative"},children:u.visibleItems.map(({index:c,offsetTop:d})=>{let p=n[c];return (0, ce.jsxs)("div",{className:it.popoverOption,style:{position:"absolute",top:d,width:"100%",height:O3,boxSizing:"border-box",display:"flex",alignItems:"center"},children:[(0, ce.jsx)(ya,{checked:i.has(p),onCheckedChange:h=>a(p,h===true),className:it.filterCheckbox,children:(0, ce.jsx)(wa,{children:"\u2713"})}),(0, ce.jsx)("label",{style:{marginLeft:8,cursor:"pointer"},children:p})]},p)})})}),(0, ce.jsxs)("div",{className:it.popoverActions,children:[(0, ce.jsx)("button",{type:"button",className:it.clearButton,onClick:o,children:"Clear"}),(0, ce.jsx)("button",{type:"button",className:it.applyButton,onClick:l,children:"Apply"})]})]})};z3.displayName="MultiSelectFilterPopover";function D3({user:e,size:t=32}){return e.photo?(0, ce.jsx)("img",{src:e.photo,alt:"",width:t,height:t,style:{borderRadius:"50%"}}):(0, ce.jsx)("span",{style:{width:t,height:t,borderRadius:"50%",background:"var(--ogrid-border, #e0e0e0)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12},children:e.displayName?.charAt(0)??"?"})}var j3=({selectedUser:e,searchText:t,onSearchChange:r,suggestions:n,isLoading:i,onUserSelect:a,onClearUser:s,inputRef:o})=>(0, ce.jsxs)(ce.Fragment,{children:[e&&(0, ce.jsxs)("div",{className:it.selectedUserSection,children:[(0, ce.jsx)("div",{className:it.selectedUserLabel,children:"Currently filtered by:"}),(0, ce.jsxs)("div",{className:it.selectedUser,children:[(0, ce.jsxs)("div",{className:it.userInfo,children:[(0, ce.jsx)(D3,{user:e}),(0, ce.jsxs)("div",{className:it.userText,children:[(0, ce.jsx)("div",{children:e.displayName}),(0, ce.jsx)("div",{className:it.userSecondary,children:e.email})]})]}),(0, ce.jsx)("button",{type:"button",className:it.removeUserButton,onClick:s,"aria-label":"Remove filter",children:"\u2715"})]})]}),(0, ce.jsx)("div",{className:it.popoverSearch,children:(0, ce.jsx)("div",{className:it.nativeInputWrapper,children:(0, ce.jsx)("input",{ref:o,type:"text",className:it.nativeInput,placeholder:"Search for a person...",value:t,onChange:l=>r(l.target.value),autoComplete:"off"})})}),(0, ce.jsx)("div",{className:it.popoverOptions,children:i&&t.trim()?(0, ce.jsx)("div",{className:it.loadingContainer,children:"Searching..."}):n.length===0&&t.trim()?(0, ce.jsx)("div",{className:it.noResults,children:"No results found"}):t.trim()?n.map(l=>(0, ce.jsx)("div",{className:it.personOption,onClick:()=>a(l),onKeyDown:f=>f.key==="Enter"&&a(l),role:"button",tabIndex:0,children:(0, ce.jsxs)("div",{className:it.userInfo,children:[(0, ce.jsx)(D3,{user:l}),(0, ce.jsxs)("div",{className:it.userText,children:[(0, ce.jsx)("div",{children:l.displayName}),(0, ce.jsx)("div",{className:it.userSecondary,children:l.email})]})]})},l.id??l.email??l.displayName??"")):(0, ce.jsx)("div",{className:it.noResults,children:"Type to search..."})}),e&&(0, ce.jsx)("div",{className:it.popoverActions,children:(0, ce.jsx)("button",{type:"button",className:it.clearButton,onClick:s,children:"Clear Filter"})})]});j3.displayName="PeopleFilterPopover";function V7(){return (0, ce.jsx)("span",{"aria-hidden":true,children:"\u25BE"})}var G7=nw({MultiSelectFilterPopover:z3,TextFilterPopover:I3,PeopleFilterPopover:j3},{popoverActions:it.popoverActions,clearButton:it.clearButton,applyButton:it.applyButton}),L3=_a.memo(e=>{let{columnName:t,filterType:r,options:n=[],isLoadingOptions:i=false,selectedUser:a}=e,s=R2(tw(e)),{headerRef:o,popoverRef:l,isFilterOpen:f,setFilterOpen:u,hasActiveFilter:c,handlers:d}=s;return (0, ce.jsxs)("div",{className:it.columnHeader,ref:o,children:[(0, ce.jsx)("div",{className:it.headerContent,children:(0, ce.jsx)("span",{className:it.columnName,title:t,"data-header-label":true,children:t})}),(0, ce.jsx)("div",{className:it.headerActions,children:r!=="none"&&(0, ce.jsxs)(mf,{open:f,onOpenChange:u,children:[(0, ce.jsx)(Bm,{asChild:true,children:(0, ce.jsxs)("button",{type:"button",className:`${it.filterIcon} ${c?it.filterActive:""} ${f?it.filterOpen:""}`,onClick:d.handleFilterIconClick,"aria-label":`Filter ${t}`,title:`Filter ${t}`,children:[(0, ce.jsx)(V7,{}),c&&(0, ce.jsx)("span",{className:it.filterBadge})]})}),(0, ce.jsx)(gf,{children:(0, ce.jsxs)(bf,{ref:l,className:it.popoverContent,sideOffset:4,align:"start",onOpenAutoFocus:p=>p.preventDefault(),children:[(0, ce.jsxs)("div",{className:it.popoverHeader,children:["Filter: ",t]}),rw(r,s,n??[],i,a,G7)]})})]})})]})});L3.displayName="ColumnHeaderFilter";var q7={content:"ogrid-radix__ColumnHeaderMenu-module__content",item:"ogrid-radix__ColumnHeaderMenu-module__item",separator:"ogrid-radix__ColumnHeaderMenu-module__separator"};function W7(e){return (0, ce.jsx)($2,{...e,classNames:q7})}var Xe={tableScrollContent:"ogrid-radix__DataGridTable-module__tableScrollContent",tableWidthAnchor:"ogrid-radix__DataGridTable-module__tableWidthAnchor",tableWrapper:"ogrid-radix__DataGridTable-module__tableWrapper",dataTable:"ogrid-radix__DataGridTable-module__dataTable",groupHeaderCell:"ogrid-radix__DataGridTable-module__groupHeaderCell",headerCellContent:"ogrid-radix__DataGridTable-module__headerCellContent",headerMenuTrigger:"ogrid-radix__DataGridTable-module__headerMenuTrigger",dropIndicator:"ogrid-radix__DataGridTable-module__dropIndicator",resizeHandle:"ogrid-radix__DataGridTable-module__resizeHandle",pinnedColLeft:"ogrid-radix__DataGridTable-module__pinnedColLeft",pinnedColRight:"ogrid-radix__DataGridTable-module__pinnedColRight",cellContent:"ogrid-radix__DataGridTable-module__cellContent",activeCellContent:"ogrid-radix__DataGridTable-module__activeCellContent",editingCellContent:"ogrid-radix__DataGridTable-module__editingCellContent",cellInRange:"ogrid-radix__DataGridTable-module__cellInRange",inRange:"ogrid-radix__DataGridTable-module__inRange",cellCut:"ogrid-radix__DataGridTable-module__cellCut",fillHandle:"ogrid-radix__DataGridTable-module__fillHandle",selectionHeaderCellInner:"ogrid-radix__DataGridTable-module__selectionHeaderCellInner",selectionCellInner:"ogrid-radix__DataGridTable-module__selectionCellInner",rowNumberHeaderCellInner:"ogrid-radix__DataGridTable-module__rowNumberHeaderCellInner",rowNumberCellInner:"ogrid-radix__DataGridTable-module__rowNumberCellInner",columnLetterRow:"ogrid-radix__DataGridTable-module__columnLetterRow",columnLetterCell:"ogrid-radix__DataGridTable-module__columnLetterCell",statusBar:"ogrid-radix__DataGridTable-module__statusBar",statusBarItem:"ogrid-radix__DataGridTable-module__statusBarItem",statusBarLabel:"ogrid-radix__DataGridTable-module__statusBarLabel",statusBarValue:"ogrid-radix__DataGridTable-module__statusBarValue",contextMenu:"ogrid-radix__DataGridTable-module__contextMenu",contextMenuItem:"ogrid-radix__DataGridTable-module__contextMenuItem",contextMenuItemLabel:"ogrid-radix__DataGridTable-module__contextMenuItemLabel",contextMenuItemShortcut:"ogrid-radix__DataGridTable-module__contextMenuItemShortcut",contextMenuDivider:"ogrid-radix__DataGridTable-module__contextMenuDivider",loadingOverlay:"ogrid-radix__DataGridTable-module__loadingOverlay",loadingOverlayContent:"ogrid-radix__DataGridTable-module__loadingOverlayContent",loadingOverlayText:"ogrid-radix__DataGridTable-module__loadingOverlayText",loadingDimmed:"ogrid-radix__DataGridTable-module__loadingDimmed",emptyStateInGrid:"ogrid-radix__DataGridTable-module__emptyStateInGrid",emptyStateInGridTitle:"ogrid-radix__DataGridTable-module__emptyStateInGridTitle",emptyStateInGridMessage:"ogrid-radix__DataGridTable-module__emptyStateInGridMessage",emptyStateInGridLink:"ogrid-radix__DataGridTable-module__emptyStateInGridLink",spinner:"ogrid-radix__DataGridTable-module__spinner","ogrid-spin":"ogrid-radix__DataGridTable-module__ogrid-spin",paginationNav:"ogrid-radix__DataGridTable-module__paginationNav",paginationInfo:"ogrid-radix__DataGridTable-module__paginationInfo",paginationSize:"ogrid-radix__DataGridTable-module__paginationSize",stickyHeader:"ogrid-radix__DataGridTable-module__stickyHeader",selectionHeaderCell:"ogrid-radix__DataGridTable-module__selectionHeaderCell",selectionCell:"ogrid-radix__DataGridTable-module__selectionCell",rowNumberCell:"ogrid-radix__DataGridTable-module__rowNumberCell",selectedRow:"ogrid-radix__DataGridTable-module__selectedRow",rowNumberHeaderCell:"ogrid-radix__DataGridTable-module__rowNumberHeaderCell",rowCheckbox:"ogrid-radix__DataGridTable-module__rowCheckbox",rowCheckboxIndicator:"ogrid-radix__DataGridTable-module__rowCheckboxIndicator","density-compact":"ogrid-radix__DataGridTable-module__density-compact","density-comfortable":"ogrid-radix__DataGridTable-module__density-comfortable"};function $7(e){return (0, ce.jsx)(V2,{...e,renderCheckbox:(t,r,n)=>(0, ce.jsx)(ya,{className:Xe.rowCheckbox,checked:t,onCheckedChange:i=>r(i===true),onKeyDown:i=>i.key==="Escape"&&(i.preventDefault(),n()),children:(0, ce.jsx)(wa,{className:Xe.rowCheckboxIndicator,children:"\u2713"})})})}var X7={statusBar:Xe.statusBar,statusBarItem:Xe.statusBarItem,statusBarLabel:Xe.statusBarLabel,statusBarValue:Xe.statusBarValue};function Y7(e){return (0, ce.jsx)(H2,{...e,classNames:X7})}var K7={contextMenu:Xe.contextMenu,contextMenuItem:Xe.contextMenuItem,contextMenuItemLabel:Xe.contextMenuItemLabel,contextMenuItemShortcut:Xe.contextMenuItemShortcut,contextMenuDivider:Xe.contextMenuDivider};function Z7(e){return (0, ce.jsx)(G2,{...e,classNames:K7})}var Q7={emptyStateInGrid:Xe.emptyStateInGrid,emptyStateInGridTitle:Xe.emptyStateInGridTitle,emptyStateInGridMessage:Xe.emptyStateInGridMessage,emptyStateInGridLink:Xe.emptyStateInGridLink};function J7({emptyState:e}){return (0, ce.jsx)(Z2,{emptyState:e,classNames:Q7})}var e9={loadingOverlay:Xe.loadingOverlay,loadingOverlayContent:Xe.loadingOverlayContent,spinner:Xe.spinner,loadingOverlayText:Xe.loadingOverlayText};function t9({message:e}){return (0, ce.jsx)(Q2,{message:e,classNames:e9})}function r9({dropIndicatorX:e,wrapperLeft:t}){return (0, ce.jsx)(J2,{dropIndicatorX:e,wrapperLeft:t,className:Xe.dropIndicator})}function n9(e){let{item:t,rowIndex:r,rowId:n,isSelected:i,visibleCols:a,columnMeta:s,renderCellContent:o,handleSingleRowClick:l,handleRowCheckboxChange:f,lastMouseShiftRef:u,hasCheckboxCol:c,hasRowNumbersCol:d,rowNumberOffset:p,leftSpacerWidth:h,rightSpacerWidth:m,globalColIndexMap:g,rowNumWidth:v,selectionRange:w,activeCell:C,cutRange:T}=e;return (0, ce.jsxs)("tr",{className:i?Xe.selectedRow:"","data-row-id":n,onClick:l,"aria-selected":i||void 0,children:[c&&(0, ce.jsx)("td",{className:Xe.selectionCell,children:(0, ce.jsx)("div",{className:Xe.selectionCellInner,"data-row-index":r,"data-col-index":0,onClick:j2,children:(0, ce.jsx)(ya,{className:Xe.rowCheckbox,checked:i,onCheckedChange:I=>f(n,!!I,r,u.current),"aria-label":`Select row ${r+1}`,children:(0, ce.jsx)(wa,{className:Xe.rowCheckboxIndicator,children:"\u2713"})})})}),d&&(0, ce.jsx)("td",{className:Xe.rowNumberCell,style:v?{width:v,minWidth:v,maxWidth:v}:void 0,onPointerDown:Fc,children:(0, ce.jsx)("div",{className:Xe.rowNumberCellInner,children:p+r+1})}),h!=null&&h>0&&(0, ce.jsx)("td",{style:{padding:0,border:"none",width:h,minWidth:h},"aria-hidden":true}),a.map((I,k)=>{let D=g?g[k]:k,j=S2({rowIndex:r,columnIndex:D,selectionRange:w,activeCell:C,cutRange:T}),F=s.cellStyles[I.columnId],B=j.isCutCell?"var(--ogrid-hover-bg, rgba(0, 0, 0, 0.04))":j.isActiveRangeCell?"var(--ogrid-bg, #fff)":j.isRangeCell?"var(--ogrid-range-bg, rgba(33, 115, 70, 0.12))":void 0;return (0, ce.jsx)("td",{"data-column-id":I.columnId,className:s.cellClasses[I.columnId]||void 0,style:B?{...F,background:B}:F,onPointerDown:Fc,children:o(t,I,r,D)},I.columnId)}),m!=null&&m>0&&(0, ce.jsx)("td",{style:{padding:0,border:"none",width:m,minWidth:m},"aria-hidden":true})]})}var i9=_a.memo(n9,yp);function a9(e){let{virtualScrollEnabled:t,visibleRange:r,columnRange:n,items:i,windowed:a,rowHeight:s,getRowId:o,selectedRowIds:l,visibleCols:f,columnMeta:u,renderCellContent:c,handleSingleRowClick:d,handleRowCheckboxChange:p,lastMouseShiftRef:h,hasCheckboxCol:m,hasRowNumbersCol:g,rowNumberOffset:v,selectionRange:w,activeCell:C,cutRange:T,copyRange:I,isDragging:k,editingCell:D,pinnedColumns:j,rowNumWidth:F}=e,B=_a.useMemo(()=>n?_p(f,n,j):null,[f,n,j]),{rowCols:E,globalColIndexMap:M,leftSpacerWidth:L,rightSpacerWidth:b}=_a.useMemo(()=>{if(!B)return {rowCols:f,globalColIndexMap:void 0,leftSpacerWidth:void 0,rightSpacerWidth:void 0};let S=[...B.pinnedLeft,...B.virtualizedUnpinned,...B.pinnedRight],R=S.map(z=>f.indexOf(z));return {rowCols:S,globalColIndexMap:R,leftSpacerWidth:B.leftSpacerWidth,rightSpacerWidth:B.rightSpacerWidth}},[B,f]),y=(S,R)=>{let z=o(S);return (0, ce.jsx)(i9,{item:S,rowIndex:R,rowId:z,isSelected:l.has(z),visibleCols:E,columnMeta:u,renderCellContent:c,handleSingleRowClick:d,handleRowCheckboxChange:p,lastMouseShiftRef:h,hasCheckboxCol:m,hasRowNumbersCol:g,rowNumberOffset:v,selectionRange:w,activeCell:C,cutRange:T,copyRange:I,isDragging:k,editingRowId:D?.rowId??null,leftSpacerWidth:L,rightSpacerWidth:b,globalColIndexMap:M,rowNumWidth:F},z)},x=(m?1:0)+(g?1:0)+E.length+(L?1:0)+(b?1:0),_=()=>{let S=[];if(!a)return S;for(let R=r.startIndex;R<=r.endIndex;R++){let z=a.getRow(R);z.status==="loaded"?S.push(y(z.row,R)):S.push((0, ce.jsx)(K2,{status:z.status,rowIndex:R,colSpan:x,rowHeight:s,onRetry:z.status==="error"?()=>a.retryRow(R):void 0},`w-${R}`));}return S};return (0, ce.jsxs)("tbody",{children:[t&&r.offsetTop>0&&(0, ce.jsx)("tr",{style:{height:r.offsetTop},"aria-hidden":true}),a?_():t?i.slice(r.startIndex,r.endIndex+1).map((S,R)=>y(S,r.startIndex+R)):i.map((S,R)=>y(S,R)),t&&r.offsetBottom>0&&(0, ce.jsx)("tr",{style:{height:r.offsetBottom},"aria-hidden":true})]})}function o9(e){let t=k2({props:e}),{wrapperRef:r,tableContainerRef:n,lastMouseShiftRef:i,interaction:a,pinning:s,handleResizeStart:o,handleResizeDoubleClick:l,getColumnWidth:f,isReorderDragging:u,dropIndicatorX:c,handleHeaderMouseDown:d,virtualScrollEnabled:p,virtualRowHeight:h,visibleRange:m,columnRange:g,onHorizontalScroll:v,items:w,windowed:C,getRowId:T,emptyState:I,rowSelection:k,isLoading:D,loadingMessage:j,ariaLabel:F,ariaLabelledBy:B,visibleColumns:E,columnOrder:M,columnReorder:L,density:b,rowHeight:y,rowNumberOffset:x,headerRows:_,allowOverflowX:S,fitToContent:R,showColumnLetters:z,editCallbacks:U,interactionHandlers:H,delegatedCellHandlers:q,cellDescriptorInputRef:N,cellDescriptorCacheRef:V,pendingEditorValueRef:O,popoverAnchorElRef:A,handleSingleRowClick:P,handlePasteVoid:W,visibleCols:Z,totalColCount:$,hasCheckboxCol:K,hasRowNumbersCol:te,colOffset:J,containerWidth:Y,minTableWidth:ne,columnSizingOverrides:re,measuredColumnWidths:ie,selectedRowIds:oe,handleRowCheckboxChange:se,handleSelectAll:le,allSelected:ge,someSelected:he,editingCell:be,setPopoverAnchorEl:Me,cancelPopoverEdit:ye,setActiveCell:Se,selectionRange:We,hasCellSelection:Ne,handleGridKeyDown:Ee,handleFillHandleMouseDown:Le,handleCopy:Ce,handleCut:xe,cutRange:Qe,copyRange:Be,canUndo:He,canRedo:At,onUndo:Ve,onRedo:Ze,isDragging:Nt,menuPosition:et,closeContextMenu:rt,headerFilterInput:fr,statusBarConfig:Ge,showEmptyInGrid:qe,onCellError:Gt,headerMenu:Ye}=t,De=(0, Pm.useCallback)(ee=>le(!!ee),[le]),Mt=O2({visibleCols:Z,getColumnWidth:f,columnSizingOverrides:re,measuredColumnWidths:ie,pinnedColumns:s.pinnedColumns,leftOffsets:s.leftOffsets,rightOffsets:s.rightOffsets,pinnedColLeftClass:Xe.pinnedColLeft,pinnedColRightClass:Xe.pinnedColRight}),tt=(0, Pm.useCallback)((ee,ue,de,_e)=>{let Ie=Ep(ee,ue,de,_e,N.current,V.current),Te=T(ee),Oe;if(Ie.mode==="editing-inline"){let ot=w2(ee,ue,Ie,U);Oe=(0, ce.jsx)("div",{className:Xe.editingCellContent,children:(0, ce.jsx)($7,{...ot})});}else if(Ie.mode==="editing-popover"&&typeof ue.cellEditor=="function"){let ot=_2(ee,ue,Ie,O.current,U),ze=ue.cellEditor,Re=Xp(ue,ee,Ie.displayValue),je=Yp(ue,ee,Ie.displayValue);Oe=(0, ce.jsxs)(mf,{open:!!A.current,onOpenChange:Fe=>{Fe||ye();},children:[(0, ce.jsx)(S3,{asChild:true,children:(0, ce.jsx)("div",{ref:Fe=>{Fe&&Me(Fe);},className:"ogrid-popover-anchor",style:z2,children:je?(0, ce.jsx)("span",{style:je,children:Re}):Re})}),(0, ce.jsx)(gf,{children:(0, ce.jsx)(bf,{sideOffset:4,onOpenAutoFocus:Fe=>Fe.preventDefault(),children:(0, ce.jsx)(ze,{...ot})})})]});}else {let ot;if(Ie.columnType==="boolean"){let je=!!Ie.displayValue;ot=(0, ce.jsx)(ya,{className:Xe.rowCheckbox,checked:je,disabled:!Ie.canEditAny,onCheckedChange:Ie.canEditAny?()=>{let Fe=Ie.rowIndex,st=Ie.globalColIndex;U.commitCellEdit(ee,ue.columnId,je,!je,Fe,st,{skipAdvance:true});}:void 0,onPointerDown:Fe=>jp(Fe,Ie.rowIndex,Ie.globalColIndex,J,{setActiveCell:Se,setSelectionRange:st=>a.setSelectionRange(st)}),onClick:Fe=>Fe.stopPropagation(),"aria-label":je?"Checked":"Unchecked",children:(0, ce.jsx)(wa,{className:Xe.rowCheckboxIndicator,children:"\u2713"})});}else {let je=Xp(ue,ee,Ie.displayValue),Fe=Yp(ue,ee,Ie.displayValue);ot=Fe?(0, ce.jsx)("span",{style:Fe,children:je}):je;}let ze=`${Xe.cellContent}${Ie.isActive?` ${Xe.activeCellContent}`:""}${Ie.isActive&&Ie.isInRange?` ${Xe.inRange}`:""}${Ie.isInRange&&!Ie.isActive?` ${Xe.cellInRange}`:""}${Ie.isInCutRange?` ${Xe.cellCut}`:""}${Ie.isInCopyRange?` ${Xe.cellCopied}`:""}`,Re=x2(Ie,ue.columnId,H,q);Oe=(0, ce.jsxs)("div",{className:ze,...Re,style:Ie.canEditAny?I2:void 0,children:[ot,Ie.canEditAny&&Ie.isSelectionEndCell&&(0, ce.jsx)("div",{className:Xe.fillHandle,onPointerDown:Le,"aria-label":"Fill handle"})]});}return (0, ce.jsx)(Y2,{onError:Gt,children:Oe},`${Te}-${ue.columnId}`)},[U,H,q,Le,Me,ye,T,Gt,N,V,O,A,J,a,Se]);return (0, ce.jsxs)("div",{style:p?N2:D2,children:[(0, ce.jsxs)("div",{ref:r,tabIndex:0,onMouseDown:ee=>{i.current=ee.shiftKey;},onScroll:v?ee=>v(ee.target.scrollLeft):void 0,className:`${Xe.tableWrapper} ${k!=="none"?Xe.selectableGrid:""} ${Xe[`density-${b}`]||""}`,role:"region","aria-label":F??(B?void 0:"Data grid"),"aria-labelledby":B,"data-ogrid-scroll-container":"","data-virtual-scroll":p?"":void 0,"data-empty":qe?"true":void 0,"data-loading":D&&w.length===0?"true":void 0,"data-column-count":$,"data-overflow-x":S?"true":"false","data-container-width":Y,"data-min-table-width":Math.round(ne),"data-has-selection":k!=="none"?"true":void 0,onContextMenu:Fc,onKeyDown:Ee,style:{"--data-table-column-count":$,"--data-table-width":qe?"100%":S||R?"fit-content":"100%","--data-table-min-width":qe?"100%":S||R?"max-content":"100%","--data-table-total-min-width":`${ne}px`,...y?{"--ogrid-row-height":`${y}px`}:{}},children:[(0, ce.jsx)("div",{className:Xe.tableScrollContent,children:(0, ce.jsx)("div",{className:D&&w.length>0?Xe.loadingDimmed:void 0,children:(0, ce.jsxs)("div",{className:Xe.tableWidthAnchor,ref:n,children:[(0, ce.jsxs)("table",{className:Xe.dataTable,role:"grid","data-virtual-scroll":p?"":void 0,children:[(0, ce.jsxs)("thead",{className:t.stickyHeader?Xe.stickyHeader:void 0,children:[z&&(0, ce.jsxs)("tr",{className:Xe.columnLetterRow,children:[K&&(0, ce.jsx)("th",{className:Xe.columnLetterCell}),te&&(0, ce.jsx)("th",{className:Xe.columnLetterCell}),Z.map((ee,ue)=>(0, ce.jsx)("th",{className:`${Xe.columnLetterCell}${Mt.hdrClasses[ee.columnId]?` ${Mt.hdrClasses[ee.columnId]}`:""}`,style:Mt.hdrStyles[ee.columnId],children:zl(ue)},ee.columnId))]}),_.map((ee,ue)=>(0, ce.jsxs)("tr",{children:[ue===_.length-1&&K&&(0, ce.jsx)("th",{className:Xe.selectionHeaderCell,scope:"col",rowSpan:1,children:(0, ce.jsx)("div",{className:Xe.selectionHeaderCellInner,children:(0, ce.jsx)(ya,{className:Xe.rowCheckbox,checked:ge?true:he?"indeterminate":false,onCheckedChange:De,"aria-label":"Select all rows",children:(0, ce.jsx)(wa,{className:Xe.rowCheckboxIndicator,children:he&&!ge?"\u2013":"\u2713"})})})}),ue===0&&ue<_.length-1&&K&&(0, ce.jsx)("th",{rowSpan:_.length-1}),ue===_.length-1&&te&&(()=>{let de=re?.[$a]?.widthPx??Ac;return (0, ce.jsxs)("th",{className:Xe.rowNumberHeaderCell,scope:"col",rowSpan:1,style:{width:de,minWidth:de,maxWidth:de},children:[(0, ce.jsx)("div",{className:Xe.rowNumberHeaderCellInner,children:"#"}),(0, ce.jsx)("div",{className:Xe.resizeHandle,role:"separator","aria-orientation":"vertical","aria-label":"Resize row number column",onPointerDown:_e=>{Se(null),a.setSelectionRange(null),r.current?.focus({preventScroll:true}),o(_e,{columnId:$a,name:"#"});}})]})})(),ue===0&&ue<_.length-1&&te&&(0, ce.jsx)("th",{rowSpan:_.length-1}),ee.map((de,_e)=>{if(de.isGroup)return (0, ce.jsx)("th",{colSpan:de.colSpan,className:Xe.groupHeaderCell,scope:"colgroup",children:de.label},_e);if(!de.columnDef)return null;let Ie=de.columnDef,Te=_.length>1&&ue<_.length-1?_.length-ue:void 0,Oe=e.sortBy===Ie.columnId?e.sortDirection==="asc"?"ascending":"descending":void 0;return (0, ce.jsxs)("th",{scope:"col","data-column-id":Ie.columnId,rowSpan:Te,className:Mt.hdrClasses[Ie.columnId]||void 0,style:{...Mt.hdrStyles[Ie.columnId],...L?{cursor:u?"grabbing":"grab"}:void 0},"aria-sort":Oe,onPointerDown:L?ot=>d(Ie.columnId,ot):void 0,children:[(0, ce.jsxs)("div",{className:Xe.headerCellContent,children:[(0, ce.jsx)(L3,{...Cp(Ie,fr)}),(0, ce.jsx)("button",{className:Xe.headerMenuTrigger,onClick:ot=>{ot.stopPropagation(),Ye.isOpen&&Ye.openForColumn===Ie.columnId?Ye.close():Ye.open(Ie.columnId,ot.currentTarget);},"aria-label":"Column options",title:"Column options",children:"\u22EE"})]}),(0, ce.jsx)("div",{className:Xe.resizeHandle,role:"separator","aria-orientation":"vertical","aria-label":`Resize ${Ie.name}`,onPointerDown:ot=>{Se(null),a.setSelectionRange(null),r.current?.focus({preventScroll:true}),o(ot,Ie);},onDoubleClick:ot=>l(ot,Ie)})]},Ie.columnId)})]},ue))]}),!qe&&(0, ce.jsx)(a9,{virtualScrollEnabled:p,visibleRange:m,columnRange:g,items:w,windowed:C,rowHeight:h,getRowId:T,selectedRowIds:oe,visibleCols:Z,columnMeta:Mt,renderCellContent:tt,handleSingleRowClick:P,handleRowCheckboxChange:se,lastMouseShiftRef:i,hasCheckboxCol:K,hasRowNumbersCol:te,rowNumberOffset:x,selectionRange:We,activeCell:a.activeCell,cutRange:Qe,copyRange:Be,isDragging:Nt,editingCell:be,pinnedColumns:s.pinnedColumns,rowNumWidth:te?re?.[$a]?.widthPx??Ac:void 0})]}),u&&c!=null&&(0, ce.jsx)(r9,{dropIndicatorX:c,wrapperLeft:r.current?.getBoundingClientRect().left??0}),(0, ce.jsx)(q2,{containerRef:n,selectionRange:We,copyRange:Be,cutRange:Qe,colOffset:J,items:w,visibleColumns:E,columnSizingOverrides:re,columnOrder:M,isDragging:Nt}),e.formulaReferences&&e.formulaReferences.length>0&&(0, ce.jsx)(W2,{containerRef:n,references:e.formulaReferences,colOffset:J}),qe&&I&&(0, ce.jsx)(J7,{emptyState:I})]})})}),et&&(0, N3.createPortal)((0, ce.jsx)(Z7,{x:et.x,y:et.y,hasSelection:Ne,canUndo:He,canRedo:At,onUndo:Ve??Kp,onRedo:Ze??Kp,onCopy:Ce,onCut:xe,onPaste:W,onSelectAll:t.interaction.handleSelectAllCells,onClose:rt}),document.body),(0, ce.jsx)(W7,{...E2(Ye)})]}),Ge&&(0, ce.jsx)(Y7,{totalCount:Ge.totalCount,filteredCount:Ge.filteredCount,selectedCount:Ge.selectedCount??oe.size,selectedCellCount:We?(Math.abs(We.endRow-We.startRow)+1)*(Math.abs(We.endCol-We.startCol)+1):void 0,aggregation:Ge.aggregation,suppressRowCount:Ge.suppressRowCount}),D&&(0, ce.jsx)(t9,{message:j})]})}var s9=_a.memo(o9),un={container:"ogrid-radix__ColumnChooser-module__container",triggerButton:"ogrid-radix__ColumnChooser-module__triggerButton",buttonIcon:"ogrid-radix__ColumnChooser-module__buttonIcon",chevron:"ogrid-radix__ColumnChooser-module__chevron",dropdown:"ogrid-radix__ColumnChooser-module__dropdown",header:"ogrid-radix__ColumnChooser-module__header",optionsList:"ogrid-radix__ColumnChooser-module__optionsList",optionItem:"ogrid-radix__ColumnChooser-module__optionItem",checkbox:"ogrid-radix__ColumnChooser-module__checkbox",checkboxIndicator:"ogrid-radix__ColumnChooser-module__checkboxIndicator",actions:"ogrid-radix__ColumnChooser-module__actions",clearButton:"ogrid-radix__ColumnChooser-module__clearButton",selectAllButton:"ogrid-radix__ColumnChooser-module__selectAllButton"};function l9(){return (0, ce.jsx)("span",{className:un.buttonIcon,"aria-hidden":true,children:"\u2699"})}function u9(){return (0, ce.jsx)("span",{className:un.chevron,"aria-hidden":true,children:"\u25BC"})}function c9(){return (0, ce.jsx)("span",{className:un.chevron,"aria-hidden":true,children:"\u25B2"})}var f9=({columnId:e,columnName:t,checked:r,disabled:n,onChange:i})=>(0, ce.jsxs)(ce.Fragment,{children:[(0, ce.jsx)(ya,{id:`col-${e}`,checked:r,onCheckedChange:a=>i(a===true),disabled:n,className:un.checkbox,children:(0, ce.jsx)(wa,{className:un.checkboxIndicator,children:"\u2713"})}),(0, ce.jsx)("label",{htmlFor:`col-${e}`,style:{marginLeft:8,cursor:"pointer"},children:t})]}),d9={header:un.header,optionsList:un.optionsList,optionItem:un.optionItem,actions:un.actions,clearButton:un.clearButton,selectAllButton:un.selectAllButton},h9=e=>{let{columns:t,visibleColumns:r,onVisibilityChange:n,onSetVisibleColumns:i,className:a}=e,{open:s,setOpen:o,handleCheckboxChange:l,handleSelectAll:f,handleClearAll:u,visibleCount:c,totalCount:d}=A2({columns:t,visibleColumns:r,onVisibilityChange:n,onSetVisibleColumns:i}),p=h=>m=>l(h)(m);return (0, ce.jsx)("div",{className:`${un.container} ${a||""}`,children:(0, ce.jsxs)(mf,{open:s,onOpenChange:o,children:[(0, ce.jsx)(Bm,{asChild:true,children:(0, ce.jsxs)("button",{type:"button",className:un.triggerButton,"aria-expanded":s,"aria-haspopup":"listbox",children:[(0, ce.jsx)(l9,{}),(0, ce.jsxs)("span",{children:["Column Visibility (",c," of ",d,")"]}),s?(0, ce.jsx)(c9,{}):(0, ce.jsx)(u9,{})]})}),(0, ce.jsx)(gf,{children:(0, ce.jsx)(bf,{className:un.dropdown,sideOffset:4,align:"end",onOpenAutoFocus:h=>h.preventDefault(),children:(0, ce.jsx)(Qp,{columns:t,visibleColumns:r,visibleCount:c,totalCount:d,handleSelectAll:f,handleClearAll:u,handleCheckboxChange:p,CheckboxItem:f9,classNames:d9})})})]})})},Qn={pagination:"ogrid-radix__PaginationControls-module__pagination",paginationInfo:"ogrid-radix__PaginationControls-module__paginationInfo",paginationControls:"ogrid-radix__PaginationControls-module__paginationControls",navBtn:"ogrid-radix__PaginationControls-module__navBtn",pageNumbers:"ogrid-radix__PaginationControls-module__pageNumbers",pageBtn:"ogrid-radix__PaginationControls-module__pageBtn",active:"ogrid-radix__PaginationControls-module__active",ellipsis:"ogrid-radix__PaginationControls-module__ellipsis",pageSizeSelector:"ogrid-radix__PaginationControls-module__pageSizeSelector",pageSizeLabel:"ogrid-radix__PaginationControls-module__pageSizeLabel",pageSizeSelect:"ogrid-radix__PaginationControls-module__pageSizeSelect"},p9={first:"\xAB",prev:"\u2039",next:"\u203A",last:"\xBB"},m9=({variant:e,onClick:t,disabled:r,"aria-label":n,className:i})=>(0, ce.jsx)("button",{type:"button",className:i,onClick:t,disabled:r,"aria-label":n,children:(0, ce.jsx)("span",{"aria-hidden":true,children:p9[e]})}),g9=({onClick:e,active:t,"aria-label":r,"aria-current":n,children:i,className:a})=>(0, ce.jsx)("button",{type:"button",className:`${a??""} ${t?Qn.active:""}`.trim(),onClick:e,"aria-label":r,"aria-current":n,children:i}),b9=({value:e,options:t,onChange:r,"aria-label":n,className:i})=>(0, ce.jsx)("select",{className:i,value:String(e),onChange:a=>r(Number(a.target.value)),"aria-label":n,children:t.map(a=>(0, ce.jsx)("option",{value:a,children:a},a))}),v9={NavButton:m9,PageButton:g9,PageSizeSelect:b9},y9={pagination:Qn.pagination,paginationInfo:Qn.paginationInfo,paginationControls:Qn.paginationControls,pageNumbers:Qn.pageNumbers,ellipsis:Qn.ellipsis,navBtn:Qn.navBtn,pageBtn:Qn.pageBtn,pageSizeSelector:Qn.pageSizeSelector,pageSizeLabel:Qn.pageSizeLabel,pageSizeSelect:Qn.pageSizeSelect},B3=_a.memo(e=>(0, ce.jsx)(Zp,{...e,slots:v9,classNames:y9}));B3.displayName="PaginationControls";var F3=X2({DataGridTable:s9,ColumnChooser:h9,PaginationControls:B3});var Vm=Ke(U3()),Fn=Ke(rn()),w9=50;async function _9(e){let t=await e.arrayBuffer();if(x9(t)){let o=new Vm.default.Workbook;return await o.xlsx.load(t),o}let r=new TextDecoder("utf-8").decode(t),n=S9(r),i=C9(r,n),a=new Vm.default.Workbook,s=a.addWorksheet("Sheet1");for(let o of i)s.addRow(o);return a}function x9(e){if(e.byteLength<4)return false;let t=new Uint8Array(e,0,4);return t[0]===80&&t[1]===75&&t[2]===3&&t[3]===4}function S9(e){for(let t of e.split(/\r\n|\n|\r/))if(t)return t.includes(" ")?" ":",";return ","}function C9(e,t){let r=[],n=[],i="",a=false;for(let s=0;s<e.length;s++){let o=e[s];if(a){if(o==='"'){if(e[s+1]==='"'){i+='"',s++;continue}a=false;continue}i+=o;continue}if(o==='"'){a=true;continue}if(o===t){n.push(i),i="";continue}if(o==="\r"&&e[s+1]===`
|
|
83
|
+
`){n.push(i),r.push(n),n=[],i="",s++;continue}if(o===`
|
|
84
|
+
`||o==="\r"){n.push(i),r.push(n),n=[],i="";continue}i+=o;}return (i!==""||n.length>0)&&(n.push(i),r.push(n)),r}function E9(e,t={}){if(!e)return {columns:[],rows:[],initialFormulas:[]};let r=e.columnCount||0,n=e.rowCount||0;if(!r||!n)return {columns:[],rows:[],initialFormulas:[]};let i=[],a=[];for(let g=0;g<n;g++){let v=new Array(r);for(let w=0;w<r;w++){let C=e.getCell(g+1,w+1);v[w]=T9(C,w,g,a);}i.push(v);}let s=t.headerRow??"auto",o=i[0],l=s==="header"||s==="auto"&&i.length>1&&R9(o),f=l?i.slice(1):i,u=l?o.map((g,v)=>A9(g)??Hm(v)):null,c=Math.min(f.length,w9),d=new Array(r).fill("text");for(let g=0;g<r;g++){let v=true,w=true,C=true,T=false;for(let I=0;I<c;I++){let k=f[I][g];if(!(k===""||k===null||k===void 0)&&(T=true,typeof k!="number"&&(v=false),k instanceof Date||(w=false),typeof k!="boolean"&&(C=false),!v&&!w&&!C))break}T&&(w?d[g]="date":v?d[g]="numeric":C&&(d[g]="boolean"));}let p=[];for(let g=0;g<r;g++){let v=Hm(g);p.push({columnId:v,name:u?u[g]:v,type:d[g],sortable:true,defaultWidth:120,minWidth:60});}let h=f.map((g,v)=>{let w={__rowIdx:v};for(let C=0;C<r;C++)w[Hm(C)]=g[C];return w}),m=l?a.filter(g=>g.row>=1).map(g=>({...g,row:g.row-1})):a;return {columns:p,rows:h,initialFormulas:m}}function R9(e){if(!e||e.length===0)return false;let t=false;for(let r of e)if(!(r===""||r===null||r===void 0)){if(typeof r!="string")return false;r.trim()!==""&&(t=true);}return t}function A9(e){if(e===""||e===null||e===void 0)return null;let t=(typeof e=="string"?e:String(e)).trim();return t===""?null:t}function T9(e,t,r,n){let i=e?.value;if(i==null)return "";if(i instanceof Date||typeof i!="object")return i;if("formula"in i&&typeof i.formula=="string"){let a=i;return n.push({col:t,row:r,formula:a.formula}),a.result==null?"":a.result}if("sharedFormula"in i){let a=i;return a.sharedFormula&&n.push({col:t,row:r,formula:a.sharedFormula}),a.result==null?"":a.result}return "richText"in i?i.richText.map(a=>a.text).join(""):"hyperlink"in i&&"text"in i?i.text:"error"in i?i.error:String(i)}function Hm(e){let t="",r=e;for(;r>=0;)t=String.fromCharCode(65+r%26)+t,r=Math.floor(r/26)-1;return t}function Jk(e){return e.worksheets.map(t=>t.name)}var M9={compact:28,normal:36,comfortable:44};function k9({workbook:e,sheetName:t,height:r="100%",density:n="compact",headerRow:i}){let a=e.getWorksheet(t),{columns:s,rows:o,initialFormulas:l}=(0, Pn.useMemo)(()=>E9(a,{headerRow:i}),[a,i]);if(!a)return (0, Fn.jsxs)("div",{style:{padding:16,opacity:.7},children:["Sheet not found: ",t]});let f=M9[n];return (0, Fn.jsx)("div",{style:{width:"100%",height:r,display:"flex",flexDirection:"column"},children:(0, Fn.jsx)(F3,{columns:s,data:o,getRowId:u=>u.__rowIdx,cellReferences:true,formulas:true,initialFormulas:l,defaultSortBy:"",virtualScroll:{enabled:true,paginate:false,rowHeight:f,columns:false},rowHeight:f,density:n,statusBar:true,columnChooser:false})})}function O9(e){let{height:t="100%",initialSheet:r,density:n,onSheetChange:i,headerRow:a}=e,[s,o]=(0, Pn.useState)("workbook"in e?e.workbook:null),[l,f]=(0, Pn.useState)(null);(0, Pn.useEffect)(()=>{if("workbook"in e){o(e.workbook);return}let p=false;return f(null),_9(e.blob).then(h=>{p||o(h);}).catch(h=>{p||f(String(h?.message??h));}),()=>{p=true;}},["blob"in e?e.blob:e.workbook]);let u=(0, Pn.useMemo)(()=>s?.worksheets.map(p=>p.name)??[],[s]),[c,d]=(0, Pn.useState)(null);return (0, Pn.useEffect)(()=>{if(!u.length){d(null);return}let p=r&&u.includes(r)?r:u[0];d(p);},[u,r]),l?(0, Fn.jsxs)("div",{style:B9,children:["Could not parse workbook: ",l]}):!s||!c?(0, Fn.jsx)("div",{style:L9,children:"Loading workbook\u2026"}):(0, Fn.jsxs)("div",{style:{...D9,height:t},children:[u.length>1&&(0, Fn.jsx)("div",{role:"tablist","aria-label":"Workbook sheets",style:N9,children:u.map(p=>{let h=p===c;return (0, Fn.jsx)("button",{type:"button",role:"tab","aria-selected":h,onClick:()=>{d(p),i?.(p);},style:h?z9:I9,children:p},p)})}),(0, Fn.jsx)("div",{style:j9,children:(0, Fn.jsx)(k9,{workbook:s,sheetName:c,density:n,headerRow:a})})]})}var D9={display:"flex",flexDirection:"column",width:"100%",minHeight:0,background:"var(--bg, transparent)",color:"var(--fg, inherit)"},N9={display:"flex",gap:2,padding:"6px 8px 0",background:"var(--bg-3, #1b2330)",borderBottom:"1px solid var(--border, #1f2a3a)",overflowX:"auto",flex:"0 0 auto"},G3={border:"1px solid var(--border, #1f2a3a)",borderBottom:"none",borderRadius:"4px 4px 0 0",padding:"4px 12px",fontSize:12,cursor:"pointer",whiteSpace:"nowrap",fontFamily:"inherit"},I9={...G3,background:"var(--bg-2, #121821)",color:"var(--fg-dim, #8a96a6)"},z9={...G3,background:"var(--bg, #0b1014)",color:"var(--accent, #3cb87a)",borderColor:"var(--accent, #3cb87a)"},j9={flex:"1 1 auto",minHeight:0,display:"flex"},L9={margin:"auto",padding:40,textAlign:"center",opacity:.7},B9={margin:"auto",padding:40,textAlign:"center",color:"var(--warn, #f14c4c)"};function eO(e,t){let r=(0, V3.createRoot)(e),n=t.workbook?{workbook:t.workbook,...H3(t)}:{blob:t.blob,...H3(t)};return r.render((0, Pn.createElement)(O9,n)),()=>{queueMicrotask(()=>r.unmount());}}function H3(e){let{workbook:t,blob:r,...n}=e;return n}/*! Bundled license information:
|
|
85
|
+
|
|
86
|
+
react/cjs/react.production.js:
|
|
87
|
+
(**
|
|
88
|
+
* @license React
|
|
89
|
+
* react.production.js
|
|
90
|
+
*
|
|
91
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the MIT license found in the
|
|
94
|
+
* LICENSE file in the root directory of this source tree.
|
|
95
|
+
*)
|
|
96
|
+
|
|
97
|
+
scheduler/cjs/scheduler.production.js:
|
|
98
|
+
(**
|
|
99
|
+
* @license React
|
|
100
|
+
* scheduler.production.js
|
|
101
|
+
*
|
|
102
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the MIT license found in the
|
|
105
|
+
* LICENSE file in the root directory of this source tree.
|
|
106
|
+
*)
|
|
107
|
+
|
|
108
|
+
react-dom/cjs/react-dom.production.js:
|
|
109
|
+
(**
|
|
110
|
+
* @license React
|
|
111
|
+
* react-dom.production.js
|
|
112
|
+
*
|
|
113
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the MIT license found in the
|
|
116
|
+
* LICENSE file in the root directory of this source tree.
|
|
117
|
+
*)
|
|
118
|
+
|
|
119
|
+
react-dom/cjs/react-dom-client.production.js:
|
|
120
|
+
(**
|
|
121
|
+
* @license React
|
|
122
|
+
* react-dom-client.production.js
|
|
123
|
+
*
|
|
124
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the MIT license found in the
|
|
127
|
+
* LICENSE file in the root directory of this source tree.
|
|
128
|
+
*)
|
|
129
|
+
|
|
130
|
+
react/cjs/react-jsx-runtime.production.js:
|
|
131
|
+
(**
|
|
132
|
+
* @license React
|
|
133
|
+
* react-jsx-runtime.production.js
|
|
134
|
+
*
|
|
135
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the MIT license found in the
|
|
138
|
+
* LICENSE file in the root directory of this source tree.
|
|
139
|
+
*)
|
|
140
|
+
|
|
141
|
+
exceljs/dist/exceljs.min.js:
|
|
142
|
+
(*! ExcelJS 19-10-2023 *)
|
|
143
|
+
(*!
|
|
144
|
+
* The buffer module from node.js, for the browser.
|
|
145
|
+
*
|
|
146
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
147
|
+
* @license MIT
|
|
148
|
+
*)
|
|
149
|
+
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
150
|
+
(*!
|
|
151
|
+
|
|
152
|
+
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
153
|
+
<http://stuartk.com/jszip>
|
|
154
|
+
|
|
155
|
+
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
156
|
+
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
157
|
+
|
|
158
|
+
JSZip uses the library pako released under the MIT license :
|
|
159
|
+
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
160
|
+
*)
|
|
161
|
+
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
162
|
+
(**
|
|
163
|
+
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
164
|
+
*
|
|
165
|
+
* @author Louis-Dominique Dubeau
|
|
166
|
+
* @license MIT
|
|
167
|
+
* @copyright Louis-Dominique Dubeau
|
|
168
|
+
*)
|
|
169
|
+
(**
|
|
170
|
+
* Character classes and associated utilities for the 2nd edition of XML 1.1.
|
|
171
|
+
*
|
|
172
|
+
* @author Louis-Dominique Dubeau
|
|
173
|
+
* @license MIT
|
|
174
|
+
* @copyright Louis-Dominique Dubeau
|
|
175
|
+
*)
|
|
176
|
+
(**
|
|
177
|
+
* Character class utilities for XML NS 1.0 edition 3.
|
|
178
|
+
*
|
|
179
|
+
* @author Louis-Dominique Dubeau
|
|
180
|
+
* @license MIT
|
|
181
|
+
* @copyright Louis-Dominique Dubeau
|
|
182
|
+
*)
|
|
183
|
+
*/export{k9 as XlsxGrid,O9 as XlsxWorkbookGrid,Jk as listSheets,eO as mount,E9 as sheetToGridData,_9 as workbookFromBlob};
|