(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function t(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=t(a);fetch(a.href,l)}})();function Jg(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pc={exports:{}},ia={},gc={exports:{}},vt={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xh;function _g(){if(Xh)return vt;Xh=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function x(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function R(A,J,Oe){this.props=A,this.context=J,this.refs=E,this.updater=Oe||w}R.prototype.isReactComponent={},R.prototype.setState=function(A,J){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,J,"setState")},R.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function D(){}D.prototype=R.prototype;function L(A,J,Oe){this.props=A,this.context=J,this.refs=E,this.updater=Oe||w}var j=L.prototype=new D;j.constructor=L,C(j,R.prototype),j.isPureReactComponent=!0;var W=Array.isArray,K=Object.prototype.hasOwnProperty,B={current:null},U={key:!0,ref:!0,__self:!0,__source:!0};function $(A,J,Oe){var Ne,Ve={},Ae=null,Ke=null;if(J!=null)for(Ne in J.ref!==void 0&&(Ke=J.ref),J.key!==void 0&&(Ae=""+J.key),J)K.call(J,Ne)&&!U.hasOwnProperty(Ne)&&(Ve[Ne]=J[Ne]);var Ce=arguments.length-2;if(Ce===1)Ve.children=Oe;else if(1>>1,J=ie[A];if(0>>1;Aa(Ve,be))Aea(Ke,Ve)?(ie[A]=Ke,ie[Ae]=be,A=Ae):(ie[A]=Ve,ie[Ne]=be,A=Ne);else if(Aea(Ke,be))ie[A]=Ke,ie[Ae]=be,A=Ae;else break e}}return me}function a(ie,me){var be=ie.sortIndex-me.sortIndex;return be!==0?be:ie.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;r.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();r.unstable_now=function(){return u.now()-f}}var d=[],h=[],m=1,y=null,x=3,w=!1,C=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(ie){for(var me=t(h);me!==null;){if(me.callback===null)i(h);else if(me.startTime<=ie)i(h),me.sortIndex=me.expirationTime,e(d,me);else break;me=t(h)}}function W(ie){if(E=!1,j(ie),!C)if(t(d)!==null)C=!0,de(K);else{var me=t(h);me!==null&&se(W,me.startTime-ie)}}function K(ie,me){C=!1,E&&(E=!1,D($),$=-1),w=!0;var be=x;try{for(j(me),y=t(d);y!==null&&(!(y.expirationTime>me)||ie&&!ae());){var A=y.callback;if(typeof A=="function"){y.callback=null,x=y.priorityLevel;var J=A(y.expirationTime<=me);me=r.unstable_now(),typeof J=="function"?y.callback=J:y===t(d)&&i(d),j(me)}else i(d);y=t(d)}if(y!==null)var Oe=!0;else{var Ne=t(h);Ne!==null&&se(W,Ne.startTime-me),Oe=!1}return Oe}finally{y=null,x=be,w=!1}}var B=!1,U=null,$=-1,te=5,ne=-1;function ae(){return!(r.unstable_now()-neie||125A?(ie.sortIndex=be,e(h,ie),t(d)===null&&ie===t(h)&&(E?(D($),$=-1):E=!0,se(W,be-A))):(ie.sortIndex=J,e(d,ie),C||w||(C=!0,de(K))),ie},r.unstable_shouldYield=ae,r.unstable_wrapCallback=function(ie){var me=x;return function(){var be=x;x=me;try{return ie.apply(this,arguments)}finally{x=be}}}})(xc)),xc}var _h;function rm(){return _h||(_h=1,yc.exports=tm()),yc.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $h;function nm(){if($h)return jr;$h=1;var r=Xc(),e=rm();function t(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},y={};function x(n){return d.call(y,n)?!0:d.call(m,n)?!1:h.test(n)?y[n]=!0:(m[n]=!0,!1)}function w(n,o,s,c){if(s!==null&&s.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function C(n,o,s,c){if(o===null||typeof o>"u"||w(n,o,s,c))return!0;if(c)return!1;if(s!==null)switch(s.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function E(n,o,s,c,v,g,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=v,this.mustUseProperty=s,this.propertyName=n,this.type=o,this.sanitizeURL=g,this.removeEmptyString=S}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){R[n]=new E(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];R[o]=new E(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){R[n]=new E(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){R[n]=new E(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){R[n]=new E(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){R[n]=new E(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){R[n]=new E(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){R[n]=new E(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){R[n]=new E(n,5,!1,n.toLowerCase(),null,!1,!1)});var D=/[\-:]([a-z])/g;function L(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var o=n.replace(D,L);R[o]=new E(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(D,L);R[o]=new E(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(D,L);R[o]=new E(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){R[n]=new E(n,1,!1,n.toLowerCase(),null,!1,!1)}),R.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){R[n]=new E(n,1,!1,n.toLowerCase(),null,!0,!0)});function j(n,o,s,c){var v=R.hasOwnProperty(o)?R[o]:null;(v!==null?v.type!==0:c||!(2O||v[S]!==g[O]){var z=` `+v[S].replace(" at new "," at ");return n.displayName&&z.includes("")&&(z=z.replace("",n.displayName)),z}while(1<=S&&0<=O);break}}}finally{Oe=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?J(n):""}function Ve(n){switch(n.tag){case 5:return J(n.type);case 16:return J("Lazy");case 13:return J("Suspense");case 19:return J("SuspenseList");case 0:case 2:case 15:return n=Ne(n.type,!1),n;case 11:return n=Ne(n.type.render,!1),n;case 1:return n=Ne(n.type,!0),n;default:return""}}function Ae(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case U:return"Fragment";case B:return"Portal";case te:return"Profiler";case $:return"StrictMode";case Z:return"Suspense";case Se:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case ae:return(n.displayName||"Context")+".Consumer";case ne:return(n._context.displayName||"Context")+".Provider";case he:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Fe:return o=n.displayName||null,o!==null?o:Ae(n.type)||"Memo";case de:o=n._payload,n=n._init;try{return Ae(n(o))}catch{}}return null}function Ke(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(o);case 8:return o===$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ce(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function it(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function kt(n){var o=it(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var v=s.get,g=s.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return v.call(this)},set:function(S){c=""+S,g.call(this,S)}}),Object.defineProperty(n,o,{enumerable:s.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function $t(n){n._valueTracker||(n._valueTracker=kt(n))}function wt(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),c="";return n&&(c=it(n)?n.checked?"true":"false":n.value),n=c,n!==s?(o.setValue(n),!0):!1}function Wt(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function xr(n,o){var s=o.checked;return be({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked})}function hr(n,o){var s=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;s=Ce(o.value!=null?o.value:s),n._wrapperState={initialChecked:c,initialValue:s,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function sr(n,o){o=o.checked,o!=null&&j(n,"checked",o,!1)}function Ot(n,o){sr(n,o);var s=Ce(o.value),c=o.type;if(s!=null)c==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?ee(n,o.type,s):o.hasOwnProperty("defaultValue")&&ee(n,o.type,Ce(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function at(n,o,s){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,s||o===n.value||(n.value=o),n.defaultValue=o}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function ee(n,o,s){(o!=="number"||Wt(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var Be=Array.isArray;function ye(n,o,s,c){if(n=n.options,o){o={};for(var v=0;v"+o.valueOf().toString()+"",o=Ct.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function jt(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var F={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oe=["Webkit","ms","Moz","O"];Object.keys(F).forEach(function(n){oe.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),F[o]=F[n]})});function re(n,o,s){return o==null||typeof o=="boolean"||o===""?"":s||typeof o!="number"||o===0||F.hasOwnProperty(n)&&F[n]?(""+o).trim():o+"px"}function Pe(n,o){n=n.style;for(var s in o)if(o.hasOwnProperty(s)){var c=s.indexOf("--")===0,v=re(s,o[s],c);s==="float"&&(s="cssFloat"),c?n.setProperty(s,v):n[s]=v}}var M=be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _(n,o){if(o){if(M[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function b(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){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!1;default:return!0}}var le=null;function Ge(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var p=null,G=null,Q=null;function k(n){if(n=qo(n)){if(typeof p!="function")throw Error(t(280));var o=n.stateNode;o&&(o=tl(o),p(n.stateNode,n.type,o))}}function N(n){G?Q?Q.push(n):Q=[n]:G=n}function X(){if(G){var n=G,o=Q;if(Q=G=null,k(n),o)for(n=0;n>>=0,n===0?32:31-(hp(n)/vp|0)|0}var Ia=64,Ba=4194304;function Fo(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Ua(n,o){var s=n.pendingLanes;if(s===0)return 0;var c=0,v=n.suspendedLanes,g=n.pingedLanes,S=s&268435455;if(S!==0){var O=S&~v;O!==0?c=Fo(O):(g&=S,g!==0&&(c=Fo(g)))}else S=s&~v,S!==0?c=Fo(S):g!==0&&(c=Fo(g));if(c===0)return 0;if(o!==0&&o!==c&&(o&v)===0&&(v=c&-c,g=o&-o,v>=g||v===16&&(g&4194240)!==0))return o;if((c&4)!==0&&(c|=s&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=c;0s;s++)o.push(n);return o}function Po(n,o,s){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-sn(o),n[o]=s}function yp(n,o){var s=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0=zo),Lf=" ",Vf=!1;function Wf(n,o){switch(n){case"keyup":return Gp.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qf(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Vi=!1;function Zp(n,o){switch(n){case"compositionend":return qf(o);case"keypress":return o.which!==32?null:(Vf=!0,Lf);case"textInput":return n=o.data,n===Lf&&Vf?null:n;default:return null}}function Yp(n,o){if(Vi)return n==="compositionend"||!Ys&&Wf(n,o)?(n=zf(),Ka=qs=Gn=null,Vi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:s,offset:o-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Qf(s)}}function _f(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?_f(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function $f(){for(var n=window,o=Wt();o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)n=o.contentWindow;else break;o=Wt(n.document)}return o}function _s(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function ig(n){var o=$f(),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&_f(s.ownerDocument.documentElement,s)){if(c!==null&&_s(s)){if(o=c.start,n=c.end,n===void 0&&(n=o),"selectionStart"in s)s.selectionStart=o,s.selectionEnd=Math.min(n,s.value.length);else if(n=(o=s.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var v=s.textContent.length,g=Math.min(c.start,v);c=c.end===void 0?g:Math.min(c.end,v),!n.extend&&g>c&&(v=c,c=g,g=v),v=Jf(s,g);var S=Jf(s,c);v&&S&&(n.rangeCount!==1||n.anchorNode!==v.node||n.anchorOffset!==v.offset||n.focusNode!==S.node||n.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(v.node,v.offset),n.removeAllRanges(),g>c?(n.addRange(o),n.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),n.addRange(o)))}}for(o=[],n=s;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,Wi=null,$s=null,Bo=null,eu=!1;function ed(n,o,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;eu||Wi==null||Wi!==Wt(c)||(c=Wi,"selectionStart"in c&&_s(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Bo&&Io(Bo,c)||(Bo=c,c=_a($s,"onSelect"),0Xi||(n.current=du[Xi],du[Xi]=null,Xi--)}function Bt(n,o){Xi++,du[Xi]=n.current,n.current=o}var Qn={},wr=Yn(Qn),Dr=Yn(!1),wi=Qn;function Zi(n,o){var s=n.type.contextTypes;if(!s)return Qn;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var v={},g;for(g in s)v[g]=o[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=v),v}function Or(n){return n=n.childContextTypes,n!=null}function rl(){Vt(Dr),Vt(wr)}function pd(n,o,s){if(wr.current!==Qn)throw Error(t(168));Bt(wr,o),Bt(Dr,s)}function gd(n,o,s){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return s;c=c.getChildContext();for(var v in c)if(!(v in o))throw Error(t(108,Ke(n)||"Unknown",v));return be({},s,c)}function nl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Qn,wi=wr.current,Bt(wr,n),Bt(Dr,Dr.current),!0}function md(n,o,s){var c=n.stateNode;if(!c)throw Error(t(169));s?(n=gd(n,o,wi),c.__reactInternalMemoizedMergedChildContext=n,Vt(Dr),Vt(wr),Bt(wr,n)):Vt(Dr),Bt(Dr,s)}var Tn=null,il=!1,hu=!1;function yd(n){Tn===null?Tn=[n]:Tn.push(n)}function gg(n){il=!0,yd(n)}function Jn(){if(!hu&&Tn!==null){hu=!0;var n=0,o=Nt;try{var s=Tn;for(Nt=1;n>=S,v-=S,Rn=1<<32-sn(o)+v|s<et?(fr=Ze,Ze=null):fr=Ze.sibling;var Ft=ue(q,Ze,H[et],ke);if(Ft===null){Ze===null&&(Ze=fr);break}n&&Ze&&Ft.alternate===null&&o(q,Ze),I=g(Ft,I,et),Xe===null?Le=Ft:Xe.sibling=Ft,Xe=Ft,Ze=fr}if(et===H.length)return s(q,Ze),qt&&bi(q,et),Le;if(Ze===null){for(;etet?(fr=Ze,Ze=null):fr=Ze.sibling;var ai=ue(q,Ze,Ft.value,ke);if(ai===null){Ze===null&&(Ze=fr);break}n&&Ze&&ai.alternate===null&&o(q,Ze),I=g(ai,I,et),Xe===null?Le=ai:Xe.sibling=ai,Xe=ai,Ze=fr}if(Ft.done)return s(q,Ze),qt&&bi(q,et),Le;if(Ze===null){for(;!Ft.done;et++,Ft=H.next())Ft=ve(q,Ft.value,ke),Ft!==null&&(I=g(Ft,I,et),Xe===null?Le=Ft:Xe.sibling=Ft,Xe=Ft);return qt&&bi(q,et),Le}for(Ze=c(q,Ze);!Ft.done;et++,Ft=H.next())Ft=De(Ze,q,et,Ft.value,ke),Ft!==null&&(n&&Ft.alternate!==null&&Ze.delete(Ft.key===null?et:Ft.key),I=g(Ft,I,et),Xe===null?Le=Ft:Xe.sibling=Ft,Xe=Ft);return n&&Ze.forEach(function(Qg){return o(q,Qg)}),qt&&bi(q,et),Le}function Qt(q,I,H,ke){if(typeof H=="object"&&H!==null&&H.type===U&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case K:e:{for(var Le=H.key,Xe=I;Xe!==null;){if(Xe.key===Le){if(Le=H.type,Le===U){if(Xe.tag===7){s(q,Xe.sibling),I=v(Xe,H.props.children),I.return=q,q=I;break e}}else if(Xe.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===de&&Cd(Le)===Xe.type){s(q,Xe.sibling),I=v(Xe,H.props),I.ref=Ko(q,Xe,H),I.return=q,q=I;break e}s(q,Xe);break}else o(q,Xe);Xe=Xe.sibling}H.type===U?(I=Di(H.props.children,q.mode,ke,H.key),I.return=q,q=I):(ke=Al(H.type,H.key,H.props,null,q.mode,ke),ke.ref=Ko(q,I,H),ke.return=q,q=ke)}return S(q);case B:e:{for(Xe=H.key;I!==null;){if(I.key===Xe)if(I.tag===4&&I.stateNode.containerInfo===H.containerInfo&&I.stateNode.implementation===H.implementation){s(q,I.sibling),I=v(I,H.children||[]),I.return=q,q=I;break e}else{s(q,I);break}else o(q,I);I=I.sibling}I=cc(H,q.mode,ke),I.return=q,q=I}return S(q);case de:return Xe=H._init,Qt(q,I,Xe(H._payload),ke)}if(Be(H))return Me(q,I,H,ke);if(me(H))return Ue(q,I,H,ke);sl(q,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,I!==null&&I.tag===6?(s(q,I.sibling),I=v(I,H),I.return=q,q=I):(s(q,I),I=uc(H,q.mode,ke),I.return=q,q=I),S(q)):s(q,I)}return Qt}var _i=Fd(!0),Pd=Fd(!1),ul=Yn(null),cl=null,$i=null,xu=null;function wu(){xu=$i=cl=null}function Su(n){var o=ul.current;Vt(ul),n._currentValue=o}function bu(n,o,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===s)break;n=n.return}}function eo(n,o){cl=n,xu=$i=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Ar=!0),n.firstContext=null)}function Zr(n){var o=n._currentValue;if(xu!==n)if(n={context:n,memoizedValue:o,next:null},$i===null){if(cl===null)throw Error(t(308));$i=n,cl.dependencies={lanes:0,firstContext:n}}else $i=$i.next=n;return o}var ki=null;function ku(n){ki===null?ki=[n]:ki.push(n)}function Ed(n,o,s,c){var v=o.interleaved;return v===null?(s.next=s,ku(o)):(s.next=v.next,v.next=s),o.interleaved=s,On(n,c)}function On(n,o){n.lanes|=o;var s=n.alternate;for(s!==null&&(s.lanes|=o),s=n,n=n.return;n!==null;)n.childLanes|=o,s=n.alternate,s!==null&&(s.childLanes|=o),s=n,n=n.return;return s.tag===3?s.stateNode:null}var _n=!1;function Cu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Td(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function An(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function $n(n,o,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(St&2)!==0){var v=c.pending;return v===null?o.next=o:(o.next=v.next,v.next=o),c.pending=o,On(n,s)}return v=c.interleaved,v===null?(o.next=o,ku(c)):(o.next=v.next,v.next=o),c.interleaved=o,On(n,s)}function fl(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194240)!==0)){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,Bs(n,s)}}function Rd(n,o){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var v=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var S={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};g===null?v=g=S:g=g.next=S,s=s.next}while(s!==null);g===null?v=g=o:g=g.next=o}else v=g=o;s={baseState:c.baseState,firstBaseUpdate:v,lastBaseUpdate:g,shared:c.shared,effects:c.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function dl(n,o,s,c){var v=n.updateQueue;_n=!1;var g=v.firstBaseUpdate,S=v.lastBaseUpdate,O=v.shared.pending;if(O!==null){v.shared.pending=null;var z=O,Y=z.next;z.next=null,S===null?g=Y:S.next=Y,S=z;var fe=n.alternate;fe!==null&&(fe=fe.updateQueue,O=fe.lastBaseUpdate,O!==S&&(O===null?fe.firstBaseUpdate=Y:O.next=Y,fe.lastBaseUpdate=z))}if(g!==null){var ve=v.baseState;S=0,fe=Y=z=null,O=g;do{var ue=O.lane,De=O.eventTime;if((c&ue)===ue){fe!==null&&(fe=fe.next={eventTime:De,lane:0,tag:O.tag,payload:O.payload,callback:O.callback,next:null});e:{var Me=n,Ue=O;switch(ue=o,De=s,Ue.tag){case 1:if(Me=Ue.payload,typeof Me=="function"){ve=Me.call(De,ve,ue);break e}ve=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Ue.payload,ue=typeof Me=="function"?Me.call(De,ve,ue):Me,ue==null)break e;ve=be({},ve,ue);break e;case 2:_n=!0}}O.callback!==null&&O.lane!==0&&(n.flags|=64,ue=v.effects,ue===null?v.effects=[O]:ue.push(O))}else De={eventTime:De,lane:ue,tag:O.tag,payload:O.payload,callback:O.callback,next:null},fe===null?(Y=fe=De,z=ve):fe=fe.next=De,S|=ue;if(O=O.next,O===null){if(O=v.shared.pending,O===null)break;ue=O,O=ue.next,ue.next=null,v.lastBaseUpdate=ue,v.shared.pending=null}}while(!0);if(fe===null&&(z=ve),v.baseState=z,v.firstBaseUpdate=Y,v.lastBaseUpdate=fe,o=v.shared.interleaved,o!==null){v=o;do S|=v.lane,v=v.next;while(v!==o)}else g===null&&(v.shared.lanes=0);Pi|=S,n.lanes=S,n.memoizedState=ve}}function Dd(n,o,s){if(n=o.effects,o.effects=null,n!==null)for(o=0;os?s:4,n(!0);var c=Ru.transition;Ru.transition={};try{n(!1),o()}finally{Nt=s,Ru.transition=c}}function Yd(){return Yr().memoizedState}function wg(n,o,s){var c=ni(n);if(s={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null},Qd(n))Jd(o,s);else if(s=Ed(n,o,s,c),s!==null){var v=Pr();vn(s,n,c,v),_d(s,o,c)}}function Sg(n,o,s){var c=ni(n),v={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null};if(Qd(n))Jd(o,v);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=o.lastRenderedReducer,g!==null))try{var S=o.lastRenderedState,O=g(S,s);if(v.hasEagerState=!0,v.eagerState=O,un(O,S)){var z=o.interleaved;z===null?(v.next=v,ku(o)):(v.next=z.next,z.next=v),o.interleaved=v;return}}catch{}finally{}s=Ed(n,o,v,c),s!==null&&(v=Pr(),vn(s,n,c,v),_d(s,o,c))}}function Qd(n){var o=n.alternate;return n===Ht||o!==null&&o===Ht}function Jd(n,o){Zo=pl=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function _d(n,o,s){if((s&4194240)!==0){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,Bs(n,s)}}var yl={readContext:Zr,useCallback:Sr,useContext:Sr,useEffect:Sr,useImperativeHandle:Sr,useInsertionEffect:Sr,useLayoutEffect:Sr,useMemo:Sr,useReducer:Sr,useRef:Sr,useState:Sr,useDebugValue:Sr,useDeferredValue:Sr,useTransition:Sr,useMutableSource:Sr,useSyncExternalStore:Sr,useId:Sr,unstable_isNewReconciler:!1},bg={readContext:Zr,useCallback:function(n,o){return bn().memoizedState=[n,o===void 0?null:o],n},useContext:Zr,useEffect:Vd,useImperativeHandle:function(n,o,s){return s=s!=null?s.concat([n]):null,gl(4194308,4,Kd.bind(null,o,n),s)},useLayoutEffect:function(n,o){return gl(4194308,4,n,o)},useInsertionEffect:function(n,o){return gl(4,2,n,o)},useMemo:function(n,o){var s=bn();return o=o===void 0?null:o,n=n(),s.memoizedState=[n,o],n},useReducer:function(n,o,s){var c=bn();return o=s!==void 0?s(o):o,c.memoizedState=c.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},c.queue=n,n=n.dispatch=wg.bind(null,Ht,n),[c.memoizedState,n]},useRef:function(n){var o=bn();return n={current:n},o.memoizedState=n},useState:Ud,useDebugValue:Mu,useDeferredValue:function(n){return bn().memoizedState=n},useTransition:function(){var n=Ud(!1),o=n[0];return n=xg.bind(null,n[1]),bn().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,s){var c=Ht,v=bn();if(qt){if(s===void 0)throw Error(t(407));s=s()}else{if(s=o(),cr===null)throw Error(t(349));(Fi&30)!==0||zd(c,o,s)}v.memoizedState=s;var g={value:s,getSnapshot:o};return v.queue=g,Vd(Md.bind(null,c,g,n),[n]),c.flags|=2048,Jo(9,jd.bind(null,c,g,s,o),void 0,null),s},useId:function(){var n=bn(),o=cr.identifierPrefix;if(qt){var s=Dn,c=Rn;s=(c&~(1<<32-sn(c)-1)).toString(32)+s,o=":"+o+"R"+s,s=Yo++,0<\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=S.createElement(s,{is:c.is}):(n=S.createElement(s),s==="select"&&(S=n,c.multiple?S.multiple=!0:c.size&&(S.size=c.size))):n=S.createElementNS(n,s),n[wn]=o,n[Wo]=c,yh(n,o,!1,!1),o.stateNode=n;e:{switch(S=b(s,c),s){case"dialog":Lt("cancel",n),Lt("close",n),v=c;break;case"iframe":case"object":case"embed":Lt("load",n),v=c;break;case"video":case"audio":for(v=0;voo&&(o.flags|=128,c=!0,_o(g,!1),o.lanes=4194304)}else{if(!c)if(n=hl(S),n!==null){if(o.flags|=128,c=!0,s=n.updateQueue,s!==null&&(o.updateQueue=s,o.flags|=4),_o(g,!0),g.tail===null&&g.tailMode==="hidden"&&!S.alternate&&!qt)return br(o),null}else 2*Yt()-g.renderingStartTime>oo&&s!==1073741824&&(o.flags|=128,c=!0,_o(g,!1),o.lanes=4194304);g.isBackwards?(S.sibling=o.child,o.child=S):(s=g.last,s!==null?s.sibling=S:o.child=S,g.last=S)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=Yt(),o.sibling=null,s=Kt.current,Bt(Kt,c?s&1|2:s&1),o):(br(o),null);case 22:case 23:return ac(),c=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(Vr&1073741824)!==0&&(br(o),o.subtreeFlags&6&&(o.flags|=8192)):br(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function Dg(n,o){switch(pu(o),o.tag){case 1:return Or(o.type)&&rl(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return to(),Vt(Dr),Vt(wr),Tu(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return Pu(o),null;case 13:if(Vt(Kt),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(t(340));Ji()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Vt(Kt),null;case 4:return to(),null;case 10:return Su(o.type._context),null;case 22:case 23:return ac(),null;case 24:return null;default:return null}}var bl=!1,kr=!1,Og=typeof WeakSet=="function"?WeakSet:Set,ze=null;function no(n,o){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(c){Zt(n,o,c)}else s.current=null}function Zu(n,o,s){try{s()}catch(c){Zt(n,o,c)}}var Sh=!1;function Ag(n,o){if(au=Wa,n=$f(),_s(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var v=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var S=0,O=-1,z=-1,Y=0,fe=0,ve=n,ue=null;t:for(;;){for(var De;ve!==s||v!==0&&ve.nodeType!==3||(O=S+v),ve!==g||c!==0&&ve.nodeType!==3||(z=S+c),ve.nodeType===3&&(S+=ve.nodeValue.length),(De=ve.firstChild)!==null;)ue=ve,ve=De;for(;;){if(ve===n)break t;if(ue===s&&++Y===v&&(O=S),ue===g&&++fe===c&&(z=S),(De=ve.nextSibling)!==null)break;ve=ue,ue=ve.parentNode}ve=De}s=O===-1||z===-1?null:{start:O,end:z}}else s=null}s=s||{start:0,end:0}}else s=null;for(lu={focusedElem:n,selectionRange:s},Wa=!1,ze=o;ze!==null;)if(o=ze,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,ze=n;else for(;ze!==null;){o=ze;try{var Me=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Me!==null){var Ue=Me.memoizedProps,Qt=Me.memoizedState,q=o.stateNode,I=q.getSnapshotBeforeUpdate(o.elementType===o.type?Ue:fn(o.type,Ue),Qt);q.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var H=o.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(ke){Zt(o,o.return,ke)}if(n=o.sibling,n!==null){n.return=o.return,ze=n;break}ze=o.return}return Me=Sh,Sh=!1,Me}function $o(n,o,s){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var v=c=c.next;do{if((v.tag&n)===n){var g=v.destroy;v.destroy=void 0,g!==void 0&&Zu(o,s,g)}v=v.next}while(v!==c)}}function kl(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&n)===n){var c=s.create;s.destroy=c()}s=s.next}while(s!==o)}}function Yu(n){var o=n.ref;if(o!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof o=="function"?o(n):o.current=n}}function bh(n){var o=n.alternate;o!==null&&(n.alternate=null,bh(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[wn],delete o[Wo],delete o[fu],delete o[vg],delete o[pg])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function kh(n){return n.tag===5||n.tag===3||n.tag===4}function Ch(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||kh(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Qu(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.nodeType===8?s.parentNode.insertBefore(n,o):s.insertBefore(n,o):(s.nodeType===8?(o=s.parentNode,o.insertBefore(n,s)):(o=s,o.appendChild(n)),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=el));else if(c!==4&&(n=n.child,n!==null))for(Qu(n,o,s),n=n.sibling;n!==null;)Qu(n,o,s),n=n.sibling}function Ju(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Ju(n,o,s),n=n.sibling;n!==null;)Ju(n,o,s),n=n.sibling}var pr=null,dn=!1;function ei(n,o,s){for(s=s.child;s!==null;)Fh(n,o,s),s=s.sibling}function Fh(n,o,s){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(Ma,s)}catch{}switch(s.tag){case 5:kr||no(s,o);case 6:var c=pr,v=dn;pr=null,ei(n,o,s),pr=c,dn=v,pr!==null&&(dn?(n=pr,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):pr.removeChild(s.stateNode));break;case 18:pr!==null&&(dn?(n=pr,s=s.stateNode,n.nodeType===8?cu(n.parentNode,s):n.nodeType===1&&cu(n,s),Oo(n)):cu(pr,s.stateNode));break;case 4:c=pr,v=dn,pr=s.stateNode.containerInfo,dn=!0,ei(n,o,s),pr=c,dn=v;break;case 0:case 11:case 14:case 15:if(!kr&&(c=s.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){v=c=c.next;do{var g=v,S=g.destroy;g=g.tag,S!==void 0&&((g&2)!==0||(g&4)!==0)&&Zu(s,o,S),v=v.next}while(v!==c)}ei(n,o,s);break;case 1:if(!kr&&(no(s,o),c=s.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=s.memoizedProps,c.state=s.memoizedState,c.componentWillUnmount()}catch(O){Zt(s,o,O)}ei(n,o,s);break;case 21:ei(n,o,s);break;case 22:s.mode&1?(kr=(c=kr)||s.memoizedState!==null,ei(n,o,s),kr=c):ei(n,o,s);break;default:ei(n,o,s)}}function Ph(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new Og),o.forEach(function(c){var v=Vg.bind(null,n,c);s.has(c)||(s.add(c),c.then(v,v))})}}function hn(n,o){var s=o.deletions;if(s!==null)for(var c=0;cv&&(v=S),c&=~g}if(c=v,c=Yt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*zg(c/1960))-c,10n?16:n,ri===null)var c=!1;else{if(n=ri,ri=null,Tl=0,(St&6)!==0)throw Error(t(331));var v=St;for(St|=4,ze=n.current;ze!==null;){var g=ze,S=g.child;if((ze.flags&16)!==0){var O=g.deletions;if(O!==null){for(var z=0;zYt()-ec?Ti(n,0):$u|=s),zr(n,o)}function Uh(n,o){o===0&&((n.mode&1)===0?o=1:(o=Ba,Ba<<=1,(Ba&130023424)===0&&(Ba=4194304)));var s=Pr();n=On(n,o),n!==null&&(Po(n,o,s),zr(n,s))}function Lg(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),Uh(n,s)}function Vg(n,o){var s=0;switch(n.tag){case 13:var c=n.stateNode,v=n.memoizedState;v!==null&&(s=v.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(t(314))}c!==null&&c.delete(o),Uh(n,s)}var Lh;Lh=function(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps||Dr.current)Ar=!0;else{if((n.lanes&s)===0&&(o.flags&128)===0)return Ar=!1,Tg(n,o,s);Ar=(n.flags&131072)!==0}else Ar=!1,qt&&(o.flags&1048576)!==0&&xd(o,al,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;Sl(n,o),n=o.pendingProps;var v=Zi(o,wr.current);eo(o,s),v=Ou(null,o,c,n,v,s);var g=Au();return o.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Or(c)?(g=!0,nl(o)):g=!1,o.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,Cu(o),v.updater=xl,o.stateNode=v,v._reactInternals=o,Bu(o,c,n,s),o=Wu(null,o,c,!0,g,s)):(o.tag=0,qt&&g&&vu(o),Fr(null,o,v,s),o=o.child),o;case 16:c=o.elementType;e:{switch(Sl(n,o),n=o.pendingProps,v=c._init,c=v(c._payload),o.type=c,v=o.tag=qg(c),n=fn(c,n),v){case 0:o=Vu(null,o,c,n,s);break e;case 1:o=dh(null,o,c,n,s);break e;case 11:o=lh(null,o,c,n,s);break e;case 14:o=sh(null,o,c,fn(c.type,n),s);break e}throw Error(t(306,c,""))}return o;case 0:return c=o.type,v=o.pendingProps,v=o.elementType===c?v:fn(c,v),Vu(n,o,c,v,s);case 1:return c=o.type,v=o.pendingProps,v=o.elementType===c?v:fn(c,v),dh(n,o,c,v,s);case 3:e:{if(hh(o),n===null)throw Error(t(387));c=o.pendingProps,g=o.memoizedState,v=g.element,Td(n,o),dl(o,c,null,s);var S=o.memoizedState;if(c=S.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=g,o.memoizedState=g,o.flags&256){v=ro(Error(t(423)),o),o=vh(n,o,c,s,v);break e}else if(c!==v){v=ro(Error(t(424)),o),o=vh(n,o,c,s,v);break e}else for(Lr=Zn(o.stateNode.containerInfo.firstChild),Ur=o,qt=!0,cn=null,s=Pd(o,null,c,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Ji(),c===v){o=Nn(n,o,s);break e}Fr(n,o,c,s)}o=o.child}return o;case 5:return Od(o),n===null&&mu(o),c=o.type,v=o.pendingProps,g=n!==null?n.memoizedProps:null,S=v.children,su(c,v)?S=null:g!==null&&su(c,g)&&(o.flags|=32),fh(n,o),Fr(n,o,S,s),o.child;case 6:return n===null&&mu(o),null;case 13:return ph(n,o,s);case 4:return Fu(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=_i(o,null,c,s):Fr(n,o,c,s),o.child;case 11:return c=o.type,v=o.pendingProps,v=o.elementType===c?v:fn(c,v),lh(n,o,c,v,s);case 7:return Fr(n,o,o.pendingProps,s),o.child;case 8:return Fr(n,o,o.pendingProps.children,s),o.child;case 12:return Fr(n,o,o.pendingProps.children,s),o.child;case 10:e:{if(c=o.type._context,v=o.pendingProps,g=o.memoizedProps,S=v.value,Bt(ul,c._currentValue),c._currentValue=S,g!==null)if(un(g.value,S)){if(g.children===v.children&&!Dr.current){o=Nn(n,o,s);break e}}else for(g=o.child,g!==null&&(g.return=o);g!==null;){var O=g.dependencies;if(O!==null){S=g.child;for(var z=O.firstContext;z!==null;){if(z.context===c){if(g.tag===1){z=An(-1,s&-s),z.tag=2;var Y=g.updateQueue;if(Y!==null){Y=Y.shared;var fe=Y.pending;fe===null?z.next=z:(z.next=fe.next,fe.next=z),Y.pending=z}}g.lanes|=s,z=g.alternate,z!==null&&(z.lanes|=s),bu(g.return,s,o),O.lanes|=s;break}z=z.next}}else if(g.tag===10)S=g.type===o.type?null:g.child;else if(g.tag===18){if(S=g.return,S===null)throw Error(t(341));S.lanes|=s,O=S.alternate,O!==null&&(O.lanes|=s),bu(S,s,o),S=g.sibling}else S=g.child;if(S!==null)S.return=g;else for(S=g;S!==null;){if(S===o){S=null;break}if(g=S.sibling,g!==null){g.return=S.return,S=g;break}S=S.return}g=S}Fr(n,o,v.children,s),o=o.child}return o;case 9:return v=o.type,c=o.pendingProps.children,eo(o,s),v=Zr(v),c=c(v),o.flags|=1,Fr(n,o,c,s),o.child;case 14:return c=o.type,v=fn(c,o.pendingProps),v=fn(c.type,v),sh(n,o,c,v,s);case 15:return uh(n,o,o.type,o.pendingProps,s);case 17:return c=o.type,v=o.pendingProps,v=o.elementType===c?v:fn(c,v),Sl(n,o),o.tag=1,Or(c)?(n=!0,nl(o)):n=!1,eo(o,s),eh(o,c,v),Bu(o,c,v,s),Wu(null,o,c,!0,n,s);case 19:return mh(n,o,s);case 22:return ch(n,o,s)}throw Error(t(156,o.tag))};function Vh(n,o){return wf(n,o)}function Wg(n,o,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jr(n,o,s,c){return new Wg(n,o,s,c)}function sc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function qg(n){if(typeof n=="function")return sc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===he)return 11;if(n===Fe)return 14}return 2}function oi(n,o){var s=n.alternate;return s===null?(s=Jr(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function Al(n,o,s,c,v,g){var S=2;if(c=n,typeof n=="function")sc(n)&&(S=1);else if(typeof n=="string")S=5;else e:switch(n){case U:return Di(s.children,v,g,o);case $:S=8,v|=8;break;case te:return n=Jr(12,s,o,v|2),n.elementType=te,n.lanes=g,n;case Z:return n=Jr(13,s,o,v),n.elementType=Z,n.lanes=g,n;case Se:return n=Jr(19,s,o,v),n.elementType=Se,n.lanes=g,n;case se:return Nl(s,v,g,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case ne:S=10;break e;case ae:S=9;break e;case he:S=11;break e;case Fe:S=14;break e;case de:S=16,c=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return o=Jr(S,s,o,v),o.elementType=n,o.type=c,o.lanes=g,o}function Di(n,o,s,c){return n=Jr(7,n,c,o),n.lanes=s,n}function Nl(n,o,s,c){return n=Jr(22,n,c,o),n.elementType=se,n.lanes=s,n.stateNode={isHidden:!1},n}function uc(n,o,s){return n=Jr(6,n,null,o),n.lanes=s,n}function cc(n,o,s){return o=Jr(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function Kg(n,o,s,c,v){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Is(0),this.expirationTimes=Is(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Is(0),this.identifierPrefix=c,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function fc(n,o,s,c,v,g,S,O,z){return n=new Kg(n,o,s,O,z),o===1?(o=1,g===!0&&(o|=8)):o=0,g=Jr(3,null,null,o),n.current=g,g.stateNode=n,g.memoizedState={element:c,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cu(g),n}function Hg(n,o,s){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),mc.exports=nm(),mc.exports}var t0;function om(){if(t0)return Ll;t0=1;var r=im();return Ll.createRoot=r.createRoot,Ll.hydrateRoot=r.hydrateRoot,Ll}var am=om();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var jc=function(r,e){return jc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var a in i)i.hasOwnProperty(a)&&(t[a]=i[a])},jc(r,e)};function we(r,e){jc(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var rt=function(){return rt=Object.assign||function(e){for(var t,i=1,a=arguments.length;i0&&l[l.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!l||h[1]>l[0]&&h[1]>2],e+=vo[(r[i]&3)<<4|r[i+1]>>4],e+=vo[(r[i+1]&15)<<2|r[i+2]>>6],e+=vo[r[i+2]&63];return t%3===2?e=e.substring(0,e.length-1)+"=":t%3===1&&(e=e.substring(0,e.length-2)+"=="),e},r0=function(r){var e=r.length*.75,t=r.length,i,a=0,l,u,f,d;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var h=new Uint8Array(e);for(i=0;i>4,h[a++]=(u&15)<<4|f>>2,h[a++]=(f&3)<<6|d&63;return h},um=/^(data)?:?([\w\/\+]+)?;?(charset=[\w-]+|base64)?.*,/i,cm=function(r){var e=r.trim(),t=e.substring(0,100),i=t.match(um);if(!i)return r0(e);var a=i[0],l=e.substring(a.length);return r0(l)},tt=function(r){return r.charCodeAt(0)},fm=function(r){return r.codePointAt(0)},Ta=function(r,e){return yn(r.toString(16),e,"0").toUpperCase()},ys=function(r){return Ta(r,2)},Mn=function(r){return String.fromCharCode(r)},dm=function(r){return Mn(parseInt(r,16))},yn=function(r,e,t){for(var i="",a=0,l=e-r.length;a=55296&&t<=56319&&r.length>a&&(i=r.charCodeAt(a),i>=56320&&i<=57343&&(l=2)),[r.slice(e,e+l),l]},pm=function(r){for(var e=[],t=0,i=r.length;tt&&h(),u+=x,f+=w}}return h(),d},ym=/^D:(\d\d\d\d)(\d\d)?(\d\d)?(\d\d)?(\d\d)?(\d\d)?([+\-Z])?(\d\d)?'?(\d\d)?'?$/,iv=function(r){var e=r.match(ym);if(e){var t=e[1],i=e[2],a=i===void 0?"01":i,l=e[3],u=l===void 0?"01":l,f=e[4],d=f===void 0?"00":f,h=e[5],m=h===void 0?"00":h,y=e[6],x=y===void 0?"00":y,w=e[7],C=w===void 0?"Z":w,E=e[8],R=E===void 0?"00":E,D=e[9],L=D===void 0?"00":D,j=C==="Z"?"Z":""+C+R+":"+L,W=new Date(t+"-"+a+"-"+u+"T"+d+":"+m+":"+x+j);return W}},Zc=function(r,e){for(var t,i=0,a;i=0&&r<=65535},Rm=function(r){return r>=65536&&r<=1114111},av=function(r){return Math.floor((r-65536)/1024)+55296},lv=function(r){return(r-65536)%1024+56320},ci;(function(r){r.BigEndian="BigEndian",r.LittleEndian="LittleEndian"})(ci||(ci={}));var aa="�".codePointAt(0),sv=function(r,e){if(e===void 0&&(e=!0),r.length<=1)return String.fromCodePoint(aa);for(var t=e?Om(r):ci.BigEndian,i=e?2:0,a=[];r.length-i>=2;){var l=i0(r[i++],r[i++],t);if(Dm(l))if(r.length-i<2)a.push(aa);else{var u=i0(r[i++],r[i++],t);n0(u)?a.push(l,u):a.push(aa)}else n0(l)?(i+=2,a.push(aa)):a.push(l)}return i=55296&&r<=56319},n0=function(r){return r>=56320&&r<=57343},i0=function(r,e,t){if(t===ci.LittleEndian)return e<<8|r;if(t===ci.BigEndian)return r<<8|e;throw new Error("Invalid byteOrder: "+t)},Om=function(r){return uv(r)?ci.BigEndian:cv(r)?ci.LittleEndian:ci.BigEndian},uv=function(r){return r[0]===254&&r[1]===255},cv=function(r){return r[0]===255&&r[1]===254},fv=function(r){return uv(r)||cv(r)},Am=function(r){var e=String(r);if(Math.abs(r)<1){var t=parseInt(r.toString().split("e-")[1]);if(t){var i=r<0;i&&(r*=-1),r*=Math.pow(10,t-1),e="0."+new Array(t).join("0")+r.toString().substring(2),i&&(e="-"+e)}}else{var t=parseInt(r.toString().split("+")[1]);t>20&&(t-=20,r/=Math.pow(10,t),e=r.toString()+new Array(t+1).join("0"))}return e},es=function(r){return Math.ceil(r.toString(2).length/8)},so=function(r){for(var e=new Uint8Array(es(r)),t=1;t<=e.length;t++)e[t-1]=r>>(e.length-t)*8;return e},Da=function(r){throw new Error(r)},wc={},o0;function gi(){return o0||(o0=1,(function(r){var e=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function t(l,u){return Object.prototype.hasOwnProperty.call(l,u)}r.assign=function(l){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var f=u.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var d in f)t(f,d)&&(l[d]=f[d])}}return l},r.shrinkBuf=function(l,u){return l.length===u?l:l.subarray?l.subarray(0,u):(l.length=u,l)};var i={arraySet:function(l,u,f,d,h){if(u.subarray&&l.subarray){l.set(u.subarray(f,f+d),h);return}for(var m=0;m=0;)F[oe]=0}var u=0,f=1,d=2,h=3,m=258,y=29,x=256,w=x+1+y,C=30,E=19,R=2*w+1,D=15,L=16,j=7,W=256,K=16,B=17,U=18,$=[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],te=[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],ne=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],he=512,Z=new Array((w+2)*2);l(Z);var Se=new Array(C*2);l(Se);var Fe=new Array(he);l(Fe);var de=new Array(m-h+1);l(de);var se=new Array(y);l(se);var ie=new Array(C);l(ie);function me(F,oe,re,Pe,M){this.static_tree=F,this.extra_bits=oe,this.extra_base=re,this.elems=Pe,this.max_length=M,this.has_stree=F&&F.length}var be,A,J;function Oe(F,oe){this.dyn_tree=F,this.max_code=0,this.stat_desc=oe}function Ne(F){return F<256?Fe[F]:Fe[256+(F>>>7)]}function Ve(F,oe){F.pending_buf[F.pending++]=oe&255,F.pending_buf[F.pending++]=oe>>>8&255}function Ae(F,oe,re){F.bi_valid>L-re?(F.bi_buf|=oe<>L-F.bi_valid,F.bi_valid+=re-L):(F.bi_buf|=oe<>>=1,re<<=1;while(--oe>0);return re>>>1}function it(F){F.bi_valid===16?(Ve(F,F.bi_buf),F.bi_buf=0,F.bi_valid=0):F.bi_valid>=8&&(F.pending_buf[F.pending++]=F.bi_buf&255,F.bi_buf>>=8,F.bi_valid-=8)}function kt(F,oe){var re=oe.dyn_tree,Pe=oe.max_code,M=oe.stat_desc.static_tree,_=oe.stat_desc.has_stree,b=oe.stat_desc.extra_bits,le=oe.stat_desc.extra_base,Ge=oe.stat_desc.max_length,p,G,Q,k,N,X,Ie=0;for(k=0;k<=D;k++)F.bl_count[k]=0;for(re[F.heap[F.heap_max]*2+1]=0,p=F.heap_max+1;pGe&&(k=Ge,Ie++),re[G*2+1]=k,!(G>Pe)&&(F.bl_count[k]++,N=0,G>=le&&(N=b[G-le]),X=re[G*2],F.opt_len+=X*(k+N),_&&(F.static_len+=X*(M[G*2+1]+N)));if(Ie!==0){do{for(k=Ge-1;F.bl_count[k]===0;)k--;F.bl_count[k]--,F.bl_count[k+1]+=2,F.bl_count[Ge]--,Ie-=2}while(Ie>0);for(k=Ge;k!==0;k--)for(G=F.bl_count[k];G!==0;)Q=F.heap[--p],!(Q>Pe)&&(re[Q*2+1]!==k&&(F.opt_len+=(k-re[Q*2+1])*re[Q*2],re[Q*2+1]=k),G--)}}function $t(F,oe,re){var Pe=new Array(D+1),M=0,_,b;for(_=1;_<=D;_++)Pe[_]=M=M+re[_-1]<<1;for(b=0;b<=oe;b++){var le=F[b*2+1];le!==0&&(F[b*2]=Ce(Pe[le]++,le))}}function wt(){var F,oe,re,Pe,M,_=new Array(D+1);for(re=0,Pe=0;Pe>=7;Pe8?Ve(F,F.bi_buf):F.bi_valid>0&&(F.pending_buf[F.pending++]=F.bi_buf),F.bi_buf=0,F.bi_valid=0}function hr(F,oe,re,Pe){xr(F),Ve(F,re),Ve(F,~re),r.arraySet(F.pending_buf,F.window,oe,re,F.pending),F.pending+=re}function sr(F,oe,re,Pe){var M=oe*2,_=re*2;return F[M]>1;b>=1;b--)Ot(F,re,b);p=_;do b=F.heap[1],F.heap[1]=F.heap[F.heap_len--],Ot(F,re,1),le=F.heap[1],F.heap[--F.heap_max]=b,F.heap[--F.heap_max]=le,re[p*2]=re[b*2]+re[le*2],F.depth[p]=(F.depth[b]>=F.depth[le]?F.depth[b]:F.depth[le])+1,re[b*2+1]=re[le*2+1]=p,F.heap[1]=p++,Ot(F,re,1);while(F.heap_len>=2);F.heap[--F.heap_max]=F.heap[1],kt(F,oe),$t(re,Ge,F.bl_count)}function Be(F,oe,re){var Pe,M=-1,_,b=oe[1],le=0,Ge=7,p=4;for(b===0&&(Ge=138,p=3),oe[(re+1)*2+1]=65535,Pe=0;Pe<=re;Pe++)_=b,b=oe[(Pe+1)*2+1],!(++le=3&&F.bl_tree[ae[oe]*2+1]===0;oe--);return F.opt_len+=3*(oe+1)+5+5+4,oe}function ct(F,oe,re,Pe){var M;for(Ae(F,oe-257,5),Ae(F,re-1,5),Ae(F,Pe-4,4),M=0;M>>=1)if(oe&1&&F.dyn_ltree[re*2]!==0)return t;if(F.dyn_ltree[18]!==0||F.dyn_ltree[20]!==0||F.dyn_ltree[26]!==0)return i;for(re=32;re0?(F.strm.data_type===a&&(F.strm.data_type=zt(F)),ee(F,F.l_desc),ee(F,F.d_desc),b=Re(F),M=F.opt_len+3+7>>>3,_=F.static_len+3+7>>>3,_<=M&&(M=_)):M=_=re+5,re+4<=M&&oe!==-1?At(F,oe,re,Pe):F.strategy===e||_===M?(Ae(F,(f<<1)+(Pe?1:0),3),at(F,Z,Se)):(Ae(F,(d<<1)+(Pe?1:0),3),ct(F,F.l_desc.max_code+1,F.d_desc.max_code+1,b+1),at(F,F.dyn_ltree,F.dyn_dtree)),Wt(F),Pe&&xr(F)}function jt(F,oe,re){return F.pending_buf[F.d_buf+F.last_lit*2]=oe>>>8&255,F.pending_buf[F.d_buf+F.last_lit*2+1]=oe&255,F.pending_buf[F.l_buf+F.last_lit]=re&255,F.last_lit++,oe===0?F.dyn_ltree[re*2]++:(F.matches++,oe--,F.dyn_ltree[(de[re]+x+1)*2]++,F.dyn_dtree[Ne(oe)*2]++),F.last_lit===F.lit_bufsize-1}return Oi._tr_init=It,Oi._tr_stored_block=At,Oi._tr_flush_block=je,Oi._tr_tally=jt,Oi._tr_align=Ct,Oi}var Sc,l0;function dv(){if(l0)return Sc;l0=1;function r(e,t,i,a){for(var l=e&65535|0,u=e>>>16&65535|0,f=0;i!==0;){f=i>2e3?2e3:i,i-=f;do l=l+t[a++]|0,u=u+l|0;while(--f);l%=65521,u%=65521}return l|u<<16|0}return Sc=r,Sc}var bc,s0;function hv(){if(s0)return bc;s0=1;function r(){for(var i,a=[],l=0;l<256;l++){i=l;for(var u=0;u<8;u++)i=i&1?3988292384^i>>>1:i>>>1;a[l]=i}return a}var e=r();function t(i,a,l,u){var f=e,d=u+l;i^=-1;for(var h=u;h>>8^f[(i^a[h])&255];return i^-1}return bc=t,bc}var kc,u0;function Yc(){return u0||(u0=1,kc={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"}),kc}var c0;function zm(){if(c0)return pn;c0=1;var r=gi(),e=Nm(),t=dv(),i=hv(),a=Yc(),l=0,u=1,f=3,d=4,h=5,m=0,y=1,x=-2,w=-3,C=-5,E=-1,R=1,D=2,L=3,j=4,W=0,K=2,B=8,U=9,$=15,te=8,ne=29,ae=256,he=ae+1+ne,Z=30,Se=19,Fe=2*he+1,de=15,se=3,ie=258,me=ie+se+1,be=32,A=42,J=69,Oe=73,Ne=91,Ve=103,Ae=113,Ke=666,Ce=1,it=2,kt=3,$t=4,wt=3;function Wt(p,G){return p.msg=a[G],G}function xr(p){return(p<<1)-(p>4?9:0)}function hr(p){for(var G=p.length;--G>=0;)p[G]=0}function sr(p){var G=p.state,Q=G.pending;Q>p.avail_out&&(Q=p.avail_out),Q!==0&&(r.arraySet(p.output,G.pending_buf,G.pending_out,Q,p.next_out),p.next_out+=Q,G.pending_out+=Q,p.total_out+=Q,p.avail_out-=Q,G.pending-=Q,G.pending===0&&(G.pending_out=0))}function Ot(p,G){e._tr_flush_block(p,p.block_start>=0?p.block_start:-1,p.strstart-p.block_start,G),p.block_start=p.strstart,sr(p.strm)}function at(p,G){p.pending_buf[p.pending++]=G}function ee(p,G){p.pending_buf[p.pending++]=G>>>8&255,p.pending_buf[p.pending++]=G&255}function Be(p,G,Q,k){var N=p.avail_in;return N>k&&(N=k),N===0?0:(p.avail_in-=N,r.arraySet(G,p.input,p.next_in,N,Q),p.state.wrap===1?p.adler=t(p.adler,G,N,Q):p.state.wrap===2&&(p.adler=i(p.adler,G,N,Q)),p.next_in+=N,p.total_in+=N,N)}function ye(p,G){var Q=p.max_chain_length,k=p.strstart,N,X,Ie=p.prev_length,pe=p.nice_match,Ee=p.strstart>p.w_size-me?p.strstart-(p.w_size-me):0,He=p.window,ft=p.w_mask,dt=p.prev,Ye=p.strstart+ie,Pt=He[k+Ie-1],Ut=He[k+Ie];p.prev_length>=p.good_match&&(Q>>=2),pe>p.lookahead&&(pe=p.lookahead);do if(N=G,!(He[N+Ie]!==Ut||He[N+Ie-1]!==Pt||He[N]!==He[k]||He[++N]!==He[k+1])){k+=2,N++;do;while(He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&He[++k]===He[++N]&&kIe){if(p.match_start=G,Ie=X,X>=pe)break;Pt=He[k+Ie-1],Ut=He[k+Ie]}}while((G=dt[G&ft])>Ee&&--Q!==0);return Ie<=p.lookahead?Ie:p.lookahead}function Re(p){var G=p.w_size,Q,k,N,X,Ie;do{if(X=p.window_size-p.lookahead-p.strstart,p.strstart>=G+(G-me)){r.arraySet(p.window,p.window,G,G,0),p.match_start-=G,p.strstart-=G,p.block_start-=G,k=p.hash_size,Q=k;do N=p.head[--Q],p.head[Q]=N>=G?N-G:0;while(--k);k=G,Q=k;do N=p.prev[--Q],p.prev[Q]=N>=G?N-G:0;while(--k);X+=G}if(p.strm.avail_in===0)break;if(k=Be(p.strm,p.window,p.strstart+p.lookahead,X),p.lookahead+=k,p.lookahead+p.insert>=se)for(Ie=p.strstart-p.insert,p.ins_h=p.window[Ie],p.ins_h=(p.ins_h<p.pending_buf_size-5&&(Q=p.pending_buf_size-5);;){if(p.lookahead<=1){if(Re(p),p.lookahead===0&&G===l)return Ce;if(p.lookahead===0)break}p.strstart+=p.lookahead,p.lookahead=0;var k=p.block_start+Q;if((p.strstart===0||p.strstart>=k)&&(p.lookahead=p.strstart-k,p.strstart=k,Ot(p,!1),p.strm.avail_out===0)||p.strstart-p.block_start>=p.w_size-me&&(Ot(p,!1),p.strm.avail_out===0))return Ce}return p.insert=0,G===d?(Ot(p,!0),p.strm.avail_out===0?kt:$t):(p.strstart>p.block_start&&(Ot(p,!1),p.strm.avail_out===0),Ce)}function zt(p,G){for(var Q,k;;){if(p.lookahead=se&&(p.ins_h=(p.ins_h<=se)if(k=e._tr_tally(p,p.strstart-p.match_start,p.match_length-se),p.lookahead-=p.match_length,p.match_length<=p.max_lazy_match&&p.lookahead>=se){p.match_length--;do p.strstart++,p.ins_h=(p.ins_h<=se&&(p.ins_h=(p.ins_h<4096)&&(p.match_length=se-1)),p.prev_length>=se&&p.match_length<=p.prev_length){N=p.strstart+p.lookahead-se,k=e._tr_tally(p,p.strstart-1-p.prev_match,p.prev_length-se),p.lookahead-=p.prev_length-1,p.prev_length-=2;do++p.strstart<=N&&(p.ins_h=(p.ins_h<=se&&p.strstart>0&&(N=p.strstart-1,k=Ie[N],k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N])){X=p.strstart+ie;do;while(k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&k===Ie[++N]&&Np.lookahead&&(p.match_length=p.lookahead)}if(p.match_length>=se?(Q=e._tr_tally(p,1,p.match_length-se),p.lookahead-=p.match_length,p.strstart+=p.match_length,p.match_length=0):(Q=e._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++),Q&&(Ot(p,!1),p.strm.avail_out===0))return Ce}return p.insert=0,G===d?(Ot(p,!0),p.strm.avail_out===0?kt:$t):p.last_lit&&(Ot(p,!1),p.strm.avail_out===0)?Ce:it}function At(p,G){for(var Q;;){if(p.lookahead===0&&(Re(p),p.lookahead===0)){if(G===l)return Ce;break}if(p.match_length=0,Q=e._tr_tally(p,0,p.window[p.strstart]),p.lookahead--,p.strstart++,Q&&(Ot(p,!1),p.strm.avail_out===0))return Ce}return p.insert=0,G===d?(Ot(p,!0),p.strm.avail_out===0?kt:$t):p.last_lit&&(Ot(p,!1),p.strm.avail_out===0)?Ce:it}function Ct(p,G,Q,k,N){this.good_length=p,this.max_lazy=G,this.nice_length=Q,this.max_chain=k,this.func=N}var je;je=[new Ct(0,0,0,0,ct),new Ct(4,4,8,4,zt),new Ct(4,5,16,8,zt),new Ct(4,6,32,32,zt),new Ct(4,4,16,16,Te),new Ct(8,16,32,32,Te),new Ct(8,16,128,128,Te),new Ct(8,32,128,256,Te),new Ct(32,128,258,1024,Te),new Ct(32,258,258,4096,Te)];function jt(p){p.window_size=2*p.w_size,hr(p.head),p.max_lazy_match=je[p.level].max_lazy,p.good_match=je[p.level].good_length,p.nice_match=je[p.level].nice_length,p.max_chain_length=je[p.level].max_chain,p.strstart=0,p.block_start=0,p.lookahead=0,p.insert=0,p.match_length=p.prev_length=se-1,p.match_available=0,p.ins_h=0}function F(){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=B,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 r.Buf16(Fe*2),this.dyn_dtree=new r.Buf16((2*Z+1)*2),this.bl_tree=new r.Buf16((2*Se+1)*2),hr(this.dyn_ltree),hr(this.dyn_dtree),hr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(de+1),this.heap=new r.Buf16(2*he+1),hr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*he+1),hr(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 oe(p){var G;return!p||!p.state?Wt(p,x):(p.total_in=p.total_out=0,p.data_type=K,G=p.state,G.pending=0,G.pending_out=0,G.wrap<0&&(G.wrap=-G.wrap),G.status=G.wrap?A:Ae,p.adler=G.wrap===2?0:1,G.last_flush=l,e._tr_init(G),m)}function re(p){var G=oe(p);return G===m&&jt(p.state),G}function Pe(p,G){return!p||!p.state||p.state.wrap!==2?x:(p.state.gzhead=G,m)}function M(p,G,Q,k,N,X){if(!p)return x;var Ie=1;if(G===E&&(G=6),k<0?(Ie=0,k=-k):k>15&&(Ie=2,k-=16),N<1||N>U||Q!==B||k<8||k>15||G<0||G>9||X<0||X>j)return Wt(p,x);k===8&&(k=9);var pe=new F;return p.state=pe,pe.strm=p,pe.wrap=Ie,pe.gzhead=null,pe.w_bits=k,pe.w_size=1<h||G<0)return p?Wt(p,x):x;if(k=p.state,!p.output||!p.input&&p.avail_in!==0||k.status===Ke&&G!==d)return Wt(p,p.avail_out===0?C:x);if(k.strm=p,Q=k.last_flush,k.last_flush=G,k.status===A)if(k.wrap===2)p.adler=0,at(k,31),at(k,139),at(k,8),k.gzhead?(at(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),at(k,k.gzhead.time&255),at(k,k.gzhead.time>>8&255),at(k,k.gzhead.time>>16&255),at(k,k.gzhead.time>>24&255),at(k,k.level===9?2:k.strategy>=D||k.level<2?4:0),at(k,k.gzhead.os&255),k.gzhead.extra&&k.gzhead.extra.length&&(at(k,k.gzhead.extra.length&255),at(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(p.adler=i(p.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=J):(at(k,0),at(k,0),at(k,0),at(k,0),at(k,0),at(k,k.level===9?2:k.strategy>=D||k.level<2?4:0),at(k,wt),k.status=Ae);else{var Ie=B+(k.w_bits-8<<4)<<8,pe=-1;k.strategy>=D||k.level<2?pe=0:k.level<6?pe=1:k.level===6?pe=2:pe=3,Ie|=pe<<6,k.strstart!==0&&(Ie|=be),Ie+=31-Ie%31,k.status=Ae,ee(k,Ie),k.strstart!==0&&(ee(k,p.adler>>>16),ee(k,p.adler&65535)),p.adler=1}if(k.status===J)if(k.gzhead.extra){for(N=k.pending;k.gzindex<(k.gzhead.extra.length&65535)&&!(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>N&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),sr(p),N=k.pending,k.pending===k.pending_buf_size));)at(k,k.gzhead.extra[k.gzindex]&255),k.gzindex++;k.gzhead.hcrc&&k.pending>N&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),k.gzindex===k.gzhead.extra.length&&(k.gzindex=0,k.status=Oe)}else k.status=Oe;if(k.status===Oe)if(k.gzhead.name){N=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>N&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),sr(p),N=k.pending,k.pending===k.pending_buf_size)){X=1;break}k.gzindexN&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),X===0&&(k.gzindex=0,k.status=Ne)}else k.status=Ne;if(k.status===Ne)if(k.gzhead.comment){N=k.pending;do{if(k.pending===k.pending_buf_size&&(k.gzhead.hcrc&&k.pending>N&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),sr(p),N=k.pending,k.pending===k.pending_buf_size)){X=1;break}k.gzindexN&&(p.adler=i(p.adler,k.pending_buf,k.pending-N,N)),X===0&&(k.status=Ve)}else k.status=Ve;if(k.status===Ve&&(k.gzhead.hcrc?(k.pending+2>k.pending_buf_size&&sr(p),k.pending+2<=k.pending_buf_size&&(at(k,p.adler&255),at(k,p.adler>>8&255),p.adler=0,k.status=Ae)):k.status=Ae),k.pending!==0){if(sr(p),p.avail_out===0)return k.last_flush=-1,m}else if(p.avail_in===0&&xr(G)<=xr(Q)&&G!==d)return Wt(p,C);if(k.status===Ke&&p.avail_in!==0)return Wt(p,C);if(p.avail_in!==0||k.lookahead!==0||G!==l&&k.status!==Ke){var Ee=k.strategy===D?At(k,G):k.strategy===L?It(k,G):je[k.level].func(k,G);if((Ee===kt||Ee===$t)&&(k.status=Ke),Ee===Ce||Ee===kt)return p.avail_out===0&&(k.last_flush=-1),m;if(Ee===it&&(G===u?e._tr_align(k):G!==h&&(e._tr_stored_block(k,0,0,!1),G===f&&(hr(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),sr(p),p.avail_out===0))return k.last_flush=-1,m}return G!==d?m:k.wrap<=0?y:(k.wrap===2?(at(k,p.adler&255),at(k,p.adler>>8&255),at(k,p.adler>>16&255),at(k,p.adler>>24&255),at(k,p.total_in&255),at(k,p.total_in>>8&255),at(k,p.total_in>>16&255),at(k,p.total_in>>24&255)):(ee(k,p.adler>>>16),ee(k,p.adler&65535)),sr(p),k.wrap>0&&(k.wrap=-k.wrap),k.pending!==0?m:y)}function le(p){var G;return!p||!p.state?x:(G=p.state.status,G!==A&&G!==J&&G!==Oe&&G!==Ne&&G!==Ve&&G!==Ae&&G!==Ke?Wt(p,x):(p.state=null,G===Ae?Wt(p,w):m))}function Ge(p,G){var Q=G.length,k,N,X,Ie,pe,Ee,He,ft;if(!p||!p.state||(k=p.state,Ie=k.wrap,Ie===2||Ie===1&&k.status!==A||k.lookahead))return x;for(Ie===1&&(p.adler=t(p.adler,G,Q,0)),k.wrap=0,Q>=k.w_size&&(Ie===0&&(hr(k.head),k.strstart=0,k.block_start=0,k.insert=0),ft=new r.Buf8(k.w_size),r.arraySet(ft,G,Q-k.w_size,k.w_size,0),G=ft,Q=k.w_size),pe=p.avail_in,Ee=p.next_in,He=p.input,p.avail_in=Q,p.next_in=0,p.input=G,Re(k);k.lookahead>=se;){N=k.strstart,X=k.lookahead-(se-1);do k.ins_h=(k.ins_h<=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;i[254]=i[254]=1,Ai.string2buf=function(u){var f,d,h,m,y,x=u.length,w=0;for(m=0;m>>6,f[y++]=128|d&63):d<65536?(f[y++]=224|d>>>12,f[y++]=128|d>>>6&63,f[y++]=128|d&63):(f[y++]=240|d>>>18,f[y++]=128|d>>>12&63,f[y++]=128|d>>>6&63,f[y++]=128|d&63);return f};function l(u,f){if(f<65534&&(u.subarray&&t||!u.subarray&&e))return String.fromCharCode.apply(null,r.shrinkBuf(u,f));for(var d="",h=0;h4){w[h++]=65533,d+=y-1;continue}for(m&=y===2?31:y===3?15:7;y>1&&d1){w[h++]=65533;continue}m<65536?w[h++]=m:(m-=65536,w[h++]=55296|m>>10&1023,w[h++]=56320|m&1023)}return l(w,h)},Ai.utf8border=function(u,f){var d;for(f=f||u.length,f>u.length&&(f=u.length),d=f-1;d>=0&&(u[d]&192)===128;)d--;return d<0||d===0?f:d+i[u[d]]>f?d:f},Ai}var Cc,d0;function pv(){if(d0)return Cc;d0=1;function r(){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}return Cc=r,Cc}var h0;function jm(){if(h0)return uo;h0=1;var r=zm(),e=gi(),t=vv(),i=Yc(),a=pv(),l=Object.prototype.toString,u=0,f=4,d=0,h=1,m=2,y=-1,x=0,w=8;function C(L){if(!(this instanceof C))return new C(L);this.options=e.assign({level:y,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:x,to:""},L||{});var j=this.options;j.raw&&j.windowBits>0?j.windowBits=-j.windowBits:j.gzip&&j.windowBits>0&&j.windowBits<16&&(j.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var W=r.deflateInit2(this.strm,j.level,j.method,j.windowBits,j.memLevel,j.strategy);if(W!==d)throw new Error(i[W]);if(j.header&&r.deflateSetHeader(this.strm,j.header),j.dictionary){var K;if(typeof j.dictionary=="string"?K=t.string2buf(j.dictionary):l.call(j.dictionary)==="[object ArrayBuffer]"?K=new Uint8Array(j.dictionary):K=j.dictionary,W=r.deflateSetDictionary(this.strm,K),W!==d)throw new Error(i[W]);this._dict_set=!0}}C.prototype.push=function(L,j){var W=this.strm,K=this.options.chunkSize,B,U;if(this.ended)return!1;U=j===~~j?j:j===!0?f:u,typeof L=="string"?W.input=t.string2buf(L):l.call(L)==="[object ArrayBuffer]"?W.input=new Uint8Array(L):W.input=L,W.next_in=0,W.avail_in=W.input.length;do{if(W.avail_out===0&&(W.output=new e.Buf8(K),W.next_out=0,W.avail_out=K),B=r.deflate(W,U),B!==h&&B!==d)return this.onEnd(B),this.ended=!0,!1;(W.avail_out===0||W.avail_in===0&&(U===f||U===m))&&(this.options.to==="string"?this.onData(t.buf2binstring(e.shrinkBuf(W.output,W.next_out))):this.onData(e.shrinkBuf(W.output,W.next_out)))}while((W.avail_in>0||W.avail_out===0)&&B!==h);return U===f?(B=r.deflateEnd(this.strm),this.onEnd(B),this.ended=!0,B===d):(U===m&&(this.onEnd(d),W.avail_out=0),!0)},C.prototype.onData=function(L){this.chunks.push(L)},C.prototype.onEnd=function(L){L===d&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=L,this.msg=this.strm.msg};function E(L,j){var W=new C(j);if(W.push(L,!0),W.err)throw W.msg||i[W.err];return W.result}function R(L,j){return j=j||{},j.raw=!0,E(L,j)}function D(L,j){return j=j||{},j.gzip=!0,E(L,j)}return uo.Deflate=C,uo.deflate=E,uo.deflateRaw=R,uo.gzip=D,uo}var co={},_r={},Fc,v0;function Mm(){if(v0)return Fc;v0=1;var r=30,e=12;return Fc=function(i,a){var l,u,f,d,h,m,y,x,w,C,E,R,D,L,j,W,K,B,U,$,te,ne,ae,he,Z;l=i.state,u=i.next_in,he=i.input,f=u+(i.avail_in-5),d=i.next_out,Z=i.output,h=d-(a-i.avail_out),m=d+(i.avail_out-257),y=l.dmax,x=l.wsize,w=l.whave,C=l.wnext,E=l.window,R=l.hold,D=l.bits,L=l.lencode,j=l.distcode,W=(1<>>24,R>>>=U,D-=U,U=B>>>16&255,U===0)Z[d++]=B&65535;else if(U&16){$=B&65535,U&=15,U&&(D>>=U,D-=U),D<15&&(R+=he[u++]<>>24,R>>>=U,D-=U,U=B>>>16&255,U&16){if(te=B&65535,U&=15,Dy){i.msg="invalid distance too far back",l.mode=r;break e}if(R>>>=U,D-=U,U=d-h,te>U){if(U=te-U,U>w&&l.sane){i.msg="invalid distance too far back",l.mode=r;break e}if(ne=0,ae=E,C===0){if(ne+=x-U,U<$){$-=U;do Z[d++]=E[ne++];while(--U);ne=d-te,ae=Z}}else if(C2;)Z[d++]=ae[ne++],Z[d++]=ae[ne++],Z[d++]=ae[ne++],$-=3;$&&(Z[d++]=ae[ne++],$>1&&(Z[d++]=ae[ne++]))}else{ne=d-te;do Z[d++]=Z[ne++],Z[d++]=Z[ne++],Z[d++]=Z[ne++],$-=3;while($>2);$&&(Z[d++]=Z[ne++],$>1&&(Z[d++]=Z[ne++]))}}else if((U&64)===0){B=j[(B&65535)+(R&(1<>3,u-=$,D-=$<<3,R&=(1<=1&&Oe[$]===0;$--);if(te>$&&(te=$),$===0)return R[D++]=1<<24|64<<16|0,R[D++]=1<<24|64<<16|0,j.bits=1,0;for(U=1;U<$&&Oe[U]===0;U++);for(te0&&(x===a||$!==1))return-1;for(Ne[1]=0,K=1;Kt||x===u&&Z>i)return 1;for(;;){Ke=K-ae,L[B]J?(Ce=Ve[Ae+L[B]],it=be[A+L[B]]):(Ce=96,it=0),Fe=1<>ae)+de]=Ke<<24|Ce<<16|it|0;while(de!==0);for(Fe=1<>=1;if(Fe!==0?(Se&=Fe-1,Se+=Fe):Se=0,B++,--Oe[K]===0){if(K===$)break;K=w[C+L[B]]}if(K>te&&(Se&ie)!==se){for(ae===0&&(ae=te),me+=U,ne=K-ae,he=1<t||x===u&&Z>i)return 1;se=Se&ie,R[se]=te<<24|ne<<16|me-D|0}}return Se!==0&&(R[me+Se]=K-ae<<24|64<<16|0),j.bits=te,0},Pc}var g0;function Bm(){if(g0)return _r;g0=1;var r=gi(),e=dv(),t=hv(),i=Mm(),a=Im(),l=0,u=1,f=2,d=4,h=5,m=6,y=0,x=1,w=2,C=-2,E=-3,R=-4,D=-5,L=8,j=1,W=2,K=3,B=4,U=5,$=6,te=7,ne=8,ae=9,he=10,Z=11,Se=12,Fe=13,de=14,se=15,ie=16,me=17,be=18,A=19,J=20,Oe=21,Ne=22,Ve=23,Ae=24,Ke=25,Ce=26,it=27,kt=28,$t=29,wt=30,Wt=31,xr=32,hr=852,sr=592,Ot=15,at=Ot;function ee(M){return(M>>>24&255)+(M>>>8&65280)+((M&65280)<<8)+((M&255)<<24)}function Be(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ye(M){var _;return!M||!M.state?C:(_=M.state,M.total_in=M.total_out=_.total=0,M.msg="",_.wrap&&(M.adler=_.wrap&1),_.mode=j,_.last=0,_.havedict=0,_.dmax=32768,_.head=null,_.hold=0,_.bits=0,_.lencode=_.lendyn=new r.Buf32(hr),_.distcode=_.distdyn=new r.Buf32(sr),_.sane=1,_.back=-1,y)}function Re(M){var _;return!M||!M.state?C:(_=M.state,_.wsize=0,_.whave=0,_.wnext=0,ye(M))}function ct(M,_){var b,le;return!M||!M.state||(le=M.state,_<0?(b=0,_=-_):(b=(_>>4)+1,_<48&&(_&=15)),_&&(_<8||_>15))?C:(le.window!==null&&le.wbits!==_&&(le.window=null),le.wrap=b,le.wbits=_,Re(M))}function zt(M,_){var b,le;return M?(le=new Be,M.state=le,le.window=null,b=ct(M,_),b!==y&&(M.state=null),b):C}function Te(M){return zt(M,at)}var It=!0,At,Ct;function je(M){if(It){var _;for(At=new r.Buf32(512),Ct=new r.Buf32(32),_=0;_<144;)M.lens[_++]=8;for(;_<256;)M.lens[_++]=9;for(;_<280;)M.lens[_++]=7;for(;_<288;)M.lens[_++]=8;for(a(u,M.lens,0,288,At,0,M.work,{bits:9}),_=0;_<32;)M.lens[_++]=5;a(f,M.lens,0,32,Ct,0,M.work,{bits:5}),It=!1}M.lencode=At,M.lenbits=9,M.distcode=Ct,M.distbits=5}function jt(M,_,b,le){var Ge,p=M.state;return p.window===null&&(p.wsize=1<=p.wsize?(r.arraySet(p.window,_,b-p.wsize,p.wsize,0),p.wnext=0,p.whave=p.wsize):(Ge=p.wsize-p.wnext,Ge>le&&(Ge=le),r.arraySet(p.window,_,b-le,Ge,p.wnext),le-=Ge,le?(r.arraySet(p.window,_,b-le,le,0),p.wnext=le,p.whave=p.wsize):(p.wnext+=Ge,p.wnext===p.wsize&&(p.wnext=0),p.whave>>8&255,b.check=t(b.check,tr,2,0),N=0,X=0,b.mode=W;break}if(b.flags=0,b.head&&(b.head.done=!1),!(b.wrap&1)||(((N&255)<<8)+(N>>8))%31){M.msg="incorrect header check",b.mode=wt;break}if((N&15)!==L){M.msg="unknown compression method",b.mode=wt;break}if(N>>>=4,X-=4,Xt=(N&15)+8,b.wbits===0)b.wbits=Xt;else if(Xt>b.wbits){M.msg="invalid window size",b.mode=wt;break}b.dmax=1<>8&1),b.flags&512&&(tr[0]=N&255,tr[1]=N>>>8&255,b.check=t(b.check,tr,2,0)),N=0,X=0,b.mode=K;case K:for(;X<32;){if(Q===0)break e;Q--,N+=le[p++]<>>8&255,tr[2]=N>>>16&255,tr[3]=N>>>24&255,b.check=t(b.check,tr,4,0)),N=0,X=0,b.mode=B;case B:for(;X<16;){if(Q===0)break e;Q--,N+=le[p++]<>8),b.flags&512&&(tr[0]=N&255,tr[1]=N>>>8&255,b.check=t(b.check,tr,2,0)),N=0,X=0,b.mode=U;case U:if(b.flags&1024){for(;X<16;){if(Q===0)break e;Q--,N+=le[p++]<>>8&255,b.check=t(b.check,tr,2,0)),N=0,X=0}else b.head&&(b.head.extra=null);b.mode=$;case $:if(b.flags&1024&&(Ee=b.length,Ee>Q&&(Ee=Q),Ee&&(b.head&&(Xt=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Array(b.head.extra_len)),r.arraySet(b.head.extra,le,p,Ee,Xt)),b.flags&512&&(b.check=t(b.check,le,Ee,p)),Q-=Ee,p+=Ee,b.length-=Ee),b.length))break e;b.length=0,b.mode=te;case te:if(b.flags&2048){if(Q===0)break e;Ee=0;do Xt=le[p+Ee++],b.head&&Xt&&b.length<65536&&(b.head.name+=String.fromCharCode(Xt));while(Xt&&Ee>9&1,b.head.done=!0),M.adler=b.check=0,b.mode=Se;break;case he:for(;X<32;){if(Q===0)break e;Q--,N+=le[p++]<>>=X&7,X-=X&7,b.mode=it;break}for(;X<3;){if(Q===0)break e;Q--,N+=le[p++]<>>=1,X-=1,N&3){case 0:b.mode=de;break;case 1:if(je(b),b.mode=J,_===m){N>>>=2,X-=2;break e}break;case 2:b.mode=me;break;case 3:M.msg="invalid block type",b.mode=wt}N>>>=2,X-=2;break;case de:for(N>>>=X&7,X-=X&7;X<32;){if(Q===0)break e;Q--,N+=le[p++]<>>16^65535)){M.msg="invalid stored block lengths",b.mode=wt;break}if(b.length=N&65535,N=0,X=0,b.mode=se,_===m)break e;case se:b.mode=ie;case ie:if(Ee=b.length,Ee){if(Ee>Q&&(Ee=Q),Ee>k&&(Ee=k),Ee===0)break e;r.arraySet(Ge,le,p,Ee,G),Q-=Ee,p+=Ee,k-=Ee,G+=Ee,b.length-=Ee;break}b.mode=Se;break;case me:for(;X<14;){if(Q===0)break e;Q--,N+=le[p++]<>>=5,X-=5,b.ndist=(N&31)+1,N>>>=5,X-=5,b.ncode=(N&15)+4,N>>>=4,X-=4,b.nlen>286||b.ndist>30){M.msg="too many length or distance symbols",b.mode=wt;break}b.have=0,b.mode=be;case be:for(;b.have>>=3,X-=3}for(;b.have<19;)b.lens[Co[b.have++]]=0;if(b.lencode=b.lendyn,b.lenbits=7,vr={bits:b.lenbits},Rr=a(l,b.lens,0,19,b.lencode,0,b.work,vr),b.lenbits=vr.bits,Rr){M.msg="invalid code lengths set",b.mode=wt;break}b.have=0,b.mode=A;case A:for(;b.have>>24,Pt=dt>>>16&255,Ut=dt&65535,!(Ye<=X);){if(Q===0)break e;Q--,N+=le[p++]<>>=Ye,X-=Ye,b.lens[b.have++]=Ut;else{if(Ut===16){for(Ir=Ye+2;X>>=Ye,X-=Ye,b.have===0){M.msg="invalid bit length repeat",b.mode=wt;break}Xt=b.lens[b.have-1],Ee=3+(N&3),N>>>=2,X-=2}else if(Ut===17){for(Ir=Ye+3;X>>=Ye,X-=Ye,Xt=0,Ee=3+(N&7),N>>>=3,X-=3}else{for(Ir=Ye+7;X>>=Ye,X-=Ye,Xt=0,Ee=11+(N&127),N>>>=7,X-=7}if(b.have+Ee>b.nlen+b.ndist){M.msg="invalid bit length repeat",b.mode=wt;break}for(;Ee--;)b.lens[b.have++]=Xt}}if(b.mode===wt)break;if(b.lens[256]===0){M.msg="invalid code -- missing end-of-block",b.mode=wt;break}if(b.lenbits=9,vr={bits:b.lenbits},Rr=a(u,b.lens,0,b.nlen,b.lencode,0,b.work,vr),b.lenbits=vr.bits,Rr){M.msg="invalid literal/lengths set",b.mode=wt;break}if(b.distbits=6,b.distcode=b.distdyn,vr={bits:b.distbits},Rr=a(f,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,vr),b.distbits=vr.bits,Rr){M.msg="invalid distances set",b.mode=wt;break}if(b.mode=J,_===m)break e;case J:b.mode=Oe;case Oe:if(Q>=6&&k>=258){M.next_out=G,M.avail_out=k,M.next_in=p,M.avail_in=Q,b.hold=N,b.bits=X,i(M,pe),G=M.next_out,Ge=M.output,k=M.avail_out,p=M.next_in,le=M.input,Q=M.avail_in,N=b.hold,X=b.bits,b.mode===Se&&(b.back=-1);break}for(b.back=0;dt=b.lencode[N&(1<>>24,Pt=dt>>>16&255,Ut=dt&65535,!(Ye<=X);){if(Q===0)break e;Q--,N+=le[p++]<>er)],Ye=dt>>>24,Pt=dt>>>16&255,Ut=dt&65535,!(er+Ye<=X);){if(Q===0)break e;Q--,N+=le[p++]<>>=er,X-=er,b.back+=er}if(N>>>=Ye,X-=Ye,b.back+=Ye,b.length=Ut,Pt===0){b.mode=Ce;break}if(Pt&32){b.back=-1,b.mode=Se;break}if(Pt&64){M.msg="invalid literal/length code",b.mode=wt;break}b.extra=Pt&15,b.mode=Ne;case Ne:if(b.extra){for(Ir=b.extra;X>>=b.extra,X-=b.extra,b.back+=b.extra}b.was=b.length,b.mode=Ve;case Ve:for(;dt=b.distcode[N&(1<>>24,Pt=dt>>>16&255,Ut=dt&65535,!(Ye<=X);){if(Q===0)break e;Q--,N+=le[p++]<>er)],Ye=dt>>>24,Pt=dt>>>16&255,Ut=dt&65535,!(er+Ye<=X);){if(Q===0)break e;Q--,N+=le[p++]<>>=er,X-=er,b.back+=er}if(N>>>=Ye,X-=Ye,b.back+=Ye,Pt&64){M.msg="invalid distance code",b.mode=wt;break}b.offset=Ut,b.extra=Pt&15,b.mode=Ae;case Ae:if(b.extra){for(Ir=b.extra;X>>=b.extra,X-=b.extra,b.back+=b.extra}if(b.offset>b.dmax){M.msg="invalid distance too far back",b.mode=wt;break}b.mode=Ke;case Ke:if(k===0)break e;if(Ee=pe-k,b.offset>Ee){if(Ee=b.offset-Ee,Ee>b.whave&&b.sane){M.msg="invalid distance too far back",b.mode=wt;break}Ee>b.wnext?(Ee-=b.wnext,He=b.wsize-Ee):He=b.wnext-Ee,Ee>b.length&&(Ee=b.length),ft=b.window}else ft=Ge,He=G-b.offset,Ee=b.length;Ee>k&&(Ee=k),k-=Ee,b.length-=Ee;do Ge[G++]=ft[He++];while(--Ee);b.length===0&&(b.mode=Oe);break;case Ce:if(k===0)break e;Ge[G++]=b.length,k--,b.mode=Oe;break;case it:if(b.wrap){for(;X<32;){if(Q===0)break e;Q--,N|=le[p++]<=0&&x.windowBits<16&&(x.windowBits=-x.windowBits,x.windowBits===0&&(x.windowBits=-15)),x.windowBits>=0&&x.windowBits<16&&!(y&&y.windowBits)&&(x.windowBits+=32),x.windowBits>15&&x.windowBits<48&&(x.windowBits&15)===0&&(x.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var w=r.inflateInit2(this.strm,x.windowBits);if(w!==i.Z_OK)throw new Error(a[w]);if(this.header=new u,r.inflateGetHeader(this.strm,this.header),x.dictionary&&(typeof x.dictionary=="string"?x.dictionary=t.string2buf(x.dictionary):f.call(x.dictionary)==="[object ArrayBuffer]"&&(x.dictionary=new Uint8Array(x.dictionary)),x.raw&&(w=r.inflateSetDictionary(this.strm,x.dictionary),w!==i.Z_OK)))throw new Error(a[w])}d.prototype.push=function(y,x){var w=this.strm,C=this.options.chunkSize,E=this.options.dictionary,R,D,L,j,W,K=!1;if(this.ended)return!1;D=x===~~x?x:x===!0?i.Z_FINISH:i.Z_NO_FLUSH,typeof y=="string"?w.input=t.binstring2buf(y):f.call(y)==="[object ArrayBuffer]"?w.input=new Uint8Array(y):w.input=y,w.next_in=0,w.avail_in=w.input.length;do{if(w.avail_out===0&&(w.output=new e.Buf8(C),w.next_out=0,w.avail_out=C),R=r.inflate(w,i.Z_NO_FLUSH),R===i.Z_NEED_DICT&&E&&(R=r.inflateSetDictionary(this.strm,E)),R===i.Z_BUF_ERROR&&K===!0&&(R=i.Z_OK,K=!1),R!==i.Z_STREAM_END&&R!==i.Z_OK)return this.onEnd(R),this.ended=!0,!1;w.next_out&&(w.avail_out===0||R===i.Z_STREAM_END||w.avail_in===0&&(D===i.Z_FINISH||D===i.Z_SYNC_FLUSH))&&(this.options.to==="string"?(L=t.utf8border(w.output,w.next_out),j=w.next_out-L,W=t.buf2string(w.output,L),w.next_out=j,w.avail_out=C-j,j&&e.arraySet(w.output,w.output,L,j,0),this.onData(W)):this.onData(e.shrinkBuf(w.output,w.next_out))),w.avail_in===0&&w.avail_out===0&&(K=!0)}while((w.avail_in>0||w.avail_out===0)&&R!==i.Z_STREAM_END);return R===i.Z_STREAM_END&&(D=i.Z_FINISH),D===i.Z_FINISH?(R=r.inflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===i.Z_OK):(D===i.Z_SYNC_FLUSH&&(this.onEnd(i.Z_OK),w.avail_out=0),!0)},d.prototype.onData=function(y){this.chunks.push(y)},d.prototype.onEnd=function(y){y===i.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=e.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg};function h(y,x){var w=new d(x);if(w.push(y,!0),w.err)throw w.msg||a[w.err];return w.result}function m(y,x){return x=x||{},x.raw=!0,h(y,x)}return co.Inflate=d,co.inflate=h,co.inflateRaw=m,co.ungzip=h,co}var Rc,w0;function Vm(){if(w0)return Rc;w0=1;var r=gi().assign,e=jm(),t=Lm(),i=gv(),a={};return r(a,e,t,i),Rc=a,Rc}var Wm=Vm();const xs=Jg(Wm);var S0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ha=new Uint8Array(256);for(var Wl=0;Wl>4,h[a++]=(u&15)<<4|f>>2,h[a++]=(f&3)<<6|d&63;return h},Km=function(r){for(var e="",t=0;ti)throw new Error(ir(e)+" must be at least "+t+" and at most "+i+", but was actually "+r)},gn=function(r,e,t,i){V(r,e,["number","undefined"]),typeof r=="number"&&Wr(r,e,t,i)},xv=function(r,e,t){if(V(r,e,["number"]),r%t!==0)throw new Error(ir(e)+" must be a multiple of "+t+", but was actually "+r)},my=function(r,e){if(!Number.isInteger(r))throw new Error(ir(e)+" must be an integer, but was actually "+r)},Ss=function(r,e){if(![1,0].includes(Math.sign(r)))throw new Error(ir(e)+" must be a positive number or 0, but was actually "+r)},nt=new Uint16Array(256);for(var Hl=0;Hl<256;Hl++)nt[Hl]=Hl;nt[22]=tt("");nt[24]=tt("˘");nt[25]=tt("ˇ");nt[26]=tt("ˆ");nt[27]=tt("˙");nt[28]=tt("˝");nt[29]=tt("˛");nt[30]=tt("˚");nt[31]=tt("˜");nt[127]=tt("�");nt[128]=tt("•");nt[129]=tt("†");nt[130]=tt("‡");nt[131]=tt("…");nt[132]=tt("—");nt[133]=tt("–");nt[134]=tt("ƒ");nt[135]=tt("⁄");nt[136]=tt("‹");nt[137]=tt("›");nt[138]=tt("−");nt[139]=tt("‰");nt[140]=tt("„");nt[141]=tt("“");nt[142]=tt("”");nt[143]=tt("‘");nt[144]=tt("’");nt[145]=tt("‚");nt[146]=tt("™");nt[147]=tt("fi");nt[148]=tt("fl");nt[149]=tt("Ł");nt[150]=tt("Œ");nt[151]=tt("Š");nt[152]=tt("Ÿ");nt[153]=tt("Ž");nt[154]=tt("ı");nt[155]=tt("ł");nt[156]=tt("œ");nt[157]=tt("š");nt[158]=tt("ž");nt[159]=tt("�");nt[160]=tt("€");nt[173]=tt("�");var wv=function(r){for(var e=new Array(r.length),t=0,i=r.length;t=T.ExclamationPoint&&r<=T.Tilde&&!$c[r]},T0={},R0=new Map,P=(function(r){we(e,r);function e(t,i){var a=this;if(t!==T0)throw new Qc("PDFName");a=r.call(this)||this;for(var l="/",u=0,f=i.length;u=T.Zero&&h<=T.Nine||h>=T.a&&h<=T.f||h>=T.A&&h<=T.F?(i+=d,(i.length===2||!(m>="0"&&m<="9"||m>="a"&&m<="f"||m>="A"&&m<="F"))&&(l(parseInt(i,16)),i="")):l(h):h===T.Hash?a=!0:l(h)}return new Uint8Array(t)},e.prototype.decodeText=function(){var t=this.asBytes();return String.fromCharCode.apply(String,Array.from(t))},e.prototype.asString=function(){return this.encodedName},e.prototype.value=function(){return this.encodedName},e.prototype.clone=function(){return this},e.prototype.toString=function(){return this.encodedName},e.prototype.sizeInBytes=function(){return this.encodedName.length},e.prototype.copyBytesInto=function(t,i){return i+=mr(this.encodedName,t,i),this.encodedName.length},e.of=function(t){var i=jy(t),a=R0.get(i);return a||(a=new e(T0,i),R0.set(i,a)),a},e.Length=e.of("Length"),e.FlateDecode=e.of("FlateDecode"),e.Resources=e.of("Resources"),e.Font=e.of("Font"),e.XObject=e.of("XObject"),e.ExtGState=e.of("ExtGState"),e.Contents=e.of("Contents"),e.Type=e.of("Type"),e.Parent=e.of("Parent"),e.MediaBox=e.of("MediaBox"),e.Page=e.of("Page"),e.Annots=e.of("Annots"),e.TrimBox=e.of("TrimBox"),e.ArtBox=e.of("ArtBox"),e.BleedBox=e.of("BleedBox"),e.CropBox=e.of("CropBox"),e.Rotate=e.of("Rotate"),e.Title=e.of("Title"),e.Author=e.of("Author"),e.Subject=e.of("Subject"),e.Creator=e.of("Creator"),e.Keywords=e.of("Keywords"),e.Producer=e.of("Producer"),e.CreationDate=e.of("CreationDate"),e.ModDate=e.of("ModDate"),e})(Er),Iy=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.asNull=function(){return null},e.prototype.clone=function(){return this},e.prototype.toString=function(){return"null"},e.prototype.sizeInBytes=function(){return 4},e.prototype.copyBytesInto=function(t,i){return t[i++]=T.n,t[i++]=T.u,t[i++]=T.l,t[i++]=T.l,4},e})(Er);const Mr=new Iy;var ot=(function(r){we(e,r);function e(t,i){var a=r.call(this)||this;return a.dict=t,a.context=i,a}return e.prototype.keys=function(){return Array.from(this.dict.keys())},e.prototype.values=function(){return Array.from(this.dict.values())},e.prototype.entries=function(){return Array.from(this.dict.entries())},e.prototype.set=function(t,i){this.dict.set(t,i)},e.prototype.get=function(t,i){i===void 0&&(i=!1);var a=this.dict.get(t);if(!(a===Mr&&!i))return a},e.prototype.has=function(t){var i=this.dict.get(t);return i!==void 0&&i!==Mr},e.prototype.lookupMaybe=function(t){for(var i,a=[],l=1;lthis.largestObjectNumber&&(this.largestObjectNumber=e.objectNumber)},r.prototype.nextRef=function(){return this.largestObjectNumber+=1,Rt.of(this.largestObjectNumber)},r.prototype.register=function(e){var t=this.nextRef();return this.assign(t,e),t},r.prototype.delete=function(e){return this.indirectObjects.delete(e)},r.prototype.lookupMaybe=function(e){for(var t=[],i=1;i1?(this.subsections.push([e]),this.chunkIdx+=1,this.chunkLength=1):(t.push(e),this.chunkLength+=1)},r.create=function(){return new r({ref:Rt.of(0,65535),offset:0,deleted:!0})},r.createEmpty=function(){return new r},r})(),tf=(function(){function r(e){this.lastXRefOffset=String(e)}return r.prototype.toString=function(){return`startxref `+this.lastXRefOffset+` %%EOF`},r.prototype.sizeInBytes=function(){return 16+this.lastXRefOffset.length},r.prototype.copyBytesInto=function(e,t){var i=t;return e[t++]=T.s,e[t++]=T.t,e[t++]=T.a,e[t++]=T.r,e[t++]=T.t,e[t++]=T.x,e[t++]=T.r,e[t++]=T.e,e[t++]=T.f,e[t++]=T.Newline,t+=mr(this.lastXRefOffset,e,t),e[t++]=T.Newline,e[t++]=T.Percent,e[t++]=T.Percent,e[t++]=T.E,e[t++]=T.O,e[t++]=T.F,t-i},r.forLastCrossRefSectionOffset=function(e){return new r(e)},r})(),Ly=(function(){function r(e){this.dict=e}return r.prototype.toString=function(){return`trailer `+this.dict.toString()},r.prototype.sizeInBytes=function(){return 8+this.dict.sizeInBytes()},r.prototype.copyBytesInto=function(e,t){var i=t;return e[t++]=T.t,e[t++]=T.r,e[t++]=T.a,e[t++]=T.i,e[t++]=T.l,e[t++]=T.e,e[t++]=T.r,e[t++]=T.Newline,t+=this.dict.copyBytesInto(e,t),t-i},r.of=function(e){return new r(e)},r})(),kv=(function(r){we(e,r);function e(t,i,a){a===void 0&&(a=!0);var l=r.call(this,t.obj({}),a)||this;return l.objects=i,l.offsets=l.computeObjectOffsets(),l.offsetsString=l.computeOffsetsString(),l.dict.set(P.of("Type"),P.of("ObjStm")),l.dict.set(P.of("N"),_e.of(l.objects.length)),l.dict.set(P.of("First"),_e.of(l.offsetsString.length)),l}return e.prototype.getObjectsCount=function(){return this.objects.length},e.prototype.clone=function(t){return e.withContextAndObjects(t||this.dict.context,this.objects.slice(),this.encode)},e.prototype.getContentsString=function(){for(var t=this.offsetsString,i=0,a=this.objects.length;i1&&(u.push(f),u.push(m.ref.objectNumber),f=0),f+=1}return u.push(f),u},l.computeEntryTuples=function(){for(var u=new Array(l.entries.length),f=0,d=l.entries.length;ff[0]&&(f[0]=C),E>f[1]&&(f[1]=E),R>f[2]&&(f[2]=R)}return f},l.entries=i||[],l.entryTuplesCache=In.populatedBy(l.computeEntryTuples),l.maxByteWidthsCache=In.populatedBy(l.computeMaxEntryByteWidths),l.indexCache=In.populatedBy(l.computeIndex),t.set(P.of("Type"),P.of("XRef")),l}return e.prototype.addDeletedEntry=function(t,i){var a=si.Deleted;this.entries.push({type:a,ref:t,nextFreeObjectNumber:i}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.addUncompressedEntry=function(t,i){var a=si.Uncompressed;this.entries.push({type:a,ref:t,offset:i}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.addCompressedEntry=function(t,i,a){var l=si.Compressed;this.entries.push({type:l,ref:t,objectStreamRef:i,index:a}),this.entryTuplesCache.invalidate(),this.maxByteWidthsCache.invalidate(),this.indexCache.invalidate(),this.contentsCache.invalidate()},e.prototype.clone=function(t){var i=this,a=i.dict,l=i.entries,u=i.encode;return e.of(a.clone(t),l.slice(),u)},e.prototype.getContentsString=function(){for(var t=this.entryTuplesCache.access(),i=this.maxByteWidthsCache.access(),a="",l=0,u=t.length;l=0;C--)a+=(y[C]||0).toString(2);for(var C=i[1]-1;C>=0;C--)a+=(x[C]||0).toString(2);for(var C=i[2]-1;C>=0;C--)a+=(w[C]||0).toString(2)}return a},e.prototype.getUnencodedContents=function(){for(var t=this.entryTuplesCache.access(),i=this.maxByteWidthsCache.access(),a=new Uint8Array(this.getUnencodedContentsSize()),l=0,u=0,f=t.length;u=0;E--)a[l++]=x[E]||0;for(var E=i[1]-1;E>=0;E--)a[l++]=w[E]||0;for(var E=i[2]-1;E>=0;E--)a[l++]=C[E]||0}return a},e.prototype.getUnencodedContentsSize=function(){var t=this.maxByteWidthsCache.access(),i=km(t);return i*this.entries.length},e.prototype.updateDict=function(){r.prototype.updateDict.call(this);var t=this.maxByteWidthsCache.access(),i=this.indexCache.access(),a=this.dict.context;this.dict.set(P.of("W"),a.obj(t)),this.dict.set(P.of("Index"),a.obj(i))},e.create=function(t,i){i===void 0&&(i=!0);var a=new e(t,[],i);return a.addDeletedEntry(Rt.of(0,65535),0),a},e.of=function(t,i,a){return a===void 0&&(a=!0),new e(t,i,a)},e})(ef),Wy=(function(r){we(e,r);function e(t,i,a,l){var u=r.call(this,t,i)||this;return u.encodeStreams=a,u.objectsPerStream=l,u}return e.prototype.computeBufferSize=function(){return lt(this,void 0,void 0,function(){var t,i,a,l,u,f,d,h,C,E,m,D,y,x,R,w,C,E,R,D,L,j,W,K;return st(this,function(B){switch(B.label){case 0:t=this.context.largestObjectNumber+1,i=bs.forVersion(1,7),a=i.sizeInBytes()+2,l=Vy.create(this.createTrailerDict(),this.encodeStreams),u=[],f=[],d=[],h=this.context.enumerateIndirectObjects(),C=0,E=h.length,B.label=1;case 1:return C"},e.prototype.sizeInBytes=function(){return this.value.length+2},e.prototype.copyBytesInto=function(t,i){return t[i++]=T.LessThan,i+=mr(this.value,t,i),t[i++]=T.GreaterThan,this.value.length+2},e.of=function(t){return new e(t)},e.fromText=function(t){for(var i=Em(t),a="",l=0,u=i.length;l> def /CMapName /Adobe-Identity-UCS def /CMapType 2 def 1 begincodespacerange <0000> endcodespacerange `+r.length+` beginbfchar `+r.map(function(e){var t=e[0],i=e[1];return t+" "+i}).join(` `)+` endbfchar endcmap CMapName currentdict /CMap defineresource pop end end`},N0=function(){for(var r=[],e=0;e"},ts=function(r){return Ta(r,4)},Hy=function(r){if(Tm(r))return ts(r);if(Rm(r)){var e=av(r),t=lv(r);return""+ts(e)+ts(t)}var i=ys(r),a="0x"+i+" is not a valid UTF-8 or UTF-16 codepoint.";throw new Error(a)},Gy=function(r){var e=0,t=function(i){e|=1<=T.Zero&&h<=T.Seven?(i+=d,(i.length===3||!(m>="0"&&m<="7"))&&(l(parseInt(i,8)),i="")):l(h):h===T.BackSlash?a=!0:l(h)}return new Uint8Array(t)},e.prototype.decodeText=function(){var t=this.asBytes();return fv(t)?sv(t):wv(t)},e.prototype.decodeDate=function(){var t=this.decodeText(),i=iv(t);if(!i)throw new Sv(t);return i},e.prototype.asString=function(){return this.value},e.prototype.clone=function(){return e.of(this.value)},e.prototype.toString=function(){return"("+this.value+")"},e.prototype.sizeInBytes=function(){return this.value.length+2},e.prototype.copyBytesInto=function(t,i){return t[i++]=T.LeftParen,i+=mr(this.value,t,i),t[i++]=T.RightParen,this.value.length+2},e.of=function(t){return new e(t)},e.fromDate=function(t){var i=yn(String(t.getUTCFullYear()),4,"0"),a=yn(String(t.getUTCMonth()+1),2,"0"),l=yn(String(t.getUTCDate()),2,"0"),u=yn(String(t.getUTCHours()),2,"0"),f=yn(String(t.getUTCMinutes()),2,"0"),d=yn(String(t.getUTCSeconds()),2,"0");return new e("D:"+i+a+l+u+f+d+"Z")},e})(Er),rf=(function(){function r(e,t,i,a){var l=this;this.allGlyphsInFontSortedById=function(){for(var u=new Array(l.font.characterSet.length),f=0,d=u.length;f>3)]>>7-((w&7)<<0)&1,ae=3*ne;f[j]=W[ae],f[j+1]=W[ae+1],f[j+2]=W[ae+2],f[j+3]=ne>2)]>>6-((w&3)<<1)&3,ae=3*ne;f[j]=W[ae],f[j+1]=W[ae+1],f[j+2]=W[ae+2],f[j+3]=ne>1)]>>4-((w&1)<<2)&15,ae=3*ne;f[j]=W[ae],f[j+1]=W[ae+1],f[j+2]=W[ae+2],f[j+3]=ne>>3)]>>>7-(de&7)&1),se=Z==R*255?0:255;d[Fe+de]=se<<24|Z<<16|Z<<8|Z}else if(m==2)for(var de=0;de>>2)]>>>6-((de&3)<<1)&3),se=Z==R*85?0:255;d[Fe+de]=se<<24|Z<<16|Z<<8|Z}else if(m==4)for(var de=0;de>>1)]>>>4-((de&1)<<2)&15),se=Z==R*17?0:255;d[Fe+de]=se<<24|Z<<16|Z<<8|Z}else if(m==8)for(var de=0;de>>2<<3));a==0;){if(a=R(e,x,1),l=R(e,x+1,2),x+=3,l==0){(x&7)!=0&&(x+=8-(x&7));var $=(x>>>3)+4,te=e[$-4]|e[$-3]<<8;U&&(t=r.H.W(t,y+te)),t.set(new i(e.buffer,e.byteOffset+$,te),y),x=$+te<<3,y+=te;continue}if(U&&(t=r.H.W(t,y+(1<<17))),l==1&&(w=B.J,C=B.h,h=511,m=31),l==2){u=D(e,x,5)+257,f=D(e,x+5,5)+1,d=D(e,x+10,4)+4,x+=14;for(var ne=1,ae=0;ae<38;ae+=2)B.Q[ae]=0,B.Q[ae+1]=0;for(var ae=0;aene&&(ne=he)}x+=3*d,j(B.Q,ne),W(B.Q,ne,B.u),w=B.w,C=B.d,x=L(B.u,(1<>>4;if(!(de>>>8))t[y++]=de;else{if(de==256)break;var se=y+de-254;if(de>264){var ie=B.q[de-257];se=y+(ie>>>3)+D(e,x,ie&7),x+=ie&7}var me=C[K(e,x)&m];x+=me&15;var be=me>>>4,A=B.c[be],J=(A>>>4)+R(e,x,A&15);for(x+=A&15;y>>4;if(y<=15)u[h]=y,h++;else{var x=0,w=0;y==16?(w=3+f(a,l,2),l+=2,x=u[h-1]):y==17?(w=3+f(a,l,3),l+=3):y==18&&(w=11+f(a,l,7),l+=7);for(var C=h+w;h>>1;ul&&(l=d),u++}for(;u>1,h=e[f+1],m=d<<4|h,y=t-h,x=e[f]<>>15-t;i[C]=m,x++}},r.H.l=function(e,t){for(var i=r.H.m.r,a=15-t,l=0;l>>a}},r.H.M=function(e,t,i){i=i<<(t&7);var a=t>>>3;e[a]|=i,e[a+1]|=i>>>8},r.H.I=function(e,t,i){i=i<<(t&7);var a=t>>>3;e[a]|=i,e[a+1]|=i>>>8,e[a+2]|=i>>>16},r.H.e=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)},r.H.i=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16|e[(t>>>3)+3]<<24)>>>(t&7)},r.H.m=(function(){var e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],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,0,0,0],q:new e(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}})(),(function(){for(var e=r.H.m,t=32768,i=0;i>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,e.r[i]=(a>>>16|a<<16)>>>17}function l(u,f,d){for(;f--!=0;)u.push(0,d)}for(var i=0;i<32;i++)e.q[i]=e.S[i]<<3|e.T[i],e.c[i]=e.p[i]<<4|e.z[i];l(e._,144,8),l(e._,112,9),l(e._,24,7),l(e._,8,8),r.H.n(e._,9),r.H.A(e._,9,e.J),r.H.l(e._,9),l(e.$,32,5),r.H.n(e.$,5),r.H.A(e.$,5,e.h),r.H.l(e.$,5),l(e.Q,19,0),l(e.C,286,0),l(e.D,30,0),l(e.v,320,0)})(),r.H.N})();ce.decode._readInterlace=function(r,e){for(var t=e.width,i=e.height,a=ce.decode._getBPP(e),l=a>>3,u=Math.ceil(t*a/8),f=new Uint8Array(i*u),d=0,h=[0,0,4,0,2,0,1],m=[0,4,0,2,0,1,0],y=[8,8,8,4,4,2,2],x=[8,8,4,4,2,2,1],w=0;w<7;){for(var C=y[w],E=x[w],R=0,D=0,L=h[w];L>3];te=te>>7-($&7)&1,f[B*u+(U>>3)]|=te<<7-((U&7)<<0)}if(a==2){var te=r[$>>3];te=te>>6-($&7)&3,f[B*u+(U>>2)]|=te<<6-((U&3)<<1)}if(a==4){var te=r[$>>3];te=te>>4-($&7)&15,f[B*u+(U>>1)]|=te<<4-((U&1)<<2)}if(a>=8)for(var ne=B*u+U*l,ae=0;ae>3)+ae];$+=a,U+=E}K++,B+=C}R*D!=0&&(d+=D*(1+W)),w=w+1}return f};ce.decode._getBPP=function(r){var e=[1,null,3,1,2,null,4][r.ctype];return e*r.depth};ce.decode._filterZero=function(r,e,t,i,a){var l=ce.decode._getBPP(e),u=Math.ceil(i*l/8),f=ce.decode._paeth;l=Math.ceil(l/8);var d=0,h=1,m=r[t],y=0;if(m>1&&(r[t]=[0,0,1][m-2]),m==3)for(y=l;y>>1)&255;for(var x=0;x>>1);for(;y>>1)}else{for(;y>8&255,r[e+1]=t&255},readUint:function(r,e){return r[e]*(256*256*256)+(r[e+1]<<16|r[e+2]<<8|r[e+3])},writeUint:function(r,e,t){r[e]=t>>24&255,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255},readASCII:function(r,e,t){for(var i="",a=0;a=0&&f>=0?(y=w*e+C<<2,x=(f+w)*a+u+C<<2):(y=(-f+w)*e-u+C<<2,x=w*a+C<<2),d==0)i[x]=r[y],i[x+1]=r[y+1],i[x+2]=r[y+2],i[x+3]=r[y+3];else if(d==1){var E=r[y+3]*.00392156862745098,R=r[y]*E,D=r[y+1]*E,L=r[y+2]*E,j=i[x+3]*(1/255),W=i[x]*j,K=i[x+1]*j,B=i[x+2]*j,U=1-E,$=E+j*U,te=$==0?0:1/$;i[x+3]=255*$,i[x+0]=(R+W*U)*te,i[x+1]=(D+K*U)*te,i[x+2]=(L+B*U)*te}else if(d==2){var E=r[y+3],R=r[y],D=r[y+1],L=r[y+2],j=i[x+3],W=i[x],K=i[x+1],B=i[x+2];E==j&&R==W&&D==K&&L==B?(i[x]=0,i[x+1]=0,i[x+2]=0,i[x+3]=0):(i[x]=R,i[x+1]=D,i[x+2]=L,i[x+3]=E)}else if(d==3){var E=r[y+3],R=r[y],D=r[y+1],L=r[y+2],j=i[x+3],W=i[x],K=i[x+1],B=i[x+2];if(E==j&&R==W&&D==K&&L==B)continue;if(E<220&&j>20)return!1}return!0};ce.encode=function(r,e,t,i,a,l,u){i==null&&(i=0),u==null&&(u=!1);var f=ce.encode.compress(r,e,t,i,[!1,!1,!1,0,u]);return ce.encode.compressPNG(f,-1),ce.encode._main(f,e,t,a,l)};ce.encodeLL=function(r,e,t,i,a,l,u,f){for(var d={ctype:0+(i==1?0:2)+(a==0?0:4),depth:l,frames:[]},h=(i+a)*l,m=h*e,y=0;y1,y=!1,x=33+(m?20:0);if(a.sRGB!=null&&(x+=13),a.pHYs!=null&&(x+=21),r.ctype==3){for(var w=r.plte.length,C=0;C>>24!=255&&(y=!0);x+=8+w*3+4+(y?8+w*1+4:0)}for(var E=0;E>>8&255,U=W>>>16&255;D[h+j+0]=K,D[h+j+1]=B,D[h+j+2]=U}if(h+=w*3,u(D,h,l(D,h-w*3-4,w*3+4)),h+=4,y){u(D,h,w),h+=4,d(D,h,"tRNS"),h+=4;for(var C=0;C>>24&255;h+=w,u(D,h,l(D,h-w-4,w+4)),h+=4}}for(var $=0,E=0;E>2,he>>2));for(var w=0;wFe&&se==Se[R-Fe])de[R]=de[R-Fe];else{var ie=j[se];if(ie==null&&(j[se]=ie=W.length,W.push(se),W.length>=300))break;de[R]=ie}}}var me=W.length;me<=256&&h==!1&&(me<=2?y=1:me<=4?y=2:me<=16?y=4:y=8,y=Math.max(y,d));for(var w=0;w>1)]|=Ve[Ke+Ce]<<4-(Ce&1)*4;else if(y==2)for(var Ce=0;Ce>2)]|=Ve[Ke+Ce]<<6-(Ce&3)*2;else if(y==1)for(var Ce=0;Ce>3)]|=Ve[Ke+Ce]<<7-(Ce&7)*1}A=Ne,m=3,Oe=1}else if(D==!1&&L.length==1){for(var Ne=new Uint8Array(Fe*be*3),it=Fe*be,R=0;RU&&(U=ne),te$&&($=te))}U==-1&&(K=B=U=$=0),a&&((K&1)==1&&K--,(B&1)==1&&B--);var he=(U-K+1)*($-B+1);heR&&(R=W),KD&&(D=K))}R==-1&&(C=E=R=D=0),u&&((C&1)==1&&C--,(E&1)==1&&E--),l={x:C,y:E,width:R-C+1,height:D-E+1};var $=i[a];$.rect=l,$.blend=1,$.img=new Uint8Array(l.width*l.height*4),i[a-1].dispose==0?(ce._copyTile(h,e,t,$.img,l.width,l.height,-l.x,-l.y,0),ce.encode._prepareDiff(x,e,t,$.img,l)):ce._copyTile(x,e,t,$.img,l.width,l.height,-l.x,-l.y,0)};ce.encode._prepareDiff=function(r,e,t,i,a){ce._copyTile(r,e,t,i,a.width,a.height,-a.x,-a.y,2)};ce.encode._filterZero=function(r,e,t,i,a,l,u){var f=[],d=[0,1,2,3,4];l!=-1?d=[l]:(e*i>5e5||t==1)&&(d=[0]);var h;u&&(h={level:0});for(var m=u&&UZIP!=null?UZIP:xs,y=0;y>1)+256&255;if(l==4)for(var h=a;h>1)&255;for(var h=a;h>1)&255}if(l==4){for(var h=0;h>>1:t=t>>>1;r[e]=t}return r})(),update:function(r,e,t,i){for(var a=0;a>>8;return r},crc:function(r,e,t){return ce.crc.update(4294967295,r,e,t)^4294967295}};ce.quantize=function(r,e){var t=new Uint8Array(r),i=t.slice(0),a=new Uint32Array(i.buffer),l=ce.quantize.getKDtree(i,e),u=l[0],f=l[1];ce.quantize.planeDst;for(var d=t,h=a,m=d.length,y=new Uint8Array(t.length>>2),x=0;x>2]=D.ind,h[x>>2]=D.est.rgba}return{abuf:i.buffer,inds:y,plte:f}};ce.quantize.getKDtree=function(r,e,t){t==null&&(t=1e-4);var i=new Uint32Array(r.buffer),a={i0:0,i1:r.length,bst:null,est:null,tdst:0,left:null,right:null};a.bst=ce.quantize.stats(r,a.i0,a.i1),a.est=ce.quantize.estats(a.bst);for(var l=[a];l.lengthu&&(u=l[d].est.L,f=d);if(u=m||h.i1<=m;if(y){h.est.L=0;continue}var x={i0:h.i0,i1:m,bst:null,est:null,tdst:0,left:null,right:null};x.bst=ce.quantize.stats(r,x.i0,x.i1),x.est=ce.quantize.estats(x.bst);var w={i0:m,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};w.bst={R:[],m:[],N:h.bst.N-x.bst.N};for(var d=0;d<16;d++)w.bst.R[d]=h.bst.R[d]-x.bst.R[d];for(var d=0;d<4;d++)w.bst.m[d]=h.bst.m[d]-x.bst.m[d];w.est=ce.quantize.estats(w.bst),h.left=x,h.right=w,l[f]=x,l.push(w)}l.sort(function(C,E){return E.bst.N-C.bst.N});for(var d=0;d0&&(u=r.right,f=r.left);var d=ce.quantize.getNearest(u,e,t,i,a);if(d.tdst<=l*l)return d;var h=ce.quantize.getNearest(f,e,t,i,a);return h.tdstl;)i-=4;if(t>=i)break;var f=e[t>>2];e[t>>2]=e[i>>2],e[i>>2]=f,t+=4,i-=4}for(;u(r,t,a)>l;)t-=4;return t+4};ce.quantize.vecDot=function(r,e,t){return r[e]*t[0]+r[e+1]*t[1]+r[e+2]*t[2]+r[e+3]*t[3]};ce.quantize.stats=function(r,e,t){for(var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=[0,0,0,0],l=t-e>>2,u=e;u>>0}};ce.M4={multVec:function(r,e){return[r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3],r[4]*e[0]+r[5]*e[1]+r[6]*e[2]+r[7]*e[3],r[8]*e[0]+r[9]*e[1]+r[10]*e[2]+r[11]*e[3],r[12]*e[0]+r[13]*e[1]+r[14]*e[2]+r[15]*e[3]]},dot:function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]},sml:function(r,e){return[r*e[0],r*e[1],r*e[2],r*e[3]]}};ce.encode.concatRGBA=function(r){for(var e=0,t=0;t1)throw new Error("Animated PNGs are not supported");var a=new Uint8Array(i[0]),l=_y(a),u=l.rgbChannel,f=l.alphaChannel;this.rgbChannel=u;var d=f.some(function(h){return h<255});d&&(this.alphaChannel=f),this.type=Jy(t.ctype),this.width=t.width,this.height=t.height,this.bitsPerComponent=8}return r.load=function(e){return new r(e)},r})(),Ev=(function(){function r(e){this.image=e,this.bitsPerComponent=e.bitsPerComponent,this.width=e.width,this.height=e.height,this.colorSpace="DeviceRGB"}return r.for=function(e){return lt(this,void 0,void 0,function(){var t;return st(this,function(i){return t=$y.load(e),[2,new r(t)]})})},r.prototype.embedIntoContext=function(e,t){return lt(this,void 0,void 0,function(){var i,a;return st(this,function(l){return i=this.embedAlphaChannel(e),a=e.flateStream(this.image.rgbChannel,{Type:"XObject",Subtype:"Image",BitsPerComponent:this.image.bitsPerComponent,Width:this.image.width,Height:this.image.height,ColorSpace:this.colorSpace,SMask:i}),t?(e.assign(t,a),[2,t]):[2,e.register(a)]})})},r.prototype.embedAlphaChannel=function(e){if(this.image.alphaChannel){var t=e.flateStream(this.image.alphaChannel,{Type:"XObject",Subtype:"Image",Height:this.image.height,Width:this.image.width,BitsPerComponent:this.image.bitsPerComponent,ColorSpace:"DeviceGray",Decode:[0,1]});return e.register(t)}},r})(),Tv=(function(){function r(e,t,i){this.bytes=e,this.start=t||0,this.pos=this.start,this.end=t&&i?t+i:this.bytes.length}return Object.defineProperty(r.prototype,"length",{get:function(){return this.end-this.start},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isEmpty",{get:function(){return this.length===0},enumerable:!1,configurable:!0}),r.prototype.getByte=function(){return this.pos>=this.end?-1:this.bytes[this.pos++]},r.prototype.getUint16=function(){var e=this.getByte(),t=this.getByte();return e===-1||t===-1?-1:(e<<8)+t},r.prototype.getInt32=function(){var e=this.getByte(),t=this.getByte(),i=this.getByte(),a=this.getByte();return(e<<24)+(t<<16)+(i<<8)+a},r.prototype.getBytes=function(e,t){t===void 0&&(t=!1);var i=this.bytes,a=this.pos,l=this.end;if(e){var f=a+e;f>l&&(f=l),this.pos=f;var u=i.subarray(a,f);return t?new Uint8ClampedArray(u):u}else{var u=i.subarray(a,l);return t?new Uint8ClampedArray(u):u}},r.prototype.peekByte=function(){var e=this.getByte();return this.pos--,e},r.prototype.peekBytes=function(e,t){t===void 0&&(t=!1);var i=this.getBytes(e,t);return this.pos-=i.length,i},r.prototype.skip=function(e){e||(e=1),this.pos+=e},r.prototype.reset=function(){this.pos=this.start},r.prototype.moveStart=function(){this.start=this.pos},r.prototype.makeSubStream=function(e,t){return new r(this.bytes,e,t)},r.prototype.decode=function(){return this.bytes},r})(),e1=new Uint8Array(0),Oa=(function(){function r(e){if(this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=e1,this.minBufferLength=512,e)for(;this.minBufferLengthl&&(i=l)}else{for(;!this.eof;)this.readBlock();i=this.bufferLength}this.pos=i;var u=this.buffer.subarray(a,i);return t&&!(u instanceof Uint8ClampedArray)?new Uint8ClampedArray(u):u},r.prototype.peekByte=function(){var e=this.getByte();return this.pos--,e},r.prototype.peekBytes=function(e,t){t===void 0&&(t=!1);var i=this.getBytes(e,t);return this.pos-=i.length,i},r.prototype.skip=function(e){e||(e=1),this.pos+=e},r.prototype.reset=function(){this.pos=0},r.prototype.makeSubStream=function(e,t){for(var i=e+t;this.bufferLength<=i&&!this.eof;)this.readBlock();return new Tv(this.buffer,e,t)},r.prototype.decode=function(){for(;!this.eof;)this.readBlock();return this.buffer.subarray(0,this.bufferLength)},r.prototype.readBlock=function(){throw new rn(this.constructor.name,"readBlock")},r.prototype.ensureBuffer=function(e){var t=this.buffer;if(e<=t.byteLength)return t;for(var i=this.minBufferLength;i=0;--h)d[f+h]=y&255,y>>=8}},e})(Oa),r1=(function(r){we(e,r);function e(t,i){var a=r.call(this,i)||this;return a.stream=t,a.firstDigit=-1,i&&(i=.5*i),a}return e.prototype.readBlock=function(){var t=8e3,i=this.stream.getBytes(t);if(!i.length){this.eof=!0;return}for(var a=i.length+1>>1,l=this.ensureBuffer(this.bufferLength+a),u=this.bufferLength,f=this.firstDigit,d=0,h=i.length;d=48&&m<=57)y=m&15;else if(m>=65&&m<=70||m>=97&&m<=102)y=(m&15)+9;else if(m===62){this.eof=!0;break}else continue;f<0?f=y:(l[u++]=f<<4|y,f=-1)}f>=0&&this.eof&&(l[u++]=f<<4,f=-1),this.firstDigit=f,this.bufferLength=u},e})(Oa),M0=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),n1=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),i1=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o1=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],a1=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5],l1=(function(r){we(e,r);function e(t,i){var a=r.call(this,i)||this;a.stream=t;var l=t.getByte(),u=t.getByte();if(l===-1||u===-1)throw new Error("Invalid header in flate stream: "+l+", "+u);if((l&15)!==8)throw new Error("Unknown compression method in flate stream: "+l+", "+u);if(((l<<8)+u)%31!==0)throw new Error("Bad FCHECK in flate stream: "+l+", "+u);if(u&32)throw new Error("FDICT bit set in flate stream: "+l+", "+u);return a.codeSize=0,a.codeBuf=0,a}return e.prototype.readBlock=function(){var t,i,a=this.stream,l=this.getBits(3);if(l&1&&(this.eof=!0),l>>=1,l===0){var u=void 0;if((u=a.getByte())===-1)throw new Error("Bad block header in flate stream");var f=u;if((u=a.getByte())===-1)throw new Error("Bad block header in flate stream");if(f|=u<<8,(u=a.getByte())===-1)throw new Error("Bad block header in flate stream");var d=u;if((u=a.getByte())===-1)throw new Error("Bad block header in flate stream");if(d|=u<<8,d!==(~f&65535)&&(f!==0||d!==0))throw new Error("Bad uncompressed block length in flate stream");this.codeBuf=0,this.codeSize=0;var h=this.bufferLength;t=this.ensureBuffer(h+f);var m=h+f;if(this.bufferLength=m,f===0)a.peekByte()===-1&&(this.eof=!0);else for(var y=h;y0;)K[L++]=$}x=this.generateHuffmanTable(K.subarray(0,C)),w=this.generateHuffmanTable(K.subarray(C,W))}else throw new Error("Unknown block type in flate stream");t=this.buffer;for(var ae=t?t.length:0,he=this.bufferLength;;){var Z=this.getCode(x);if(Z<256){he+1>=ae&&(t=this.ensureBuffer(he+1),ae=t.length),t[he++]=Z;continue}if(Z===256){this.bufferLength=he;return}Z-=257,Z=n1[Z];var Se=Z>>16;Se>0&&(Se=this.getBits(Se)),i=(Z&65535)+Se,Z=this.getCode(w),Z=i1[Z],Se=Z>>16,Se>0&&(Se=this.getBits(Se));var Fe=(Z&65535)+Se;he+i>=ae&&(t=this.ensureBuffer(he+i),ae=t.length);for(var de=0;de>t,this.codeSize=a-=t,u},e.prototype.getCode=function(t){for(var i=this.stream,a=t[0],l=t[1],u=this.codeSize,f=this.codeBuf,d;u>16,y=h&65535;if(m<1||u>m,this.codeSize=u-m,y},e.prototype.generateHuffmanTable=function(t){var i=t.length,a=0,l;for(l=0;la&&(a=t[l]);for(var u=1<>=1;for(l=x;l0;if(!K||K<256)R[0]=K,D=1;else if(K>=258)if(K=0;u--)R[u]=y[f],f=w[f];else R[D++]=R[0];else if(K===256){C=9,m=258,D=0;continue}else{this.eof=!0,delete this.lzwState;break}if(B&&(w[m]=E,x[m]=x[E]+1,y[m]=R[0],m++,C=m+h&m+h-1?C:Math.min(Math.log(m+h)/.6931471805599453+1,12)|0),E=K,L+=D,i>>i&(1<0){var u=this.stream.getBytes(l);i.set(u,a),a+=l}}else{l=257-l;var f=t[1];i=this.ensureBuffer(a+l+1);for(var d=0;di.size())throw new ss(t,0,i.size());i.remove(t)}else{if(t!==0)throw new ss(t,0,0);this.setKids([])}},e.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([this.ref]),this.dict.set(P.of("Kids"),t)),{Kids:t}},e.fromDict=function(t,i){return new e(t,i)},e})(Ov),nf=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Opt=function(){return this.dict.lookupMaybe(P.of("Opt"),Tt,Qe,bt)},e.prototype.setOpt=function(t){this.dict.set(P.of("Opt"),this.dict.context.obj(t))},e.prototype.getExportValues=function(){var t=this.Opt();if(t){if(t instanceof Tt||t instanceof Qe)return[t];for(var i=[],a=0,l=t.size();ai.size())throw new ss(t,0,i.size());i.remove(t)}},e.prototype.normalizeExportValues=function(){for(var t,i,a,l,u=(t=this.getExportValues())!==null&&t!==void 0?t:[],f=[],d=this.getWidgets(),h=0,m=d.length;h1){if(!this.hasFlag(Et.MultiSelect))throw new ky;this.dict.set(P.of("V"),this.dict.context.obj(t))}this.updateSelectedIndices(t)},e.prototype.valuesAreValid=function(t){for(var i=this.getOptions(),a=function(d,h){var m=t[d].decodeText();if(!i.find(function(y){return m===(y.display||y.value).decodeText()}))return{value:!1}},l=0,u=t.length;l1){for(var i=new Array(t.length),a=this.getOptions(),l=function(d,h){var m=t[d].decodeText();i[d]=a.findIndex(function(y){return m===(y.display||y.value).decodeText()})},u=0,f=t.length;u0){var f=u.lookup(0,Tt,Qe),d=u.lookupMaybe(1,Tt,Qe);i.push({value:f,display:d||f})}}return i}return[]},e})(wo),Cs=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.fromDict=function(t,i){return new e(t,i)},e.create=function(t){var i=t.obj({FT:"Ch",Ff:Et.Combo,Kids:[]}),a=t.register(i);return new e(i,a)},e})(Av),fs=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.addField=function(t){var i=this.normalizedEntries().Kids;i==null||i.push(t)},e.prototype.normalizedEntries=function(){var t=this.Kids();return t||(t=this.dict.context.obj([]),this.dict.set(P.of("Kids"),t)),{Kids:t}},e.fromDict=function(t,i){return new e(t,i)},e.create=function(t){var i=t.obj({}),a=t.register(i);return new e(i,a)},e})(Ov),of=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.fromDict=function(t,i){return new e(t,i)},e})(wo),Fs=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.MaxLen=function(){var t=this.dict.lookup(P.of("MaxLen"));if(t instanceof _e)return t},e.prototype.Q=function(){var t=this.dict.lookup(P.of("Q"));if(t instanceof _e)return t},e.prototype.setMaxLength=function(t){this.dict.set(P.of("MaxLen"),_e.of(t))},e.prototype.removeMaxLength=function(){this.dict.delete(P.of("MaxLen"))},e.prototype.getMaxLength=function(){var t;return(t=this.MaxLen())===null||t===void 0?void 0:t.asNumber()},e.prototype.setQuadding=function(t){this.dict.set(P.of("Q"),_e.of(t))},e.prototype.getQuadding=function(){var t;return(t=this.Q())===null||t===void 0?void 0:t.asNumber()},e.prototype.setValue=function(t){this.dict.set(P.of("V"),t)},e.prototype.removeValue=function(){this.dict.delete(P.of("V"))},e.prototype.getValue=function(){var t=this.V();if(t instanceof Tt||t instanceof Qe)return t},e.fromDict=function(t,i){return new e(t,i)},e.create=function(t){var i=t.obj({FT:"Tx",Kids:[]}),a=t.register(i);return new e(i,a)},e})(wo),Ps=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.fromDict=function(t,i){return new e(t,i)},e.create=function(t){var i=t.obj({FT:"Btn",Ff:en.PushButton,Kids:[]}),a=t.register(i);return new e(i,a)},e})(nf),Es=(function(r){we(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setValue=function(t){var i=this.getOnValues();if(!i.includes(t)&&t!==P.of("Off"))throw new _c;this.dict.set(P.of("V"),t);for(var a=this.getWidgets(),l=0,u=a.length;ll)throw new F0(i,l);for(var u=i,f=0,d=a.size();fu)return m.insertLeafNode(t,u)||h;u-=m.Count().asNumber()}m instanceof Bn&&(u-=1)}if(u===0){this.insertLeafKid(a.size(),t);return}throw new P0(i,"insertLeafNode")},e.prototype.removeLeafNode=function(t,i){i===void 0&&(i=!0);var a=this.Kids(),l=this.Count().asNumber();if(t>=l)throw new F0(t,l);for(var u=t,f=0,d=a.size();fu){m.removeLeafNode(u,i),i&&m.Kids().size()===0&&a.remove(f);return}else u-=m.Count().asNumber();if(m instanceof Bn)if(u===0){this.removeKid(f);return}else u-=1}throw new P0(t,"removeLeafNode")},e.prototype.ascend=function(t){t(this);var i=this.Parent();i&&i.ascend(t)},e.prototype.traverse=function(t){for(var i=this.Kids(),a=0,l=i.size();aNumber.MAX_SAFE_INTEGER)if(this.capNumbers){var a="Parsed number that is too large for some PDF readers: "+e+", using Number.MAX_SAFE_INTEGER instead.";return console.warn(a),Number.MAX_SAFE_INTEGER}else{var a="Parsed number that is too large for some PDF readers: "+e+", not capping.";console.warn(a)}return i},r.prototype.skipWhitespace=function(){for(;!this.bytes.done()&&Un[this.bytes.peek()];)this.bytes.next()},r.prototype.skipLine=function(){for(;!this.bytes.done();){var e=this.bytes.peek();if(e===U0||e===L0)return;this.bytes.next()}},r.prototype.skipComment=function(){if(this.bytes.peek()!==T.Percent)return!1;for(;!this.bytes.done();){var e=this.bytes.peek();if(e===U0||e===L0)return!0;this.bytes.next()}return!0},r.prototype.skipWhitespaceAndComments=function(){for(this.skipWhitespace();this.skipComment();)this.skipWhitespace()},r.prototype.matchKeyword=function(e){for(var t=this.bytes.offset(),i=0,a=e.length;i=this.length},r.prototype.offset=function(){return this.idx},r.prototype.slice=function(e,t){return this.bytes.slice(e,t)},r.prototype.position=function(){return{line:this.line,column:this.column,offset:this.idx}},r.of=function(e){return new r(e)},r.fromPDFRawStream=function(e){return r.of(Rv(e).decode())},r})(),w1=T.Space,ua=T.CarriageReturn,ca=T.Newline,fa=[T.s,T.t,T.r,T.e,T.a,T.m],Xl=[T.e,T.n,T.d,T.s,T.t,T.r,T.e,T.a,T.m],Mt={header:[T.Percent,T.P,T.D,T.F,T.Dash],eof:[T.Percent,T.Percent,T.E,T.O,T.F],obj:[T.o,T.b,T.j],endobj:[T.e,T.n,T.d,T.o,T.b,T.j],xref:[T.x,T.r,T.e,T.f],trailer:[T.t,T.r,T.a,T.i,T.l,T.e,T.r],startxref:[T.s,T.t,T.a,T.r,T.t,T.x,T.r,T.e,T.f],true:[T.t,T.r,T.u,T.e],false:[T.f,T.a,T.l,T.s,T.e],null:[T.n,T.u,T.l,T.l],stream:fa,streamEOF1:yt(fa,[w1,ua,ca]),streamEOF2:yt(fa,[ua,ca]),streamEOF3:yt(fa,[ua]),streamEOF4:yt(fa,[ca]),endstream:Xl,EOF1endstream:yt([ua,ca],Xl),EOF2endstream:yt([ua],Xl),EOF3endstream:yt([ca],Xl)},Iv=(function(r){we(e,r);function e(t,i,a){a===void 0&&(a=!1);var l=r.call(this,t,a)||this;return l.context=i,l}return e.prototype.parseObject=function(){if(this.skipWhitespaceAndComments(),this.matchKeyword(Mt.true))return Ca.True;if(this.matchKeyword(Mt.false))return Ca.False;if(this.matchKeyword(Mt.null))return Mr;var t=this.bytes.peek();if(t===T.LessThan&&this.bytes.peekAhead(1)===T.LessThan)return this.parseDictOrStream();if(t===T.LessThan)return this.parseHexString();if(t===T.LeftParen)return this.parseString();if(t===T.ForwardSlash)return this.parseName();if(t===T.LeftSquareBracket)return this.parseArray();if(sf[t])return this.parseNumberOrRef();throw new Ey(this.bytes.position(),t)},e.prototype.parseNumberOrRef=function(){var t=this.parseRawNumber();this.skipWhitespaceAndComments();var i=this.bytes.offset();if(Cr[this.bytes.peek()]){var a=this.parseRawNumber();if(this.skipWhitespaceAndComments(),this.bytes.peek()===T.R)return this.bytes.assertNext(T.R),Rt.of(t,a)}return this.bytes.moveTo(i),_e.of(t)},e.prototype.parseHexString=function(){var t="";for(this.bytes.assertNext(T.LessThan);!this.bytes.done()&&this.bytes.peek()!==T.GreaterThan;)t+=Mn(this.bytes.next());return this.bytes.assertNext(T.GreaterThan),Qe.of(t)},e.prototype.parseString=function(){for(var t=0,i=!1,a="";!this.bytes.done();){var l=this.bytes.next();if(a+=Mn(l),i||(l===T.LeftParen&&(t+=1),l===T.RightParen&&(t-=1)),l===T.BackSlash?i=!i:i&&(i=!1),t===0)return Tt.of(a.substring(1,a.length-1))}throw new Dy(this.bytes.position())},e.prototype.parseName=function(){this.bytes.assertNext(T.ForwardSlash);for(var t="";!this.bytes.done();){var i=this.bytes.peek();if(Un[i]||ln[i])break;t+=Mn(i),this.bytes.next()}return P.of(t)},e.prototype.parseArray=function(){this.bytes.assertNext(T.LeftSquareBracket),this.skipWhitespaceAndComments();for(var t=bt.withContext(this.context);this.bytes.peek()!==T.RightSquareBracket;){var i=this.parseObject();t.push(i),this.skipWhitespaceAndComments()}return this.bytes.assertNext(T.RightSquareBracket),t},e.prototype.parseDict=function(){this.bytes.assertNext(T.LessThan),this.bytes.assertNext(T.LessThan),this.skipWhitespaceAndComments();for(var t=new Map;!this.bytes.done()&&this.bytes.peek()!==T.GreaterThan&&this.bytes.peekAhead(1)!==T.GreaterThan;){var i=this.parseName(),a=this.parseObject();t.set(i,a),this.skipWhitespaceAndComments()}this.skipWhitespaceAndComments(),this.bytes.assertNext(T.GreaterThan),this.bytes.assertNext(T.GreaterThan);var l=t.get(P.of("Type"));return l===P.of("Catalog")?jv.fromMapWithContext(t,this.context):l===P.of("Pages")?Mv.fromMapWithContext(t,this.context):l===P.of("Page")?Bn.fromMapWithContext(t,this.context):ot.fromMapWithContext(t,this.context)},e.prototype.parseDictOrStream=function(){var t=this.bytes.position(),i=this.parseDict();if(this.skipWhitespaceAndComments(),!this.matchKeyword(Mt.streamEOF1)&&!this.matchKeyword(Mt.streamEOF2)&&!this.matchKeyword(Mt.streamEOF3)&&!this.matchKeyword(Mt.streamEOF4)&&!this.matchKeyword(Mt.stream))return i;var a=this.bytes.offset(),l,u=i.get(P.of("Length"));u instanceof _e?(l=a+u.asNumber(),this.bytes.moveTo(l),this.skipWhitespaceAndComments(),this.matchKeyword(Mt.endstream)||(this.bytes.moveTo(a),l=this.findEndOfStreamFallback(t))):l=this.findEndOfStreamFallback(t);var f=this.bytes.slice(a,l);return Fa.of(i,f)},e.prototype.findEndOfStreamFallback=function(t){for(var i=1,a=this.bytes.offset();!this.bytes.done()&&(a=this.bytes.offset(),this.matchKeyword(Mt.stream)?i+=1:this.matchKeyword(Mt.EOF1endstream)||this.matchKeyword(Mt.EOF2endstream)||this.matchKeyword(Mt.EOF3endstream)||this.matchKeyword(Mt.endstream)?i-=1:this.bytes.next(),i!==0););if(i!==0)throw new Ry(t);return a},e.forBytes=function(t,i,a){return new e(Ds.of(t),i,a)},e.forByteStream=function(t,i,a){return a===void 0&&(a=!1),new e(t,i,a)},e})(x1),S1=(function(r){we(e,r);function e(t,i){var a=r.call(this,Ds.fromPDFRawStream(t),t.dict.context)||this,l=t.dict;return a.alreadyParsed=!1,a.shouldWaitForTick=i||(function(){return!1}),a.firstOffset=l.lookup(P.of("First"),_e).asNumber(),a.objectCount=l.lookup(P.of("N"),_e).asNumber(),a}return e.prototype.parseIntoContext=function(){return lt(this,void 0,void 0,function(){var t,i,a,l,u,f,d,h;return st(this,function(m){switch(m.label){case 0:if(this.alreadyParsed)throw new Jc("PDFObjectStreamParser","parseIntoContext");this.alreadyParsed=!0,t=this.parseOffsetsAndObjectNumbers(),i=0,a=t.length,m.label=1;case 1:return i=T.Space&&i<=T.Tilde;if(a&&(this.matchKeyword(Mt.xref)||this.matchKeyword(Mt.trailer)||this.matchKeyword(Mt.startxref)||this.matchIndirectObjectHeader())){this.bytes.moveTo(t);break}this.bytes.next()}},e.prototype.skipBinaryHeaderComment=function(){this.skipWhitespaceAndComments();try{var t=this.bytes.offset();this.parseIndirectObjectHeader(),this.bytes.moveTo(t)}catch{this.bytes.next(),this.skipWhitespaceAndComments()}},e.forBytesWithOptions=function(t,i,a,l){return new e(t,i,a,l)},e})(Iv),Cn=function(r){return 1<0&&(i[i.length]=+a),t[t.length]={cmd:e,args:i},i=[],a="",l=!1),e=h;else if([" ",","].includes(h)||h==="-"&&a.length>0&&a[a.length-1]!=="e"||h==="."&&l){if(a.length===0)continue;i.length===u?(t[t.length]={cmd:e,args:i},i=[+a],e==="M"&&(e="L"),e==="m"&&(e="l")):i[i.length]=+a,l=h===".",a=["-","."].includes(h)?h:""}else a+=h,h==="."&&(l=!0)}return a.length>0&&(i.length===u?(t[t.length]={cmd:e,args:i},i=[+a],e==="M"&&(e="L"),e==="m"&&(e="l")):i[i.length]=+a),t[t.length]={cmd:e,args:i},t},M1=function(r){We=qe=pt=gt=va=pa=0;for(var e=[],t=0;t1&&(x=Math.sqrt(x),t*=x,i*=x);var w=y/t,C=m/t,E=-m/i,R=y/i,D=w*f+C*d,L=E*f+R*d,j=w*r+C*e,W=E*r+R*e,K=(j-D)*(j-D)+(W-L)*(W-L),B=1/K-.25;B<0&&(B=0);var U=Math.sqrt(B);l===a&&(U=-U);var $=.5*(D+j)-U*(W-L),te=.5*(L+W)+U*(j-D),ne=Math.atan2(L-te,D-$),ae=Math.atan2(W-te,j-$),he=ae-ne;he<0&&l===1?he+=2*Math.PI:he>0&&l===0&&(he-=2*Math.PI);for(var Z=Math.ceil(Math.abs(he/(Math.PI*.5+.001))),Se=[],Fe=0;Fer.length)return a-1;var R=e.heightAtSize(a),D=R+R*.2,L=D*l;if(L>Math.abs(t.height))return a-1;a+=1}return a},ix=function(r,e,t,i){for(var a=t.width/i,l=t.height,u=tp,f=pm(r);ua*.75;if(y)return u-1}var x=e.heightAtSize(u,{descender:!1});if(x>l)return u-1;u+=1}return u},ox=function(r){for(var e=r.length;e>0;e--)if(/\s/.test(r[e]))return e},ax=function(r,e,t,i){for(var a,l=r.length;l>0;){var u=r.substring(0,l),f=t.encodeText(u),d=t.widthOfTextAtSize(u,i);if(dx&&(x=U+K),C+f>w&&(w=C+f),h.push({text:j,encoded:W,width:K,height:f,x:U,y:C}),D=B==null?void 0:B.trim()}return{fontSize:i,lineHeight:d,lines:h,bounds:{x:m,y,width:x-m,height:w-y}}},lx=function(r,e){var t=e.fontSize,i=e.font,a=e.bounds,l=e.cellCount,u=rv(Ra(r));if(u.length>l)throw new tx(u.length,l);(t===void 0||t===0)&&(t=ix(u,i,a,l));for(var f=a.width/l,d=i.heightAtSize(t,{descender:!1}),h=a.y+(a.height/2-d/2),m=[],y=a.x,x=a.y,w=a.x+a.width,C=a.y+a.height,E=0,R=0;Ew&&(w=U+K),h+d>C&&(C=h+d),m.push({text:u,encoded:W,width:K,height:d,x:U,y:h}),E+=1,R+=j}return{fontSize:t,cells:m,bounds:{x:y,y:x,width:w-y,height:C-x}}},ms=function(r,e){var t=e.alignment,i=e.fontSize,a=e.font,l=e.bounds,u=rv(Ra(r));(i===void 0||i===0)&&(i=np([u],a,l));var f=a.encodeText(u),d=a.widthOfTextAtSize(u,i),h=a.heightAtSize(i,{descender:!1}),m=t===or.Left?l.x:t===or.Center?l.x+l.width/2-d/2:t===or.Right?l.x+l.width-d:l.x,y=l.y+(l.height/2-h/2);return{fontSize:i,line:{text:u,encoded:f,width:d,height:h,x:m,y},bounds:{x:m,y,width:d,height:h}}},bo=function(r){return"normal"in r?r:{normal:r}},sx=/\/([^\0\t\n\f\r\ ]+)[\0\t\n\f\r\ ]+(\d*\.\d+|\d+)[\0\t\n\f\r\ ]+Tf/,vi=function(r){var e,t,i=(e=r.getDefaultAppearance())!==null&&e!==void 0?e:"",a=(t=Zc(i,sx).match)!==null&&t!==void 0?t:[],l=Number(a[2]);return isFinite(l)?l:void 0},ux=/(\d*\.\d+|\d+)[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]*(\d*\.\d+|\d+)?[\0\t\n\f\r\ ]+(g|rg|k)/,on=function(r){var e,t=(e=r.getDefaultAppearance())!==null&&e!==void 0?e:"",i=Zc(t,ux).match,a=i??[],l=a[1],u=a[2],f=a[3],d=a[4],h=a[5];if(h==="g"&&l)return Qv(Number(l));if(h==="rg"&&l&&u&&f)return Dt(Number(l),Number(u),Number(f));if(h==="k"&&l&&u&&f&&d)return Jv(Number(l),Number(u),Number(f),Number(d))},an=function(r,e,t,i){var a;i===void 0&&(i=0);var l=[Ii(e).toString(),df((a=t==null?void 0:t.name)!==null&&a!==void 0?a:"dummy__noop",i).toString()].join(` `);r.setDefaultAppearance(l)},cx=function(r,e){var t,i,a,l=on(e),u=on(r.acroField),f=e.getRectangle(),d=e.getAppearanceCharacteristics(),h=e.getBorderStyle(),m=(t=h==null?void 0:h.getWidth())!==null&&t!==void 0?t:0,y=Ln(d==null?void 0:d.getRotation()),x=ji(f,y),w=x.width,C=x.height,E=yi(rt(rt({},f),{rotation:y})),R=Dt(0,0,0),D=(i=Tr(d==null?void 0:d.getBorderColor()))!==null&&i!==void 0?i:R,L=Tr(d==null?void 0:d.getBackgroundColor()),j=Tr(d==null?void 0:d.getBackgroundColor(),.8),W=(a=l??u)!==null&&a!==void 0?a:R;an(l?e:r.acroField,W);var K={x:0+m/2,y:0+m/2,width:w-m,height:C-m,thickness:1.5,borderWidth:m,borderColor:D,markColor:W};return{normal:{on:yt(E,Ql(rt(rt({},K),{color:L,filled:!0}))),off:yt(E,Ql(rt(rt({},K),{color:L,filled:!1})))},down:{on:yt(E,Ql(rt(rt({},K),{color:j,filled:!0}))),off:yt(E,Ql(rt(rt({},K),{color:j,filled:!1})))}}},fx=function(r,e){var t,i,a,l=on(e),u=on(r.acroField),f=e.getRectangle(),d=e.getAppearanceCharacteristics(),h=e.getBorderStyle(),m=(t=h==null?void 0:h.getWidth())!==null&&t!==void 0?t:0,y=Ln(d==null?void 0:d.getRotation()),x=ji(f,y),w=x.width,C=x.height,E=yi(rt(rt({},f),{rotation:y})),R=Dt(0,0,0),D=(i=Tr(d==null?void 0:d.getBorderColor()))!==null&&i!==void 0?i:R,L=Tr(d==null?void 0:d.getBackgroundColor()),j=Tr(d==null?void 0:d.getBackgroundColor(),.8),W=(a=l??u)!==null&&a!==void 0?a:R;an(l?e:r.acroField,W);var K={x:w/2,y:C/2,width:w-m,height:C-m,borderWidth:m,borderColor:D,dotColor:W};return{normal:{on:yt(E,Jl(rt(rt({},K),{color:L,filled:!0}))),off:yt(E,Jl(rt(rt({},K),{color:L,filled:!1})))},down:{on:yt(E,Jl(rt(rt({},K),{color:j,filled:!0}))),off:yt(E,Jl(rt(rt({},K),{color:j,filled:!1})))}}},dx=function(r,e,t){var i,a,l,u,f,d=on(e),h=on(r.acroField),m=vi(e),y=vi(r.acroField),x=e.getRectangle(),w=e.getAppearanceCharacteristics(),C=e.getBorderStyle(),E=w==null?void 0:w.getCaptions(),R=(i=E==null?void 0:E.normal)!==null&&i!==void 0?i:"",D=(l=(a=E==null?void 0:E.down)!==null&&a!==void 0?a:R)!==null&&l!==void 0?l:"",L=(u=C==null?void 0:C.getWidth())!==null&&u!==void 0?u:0,j=Ln(w==null?void 0:w.getRotation()),W=ji(x,j),K=W.width,B=W.height,U=yi(rt(rt({},x),{rotation:j})),$=Dt(0,0,0),te=Tr(w==null?void 0:w.getBorderColor()),ne=Tr(w==null?void 0:w.getBackgroundColor()),ae=Tr(w==null?void 0:w.getBackgroundColor(),.8),he={x:L,y:L,width:K-L*2,height:B-L*2},Z=ms(R,{alignment:or.Center,fontSize:m??y,font:t,bounds:he}),Se=ms(D,{alignment:or.Center,fontSize:m??y,font:t,bounds:he}),Fe=Math.min(Z.fontSize,Se.fontSize),de=(f=d??h)!==null&&f!==void 0?f:$;an(d||m!==void 0?e:r.acroField,de,t,Fe);var se={x:0+L/2,y:0+L/2,width:K-L,height:B-L,borderWidth:L,borderColor:te,textColor:de,font:t.name,fontSize:Fe};return{normal:yt(U,X0(rt(rt({},se),{color:ne,textLines:[Z.line]}))),down:yt(U,X0(rt(rt({},se),{color:ae,textLines:[Se.line]})))}},hx=function(r,e,t){var i,a,l,u,f=on(e),d=on(r.acroField),h=vi(e),m=vi(r.acroField),y=e.getRectangle(),x=e.getAppearanceCharacteristics(),w=e.getBorderStyle(),C=(i=r.getText())!==null&&i!==void 0?i:"",E=(a=w==null?void 0:w.getWidth())!==null&&a!==void 0?a:0,R=Ln(x==null?void 0:x.getRotation()),D=ji(y,R),L=D.width,j=D.height,W=yi(rt(rt({},y),{rotation:R})),K=Dt(0,0,0),B=Tr(x==null?void 0:x.getBorderColor()),U=Tr(x==null?void 0:x.getBackgroundColor()),$,te,ne=r.isCombed()?0:1,ae={x:E+ne,y:E+ne,width:L-(E+ne)*2,height:j-(E+ne)*2};if(r.isMultiline()){var he=ip(C,{alignment:r.getAlignment(),fontSize:h??m,font:t,bounds:ae});$=he.lines,te=he.fontSize}else if(r.isCombed()){var he=lx(C,{fontSize:h??m,font:t,bounds:ae,cellCount:(l=r.getMaxLength())!==null&&l!==void 0?l:0});$=he.cells,te=he.fontSize}else{var he=ms(C,{alignment:r.getAlignment(),fontSize:h??m,font:t,bounds:ae});$=[he.line],te=he.fontSize}var Z=(u=f??d)!==null&&u!==void 0?u:K;an(f||h!==void 0?e:r.acroField,Z,t,te);var Se={x:0+E/2,y:0+E/2,width:L-E,height:j-E,borderWidth:E??0,borderColor:B,textColor:Z,font:t.name,fontSize:te,color:U,textLines:$,padding:ne};return yt(W,$v(Se))},vx=function(r,e,t){var i,a,l,u=on(e),f=on(r.acroField),d=vi(e),h=vi(r.acroField),m=e.getRectangle(),y=e.getAppearanceCharacteristics(),x=e.getBorderStyle(),w=(i=r.getSelected()[0])!==null&&i!==void 0?i:"",C=(a=x==null?void 0:x.getWidth())!==null&&a!==void 0?a:0,E=Ln(y==null?void 0:y.getRotation()),R=ji(m,E),D=R.width,L=R.height,j=yi(rt(rt({},m),{rotation:E})),W=Dt(0,0,0),K=Tr(y==null?void 0:y.getBorderColor()),B=Tr(y==null?void 0:y.getBackgroundColor()),U=1,$={x:C+U,y:C+U,width:D-(C+U)*2,height:L-(C+U)*2},te=ms(w,{alignment:or.Left,fontSize:d??h,font:t,bounds:$}),ne=te.line,ae=te.fontSize,he=(l=u??f)!==null&&l!==void 0?l:W;an(u||d!==void 0?e:r.acroField,he,t,ae);var Z={x:0+C/2,y:0+C/2,width:D-C,height:L-C,borderWidth:C??0,borderColor:K,textColor:he,font:t.name,fontSize:ae,color:B,textLines:[ne],padding:U};return yt(j,$v(Z))},px=function(r,e,t){var i,a,l=on(e),u=on(r.acroField),f=vi(e),d=vi(r.acroField),h=e.getRectangle(),m=e.getAppearanceCharacteristics(),y=e.getBorderStyle(),x=(i=y==null?void 0:y.getWidth())!==null&&i!==void 0?i:0,w=Ln(m==null?void 0:m.getRotation()),C=ji(h,w),E=C.width,R=C.height,D=yi(rt(rt({},h),{rotation:w})),L=Dt(0,0,0),j=Tr(m==null?void 0:m.getBorderColor()),W=Tr(m==null?void 0:m.getBackgroundColor()),K=r.getOptions(),B=r.getSelected();r.isSorted()&&K.sort();for(var U="",$=0,te=K.length;$1||a.length===1&&i)&&this.enableMultiselect();for(var f=new Array(a.length),d=0,h=a.length;d1||a.length===1&&i)&&this.enableMultiselect();for(var u=new Array(a.length),f=0,d=a.length;fi)throw new rx(t.length,i,this.getName());this.markAsDirty(),this.disableRichFormatting(),t?this.acroField.setValue(Qe.fromText(t)):this.acroField.removeValue()},e.prototype.getAlignment=function(){var t=this.acroField.getQuadding();return t===0?or.Left:t===1?or.Center:t===2?or.Right:or.Left},e.prototype.setAlignment=function(t){ui(t,"alignment",or),this.markAsDirty(),this.acroField.setQuadding(t)},e.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},e.prototype.setMaxLength=function(t){if(gn(t,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),t===void 0)this.acroField.removeMaxLength();else{var i=this.getText();if(i&&i.length>t)throw new nx(i.length,t,this.getName());this.acroField.setMaxLength(t)}},e.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},e.prototype.setImage=function(t){for(var i=this.getAlignment(),a=i===or.Center?fi.Center:i===or.Right?fi.Right:fi.Left,l=this.acroField.getWidgets(),u=0,f=l.length;u{const e=ap[r]||{};let t=1;const i=[];return["Performance","Competence","Connaissance"].forEach(a=>{(e[a]||[]).forEach(l=>{i.push({id:`${r}-${a}-${t++}`,label:l,checked:!1,level:"ec",bucket:a})})}),i},kx=()=>{const[r,e]=ht.useState("CP1"),[t,i]=ht.useState(()=>$0("CP1")),[a,l]=ht.useState(""),[u,f]=ht.useState(""),[d,h]=ht.useState(""),[m,y]=ht.useState(""),[x,w]=ht.useState("neutre"),[C,E]=ht.useState(!1),[R,D]=ht.useState("mistral-small-latest"),[L,j]=ht.useState(""),[W,K]=ht.useState(""),[B,U]=ht.useState(!1),[$,te]=ht.useState(""),[ne,ae]=ht.useState([]),[he,Z]=ht.useState(!1),[Se,Fe]=ht.useState(null),[de,se]=ht.useState(!1),ie=ht.useRef(null);ht.useEffect(()=>{i($0(r))},[r]);const me=ht.useMemo(()=>{const ee=["Performance","Competence","Connaissance"];return t.some(Be=>Be.bucket==="Unassigned")?["Unassigned",...ee]:ee},[t]),be=ht.useMemo(()=>t.some(ee=>ee.checked),[t]),A=ht.useCallback((ee,Be="info",ye=!1)=>{const Re=Date.now();ae(ct=>[...ct,{id:Re,message:ee,type:Be,withProgress:ye}]),ye||setTimeout(()=>{ae(ct=>ct.filter(zt=>zt.id!==Re))},Be==="info"?3e3:5e3)},[]),J=ht.useCallback(()=>{ae(ee=>ee.filter(Be=>!Be.withProgress))},[]),Oe=ht.useCallback((ee,Be)=>{i(ye=>ye.map(Re=>Re.id===ee?{...Re,...Be}:Re))},[]),Ne=ht.useCallback(ee=>{i(Be=>Be.map(ye=>({...ye,checked:ee})))},[]),Ve=ht.useCallback(()=>{const ee=d.trim();ee.length<3||(i(Be=>[...Be,{id:`custom-${Date.now()}`,label:ee,checked:!1,level:"ec",bucket:"Unassigned",source:"Personnalisé"}]),h(""))},[d]),Ae=ht.useCallback(ee=>{i(Be=>Be.filter(ye=>ye.id!==ee))},[]),Ke=ht.useCallback(ee=>{ie.current=ee},[]),Ce=ht.useCallback(()=>{ie.current=null,Fe(null)},[]),it=ht.useCallback((ee,Be)=>{Be.preventDefault(),Se!==ee&&Fe(ee)},[Se]),kt=ht.useCallback((ee,Be)=>{Be.preventDefault(),Fe(null);const ye=ie.current;ye&&(i(Re=>Re.map(ct=>ct.id===ye?{...ct,bucket:ee}:ct)),ie.current=null)},[]),$t=ht.useCallback(()=>{const ee=t.length,Be=t.filter(je=>je.checked),ye={na:Be.filter(je=>je.level==="na").length,ec:Be.filter(je=>je.level==="ec").length,ac:Be.filter(je=>je.level==="ac").length,ma:Be.filter(je=>je.level==="ma").length},Re=ye.ac+ye.ma,ct=ee?Math.round(Re/ee*100):0,zt=["Performance","Competence","Connaissance"];let Te=`## BILAN D'ÉVALUATION DES COMPÉTENCES `;Te+=`================================================== `,(a||u)&&(Te+=`Apprenant : ${(a+" "+u).trim()} `),Te+=`### SYNTHÈSE GLOBALE : `,Te+=`- Non acquis : ${ye.na} `,Te+=`- En cours d'acquisition : ${ye.ec} `,Te+=`- Acquis : ${ye.ac} `,Te+=`- Maîtrisé : ${ye.ma} `,Te+=`- Total validés (Acquis + Maîtrisé) : ${Re} / ${ee} (${ct}%) `;const It=zt.map(je=>{const jt=t.filter(re=>re.bucket===je);if(!jt.length)return null;const F=jt.filter(re=>re.checked&&(re.level==="ac"||re.level==="ma")).length,oe=Math.round(F/jt.length*100);return{label:_l[je],ok:F,total:jt.length,pct:oe}}).filter(Boolean);It.length&&(Te+=`### DÉTAIL PAR CATÉGORIE (taux de validation / total) : `,It.forEach(je=>{Te+=`- ${je.label} : ${je.pct}% (${je.ok}/${je.total}) `}),Te+=` `);const At=Be.filter(je=>je.level==="ac"||je.level==="ma");Te+=`### COMPÉTENCES VALIDÉES : `,At.length?Y0.forEach(je=>{const jt=At.filter(F=>F.bucket===je);jt.length&&(Te+=`• ${_l[je]} : `,jt.forEach(F=>{Te+=` - ${F.label} (${Q0[F.level]}) `}))}):Te+=`Aucune compétence validée pour l'instant. `,Te+=` `;const Ct=Be.filter(je=>je.level==="na"||je.level==="ec");Ct.length&&(Te+=`### COMPÉTENCES À RENFORCER : `,Y0.forEach(je=>{const jt=Ct.filter(F=>F.bucket===je);jt.length&&(Te+=`• ${_l[je]} : `,jt.forEach(F=>{Te+=` - ${F.label} — ${Q0[F.level]} `}))}),Te+=` `),Te+=`## RECOMMANDATIONS : `,ye.ma>ye.ac&&ye.ma>ye.ec&&ye.ma>ye.na&&(Te+=`- Proposer des projets plus complexes pour entretenir la motivation. `,Te+=`- Donner plus d'autonomie et de responsabilités. `),ye.ac>=ye.ma&&ye.ac>=ye.ec&&(Te+=`- Varier les exercices pour transformer les acquis en maîtrise. `,Te+=`- Introduire progressivement des notions avancées. `),ye.ec>ye.ac&&ye.ec>ye.ma&&(Te+=`- Renforcer la pratique guidée pour consolider les acquis fragiles. `,Te+=`- Planifier des révisions régulières sur les notions encore instables. `),ye.na>0&&(Te+=`- Revoir en priorité les notions non acquises avec un accompagnement rapproché. `,Te+=`- Travailler avec des exercices simples et progressifs pour poser les bases. `),Re===0&&(Te+=`- Mettre en place un plan de formation renforcé avec objectifs courts et progressifs. `,Te+=`- Prévoir un suivi rapproché et des feedbacks fréquents. `),Te+=` `,Te+=`### INFORMATIONS COMPLÉMENTAIRES : `,Te+=`- Date d'évaluation : ${new Date().toLocaleDateString("fr-FR")} `,Te+=`- Nombre total de critères : ${ee} `,Te+=`- Sélectionnés : ${Be.length} | Validés (Acquis/Maîtrisé) : ${Re} | À renforcer : ${Ct.length} `,m.trim()&&(Te+=` NOTE FORMATEUR : ${m.trim()} `),te(Te),A("Observation générée.","success")},[m,a,t,u,A]),wt=ht.useCallback(ee=>{te(Be=>C?`${ee} ${Be||""}`.trim():`${Be||""}${Be?` `:""}${ee}`.trim())},[C]),Wt=ht.useCallback(()=>{var ye;const ee=t.filter(Re=>Re.checked&&(Re.level==="ac"||Re.level==="ma")),Be=Re=>ee.filter(ct=>ct.bucket===Re).map(ct=>ct.label);return{cp:r,cpTitle:((ye=$l[r])==null?void 0:ye.h2)||"",apprenant:`${a.trim()} ${u.trim()}`.trim(),validatedCount:ee.length,performance:Be("Performance"),competence:Be("Competence"),connaissance:Be("Connaissance")}},[r,a,t,u]),xr=ht.useCallback(ee=>{const Be=(ye,Re)=>Re.length?`${ye} : ${Re.map(ct=>`- ${ct}`).join(` `)}`:"";return[Be("Performance",ee.performance),Be("Compétence",ee.competence),Be("Connaissance",ee.connaissance)].filter(Boolean).join(` `)},[]),hr=ht.useCallback(async()=>{var ye,Re,ct,zt;const ee=Wt();if(!ee.validatedCount){A("Aucune compétence validée à analyser.","error");return}U(!0),A("Génération des questions…","info",!0);const Be=[`CP évalué : ${ee.cp} — ${ee.cpTitle}`,ee.apprenant?`Apprenant : ${ee.apprenant}`:"","","Compétences validées :",xr(ee),m.trim()?` Notes du formateur : ${m.trim()}`:""].filter(Boolean).join(` `);try{const Te=await fetch("https://api.mistral.ai/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${J0}`},body:JSON.stringify({model:R,temperature:.5,messages:[{role:"system",content:`Tu es ingénieur pédagogique expert du Titre Professionnel CDUI (niveau 6). À partir des compétences validées et des notes du formateur, pose exactement 3 questions ciblées et courtes pour affiner les recommandations pédagogiques du bilan ECF. Les questions doivent aider à cerner : les difficultés rencontrées, les points forts à valoriser, et les axes de progression prioritaires. Format : 3 questions numérotées (1. 2. 3.), directes, sans introduction ni commentaire.`},{role:"user",content:Be}]})});if(!Te.ok){const Ct=await Te.text();throw new Error(`HTTP ${Te.status} — ${Ct}`)}const It=await Te.json(),At=((zt=(ct=(Re=(ye=It==null?void 0:It.choices)==null?void 0:ye[0])==null?void 0:Re.message)==null?void 0:ct.content)==null?void 0:zt.trim())||"";if(!At)throw new Error("Réponse vide.");j(At),K(""),A("Questions générées — répondez ci-dessous puis lancez la synthèse.","success")}catch(Te){A(`Erreur : ${Te.message||Te}`,"error")}finally{J(),U(!1)}},[m,xr,Wt,J,R,A]),sr=ht.useCallback(async()=>{var At,Ct,je,jt,F,oe;const ee=Wt();if(!ee.validatedCount){A("Aucune compétence validée (Acquis/Maîtrisé) à synthétiser.","error");return}const Be=m.trim(),ye=L.trim(),Re=W.trim();Z(!0),A("Génération de la synthèse ECF via Mistral…","info",!0);const ct=[`CP évalué : ${ee.cp} — ${ee.cpTitle}`,ee.apprenant?`Apprenant : ${ee.apprenant}`:"","","Compétences validées (Acquis / Maîtrisé) :",xr(ee),Be?` Notes du formateur : ${Be}`:"",ye&&Re?` Questions posées au formateur : ${ye} Réponses du formateur : ${Re}`:""].filter(Boolean).join(` `),zt=async re=>{const Pe=await fetch("https://api.mistral.ai/v1/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${J0}`},body:JSON.stringify({model:re,temperature:.4,messages:[{role:"system",content:`Tu es ingénieur pédagogique expert du Titre Professionnel CDUI (Concepteur Développeur d'Interfaces Utilisateur, niveau 6). Tu rédiges des bilans ECF (Évaluation en Cours de Formation), documents officiels du Ministère du Travail. À partir des compétences validées, des notes du formateur et — si disponibles — des réponses du formateur à tes questions, produis un texte structuré en deux blocs distincts : 1. **Synthèse** (3 à 4 lignes) : jugement pédagogique global sur le CP évalué, factuel et professionnel. Ne liste pas les critères un à un. 2. **Recommandations** (2 à 3 lignes) : axes de progression prioritaires, ancrés dans les réponses du formateur si elles sont présentes. Adopte un registre adapté à un document officiel. Sois synthétique et précis.`},{role:"user",content:ct}]})});if(!Pe.ok){const M=await Pe.text();throw new Error(`HTTP ${Pe.status} — ${M}`)}return Pe.json()},Te=new Set,It=[R,..._0.filter(re=>re!==R)];try{let re="",Pe=R;for(const M of It)if(!Te.has(M)){Te.add(M);try{const _=await zt(M);if(re=((je=(Ct=(At=_==null?void 0:_.choices)==null?void 0:At[0])==null?void 0:Ct.message)==null?void 0:je.content)||((oe=(F=(jt=_==null?void 0:_.choices)==null?void 0:jt[0])==null?void 0:F.delta)==null?void 0:oe.content)||"",Pe=M,re)break}catch(_){if(Te.size===It.length)throw _}}if(!re)throw new Error("Réponse vide du modèle.");wt(`## RÉSUMÉ IA (CDUI) ---------------------------- ${re.trim()}`),A(`Résumé Mistral inséré (modèle : ${Pe}).`,"success")}catch(re){A(`Erreur Mistral : ${re.message||re}`,"error")}finally{J(),Z(!1)}},[W,m,L,xr,Wt,J,wt,R,A]),Ot=ht.useCallback(async()=>{var Be;const ee=$.trim();if(!ee){A("Génère d'abord un bilan avant d'exporter le PDF.","error");return}try{A("Préparation du PDF…","info",!0);const ye=await pi.create(),Re={w:595.28,h:841.89};let ct=ye.addPage([Re.w,Re.h]);const zt=await ye.embedFont(xo.TimesRoman),Te=await ye.embedFont(xo.TimesRomanBold),It=11,At=40,Ct=Re.w-At*2;let je=Re.h-130;const jt=await fetch(Z0).then(pe=>pe.arrayBuffer()),F=await ye.embedPng(jt),oe=F.scale(.15),re=(pe,Ee)=>{var Ye;pe.drawImage(F,{x:40,y:Re.h-80,width:oe.width,height:oe.height});const He=((Ye=$l[r])==null?void 0:Ye.h1)||"",ft="Bilan d'évaluation"+(He?" – "+He:""),dt=zt.widthOfTextAtSize(ft,16);pe.drawText(ft,{x:(Re.w-dt)/2,y:Re.h-110,size:16,font:zt}),pe.drawText(`Page ${Ee}`,{x:Re.w-160,y:20,size:10,font:zt}),pe.drawText(new Date().toLocaleDateString("fr-FR"),{x:40,y:20,size:10,font:zt})},Pe=pe=>{const Ee=pe.split(/\s+/),He=[];let ft="";for(const dt of Ee){const Ye=ft?`${ft} ${dt}`:dt;(ft.includes("**")?Te:zt).widthOfTextAtSize(Ye.replace(/\*\*/g,""),It)>Ct?(ft&&He.push(ft),ft=dt):ft=Ye}return ft&&He.push(ft),He},_=(pe=>{const Ee=pe.split(` `),He=[];for(const ft of Ee)/^###\s+/.test(ft)?He.push({type:"h3",text:ft.replace(/^###\s+/,"")}):/^##\s+/.test(ft)?He.push({type:"h2",text:ft.replace(/^##\s+/,"")}):/^#\s+/.test(ft)?He.push({type:"h1",text:ft.replace(/^#\s+/,"")}):ft.trim()===""?He.push({type:"br"}):He.push({type:"p",text:ft});return He})(ee);let b=1;re(ct,b),je-=40;for(const pe of _){if(jee(ee.target.value),children:Object.keys(ap).map(ee=>ge.jsx("option",{value:ee,children:ee},ee))})]}),ge.jsxs("div",{className:"topbar-center",children:[ge.jsx("span",{className:"topbar-title",children:at.h1}),ge.jsx("span",{className:"topbar-subtitle",children:at.h2})]}),ge.jsxs("div",{className:"topbar-right",children:[ge.jsx("input",{className:"topbar-input",placeholder:"Prénom",value:a,onChange:ee=>l(ee.target.value)}),ge.jsx("input",{className:"topbar-input",placeholder:"Nom",value:u,onChange:ee=>f(ee.target.value)}),ge.jsxs("div",{className:"topbar-actions",children:[ge.jsx("button",{type:"button",className:"btn-topbar-secondary",onClick:$t,children:"📝 Générer"}),ge.jsx("button",{type:"button",className:"btn-topbar-primary",onClick:sr,disabled:he,children:"✨ Résumer avec l'IA"}),be&&ge.jsx("button",{type:"button",className:"btn-topbar-success",onClick:Ot,children:"📄 PDF"})]})]})]}),ge.jsxs("main",{className:"app-main",children:[ge.jsxs("div",{className:"criteria-toolbar",children:[ge.jsxs("div",{className:"criteria-toolbar-left",children:[ge.jsx("button",{type:"button",className:"btn-text",onClick:()=>Ne(!0),children:"Tout sélectionner"}),ge.jsx("span",{className:"toolbar-sep",children:"·"}),ge.jsx("button",{type:"button",className:"btn-text",onClick:()=>Ne(!1),children:"Tout désélectionner"})]}),ge.jsxs("div",{className:"criteria-toolbar-right",children:[ge.jsx("input",{className:"toolbar-add-input",placeholder:"Ajouter un critère…",value:d,onChange:ee=>h(ee.target.value),onKeyDown:ee=>ee.key==="Enter"&&Ve()}),ge.jsx("button",{type:"button",className:"btn-toolbar-add",onClick:Ve,title:"Ajouter",children:"+"})]})]}),ge.jsx("div",{className:"competences-grid",children:me.map(ee=>{const Be=t.filter(ye=>ye.bucket===ee);return ge.jsxs("div",{className:`competence-card bucket ${Se===ee?"dragover":""}`,children:[ge.jsxs("h4",{children:[_l[ee]," ",ge.jsxs("span",{className:"badge",children:["(",Be.length,")"]})]}),ge.jsx("div",{className:"bucket-list",onDragOver:ye=>it(ee,ye),onDragLeave:()=>Se===ee&&Fe(null),onDrop:ye=>kt(ee,ye),children:Be.map(ye=>ge.jsxs("div",{className:"competence-item",draggable:!0,onDragStart:()=>Ke(ye.id),onDragEnd:Ce,children:[ge.jsx("input",{id:`check-${ye.id}`,type:"checkbox",className:"competence-checkbox sel",checked:ye.checked,onChange:Re=>Oe(ye.id,{checked:Re.target.checked})}),ge.jsx("label",{className:"competence-label",htmlFor:`check-${ye.id}`,children:ge.jsx("div",{children:ye.label})}),ge.jsx("div",{className:"level-group",role:"radiogroup","aria-label":"Niveau",children:bx.map(Re=>ge.jsxs("span",{className:"level-pill",children:[ge.jsx("input",{type:"radio",id:`lvl-${ye.id}-${Re.key}`,name:`lvl-${ye.id}`,value:Re.key,checked:ye.level===Re.key,onChange:()=>Oe(ye.id,{level:Re.key})}),ge.jsxs("label",{htmlFor:`lvl-${ye.id}-${Re.key}`,children:[ge.jsx("span",{className:"short",children:Re.short}),ge.jsx("span",{className:"long",children:Re.label})]})]},Re.key))}),ge.jsx("button",{type:"button",className:"remove-field-btn",title:"Supprimer",onClick:()=>Ae(ye.id),children:"×"})]},ye.id))})]},ee)})}),ge.jsx("div",{className:"section-divider",children:ge.jsx("span",{children:"Synthèse & Export"})}),ge.jsx("div",{className:"evaluation-summary-section",children:ge.jsxs("div",{className:"summary-grid",children:[ge.jsxs("div",{className:"summary-inputs-panel",children:[ge.jsxs("div",{className:"input-group",children:[ge.jsx("label",{htmlFor:"aiNotes",children:"Notes du formateur"}),ge.jsx("textarea",{id:"aiNotes",placeholder:"Saisissez des commentaires sur le comportement, le travail, etc.",value:m,onChange:ee=>y(ee.target.value)})]}),ge.jsxs("div",{className:"input-group ai-questions-group",children:[ge.jsxs("div",{className:"ai-questions-header",children:[ge.jsx("label",{children:"Recommandations — questions IA"}),ge.jsx("button",{type:"button",className:"btn-ask-ai",onClick:hr,disabled:B||he,children:B?"…":"💬 Générer les questions"})]}),L&&ge.jsxs(ge.Fragment,{children:[ge.jsx("div",{className:"ai-questions-box",children:L}),ge.jsx("textarea",{className:"ai-answers-textarea",placeholder:"Vos réponses aux questions ci-dessus…",value:W,onChange:ee=>K(ee.target.value)})]})]}),ge.jsxs("div",{className:"row-options",children:[ge.jsxs("div",{className:"input-group",children:[ge.jsx("label",{htmlFor:"aiTone",children:"Tonalité de l'IA"}),ge.jsxs("select",{id:"aiTone",value:x,onChange:ee=>w(ee.target.value),children:[ge.jsx("option",{value:"neutre",children:"Neutre 😐"}),ge.jsx("option",{value:"valorisant",children:"Valorisant 🌟"}),ge.jsx("option",{value:"exigeant",children:"Exigeant 🎯"})]})]}),ge.jsx("div",{className:"input-group-checkbox",children:ge.jsxs("label",{className:"checkbox-label",children:[ge.jsx("input",{id:"aiPrepend",type:"checkbox",checked:C,onChange:ee=>E(ee.target.checked)}),ge.jsx("span",{children:"Insérer en tête du bilan"})]})})]}),ge.jsxs("div",{className:"api-config-section",children:[ge.jsx("button",{type:"button",className:"api-toggle-btn",onClick:()=>se(!de),children:de?"▲ Masquer les paramètres IA":"⚙️ Paramètres Mistral IA"}),de&&ge.jsxs("div",{className:"api-fields-grid",children:[ge.jsxs("div",{className:"input-group",children:[ge.jsx("label",{htmlFor:"mistralModel",children:"Modèle Mistral"}),ge.jsx("select",{id:"mistralModel",value:R,onChange:ee=>D(ee.target.value),children:_0.map(ee=>ge.jsx("option",{value:ee,children:ee},ee))})]}),ge.jsxs("div",{className:"input-group",children:[ge.jsx("label",{children:"Clé API"}),ge.jsx("input",{type:"text",readOnly:!0,value:"••••••••••••••••",style:{color:"var(--text-success, #16a34a)",cursor:"default"}})]})]})]})]}),ge.jsxs("div",{className:"summary-output-panel",children:[ge.jsx("label",{htmlFor:"observation",children:"Aperçu du bilan final (Markdown)"}),ge.jsx("textarea",{id:"observation",className:"observation-textarea",placeholder:"Le bilan d'évaluation généré apparaîtra ici. Vous pouvez également le modifier manuellement.",value:$,onChange:ee=>te(ee.target.value)})]})]})})]}),ge.jsx("div",{className:"toast-container",children:ne.map(ee=>ge.jsx("div",{className:`toast toast-${ee.type}`,children:ee.withProgress?ge.jsxs(ge.Fragment,{children:[ge.jsx("span",{children:ee.message}),ge.jsx("div",{className:"toast-progress",children:ge.jsx("div",{className:"toast-progress-bar"})})]}):ge.jsx("span",{children:ee.message})},ee.id))})]})};function Cx(){return ge.jsx(kx,{})}am.createRoot(document.getElementById("root")).render(ge.jsx(ht.StrictMode,{children:ge.jsx(Cx,{})}));