var ob=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var AH=ob((at,lt)=>{function ab(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vy={exports:{}},jo={};/* object-assign (c) Sindre Sorhus @license MIT */var Xd=Object.getOwnPropertySymbols,lb=Object.prototype.hasOwnProperty,sb=Object.prototype.propertyIsEnumerable;function ub(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function cb(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var xy=cb()?Object.assign:function(e,t){for(var n,r=ub(e),i,o=1;o"u"||typeof MessageChannel!="function"){var s=null,u=null,c=function(){if(s!==null)try{var N=e.unstable_now();s(!0,N),s=null}catch(H){throw setTimeout(c,0),H}};t=function(N){s!==null?setTimeout(t,0,N):(s=N,setTimeout(c,0))},n=function(N,H){u=setTimeout(N,H)},r=function(){clearTimeout(u)},e.unstable_shouldYield=function(){return!1},i=e.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,d=window.clearTimeout;if(typeof console<"u"){var p=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof p!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,h=-1,g=5,v=0;e.unstable_shouldYield=function(){return e.unstable_now()>=v},i=function(){},e.unstable_forceFrameRate=function(N){0>N||125>>1,pe=N[te];if(pe!==void 0&&0R(et,w))tt!==void 0&&0>R(tt,et)?(N[te]=tt,N[Ue]=w,te=Ue):(N[te]=et,N[he]=w,te=he);else if(tt!==void 0&&0>R(tt,w))N[te]=tt,N[Ue]=w,te=Ue;else break e}}return H}return null}function R(N,H){var w=N.sortIndex-H.sortIndex;return w!==0?w:N.id-H.id}var T=[],U=[],z=1,M=null,X=3,re=!1,V=!1,ae=!1;function xe(N){for(var H=b(U);H!==null;){if(H.callback===null)$(U);else if(H.startTime<=N)$(U),H.sortIndex=H.expirationTime,O(T,H);else break;H=b(U)}}function oe(N){if(ae=!1,xe(N),!V)if(b(T)!==null)V=!0,t(Ce);else{var H=b(U);H!==null&&n(oe,H.startTime-N)}}function Ce(N,H){V=!1,ae&&(ae=!1,r()),re=!0;var w=X;try{for(xe(H),M=b(T);M!==null&&(!(M.expirationTime>H)||N&&!e.unstable_shouldYield());){var te=M.callback;if(typeof te=="function"){M.callback=null,X=M.priorityLevel;var pe=te(M.expirationTime<=H);H=e.unstable_now(),typeof pe=="function"?M.callback=pe:M===b(T)&&$(T),xe(H)}else $(T);M=b(T)}if(M!==null)var he=!0;else{var et=b(U);et!==null&&n(oe,et.startTime-H),he=!1}return he}finally{M=null,X=w,re=!1}}var E=i;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){V||re||(V=!0,t(Ce))},e.unstable_getCurrentPriorityLevel=function(){return X},e.unstable_getFirstCallbackNode=function(){return b(T)},e.unstable_next=function(N){switch(X){case 1:case 2:case 3:var H=3;break;default:H=X}var w=X;X=H;try{return N()}finally{X=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=E,e.unstable_runWithPriority=function(N,H){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var w=X;X=N;try{return H()}finally{X=w}},e.unstable_scheduleCallback=function(N,H,w){var te=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0te?(N.sortIndex=w,O(U,N),b(T)===null&&N===b(U)&&(ae?r():ae=!0,n(oe,w-te))):(N.sortIndex=pe,O(T,N),V||re||(V=!0,t(Ce))),N},e.unstable_wrapCallback=function(N){var H=X;return function(){var w=X;X=H;try{return N.apply(this,arguments)}finally{X=w}}}})(My);jy.exports=My;var wb=jy.exports;/** @license React v17.0.2 * 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 Rl=I,we=xy,Pe=wb;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sb=/^[: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]*$/,Zd=Object.prototype.hasOwnProperty,ep={},tp={};function Eb(e){return Zd.call(tp,e)?!0:Zd.call(ep,e)?!1:Sb.test(e)?tp[e]=!0:(ep[e]=!0,!1)}function Cb(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function kb(e,t,n,r){if(t===null||typeof t>"u"||Cb(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ze(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new ze(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new ze(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new ze(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new ze(e,2,!1,e,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(e){Ae[e]=new ze(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new ze(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new ze(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new ze(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new ze(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uc=/[\-:]([a-z])/g;function Hc(e){return e[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(e){var t=e.replace(Uc,Hc);Ae[t]=new ze(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Uc,Hc);Ae[t]=new ze(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Uc,Hc);Ae[t]=new ze(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new ze(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new ze("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new ze(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vc(e,t,n,r){var i=Ae.hasOwnProperty(t)?Ae[t]:null,o=i!==null?i.type===0:r?!1:!(!(2l||i[a]!==o[l])return` `+i[a].replace(" at new "," at ");while(1<=a&&0<=l);break}}}finally{Es=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Gi(e):""}function _b(e){switch(e.tag){case 5:return Gi(e.type);case 16:return Gi("Lazy");case 13:return Gi("Suspense");case 19:return Gi("SuspenseList");case 0:case 2:case 15:return e=aa(e.type,!1),e;case 11:return e=aa(e.type.render,!1),e;case 22:return e=aa(e.type._render,!1),e;case 1:return e=aa(e.type,!0),e;default:return""}}function Mr(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case an:return"Fragment";case In:return"Portal";case Zi:return"Profiler";case Wc:return"StrictMode";case eo:return"Suspense";case Ua:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qc:return(e.displayName||"Context")+".Consumer";case Gc:return(e._context.displayName||"Context")+".Provider";case Al:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Nl:return Mr(e.type);case Xc:return Mr(e._render);case Kc:t=e._payload,e=e._init;try{return Mr(e(t))}catch{}}return null}function bn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function zy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ob(e){var t=zy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function la(e){e._valueTracker||(e._valueTracker=Ob(e))}function Uy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zy(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ha(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xu(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function rp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=bn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hy(e,t){t=t.checked,t!=null&&Vc(e,"checked",t,!1)}function bu(e,t){Hy(e,t);var n=bn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?wu(e,t.type,n):t.hasOwnProperty("defaultValue")&&wu(e,t.type,bn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ip(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function wu(e,t,n){(t!=="number"||Ha(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function $b(e){var t="";return Rl.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Su(e,t){return e=we({children:void 0},t),(t=$b(t.children))&&(e.children=t),e}function Dr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i=n.length))throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:bn(n)}}function Vy(e,t){var n=bn(t.value),r=bn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ap(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Cu={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function Wy(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ku(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Wy(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var sa,Gy=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==Cu.svg||"innerHTML"in e)e.innerHTML=t;else{for(sa=sa||document.createElement("div"),sa.innerHTML=""+t.valueOf().toString()+"",t=sa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var to={animationIterationCount:!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},Pb=["Webkit","ms","Moz","O"];Object.keys(to).forEach(function(e){Pb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),to[t]=to[e]})});function qy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||to.hasOwnProperty(e)&&to[e]?(""+t).trim():t+"px"}function Ky(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=qy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Tb=we({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 _u(e,t){if(t){if(Tb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Ou(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Qc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $u=null,Br=null,zr=null;function lp(e){if(e=Bo(e)){if(typeof $u!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Dl(t),$u(e.stateNode,e.type,t))}}function Xy(e){Br?zr?zr.push(e):zr=[e]:Br=e}function Yy(){if(Br){var e=Br,t=zr;if(zr=Br=null,lp(e),t)for(e=0;er?0:1<n;n++)t.push(e);return t}function Il(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-wn(t),e[t]=n}var wn=Math.clz32?Math.clz32:Gb,Vb=Math.log,Wb=Math.LN2;function Gb(e){return e===0?32:31-(Vb(e)/Wb|0)|0}var qb=Pe.unstable_UserBlockingPriority,Kb=Pe.unstable_runWithPriority,Oa=!0;function Xb(e,t,n,r){Fn||ef();var i=af,o=Fn;Fn=!0;try{Jy(i,e,t,n,r)}finally{(Fn=o)||tf()}}function Yb(e,t,n,r){Kb(qb,af.bind(null,e,t,n,r))}function af(e,t,n,r){if(Oa){var i;if((i=(t&4)===0)&&0=ro),yp=" ",vp=!1;function h0(e,t){switch(e){case"keyup":return xw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function g0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Nr=!1;function ww(e,t){switch(e){case"compositionend":return g0(t);case"keypress":return t.which!==32?null:(vp=!0,yp);case"textInput":return e=t.data,e===yp&&vp?null:e;default:return null}}function Sw(e,t){if(Nr)return e==="compositionend"||!ff&&h0(e,t)?(e=d0(),$a=sf=sn=null,Nr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sp(n)}}function x0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?x0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cp(){for(var e=window,t=Ha();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ha(e.document)}return t}function Nu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Aw=Jt&&"documentMode"in document&&11>=document.documentMode,Lr=null,Lu=null,oo=null,Iu=!1;function kp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Iu||Lr==null||Lr!==Ha(r)||(r=Lr,"selectionStart"in r&&Nu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),oo&&Co(oo,r)||(oo=r,r=qa(Lu,"onSelect"),0Fr||(e.current=ju[Fr],ju[Fr]=null,Fr--)}function Ee(e,t){Fr++,ju[Fr]=e.current,e.current=t}var Sn={},je=On(Sn),Ge=On(!1),Hn=Sn;function Qr(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function qe(e){return e=e.childContextTypes,e!=null}function Ya(){ve(Ge),ve(je)}function Lp(e,t,n){if(je.current!==Sn)throw Error(L(168));Ee(je,t),Ee(Ge,n)}function _0(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(L(108,Mr(t)||"Unknown",i));return we({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Hn=je.current,Ee(je,e),Ee(Ge,Ge.current),!0}function Ip(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=_0(e,t,Hn),r.__reactInternalMemoizedMergedChildContext=e,ve(Ge),ve(je),Ee(je,e)):ve(Ge),Ee(Ge,n)}var pf=null,zn=null,Fw=Pe.unstable_runWithPriority,hf=Pe.unstable_scheduleCallback,Mu=Pe.unstable_cancelCallback,jw=Pe.unstable_shouldYield,Fp=Pe.unstable_requestPaint,Du=Pe.unstable_now,Mw=Pe.unstable_getCurrentPriorityLevel,Bl=Pe.unstable_ImmediatePriority,O0=Pe.unstable_UserBlockingPriority,$0=Pe.unstable_NormalPriority,P0=Pe.unstable_LowPriority,T0=Pe.unstable_IdlePriority,Fs={},Dw=Fp!==void 0?Fp:function(){},Gt=null,Ra=null,js=!1,jp=Du(),Ie=1e4>jp?Du:function(){return Du()-jp};function Zr(){switch(Mw()){case Bl:return 99;case O0:return 98;case $0:return 97;case P0:return 96;case T0:return 95;default:throw Error(L(332))}}function R0(e){switch(e){case 99:return Bl;case 98:return O0;case 97:return $0;case 96:return P0;case 95:return T0;default:throw Error(L(332))}}function Vn(e,t){return e=R0(e),Fw(e,t)}function _o(e,t,n){return e=R0(e),hf(e,t,n)}function zt(){if(Ra!==null){var e=Ra;Ra=null,Mu(e)}A0()}function A0(){if(!js&&Gt!==null){js=!0;var e=0;try{var t=Gt;Vn(99,function(){for(;e$?(R=b,b=null):R=b.sibling;var T=d(h,b,v[$],S);if(T===null){b===null&&(b=R);break}e&&b&&T.alternate===null&&t(h,b),g=o(T,g,$),O===null?C=T:O.sibling=T,O=T,b=R}if($===v.length)return n(h,b),C;if(b===null){for(;$$?(R=b,b=null):R=b.sibling;var U=d(h,b,T.value,S);if(U===null){b===null&&(b=R);break}e&&b&&U.alternate===null&&t(h,b),g=o(U,g,$),O===null?C=U:O.sibling=U,O=U,b=R}if(T.done)return n(h,b),C;if(b===null){for(;!T.done;$++,T=v.next())T=f(h,T.value,S),T!==null&&(g=o(T,g,$),O===null?C=T:O.sibling=T,O=T);return C}for(b=r(h,b);!T.done;$++,T=v.next())T=p(b,h,$,T.value,S),T!==null&&(e&&T.alternate!==null&&b.delete(T.key===null?$:T.key),g=o(T,g,$),O===null?C=T:O.sibling=T,O=T);return e&&b.forEach(function(z){return t(h,z)}),C}return function(h,g,v,S){var C=typeof v=="object"&&v!==null&&v.type===an&&v.key===null;C&&(v=v.props.children);var O=typeof v=="object"&&v!==null;if(O)switch(v.$$typeof){case Wi:e:{for(O=v.key,C=g;C!==null;){if(C.key===O){switch(C.tag){case 7:if(v.type===an){n(h,C.sibling),g=i(C,v.props.children),g.return=h,h=g;break e}break;default:if(C.elementType===v.type){n(h,C.sibling),g=i(C,v.props),g.ref=Ti(h,C,v),g.return=h,h=g;break e}}n(h,C);break}else t(h,C);C=C.sibling}v.type===an?(g=qr(v.props.children,h.mode,S,v.key),g.return=h,h=g):(S=Ia(v.type,v.key,v.props,null,h.mode,S),S.ref=Ti(h,g,v),S.return=h,h=S)}return a(h);case In:e:{for(C=v.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(h,g.sibling),g=i(g,v.children||[]),g.return=h,h=g;break e}else{n(h,g);break}else t(h,g);g=g.sibling}g=Hs(v,h.mode,S),g.return=h,h=g}return a(h)}if(typeof v=="string"||typeof v=="number")return v=""+v,g!==null&&g.tag===6?(n(h,g.sibling),g=i(g,v),g.return=h,h=g):(n(h,g),g=Us(v,h.mode,S),g.return=h,h=g),a(h);if(fa(v))return m(h,g,v,S);if(Ci(v))return y(h,g,v,S);if(O&&da(h,v),typeof v>"u"&&!C)switch(h.tag){case 1:case 22:case 0:case 11:case 15:throw Error(L(152,Mr(h.type)||"Component"))}return n(h,g)}}var tl=j0(!0),M0=j0(!1),zo={},jt=On(zo),$o=On(zo),Po=On(zo);function Mn(e){if(e===zo)throw Error(L(174));return e}function zu(e,t){switch(Ee(Po,t),Ee($o,e),Ee(jt,zo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ku(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ku(t,e)}ve(jt),Ee(jt,t)}function ei(){ve(jt),ve($o),ve(Po)}function Up(e){Mn(Po.current);var t=Mn(jt.current),n=ku(t,e.type);t!==n&&(Ee($o,e),Ee(jt,n))}function vf(e){$o.current===e&&(ve(jt),ve($o))}var Se=On(0);function nl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Kt=null,cn=null,Mt=!1;function D0(e,t){var n=ht(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Hp(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Uu(e){if(Mt){var t=cn;if(t){var n=t;if(!Hp(e,t)){if(t=Ur(n.nextSibling),!t||!Hp(e,t)){e.flags=e.flags&-1025|2,Mt=!1,Kt=e;return}D0(Kt,n)}Kt=e,cn=Ur(t.firstChild)}else e.flags=e.flags&-1025|2,Mt=!1,Kt=e}}function Vp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kt=e}function pa(e){if(e!==Kt)return!1;if(!Mt)return Vp(e),Mt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Fu(t,e.memoizedProps))for(t=cn;t;)D0(e,t),t=Ur(t.nextSibling);if(Vp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){cn=Ur(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}cn=null}}else cn=Kt?Ur(e.stateNode.nextSibling):null;return!0}function Ms(){cn=Kt=null,Mt=!1}var Vr=[];function xf(){for(var e=0;eo))throw Error(L(301));o+=1,Te=Ne=null,t.updateQueue=null,ao.current=Vw,e=n(r,i)}while(lo)}if(ao.current=ll,t=Ne!==null&&Ne.next!==null,To=0,Te=Ne=ke=null,rl=!1,t)throw Error(L(300));return e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?ke.memoizedState=Te=e:Te=Te.next=e,Te}function Jn(){if(Ne===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Te===null?ke.memoizedState:Te.next;if(t!==null)Te=t,Ne=e;else{if(e===null)throw Error(L(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Te===null?ke.memoizedState=Te=e:Te=Te.next=e}return Te}function Lt(e,t){return typeof t=="function"?t(e):t}function Ri(e){var t=Jn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ne,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){i=i.next,r=r.baseState;var l=a=o=null,s=i;do{var u=s.lane;if((To&u)===u)l!==null&&(l=l.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var c={lane:u,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,ke.lanes|=u,Uo|=u}s=s.next}while(s!==null&&s!==i);l===null?o=r:l.next=a,pt(r,t.memoizedState)||(kt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ai(e){var t=Jn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);pt(o,t.memoizedState)||(kt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wp(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(i!==null?e=i===r:(e=e.mutableReadLanes,(e=(To&e)===e)&&(t._workInProgressVersionPrimary=r,Vr.push(t))),e)return n(t._source);throw Vr.push(t),Error(L(350))}function B0(e,t,n,r){var i=Be;if(i===null)throw Error(L(349));var o=t._getVersion,a=o(t._source),l=ao.current,s=l.useState(function(){return Wp(i,t,n)}),u=s[1],c=s[0];s=Te;var f=e.memoizedState,d=f.refs,p=d.getSnapshot,m=f.source;f=f.subscribe;var y=ke;return e.memoizedState={refs:d,source:t,subscribe:r},l.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var h=o(t._source);if(!pt(a,h)){h=n(t._source),pt(c,h)||(u(h),h=yn(y),i.mutableReadLanes|=h&i.pendingLanes),h=i.mutableReadLanes,i.entangledLanes|=h;for(var g=i.entanglements,v=h;0n?98:n,function(){e(!0)}),Vn(97<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[un]=t,e[Xa]=r,X0(e,t,!1,!1),t.stateNode=e,a=Ou(n,r),n){case"dialog":ge("cancel",e),ge("close",e),i=r;break;case"iframe":case"object":case"embed":ge("load",e),i=r;break;case"video":case"audio":for(i=0;iQu&&(t.flags|=64,o=!0,Li(r,!1),t.lanes=33554432)}else{if(!o)if(e=nl(a),e!==null){if(t.flags|=64,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Li(r,!0),r.tail===null&&r.tailMode==="hidden"&&!a.alternate&&!Mt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ie()-r.renderingStartTime>Qu&&n!==1073741824&&(t.flags|=64,o=!0,Li(r,!1),t.lanes=33554432);r.isBackwards?(a.sibling=t.child,t.child=a):(n=r.last,n!==null?n.sibling=a:t.child=a,r.last=a)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ie(),n.sibling=null,t=Se.current,Ee(Se,o?t&1|2:t&1),n):null;case 23:case 24:return Pf(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(L(156,t.tag))}function qw(e){switch(e.tag){case 1:qe(e.type)&&Ya();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ei(),ve(Ge),ve(je),xf(),t=e.flags,t&64)throw Error(L(285));return e.flags=t&-4097|64,e;case 5:return vf(e),null;case 13:return ve(Se),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ve(Se),null;case 4:return ei(),null;case 10:return mf(e),null;case 23:case 24:return Pf(),null;default:return null}}function kf(e,t){try{var n="",r=t;do n+=_b(r),r=r.return;while(r);var i=n}catch(o){i=` Error generating stack: `+o.message+` `+o.stack}return{value:e,source:t,stack:i}}function qu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Kw=typeof WeakMap=="function"?WeakMap:Map;function Q0(e,t,n){n=gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ul||(ul=!0,Zu=r),qu(e,t)},n}function Z0(e,t,n){n=gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return qu(e,t),r(i)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(It===null?It=new Set([this]):It.add(this),qu(e,t));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}var Xw=typeof WeakSet=="function"?WeakSet:Set;function ih(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){xn(e,n)}else t.current=null}function Yw(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Ct(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&df(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(L(163))}function Jw(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var i=e;r=i.next,i=i.tag,i&4&&i&1&&(sv(n,e),oS(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ct(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Dp(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}Dp(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&C0(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&i0(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(L(163))}function oh(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=i!=null&&i.hasOwnProperty("display")?i.display:null,r.style.display=qy("display",i)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ah(e,t){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(pf,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,i!==void 0)if(r&4)sv(t,n);else{r=t;try{i()}catch(o){xn(r,o)}}n=n.next}while(n!==e)}break;case 1:if(ih(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){xn(t,o)}break;case 5:ih(t);break;case 4:ev(e,t)}}function lh(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function sh(e){return e.tag===5||e.tag===3||e.tag===4}function uh(e){e:{for(var t=e.return;t!==null;){if(sh(t))break e;t=t.return}throw Error(L(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(L(161))}n.flags&16&&(vo(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||sh(n.return)){n=null;break e}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 t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?Ku(e,n,t):Xu(e,n,t)}function Ku(e,t,n){var r=e.tag,i=r===5||r===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ka));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function Xu(e,t,n){var r=e.tag,i=r===5||r===6;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xu(e,t,n),e=e.sibling;e!==null;)Xu(e,t,n),e=e.sibling}function ev(e,t){for(var n=t,r=!1,i,o;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(L(160));switch(i=r.stateNode,r.tag){case 5:o=!1;break e;case 3:i=i.containerInfo,o=!0;break e;case 4:i=i.containerInfo,o=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var a=e,l=n,s=l;;)if(ah(a,s),s.child!==null&&s.tag!==4)s.child.return=s,s=s.child;else{if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}o?(a=i,l=n.stateNode,a.nodeType===8?a.parentNode.removeChild(l):a.removeChild(l)):i.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){i=n.stateNode.containerInfo,o=!0,n.child.return=n,n=n.child;continue}}else if(ah(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function zs(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var i=e!==null?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,o!==null){for(n[Xa]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Hy(n,r),Ou(e,i),t=Ou(e,r),i=0;ii&&(i=a),n&=~o}if(n=i,n=Ie()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Zw(n/1960))-n,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}Re!==5&&(Re=2),s=kf(s,l),d=a;do{switch(d.tag){case 3:o=s,d.flags|=4096,t&=-t,d.lanes|=t;var O=Q0(d,o,t);Mp(d,O);break e;case 1:o=s;var b=d.type,$=d.stateNode;if(!(d.flags&64)&&(typeof b.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(It===null||!It.has($)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=Z0(d,o,t);Mp(d,R);break e}}d=d.return}while(d!==null)}lv(n)}catch(T){t=T,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function ov(){var e=sl.current;return sl.current=ll,e===null?ll:e}function Xi(e,t){var n=G;G|=16;var r=ov();Be===e&&Fe===t||Gr(e,t);do try{tS();break}catch(i){iv(e,i)}while(!0);if(gf(),G=n,sl.current=r,Oe!==null)throw Error(L(261));return Be=null,Fe=0,Re}function tS(){for(;Oe!==null;)av(Oe)}function nS(){for(;Oe!==null&&!jw();)av(Oe)}function av(e){var t=uv(e.alternate,e,Wn);e.memoizedProps=e.pendingProps,t===null?lv(e):Oe=t,_f.current=null}function lv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=qw(t),n!==null){n.flags&=2047,Oe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=Gw(n,t,Wn),n!==null){Oe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Wn&1073741824||!(n.mode&4)){for(var r=0,i=n.child;i!==null;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1a&&(l=a,a=O,O=l),l=Ep(v,O),o=Ep(v,a),l&&o&&(C.rangeCount!==1||C.anchorNode!==l.node||C.anchorOffset!==l.offset||C.focusNode!==o.node||C.focusOffset!==o.offset)&&(S=S.createRange(),S.setStart(l.node,l.offset),C.removeAllRanges(),O>a?(C.addRange(S),C.extend(o.node,o.offset)):(S.setEnd(o.node,o.offset),C.addRange(S)))))),S=[],C=v;C=C.parentNode;)C.nodeType===1&&S.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;vIe()-$f?Gr(e,0):Of|=n),vt(e,t)}function sS(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(qt===0&&(qt=oi),t=hr(62914560&~qt),t===0&&(t=4194304)):t=Zr()===99?1:2:t=1),n=st(),e=Hl(e,t),e!==null&&(Il(e,t,n),vt(e,n))}var uv;uv=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)kt=!0;else if(n&r)kt=!!(e.flags&16384);else{switch(kt=!1,t.tag){case 3:Jp(t),Ms();break;case 5:Up(t);break;case 1:qe(t.type)&&Ta(t);break;case 4:zu(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;Ee(Ja,i._currentValue),i._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Qp(e,t,n):(Ee(Se,Se.current&1),t=Xt(e,t,n),t!==null?t.sibling:null);Ee(Se,Se.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return rh(e,t,n);t.flags|=64}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ee(Se,Se.current),r)break;return null;case 23:case 24:return t.lanes=0,Ds(e,t,n)}return Xt(e,t,n)}else kt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=Qr(t,je.current),Hr(t,n),i=wf(null,t,r,e,i,n),t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)){var o=!0;Ta(t)}else o=!1;t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yf(t);var a=r.getDerivedStateFromProps;typeof a=="function"&&el(t,r,a,e),i.updater=zl,t.stateNode=i,i._reactInternals=t,Bu(t,r,e,n),t=Wu(null,t,r,!0,o,n)}else t.tag=0,We(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=i._init,i=o(i._payload),t.type=i,o=t.tag=cS(i),e=Ct(i,e),o){case 0:t=Vu(null,t,i,e,n);break e;case 1:t=Yp(null,t,i,e,n);break e;case 11:t=Kp(null,t,i,e,n);break e;case 14:t=Xp(null,t,i,Ct(i.type,e),r,n);break e}throw Error(L(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),Vu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),Yp(e,t,r,i,n);case 3:if(Jp(t),r=t.updateQueue,e===null||r===null)throw Error(L(282));if(r=t.pendingProps,i=t.memoizedState,i=i!==null?i.element:null,L0(e,t),Oo(t,r,null,n),r=t.memoizedState.element,r===i)Ms(),t=Xt(e,t,n);else{if(i=t.stateNode,(o=i.hydrate)&&(cn=Ur(t.stateNode.containerInfo.firstChild),Kt=t,o=Mt=!0),o){if(e=i.mutableSourceEagerHydrationData,e!=null)for(i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fv)}catch(e){console.error(e)}}fv(),Fy.exports=bt;var yS=Fy.exports;const vS=Fo(yS);/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function dv(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bS(){return Math.random().toString(36).substr(2,8)}function hh(e,t){return{usr:e.state,key:e.key,idx:t}}function ic(e,t,n,r){return n===void 0&&(n=null),fl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wl(t):t,{state:n,key:t&&t.key||r||bS()})}function pv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Wl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function wS(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,l=fn.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(fl({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function f(){l=fn.Pop;let h=c(),g=h==null?null:h-u;u=h,s&&s({action:l,location:y.location,delta:g})}function d(h,g){l=fn.Push;let v=ic(y.location,h,g);u=c()+1;let S=hh(v,u),C=y.createHref(v);try{a.pushState(S,"",C)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;i.location.assign(C)}o&&s&&s({action:l,location:y.location,delta:1})}function p(h,g){l=fn.Replace;let v=ic(y.location,h,g);u=c();let S=hh(v,u),C=y.createHref(v);a.replaceState(S,"",C),o&&s&&s({action:l,location:y.location,delta:0})}function m(h){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof h=="string"?h:pv(h);return v=v.replace(/ $/,"%20"),Ye(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let y={get action(){return l},get location(){return e(i,a)},listen(h){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(ph,f),s=h,()=>{i.removeEventListener(ph,f),s=null}},createHref(h){return t(i,h)},createURL:m,encodeLocation(h){let g=m(h);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:p,go(h){return a.go(h)}};return y}var gh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gh||(gh={}));function SS(e,t,n){return n===void 0&&(n="/"),ES(e,t,n)}function ES(e,t,n,r){let i=typeof t=="string"?Wl(t):t,o=mv(i.pathname||"/",n);if(o==null)return null;let a=hv(e);CS(a);let l=null;for(let s=0;l==null&&s{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(Ye(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Kr([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(Ye(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hv(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:RS(u,o.index),routesMeta:c})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let s of gv(o.path))i(o,a,s)}),t}function gv(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=gv(r.join("/")),l=[];return l.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function CS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:AS(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const kS=/^:[\w-]+$/,_S=3,OS=2,$S=1,PS=10,TS=-2,mh=e=>e==="*";function RS(e,t){let n=e.split("/"),r=n.length;return n.some(mh)&&(r+=TS),t&&(r+=OS),n.filter(i=>!mh(i)).reduce((i,o)=>i+(kS.test(o)?_S:o===""?$S:PS),r)}function AS(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function NS(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let l=0;l{let{paramName:d,isOptional:p}=c;if(d==="*"){let y=l[f]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=l[f];return p&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function IS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),dv(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function FS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Kr=e=>e.join("/").replace(/\/\/+/g,"/"),jS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function MS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yv=["post","put","patch","delete"];new Set(yv);const DS=["get",...yv];new Set(DS);/** * React Router v6.30.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},g,{params:Object.assign({},s,g.params),pathname:Kr([u,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:Kr([u,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),a,n,r);return t&&h?I.createElement(Gl.Provider,{value:{location:dl({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:fn.Pop}},h):h}function WS(){let e=ZS(),t=MS(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},t),n?I.createElement("pre",{style:i},n):null,null)}const GS=I.createElement(WS,null);class qS extends I.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?I.createElement(ql.Provider,{value:this.props.routeContext},I.createElement(xv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function KS(e){let{routeContext:t,match:n,children:r}=e,i=I.useContext(BS);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(ql.Provider,{value:t},r)}function XS(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let c=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);c>=0||Ye(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,f,d)=>{let p,m=!1,y=null,h=null;n&&(p=l&&f.route.id?l[f.route.id]:void 0,y=f.route.errorElement||GS,s&&(u<0&&d===0?(eE("route-fallback"),m=!0,h=null):u===d&&(m=!0,h=f.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,d+1)),v=()=>{let S;return p?S=y:m?S=h:f.route.Component?S=I.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,I.createElement(KS,{match:f,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?I.createElement(qS,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var bv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(bv||{});function YS(e){let t=I.useContext(zS);return t||Ye(!1),t}function JS(e){let t=I.useContext(ql);return t||Ye(!1),t}function QS(e){let t=JS(),n=t.matches[t.matches.length-1];return n.route.id||Ye(!1),n.route.id}function ZS(){var e;let t=I.useContext(xv),n=YS(bv.UseRouteError),r=QS();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const yh={};function eE(e,t,n){yh[e]||(yh[e]=!0)}function tE(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function wv(e){Ye(!1)}function nE(e){let{basename:t="/",children:n=null,location:r,navigationType:i=fn.Pop,navigator:o,static:a=!1,future:l}=e;Lf()&&Ye(!1);let s=t.replace(/^\/*/,"/"),u=I.useMemo(()=>({basename:s,navigator:o,static:a,future:dl({v7_relativeSplatPath:!1},l)}),[s,l,o,a]);typeof r=="string"&&(r=Wl(r));let{pathname:c="/",search:f="",hash:d="",state:p=null,key:m="default"}=r,y=I.useMemo(()=>{let h=mv(c,s);return h==null?null:{location:{pathname:h,search:f,hash:d,state:p,key:m},navigationType:i}},[s,c,f,d,p,m,i]);return y==null?null:I.createElement(vv.Provider,{value:u},I.createElement(Gl.Provider,{children:n,value:y}))}function rE(e){let{children:t,location:n}=e;return HS(oc(t),n)}new Promise(()=>{});function oc(e,t){t===void 0&&(t=[]);let n=[];return I.Children.forEach(e,(r,i)=>{if(!I.isValidElement(r))return;let o=[...t,i];if(r.type===I.Fragment){n.push.apply(n,oc(r.props.children,o));return}r.type!==wv&&Ye(!1),!r.props.index||!r.props.children||Ye(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=oc(r.props.children,o)),n.push(a)}),n}/** * React Router DOM v6.30.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const iE="6";try{window.__reactRouterVersion=iE}catch{}const oE="startTransition",vh=mb[oE];function aE(e){let{basename:t,children:n,future:r,window:i}=e,o=I.useRef();o.current==null&&(o.current=xS({window:i,v5Compat:!0}));let a=o.current,[l,s]=I.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=I.useCallback(f=>{u&&vh?vh(()=>s(f)):s(f)},[s,u]);return I.useLayoutEffect(()=>a.listen(c),[a,c]),I.useEffect(()=>tE(r),[r]),I.createElement(nE,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}var xh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xh||(xh={}));var bh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(bh||(bh={}));function lE(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Sh(e,t,n){e.loadNamespaces(t,Sv(e,n))}function Eh(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Sv(e,r))}function sE(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,s)=>{const u=t.services.backendConnector.state[`${l}|${s}`];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function uE(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(ac("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!o(i.isLanguageChangingTo,e))return!1}}):sE(e,t,n)}const cE=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fE={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},dE=e=>fE[e],pE=e=>e.replace(cE,dE);let lc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:pE};function hE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lc={...lc,...e}}function gE(){return lc}let Ev;function mE(e){Ev=e}function yE(){return Ev}const vE={type:"3rdParty",init(e){hE(e.options.react),mE(e)}},xE=I.createContext();class bE{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wE=(e,t)=>{const n=I.useRef();return I.useEffect(()=>{n.current=e},[e,t]),n.current};function Vo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=I.useContext(xE)||{},o=n||r||yE();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new bE),!o){ac("You will need to pass in an i18next instance by using initReactI18next");const S=(O,b)=>typeof b=="string"?b:b&&typeof b=="object"&&typeof b.defaultValue=="string"?b.defaultValue:Array.isArray(O)?O[O.length-1]:O,C=[S,{},!1];return C.t=S,C.i18n={},C.ready=!1,C}o.options.react&&o.options.react.wait!==void 0&&ac("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...gE(),...o.options.react,...t},{useSuspense:l,keyPrefix:s}=a;let u=i||o.options&&o.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(u);const c=(o.isInitialized||o.initializedStoreOnce)&&u.every(S=>uE(S,o,a));function f(){return o.getFixedT(t.lng||null,a.nsMode==="fallback"?u:u[0],s)}const[d,p]=I.useState(f);let m=u.join();t.lng&&(m=`${t.lng}${m}`);const y=wE(m),h=I.useRef(!0);I.useEffect(()=>{const{bindI18n:S,bindI18nStore:C}=a;h.current=!0,!c&&!l&&(t.lng?Eh(o,t.lng,u,()=>{h.current&&p(f)}):Sh(o,u,()=>{h.current&&p(f)})),c&&y&&y!==m&&h.current&&p(f);function O(){h.current&&p(f)}return S&&o&&o.on(S,O),C&&o&&o.store.on(C,O),()=>{h.current=!1,S&&o&&S.split(" ").forEach(b=>o.off(b,O)),C&&o&&C.split(" ").forEach(b=>o.store.off(b,O))}},[o,m]);const g=I.useRef(!0);I.useEffect(()=>{h.current&&!g.current&&p(f),g.current=!1},[o,s]);const v=[d,o,c];if(v.t=d,v.i18n=o,v.ready=c,c||!c&&!l)return v;throw new Promise(S=>{t.lng?Eh(o,t.lng,u,()=>S()):Sh(o,u,()=>S())})}function SE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const EE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kE={};function Ch(e,t){return(kE.jsx?CE:EE).test(e)}const _E=/[ \t\n\f\r]/g;function OE(e){return typeof e=="object"?e.type==="text"?kh(e.value):!1:kh(e)}function kh(e){return e.replace(_E,"")===""}class Wo{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Wo.prototype.normal={};Wo.prototype.property={};Wo.prototype.space=void 0;function Cv(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Wo(n,r,t)}function sc(e){return e.toLowerCase()}class Je{constructor(t,n){this.attribute=n,this.property=t}}Je.prototype.attribute="";Je.prototype.booleanish=!1;Je.prototype.boolean=!1;Je.prototype.commaOrSpaceSeparated=!1;Je.prototype.commaSeparated=!1;Je.prototype.defined=!1;Je.prototype.mustUseProperty=!1;Je.prototype.number=!1;Je.prototype.overloadedBoolean=!1;Je.prototype.property="";Je.prototype.spaceSeparated=!1;Je.prototype.space=void 0;let $E=0;const J=Qn(),_e=Qn(),kv=Qn(),A=Qn(),ce=Qn(),Xr=Qn(),rt=Qn();function Qn(){return 2**++$E}const uc=Object.freeze(Object.defineProperty({__proto__:null,boolean:J,booleanish:_e,commaOrSpaceSeparated:rt,commaSeparated:Xr,number:A,overloadedBoolean:kv,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),Ws=Object.keys(uc);class If extends Je{constructor(t,n,r,i){let o=-1;if(super(t,n),_h(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&NE.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Oh,FE);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Oh.test(o)){let a=o.replace(AE,IE);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=If}return new i(r,t)}function IE(e){return"-"+e.toLowerCase()}function FE(e){return e.charAt(1).toUpperCase()}const jE=Cv([_v,PE,Pv,Tv,Rv],"html"),Ff=Cv([_v,TE,Pv,Tv,Rv],"svg");function ME(e){return e.join(" ").trim()}var jf={},$h=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,DE=/\n/g,BE=/^\s*/,zE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,UE=/^:\s*/,HE=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,VE=/^[;\s]*/,WE=/^\s+|\s+$/g,GE=` `,Ph="/",Th="*",Ln="",qE="comment",KE="declaration",XE=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var y=m.match(DE);y&&(n+=y.length);var h=m.lastIndexOf(GE);r=~h?m.length-h:r+m.length}function o(){var m={line:n,column:r};return function(y){return y.position=new a(m),u(),y}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function l(m){var y=new Error(t.source+":"+n+":"+r+": "+m);if(y.reason=m,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function s(m){var y=m.exec(e);if(y){var h=y[0];return i(h),e=e.slice(h.length),y}}function u(){s(BE)}function c(m){var y;for(m=m||[];y=f();)y!==!1&&m.push(y);return m}function f(){var m=o();if(!(Ph!=e.charAt(0)||Th!=e.charAt(1))){for(var y=2;Ln!=e.charAt(y)&&(Th!=e.charAt(y)||Ph!=e.charAt(y+1));)++y;if(y+=2,Ln===e.charAt(y-1))return l("End of comment missing");var h=e.slice(2,y-2);return r+=2,i(h),e=e.slice(y),r+=2,m({type:qE,comment:h})}}function d(){var m=o(),y=s(zE);if(y){if(f(),!s(UE))return l("property missing ':'");var h=s(HE),g=m({type:KE,property:Rh(y[0].replace($h,Ln)),value:h?Rh(h[0].replace($h,Ln)):Ln});return s(VE),g}}function p(){var m=[];c(m);for(var y;y=d();)y!==!1&&(m.push(y),c(m));return m}return u(),p()};function Rh(e){return e?e.replace(WE,Ln):Ln}var YE=ln&&ln.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jf,"__esModule",{value:!0});jf.default=QE;var JE=YE(XE);function QE(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,JE.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,l=o.value;i?t(a,l,o):l&&(n=n||{},n[a]=l)}}),n}var Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});Kl.camelCase=void 0;var ZE=/^--[a-zA-Z0-9_-]+$/,eC=/-([a-z])/g,tC=/^[^-]+$/,nC=/^-(webkit|moz|ms|o|khtml)-/,rC=/^-(ms)-/,iC=function(e){return!e||tC.test(e)||ZE.test(e)},oC=function(e,t){return t.toUpperCase()},Ah=function(e,t){return"".concat(t,"-")},aC=function(e,t){return t===void 0&&(t={}),iC(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(rC,Ah):e=e.replace(nC,Ah),e.replace(eC,oC))};Kl.camelCase=aC;var lC=ln&&ln.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sC=lC(jf),uC=Kl;function cc(e,t){var n={};return!e||typeof e!="string"||(0,sC.default)(e,function(r,i){r&&i&&(n[(0,uC.camelCase)(r,t)]=i)}),n}cc.default=cc;var cC=cc;const fC=Fo(cC),Av=Nv("end"),Mf=Nv("start");function Nv(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function dC(e){const t=Mf(e),n=Av(e);if(t&&n)return{start:t,end:n}}function fo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nh(e.position):"start"in e||"end"in e?Nh(e):"line"in e||"column"in e?fc(e):""}function fc(e){return Lh(e&&e.line)+":"+Lh(e&&e.column)}function Nh(e){return fc(e&&e.start)+"-"+fc(e&&e.end)}function Lh(e){return e&&typeof e=="number"?e:1}class Me extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=l?l.line:void 0,this.name=fo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Me.prototype.file="";Me.prototype.name="";Me.prototype.reason="";Me.prototype.message="";Me.prototype.stack="";Me.prototype.column=void 0;Me.prototype.line=void 0;Me.prototype.ancestors=void 0;Me.prototype.cause=void 0;Me.prototype.fatal=void 0;Me.prototype.place=void 0;Me.prototype.ruleId=void 0;Me.prototype.source=void 0;const Df={}.hasOwnProperty,pC=new Map,hC=/[A-Z]/g,gC=new Set(["table","tbody","thead","tfoot","tr"]),mC=new Set(["td","th"]),Lv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yC(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=kC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=CC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ff:jE,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Iv(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Iv(e,t,n){if(t.type==="element")return vC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wC(e,t,n);if(t.type==="mdxjsEsm")return bC(e,t);if(t.type==="root")return SC(e,t,n);if(t.type==="text")return EC(e,t)}function vC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ff,e.schema=i),e.ancestors.push(t);const o=jv(e,t.tagName,!1),a=_C(e,t);let l=zf(e,t);return gC.has(t.tagName)&&(l=l.filter(function(s){return typeof s=="string"?!OE(s):!0})),Fv(e,a,o,t),Bf(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function xC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ro(e,t.position)}function bC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ro(e,t.position)}function wC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ff,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:jv(e,t.name,!0),a=OC(e,t),l=zf(e,t);return Fv(e,a,o,t),Bf(a,l),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function SC(e,t,n){const r={};return Bf(r,zf(e,t)),e.create(t,e.Fragment,r,n)}function EC(e,t){return t.value}function Fv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function CC(e,t,n){return r;function r(i,o,a,l){const u=Array.isArray(a.children)?n:t;return l?u(o,a,l):u(o,a)}}function kC(e,t){return n;function n(r,i,o,a){const l=Array.isArray(o.children),s=Mf(r);return t(i,o,a,l,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function _C(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Df.call(t.properties,i)){const o=$C(e,i,t.properties[i]);if(o){const[a,l]=o;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&mC.has(t.tagName)?r=l:n[a]=l}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function OC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Ro(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,o=e.evaluater.evaluateExpression(l.expression)}else Ro(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function zf(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:pC;for(;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o0?(Bt(e,e.length,0,t),e):t}const jh={}.hasOwnProperty;function FC(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const At=Pn(/[A-Za-z]/),ot=Pn(/[\dA-Za-z]/),DC=Pn(/[#-'*+\--9=?A-Z^-~]/);function dc(e){return e!==null&&(e<32||e===127)}const pc=Pn(/\d/),BC=Pn(/[\dA-Fa-f]/),zC=Pn(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function ie(e){return e===-2||e===-1||e===32}const UC=Pn(new RegExp("\\p{P}|\\p{S}","u")),HC=Pn(/\s/);function Pn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ui(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const l=e.charCodeAt(n+1);o<56320&&l>56319&&l<57344?(a=String.fromCharCode(o,l),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function de(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(s){return ie(s)?(e.enter(n),l(s)):t(s)}function l(s){return ie(s)&&o++a))return;const $=t.events.length;let R=$,T,U;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(T){U=t.events[R][1].end;break}T=!0}for(g(r),b=$;bS;){const O=n[C];t.containerState=O[1],O[0].exit.call(t,e)}n.length=S}function v(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function KC(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dh(e){if(e===null||Ke(e)||HC(e))return 1;if(UC(e))return 2}function Hf(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[n][1].start};Bh(f,-s),Bh(d,s),a={type:s>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},o={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=dt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=dt(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=dt(u,Hf(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=dt(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=dt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Bt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&ie(b)?de(e,v,"linePrefix",o+1)(b):v(b)}function v(b){return b===null||W(b)?e.check(zh,y,C)(b):(e.enter("codeFlowValue"),S(b))}function S(b){return b===null||W(b)?(e.exit("codeFlowValue"),v(b)):(e.consume(b),S)}function C(b){return e.exit("codeFenced"),t(b)}function O(b,$,R){let T=0;return U;function U(V){return b.enter("lineEnding"),b.consume(V),b.exit("lineEnding"),z}function z(V){return b.enter("codeFencedFence"),ie(V)?de(b,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):M(V)}function M(V){return V===l?(b.enter("codeFencedFenceSequence"),X(V)):R(V)}function X(V){return V===l?(T++,b.consume(V),X):T>=a?(b.exit("codeFencedFenceSequence"),ie(V)?de(b,re,"whitespace")(V):re(V)):R(V)}function re(V){return V===null||W(V)?(b.exit("codeFencedFence"),$(V)):R(V)}}}function ak(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const qs={name:"codeIndented",tokenize:sk},lk={partial:!0,tokenize:uk};function sk(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),de(e,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?s(u):W(u)?e.attempt(lk,a,s)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||W(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),l)}function s(u){return e.exit("codeIndented"),t(u)}}function uk(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):de(e,o,"linePrefix",5)(a)}function o(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):W(a)?i(a):n(a)}}const ck={name:"codeText",previous:dk,resolve:fk,tokenize:pk};function fk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Fi(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Fi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Fi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Vv(e,t,n,r,i,o,a,l,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===32||g===41||dc(g)?n(g):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(l),d(g)):g===null||g===60||W(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function y(g){return!c&&(g===null||g===41||Ke(g))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(g)):c999||p===null||p===91||p===93&&!s||p===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||W(p)||l++>999?(e.exit("chunkString"),c(p)):(e.consume(p),s||(s=!ie(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function Gv(e,t,n,r,i,o){let a;return l;function l(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),a=d===40?41:d,s):n(d)}function s(d){return d===a?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),u(d))}function u(d){return d===a?(e.exit(o),s(a)):d===null?n(d):W(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),de(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===a||d===null||W(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===a||d===92?(e.consume(d),c):c(d)}}function po(e,t){let n;return r;function r(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ie(i)?de(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const wk={name:"definition",tokenize:Ek},Sk={partial:!0,tokenize:Ck};function Ek(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return Wv.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return i=Yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),s):n(p)}function s(p){return Ke(p)?po(e,u)(p):u(p)}function u(p){return Vv(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return e.attempt(Sk,f,f)(p)}function f(p){return ie(p)?de(e,d,"whitespace")(p):d(p)}function d(p){return p===null||W(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Ck(e,t,n){return r;function r(l){return Ke(l)?po(e,i)(l):n(l)}function i(l){return Gv(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ie(l)?de(e,a,"whitespace")(l):a(l)}function a(l){return l===null||W(l)?t(l):n(l)}}const kk={name:"hardBreakEscape",tokenize:_k};function _k(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return W(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ok={name:"headingAtx",resolve:$k,tokenize:Pk};function $k(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Bt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Pk(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Ke(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||W(c)?(e.exit("atxHeading"),t(c)):ie(c)?de(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Ke(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const Tk=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Hh=["pre","script","style","textarea"],Rk={concrete:!0,name:"htmlFlow",resolveTo:Lk,tokenize:Ik},Ak={partial:!0,tokenize:jk},Nk={partial:!0,tokenize:Fk};function Lk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Ik(e,t,n){const r=this;let i,o,a,l,s;return u;function u(w){return c(w)}function c(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),d):w===47?(e.consume(w),o=!0,y):w===63?(e.consume(w),i=3,r.interrupt?t:E):At(w)?(e.consume(w),a=String.fromCharCode(w),h):n(w)}function d(w){return w===45?(e.consume(w),i=2,p):w===91?(e.consume(w),i=5,l=0,m):At(w)?(e.consume(w),i=4,r.interrupt?t:E):n(w)}function p(w){return w===45?(e.consume(w),r.interrupt?t:E):n(w)}function m(w){const te="CDATA[";return w===te.charCodeAt(l++)?(e.consume(w),l===te.length?r.interrupt?t:M:m):n(w)}function y(w){return At(w)?(e.consume(w),a=String.fromCharCode(w),h):n(w)}function h(w){if(w===null||w===47||w===62||Ke(w)){const te=w===47,pe=a.toLowerCase();return!te&&!o&&Hh.includes(pe)?(i=1,r.interrupt?t(w):M(w)):Tk.includes(a.toLowerCase())?(i=6,te?(e.consume(w),g):r.interrupt?t(w):M(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?v(w):S(w))}return w===45||ot(w)?(e.consume(w),a+=String.fromCharCode(w),h):n(w)}function g(w){return w===62?(e.consume(w),r.interrupt?t:M):n(w)}function v(w){return ie(w)?(e.consume(w),v):U(w)}function S(w){return w===47?(e.consume(w),U):w===58||w===95||At(w)?(e.consume(w),C):ie(w)?(e.consume(w),S):U(w)}function C(w){return w===45||w===46||w===58||w===95||ot(w)?(e.consume(w),C):O(w)}function O(w){return w===61?(e.consume(w),b):ie(w)?(e.consume(w),O):S(w)}function b(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),s=w,$):ie(w)?(e.consume(w),b):R(w)}function $(w){return w===s?(e.consume(w),s=null,T):w===null||W(w)?n(w):(e.consume(w),$)}function R(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ke(w)?O(w):(e.consume(w),R)}function T(w){return w===47||w===62||ie(w)?S(w):n(w)}function U(w){return w===62?(e.consume(w),z):n(w)}function z(w){return w===null||W(w)?M(w):ie(w)?(e.consume(w),z):n(w)}function M(w){return w===45&&i===2?(e.consume(w),ae):w===60&&i===1?(e.consume(w),xe):w===62&&i===4?(e.consume(w),N):w===63&&i===3?(e.consume(w),E):w===93&&i===5?(e.consume(w),Ce):W(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Ak,H,X)(w)):w===null||W(w)?(e.exit("htmlFlowData"),X(w)):(e.consume(w),M)}function X(w){return e.check(Nk,re,H)(w)}function re(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return w===null||W(w)?X(w):(e.enter("htmlFlowData"),M(w))}function ae(w){return w===45?(e.consume(w),E):M(w)}function xe(w){return w===47?(e.consume(w),a="",oe):M(w)}function oe(w){if(w===62){const te=a.toLowerCase();return Hh.includes(te)?(e.consume(w),N):M(w)}return At(w)&&a.length<8?(e.consume(w),a+=String.fromCharCode(w),oe):M(w)}function Ce(w){return w===93?(e.consume(w),E):M(w)}function E(w){return w===62?(e.consume(w),N):w===45&&i===2?(e.consume(w),E):M(w)}function N(w){return w===null||W(w)?(e.exit("htmlFlowData"),H(w)):(e.consume(w),N)}function H(w){return e.exit("htmlFlow"),t(w)}}function Fk(e,t,n){const r=this;return i;function i(a){return W(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function jk(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Xl,t,n)}}const Mk={name:"htmlText",tokenize:Dk};function Dk(e,t,n){const r=this;let i,o,a;return l;function l(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),s}function s(E){return E===33?(e.consume(E),u):E===47?(e.consume(E),O):E===63?(e.consume(E),S):At(E)?(e.consume(E),R):n(E)}function u(E){return E===45?(e.consume(E),c):E===91?(e.consume(E),o=0,m):At(E)?(e.consume(E),v):n(E)}function c(E){return E===45?(e.consume(E),p):n(E)}function f(E){return E===null?n(E):E===45?(e.consume(E),d):W(E)?(a=f,xe(E)):(e.consume(E),f)}function d(E){return E===45?(e.consume(E),p):f(E)}function p(E){return E===62?ae(E):E===45?d(E):f(E)}function m(E){const N="CDATA[";return E===N.charCodeAt(o++)?(e.consume(E),o===N.length?y:m):n(E)}function y(E){return E===null?n(E):E===93?(e.consume(E),h):W(E)?(a=y,xe(E)):(e.consume(E),y)}function h(E){return E===93?(e.consume(E),g):y(E)}function g(E){return E===62?ae(E):E===93?(e.consume(E),g):y(E)}function v(E){return E===null||E===62?ae(E):W(E)?(a=v,xe(E)):(e.consume(E),v)}function S(E){return E===null?n(E):E===63?(e.consume(E),C):W(E)?(a=S,xe(E)):(e.consume(E),S)}function C(E){return E===62?ae(E):S(E)}function O(E){return At(E)?(e.consume(E),b):n(E)}function b(E){return E===45||ot(E)?(e.consume(E),b):$(E)}function $(E){return W(E)?(a=$,xe(E)):ie(E)?(e.consume(E),$):ae(E)}function R(E){return E===45||ot(E)?(e.consume(E),R):E===47||E===62||Ke(E)?T(E):n(E)}function T(E){return E===47?(e.consume(E),ae):E===58||E===95||At(E)?(e.consume(E),U):W(E)?(a=T,xe(E)):ie(E)?(e.consume(E),T):ae(E)}function U(E){return E===45||E===46||E===58||E===95||ot(E)?(e.consume(E),U):z(E)}function z(E){return E===61?(e.consume(E),M):W(E)?(a=z,xe(E)):ie(E)?(e.consume(E),z):T(E)}function M(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),i=E,X):W(E)?(a=M,xe(E)):ie(E)?(e.consume(E),M):(e.consume(E),re)}function X(E){return E===i?(e.consume(E),i=void 0,V):E===null?n(E):W(E)?(a=X,xe(E)):(e.consume(E),X)}function re(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Ke(E)?T(E):(e.consume(E),re)}function V(E){return E===47||E===62||Ke(E)?T(E):n(E)}function ae(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):n(E)}function xe(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),oe}function oe(E){return ie(E)?de(e,Ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Ce(E)}function Ce(E){return e.enter("htmlTextData"),a(E)}}const Vf={name:"labelEnd",resolveAll:Hk,resolveTo:Vk,tokenize:Wk},Bk={tokenize:Gk},zk={tokenize:qk},Uk={tokenize:Kk};function Hk(e){let t=-1;const n=[];for(;++t=3&&(u===null||W(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===i?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),ie(u)?de(e,l,"whitespace")(u):l(u))}}const Ve={continuation:{tokenize:i_},exit:a_,name:"list",tokenize:r_},t_={partial:!0,tokenize:l_},n_={partial:!0,tokenize:o_};function r_(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return l;function l(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:pc(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Fa,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(p)}return n(p)}function s(p){return pc(p)&&++a<10?(e.consume(p),s):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Xl,r.interrupt?n:c,e.attempt(t_,d,f))}function c(p){return r.containerState.initialBlankLine=!0,o++,d(p)}function f(p){return ie(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function i_(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Xl,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!ie(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(n_,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(Ve,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function o_(e,t,n){const r=this;return de(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function a_(e){e.exit(this.containerState.type)}function l_(e,t,n){const r=this;return de(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!ie(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Vh={name:"setextUnderline",resolveTo:s_,tokenize:u_};function s_(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function u_(e,t,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ie(u)?de(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||W(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const c_={tokenize:f_};function f_(e){const t=this,n=e.attempt(Xl,r,e.attempt(this.parser.constructs.flowInitial,i,de(e,e.attempt(this.parser.constructs.flow,i,e.attempt(mk,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const d_={resolveAll:Kv()},p_=qv("string"),h_=qv("text");function qv(e){return{resolveAll:Kv(e==="text"?g_:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,l);return a;function a(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),s}function s(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),s)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function $_(e,t){let n=-1;const r=[];let i;for(;++n0){const wt=Y.tokenStack[Y.tokenStack.length-1];(wt[1]||Gh).call(Y,void 0,wt[0])}for(j.position={start:nn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:nn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},le=-1;++le1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function W_(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G_(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Jv(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function q_(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jv(e,t);const i={src:ui(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function K_(e,t){const n={src:ui(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function X_(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Y_(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Jv(e,t);const i={href:ui(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function J_(e,t){const n={href:ui(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q_(e,t,n){const r=e.all(t),i=n?Z_(n):Qv(t),o={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l1}function e2(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Mf(t.children[1]),s=Av(t.children[t.children.length-1]);l&&s&&(a.position={start:l,end:s}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function o2(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let s=-1;const u=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Xh(t.slice(i),i>0,!1)),o.join("")}function Xh(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qh||o===Kh;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qh||o===Kh;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function s2(e,t){const n={type:"text",value:l2(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function u2(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const c2={blockquote:D_,break:B_,code:z_,delete:U_,emphasis:H_,footnoteReference:V_,heading:W_,html:G_,imageReference:q_,image:K_,inlineCode:X_,linkReference:Y_,link:J_,listItem:Q_,list:e2,paragraph:t2,root:n2,strong:r2,table:i2,tableCell:a2,tableRow:o2,text:s2,thematicBreak:u2,toml:ya,yaml:ya,definition:ya,footnoteDefinition:ya};function ya(){}const Zv=-1,Yl=0,ho=1,pl=2,Wf=3,Gf=4,qf=5,Kf=6,e1=7,t1=8,Yh=typeof self=="object"?self:globalThis,f2=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case Yl:case Zv:return n(a,i);case ho:{const l=n([],i);for(const s of a)l.push(r(s));return l}case pl:{const l=n({},i);for(const[s,u]of a)l[r(s)]=r(u);return l}case Wf:return n(new Date(a),i);case Gf:{const{source:l,flags:s}=a;return n(new RegExp(l,s),i)}case qf:{const l=n(new Map,i);for(const[s,u]of a)l.set(r(s),r(u));return l}case Kf:{const l=n(new Set,i);for(const s of a)l.add(r(s));return l}case e1:{const{name:l,message:s}=a;return n(new Yh[l](s),i)}case t1:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(new Yh[o](a),i)};return r},Jh=e=>f2(new Map,e)(0),ur="",{toString:d2}={},{keys:p2}=Object,ji=e=>{const t=typeof e;if(t!=="object"||!e)return[Yl,t];const n=d2.call(e).slice(8,-1);switch(n){case"Array":return[ho,ur];case"Object":return[pl,ur];case"Date":return[Wf,ur];case"RegExp":return[Gf,ur];case"Map":return[qf,ur];case"Set":return[Kf,ur];case"DataView":return[ho,n]}return n.includes("Array")?[ho,n]:n.includes("Error")?[e1,n]:[pl,n]},va=([e,t])=>e===Yl&&(t==="function"||t==="symbol"),h2=(e,t,n,r)=>{const i=(a,l)=>{const s=r.push(a)-1;return n.set(l,s),s},o=a=>{if(n.has(a))return n.get(a);let[l,s]=ji(a);switch(l){case Yl:{let c=a;switch(s){case"bigint":l=t1,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return i([Zv],a)}return i([l,c],a)}case ho:{if(s){let d=a;return s==="DataView"?d=new Uint8Array(a.buffer):s==="ArrayBuffer"&&(d=new Uint8Array(a)),i([s,[...d]],a)}const c=[],f=i([l,c],a);for(const d of a)c.push(o(d));return f}case pl:{if(s)switch(s){case"BigInt":return i([s,a.toString()],a);case"Boolean":case"Number":case"String":return i([s,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([l,c],a);for(const d of p2(a))(e||!va(ji(a[d])))&&c.push([o(d),o(a[d])]);return f}case Wf:return i([l,a.toISOString()],a);case Gf:{const{source:c,flags:f}=a;return i([l,{source:c,flags:f}],a)}case qf:{const c=[],f=i([l,c],a);for(const[d,p]of a)(e||!(va(ji(d))||va(ji(p))))&&c.push([o(d),o(p)]);return f}case Kf:{const c=[],f=i([l,c],a);for(const d of a)(e||!va(ji(d)))&&c.push(o(d));return f}}const{message:u}=a;return i([l,{name:s,message:u}],a)};return o},Qh=(e,{json:t,lossy:n}={})=>{const r=[];return h2(!(t||n),!!t,new Map,r)(e),r},hl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jh(Qh(e,t)):structuredClone(e):(e,t)=>Jh(Qh(e,t));function g2(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function m2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function y2(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||g2,r=e.options.footnoteBackLabel||m2,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let s=-1;for(;++s0&&m.push({type:"text",value:" "});let v=typeof n=="string"?n:n(s,p);typeof v=="string"&&(v={type:"text",value:v}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,p),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const h=c[c.length-1];if(h&&h.type==="element"&&h.tagName==="p"){const v=h.children[h.children.length-1];v&&v.type==="text"?v.value+=" ":h.children.push({type:"text",value:" "}),h.children.push(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...hl(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` `}]}}const n1=function(e){if(e==null)return w2;if(typeof e=="function")return Jl(e);if(typeof e=="object")return Array.isArray(e)?v2(e):x2(e);if(typeof e=="string")return b2(e);throw new Error("Expected function, string, or object as test")};function v2(e){const t=[];let n=-1;for(;++n":""))+")"})}return d;function d(){let p=r1,m,y,h;if((!t||o(s,u,c[c.length-1]||void 0))&&(p=_2(n(s,c)),p[0]===Zh))return p;if("children"in s&&s.children){const g=s;if(g.children&&p[0]!==C2)for(y=(r?g.children.length:-1)+a,h=c.concat(g);y>-1&&y0&&n.push({type:"text",value:` `}),n}function eg(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tg(e,t){const n=$2(e,t),r=n.one(e,void 0),i=y2(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` `},i),o}function N2(e,t){return e&&"run"in e?async function(n,r){const i=tg(n,{file:r,...t});await e.run(i,r)}:function(n,r){return tg(n,{file:r,...e||t})}}function ng(e){if(e)throw e}var ja=Object.prototype.hasOwnProperty,o1=Object.prototype.toString,rg=Object.defineProperty,ig=Object.getOwnPropertyDescriptor,og=function(t){return typeof Array.isArray=="function"?Array.isArray(t):o1.call(t)==="[object Array]"},ag=function(t){if(!t||o1.call(t)!=="[object Object]")return!1;var n=ja.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ja.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ja.call(t,i)},lg=function(t,n){rg&&n.name==="__proto__"?rg(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},sg=function(t,n){if(n==="__proto__")if(ja.call(t,n)){if(ig)return ig(t,n).value}else return;return t[n]},L2=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});sa.length;let s;l&&a.push(i);try{s=e.apply(this,a)}catch(u){const c=u;if(l&&n)throw c;return i(c)}l||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(a,...l){n||(n=!0,t(a,...l))}function o(a){i(null,a)}}const Rt={basename:j2,dirname:M2,extname:D2,join:B2,sep:"/"};function j2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Go(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function M2(e){if(Go(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function D2(e){Go(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function B2(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function U2(e,t){let n="",r=0,i=-1,o=0,a=-1,l,s;for(;++a<=e.length;){if(a2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else l===46&&o>-1?o++:o=-1}return n}function Go(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const H2={cwd:V2};function V2(){return"/"}function yc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function W2(e){if(typeof e=="string")e=new URL(e);else if(!yc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return G2(e)}function G2(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n0){let[p,...m]=c;const y=r[d][1];mc(y)&&mc(p)&&(p=Xs(!0,y,p)),r[d]=[u,p,...m]}}}}const Y2=new Xf().freeze();function Zs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function eu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function tu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cg(e){if(!mc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xa(e){return J2(e)?e:new a1(e)}function J2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Q2(e){return typeof e=="string"||Z2(e)}function Z2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const eO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dg=[],pg={allowDangerousHtml:!0},tO=/^(https?|ircs?|mailto|xmpp)$/i,nO=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function rO(e){const t=iO(e),n=oO(e);return aO(t.runSync(t.parse(n),n),e)}function iO(e){const t=e.rehypePlugins||dg,n=e.remarkPlugins||dg,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...pg}:pg;return Y2().use(M_).use(n).use(N2,r).use(t)}function oO(e){const t=e.children||"",n=new a1;return typeof t=="string"&&(n.value=t),n}function aO(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||lO;for(const c of nO)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+eO+c.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),i1(e,u),yC(e,{Fragment:_.Fragment,components:i,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(c,f,d){if(c.type==="raw"&&d&&typeof f=="number")return a?d.children.splice(f,1):d.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let p;for(p in Gs)if(Object.hasOwn(Gs,p)&&Object.hasOwn(c.properties,p)){const m=c.properties[p],y=Gs[p];(y===null||y.includes(c.tagName))&&(c.properties[p]=s(String(m||""),p,c))}}if(c.type==="element"){let p=n?!n.includes(c.tagName):o?o.includes(c.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(c,f,d)),p&&d&&typeof f=="number")return l&&c.children?d.children.splice(f,1,...c.children):d.children.splice(f,1),f}}}function lO(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||tO.test(e.slice(0,t))?e:""}const sO=({value:e,onChange:t,placeholder:n})=>{const{t:r}=Vo(),[i,o]=I.useState(!1);return _.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{className:"flex justify-between items-center",children:[_.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:r("editor.title")}),_.jsx("button",{onClick:()=>o(!i),className:"px-4 py-2 text-sm font-medium text-blue-600 hover:text-blue-800 focus:outline-none",children:r(i?"editor.editMode":"editor.previewMode")})]}),i?_.jsx("div",{className:"markdown-preview border border-gray-300 rounded-lg h-96 p-4 overflow-auto bg-white",children:e?_.jsx(rO,{children:e}):_.jsx("p",{className:"text-gray-400 italic",children:r("editor.noContent")})}):_.jsxs("div",{className:"relative",children:[_.jsx("textarea",{value:e,onChange:a=>t(a.target.value),placeholder:n,className:"w-full h-96 p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 font-mono text-sm resize-none"}),_.jsx("div",{className:"absolute top-2 right-2 bg-gray-100 px-2 py-1 rounded text-xs text-gray-600",children:r("editor.markdown")})]}),_.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg border border-gray-200",children:[_.jsx("h3",{className:"font-medium text-gray-700 mb-2",children:r("editor.markdownHelp")}),_.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 text-sm",children:[_.jsxs("div",{children:[_.jsxs("p",{className:"font-mono mb-1",children:["# ",r("editor.heading")," 1"]}),_.jsxs("p",{className:"font-mono mb-1",children:["## ",r("editor.heading")," 2"]}),_.jsxs("p",{className:"font-mono mb-1",children:["**",r("editor.bold"),"**"]}),_.jsxs("p",{className:"font-mono mb-1",children:["*",r("editor.italic"),"*"]})]}),_.jsxs("div",{children:[_.jsxs("p",{className:"font-mono mb-1",children:["- ",r("editor.listItem")]}),_.jsxs("p",{className:"font-mono mb-1",children:["[",r("editor.linkText"),"](URL)"]}),_.jsxs("p",{className:"font-mono mb-1",children:["![",r("editor.imageAlt"),"](URL)"]}),_.jsxs("p",{className:"font-mono mb-1",children:["```",r("editor.codeBlock"),"```"]})]})]})]})]})},uO=({metadata:e,onChange:t})=>{const{t:n}=Vo(),r=(o,a)=>{t({[o]:a})},i=(o,a)=>{t({[o]:a})};return _.jsxs("div",{className:"space-y-4",children:[_.jsxs("div",{children:[_.jsxs("label",{htmlFor:"title",className:"block text-sm font-medium text-gray-700 mb-1",children:[n("metadata.title")," ",_.jsx("span",{className:"text-red-500",children:"*"})]}),_.jsx("input",{type:"text",id:"title",value:e.title||"",onChange:o=>r("title",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:n("metadata.title_placeholder"),required:!0})]}),_.jsxs("div",{children:[_.jsx("label",{htmlFor:"subtitle",className:"block text-sm font-medium text-gray-700 mb-1",children:n("metadata.subtitle")}),_.jsx("input",{type:"text",id:"subtitle",value:e.subtitle||"",onChange:o=>r("subtitle",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:n("metadata.subtitle_placeholder")})]}),_.jsxs("div",{children:[_.jsxs("label",{htmlFor:"author",className:"block text-sm font-medium text-gray-700 mb-1",children:[n("metadata.author")," ",_.jsx("span",{className:"text-red-500",children:"*"})]}),_.jsx("input",{type:"text",id:"author",value:e.author||"",onChange:o=>r("author",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:n("metadata.author_placeholder"),required:!0})]}),_.jsxs("div",{children:[_.jsxs("label",{htmlFor:"company_name",className:"block text-sm font-medium text-gray-700 mb-1",children:[n("metadata.company_name")," ",_.jsx("span",{className:"text-red-500",children:"*"})]}),_.jsx("input",{type:"text",id:"company_name",value:e.company_name||"",onChange:o=>r("company_name",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:n("metadata.company_name_placeholder"),required:!0})]}),_.jsxs("div",{children:[_.jsx("label",{htmlFor:"version",className:"block text-sm font-medium text-gray-700 mb-1",children:n("metadata.version")}),_.jsx("input",{type:"text",id:"version",value:e.version||"",onChange:o=>r("version",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"1.0"})]}),_.jsxs("div",{children:[_.jsx("label",{htmlFor:"department",className:"block text-sm font-medium text-gray-700 mb-1",children:n("metadata.department")}),_.jsx("input",{type:"text",id:"department",value:e.department||"",onChange:o=>r("department",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:n("metadata.department_placeholder")})]}),_.jsxs("div",{children:[_.jsx("label",{htmlFor:"creation_date",className:"block text-sm font-medium text-gray-700 mb-1",children:n("metadata.creation_date")}),_.jsx("input",{type:"date",id:"creation_date",value:e.creation_date?new Date(e.creation_date).toISOString().split("T")[0]:"",onChange:o=>r("creation_date",o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"})]}),_.jsxs("div",{className:"flex items-center",children:[_.jsx("input",{type:"checkbox",id:"confidential",checked:e.confidential||!1,onChange:o=>i("confidential",o.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),_.jsx("label",{htmlFor:"confidential",className:"ml-2 block text-sm text-gray-700",children:n("metadata.confidential")})]}),_.jsx("div",{className:"text-xs text-gray-500 mt-4",children:_.jsx("p",{children:n("metadata.required_fields")})})]})};var gt={},qo={},cO=typeof ln=="object"&&ln&&ln.Object===Object&&ln,l1=cO,fO=l1,dO=typeof self=="object"&&self&&self.Object===Object&&self,pO=fO||dO||Function("return this")(),Ut=pO,hO=Ut,gO=hO.Symbol,Ko=gO,hg=Ko,s1=Object.prototype,mO=s1.hasOwnProperty,yO=s1.toString,Mi=hg?hg.toStringTag:void 0;function vO(e){var t=mO.call(e,Mi),n=e[Mi];try{e[Mi]=void 0;var r=!0}catch{}var i=yO.call(e);return r&&(t?e[Mi]=n:delete e[Mi]),i}var xO=vO,bO=Object.prototype,wO=bO.toString;function SO(e){return wO.call(e)}var EO=SO,gg=Ko,CO=xO,kO=EO,_O="[object Null]",OO="[object Undefined]",mg=gg?gg.toStringTag:void 0;function $O(e){return e==null?e===void 0?OO:_O:mg&&mg in Object(e)?CO(e):kO(e)}var Zn=$O,PO=Array.isArray,Ot=PO;function TO(e){return e!=null&&typeof e=="object"}var Zt=TO,RO=Zn,AO=Ot,NO=Zt,LO="[object String]";function IO(e){return typeof e=="string"||!AO(e)&&NO(e)&&RO(e)==LO}var FO=IO;function jO(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++i];if(n(o[s],s,o)===!1)break}return t}}var MO=jO,DO=MO,BO=DO(),zO=BO;function UO(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&e-1&&e%1==0&&e<=i$}var Jf=o$,a$=Zn,l$=Jf,s$=Zt,u$="[object Arguments]",c$="[object Array]",f$="[object Boolean]",d$="[object Date]",p$="[object Error]",h$="[object Function]",g$="[object Map]",m$="[object Number]",y$="[object Object]",v$="[object RegExp]",x$="[object Set]",b$="[object String]",w$="[object WeakMap]",S$="[object ArrayBuffer]",E$="[object DataView]",C$="[object Float32Array]",k$="[object Float64Array]",_$="[object Int8Array]",O$="[object Int16Array]",$$="[object Int32Array]",P$="[object Uint8Array]",T$="[object Uint8ClampedArray]",R$="[object Uint16Array]",A$="[object Uint32Array]",me={};me[C$]=me[k$]=me[_$]=me[O$]=me[$$]=me[P$]=me[T$]=me[R$]=me[A$]=!0;me[u$]=me[c$]=me[S$]=me[f$]=me[E$]=me[d$]=me[p$]=me[h$]=me[g$]=me[m$]=me[y$]=me[v$]=me[x$]=me[b$]=me[w$]=!1;function N$(e){return s$(e)&&l$(e.length)&&!!me[a$(e)]}var L$=N$;function I$(e){return function(t){return e(t)}}var Qf=I$,ml={exports:{}};ml.exports;(function(e,t){var n=l1,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,l=function(){try{var s=i&&i.require&&i.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(ml,ml.exports);var Zf=ml.exports,F$=L$,j$=Qf,vg=Zf,xg=vg&&vg.isTypedArray,M$=xg?j$(xg):F$,d1=M$,D$=HO,B$=c1,z$=Ot,U$=Yf,H$=f1,V$=d1,W$=Object.prototype,G$=W$.hasOwnProperty;function q$(e,t){var n=z$(e),r=!n&&B$(e),i=!n&&!r&&U$(e),o=!n&&!r&&!i&&V$(e),a=n||r||i||o,l=a?D$(e.length,String):[],s=l.length;for(var u in e)(t||G$.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||H$(u,s)))&&l.push(u);return l}var p1=q$,K$=Object.prototype;function X$(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||K$;return e===n}var ed=X$;function Y$(e,t){return function(n){return e(t(n))}}var h1=Y$,J$=h1,Q$=J$(Object.keys,Object),Z$=Q$,eP=ed,tP=Z$,nP=Object.prototype,rP=nP.hasOwnProperty;function iP(e){if(!eP(e))return tP(e);var t=[];for(var n in Object(e))rP.call(e,n)&&n!="constructor"&&t.push(n);return t}var oP=iP;function aP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ci=aP,lP=Zn,sP=ci,uP="[object AsyncFunction]",cP="[object Function]",fP="[object GeneratorFunction]",dP="[object Proxy]";function pP(e){if(!sP(e))return!1;var t=lP(e);return t==cP||t==fP||t==uP||t==dP}var g1=pP,hP=g1,gP=Jf;function mP(e){return e!=null&&gP(e.length)&&!hP(e)}var Ql=mP,yP=p1,vP=oP,xP=Ql;function bP(e){return xP(e)?yP(e):vP(e)}var Xo=bP,wP=zO,SP=Xo;function EP(e,t){return e&&wP(e,t,SP)}var m1=EP;function CP(e){return e}var y1=CP,kP=y1;function _P(e){return typeof e=="function"?e:kP}var OP=_P,$P=m1,PP=OP;function TP(e,t){return e&&$P(e,PP(t))}var td=TP,RP=h1,AP=RP(Object.getPrototypeOf,Object),nd=AP,NP=Zn,LP=nd,IP=Zt,FP="[object Object]",jP=Function.prototype,MP=Object.prototype,v1=jP.toString,DP=MP.hasOwnProperty,BP=v1.call(Object);function zP(e){if(!IP(e)||NP(e)!=FP)return!1;var t=LP(e);if(t===null)return!0;var n=DP.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&v1.call(n)==BP}var UP=zP;function HP(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n-1}var oT=iT,aT=Zl;function lT(e,t){var n=this.__data__,r=aT(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var sT=lT,uT=WP,cT=ZP,fT=nT,dT=oT,pT=sT;function fi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=n&kA?new wA:void 0;for(o.set(e,t),o.set(t,e);++f0&&arguments[0]!==void 0?arguments[0]:[],n=[];return(0,pI.default)(t,function(r){Array.isArray(r)?e(r).map(function(i){return n.push(i)}):(0,fI.default)(r)?(0,uI.default)(r,function(i,o){i===!0&&n.push(o),n.push(o+"-"+i)}):(0,lI.default)(r)&&n.push(r)}),n};qo.default=hI;var Yo={};function gI(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:[],r=t.default&&(0,IM.default)(t.default)||{};return n.map(function(i){var o=t[i];return o&&(0,NM.default)(o,function(a,l){r[l]||(r[l]={}),r[l]=FM({},r[l],o[l])}),i}),r};Yo.default=jM;var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0});Jo.autoprefix=void 0;var MM=td,Zg=BM(MM),DM=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){qM(i,r);function i(){var o,a,l,s;GM(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){ZM(i,r);function i(){var o,a,l,s;QM(this,i);for(var u=arguments.length,c=Array(u),f=0;f1&&arguments[1]!==void 0?arguments[1]:!0;r[a]=l};return t===0&&i("first-child"),t===n-1&&i("last-child"),(t===0||t%2===0)&&i("even"),Math.abs(t%2)===1&&i("odd"),i("nth-child",t),r};pd.default=t4;Object.defineProperty(gt,"__esModule",{value:!0});gt.ReactCSS=gt.loop=gt.handleActive=hd=gt.handleHover=gt.hover=void 0;var n4=qo,r4=mi(n4),i4=Yo,o4=mi(i4),a4=Jo,l4=mi(a4),s4=Qo,H1=mi(s4),u4=Zo,c4=mi(u4),f4=pd,d4=mi(f4);function mi(e){return e&&e.__esModule?e:{default:e}}gt.hover=H1.default;var hd=gt.handleHover=H1.default;gt.handleActive=c4.default;gt.loop=d4.default;var p4=gt.ReactCSS=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;il?d=1:d=Math.round(f*100/l)/100,n.a!==d)return{h:n.h,s:n.s,l:n.l,a:d,source:"rgb"}}else{var p=void 0;if(c<0?p=0:c>a?p=1:p=Math.round(c*100/a)/100,i!==p)return{h:n.h,s:n.s,l:n.l,a:p,source:"rgb"}}return null},lu={},g4=function(t,n,r,i){if(typeof document>"u"&&!i)return null;var o=i?new i:document.createElement("canvas");o.width=r*2,o.height=r*2;var a=o.getContext("2d");return a?(a.fillStyle=t,a.fillRect(0,0,o.width,o.height),a.fillStyle=n,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null},m4=function(t,n,r,i){var o=t+"-"+n+"-"+r+(i?"-server":"");if(lu[o])return lu[o];var a=g4(t,n,r,i);return lu[o]=a,a},nm=Object.assign||function(e){for(var t=1;t-1},T4=function(t){return Number(String(t).replace(/%/g,""))},R4=1,ee=function(e){k4(t,e);function t(n){E4(this,t);var r=C4(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(i){r.setUpdatedValue(i.target.value,i)},r.handleKeyDown=function(i){var o=T4(i.target.value);if(!isNaN(o)&&P4(i.keyCode)){var a=r.getArrowOffset(),l=i.keyCode===V1?o+a:o-a;r.setUpdatedValue(l,i)}},r.handleDrag=function(i){if(r.props.dragLabel){var o=Math.round(r.props.value+i.movementX);o>=0&&o<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(o),i)}},r.handleMouseDown=function(i){r.props.dragLabel&&(i.preventDefault(),r.handleDrag(i),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(n.value).toUpperCase(),blurValue:String(n.value).toUpperCase()},r.inputId="rc-editable-input-"+R4++,r}return w4(t,[{key:"componentDidUpdate",value:function(r,i){this.props.value!==this.state.value&&(r.value!==this.props.value||i.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return S4({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||_4}},{key:"setUpdatedValue",value:function(r,i){var o=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(o,i),this.setState({value:r})}},{key:"render",value:function(){var r=this,i=q({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return x.createElement("div",{style:i.wrap},x.createElement("input",{id:this.inputId,style:i.input,ref:function(a){return r.input=a},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?x.createElement("label",{htmlFor:this.inputId,style:i.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(I.PureComponent||I.Component),A4=function(t,n,r,i){var o=i.clientWidth,a=i.clientHeight,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(i.getBoundingClientRect().left+window.pageXOffset),c=s-(i.getBoundingClientRect().top+window.pageYOffset);if(n==="vertical"){var f=void 0;if(c<0)f=359;else if(c>a)f=0;else{var d=-(c*100/a)+100;f=360*d/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var p=void 0;if(u<0)p=0;else if(u>o)p=359;else{var m=u*100/o;p=360*m/100}if(r.h!==p)return{h:p,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},N4=function(){function e(t,n){for(var r=0;r-1}function q4(e,t){var n=this.__data__,r=ls(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=eD}function xi(e){return e!=null&&xd(e.length)&&!md(e)}function tD(e){return _n(e)&&xi(e)}function nD(){return!1}var tx=typeof at=="object"&&at&&!at.nodeType&&at,fm=tx&&typeof lt=="object"&<&&!lt.nodeType&<,rD=fm&&fm.exports===tx,dm=rD?$t.Buffer:void 0,iD=dm?dm.isBuffer:void 0,Sl=iD||nD,oD="[object Object]",aD=Function.prototype,lD=Object.prototype,nx=aD.toString,sD=lD.hasOwnProperty,uD=nx.call(Object);function cD(e){if(!_n(e)||tr(e)!=oD)return!1;var t=Z1(e);if(t===null)return!0;var n=sD.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&nx.call(n)==uD}var fD="[object Arguments]",dD="[object Array]",pD="[object Boolean]",hD="[object Date]",gD="[object Error]",mD="[object Function]",yD="[object Map]",vD="[object Number]",xD="[object Object]",bD="[object RegExp]",wD="[object Set]",SD="[object String]",ED="[object WeakMap]",CD="[object ArrayBuffer]",kD="[object DataView]",_D="[object Float32Array]",OD="[object Float64Array]",$D="[object Int8Array]",PD="[object Int16Array]",TD="[object Int32Array]",RD="[object Uint8Array]",AD="[object Uint8ClampedArray]",ND="[object Uint16Array]",LD="[object Uint32Array]",ye={};ye[_D]=ye[OD]=ye[$D]=ye[PD]=ye[TD]=ye[RD]=ye[AD]=ye[ND]=ye[LD]=!0;ye[fD]=ye[dD]=ye[CD]=ye[pD]=ye[kD]=ye[hD]=ye[gD]=ye[mD]=ye[yD]=ye[vD]=ye[xD]=ye[bD]=ye[wD]=ye[SD]=ye[ED]=!1;function ID(e){return _n(e)&&xd(e.length)&&!!ye[tr(e)]}function FD(e){return function(t){return e(t)}}var rx=typeof at=="object"&&at&&!at.nodeType&&at,go=rx&&typeof lt=="object"&<&&!lt.nodeType&<,jD=go&&go.exports===rx,uu=jD&&K1.process,pm=function(){try{var e=go&&go.require&&go.require("util").types;return e||uu&&uu.binding&&uu.binding("util")}catch{}}(),hm=pm&&pm.isTypedArray,bd=hm?FD(hm):ID;function Cc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var MD=Object.prototype,DD=MD.hasOwnProperty;function BD(e,t,n){var r=e[t];(!(DD.call(e,t)&&ea(r,n))||n===void 0&&!(t in e))&&yd(e,t,n)}function zD(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o-1&&e%1==0&&e0){if(++t>=rB)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var lB=aB(nB);function sB(e,t){return lB(eB(e,t,us),e+"")}function uB(e,t,n){if(!xt(n))return!1;var r=typeof t;return(r=="number"?xi(n)&&wd(t,n.length):r=="string"&&t in n)?ea(n[t],e):!1}function cB(e){return sB(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&uB(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r=t||$<0||f&&R>=o}function g(){var b=cu();if(h(b))return v(b);l=setTimeout(g,y(b))}function v(b){return l=void 0,d&&r?p(b):(r=i=void 0,a)}function S(){l!==void 0&&clearTimeout(l),u=0,r=s=i=l=void 0}function C(){return l===void 0?a:v(cu())}function O(){var b=cu(),$=h(b);if(r=arguments,i=this,s=b,$){if(l===void 0)return m(s);if(f)return clearTimeout(l),l=setTimeout(g,t),p(s)}return l===void 0&&(l=setTimeout(g,t)),a}return O.cancel=S,O.flush=C,O}var EB="Expected a function";function CB(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(EB);return xt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),lx(e,t,{leading:r,maxWait:t,trailing:i})}var kB=function(t,n,r){var i=r.getBoundingClientRect(),o=i.width,a=i.height,l=typeof t.pageX=="number"?t.pageX:t.touches[0].pageX,s=typeof t.pageY=="number"?t.pageY:t.touches[0].pageY,u=l-(r.getBoundingClientRect().left+window.pageXOffset),c=s-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),c<0?c=0:c>a&&(c=a);var f=u/o,d=1-c/a;return{h:n.h,s:f,v:d,a:n.a,source:"hsv"}},_B=function(){function e(t,n){for(var r=0;r=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return B(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(XB,arguments)},brighten:function(){return this._applyModification(YB,arguments)},darken:function(){return this._applyModification(JB,arguments)},desaturate:function(){return this._applyModification(GB,arguments)},saturate:function(){return this._applyModification(qB,arguments)},greyscale:function(){return this._applyModification(KB,arguments)},spin:function(){return this._applyModification(QB,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(t6,arguments)},complement:function(){return this._applyCombination(ZB,arguments)},monochromatic:function(){return this._applyCombination(n6,arguments)},splitcomplement:function(){return this._applyCombination(e6,arguments)},triad:function(){return this._applyCombination(Sm,[3])},tetrad:function(){return this._applyCombination(Sm,[4])}};B.fromRatio=function(e,t){if(El(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Yi(e[r]));e=n}return B(e,t)};function zB(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,l=!1;return typeof e=="string"&&(e=l6(e)),El(e)=="object"&&(Wt(e.r)&&Wt(e.g)&&Wt(e.b)?(t=UB(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Wt(e.h)&&Wt(e.s)&&Wt(e.v)?(r=Yi(e.s),i=Yi(e.v),t=VB(e.h,r,i),a=!0,l="hsv"):Wt(e.h)&&Wt(e.s)&&Wt(e.l)&&(r=Yi(e.s),o=Yi(e.l),t=HB(e.h,r,o),a=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=ux(n),{ok:a,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function UB(e,t,n){return{r:be(e,255)*255,g:be(t,255)*255,b:be(n,255)*255}}function vm(e,t,n){e=be(e,255),t=be(t,255),n=be(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,l=(r+i)/2;if(r==i)o=a=0;else{var s=r-i;switch(a=l>.5?s/(2-r-i):s/(r+i),r){case e:o=(t-n)/s+(t1&&(f-=1),f<1/6?u+(c-u)*6*f:f<1/2?c:f<2/3?u+(c-u)*(2/3-f)*6:u}if(t===0)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=a(s,l,e+1/3),i=a(s,l,e),o=a(s,l,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function xm(e,t,n){e=be(e,255),t=be(t,255),n=be(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,l=r,s=r-i;if(a=r===0?0:s/r,r==i)o=0;else{switch(r){case e:o=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(B(r));return o}function n6(e,t){t=t||6;for(var n=B(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],l=1/t;t--;)a.push(B({h:r,s:i,v:o})),o=(o+l)%1;return a}B.mix=function(e,t,n){n=n===0?0:n||50;var r=B(e).toRgb(),i=B(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return B(a)};B.readability=function(e,t){var n=B(e),r=B(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};B.isReadable=function(e,t,n){var r=B.readability(e,t),i,o;switch(o=!1,i=s6(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o};B.mostReadable=function(e,t,n){var r=null,i=0,o,a,l,s;n=n||{},a=n.includeFallbackColors,l=n.level,s=n.size;for(var u=0;ui&&(i=o,r=B(t[u]));return B.isReadable(e,r,{level:l,size:s})||!a?r:(n.includeFallbackColors=!1,B.mostReadable(e,["#fff","#000"],n))};var kc=B.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},r6=B.hexNames=i6(kc);function i6(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ux(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function be(e,t){o6(e)&&(e="100%");var n=a6(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ds(e){return Math.min(1,Math.max(0,e))}function it(e){return parseInt(e,16)}function o6(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function a6(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _t(e){return e.length==1?"0"+e:""+e}function Yi(e){return e<=1&&(e=e*100+"%"),e}function cx(e){return Math.round(parseFloat(e)*255).toString(16)}function Em(e){return it(e)/255}var Et=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Wt(e){return!!Et.CSS_UNIT.exec(e)}function l6(e){e=e.replace(DB,"").replace(BB,"").toLowerCase();var t=!1;if(kc[e])e=kc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Et.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Et.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Et.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Et.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Et.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Et.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Et.hex8.exec(e))?{r:it(n[1]),g:it(n[2]),b:it(n[3]),a:Em(n[4]),format:t?"name":"hex8"}:(n=Et.hex6.exec(e))?{r:it(n[1]),g:it(n[2]),b:it(n[3]),format:t?"name":"hex"}:(n=Et.hex4.exec(e))?{r:it(n[1]+""+n[1]),g:it(n[2]+""+n[2]),b:it(n[3]+""+n[3]),a:Em(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Et.hex3.exec(e))?{r:it(n[1]+""+n[1]),g:it(n[2]+""+n[2]),b:it(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function s6(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var Cm=function(t){var n=["r","g","b","a","h","s","l","v"],r=0,i=0;return MB(n,function(o){if(t[o]&&(r+=1,isNaN(t[o])||(i+=1),o==="s"||o==="l")){var a=/^\d+%$/;a.test(t[o])&&(i+=1)}}),r===i?t:!1},Ji=function(t,n){var r=t.hex?B(t.hex):B(t),i=r.toHsl(),o=r.toHsv(),a=r.toRgb(),l=r.toHex();i.s===0&&(i.h=n||0,o.h=n||0);var s=l==="000000"&&a.a===0;return{hsl:i,hex:s?"transparent":"#"+l,rgb:a,hsv:o,oldHue:t.h||n||i.h,source:t.source}},Tn=function(t){if(t==="transparent")return!0;var n=String(t).charAt(0)==="#"?1:0;return t.length!==4+n&&t.length<7+n&&B(t).isValid()},Ed=function(t){if(!t)return"#fff";var n=Ji(t);if(n.hex==="transparent")return"rgba(0,0,0,0.4)";var r=(n.rgb.r*299+n.rgb.g*587+n.rgb.b*114)/1e3;return r>=128?"#000":"#fff"},fu=function(t,n){var r=t.replace("°","");return B(n+" ("+r+")")._ok},Bi=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"span";return function(r){m6(i,r);function i(){var o,a,l,s;g6(this,i);for(var u=arguments.length,c=Array(u),f=0;fl))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=n&$6?new Cl:void 0;for(o.set(e,t),o.set(t,e);++f=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Sa=24,Uz=bx.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,i=r===void 0?Sa:r,o=e.height,a=o===void 0?Sa:o,l=e.style,s=l===void 0?{}:l,u=zz(e,["fill","width","height","style"]);return Um.default.createElement("svg",zm({viewBox:"0 0 "+Sa+" "+Sa,style:zm({fill:n,width:i,height:a},s)},u),Um.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},Hz=function(){function e(t,n){for(var r=0;r1&&(i.a=1),r.props.onChange({h:r.props.hsl.h,s:r.props.hsl.s,l:r.props.hsl.l,a:Math.round(i.a*100)/100,source:"rgb"},o)):(i.h||i.s||i.l)&&(typeof i.s=="string"&&i.s.includes("%")&&(i.s=i.s.replace("%","")),typeof i.l=="string"&&i.l.includes("%")&&(i.l=i.l.replace("%","")),i.s==1?i.s=.01:i.l==1&&(i.l=.01),r.props.onChange({h:i.h||r.props.hsl.h,s:Number(Bm(i.s)?r.props.hsl.s:i.s),l:Number(Bm(i.l)?r.props.hsl.l:i.l),source:"hsl"},o))},r.showHighlight=function(i){i.currentTarget.style.background="#eee"},r.hideHighlight=function(i){i.currentTarget.style.background="transparent"},n.hsl.a!==1&&n.view==="hex"?r.state={view:"rgb"}:r.state={view:n.view},r}return Hz(t,[{key:"render",value:function(){var r=this,i=q({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),o=void 0;return this.state.view==="hex"?o=x.createElement("div",{style:i.fields,className:"flexbox-fix"},x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):this.state.view==="rgb"?o=x.createElement("div",{style:i.fields,className:"flexbox-fix"},x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),x.createElement("div",{style:i.alpha},x.createElement(ee,{style:{input:i.input,label:i.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):this.state.view==="hsl"&&(o=x.createElement("div",{style:i.fields,className:"flexbox-fix"},x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"s",value:Math.round(this.props.hsl.s*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:i.field},x.createElement(ee,{style:{input:i.input,label:i.label},label:"l",value:Math.round(this.props.hsl.l*100)+"%",onChange:this.handleChange})),x.createElement("div",{style:i.alpha},x.createElement(ee,{style:{input:i.input,label:i.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),x.createElement("div",{style:i.wrap,className:"flexbox-fix"},o,x.createElement("div",{style:i.toggle},x.createElement("div",{style:i.icon,onClick:this.toggleViews,ref:function(l){return r.icon=l}},x.createElement(Uz,{style:i.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.hsl.a!==1&&i.view==="hex"?{view:"rgb"}:null}}]),t}(x.Component);wx.defaultProps={view:"hex"};var Hm=function(){var t=q({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return x.createElement("div",{style:t.picker})},qz=function(){var t=q({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return x.createElement("div",{style:t.picker})},Pd=function(t){var n=t.width,r=t.onChange,i=t.disableAlpha,o=t.rgb,a=t.hsl,l=t.hsv,s=t.hex,u=t.renderers,c=t.styles,f=c===void 0?{}:c,d=t.className,p=d===void 0?"":d,m=t.defaultView,y=q(Qe({default:{picker:{width:n,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},f),{disableAlpha:i});return x.createElement("div",{style:y.picker,className:"chrome-picker "+p},x.createElement("div",{style:y.saturation},x.createElement(fs,{style:y.Saturation,hsl:a,hsv:l,pointer:qz,onChange:r})),x.createElement("div",{style:y.body},x.createElement("div",{style:y.controls,className:"flexbox-fix"},x.createElement("div",{style:y.color},x.createElement("div",{style:y.swatch},x.createElement("div",{style:y.active}),x.createElement(yi,{renderers:u}))),x.createElement("div",{style:y.toggles},x.createElement("div",{style:y.hue},x.createElement(vi,{style:y.Hue,hsl:a,pointer:Hm,onChange:r})),x.createElement("div",{style:y.alpha},x.createElement(gd,{style:y.Alpha,rgb:o,hsl:a,pointer:Hm,renderers:u,onChange:r})))),x.createElement(wx,{rgb:o,hsl:a,hex:s,view:m,onChange:r,disableAlpha:i})))};Pd.propTypes={width:F.oneOfType([F.string,F.number]),disableAlpha:F.bool,styles:F.object,defaultView:F.oneOf(["hex","rgb","hsl"])};Pd.defaultProps={width:225,disableAlpha:!1,styles:{}};const Kz=Ze(Pd);var Xz=function(t){var n=t.color,r=t.onClick,i=r===void 0?function(){}:r,o=t.onSwatchHover,a=t.active,l=q({default:{color:{background:n,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:Ed(n),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:a,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return x.createElement(ir,{style:l.color,color:n,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:l.dot}))},Yz=function(t){var n=t.hex,r=t.rgb,i=t.onChange,o=q({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:n},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),a=function(s,u){s.r||s.g||s.b?i({r:s.r||r.r,g:s.g||r.g,b:s.b||r.b,source:"rgb"},u):i({hex:s.hex,source:"hex"},u)};return x.createElement("div",{style:o.fields,className:"flexbox-fix"},x.createElement("div",{style:o.active}),x.createElement(ee,{style:{wrap:o.HEXwrap,input:o.HEXinput,label:o.HEXlabel},label:"hex",value:n,onChange:a}),x.createElement(ee,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"r",value:r.r,onChange:a}),x.createElement(ee,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"g",value:r.g,onChange:a}),x.createElement(ee,{style:{wrap:o.RGBwrap,input:o.RGBinput,label:o.RGBlabel},label:"b",value:r.b,onChange:a}))},Td=function(t){var n=t.onChange,r=t.onSwatchHover,i=t.colors,o=t.hex,a=t.rgb,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,f=q(Qe({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),d=function(m,y){m.hex?Tn(m.hex)&&n({hex:m.hex,source:"hex"},y):n(m,y)};return x.createElement(ta,{style:f.Compact,styles:s},x.createElement("div",{style:f.compact,className:"compact-picker "+c},x.createElement("div",null,or(i,function(p){return x.createElement(Xz,{key:p,color:p,active:p.toLowerCase()===o,onClick:d,onSwatchHover:r})}),x.createElement("div",{style:f.clear})),x.createElement(Yz,{hex:o,rgb:a,onChange:d})))};Td.propTypes={colors:F.arrayOf(F.string),styles:F.object};Td.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}};Ze(Td);var Jz=function(t){var n=t.hover,r=t.color,i=t.onClick,o=t.onSwatchHover,a={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},l=q({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:a}},{hover:n});return x.createElement("div",{style:l.swatch},x.createElement(ir,{color:r,onClick:i,onHover:o,focusStyle:a}))};const Qz=hd(Jz);var Rd=function(t){var n=t.width,r=t.colors,i=t.onChange,o=t.onSwatchHover,a=t.triangle,l=t.styles,s=l===void 0?{}:l,u=t.className,c=u===void 0?"":u,f=q(Qe({default:{card:{width:n,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":a==="hide","top-left-triangle":a==="top-left","top-right-triangle":a==="top-right","bottom-left-triangle":a==="bottom-left","bottom-right-triangle":a==="bottom-right"}),d=function(m,y){return i({hex:m,source:"hex"},y)};return x.createElement("div",{style:f.card,className:"github-picker "+c},x.createElement("div",{style:f.triangleShadow}),x.createElement("div",{style:f.triangle}),or(r,function(p){return x.createElement(Qz,{color:p,key:p,onClick:d,onSwatchHover:o})}))};Rd.propTypes={width:F.oneOfType([F.string,F.number]),colors:F.arrayOf(F.string),triangle:F.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:F.object};Rd.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}};Ze(Rd);var Zz=function(t){var n=t.direction,r=q({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:n==="vertical"});return x.createElement("div",{style:r.picker})},e8=Object.assign||function(e){for(var t=1;t.5});return x.createElement("div",{style:r.picker})},i8=function(){var t=q({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return x.createElement("div",{style:t.pointer},x.createElement("div",{style:t.left},x.createElement("div",{style:t.leftInside})),x.createElement("div",{style:t.right},x.createElement("div",{style:t.rightInside})))},Vm=function(t){var n=t.onClick,r=t.label,i=t.children,o=t.active,a=q({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:o});return x.createElement("div",{style:a.button,onClick:n},r||i)},o8=function(t){var n=t.rgb,r=t.currentColor,i=q({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+n.r+","+n.g+", "+n.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return x.createElement("div",null,x.createElement("div",{style:i.label},"new"),x.createElement("div",{style:i.swatches},x.createElement("div",{style:i.new}),x.createElement("div",{style:i.current})),x.createElement("div",{style:i.label},"current"))},a8=function(){function e(t,n){for(var r=0;r100&&(c.a=100),c.a/=100,n({h:i.h,s:i.s,l:i.l,a:c.a,source:"rgb"},f))};return x.createElement("div",{style:l.fields,className:"flexbox-fix"},x.createElement("div",{style:l.double},x.createElement(ee,{style:{input:l.input,label:l.label},label:"hex",value:o.replace("#",""),onChange:s})),x.createElement("div",{style:l.single},x.createElement(ee,{style:{input:l.input,label:l.label},label:"r",value:r.r,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ee,{style:{input:l.input,label:l.label},label:"g",value:r.g,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.single},x.createElement(ee,{style:{input:l.input,label:l.label},label:"b",value:r.b,onChange:s,dragLabel:"true",dragMax:"255"})),x.createElement("div",{style:l.alpha},x.createElement(ee,{style:{input:l.input,label:l.label},label:"a",value:Math.round(r.a*100),onChange:s,dragLabel:"true",dragMax:"100"})))},f8=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var Ea=24,v8=Ex.default=function(e){var t=e.fill,n=t===void 0?"currentColor":t,r=e.width,i=r===void 0?Ea:r,o=e.height,a=o===void 0?Ea:o,l=e.style,s=l===void 0?{}:l,u=y8(e,["fill","width","height","style"]);return Gm.default.createElement("svg",Wm({viewBox:"0 0 "+Ea+" "+Ea,style:Wm({fill:n,width:i,height:a},s)},u),Gm.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},x8=function(t){var n=t.color,r=t.onClick,i=r===void 0?function(){}:r,o=t.onSwatchHover,a=t.first,l=t.last,s=t.active,u=q({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:n,marginBottom:"1px"},check:{color:Ed(n),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:a,last:l,active:s,"color-#FFFFFF":n==="#FFFFFF",transparent:n==="transparent"});return x.createElement(ir,{color:n,style:u.color,onClick:i,onHover:o,focusStyle:{boxShadow:"0 0 4px "+n}},x.createElement("div",{style:u.check},x.createElement(v8,null)))},b8=function(t){var n=t.onClick,r=t.onSwatchHover,i=t.group,o=t.active,a=q({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return x.createElement("div",{style:a.group},or(i,function(l,s){return x.createElement(x8,{key:l,color:l,active:l.toLowerCase()===o,first:s===0,last:s===i.length-1,onClick:n,onSwatchHover:r})}))},Fd=function(t){var n=t.width,r=t.height,i=t.onChange,o=t.onSwatchHover,a=t.colors,l=t.hex,s=t.styles,u=s===void 0?{}:s,c=t.className,f=c===void 0?"":c,d=q(Qe({default:{picker:{width:n,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),p=function(y,h){return i({hex:y,source:"hex"},h)};return x.createElement("div",{style:d.picker,className:"swatches-picker "+f},x.createElement(ta,null,x.createElement("div",{style:d.overflow},x.createElement("div",{style:d.body},or(a,function(m){return x.createElement(b8,{key:m.toString(),group:m,active:l,onClick:p,onSwatchHover:o})}),x.createElement("div",{style:d.clear})))))};Fd.propTypes={width:F.oneOfType([F.string,F.number]),height:F.oneOfType([F.string,F.number]),colors:F.arrayOf(F.arrayOf(F.string)),styles:F.object};Fd.defaultProps={width:320,height:240,colors:[[gr[900],gr[700],gr[500],gr[300],gr[100]],[mr[900],mr[700],mr[500],mr[300],mr[100]],[yr[900],yr[700],yr[500],yr[300],yr[100]],[vr[900],vr[700],vr[500],vr[300],vr[100]],[xr[900],xr[700],xr[500],xr[300],xr[100]],[br[900],br[700],br[500],br[300],br[100]],[wr[900],wr[700],wr[500],wr[300],wr[100]],[Sr[900],Sr[700],Sr[500],Sr[300],Sr[100]],[Er[900],Er[700],Er[500],Er[300],Er[100]],["#194D33",Qi[700],Qi[500],Qi[300],Qi[100]],[Cr[900],Cr[700],Cr[500],Cr[300],Cr[100]],[kr[900],kr[700],kr[500],kr[300],kr[100]],[_r[900],_r[700],_r[500],_r[300],_r[100]],[Or[900],Or[700],Or[500],Or[300],Or[100]],[$r[900],$r[700],$r[500],$r[300],$r[100]],[Pr[900],Pr[700],Pr[500],Pr[300],Pr[100]],[Tr[900],Tr[700],Tr[500],Tr[300],Tr[100]],[Rr[900],Rr[700],Rr[500],Rr[300],Rr[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}};Ze(Fd);var jd=function(t){var n=t.onChange,r=t.onSwatchHover,i=t.hex,o=t.colors,a=t.width,l=t.triangle,s=t.styles,u=s===void 0?{}:s,c=t.className,f=c===void 0?"":c,d=q(Qe({default:{card:{width:a,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":l==="hide","top-left-triangle":l==="top-left","top-right-triangle":l==="top-right"}),p=function(y,h){Tn(y)&&n({hex:y,source:"hex"},h)};return x.createElement("div",{style:d.card,className:"twitter-picker "+f},x.createElement("div",{style:d.triangleShadow}),x.createElement("div",{style:d.triangle}),x.createElement("div",{style:d.body},or(o,function(m,y){return x.createElement(ir,{key:y,color:m,hex:m,style:d.swatch,onClick:p,onHover:r,focusStyle:{boxShadow:"0 0 4px "+m}})}),x.createElement("div",{style:d.hash},"#"),x.createElement(ee,{label:null,style:{input:d.input},value:i.replace("#",""),onChange:p}),x.createElement("div",{style:d.clear})))};jd.propTypes={width:F.oneOfType([F.string,F.number]),triangle:F.oneOf(["hide","top-left","top-right"]),colors:F.arrayOf(F.string),styles:F.object};jd.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}};Ze(jd);var Md=function(t){var n=q({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(t.hsl.h)+", "+Math.round(t.hsl.s*100)+"%, "+Math.round(t.hsl.l*100)+"%)"}}});return x.createElement("div",{style:n.picker})};Md.propTypes={hsl:F.shape({h:F.number,s:F.number,l:F.number,a:F.number})};Md.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Dd=function(t){var n=q({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(t.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return x.createElement("div",{style:n.picker})};Dd.propTypes={hsl:F.shape({h:F.number,s:F.number,l:F.number,a:F.number})};Dd.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var w8=function(t){var n=t.onChange,r=t.rgb,i=t.hsl,o=t.hex,a=t.hsv,l=function(p,m){if(p.hex)Tn(p.hex)&&n({hex:p.hex,source:"hex"},m);else if(p.rgb){var y=p.rgb.split(",");fu(p.rgb,"rgb")&&n({r:y[0],g:y[1],b:y[2],a:1,source:"rgb"},m)}else if(p.hsv){var h=p.hsv.split(",");fu(p.hsv,"hsv")&&(h[2]=h[2].replace("%",""),h[1]=h[1].replace("%",""),h[0]=h[0].replace("°",""),h[1]==1?h[1]=.01:h[2]==1&&(h[2]=.01),n({h:Number(h[0]),s:Number(h[1]),v:Number(h[2]),source:"hsv"},m))}else if(p.hsl){var g=p.hsl.split(",");fu(p.hsl,"hsl")&&(g[2]=g[2].replace("%",""),g[1]=g[1].replace("%",""),g[0]=g[0].replace("°",""),f[1]==1?f[1]=.01:f[2]==1&&(f[2]=.01),n({h:Number(g[0]),s:Number(g[1]),v:Number(g[2]),source:"hsl"},m))}},s=q({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=r.r+", "+r.g+", "+r.b,c=Math.round(i.h)+"°, "+Math.round(i.s*100)+"%, "+Math.round(i.l*100)+"%",f=Math.round(a.h)+"°, "+Math.round(a.s*100)+"%, "+Math.round(a.v*100)+"%";return x.createElement("div",{style:s.wrap,className:"flexbox-fix"},x.createElement("div",{style:s.fields},x.createElement("div",{style:s.double},x.createElement(ee,{style:{input:s.input,label:s.label},label:"hex",value:o,onChange:l})),x.createElement("div",{style:s.column},x.createElement("div",{style:s.single},x.createElement(ee,{style:{input:s.input2,label:s.label2},label:"rgb",value:u,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ee,{style:{input:s.input2,label:s.label2},label:"hsv",value:f,onChange:l})),x.createElement("div",{style:s.single},x.createElement(ee,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:l})))))},Bd=function(t){var n=t.width,r=t.onChange,i=t.rgb,o=t.hsl,a=t.hsv,l=t.hex,s=t.header,u=t.styles,c=u===void 0?{}:u,f=t.className,d=f===void 0?"":f,p=q(Qe({default:{picker:{width:n,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+i.r+", "+i.g+", "+i.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return x.createElement("div",{style:p.picker,className:"google-picker "+d},x.createElement("div",{style:p.head},s),x.createElement("div",{style:p.swatch}),x.createElement("div",{style:p.saturation},x.createElement(fs,{hsl:o,hsv:a,pointer:Md,onChange:r})),x.createElement("div",{style:p.body},x.createElement("div",{style:p.controls,className:"flexbox-fix"},x.createElement("div",{style:p.hue},x.createElement(vi,{style:p.Hue,hsl:o,radius:"4px",pointer:Dd,onChange:r}))),x.createElement(w8,{rgb:i,hsl:o,hex:l,hsv:a,onChange:r})))};Bd.propTypes={width:F.oneOfType([F.string,F.number]),styles:F.object,header:F.string};Bd.defaultProps={width:652,styles:{},header:"Color picker"};Ze(Bd);const qm=({label:e,color:t,onChange:n})=>{const[r,i]=I.useState(!1),o=()=>{i(!r)},a=()=>{i(!1)},l=s=>{n(s.hex)};return _.jsxs("div",{className:"relative",children:[_.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:e}),_.jsxs("div",{className:"flex items-center",children:[_.jsx("div",{className:"w-10 h-10 rounded-md border border-gray-300 cursor-pointer",style:{backgroundColor:t},onClick:o}),_.jsx("input",{type:"text",value:t,onChange:s=>n(s.target.value),className:"ml-2 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 flex-grow"})]}),r&&_.jsxs("div",{className:"absolute z-10 mt-2",children:[_.jsx("div",{className:"fixed inset-0",onClick:a}),_.jsx(Kz,{color:t,onChange:l,disableAlpha:!0})]})]})},S8=()=>{const{t:e}=Vo();return _.jsx("header",{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg",children:_.jsx("div",{className:"container mx-auto px-4 py-6",children:_.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[_.jsxs("div",{className:"flex items-center mb-4 md:mb-0",children:[_.jsx("div",{className:"text-3xl font-bold mr-2",children:"DocForge"}),_.jsx("span",{className:"bg-white text-blue-600 text-xs font-semibold px-2 py-1 rounded-full",children:"Beta"})]}),_.jsxs("div",{className:"text-center md:text-right",children:[_.jsx("h1",{className:"text-2xl font-bold mb-2",children:e("header.title")}),_.jsx("p",{className:"text-blue-100 max-w-md",children:e("header.subtitle")})]})]})})})},E8=()=>{const{t:e}=Vo(),t=new Date().getFullYear();return _.jsx("footer",{className:"bg-gray-800 text-white py-8",children:_.jsx("div",{className:"container mx-auto px-4",children:_.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[_.jsxs("div",{className:"mb-4 md:mb-0",children:[_.jsx("div",{className:"text-xl font-bold",children:"DocForge"}),_.jsx("p",{className:"text-gray-400 text-sm mt-1",children:e("footer.tagline")})]}),_.jsxs("div",{className:"text-center md:text-right",children:[_.jsxs("p",{className:"text-gray-400 text-sm",children:["© ",t," DocForge. ",e("footer.rights")]}),_.jsxs("div",{className:"mt-2 space-x-4",children:[_.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:e("footer.privacy")}),_.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:e("footer.terms")}),_.jsx("a",{href:"#",className:"text-gray-400 hover:text-white transition-colors",children:e("footer.contact")})]})]})]})})})};function Cx(e,t){return function(){return e.apply(t,arguments)}}const{toString:C8}=Object.prototype,{getPrototypeOf:zd}=Object,hs=(e=>t=>{const n=C8.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>hs(t)===e),gs=e=>t=>typeof t===e,{isArray:bi}=Array,Lo=gs("undefined");function k8(e){return e!==null&&!Lo(e)&&e.constructor!==null&&!Lo(e.constructor)&&ut(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const kx=Pt("ArrayBuffer");function _8(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&kx(e.buffer),t}const O8=gs("string"),ut=gs("function"),_x=gs("number"),ms=e=>e!==null&&typeof e=="object",$8=e=>e===!0||e===!1,Da=e=>{if(hs(e)!=="object")return!1;const t=zd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},P8=Pt("Date"),T8=Pt("File"),R8=Pt("Blob"),A8=Pt("FileList"),N8=e=>ms(e)&&ut(e.pipe),L8=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ut(e.append)&&((t=hs(e))==="formdata"||t==="object"&&ut(e.toString)&&e.toString()==="[object FormData]"))},I8=Pt("URLSearchParams"),[F8,j8,M8,D8]=["ReadableStream","Request","Response","Headers"].map(Pt),B8=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function na(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),bi(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$x=e=>!Lo(e)&&e!==Bn;function Tc(){const{caseless:e}=$x(this)&&this||{},t={},n=(r,i)=>{const o=e&&Ox(t,i)||i;Da(t[o])&&Da(r)?t[o]=Tc(t[o],r):Da(r)?t[o]=Tc({},r):bi(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(na(t,(i,o)=>{n&&ut(i)?e[o]=Cx(i,n):e[o]=i},{allOwnKeys:r}),e),U8=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),H8=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},V8=(e,t,n,r)=>{let i,o,a;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&zd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W8=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},G8=e=>{if(!e)return null;if(bi(e))return e;let t=e.length;if(!_x(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},q8=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zd(Uint8Array)),K8=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},X8=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Y8=Pt("HTMLFormElement"),J8=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Km=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q8=Pt("RegExp"),Px=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};na(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Z8=e=>{Px(e,(t,n)=>{if(ut(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ut(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},eU=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return bi(e)?r(e):r(String(e).split(t)),n},tU=()=>{},nU=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function rU(e){return!!(e&&ut(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const iU=e=>{const t=new Array(10),n=(r,i)=>{if(ms(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=bi(r)?[]:{};return na(r,(a,l)=>{const s=n(a,i+1);!Lo(s)&&(o[l]=s)}),t[i]=void 0,o}}return r};return n(e,0)},oU=Pt("AsyncFunction"),aU=e=>e&&(ms(e)||ut(e))&&ut(e.then)&&ut(e.catch),Tx=((e,t)=>e?setImmediate:t?((n,r)=>(Bn.addEventListener("message",({source:i,data:o})=>{i===Bn&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Bn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ut(Bn.postMessage)),lU=typeof queueMicrotask<"u"?queueMicrotask.bind(Bn):typeof process<"u"&&process.nextTick||Tx,k={isArray:bi,isArrayBuffer:kx,isBuffer:k8,isFormData:L8,isArrayBufferView:_8,isString:O8,isNumber:_x,isBoolean:$8,isObject:ms,isPlainObject:Da,isReadableStream:F8,isRequest:j8,isResponse:M8,isHeaders:D8,isUndefined:Lo,isDate:P8,isFile:T8,isBlob:R8,isRegExp:Q8,isFunction:ut,isStream:N8,isURLSearchParams:I8,isTypedArray:q8,isFileList:A8,forEach:na,merge:Tc,extend:z8,trim:B8,stripBOM:U8,inherits:H8,toFlatObject:V8,kindOf:hs,kindOfTest:Pt,endsWith:W8,toArray:G8,forEachEntry:K8,matchAll:X8,isHTMLForm:Y8,hasOwnProperty:Km,hasOwnProp:Km,reduceDescriptors:Px,freezeMethods:Z8,toObjectSet:eU,toCamelCase:J8,noop:tU,toFiniteNumber:nU,findKey:Ox,global:Bn,isContextDefined:$x,isSpecCompliantForm:rU,toJSONObject:iU,isAsyncFn:oU,isThenable:aU,setImmediate:Tx,asap:lU};function Q(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}k.inherits(Q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const Rx=Q.prototype,Ax={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ax[e]={value:e}});Object.defineProperties(Q,Ax);Object.defineProperty(Rx,"isAxiosError",{value:!0});Q.from=(e,t,n,r,i,o)=>{const a=Object.create(Rx);return k.toFlatObject(e,a,function(s){return s!==Error.prototype},l=>l!=="isAxiosError"),Q.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const sU=null;function Rc(e){return k.isPlainObject(e)||k.isArray(e)}function Nx(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function Xm(e,t,n){return e?e.concat(t).map(function(i,o){return i=Nx(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function uU(e){return k.isArray(e)&&!e.some(Rc)}const cU=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function ys(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!k.isUndefined(h[y])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(k.isDate(m))return m.toISOString();if(!s&&k.isBlob(m))throw new Q("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(m)||k.isTypedArray(m)?s&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,y,h){let g=m;if(m&&!h&&typeof m=="object"){if(k.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(k.isArray(m)&&uU(m)||(k.isFileList(m)||k.endsWith(y,"[]"))&&(g=k.toArray(m)))return y=Nx(y),g.forEach(function(S,C){!(k.isUndefined(S)||S===null)&&t.append(a===!0?Xm([y],C,o):a===null?y:y+"[]",u(S))}),!1}return Rc(m)?!0:(t.append(Xm(h,y,o),u(m)),!1)}const f=[],d=Object.assign(cU,{defaultVisitor:c,convertValue:u,isVisitable:Rc});function p(m,y){if(!k.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),k.forEach(m,function(g,v){(!(k.isUndefined(g)||g===null)&&i.call(t,g,k.isString(v)?v.trim():v,y,d))===!0&&p(g,y?y.concat(v):[v])}),f.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Ym(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ud(e,t){this._pairs=[],e&&ys(e,this,t)}const Lx=Ud.prototype;Lx.append=function(t,n){this._pairs.push([t,n])};Lx.toString=function(t){const n=t?function(r){return t.call(this,r,Ym)}:Ym;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function fU(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ix(e,t,n){if(!t)return e;const r=n&&n.encode||fU;k.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=k.isURLSearchParams(t)?t.toString():new Ud(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Jm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Fx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dU=typeof URLSearchParams<"u"?URLSearchParams:Ud,pU=typeof FormData<"u"?FormData:null,hU=typeof Blob<"u"?Blob:null,gU={isBrowser:!0,classes:{URLSearchParams:dU,FormData:pU,Blob:hU},protocols:["http","https","file","blob","url","data"]},Hd=typeof window<"u"&&typeof document<"u",Ac=typeof navigator=="object"&&navigator||void 0,mU=Hd&&(!Ac||["ReactNative","NativeScript","NS"].indexOf(Ac.product)<0),yU=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vU=Hd&&window.location.href||"http://localhost",xU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Hd,hasStandardBrowserEnv:mU,hasStandardBrowserWebWorkerEnv:yU,navigator:Ac,origin:vU},Symbol.toStringTag,{value:"Module"})),Le={...xU,...gU};function bU(e,t){return ys(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function wU(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function SU(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&k.isArray(i)?i.length:a,s?(k.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!k.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&k.isArray(i[a])&&(i[a]=SU(i[a])),!l)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,i)=>{t(wU(r),i,n,0)}),n}return null}function EU(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ra={transitional:Fx,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=k.isObject(t);if(o&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return i?JSON.stringify(jx(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bU(t,this.formSerializer).toString();if((l=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return ys(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),EU(t)):t}],transformResponse:[function(t){const n=this.transitional||ra.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?Q.from(l,Q.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{ra.headers[e]={}});const CU=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kU=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&CU[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Qm=Symbol("internals");function Ui(e){return e&&String(e).trim().toLowerCase()}function Ba(e){return e===!1||e==null?e:k.isArray(e)?e.map(Ba):String(e)}function _U(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const OU=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pu(e,t,n,r,i){if(k.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function $U(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function PU(e,t){const n=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let Xe=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,s,u){const c=Ui(s);if(!c)throw new Error("header name must be a non-empty string");const f=k.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||s]=Ba(l))}const a=(l,s)=>k.forEach(l,(u,c)=>o(u,c,s));if(k.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(k.isString(t)&&(t=t.trim())&&!OU(t))a(kU(t),n);else if(k.isHeaders(t))for(const[l,s]of t.entries())o(s,l,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Ui(t),t){const r=k.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return _U(i);if(k.isFunction(n))return n.call(this,i,r);if(k.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ui(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Ui(a),a){const l=k.findKey(r,a);l&&(!n||pu(r,r[l],l,n))&&(delete r[l],i=!0)}}return k.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||pu(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return k.forEach(this,(i,o)=>{const a=k.findKey(r,o);if(a){n[a]=Ba(i),delete n[o];return}const l=t?$U(o):String(o).trim();l!==o&&delete n[o],n[l]=Ba(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return k.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Qm]=this[Qm]={accessors:{}}).accessors,i=this.prototype;function o(a){const l=Ui(a);r[l]||(PU(i,a),r[l]=!0)}return k.isArray(t)?t.forEach(o):o(t),this}};Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(Xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});k.freezeMethods(Xe);function hu(e,t){const n=this||ra,r=t||n,i=Xe.from(r.headers);let o=r.data;return k.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Mx(e){return!!(e&&e.__CANCEL__)}function wi(e,t,n){Q.call(this,e??"canceled",Q.ERR_CANCELED,t,n),this.name="CanceledError"}k.inherits(wi,Q,{__CANCEL__:!0});function Dx(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function TU(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function RU(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[o];a||(a=u),n[i]=s,r[i]=u;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?a(u,c):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const kl=(e,t,n=3)=>{let r=0;const i=RU(50,250);return AU(o=>{const a=o.loaded,l=o.lengthComputable?o.total:void 0,s=a-r,u=i(s),c=a<=l;r=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Zm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ey=e=>(...t)=>k.asap(()=>e(...t)),NU=Le.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Le.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Le.origin),Le.navigator&&/(msie|trident)/i.test(Le.navigator.userAgent)):()=>!0,LU=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];k.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),k.isString(r)&&a.push("path="+r),k.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function IU(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function FU(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bx(e,t,n){let r=!IU(t);return e&&r||n==!1?FU(e,t):t}const ty=e=>e instanceof Xe?{...e}:e;function qn(e,t){t=t||{};const n={};function r(u,c,f,d){return k.isPlainObject(u)&&k.isPlainObject(c)?k.merge.call({caseless:d},u,c):k.isPlainObject(c)?k.merge({},c):k.isArray(c)?c.slice():c}function i(u,c,f,d){if(k.isUndefined(c)){if(!k.isUndefined(u))return r(void 0,u,f,d)}else return r(u,c,f,d)}function o(u,c){if(!k.isUndefined(c))return r(void 0,c)}function a(u,c){if(k.isUndefined(c)){if(!k.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const s={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,c,f)=>i(ty(u),ty(c),f,!0)};return k.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=s[c]||i,d=f(e[c],t[c],c);k.isUndefined(d)&&f!==l||(n[c]=d)}),n}const zx=e=>{const t=qn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:l}=t;t.headers=a=Xe.from(a),t.url=Ix(Bx(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let s;if(k.isFormData(n)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[u,...c]=s?s.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Le.hasStandardBrowserEnv&&(r&&k.isFunction(r)&&(r=r(t)),r||r!==!1&&NU(t.url))){const u=i&&o&&LU.read(o);u&&a.set(i,u)}return t},jU=typeof XMLHttpRequest<"u",MU=jU&&function(e){return new Promise(function(n,r){const i=zx(e);let o=i.data;const a=Xe.from(i.headers).normalize();let{responseType:l,onUploadProgress:s,onDownloadProgress:u}=i,c,f,d,p,m;function y(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function g(){if(!h)return;const S=Xe.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),O={data:!l||l==="text"||l==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};Dx(function($){n($),y()},function($){r($),y()},O),h=null}"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(g)},h.onabort=function(){h&&(r(new Q("Request aborted",Q.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new Q("Network Error",Q.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let C=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||Fx;i.timeoutErrorMessage&&(C=i.timeoutErrorMessage),r(new Q(C,O.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,h)),h=null},o===void 0&&a.setContentType(null),"setRequestHeader"in h&&k.forEach(a.toJSON(),function(C,O){h.setRequestHeader(O,C)}),k.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),l&&l!=="json"&&(h.responseType=i.responseType),u&&([d,m]=kl(u,!0),h.addEventListener("progress",d)),s&&h.upload&&([f,p]=kl(s),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{h&&(r(!S||S.type?new wi(null,e,h):S),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const v=TU(i.url);if(v&&Le.protocols.indexOf(v)===-1){r(new Q("Unsupported protocol "+v+":",Q.ERR_BAD_REQUEST,e));return}h.send(o||null)})},DU=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,l();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Q?c:new wi(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>k.asap(l),s}},BU=function*(e,t){let n=e.byteLength;if(n{const i=zU(e,t);let o=0,a,l=s=>{a||(a=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:u,value:c}=await i.next();if(u){l(),s.close();return}let f=c.byteLength;if(n){let d=o+=f;n(d)}s.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(s){return l(s),i.return()}},{highWaterMark:2})},vs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ux=vs&&typeof ReadableStream=="function",HU=vs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Hx=(e,...t)=>{try{return!!e(...t)}catch{return!1}},VU=Ux&&Hx(()=>{let e=!1;const t=new Request(Le.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ry=64*1024,Nc=Ux&&Hx(()=>k.isReadableStream(new Response("").body)),_l={stream:Nc&&(e=>e.body)};vs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!_l[t]&&(_l[t]=k.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Q(`Response type '${t}' is not supported`,Q.ERR_NOT_SUPPORT,r)})})})(new Response);const WU=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new Request(Le.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e=e+""),k.isString(e))return(await HU(e)).byteLength},GU=async(e,t)=>{const n=k.toFiniteNumber(e.getContentLength());return n??WU(t)},qU=vs&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:d}=zx(e);u=u?(u+"").toLowerCase():"text";let p=DU([i,o&&o.toAbortSignal()],a),m;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let h;try{if(s&&VU&&n!=="get"&&n!=="head"&&(h=await GU(c,r))!==0){let O=new Request(t,{method:"POST",body:r,duplex:"half"}),b;if(k.isFormData(r)&&(b=O.headers.get("content-type"))&&c.setContentType(b),O.body){const[$,R]=Zm(h,kl(ey(s)));r=ny(O.body,ry,$,R)}}k.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...d,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let v=await fetch(m);const S=Nc&&(u==="stream"||u==="response");if(Nc&&(l||S&&y)){const O={};["status","statusText","headers"].forEach(T=>{O[T]=v[T]});const b=k.toFiniteNumber(v.headers.get("content-length")),[$,R]=l&&Zm(b,kl(ey(l),!0))||[];v=new Response(ny(v.body,ry,$,()=>{R&&R(),y&&y()}),O)}u=u||"text";let C=await _l[k.findKey(_l,u)||"text"](v,e);return!S&&y&&y(),await new Promise((O,b)=>{Dx(O,b,{data:C,headers:Xe.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:m})})}catch(g){throw y&&y(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,m),{cause:g.cause||g}):Q.from(g,g&&g.code,e,m)}}),Lc={http:sU,xhr:MU,fetch:qU};k.forEach(Lc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const iy=e=>`- ${e}`,KU=e=>k.isFunction(e)||e===null||e===!1,Vx={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${l} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : `+o.map(iy).join(` `):" "+iy(o[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Lc};function gu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wi(null,e)}function oy(e){return gu(e),e.headers=Xe.from(e.headers),e.data=hu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vx.getAdapter(e.adapter||ra.adapter)(e).then(function(r){return gu(e),r.data=hu.call(e,e.transformResponse,r),r.headers=Xe.from(r.headers),r},function(r){return Mx(r)||(gu(e),r&&r.response&&(r.response.data=hu.call(e,e.transformResponse,r.response),r.response.headers=Xe.from(r.response.headers))),Promise.reject(r)})}const Wx="1.8.1",xs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ay={};xs.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Wx+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,l)=>{if(t===!1)throw new Q(i(a," has been removed"+(n?" in "+n:"")),Q.ERR_DEPRECATED);return n&&!ay[a]&&(ay[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,l):!0}};xs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function XU(e,t,n){if(typeof e!="object")throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const l=e[o],s=l===void 0||a(l,o,e);if(s!==!0)throw new Q("option "+o+" must be "+s,Q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Q("Unknown option "+o,Q.ERR_BAD_OPTION)}}const za={assertOptions:XU,validators:xs},Tt=za.validators;let Un=class{constructor(t){this.defaults=t,this.interceptors={request:new Jm,response:new Jm}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&za.assertOptions(r,{silentJSONParsing:Tt.transitional(Tt.boolean),forcedJSONParsing:Tt.transitional(Tt.boolean),clarifyTimeoutError:Tt.transitional(Tt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:za.assertOptions(i,{encode:Tt.function,serialize:Tt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),za.assertOptions(n,{baseUrl:Tt.spelling("baseURL"),withXsrfToken:Tt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&k.merge(o.common,o[n.method]);o&&k.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=Xe.concat(a,o);const l=[];let s=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(s=s&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let c,f=0,d;if(!s){const m=[oy.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(l=>{r.subscribe(l),o=l}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,l){r.reason||(r.reason=new wi(o,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Gx(function(i){t=i}),cancel:t}}};function JU(e){return function(n){return e.apply(null,n)}}function QU(e){return k.isObject(e)&&e.isAxiosError===!0}const Ic={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ic).forEach(([e,t])=>{Ic[t]=e});function qx(e){const t=new Un(e),n=Cx(Un.prototype.request,t);return k.extend(n,Un.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qx(qn(e,i))},n}const fe=qx(ra);fe.Axios=Un;fe.CanceledError=wi;fe.CancelToken=YU;fe.isCancel=Mx;fe.VERSION=Wx;fe.toFormData=ys;fe.AxiosError=Q;fe.Cancel=fe.CanceledError;fe.all=function(t){return Promise.all(t)};fe.spread=JU;fe.isAxiosError=QU;fe.mergeConfig=qn;fe.AxiosHeaders=Xe;fe.formToJSON=e=>jx(k.isHTMLForm(e)?new FormData(e):e);fe.getAdapter=Vx.getAdapter;fe.HttpStatusCode=Ic;fe.default=fe;const{Axios:FH,AxiosError:jH,CanceledError:MH,isCancel:DH,CancelToken:BH,VERSION:zH,all:UH,Cancel:HH,isAxiosError:VH,spread:WH,toFormData:GH,AxiosHeaders:qH,HttpStatusCode:KH,formToJSON:XH,getAdapter:YH,mergeConfig:JH}=fe,cr="https://docforge-api.onrender.com",Hi={async healthCheck(){try{return(await fe.get(`${cr}/api/health`)).data}catch(e){return console.error("Health check failed:",e),{success:!1,error:e.message}}},async getStats(){try{return(await fe.get(`${cr}/api/stats`)).data}catch(e){throw console.error("Failed to fetch API stats:",e),e}},async generatePDF(e,t="fr",n=!1,r=!1){try{const i=await fe.post(`${cr}/api/document`,{markdown_content:e,lang:t,async:n,debug:r},{responseType:n?"json":"blob",validateStatus:function(o){return!0}});if(i.status>=400)if(i.data instanceof Blob){const o=await i.data.text();try{const a=JSON.parse(o);throw new Error(a.message||"Erreur lors de la génération du PDF")}catch{throw new Error("Erreur lors de la génération du PDF")}}else throw new Error(i.data.message||"Erreur lors de la génération du PDF");if(n)return i.data;{const o=this.getFilenameFromResponse(i)||"document.pdf",a=window.URL.createObjectURL(new Blob([i.data])),l=document.createElement("a");return l.href=a,l.setAttribute("download",o),document.body.appendChild(l),l.click(),window.URL.revokeObjectURL(a),document.body.removeChild(l),{success:!0,filename:o}}}catch(i){throw console.error("PDF generation failed:",i),i}},async checkJobStatus(e){try{return(await fe.get(`${cr}/api/job/${e}`)).data}catch(t){throw console.error(`Failed to check job status for ${e}:`,t),t}},async downloadJobResult(e){try{const t=await fe.get(`${cr}/api/job/${e}/result`,{responseType:"blob"}),n=this.getFilenameFromResponse(t)||`document_${e}.pdf`,r=window.URL.createObjectURL(new Blob([t.data])),i=document.createElement("a");return i.href=r,i.setAttribute("download",n),document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i),{success:!0,filename:n}}catch(t){throw console.error(`Failed to download job result for ${e}:`,t),t}},async validateMarkdown(e){try{return(await fe.post(`${cr}/api/validate`,{markdown_content:e})).data}catch(t){if(console.error("Markdown validation failed:",t),t.response&&t.response.data)return t.response.data;throw t}},getFilenameFromResponse(e){const t=e.headers["content-disposition"];if(t){const n=t.match(/filename="(.+)"/);if(n&&n[1])return n[1]}return null}},ZU=e=>{if(!e)return null;const t=/^---\s*\n([\s\S]*?)\n---\s*\n/,n=e.match(t);if(!n||!n[1])return null;const r=n[1],i={};return r.split(` `).forEach(o=>{if(!o.trim())return;const a=o.match(/^([^:]+):\s*(.*)$/);if(a){const[,l,s]=a,u=l.trim();let c=s.trim();c.startsWith("[")&&c.endsWith("]")?(c=c.slice(1,-1).trim(),c?i[u]=c.split(",").map(f=>f.trim()):i[u]=[]):c.toLowerCase()==="true"?i[u]=!0:c.toLowerCase()==="false"?i[u]=!1:i[u]=c}}),i},e9=(e="",t={})=>{if(!t||Object.keys(t).length===0)return e;const n=/^---\s*\n([\s\S]*?)\n---\s*\n/,r=n.test(e);let i=e;r&&(i=e.replace(n,""));let o=`--- `;return Object.entries(t).forEach(([a,l])=>{l==null||l===""||(Array.isArray(l)?o+=`${a}: [${l.join(", ")}] `:typeof l=="boolean"?o+=`${a}: ${l} `:l instanceof Date?o+=`${a}: ${l.toISOString().split("T")[0]} `:o+=`${a}: ${l} `)}),o+=`--- `,o+i.trim()},t9=()=>{const{t:e}=Vo(),[t,n]=I.useState(""),[r,i]=I.useState({title:"",subtitle:"",author:"",company_name:"",version:"1.0",department:"",confidential:!1,creation_date:new Date().toLocaleDateString(),title_color:"#007bff",background_color:"#f8f9fa"}),[o,a]=I.useState(!1),[l,s]=I.useState(null),[u,c]=I.useState(null),[f,d]=I.useState(null),[p,m]=I.useState(!1),[y,h]=I.useState(null);I.useEffect(()=>{(async()=>{try{(await Hi.healthCheck()).success||s(e("api_unavailable"))}catch{s(e("api_unavailable"))}})()},[e]),I.useEffect(()=>{const b=async()=>{try{const R=await Hi.getStats();h(R)}catch(R){console.error("Error fetching API stats:",R)}};b();const $=setInterval(b,6e4);return()=>clearInterval($)},[]),I.useEffect(()=>{if(!u||f==="completed"||f==="failed")return;const $=setInterval(async()=>{var R;try{const T=await Hi.checkJobStatus(u);T.success?(d(T.status),T.status==="completed"?(a(!1),S(u)):T.status==="failed"&&(a(!1),s(T.error||e("pdf_generation_failed")))):(a(!1),s(((R=T.errors)==null?void 0:R[0])||e("job_status_error")))}catch{a(!1),s(e("job_status_error"))}},2e3);return()=>clearInterval($)},[u,f,e]),I.useEffect(()=>{(async()=>{if(t.trim())try{const $=ZU(t);$&&i(R=>({...R,...$}))}catch($){console.error("Error extracting metadata:",$)}})()},[t]);const g=b=>{i({...r,...b})},v=(b,$)=>{i({...r,[b]:$})},S=async b=>{var $;try{const R=await Hi.downloadJobResult(b);if(R.success){const T=window.URL.createObjectURL(R.blob),U=document.createElement("a");U.href=T,U.download=R.filename||`${r.title||"document"}.pdf`,document.body.appendChild(U),U.click(),window.URL.revokeObjectURL(T),document.body.removeChild(U)}else s((($=R.errors)==null?void 0:$[0])||e("download_error"))}catch{s(e("download_error"))}},C=async()=>{if(s(null),a(!0),c(null),d(null),!r.title||!r.author||!r.company_name){s(e("required_fields_missing")),a(!1);return}const b=e9(t,r);try{const R=await Hi.generatePDF(b,e("language_code"),p,!0);if(R.success)if(R.async)c(R.jobId),d("pending");else{a(!1);const T=window.URL.createObjectURL(R.blob),U=document.createElement("a");U.href=T,U.download=R.filename||"document.pdf",document.body.appendChild(U),U.click(),window.URL.revokeObjectURL(T),document.body.removeChild(U)}else s(R.message||e("generation_error")),a(!1)}catch($){console.error("PDF generation error:",$),s($.message||e("generation_error")),a(!1)}},O=()=>y?_.jsxs("div",{className:"mt-4 p-4 bg-gray-100 rounded-lg text-sm",children:[_.jsx("h3",{className:"font-semibold mb-2",children:e("api_stats")}),_.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[_.jsxs("div",{children:[_.jsxs("p",{children:[_.jsxs("span",{className:"font-medium",children:[e("cache_entries"),":"]})," ",y.cache.count]}),_.jsxs("p",{children:[_.jsxs("span",{className:"font-medium",children:[e("cache_size"),":"]})," ",Math.round(y.cache.size_bytes/1024)," KB"]})]}),_.jsxs("div",{children:[_.jsxs("p",{children:[_.jsxs("span",{className:"font-medium",children:[e("queue_pending"),":"]})," ",y.queue.pending]}),_.jsxs("p",{children:[_.jsxs("span",{className:"font-medium",children:[e("queue_processing"),":"]})," ",y.queue.processing]})]})]})]}):null;return _.jsxs("div",{className:"min-h-screen flex flex-col bg-gray-50",children:[_.jsx(S8,{}),_.jsx("main",{className:"flex-grow container mx-auto px-4 py-8",children:_.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[_.jsxs("div",{className:"lg:col-span-2",children:[_.jsx("h2",{className:"text-xl font-semibold mb-4",children:e("markdown_editor")}),_.jsx(sO,{value:t,onChange:n})]}),_.jsxs("div",{className:"space-y-6",children:[_.jsxs("div",{children:[_.jsx("h2",{className:"text-xl font-semibold mb-4",children:e("metadata_section")}),_.jsx(uO,{metadata:r,onChange:g})]}),_.jsxs("div",{children:[_.jsx("h2",{className:"text-xl font-semibold mb-4",children:e("customization")}),_.jsxs("div",{className:"space-y-4",children:[_.jsx(qm,{label:e("title_color"),color:r.title_color,onChange:b=>v("title_color",b)}),_.jsx(qm,{label:e("background_color"),color:r.background_color,onChange:b=>v("background_color",b)}),_.jsxs("div",{className:"flex items-center mt-4",children:[_.jsx("input",{type:"checkbox",id:"useAsync",checked:p,onChange:()=>m(!p),className:"h-4 w-4 text-blue-600"}),_.jsx("label",{htmlFor:"useAsync",className:"ml-2 text-sm text-gray-700",children:e("use_async_generation")})]})]})]}),_.jsxs("div",{children:[_.jsx("button",{onClick:C,disabled:o||!t.trim(),className:`w-full py-3 px-4 rounded-lg font-medium text-white ${o||!t.trim()?"bg-gray-400 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700"}`,children:o?_.jsxs(_.Fragment,{children:[_.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white inline",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[_.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),_.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e(f?`job_status_${f}`:"generating_pdf")]}):e("generate_pdf")}),l&&_.jsx("div",{className:"mt-4 p-3 bg-red-100 border border-red-200 text-red-700 rounded-lg",children:l}),O()]})]})]})}),_.jsx(E8,{})]})},K=e=>typeof e=="string",Vi=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},ly=e=>e==null?"":""+e,n9=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},r9=/###/g,sy=e=>e&&e.indexOf("###")>-1?e.replace(r9,"."):e,uy=e=>!e||K(e),mo=(e,t,n)=>{const r=K(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=mo(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),l=mo(e,a,Object);for(;l.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),l=mo(e,a,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},i9=(e,t,n,r)=>{const{obj:i,k:o}=mo(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Ol=(e,t)=>{const{obj:n,k:r}=mo(e,t);if(n)return n[r]},o9=(e,t,n)=>{const r=Ol(e,n);return r!==void 0?r:Ol(t,n)},Kx=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?K(e[r])||e[r]instanceof String||K(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Kx(e[r],t[r],n):e[r]=t[r]);return e},fr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var a9={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const l9=e=>K(e)?e.replace(/[&<>"'\/]/g,t=>a9[t]):e;class s9{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const u9=[" ",",","?","!",";"],c9=new s9(20),f9=(e,t,n)=>{t=t||"",n=n||"";const r=u9.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=c9.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},Fc=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o-1&&se&&e.replace("_","-"),d9={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Pl{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||d9,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[l,s]=a;for(let u=0;u{let[l,s]=a;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):K(r)&&o?l.push(...r.split(o)):l.push(r)));const s=Ol(this.data,l);return!s&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),s||!a||!K(r)?s:Fc(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(l=t.split("."),i=n,n=l[1]),this.addNamespaces(n),cy(this.data,l,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(K(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),i=r,r=n,n=l[1]),this.addNamespaces(n);let s=Ol(this.data,l)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Kx(s,r,o):s={...s,...r},cy(this.data,l,s),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Xx={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const dy={};class Tl extends bs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),n9(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ft.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!f9(t,r,i);if(a&&!l){const s=t.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:t,namespaces:K(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:K(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(t[t.length-1],n),s=l[l.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const C=n.nsSeparator||this.options.nsSeparator;return i?{res:`${s}${C}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:`${s}${C}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let d=f&&f.res;const p=f&&f.usedKey||a,m=f&&f.exactUsedKey||a,y=Object.prototype.toString.apply(d),h=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!K(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&S&&h.indexOf(y)<0&&!(K(g)&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...n,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=C,f.usedParams=this.getUsedParamsDetails(n),f):C}if(o){const C=Array.isArray(d),O=C?[]:{},b=C?m:p;for(const $ in d)if(Object.prototype.hasOwnProperty.call(d,$)){const R=`${b}${o}${$}`;O[$]=this.translate(R,{...n,joinArrays:!1,ns:l}),O[$]===R&&(O[$]=d[$])}d=O}}else if(v&&K(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,t,n,r));else{let C=!1,O=!1;const b=n.count!==void 0&&!K(n.count),$=Tl.hasDefaultValue(n),R=b?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&b?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",U=b&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),z=U&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${R}`]||n[`defaultValue${T}`]||n.defaultValue;!this.isValidLookup(d)&&$&&(C=!0,d=z),this.isValidLookup(d)||(O=!0,d=a);const X=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,re=$&&z!==d&&this.options.updateMissing;if(O||C||re){if(this.logger.log(re?"updateKey":"missingKey",u,s,a,re?z:d),o){const oe=this.resolve(a,{...n,keySeparator:!1});oe&&oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let V=[];const ae=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ae&&ae[0])for(let oe=0;oe{const N=$&&E!==d?E:X;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,s,Ce,N,re,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(oe,s,Ce,N,re,n),this.emit("missingKey",oe,s,Ce,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?V.forEach(oe=>{const Ce=this.pluralResolver.getSuffixes(oe,n);U&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Ce.indexOf(`${this.options.pluralSeparator}zero`)<0&&Ce.push(`${this.options.pluralSeparator}zero`),Ce.forEach(E=>{xe([oe],a+E,n[`defaultValue${E}`]||z)})}):xe(V,a,z))}d=this.extendTranslation(d,t,n,f,r),O&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${a}`),(O||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${a}`:a,C?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(n),f):d}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=K(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=t.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=r.replace&&!K(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),u){const d=t.match(this.interpolator.nestingRegexp),p=d&&d.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,l;return K(t)&&(t=[t]),t.forEach(s=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(s,n),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=n.count!==void 0&&!K(n.count),p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(K(n.context)||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(h=>{this.isValidLookup(r)||(l=h,!dy[`${y[0]}-${h}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(dy[`${y[0]}-${h}`]=!0,this.logger.warn(`key "${i}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(g=>{if(this.isValidLookup(r))return;a=g;const v=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,c,g,h,n);else{let C;d&&(C=this.pluralResolver.getSuffix(g,n.count,n));const O=`${this.options.pluralSeparator}zero`,b=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(c+C),n.ordinal&&C.indexOf(b)===0&&v.push(c+C.replace(b,this.options.pluralSeparator)),p&&v.push(c+O)),m){const $=`${c}${this.options.contextSeparator}${n.context}`;v.push($),d&&(v.push($+C),n.ordinal&&C.indexOf(b)===0&&v.push($+C.replace(b,this.options.pluralSeparator)),p&&v.push($+O))}}let S;for(;S=v.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(g,h,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!K(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const mu=e=>e.charAt(0).toUpperCase()+e.slice(1);class py{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ft.create("languageUtils")}getScriptPartFromCode(t){if(t=$l(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=$l(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(K(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mu(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=mu(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=mu(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),K(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return K(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):K(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}let p9=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],h9={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const g9=["v1","v2","v3"],m9=["v4"],hy={zero:0,one:1,two:2,few:3,many:4,other:5},y9=()=>{const e={};return p9.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:h9[t.fc]}})}),e};class v9{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Ft.create("pluralResolver"),(!this.options.compatibilityJSON||m9.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=y9(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=$l(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const s=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(s,n)}return this.pluralRulesCache[o]=a,a}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>hy[i]-hy[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!g9.includes(this.options.compatibilityJSON)}}const gy=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=o9(e,t,n);return!o&&i&&K(n)&&(o=Fc(e,n,r),o===void 0&&(o=Fc(t,n,r))),o},yu=e=>e.replace(/\$/g,"$$$$");class x9{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ft.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:l,suffixEscaped:s,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:v}=t.interpolation;this.escape=n!==void 0?n:l9,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?fr(o):a||"{{",this.suffix=l?fr(l):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?fr(d):p||fr("$t("),this.nestingSuffix=m?fr(m):y||fr(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,l;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const g=gy(n,s,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...i,...n,interpolationkey:p}):g}const m=p.split(this.formatSeparator),y=m.shift().trim(),h=m.join(this.formatSeparator).trim();return this.format(gy(n,s,y,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...i,...n,interpolationkey:y})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>yu(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?yu(this.escape(p)):yu(p)}].forEach(p=>{for(l=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=u(m),a===void 0)if(typeof c=="function"){const h=c(t,o,i);a=K(h)?h:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!K(a)&&!this.useRawValueToEscape&&(a=ly(a));const y=p.safeValue(a);if(t=t.replace(o[0],y),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const l=(s,u)=>{const c=this.nestingOptionsSeparator;if(s.indexOf(c)<0)return s;const f=s.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;s=f[0],d=this.interpolate(d,a);const p=d.match(/'/g),m=d.match(/"/g);(p&&p.length%2===0&&!m||m.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),u&&(a={...u,...a})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${s}`,y),`${s}${c}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,s};for(;i=this.nestingRegexp.exec(t);){let s=[];a={...r},a=a.replace&&!K(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),s=c,u=!0}if(o=n(l.call(this,i[1].trim(),a),a),o&&i[0]===t&&!K(o))return o;K(o)||(o=ly(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=s.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const b9=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[l,...s]=a.split(":"),u=s.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();n[c]||(n[c]=u),u==="false"&&(n[c]=!1),u==="true"&&(n[c]=!0),isNaN(u)||(n[c]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},dr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let l=t[a];return l||(l=e($l(r),i),t[a]=l),l(n)}};class w9{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ft.create("formatter"),this.options=t,this.formats={number:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:dr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:dr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:dr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=dr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(s=>s.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,s)=>{const{formatName:u,formatOptions:c}=b9(s);if(this.formats[u]){let f=l;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=d.locale||d.lng||i.locale||i.lng||r;f=this.formats[u](l,p,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const S9=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class E9 extends bs{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Ft.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},l={},s={};return t.forEach(u=>{let c=!0;n.forEach(f=>{const d=`${u}|${f}`;!r.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,c=!1,a[d]===void 0&&(a[d]=!0),o[d]===void 0&&(o[d]=!0),s[f]===void 0&&(s[f]=!0)))}),c||(l[u]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(s)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(s=>{i9(s.loaded,[o],a),S9(s,t),n&&s.errors.push(n),s.pendingCount===0&&!s.done&&(Object.keys(s.loaded).forEach(u=>{l[u]||(l[u]={});const c=s.loaded[u];c.length&&c.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(s=>!s.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(u,c)},s=this.backend[r].bind(this.backend);if(s.length===2){try{const u=s(t,n);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return s(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();K(t)&&(t=this.languageUtils.toResolveHierarchy(t)),K(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,l)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,l),this.loaded(t,a,l)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const s={...a,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(t,n,r,i,s):c=u(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>l(null,f)).catch(l):l(null,c)}catch(c){l(c)}else u(t,n,r,i,l,s)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const my=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),K(e[1])&&(t.defaultValue=e[1]),K(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),yy=e=>(K(e.ns)&&(e.ns=[e.ns]),K(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),K(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Ca=()=>{},C9=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Io extends bs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=yy(t),this.services={},this.logger=Ft,this.modules={external:[]},C9(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(K(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=my();this.options={...i,...this.options,...yy(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Ft.init(o(this.modules.logger),this.options):Ft.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=w9);const f=new py(this.options);this.store=new fy(this.options.resources,this.options);const d=this.services;d.logger=Ft,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new v9(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=o(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new x9(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new E9(o(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var m=arguments.length,y=new Array(m>1?m-1:0),h=1;h1?m-1:0),h=1;h{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ca),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const s=Vi(),u=()=>{const c=(f,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(d),r(f,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ca;const i=K(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>a(s)),this.options.preload&&this.options.preload.forEach(l=>a(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const i=Vi();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Ca),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Xx.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Vi();this.emit("languageChanging",t);const o=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(s,function(){return r.t(...arguments)})},l=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const u=K(s)?s:this.services.languageUtils.getBestMatchFromCodes(s);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{a(c,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),i}getFixedT(t,n,r){var i=this;const o=function(a,l){let s;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f`${s.keyPrefix}${d}${m}`):p=s.keyPrefix?`${s.keyPrefix}${d}${a}`:a,i.t(p,s)};return K(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(l,s)=>{const u=this.services.backendConnector.state[`${l}|${s}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,a);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=Vi();return this.options.ns?(K(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Vi();K(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new py(my());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Io(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ca;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new Io(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new fy(this.store.data,i),o.services.resourceStore=o.store),o.translator=new Tl(o.services,i),o.translator.on("*",function(l){for(var s=arguments.length,u=new Array(s>1?s-1:0),c=1;c