diff --git a/main/404.html b/main/404.html index e5645e9e..a9e097b4 100644 --- a/main/404.html +++ b/main/404.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/assets/index-CL73s3iE.js b/main/assets/index-DiZVpdmY.js similarity index 77% rename from main/assets/index-CL73s3iE.js rename to main/assets/index-DiZVpdmY.js index 302ebcee..e0a8bb4c 100644 --- a/main/assets/index-CL73s3iE.js +++ b/main/assets/index-DiZVpdmY.js @@ -6,7 +6,7 @@ var VV=Object.defineProperty;var GV=(e,t,r)=>t in e?VV(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Sg=Symbol.for("react.element"),KV=Symbol.for("react.portal"),JV=Symbol.for("react.fragment"),XV=Symbol.for("react.strict_mode"),YV=Symbol.for("react.profiler"),ZV=Symbol.for("react.provider"),QV=Symbol.for("react.context"),eG=Symbol.for("react.forward_ref"),tG=Symbol.for("react.suspense"),rG=Symbol.for("react.memo"),nG=Symbol.for("react.lazy"),O2=Symbol.iterator;function iG(e){return e===null||typeof e!="object"?null:(e=O2&&e[O2]||e["@@iterator"],typeof e=="function"?e:null)}var kR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_R=Object.assign,$R={};function af(e,t,r){this.props=e,this.context=t,this.refs=$R,this.updater=r||kR}af.prototype.isReactComponent={};af.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};af.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function FR(){}FR.prototype=af.prototype;function nA(e,t,r){this.props=e,this.context=t,this.refs=$R,this.updater=r||kR}var iA=nA.prototype=new FR;iA.constructor=nA;_R(iA,af.prototype);iA.isPureReactComponent=!0;var R2=Array.isArray,PR=Object.prototype.hasOwnProperty,sA={current:null},IR={key:!0,ref:!0,__self:!0,__source:!0};function NR(e,t,r){var n,i={},s=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)PR.call(t,n)&&!IR.hasOwnProperty(n)&&(i[n]=t[n]);var a=arguments.length-2;if(a===1)i.children=r;else if(1t in e?VV(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var cG=H,hG=Symbol.for("react.element"),dG=Symbol.for("react.fragment"),fG=Object.prototype.hasOwnProperty,pG=cG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mG={key:!0,ref:!0,__self:!0,__source:!0};function LR(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)fG.call(t,n)&&!mG.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:hG,type:e,key:s,ref:o,props:i,_owner:pG.current}}vb.Fragment=dG;vb.jsx=LR;vb.jsxs=LR;TR.exports=vb;var z=TR.exports,nE={},OR={exports:{}},Ls={},RR={exports:{}},BR={};/** + */var cG=H,hG=Symbol.for("react.element"),dG=Symbol.for("react.fragment"),fG=Object.prototype.hasOwnProperty,pG=cG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mG={key:!0,ref:!0,__self:!0,__source:!0};function LR(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)fG.call(t,n)&&!mG.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:hG,type:e,key:s,ref:o,props:i,_owner:pG.current}}vb.Fragment=dG;vb.jsx=LR;vb.jsxs=LR;TR.exports=vb;var B=TR.exports,nE={},OR={exports:{}},Ls={},RR={exports:{}},BR={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var VV=Object.defineProperty;var GV=(e,t,r)=>t in e?VV(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(R,G){var q=R.length;R.push(G);e:for(;0>>1,Y=R[ee];if(0>>1;eei(te,q))Zi(de,te)?(R[ee]=de,R[Z]=q,ee=Z):(R[ee]=te,R[Q]=q,ee=Q);else if(Zi(de,q))R[ee]=de,R[Z]=q,ee=Z;else break e}}return G}function i(R,G){var q=R.sortIndex-G.sortIndex;return q!==0?q:R.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,d=3,f=!1,p=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(R){for(var G=r(c);G!==null;){if(G.callback===null)n(c);else if(G.startTime<=R)n(c),G.sortIndex=G.expirationTime,t(l,G);else break;G=r(c)}}function D(R){if(g=!1,E(R),!p)if(r(l)!==null)p=!0,M(C);else{var G=r(c);G!==null&&B(D,G.startTime-R)}}function C(R,G){p=!1,g&&(g=!1,b(A),A=-1),f=!0;var q=d;try{for(E(G),h=r(l);h!==null&&(!(h.expirationTime>G)||R&&!N());){var ee=h.callback;if(typeof ee=="function"){h.callback=null,d=h.priorityLevel;var Y=ee(h.expirationTime<=G);G=e.unstable_now(),typeof Y=="function"?h.callback=Y:h===r(l)&&n(l),E(G)}else n(l);h=r(l)}if(h!==null)var X=!0;else{var Q=r(c);Q!==null&&B(D,Q.startTime-G),X=!1}return X}finally{h=null,d=q,f=!1}}var w=!1,T=null,A=-1,$=5,I=-1;function N(){return!(e.unstable_now()-I<$)}function L(){if(T!==null){var R=e.unstable_now();I=R;var G=!0;try{G=T(!0,R)}finally{G?F():(w=!1,T=null)}}else w=!1}var F;if(typeof v=="function")F=function(){v(L)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,_=P.port2;P.port1.onmessage=L,F=function(){_.postMessage(null)}}else F=function(){y(L,0)};function M(R){T=R,w||(w=!0,F())}function B(R,G){A=y(function(){R(e.unstable_now())},G)}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(R){R.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,M(C))},e.unstable_forceFrameRate=function(R){0>R||125ee?(R.sortIndex=q,t(c,R),r(l)===null&&R===r(c)&&(g?(b(A),A=-1):g=!0,B(D,q-ee))):(R.sortIndex=Y,t(l,R),p||f||(p=!0,M(C))),R},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(R){var G=d;return function(){var q=d;d=G;try{return R.apply(this,arguments)}finally{d=q}}}})(BR);RR.exports=BR;var gG=RR.exports;/** + */(function(e){function t(R,G){var q=R.length;R.push(G);e:for(;0>>1,Y=R[ee];if(0>>1;eei(te,q))Zi(de,te)?(R[ee]=de,R[Z]=q,ee=Z):(R[ee]=te,R[Q]=q,ee=Q);else if(Zi(de,q))R[ee]=de,R[Z]=q,ee=Z;else break e}}return G}function i(R,G){var q=R.sortIndex-G.sortIndex;return q!==0?q:R.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],c=[],u=1,h=null,d=3,f=!1,p=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(R){for(var G=r(c);G!==null;){if(G.callback===null)n(c);else if(G.startTime<=R)n(c),G.sortIndex=G.expirationTime,t(a,G);else break;G=r(c)}}function D(R){if(g=!1,E(R),!p)if(r(a)!==null)p=!0,M(C);else{var G=r(c);G!==null&&j(D,G.startTime-R)}}function C(R,G){p=!1,g&&(g=!1,b(A),A=-1),f=!0;var q=d;try{for(E(G),h=r(a);h!==null&&(!(h.expirationTime>G)||R&&!N());){var ee=h.callback;if(typeof ee=="function"){h.callback=null,d=h.priorityLevel;var Y=ee(h.expirationTime<=G);G=e.unstable_now(),typeof Y=="function"?h.callback=Y:h===r(a)&&n(a),E(G)}else n(a);h=r(a)}if(h!==null)var X=!0;else{var Q=r(c);Q!==null&&j(D,Q.startTime-G),X=!1}return X}finally{h=null,d=q,f=!1}}var w=!1,T=null,A=-1,$=5,I=-1;function N(){return!(e.unstable_now()-I<$)}function L(){if(T!==null){var R=e.unstable_now();I=R;var G=!0;try{G=T(!0,R)}finally{G?F():(w=!1,T=null)}}else w=!1}var F;if(typeof v=="function")F=function(){v(L)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,_=P.port2;P.port1.onmessage=L,F=function(){_.postMessage(null)}}else F=function(){y(L,0)};function M(R){T=R,w||(w=!0,F())}function j(R,G){A=y(function(){R(e.unstable_now())},G)}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(R){R.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,M(C))},e.unstable_forceFrameRate=function(R){0>R||125ee?(R.sortIndex=q,t(c,R),r(a)===null&&R===r(c)&&(g?(b(A),A=-1):g=!0,j(D,q-ee))):(R.sortIndex=Y,t(a,R),p||f||(p=!0,M(C))),R},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(R){var G=d;return function(){var q=d;d=G;try{return R.apply(this,arguments)}finally{d=q}}}})(BR);RR.exports=BR;var gG=RR.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var VV=Object.defineProperty;var GV=(e,t,r)=>t in e?VV(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var yG=H,Is=gG;function Je(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iE=Object.prototype.hasOwnProperty,vG=/^[: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]*$/,z2={},j2={};function bG(e){return iE.call(j2,e)?!0:iE.call(z2,e)?!1:vG.test(e)?j2[e]=!0:(z2[e]=!0,!1)}function xG(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wG(e,t,r,n){if(t===null||typeof t>"u"||xG(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Xi(e,t,r,n,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var pi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pi[e]=new Xi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pi[t]=new Xi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pi[e]=new Xi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pi[e]=new Xi(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){pi[e]=new Xi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pi[e]=new Xi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pi[e]=new Xi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pi[e]=new Xi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pi[e]=new Xi(e,5,!1,e.toLowerCase(),null,!1,!1)});var aA=/[\-:]([a-z])/g;function lA(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(aA,lA);pi[t]=new Xi(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(aA,lA);pi[t]=new Xi(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(aA,lA);pi[t]=new Xi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pi[e]=new Xi(e,1,!1,e.toLowerCase(),null,!1,!1)});pi.xlinkHref=new Xi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pi[e]=new Xi(e,1,!1,e.toLowerCase(),null,!0,!0)});function uA(e,t,r,n){var i=pi.hasOwnProperty(t)?pi[t]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iE=Object.prototype.hasOwnProperty,vG=/^[: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]*$/,j2={},z2={};function bG(e){return iE.call(z2,e)?!0:iE.call(j2,e)?!1:vG.test(e)?z2[e]=!0:(j2[e]=!0,!1)}function xG(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wG(e,t,r,n){if(t===null||typeof t>"u"||xG(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Xi(e,t,r,n,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var pi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pi[e]=new Xi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pi[t]=new Xi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pi[e]=new Xi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pi[e]=new Xi(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){pi[e]=new Xi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pi[e]=new Xi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pi[e]=new Xi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pi[e]=new Xi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pi[e]=new Xi(e,5,!1,e.toLowerCase(),null,!1,!1)});var aA=/[\-:]([a-z])/g;function lA(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(aA,lA);pi[t]=new Xi(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(aA,lA);pi[t]=new Xi(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(aA,lA);pi[t]=new Xi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pi[e]=new Xi(e,1,!1,e.toLowerCase(),null,!1,!1)});pi.xlinkHref=new Xi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pi[e]=new Xi(e,1,!1,e.toLowerCase(),null,!0,!0)});function uA(e,t,r,n){var i=pi.hasOwnProperty(t)?pi[t]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Xx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pp(e):""}function SG(e){switch(e.tag){case 5:return Pp(e.type);case 16:return Pp("Lazy");case 13:return Pp("Suspense");case 19:return Pp("SuspenseList");case 0:case 2:case 15:return e=Yx(e.type,!1),e;case 11:return e=Yx(e.type.render,!1),e;case 1:return e=Yx(e.type,!0),e;default:return""}}function lE(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 Qh:return"Fragment";case Zh:return"Portal";case sE:return"Profiler";case cA:return"StrictMode";case oE:return"Suspense";case aE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HR:return(e.displayName||"Context")+".Consumer";case jR:return(e._context.displayName||"Context")+".Provider";case hA:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dA:return t=e.displayName||null,t!==null?t:lE(e.type)||"Memo";case Nl:t=e._payload,e=e._init;try{return lE(e(t))}catch{}}return null}function DG(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lE(t);case 8:return t===cA?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function au(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EG(e){var t=WR(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cy(e){e._valueTracker||(e._valueTracker=EG(e))}function VR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=WR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vv(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 uE(e,t){var r=t.checked;return mn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function U2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=au(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GR(e,t){t=t.checked,t!=null&&uA(e,"checked",t,!1)}function cE(e,t){GR(e,t);var r=au(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hE(e,t.type,r):t.hasOwnProperty("defaultValue")&&hE(e,t.type,au(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function W2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function hE(e,t,r){(t!=="number"||Vv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ip=Array.isArray;function bd(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=hy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _m(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CG=["Webkit","ms","Moz","O"];Object.keys(Kp).forEach(function(e){CG.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kp[t]=Kp[e]})});function XR(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kp.hasOwnProperty(e)&&Kp[e]?(""+t).trim():t+"px"}function YR(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=XR(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var TG=mn({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 pE(e,t){if(t){if(TG[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Je(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Je(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Je(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Je(62))}}function mE(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}}var gE=null;function fA(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yE=null,xd=null,wd=null;function q2(e){if(e=Cg(e)){if(typeof yE!="function")throw Error(Je(280));var t=e.stateNode;t&&(t=Db(t),yE(e.stateNode,e.type,t))}}function ZR(e){xd?wd?wd.push(e):wd=[e]:xd=e}function QR(){if(xd){var e=xd,t=wd;if(wd=xd=null,q2(e),t)for(e=0;e>>=0,e===0?32:31-(OG(e)/RG|0)|0}var dy=64,fy=4194304;function Np(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=Np(a):(s&=o,s!==0&&(n=Np(s)))}else o=r&~i,o!==0?n=Np(o):s!==0&&(n=Np(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Dg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Po(t),e[t]=r}function HG(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Xp),rF=" ",nF=!1;function bB(e,t){switch(e){case"keyup":return gq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ed=!1;function vq(e,t){switch(e){case"compositionend":return xB(t);case"keypress":return t.which!==32?null:(nF=!0,rF);case"textInput":return e=t.data,e===rF&&nF?null:e;default:return null}}function bq(e,t){if(ed)return e==="compositionend"||!wA&&bB(e,t)?(e=yB(),yv=vA=Hl=null,ed=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=aF(r)}}function EB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function CB(){for(var e=window,t=Vv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vv(e.document)}return t}function SA(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")}function kq(e){var t=CB(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&EB(r.ownerDocument.documentElement,r)){if(n!==null&&SA(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=lF(r,s);var o=lF(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,td=null,DE=null,Zp=null,EE=!1;function uF(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;EE||td==null||td!==Vv(n)||(n=td,"selectionStart"in n&&SA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Zp&&Mm(Zp,n)||(Zp=n,n=Zv(DE,"onSelect"),0id||(e.current=$E[id],$E[id]=null,id--)}function qr(e,t){id++,$E[id]=e.current,e.current=t}var lu={},_i=wu(lu),us=wu(!1),Ec=lu;function Pd(e,t){var r=e.type.contextTypes;if(!r)return lu;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function cs(e){return e=e.childContextTypes,e!=null}function e0(){en(us),en(_i)}function gF(e,t,r){if(_i.current!==lu)throw Error(Je(168));qr(_i,t),qr(us,r)}function NB(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Je(108,DG(e)||"Unknown",i));return mn({},r,n)}function t0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lu,Ec=_i.current,qr(_i,e),qr(us,us.current),!0}function yF(e,t,r){var n=e.stateNode;if(!n)throw Error(Je(169));r?(e=NB(e,t,Ec),n.__reactInternalMemoizedMergedChildContext=e,en(us),en(_i),qr(_i,e)):en(us),qr(us,r)}var Ma=null,Eb=!1,hw=!1;function MB(e){Ma===null?Ma=[e]:Ma.push(e)}function zq(e){Eb=!0,MB(e)}function Su(){if(!hw&&Ma!==null){hw=!0;var e=0,t=Nr;try{var r=Ma;for(Nr=1;e>=o,i-=o,Ra=1<<32-Po(t)+i|r<A?($=T,T=null):$=T.sibling;var I=d(b,T,E[A],D);if(I===null){T===null&&(T=$);break}e&&T&&I.alternate===null&&t(b,T),v=s(I,v,A),w===null?C=I:w.sibling=I,w=I,T=$}if(A===E.length)return r(b,T),on&&Gu(b,A),C;if(T===null){for(;AA?($=T,T=null):$=T.sibling;var N=d(b,T,I.value,D);if(N===null){T===null&&(T=$);break}e&&T&&N.alternate===null&&t(b,T),v=s(N,v,A),w===null?C=N:w.sibling=N,w=N,T=$}if(I.done)return r(b,T),on&&Gu(b,A),C;if(T===null){for(;!I.done;A++,I=E.next())I=h(b,I.value,D),I!==null&&(v=s(I,v,A),w===null?C=I:w.sibling=I,w=I);return on&&Gu(b,A),C}for(T=n(b,T);!I.done;A++,I=E.next())I=f(T,b,A,I.value,D),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?A:I.key),v=s(I,v,A),w===null?C=I:w.sibling=I,w=I);return e&&T.forEach(function(L){return t(b,L)}),on&&Gu(b,A),C}function y(b,v,E,D){if(typeof E=="object"&&E!==null&&E.type===Qh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uy:e:{for(var C=E.key,w=v;w!==null;){if(w.key===C){if(C=E.type,C===Qh){if(w.tag===7){r(b,w.sibling),v=i(w,E.props.children),v.return=b,b=v;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Nl&&xF(C)===w.type){r(b,w.sibling),v=i(w,E.props),v.ref=up(b,w,E),v.return=b,b=v;break e}r(b,w);break}else t(b,w);w=w.sibling}E.type===Qh?(v=pc(E.props.children,b.mode,D,E.key),v.return=b,b=v):(D=Cv(E.type,E.key,E.props,null,b.mode,D),D.ref=up(b,v,E),D.return=b,b=D)}return o(b);case Zh:e:{for(w=E.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===E.containerInfo&&v.stateNode.implementation===E.implementation){r(b,v.sibling),v=i(v,E.children||[]),v.return=b,b=v;break e}else{r(b,v);break}else t(b,v);v=v.sibling}v=bw(E,b.mode,D),v.return=b,b=v}return o(b);case Nl:return w=E._init,y(b,v,w(E._payload),D)}if(Ip(E))return p(b,v,E,D);if(ip(E))return g(b,v,E,D);xy(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,v!==null&&v.tag===6?(r(b,v.sibling),v=i(v,E),v.return=b,b=v):(r(b,v),v=vw(E,b.mode,D),v.return=b,b=v),o(b)):r(b,v)}return y}var Nd=BB(!0),zB=BB(!1),i0=wu(null),s0=null,ad=null,TA=null;function AA(){TA=ad=s0=null}function kA(e){var t=i0.current;en(i0),e._currentValue=t}function IE(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Dd(e,t){s0=e,TA=ad=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(as=!0),e.firstContext=null)}function Qs(e){var t=e._currentValue;if(TA!==e)if(e={context:e,memoizedValue:t,next:null},ad===null){if(s0===null)throw Error(Je(308));ad=e,s0.dependencies={lanes:0,firstContext:e}}else ad=ad.next=e;return t}var ic=null;function _A(e){ic===null?ic=[e]:ic.push(e)}function jB(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,_A(t)):(r.next=i.next,i.next=r),t.interleaved=r,qa(e,n)}function qa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ml=!1;function $A(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function za(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,fr&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,qa(e,r)}return i=n.interleaved,i===null?(t.next=t,_A(n)):(t.next=i.next,i.next=t),n.interleaved=t,qa(e,r)}function bv(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mA(e,r)}}function wF(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function o0(e,t,r,n){var i=e.updateQueue;Ml=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var h=i.baseState;o=0,u=c=l=null,a=s;do{var d=a.lane,f=a.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,g=a;switch(d=t,f=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,d=typeof p=="function"?p.call(f,h,d):p,d==null)break e;h=mn({},h,d);break e;case 2:Ml=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=f,l=h):u=u.next=f,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=h),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ac|=o,e.lanes=o,e.memoizedState=h}}function SF(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=fw.transition;fw.transition={};try{e(!1),t()}finally{Nr=r,fw.transition=n}}function s5(){return eo().memoizedState}function Wq(e,t,r){var n=tu(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},o5(e))a5(t,r);else if(r=jB(e,t,r,n),r!==null){var i=Ui();Io(r,e,n,i),l5(r,t,n)}}function Vq(e,t,r){var n=tu(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(o5(e))a5(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,Lo(a,o)){var l=t.interleaved;l===null?(i.next=i,_A(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}r=jB(e,t,i,n),r!==null&&(i=Ui(),Io(r,e,n,i),l5(r,t,n))}}function o5(e){var t=e.alternate;return e===pn||t!==null&&t===pn}function a5(e,t){Qp=l0=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function l5(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mA(e,r)}}var u0={readContext:Qs,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},Gq={readContext:Qs,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qs,useEffect:EF,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,wv(4194308,4,e5.bind(null,t,e),r)},useLayoutEffect:function(e,t){return wv(4194308,4,e,t)},useInsertionEffect:function(e,t){return wv(4,2,e,t)},useMemo:function(e,t){var r=Ko();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ko();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Wq.bind(null,pn,e),[n.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:DF,useDebugValue:RA,useDeferredValue:function(e){return Ko().memoizedState=e},useTransition:function(){var e=DF(!1),t=e[0];return e=Uq.bind(null,e[1]),Ko().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pn,i=Ko();if(on){if(r===void 0)throw Error(Je(407));r=r()}else{if(r=t(),Kn===null)throw Error(Je(349));Tc&30||GB(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,EF(KB.bind(null,n,s,e),[e]),n.flags|=2048,Um(9,qB.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Ko(),t=Kn.identifierPrefix;if(on){var r=Ba,n=Ra;r=(n&~(1<<32-Po(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=jm++,0l||i[o]!==s[l]){var a=` +`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{Xx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pp(e):""}function SG(e){switch(e.tag){case 5:return Pp(e.type);case 16:return Pp("Lazy");case 13:return Pp("Suspense");case 19:return Pp("SuspenseList");case 0:case 2:case 15:return e=Yx(e.type,!1),e;case 11:return e=Yx(e.type.render,!1),e;case 1:return e=Yx(e.type,!0),e;default:return""}}function lE(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 Qh:return"Fragment";case Zh:return"Portal";case sE:return"Profiler";case cA:return"StrictMode";case oE:return"Suspense";case aE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HR:return(e.displayName||"Context")+".Consumer";case zR:return(e._context.displayName||"Context")+".Provider";case hA:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dA:return t=e.displayName||null,t!==null?t:lE(e.type)||"Memo";case Nl:t=e._payload,e=e._init;try{return lE(e(t))}catch{}}return null}function DG(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lE(t);case 8:return t===cA?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function au(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function WR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EG(e){var t=WR(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cy(e){e._valueTracker||(e._valueTracker=EG(e))}function VR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=WR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Vv(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 uE(e,t){var r=t.checked;return mn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function U2(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=au(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GR(e,t){t=t.checked,t!=null&&uA(e,"checked",t,!1)}function cE(e,t){GR(e,t);var r=au(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hE(e,t.type,r):t.hasOwnProperty("defaultValue")&&hE(e,t.type,au(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function W2(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function hE(e,t,r){(t!=="number"||Vv(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ip=Array.isArray;function bd(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=hy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _m(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CG=["Webkit","ms","Moz","O"];Object.keys(Kp).forEach(function(e){CG.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kp[t]=Kp[e]})});function XR(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kp.hasOwnProperty(e)&&Kp[e]?(""+t).trim():t+"px"}function YR(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=XR(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var TG=mn({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 pE(e,t){if(t){if(TG[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Je(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Je(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Je(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Je(62))}}function mE(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}}var gE=null;function fA(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yE=null,xd=null,wd=null;function q2(e){if(e=Cg(e)){if(typeof yE!="function")throw Error(Je(280));var t=e.stateNode;t&&(t=Db(t),yE(e.stateNode,e.type,t))}}function ZR(e){xd?wd?wd.push(e):wd=[e]:xd=e}function QR(){if(xd){var e=xd,t=wd;if(wd=xd=null,q2(e),t)for(e=0;e>>=0,e===0?32:31-(OG(e)/RG|0)|0}var dy=64,fy=4194304;function Np(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Jv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=Np(l):(s&=o,s!==0&&(n=Np(s)))}else o=r&~i,o!==0?n=Np(o):s!==0&&(n=Np(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Dg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Po(t),e[t]=r}function HG(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Xp),rF=" ",nF=!1;function bB(e,t){switch(e){case"keyup":return gq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ed=!1;function vq(e,t){switch(e){case"compositionend":return xB(t);case"keypress":return t.which!==32?null:(nF=!0,rF);case"textInput":return e=t.data,e===rF&&nF?null:e;default:return null}}function bq(e,t){if(ed)return e==="compositionend"||!wA&&bB(e,t)?(e=yB(),yv=vA=Hl=null,ed=!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:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=aF(r)}}function EB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?EB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function CB(){for(var e=window,t=Vv();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Vv(e.document)}return t}function SA(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")}function kq(e){var t=CB(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&EB(r.ownerDocument.documentElement,r)){if(n!==null&&SA(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!e.extend&&s>n&&(i=n,n=s,s=i),i=lF(r,s);var o=lF(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,td=null,DE=null,Zp=null,EE=!1;function uF(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;EE||td==null||td!==Vv(n)||(n=td,"selectionStart"in n&&SA(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Zp&&Mm(Zp,n)||(Zp=n,n=Zv(DE,"onSelect"),0id||(e.current=$E[id],$E[id]=null,id--)}function qr(e,t){id++,$E[id]=e.current,e.current=t}var lu={},_i=wu(lu),us=wu(!1),Ec=lu;function Pd(e,t){var r=e.type.contextTypes;if(!r)return lu;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function cs(e){return e=e.childContextTypes,e!=null}function e0(){en(us),en(_i)}function gF(e,t,r){if(_i.current!==lu)throw Error(Je(168));qr(_i,t),qr(us,r)}function NB(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Je(108,DG(e)||"Unknown",i));return mn({},r,n)}function t0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lu,Ec=_i.current,qr(_i,e),qr(us,us.current),!0}function yF(e,t,r){var n=e.stateNode;if(!n)throw Error(Je(169));r?(e=NB(e,t,Ec),n.__reactInternalMemoizedMergedChildContext=e,en(us),en(_i),qr(_i,e)):en(us),qr(us,r)}var La=null,Eb=!1,hw=!1;function MB(e){La===null?La=[e]:La.push(e)}function jq(e){Eb=!0,MB(e)}function Su(){if(!hw&&La!==null){hw=!0;var e=0,t=Nr;try{var r=La;for(Nr=1;e>=o,i-=o,Ba=1<<32-Po(t)+i|r<A?($=T,T=null):$=T.sibling;var I=d(b,T,E[A],D);if(I===null){T===null&&(T=$);break}e&&T&&I.alternate===null&&t(b,T),v=s(I,v,A),w===null?C=I:w.sibling=I,w=I,T=$}if(A===E.length)return r(b,T),on&&Gu(b,A),C;if(T===null){for(;AA?($=T,T=null):$=T.sibling;var N=d(b,T,I.value,D);if(N===null){T===null&&(T=$);break}e&&T&&N.alternate===null&&t(b,T),v=s(N,v,A),w===null?C=N:w.sibling=N,w=N,T=$}if(I.done)return r(b,T),on&&Gu(b,A),C;if(T===null){for(;!I.done;A++,I=E.next())I=h(b,I.value,D),I!==null&&(v=s(I,v,A),w===null?C=I:w.sibling=I,w=I);return on&&Gu(b,A),C}for(T=n(b,T);!I.done;A++,I=E.next())I=f(T,b,A,I.value,D),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?A:I.key),v=s(I,v,A),w===null?C=I:w.sibling=I,w=I);return e&&T.forEach(function(L){return t(b,L)}),on&&Gu(b,A),C}function y(b,v,E,D){if(typeof E=="object"&&E!==null&&E.type===Qh&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case uy:e:{for(var C=E.key,w=v;w!==null;){if(w.key===C){if(C=E.type,C===Qh){if(w.tag===7){r(b,w.sibling),v=i(w,E.props.children),v.return=b,b=v;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Nl&&xF(C)===w.type){r(b,w.sibling),v=i(w,E.props),v.ref=up(b,w,E),v.return=b,b=v;break e}r(b,w);break}else t(b,w);w=w.sibling}E.type===Qh?(v=pc(E.props.children,b.mode,D,E.key),v.return=b,b=v):(D=Cv(E.type,E.key,E.props,null,b.mode,D),D.ref=up(b,v,E),D.return=b,b=D)}return o(b);case Zh:e:{for(w=E.key;v!==null;){if(v.key===w)if(v.tag===4&&v.stateNode.containerInfo===E.containerInfo&&v.stateNode.implementation===E.implementation){r(b,v.sibling),v=i(v,E.children||[]),v.return=b,b=v;break e}else{r(b,v);break}else t(b,v);v=v.sibling}v=bw(E,b.mode,D),v.return=b,b=v}return o(b);case Nl:return w=E._init,y(b,v,w(E._payload),D)}if(Ip(E))return p(b,v,E,D);if(ip(E))return g(b,v,E,D);xy(b,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,v!==null&&v.tag===6?(r(b,v.sibling),v=i(v,E),v.return=b,b=v):(r(b,v),v=vw(E,b.mode,D),v.return=b,b=v),o(b)):r(b,v)}return y}var Nd=BB(!0),jB=BB(!1),i0=wu(null),s0=null,ad=null,TA=null;function AA(){TA=ad=s0=null}function kA(e){var t=i0.current;en(i0),e._currentValue=t}function IE(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Dd(e,t){s0=e,TA=ad=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(as=!0),e.firstContext=null)}function Qs(e){var t=e._currentValue;if(TA!==e)if(e={context:e,memoizedValue:t,next:null},ad===null){if(s0===null)throw Error(Je(308));ad=e,s0.dependencies={lanes:0,firstContext:e}}else ad=ad.next=e;return t}var ic=null;function _A(e){ic===null?ic=[e]:ic.push(e)}function zB(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,_A(t)):(r.next=i.next,i.next=r),t.interleaved=r,Ka(e,n)}function Ka(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ml=!1;function $A(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function HB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function za(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ql(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,fr&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,Ka(e,r)}return i=n.interleaved,i===null?(t.next=t,_A(n)):(t.next=i.next,i.next=t),n.interleaved=t,Ka(e,r)}function bv(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mA(e,r)}}function wF(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?i=s=t:s=s.next=t}else i=s=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function o0(e,t,r,n){var i=e.updateQueue;Ml=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,c=a.next;a.next=null,o===null?s=c:o.next=c,o=a;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==o&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=a))}if(s!==null){var h=i.baseState;o=0,u=c=a=null,l=s;do{var d=l.lane,f=l.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var p=e,g=l;switch(d=t,f=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,d=typeof p=="function"?p.call(f,h,d):p,d==null)break e;h=mn({},h,d);break e;case 2:Ml=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[l]:d.push(l))}else f={eventTime:f,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=f,a=h):u=u.next=f,o|=d;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;d=l,l=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(a=h),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ac|=o,e.lanes=o,e.memoizedState=h}}function SF(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=fw.transition;fw.transition={};try{e(!1),t()}finally{Nr=r,fw.transition=n}}function s5(){return eo().memoizedState}function Wq(e,t,r){var n=tu(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},o5(e))a5(t,r);else if(r=zB(e,t,r,n),r!==null){var i=Ui();Io(r,e,n,i),l5(r,t,n)}}function Vq(e,t,r){var n=tu(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(o5(e))a5(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,r);if(i.hasEagerState=!0,i.eagerState=l,Lo(l,o)){var a=t.interleaved;a===null?(i.next=i,_A(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}r=zB(e,t,i,n),r!==null&&(i=Ui(),Io(r,e,n,i),l5(r,t,n))}}function o5(e){var t=e.alternate;return e===pn||t!==null&&t===pn}function a5(e,t){Qp=l0=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function l5(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,mA(e,r)}}var u0={readContext:Qs,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},Gq={readContext:Qs,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qs,useEffect:EF,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,wv(4194308,4,e5.bind(null,t,e),r)},useLayoutEffect:function(e,t){return wv(4194308,4,e,t)},useInsertionEffect:function(e,t){return wv(4,2,e,t)},useMemo:function(e,t){var r=Ko();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ko();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Wq.bind(null,pn,e),[n.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:DF,useDebugValue:RA,useDeferredValue:function(e){return Ko().memoizedState=e},useTransition:function(){var e=DF(!1),t=e[0];return e=Uq.bind(null,e[1]),Ko().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=pn,i=Ko();if(on){if(r===void 0)throw Error(Je(407));r=r()}else{if(r=t(),Kn===null)throw Error(Je(349));Tc&30||GB(n,t,r)}i.memoizedState=r;var s={value:r,getSnapshot:t};return i.queue=s,EF(KB.bind(null,n,s,e),[e]),n.flags|=2048,Um(9,qB.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Ko(),t=Kn.identifierPrefix;if(on){var r=ja,n=Ba;r=(n&~(1<<32-Po(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=zm++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Xo]=t,e[Rm]=n,v5(e,t,!1,!1),t.stateNode=e;e:{switch(o=mE(r,n),r){case"dialog":Jr("cancel",e),Jr("close",e),i=n;break;case"iframe":case"object":case"embed":Jr("load",e),i=n;break;case"video":case"audio":for(i=0;iOd&&(t.flags|=128,n=!0,cp(s,!1),t.lanes=4194304)}else{if(!n)if(e=a0(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),cp(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!on)return Si(t),null}else 2*En()-s.renderingStartTime>Od&&r!==1073741824&&(t.flags|=128,n=!0,cp(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(r=s.last,r!==null?r.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=En(),t.sibling=null,r=dn.current,qr(dn,n?r&1|2:r&1),t):(Si(t),null);case 22:case 23:return WA(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Es&1073741824&&(Si(t),t.subtreeFlags&6&&(t.flags|=8192)):Si(t),null;case 24:return null;case 25:return null}throw Error(Je(156,t.tag))}function eK(e,t){switch(EA(t),t.tag){case 1:return cs(t.type)&&e0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Md(),en(us),en(_i),IA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return PA(t),null;case 13:if(en(dn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Je(340));Id()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return en(dn),null;case 4:return Md(),null;case 10:return kA(t.type._context),null;case 22:case 23:return WA(),null;case 24:return null;default:return null}}var Sy=!1,Ci=!1,tK=typeof WeakSet=="function"?WeakSet:Set,pt=null;function ld(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){vn(e,t,n)}else r.current=null}function HE(e,t,r){try{r()}catch(n){vn(e,t,n)}}var MF=!1;function rK(e,t){if(CE=Xv,e=CB(),SA(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,u=0,h=e,d=null;t:for(;;){for(var f;h!==r||i!==0&&h.nodeType!==3||(a=o+i),h!==s||n!==0&&h.nodeType!==3||(l=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)d=h,h=f;for(;;){if(h===e)break t;if(d===r&&++c===i&&(a=o),d===s&&++u===n&&(l=o),(f=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=f}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(TE={focusedElem:e,selectionRange:r},Xv=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){t=pt;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:wo(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(D){vn(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}return p=MF,MF=!1,p}function em(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&HE(t,r,s)}i=i.next}while(i!==n)}}function Ab(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function UE(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function w5(e){var t=e.alternate;t!==null&&(e.alternate=null,w5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xo],delete t[Rm],delete t[_E],delete t[Rq],delete t[Bq])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function S5(e){return e.tag===5||e.tag===3||e.tag===4}function LF(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S5(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function WE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Qv));else if(n!==4&&(e=e.child,e!==null))for(WE(e,t,r),e=e.sibling;e!==null;)WE(e,t,r),e=e.sibling}function VE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(VE(e,t,r),e=e.sibling;e!==null;)VE(e,t,r),e=e.sibling}var ai=null,So=!1;function Cl(e,t,r){for(r=r.child;r!==null;)D5(e,t,r),r=r.sibling}function D5(e,t,r){if(ra&&typeof ra.onCommitFiberUnmount=="function")try{ra.onCommitFiberUnmount(bb,r)}catch{}switch(r.tag){case 5:Ci||ld(r,t);case 6:var n=ai,i=So;ai=null,Cl(e,t,r),ai=n,So=i,ai!==null&&(So?(e=ai,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ai.removeChild(r.stateNode));break;case 18:ai!==null&&(So?(e=ai,r=r.stateNode,e.nodeType===8?cw(e.parentNode,r):e.nodeType===1&&cw(e,r),Im(e)):cw(ai,r.stateNode));break;case 4:n=ai,i=So,ai=r.stateNode.containerInfo,So=!0,Cl(e,t,r),ai=n,So=i;break;case 0:case 11:case 14:case 15:if(!Ci&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&HE(r,t,o),i=i.next}while(i!==n)}Cl(e,t,r);break;case 1:if(!Ci&&(ld(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){vn(r,t,a)}Cl(e,t,r);break;case 21:Cl(e,t,r);break;case 22:r.mode&1?(Ci=(n=Ci)||r.memoizedState!==null,Cl(e,t,r),Ci=n):Cl(e,t,r);break;default:Cl(e,t,r)}}function OF(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new tK),t.forEach(function(n){var i=hK.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function go(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=En()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*iK(n/1960))-n,10e?16:e,Ul===null)var n=!1;else{if(e=Ul,Ul=null,d0=0,fr&6)throw Error(Je(331));var i=fr;for(fr|=4,pt=e.current;pt!==null;){var s=pt,o=s.child;if(pt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lEn()-HA?fc(e,0):jA|=r),hs(e,t)}function F5(e,t){t===0&&(e.mode&1?(t=fy,fy<<=1,!(fy&130023424)&&(fy=4194304)):t=1);var r=Ui();e=qa(e,t),e!==null&&(Dg(e,t,r),hs(e,r))}function cK(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),F5(e,r)}function hK(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Je(314))}n!==null&&n.delete(t),F5(e,r)}var P5;P5=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||us.current)as=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return as=!1,Zq(e,t,r);as=!!(e.flags&131072)}else as=!1,on&&t.flags&1048576&&LB(t,n0,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Sv(e,t),e=t.pendingProps;var i=Pd(t,_i.current);Dd(t,r),i=MA(null,t,n,e,i,r);var s=LA();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,cs(n)?(s=!0,t0(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$A(t),i.updater=Tb,t.stateNode=i,i._reactInternals=t,ME(t,n,e,r),t=RE(null,t,n,!0,s,r)):(t.tag=0,on&&s&&DA(t),Ri(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Sv(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=fK(n),e=wo(n,e),i){case 0:t=OE(null,t,n,e,r);break e;case 1:t=PF(null,t,n,e,r);break e;case 11:t=$F(null,t,n,e,r);break e;case 14:t=FF(null,t,n,wo(n.type,e),r);break e}throw Error(Je(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),OE(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),PF(e,t,n,i,r);case 3:e:{if(m5(t),e===null)throw Error(Je(387));n=t.pendingProps,s=t.memoizedState,i=s.element,HB(e,t),o0(t,n,null,r);var o=t.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Ld(Error(Je(423)),t),t=IF(e,t,n,r,i);break e}else if(n!==i){i=Ld(Error(Je(424)),t),t=IF(e,t,n,r,i);break e}else for(Ts=Zl(t.stateNode.containerInfo.firstChild),ks=t,on=!0,Co=null,r=zB(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Id(),n===i){t=Ka(e,t,r);break e}Ri(e,t,n,r)}t=t.child}return t;case 5:return UB(t),e===null&&PE(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,AE(n,i)?o=null:s!==null&&AE(n,s)&&(t.flags|=32),p5(e,t),Ri(e,t,o,r),t.child;case 6:return e===null&&PE(t),null;case 13:return g5(e,t,r);case 4:return FA(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nd(t,null,n,r):Ri(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),$F(e,t,n,i,r);case 7:return Ri(e,t,t.pendingProps,r),t.child;case 8:return Ri(e,t,t.pendingProps.children,r),t.child;case 12:return Ri(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,qr(i0,n._currentValue),n._currentValue=o,s!==null)if(Lo(s.value,o)){if(s.children===i.children&&!us.current){t=Ka(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=za(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),IE(s.return,r,t),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Je(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),IE(o,r,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ri(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Dd(t,r),i=Qs(i),n=n(i),t.flags|=1,Ri(e,t,n,r),t.child;case 14:return n=t.type,i=wo(n,t.pendingProps),i=wo(n.type,i),FF(e,t,n,i,r);case 15:return d5(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),Sv(e,t),t.tag=1,cs(n)?(e=!0,t0(t)):e=!1,Dd(t,r),u5(t,n,i),ME(t,n,i,r),RE(null,t,n,!0,e,r);case 19:return y5(e,t,r);case 22:return f5(e,t,r)}throw Error(Je(156,t.tag))};function I5(e,t){return oB(e,t)}function dK(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xs(e,t,r,n){return new dK(e,t,r,n)}function GA(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fK(e){if(typeof e=="function")return GA(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hA)return 11;if(e===dA)return 14}return 2}function ru(e,t){var r=e.alternate;return r===null?(r=Xs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cv(e,t,r,n,i,s){var o=2;if(n=e,typeof e=="function")GA(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Qh:return pc(r.children,i,s,t);case cA:o=8,i|=8;break;case sE:return e=Xs(12,r,t,i|2),e.elementType=sE,e.lanes=s,e;case oE:return e=Xs(13,r,t,i),e.elementType=oE,e.lanes=s,e;case aE:return e=Xs(19,r,t,i),e.elementType=aE,e.lanes=s,e;case UR:return _b(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jR:o=10;break e;case HR:o=9;break e;case hA:o=11;break e;case dA:o=14;break e;case Nl:o=16,n=null;break e}throw Error(Je(130,e==null?e:typeof e,""))}return t=Xs(o,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function pc(e,t,r,n){return e=Xs(7,e,n,t),e.lanes=r,e}function _b(e,t,r,n){return e=Xs(22,e,n,t),e.elementType=UR,e.lanes=r,e.stateNode={isHidden:!1},e}function vw(e,t,r){return e=Xs(6,e,null,t),e.lanes=r,e}function bw(e,t,r){return t=Xs(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pK(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qx(0),this.expirationTimes=Qx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qA(e,t,r,n,i,s,o,a,l){return e=new pK(e,t,r,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Xs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$A(s),e}function mK(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O5)}catch(e){console.error(e)}}O5(),OR.exports=Ls;var Nb=OR.exports;const YA=uo(Nb),xK=rA({__proto__:null,default:YA},[Nb]);var VF=Nb;nE.createRoot=VF.createRoot,nE.hydrateRoot=VF.hydrateRoot;/** +`+s.stack}return{value:e,source:t,stack:i,digest:null}}function gw(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function LE(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Jq=typeof WeakMap=="function"?WeakMap:Map;function c5(e,t,r){r=za(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){h0||(h0=!0,GE=n),LE(e,t)},r}function h5(e,t,r){r=za(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){LE(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){LE(e,t),typeof n!="function"&&(eu===null?eu=new Set([this]):eu.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function AF(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Jq;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=uK.bind(null,e,t,r),t.then(e,e))}function kF(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function _F(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=za(-1,1),t.tag=2,Ql(r,t,1))),r.lanes|=1),e)}var Xq=rl.ReactCurrentOwner,as=!1;function Ri(e,t,r,n){t.child=e===null?jB(t,null,r,n):Nd(t,e.child,r,n)}function $F(e,t,r,n,i){r=r.render;var s=t.ref;return Dd(t,i),n=MA(e,t,r,n,s,i),r=LA(),e!==null&&!as?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ja(e,t,i)):(on&&r&&DA(t),t.flags|=1,Ri(e,t,n,i),t.child)}function FF(e,t,r,n,i){if(e===null){var s=r.type;return typeof s=="function"&&!GA(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,d5(e,t,s,n,i)):(e=Cv(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:Mm,r(o,n)&&e.ref===t.ref)return Ja(e,t,i)}return t.flags|=1,e=ru(s,n),e.ref=t.ref,e.return=t,t.child=e}function d5(e,t,r,n,i){if(e!==null){var s=e.memoizedProps;if(Mm(s,n)&&e.ref===t.ref)if(as=!1,t.pendingProps=n=s,(e.lanes&i)!==0)e.flags&131072&&(as=!0);else return t.lanes=e.lanes,Ja(e,t,i)}return OE(e,t,r,n,i)}function f5(e,t,r){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},qr(ud,Es),Es|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,qr(ud,Es),Es|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,qr(ud,Es),Es|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,qr(ud,Es),Es|=n;return Ri(e,t,i,r),t.child}function p5(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function OE(e,t,r,n,i){var s=cs(r)?Ec:_i.current;return s=Pd(t,s),Dd(t,i),r=MA(e,t,r,n,s,i),n=LA(),e!==null&&!as?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ja(e,t,i)):(on&&n&&DA(t),t.flags|=1,Ri(e,t,r,i),t.child)}function PF(e,t,r,n,i){if(cs(r)){var s=!0;t0(t)}else s=!1;if(Dd(t,i),t.stateNode===null)Sv(e,t),u5(t,r,n),ME(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=Qs(c):(c=cs(r)?Ec:_i.current,c=Pd(t,c));var u=r.getDerivedStateFromProps,h=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||a!==c)&&TF(t,o,n,c),Ml=!1;var d=t.memoizedState;o.state=d,o0(t,n,o,i),a=t.memoizedState,l!==n||d!==a||us.current||Ml?(typeof u=="function"&&(NE(t,r,u,n),a=t.memoizedState),(l=Ml||CF(t,r,l,n,d,a,c))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=a),o.props=n,o.state=a,o.context=c,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,HB(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:wo(t.type,l),o.props=c,h=t.pendingProps,d=o.context,a=r.contextType,typeof a=="object"&&a!==null?a=Qs(a):(a=cs(r)?Ec:_i.current,a=Pd(t,a));var f=r.getDerivedStateFromProps;(u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||d!==a)&&TF(t,o,n,a),Ml=!1,d=t.memoizedState,o.state=d,o0(t,n,o,i);var p=t.memoizedState;l!==h||d!==p||us.current||Ml?(typeof f=="function"&&(NE(t,r,f,n),p=t.memoizedState),(c=Ml||CF(t,r,c,n,d,p,a)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),o.props=n,o.state=p,o.context=a,n=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return RE(e,t,r,n,s,i)}function RE(e,t,r,n,i,s){p5(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&yF(t,r,!1),Ja(e,t,s);n=t.stateNode,Xq.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Nd(t,e.child,null,s),t.child=Nd(t,null,l,s)):Ri(e,t,l,s),t.memoizedState=n.state,i&&yF(t,r,!0),t.child}function m5(e){var t=e.stateNode;t.pendingContext?gF(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gF(e,t.context,!1),FA(e,t.containerInfo)}function IF(e,t,r,n,i){return Id(),CA(i),t.flags|=256,Ri(e,t,r,n),t.child}var BE={dehydrated:null,treeContext:null,retryLane:0};function jE(e){return{baseLanes:e,cachePool:null,transitions:null}}function g5(e,t,r){var n=t.pendingProps,i=dn.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),qr(dn,i&1),e===null)return PE(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,s?(n=t.mode,s=t.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=_b(o,n,0,null),e=pc(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=jE(r),t.memoizedState=BE,e):BA(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return Yq(e,t,o,n,l,i,r);if(s){s=n.fallback,o=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=a,t.deletions=null):(n=ru(i,a),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=ru(l,s):(s=pc(s,o,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,o=e.child.memoizedState,o=o===null?jE(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~r,t.memoizedState=BE,n}return s=e.child,e=s.sibling,n=ru(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function BA(e,t){return t=_b({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function wy(e,t,r,n){return n!==null&&CA(n),Nd(t,e.child,null,r),e=BA(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yq(e,t,r,n,i,s,o){if(r)return t.flags&256?(t.flags&=-257,n=gw(Error(Je(422))),wy(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,i=t.mode,n=_b({mode:"visible",children:n.children},i,0,null),s=pc(s,i,o,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&Nd(t,e.child,null,o),t.child.memoizedState=jE(o),t.memoizedState=BE,s);if(!(t.mode&1))return wy(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,s=Error(Je(419)),n=gw(s,n,void 0),wy(e,t,o,n)}if(l=(o&e.childLanes)!==0,as||l){if(n=Kn,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Ka(e,i),Io(n,e,i,-1))}return VA(),n=gw(Error(Je(421))),wy(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=cK.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ts=Zl(i.nextSibling),ks=t,on=!0,Co=null,e!==null&&(Ws[Vs++]=Ba,Ws[Vs++]=ja,Ws[Vs++]=Cc,Ba=e.id,ja=e.overflow,Cc=t),t=BA(t,n.children),t.flags|=4096,t)}function NF(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),IE(e.return,t,r)}function yw(e,t,r,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function y5(e,t,r){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(Ri(e,t,n.children,r),n=dn.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&NF(e,r,t);else if(e.tag===19)NF(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(qr(dn,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&a0(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),yw(t,!1,i,r,s);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&a0(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}yw(t,!0,r,null,s);break;case"together":yw(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Sv(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ja(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ac|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Je(153));if(t.child!==null){for(e=t.child,r=ru(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ru(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Zq(e,t,r){switch(t.tag){case 3:m5(t),Id();break;case 5:UB(t);break;case 1:cs(t.type)&&t0(t);break;case 4:FA(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;qr(i0,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(qr(dn,dn.current&1),t.flags|=128,null):r&t.child.childLanes?g5(e,t,r):(qr(dn,dn.current&1),e=Ja(e,t,r),e!==null?e.sibling:null);qr(dn,dn.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return y5(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),qr(dn,dn.current),n)break;return null;case 22:case 23:return t.lanes=0,f5(e,t,r)}return Ja(e,t,r)}var v5,zE,b5,x5;v5=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};zE=function(){};b5=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,sc(na.current);var s=null;switch(r){case"input":i=uE(e,i),n=uE(e,n),s=[];break;case"select":i=mn({},i,{value:void 0}),n=mn({},n,{value:void 0}),s=[];break;case"textarea":i=dE(e,i),n=dE(e,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Qv)}pE(r,n);var o;r=null;for(c in i)if(!n.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var l=i[c];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(km.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var a=n[c];if(l=i!=null?i[c]:void 0,n.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(r||(r={}),r[o]=a[o])}else r||(s||(s=[]),s.push(c,r)),r=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(km.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&Jr("scroll",e),s||l===a||(s=[])):(s=s||[]).push(c,a))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};x5=function(e,t,r,n){r!==n&&(t.flags|=4)};function cp(e,t){if(!on)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Si(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Qq(e,t,r){var n=t.pendingProps;switch(EA(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Si(t),null;case 1:return cs(t.type)&&e0(),Si(t),null;case 3:return n=t.stateNode,Md(),en(us),en(_i),IA(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(by(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Co!==null&&(JE(Co),Co=null))),zE(e,t),Si(t),null;case 5:PA(t);var i=sc(jm.current);if(r=t.type,e!==null&&t.stateNode!=null)b5(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Je(166));return Si(t),null}if(e=sc(na.current),by(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Xo]=t,n[Rm]=s,e=(t.mode&1)!==0,r){case"dialog":Jr("cancel",n),Jr("close",n);break;case"iframe":case"object":case"embed":Jr("load",n);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Xo]=t,e[Rm]=n,v5(e,t,!1,!1),t.stateNode=e;e:{switch(o=mE(r,n),r){case"dialog":Jr("cancel",e),Jr("close",e),i=n;break;case"iframe":case"object":case"embed":Jr("load",e),i=n;break;case"video":case"audio":for(i=0;iOd&&(t.flags|=128,n=!0,cp(s,!1),t.lanes=4194304)}else{if(!n)if(e=a0(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),cp(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!on)return Si(t),null}else 2*En()-s.renderingStartTime>Od&&r!==1073741824&&(t.flags|=128,n=!0,cp(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(r=s.last,r!==null?r.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=En(),t.sibling=null,r=dn.current,qr(dn,n?r&1|2:r&1),t):(Si(t),null);case 22:case 23:return WA(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Es&1073741824&&(Si(t),t.subtreeFlags&6&&(t.flags|=8192)):Si(t),null;case 24:return null;case 25:return null}throw Error(Je(156,t.tag))}function eK(e,t){switch(EA(t),t.tag){case 1:return cs(t.type)&&e0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Md(),en(us),en(_i),IA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return PA(t),null;case 13:if(en(dn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Je(340));Id()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return en(dn),null;case 4:return Md(),null;case 10:return kA(t.type._context),null;case 22:case 23:return WA(),null;case 24:return null;default:return null}}var Sy=!1,Ci=!1,tK=typeof WeakSet=="function"?WeakSet:Set,pt=null;function ld(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){vn(e,t,n)}else r.current=null}function HE(e,t,r){try{r()}catch(n){vn(e,t,n)}}var MF=!1;function rK(e,t){if(CE=Xv,e=CB(),SA(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,l=-1,a=-1,c=0,u=0,h=e,d=null;t:for(;;){for(var f;h!==r||i!==0&&h.nodeType!==3||(l=o+i),h!==s||n!==0&&h.nodeType!==3||(a=o+n),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)d=h,h=f;for(;;){if(h===e)break t;if(d===r&&++c===i&&(l=o),d===s&&++u===n&&(a=o),(f=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=f}r=l===-1||a===-1?null:{start:l,end:a}}else r=null}r=r||{start:0,end:0}}else r=null;for(TE={focusedElem:e,selectionRange:r},Xv=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){t=pt;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,b=t.stateNode,v=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:wo(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Je(163))}}catch(D){vn(t,t.return,D)}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}return p=MF,MF=!1,p}function em(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&HE(t,r,s)}i=i.next}while(i!==n)}}function Ab(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function UE(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function w5(e){var t=e.alternate;t!==null&&(e.alternate=null,w5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xo],delete t[Rm],delete t[_E],delete t[Rq],delete t[Bq])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function S5(e){return e.tag===5||e.tag===3||e.tag===4}function LF(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||S5(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function WE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Qv));else if(n!==4&&(e=e.child,e!==null))for(WE(e,t,r),e=e.sibling;e!==null;)WE(e,t,r),e=e.sibling}function VE(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(VE(e,t,r),e=e.sibling;e!==null;)VE(e,t,r),e=e.sibling}var ai=null,So=!1;function Tl(e,t,r){for(r=r.child;r!==null;)D5(e,t,r),r=r.sibling}function D5(e,t,r){if(ra&&typeof ra.onCommitFiberUnmount=="function")try{ra.onCommitFiberUnmount(bb,r)}catch{}switch(r.tag){case 5:Ci||ld(r,t);case 6:var n=ai,i=So;ai=null,Tl(e,t,r),ai=n,So=i,ai!==null&&(So?(e=ai,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):ai.removeChild(r.stateNode));break;case 18:ai!==null&&(So?(e=ai,r=r.stateNode,e.nodeType===8?cw(e.parentNode,r):e.nodeType===1&&cw(e,r),Im(e)):cw(ai,r.stateNode));break;case 4:n=ai,i=So,ai=r.stateNode.containerInfo,So=!0,Tl(e,t,r),ai=n,So=i;break;case 0:case 11:case 14:case 15:if(!Ci&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&HE(r,t,o),i=i.next}while(i!==n)}Tl(e,t,r);break;case 1:if(!Ci&&(ld(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){vn(r,t,l)}Tl(e,t,r);break;case 21:Tl(e,t,r);break;case 22:r.mode&1?(Ci=(n=Ci)||r.memoizedState!==null,Tl(e,t,r),Ci=n):Tl(e,t,r);break;default:Tl(e,t,r)}}function OF(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new tK),t.forEach(function(n){var i=hK.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function go(e,t){var r=t.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=En()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*iK(n/1960))-n,10e?16:e,Ul===null)var n=!1;else{if(e=Ul,Ul=null,d0=0,fr&6)throw Error(Je(331));var i=fr;for(fr|=4,pt=e.current;pt!==null;){var s=pt,o=s.child;if(pt.flags&16){var l=s.deletions;if(l!==null){for(var a=0;aEn()-HA?fc(e,0):zA|=r),hs(e,t)}function F5(e,t){t===0&&(e.mode&1?(t=fy,fy<<=1,!(fy&130023424)&&(fy=4194304)):t=1);var r=Ui();e=Ka(e,t),e!==null&&(Dg(e,t,r),hs(e,r))}function cK(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),F5(e,r)}function hK(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Je(314))}n!==null&&n.delete(t),F5(e,r)}var P5;P5=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||us.current)as=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return as=!1,Zq(e,t,r);as=!!(e.flags&131072)}else as=!1,on&&t.flags&1048576&&LB(t,n0,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Sv(e,t),e=t.pendingProps;var i=Pd(t,_i.current);Dd(t,r),i=MA(null,t,n,e,i,r);var s=LA();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,cs(n)?(s=!0,t0(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$A(t),i.updater=Tb,t.stateNode=i,i._reactInternals=t,ME(t,n,e,r),t=RE(null,t,n,!0,s,r)):(t.tag=0,on&&s&&DA(t),Ri(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Sv(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=fK(n),e=wo(n,e),i){case 0:t=OE(null,t,n,e,r);break e;case 1:t=PF(null,t,n,e,r);break e;case 11:t=$F(null,t,n,e,r);break e;case 14:t=FF(null,t,n,wo(n.type,e),r);break e}throw Error(Je(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),OE(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),PF(e,t,n,i,r);case 3:e:{if(m5(t),e===null)throw Error(Je(387));n=t.pendingProps,s=t.memoizedState,i=s.element,HB(e,t),o0(t,n,null,r);var o=t.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Ld(Error(Je(423)),t),t=IF(e,t,n,r,i);break e}else if(n!==i){i=Ld(Error(Je(424)),t),t=IF(e,t,n,r,i);break e}else for(Ts=Zl(t.stateNode.containerInfo.firstChild),ks=t,on=!0,Co=null,r=jB(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Id(),n===i){t=Ja(e,t,r);break e}Ri(e,t,n,r)}t=t.child}return t;case 5:return UB(t),e===null&&PE(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,AE(n,i)?o=null:s!==null&&AE(n,s)&&(t.flags|=32),p5(e,t),Ri(e,t,o,r),t.child;case 6:return e===null&&PE(t),null;case 13:return g5(e,t,r);case 4:return FA(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nd(t,null,n,r):Ri(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),$F(e,t,n,i,r);case 7:return Ri(e,t,t.pendingProps,r),t.child;case 8:return Ri(e,t,t.pendingProps.children,r),t.child;case 12:return Ri(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,qr(i0,n._currentValue),n._currentValue=o,s!==null)if(Lo(s.value,o)){if(s.children===i.children&&!us.current){t=Ja(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===n){if(s.tag===1){a=za(-1,r&-r),a.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}s.lanes|=r,a=s.alternate,a!==null&&(a.lanes|=r),IE(s.return,r,t),l.lanes|=r;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Je(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),IE(o,r,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ri(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Dd(t,r),i=Qs(i),n=n(i),t.flags|=1,Ri(e,t,n,r),t.child;case 14:return n=t.type,i=wo(n,t.pendingProps),i=wo(n.type,i),FF(e,t,n,i,r);case 15:return d5(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:wo(n,i),Sv(e,t),t.tag=1,cs(n)?(e=!0,t0(t)):e=!1,Dd(t,r),u5(t,n,i),ME(t,n,i,r),RE(null,t,n,!0,e,r);case 19:return y5(e,t,r);case 22:return f5(e,t,r)}throw Error(Je(156,t.tag))};function I5(e,t){return oB(e,t)}function dK(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xs(e,t,r,n){return new dK(e,t,r,n)}function GA(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fK(e){if(typeof e=="function")return GA(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hA)return 11;if(e===dA)return 14}return 2}function ru(e,t){var r=e.alternate;return r===null?(r=Xs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cv(e,t,r,n,i,s){var o=2;if(n=e,typeof e=="function")GA(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Qh:return pc(r.children,i,s,t);case cA:o=8,i|=8;break;case sE:return e=Xs(12,r,t,i|2),e.elementType=sE,e.lanes=s,e;case oE:return e=Xs(13,r,t,i),e.elementType=oE,e.lanes=s,e;case aE:return e=Xs(19,r,t,i),e.elementType=aE,e.lanes=s,e;case UR:return _b(r,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zR:o=10;break e;case HR:o=9;break e;case hA:o=11;break e;case dA:o=14;break e;case Nl:o=16,n=null;break e}throw Error(Je(130,e==null?e:typeof e,""))}return t=Xs(o,r,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function pc(e,t,r,n){return e=Xs(7,e,n,t),e.lanes=r,e}function _b(e,t,r,n){return e=Xs(22,e,n,t),e.elementType=UR,e.lanes=r,e.stateNode={isHidden:!1},e}function vw(e,t,r){return e=Xs(6,e,null,t),e.lanes=r,e}function bw(e,t,r){return t=Xs(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pK(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qx(0),this.expirationTimes=Qx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qx(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qA(e,t,r,n,i,s,o,l,a){return e=new pK(e,t,r,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Xs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},$A(s),e}function mK(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O5)}catch(e){console.error(e)}}O5(),OR.exports=Ls;var Nb=OR.exports;const YA=uo(Nb),xK=rA({__proto__:null,default:YA},[Nb]);var VF=Nb;nE.createRoot=VF.createRoot,nE.hydrateRoot=VF.hydrateRoot;/** * @remix-run/router v1.16.1 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Rd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SK(){return Math.random().toString(36).substr(2,8)}function qF(e,t){return{usr:e.state,key:e.key,idx:t}}function Vm(e,t,r,n){return r===void 0&&(r=null),hn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rl(t):t,{state:r,key:t&&t.key||n||SK()})}function _c(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function rl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function DK(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,a=Sn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(hn({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=Sn.Pop;let y=u(),b=y==null?null:y-c;c=y,l&&l({action:a,location:g.location,delta:b})}function d(y,b){a=Sn.Push;let v=Vm(g.location,y,b);r&&r(v,y),c=u()+1;let E=qF(v,c),D=g.createHref(v);try{o.pushState(E,"",D)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(D)}s&&l&&l({action:a,location:g.location,delta:1})}function f(y,b){a=Sn.Replace;let v=Vm(g.location,y,b);r&&r(v,y),c=u();let E=qF(v,c),D=g.createHref(v);o.replaceState(E,"",D),s&&l&&l({action:a,location:g.location,delta:0})}function p(y){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof y=="string"?y:_c(y);return v=v.replace(/ $/,"%20"),jt(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let g={get action(){return a},get location(){return e(i,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(GF,h),l=y,()=>{i.removeEventListener(GF,h),l=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:f,go(y){return o.go(y)}};return g}var sn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sn||(sn={}));const EK=new Set(["lazy","caseSensitive","path","id","index","children"]);function CK(e){return e.index===!0}function XE(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,s)=>{let o=[...r,s],a=typeof i.id=="string"?i.id:o.join("-");if(jt(i.index!==!0||!i.children,"Cannot specify children on an index route"),jt(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),CK(i)){let l=hn({},i,t(i),{id:a});return n[a]=l,l}else{let l=hn({},i,t(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=XE(i.children,t,o,n)),l}})}function cd(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?rl(t):t,i=cf(n.pathname||"/",r);if(i==null)return null;let s=R5(e);AK(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(jt(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=ja([n,l.relativePath]),u=r.concat(l);s.children&&s.children.length>0&&(jt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),R5(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:NK(c,s.index),routesMeta:u})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of B5(s.path))i(s,o,l)}),t}function B5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=B5(n.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function AK(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:MK(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const kK=/^:[\w-]+$/,_K=3,$K=2,FK=1,PK=10,IK=-2,KF=e=>e==="*";function NK(e,t){let r=e.split("/"),n=r.length;return r.some(KF)&&(n+=IK),t&&(n+=$K),r.filter(i=>!KF(i)).reduce((i,s)=>i+(kK.test(s)?_K:s===""?FK:PK),n)}function MK(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function LK(e,t){let{routesMeta:r}=e,n={},i="/",s=[];for(let o=0;o{let{paramName:d,isOptional:f}=u;if(d==="*"){let g=a[h]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const p=a[h];return f&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function RK(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Rd(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function BK(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rd(!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 cf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function zK(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?rl(e):e;return{pathname:r?r.startsWith("/")?r:jK(r,t):t,search:UK(n),hash:WK(i)}}function jK(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function xw(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function z5(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ZA(e,t){let r=z5(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function QA(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=rl(e):(i=hn({},e),jt(!i.pathname||!i.pathname.includes("?"),xw("?","pathname","search",i)),jt(!i.pathname||!i.pathname.includes("#"),xw("#","pathname","hash",i)),jt(!i.search||!i.search.includes("#"),xw("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}a=h>=0?t[h]:"/"}let l=zK(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ja=e=>e.join("/").replace(/\/\/+/g,"/"),HK=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UK=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WK=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ek{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function tk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const j5=["post","put","patch","delete"],VK=new Set(j5),GK=["get",...j5],qK=new Set(GK),KK=new Set([301,302,303,307,308]),JK=new Set([307,308]),ww={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},XK={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YK=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),H5="remix-router-transitions";function ZK(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;jt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ye=e.detectErrorBoundary;i=Se=>({hasErrorBoundary:ye(Se)})}else i=YK;let s={},o=XE(e.routes,i,void 0,s),a,l=e.basename||"/",c=e.unstable_dataStrategy||rJ,u=hn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),h=null,d=new Set,f=null,p=null,g=null,y=e.hydrationData!=null,b=cd(o,e.history.location,l),v=null;if(b==null){let ye=Hs(404,{pathname:e.history.location.pathname}),{matches:Se,route:Ae}=iP(o);b=Se,v={[Ae.id]:ye}}let E,D=b.some(ye=>ye.route.lazy),C=b.some(ye=>ye.route.loader);if(D)E=!1;else if(!C)E=!0;else if(u.v7_partialHydration){let ye=e.hydrationData?e.hydrationData.loaderData:null,Se=e.hydrationData?e.hydrationData.errors:null,Ae=Ue=>Ue.route.loader?typeof Ue.route.loader=="function"&&Ue.route.loader.hydrate===!0?!1:ye&&ye[Ue.route.id]!==void 0||Se&&Se[Ue.route.id]!==void 0:!0;if(Se){let Ue=b.findIndex(tt=>Se[tt.route.id]!==void 0);E=b.slice(0,Ue+1).every(Ae)}else E=b.every(Ae)}else E=e.hydrationData!=null;let w,T={historyAction:e.history.action,location:e.history.location,matches:b,initialized:E,navigation:ww,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},A=Sn.Pop,$=!1,I,N=!1,L=new Map,F=null,P=!1,_=!1,M=[],B=[],R=new Map,G=0,q=-1,ee=new Map,Y=new Set,X=new Map,Q=new Map,te=new Set,Z=new Map,de=new Map,ke=!1;function me(){if(h=e.history.listen(ye=>{let{action:Se,location:Ae,delta:Ue}=ye;if(ke){ke=!1;return}Rd(de.size===0||Ue!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let tt=tn({currentLocation:T.location,nextLocation:Ae,historyAction:Se});if(tt&&Ue!=null){ke=!0,e.history.go(Ue*-1),sr(tt,{state:"blocked",location:Ae,proceed(){sr(tt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),e.history.go(Ue)},reset(){let Tt=new Map(T.blockers);Tt.set(tt,dp),Xe({blockers:Tt})}});return}return Ee(Se,Ae)}),r){pJ(t,L);let ye=()=>mJ(t,L);t.addEventListener("pagehide",ye),F=()=>t.removeEventListener("pagehide",ye)}return T.initialized||Ee(Sn.Pop,T.location,{initialHydration:!0}),w}function Fe(){h&&h(),F&&F(),d.clear(),I&&I.abort(),T.fetchers.forEach((ye,Se)=>Ye(Se)),T.blockers.forEach((ye,Se)=>Rt(Se))}function ze(ye){return d.add(ye),()=>d.delete(ye)}function Xe(ye,Se){Se===void 0&&(Se={}),T=hn({},T,ye);let Ae=[],Ue=[];u.v7_fetcherPersist&&T.fetchers.forEach((tt,Tt)=>{tt.state==="idle"&&(te.has(Tt)?Ue.push(Tt):Ae.push(Tt))}),[...d].forEach(tt=>tt(T,{deletedFetchers:Ue,unstable_viewTransitionOpts:Se.viewTransitionOpts,unstable_flushSync:Se.flushSync===!0})),u.v7_fetcherPersist&&(Ae.forEach(tt=>T.fetchers.delete(tt)),Ue.forEach(tt=>Ye(tt)))}function $t(ye,Se,Ae){var Ue,tt;let{flushSync:Tt}=Ae===void 0?{}:Ae,vt=T.actionData!=null&&T.navigation.formMethod!=null&&Do(T.navigation.formMethod)&&T.navigation.state==="loading"&&((Ue=ye.state)==null?void 0:Ue._isRedirect)!==!0,ot;Se.actionData?Object.keys(Se.actionData).length>0?ot=Se.actionData:ot=null:vt?ot=T.actionData:ot=null;let xt=Se.loaderData?rP(T.loaderData,Se.loaderData,Se.matches||[],Se.errors):T.loaderData,Ct=T.blockers;Ct.size>0&&(Ct=new Map(Ct),Ct.forEach((ct,Kt)=>Ct.set(Kt,dp)));let Lr=$===!0||T.navigation.formMethod!=null&&Do(T.navigation.formMethod)&&((tt=ye.state)==null?void 0:tt._isRedirect)!==!0;a&&(o=a,a=void 0),P||A===Sn.Pop||(A===Sn.Push?e.history.push(ye,ye.state):A===Sn.Replace&&e.history.replace(ye,ye.state));let Or;if(A===Sn.Pop){let ct=L.get(T.location.pathname);ct&&ct.has(ye.pathname)?Or={currentLocation:T.location,nextLocation:ye}:L.has(ye.pathname)&&(Or={currentLocation:ye,nextLocation:T.location})}else if(N){let ct=L.get(T.location.pathname);ct?ct.add(ye.pathname):(ct=new Set([ye.pathname]),L.set(T.location.pathname,ct)),Or={currentLocation:T.location,nextLocation:ye}}Xe(hn({},Se,{actionData:ot,loaderData:xt,historyAction:A,location:ye,initialized:!0,navigation:ww,revalidation:"idle",restoreScrollPosition:On(ye,Se.matches||T.matches),preventScrollReset:Lr,blockers:Ct}),{viewTransitionOpts:Or,flushSync:Tt===!0}),A=Sn.Pop,$=!1,N=!1,P=!1,_=!1,M=[],B=[]}async function Pt(ye,Se){if(typeof ye=="number"){e.history.go(ye);return}let Ae=YE(T.location,T.matches,l,u.v7_prependBasename,ye,u.v7_relativeSplatPath,Se==null?void 0:Se.fromRouteId,Se==null?void 0:Se.relative),{path:Ue,submission:tt,error:Tt}=JF(u.v7_normalizeFormMethod,!1,Ae,Se),vt=T.location,ot=Vm(T.location,Ue,Se&&Se.state);ot=hn({},ot,e.history.encodeLocation(ot));let xt=Se&&Se.replace!=null?Se.replace:void 0,Ct=Sn.Push;xt===!0?Ct=Sn.Replace:xt===!1||tt!=null&&Do(tt.formMethod)&&tt.formAction===T.location.pathname+T.location.search&&(Ct=Sn.Replace);let Lr=Se&&"preventScrollReset"in Se?Se.preventScrollReset===!0:void 0,Or=(Se&&Se.unstable_flushSync)===!0,ct=tn({currentLocation:vt,nextLocation:ot,historyAction:Ct});if(ct){sr(ct,{state:"blocked",location:ot,proceed(){sr(ct,{state:"proceeding",proceed:void 0,reset:void 0,location:ot}),Pt(ye,Se)},reset(){let Kt=new Map(T.blockers);Kt.set(ct,dp),Xe({blockers:Kt})}});return}return await Ee(Ct,ot,{submission:tt,pendingError:Tt,preventScrollReset:Lr,replace:Se&&Se.replace,enableViewTransition:Se&&Se.unstable_viewTransition,flushSync:Or})}function V(){if(Ze(),Xe({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){Ee(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}Ee(A||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function Ee(ye,Se,Ae){I&&I.abort(),I=null,A=ye,P=(Ae&&Ae.startUninterruptedRevalidation)===!0,Ln(T.location,T.matches),$=(Ae&&Ae.preventScrollReset)===!0,N=(Ae&&Ae.enableViewTransition)===!0;let Ue=a||o,tt=Ae&&Ae.overrideNavigation,Tt=cd(Ue,Se,l),vt=(Ae&&Ae.flushSync)===!0;if(!Tt){let ct=Hs(404,{pathname:Se.pathname}),{matches:Kt,route:or}=iP(Ue);ys(),$t(Se,{matches:Kt,loaderData:{},errors:{[or.id]:ct}},{flushSync:vt});return}if(T.initialized&&!_&&lJ(T.location,Se)&&!(Ae&&Ae.submission&&Do(Ae.submission.formMethod))){$t(Se,{matches:Tt},{flushSync:vt});return}I=new AbortController;let ot=Nh(e.history,Se,I.signal,Ae&&Ae.submission),xt;if(Ae&&Ae.pendingError)xt=[nm(Tt).route.id,{type:sn.error,error:Ae.pendingError}];else if(Ae&&Ae.submission&&Do(Ae.submission.formMethod)){let ct=await De(ot,Se,Ae.submission,Tt,{replace:Ae.replace,flushSync:vt});if(ct.shortCircuited)return;xt=ct.pendingActionResult,tt=Sw(Se,Ae.submission),vt=!1,ot=Nh(e.history,ot.url,ot.signal)}let{shortCircuited:Ct,loaderData:Lr,errors:Or}=await oe(ot,Se,Tt,tt,Ae&&Ae.submission,Ae&&Ae.fetcherSubmission,Ae&&Ae.replace,Ae&&Ae.initialHydration===!0,vt,xt);Ct||(I=null,$t(Se,hn({matches:Tt},nP(xt),{loaderData:Lr,errors:Or})))}async function De(ye,Se,Ae,Ue,tt){tt===void 0&&(tt={}),Ze();let Tt=dJ(Se,Ae);Xe({navigation:Tt},{flushSync:tt.flushSync===!0});let vt,ot=QE(Ue,Se);if(!ot.route.action&&!ot.route.lazy)vt={type:sn.error,error:Hs(405,{method:ye.method,pathname:Se.pathname,routeId:ot.route.id})};else if(vt=(await be("action",ye,[ot],Ue))[0],ye.signal.aborted)return{shortCircuited:!0};if(ac(vt)){let xt;return tt&&tt.replace!=null?xt=tt.replace:xt=QF(vt.response.headers.get("Location"),new URL(ye.url),l)===T.location.pathname+T.location.search,await _e(ye,vt,{submission:Ae,replace:xt}),{shortCircuited:!0}}if(oc(vt))throw Hs(400,{type:"defer-action"});if(Gs(vt)){let xt=nm(Ue,ot.route.id);return(tt&&tt.replace)!==!0&&(A=Sn.Push),{pendingActionResult:[xt.route.id,vt]}}return{pendingActionResult:[ot.route.id,vt]}}async function oe(ye,Se,Ae,Ue,tt,Tt,vt,ot,xt,Ct){let Lr=Ue||Sw(Se,tt),Or=tt||Tt||aP(Lr),ct=a||o,[Kt,or]=XF(e.history,T,Ae,Or,Se,u.v7_partialHydration&&ot===!0,u.unstable_skipActionErrorRevalidation,_,M,B,te,X,Y,ct,l,Ct);if(ys(Qe=>!(Ae&&Ae.some(Bt=>Bt.route.id===Qe))||Kt&&Kt.some(Bt=>Bt.route.id===Qe)),q=++G,Kt.length===0&&or.length===0){let Qe=_t();return $t(Se,hn({matches:Ae,loaderData:{},errors:Ct&&Gs(Ct[1])?{[Ct[0]]:Ct[1].error}:null},nP(Ct),Qe?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt}),{shortCircuited:!0}}if(!P&&(!u.v7_partialHydration||!ot)){or.forEach(Bt=>{let Jt=T.fetchers.get(Bt.key),Gt=fp(void 0,Jt?Jt.data:void 0);T.fetchers.set(Bt.key,Gt)});let Qe;Ct&&!Gs(Ct[1])?Qe={[Ct[0]]:Ct[1].data}:T.actionData&&(Object.keys(T.actionData).length===0?Qe=null:Qe=T.actionData),Xe(hn({navigation:Lr},Qe!==void 0?{actionData:Qe}:{},or.length>0?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt})}or.forEach(Qe=>{R.has(Qe.key)&&St(Qe.key),Qe.controller&&R.set(Qe.key,Qe.controller)});let Mi=()=>or.forEach(Qe=>St(Qe.key));I&&I.signal.addEventListener("abort",Mi);let{loaderResults:Tn,fetcherResults:$n}=await Ne(T.matches,Ae,Kt,or,ye);if(ye.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",Mi),or.forEach(Qe=>R.delete(Qe.key));let Ur=sP([...Tn,...$n]);if(Ur){if(Ur.idx>=Kt.length){let Qe=or[Ur.idx-Kt.length].key;Y.add(Qe)}return await _e(ye,Ur.result,{replace:vt}),{shortCircuited:!0}}let{loaderData:ei,errors:rt}=tP(T,Ae,Kt,Tn,Ct,or,$n,Z);Z.forEach((Qe,Bt)=>{Qe.subscribe(Jt=>{(Jt||Qe.done)&&Z.delete(Bt)})}),u.v7_partialHydration&&ot&&T.errors&&Object.entries(T.errors).filter(Qe=>{let[Bt]=Qe;return!Kt.some(Jt=>Jt.route.id===Bt)}).forEach(Qe=>{let[Bt,Jt]=Qe;rt=Object.assign(rt||{},{[Bt]:Jt})});let fe=_t(),Le=yt(q),it=fe||Le||or.length>0;return hn({loaderData:ei,errors:rt},it?{fetchers:new Map(T.fetchers)}:{})}function ne(ye,Se,Ae,Ue){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");R.has(ye)&&St(ye);let tt=(Ue&&Ue.unstable_flushSync)===!0,Tt=a||o,vt=YE(T.location,T.matches,l,u.v7_prependBasename,Ae,u.v7_relativeSplatPath,Se,Ue==null?void 0:Ue.relative),ot=cd(Tt,vt,l);if(!ot){Te(ye,Se,Hs(404,{pathname:vt}),{flushSync:tt});return}let{path:xt,submission:Ct,error:Lr}=JF(u.v7_normalizeFormMethod,!0,vt,Ue);if(Lr){Te(ye,Se,Lr,{flushSync:tt});return}let Or=QE(ot,xt);if($=(Ue&&Ue.preventScrollReset)===!0,Ct&&Do(Ct.formMethod)){ge(ye,Se,xt,Or,ot,tt,Ct);return}X.set(ye,{routeId:Se,path:xt}),Ie(ye,Se,xt,Or,ot,tt,Ct)}async function ge(ye,Se,Ae,Ue,tt,Tt,vt){if(Ze(),X.delete(ye),!Ue.route.action&&!Ue.route.lazy){let Gt=Hs(405,{method:vt.formMethod,pathname:Ae,routeId:Se});Te(ye,Se,Gt,{flushSync:Tt});return}let ot=T.fetchers.get(ye);ce(ye,fJ(vt,ot),{flushSync:Tt});let xt=new AbortController,Ct=Nh(e.history,Ae,xt.signal,vt);R.set(ye,xt);let Lr=G,ct=(await be("action",Ct,[Ue],tt))[0];if(Ct.signal.aborted){R.get(ye)===xt&&R.delete(ye);return}if(u.v7_fetcherPersist&&te.has(ye)){if(ac(ct)||Gs(ct)){ce(ye,Fl(void 0));return}}else{if(ac(ct))if(R.delete(ye),q>Lr){ce(ye,Fl(void 0));return}else return Y.add(ye),ce(ye,fp(vt)),_e(Ct,ct,{fetcherSubmission:vt});if(Gs(ct)){Te(ye,Se,ct.error);return}}if(oc(ct))throw Hs(400,{type:"defer-action"});let Kt=T.navigation.location||T.location,or=Nh(e.history,Kt,xt.signal),Mi=a||o,Tn=T.navigation.state!=="idle"?cd(Mi,T.navigation.location,l):T.matches;jt(Tn,"Didn't find any matches after fetcher action");let $n=++G;ee.set(ye,$n);let Ur=fp(vt,ct.data);T.fetchers.set(ye,Ur);let[ei,rt]=XF(e.history,T,Tn,vt,Kt,!1,u.unstable_skipActionErrorRevalidation,_,M,B,te,X,Y,Mi,l,[Ue.route.id,ct]);rt.filter(Gt=>Gt.key!==ye).forEach(Gt=>{let Wr=Gt.key,xi=T.fetchers.get(Wr),jr=fp(void 0,xi?xi.data:void 0);T.fetchers.set(Wr,jr),R.has(Wr)&&St(Wr),Gt.controller&&R.set(Wr,Gt.controller)}),Xe({fetchers:new Map(T.fetchers)});let fe=()=>rt.forEach(Gt=>St(Gt.key));xt.signal.addEventListener("abort",fe);let{loaderResults:Le,fetcherResults:it}=await Ne(T.matches,Tn,ei,rt,or);if(xt.signal.aborted)return;xt.signal.removeEventListener("abort",fe),ee.delete(ye),R.delete(ye),rt.forEach(Gt=>R.delete(Gt.key));let Qe=sP([...Le,...it]);if(Qe){if(Qe.idx>=ei.length){let Gt=rt[Qe.idx-ei.length].key;Y.add(Gt)}return _e(or,Qe.result)}let{loaderData:Bt,errors:Jt}=tP(T,T.matches,ei,Le,void 0,rt,it,Z);if(T.fetchers.has(ye)){let Gt=Fl(ct.data);T.fetchers.set(ye,Gt)}yt($n),T.navigation.state==="loading"&&$n>q?(jt(A,"Expected pending action"),I&&I.abort(),$t(T.navigation.location,{matches:Tn,loaderData:Bt,errors:Jt,fetchers:new Map(T.fetchers)})):(Xe({errors:Jt,loaderData:rP(T.loaderData,Bt,Tn,Jt),fetchers:new Map(T.fetchers)}),_=!1)}async function Ie(ye,Se,Ae,Ue,tt,Tt,vt){let ot=T.fetchers.get(ye);ce(ye,fp(vt,ot?ot.data:void 0),{flushSync:Tt});let xt=new AbortController,Ct=Nh(e.history,Ae,xt.signal);R.set(ye,xt);let Lr=G,ct=(await be("loader",Ct,[Ue],tt))[0];if(oc(ct)&&(ct=await G5(ct,Ct.signal,!0)||ct),R.get(ye)===xt&&R.delete(ye),!Ct.signal.aborted){if(te.has(ye)){ce(ye,Fl(void 0));return}if(ac(ct))if(q>Lr){ce(ye,Fl(void 0));return}else{Y.add(ye),await _e(Ct,ct);return}if(Gs(ct)){Te(ye,Se,ct.error);return}jt(!oc(ct),"Unhandled fetcher deferred data"),ce(ye,Fl(ct.data))}}async function _e(ye,Se,Ae){let{submission:Ue,fetcherSubmission:tt,replace:Tt}=Ae===void 0?{}:Ae;Se.response.headers.has("X-Remix-Revalidate")&&(_=!0);let vt=Se.response.headers.get("Location");jt(vt,"Expected a Location header on the redirect Response"),vt=QF(vt,new URL(ye.url),l);let ot=Vm(T.location,vt,{_isRedirect:!0});if(r){let Kt=!1;if(Se.response.headers.has("X-Remix-Reload-Document"))Kt=!0;else if(rk.test(vt)){const or=e.history.createURL(vt);Kt=or.origin!==t.location.origin||cf(or.pathname,l)==null}if(Kt){Tt?t.location.replace(vt):t.location.assign(vt);return}}I=null;let xt=Tt===!0?Sn.Replace:Sn.Push,{formMethod:Ct,formAction:Lr,formEncType:Or}=T.navigation;!Ue&&!tt&&Ct&&Lr&&Or&&(Ue=aP(T.navigation));let ct=Ue||tt;if(JK.has(Se.response.status)&&ct&&Do(ct.formMethod))await Ee(xt,ot,{submission:hn({},ct,{formAction:vt}),preventScrollReset:$});else{let Kt=Sw(ot,Ue);await Ee(xt,ot,{overrideNavigation:Kt,fetcherSubmission:tt,preventScrollReset:$})}}async function be(ye,Se,Ae,Ue){try{let tt=await nJ(c,ye,Se,Ae,Ue,s,i);return await Promise.all(tt.map((Tt,vt)=>{if(uJ(Tt)){let ot=Tt.result;return{type:sn.redirect,response:oJ(ot,Se,Ae[vt].route.id,Ue,l,u.v7_relativeSplatPath)}}return sJ(Tt)}))}catch(tt){return Ae.map(()=>({type:sn.error,error:tt}))}}async function Ne(ye,Se,Ae,Ue,tt){let[Tt,...vt]=await Promise.all([Ae.length?be("loader",tt,Ae,Se):[],...Ue.map(ot=>{if(ot.matches&&ot.match&&ot.controller){let xt=Nh(e.history,ot.path,ot.controller.signal);return be("loader",xt,[ot.match],ot.matches).then(Ct=>Ct[0])}else return Promise.resolve({type:sn.error,error:Hs(404,{pathname:ot.path})})})]);return await Promise.all([oP(ye,Ae,Tt,Tt.map(()=>tt.signal),!1,T.loaderData),oP(ye,Ue.map(ot=>ot.match),vt,Ue.map(ot=>ot.controller?ot.controller.signal:null),!0)]),{loaderResults:Tt,fetcherResults:vt}}function Ze(){_=!0,M.push(...ys()),X.forEach((ye,Se)=>{R.has(Se)&&(B.push(Se),St(Se))})}function ce(ye,Se,Ae){Ae===void 0&&(Ae={}),T.fetchers.set(ye,Se),Xe({fetchers:new Map(T.fetchers)},{flushSync:(Ae&&Ae.flushSync)===!0})}function Te(ye,Se,Ae,Ue){Ue===void 0&&(Ue={});let tt=nm(T.matches,Se);Ye(ye),Xe({errors:{[tt.route.id]:Ae},fetchers:new Map(T.fetchers)},{flushSync:(Ue&&Ue.flushSync)===!0})}function Oe(ye){return u.v7_fetcherPersist&&(Q.set(ye,(Q.get(ye)||0)+1),te.has(ye)&&te.delete(ye)),T.fetchers.get(ye)||XK}function Ye(ye){let Se=T.fetchers.get(ye);R.has(ye)&&!(Se&&Se.state==="loading"&&ee.has(ye))&&St(ye),X.delete(ye),ee.delete(ye),Y.delete(ye),te.delete(ye),T.fetchers.delete(ye)}function Dt(ye){if(u.v7_fetcherPersist){let Se=(Q.get(ye)||0)-1;Se<=0?(Q.delete(ye),te.add(ye)):Q.set(ye,Se)}else Ye(ye);Xe({fetchers:new Map(T.fetchers)})}function St(ye){let Se=R.get(ye);jt(Se,"Expected fetch controller: "+ye),Se.abort(),R.delete(ye)}function Nt(ye){for(let Se of ye){let Ae=Oe(Se),Ue=Fl(Ae.data);T.fetchers.set(Se,Ue)}}function _t(){let ye=[],Se=!1;for(let Ae of Y){let Ue=T.fetchers.get(Ae);jt(Ue,"Expected fetcher: "+Ae),Ue.state==="loading"&&(Y.delete(Ae),ye.push(Ae),Se=!0)}return Nt(ye),Se}function yt(ye){let Se=[];for(let[Ae,Ue]of ee)if(Ue0}function Ft(ye,Se){let Ae=T.blockers.get(ye)||dp;return de.get(ye)!==Se&&de.set(ye,Se),Ae}function Rt(ye){T.blockers.delete(ye),de.delete(ye)}function sr(ye,Se){let Ae=T.blockers.get(ye)||dp;jt(Ae.state==="unblocked"&&Se.state==="blocked"||Ae.state==="blocked"&&Se.state==="blocked"||Ae.state==="blocked"&&Se.state==="proceeding"||Ae.state==="blocked"&&Se.state==="unblocked"||Ae.state==="proceeding"&&Se.state==="unblocked","Invalid blocker state transition: "+Ae.state+" -> "+Se.state);let Ue=new Map(T.blockers);Ue.set(ye,Se),Xe({blockers:Ue})}function tn(ye){let{currentLocation:Se,nextLocation:Ae,historyAction:Ue}=ye;if(de.size===0)return;de.size>1&&Rd(!1,"A router only supports one blocker at a time");let tt=Array.from(de.entries()),[Tt,vt]=tt[tt.length-1],ot=T.blockers.get(Tt);if(!(ot&&ot.state==="proceeding")&&vt({currentLocation:Se,nextLocation:Ae,historyAction:Ue}))return Tt}function ys(ye){let Se=[];return Z.forEach((Ae,Ue)=>{(!ye||ye(Ue))&&(Ae.cancel(),Se.push(Ue),Z.delete(Ue))}),Se}function Zn(ye,Se,Ae){if(f=ye,g=Se,p=Ae||null,!y&&T.navigation===ww){y=!0;let Ue=On(T.location,T.matches);Ue!=null&&Xe({restoreScrollPosition:Ue})}return()=>{f=null,g=null,p=null}}function Er(ye,Se){return p&&p(ye,Se.map(Ue=>TK(Ue,T.loaderData)))||ye.key}function Ln(ye,Se){if(f&&g){let Ae=Er(ye,Se);f[Ae]=g()}}function On(ye,Se){if(f){let Ae=Er(ye,Se),Ue=f[Ae];if(typeof Ue=="number")return Ue}return null}function Qn(ye){s={},a=XE(ye,i,void 0,s)}return w={get basename(){return l},get future(){return u},get state(){return T},get routes(){return o},get window(){return t},initialize:me,subscribe:ze,enableScrollRestoration:Zn,navigate:Pt,fetch:ne,revalidate:V,createHref:ye=>e.history.createHref(ye),encodeLocation:ye=>e.history.encodeLocation(ye),getFetcher:Oe,deleteFetcher:Dt,dispose:Fe,getBlocker:Ft,deleteBlocker:Rt,_internalFetchControllers:R,_internalActiveDeferreds:Z,_internalSetRoutes:Qn},w}function QK(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function YE(e,t,r,n,i,s,o,a){let l,c;if(o){l=[];for(let h of t)if(l.push(h),h.route.id===o){c=h;break}}else l=t,c=t[t.length-1];let u=QA(i||".",ZA(l,s),cf(e.pathname,r)||e.pathname,a==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!nk(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:ja([r,u.pathname])),_c(u)}function JF(e,t,r,n){if(!n||!QK(n))return{path:r};if(n.formMethod&&!hJ(n.formMethod))return{path:r,error:Hs(405,{method:n.formMethod})};let i=()=>({path:r,error:Hs(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),a=W5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Do(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[g,y]=p;return""+f+g+"="+y+` -`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Do(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}jt(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=ZE(n.formData),c=n.formData;else if(n.body instanceof FormData)l=ZE(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=eP(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=eP(l)}catch{return i()}let u={formMethod:o,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Do(u.formMethod))return{path:r,submission:u};let h=rl(r);return t&&h.search&&nk(h.search)&&l.append("index",""),h.search="?"+l,{path:_c(h),submission:u}}function eJ(e,t){let r=e;if(t){let n=e.findIndex(i=>i.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function XF(e,t,r,n,i,s,o,a,l,c,u,h,d,f,p,g){let y=g?Gs(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),v=e.createURL(i),E=g&&Gs(g[1])?g[0]:void 0,D=E?eJ(r,E):r,C=g?g[1].statusCode:void 0,w=o&&C&&C>=400,T=D.filter(($,I)=>{let{route:N}=$;if(N.lazy)return!0;if(N.loader==null)return!1;if(s)return typeof N.loader!="function"||N.loader.hydrate?!0:t.loaderData[N.id]===void 0&&(!t.errors||t.errors[N.id]===void 0);if(tJ(t.loaderData,t.matches[I],$)||l.some(P=>P===$.route.id))return!0;let L=t.matches[I],F=$;return YF($,hn({currentUrl:b,currentParams:L.params,nextUrl:v,nextParams:F.params},n,{actionResult:y,unstable_actionStatus:C,defaultShouldRevalidate:w?!1:a||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||U5(L,F)}))}),A=[];return h.forEach(($,I)=>{if(s||!r.some(_=>_.route.id===$.routeId)||u.has(I))return;let N=cd(f,$.path,p);if(!N){A.push({key:I,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let L=t.fetchers.get(I),F=QE(N,$.path),P=!1;d.has(I)?P=!1:c.includes(I)?P=!0:L&&L.state!=="idle"&&L.data===void 0?P=a:P=YF(F,hn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:y,unstable_actionStatus:C,defaultShouldRevalidate:w?!1:a})),P&&A.push({key:I,routeId:$.routeId,path:$.path,matches:N,match:F,controller:new AbortController})}),[T,A]}function tJ(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function U5(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function YF(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ZF(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];jt(i,"No route found in manifest");let s={};for(let o in n){let l=i[o]!==void 0&&o!=="hasErrorBoundary";Rd(!l,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!EK.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,hn({},t(i),{lazy:void 0}))}function rJ(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function nJ(e,t,r,n,i,s,o,a){let l=n.reduce((h,d)=>h.add(d.route.id),new Set),c=new Set,u=await e({matches:i.map(h=>{let d=l.has(h.route.id);return hn({},h,{shouldLoad:d,resolve:p=>(c.add(h.route.id),d?iJ(t,r,h,s,o,p,a):Promise.resolve({type:sn.data,result:void 0}))})}),request:r,params:i[0].params,context:a});return i.forEach(h=>jt(c.has(h.route.id),'`match.resolve()` was not called for route id "'+h.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((h,d)=>l.has(i[d].route.id))}async function iJ(e,t,r,n,i,s,o){let a,l,c=u=>{let h,d=new Promise((g,y)=>h=y);l=()=>h(),t.signal.addEventListener("abort",l);let f=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:o},...g!==void 0?[g]:[]),p;return s?p=s(g=>f(g)):p=(async()=>{try{return{type:"data",result:await f()}}catch(g){return{type:"error",result:g}}})(),Promise.race([p,d])};try{let u=r.route[e];if(r.route.lazy)if(u){let h,[d]=await Promise.all([c(u).catch(f=>{h=f}),ZF(r.route,i,n)]);if(h!==void 0)throw h;a=d}else if(await ZF(r.route,i,n),u=r.route[e],u)a=await c(u);else if(e==="action"){let h=new URL(t.url),d=h.pathname+h.search;throw Hs(405,{method:t.method,pathname:d,routeId:r.route.id})}else return{type:sn.data,result:void 0};else if(u)a=await c(u);else{let h=new URL(t.url),d=h.pathname+h.search;throw Hs(404,{pathname:d})}jt(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:sn.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function sJ(e){let{result:t,type:r,status:n}=e;if(V5(t)){let o;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(a){return{type:sn.error,error:a}}return r===sn.error?{type:sn.error,error:new ek(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:sn.data,data:o,statusCode:t.status,headers:t.headers}}if(r===sn.error)return{type:sn.error,error:t,statusCode:tk(t)?t.status:n};if(cJ(t)){var i,s;return{type:sn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}return{type:sn.data,data:t,statusCode:n}}function oJ(e,t,r,n,i,s){let o=e.headers.get("Location");if(jt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!rk.test(o)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);o=YE(new URL(t.url),a,i,!0,o,s),e.headers.set("Location",o)}return e}function QF(e,t,r){if(rk.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=cf(i.pathname,r)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function Nh(e,t,r,n){let i=e.createURL(W5(t)).toString(),s={signal:r};if(n&&Do(n.formMethod)){let{formMethod:o,formEncType:a}=n;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(n.json)):a==="text/plain"?s.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?s.body=ZE(n.formData):s.body=n.formData}return new Request(i,s)}function ZE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function eP(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function aJ(e,t,r,n,i,s){let o={},a=null,l,c=!1,u={},h=n&&Gs(n[1])?n[1].error:void 0;return r.forEach((d,f)=>{let p=t[f].route.id;if(jt(!ac(d),"Cannot handle redirect results in processLoaderData"),Gs(d)){let g=d.error;if(h!==void 0&&(g=h,h=void 0),a=a||{},s)a[p]=g;else{let y=nm(e,p);a[y.route.id]==null&&(a[y.route.id]=g)}o[p]=void 0,c||(c=!0,l=tk(d.error)?d.error.status:500),d.headers&&(u[p]=d.headers)}else oc(d)?(i.set(p,d.deferredData),o[p]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(u[p]=d.headers)):(o[p]=d.data,d.statusCode&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(u[p]=d.headers))}),h!==void 0&&n&&(a={[n[0]]:h},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:l||200,loaderHeaders:u}}function tP(e,t,r,n,i,s,o,a){let{loaderData:l,errors:c}=aJ(t,r,n,i,a,!1);for(let u=0;un.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function iP(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Hs(e,t){let{pathname:r,routeId:n,method:i,type:s}=t===void 0?{}:t,o="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&r&&n?a="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?a="defer() is not supported in actions":s==="invalid-body"&&(a="Unable to encode submission body")):e===403?(o="Forbidden",a='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",a='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",i&&r&&n?a="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(a='Invalid request method "'+i.toUpperCase()+'"')),new ek(e||500,o,new Error(a),!0)}function sP(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ac(r))return{result:r,idx:t}}}function W5(e){let t=typeof e=="string"?rl(e):e;return _c(hn({},t,{hash:""}))}function lJ(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function uJ(e){return V5(e.result)&&KK.has(e.result.status)}function oc(e){return e.type===sn.deferred}function Gs(e){return e.type===sn.error}function ac(e){return(e&&e.type)===sn.redirect}function cJ(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function V5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hJ(e){return qK.has(e.toLowerCase())}function Do(e){return VK.has(e.toLowerCase())}async function oP(e,t,r,n,i,s){for(let o=0;oh.route.id===l.route.id),u=c!=null&&!U5(c,l)&&(s&&s[l.route.id])!==void 0;if(oc(a)&&(i||u)){let h=n[o];jt(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await G5(a,h,i).then(d=>{d&&(r[o]=d||r[o])})}}}async function G5(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:sn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:sn.error,error:i}}return{type:sn.data,data:e.deferredData.data}}}function nk(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function QE(e,t){let r=typeof t=="string"?rl(t).search:t.search;if(e[e.length-1].route.index&&nk(r||""))return e[e.length-1];let n=z5(e);return n[n.length-1]}function aP(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:s,json:o}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Sw(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dJ(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function fp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function fJ(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Fl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function pJ(e,t){try{let r=e.sessionStorage.getItem(H5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function mJ(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(H5,JSON.stringify(r))}catch(n){Rd(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** + */function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Rd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function SK(){return Math.random().toString(36).substr(2,8)}function qF(e,t){return{usr:e.state,key:e.key,idx:t}}function Vm(e,t,r,n){return r===void 0&&(r=null),hn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?nl(t):t,{state:r,key:t&&t.key||n||SK()})}function _c(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function nl(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function DK(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:s=!1}=n,o=i.history,l=Sn.Pop,a=null,c=u();c==null&&(c=0,o.replaceState(hn({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){l=Sn.Pop;let y=u(),b=y==null?null:y-c;c=y,a&&a({action:l,location:g.location,delta:b})}function d(y,b){l=Sn.Push;let v=Vm(g.location,y,b);r&&r(v,y),c=u()+1;let E=qF(v,c),D=g.createHref(v);try{o.pushState(E,"",D)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(D)}s&&a&&a({action:l,location:g.location,delta:1})}function f(y,b){l=Sn.Replace;let v=Vm(g.location,y,b);r&&r(v,y),c=u();let E=qF(v,c),D=g.createHref(v);o.replaceState(E,"",D),s&&a&&a({action:l,location:g.location,delta:0})}function p(y){let b=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof y=="string"?y:_c(y);return v=v.replace(/ $/,"%20"),zt(b,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,b)}let g={get action(){return l},get location(){return e(i,o)},listen(y){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(GF,h),a=y,()=>{i.removeEventListener(GF,h),a=null}},createHref(y){return t(i,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:d,replace:f,go(y){return o.go(y)}};return g}var sn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sn||(sn={}));const EK=new Set(["lazy","caseSensitive","path","id","index","children"]);function CK(e){return e.index===!0}function XE(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,s)=>{let o=[...r,s],l=typeof i.id=="string"?i.id:o.join("-");if(zt(i.index!==!0||!i.children,"Cannot specify children on an index route"),zt(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),CK(i)){let a=hn({},i,t(i),{id:l});return n[l]=a,a}else{let a=hn({},i,t(i),{id:l,children:void 0});return n[l]=a,i.children&&(a.children=XE(i.children,t,o,n)),a}})}function cd(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?nl(t):t,i=cf(n.pathname||"/",r);if(i==null)return null;let s=R5(e);AK(s);let o=null;for(let l=0;o==null&&l{let a={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};a.relativePath.startsWith("/")&&(zt(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(n.length));let c=Ha([n,a.relativePath]),u=r.concat(a);s.children&&s.children.length>0&&(zt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),R5(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:NK(c,s.index),routesMeta:u})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let a of B5(s.path))i(s,o,a)}),t}function B5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return i?[s,""]:[s];let o=B5(n.join("/")),l=[];return l.push(...o.map(a=>a===""?s:[s,a].join("/"))),i&&l.push(...o),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function AK(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:MK(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const kK=/^:[\w-]+$/,_K=3,$K=2,FK=1,PK=10,IK=-2,KF=e=>e==="*";function NK(e,t){let r=e.split("/"),n=r.length;return r.some(KF)&&(n+=IK),t&&(n+=$K),r.filter(i=>!KF(i)).reduce((i,s)=>i+(kK.test(s)?_K:s===""?FK:PK),n)}function MK(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function LK(e,t){let{routesMeta:r}=e,n={},i="/",s=[];for(let o=0;o{let{paramName:d,isOptional:f}=u;if(d==="*"){let g=l[h]||"";o=s.slice(0,s.length-g.length).replace(/(.)\/+$/,"$1")}const p=l[h];return f&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:e}}function RK(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Rd(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 n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,a)=>(n.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function BK(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Rd(!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 cf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function jK(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?nl(e):e;return{pathname:r?r.startsWith("/")?r:zK(r,t):t,search:UK(n),hash:WK(i)}}function zK(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function xw(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function j5(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ZA(e,t){let r=j5(e);return t?r.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function QA(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=nl(e):(i=hn({},e),zt(!i.pathname||!i.pathname.includes("?"),xw("?","pathname","search",i)),zt(!i.pathname||!i.pathname.includes("#"),xw("#","pathname","hash",i)),zt(!i.search||!i.search.includes("#"),xw("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}l=h>=0?t[h]:"/"}let a=jK(i,l),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&r.endsWith("/");return!a.pathname.endsWith("/")&&(c||u)&&(a.pathname+="/"),a}const Ha=e=>e.join("/").replace(/\/\/+/g,"/"),HK=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UK=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WK=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ek{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function tk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const z5=["post","put","patch","delete"],VK=new Set(z5),GK=["get",...z5],qK=new Set(GK),KK=new Set([301,302,303,307,308]),JK=new Set([307,308]),ww={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},XK={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},rk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YK=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),H5="remix-router-transitions";function ZK(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;zt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ye=e.detectErrorBoundary;i=Se=>({hasErrorBoundary:ye(Se)})}else i=YK;let s={},o=XE(e.routes,i,void 0,s),l,a=e.basename||"/",c=e.unstable_dataStrategy||rJ,u=hn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),h=null,d=new Set,f=null,p=null,g=null,y=e.hydrationData!=null,b=cd(o,e.history.location,a),v=null;if(b==null){let ye=Hs(404,{pathname:e.history.location.pathname}),{matches:Se,route:Ae}=iP(o);b=Se,v={[Ae.id]:ye}}let E,D=b.some(ye=>ye.route.lazy),C=b.some(ye=>ye.route.loader);if(D)E=!1;else if(!C)E=!0;else if(u.v7_partialHydration){let ye=e.hydrationData?e.hydrationData.loaderData:null,Se=e.hydrationData?e.hydrationData.errors:null,Ae=Ue=>Ue.route.loader?typeof Ue.route.loader=="function"&&Ue.route.loader.hydrate===!0?!1:ye&&ye[Ue.route.id]!==void 0||Se&&Se[Ue.route.id]!==void 0:!0;if(Se){let Ue=b.findIndex(tt=>Se[tt.route.id]!==void 0);E=b.slice(0,Ue+1).every(Ae)}else E=b.every(Ae)}else E=e.hydrationData!=null;let w,T={historyAction:e.history.action,location:e.history.location,matches:b,initialized:E,navigation:ww,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},A=Sn.Pop,$=!1,I,N=!1,L=new Map,F=null,P=!1,_=!1,M=[],j=[],R=new Map,G=0,q=-1,ee=new Map,Y=new Set,X=new Map,Q=new Map,te=new Set,Z=new Map,de=new Map,ke=!1;function me(){if(h=e.history.listen(ye=>{let{action:Se,location:Ae,delta:Ue}=ye;if(ke){ke=!1;return}Rd(de.size===0||Ue!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let tt=tn({currentLocation:T.location,nextLocation:Ae,historyAction:Se});if(tt&&Ue!=null){ke=!0,e.history.go(Ue*-1),sr(tt,{state:"blocked",location:Ae,proceed(){sr(tt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),e.history.go(Ue)},reset(){let Tt=new Map(T.blockers);Tt.set(tt,dp),Xe({blockers:Tt})}});return}return Ee(Se,Ae)}),r){pJ(t,L);let ye=()=>mJ(t,L);t.addEventListener("pagehide",ye),F=()=>t.removeEventListener("pagehide",ye)}return T.initialized||Ee(Sn.Pop,T.location,{initialHydration:!0}),w}function Fe(){h&&h(),F&&F(),d.clear(),I&&I.abort(),T.fetchers.forEach((ye,Se)=>Ye(Se)),T.blockers.forEach((ye,Se)=>Rt(Se))}function je(ye){return d.add(ye),()=>d.delete(ye)}function Xe(ye,Se){Se===void 0&&(Se={}),T=hn({},T,ye);let Ae=[],Ue=[];u.v7_fetcherPersist&&T.fetchers.forEach((tt,Tt)=>{tt.state==="idle"&&(te.has(Tt)?Ue.push(Tt):Ae.push(Tt))}),[...d].forEach(tt=>tt(T,{deletedFetchers:Ue,unstable_viewTransitionOpts:Se.viewTransitionOpts,unstable_flushSync:Se.flushSync===!0})),u.v7_fetcherPersist&&(Ae.forEach(tt=>T.fetchers.delete(tt)),Ue.forEach(tt=>Ye(tt)))}function $t(ye,Se,Ae){var Ue,tt;let{flushSync:Tt}=Ae===void 0?{}:Ae,vt=T.actionData!=null&&T.navigation.formMethod!=null&&Do(T.navigation.formMethod)&&T.navigation.state==="loading"&&((Ue=ye.state)==null?void 0:Ue._isRedirect)!==!0,ot;Se.actionData?Object.keys(Se.actionData).length>0?ot=Se.actionData:ot=null:vt?ot=T.actionData:ot=null;let xt=Se.loaderData?rP(T.loaderData,Se.loaderData,Se.matches||[],Se.errors):T.loaderData,Ct=T.blockers;Ct.size>0&&(Ct=new Map(Ct),Ct.forEach((ct,Kt)=>Ct.set(Kt,dp)));let Lr=$===!0||T.navigation.formMethod!=null&&Do(T.navigation.formMethod)&&((tt=ye.state)==null?void 0:tt._isRedirect)!==!0;l&&(o=l,l=void 0),P||A===Sn.Pop||(A===Sn.Push?e.history.push(ye,ye.state):A===Sn.Replace&&e.history.replace(ye,ye.state));let Or;if(A===Sn.Pop){let ct=L.get(T.location.pathname);ct&&ct.has(ye.pathname)?Or={currentLocation:T.location,nextLocation:ye}:L.has(ye.pathname)&&(Or={currentLocation:ye,nextLocation:T.location})}else if(N){let ct=L.get(T.location.pathname);ct?ct.add(ye.pathname):(ct=new Set([ye.pathname]),L.set(T.location.pathname,ct)),Or={currentLocation:T.location,nextLocation:ye}}Xe(hn({},Se,{actionData:ot,loaderData:xt,historyAction:A,location:ye,initialized:!0,navigation:ww,revalidation:"idle",restoreScrollPosition:On(ye,Se.matches||T.matches),preventScrollReset:Lr,blockers:Ct}),{viewTransitionOpts:Or,flushSync:Tt===!0}),A=Sn.Pop,$=!1,N=!1,P=!1,_=!1,M=[],j=[]}async function Pt(ye,Se){if(typeof ye=="number"){e.history.go(ye);return}let Ae=YE(T.location,T.matches,a,u.v7_prependBasename,ye,u.v7_relativeSplatPath,Se==null?void 0:Se.fromRouteId,Se==null?void 0:Se.relative),{path:Ue,submission:tt,error:Tt}=JF(u.v7_normalizeFormMethod,!1,Ae,Se),vt=T.location,ot=Vm(T.location,Ue,Se&&Se.state);ot=hn({},ot,e.history.encodeLocation(ot));let xt=Se&&Se.replace!=null?Se.replace:void 0,Ct=Sn.Push;xt===!0?Ct=Sn.Replace:xt===!1||tt!=null&&Do(tt.formMethod)&&tt.formAction===T.location.pathname+T.location.search&&(Ct=Sn.Replace);let Lr=Se&&"preventScrollReset"in Se?Se.preventScrollReset===!0:void 0,Or=(Se&&Se.unstable_flushSync)===!0,ct=tn({currentLocation:vt,nextLocation:ot,historyAction:Ct});if(ct){sr(ct,{state:"blocked",location:ot,proceed(){sr(ct,{state:"proceeding",proceed:void 0,reset:void 0,location:ot}),Pt(ye,Se)},reset(){let Kt=new Map(T.blockers);Kt.set(ct,dp),Xe({blockers:Kt})}});return}return await Ee(Ct,ot,{submission:tt,pendingError:Tt,preventScrollReset:Lr,replace:Se&&Se.replace,enableViewTransition:Se&&Se.unstable_viewTransition,flushSync:Or})}function V(){if(Ze(),Xe({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){Ee(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}Ee(A||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function Ee(ye,Se,Ae){I&&I.abort(),I=null,A=ye,P=(Ae&&Ae.startUninterruptedRevalidation)===!0,Ln(T.location,T.matches),$=(Ae&&Ae.preventScrollReset)===!0,N=(Ae&&Ae.enableViewTransition)===!0;let Ue=l||o,tt=Ae&&Ae.overrideNavigation,Tt=cd(Ue,Se,a),vt=(Ae&&Ae.flushSync)===!0;if(!Tt){let ct=Hs(404,{pathname:Se.pathname}),{matches:Kt,route:or}=iP(Ue);ys(),$t(Se,{matches:Kt,loaderData:{},errors:{[or.id]:ct}},{flushSync:vt});return}if(T.initialized&&!_&&lJ(T.location,Se)&&!(Ae&&Ae.submission&&Do(Ae.submission.formMethod))){$t(Se,{matches:Tt},{flushSync:vt});return}I=new AbortController;let ot=Nh(e.history,Se,I.signal,Ae&&Ae.submission),xt;if(Ae&&Ae.pendingError)xt=[nm(Tt).route.id,{type:sn.error,error:Ae.pendingError}];else if(Ae&&Ae.submission&&Do(Ae.submission.formMethod)){let ct=await De(ot,Se,Ae.submission,Tt,{replace:Ae.replace,flushSync:vt});if(ct.shortCircuited)return;xt=ct.pendingActionResult,tt=Sw(Se,Ae.submission),vt=!1,ot=Nh(e.history,ot.url,ot.signal)}let{shortCircuited:Ct,loaderData:Lr,errors:Or}=await oe(ot,Se,Tt,tt,Ae&&Ae.submission,Ae&&Ae.fetcherSubmission,Ae&&Ae.replace,Ae&&Ae.initialHydration===!0,vt,xt);Ct||(I=null,$t(Se,hn({matches:Tt},nP(xt),{loaderData:Lr,errors:Or})))}async function De(ye,Se,Ae,Ue,tt){tt===void 0&&(tt={}),Ze();let Tt=dJ(Se,Ae);Xe({navigation:Tt},{flushSync:tt.flushSync===!0});let vt,ot=QE(Ue,Se);if(!ot.route.action&&!ot.route.lazy)vt={type:sn.error,error:Hs(405,{method:ye.method,pathname:Se.pathname,routeId:ot.route.id})};else if(vt=(await be("action",ye,[ot],Ue))[0],ye.signal.aborted)return{shortCircuited:!0};if(ac(vt)){let xt;return tt&&tt.replace!=null?xt=tt.replace:xt=QF(vt.response.headers.get("Location"),new URL(ye.url),a)===T.location.pathname+T.location.search,await _e(ye,vt,{submission:Ae,replace:xt}),{shortCircuited:!0}}if(oc(vt))throw Hs(400,{type:"defer-action"});if(Gs(vt)){let xt=nm(Ue,ot.route.id);return(tt&&tt.replace)!==!0&&(A=Sn.Push),{pendingActionResult:[xt.route.id,vt]}}return{pendingActionResult:[ot.route.id,vt]}}async function oe(ye,Se,Ae,Ue,tt,Tt,vt,ot,xt,Ct){let Lr=Ue||Sw(Se,tt),Or=tt||Tt||aP(Lr),ct=l||o,[Kt,or]=XF(e.history,T,Ae,Or,Se,u.v7_partialHydration&&ot===!0,u.unstable_skipActionErrorRevalidation,_,M,j,te,X,Y,ct,a,Ct);if(ys(Qe=>!(Ae&&Ae.some(Bt=>Bt.route.id===Qe))||Kt&&Kt.some(Bt=>Bt.route.id===Qe)),q=++G,Kt.length===0&&or.length===0){let Qe=_t();return $t(Se,hn({matches:Ae,loaderData:{},errors:Ct&&Gs(Ct[1])?{[Ct[0]]:Ct[1].error}:null},nP(Ct),Qe?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt}),{shortCircuited:!0}}if(!P&&(!u.v7_partialHydration||!ot)){or.forEach(Bt=>{let Jt=T.fetchers.get(Bt.key),Gt=fp(void 0,Jt?Jt.data:void 0);T.fetchers.set(Bt.key,Gt)});let Qe;Ct&&!Gs(Ct[1])?Qe={[Ct[0]]:Ct[1].data}:T.actionData&&(Object.keys(T.actionData).length===0?Qe=null:Qe=T.actionData),Xe(hn({navigation:Lr},Qe!==void 0?{actionData:Qe}:{},or.length>0?{fetchers:new Map(T.fetchers)}:{}),{flushSync:xt})}or.forEach(Qe=>{R.has(Qe.key)&&St(Qe.key),Qe.controller&&R.set(Qe.key,Qe.controller)});let Mi=()=>or.forEach(Qe=>St(Qe.key));I&&I.signal.addEventListener("abort",Mi);let{loaderResults:Tn,fetcherResults:$n}=await Ne(T.matches,Ae,Kt,or,ye);if(ye.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",Mi),or.forEach(Qe=>R.delete(Qe.key));let Ur=sP([...Tn,...$n]);if(Ur){if(Ur.idx>=Kt.length){let Qe=or[Ur.idx-Kt.length].key;Y.add(Qe)}return await _e(ye,Ur.result,{replace:vt}),{shortCircuited:!0}}let{loaderData:ei,errors:rt}=tP(T,Ae,Kt,Tn,Ct,or,$n,Z);Z.forEach((Qe,Bt)=>{Qe.subscribe(Jt=>{(Jt||Qe.done)&&Z.delete(Bt)})}),u.v7_partialHydration&&ot&&T.errors&&Object.entries(T.errors).filter(Qe=>{let[Bt]=Qe;return!Kt.some(Jt=>Jt.route.id===Bt)}).forEach(Qe=>{let[Bt,Jt]=Qe;rt=Object.assign(rt||{},{[Bt]:Jt})});let fe=_t(),Le=yt(q),it=fe||Le||or.length>0;return hn({loaderData:ei,errors:rt},it?{fetchers:new Map(T.fetchers)}:{})}function ne(ye,Se,Ae,Ue){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");R.has(ye)&&St(ye);let tt=(Ue&&Ue.unstable_flushSync)===!0,Tt=l||o,vt=YE(T.location,T.matches,a,u.v7_prependBasename,Ae,u.v7_relativeSplatPath,Se,Ue==null?void 0:Ue.relative),ot=cd(Tt,vt,a);if(!ot){Te(ye,Se,Hs(404,{pathname:vt}),{flushSync:tt});return}let{path:xt,submission:Ct,error:Lr}=JF(u.v7_normalizeFormMethod,!0,vt,Ue);if(Lr){Te(ye,Se,Lr,{flushSync:tt});return}let Or=QE(ot,xt);if($=(Ue&&Ue.preventScrollReset)===!0,Ct&&Do(Ct.formMethod)){ge(ye,Se,xt,Or,ot,tt,Ct);return}X.set(ye,{routeId:Se,path:xt}),Ie(ye,Se,xt,Or,ot,tt,Ct)}async function ge(ye,Se,Ae,Ue,tt,Tt,vt){if(Ze(),X.delete(ye),!Ue.route.action&&!Ue.route.lazy){let Gt=Hs(405,{method:vt.formMethod,pathname:Ae,routeId:Se});Te(ye,Se,Gt,{flushSync:Tt});return}let ot=T.fetchers.get(ye);ce(ye,fJ(vt,ot),{flushSync:Tt});let xt=new AbortController,Ct=Nh(e.history,Ae,xt.signal,vt);R.set(ye,xt);let Lr=G,ct=(await be("action",Ct,[Ue],tt))[0];if(Ct.signal.aborted){R.get(ye)===xt&&R.delete(ye);return}if(u.v7_fetcherPersist&&te.has(ye)){if(ac(ct)||Gs(ct)){ce(ye,Fl(void 0));return}}else{if(ac(ct))if(R.delete(ye),q>Lr){ce(ye,Fl(void 0));return}else return Y.add(ye),ce(ye,fp(vt)),_e(Ct,ct,{fetcherSubmission:vt});if(Gs(ct)){Te(ye,Se,ct.error);return}}if(oc(ct))throw Hs(400,{type:"defer-action"});let Kt=T.navigation.location||T.location,or=Nh(e.history,Kt,xt.signal),Mi=l||o,Tn=T.navigation.state!=="idle"?cd(Mi,T.navigation.location,a):T.matches;zt(Tn,"Didn't find any matches after fetcher action");let $n=++G;ee.set(ye,$n);let Ur=fp(vt,ct.data);T.fetchers.set(ye,Ur);let[ei,rt]=XF(e.history,T,Tn,vt,Kt,!1,u.unstable_skipActionErrorRevalidation,_,M,j,te,X,Y,Mi,a,[Ue.route.id,ct]);rt.filter(Gt=>Gt.key!==ye).forEach(Gt=>{let Wr=Gt.key,xi=T.fetchers.get(Wr),zr=fp(void 0,xi?xi.data:void 0);T.fetchers.set(Wr,zr),R.has(Wr)&&St(Wr),Gt.controller&&R.set(Wr,Gt.controller)}),Xe({fetchers:new Map(T.fetchers)});let fe=()=>rt.forEach(Gt=>St(Gt.key));xt.signal.addEventListener("abort",fe);let{loaderResults:Le,fetcherResults:it}=await Ne(T.matches,Tn,ei,rt,or);if(xt.signal.aborted)return;xt.signal.removeEventListener("abort",fe),ee.delete(ye),R.delete(ye),rt.forEach(Gt=>R.delete(Gt.key));let Qe=sP([...Le,...it]);if(Qe){if(Qe.idx>=ei.length){let Gt=rt[Qe.idx-ei.length].key;Y.add(Gt)}return _e(or,Qe.result)}let{loaderData:Bt,errors:Jt}=tP(T,T.matches,ei,Le,void 0,rt,it,Z);if(T.fetchers.has(ye)){let Gt=Fl(ct.data);T.fetchers.set(ye,Gt)}yt($n),T.navigation.state==="loading"&&$n>q?(zt(A,"Expected pending action"),I&&I.abort(),$t(T.navigation.location,{matches:Tn,loaderData:Bt,errors:Jt,fetchers:new Map(T.fetchers)})):(Xe({errors:Jt,loaderData:rP(T.loaderData,Bt,Tn,Jt),fetchers:new Map(T.fetchers)}),_=!1)}async function Ie(ye,Se,Ae,Ue,tt,Tt,vt){let ot=T.fetchers.get(ye);ce(ye,fp(vt,ot?ot.data:void 0),{flushSync:Tt});let xt=new AbortController,Ct=Nh(e.history,Ae,xt.signal);R.set(ye,xt);let Lr=G,ct=(await be("loader",Ct,[Ue],tt))[0];if(oc(ct)&&(ct=await G5(ct,Ct.signal,!0)||ct),R.get(ye)===xt&&R.delete(ye),!Ct.signal.aborted){if(te.has(ye)){ce(ye,Fl(void 0));return}if(ac(ct))if(q>Lr){ce(ye,Fl(void 0));return}else{Y.add(ye),await _e(Ct,ct);return}if(Gs(ct)){Te(ye,Se,ct.error);return}zt(!oc(ct),"Unhandled fetcher deferred data"),ce(ye,Fl(ct.data))}}async function _e(ye,Se,Ae){let{submission:Ue,fetcherSubmission:tt,replace:Tt}=Ae===void 0?{}:Ae;Se.response.headers.has("X-Remix-Revalidate")&&(_=!0);let vt=Se.response.headers.get("Location");zt(vt,"Expected a Location header on the redirect Response"),vt=QF(vt,new URL(ye.url),a);let ot=Vm(T.location,vt,{_isRedirect:!0});if(r){let Kt=!1;if(Se.response.headers.has("X-Remix-Reload-Document"))Kt=!0;else if(rk.test(vt)){const or=e.history.createURL(vt);Kt=or.origin!==t.location.origin||cf(or.pathname,a)==null}if(Kt){Tt?t.location.replace(vt):t.location.assign(vt);return}}I=null;let xt=Tt===!0?Sn.Replace:Sn.Push,{formMethod:Ct,formAction:Lr,formEncType:Or}=T.navigation;!Ue&&!tt&&Ct&&Lr&&Or&&(Ue=aP(T.navigation));let ct=Ue||tt;if(JK.has(Se.response.status)&&ct&&Do(ct.formMethod))await Ee(xt,ot,{submission:hn({},ct,{formAction:vt}),preventScrollReset:$});else{let Kt=Sw(ot,Ue);await Ee(xt,ot,{overrideNavigation:Kt,fetcherSubmission:tt,preventScrollReset:$})}}async function be(ye,Se,Ae,Ue){try{let tt=await nJ(c,ye,Se,Ae,Ue,s,i);return await Promise.all(tt.map((Tt,vt)=>{if(uJ(Tt)){let ot=Tt.result;return{type:sn.redirect,response:oJ(ot,Se,Ae[vt].route.id,Ue,a,u.v7_relativeSplatPath)}}return sJ(Tt)}))}catch(tt){return Ae.map(()=>({type:sn.error,error:tt}))}}async function Ne(ye,Se,Ae,Ue,tt){let[Tt,...vt]=await Promise.all([Ae.length?be("loader",tt,Ae,Se):[],...Ue.map(ot=>{if(ot.matches&&ot.match&&ot.controller){let xt=Nh(e.history,ot.path,ot.controller.signal);return be("loader",xt,[ot.match],ot.matches).then(Ct=>Ct[0])}else return Promise.resolve({type:sn.error,error:Hs(404,{pathname:ot.path})})})]);return await Promise.all([oP(ye,Ae,Tt,Tt.map(()=>tt.signal),!1,T.loaderData),oP(ye,Ue.map(ot=>ot.match),vt,Ue.map(ot=>ot.controller?ot.controller.signal:null),!0)]),{loaderResults:Tt,fetcherResults:vt}}function Ze(){_=!0,M.push(...ys()),X.forEach((ye,Se)=>{R.has(Se)&&(j.push(Se),St(Se))})}function ce(ye,Se,Ae){Ae===void 0&&(Ae={}),T.fetchers.set(ye,Se),Xe({fetchers:new Map(T.fetchers)},{flushSync:(Ae&&Ae.flushSync)===!0})}function Te(ye,Se,Ae,Ue){Ue===void 0&&(Ue={});let tt=nm(T.matches,Se);Ye(ye),Xe({errors:{[tt.route.id]:Ae},fetchers:new Map(T.fetchers)},{flushSync:(Ue&&Ue.flushSync)===!0})}function Oe(ye){return u.v7_fetcherPersist&&(Q.set(ye,(Q.get(ye)||0)+1),te.has(ye)&&te.delete(ye)),T.fetchers.get(ye)||XK}function Ye(ye){let Se=T.fetchers.get(ye);R.has(ye)&&!(Se&&Se.state==="loading"&&ee.has(ye))&&St(ye),X.delete(ye),ee.delete(ye),Y.delete(ye),te.delete(ye),T.fetchers.delete(ye)}function Dt(ye){if(u.v7_fetcherPersist){let Se=(Q.get(ye)||0)-1;Se<=0?(Q.delete(ye),te.add(ye)):Q.set(ye,Se)}else Ye(ye);Xe({fetchers:new Map(T.fetchers)})}function St(ye){let Se=R.get(ye);zt(Se,"Expected fetch controller: "+ye),Se.abort(),R.delete(ye)}function Nt(ye){for(let Se of ye){let Ae=Oe(Se),Ue=Fl(Ae.data);T.fetchers.set(Se,Ue)}}function _t(){let ye=[],Se=!1;for(let Ae of Y){let Ue=T.fetchers.get(Ae);zt(Ue,"Expected fetcher: "+Ae),Ue.state==="loading"&&(Y.delete(Ae),ye.push(Ae),Se=!0)}return Nt(ye),Se}function yt(ye){let Se=[];for(let[Ae,Ue]of ee)if(Ue0}function Ft(ye,Se){let Ae=T.blockers.get(ye)||dp;return de.get(ye)!==Se&&de.set(ye,Se),Ae}function Rt(ye){T.blockers.delete(ye),de.delete(ye)}function sr(ye,Se){let Ae=T.blockers.get(ye)||dp;zt(Ae.state==="unblocked"&&Se.state==="blocked"||Ae.state==="blocked"&&Se.state==="blocked"||Ae.state==="blocked"&&Se.state==="proceeding"||Ae.state==="blocked"&&Se.state==="unblocked"||Ae.state==="proceeding"&&Se.state==="unblocked","Invalid blocker state transition: "+Ae.state+" -> "+Se.state);let Ue=new Map(T.blockers);Ue.set(ye,Se),Xe({blockers:Ue})}function tn(ye){let{currentLocation:Se,nextLocation:Ae,historyAction:Ue}=ye;if(de.size===0)return;de.size>1&&Rd(!1,"A router only supports one blocker at a time");let tt=Array.from(de.entries()),[Tt,vt]=tt[tt.length-1],ot=T.blockers.get(Tt);if(!(ot&&ot.state==="proceeding")&&vt({currentLocation:Se,nextLocation:Ae,historyAction:Ue}))return Tt}function ys(ye){let Se=[];return Z.forEach((Ae,Ue)=>{(!ye||ye(Ue))&&(Ae.cancel(),Se.push(Ue),Z.delete(Ue))}),Se}function Zn(ye,Se,Ae){if(f=ye,g=Se,p=Ae||null,!y&&T.navigation===ww){y=!0;let Ue=On(T.location,T.matches);Ue!=null&&Xe({restoreScrollPosition:Ue})}return()=>{f=null,g=null,p=null}}function Er(ye,Se){return p&&p(ye,Se.map(Ue=>TK(Ue,T.loaderData)))||ye.key}function Ln(ye,Se){if(f&&g){let Ae=Er(ye,Se);f[Ae]=g()}}function On(ye,Se){if(f){let Ae=Er(ye,Se),Ue=f[Ae];if(typeof Ue=="number")return Ue}return null}function Qn(ye){s={},l=XE(ye,i,void 0,s)}return w={get basename(){return a},get future(){return u},get state(){return T},get routes(){return o},get window(){return t},initialize:me,subscribe:je,enableScrollRestoration:Zn,navigate:Pt,fetch:ne,revalidate:V,createHref:ye=>e.history.createHref(ye),encodeLocation:ye=>e.history.encodeLocation(ye),getFetcher:Oe,deleteFetcher:Dt,dispose:Fe,getBlocker:Ft,deleteBlocker:Rt,_internalFetchControllers:R,_internalActiveDeferreds:Z,_internalSetRoutes:Qn},w}function QK(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function YE(e,t,r,n,i,s,o,l){let a,c;if(o){a=[];for(let h of t)if(a.push(h),h.route.id===o){c=h;break}}else a=t,c=t[t.length-1];let u=QA(i||".",ZA(a,s),cf(e.pathname,r)||e.pathname,l==="path");return i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c&&c.route.index&&!nk(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Ha([r,u.pathname])),_c(u)}function JF(e,t,r,n){if(!n||!QK(n))return{path:r};if(n.formMethod&&!hJ(n.formMethod))return{path:r,error:Hs(405,{method:n.formMethod})};let i=()=>({path:r,error:Hs(400,{type:"invalid-body"})}),s=n.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),l=W5(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Do(o))return i();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[g,y]=p;return""+f+g+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Do(o))return i();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:l,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return i()}}}zt(typeof FormData=="function","FormData is not available in this environment");let a,c;if(n.formData)a=ZE(n.formData),c=n.formData;else if(n.body instanceof FormData)a=ZE(n.body),c=n.body;else if(n.body instanceof URLSearchParams)a=n.body,c=eP(a);else if(n.body==null)a=new URLSearchParams,c=new FormData;else try{a=new URLSearchParams(n.body),c=eP(a)}catch{return i()}let u={formMethod:o,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Do(u.formMethod))return{path:r,submission:u};let h=nl(r);return t&&h.search&&nk(h.search)&&a.append("index",""),h.search="?"+a,{path:_c(h),submission:u}}function eJ(e,t){let r=e;if(t){let n=e.findIndex(i=>i.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function XF(e,t,r,n,i,s,o,l,a,c,u,h,d,f,p,g){let y=g?Gs(g[1])?g[1].error:g[1].data:void 0,b=e.createURL(t.location),v=e.createURL(i),E=g&&Gs(g[1])?g[0]:void 0,D=E?eJ(r,E):r,C=g?g[1].statusCode:void 0,w=o&&C&&C>=400,T=D.filter(($,I)=>{let{route:N}=$;if(N.lazy)return!0;if(N.loader==null)return!1;if(s)return typeof N.loader!="function"||N.loader.hydrate?!0:t.loaderData[N.id]===void 0&&(!t.errors||t.errors[N.id]===void 0);if(tJ(t.loaderData,t.matches[I],$)||a.some(P=>P===$.route.id))return!0;let L=t.matches[I],F=$;return YF($,hn({currentUrl:b,currentParams:L.params,nextUrl:v,nextParams:F.params},n,{actionResult:y,unstable_actionStatus:C,defaultShouldRevalidate:w?!1:l||b.pathname+b.search===v.pathname+v.search||b.search!==v.search||U5(L,F)}))}),A=[];return h.forEach(($,I)=>{if(s||!r.some(_=>_.route.id===$.routeId)||u.has(I))return;let N=cd(f,$.path,p);if(!N){A.push({key:I,routeId:$.routeId,path:$.path,matches:null,match:null,controller:null});return}let L=t.fetchers.get(I),F=QE(N,$.path),P=!1;d.has(I)?P=!1:c.includes(I)?P=!0:L&&L.state!=="idle"&&L.data===void 0?P=l:P=YF(F,hn({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:y,unstable_actionStatus:C,defaultShouldRevalidate:w?!1:l})),P&&A.push({key:I,routeId:$.routeId,path:$.path,matches:N,match:F,controller:new AbortController})}),[T,A]}function tJ(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function U5(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function YF(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ZF(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];zt(i,"No route found in manifest");let s={};for(let o in n){let a=i[o]!==void 0&&o!=="hasErrorBoundary";Rd(!a,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!a&&!EK.has(o)&&(s[o]=n[o])}Object.assign(i,s),Object.assign(i,hn({},t(i),{lazy:void 0}))}function rJ(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function nJ(e,t,r,n,i,s,o,l){let a=n.reduce((h,d)=>h.add(d.route.id),new Set),c=new Set,u=await e({matches:i.map(h=>{let d=a.has(h.route.id);return hn({},h,{shouldLoad:d,resolve:p=>(c.add(h.route.id),d?iJ(t,r,h,s,o,p,l):Promise.resolve({type:sn.data,result:void 0}))})}),request:r,params:i[0].params,context:l});return i.forEach(h=>zt(c.has(h.route.id),'`match.resolve()` was not called for route id "'+h.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((h,d)=>a.has(i[d].route.id))}async function iJ(e,t,r,n,i,s,o){let l,a,c=u=>{let h,d=new Promise((g,y)=>h=y);a=()=>h(),t.signal.addEventListener("abort",a);let f=g=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:o},...g!==void 0?[g]:[]),p;return s?p=s(g=>f(g)):p=(async()=>{try{return{type:"data",result:await f()}}catch(g){return{type:"error",result:g}}})(),Promise.race([p,d])};try{let u=r.route[e];if(r.route.lazy)if(u){let h,[d]=await Promise.all([c(u).catch(f=>{h=f}),ZF(r.route,i,n)]);if(h!==void 0)throw h;l=d}else if(await ZF(r.route,i,n),u=r.route[e],u)l=await c(u);else if(e==="action"){let h=new URL(t.url),d=h.pathname+h.search;throw Hs(405,{method:t.method,pathname:d,routeId:r.route.id})}else return{type:sn.data,result:void 0};else if(u)l=await c(u);else{let h=new URL(t.url),d=h.pathname+h.search;throw Hs(404,{pathname:d})}zt(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:sn.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return l}async function sJ(e){let{result:t,type:r,status:n}=e;if(V5(t)){let o;try{let l=t.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(l){return{type:sn.error,error:l}}return r===sn.error?{type:sn.error,error:new ek(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:sn.data,data:o,statusCode:t.status,headers:t.headers}}if(r===sn.error)return{type:sn.error,error:t,statusCode:tk(t)?t.status:n};if(cJ(t)){var i,s;return{type:sn.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}return{type:sn.data,data:t,statusCode:n}}function oJ(e,t,r,n,i,s){let o=e.headers.get("Location");if(zt(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!rk.test(o)){let l=n.slice(0,n.findIndex(a=>a.route.id===r)+1);o=YE(new URL(t.url),l,i,!0,o,s),e.headers.set("Location",o)}return e}function QF(e,t,r){if(rk.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),s=cf(i.pathname,r)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function Nh(e,t,r,n){let i=e.createURL(W5(t)).toString(),s={signal:r};if(n&&Do(n.formMethod)){let{formMethod:o,formEncType:l}=n;s.method=o.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(n.json)):l==="text/plain"?s.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?s.body=ZE(n.formData):s.body=n.formData}return new Request(i,s)}function ZE(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function eP(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function aJ(e,t,r,n,i,s){let o={},l=null,a,c=!1,u={},h=n&&Gs(n[1])?n[1].error:void 0;return r.forEach((d,f)=>{let p=t[f].route.id;if(zt(!ac(d),"Cannot handle redirect results in processLoaderData"),Gs(d)){let g=d.error;if(h!==void 0&&(g=h,h=void 0),l=l||{},s)l[p]=g;else{let y=nm(e,p);l[y.route.id]==null&&(l[y.route.id]=g)}o[p]=void 0,c||(c=!0,a=tk(d.error)?d.error.status:500),d.headers&&(u[p]=d.headers)}else oc(d)?(i.set(p,d.deferredData),o[p]=d.deferredData.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(a=d.statusCode),d.headers&&(u[p]=d.headers)):(o[p]=d.data,d.statusCode&&d.statusCode!==200&&!c&&(a=d.statusCode),d.headers&&(u[p]=d.headers))}),h!==void 0&&n&&(l={[n[0]]:h},o[n[0]]=void 0),{loaderData:o,errors:l,statusCode:a||200,loaderHeaders:u}}function tP(e,t,r,n,i,s,o,l){let{loaderData:a,errors:c}=aJ(t,r,n,i,l,!1);for(let u=0;un.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function iP(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Hs(e,t){let{pathname:r,routeId:n,method:i,type:s}=t===void 0?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(o="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":s==="defer-action"?l="defer() is not supported in actions":s==="invalid-body"&&(l="Unable to encode submission body")):e===403?(o="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",l='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new ek(e||500,o,new Error(l),!0)}function sP(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ac(r))return{result:r,idx:t}}}function W5(e){let t=typeof e=="string"?nl(e):e;return _c(hn({},t,{hash:""}))}function lJ(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function uJ(e){return V5(e.result)&&KK.has(e.result.status)}function oc(e){return e.type===sn.deferred}function Gs(e){return e.type===sn.error}function ac(e){return(e&&e.type)===sn.redirect}function cJ(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function V5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hJ(e){return qK.has(e.toLowerCase())}function Do(e){return VK.has(e.toLowerCase())}async function oP(e,t,r,n,i,s){for(let o=0;oh.route.id===a.route.id),u=c!=null&&!U5(c,a)&&(s&&s[a.route.id])!==void 0;if(oc(l)&&(i||u)){let h=n[o];zt(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await G5(l,h,i).then(d=>{d&&(r[o]=d||r[o])})}}}async function G5(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:sn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:sn.error,error:i}}return{type:sn.data,data:e.deferredData.data}}}function nk(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function QE(e,t){let r=typeof t=="string"?nl(t).search:t.search;if(e[e.length-1].route.index&&nk(r||""))return e[e.length-1];let n=j5(e);return n[n.length-1]}function aP(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:s,json:o}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Sw(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function dJ(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function fp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function fJ(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Fl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function pJ(e,t){try{let r=e.sessionStorage.getItem(H5);if(r){let n=JSON.parse(r);for(let[i,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function mJ(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(H5,JSON.stringify(r))}catch(n){Rd(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.23.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Gm(){return Gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),H.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let h=QA(c,JSON.parse(o),s,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ja([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,s,e])}const vJ=H.createContext(null);function bJ(e){let t=H.useContext(Du).outlet;return t&&H.createElement(vJ.Provider,{value:e},t)}function Y5(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=H.useContext(Jc),{matches:i}=H.useContext(Du),{pathname:s}=Ob(),o=JSON.stringify(ZA(i,n.v7_relativeSplatPath));return H.useMemo(()=>QA(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function xJ(e,t,r,n){Ag()||jt(!1);let{navigator:i}=H.useContext(Jc),{matches:s}=H.useContext(Du),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Ob(),u;if(t){var h;let y=typeof t=="string"?rl(t):t;l==="/"||(h=y.pathname)!=null&&h.startsWith(l)||jt(!1),u=y}else u=c;let d=u.pathname||"/",f=d;if(l!=="/"){let y=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=cd(e,{pathname:f}),g=CJ(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:ja([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:ja([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n);return t&&g?H.createElement(Lb.Provider,{value:{location:Gm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Sn.Pop}},g):g}function wJ(){let e=_J(),t=tk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),r?H.createElement("pre",{style:i},r):null,null)}const SJ=H.createElement(wJ,null);class DJ extends H.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?H.createElement(Du.Provider,{value:this.props.routeContext},H.createElement(K5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EJ(e){let{routeContext:t,match:r,children:n}=e,i=H.useContext(Mb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),H.createElement(Du.Provider,{value:t},n)}function CJ(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let o=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||jt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,d)=>{let f,p=!1,g=null,y=null;r&&(f=a&&h.route.id?a[h.route.id]:void 0,g=h.route.errorElement||SJ,l&&(c<0&&d===0?(FJ("route-fallback",!1),p=!0,y=null):c===d&&(p=!0,y=h.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),v=()=>{let E;return f?E=g:p?E=y:h.route.Component?E=H.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=u,H.createElement(EJ,{match:h,routeContext:{outlet:u,matches:b,isDataRoute:r!=null},children:E})};return r&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?H.createElement(DJ,{location:r.location,revalidation:r.revalidation,component:g,error:f,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var Z5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Z5||{}),m0=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}(m0||{});function TJ(e){let t=H.useContext(Mb);return t||jt(!1),t}function AJ(e){let t=H.useContext(q5);return t||jt(!1),t}function kJ(e){let t=H.useContext(Du);return t||jt(!1),t}function Q5(e){let t=kJ(),r=t.matches[t.matches.length-1];return r.route.id||jt(!1),r.route.id}function _J(){var e;let t=H.useContext(K5),r=AJ(m0.UseRouteError),n=Q5(m0.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function $J(){let{router:e}=TJ(Z5.UseNavigateStable),t=Q5(m0.UseNavigateStable),r=H.useRef(!1);return J5(()=>{r.current=!0}),H.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Gm({fromRouteId:t},s)))},[e,t])}const lP={};function FJ(e,t,r){!t&&!lP[e]&&(lP[e]=!0)}function PJ(e){return bJ(e.context)}function eC(e){jt(!1)}function IJ(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Sn.Pop,navigator:s,static:o=!1,future:a}=e;Ag()&&jt(!1);let l=t.replace(/^\/*/,"/"),c=H.useMemo(()=>({basename:l,navigator:s,static:o,future:Gm({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof n=="string"&&(n=rl(n));let{pathname:u="/",search:h="",hash:d="",state:f=null,key:p="default"}=n,g=H.useMemo(()=>{let y=cf(u,l);return y==null?null:{location:{pathname:y,search:h,hash:d,state:f,key:p},navigationType:i}},[l,u,h,d,f,p,i]);return g==null?null:H.createElement(Jc.Provider,{value:c},H.createElement(Lb.Provider,{children:r,value:g}))}new Promise(()=>{});function tC(e,t){t===void 0&&(t=[]);let r=[];return H.Children.forEach(e,(n,i)=>{if(!H.isValidElement(n))return;let s=[...t,i];if(n.type===H.Fragment){r.push.apply(r,tC(n.props.children,s));return}n.type!==eC&&jt(!1),!n.props.index||!n.props.children||jt(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=tC(n.props.children,s)),r.push(o)}),r}function NJ(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:H.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:H.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:H.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Gm(){return Gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),H.useCallback(function(c,u){if(u===void 0&&(u={}),!l.current)return;if(typeof c=="number"){n.go(c);return}let h=QA(c,JSON.parse(o),s,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Ha([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,s,e])}const vJ=H.createContext(null);function bJ(e){let t=H.useContext(Du).outlet;return t&&H.createElement(vJ.Provider,{value:e},t)}function Y5(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=H.useContext(Jc),{matches:i}=H.useContext(Du),{pathname:s}=Ob(),o=JSON.stringify(ZA(i,n.v7_relativeSplatPath));return H.useMemo(()=>QA(e,JSON.parse(o),s,r==="path"),[e,o,s,r])}function xJ(e,t,r,n){Ag()||zt(!1);let{navigator:i}=H.useContext(Jc),{matches:s}=H.useContext(Du),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let c=Ob(),u;if(t){var h;let y=typeof t=="string"?nl(t):t;a==="/"||(h=y.pathname)!=null&&h.startsWith(a)||zt(!1),u=y}else u=c;let d=u.pathname||"/",f=d;if(a!=="/"){let y=a.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=cd(e,{pathname:f}),g=CJ(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Ha([a,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Ha([a,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r,n);return t&&g?H.createElement(Lb.Provider,{value:{location:Gm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Sn.Pop}},g):g}function wJ(){let e=_J(),t=tk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),r?H.createElement("pre",{style:i},r):null,null)}const SJ=H.createElement(wJ,null);class DJ extends H.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?H.createElement(Du.Provider,{value:this.props.routeContext},H.createElement(K5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function EJ(e){let{routeContext:t,match:r,children:n}=e,i=H.useContext(Mb);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),H.createElement(Du.Provider,{value:t},n)}function CJ(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let o=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let u=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);u>=0||zt(!1),o=o.slice(0,Math.min(o.length,u+1))}let a=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,d)=>{let f,p=!1,g=null,y=null;r&&(f=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||SJ,a&&(c<0&&d===0?(FJ("route-fallback",!1),p=!0,y=null):c===d&&(p=!0,y=h.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,d+1)),v=()=>{let E;return f?E=g:p?E=y:h.route.Component?E=H.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=u,H.createElement(EJ,{match:h,routeContext:{outlet:u,matches:b,isDataRoute:r!=null},children:E})};return r&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?H.createElement(DJ,{location:r.location,revalidation:r.revalidation,component:g,error:f,children:v(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):v()},null)}var Z5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Z5||{}),m0=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}(m0||{});function TJ(e){let t=H.useContext(Mb);return t||zt(!1),t}function AJ(e){let t=H.useContext(q5);return t||zt(!1),t}function kJ(e){let t=H.useContext(Du);return t||zt(!1),t}function Q5(e){let t=kJ(),r=t.matches[t.matches.length-1];return r.route.id||zt(!1),r.route.id}function _J(){var e;let t=H.useContext(K5),r=AJ(m0.UseRouteError),n=Q5(m0.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function $J(){let{router:e}=TJ(Z5.UseNavigateStable),t=Q5(m0.UseNavigateStable),r=H.useRef(!1);return J5(()=>{r.current=!0}),H.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Gm({fromRouteId:t},s)))},[e,t])}const lP={};function FJ(e,t,r){!t&&!lP[e]&&(lP[e]=!0)}function PJ(e){return bJ(e.context)}function eC(e){zt(!1)}function IJ(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Sn.Pop,navigator:s,static:o=!1,future:l}=e;Ag()&&zt(!1);let a=t.replace(/^\/*/,"/"),c=H.useMemo(()=>({basename:a,navigator:s,static:o,future:Gm({v7_relativeSplatPath:!1},l)}),[a,l,s,o]);typeof n=="string"&&(n=nl(n));let{pathname:u="/",search:h="",hash:d="",state:f=null,key:p="default"}=n,g=H.useMemo(()=>{let y=cf(u,a);return y==null?null:{location:{pathname:y,search:h,hash:d,state:f,key:p},navigationType:i}},[a,u,h,d,f,p,i]);return g==null?null:H.createElement(Jc.Provider,{value:c},H.createElement(Lb.Provider,{children:r,value:g}))}new Promise(()=>{});function tC(e,t){t===void 0&&(t=[]);let r=[];return H.Children.forEach(e,(n,i)=>{if(!H.isValidElement(n))return;let s=[...t,i];if(n.type===H.Fragment){r.push.apply(r,tC(n.props.children,s));return}n.type!==eC&&zt(!1),!n.props.index||!n.props.children||zt(!1);let o={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=tC(n.props.children,s)),r.push(o)}),r}function NJ(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:H.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:H.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:H.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.23.1 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function LJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OJ(e,t){return e.button===0&&(!t||t==="_self")&&!LJ(e)}const RJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],BJ="6";try{window.__reactRouterVersion=BJ}catch{}function zJ(e,t){return ZK({basename:t==null?void 0:t.basename,future:qm({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:wK({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||jJ(),routes:e,mapRouteProperties:NJ,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,window:t==null?void 0:t.window}).initialize()}function jJ(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=qm({},t,{errors:HJ(t.errors)})),t}function HJ(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new ek(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let s=new Error(i.message);s.stack="",r[n]=s}}else r[n]=i;return r}const UJ=H.createContext({isTransitioning:!1}),WJ=H.createContext(new Map),VJ="startTransition",uP=uG[VJ],GJ="flushSync",cP=xK[GJ];function qJ(e){uP?uP(e):e()}function pp(e){cP?cP(e):e()}class KJ{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function JJ(e){let{fallbackElement:t,router:r,future:n}=e,[i,s]=H.useState(r.state),[o,a]=H.useState(),[l,c]=H.useState({isTransitioning:!1}),[u,h]=H.useState(),[d,f]=H.useState(),[p,g]=H.useState(),y=H.useRef(new Map),{v7_startTransition:b}=n||{},v=H.useCallback(T=>{b?qJ(T):T()},[b]),E=H.useCallback((T,A)=>{let{deletedFetchers:$,unstable_flushSync:I,unstable_viewTransitionOpts:N}=A;$.forEach(F=>y.current.delete(F)),T.fetchers.forEach((F,P)=>{F.data!==void 0&&y.current.set(P,F.data)});let L=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!N||L){I?pp(()=>s(T)):v(()=>s(T));return}if(I){pp(()=>{d&&(u&&u.resolve(),d.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let F=r.window.document.startViewTransition(()=>{pp(()=>s(T))});F.finished.finally(()=>{pp(()=>{h(void 0),f(void 0),a(void 0),c({isTransitioning:!1})})}),pp(()=>f(F));return}d?(u&&u.resolve(),d.skipTransition(),g({state:T,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(T),c({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[r.window,d,u,y,v]);H.useLayoutEffect(()=>r.subscribe(E),[r,E]),H.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new KJ)},[l]),H.useEffect(()=>{if(u&&o&&r.window){let T=o,A=u.promise,$=r.window.document.startViewTransition(async()=>{v(()=>s(T)),await A});$.finished.finally(()=>{h(void 0),f(void 0),a(void 0),c({isTransitioning:!1})}),f($)}},[v,o,u,r.window]),H.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,d,i.location,o]),H.useEffect(()=>{!l.isTransitioning&&p&&(a(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),g(void 0))},[l.isTransitioning,p]),H.useEffect(()=>{},[]);let D=H.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:T=>r.navigate(T),push:(T,A,$)=>r.navigate(T,{state:A,preventScrollReset:$==null?void 0:$.preventScrollReset}),replace:(T,A,$)=>r.navigate(T,{replace:!0,state:A,preventScrollReset:$==null?void 0:$.preventScrollReset})}),[r]),C=r.basename||"/",w=H.useMemo(()=>({router:r,navigator:D,static:!1,basename:C}),[r,D,C]);return H.createElement(H.Fragment,null,H.createElement(Mb.Provider,{value:w},H.createElement(q5.Provider,{value:i},H.createElement(WJ.Provider,{value:y.current},H.createElement(UJ.Provider,{value:l},H.createElement(IJ,{basename:C,location:i.location,navigationType:i.historyAction,navigator:D,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?H.createElement(XJ,{routes:r.routes,future:r.future,state:i}):t))))),null)}function XJ(e){let{routes:t,future:r,state:n}=e;return xJ(t,void 0,n,r)}const YJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ik=H.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,unstable_viewTransition:h}=t,d=MJ(t,RJ),{basename:f}=H.useContext(Jc),p,g=!1;if(typeof c=="string"&&ZJ.test(c)&&(p=c,YJ))try{let E=new URL(window.location.href),D=c.startsWith("//")?new URL(E.protocol+c):new URL(c),C=cf(D.pathname,f);D.origin===E.origin&&C!=null?c=C+D.search+D.hash:g=!0}catch{}let y=gJ(c,{relative:i}),b=QJ(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:h});function v(E){n&&n(E),E.defaultPrevented||b(E)}return H.createElement("a",qm({},d,{href:p||y,onClick:g||s?n:v,ref:r,target:l}))});var hP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hP||(hP={}));var dP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dP||(dP={}));function QJ(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=X5(),c=Ob(),u=Y5(e,{relative:o});return H.useCallback(h=>{if(OJ(h,r)){h.preventDefault();let d=n!==void 0?n:_c(c)===_c(u);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[c,l,u,n,i,r,e,s,o,a])}var eX={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fP=e=>{let t;const r=new Set,n=(u,h)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const f=t;t=h??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(p=>p(t,f))}},i=()=>t,l={setState:n,getState:i,getInitialState:()=>c,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{(eX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},c=t=e(n,i,l);return l},tX=e=>e?fP(e):fP;var e6={exports:{}},t6={},r6={exports:{}},n6={};/** + */function qm(){return qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function LJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function OJ(e,t){return e.button===0&&(!t||t==="_self")&&!LJ(e)}const RJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],BJ="6";try{window.__reactRouterVersion=BJ}catch{}function jJ(e,t){return ZK({basename:t==null?void 0:t.basename,future:qm({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:wK({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||zJ(),routes:e,mapRouteProperties:NJ,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy,window:t==null?void 0:t.window}).initialize()}function zJ(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=qm({},t,{errors:HJ(t.errors)})),t}function HJ(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new ek(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let s=new Error(i.message);s.stack="",r[n]=s}}else r[n]=i;return r}const UJ=H.createContext({isTransitioning:!1}),WJ=H.createContext(new Map),VJ="startTransition",uP=uG[VJ],GJ="flushSync",cP=xK[GJ];function qJ(e){uP?uP(e):e()}function pp(e){cP?cP(e):e()}class KJ{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function JJ(e){let{fallbackElement:t,router:r,future:n}=e,[i,s]=H.useState(r.state),[o,l]=H.useState(),[a,c]=H.useState({isTransitioning:!1}),[u,h]=H.useState(),[d,f]=H.useState(),[p,g]=H.useState(),y=H.useRef(new Map),{v7_startTransition:b}=n||{},v=H.useCallback(T=>{b?qJ(T):T()},[b]),E=H.useCallback((T,A)=>{let{deletedFetchers:$,unstable_flushSync:I,unstable_viewTransitionOpts:N}=A;$.forEach(F=>y.current.delete(F)),T.fetchers.forEach((F,P)=>{F.data!==void 0&&y.current.set(P,F.data)});let L=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!N||L){I?pp(()=>s(T)):v(()=>s(T));return}if(I){pp(()=>{d&&(u&&u.resolve(),d.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let F=r.window.document.startViewTransition(()=>{pp(()=>s(T))});F.finished.finally(()=>{pp(()=>{h(void 0),f(void 0),l(void 0),c({isTransitioning:!1})})}),pp(()=>f(F));return}d?(u&&u.resolve(),d.skipTransition(),g({state:T,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(l(T),c({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[r.window,d,u,y,v]);H.useLayoutEffect(()=>r.subscribe(E),[r,E]),H.useEffect(()=>{a.isTransitioning&&!a.flushSync&&h(new KJ)},[a]),H.useEffect(()=>{if(u&&o&&r.window){let T=o,A=u.promise,$=r.window.document.startViewTransition(async()=>{v(()=>s(T)),await A});$.finished.finally(()=>{h(void 0),f(void 0),l(void 0),c({isTransitioning:!1})}),f($)}},[v,o,u,r.window]),H.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,d,i.location,o]),H.useEffect(()=>{!a.isTransitioning&&p&&(l(p.state),c({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),g(void 0))},[a.isTransitioning,p]),H.useEffect(()=>{},[]);let D=H.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:T=>r.navigate(T),push:(T,A,$)=>r.navigate(T,{state:A,preventScrollReset:$==null?void 0:$.preventScrollReset}),replace:(T,A,$)=>r.navigate(T,{replace:!0,state:A,preventScrollReset:$==null?void 0:$.preventScrollReset})}),[r]),C=r.basename||"/",w=H.useMemo(()=>({router:r,navigator:D,static:!1,basename:C}),[r,D,C]);return H.createElement(H.Fragment,null,H.createElement(Mb.Provider,{value:w},H.createElement(q5.Provider,{value:i},H.createElement(WJ.Provider,{value:y.current},H.createElement(UJ.Provider,{value:a},H.createElement(IJ,{basename:C,location:i.location,navigationType:i.historyAction,navigator:D,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},i.initialized||r.future.v7_partialHydration?H.createElement(XJ,{routes:r.routes,future:r.future,state:i}):t))))),null)}function XJ(e){let{routes:t,future:r,state:n}=e;return xJ(t,void 0,n,r)}const YJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ik=H.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:s,replace:o,state:l,target:a,to:c,preventScrollReset:u,unstable_viewTransition:h}=t,d=MJ(t,RJ),{basename:f}=H.useContext(Jc),p,g=!1;if(typeof c=="string"&&ZJ.test(c)&&(p=c,YJ))try{let E=new URL(window.location.href),D=c.startsWith("//")?new URL(E.protocol+c):new URL(c),C=cf(D.pathname,f);D.origin===E.origin&&C!=null?c=C+D.search+D.hash:g=!0}catch{}let y=gJ(c,{relative:i}),b=QJ(c,{replace:o,state:l,target:a,preventScrollReset:u,relative:i,unstable_viewTransition:h});function v(E){n&&n(E),E.defaultPrevented||b(E)}return H.createElement("a",qm({},d,{href:p||y,onClick:g||s?n:v,ref:r,target:a}))});var hP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hP||(hP={}));var dP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dP||(dP={}));function QJ(e,t){let{target:r,replace:n,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:l}=t===void 0?{}:t,a=X5(),c=Ob(),u=Y5(e,{relative:o});return H.useCallback(h=>{if(OJ(h,r)){h.preventDefault();let d=n!==void 0?n:_c(c)===_c(u);a(e,{replace:d,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:l})}},[c,a,u,n,i,r,e,s,o,l])}var eX={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const fP=e=>{let t;const r=new Set,n=(u,h)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const f=t;t=h??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(p=>p(t,f))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>c,subscribe:u=>(r.add(u),()=>r.delete(u)),destroy:()=>{(eX?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},c=t=e(n,i,a);return a},tX=e=>e?fP(e):fP;var e6={exports:{}},t6={},r6={exports:{}},n6={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -81,14 +81,14 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Rb=H,dX=hX;function fX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pX=typeof Object.is=="function"?Object.is:fX,mX=dX.useSyncExternalStore,gX=Rb.useRef,yX=Rb.useEffect,vX=Rb.useMemo,bX=Rb.useDebugValue;t6.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var s=gX(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=vX(function(){function l(f){if(!c){if(c=!0,u=f,f=n(f),i!==void 0&&o.hasValue){var p=o.value;if(i(p,f))return h=p}return h=f}if(p=h,pX(u,f))return p;var g=n(f);return i!==void 0&&i(p,g)?p:(u=f,h=g)}var c=!1,u,h,d=r===void 0?null:r;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,r,n,i]);var a=mX(e,s[0],s[1]);return yX(function(){o.hasValue=!0,o.value=a},[a]),bX(a),a};e6.exports=t6;var xX=e6.exports;const wX=uo(xX);var i6={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:SX}=Mt,{useSyncExternalStoreWithSelector:DX}=wX;let pP=!1;const EX=e=>e;function CX(e,t=EX,r){(i6?"production":void 0)!=="production"&&r&&!pP&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),pP=!0);const n=DX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return SX(n),n}const mP=e=>{(i6?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?tX(e):e,r=(n,i)=>CX(t,n,i);return Object.assign(r,t),r},s6=e=>e?mP(e):mP;var Tv={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const rC=new Map,Cy=e=>{const t=rC.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},TX=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=rC.get(r.name);if(n)return{type:"tracked",store:e,...n};const i={connection:t.connect(r),stores:{}};return rC.set(r.name,i),{type:"tracked",store:e,...i}},AX=(e,t={})=>(r,n,i)=>{const{enabled:s,anonymousActionType:o,store:a,...l}=t;let c;try{c=(s??(Tv?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Tv?"production":void 0)!=="production"&&s&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,n,i);const{connection:u,...h}=TX(a,c,l);let d=!0;i.setState=(g,y,b)=>{const v=r(g,y);if(!d)return v;const E=b===void 0?{type:o||"anonymous"}:typeof b=="string"?{type:b}:b;return a===void 0?(u==null||u.send(E,n()),v):(u==null||u.send({...E,type:`${a}/${E.type}`},{...Cy(l.name),[a]:i.getState()}),v)};const f=(...g)=>{const y=d;d=!1,r(...g),d=y},p=e(i.setState,n,i);if(h.type==="untracked"?u==null||u.init(p):(h.stores[h.store]=i,u==null||u.init(Object.fromEntries(Object.entries(h.stores).map(([g,y])=>[g,g===h.store?p:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let g=!1;const y=i.dispatch;i.dispatch=(...b)=>{(Tv?"production":void 0)!=="production"&&b[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),y(...b)}}return u.subscribe(g=>{var y;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ew(g.payload,b=>{if(b.type==="__setState"){if(a===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(` + */var Rb=H,dX=hX;function fX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pX=typeof Object.is=="function"?Object.is:fX,mX=dX.useSyncExternalStore,gX=Rb.useRef,yX=Rb.useEffect,vX=Rb.useMemo,bX=Rb.useDebugValue;t6.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var s=gX(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=vX(function(){function a(f){if(!c){if(c=!0,u=f,f=n(f),i!==void 0&&o.hasValue){var p=o.value;if(i(p,f))return h=p}return h=f}if(p=h,pX(u,f))return p;var g=n(f);return i!==void 0&&i(p,g)?p:(u=f,h=g)}var c=!1,u,h,d=r===void 0?null:r;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,r,n,i]);var l=mX(e,s[0],s[1]);return yX(function(){o.hasValue=!0,o.value=l},[l]),bX(l),l};e6.exports=t6;var xX=e6.exports;const wX=uo(xX);var i6={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:SX}=Mt,{useSyncExternalStoreWithSelector:DX}=wX;let pP=!1;const EX=e=>e;function CX(e,t=EX,r){(i6?"production":void 0)!=="production"&&r&&!pP&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),pP=!0);const n=DX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return SX(n),n}const mP=e=>{(i6?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?tX(e):e,r=(n,i)=>CX(t,n,i);return Object.assign(r,t),r},s6=e=>e?mP(e):mP;var Tv={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const rC=new Map,Cy=e=>{const t=rC.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},TX=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=rC.get(r.name);if(n)return{type:"tracked",store:e,...n};const i={connection:t.connect(r),stores:{}};return rC.set(r.name,i),{type:"tracked",store:e,...i}},AX=(e,t={})=>(r,n,i)=>{const{enabled:s,anonymousActionType:o,store:l,...a}=t;let c;try{c=(s??(Tv?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Tv?"production":void 0)!=="production"&&s&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,n,i);const{connection:u,...h}=TX(l,c,a);let d=!0;i.setState=(g,y,b)=>{const v=r(g,y);if(!d)return v;const E=b===void 0?{type:o||"anonymous"}:typeof b=="string"?{type:b}:b;return l===void 0?(u==null||u.send(E,n()),v):(u==null||u.send({...E,type:`${l}/${E.type}`},{...Cy(a.name),[l]:i.getState()}),v)};const f=(...g)=>{const y=d;d=!1,r(...g),d=y},p=e(i.setState,n,i);if(h.type==="untracked"?u==null||u.init(p):(h.stores[h.store]=i,u==null||u.init(Object.fromEntries(Object.entries(h.stores).map(([g,y])=>[g,g===h.store?p:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let g=!1;const y=i.dispatch;i.dispatch=(...b)=>{(Tv?"production":void 0)!=="production"&&b[0].type==="__setState"&&!g&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),g=!0),y(...b)}}return u.subscribe(g=>{var y;switch(g.type){case"ACTION":if(typeof g.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ew(g.payload,b=>{if(b.type==="__setState"){if(l===void 0){f(b.state);return}Object.keys(b.state).length!==1&&console.error(` [zustand devtools middleware] Unsupported __setState action format. When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } - `);const v=b.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&f(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(b)});case"DISPATCH":switch(g.payload.type){case"RESET":return f(p),a===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(Cy(l.name));case"COMMIT":if(a===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(Cy(l.name));case"ROLLBACK":return Ew(g.state,b=>{if(a===void 0){f(b),u==null||u.init(i.getState());return}f(b[a]),u==null||u.init(Cy(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ew(g.state,b=>{if(a===void 0){f(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[a])&&f(b[a])});case"IMPORT_STATE":{const{nextLiftedState:b}=g.payload,v=(y=b.computedStates.slice(-1)[0])==null?void 0:y.state;if(!v)return;f(a===void 0?v:v[a]),u==null||u.send(null,b);return}case"PAUSE_RECORDING":return d=!d}return}}),p},o6=AX,Ew=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function kX(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var s;const o=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,t==null?void 0:t.replacer)),removeItem:i=>r.removeItem(i)}}const Km=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Km(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Km(n)(r)}}}},_X=(e,t)=>(r,n,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,b)=>({...b,...y}),...t},o=!1;const a=new Set,l=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...y)},n,i);const u=Km(s.serialize),h=()=>{const y=s.partialize({...n()});let b;const v=u({state:y,version:s.version}).then(E=>c.setItem(s.name,E)).catch(E=>{b=E});if(b)throw b;return v},d=i.setState;i.setState=(y,b)=>{d(y,b),h()};const f=e((...y)=>{r(...y),h()},n,i);let p;const g=()=>{var y;if(!c)return;o=!1,a.forEach(v=>v(n()));const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,n()))||void 0;return Km(c.getItem.bind(c))(s.name).then(v=>{if(v)return s.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return p=s.merge(v,(E=n())!=null?E:f),r(p,!0),h()}).then(()=>{b==null||b(p,void 0),o=!0,l.forEach(v=>v(p))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:y=>{s={...s,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},g(),p||f},$X=(e,t)=>(r,n,i)=>{let s={storage:kX(()=>localStorage),partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...t},o=!1;const a=new Set,l=new Set;let c=s.storage;if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...g)},n,i);const u=()=>{const g=s.partialize({...n()});return c.setItem(s.name,{state:g,version:s.version})},h=i.setState;i.setState=(g,y)=>{h(g,y),u()};const d=e((...g)=>{r(...g),u()},n,i);i.getInitialState=()=>d;let f;const p=()=>{var g,y;if(!c)return;o=!1,a.forEach(v=>{var E;return v((E=n())!=null?E:d)});const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,(g=n())!=null?g:d))||void 0;return Km(c.getItem.bind(c))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return f=s.merge(v,(E=n())!=null?E:d),r(f,!0),u()}).then(()=>{b==null||b(f,void 0),f=n(),o=!0,l.forEach(v=>v(f))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:g=>{s={...s,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},s.skipHydration||p(),f||d},FX=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Tv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),_X(e,t)):$X(e,t),a6=FX,PX="theme-builder-state",IX="playground-state",g0=[2,4,6,10,20,30,40,50,60,70,80,90,94,96,98],y0=[{name:"bg-lvl-1-enabled",dark:3,light:14},{name:"bg-lvl-1-hover",dark:4,light:13},{name:"bg-lvl-1-pressed",dark:5,light:12},{name:"bg-lvl-2-enabled",dark:2,light:13},{name:"bg-lvl-2-hover",dark:3,light:12},{name:"bg-lvl-2-pressed",dark:4,light:11},{name:"bg-lvl-3-enabled",dark:1,light:12},{name:"bg-lvl-3-hover",dark:2,light:11},{name:"bg-lvl-3-pressed",dark:3,light:10},{name:"bg-transparent-full-enabled",dark:9,transparencyDark:100,light:6,transparencyLight:100},{name:"bg-transparent-semi-enabled",dark:9,transparencyDark:84,light:6,transparencyLight:92},{name:"bg-transparent-hover",dark:9,transparencyDark:76,light:6,transparencyLight:84},{name:"bg-transparent-pressed",dark:9,transparencyDark:68,light:6,transparencyLight:76},{name:"on-bg-enabled",dark:12,light:3},{name:"on-bg-hover",dark:11,light:4},{name:"on-bg-pressed",dark:10,light:5},{name:"on-bg-weak-enabled",dark:10,light:5},{name:"on-bg-weak-hover",dark:9,light:6},{name:"on-bg-weak-pressed",dark:8,light:7},{name:"on-contrast-enabled",dark:3,light:14},{name:"on-contrast-hover",dark:4,light:13},{name:"on-contrast-pressed",dark:5,light:12},{name:"contrast-high-enabled",dark:9,light:6},{name:"contrast-high-hover",dark:8,light:5},{name:"contrast-high-pressed",dark:7,light:4},{name:"contrast-low-enabled",dark:8,light:7},{name:"contrast-low-hover",dark:7,light:6},{name:"contrast-low-pressed",dark:6,light:5},{name:"border",dark:6,light:10}],NX={name:"Whitelabel",image:{light:"peace-in-a-box.svg",dark:"peace-in-a-box-white.svg"},alternativeColors:{brand:{hex:"#d2d4d9",dark:!0},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1}}},MX={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},LX={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},OX={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},RX={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},BX={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},zX={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},jX={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},HX={neutral:"#242629",brand:"#242629",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},UX={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},sk={branding:NX,spacing:MX,sizing:LX,typography:OX,border:RX,elevation:BX,transition:zX,font:jX,colors:HX,customColors:UX},gP=sk,pr=s6()(o6(a6(e=>({darkMode:!1,editorMarkup:"",theme:gP,speakingNames:y0,luminanceSteps:g0,developerMode:!1,resetDefaults:()=>{e(()=>({theme:gP,luminanceSteps:g0,speakingNames:y0}))},setAlternativeColors:t=>{e(({theme:r})=>({theme:{...r,branding:{...r.branding,alternativeColors:{...t}}}}))},setColors:t=>{e(({theme:r})=>({theme:{...r,colors:t}}))},setCustomColors:t=>{e(({theme:r})=>({theme:{...r,customColors:t}}))}}),{name:PX}))),ds=s6()(o6(a6(()=>({nodeTrees:{page:{name:"Page",serializedJson:"",isPage:!0}},currentId:"page",showBorders:!1,showSpacings:!1}),{name:IX}))),Mn=()=>{var e,t;if(typeof window<"u"){if(!((e=window.crypto)===null||e===void 0)&&e.randomUUID)return window.crypto.randomUUID();if(!((t=window.crypto)===null||t===void 0)&&t.getRandomValues)return window.crypto.getRandomValues(new Uint32Array(3)).join("-")}return Math.random().toString().substring(2)},l6=(e,t)=>{const r=e.children;Object.values(r).forEach(n=>{n.setAttribute(t.key,t.value),n.children.length>0&&l6(n,t)})},Fr=(...e)=>{let t="";return e.forEach((r,n)=>{if(r)if(typeof r=="string")t+=`${r} `;else for(let i in r)r[i]&&(t+=`${i} `)}),t.trim()},WX=["suppressHydrationWarning","suppressContentEditableWarning","translate","title","tabIndex","style","spellCheck","nonce","lang","hidden","draggable","dir","contextMenu","contentEditable","autoFocus","accessKey","is","inputMode","unselectable","security","results","vocab","typeof","rev","resource","rel","property","inlist","datatype","content","about","role","radioGroup","color"],Pr=(e,t)=>Object.keys(e).filter(r=>(r.startsWith("data-")||r.startsWith("aria-")||r.startsWith("default")||r.startsWith("auto")||r.startsWith("item")||r.startsWith("on")||WX.includes(r))&&!t.includes(r)).reduce((r,n)=>(r[n]=e[n],r),{}),VX=e=>{var t;const{top:r,bottom:n,left:i,right:s,height:o,width:a}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:c}=window;let u=r<0,h=n>l,d=i<0,f=s>c;const p=e.hasAttribute("data-outside-vy"),g=e.hasAttribute("data-outside-vx"),y=(t=e==null?void 0:e.parentElement)===null||t===void 0?void 0:t.getBoundingClientRect();return y&&(p&&(e.getAttribute("data-outside-vy")==="top"?u=y.top-(n-y.bottom)<0:h=y.bottom+(y.top-r)>l),g&&(e.getAttribute("data-outside-vx")==="left"?d=y.left-(s-y.right)<0:f=y.right+(y.left-i)>c)),{outTop:u,outBottom:h,outLeft:d,outRight:f}},ok=e=>{const{outTop:t,outBottom:r,outLeft:n,outRight:i}=VX(e);let s={};return t||r?(s={vy:t?"top":"bottom"},e.setAttribute("data-outside-vy",s.vy)):e.removeAttribute("data-outside-vy"),n||i?(s=Object.assign(Object.assign({},s),{vx:i?"right":"left"}),e.setAttribute("data-outside-vx",s.vx)):e.removeAttribute("data-outside-vx"),s};function GX(e,t){const r=t||H.useRef(t);function n(i){e.onClick&&e.onClick(i)}return H.createElement("button",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-button",e.className),type:e.type,disabled:e.disabled,"aria-label":e.label,"data-icon":e.icon,"data-size":e.size,"data-state":e.state,"data-width":e.width,"data-variant":e.variant,"data-no-text":e.noText,name:e.name,value:e.value,"aria-describedby":e.describedbyid,"aria-expanded":e.ariaexpanded,"aria-pressed":e.ariapressed,onClick:i=>n(i)}),e.children)}const qX=H.forwardRef(GX),Ot=qX,Kr="OVERWRITE_DEFAULT_ID",ak="LABEL SHOULD BE SET",uu="-message",cu="-valid-message",hu="-invalid-message",yP="-placeholder",Bb="TODO: Add a validMessage",zb="TODO: Add an invalidMessage",KX="Back",u6="Close Button";var nC;(function(e){e.FUNCTIONAL="functional",e.REGULAR="regular",e.EXPRESSIVE="expressive"})(nC||(nC={}));Object.entries(nC).map(([,e])=>e);var iC;(function(e){e.PRIMARY="primary"})(iC||(iC={}));var sC;(function(e){e.NEUTRAL_BG_LEVEL_1="neutral-bg-lvl-1",e.NEUTRAL_BG_LEVEL_2="neutral-bg-lvl-2",e.NEUTRAL_BG_LEVEL_3="neutral-bg-lvl-3",e.NEUTRAL_BG_TRANSPARENT_SEMI="neutral-bg-transparent-semi",e.NEUTRAL_BG_TRANSPARENT_FULL="neutral-bg-transparent-full",e.BRAND_BG_LEVEL_1="brand-bg-lvl-1",e.BRAND_BG_LEVEL_2="brand-bg-lvl-2",e.BRAND_BG_LEVEL_3="brand-bg-lvl-3",e.BRAND_BG_TRANSPARENT_SEMI="brand-bg-transparent-semi",e.BRAND_BG_TRANSPARENT_FULL="brand-bg-transparent-full",e.SUCCESSFUL_BG_LEVEL_1="successful-bg-lvl-1",e.SUCCESSFUL_BG_LEVEL_2="successful-bg-lvl-2",e.SUCCESSFUL_BG_LEVEL_3="successful-bg-lvl-3",e.SUCCESSFUL_BG_TRANSPARENT_SEMI="successful-bg-transparent-semi",e.SUCCESSFUL_BG_TRANSPARENT_FULL="successful-bg-transparent-full",e.CRITICAL_BG_LEVEL_1="critical-bg-lvl-1",e.CRITICAL_BG_LEVEL_2="critical-bg-lvl-2",e.CRITICAL_BG_LEVEL_3="critical-bg-lvl-3",e.CRITICAL_BG_TRANSPARENT_SEMI="critical-bg-transparent-semi",e.CRITICAL_BG_TRANSPARENT_Full="critical-bg-transparent-full",e.WARNING_BG_LEVEL_1="warning-bg-lvl-1",e.WARNING_BG_LEVEL_2="warning-bg-lvl-2",e.WARNING_BG_LEVEL_3="warning-bg-lvl-3",e.WARNING_BG_TRANSPARENT_SEMI="warning-bg-transparent-semi",e.WARNING_BG_TRANSPARENT_FULL="warning-bg-transparent-full",e.INFORMATIONAL_BG_LEVEL_1="informational-bg-lvl-1",e.INFORMATIONAL_BG_LEVEL_2="informational-bg-lvl-2",e.INFORMATIONAL_BG_LEVEL_3="informational-bg-lvl-3",e.INFORMATIONAL_BG_TRANSPARENT_SEMI="informational-bg-transparent-semi",e.INFORMATIONAL_BG_TRANSPARENT_FULL="informational-bg-transparent-full"})(sC||(sC={}));const JX=Object.entries(sC).map(([,e])=>e);Object.entries(iC).map(([,e])=>e);var oC;(function(e){e.CRITICAL="critical",e.INFORMATIONAL="informational",e.WARNING="warning",e.SUCCESSFUL="successful"})(oC||(oC={}));Object.entries(oC).map(([,e])=>e);const XX={width:390,height:884},YX={width:1920,height:1280};Object.assign({name:"desktop"},YX),Object.assign({name:"mobile"},XX);function ZX(e,t){var r;const n=t||H.useRef(t);function i(s){e.onClose&&e.onClose()}return H.createElement("article",Object.assign({ref:n},Pr(e,[]),{id:e.id,className:Fr("db-notification",e.className),"aria-live":e.ariaLive,"data-semantic":e.semantic,"data-variant":e.variant,"data-icon":e.icon,"data-link-variant":e.linkVariant}),H.createElement(H.Fragment,null,e.image),e.headline?H.createElement("header",null,e.headline):null,H.createElement("p",null,e.children),e.timestamp?H.createElement("span",null,e.timestamp):null,H.createElement(H.Fragment,null,e.link),e.behaviour!=="permanent"?H.createElement(Ot,{icon:"cross",variant:"ghost",size:"small",id:e.closeButtonId,noText:!0,onClick:s=>i()},(r=e.closeButtonText)!==null&&r!==void 0?r:u6):null)}const QX=H.forwardRef(ZX),v0=QX;function eY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-badge",e.className),"data-semantic":e.semantic,"data-size":e.size,"data-emphasis":e.emphasis,"data-placement":e.placement}),e.children)}const tY=H.forwardRef(eY),aC=tY;function rY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>({icon:"db"}));return H.createElement("div",Object.assign({ref:n},Pr(e,[]),{"data-icon":e.hideLogo?"none":(r=e.icon)!==null&&r!==void 0?r:i.icon,id:e.id,className:Fr("db-brand",e.className)}),e.children)}const nY=H.forwardRef(rY),iY=nY;function sY(e,t){const r=t||H.useRef(t);function n(i){e.onClick&&e.onClick(i)}return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,"data-behaviour":e.behaviour,"data-elevation-level":e.elevationLevel,"data-spacing":e.spacing,role:e.behaviour==="interactive"?"button":void 0,tabIndex:e.behaviour==="interactive"?0:void 0,onClick:i=>n(i),className:Fr("db-card",e.className)}),e.children)}const oY=H.forwardRef(sY),ls=oY;function aY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-infotext",e.className),"data-icon":e.icon,"data-semantic":e.semantic,"data-size":e.size}),e.children)}const lY=H.forwardRef(aY),Mr=lY;function uY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>Kr),[a,l]=H.useState(()=>Kr+uu),[c,u]=H.useState(()=>Kr+cu),[h,d]=H.useState(()=>Kr+hu),[f,p]=H.useState(()=>"");function g(D){e.onChange&&e.onChange(D),e.change&&e.change(D)}function y(D){e.onBlur&&e.onBlur(D),e.blur&&e.blur(D)}function b(D){e.onFocus&&e.onFocus(D),e.focus&&e.focus(D)}function v(){return e.validMessage||Bb}function E(){var D;return e.invalidMessage||((D=r.current)===null||D===void 0?void 0:D.validationMessage)||zb}return H.useEffect(()=>{i(!0),o(e.id||"checkbox-"+Mn())},[]),H.useEffect(()=>{n&&s&&(l(s+uu),u(s+cu),d(s+hu))},[s,n]),H.useEffect(()=>{const D=[c,h];e.message&&D.push(a),p(D.join(" "))},[e.message,a,c,h]),H.useEffect(()=>{if(n&&document&&s){const D=document==null?void 0:document.getElementById(s);D&&(e.checked!=null&&(D.checked=e.checked),e.indeterminate!==void 0&&(D.indeterminate=e.indeterminate))}},[n,e.indeterminate,e.checked]),H.createElement("div",{"data-size":e.size,"data-variant":e.variant,className:Fr("db-checkbox",e.className)},H.createElement("label",{htmlFor:s},H.createElement("input",Object.assign({type:"checkbox","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},Pr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,required:e.required,onChange:D=>g(D),onBlur:D=>y(D),onFocus:D=>b(D),"aria-describedby":f})),e.label?H.createElement("span",null,e.label):null,e.children),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:a},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:c},v()),H.createElement(Mr,{size:"small",semantic:"critical",id:h},E()))}const cY=H.forwardRef(uY),b0=cY;function hY(e,t){const r=t||H.useRef(t);return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,className:Fr("db-divider",e.className)}))}const dY=H.forwardRef(hY),aa=dY;function fY(e,t){var r;const n=t||H.useRef(t),i=H.useRef(null);function s(a){a.key==="Escape"&&a.preventDefault(),(a==="close"||a.key==="Escape"||a.target.nodeName==="DIALOG"&&a.type==="click"&&e.backdrop!=="none")&&e.onClose&&e.onClose(a)}function o(){n!=null&&n.current&&(e.open&&!n.current.open&&(i.current&&(i.current.hidden=!1),e.backdrop==="none"?n.current.show():n.current.showModal()),!e.open&&n.current.open&&(i.current&&(i.current.hidden=!0),setTimeout(()=>{var a;i.current&&(i.current.hidden=!1),(a=n.current)===null||a===void 0||a.close()},401)))}return H.useEffect(()=>{o()},[]),H.useEffect(()=>{o()},[e.open]),H.createElement("dialog",Object.assign({className:"db-drawer",id:e.id,ref:n},Pr(e,["onClose"]),{onClick:a=>{s(a)},onKeyDown:a=>s(a),"data-backdrop":e.backdrop}),H.createElement("article",{ref:i,className:Fr("db-drawer-container",e.className),"data-spacing":e.spacing,"data-width":e.width,"data-direction":e.direction,"data-rounded":e.rounded},H.createElement("header",{className:"db-drawer-header"},H.createElement("div",{className:"db-drawer-header-text"},H.createElement(H.Fragment,null,e.drawerHeader)),e.withCloseButton?H.createElement(Ot,{icon:"cross",variant:"ghost",className:"button-close-drawer",id:e.closeButtonId,noText:!0,onClick:a=>s("close")},(r=e.closeButtonText)!==null&&r!==void 0?r:u6):null),H.createElement("div",{className:"db-drawer-content"},e.children)))}const pY=H.forwardRef(fY),hf=pY,mY=e=>{var t,r;const{target:n}=e;return!!(!(!((t=n==null?void 0:n.classList)===null||t===void 0)&&t.contains("db-navigation-item-expand-button"))&&(!((r=n==null?void 0:n.parentElement)===null||r===void 0)&&r.classList.contains("db-navigation-item")))};class gY{constructor(t,r){this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=t,this.subNavigation=r,this.parentSubNavigation=this.element.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init()}init(){var t,r;const n=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.element.style.setProperty("--db-navigation-item-inline-size",`${n}px`),this.initialized=!0}enableFollow(){var t,r;if(!this.initialized||this.triangleData)return;const n=ok(this.subNavigation),i=this.element.getBoundingClientRect(),s=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.triangleData={itemRect:i,parentElementWidth:s,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(s-i.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?this.triangleData.outsideVX==="right"?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,this.triangleData.itemRect.width*.75):0}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return this.triangleData.outsideVY==="bottom"?t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height):t}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const t=this.triangleData.outsideVX==="right";return!!(t&&this.mouseX<-1*this.triangleData.padding||!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding)}getTriangleCoordinates(t){if(!this.triangleData)return;if(t==="fill-gap"){const o=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,a=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${a} ${o}`,lt:`${a} 0`,rt:"100% 0",rb:`100% ${o}`}}const r=this.getTriangleTipX(),n=this.getTriangleTipY(),i=`${r}px ${n+this.triangleData.padding}px`,s=`${r}px ${n-this.triangleData.padding}px`;return{lb:i,lt:s,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData)return;this.mouseX=t.clientX-this.triangleData.itemRect.left,this.mouseY=t.clientY-this.triangleData.itemRect.top;const r=this.hasMouseEnteredSubNavigation(),n=this.getTriangleCoordinates(r?"fill-gap":"safe-triangle");n&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${n.lb}, ${n.lt}, ${n.rt}, ${n.rb})`),r&&(this.triangleData=void 0))}}function yY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>Kr),[o,a]=H.useState(()=>!1),[l,c]=H.useState(()=>!1),[u,h]=H.useState(()=>({burgerMenuLabel:"BurgerMenu"}));function d(){e.onToggle&&e.onToggle(!e.drawerOpen)}function f(p){mY(p)&&d()}return H.useEffect(()=>{a(!0),s(e.id||"header-"+Mn())},[]),H.useEffect(()=>{if(o&&document&&i&&e.forceMobile){const p=document.getElementById(i);p&&l6(p,{key:"data-force-mobile",value:"true"}),c(!0)}},[o]),H.createElement("header",Object.assign({ref:n},Pr(e,[]),{className:Fr("db-header",e.className),id:i,"data-width":e.width,"data-on-forcing-mobile":e.forceMobile&&!l}),H.createElement(hf,{spacing:"small",className:"db-header-drawer",rounded:!0,withCloseButton:!0,open:e.drawerOpen,onClose:()=>d()},H.createElement("div",{className:"db-header-drawer-navigation"},H.createElement("div",{className:"db-header-navigation",onClick:p=>f(p)},e.children),H.createElement("div",{className:"db-header-meta-navigation"},H.createElement(H.Fragment,null,e.metaNavigation))),H.createElement("div",{className:"db-header-secondary-action"},H.createElement(H.Fragment,null,e.secondaryAction))),H.createElement("div",{className:"db-header-meta-navigation"},H.createElement(H.Fragment,null,e.metaNavigation)),H.createElement("div",{className:"db-header-navigation-bar"},H.createElement("div",{className:"db-header-brand-container"},H.createElement(H.Fragment,null,e.brand)),H.createElement("div",{className:"db-header-navigation-container"},H.createElement("div",{className:"db-header-navigation"},e.children),H.createElement("div",{className:"db-header-primary-action"},H.createElement(H.Fragment,null,e.primaryAction))),H.createElement("div",{className:"db-header-action-container"},H.createElement("div",{className:"db-header-burger-menu-container"},H.createElement(Ot,{id:"button-burger-menu",icon:"menu",variant:"ghost",noText:!0,onClick:()=>d()},(r=e.burgerMenuLabel)!==null&&r!==void 0?r:u.burgerMenuLabel)),H.createElement("div",{className:"db-header-secondary-action"},H.createElement(H.Fragment,null,e.secondaryAction)))))}const vY=H.forwardRef(yY),c6=vY;function bY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({"aria-hidden":"true",ref:r},Pr(e,[]),{id:e.id,className:Fr("db-icon",e.className),"data-icon":e.icon,"data-icon-weight":e.weight,"data-icon-variant":e.variant}),e.children)}const xY=H.forwardRef(bY),df=xY;function wY(e,t){var r,n,i;const s=t||H.useRef(t),[o,a]=H.useState(()=>Kr),[l,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>Kr),[v,E]=H.useState(()=>({label:ak,placeholder:" "}));function D(I){e.onInput&&e.onInput(I),e.input&&e.input(I)}function C(I){e.onChange&&e.onChange(I),e.change&&e.change(I)}function w(I){e.onBlur&&e.onBlur(I),e.blur&&e.blur(I)}function T(I){e.onFocus&&e.onFocus(I),e.focus&&e.focus(I)}function A(){return e.validMessage||Bb}function $(){var I;return e.invalidMessage||((I=s.current)===null||I===void 0?void 0:I.validationMessage)||zb}return H.useEffect(()=>{a(e.id||"input-"+Mn()),b(e.dataListId||`datalist-${Mn()}`)},[]),H.useEffect(()=>{o&&(c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const I=[u,d];e.message&&I.push(l),g(I.join(" "))},[e.message,l,u,d]),H.createElement("div",{className:Fr("db-input",e.className),"data-variant":e.variant,"data-icon":e.icon,"data-icon-after":e.iconAfter},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:v.label),H.createElement("input",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{id:o,name:e.name,type:e.type||"text",placeholder:(n=e.placeholder)!==null&&n!==void 0?n:v.placeholder,disabled:e.disabled,required:e.required,step:e.step,value:e.value,maxLength:e.maxLength,minLength:e.minLength,max:e.max,min:e.min,readOnly:e.readOnly,form:e.form,pattern:e.pattern,autoComplete:e.autocomplete,onInput:I=>D(I),onChange:I=>C(I),onBlur:I=>w(I),onFocus:I=>T(I),list:e.dataList&&y,"aria-describedby":p})),e.dataList?H.createElement("datalist",{id:y},(i=e.dataList)===null||i===void 0?void 0:i.map(I=>H.createElement("option",{key:y+"-option-"+I.key,value:I.key},I.value))):null,e.children,e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:l},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},A()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},$()))}const SY=H.forwardRef(wY),an=SY;function DY(e,t){const r=t||H.useRef(t);H.useState(()=>Kr);function n(i){e.onClick&&e.onClick(i)}return H.createElement("a",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-link",e.className),href:e.href,target:e.target,rel:e.rel,role:e.role,hrefLang:e.hreflang,"aria-disabled":e.disabled,tabIndex:e.disabled?-1:0,"aria-selected":e.selected,"aria-label":e.label,"aria-current":e.current,"data-size":e.size,"data-variant":e.variant,"data-content":e.content||"internal",onClick:i=>n(i)}),e.text?H.createElement("span",null,e.text):null,e.children)}const EY=H.forwardRef(DY),hd=EY;function CY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);return H.useEffect(()=>{document&&(e.documentOverflow==="hidden"||e.variant==="fixed"&&e.documentOverflow!=="auto")&&document.documentElement.classList.add("db-page-document")},[]),H.useEffect(()=>{i(!e.fadeIn),document&&e.fadeIn?document.fonts.ready.then(()=>{i(!0)}):i(!0)},[]),H.useEffect(()=>()=>{document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document")},[]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-page",e.className),"data-variant":e.variant,"data-fade-in":e.fadeIn,"data-fonts-loaded":n}),H.createElement(H.Fragment,null,e.header),H.createElement("main",{className:"db-main"},e.children),H.createElement(H.Fragment,null,e.footer))}const TY=H.forwardRef(CY),h6=TY;function AY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>Kr);function a(u){e.onChange&&e.onChange(u),e.change&&e.change(u)}function l(u){e.onBlur&&e.onBlur(u),e.blur&&e.blur(u)}function c(u){e.onFocus&&e.onFocus(u),e.focus&&e.focus(u)}return H.useEffect(()=>{i(!0),o(e.id||"radio-"+Mn())},[]),H.useEffect(()=>{if(e.checked&&n&&document&&s){const u=document==null?void 0:document.getElementById(s);u&&e.checked!=null&&(u.checked=!0)}},[n,e.checked]),H.createElement("label",{"data-size":e.size,"data-variant":e.variant,className:Fr("db-radio",e.className),htmlFor:s},H.createElement("input",Object.assign({type:"radio","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},Pr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,value:e.value,required:e.required,onChange:u=>a(u),onBlur:u=>l(u),onFocus:u=>c(u)})),e.label?H.createElement("span",null,e.label):null,e.children)}const kY=H.forwardRef(AY),lC=kY;function _Y(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"section-"+Mn())},[]),H.createElement("section",Object.assign({ref:r},Pr(e,[]),{id:n,"data-spacing":e.spacing||"medium",className:Fr("db-section",e.className)}),H.createElement("div",{"data-width":e.width},e.children))}const $Y=H.forwardRef(_Y),kg=$Y;function FY(e,t){var r,n,i;const s=t||H.useRef(t),[o,a]=H.useState(()=>Kr),[l,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>Kr+yP);function v($){e.onClick&&e.onClick($)}function E($){e.onChange&&e.onChange($),e.change&&e.change($)}function D($){e.onBlur&&e.onBlur($),e.blur&&e.blur($)}function C($){e.onFocus&&e.onFocus($),e.focus&&e.focus($)}function w($){var I;return(I=$.label)!==null&&I!==void 0?I:$.value.toString()}function T(){return e.validMessage||Bb}function A(){var $;return e.invalidMessage||(($=s.current)===null||$===void 0?void 0:$.validationMessage)||zb}return H.useEffect(()=>{a(e.id||"select-"+Mn())},[]),H.useEffect(()=>{o&&(b(o+yP),c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const $=[u,d];e.message&&$.push(l),g($.join(" "))},[e.message,l,u,d]),H.createElement("div",{className:Fr("db-select",e.className),"data-variant":e.variant,"data-icon":e.icon},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:ak),H.createElement("select",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{required:e.required,disabled:e.disabled,id:o,name:e.name,value:e.value,autoComplete:e.autocomplete,onClick:$=>v($),onChange:$=>E($),onBlur:$=>D($),onFocus:$=>C($),"aria-describedby":e.message&&l||y}),H.createElement("option",{hidden:!0}),e.options?H.createElement(H.Fragment,{key:Mn()},(n=e.options)===null||n===void 0?void 0:n.map($=>{var I;return H.createElement(H.Fragment,{key:Mn()},$.options?H.createElement("optgroup",{label:w($)},(I=$.options)===null||I===void 0?void 0:I.map(N=>H.createElement("option",{key:N.value.toString(),value:N.value,disabled:N.disabled},w(N)))):null,$.options?null:H.createElement("option",{value:$.value,disabled:$.disabled},w($)))})):null,e.children),H.createElement("span",{id:y},(i=e.placeholder)!==null&&i!==void 0?i:e.label),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:l},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},T()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},A()))}const PY=H.forwardRef(FY),mc=PY;function IY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);H.useState(()=>!1);function s(l){e.onChange&&e.onChange(l),e.change&&e.change(l)}function o(l){e.onBlur&&e.onBlur(l),e.blur&&e.blur(l)}function a(l){e.onFocus&&e.onFocus(l),e.focus&&e.focus(l)}return H.useEffect(()=>{i(e.id||"switch-"+Mn())},[]),H.createElement("label",{"data-visual-aid":e.visualAid,"data-size":e.size,"data-variant":e.variant,"data-emphasis":e.emphasis,htmlFor:n,className:Fr("db-switch",e.className)},H.createElement("input",Object.assign({type:"checkbox",role:"switch",ref:r},Pr(e,[]),{id:n,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,name:e.name,required:e.required,"data-aid-icon":e.icon,"data-aid-icon-after":e.iconAfter,onChange:l=>s(l),onBlur:l=>o(l),onFocus:l=>a(l)})),e.children)}const NY=H.forwardRef(IY),MY=NY;function LY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>!1);function a(l){var c;e.onChange&&e.onChange(l),e.change&&e.change(l),o((c=l.target)===null||c===void 0?void 0:c.checked)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{e.active&&n&&r.current&&(r.current.click(),i(!1))},[r.current,n]),H.createElement("li",{role:"none",className:Fr("db-tab-item",e.className)},H.createElement("label",{htmlFor:e.id,"data-icon":e.icon,"data-icon-after":e.iconAfter,"data-no-text":e.noText},H.createElement("input",Object.assign({type:"radio",role:"tab",disabled:e.disabled,"aria-selected":s,"aria-controls":e.controls,checked:e.checked,ref:r},Pr(e,[]),{id:e.id,onChange:l=>a(l)})),e.label?H.createElement(H.Fragment,null,e.label):null,e.children))}const OY=H.forwardRef(LY),x0=OY;function RY(e,t){const r=t||H.useRef(t);function n(){e.onRemove&&e.onRemove()}function i(){return e.removeButton?e.removeButton:"Remove tag"}return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-tag",e.className),"data-disabled":e.disabled,"data-semantic":e.semantic,"data-emphasis":e.emphasis,"data-icon":e.icon,"data-no-text":e.noText,"data-overflow":e.overflow}),e.children,e.text?H.createElement(H.Fragment,null,e.text):null,e.behaviour==="removable"?H.createElement(Ot,{icon:"cross",size:"small",variant:"ghost",className:"db-tab-remove-button",onClick:s=>n(),noText:!0,title:i()},i()):null)}const BY=H.forwardRef(RY),uC=BY;function zY(e,t){var r,n,i;const s=t||H.useRef(t),[o,a]=H.useState(()=>Kr),[l,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>({label:ak,placeholder:" ",rows:"4"}));function v(A){e.onInput&&e.onInput(A),e.input&&e.input(A)}function E(A){e.onChange&&e.onChange(A),e.change&&e.change(A)}function D(A){e.onBlur&&e.onBlur(A),e.blur&&e.blur(A)}function C(A){e.onFocus&&e.onFocus(A),e.focus&&e.focus(A)}function w(){return e.validMessage||Bb}function T(){var A;return e.invalidMessage||((A=s.current)===null||A===void 0?void 0:A.validationMessage)||zb}return H.useEffect(()=>{a(e.id||"textarea-"+Mn())},[]),H.useEffect(()=>{o&&(c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const A=[u,d];e.message&&A.push(l),g(A.join(" "))},[e.message,l,u,d]),H.createElement("div",{className:Fr("db-textarea",e.className),"data-variant":e.variant},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:y.label),H.createElement("textarea",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{id:o,"data-resize":e.resize,disabled:e.disabled,required:e.required,readOnly:e.readOnly,form:e.form,maxLength:e.maxLength,minLength:e.minLength,name:e.name,wrap:e.wrap,spellCheck:e.spellCheck,autoComplete:e.autocomplete,onInput:A=>v(A),onChange:A=>E(A),onBlur:A=>D(A),onFocus:A=>C(A),value:e.value,"aria-describedby":e.message&&l,placeholder:(n=e.placeholder)!==null&&n!==void 0?n:y.placeholder,rows:(i=e.rows)!==null&&i!==void 0?i:y.rows,cols:e.cols})),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:l},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},w()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},T()))}const jY=H.forwardRef(zY),im=jY;function HY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>!1),[o,a]=H.useState(()=>!1),[l,c]=H.useState(()=>!0),[u,h]=H.useState(()=>!1),[d,f]=H.useState(()=>"sub-navigation-"+Mn()),[p,g]=H.useState(()=>{});function y(E){e.onClick&&e.onClick(E),o&&h(!0)}function b(E){E.stopPropagation(),h(!1)}function v(){var E;if(i&&document&&d){const D=document==null?void 0:document.getElementById(d);D&&(((E=D.children)===null||E===void 0?void 0:E.length)>0?(a(!0),p||g(new gY(n.current,D))):c(!1))}}return H.useEffect(()=>{s(!0)},[]),H.useEffect(()=>{e.subNavigationExpanded!==void 0&&h(!!e.subNavigationExpanded)},[e.subNavigationExpanded]),H.useEffect(()=>{v()},[i]),H.createElement("li",Object.assign({ref:n},Pr(e,[]),{id:e.id,onMouseOver:E=>p==null?void 0:p.enableFollow(),onMouseLeave:E=>p==null?void 0:p.disableFollow(),onMouseMove:E=>p==null?void 0:p.followByMouseEvent(E),className:Fr("db-navigation-item",e.className),"data-width":e.width,"data-icon":e.icon,"aria-current":e.active?"page":void 0,"aria-disabled":e.disabled}),l?null:H.createElement(H.Fragment,null,e.children),l?H.createElement(H.Fragment,null,H.createElement("button",{className:"db-navigation-item-expand-button","aria-haspopup":o,"aria-expanded":u,disabled:e.disabled,onClick:E=>y(E)},e.children),H.createElement("menu",{className:"db-sub-navigation",id:d},o?H.createElement("div",{className:"db-mobile-navigation-back"},H.createElement(Ot,{icon:"arrow_left",variant:"ghost",id:e.backButtonId,onClick:E=>b(E)},(r=e.backButtonText)!==null&&r!==void 0?r:KX)):null,H.createElement(H.Fragment,null,e.subNavigation))):null)}const UY=H.forwardRef(HY),cC=UY;function WY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr),[s,o]=H.useState(()=>!1);function a(l){l==null||l.preventDefault();const c=!s;e.onToggle&&e.onToggle(c),o(c)}return H.useEffect(()=>{i(e.id||"accordion-item-"+Mn()),e.defaultOpen&&o(e.defaultOpen)},[]),H.createElement("details",Object.assign({ref:r},Pr(e,[]),{id:n,className:Fr("db-accordion-item",e.className),"aria-disabled":e.disabled,open:s,name:e.name}),H.createElement("summary",{onClick:l=>a(l)},e.headlinePlain?H.createElement(H.Fragment,null,e.headlinePlain):null,e.headlinePlain?null:H.createElement(H.Fragment,null,e.headline)),H.createElement("div",null,e.content?H.createElement(H.Fragment,null,e.content):null,e.content?null:H.createElement(H.Fragment,null,e.children)))}const VY=H.forwardRef(WY),d6=VY;function GY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>[]),[o,a]=H.useState(()=>""),[l,c]=H.useState(()=>!1);function u(d){try{return typeof d=="string"?JSON.parse(d):d}catch(f){console.error(f)}}function h(d){i.includes(d)?e.behaviour==="single"?s([]):s(i.filter(f=>f!==d)):e.behaviour==="single"?s([d]):s([...i,d]),e.onChange&&e.onChange(i)}return H.useEffect(()=>{c(!0)},[]),H.useEffect(()=>{if(n.current&&l){const d=n.current.getElementsByTagName("details");if(d){let f=[];Array.from(d).forEach((p,g)=>{var y;const b=p.id;(p.open||!((y=e.initOpenIndex)===null||y===void 0)&&y.includes(g))&&f.push(b);const v=p.getElementsByTagName("summary");(v==null?void 0:v.length)>0&&v[0].addEventListener("click",()=>{a(b)})}),e.behaviour==="single"&&f.length>1&&(f=[f[0]]),s(f),c(!1)}}},[n.current,l]),H.useEffect(()=>{(o==null?void 0:o.length)>0&&(h(o),a(""))},[o]),H.useEffect(()=>{if(n!=null&&n.current){const d=n.current.getElementsByTagName("details");d&&Array.from(d).forEach(f=>{f.open=i.includes(f.id)})}},[i]),H.createElement("div",Object.assign({ref:n},Pr(e,[]),{id:e.id,className:Fr("db-accordion",e.className),"data-variant":e.variant}),e.items?null:H.createElement(H.Fragment,null,e.children),e.items?H.createElement(H.Fragment,null,(r=u(e.items))===null||r===void 0?void 0:r.map((d,f)=>H.createElement(d6,{key:`accordion-item-${f}`,headlinePlain:d.headlinePlain,disabled:d.disabled,content:d.content}))):null)}const qY=H.forwardRef(GY),KY=qY;function JY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"navigation-"+Mn())},[]),H.createElement("nav",Object.assign({ref:r},Pr(e,[]),{id:n,"aria-labelledby":e.labelledBy,className:Fr("db-navigation",e.className)}),H.createElement("menu",null,e.children))}const XY=H.forwardRef(JY),f6=XY;function YY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);function s(){if(!r.current)return;const o=r.current.querySelector("article");o&&ok(o)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{if(r.current&&n){const o=Array.from(r.current.children);o.length>=2&&(o[0].ariaHasPopup="true"),i(!1)}},[r.current,n]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-popover",e.className),onFocus:o=>s(),onMouseEnter:o=>s()}),H.createElement(H.Fragment,null,e.trigger),H.createElement("article",{className:"db-popover-content","data-spacing":e.spacing,"data-gap":e.gap,"data-animation":e.animation,"data-open":e.open,"data-delay":e.delay,"data-width":e.width,"data-placement":e.placement},e.children))}const ZY=H.forwardRef(YY),QY=ZY;function eZ(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);function s(a){a.stopPropagation()}function o(){r!=null&&r.current&&ok(r.current)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{if(r.current&&n){const a=r.current.parentElement;a&&["mouseenter","focus"].forEach(l=>{a.addEventListener(l,()=>o())}),i(!1)}},[r.current,n]),H.createElement("i",Object.assign({role:"tooltip","data-gap":"true",ref:r},Pr(e,[]),{id:e.id,"data-emphasis":e.emphasis,"data-animation":e.animation,"data-delay":e.delay,"data-width":e.width,"data-variant":e.variant,"data-placement":e.placement,onClick:a=>s(a),className:Fr("db-tooltip",e.className)}),e.children)}const tZ=H.forwardRef(eZ),Ks=tZ;function rZ(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"tab-list-"+Mn())},[]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:n,className:Fr("db-tab-list",e.className)}),H.createElement("ul",{role:"tablist"},e.children))}const nZ=H.forwardRef(rZ),lk=nZ;function iZ(e,t){const r=t||H.useRef(t);return H.useEffect(()=>{},[]),H.createElement("section",Object.assign({role:"tabpanel",ref:r},Pr(e,[]),{className:Fr("db-tab-panel",e.className),id:e.id,"aria-labelledby":e.labelledBy}),e.content?H.createElement(H.Fragment,null,e.content):null,e.children)}const sZ=H.forwardRef(iZ),w0=sZ;function oZ(e,t){var r,n,i,s;const o=t||H.useRef(t),[a,l]=H.useState(()=>"tabs-"+Mn()),[c,u]=H.useState(()=>""),[h,d]=H.useState(()=>!1),[f,p]=H.useState(()=>!1),[g,y]=H.useState(()=>!1),[b,v]=H.useState(()=>null);function E(A){try{return typeof A=="string"?JSON.parse(A):A}catch($){console.error($)}}function D(A){const $=A.scrollWidth>A.clientWidth;p($&&A.scrollLeft>1),y($&&A.scrollLeft{D($)}))}}}function T(A){if(o.current){const $=o.current.getElementsByClassName("db-tab-item");($==null?void 0:$.length)>0&&Array.from($).forEach((N,L)=>{const F=N.querySelector("label"),P=N.querySelector("input");if(P&&F){if(!P.id){const _=`${c}-tab-${L}`;F.setAttribute("for",_),P.setAttribute("aria-controls",`${c}-tab-panel-${L}`),P.id=_,P.setAttribute("name",c)}if(A){const _=!e.initialSelectedMode||e.initialSelectedMode==="auto",M=e.initialSelectedIndex===void 0&&L===0||e.initialSelectedIndex===L;_&&M&&P.click()}}});const I=o.current.getElementsByClassName("db-tab-panel");(I==null?void 0:I.length)>0&&Array.from(I).forEach((N,L)=>{N.id||(N.id=`${c}-tab-panel-${L}`,N.setAttribute("aria-labelledby",`${c}-tab-${L}`))})}}return H.useEffect(()=>{l(e.id||a),u(e.name||Mn()),d(!0)},[]),H.useEffect(()=>{if(o.current&&h){w(),T(!0);const A=o.current.querySelector(".db-tab-list");A&&new MutationObserver(I=>{I.forEach(N=>{(N.removedNodes.length||N.addedNodes.length)&&(w(),T())})}).observe(A,{childList:!0,subtree:!0}),d(!1)}},[o.current,h]),H.createElement("div",Object.assign({ref:o},Pr(e,[]),{id:a,className:Fr("db-tabs",e.className),"data-orientation":e.orientation,"data-scroll-behaviour":e.behaviour,"data-alignment":(r=e.alignment)!==null&&r!==void 0?r:"start","data-width":(n=e.width)!==null&&n!==void 0?n:"auto"}),f?H.createElement(Ot,{variant:"ghost",icon:"chevron_left",className:"tabs-scroll-left",noText:!0,onClick:A=>C(!0)},"Scroll left"):null,e.tabs?H.createElement(H.Fragment,null,H.createElement(lk,null,(i=E(e.tabs))===null||i===void 0?void 0:i.map((A,$)=>H.createElement(x0,{key:e.name+"tab-item"+$,active:A.active,label:A.label,iconAfter:A.iconAfter,icon:A.icon,noText:A.noText}))),(s=E(e.tabs))===null||s===void 0?void 0:s.map((A,$)=>H.createElement(w0,{key:e.name+"tab-panel"+$,content:A.content},A.children))):null,g?H.createElement(Ot,{variant:"ghost",icon:"chevron_right",className:"tabs-scroll-right",noText:!0,onClick:A=>C()},"Scroll right"):null,e.children)}const aZ=H.forwardRef(oZ),p6=aZ,lZ=["ear","ear_disabled","person_with_blind_cane","person_with_rollator","stepless_entry","support_dog","vehicle_entry_aid","arrow_down","arrow_left","arrow_right","arrow_up","arrow_up_right","chevron_down","chevron_left","chevron_right","chevron_up","flip_horizontal","flip_vertical","reload","sort_down","sort_up","swap_horizontal","swap_vertical","undo","fast_backward_10","fast_backward","fast_backward_30","fast_forward_10","fast_forward","fast_forward_30","microphone","pause","play","skip_backward","skip_forward","stop","subtitles","volume_disabled","volume_down","volume_off","volume_up","house","market","train_station","cash","credit_card","discount","generic_card","gift","law","sepa","shopping_bag","shopping_basket","shopping_basket_disabled","shopping_cart","shopping_cart_disabled","tickets","ticket","voucher","chat","envelope","paper_plane","speech_bubbles","speech_bubble","speech_bubble_exclamation_mark","speech_bubble_question_mark","alarm_clock","alarm_clock_plus","calendar","clock","camera","fax_machine","mobile_phone","mobile_phone_disabled","printer","telephone","bin","block","check","copy","cross","dots_drag_and_drop","minus","pen","plus","save","cloud","globe","leaf","moon","snow_flake","sun","water_drop","cloud_download","cloud_upload","document","document_check","download","folder","folder_open","image","notebook","paper_clip","upload","beverage","breakfast","cup","knife_and_fork","cigarette_disabled","clothes_hanger","hand_washing","restricted_mobility_toilet","shower","shower_men","shower_women","stroller","toys","users","user","wc","wc_men","wc_sign","wc_women","filter","fullscreen","fullscreen_exit","grid","list","resize","resize_handle_corner","zoom_in","zoom_out","db","s_bahn","subway","compass","location_arrow","location_arrow_north","location_crosshairs","location_pin","map","map_pin","navigation_straight","navigation_to_left","navigation_to_right","navigation_u_turn","parking","road_sign","station","mask","medical_cross","gear_wheel","log_in","log_out","magnifying_glass","menu","more_horizontal","more_vertical","bell","bell_disabled","check_circle","cross_circle","exclamation_mark_circle","information_circle","question_mark_circle","warning_triangle","fingerprint","key","lock_closed","lock_open","shield_check","visibility_disabled","visible","crown","face_delighted","face_disappointed","face_neutral","face_sad","face_smiling","heart","share","star","thumbs_down","thumbs_up","augmented_reality","bug","database","light_bulb","power_socket","qr_code","qr_code_scan","speedometer","wifi","wifi_disabled","wrench","airplane","bike","bike_trailer","boat","bus","car","electric_car","electric_scooter","handcart","pedestrian","scooter","ship","taxi","train","train_and_car"],uZ=()=>{const{notification:e}=pr(s=>s),[t,r]=H.useState(),[n,i]=H.useState(!1);return H.useEffect(()=>{e&&(r(e),setTimeout(()=>pr.setState({notification:void 0}),1500))},[e]),H.useEffect(()=>{(async()=>{setTimeout(()=>i(!0),2e3)})()},[]),z.jsx(v0,{className:`notification${n?" opacity-100":" opacity-0"}${e?" show":""}`,semantic:"informational",variant:"overlay",children:t})};var m6=Function.prototype.toString,dd=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,hC,Av;if(typeof dd=="function"&&typeof Object.defineProperty=="function")try{hC=Object.defineProperty({},"length",{get:function(){throw Av}}),Av={},dd(function(){throw 42},null,hC)}catch(e){e!==Av&&(dd=null)}else dd=null;var cZ=/^\s*class\b/,dC=function(t){try{var r=m6.call(t);return cZ.test(r)}catch{return!1}},Cw=function(t){try{return dC(t)?!1:(m6.call(t),!0)}catch{return!1}},kv=Object.prototype.toString,hZ="[object Object]",dZ="[object Function]",fZ="[object GeneratorFunction]",pZ="[object HTMLAllCollection]",mZ="[object HTML document.all class]",gZ="[object HTMLCollection]",yZ=typeof Symbol=="function"&&!!Symbol.toStringTag,vZ=!(0 in[,]),fC=function(){return!1};if(typeof document=="object"){var bZ=document.all;kv.call(bZ)===kv.call(document.all)&&(fC=function(t){if((vZ||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=kv.call(t);return(r===pZ||r===mZ||r===gZ||r===hZ)&&t("")==null}catch{}return!1})}var uk=dd?function(t){if(fC(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{dd(t,null,hC)}catch(r){if(r!==Av)return!1}return!dC(t)&&Cw(t)}:function(t){if(fC(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(yZ)return Cw(t);if(dC(t))return!1;var r=kv.call(t);return r!==dZ&&r!==fZ&&!/^\[object HTML/.test(r)?!1:Cw(t)},xZ=uk,wZ=Object.prototype.toString,g6=Object.prototype.hasOwnProperty,SZ=function(t,r,n){for(var i=0,s=t.length;i=3&&(i=n),wZ.call(t)==="[object Array]"?SZ(t,r,i):typeof t=="string"?DZ(t,r,i):EZ(t,r,i)},ck=CZ,y6=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],TZ={},Tw=y6,AZ=typeof globalThis>"u"?TZ:globalThis,_g=function(){for(var t=[],r=0;r"u"||!Hn?rr:Hn(Uint8Array),yc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?rr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?rr:ArrayBuffer,"%ArrayIteratorPrototype%":Mh&&Hn?Hn([][Symbol.iterator]()):rr,"%AsyncFromSyncIteratorPrototype%":rr,"%AsyncFunction%":Gh,"%AsyncGenerator%":Gh,"%AsyncGeneratorFunction%":Gh,"%AsyncIteratorPrototype%":Gh,"%Atomics%":typeof Atomics>"u"?rr:Atomics,"%BigInt%":typeof BigInt>"u"?rr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?rr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?rr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?rr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":VZ,"%eval%":eval,"%EvalError%":GZ,"%Float32Array%":typeof Float32Array>"u"?rr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?rr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?rr:FinalizationRegistry,"%Function%":x6,"%GeneratorFunction%":Gh,"%Int8Array%":typeof Int8Array>"u"?rr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?rr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?rr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mh&&Hn?Hn(Hn([][Symbol.iterator]())):rr,"%JSON%":typeof JSON=="object"?JSON:rr,"%Map%":typeof Map>"u"?rr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mh||!Hn?rr:Hn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?rr:Promise,"%Proxy%":typeof Proxy>"u"?rr:Proxy,"%RangeError%":qZ,"%ReferenceError%":KZ,"%Reflect%":typeof Reflect>"u"?rr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?rr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mh||!Hn?rr:Hn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?rr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mh&&Hn?Hn(""[Symbol.iterator]()):rr,"%Symbol%":Mh?Symbol:rr,"%SyntaxError%":zd,"%ThrowTypeError%":XZ,"%TypedArray%":ZZ,"%TypeError%":Cd,"%Uint8Array%":typeof Uint8Array>"u"?rr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?rr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?rr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?rr:Uint32Array,"%URIError%":JZ,"%WeakMap%":typeof WeakMap>"u"?rr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?rr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?rr:WeakSet};if(Hn)try{null.error}catch(e){var QZ=Hn(Hn(e));yc["%Error.prototype%"]=QZ}var eQ=function e(t){var r;if(t==="%AsyncFunction%")r=kw("async function () {}");else if(t==="%GeneratorFunction%")r=kw("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=kw("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Hn&&(r=Hn(i.prototype))}return yc[t]=r,r},xP={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},$g=hk,S0=Xc,tQ=$g.call(Function.call,Array.prototype.concat),rQ=$g.call(Function.apply,Array.prototype.splice),wP=$g.call(Function.call,String.prototype.replace),D0=$g.call(Function.call,String.prototype.slice),nQ=$g.call(Function.call,RegExp.prototype.exec),iQ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sQ=/\\(\\)?/g,oQ=function(t){var r=D0(t,0,1),n=D0(t,-1);if(r==="%"&&n!=="%")throw new zd("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new zd("invalid intrinsic syntax, expected opening `%`");var i=[];return wP(t,iQ,function(s,o,a,l){i[i.length]=a?wP(l,sQ,"$1"):o||s}),i},aQ=function(t,r){var n=t,i;if(S0(xP,n)&&(i=xP[n],n="%"+i[0]+"%"),S0(yc,n)){var s=yc[n];if(s===Gh&&(s=eQ(n)),typeof s>"u"&&!r)throw new Cd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new zd("intrinsic "+t+" does not exist!")},ur=function(t,r){if(typeof t!="string"||t.length===0)throw new Cd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cd('"allowMissing" argument must be a boolean');if(nQ(/^%?[^%]*%?$/,t)===null)throw new zd("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oQ(t),i=n.length>0?n[0]:"",s=aQ("%"+i+"%",r),o=s.name,a=s.value,l=!1,c=s.alias;c&&(i=c[0],rQ(n,tQ([0,1],c)));for(var u=1,h=!0;u=n.length){var g=gc(a,d);h=!!g,h&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[d]}else h=S0(a,d),a=a[d];h&&!l&&(yc[o]=a)}}return a},lQ=ur,_v=lQ("%Object.defineProperty%",!0)||!1;if(_v)try{_v({},"a",{value:1})}catch{_v=!1}var Hb=_v,uQ=ur,$v=uQ("%Object.getOwnPropertyDescriptor%",!0);if($v)try{$v([],"length")}catch{$v=null}var ff=$v,SP=Hb,cQ=Bo,Lh=Ut,DP=ff,w6=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Lh("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Lh("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Lh("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Lh("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Lh("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Lh("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!DP&&DP(t,r);if(SP)SP(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:n,writable:s===null&&l?l.writable:!s});else if(a||!i&&!s&&!o)t[r]=n;else throw new cQ("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},pC=Hb,S6=function(){return!!pC};S6.hasArrayLengthDefineBug=function(){if(!pC)return null;try{return pC([],"length",{value:1}).length!==1}catch{return!0}};var pk=S6,hQ=ur,EP=w6,dQ=pk(),CP=ff,TP=Ut,fQ=hQ("%Math.floor%"),pQ=function(t,r){if(typeof t!="function")throw new TP("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||fQ(r)!==r)throw new TP("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&CP){var o=CP(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(dQ?EP(t,"length",r,!0,!0):EP(t,"length",r)),t};(function(e){var t=hk,r=ur,n=pQ,i=Ut,s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,s),l=Hb,c=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var f=a(t,o,arguments);return n(f,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return a(t,s,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(v6);var Eu=v6.exports,D6=ur,E6=Eu,mQ=E6(D6("String.prototype.indexOf")),bi=function(t,r){var n=D6(t,!!r);return typeof n=="function"&&mQ(t,".prototype.")>-1?E6(n):n},$w,AP;function mk(){if(AP)return $w;AP=1;var e=fk;return $w=function(){return e()&&!!Symbol.toStringTag},$w}var gQ={},E0=ck,yQ=_g,kP=Eu,gk=bi,Fv=ff,vQ=gk("Object.prototype.toString"),C6=mk()(),_P=typeof globalThis>"u"?gQ:globalThis,mC=yQ(),yk=gk("String.prototype.slice"),Fw=Object.getPrototypeOf,bQ=gk("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:wQ(t)}return Fv?xQ(t):null},$P=Object.prototype.toString,T6=function(t){var r=$P.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&$P.call(t.callee)==="[object Function]"),n},Pw,FP;function SQ(){if(FP)return Pw;FP=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=T6,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var f=d.constructor;return f&&f.prototype===d},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!c["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),h=function(d){if(typeof window>"u"||!u)return l(d);try{return l(d)}catch{return!1}};e=function(f){var p=f!==null&&typeof f=="object",g=r.call(f)==="[object Function]",y=n(f),b=p&&r.call(f)==="[object String]",v=[];if(!p&&!g&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&g;if(b&&f.length>0&&!t.call(f,0))for(var D=0;D0)for(var C=0;C2?arguments[2]:{},n=CQ(t);TQ&&(n=kQ.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i-1e3&&e<1e3||_6.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-zP(-e):zP(e);if(n!==e){var i=String(n),s=wk.call(t,i.length+1);return Wl.call(i,r,"$&_")+"."+Wl.call(Wl.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wl.call(t,r,"$&_")}var vC=IQ,UP=vC.custom,WP=P6(UP)?UP:null,WQ=function e(t,r,n,i){var s=r||{};if(Ll(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ll(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ll(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ll(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ll(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return N6(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?HP(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?HP(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return bC(t)?"[Array]":"[Object]";var h=lee(s,n);if(typeof i>"u")i=[];else if(I6(i,t)>=0)return"[Circular]";function d(F,P,_){if(P&&(i=UQ.call(i),i.push(P)),_){var M={depth:s.depth};return Ll(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(F,M,n+1,i)}return e(F,s,n+1,i)}if(typeof t=="function"&&!VP(t)){var f=QQ(t),p=Ty(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Jo.call(p,", ")+" }":"")}if(P6(t)){var g=jd?Wl.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yC.call(t);return typeof t=="object"&&!jd?mp(g):g}if(see(t)){for(var y="<"+RP.call(String(t.nodeName)),b=t.attributes||[],v=0;v",y}if(bC(t)){if(t.length===0)return"[]";var E=Ty(t,d);return h&&!aee(E)?"["+xC(E,h)+"]":"[ "+Jo.call(E,", ")+" ]"}if(qQ(t)){var D=Ty(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!$6.call(t,"cause")?"{ ["+String(t)+"] "+Jo.call(BP.call("[cause]: "+d(t.cause),D),", ")+" }":D.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Jo.call(D,", ")+" }"}if(typeof t=="object"&&o){if(WP&&typeof t[WP]=="function"&&vC)return vC(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(eee(t)){var C=[];return MP&&MP.call(t,function(F,P){C.push(d(P,t,!0)+" => "+d(F,t))}),GP("Map",T0.call(t),C,h)}if(nee(t)){var w=[];return LP&&LP.call(t,function(F){w.push(d(F,t))}),GP("Set",A0.call(t),w,h)}if(tee(t))return Lw("WeakMap");if(iee(t))return Lw("WeakSet");if(ree(t))return Lw("WeakRef");if(JQ(t))return mp(d(Number(t)));if(YQ(t))return mp(d(gC.call(t)));if(XQ(t))return mp(RQ.call(t));if(KQ(t))return mp(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===NQ)return"{ [object globalThis] }";if(!GQ(t)&&!VP(t)){var T=Ty(t,d),A=jP?jP(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",I=!A&&$i&&Object(t)===t&&$i in t?wk.call(Cu(t),8,-1):$?"Object":"",N=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",L=N+(I||$?"["+Jo.call(BP.call([],I||[],$||[]),": ")+"] ":"");return T.length===0?L+"{}":h?L+"{"+xC(T,h)+"}":L+"{ "+Jo.call(T,", ")+" }"}return String(t)};function F6(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function VQ(e){return Wl.call(String(e),/"/g,""")}function bC(e){return Cu(e)==="[object Array]"&&(!$i||!(typeof e=="object"&&$i in e))}function GQ(e){return Cu(e)==="[object Date]"&&(!$i||!(typeof e=="object"&&$i in e))}function VP(e){return Cu(e)==="[object RegExp]"&&(!$i||!(typeof e=="object"&&$i in e))}function qQ(e){return Cu(e)==="[object Error]"&&(!$i||!(typeof e=="object"&&$i in e))}function KQ(e){return Cu(e)==="[object String]"&&(!$i||!(typeof e=="object"&&$i in e))}function JQ(e){return Cu(e)==="[object Number]"&&(!$i||!(typeof e=="object"&&$i in e))}function XQ(e){return Cu(e)==="[object Boolean]"&&(!$i||!(typeof e=="object"&&$i in e))}function P6(e){if(jd)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!yC)return!1;try{return yC.call(e),!0}catch{}return!1}function YQ(e){if(!e||typeof e!="object"||!gC)return!1;try{return gC.call(e),!0}catch{}return!1}var ZQ=Object.prototype.hasOwnProperty||function(e){return e in this};function Ll(e,t){return ZQ.call(e,t)}function Cu(e){return BQ.call(e)}function QQ(e){if(e.name)return e.name;var t=jQ.call(zQ.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function I6(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return N6(wk.call(e,0,t.maxStringLength),t)+n}var i=Wl.call(Wl.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,oee);return F6(i,"single",t)}function oee(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+HQ.call(t.toString(16))}function mp(e){return"Object("+e+")"}function Lw(e){return e+" { ? }"}function GP(e,t,r,n){var i=n?xC(r,n):Jo.call(r,", ");return e+" ("+t+") {"+i+"}"}function aee(e){for(var t=0;t{if(l===void 0){f(b),u==null||u.init(i.getState());return}f(b[l]),u==null||u.init(Cy(a.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ew(g.state,b=>{if(l===void 0){f(b);return}JSON.stringify(i.getState())!==JSON.stringify(b[l])&&f(b[l])});case"IMPORT_STATE":{const{nextLiftedState:b}=g.payload,v=(y=b.computedStates.slice(-1)[0])==null?void 0:y.state;if(!v)return;f(l===void 0?v:v[l]),u==null||u.send(null,b);return}case"PAUSE_RECORDING":return d=!d}return}}),p},o6=AX,Ew=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function kX(e,t){let r;try{r=e()}catch{return}return{getItem:i=>{var s;const o=a=>a===null?null:JSON.parse(a,t==null?void 0:t.reviver),l=(s=r.getItem(i))!=null?s:null;return l instanceof Promise?l.then(o):o(l)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,t==null?void 0:t.replacer)),removeItem:i=>r.removeItem(i)}}const Km=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return Km(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Km(n)(r)}}}},_X=(e,t)=>(r,n,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,b)=>({...b,...y}),...t},o=!1;const l=new Set,a=new Set;let c;try{c=s.getStorage()}catch{}if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...y)},n,i);const u=Km(s.serialize),h=()=>{const y=s.partialize({...n()});let b;const v=u({state:y,version:s.version}).then(E=>c.setItem(s.name,E)).catch(E=>{b=E});if(b)throw b;return v},d=i.setState;i.setState=(y,b)=>{d(y,b),h()};const f=e((...y)=>{r(...y),h()},n,i);let p;const g=()=>{var y;if(!c)return;o=!1,l.forEach(v=>v(n()));const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,n()))||void 0;return Km(c.getItem.bind(c))(s.name).then(v=>{if(v)return s.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return p=s.merge(v,(E=n())!=null?E:f),r(p,!0),h()}).then(()=>{b==null||b(p,void 0),o=!0,a.forEach(v=>v(p))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:y=>{s={...s,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>o,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(a.add(y),()=>{a.delete(y)})},g(),p||f},$X=(e,t)=>(r,n,i)=>{let s={storage:kX(()=>localStorage),partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...t},o=!1;const l=new Set,a=new Set;let c=s.storage;if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...g)},n,i);const u=()=>{const g=s.partialize({...n()});return c.setItem(s.name,{state:g,version:s.version})},h=i.setState;i.setState=(g,y)=>{h(g,y),u()};const d=e((...g)=>{r(...g),u()},n,i);i.getInitialState=()=>d;let f;const p=()=>{var g,y;if(!c)return;o=!1,l.forEach(v=>{var E;return v((E=n())!=null?E:d)});const b=((y=s.onRehydrateStorage)==null?void 0:y.call(s,(g=n())!=null?g:d))||void 0;return Km(c.getItem.bind(c))(s.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==s.version){if(s.migrate)return s.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return f=s.merge(v,(E=n())!=null?E:d),r(f,!0),u()}).then(()=>{b==null||b(f,void 0),f=n(),o=!0,a.forEach(v=>v(f))}).catch(v=>{b==null||b(void 0,v)})};return i.persist={setOptions:g=>{s={...s,...g},g.storage&&(c=g.storage)},clearStorage:()=>{c==null||c.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:g=>(l.add(g),()=>{l.delete(g)}),onFinishHydration:g=>(a.add(g),()=>{a.delete(g)})},s.skipHydration||p(),f||d},FX=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Tv?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),_X(e,t)):$X(e,t),a6=FX,PX="theme-builder-state",IX="playground-state",g0=[2,4,6,10,20,30,40,50,60,70,80,90,94,96,98],y0=[{name:"bg-lvl-1-enabled",dark:3,light:14},{name:"bg-lvl-1-hover",dark:4,light:13},{name:"bg-lvl-1-pressed",dark:5,light:12},{name:"bg-lvl-2-enabled",dark:2,light:13},{name:"bg-lvl-2-hover",dark:3,light:12},{name:"bg-lvl-2-pressed",dark:4,light:11},{name:"bg-lvl-3-enabled",dark:1,light:12},{name:"bg-lvl-3-hover",dark:2,light:11},{name:"bg-lvl-3-pressed",dark:3,light:10},{name:"bg-transparent-full-enabled",dark:9,transparencyDark:100,light:6,transparencyLight:100},{name:"bg-transparent-semi-enabled",dark:9,transparencyDark:84,light:6,transparencyLight:92},{name:"bg-transparent-hover",dark:9,transparencyDark:76,light:6,transparencyLight:84},{name:"bg-transparent-pressed",dark:9,transparencyDark:68,light:6,transparencyLight:76},{name:"on-bg-enabled",dark:12,light:3},{name:"on-bg-hover",dark:11,light:4},{name:"on-bg-pressed",dark:10,light:5},{name:"on-bg-weak-enabled",dark:10,light:5},{name:"on-bg-weak-hover",dark:9,light:6},{name:"on-bg-weak-pressed",dark:8,light:7},{name:"on-contrast-enabled",dark:3,light:14},{name:"on-contrast-hover",dark:4,light:13},{name:"on-contrast-pressed",dark:5,light:12},{name:"contrast-high-enabled",dark:9,light:6},{name:"contrast-high-hover",dark:8,light:5},{name:"contrast-high-pressed",dark:7,light:4},{name:"contrast-low-enabled",dark:8,light:7},{name:"contrast-low-hover",dark:7,light:6},{name:"contrast-low-pressed",dark:6,light:5},{name:"border",dark:6,light:10}],NX={name:"Whitelabel",image:{light:"peace-in-a-box.svg",dark:"peace-in-a-box-white.svg"},alternativeColors:{brand:{hex:"#d2d4d9",dark:!0},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1}}},MX={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},LX={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},OX={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},RX={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},BX={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},jX={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},zX={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},HX={neutral:"#242629",brand:"#242629",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},UX={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},sk={branding:NX,spacing:MX,sizing:LX,typography:OX,border:RX,elevation:BX,transition:jX,font:zX,colors:HX,additionalColors:UX},gP=sk,pr=s6()(o6(a6(e=>({darkMode:!1,editorMarkup:"",theme:gP,speakingNames:y0,luminanceSteps:g0,developerMode:!1,resetDefaults:()=>{e(()=>({theme:gP,luminanceSteps:g0,speakingNames:y0}))},setAlternativeColors:t=>{e(({theme:r})=>({theme:{...r,branding:{...r.branding,alternativeColors:{...t}}}}))},setColors:t=>{e(({theme:r})=>({theme:{...r,colors:t}}))},setAdditionalColors:t=>{e(({theme:r})=>({theme:{...r,additionalColors:t}}))},setCustomColors:t=>{e(({theme:r})=>({theme:{...r,customColors:t}}))}}),{name:PX}))),ds=s6()(o6(a6(()=>({nodeTrees:{page:{name:"Page",serializedJson:"",isPage:!0}},currentId:"page",showBorders:!1,showSpacings:!1}),{name:IX}))),Mn=()=>{var e,t;if(typeof window<"u"){if(!((e=window.crypto)===null||e===void 0)&&e.randomUUID)return window.crypto.randomUUID();if(!((t=window.crypto)===null||t===void 0)&&t.getRandomValues)return window.crypto.getRandomValues(new Uint32Array(3)).join("-")}return Math.random().toString().substring(2)},l6=(e,t)=>{const r=e.children;Object.values(r).forEach(n=>{n.setAttribute(t.key,t.value),n.children.length>0&&l6(n,t)})},Fr=(...e)=>{let t="";return e.forEach((r,n)=>{if(r)if(typeof r=="string")t+=`${r} `;else for(let i in r)r[i]&&(t+=`${i} `)}),t.trim()},WX=["suppressHydrationWarning","suppressContentEditableWarning","translate","title","tabIndex","style","spellCheck","nonce","lang","hidden","draggable","dir","contextMenu","contentEditable","autoFocus","accessKey","is","inputMode","unselectable","security","results","vocab","typeof","rev","resource","rel","property","inlist","datatype","content","about","role","radioGroup","color"],Pr=(e,t)=>Object.keys(e).filter(r=>(r.startsWith("data-")||r.startsWith("aria-")||r.startsWith("default")||r.startsWith("auto")||r.startsWith("item")||r.startsWith("on")||WX.includes(r))&&!t.includes(r)).reduce((r,n)=>(r[n]=e[n],r),{}),VX=e=>{var t;const{top:r,bottom:n,left:i,right:s,height:o,width:l}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:c}=window;let u=r<0,h=n>a,d=i<0,f=s>c;const p=e.hasAttribute("data-outside-vy"),g=e.hasAttribute("data-outside-vx"),y=(t=e==null?void 0:e.parentElement)===null||t===void 0?void 0:t.getBoundingClientRect();return y&&(p&&(e.getAttribute("data-outside-vy")==="top"?u=y.top-(n-y.bottom)<0:h=y.bottom+(y.top-r)>a),g&&(e.getAttribute("data-outside-vx")==="left"?d=y.left-(s-y.right)<0:f=y.right+(y.left-i)>c)),{outTop:u,outBottom:h,outLeft:d,outRight:f}},ok=e=>{const{outTop:t,outBottom:r,outLeft:n,outRight:i}=VX(e);let s={};return t||r?(s={vy:t?"top":"bottom"},e.setAttribute("data-outside-vy",s.vy)):e.removeAttribute("data-outside-vy"),n||i?(s=Object.assign(Object.assign({},s),{vx:i?"right":"left"}),e.setAttribute("data-outside-vx",s.vx)):e.removeAttribute("data-outside-vx"),s};function GX(e,t){const r=t||H.useRef(t);function n(i){e.onClick&&e.onClick(i)}return H.createElement("button",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-button",e.className),type:e.type,disabled:e.disabled,"aria-label":e.label,"data-icon":e.icon,"data-size":e.size,"data-state":e.state,"data-width":e.width,"data-variant":e.variant,"data-no-text":e.noText,name:e.name,value:e.value,"aria-describedby":e.describedbyid,"aria-expanded":e.ariaexpanded,"aria-pressed":e.ariapressed,onClick:i=>n(i)}),e.children)}const qX=H.forwardRef(GX),Ot=qX,Kr="OVERWRITE_DEFAULT_ID",ak="LABEL SHOULD BE SET",uu="-message",cu="-valid-message",hu="-invalid-message",yP="-placeholder",Bb="TODO: Add a validMessage",jb="TODO: Add an invalidMessage",KX="Back",u6="Close Button";var nC;(function(e){e.FUNCTIONAL="functional",e.REGULAR="regular",e.EXPRESSIVE="expressive"})(nC||(nC={}));Object.entries(nC).map(([,e])=>e);var iC;(function(e){e.PRIMARY="primary"})(iC||(iC={}));var sC;(function(e){e.NEUTRAL_BG_LEVEL_1="neutral-bg-lvl-1",e.NEUTRAL_BG_LEVEL_2="neutral-bg-lvl-2",e.NEUTRAL_BG_LEVEL_3="neutral-bg-lvl-3",e.NEUTRAL_BG_TRANSPARENT_SEMI="neutral-bg-transparent-semi",e.NEUTRAL_BG_TRANSPARENT_FULL="neutral-bg-transparent-full",e.BRAND_BG_LEVEL_1="brand-bg-lvl-1",e.BRAND_BG_LEVEL_2="brand-bg-lvl-2",e.BRAND_BG_LEVEL_3="brand-bg-lvl-3",e.BRAND_BG_TRANSPARENT_SEMI="brand-bg-transparent-semi",e.BRAND_BG_TRANSPARENT_FULL="brand-bg-transparent-full",e.SUCCESSFUL_BG_LEVEL_1="successful-bg-lvl-1",e.SUCCESSFUL_BG_LEVEL_2="successful-bg-lvl-2",e.SUCCESSFUL_BG_LEVEL_3="successful-bg-lvl-3",e.SUCCESSFUL_BG_TRANSPARENT_SEMI="successful-bg-transparent-semi",e.SUCCESSFUL_BG_TRANSPARENT_FULL="successful-bg-transparent-full",e.CRITICAL_BG_LEVEL_1="critical-bg-lvl-1",e.CRITICAL_BG_LEVEL_2="critical-bg-lvl-2",e.CRITICAL_BG_LEVEL_3="critical-bg-lvl-3",e.CRITICAL_BG_TRANSPARENT_SEMI="critical-bg-transparent-semi",e.CRITICAL_BG_TRANSPARENT_Full="critical-bg-transparent-full",e.WARNING_BG_LEVEL_1="warning-bg-lvl-1",e.WARNING_BG_LEVEL_2="warning-bg-lvl-2",e.WARNING_BG_LEVEL_3="warning-bg-lvl-3",e.WARNING_BG_TRANSPARENT_SEMI="warning-bg-transparent-semi",e.WARNING_BG_TRANSPARENT_FULL="warning-bg-transparent-full",e.INFORMATIONAL_BG_LEVEL_1="informational-bg-lvl-1",e.INFORMATIONAL_BG_LEVEL_2="informational-bg-lvl-2",e.INFORMATIONAL_BG_LEVEL_3="informational-bg-lvl-3",e.INFORMATIONAL_BG_TRANSPARENT_SEMI="informational-bg-transparent-semi",e.INFORMATIONAL_BG_TRANSPARENT_FULL="informational-bg-transparent-full"})(sC||(sC={}));const JX=Object.entries(sC).map(([,e])=>e);Object.entries(iC).map(([,e])=>e);var oC;(function(e){e.CRITICAL="critical",e.INFORMATIONAL="informational",e.WARNING="warning",e.SUCCESSFUL="successful"})(oC||(oC={}));Object.entries(oC).map(([,e])=>e);const XX={width:390,height:884},YX={width:1920,height:1280};Object.assign({name:"desktop"},YX),Object.assign({name:"mobile"},XX);function ZX(e,t){var r;const n=t||H.useRef(t);function i(s){e.onClose&&e.onClose()}return H.createElement("article",Object.assign({ref:n},Pr(e,[]),{id:e.id,className:Fr("db-notification",e.className),"aria-live":e.ariaLive,"data-semantic":e.semantic,"data-variant":e.variant,"data-icon":e.icon,"data-link-variant":e.linkVariant}),H.createElement(H.Fragment,null,e.image),e.headline?H.createElement("header",null,e.headline):null,H.createElement("p",null,e.children),e.timestamp?H.createElement("span",null,e.timestamp):null,H.createElement(H.Fragment,null,e.link),e.behaviour!=="permanent"?H.createElement(Ot,{icon:"cross",variant:"ghost",size:"small",id:e.closeButtonId,noText:!0,onClick:s=>i()},(r=e.closeButtonText)!==null&&r!==void 0?r:u6):null)}const QX=H.forwardRef(ZX),v0=QX;function eY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-badge",e.className),"data-semantic":e.semantic,"data-size":e.size,"data-emphasis":e.emphasis,"data-placement":e.placement}),e.children)}const tY=H.forwardRef(eY),aC=tY;function rY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>({icon:"db"}));return H.createElement("div",Object.assign({ref:n},Pr(e,[]),{"data-icon":e.hideLogo?"none":(r=e.icon)!==null&&r!==void 0?r:i.icon,id:e.id,className:Fr("db-brand",e.className)}),e.children)}const nY=H.forwardRef(rY),iY=nY;function sY(e,t){const r=t||H.useRef(t);function n(i){e.onClick&&e.onClick(i)}return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,"data-behaviour":e.behaviour,"data-elevation-level":e.elevationLevel,"data-spacing":e.spacing,role:e.behaviour==="interactive"?"button":void 0,tabIndex:e.behaviour==="interactive"?0:void 0,onClick:i=>n(i),className:Fr("db-card",e.className)}),e.children)}const oY=H.forwardRef(sY),ls=oY;function aY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-infotext",e.className),"data-icon":e.icon,"data-semantic":e.semantic,"data-size":e.size}),e.children)}const lY=H.forwardRef(aY),Mr=lY;function uY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>Kr),[l,a]=H.useState(()=>Kr+uu),[c,u]=H.useState(()=>Kr+cu),[h,d]=H.useState(()=>Kr+hu),[f,p]=H.useState(()=>"");function g(D){e.onChange&&e.onChange(D),e.change&&e.change(D)}function y(D){e.onBlur&&e.onBlur(D),e.blur&&e.blur(D)}function b(D){e.onFocus&&e.onFocus(D),e.focus&&e.focus(D)}function v(){return e.validMessage||Bb}function E(){var D;return e.invalidMessage||((D=r.current)===null||D===void 0?void 0:D.validationMessage)||jb}return H.useEffect(()=>{i(!0),o(e.id||"checkbox-"+Mn())},[]),H.useEffect(()=>{n&&s&&(a(s+uu),u(s+cu),d(s+hu))},[s,n]),H.useEffect(()=>{const D=[c,h];e.message&&D.push(l),p(D.join(" "))},[e.message,l,c,h]),H.useEffect(()=>{if(n&&document&&s){const D=document==null?void 0:document.getElementById(s);D&&(e.checked!=null&&(D.checked=e.checked),e.indeterminate!==void 0&&(D.indeterminate=e.indeterminate))}},[n,e.indeterminate,e.checked]),H.createElement("div",{"data-size":e.size,"data-variant":e.variant,className:Fr("db-checkbox",e.className)},H.createElement("label",{htmlFor:s},H.createElement("input",Object.assign({type:"checkbox","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},Pr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,required:e.required,onChange:D=>g(D),onBlur:D=>y(D),onFocus:D=>b(D),"aria-describedby":f})),e.label?H.createElement("span",null,e.label):null,e.children),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:l},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:c},v()),H.createElement(Mr,{size:"small",semantic:"critical",id:h},E()))}const cY=H.forwardRef(uY),b0=cY;function hY(e,t){const r=t||H.useRef(t);return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,className:Fr("db-divider",e.className)}))}const dY=H.forwardRef(hY),aa=dY;function fY(e,t){var r;const n=t||H.useRef(t),i=H.useRef(null);function s(l){l.key==="Escape"&&l.preventDefault(),(l==="close"||l.key==="Escape"||l.target.nodeName==="DIALOG"&&l.type==="click"&&e.backdrop!=="none")&&e.onClose&&e.onClose(l)}function o(){n!=null&&n.current&&(e.open&&!n.current.open&&(i.current&&(i.current.hidden=!1),e.backdrop==="none"?n.current.show():n.current.showModal()),!e.open&&n.current.open&&(i.current&&(i.current.hidden=!0),setTimeout(()=>{var l;i.current&&(i.current.hidden=!1),(l=n.current)===null||l===void 0||l.close()},401)))}return H.useEffect(()=>{o()},[]),H.useEffect(()=>{o()},[e.open]),H.createElement("dialog",Object.assign({className:"db-drawer",id:e.id,ref:n},Pr(e,["onClose"]),{onClick:l=>{s(l)},onKeyDown:l=>s(l),"data-backdrop":e.backdrop}),H.createElement("article",{ref:i,className:Fr("db-drawer-container",e.className),"data-spacing":e.spacing,"data-width":e.width,"data-direction":e.direction,"data-rounded":e.rounded},H.createElement("header",{className:"db-drawer-header"},H.createElement("div",{className:"db-drawer-header-text"},H.createElement(H.Fragment,null,e.drawerHeader)),e.withCloseButton?H.createElement(Ot,{icon:"cross",variant:"ghost",className:"button-close-drawer",id:e.closeButtonId,noText:!0,onClick:l=>s("close")},(r=e.closeButtonText)!==null&&r!==void 0?r:u6):null),H.createElement("div",{className:"db-drawer-content"},e.children)))}const pY=H.forwardRef(fY),hf=pY,mY=e=>{var t,r;const{target:n}=e;return!!(!(!((t=n==null?void 0:n.classList)===null||t===void 0)&&t.contains("db-navigation-item-expand-button"))&&(!((r=n==null?void 0:n.parentElement)===null||r===void 0)&&r.classList.contains("db-navigation-item")))};class gY{constructor(t,r){this.initialized=!1,this.mouseX=0,this.mouseY=0,this.element=t,this.subNavigation=r,this.parentSubNavigation=this.element.closest(".db-sub-navigation"),this.parentSubNavigation&&!this.element.closest(".db-drawer")&&this.init()}init(){var t,r;const n=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.element.style.setProperty("--db-navigation-item-inline-size",`${n}px`),this.initialized=!0}enableFollow(){var t,r;if(!this.initialized||this.triangleData)return;const n=ok(this.subNavigation),i=this.element.getBoundingClientRect(),s=(r=(t=this.parentSubNavigation)===null||t===void 0?void 0:t.getBoundingClientRect().width)!==null&&r!==void 0?r:0;this.triangleData={itemRect:i,parentElementWidth:s,subNavigationHeight:this.subNavigation.getBoundingClientRect().height,padding:(s-i.width)/2,outsideVX:n.vx,outsideVY:n.vy}}disableFollow(){this.triangleData=void 0}getTriangleTipX(){return this.triangleData?this.triangleData.outsideVX==="right"?this.triangleData.itemRect.width-this.mouseX:Math.min(this.mouseX,this.triangleData.itemRect.width*.75):0}getTriangleTipY(){if(!this.triangleData)return 0;const t=Math.max(Math.min(this.mouseY,this.triangleData.itemRect.height),0)+this.triangleData.padding;return this.triangleData.outsideVY==="bottom"?t+(this.triangleData.subNavigationHeight-this.triangleData.padding*2-this.triangleData.itemRect.height):t}hasMouseEnteredSubNavigation(){if(!this.triangleData)return!1;const t=this.triangleData.outsideVX==="right";return!!(t&&this.mouseX<-1*this.triangleData.padding||!t&&this.mouseX>this.triangleData.parentElementWidth-this.triangleData.padding)}getTriangleCoordinates(t){if(!this.triangleData)return;if(t==="fill-gap"){const o=`${this.triangleData.itemRect.height+2*this.triangleData.padding}px`,l=`${this.triangleData.parentElementWidth-this.triangleData.padding}px`;return{lb:`${l} ${o}`,lt:`${l} 0`,rt:"100% 0",rb:`100% ${o}`}}const r=this.getTriangleTipX(),n=this.getTriangleTipY(),i=`${r}px ${n+this.triangleData.padding}px`,s=`${r}px ${n-this.triangleData.padding}px`;return{lb:i,lt:s,rt:"100% 0",rb:"100% 100%"}}followByMouseEvent(t){if(!this.initialized||!this.triangleData)return;this.mouseX=t.clientX-this.triangleData.itemRect.left,this.mouseY=t.clientY-this.triangleData.itemRect.top;const r=this.hasMouseEnteredSubNavigation(),n=this.getTriangleCoordinates(r?"fill-gap":"safe-triangle");n&&(this.element.style.setProperty("--db-navigation-item-clip-path",`polygon(${n.lb}, ${n.lt}, ${n.rt}, ${n.rb})`),r&&(this.triangleData=void 0))}}function yY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>Kr),[o,l]=H.useState(()=>!1),[a,c]=H.useState(()=>!1),[u,h]=H.useState(()=>({burgerMenuLabel:"BurgerMenu"}));function d(){e.onToggle&&e.onToggle(!e.drawerOpen)}function f(p){mY(p)&&d()}return H.useEffect(()=>{l(!0),s(e.id||"header-"+Mn())},[]),H.useEffect(()=>{if(o&&document&&i&&e.forceMobile){const p=document.getElementById(i);p&&l6(p,{key:"data-force-mobile",value:"true"}),c(!0)}},[o]),H.createElement("header",Object.assign({ref:n},Pr(e,[]),{className:Fr("db-header",e.className),id:i,"data-width":e.width,"data-on-forcing-mobile":e.forceMobile&&!a}),H.createElement(hf,{spacing:"small",className:"db-header-drawer",rounded:!0,withCloseButton:!0,open:e.drawerOpen,onClose:()=>d()},H.createElement("div",{className:"db-header-drawer-navigation"},H.createElement("div",{className:"db-header-navigation",onClick:p=>f(p)},e.children),H.createElement("div",{className:"db-header-meta-navigation"},H.createElement(H.Fragment,null,e.metaNavigation))),H.createElement("div",{className:"db-header-secondary-action"},H.createElement(H.Fragment,null,e.secondaryAction))),H.createElement("div",{className:"db-header-meta-navigation"},H.createElement(H.Fragment,null,e.metaNavigation)),H.createElement("div",{className:"db-header-navigation-bar"},H.createElement("div",{className:"db-header-brand-container"},H.createElement(H.Fragment,null,e.brand)),H.createElement("div",{className:"db-header-navigation-container"},H.createElement("div",{className:"db-header-navigation"},e.children),H.createElement("div",{className:"db-header-primary-action"},H.createElement(H.Fragment,null,e.primaryAction))),H.createElement("div",{className:"db-header-action-container"},H.createElement("div",{className:"db-header-burger-menu-container"},H.createElement(Ot,{id:"button-burger-menu",icon:"menu",variant:"ghost",noText:!0,onClick:()=>d()},(r=e.burgerMenuLabel)!==null&&r!==void 0?r:u.burgerMenuLabel)),H.createElement("div",{className:"db-header-secondary-action"},H.createElement(H.Fragment,null,e.secondaryAction)))))}const vY=H.forwardRef(yY),c6=vY;function bY(e,t){const r=t||H.useRef(t);return H.createElement("span",Object.assign({"aria-hidden":"true",ref:r},Pr(e,[]),{id:e.id,className:Fr("db-icon",e.className),"data-icon":e.icon,"data-icon-weight":e.weight,"data-icon-variant":e.variant}),e.children)}const xY=H.forwardRef(bY),df=xY;function wY(e,t){var r,n,i;const s=t||H.useRef(t),[o,l]=H.useState(()=>Kr),[a,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>Kr),[v,E]=H.useState(()=>({label:ak,placeholder:" "}));function D(I){e.onInput&&e.onInput(I),e.input&&e.input(I)}function C(I){e.onChange&&e.onChange(I),e.change&&e.change(I)}function w(I){e.onBlur&&e.onBlur(I),e.blur&&e.blur(I)}function T(I){e.onFocus&&e.onFocus(I),e.focus&&e.focus(I)}function A(){return e.validMessage||Bb}function $(){var I;return e.invalidMessage||((I=s.current)===null||I===void 0?void 0:I.validationMessage)||jb}return H.useEffect(()=>{l(e.id||"input-"+Mn()),b(e.dataListId||`datalist-${Mn()}`)},[]),H.useEffect(()=>{o&&(c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const I=[u,d];e.message&&I.push(a),g(I.join(" "))},[e.message,a,u,d]),H.createElement("div",{className:Fr("db-input",e.className),"data-variant":e.variant,"data-icon":e.icon,"data-icon-after":e.iconAfter},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:v.label),H.createElement("input",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{id:o,name:e.name,type:e.type||"text",placeholder:(n=e.placeholder)!==null&&n!==void 0?n:v.placeholder,disabled:e.disabled,required:e.required,step:e.step,value:e.value,maxLength:e.maxLength,minLength:e.minLength,max:e.max,min:e.min,readOnly:e.readOnly,form:e.form,pattern:e.pattern,autoComplete:e.autocomplete,onInput:I=>D(I),onChange:I=>C(I),onBlur:I=>w(I),onFocus:I=>T(I),list:e.dataList&&y,"aria-describedby":p})),e.dataList?H.createElement("datalist",{id:y},(i=e.dataList)===null||i===void 0?void 0:i.map(I=>H.createElement("option",{key:y+"-option-"+I.key,value:I.key},I.value))):null,e.children,e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:a},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},A()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},$()))}const SY=H.forwardRef(wY),an=SY;function DY(e,t){const r=t||H.useRef(t);H.useState(()=>Kr);function n(i){e.onClick&&e.onClick(i)}return H.createElement("a",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-link",e.className),href:e.href,target:e.target,rel:e.rel,role:e.role,hrefLang:e.hreflang,"aria-disabled":e.disabled,tabIndex:e.disabled?-1:0,"aria-selected":e.selected,"aria-label":e.label,"aria-current":e.current,"data-size":e.size,"data-variant":e.variant,"data-content":e.content||"internal",onClick:i=>n(i)}),e.text?H.createElement("span",null,e.text):null,e.children)}const EY=H.forwardRef(DY),hd=EY;function CY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);return H.useEffect(()=>{document&&(e.documentOverflow==="hidden"||e.variant==="fixed"&&e.documentOverflow!=="auto")&&document.documentElement.classList.add("db-page-document")},[]),H.useEffect(()=>{i(!e.fadeIn),document&&e.fadeIn?document.fonts.ready.then(()=>{i(!0)}):i(!0)},[]),H.useEffect(()=>()=>{document.documentElement.classList.contains("db-page-document")&&document.documentElement.classList.remove("db-page-document")},[]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-page",e.className),"data-variant":e.variant,"data-fade-in":e.fadeIn,"data-fonts-loaded":n}),H.createElement(H.Fragment,null,e.header),H.createElement("main",{className:"db-main"},e.children),H.createElement(H.Fragment,null,e.footer))}const TY=H.forwardRef(CY),h6=TY;function AY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>Kr);function l(u){e.onChange&&e.onChange(u),e.change&&e.change(u)}function a(u){e.onBlur&&e.onBlur(u),e.blur&&e.blur(u)}function c(u){e.onFocus&&e.onFocus(u),e.focus&&e.focus(u)}return H.useEffect(()=>{i(!0),o(e.id||"radio-"+Mn())},[]),H.useEffect(()=>{if(e.checked&&n&&document&&s){const u=document==null?void 0:document.getElementById(s);u&&e.checked!=null&&(u.checked=!0)}},[n,e.checked]),H.createElement("label",{"data-size":e.size,"data-variant":e.variant,className:Fr("db-radio",e.className),htmlFor:s},H.createElement("input",Object.assign({type:"radio","aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:r},Pr(e,[]),{id:s,name:e.name,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,value:e.value,required:e.required,onChange:u=>l(u),onBlur:u=>a(u),onFocus:u=>c(u)})),e.label?H.createElement("span",null,e.label):null,e.children)}const kY=H.forwardRef(AY),lC=kY;function _Y(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"section-"+Mn())},[]),H.createElement("section",Object.assign({ref:r},Pr(e,[]),{id:n,"data-spacing":e.spacing||"medium",className:Fr("db-section",e.className)}),H.createElement("div",{"data-width":e.width},e.children))}const $Y=H.forwardRef(_Y),kg=$Y;function FY(e,t){var r,n,i;const s=t||H.useRef(t),[o,l]=H.useState(()=>Kr),[a,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>Kr+yP);function v($){e.onClick&&e.onClick($)}function E($){e.onChange&&e.onChange($),e.change&&e.change($)}function D($){e.onBlur&&e.onBlur($),e.blur&&e.blur($)}function C($){e.onFocus&&e.onFocus($),e.focus&&e.focus($)}function w($){var I;return(I=$.label)!==null&&I!==void 0?I:$.value.toString()}function T(){return e.validMessage||Bb}function A(){var $;return e.invalidMessage||(($=s.current)===null||$===void 0?void 0:$.validationMessage)||jb}return H.useEffect(()=>{l(e.id||"select-"+Mn())},[]),H.useEffect(()=>{o&&(b(o+yP),c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const $=[u,d];e.message&&$.push(a),g($.join(" "))},[e.message,a,u,d]),H.createElement("div",{className:Fr("db-select",e.className),"data-variant":e.variant,"data-icon":e.icon},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:ak),H.createElement("select",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{required:e.required,disabled:e.disabled,id:o,name:e.name,value:e.value,autoComplete:e.autocomplete,onClick:$=>v($),onChange:$=>E($),onBlur:$=>D($),onFocus:$=>C($),"aria-describedby":e.message&&a||y}),H.createElement("option",{hidden:!0}),e.options?H.createElement(H.Fragment,{key:Mn()},(n=e.options)===null||n===void 0?void 0:n.map($=>{var I;return H.createElement(H.Fragment,{key:Mn()},$.options?H.createElement("optgroup",{label:w($)},(I=$.options)===null||I===void 0?void 0:I.map(N=>H.createElement("option",{key:N.value.toString(),value:N.value,disabled:N.disabled},w(N)))):null,$.options?null:H.createElement("option",{value:$.value,disabled:$.disabled},w($)))})):null,e.children),H.createElement("span",{id:y},(i=e.placeholder)!==null&&i!==void 0?i:e.label),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:a},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},T()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},A()))}const PY=H.forwardRef(FY),mc=PY;function IY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);H.useState(()=>!1);function s(a){e.onChange&&e.onChange(a),e.change&&e.change(a)}function o(a){e.onBlur&&e.onBlur(a),e.blur&&e.blur(a)}function l(a){e.onFocus&&e.onFocus(a),e.focus&&e.focus(a)}return H.useEffect(()=>{i(e.id||"switch-"+Mn())},[]),H.createElement("label",{"data-visual-aid":e.visualAid,"data-size":e.size,"data-variant":e.variant,"data-emphasis":e.emphasis,htmlFor:n,className:Fr("db-switch",e.className)},H.createElement("input",Object.assign({type:"checkbox",role:"switch",ref:r},Pr(e,[]),{id:n,checked:e.checked,disabled:e.disabled,"aria-describedby":e.describedbyid,"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,name:e.name,required:e.required,"data-aid-icon":e.icon,"data-aid-icon-after":e.iconAfter,onChange:a=>s(a),onBlur:a=>o(a),onFocus:a=>l(a)})),e.children)}const NY=H.forwardRef(IY),MY=NY;function LY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1),[s,o]=H.useState(()=>!1);function l(a){var c;e.onChange&&e.onChange(a),e.change&&e.change(a),o((c=a.target)===null||c===void 0?void 0:c.checked)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{e.active&&n&&r.current&&(r.current.click(),i(!1))},[r.current,n]),H.createElement("li",{role:"none",className:Fr("db-tab-item",e.className)},H.createElement("label",{htmlFor:e.id,"data-icon":e.icon,"data-icon-after":e.iconAfter,"data-no-text":e.noText},H.createElement("input",Object.assign({type:"radio",role:"tab",disabled:e.disabled,"aria-selected":s,"aria-controls":e.controls,checked:e.checked,ref:r},Pr(e,[]),{id:e.id,onChange:a=>l(a)})),e.label?H.createElement(H.Fragment,null,e.label):null,e.children))}const OY=H.forwardRef(LY),x0=OY;function RY(e,t){const r=t||H.useRef(t);function n(){e.onRemove&&e.onRemove()}function i(){return e.removeButton?e.removeButton:"Remove tag"}return H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-tag",e.className),"data-disabled":e.disabled,"data-semantic":e.semantic,"data-emphasis":e.emphasis,"data-icon":e.icon,"data-no-text":e.noText,"data-overflow":e.overflow}),e.children,e.text?H.createElement(H.Fragment,null,e.text):null,e.behaviour==="removable"?H.createElement(Ot,{icon:"cross",size:"small",variant:"ghost",className:"db-tab-remove-button",onClick:s=>n(),noText:!0,title:i()},i()):null)}const BY=H.forwardRef(RY),uC=BY;function jY(e,t){var r,n,i;const s=t||H.useRef(t),[o,l]=H.useState(()=>Kr),[a,c]=H.useState(()=>Kr+uu),[u,h]=H.useState(()=>Kr+cu),[d,f]=H.useState(()=>Kr+hu),[p,g]=H.useState(()=>""),[y,b]=H.useState(()=>({label:ak,placeholder:" ",rows:"4"}));function v(A){e.onInput&&e.onInput(A),e.input&&e.input(A)}function E(A){e.onChange&&e.onChange(A),e.change&&e.change(A)}function D(A){e.onBlur&&e.onBlur(A),e.blur&&e.blur(A)}function C(A){e.onFocus&&e.onFocus(A),e.focus&&e.focus(A)}function w(){return e.validMessage||Bb}function T(){var A;return e.invalidMessage||((A=s.current)===null||A===void 0?void 0:A.validationMessage)||jb}return H.useEffect(()=>{l(e.id||"textarea-"+Mn())},[]),H.useEffect(()=>{o&&(c(o+uu),h(o+cu),f(o+hu))},[o]),H.useEffect(()=>{const A=[u,d];e.message&&A.push(a),g(A.join(" "))},[e.message,a,u,d]),H.createElement("div",{className:Fr("db-textarea",e.className),"data-variant":e.variant},H.createElement("label",{htmlFor:o},(r=e.label)!==null&&r!==void 0?r:y.label),H.createElement("textarea",Object.assign({"aria-invalid":e.customValidity==="invalid","data-custom-validity":e.customValidity,ref:s},Pr(e,[]),{id:o,"data-resize":e.resize,disabled:e.disabled,required:e.required,readOnly:e.readOnly,form:e.form,maxLength:e.maxLength,minLength:e.minLength,name:e.name,wrap:e.wrap,spellCheck:e.spellCheck,autoComplete:e.autocomplete,onInput:A=>v(A),onChange:A=>E(A),onBlur:A=>D(A),onFocus:A=>C(A),value:e.value,"aria-describedby":e.message&&a,placeholder:(n=e.placeholder)!==null&&n!==void 0?n:y.placeholder,rows:(i=e.rows)!==null&&i!==void 0?i:y.rows,cols:e.cols})),e.message?H.createElement(Mr,{size:"small",icon:e.messageIcon,id:a},e.message):null,H.createElement(Mr,{size:"small",semantic:"successful",id:u},w()),H.createElement(Mr,{size:"small",semantic:"critical",id:d},T()))}const zY=H.forwardRef(jY),im=zY;function HY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>!1),[o,l]=H.useState(()=>!1),[a,c]=H.useState(()=>!0),[u,h]=H.useState(()=>!1),[d,f]=H.useState(()=>"sub-navigation-"+Mn()),[p,g]=H.useState(()=>{});function y(E){e.onClick&&e.onClick(E),o&&h(!0)}function b(E){E.stopPropagation(),h(!1)}function v(){var E;if(i&&document&&d){const D=document==null?void 0:document.getElementById(d);D&&(((E=D.children)===null||E===void 0?void 0:E.length)>0?(l(!0),p||g(new gY(n.current,D))):c(!1))}}return H.useEffect(()=>{s(!0)},[]),H.useEffect(()=>{e.subNavigationExpanded!==void 0&&h(!!e.subNavigationExpanded)},[e.subNavigationExpanded]),H.useEffect(()=>{v()},[i]),H.createElement("li",Object.assign({ref:n},Pr(e,[]),{id:e.id,onMouseOver:E=>p==null?void 0:p.enableFollow(),onMouseLeave:E=>p==null?void 0:p.disableFollow(),onMouseMove:E=>p==null?void 0:p.followByMouseEvent(E),className:Fr("db-navigation-item",e.className),"data-width":e.width,"data-icon":e.icon,"aria-current":e.active?"page":void 0,"aria-disabled":e.disabled}),a?null:H.createElement(H.Fragment,null,e.children),a?H.createElement(H.Fragment,null,H.createElement("button",{className:"db-navigation-item-expand-button","aria-haspopup":o,"aria-expanded":u,disabled:e.disabled,onClick:E=>y(E)},e.children),H.createElement("menu",{className:"db-sub-navigation",id:d},o?H.createElement("div",{className:"db-mobile-navigation-back"},H.createElement(Ot,{icon:"arrow_left",variant:"ghost",id:e.backButtonId,onClick:E=>b(E)},(r=e.backButtonText)!==null&&r!==void 0?r:KX)):null,H.createElement(H.Fragment,null,e.subNavigation))):null)}const UY=H.forwardRef(HY),cC=UY;function WY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr),[s,o]=H.useState(()=>!1);function l(a){a==null||a.preventDefault();const c=!s;e.onToggle&&e.onToggle(c),o(c)}return H.useEffect(()=>{i(e.id||"accordion-item-"+Mn()),e.defaultOpen&&o(e.defaultOpen)},[]),H.createElement("details",Object.assign({ref:r},Pr(e,[]),{id:n,className:Fr("db-accordion-item",e.className),"aria-disabled":e.disabled,open:s,name:e.name}),H.createElement("summary",{onClick:a=>l(a)},e.headlinePlain?H.createElement(H.Fragment,null,e.headlinePlain):null,e.headlinePlain?null:H.createElement(H.Fragment,null,e.headline)),H.createElement("div",null,e.content?H.createElement(H.Fragment,null,e.content):null,e.content?null:H.createElement(H.Fragment,null,e.children)))}const VY=H.forwardRef(WY),d6=VY;function GY(e,t){var r;const n=t||H.useRef(t),[i,s]=H.useState(()=>[]),[o,l]=H.useState(()=>""),[a,c]=H.useState(()=>!1);function u(d){try{return typeof d=="string"?JSON.parse(d):d}catch(f){console.error(f)}}function h(d){i.includes(d)?e.behaviour==="single"?s([]):s(i.filter(f=>f!==d)):e.behaviour==="single"?s([d]):s([...i,d]),e.onChange&&e.onChange(i)}return H.useEffect(()=>{c(!0)},[]),H.useEffect(()=>{if(n.current&&a){const d=n.current.getElementsByTagName("details");if(d){let f=[];Array.from(d).forEach((p,g)=>{var y;const b=p.id;(p.open||!((y=e.initOpenIndex)===null||y===void 0)&&y.includes(g))&&f.push(b);const v=p.getElementsByTagName("summary");(v==null?void 0:v.length)>0&&v[0].addEventListener("click",()=>{l(b)})}),e.behaviour==="single"&&f.length>1&&(f=[f[0]]),s(f),c(!1)}}},[n.current,a]),H.useEffect(()=>{(o==null?void 0:o.length)>0&&(h(o),l(""))},[o]),H.useEffect(()=>{if(n!=null&&n.current){const d=n.current.getElementsByTagName("details");d&&Array.from(d).forEach(f=>{f.open=i.includes(f.id)})}},[i]),H.createElement("div",Object.assign({ref:n},Pr(e,[]),{id:e.id,className:Fr("db-accordion",e.className),"data-variant":e.variant}),e.items?null:H.createElement(H.Fragment,null,e.children),e.items?H.createElement(H.Fragment,null,(r=u(e.items))===null||r===void 0?void 0:r.map((d,f)=>H.createElement(d6,{key:`accordion-item-${f}`,headlinePlain:d.headlinePlain,disabled:d.disabled,content:d.content}))):null)}const qY=H.forwardRef(GY),KY=qY;function JY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"navigation-"+Mn())},[]),H.createElement("nav",Object.assign({ref:r},Pr(e,[]),{id:n,"aria-labelledby":e.labelledBy,className:Fr("db-navigation",e.className)}),H.createElement("menu",null,e.children))}const XY=H.forwardRef(JY),f6=XY;function YY(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);function s(){if(!r.current)return;const o=r.current.querySelector("article");o&&ok(o)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{if(r.current&&n){const o=Array.from(r.current.children);o.length>=2&&(o[0].ariaHasPopup="true"),i(!1)}},[r.current,n]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:e.id,className:Fr("db-popover",e.className),onFocus:o=>s(),onMouseEnter:o=>s()}),H.createElement(H.Fragment,null,e.trigger),H.createElement("article",{className:"db-popover-content","data-spacing":e.spacing,"data-gap":e.gap,"data-animation":e.animation,"data-open":e.open,"data-delay":e.delay,"data-width":e.width,"data-placement":e.placement},e.children))}const ZY=H.forwardRef(YY),QY=ZY;function eZ(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>!1);function s(l){l.stopPropagation()}function o(){r!=null&&r.current&&ok(r.current)}return H.useEffect(()=>{i(!0)},[]),H.useEffect(()=>{if(r.current&&n){const l=r.current.parentElement;l&&["mouseenter","focus"].forEach(a=>{l.addEventListener(a,()=>o())}),i(!1)}},[r.current,n]),H.createElement("i",Object.assign({role:"tooltip","data-gap":"true",ref:r},Pr(e,[]),{id:e.id,"data-emphasis":e.emphasis,"data-animation":e.animation,"data-delay":e.delay,"data-width":e.width,"data-variant":e.variant,"data-placement":e.placement,onClick:l=>s(l),className:Fr("db-tooltip",e.className)}),e.children)}const tZ=H.forwardRef(eZ),Ks=tZ;function rZ(e,t){const r=t||H.useRef(t),[n,i]=H.useState(()=>Kr);return H.useEffect(()=>{i(e.id||"tab-list-"+Mn())},[]),H.createElement("div",Object.assign({ref:r},Pr(e,[]),{id:n,className:Fr("db-tab-list",e.className)}),H.createElement("ul",{role:"tablist"},e.children))}const nZ=H.forwardRef(rZ),lk=nZ;function iZ(e,t){const r=t||H.useRef(t);return H.useEffect(()=>{},[]),H.createElement("section",Object.assign({role:"tabpanel",ref:r},Pr(e,[]),{className:Fr("db-tab-panel",e.className),id:e.id,"aria-labelledby":e.labelledBy}),e.content?H.createElement(H.Fragment,null,e.content):null,e.children)}const sZ=H.forwardRef(iZ),w0=sZ;function oZ(e,t){var r,n,i,s;const o=t||H.useRef(t),[l,a]=H.useState(()=>"tabs-"+Mn()),[c,u]=H.useState(()=>""),[h,d]=H.useState(()=>!1),[f,p]=H.useState(()=>!1),[g,y]=H.useState(()=>!1),[b,v]=H.useState(()=>null);function E(A){try{return typeof A=="string"?JSON.parse(A):A}catch($){console.error($)}}function D(A){const $=A.scrollWidth>A.clientWidth;p($&&A.scrollLeft>1),y($&&A.scrollLeft{D($)}))}}}function T(A){if(o.current){const $=o.current.getElementsByClassName("db-tab-item");($==null?void 0:$.length)>0&&Array.from($).forEach((N,L)=>{const F=N.querySelector("label"),P=N.querySelector("input");if(P&&F){if(!P.id){const _=`${c}-tab-${L}`;F.setAttribute("for",_),P.setAttribute("aria-controls",`${c}-tab-panel-${L}`),P.id=_,P.setAttribute("name",c)}if(A){const _=!e.initialSelectedMode||e.initialSelectedMode==="auto",M=e.initialSelectedIndex===void 0&&L===0||e.initialSelectedIndex===L;_&&M&&P.click()}}});const I=o.current.getElementsByClassName("db-tab-panel");(I==null?void 0:I.length)>0&&Array.from(I).forEach((N,L)=>{N.id||(N.id=`${c}-tab-panel-${L}`,N.setAttribute("aria-labelledby",`${c}-tab-${L}`))})}}return H.useEffect(()=>{a(e.id||l),u(e.name||Mn()),d(!0)},[]),H.useEffect(()=>{if(o.current&&h){w(),T(!0);const A=o.current.querySelector(".db-tab-list");A&&new MutationObserver(I=>{I.forEach(N=>{(N.removedNodes.length||N.addedNodes.length)&&(w(),T())})}).observe(A,{childList:!0,subtree:!0}),d(!1)}},[o.current,h]),H.createElement("div",Object.assign({ref:o},Pr(e,[]),{id:l,className:Fr("db-tabs",e.className),"data-orientation":e.orientation,"data-scroll-behaviour":e.behaviour,"data-alignment":(r=e.alignment)!==null&&r!==void 0?r:"start","data-width":(n=e.width)!==null&&n!==void 0?n:"auto"}),f?H.createElement(Ot,{variant:"ghost",icon:"chevron_left",className:"tabs-scroll-left",noText:!0,onClick:A=>C(!0)},"Scroll left"):null,e.tabs?H.createElement(H.Fragment,null,H.createElement(lk,null,(i=E(e.tabs))===null||i===void 0?void 0:i.map((A,$)=>H.createElement(x0,{key:e.name+"tab-item"+$,active:A.active,label:A.label,iconAfter:A.iconAfter,icon:A.icon,noText:A.noText}))),(s=E(e.tabs))===null||s===void 0?void 0:s.map((A,$)=>H.createElement(w0,{key:e.name+"tab-panel"+$,content:A.content},A.children))):null,g?H.createElement(Ot,{variant:"ghost",icon:"chevron_right",className:"tabs-scroll-right",noText:!0,onClick:A=>C()},"Scroll right"):null,e.children)}const aZ=H.forwardRef(oZ),p6=aZ,lZ=["ear","ear_disabled","person_with_blind_cane","person_with_rollator","stepless_entry","support_dog","vehicle_entry_aid","arrow_down","arrow_left","arrow_right","arrow_up","arrow_up_right","chevron_down","chevron_left","chevron_right","chevron_up","flip_horizontal","flip_vertical","reload","sort_down","sort_up","swap_horizontal","swap_vertical","undo","fast_backward_10","fast_backward","fast_backward_30","fast_forward_10","fast_forward","fast_forward_30","microphone","pause","play","skip_backward","skip_forward","stop","subtitles","volume_disabled","volume_down","volume_off","volume_up","house","market","train_station","cash","credit_card","discount","generic_card","gift","law","sepa","shopping_bag","shopping_basket","shopping_basket_disabled","shopping_cart","shopping_cart_disabled","tickets","ticket","voucher","chat","envelope","paper_plane","speech_bubbles","speech_bubble","speech_bubble_exclamation_mark","speech_bubble_question_mark","alarm_clock","alarm_clock_plus","calendar","clock","camera","fax_machine","mobile_phone","mobile_phone_disabled","printer","telephone","bin","block","check","copy","cross","dots_drag_and_drop","minus","pen","plus","save","cloud","globe","leaf","moon","snow_flake","sun","water_drop","cloud_download","cloud_upload","document","document_check","download","folder","folder_open","image","notebook","paper_clip","upload","beverage","breakfast","cup","knife_and_fork","cigarette_disabled","clothes_hanger","hand_washing","restricted_mobility_toilet","shower","shower_men","shower_women","stroller","toys","users","user","wc","wc_men","wc_sign","wc_women","filter","fullscreen","fullscreen_exit","grid","list","resize","resize_handle_corner","zoom_in","zoom_out","db","s_bahn","subway","compass","location_arrow","location_arrow_north","location_crosshairs","location_pin","map","map_pin","navigation_straight","navigation_to_left","navigation_to_right","navigation_u_turn","parking","road_sign","station","mask","medical_cross","gear_wheel","log_in","log_out","magnifying_glass","menu","more_horizontal","more_vertical","bell","bell_disabled","check_circle","cross_circle","exclamation_mark_circle","information_circle","question_mark_circle","warning_triangle","fingerprint","key","lock_closed","lock_open","shield_check","visibility_disabled","visible","crown","face_delighted","face_disappointed","face_neutral","face_sad","face_smiling","heart","share","star","thumbs_down","thumbs_up","augmented_reality","bug","database","light_bulb","power_socket","qr_code","qr_code_scan","speedometer","wifi","wifi_disabled","wrench","airplane","bike","bike_trailer","boat","bus","car","electric_car","electric_scooter","handcart","pedestrian","scooter","ship","taxi","train","train_and_car"],uZ=()=>{const{notification:e}=pr(s=>s),[t,r]=H.useState(),[n,i]=H.useState(!1);return H.useEffect(()=>{e&&(r(e),setTimeout(()=>pr.setState({notification:void 0}),1500))},[e]),H.useEffect(()=>{(async()=>{setTimeout(()=>i(!0),2e3)})()},[]),B.jsx(v0,{className:`notification${n?" opacity-100":" opacity-0"}${e?" show":""}`,semantic:"informational",variant:"overlay",children:t})};var m6=Function.prototype.toString,dd=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,hC,Av;if(typeof dd=="function"&&typeof Object.defineProperty=="function")try{hC=Object.defineProperty({},"length",{get:function(){throw Av}}),Av={},dd(function(){throw 42},null,hC)}catch(e){e!==Av&&(dd=null)}else dd=null;var cZ=/^\s*class\b/,dC=function(t){try{var r=m6.call(t);return cZ.test(r)}catch{return!1}},Cw=function(t){try{return dC(t)?!1:(m6.call(t),!0)}catch{return!1}},kv=Object.prototype.toString,hZ="[object Object]",dZ="[object Function]",fZ="[object GeneratorFunction]",pZ="[object HTMLAllCollection]",mZ="[object HTML document.all class]",gZ="[object HTMLCollection]",yZ=typeof Symbol=="function"&&!!Symbol.toStringTag,vZ=!(0 in[,]),fC=function(){return!1};if(typeof document=="object"){var bZ=document.all;kv.call(bZ)===kv.call(document.all)&&(fC=function(t){if((vZ||!t)&&(typeof t>"u"||typeof t=="object"))try{var r=kv.call(t);return(r===pZ||r===mZ||r===gZ||r===hZ)&&t("")==null}catch{}return!1})}var uk=dd?function(t){if(fC(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{dd(t,null,hC)}catch(r){if(r!==Av)return!1}return!dC(t)&&Cw(t)}:function(t){if(fC(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(yZ)return Cw(t);if(dC(t))return!1;var r=kv.call(t);return r!==dZ&&r!==fZ&&!/^\[object HTML/.test(r)?!1:Cw(t)},xZ=uk,wZ=Object.prototype.toString,g6=Object.prototype.hasOwnProperty,SZ=function(t,r,n){for(var i=0,s=t.length;i=3&&(i=n),wZ.call(t)==="[object Array]"?SZ(t,r,i):typeof t=="string"?DZ(t,r,i):EZ(t,r,i)},ck=CZ,y6=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],TZ={},Tw=y6,AZ=typeof globalThis>"u"?TZ:globalThis,_g=function(){for(var t=[],r=0;r"u"||!Hn?rr:Hn(Uint8Array),yc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?rr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?rr:ArrayBuffer,"%ArrayIteratorPrototype%":Mh&&Hn?Hn([][Symbol.iterator]()):rr,"%AsyncFromSyncIteratorPrototype%":rr,"%AsyncFunction%":Gh,"%AsyncGenerator%":Gh,"%AsyncGeneratorFunction%":Gh,"%AsyncIteratorPrototype%":Gh,"%Atomics%":typeof Atomics>"u"?rr:Atomics,"%BigInt%":typeof BigInt>"u"?rr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?rr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?rr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?rr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":VZ,"%eval%":eval,"%EvalError%":GZ,"%Float32Array%":typeof Float32Array>"u"?rr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?rr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?rr:FinalizationRegistry,"%Function%":x6,"%GeneratorFunction%":Gh,"%Int8Array%":typeof Int8Array>"u"?rr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?rr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?rr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mh&&Hn?Hn(Hn([][Symbol.iterator]())):rr,"%JSON%":typeof JSON=="object"?JSON:rr,"%Map%":typeof Map>"u"?rr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mh||!Hn?rr:Hn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?rr:Promise,"%Proxy%":typeof Proxy>"u"?rr:Proxy,"%RangeError%":qZ,"%ReferenceError%":KZ,"%Reflect%":typeof Reflect>"u"?rr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?rr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mh||!Hn?rr:Hn(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?rr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mh&&Hn?Hn(""[Symbol.iterator]()):rr,"%Symbol%":Mh?Symbol:rr,"%SyntaxError%":jd,"%ThrowTypeError%":XZ,"%TypedArray%":ZZ,"%TypeError%":Cd,"%Uint8Array%":typeof Uint8Array>"u"?rr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?rr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?rr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?rr:Uint32Array,"%URIError%":JZ,"%WeakMap%":typeof WeakMap>"u"?rr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?rr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?rr:WeakSet};if(Hn)try{null.error}catch(e){var QZ=Hn(Hn(e));yc["%Error.prototype%"]=QZ}var eQ=function e(t){var r;if(t==="%AsyncFunction%")r=kw("async function () {}");else if(t==="%GeneratorFunction%")r=kw("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=kw("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Hn&&(r=Hn(i.prototype))}return yc[t]=r,r},xP={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},$g=hk,S0=Xc,tQ=$g.call(Function.call,Array.prototype.concat),rQ=$g.call(Function.apply,Array.prototype.splice),wP=$g.call(Function.call,String.prototype.replace),D0=$g.call(Function.call,String.prototype.slice),nQ=$g.call(Function.call,RegExp.prototype.exec),iQ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,sQ=/\\(\\)?/g,oQ=function(t){var r=D0(t,0,1),n=D0(t,-1);if(r==="%"&&n!=="%")throw new jd("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new jd("invalid intrinsic syntax, expected opening `%`");var i=[];return wP(t,iQ,function(s,o,l,a){i[i.length]=l?wP(a,sQ,"$1"):o||s}),i},aQ=function(t,r){var n=t,i;if(S0(xP,n)&&(i=xP[n],n="%"+i[0]+"%"),S0(yc,n)){var s=yc[n];if(s===Gh&&(s=eQ(n)),typeof s>"u"&&!r)throw new Cd("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new jd("intrinsic "+t+" does not exist!")},ur=function(t,r){if(typeof t!="string"||t.length===0)throw new Cd("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cd('"allowMissing" argument must be a boolean');if(nQ(/^%?[^%]*%?$/,t)===null)throw new jd("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=oQ(t),i=n.length>0?n[0]:"",s=aQ("%"+i+"%",r),o=s.name,l=s.value,a=!1,c=s.alias;c&&(i=c[0],rQ(n,tQ([0,1],c)));for(var u=1,h=!0;u=n.length){var g=gc(l,d);h=!!g,h&&"get"in g&&!("originalValue"in g.get)?l=g.get:l=l[d]}else h=S0(l,d),l=l[d];h&&!a&&(yc[o]=l)}}return l},lQ=ur,_v=lQ("%Object.defineProperty%",!0)||!1;if(_v)try{_v({},"a",{value:1})}catch{_v=!1}var Hb=_v,uQ=ur,$v=uQ("%Object.getOwnPropertyDescriptor%",!0);if($v)try{$v([],"length")}catch{$v=null}var ff=$v,SP=Hb,cQ=Bo,Lh=Ut,DP=ff,w6=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Lh("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Lh("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Lh("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Lh("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Lh("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Lh("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,a=!!DP&&DP(t,r);if(SP)SP(t,r,{configurable:o===null&&a?a.configurable:!o,enumerable:i===null&&a?a.enumerable:!i,value:n,writable:s===null&&a?a.writable:!s});else if(l||!i&&!s&&!o)t[r]=n;else throw new cQ("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},pC=Hb,S6=function(){return!!pC};S6.hasArrayLengthDefineBug=function(){if(!pC)return null;try{return pC([],"length",{value:1}).length!==1}catch{return!0}};var pk=S6,hQ=ur,EP=w6,dQ=pk(),CP=ff,TP=Ut,fQ=hQ("%Math.floor%"),pQ=function(t,r){if(typeof t!="function")throw new TP("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||fQ(r)!==r)throw new TP("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&CP){var o=CP(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!n)&&(dQ?EP(t,"length",r,!0,!0):EP(t,"length",r)),t};(function(e){var t=hk,r=ur,n=pQ,i=Ut,s=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),l=r("%Reflect.apply%",!0)||t.call(o,s),a=Hb,c=r("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var f=l(t,o,arguments);return n(f,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return l(t,s,arguments)};a?a(e.exports,"apply",{value:u}):e.exports.apply=u})(v6);var Eu=v6.exports,D6=ur,E6=Eu,mQ=E6(D6("String.prototype.indexOf")),bi=function(t,r){var n=D6(t,!!r);return typeof n=="function"&&mQ(t,".prototype.")>-1?E6(n):n},$w,AP;function mk(){if(AP)return $w;AP=1;var e=fk;return $w=function(){return e()&&!!Symbol.toStringTag},$w}var gQ={},E0=ck,yQ=_g,kP=Eu,gk=bi,Fv=ff,vQ=gk("Object.prototype.toString"),C6=mk()(),_P=typeof globalThis>"u"?gQ:globalThis,mC=yQ(),yk=gk("String.prototype.slice"),Fw=Object.getPrototypeOf,bQ=gk("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:wQ(t)}return Fv?xQ(t):null},$P=Object.prototype.toString,T6=function(t){var r=$P.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&$P.call(t.callee)==="[object Function]"),n},Pw,FP;function SQ(){if(FP)return Pw;FP=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=T6,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(d){var f=d.constructor;return f&&f.prototype===d},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!c["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{a(window[d])}catch{return!0}}catch{return!0}return!1}(),h=function(d){if(typeof window>"u"||!u)return a(d);try{return a(d)}catch{return!1}};e=function(f){var p=f!==null&&typeof f=="object",g=r.call(f)==="[object Function]",y=n(f),b=p&&r.call(f)==="[object String]",v=[];if(!p&&!g&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&g;if(b&&f.length>0&&!t.call(f,0))for(var D=0;D0)for(var C=0;C2?arguments[2]:{},n=CQ(t);TQ&&(n=kQ.call(n,Object.getOwnPropertySymbols(t)));for(var i=0;i-1e3&&e<1e3||_6.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-jP(-e):jP(e);if(n!==e){var i=String(n),s=wk.call(t,i.length+1);return Wl.call(i,r,"$&_")+"."+Wl.call(Wl.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Wl.call(t,r,"$&_")}var vC=IQ,UP=vC.custom,WP=P6(UP)?UP:null,WQ=function e(t,r,n,i){var s=r||{};if(Ll(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ll(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Ll(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ll(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ll(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return N6(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var a=String(t);return l?HP(t,a):a}if(typeof t=="bigint"){var c=String(t)+"n";return l?HP(t,c):c}var u=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return bC(t)?"[Array]":"[Object]";var h=lee(s,n);if(typeof i>"u")i=[];else if(I6(i,t)>=0)return"[Circular]";function d(F,P,_){if(P&&(i=UQ.call(i),i.push(P)),_){var M={depth:s.depth};return Ll(s,"quoteStyle")&&(M.quoteStyle=s.quoteStyle),e(F,M,n+1,i)}return e(F,s,n+1,i)}if(typeof t=="function"&&!VP(t)){var f=QQ(t),p=Ty(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+Jo.call(p,", ")+" }":"")}if(P6(t)){var g=zd?Wl.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):yC.call(t);return typeof t=="object"&&!zd?mp(g):g}if(see(t)){for(var y="<"+RP.call(String(t.nodeName)),b=t.attributes||[],v=0;v",y}if(bC(t)){if(t.length===0)return"[]";var E=Ty(t,d);return h&&!aee(E)?"["+xC(E,h)+"]":"[ "+Jo.call(E,", ")+" ]"}if(qQ(t)){var D=Ty(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!$6.call(t,"cause")?"{ ["+String(t)+"] "+Jo.call(BP.call("[cause]: "+d(t.cause),D),", ")+" }":D.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Jo.call(D,", ")+" }"}if(typeof t=="object"&&o){if(WP&&typeof t[WP]=="function"&&vC)return vC(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(eee(t)){var C=[];return MP&&MP.call(t,function(F,P){C.push(d(P,t,!0)+" => "+d(F,t))}),GP("Map",T0.call(t),C,h)}if(nee(t)){var w=[];return LP&&LP.call(t,function(F){w.push(d(F,t))}),GP("Set",A0.call(t),w,h)}if(tee(t))return Lw("WeakMap");if(iee(t))return Lw("WeakSet");if(ree(t))return Lw("WeakRef");if(JQ(t))return mp(d(Number(t)));if(YQ(t))return mp(d(gC.call(t)));if(XQ(t))return mp(RQ.call(t));if(KQ(t))return mp(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===NQ)return"{ [object globalThis] }";if(!GQ(t)&&!VP(t)){var T=Ty(t,d),A=zP?zP(t)===Object.prototype:t instanceof Object||t.constructor===Object,$=t instanceof Object?"":"null prototype",I=!A&&$i&&Object(t)===t&&$i in t?wk.call(Cu(t),8,-1):$?"Object":"",N=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",L=N+(I||$?"["+Jo.call(BP.call([],I||[],$||[]),": ")+"] ":"");return T.length===0?L+"{}":h?L+"{"+xC(T,h)+"}":L+"{ "+Jo.call(T,", ")+" }"}return String(t)};function F6(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function VQ(e){return Wl.call(String(e),/"/g,""")}function bC(e){return Cu(e)==="[object Array]"&&(!$i||!(typeof e=="object"&&$i in e))}function GQ(e){return Cu(e)==="[object Date]"&&(!$i||!(typeof e=="object"&&$i in e))}function VP(e){return Cu(e)==="[object RegExp]"&&(!$i||!(typeof e=="object"&&$i in e))}function qQ(e){return Cu(e)==="[object Error]"&&(!$i||!(typeof e=="object"&&$i in e))}function KQ(e){return Cu(e)==="[object String]"&&(!$i||!(typeof e=="object"&&$i in e))}function JQ(e){return Cu(e)==="[object Number]"&&(!$i||!(typeof e=="object"&&$i in e))}function XQ(e){return Cu(e)==="[object Boolean]"&&(!$i||!(typeof e=="object"&&$i in e))}function P6(e){if(zd)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!yC)return!1;try{return yC.call(e),!0}catch{}return!1}function YQ(e){if(!e||typeof e!="object"||!gC)return!1;try{return gC.call(e),!0}catch{}return!1}var ZQ=Object.prototype.hasOwnProperty||function(e){return e in this};function Ll(e,t){return ZQ.call(e,t)}function Cu(e){return BQ.call(e)}function QQ(e){if(e.name)return e.name;var t=zQ.call(jQ.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function I6(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return N6(wk.call(e,0,t.maxStringLength),t)+n}var i=Wl.call(Wl.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,oee);return F6(i,"single",t)}function oee(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+HQ.call(t.toString(16))}function mp(e){return"Object("+e+")"}function Lw(e){return e+" { ? }"}function GP(e,t,r,n){var i=n?xC(r,n):Jo.call(r,", ");return e+" ("+t+") {"+i+"}"}function aee(e){for(var t=0;t=0)return!1;return!0}function lee(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Jo.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Jo.call(Array(t+1),r)}}function xC(e,t){if(e.length===0)return"";var r=` `+t.prev+t.base;return r+Jo.call(e,","+r)+` -`+t.prev}function Ty(e,t){var r=bC(e),n=[];if(r){n.length=e.length;for(var i=0;i"u")return"Undefined";if(typeof t=="function"||typeof t=="object")return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},cee=uee,Yc=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":cee(t)},qP=Ut,hee=WQ,dee=Wb,fee=Yc,pee=function(t,r){if(fee(t)!=="Object")throw new qP("Assertion failed: Type(O) is not Object");if(!dee(r))throw new qP("Assertion failed: IsPropertyKey(P) is not true, got "+hee(r));return t[r]},pf=Number.isNaN||function(t){return t!==t},mee=pf,nl=function(e){return(typeof e=="number"||typeof e=="bigint")&&!mee(e)&&e!==1/0&&e!==-1/0},M6=ur,gee=M6("%Math.abs%"),yee=M6("%Math.floor%"),vee=pf,bee=nl,Vb=function(t){if(typeof t!="number"||vee(t)||!bee(t))return!1;var r=gee(t);return yee(r)===r},xee=Eu,L6=bi,wee=ur,wC=wee("%ArrayBuffer%",!0),Iv=L6("ArrayBuffer.prototype.byteLength",!0),See=L6("Object.prototype.toString"),KP=!!wC&&!Iv&&new wC(0).slice,JP=!!KP&&xee(KP),mf=Iv||JP?function(t){if(!t||typeof t!="object")return!1;try{return Iv?Iv(t):JP(t,0),!0}catch{return!1}}:wC?function(t){return See(t)==="[object ArrayBuffer]"}:function(t){return!1},Dee=bi,XP=Dee("ArrayBuffer.prototype.byteLength",!0),Eee=mf,O6=function(t){return Eee(t)?XP?XP(t):t.byteLength:NaN},Cee=bi,YP=Cee("SharedArrayBuffer.prototype.byteLength",!0),Pg=YP?function(t){if(!t||typeof t!="object")return!1;try{return YP(t),!0}catch{return!1}}:function(t){return!1},Tee={},Aee=Ut,kee=O6,_ee=_g(),$ee=bi,Fee=mf,Pee=Pg,Iee=$ee("SharedArrayBuffer.prototype.byteLength",!0),gf=function(t){var r=Pee(t);if(!Fee(t)&&!r)throw new Aee("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((r?Iee:kee)(t)===0)try{new Tee[_ee[0]](t)}catch(n){return!!n&&n.name==="TypeError"}return!1},Ow,ZP;function R6(){if(ZP)return Ow;ZP=1;var e=Ut,t=Xc,r=Wb,n=Yc;return Ow=function(s,o){if(n(s)!=="Object")throw new e("Assertion failed: `O` must be an Object");if(!r(o))throw new e("Assertion failed: `P` must be a Property Key");return t(s,o)},Ow}var Nee=ur,B6=Nee("%Array%"),Mee=!B6.isArray&&bi("Object.prototype.toString"),z6=B6.isArray||function(t){return Mee(t)==="[object Array]"},Sk=z6,Rw,QP;function j6(){return QP||(QP=1,Rw=function(t){return t==="BIGUINT64"||t==="BIGINT64"}),Rw}var Bw,e3;function Lee(){return e3||(e3=1,Bw=function(t){return t==="UINT8"||t==="UINT8C"||t==="UINT16"||t==="UINT32"||t==="BIGUINT64"}),Bw}var zw,t3;function Oee(){if(t3)return zw;t3=1;var e=ur,t=e("%Math.pow%");return zw=function(n){var i=n[3]&128?-1:1,s=(n[3]&127)<<1|n[2]>>7,o=(n[2]&127)<<16|n[1]<<8|n[0];return s===0&&o===0?i===1?0:-0:s===255&&o===0?i===1?1/0:-1/0:s===255&&o!==0?NaN:(s-=127,s===-127?i*o*t(2,-149):i*(1+o*t(2,-23))*t(2,s))},zw}var jw,r3;function Ree(){if(r3)return jw;r3=1;var e=ur,t=e("%Math.pow%");return jw=function(n){var i=n[7]&128?-1:1,s=(n[7]&127)<<4|(n[6]&240)>>4,o=(n[6]&15)*281474976710656+n[5]*1099511627776+n[4]*4294967296+n[3]*16777216+n[2]*65536+n[1]*256+n[0];return s===0&&o===0?i*0:s===2047&&o!==0?NaN:s===2047&&o===0?i*(1/0):(s-=1023,s===-1023?i*o*5e-324:i*(1+o/4503599627370496)*t(2,s))},jw}var Hw,n3;function Bee(){if(n3)return Hw;n3=1;var e=ur,t=e("%Math.pow%"),r=e("%Number%"),n=e("%BigInt%",!0);return Hw=function(s,o,a,l){for(var c=l?n:r,u=c(0),h=0;h=0&&t<=255&&(t|0)===t}),Ww}var Vw,o3;function Hee(){if(o3)return Vw;o3=1;var e=ur,t=bi,r=dk,n=Bo,i=Ut,s=e("%BigInt%",!0),o=R6(),a=Sk,l=j6(),c=Lee(),u=Oee(),h=Ree(),d=Bee(),f=zee(),p=jee(),g=t("Array.prototype.reverse"),y=t("Array.prototype.slice"),b=vk,v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};return Vw=function(D,C,w){if(!o(v,D))throw new i("Assertion failed: `type` must be a TypedArray element type: "+b(v));if(!a(C)||!f(C,p))throw new i("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof w!="boolean")throw new i("Assertion failed: `isLittleEndian` must be a Boolean");var T=v[D];if(C.length!==T)throw new r("Assertion failed: `rawBytes` must have a length of "+T+" for type "+D);var A=l(D);if(A&&!s)throw new n("this environment does not support BigInts");return C=y(C,0,T),w||g(C),D==="FLOAT32"?u(C):D==="FLOAT64"?h(C):d(C,T,c(D),A)},Vw}var Gw,a3;function Uee(){if(a3)return Gw;a3=1;var e={}.toString;return Gw=Array.isArray||function(t){return e.call(t)=="[object Array]"},Gw}var qw,l3;function Wee(){if(l3)return qw;l3=1;var e=ur,t=e("%Array.prototype.concat%"),r=Eu,n=bi,i=n("Array.prototype.slice"),s=fk(),o=s&&Symbol.isConcatSpreadable,a=[],l=o?r.apply(t,a):null,c=o?Uee():null;return qw=o?function(h){for(var d=0;d5&&typeof arguments[5]!="boolean")throw new Aa("Assertion failed: `isLittleEndian` must be a boolean, if present");if(tte(t))throw new Aa("Assertion failed: `arrayBuffer` is detached");if(r<0)throw new Aa("Assertion failed: `byteIndex` must be non-negative");var a=h3.size["$"+n];if(!a)throw new Aa('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');var l;if(o)throw new Yee("SharedArrayBuffer is not supported by this implementation");l=Jw(new Zee(t,r),0,a);var c=arguments.length>5?arguments[5]:ste==="little",u=c?Jw(c3([0,0,0,0,0,0,0,0],l),-a):Jw(c3(l,[0,0,0,0,0,0,0,0]),0,a);return rte(n,u,c)},ate=ur,lte=ate("%Math.max%"),ute=ur,cte=ute("%Math.min%"),d3=pf,U6=function(t,r){return t===r?t===0?1/t===1/r:!0:d3(t)&&d3(r)},Ay=Ut,hte=Wb,f3=U6,dte=Yc,p3=function(){try{return delete[].length,!0}catch{return!1}}(),fte=function(t,r,n,i){if(dte(t)!=="Object")throw new Ay("Assertion failed: `O` must be an Object");if(!hte(r))throw new Ay("Assertion failed: `P` must be a Property Key");if(typeof i!="boolean")throw new Ay("Assertion failed: `Throw` must be a Boolean");if(i){if(t[r]=n,p3&&!f3(t[r],n))throw new Ay("Attempted to assign to readonly property.");return!0}try{return t[r]=n,p3?f3(t[r],n):!0}catch{return!1}},Xw,m3;function pte(){if(m3)return Xw;m3=1;var e=ur,t=e("%BigInt%",!0),r=Ut,n=Bo;return Xw=function(s){if(typeof s!="string")throw new r("`argument` must be a string");if(!t)throw new n("BigInts are not supported in this environment");try{return t(s)}catch{return}},Xw}var Yw,g3;function mte(){return g3||(g3=1,Yw=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),Yw}var Zw,y3;function gte(){if(y3)return Zw;y3=1;var e=Date.prototype.getDay,t=function(o){try{return e.call(o),!0}catch{return!1}},r=Object.prototype.toString,n="[object Date]",i=mk()();return Zw=function(o){return typeof o!="object"||o===null?!1:i?t(o):r.call(o)===n},Zw}var ky={exports:{}},v3;function yte(){if(v3)return ky.exports;v3=1;var e=Object.prototype.toString,t=b6();if(t){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/,i=function(o){return typeof o.valueOf()!="symbol"?!1:n.test(r.call(o))};ky.exports=function(o){if(typeof o=="symbol")return!0;if(e.call(o)!=="[object Symbol]")return!1;try{return i(o)}catch{return!1}}}else ky.exports=function(o){return!1};return ky.exports}var Qw,b3;function vte(){if(b3)return Qw;b3=1;var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",t=mte(),r=uk,n=gte(),i=yte(),s=function(l,c){if(typeof l>"u"||l===null)throw new TypeError("Cannot call method on "+l);if(typeof c!="string"||c!=="number"&&c!=="string")throw new TypeError('hint must be "string" or "number"');var u=c==="string"?["toString","valueOf"]:["valueOf","toString"],h,d,f;for(f=0;f1&&(arguments[1]===String?c="string":arguments[1]===Number&&(c="number"));var u;if(e&&(Symbol.toPrimitive?u=o(l,Symbol.toPrimitive):i(l)&&(u=Symbol.prototype.valueOf)),typeof u<"u"){var h=u.call(l,c);if(t(h))return h;throw new TypeError("unable to convert exotic object to primitive")}return c==="default"&&(n(l)||i(l))&&(c="string"),s(l,c==="default"?"number":c)},Qw}var eS,x3;function W6(){if(x3)return eS;x3=1;var e=vte();return eS=function(r){return arguments.length>1?e(r,arguments[1]):e(r)},eS}var tS,w3;function V6(){if(w3)return tS;w3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Number%"),n=Ut,i=Bo,s=pte(),o=W6();return tS=function(l){if(!t)throw new i("BigInts are not supported in this environment");var c=o(l,r);if(c==null)throw new n("Cannot convert null or undefined to a BigInt");if(typeof c=="boolean")return t(c?1:0);if(typeof c=="number")throw new n("Cannot convert a Number value to a BigInt");if(typeof c=="string"){var u=s(c);if(typeof u>"u")throw new n("Failed to parse String to BigInt");return u}if(typeof c=="symbol")throw new n("Cannot convert a Symbol value to a BigInt");if(typeof c!="bigint")throw new i("Assertion failed: unknown primitive type");return c},tS}var rS,S3;function G6(){if(S3)return rS;S3=1;var e=ur,t=e("%BigInt%",!0),r=dk,n=Ut,i=t&&t(0);return rS=function(o,a){if(typeof o!="bigint"||typeof a!="bigint")throw new n("Assertion failed: `n` and `d` arguments must be BigInts");if(a===i)throw new r("Division by zero");return o===i?i:o%a},rS}var nS,D3;function q6(){return D3||(D3=1,nS=function(t,r,n){var i=t(r,n);return i>=0?i:i+n}),nS}var iS,E3;function bte(){if(E3)return iS;E3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=V6(),i=G6(),s=q6(),o=t&&BigInt(r(2,32))*BigInt(r(2,31)),a=t&&BigInt(r(2,32))*BigInt(r(2,32));return iS=function(c){var u=n(c),h=s(i,u,a);return h>=o?h-a:h},iS}var sS,C3;function xte(){if(C3)return sS;C3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=V6(),i=G6(),s=q6(),o=t&&BigInt(r(2,32))*BigInt(r(2,32));return sS=function(l){var c=n(l),u=s(i,c,o);return u},sS}var oS,T3;function wte(){if(T3)return oS;T3=1;var e=Math.floor;return oS=function(r,n){var i=r%n;return e(i>=0?i:i+n)},oS}var aS,A3;function vf(){if(A3)return aS;A3=1;var e=wte();return aS=function(r,n){return e(r,n)},aS}var lS,k3;function Ste(){return k3||(k3=1,lS=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),lS}var uS,_3;function Dte(){if(_3)return uS;_3=1;var e=bi,t=mk()(),r,n,i,s;if(t){r=e("Object.prototype.hasOwnProperty"),n=e("RegExp.prototype.exec"),i={};var o=function(){throw i};s={toString:o,valueOf:o},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=o)}var a=e("Object.prototype.toString"),l=Object.getOwnPropertyDescriptor,c="[object RegExp]";return uS=t?function(h){if(!h||typeof h!="object")return!1;var d=l(h,"lastIndex"),f=d&&r(d,"value");if(!f)return!1;try{n(h,s)}catch(p){return p===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:a(h)===c},uS}var cS,$3;function Ete(){if($3)return cS;$3=1;var e=bi,t=Dte(),r=e("RegExp.prototype.exec"),n=Ut;return cS=function(s){if(!t(s))throw new n("`regex` must be a RegExp");return function(a){return r(s,a)!==null}},cS}var hS,F3;function K6(){if(F3)return hS;F3=1;var e=Ut;return hS=function(r){if(r==null)throw new e(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r},hS}var Cte=ur,Tte=Cte("%String%"),Ate=Ut,J6=function(t){if(typeof t=="symbol")throw new Ate("Cannot convert a Symbol value to a string");return Tte(t)},dS,P3;function X6(){if(P3)return dS;P3=1;var e=K6(),t=J6,r=bi,n=r("String.prototype.replace"),i=/^\s$/.test("᠎"),s=i?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,o=i?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;return dS=function(){var l=t(e(this));return n(n(l,s,""),o,"")},dS}var fS,I3;function Y6(){if(I3)return fS;I3=1;var e=X6(),t="​",r="᠎";return fS=function(){return String.prototype.trim&&t.trim()===t&&r.trim()===r&&("_"+r).trim()==="_"+r&&(r+"_").trim()===r+"_"?String.prototype.trim:e},fS}var pS,N3;function kte(){if(N3)return pS;N3=1;var e=Ub,t=Y6();return pS=function(){var n=t();return e(String.prototype,{trim:n},{trim:function(){return String.prototype.trim!==n}}),n},pS}var mS,M3;function _te(){if(M3)return mS;M3=1;var e=Eu,t=Ub,r=K6(),n=X6(),i=Y6(),s=kte(),o=e(i()),a=function(c){return r(c),o(c)};return t(a,{getPolyfill:i,implementation:n,shim:s}),mS=a,mS}var gS,L3;function $te(){if(L3)return gS;L3=1;var e=ur,t=e("%Number%"),r=e("%RegExp%"),n=Ut,i=e("%parseInt%"),s=bi,o=Ete(),a=s("String.prototype.slice"),l=o(/^0b[01]+$/i),c=o(/^0o[0-7]+$/i),u=o(/^[-+]0x[0-9a-f]+$/i),h=["…","​","￾"].join(""),d=new r("["+h+"]","g"),f=o(d),p=_te();return gS=function g(y){if(typeof y!="string")throw new n("Assertion failed: `argument` is not a String");if(l(y))return t(i(a(y,2),2));if(c(y))return t(i(a(y,2),8));if(f(y)||u(y))return NaN;var b=p(y);return b!==y?g(b):t(y)},gS}var Fte=ur,O3=Ut,R3=Fte("%Number%"),Pte=Ste(),Ite=W6(),Nte=$te(),Tu=function(t){var r=Pte(t)?t:Ite(t,R3);if(typeof r=="symbol")throw new O3("Cannot convert a Symbol value to a number");if(typeof r=="bigint")throw new O3("Conversion from 'BigInt' to 'number' is not allowed.");return typeof r=="string"?Nte(r):R3(r)},Mte=Math.floor,Dk=function(t){return typeof t=="bigint"?t:Mte(t)},B3=Dk,Lte=Ut,Zc=function(t){if(typeof t!="number"&&typeof t!="bigint")throw new Lte("argument must be a Number or a BigInt");var r=t<0?-B3(-t):B3(t);return r===0?0:r},yS,z3;function Ote(){if(z3)return yS;z3=1;var e=vf(),t=Tu,r=Zc,n=nl,i=65536;return yS=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),c=e(l,i);return c>=32768?c-i:c},yS}var vS,j3;function Rte(){if(j3)return vS;j3=1;var e=vf(),t=Tu,r=Zc,n=nl,i=2147483648,s=4294967296;return vS=function(a){var l=t(a);if(!n(l)||l===0)return 0;var c=r(l),u=e(c,s),h=u>=i?u-s:u;return h===0?0:h},vS}var bS,H3;function Bte(){if(H3)return bS;H3=1;var e=vf(),t=Tu,r=Zc,n=nl;return bS=function(s){var o=t(s);if(!n(o)||o===0)return 0;var a=r(o),l=e(a,256);return l>=128?l-256:l},bS}var xS,U3;function zte(){if(U3)return xS;U3=1;var e=vf(),t=Tu,r=Zc,n=nl,i=65536;return xS=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),c=e(l,i);return c===0?0:c},xS}var wS,W3;function jte(){if(W3)return wS;W3=1;var e=vf(),t=Tu,r=Zc,n=nl,i=4294967296;return wS=function(o){var a=t(o);if(!n(a)||a===0)return 0;var l=r(a),c=e(l,i);return c===0?0:c},wS}var SS,V3;function Hte(){if(V3)return SS;V3=1;var e=nl,t=vf(),r=Tu,n=Zc;return SS=function(s){var o=r(s);if(!e(o)||o===0)return 0;var a=n(o),l=t(a,256);return l},SS}var DS,G3;function Ute(){if(G3)return DS;G3=1;var e=ur,t=Ut,r=e("%Math.max%"),n=e("%Math.min%");return DS=function(s,o,a){if(typeof s!="number"||typeof o!="number"||typeof a!="number"||!(o<=a))throw new t("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return n(r(o,s),a)},DS}var ES,q3;function Wte(){if(q3)return ES;q3=1;var e=Ute(),t=Tu,r=Dk,n=pf;return ES=function(s){var o=t(s);if(n(o))return 0;var a=e(o,0,255),l=r(a);return al+.5?l+1:l%2===0?l:l+1},ES}var CS,K3;function Z6(){return K3||(K3=1,CS=function(t){return t===0&&1/t===-1/0}),CS}var TS,J3;function Vte(){if(J3)return TS;J3=1;var e=ur,t=e("%Math.abs%"),r=e("%Math.floor%"),n=e("%Math.pow%"),i=nl,s=pf,o=Z6(),a=34028234663852886e22;return TS=function(c,u){if(s(c))return u?[0,0,192,127]:[127,192,0,0];var h;if(c===0)return h=o(c)?128:0,u?[0,0,0,h]:[h,0,0,0];if(t(c)>a||!i(c))return h=c<0?255:127,u?[0,0,128,h]:[h,128,0,0];var d=c<0?1:0;c=t(c);for(var f=0;c>=2;)f+=1,c/=2;for(;c<1;)f-=1,c*=2;var p=c-1;p*=n(2,23)+.5,p=r(p),f+=127,f<<=23;var g=d<<31|f|p,y=g&255;g>>=8;var b=g&255;g>>=8;var v=g&255;g>>=8;var E=g&255;return u?[y,b,v,E]:[E,v,b,y]},TS}var AS,X3;function Gte(){if(X3)return AS;X3=1;var e=1075,t=54;return AS=function(n){var i="";if(n===0)return i;for(var s=e,o,a=0;a=1?(n=o-1,i+="1",s===e&&(s=a)):(n=o,i+="0"),o===1||a-s>t)return i;return i},AS}var kS,Y3;function qte(){if(Y3)return kS;Y3=1;var e=ur,t=e("%Math.floor%");return kS=function(n){for(var i="",s;n>0;)s=n/2,n=t(s),s===n?i="0"+i:i="1"+i;return i},kS}var _S,Z3;function Kte(){if(Z3)return _S;Z3=1;var e=ur,t=e("%parseInt%"),r=e("%Math.abs%"),n=e("%Math.floor%"),i=bi,s=i("String.prototype.indexOf"),o=i("String.prototype.slice"),a=Gte(),l=qte(),c=Z6(),u=1023,h="11111111111",d="00000000000",f=d+d+d+d+"0000000";return _S=function(g,y){var b=g<0||c(g)?"1":"0",v,E;if(isNaN(g))v=h,E="1"+f;else if(!isFinite(g))v=h,E="0"+f;else if(g===0)v=d,E="0"+f;else{g=r(g);var D=n(g),C=l(D),w=a(g-D),T;if(C)v=C.length-1;else{var A=s(w,"1");A>-1&&(T=A+1),v=-T}E=C+w,v<0?(v<=-u&&(T=u-1),E=o(E,T)):E=o(E,1),v=o(d+l(v+u),-11),E=o(E+f+"0",0,52)}for(var $=b+v+E,I=[],N=0;N<8;N++){var L=y?8-N-1:N;I[L]=t(o($,N*8,(N+1)*8),2)}return I},_S}var $S,Q3;function Jte(){if(Q3)return $S;Q3=1;var e=ur,t=e("%Number%"),r=e("%BigInt%",!0);return $S=function(i,s,o){var a=typeof i=="bigint"?r:t;i<0&&(i>>>=0);for(var l=[],c=0;c>=a(8);return l},$S}var FS,eI;function Xte(){if(eI)return FS;eI=1;var e=Ut,t=R6(),r=bte(),n=xte(),i=Ote(),s=Rte(),o=Bte(),a=zte(),l=jte(),c=Hte(),u=Wte(),h=Vte(),d=Kte(),f=Jte(),p=vk,g={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},y={__proto__:null,INT8:o,UINT8:c,UINT8C:u,INT16:i,UINT16:a,INT32:s,UINT32:l,BIGINT64:r,BIGUINT64:n};return FS=function(v,E,D){if(typeof v!="string"||!t(g,v))throw new e("Assertion failed: `type` must be a TypedArray element type: "+p(g));if(typeof E!="number"&&typeof E!="bigint")throw new e("Assertion failed: `value` must be a Number or a BigInt");if(typeof D!="boolean")throw new e("Assertion failed: `isLittleEndian` must be a Boolean");if(v==="FLOAT32")return h(E,D);if(v==="FLOAT64")return d(E,D);var C=g[v],w=y[v],T=w(E);return f(T,C,D)},FS}var PS,tI;function Yte(){return tI||(tI=1,PS=function(t,r){for(var n=0;n6&&typeof arguments[6]!="boolean")throw new ka("Assertion failed: `isLittleEndian` must be a boolean, if present");if(nre(t))throw new ka("Assertion failed: ArrayBuffer is detached");if(rre(n)?typeof i!="bigint":typeof i!="number")throw new ka("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var l=rI.size["$"+n],c=arguments.length>6?arguments[6]:lre==="little",u=ire(n,i,c);if(a)throw new Qte("SharedArrayBuffer is not supported by this implementation");var h=new ere(t,r,l);ure(u,function(d,f){h[f]=d})},hre=Tu,dre=Zc,fre=pf,pre=nl,mre=function(t){var r=hre(t);return fre(r)||r===0?0:pre(r)?dre(r):r},gre=Bo,yre=Ut,vre=Vb,bre=Fg,nI=Gb,Ek=function(t){var r=bre(t);if(r===!1)throw new yre("Assertion failed: `O` must be a TypedArray");var n=nI.size["$"+nI.name["$"+r]];if(!vre(n)||n<0)throw new gre("Assertion failed: Unknown TypedArray type `"+r+"`");return n},xre=Bo,wre=Ut,Sre=Fg,Dre=Gb,Ere=function(t){var r=Sre(t);if(r===!1)throw new wre("Assertion failed: `O` must be a TypedArray");var n=Dre.name["$"+r];if(typeof n!="string")throw new xre("Assertion failed: Unknown TypedArray type `"+r+"`");return n},SC={exports:{}},Cre=ur,IS,iI;function Ck(){if(iI)return IS;iI=1;var e=Ut,t=Xc,r={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return IS=function(i){if(!i||typeof i!="object")return!1;for(var s in i)if(t(i,s)&&!r[s])return!1;var o=t(i,"[[Value]]")||t(i,"[[Writable]]"),a=t(i,"[[Get]]")||t(i,"[[Set]]");if(o&&a)throw new e("Property Descriptors may not be both accessor and data descriptors");return!0},IS}var NS,sI;function Tre(){if(sI)return NS;sI=1;var e=pk,t=Hb,r=e.hasArrayLengthDefineBug(),n=r&&z6,i=bi,s=i("Object.prototype.propertyIsEnumerable");return NS=function(a,l,c,u,h,d){if(!t){if(!a(d)||!d["[[Configurable]]"]||!d["[[Writable]]"]||h in u&&s(u,h)!==!!d["[[Enumerable]]"])return!1;var f=d["[[Value]]"];return u[h]=f,l(u[h],f)}return r&&h==="length"&&"[[Value]]"in d&&n(u)&&u.length!==d["[[Value]]"]?(u.length=d["[[Value]]"],u.length===d["[[Value]]"]):(t(u,h,c(d)),!0)},NS}var MS,oI;function Are(){return oI||(oI=1,MS=function(t){if(typeof t>"u")return t;var r={};return"[[Value]]"in t&&(r.value=t["[[Value]]"]),"[[Writable]]"in t&&(r.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(r.get=t["[[Get]]"]),"[[Set]]"in t&&(r.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(r.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(r.configurable=!!t["[[Configurable]]"]),r}),MS}var LS,aI;function kre(){if(aI)return LS;aI=1;var e=Ut,t=Ck(),r=Are();return LS=function(i){if(typeof i<"u"&&!t(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return r(i)},LS}var OS,lI;function _re(){if(lI)return OS;lI=1;var e=Ut,t=Xc,r=Ck();return OS=function(i){if(typeof i>"u")return!1;if(!r(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return!(!t(i,"[[Value]]")&&!t(i,"[[Writable]]"))},OS}var RS,uI;function $re(){return uI||(uI=1,RS=function(t){return!!t}),RS}var BS,cI;function Fre(){return cI||(cI=1,BS=uk),BS}var zS,hI;function Pre(){if(hI)return zS;hI=1;var e=Xc,t=Ut,r=Yc,n=$re(),i=Fre();return zS=function(o){if(r(o)!=="Object")throw new t("ToPropertyDescriptor requires an object");var a={};if(e(o,"enumerable")&&(a["[[Enumerable]]"]=n(o.enumerable)),e(o,"configurable")&&(a["[[Configurable]]"]=n(o.configurable)),e(o,"value")&&(a["[[Value]]"]=o.value),e(o,"writable")&&(a["[[Writable]]"]=n(o.writable)),e(o,"get")){var l=o.get;if(typeof l<"u"&&!i(l))throw new t("getter must be a function");a["[[Get]]"]=l}if(e(o,"set")){var c=o.set;if(typeof c<"u"&&!i(c))throw new t("setter must be a function");a["[[Set]]"]=c}if((e(a,"[[Get]]")||e(a,"[[Set]]"))&&(e(a,"[[Value]]")||e(a,"[[Writable]]")))throw new t("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return a},zS}var jS,dI;function Ire(){if(dI)return jS;dI=1;var e=Ut,t=Ck(),r=Tre(),n=kre(),i=_re(),s=Wb,o=U6,a=Pre(),l=Yc;return jS=function(u,h,d){if(l(u)!=="Object")throw new e("Assertion failed: Type(O) is not Object");if(!s(h))throw new e("Assertion failed: IsPropertyKey(P) is not true");var f=t(d)?d:a(d);if(!t(f))throw new e("Assertion failed: Desc is not a valid Property Descriptor");return r(i,o,n,u,h,f)},jS}var Nre=Cre,fI=Nre("%Reflect.construct%",!0),k0=Ire();try{k0({},"",{"[[Get]]":function(){}})}catch{k0=null}if(k0&&fI){var pI={},mI={};k0(mI,"length",{"[[Get]]":function(){throw pI},"[[Enumerable]]":!0}),SC.exports=function(t){try{fI(t,mI)}catch(r){return r===pI}}}else SC.exports=function(t){return typeof t=="function"&&!!t.prototype};var Q6=SC.exports,Mre=ur,gI=Mre("%Symbol.species%",!0),HS=Ut,Lre=Q6,yI=Yc,Ore=function(t,r){if(yI(t)!=="Object")throw new HS("Assertion failed: Type(O) is not Object");var n=t.constructor;if(typeof n>"u")return r;if(yI(n)!=="Object")throw new HS("O.constructor is not an Object");var i=gI?n[gI]:void 0;if(i==null)return r;if(Lre(i))return i;throw new HS("no constructor found")},vI=Xc,Rre=yf,Bre=Vb,e4=function(t){return!!t&&typeof t=="object"&&vI(t,"[[Object]]")&&vI(t,"[[CachedBufferByteLength]]")&&(Bre(t["[[CachedBufferByteLength]]"])&&t["[[CachedBufferByteLength]]"]>=0||t["[[CachedBufferByteLength]]"]==="DETACHED")&&Rre(t["[[Object]]"])},_y={},t4=ck,zre=Eu,jre=_g(),DC={},Hre=jb(),$y=ff,bI=Object.defineProperty;if($y){var Ure=function(e){return e.byteOffset};t4(jre,function(e){if(typeof _y[e]=="function"||typeof _y[e]=="object"){var t=_y[e].prototype,r=$y(t,"byteOffset");if(!r&&Hre){var n=t.__proto__;r=$y(n,"byteOffset")}if(r&&r.get)DC[e]=zre(r.get);else if(bI){var i=new _y[e](2);r=$y(i,"byteOffset"),r&&r.configurable&&bI(i,"length",{value:3}),i.length===2&&(DC[e]=Ure)}}})}var Wre=function(t){var r;return t4(DC,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},Vre=yf,Tk=function(t){return Vre(t)?Wre(t):!1},xI={},Gre=Eu,r4=ck,Fy=ff,qre=jb(),Kre=yf,Jre=y6,EC={__proto__:null},wI=Object.defineProperty;if(Fy){var Xre=function(e){return e.length};r4(Jre,function(e){var t=xI[e];if(typeof t=="function"||typeof t=="object"){var r=t.prototype,n=Fy(r,"length");if(!n&&qre){var i=r.__proto__;n=Fy(i,"length")}if(n&&n.get)EC["$"+e]=Gre(n.get);else if(wI){var s=new xI[e](2);n=Fy(s,"length"),n&&n.configurable&&wI(s,"length",{value:3}),s.length===2&&(EC["$"+e]=Xre)}}})}var Yre=function(t){var r;return r4(EC,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},n4=function(t){return Kre(t)?Yre(t):!1},SI=Ut,Zre=gf,Qre=Ek,ene=e4,tne=Ig,rne=Tk,nne=n4,Ak=function(t){if(!ene(t))throw new SI("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var r=t["[[Object]]"],n=t["[[CachedBufferByteLength]]"];if(Zre(tne(r))&&n!=="DETACHED")throw new SI("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(n==="DETACHED")return!0;var i=rne(r),s,o=nne(r);if(o==="AUTO")s=n;else{var a=Qre(r);s=i+o*a}return i>n||s>n},ine=Ut,i4=bi,DI=i4("%ArrayBuffer.prototype.resizable%",!0),EI=i4("%SharedArrayBuffer.prototype.growable%",!0),sne=mf,one=Pg,ane=function(t){var r=sne(t),n=one(t);if(!r&&!n)throw new ine("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return r&&DI?!DI(t):n&&EI?!EI(t):!0},Py=Ut,lne=Dk,une=ane,cne=Ak,hne=Ek,dne=e4,fne=Ig,pne=Tk,mne=n4,gne=function(t){if(!dne(t))throw new Py("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(cne(t))throw new Py("Assertion failed: `taRecord` is out of bounds");var r=t["[[Object]]"],n=mne(r);if(n!=="AUTO")return n;if(une(fne(r)))throw new Py("Assertion failed: array buffer is not fixed length");var i=pne(r),s=hne(r),o=t["[[CachedBufferByteLength]]"];if(o==="DETACHED")throw new Py("Assertion failed: typed array is detached");return lne((o-i)/s)},US=Ut,yne=gf,vne=mf,bne=Pg,xne=O6,wne=function(t,r){var n=bne(t);if(!vne(t)&&!n)throw new US("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new US("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(yne(t))throw new US("Assertion failed: `arrayBuffer` must not be detached");return xne(t)},CI=Ut,Sne=wne,Dne=gf,Ene=yf,Cne=Ig,Tne=function(t,r){if(!Ene(t))throw new CI("Assertion failed: `obj` must be a Typed Array");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new CI("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=Cne(t),i=Dne(n)?"DETACHED":Sne(n,r);return{"[[Object]]":t,"[[CachedBufferByteLength]]":i}},Iy=Ut,Ane=Ak,kne=Tne,_ne=Yc,$ne=yf,s4=function(t,r){if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new Iy("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(_ne(t)!=="Object")throw new Iy("Assertion failed: `O` must be an Object");if(!$ne(t))throw new Iy("Assertion failed: `O` must be a Typed Array");var n=kne(t,r);if(Ane(n))throw new Iy("`O` must be in-bounds and backed by a non-detached buffer");return n},Fne=Bo,Ny=Ut,Pne=Sk,Ine=Q6,Nne=Ak,Mne=gne,Lne=s4,One=_g(),Rne=function(t,r){if(!Ine(t))throw new Ny("Assertion failed: `constructor` must be a constructor");if(!Pne(r))throw new Ny("Assertion failed: `argumentList` must be a List");if(One.length===0)throw new Fne("Assertion failed: Typed Arrays are not supported in this environment");var n;r.length===0?n=new t:r.length===1?n=new t(r[0]):r.length===2?n=new t(r[0],r[1]):n=new t(r[0],r[1],r[2]);var i=Lne(n,"SEQ-CST");if(r.length===1&&typeof r[0]=="number"){if(Nne(i))throw new Ny("new Typed Array is out of bounds");var s=Mne(i);if(s"u"?i:_I(r),l;a===-1/0?l=0:a<0?l=WS(i+a,0):l=kI(a,i);var c=WS(l-o,0),u=tie(n,[c]);if(c>0){if(Yne(VS(n)))throw new Kne("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var h=FI(n),d=FI(u);if(h===d)for(var f=VS(n),p=VS(u),g=eie(n),y=PI(n),b=o*g+y,v=PI(u),E=v+c*g;v2?arguments[2]:kk,o=s.includeSymbols?Jb:Kb,a=!!s.immutable;return function l(c){var u=a?f4(c,s):c,h={},d=!0,f={node:u,node_:c,path:[].concat(r),parent:n[n.length-1],parents:n,key:r[r.length-1],isRoot:r.length===0,level:r.length,circular:null,update:function(y,b){f.isRoot||(f.parent.node[f.key]=y),f.node=y,b&&(d=!1)},delete:function(y){delete f.parent.node[f.key],y&&(d=!1)},remove:function(y){d4(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],y&&(d=!1)},keys:null,before:function(y){h.before=y},after:function(y){h.after=y},pre:function(y){h.pre=y},post:function(y){h.post=y},stop:function(){i=!1},block:function(){d=!1}};if(!i)return f;function p(){if(typeof f.node=="object"&&f.node!==null){(!f.keys||f.node_!==f.node)&&(f.keys=o(f.node)),f.isLeaf=f.keys.length===0;for(var y=0;y1?arguments[1]:kk,this.value=e}to.prototype.get=function(e){for(var t=this.value,r=0;t&&r1?arguments[1]:kk;return new to(e,t)}qb(Jb(to.prototype),function(e){m4[e]=function(t){var r=[].slice.call(arguments,1),n=new to(t);return n[e].apply(n,r)}});var Cie=m4;const $c=uo(Cie);class Ke{constructor(){this.hex="#000000",this.rgb_r=0,this.rgb_g=0,this.rgb_b=0,this.xyz_x=0,this.xyz_y=0,this.xyz_z=0,this.luv_l=0,this.luv_u=0,this.luv_v=0,this.lch_l=0,this.lch_c=0,this.lch_h=0,this.hsluv_h=0,this.hsluv_s=0,this.hsluv_l=0,this.hpluv_h=0,this.hpluv_p=0,this.hpluv_l=0,this.r0s=0,this.r0i=0,this.r1s=0,this.r1i=0,this.g0s=0,this.g0i=0,this.g1s=0,this.g1i=0,this.b0s=0,this.b0i=0,this.b1s=0,this.b1i=0}static fromLinear(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}static toLinear(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}static yToL(t){return t<=Ke.epsilon?t/Ke.refY*Ke.kappa:116*Math.pow(t/Ke.refY,1/3)-16}static lToY(t){return t<=8?Ke.refY*t/Ke.kappa:Ke.refY*Math.pow((t+16)/116,3)}static rgbChannelToHex(t){const r=Math.round(t*255),n=r%16,i=(r-n)/16|0;return Ke.hexChars.charAt(i)+Ke.hexChars.charAt(n)}static hexToRgbChannel(t,r){const n=Ke.hexChars.indexOf(t.charAt(r)),i=Ke.hexChars.indexOf(t.charAt(r+1));return(n*16+i)/255}static distanceFromOriginAngle(t,r,n){const i=r/(Math.sin(n)-t*Math.cos(n));return i<0?1/0:i}static distanceFromOrigin(t,r){return Math.abs(r)/Math.sqrt(Math.pow(t,2)+1)}static min6(t,r,n,i,s,o){return Math.min(t,Math.min(r,Math.min(n,Math.min(i,Math.min(s,o)))))}rgbToHex(){this.hex="#",this.hex+=Ke.rgbChannelToHex(this.rgb_r),this.hex+=Ke.rgbChannelToHex(this.rgb_g),this.hex+=Ke.rgbChannelToHex(this.rgb_b)}hexToRgb(){this.hex=this.hex.toLowerCase(),this.rgb_r=Ke.hexToRgbChannel(this.hex,1),this.rgb_g=Ke.hexToRgbChannel(this.hex,3),this.rgb_b=Ke.hexToRgbChannel(this.hex,5)}xyzToRgb(){this.rgb_r=Ke.fromLinear(Ke.m_r0*this.xyz_x+Ke.m_r1*this.xyz_y+Ke.m_r2*this.xyz_z),this.rgb_g=Ke.fromLinear(Ke.m_g0*this.xyz_x+Ke.m_g1*this.xyz_y+Ke.m_g2*this.xyz_z),this.rgb_b=Ke.fromLinear(Ke.m_b0*this.xyz_x+Ke.m_b1*this.xyz_y+Ke.m_b2*this.xyz_z)}rgbToXyz(){const t=Ke.toLinear(this.rgb_r),r=Ke.toLinear(this.rgb_g),n=Ke.toLinear(this.rgb_b);this.xyz_x=.41239079926595*t+.35758433938387*r+.18048078840183*n,this.xyz_y=.21263900587151*t+.71516867876775*r+.072192315360733*n,this.xyz_z=.019330818715591*t+.11919477979462*r+.95053215224966*n}xyzToLuv(){const t=this.xyz_x+15*this.xyz_y+3*this.xyz_z;let r=4*this.xyz_x,n=9*this.xyz_y;t!==0?(r/=t,n/=t):(r=NaN,n=NaN),this.luv_l=Ke.yToL(this.xyz_y),this.luv_l===0?(this.luv_u=0,this.luv_v=0):(this.luv_u=13*this.luv_l*(r-Ke.refU),this.luv_v=13*this.luv_l*(n-Ke.refV))}luvToXyz(){if(this.luv_l===0){this.xyz_x=0,this.xyz_y=0,this.xyz_z=0;return}const t=this.luv_u/(13*this.luv_l)+Ke.refU,r=this.luv_v/(13*this.luv_l)+Ke.refV;this.xyz_y=Ke.lToY(this.luv_l),this.xyz_x=0-9*this.xyz_y*t/((t-4)*r-t*r),this.xyz_z=(9*this.xyz_y-15*r*this.xyz_y-r*this.xyz_x)/(3*r)}luvToLch(){if(this.lch_l=this.luv_l,this.lch_c=Math.sqrt(this.luv_u*this.luv_u+this.luv_v*this.luv_v),this.lch_c<1e-8)this.lch_h=0;else{const t=Math.atan2(this.luv_v,this.luv_u);this.lch_h=t*180/Math.PI,this.lch_h<0&&(this.lch_h=360+this.lch_h)}}lchToLuv(){const t=this.lch_h/180*Math.PI;this.luv_l=this.lch_l,this.luv_u=Math.cos(t)*this.lch_c,this.luv_v=Math.sin(t)*this.lch_c}calculateBoundingLines(t){const r=Math.pow(t+16,3)/1560896,n=r>Ke.epsilon?r:t/Ke.kappa,i=n*(284517*Ke.m_r0-94839*Ke.m_r2),s=n*(838422*Ke.m_r2+769860*Ke.m_r1+731718*Ke.m_r0),o=n*(632260*Ke.m_r2-126452*Ke.m_r1),a=n*(284517*Ke.m_g0-94839*Ke.m_g2),l=n*(838422*Ke.m_g2+769860*Ke.m_g1+731718*Ke.m_g0),c=n*(632260*Ke.m_g2-126452*Ke.m_g1),u=n*(284517*Ke.m_b0-94839*Ke.m_b2),h=n*(838422*Ke.m_b2+769860*Ke.m_b1+731718*Ke.m_b0),d=n*(632260*Ke.m_b2-126452*Ke.m_b1);this.r0s=i/o,this.r0i=s*t/o,this.r1s=i/(o+126452),this.r1i=(s-769860)*t/(o+126452),this.g0s=a/c,this.g0i=l*t/c,this.g1s=a/(c+126452),this.g1i=(l-769860)*t/(c+126452),this.b0s=u/d,this.b0i=h*t/d,this.b1s=u/(d+126452),this.b1i=(h-769860)*t/(d+126452)}calcMaxChromaHpluv(){const t=Ke.distanceFromOrigin(this.r0s,this.r0i),r=Ke.distanceFromOrigin(this.r1s,this.r1i),n=Ke.distanceFromOrigin(this.g0s,this.g0i),i=Ke.distanceFromOrigin(this.g1s,this.g1i),s=Ke.distanceFromOrigin(this.b0s,this.b0i),o=Ke.distanceFromOrigin(this.b1s,this.b1i);return Ke.min6(t,r,n,i,s,o)}calcMaxChromaHsluv(t){const r=t/360*Math.PI*2,n=Ke.distanceFromOriginAngle(this.r0s,this.r0i,r),i=Ke.distanceFromOriginAngle(this.r1s,this.r1i,r),s=Ke.distanceFromOriginAngle(this.g0s,this.g0i,r),o=Ke.distanceFromOriginAngle(this.g1s,this.g1i,r),a=Ke.distanceFromOriginAngle(this.b0s,this.b0i,r),l=Ke.distanceFromOriginAngle(this.b1s,this.b1i,r);return Ke.min6(n,i,s,o,a,l)}hsluvToLch(){if(this.hsluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hsluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hsluv_l,this.calculateBoundingLines(this.hsluv_l);const t=this.calcMaxChromaHsluv(this.hsluv_h);this.lch_c=t/100*this.hsluv_s}this.lch_h=this.hsluv_h}lchToHsluv(){if(this.lch_l>99.9999999)this.hsluv_s=0,this.hsluv_l=100;else if(this.lch_l<1e-8)this.hsluv_s=0,this.hsluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHsluv(this.lch_h);this.hsluv_s=this.lch_c/t*100,this.hsluv_l=this.lch_l}this.hsluv_h=this.lch_h}hpluvToLch(){if(this.hpluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hpluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hpluv_l,this.calculateBoundingLines(this.hpluv_l);const t=this.calcMaxChromaHpluv();this.lch_c=t/100*this.hpluv_p}this.lch_h=this.hpluv_h}lchToHpluv(){if(this.lch_l>99.9999999)this.hpluv_p=0,this.hpluv_l=100;else if(this.lch_l<1e-8)this.hpluv_p=0,this.hpluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHpluv();this.hpluv_p=this.lch_c/t*100,this.hpluv_l=this.lch_l}this.hpluv_h=this.lch_h}hsluvToRgb(){this.hsluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hpluvToRgb(){this.hpluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hsluvToHex(){this.hsluvToRgb(),this.rgbToHex()}hpluvToHex(){this.hpluvToRgb(),this.rgbToHex()}rgbToHsluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHsluv()}rgbToHpluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHpluv()}hexToHsluv(){this.hexToRgb(),this.rgbToHsluv()}hexToHpluv(){this.hexToRgb(),this.rgbToHpluv()}}Ke.hexChars="0123456789abcdef";Ke.refY=1;Ke.refU=.19783000664283;Ke.refV=.46831999493879;Ke.kappa=903.2962962;Ke.epsilon=.0088564516;Ke.m_r0=3.240969941904521;Ke.m_r1=-1.537383177570093;Ke.m_r2=-.498610760293;Ke.m_g0=-.96924363628087;Ke.m_g1=1.87596750150772;Ke.m_g2=.041555057407175;Ke.m_b0=.055630079696993;Ke.m_b1=-.20397695888897;Ke.m_b2=1.056971514242878;var g4={exports:{}};/** +`+t.prev}function Ty(e,t){var r=bC(e),n=[];if(r){n.length=e.length;for(var i=0;i"u")return"Undefined";if(typeof t=="function"||typeof t=="object")return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},cee=uee,Yc=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":cee(t)},qP=Ut,hee=WQ,dee=Wb,fee=Yc,pee=function(t,r){if(fee(t)!=="Object")throw new qP("Assertion failed: Type(O) is not Object");if(!dee(r))throw new qP("Assertion failed: IsPropertyKey(P) is not true, got "+hee(r));return t[r]},pf=Number.isNaN||function(t){return t!==t},mee=pf,il=function(e){return(typeof e=="number"||typeof e=="bigint")&&!mee(e)&&e!==1/0&&e!==-1/0},M6=ur,gee=M6("%Math.abs%"),yee=M6("%Math.floor%"),vee=pf,bee=il,Vb=function(t){if(typeof t!="number"||vee(t)||!bee(t))return!1;var r=gee(t);return yee(r)===r},xee=Eu,L6=bi,wee=ur,wC=wee("%ArrayBuffer%",!0),Iv=L6("ArrayBuffer.prototype.byteLength",!0),See=L6("Object.prototype.toString"),KP=!!wC&&!Iv&&new wC(0).slice,JP=!!KP&&xee(KP),mf=Iv||JP?function(t){if(!t||typeof t!="object")return!1;try{return Iv?Iv(t):JP(t,0),!0}catch{return!1}}:wC?function(t){return See(t)==="[object ArrayBuffer]"}:function(t){return!1},Dee=bi,XP=Dee("ArrayBuffer.prototype.byteLength",!0),Eee=mf,O6=function(t){return Eee(t)?XP?XP(t):t.byteLength:NaN},Cee=bi,YP=Cee("SharedArrayBuffer.prototype.byteLength",!0),Pg=YP?function(t){if(!t||typeof t!="object")return!1;try{return YP(t),!0}catch{return!1}}:function(t){return!1},Tee={},Aee=Ut,kee=O6,_ee=_g(),$ee=bi,Fee=mf,Pee=Pg,Iee=$ee("SharedArrayBuffer.prototype.byteLength",!0),gf=function(t){var r=Pee(t);if(!Fee(t)&&!r)throw new Aee("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot");if((r?Iee:kee)(t)===0)try{new Tee[_ee[0]](t)}catch(n){return!!n&&n.name==="TypeError"}return!1},Ow,ZP;function R6(){if(ZP)return Ow;ZP=1;var e=Ut,t=Xc,r=Wb,n=Yc;return Ow=function(s,o){if(n(s)!=="Object")throw new e("Assertion failed: `O` must be an Object");if(!r(o))throw new e("Assertion failed: `P` must be a Property Key");return t(s,o)},Ow}var Nee=ur,B6=Nee("%Array%"),Mee=!B6.isArray&&bi("Object.prototype.toString"),j6=B6.isArray||function(t){return Mee(t)==="[object Array]"},Sk=j6,Rw,QP;function z6(){return QP||(QP=1,Rw=function(t){return t==="BIGUINT64"||t==="BIGINT64"}),Rw}var Bw,e3;function Lee(){return e3||(e3=1,Bw=function(t){return t==="UINT8"||t==="UINT8C"||t==="UINT16"||t==="UINT32"||t==="BIGUINT64"}),Bw}var jw,t3;function Oee(){if(t3)return jw;t3=1;var e=ur,t=e("%Math.pow%");return jw=function(n){var i=n[3]&128?-1:1,s=(n[3]&127)<<1|n[2]>>7,o=(n[2]&127)<<16|n[1]<<8|n[0];return s===0&&o===0?i===1?0:-0:s===255&&o===0?i===1?1/0:-1/0:s===255&&o!==0?NaN:(s-=127,s===-127?i*o*t(2,-149):i*(1+o*t(2,-23))*t(2,s))},jw}var zw,r3;function Ree(){if(r3)return zw;r3=1;var e=ur,t=e("%Math.pow%");return zw=function(n){var i=n[7]&128?-1:1,s=(n[7]&127)<<4|(n[6]&240)>>4,o=(n[6]&15)*281474976710656+n[5]*1099511627776+n[4]*4294967296+n[3]*16777216+n[2]*65536+n[1]*256+n[0];return s===0&&o===0?i*0:s===2047&&o!==0?NaN:s===2047&&o===0?i*(1/0):(s-=1023,s===-1023?i*o*5e-324:i*(1+o/4503599627370496)*t(2,s))},zw}var Hw,n3;function Bee(){if(n3)return Hw;n3=1;var e=ur,t=e("%Math.pow%"),r=e("%Number%"),n=e("%BigInt%",!0);return Hw=function(s,o,l,a){for(var c=a?n:r,u=c(0),h=0;h=0&&t<=255&&(t|0)===t}),Ww}var Vw,o3;function Hee(){if(o3)return Vw;o3=1;var e=ur,t=bi,r=dk,n=Bo,i=Ut,s=e("%BigInt%",!0),o=R6(),l=Sk,a=z6(),c=Lee(),u=Oee(),h=Ree(),d=Bee(),f=jee(),p=zee(),g=t("Array.prototype.reverse"),y=t("Array.prototype.slice"),b=vk,v={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8};return Vw=function(D,C,w){if(!o(v,D))throw new i("Assertion failed: `type` must be a TypedArray element type: "+b(v));if(!l(C)||!f(C,p))throw new i("Assertion failed: `rawBytes` must be an Array of bytes");if(typeof w!="boolean")throw new i("Assertion failed: `isLittleEndian` must be a Boolean");var T=v[D];if(C.length!==T)throw new r("Assertion failed: `rawBytes` must have a length of "+T+" for type "+D);var A=a(D);if(A&&!s)throw new n("this environment does not support BigInts");return C=y(C,0,T),w||g(C),D==="FLOAT32"?u(C):D==="FLOAT64"?h(C):d(C,T,c(D),A)},Vw}var Gw,a3;function Uee(){if(a3)return Gw;a3=1;var e={}.toString;return Gw=Array.isArray||function(t){return e.call(t)=="[object Array]"},Gw}var qw,l3;function Wee(){if(l3)return qw;l3=1;var e=ur,t=e("%Array.prototype.concat%"),r=Eu,n=bi,i=n("Array.prototype.slice"),s=fk(),o=s&&Symbol.isConcatSpreadable,l=[],a=o?r.apply(t,l):null,c=o?Uee():null;return qw=o?function(h){for(var d=0;d5&&typeof arguments[5]!="boolean")throw new Aa("Assertion failed: `isLittleEndian` must be a boolean, if present");if(tte(t))throw new Aa("Assertion failed: `arrayBuffer` is detached");if(r<0)throw new Aa("Assertion failed: `byteIndex` must be non-negative");var l=h3.size["$"+n];if(!l)throw new Aa('Assertion failed: `type` must be one of "INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT32", or "FLOAT64"');var a;if(o)throw new Yee("SharedArrayBuffer is not supported by this implementation");a=Jw(new Zee(t,r),0,l);var c=arguments.length>5?arguments[5]:ste==="little",u=c?Jw(c3([0,0,0,0,0,0,0,0],a),-l):Jw(c3(a,[0,0,0,0,0,0,0,0]),0,l);return rte(n,u,c)},ate=ur,lte=ate("%Math.max%"),ute=ur,cte=ute("%Math.min%"),d3=pf,U6=function(t,r){return t===r?t===0?1/t===1/r:!0:d3(t)&&d3(r)},Ay=Ut,hte=Wb,f3=U6,dte=Yc,p3=function(){try{return delete[].length,!0}catch{return!1}}(),fte=function(t,r,n,i){if(dte(t)!=="Object")throw new Ay("Assertion failed: `O` must be an Object");if(!hte(r))throw new Ay("Assertion failed: `P` must be a Property Key");if(typeof i!="boolean")throw new Ay("Assertion failed: `Throw` must be a Boolean");if(i){if(t[r]=n,p3&&!f3(t[r],n))throw new Ay("Attempted to assign to readonly property.");return!0}try{return t[r]=n,p3?f3(t[r],n):!0}catch{return!1}},Xw,m3;function pte(){if(m3)return Xw;m3=1;var e=ur,t=e("%BigInt%",!0),r=Ut,n=Bo;return Xw=function(s){if(typeof s!="string")throw new r("`argument` must be a string");if(!t)throw new n("BigInts are not supported in this environment");try{return t(s)}catch{return}},Xw}var Yw,g3;function mte(){return g3||(g3=1,Yw=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),Yw}var Zw,y3;function gte(){if(y3)return Zw;y3=1;var e=Date.prototype.getDay,t=function(o){try{return e.call(o),!0}catch{return!1}},r=Object.prototype.toString,n="[object Date]",i=mk()();return Zw=function(o){return typeof o!="object"||o===null?!1:i?t(o):r.call(o)===n},Zw}var ky={exports:{}},v3;function yte(){if(v3)return ky.exports;v3=1;var e=Object.prototype.toString,t=b6();if(t){var r=Symbol.prototype.toString,n=/^Symbol\(.*\)$/,i=function(o){return typeof o.valueOf()!="symbol"?!1:n.test(r.call(o))};ky.exports=function(o){if(typeof o=="symbol")return!0;if(e.call(o)!=="[object Symbol]")return!1;try{return i(o)}catch{return!1}}}else ky.exports=function(o){return!1};return ky.exports}var Qw,b3;function vte(){if(b3)return Qw;b3=1;var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",t=mte(),r=uk,n=gte(),i=yte(),s=function(a,c){if(typeof a>"u"||a===null)throw new TypeError("Cannot call method on "+a);if(typeof c!="string"||c!=="number"&&c!=="string")throw new TypeError('hint must be "string" or "number"');var u=c==="string"?["toString","valueOf"]:["valueOf","toString"],h,d,f;for(f=0;f1&&(arguments[1]===String?c="string":arguments[1]===Number&&(c="number"));var u;if(e&&(Symbol.toPrimitive?u=o(a,Symbol.toPrimitive):i(a)&&(u=Symbol.prototype.valueOf)),typeof u<"u"){var h=u.call(a,c);if(t(h))return h;throw new TypeError("unable to convert exotic object to primitive")}return c==="default"&&(n(a)||i(a))&&(c="string"),s(a,c==="default"?"number":c)},Qw}var eS,x3;function W6(){if(x3)return eS;x3=1;var e=vte();return eS=function(r){return arguments.length>1?e(r,arguments[1]):e(r)},eS}var tS,w3;function V6(){if(w3)return tS;w3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Number%"),n=Ut,i=Bo,s=pte(),o=W6();return tS=function(a){if(!t)throw new i("BigInts are not supported in this environment");var c=o(a,r);if(c==null)throw new n("Cannot convert null or undefined to a BigInt");if(typeof c=="boolean")return t(c?1:0);if(typeof c=="number")throw new n("Cannot convert a Number value to a BigInt");if(typeof c=="string"){var u=s(c);if(typeof u>"u")throw new n("Failed to parse String to BigInt");return u}if(typeof c=="symbol")throw new n("Cannot convert a Symbol value to a BigInt");if(typeof c!="bigint")throw new i("Assertion failed: unknown primitive type");return c},tS}var rS,S3;function G6(){if(S3)return rS;S3=1;var e=ur,t=e("%BigInt%",!0),r=dk,n=Ut,i=t&&t(0);return rS=function(o,l){if(typeof o!="bigint"||typeof l!="bigint")throw new n("Assertion failed: `n` and `d` arguments must be BigInts");if(l===i)throw new r("Division by zero");return o===i?i:o%l},rS}var nS,D3;function q6(){return D3||(D3=1,nS=function(t,r,n){var i=t(r,n);return i>=0?i:i+n}),nS}var iS,E3;function bte(){if(E3)return iS;E3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=V6(),i=G6(),s=q6(),o=t&&BigInt(r(2,32))*BigInt(r(2,31)),l=t&&BigInt(r(2,32))*BigInt(r(2,32));return iS=function(c){var u=n(c),h=s(i,u,l);return h>=o?h-l:h},iS}var sS,C3;function xte(){if(C3)return sS;C3=1;var e=ur,t=e("%BigInt%",!0),r=e("%Math.pow%"),n=V6(),i=G6(),s=q6(),o=t&&BigInt(r(2,32))*BigInt(r(2,32));return sS=function(a){var c=n(a),u=s(i,c,o);return u},sS}var oS,T3;function wte(){if(T3)return oS;T3=1;var e=Math.floor;return oS=function(r,n){var i=r%n;return e(i>=0?i:i+n)},oS}var aS,A3;function vf(){if(A3)return aS;A3=1;var e=wte();return aS=function(r,n){return e(r,n)},aS}var lS,k3;function Ste(){return k3||(k3=1,lS=function(t){return t===null||typeof t!="function"&&typeof t!="object"}),lS}var uS,_3;function Dte(){if(_3)return uS;_3=1;var e=bi,t=mk()(),r,n,i,s;if(t){r=e("Object.prototype.hasOwnProperty"),n=e("RegExp.prototype.exec"),i={};var o=function(){throw i};s={toString:o,valueOf:o},typeof Symbol.toPrimitive=="symbol"&&(s[Symbol.toPrimitive]=o)}var l=e("Object.prototype.toString"),a=Object.getOwnPropertyDescriptor,c="[object RegExp]";return uS=t?function(h){if(!h||typeof h!="object")return!1;var d=a(h,"lastIndex"),f=d&&r(d,"value");if(!f)return!1;try{n(h,s)}catch(p){return p===i}}:function(h){return!h||typeof h!="object"&&typeof h!="function"?!1:l(h)===c},uS}var cS,$3;function Ete(){if($3)return cS;$3=1;var e=bi,t=Dte(),r=e("RegExp.prototype.exec"),n=Ut;return cS=function(s){if(!t(s))throw new n("`regex` must be a RegExp");return function(l){return r(s,l)!==null}},cS}var hS,F3;function K6(){if(F3)return hS;F3=1;var e=Ut;return hS=function(r){if(r==null)throw new e(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r},hS}var Cte=ur,Tte=Cte("%String%"),Ate=Ut,J6=function(t){if(typeof t=="symbol")throw new Ate("Cannot convert a Symbol value to a string");return Tte(t)},dS,P3;function X6(){if(P3)return dS;P3=1;var e=K6(),t=J6,r=bi,n=r("String.prototype.replace"),i=/^\s$/.test("᠎"),s=i?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,o=i?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;return dS=function(){var a=t(e(this));return n(n(a,s,""),o,"")},dS}var fS,I3;function Y6(){if(I3)return fS;I3=1;var e=X6(),t="​",r="᠎";return fS=function(){return String.prototype.trim&&t.trim()===t&&r.trim()===r&&("_"+r).trim()==="_"+r&&(r+"_").trim()===r+"_"?String.prototype.trim:e},fS}var pS,N3;function kte(){if(N3)return pS;N3=1;var e=Ub,t=Y6();return pS=function(){var n=t();return e(String.prototype,{trim:n},{trim:function(){return String.prototype.trim!==n}}),n},pS}var mS,M3;function _te(){if(M3)return mS;M3=1;var e=Eu,t=Ub,r=K6(),n=X6(),i=Y6(),s=kte(),o=e(i()),l=function(c){return r(c),o(c)};return t(l,{getPolyfill:i,implementation:n,shim:s}),mS=l,mS}var gS,L3;function $te(){if(L3)return gS;L3=1;var e=ur,t=e("%Number%"),r=e("%RegExp%"),n=Ut,i=e("%parseInt%"),s=bi,o=Ete(),l=s("String.prototype.slice"),a=o(/^0b[01]+$/i),c=o(/^0o[0-7]+$/i),u=o(/^[-+]0x[0-9a-f]+$/i),h=["…","​","￾"].join(""),d=new r("["+h+"]","g"),f=o(d),p=_te();return gS=function g(y){if(typeof y!="string")throw new n("Assertion failed: `argument` is not a String");if(a(y))return t(i(l(y,2),2));if(c(y))return t(i(l(y,2),8));if(f(y)||u(y))return NaN;var b=p(y);return b!==y?g(b):t(y)},gS}var Fte=ur,O3=Ut,R3=Fte("%Number%"),Pte=Ste(),Ite=W6(),Nte=$te(),Tu=function(t){var r=Pte(t)?t:Ite(t,R3);if(typeof r=="symbol")throw new O3("Cannot convert a Symbol value to a number");if(typeof r=="bigint")throw new O3("Conversion from 'BigInt' to 'number' is not allowed.");return typeof r=="string"?Nte(r):R3(r)},Mte=Math.floor,Dk=function(t){return typeof t=="bigint"?t:Mte(t)},B3=Dk,Lte=Ut,Zc=function(t){if(typeof t!="number"&&typeof t!="bigint")throw new Lte("argument must be a Number or a BigInt");var r=t<0?-B3(-t):B3(t);return r===0?0:r},yS,j3;function Ote(){if(j3)return yS;j3=1;var e=vf(),t=Tu,r=Zc,n=il,i=65536;return yS=function(o){var l=t(o);if(!n(l)||l===0)return 0;var a=r(l),c=e(a,i);return c>=32768?c-i:c},yS}var vS,z3;function Rte(){if(z3)return vS;z3=1;var e=vf(),t=Tu,r=Zc,n=il,i=2147483648,s=4294967296;return vS=function(l){var a=t(l);if(!n(a)||a===0)return 0;var c=r(a),u=e(c,s),h=u>=i?u-s:u;return h===0?0:h},vS}var bS,H3;function Bte(){if(H3)return bS;H3=1;var e=vf(),t=Tu,r=Zc,n=il;return bS=function(s){var o=t(s);if(!n(o)||o===0)return 0;var l=r(o),a=e(l,256);return a>=128?a-256:a},bS}var xS,U3;function jte(){if(U3)return xS;U3=1;var e=vf(),t=Tu,r=Zc,n=il,i=65536;return xS=function(o){var l=t(o);if(!n(l)||l===0)return 0;var a=r(l),c=e(a,i);return c===0?0:c},xS}var wS,W3;function zte(){if(W3)return wS;W3=1;var e=vf(),t=Tu,r=Zc,n=il,i=4294967296;return wS=function(o){var l=t(o);if(!n(l)||l===0)return 0;var a=r(l),c=e(a,i);return c===0?0:c},wS}var SS,V3;function Hte(){if(V3)return SS;V3=1;var e=il,t=vf(),r=Tu,n=Zc;return SS=function(s){var o=r(s);if(!e(o)||o===0)return 0;var l=n(o),a=t(l,256);return a},SS}var DS,G3;function Ute(){if(G3)return DS;G3=1;var e=ur,t=Ut,r=e("%Math.max%"),n=e("%Math.min%");return DS=function(s,o,l){if(typeof s!="number"||typeof o!="number"||typeof l!="number"||!(o<=l))throw new t("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`");return n(r(o,s),l)},DS}var ES,q3;function Wte(){if(q3)return ES;q3=1;var e=Ute(),t=Tu,r=Dk,n=pf;return ES=function(s){var o=t(s);if(n(o))return 0;var l=e(o,0,255),a=r(l);return la+.5?a+1:a%2===0?a:a+1},ES}var CS,K3;function Z6(){return K3||(K3=1,CS=function(t){return t===0&&1/t===-1/0}),CS}var TS,J3;function Vte(){if(J3)return TS;J3=1;var e=ur,t=e("%Math.abs%"),r=e("%Math.floor%"),n=e("%Math.pow%"),i=il,s=pf,o=Z6(),l=34028234663852886e22;return TS=function(c,u){if(s(c))return u?[0,0,192,127]:[127,192,0,0];var h;if(c===0)return h=o(c)?128:0,u?[0,0,0,h]:[h,0,0,0];if(t(c)>l||!i(c))return h=c<0?255:127,u?[0,0,128,h]:[h,128,0,0];var d=c<0?1:0;c=t(c);for(var f=0;c>=2;)f+=1,c/=2;for(;c<1;)f-=1,c*=2;var p=c-1;p*=n(2,23)+.5,p=r(p),f+=127,f<<=23;var g=d<<31|f|p,y=g&255;g>>=8;var b=g&255;g>>=8;var v=g&255;g>>=8;var E=g&255;return u?[y,b,v,E]:[E,v,b,y]},TS}var AS,X3;function Gte(){if(X3)return AS;X3=1;var e=1075,t=54;return AS=function(n){var i="";if(n===0)return i;for(var s=e,o,l=0;l=1?(n=o-1,i+="1",s===e&&(s=l)):(n=o,i+="0"),o===1||l-s>t)return i;return i},AS}var kS,Y3;function qte(){if(Y3)return kS;Y3=1;var e=ur,t=e("%Math.floor%");return kS=function(n){for(var i="",s;n>0;)s=n/2,n=t(s),s===n?i="0"+i:i="1"+i;return i},kS}var _S,Z3;function Kte(){if(Z3)return _S;Z3=1;var e=ur,t=e("%parseInt%"),r=e("%Math.abs%"),n=e("%Math.floor%"),i=bi,s=i("String.prototype.indexOf"),o=i("String.prototype.slice"),l=Gte(),a=qte(),c=Z6(),u=1023,h="11111111111",d="00000000000",f=d+d+d+d+"0000000";return _S=function(g,y){var b=g<0||c(g)?"1":"0",v,E;if(isNaN(g))v=h,E="1"+f;else if(!isFinite(g))v=h,E="0"+f;else if(g===0)v=d,E="0"+f;else{g=r(g);var D=n(g),C=a(D),w=l(g-D),T;if(C)v=C.length-1;else{var A=s(w,"1");A>-1&&(T=A+1),v=-T}E=C+w,v<0?(v<=-u&&(T=u-1),E=o(E,T)):E=o(E,1),v=o(d+a(v+u),-11),E=o(E+f+"0",0,52)}for(var $=b+v+E,I=[],N=0;N<8;N++){var L=y?8-N-1:N;I[L]=t(o($,N*8,(N+1)*8),2)}return I},_S}var $S,Q3;function Jte(){if(Q3)return $S;Q3=1;var e=ur,t=e("%Number%"),r=e("%BigInt%",!0);return $S=function(i,s,o){var l=typeof i=="bigint"?r:t;i<0&&(i>>>=0);for(var a=[],c=0;c>=l(8);return a},$S}var FS,eI;function Xte(){if(eI)return FS;eI=1;var e=Ut,t=R6(),r=bte(),n=xte(),i=Ote(),s=Rte(),o=Bte(),l=jte(),a=zte(),c=Hte(),u=Wte(),h=Vte(),d=Kte(),f=Jte(),p=vk,g={__proto__:null,INT8:1,UINT8:1,UINT8C:1,INT16:2,UINT16:2,INT32:4,UINT32:4,BIGINT64:8,BIGUINT64:8,FLOAT32:4,FLOAT64:8},y={__proto__:null,INT8:o,UINT8:c,UINT8C:u,INT16:i,UINT16:l,INT32:s,UINT32:a,BIGINT64:r,BIGUINT64:n};return FS=function(v,E,D){if(typeof v!="string"||!t(g,v))throw new e("Assertion failed: `type` must be a TypedArray element type: "+p(g));if(typeof E!="number"&&typeof E!="bigint")throw new e("Assertion failed: `value` must be a Number or a BigInt");if(typeof D!="boolean")throw new e("Assertion failed: `isLittleEndian` must be a Boolean");if(v==="FLOAT32")return h(E,D);if(v==="FLOAT64")return d(E,D);var C=g[v],w=y[v],T=w(E);return f(T,C,D)},FS}var PS,tI;function Yte(){return tI||(tI=1,PS=function(t,r){for(var n=0;n6&&typeof arguments[6]!="boolean")throw new ka("Assertion failed: `isLittleEndian` must be a boolean, if present");if(nre(t))throw new ka("Assertion failed: ArrayBuffer is detached");if(rre(n)?typeof i!="bigint":typeof i!="number")throw new ka("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number");var a=rI.size["$"+n],c=arguments.length>6?arguments[6]:lre==="little",u=ire(n,i,c);if(l)throw new Qte("SharedArrayBuffer is not supported by this implementation");var h=new ere(t,r,a);ure(u,function(d,f){h[f]=d})},hre=Tu,dre=Zc,fre=pf,pre=il,mre=function(t){var r=hre(t);return fre(r)||r===0?0:pre(r)?dre(r):r},gre=Bo,yre=Ut,vre=Vb,bre=Fg,nI=Gb,Ek=function(t){var r=bre(t);if(r===!1)throw new yre("Assertion failed: `O` must be a TypedArray");var n=nI.size["$"+nI.name["$"+r]];if(!vre(n)||n<0)throw new gre("Assertion failed: Unknown TypedArray type `"+r+"`");return n},xre=Bo,wre=Ut,Sre=Fg,Dre=Gb,Ere=function(t){var r=Sre(t);if(r===!1)throw new wre("Assertion failed: `O` must be a TypedArray");var n=Dre.name["$"+r];if(typeof n!="string")throw new xre("Assertion failed: Unknown TypedArray type `"+r+"`");return n},SC={exports:{}},Cre=ur,IS,iI;function Ck(){if(iI)return IS;iI=1;var e=Ut,t=Xc,r={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};return IS=function(i){if(!i||typeof i!="object")return!1;for(var s in i)if(t(i,s)&&!r[s])return!1;var o=t(i,"[[Value]]")||t(i,"[[Writable]]"),l=t(i,"[[Get]]")||t(i,"[[Set]]");if(o&&l)throw new e("Property Descriptors may not be both accessor and data descriptors");return!0},IS}var NS,sI;function Tre(){if(sI)return NS;sI=1;var e=pk,t=Hb,r=e.hasArrayLengthDefineBug(),n=r&&j6,i=bi,s=i("Object.prototype.propertyIsEnumerable");return NS=function(l,a,c,u,h,d){if(!t){if(!l(d)||!d["[[Configurable]]"]||!d["[[Writable]]"]||h in u&&s(u,h)!==!!d["[[Enumerable]]"])return!1;var f=d["[[Value]]"];return u[h]=f,a(u[h],f)}return r&&h==="length"&&"[[Value]]"in d&&n(u)&&u.length!==d["[[Value]]"]?(u.length=d["[[Value]]"],u.length===d["[[Value]]"]):(t(u,h,c(d)),!0)},NS}var MS,oI;function Are(){return oI||(oI=1,MS=function(t){if(typeof t>"u")return t;var r={};return"[[Value]]"in t&&(r.value=t["[[Value]]"]),"[[Writable]]"in t&&(r.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(r.get=t["[[Get]]"]),"[[Set]]"in t&&(r.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(r.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(r.configurable=!!t["[[Configurable]]"]),r}),MS}var LS,aI;function kre(){if(aI)return LS;aI=1;var e=Ut,t=Ck(),r=Are();return LS=function(i){if(typeof i<"u"&&!t(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return r(i)},LS}var OS,lI;function _re(){if(lI)return OS;lI=1;var e=Ut,t=Xc,r=Ck();return OS=function(i){if(typeof i>"u")return!1;if(!r(i))throw new e("Assertion failed: `Desc` must be a Property Descriptor");return!(!t(i,"[[Value]]")&&!t(i,"[[Writable]]"))},OS}var RS,uI;function $re(){return uI||(uI=1,RS=function(t){return!!t}),RS}var BS,cI;function Fre(){return cI||(cI=1,BS=uk),BS}var jS,hI;function Pre(){if(hI)return jS;hI=1;var e=Xc,t=Ut,r=Yc,n=$re(),i=Fre();return jS=function(o){if(r(o)!=="Object")throw new t("ToPropertyDescriptor requires an object");var l={};if(e(o,"enumerable")&&(l["[[Enumerable]]"]=n(o.enumerable)),e(o,"configurable")&&(l["[[Configurable]]"]=n(o.configurable)),e(o,"value")&&(l["[[Value]]"]=o.value),e(o,"writable")&&(l["[[Writable]]"]=n(o.writable)),e(o,"get")){var a=o.get;if(typeof a<"u"&&!i(a))throw new t("getter must be a function");l["[[Get]]"]=a}if(e(o,"set")){var c=o.set;if(typeof c<"u"&&!i(c))throw new t("setter must be a function");l["[[Set]]"]=c}if((e(l,"[[Get]]")||e(l,"[[Set]]"))&&(e(l,"[[Value]]")||e(l,"[[Writable]]")))throw new t("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return l},jS}var zS,dI;function Ire(){if(dI)return zS;dI=1;var e=Ut,t=Ck(),r=Tre(),n=kre(),i=_re(),s=Wb,o=U6,l=Pre(),a=Yc;return zS=function(u,h,d){if(a(u)!=="Object")throw new e("Assertion failed: Type(O) is not Object");if(!s(h))throw new e("Assertion failed: IsPropertyKey(P) is not true");var f=t(d)?d:l(d);if(!t(f))throw new e("Assertion failed: Desc is not a valid Property Descriptor");return r(i,o,n,u,h,f)},zS}var Nre=Cre,fI=Nre("%Reflect.construct%",!0),k0=Ire();try{k0({},"",{"[[Get]]":function(){}})}catch{k0=null}if(k0&&fI){var pI={},mI={};k0(mI,"length",{"[[Get]]":function(){throw pI},"[[Enumerable]]":!0}),SC.exports=function(t){try{fI(t,mI)}catch(r){return r===pI}}}else SC.exports=function(t){return typeof t=="function"&&!!t.prototype};var Q6=SC.exports,Mre=ur,gI=Mre("%Symbol.species%",!0),HS=Ut,Lre=Q6,yI=Yc,Ore=function(t,r){if(yI(t)!=="Object")throw new HS("Assertion failed: Type(O) is not Object");var n=t.constructor;if(typeof n>"u")return r;if(yI(n)!=="Object")throw new HS("O.constructor is not an Object");var i=gI?n[gI]:void 0;if(i==null)return r;if(Lre(i))return i;throw new HS("no constructor found")},vI=Xc,Rre=yf,Bre=Vb,e4=function(t){return!!t&&typeof t=="object"&&vI(t,"[[Object]]")&&vI(t,"[[CachedBufferByteLength]]")&&(Bre(t["[[CachedBufferByteLength]]"])&&t["[[CachedBufferByteLength]]"]>=0||t["[[CachedBufferByteLength]]"]==="DETACHED")&&Rre(t["[[Object]]"])},_y={},t4=ck,jre=Eu,zre=_g(),DC={},Hre=zb(),$y=ff,bI=Object.defineProperty;if($y){var Ure=function(e){return e.byteOffset};t4(zre,function(e){if(typeof _y[e]=="function"||typeof _y[e]=="object"){var t=_y[e].prototype,r=$y(t,"byteOffset");if(!r&&Hre){var n=t.__proto__;r=$y(n,"byteOffset")}if(r&&r.get)DC[e]=jre(r.get);else if(bI){var i=new _y[e](2);r=$y(i,"byteOffset"),r&&r.configurable&&bI(i,"length",{value:3}),i.length===2&&(DC[e]=Ure)}}})}var Wre=function(t){var r;return t4(DC,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},Vre=yf,Tk=function(t){return Vre(t)?Wre(t):!1},xI={},Gre=Eu,r4=ck,Fy=ff,qre=zb(),Kre=yf,Jre=y6,EC={__proto__:null},wI=Object.defineProperty;if(Fy){var Xre=function(e){return e.length};r4(Jre,function(e){var t=xI[e];if(typeof t=="function"||typeof t=="object"){var r=t.prototype,n=Fy(r,"length");if(!n&&qre){var i=r.__proto__;n=Fy(i,"length")}if(n&&n.get)EC["$"+e]=Gre(n.get);else if(wI){var s=new xI[e](2);n=Fy(s,"length"),n&&n.configurable&&wI(s,"length",{value:3}),s.length===2&&(EC["$"+e]=Xre)}}})}var Yre=function(t){var r;return r4(EC,function(n){if(typeof r!="number")try{var i=n(t);typeof i=="number"&&(r=i)}catch{}}),r},n4=function(t){return Kre(t)?Yre(t):!1},SI=Ut,Zre=gf,Qre=Ek,ene=e4,tne=Ig,rne=Tk,nne=n4,Ak=function(t){if(!ene(t))throw new SI("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");var r=t["[[Object]]"],n=t["[[CachedBufferByteLength]]"];if(Zre(tne(r))&&n!=="DETACHED")throw new SI("Assertion failed: typed array is detached only if the byte length is ~DETACHED~");if(n==="DETACHED")return!0;var i=rne(r),s,o=nne(r);if(o==="AUTO")s=n;else{var l=Qre(r);s=i+o*l}return i>n||s>n},ine=Ut,i4=bi,DI=i4("%ArrayBuffer.prototype.resizable%",!0),EI=i4("%SharedArrayBuffer.prototype.growable%",!0),sne=mf,one=Pg,ane=function(t){var r=sne(t),n=one(t);if(!r&&!n)throw new ine("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer");return r&&DI?!DI(t):n&&EI?!EI(t):!0},Py=Ut,lne=Dk,une=ane,cne=Ak,hne=Ek,dne=e4,fne=Ig,pne=Tk,mne=n4,gne=function(t){if(!dne(t))throw new Py("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record");if(cne(t))throw new Py("Assertion failed: `taRecord` is out of bounds");var r=t["[[Object]]"],n=mne(r);if(n!=="AUTO")return n;if(une(fne(r)))throw new Py("Assertion failed: array buffer is not fixed length");var i=pne(r),s=hne(r),o=t["[[CachedBufferByteLength]]"];if(o==="DETACHED")throw new Py("Assertion failed: typed array is detached");return lne((o-i)/s)},US=Ut,yne=gf,vne=mf,bne=Pg,xne=O6,wne=function(t,r){var n=bne(t);if(!vne(t)&&!n)throw new US("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new US("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(yne(t))throw new US("Assertion failed: `arrayBuffer` must not be detached");return xne(t)},CI=Ut,Sne=wne,Dne=gf,Ene=yf,Cne=Ig,Tne=function(t,r){if(!Ene(t))throw new CI("Assertion failed: `obj` must be a Typed Array");if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new CI("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");var n=Cne(t),i=Dne(n)?"DETACHED":Sne(n,r);return{"[[Object]]":t,"[[CachedBufferByteLength]]":i}},Iy=Ut,Ane=Ak,kne=Tne,_ne=Yc,$ne=yf,s4=function(t,r){if(r!=="SEQ-CST"&&r!=="UNORDERED")throw new Iy("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~");if(_ne(t)!=="Object")throw new Iy("Assertion failed: `O` must be an Object");if(!$ne(t))throw new Iy("Assertion failed: `O` must be a Typed Array");var n=kne(t,r);if(Ane(n))throw new Iy("`O` must be in-bounds and backed by a non-detached buffer");return n},Fne=Bo,Ny=Ut,Pne=Sk,Ine=Q6,Nne=Ak,Mne=gne,Lne=s4,One=_g(),Rne=function(t,r){if(!Ine(t))throw new Ny("Assertion failed: `constructor` must be a constructor");if(!Pne(r))throw new Ny("Assertion failed: `argumentList` must be a List");if(One.length===0)throw new Fne("Assertion failed: Typed Arrays are not supported in this environment");var n;r.length===0?n=new t:r.length===1?n=new t(r[0]):r.length===2?n=new t(r[0],r[1]):n=new t(r[0],r[1],r[2]);var i=Lne(n,"SEQ-CST");if(r.length===1&&typeof r[0]=="number"){if(Nne(i))throw new Ny("new Typed Array is out of bounds");var s=Mne(i);if(s"u"?i:_I(r),a;l===-1/0?a=0:l<0?a=WS(i+l,0):a=kI(l,i);var c=WS(a-o,0),u=tie(n,[c]);if(c>0){if(Yne(VS(n)))throw new Kne("Cannot use a Typed Array with an underlying ArrayBuffer that is detached");var h=FI(n),d=FI(u);if(h===d)for(var f=VS(n),p=VS(u),g=eie(n),y=PI(n),b=o*g+y,v=PI(u),E=v+c*g;v2?arguments[2]:kk,o=s.includeSymbols?Jb:Kb,l=!!s.immutable;return function a(c){var u=l?f4(c,s):c,h={},d=!0,f={node:u,node_:c,path:[].concat(r),parent:n[n.length-1],parents:n,key:r[r.length-1],isRoot:r.length===0,level:r.length,circular:null,update:function(y,b){f.isRoot||(f.parent.node[f.key]=y),f.node=y,b&&(d=!1)},delete:function(y){delete f.parent.node[f.key],y&&(d=!1)},remove:function(y){d4(f.parent.node)?f.parent.node.splice(f.key,1):delete f.parent.node[f.key],y&&(d=!1)},keys:null,before:function(y){h.before=y},after:function(y){h.after=y},pre:function(y){h.pre=y},post:function(y){h.post=y},stop:function(){i=!1},block:function(){d=!1}};if(!i)return f;function p(){if(typeof f.node=="object"&&f.node!==null){(!f.keys||f.node_!==f.node)&&(f.keys=o(f.node)),f.isLeaf=f.keys.length===0;for(var y=0;y1?arguments[1]:kk,this.value=e}to.prototype.get=function(e){for(var t=this.value,r=0;t&&r1?arguments[1]:kk;return new to(e,t)}qb(Jb(to.prototype),function(e){m4[e]=function(t){var r=[].slice.call(arguments,1),n=new to(t);return n[e].apply(n,r)}});var Cie=m4;const $c=uo(Cie);class Ke{constructor(){this.hex="#000000",this.rgb_r=0,this.rgb_g=0,this.rgb_b=0,this.xyz_x=0,this.xyz_y=0,this.xyz_z=0,this.luv_l=0,this.luv_u=0,this.luv_v=0,this.lch_l=0,this.lch_c=0,this.lch_h=0,this.hsluv_h=0,this.hsluv_s=0,this.hsluv_l=0,this.hpluv_h=0,this.hpluv_p=0,this.hpluv_l=0,this.r0s=0,this.r0i=0,this.r1s=0,this.r1i=0,this.g0s=0,this.g0i=0,this.g1s=0,this.g1i=0,this.b0s=0,this.b0i=0,this.b1s=0,this.b1i=0}static fromLinear(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}static toLinear(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92}static yToL(t){return t<=Ke.epsilon?t/Ke.refY*Ke.kappa:116*Math.pow(t/Ke.refY,1/3)-16}static lToY(t){return t<=8?Ke.refY*t/Ke.kappa:Ke.refY*Math.pow((t+16)/116,3)}static rgbChannelToHex(t){const r=Math.round(t*255),n=r%16,i=(r-n)/16|0;return Ke.hexChars.charAt(i)+Ke.hexChars.charAt(n)}static hexToRgbChannel(t,r){const n=Ke.hexChars.indexOf(t.charAt(r)),i=Ke.hexChars.indexOf(t.charAt(r+1));return(n*16+i)/255}static distanceFromOriginAngle(t,r,n){const i=r/(Math.sin(n)-t*Math.cos(n));return i<0?1/0:i}static distanceFromOrigin(t,r){return Math.abs(r)/Math.sqrt(Math.pow(t,2)+1)}static min6(t,r,n,i,s,o){return Math.min(t,Math.min(r,Math.min(n,Math.min(i,Math.min(s,o)))))}rgbToHex(){this.hex="#",this.hex+=Ke.rgbChannelToHex(this.rgb_r),this.hex+=Ke.rgbChannelToHex(this.rgb_g),this.hex+=Ke.rgbChannelToHex(this.rgb_b)}hexToRgb(){this.hex=this.hex.toLowerCase(),this.rgb_r=Ke.hexToRgbChannel(this.hex,1),this.rgb_g=Ke.hexToRgbChannel(this.hex,3),this.rgb_b=Ke.hexToRgbChannel(this.hex,5)}xyzToRgb(){this.rgb_r=Ke.fromLinear(Ke.m_r0*this.xyz_x+Ke.m_r1*this.xyz_y+Ke.m_r2*this.xyz_z),this.rgb_g=Ke.fromLinear(Ke.m_g0*this.xyz_x+Ke.m_g1*this.xyz_y+Ke.m_g2*this.xyz_z),this.rgb_b=Ke.fromLinear(Ke.m_b0*this.xyz_x+Ke.m_b1*this.xyz_y+Ke.m_b2*this.xyz_z)}rgbToXyz(){const t=Ke.toLinear(this.rgb_r),r=Ke.toLinear(this.rgb_g),n=Ke.toLinear(this.rgb_b);this.xyz_x=.41239079926595*t+.35758433938387*r+.18048078840183*n,this.xyz_y=.21263900587151*t+.71516867876775*r+.072192315360733*n,this.xyz_z=.019330818715591*t+.11919477979462*r+.95053215224966*n}xyzToLuv(){const t=this.xyz_x+15*this.xyz_y+3*this.xyz_z;let r=4*this.xyz_x,n=9*this.xyz_y;t!==0?(r/=t,n/=t):(r=NaN,n=NaN),this.luv_l=Ke.yToL(this.xyz_y),this.luv_l===0?(this.luv_u=0,this.luv_v=0):(this.luv_u=13*this.luv_l*(r-Ke.refU),this.luv_v=13*this.luv_l*(n-Ke.refV))}luvToXyz(){if(this.luv_l===0){this.xyz_x=0,this.xyz_y=0,this.xyz_z=0;return}const t=this.luv_u/(13*this.luv_l)+Ke.refU,r=this.luv_v/(13*this.luv_l)+Ke.refV;this.xyz_y=Ke.lToY(this.luv_l),this.xyz_x=0-9*this.xyz_y*t/((t-4)*r-t*r),this.xyz_z=(9*this.xyz_y-15*r*this.xyz_y-r*this.xyz_x)/(3*r)}luvToLch(){if(this.lch_l=this.luv_l,this.lch_c=Math.sqrt(this.luv_u*this.luv_u+this.luv_v*this.luv_v),this.lch_c<1e-8)this.lch_h=0;else{const t=Math.atan2(this.luv_v,this.luv_u);this.lch_h=t*180/Math.PI,this.lch_h<0&&(this.lch_h=360+this.lch_h)}}lchToLuv(){const t=this.lch_h/180*Math.PI;this.luv_l=this.lch_l,this.luv_u=Math.cos(t)*this.lch_c,this.luv_v=Math.sin(t)*this.lch_c}calculateBoundingLines(t){const r=Math.pow(t+16,3)/1560896,n=r>Ke.epsilon?r:t/Ke.kappa,i=n*(284517*Ke.m_r0-94839*Ke.m_r2),s=n*(838422*Ke.m_r2+769860*Ke.m_r1+731718*Ke.m_r0),o=n*(632260*Ke.m_r2-126452*Ke.m_r1),l=n*(284517*Ke.m_g0-94839*Ke.m_g2),a=n*(838422*Ke.m_g2+769860*Ke.m_g1+731718*Ke.m_g0),c=n*(632260*Ke.m_g2-126452*Ke.m_g1),u=n*(284517*Ke.m_b0-94839*Ke.m_b2),h=n*(838422*Ke.m_b2+769860*Ke.m_b1+731718*Ke.m_b0),d=n*(632260*Ke.m_b2-126452*Ke.m_b1);this.r0s=i/o,this.r0i=s*t/o,this.r1s=i/(o+126452),this.r1i=(s-769860)*t/(o+126452),this.g0s=l/c,this.g0i=a*t/c,this.g1s=l/(c+126452),this.g1i=(a-769860)*t/(c+126452),this.b0s=u/d,this.b0i=h*t/d,this.b1s=u/(d+126452),this.b1i=(h-769860)*t/(d+126452)}calcMaxChromaHpluv(){const t=Ke.distanceFromOrigin(this.r0s,this.r0i),r=Ke.distanceFromOrigin(this.r1s,this.r1i),n=Ke.distanceFromOrigin(this.g0s,this.g0i),i=Ke.distanceFromOrigin(this.g1s,this.g1i),s=Ke.distanceFromOrigin(this.b0s,this.b0i),o=Ke.distanceFromOrigin(this.b1s,this.b1i);return Ke.min6(t,r,n,i,s,o)}calcMaxChromaHsluv(t){const r=t/360*Math.PI*2,n=Ke.distanceFromOriginAngle(this.r0s,this.r0i,r),i=Ke.distanceFromOriginAngle(this.r1s,this.r1i,r),s=Ke.distanceFromOriginAngle(this.g0s,this.g0i,r),o=Ke.distanceFromOriginAngle(this.g1s,this.g1i,r),l=Ke.distanceFromOriginAngle(this.b0s,this.b0i,r),a=Ke.distanceFromOriginAngle(this.b1s,this.b1i,r);return Ke.min6(n,i,s,o,l,a)}hsluvToLch(){if(this.hsluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hsluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hsluv_l,this.calculateBoundingLines(this.hsluv_l);const t=this.calcMaxChromaHsluv(this.hsluv_h);this.lch_c=t/100*this.hsluv_s}this.lch_h=this.hsluv_h}lchToHsluv(){if(this.lch_l>99.9999999)this.hsluv_s=0,this.hsluv_l=100;else if(this.lch_l<1e-8)this.hsluv_s=0,this.hsluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHsluv(this.lch_h);this.hsluv_s=this.lch_c/t*100,this.hsluv_l=this.lch_l}this.hsluv_h=this.lch_h}hpluvToLch(){if(this.hpluv_l>99.9999999)this.lch_l=100,this.lch_c=0;else if(this.hpluv_l<1e-8)this.lch_l=0,this.lch_c=0;else{this.lch_l=this.hpluv_l,this.calculateBoundingLines(this.hpluv_l);const t=this.calcMaxChromaHpluv();this.lch_c=t/100*this.hpluv_p}this.lch_h=this.hpluv_h}lchToHpluv(){if(this.lch_l>99.9999999)this.hpluv_p=0,this.hpluv_l=100;else if(this.lch_l<1e-8)this.hpluv_p=0,this.hpluv_l=0;else{this.calculateBoundingLines(this.lch_l);const t=this.calcMaxChromaHpluv();this.hpluv_p=this.lch_c/t*100,this.hpluv_l=this.lch_l}this.hpluv_h=this.lch_h}hsluvToRgb(){this.hsluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hpluvToRgb(){this.hpluvToLch(),this.lchToLuv(),this.luvToXyz(),this.xyzToRgb()}hsluvToHex(){this.hsluvToRgb(),this.rgbToHex()}hpluvToHex(){this.hpluvToRgb(),this.rgbToHex()}rgbToHsluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHsluv()}rgbToHpluv(){this.rgbToXyz(),this.xyzToLuv(),this.luvToLch(),this.lchToHpluv(),this.lchToHpluv()}hexToHsluv(){this.hexToRgb(),this.rgbToHsluv()}hexToHpluv(){this.hexToRgb(),this.rgbToHpluv()}}Ke.hexChars="0123456789abcdef";Ke.refY=1;Ke.refU=.19783000664283;Ke.refV=.46831999493879;Ke.kappa=903.2962962;Ke.epsilon=.0088564516;Ke.m_r0=3.240969941904521;Ke.m_r1=-1.537383177570093;Ke.m_r2=-.498610760293;Ke.m_g0=-.96924363628087;Ke.m_g1=1.87596750150772;Ke.m_g2=.041555057407175;Ke.m_b0=.055630079696993;Ke.m_b1=-.20397695888897;Ke.m_b2=1.056971514242878;var g4={exports:{}};/** * chroma.js - JavaScript library for color conversions * * Copyright (c) 2011-2019, Gregor Aisch @@ -143,8 +143,8 @@ Error generating stack: `+s.message+` * http://www.w3.org/TR/css3-color/#svg-color * * @preserve - */(function(e,t){(function(r,n){e.exports=n()})(Dr,function(){for(var r=function(j,W,J){return W===void 0&&(W=0),J===void 0&&(J=1),jJ?J:j},n=r,i=function(j){j._clipped=!1,j._unclipped=j.slice(0);for(var W=0;W<=3;W++)W<3?((j[W]<0||j[W]>255)&&(j._clipped=!0),j[W]=n(j[W],0,255)):W===3&&(j[W]=n(j[W],0,1));return j},s={},o=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(j):u(j[0])=="object"&&W?W.split("").filter(function(J){return j[0][J]!==void 0}).map(function(J){return j[0][J]}):j[0]},d=c,f=function(j){if(j.length<2)return null;var W=j.length-1;return d(j[W])=="string"?j[W].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:r,type:c,unpack:h,last:f,PI:p,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,v=g.clip_rgb,E=g.type,D=y,C=function(){for(var W=[],J=arguments.length;J--;)W[J]=arguments[J];var se=this;if(E(W[0])==="object"&&W[0].constructor&&W[0].constructor===this.constructor)return W[0];var he=b(W),pe=!1;if(!he){pe=!0,D.sorted||(D.autodetect=D.autodetect.sort(function(Be,st){return st.p-Be.p}),D.sorted=!0);for(var ue=0,xe=D.autodetect;ue4?j[4]:1;return pe===1?[0,0,0,ue]:[J>=1?0:255*(1-J)*(1-pe),se>=1?0:255*(1-se)*(1-pe),he>=1?0:255*(1-he)*(1-pe),ue]},_=P,M=A,B=w,R=y,G=g.unpack,q=g.type,ee=L;B.prototype.cmyk=function(){return ee(this._rgb)},M.cmyk=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(B,[null].concat(j,["cmyk"])))},R.format.cmyk=_,R.autodetect.push({p:2,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=G(j,"cmyk"),q(j)==="array"&&j.length===4)return"cmyk"}});var Y=g.unpack,X=g.last,Q=function(j){return Math.round(j*100)/100},te=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Y(j,"hsla"),se=X(j)||"lsa";return J[0]=Q(J[0]||0),J[1]=Q(J[1]*100)+"%",J[2]=Q(J[2]*100)+"%",se==="hsla"||J.length>3&&J[3]<1?(J[3]=J.length>3?J[3]:1,se="hsla"):J.length=3,se+"("+J.join(",")+")"},Z=te,de=g.unpack,ke=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=de(j,"rgba");var J=j[0],se=j[1],he=j[2];J/=255,se/=255,he/=255;var pe=Math.min(J,se,he),ue=Math.max(J,se,he),xe=(ue+pe)/2,we,$e;return ue===pe?(we=0,$e=Number.NaN):we=xe<.5?(ue-pe)/(ue+pe):(ue-pe)/(2-ue-pe),J==ue?$e=(se-he)/(ue-pe):se==ue?$e=2+(he-J)/(ue-pe):he==ue&&($e=4+(J-se)/(ue-pe)),$e*=60,$e<0&&($e+=360),j.length>3&&j[3]!==void 0?[$e,we,xe,j[3]]:[$e,we,xe]},me=ke,Fe=g.unpack,ze=g.last,Xe=Z,$t=me,Pt=Math.round,V=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Fe(j,"rgba"),se=ze(j)||"rgb";return se.substr(0,3)=="hsl"?Xe($t(J),se):(J[0]=Pt(J[0]),J[1]=Pt(J[1]),J[2]=Pt(J[2]),(se==="rgba"||J.length>3&&J[3]<1)&&(J[3]=J.length>3?J[3]:1,se="rgba"),se+"("+J.slice(0,se==="rgb"?3:4).join(",")+")")},Ee=V,De=g.unpack,oe=Math.round,ne=function(){for(var j,W=[],J=arguments.length;J--;)W[J]=arguments[J];W=De(W,"hsl");var se=W[0],he=W[1],pe=W[2],ue,xe,we;if(he===0)ue=xe=we=pe*255;else{var $e=[0,0,0],Be=[0,0,0],st=pe<.5?pe*(1+he):pe+he-pe*he,We=2*pe-st,mt=se/360;$e[0]=mt+1/3,$e[1]=mt,$e[2]=mt-1/3;for(var ft=0;ft<3;ft++)$e[ft]<0&&($e[ft]+=1),$e[ft]>1&&($e[ft]-=1),6*$e[ft]<1?Be[ft]=We+(st-We)*6*$e[ft]:2*$e[ft]<1?Be[ft]=st:3*$e[ft]<2?Be[ft]=We+(st-We)*(2/3-$e[ft])*6:Be[ft]=We;j=[oe(Be[0]*255),oe(Be[1]*255),oe(Be[2]*255)],ue=j[0],xe=j[1],we=j[2]}return W.length>3?[ue,xe,we,W[3]]:[ue,xe,we,1]},ge=ne,Ie=ge,_e=y,be=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ne=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ze=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ce=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Te=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Oe=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=Math.round,Dt=function(j){j=j.toLowerCase().trim();var W;if(_e.format.named)try{return _e.format.named(j)}catch{}if(W=j.match(be)){for(var J=W.slice(1,4),se=0;se<3;se++)J[se]=+J[se];return J[3]=1,J}if(W=j.match(Ne)){for(var he=W.slice(1,5),pe=0;pe<4;pe++)he[pe]=+he[pe];return he}if(W=j.match(Ze)){for(var ue=W.slice(1,4),xe=0;xe<3;xe++)ue[xe]=Ye(ue[xe]*2.55);return ue[3]=1,ue}if(W=j.match(ce)){for(var we=W.slice(1,5),$e=0;$e<3;$e++)we[$e]=Ye(we[$e]*2.55);return we[3]=+we[3],we}if(W=j.match(Te)){var Be=W.slice(1,4);Be[1]*=.01,Be[2]*=.01;var st=Ie(Be);return st[3]=1,st}if(W=j.match(Oe)){var We=W.slice(1,4);We[1]*=.01,We[2]*=.01;var mt=Ie(We);return mt[3]=+W[4],mt}};Dt.test=function(j){return be.test(j)||Ne.test(j)||Ze.test(j)||ce.test(j)||Te.test(j)||Oe.test(j)};var St=Dt,Nt=A,_t=w,yt=y,Ft=g.type,Rt=Ee,sr=St;_t.prototype.css=function(j){return Rt(this._rgb,j)},Nt.css=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(_t,[null].concat(j,["css"])))},yt.format.css=sr,yt.autodetect.push({p:5,test:function(j){for(var W=[],J=arguments.length-1;J-- >0;)W[J]=arguments[J+1];if(!W.length&&Ft(j)==="string"&&sr.test(j))return"css"}});var tn=w,ys=A,Zn=y,Er=g.unpack;Zn.format.gl=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Er(j,"rgba");return J[0]*=255,J[1]*=255,J[2]*=255,J},ys.gl=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(tn,[null].concat(j,["gl"])))},tn.prototype.gl=function(){var j=this._rgb;return[j[0]/255,j[1]/255,j[2]/255,j[3]]};var Ln=g.unpack,On=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Ln(j,"rgb"),se=J[0],he=J[1],pe=J[2],ue=Math.min(se,he,pe),xe=Math.max(se,he,pe),we=xe-ue,$e=we*100/255,Be=ue/(255-we)*100,st;return we===0?st=Number.NaN:(se===xe&&(st=(he-pe)/we),he===xe&&(st=2+(pe-se)/we),pe===xe&&(st=4+(se-he)/we),st*=60,st<0&&(st+=360)),[st,$e,Be]},Qn=On,ye=g.unpack,Se=Math.floor,Ae=function(){for(var j,W,J,se,he,pe,ue=[],xe=arguments.length;xe--;)ue[xe]=arguments[xe];ue=ye(ue,"hcg");var we=ue[0],$e=ue[1],Be=ue[2],st,We,mt;Be=Be*255;var ft=$e*255;if($e===0)st=We=mt=Be;else{we===360&&(we=0),we>360&&(we-=360),we<0&&(we+=360),we/=60;var Wt=Se(we),Xt=we-Wt,cr=Be*(1-$e),wr=cr+ft*(1-Xt),ii=cr+ft*Xt,jn=cr+ft;switch(Wt){case 0:j=[jn,ii,cr],st=j[0],We=j[1],mt=j[2];break;case 1:W=[wr,jn,cr],st=W[0],We=W[1],mt=W[2];break;case 2:J=[cr,jn,ii],st=J[0],We=J[1],mt=J[2];break;case 3:se=[cr,wr,jn],st=se[0],We=se[1],mt=se[2];break;case 4:he=[ii,cr,jn],st=he[0],We=he[1],mt=he[2];break;case 5:pe=[jn,cr,wr],st=pe[0],We=pe[1],mt=pe[2];break}}return[st,We,mt,ue.length>3?ue[3]:1]},Ue=Ae,tt=g.unpack,Tt=g.type,vt=A,ot=w,xt=y,Ct=Qn;ot.prototype.hcg=function(){return Ct(this._rgb)},vt.hcg=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(ot,[null].concat(j,["hcg"])))},xt.format.hcg=Ue,xt.autodetect.push({p:1,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=tt(j,"hcg"),Tt(j)==="array"&&j.length===3)return"hcg"}});var Lr=g.unpack,Or=g.last,ct=Math.round,Kt=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Lr(j,"rgba"),se=J[0],he=J[1],pe=J[2],ue=J[3],xe=Or(j)||"auto";ue===void 0&&(ue=1),xe==="auto"&&(xe=ue<1?"rgba":"rgb"),se=ct(se),he=ct(he),pe=ct(pe);var we=se<<16|he<<8|pe,$e="000000"+we.toString(16);$e=$e.substr($e.length-6);var Be="0"+ct(ue*255).toString(16);switch(Be=Be.substr(Be.length-2),xe.toLowerCase()){case"rgba":return"#"+$e+Be;case"argb":return"#"+Be+$e;default:return"#"+$e}},or=Kt,Mi=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,$n=function(j){if(j.match(Mi)){(j.length===4||j.length===7)&&(j=j.substr(1)),j.length===3&&(j=j.split(""),j=j[0]+j[0]+j[1]+j[1]+j[2]+j[2]);var W=parseInt(j,16),J=W>>16,se=W>>8&255,he=W&255;return[J,se,he,1]}if(j.match(Tn)){(j.length===5||j.length===9)&&(j=j.substr(1)),j.length===4&&(j=j.split(""),j=j[0]+j[0]+j[1]+j[1]+j[2]+j[2]+j[3]+j[3]);var pe=parseInt(j,16),ue=pe>>24&255,xe=pe>>16&255,we=pe>>8&255,$e=Math.round((pe&255)/255*100)/100;return[ue,xe,we,$e]}throw new Error("unknown hex color: "+j)},Ur=$n,ei=A,rt=w,fe=g.type,Le=y,it=or;rt.prototype.hex=function(j){return it(this._rgb,j)},ei.hex=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(rt,[null].concat(j,["hex"])))},Le.format.hex=Ur,Le.autodetect.push({p:4,test:function(j){for(var W=[],J=arguments.length-1;J-- >0;)W[J]=arguments[J+1];if(!W.length&&fe(j)==="string"&&[3,4,5,6,7,8,9].indexOf(j.length)>=0)return"hex"}});var Qe=g.unpack,Bt=g.TWOPI,Jt=Math.min,Gt=Math.sqrt,Wr=Math.acos,xi=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Qe(j,"rgb"),se=J[0],he=J[1],pe=J[2];se/=255,he/=255,pe/=255;var ue,xe=Jt(se,he,pe),we=(se+he+pe)/3,$e=we>0?1-xe/we:0;return $e===0?ue=NaN:(ue=(se-he+(se-pe))/2,ue/=Gt((se-he)*(se-he)+(se-pe)*(he-pe)),ue=Wr(ue),pe>he&&(ue=Bt-ue),ue/=Bt),[ue*360,$e,we]},jr=xi,xa=g.unpack,Zi=g.limit,ti=g.TWOPI,Qi=g.PITHIRD,jo=Math.cos,jf=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=xa(j,"hsi");var J=j[0],se=j[1],he=j[2],pe,ue,xe;return isNaN(J)&&(J=0),isNaN(se)&&(se=0),J>360&&(J-=360),J<0&&(J+=360),J/=360,J<1/3?(xe=(1-se)/3,pe=(1+se*jo(ti*J)/jo(Qi-ti*J))/3,ue=1-(xe+pe)):J<2/3?(J-=1/3,pe=(1-se)/3,ue=(1+se*jo(ti*J)/jo(Qi-ti*J))/3,xe=1-(pe+ue)):(J-=2/3,ue=(1-se)/3,xe=(1+se*jo(ti*J)/jo(Qi-ti*J))/3,pe=1-(ue+xe)),pe=Zi(he*pe*3),ue=Zi(he*ue*3),xe=Zi(he*xe*3),[pe*255,ue*255,xe*255,j.length>3?j[3]:1]},Hf=jf,dl=g.unpack,bh=g.type,fl=A,xh=w,Ho=y,wh=jr;xh.prototype.hsi=function(){return wh(this._rgb)},fl.hsi=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(xh,[null].concat(j,["hsi"])))},Ho.format.hsi=Hf,Ho.autodetect.push({p:2,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=dl(j,"hsi"),bh(j)==="array"&&j.length===3)return"hsi"}});var Ru=g.unpack,Uf=g.type,pl=A,Sh=w,wa=y,Sa=me;Sh.prototype.hsl=function(){return Sa(this._rgb)},pl.hsl=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(Sh,[null].concat(j,["hsl"])))},wa.format.hsl=ge,wa.autodetect.push({p:2,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=Ru(j,"hsl"),Uf(j)==="array"&&j.length===3)return"hsl"}});var Bu=g.unpack,Wf=Math.min,es=Math.max,ml=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=Bu(j,"rgb");var J=j[0],se=j[1],he=j[2],pe=Wf(J,se,he),ue=es(J,se,he),xe=ue-pe,we,$e,Be;return Be=ue/255,ue===0?(we=Number.NaN,$e=0):($e=xe/ue,J===ue&&(we=(se-he)/xe),se===ue&&(we=2+(he-J)/xe),he===ue&&(we=4+(J-se)/xe),we*=60,we<0&&(we+=360)),[we,$e,Be]},Uo=ml,Vf=g.unpack,wt=Math.floor,Bs=function(){for(var j,W,J,se,he,pe,ue=[],xe=arguments.length;xe--;)ue[xe]=arguments[xe];ue=Vf(ue,"hsv");var we=ue[0],$e=ue[1],Be=ue[2],st,We,mt;if(Be*=255,$e===0)st=We=mt=Be;else{we===360&&(we=0),we>360&&(we-=360),we<0&&(we+=360),we/=60;var ft=wt(we),Wt=we-ft,Xt=Be*(1-$e),cr=Be*(1-$e*Wt),wr=Be*(1-$e*(1-Wt));switch(ft){case 0:j=[Be,wr,Xt],st=j[0],We=j[1],mt=j[2];break;case 1:W=[cr,Be,Xt],st=W[0],We=W[1],mt=W[2];break;case 2:J=[Xt,Be,wr],st=J[0],We=J[1],mt=J[2];break;case 3:se=[Xt,cr,Be],st=se[0],We=se[1],mt=se[2];break;case 4:he=[wr,Xt,Be],st=he[0],We=he[1],mt=he[2];break;case 5:pe=[Be,Xt,cr],st=pe[0],We=pe[1],mt=pe[2];break}}return[st,We,mt,ue.length>3?ue[3]:1]},Dh=Bs,Gf=g.unpack,qf=g.type,Kf=A,Eh=w,Rn=y,vs=Uo;Eh.prototype.hsv=function(){return vs(this._rgb)},Kf.hsv=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(Eh,[null].concat(j,["hsv"])))},Rn.format.hsv=Dh,Rn.autodetect.push({p:2,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=Gf(j,"hsv"),qf(j)==="array"&&j.length===3)return"hsv"}});var bs={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},xs=bs,Jf=g.unpack,gl=Math.pow,Xf=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Jf(j,"rgb"),se=J[0],he=J[1],pe=J[2],ue=Ch(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2],Be=116*we-16;return[Be<0?0:Be,500*(xe-we),200*(we-$e)]},Da=function(j){return(j/=255)<=.04045?j/12.92:gl((j+.055)/1.055,2.4)},yl=function(j){return j>xs.t3?gl(j,1/3):j/xs.t2+xs.t0},Ch=function(j,W,J){j=Da(j),W=Da(W),J=Da(J);var se=yl((.4124564*j+.3575761*W+.1804375*J)/xs.Xn),he=yl((.2126729*j+.7151522*W+.072175*J)/xs.Yn),pe=yl((.0193339*j+.119192*W+.9503041*J)/xs.Zn);return[se,he,pe]},Wo=Xf,zs=bs,ht=g.unpack,Yf=Math.pow,Th=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=ht(j,"lab");var J=j[0],se=j[1],he=j[2],pe,ue,xe,we,$e,Be;return ue=(J+16)/116,pe=isNaN(se)?ue:ue+se/500,xe=isNaN(he)?ue:ue-he/200,ue=zs.Yn*ve(ue),pe=zs.Xn*ve(pe),xe=zs.Zn*ve(xe),we=ie(3.2404542*pe-1.5371385*ue-.4985314*xe),$e=ie(-.969266*pe+1.8760108*ue+.041556*xe),Be=ie(.0556434*pe-.2040259*ue+1.0572252*xe),[we,$e,Be,j.length>3?j[3]:1]},ie=function(j){return 255*(j<=.00304?12.92*j:1.055*Yf(j,1/2.4)-.055)},ve=function(j){return j>zs.t1?j*j*j:zs.t2*(j-zs.t0)},Me=Th,lt=g.unpack,Cr=g.type,Lt=A,Rr=w,rn=y,bn=Wo;Rr.prototype.lab=function(){return bn(this._rgb)},Lt.lab=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(Rr,[null].concat(j,["lab"])))},rn.format.lab=Me,rn.autodetect.push({p:2,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=lt(j,"lab"),Cr(j)==="array"&&j.length===3)return"lab"}});var Hr=g.unpack,tr=g.RAD2DEG,gn=Math.sqrt,xn=Math.atan2,ri=Math.round,ni=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Hr(j,"lab"),se=J[0],he=J[1],pe=J[2],ue=gn(he*he+pe*pe),xe=(xn(pe,he)*tr+360)%360;return ri(ue*1e4)===0&&(xe=Number.NaN),[se,ue,xe]},ws=ni,ts=g.unpack,ho=Wo,vl=ws,bl=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=ts(j,"rgb"),se=J[0],he=J[1],pe=J[2],ue=ho(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2];return vl(xe,we,$e)},xl=bl,Zf=g.unpack,xx=g.DEG2RAD,wx=Math.sin,Qf=Math.cos,Sx=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Zf(j,"lch"),se=J[0],he=J[1],pe=J[2];return isNaN(pe)&&(pe=0),pe=pe*xx,[se,Qf(pe)*he,wx(pe)*he]},Zg=Sx,Qg=g.unpack,Dx=Zg,Ex=Me,Cx=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=Qg(j,"lch");var J=j[0],se=j[1],he=j[2],pe=Dx(J,se,he),ue=pe[0],xe=pe[1],we=pe[2],$e=Ex(ue,xe,we),Be=$e[0],st=$e[1],We=$e[2];return[Be,st,We,j.length>3?j[3]:1]},ey=Cx,Tx=g.unpack,zu=ey,ty=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Tx(j,"hcl").reverse();return zu.apply(void 0,J)},Ax=ty,x=g.unpack,m=g.type,S=A,k=w,O=y,U=xl;k.prototype.lch=function(){return U(this._rgb)},k.prototype.hcl=function(){return U(this._rgb).reverse()},S.lch=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(k,[null].concat(j,["lch"])))},S.hcl=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(k,[null].concat(j,["hcl"])))},O.format.lch=ey,O.format.hcl=Ax,["lch","hcl"].forEach(function(j){return O.autodetect.push({p:2,test:function(){for(var W=[],J=arguments.length;J--;)W[J]=arguments[J];if(W=x(W,j),m(W)==="array"&&W.length===3)return j}})});var K={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},re=K,le=w,ae=y,Pe=g.type,Ve=re,at=Ur,nt=or;le.prototype.name=function(){for(var j=nt(this._rgb,"rgb"),W=0,J=Object.keys(Ve);W0;)W[J]=arguments[J+1];if(!W.length&&Pe(j)==="string"&&Ve[j.toLowerCase()])return"named"}});var xr=g.unpack,gr=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=xr(j,"rgb"),se=J[0],he=J[1],pe=J[2];return(se<<16)+(he<<8)+pe},wn=gr,Bn=g.type,Li=function(j){if(Bn(j)=="number"&&j>=0&&j<=16777215){var W=j>>16,J=j>>8&255,se=j&255;return[W,J,se,1]}throw new Error("unknown num color: "+j)},ep=Li,tp=A,J$=w,X$=y,HU=g.type,UU=wn;J$.prototype.num=function(){return UU(this._rgb)},tp.num=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(J$,[null].concat(j,["num"])))},X$.format.num=ep,X$.autodetect.push({p:5,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j.length===1&&HU(j[0])==="number"&&j[0]>=0&&j[0]<=16777215)return"num"}});var WU=A,kx=w,Y$=y,Z$=g.unpack,Q$=g.type,e2=Math.round;kx.prototype.rgb=function(j){return j===void 0&&(j=!0),j===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(e2)},kx.prototype.rgba=function(j){return j===void 0&&(j=!0),this._rgb.slice(0,4).map(function(W,J){return J<3?j===!1?W:e2(W):W})},WU.rgb=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(kx,[null].concat(j,["rgb"])))},Y$.format.rgb=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=Z$(j,"rgba");return J[3]===void 0&&(J[3]=1),J},Y$.autodetect.push({p:3,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=Z$(j,"rgba"),Q$(j)==="array"&&(j.length===3||j.length===4&&Q$(j[3])=="number"&&j[3]>=0&&j[3]<=1))return"rgb"}});var ry=Math.log,VU=function(j){var W=j/100,J,se,he;return W<66?(J=255,se=W<6?0:-155.25485562709179-.44596950469579133*(se=W-2)+104.49216199393888*ry(se),he=W<20?0:-254.76935184120902+.8274096064007395*(he=W-10)+115.67994401066147*ry(he)):(J=351.97690566805693+.114206453784165*(J=W-55)-40.25366309332127*ry(J),se=325.4494125711974+.07943456536662342*(se=W-50)-28.0852963507957*ry(se),he=255),[J,se,he,1]},t2=VU,GU=t2,qU=g.unpack,KU=Math.round,JU=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];for(var J=qU(j,"rgb"),se=J[0],he=J[2],pe=1e3,ue=4e4,xe=.4,we;ue-pe>xe;){we=(ue+pe)*.5;var $e=GU(we);$e[2]/$e[0]>=he/se?ue=we:pe=we}return KU(we)},XU=JU,_x=A,ny=w,$x=y,YU=XU;ny.prototype.temp=ny.prototype.kelvin=ny.prototype.temperature=function(){return YU(this._rgb)},_x.temp=_x.kelvin=_x.temperature=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(ny,[null].concat(j,["temp"])))},$x.format.temp=$x.format.kelvin=$x.format.temperature=t2;var ZU=g.unpack,Fx=Math.cbrt,QU=Math.pow,eW=Math.sign,tW=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=ZU(j,"rgb"),se=J[0],he=J[1],pe=J[2],ue=[Px(se/255),Px(he/255),Px(pe/255)],xe=ue[0],we=ue[1],$e=ue[2],Be=Fx(.4122214708*xe+.5363325363*we+.0514459929*$e),st=Fx(.2119034982*xe+.6806995451*we+.1073969566*$e),We=Fx(.0883024619*xe+.2817188376*we+.6299787005*$e);return[.2104542553*Be+.793617785*st-.0040720468*We,1.9779984951*Be-2.428592205*st+.4505937099*We,.0259040371*Be+.7827717662*st-.808675766*We]},r2=tW;function Px(j){var W=Math.abs(j);return W<.04045?j/12.92:(eW(j)||1)*QU((W+.055)/1.055,2.4)}var rW=g.unpack,iy=Math.pow,nW=Math.sign,iW=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=rW(j,"lab");var J=j[0],se=j[1],he=j[2],pe=iy(J+.3963377774*se+.2158037573*he,3),ue=iy(J-.1055613458*se-.0638541728*he,3),xe=iy(J-.0894841775*se-1.291485548*he,3);return[255*Ix(4.0767416621*pe-3.3077115913*ue+.2309699292*xe),255*Ix(-1.2684380046*pe+2.6097574011*ue-.3413193965*xe),255*Ix(-.0041960863*pe-.7034186147*ue+1.707614701*xe),j.length>3?j[3]:1]},n2=iW;function Ix(j){var W=Math.abs(j);return W>.0031308?(nW(j)||1)*(1.055*iy(W,1/2.4)-.055):j*12.92}var sW=g.unpack,oW=g.type,aW=A,i2=w,s2=y,lW=r2;i2.prototype.oklab=function(){return lW(this._rgb)},aW.oklab=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(i2,[null].concat(j,["oklab"])))},s2.format.oklab=n2,s2.autodetect.push({p:3,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=sW(j,"oklab"),oW(j)==="array"&&j.length===3)return"oklab"}});var uW=g.unpack,cW=r2,hW=ws,dW=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];var J=uW(j,"rgb"),se=J[0],he=J[1],pe=J[2],ue=cW(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2];return hW(xe,we,$e)},fW=dW,pW=g.unpack,mW=Zg,gW=n2,yW=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];j=pW(j,"lch");var J=j[0],se=j[1],he=j[2],pe=mW(J,se,he),ue=pe[0],xe=pe[1],we=pe[2],$e=gW(ue,xe,we),Be=$e[0],st=$e[1],We=$e[2];return[Be,st,We,j.length>3?j[3]:1]},vW=yW,bW=g.unpack,xW=g.type,wW=A,o2=w,a2=y,SW=fW;o2.prototype.oklch=function(){return SW(this._rgb)},wW.oklch=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];return new(Function.prototype.bind.apply(o2,[null].concat(j,["oklch"])))},a2.format.oklch=vW,a2.autodetect.push({p:3,test:function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];if(j=bW(j,"oklch"),xW(j)==="array"&&j.length===3)return"oklch"}});var l2=w,DW=g.type;l2.prototype.alpha=function(j,W){return W===void 0&&(W=!1),j!==void 0&&DW(j)==="number"?W?(this._rgb[3]=j,this):new l2([this._rgb[0],this._rgb[1],this._rgb[2],j],"rgb"):this._rgb[3]};var EW=w;EW.prototype.clipped=function(){return this._rgb._clipped||!1};var ju=w,CW=bs;ju.prototype.darken=function(j){j===void 0&&(j=1);var W=this,J=W.lab();return J[0]-=CW.Kn*j,new ju(J,"lab").alpha(W.alpha(),!0)},ju.prototype.brighten=function(j){return j===void 0&&(j=1),this.darken(-j)},ju.prototype.darker=ju.prototype.darken,ju.prototype.brighter=ju.prototype.brighten;var TW=w;TW.prototype.get=function(j){var W=j.split("."),J=W[0],se=W[1],he=this[J]();if(se){var pe=J.indexOf(se)-(J.substr(0,2)==="ok"?2:0);if(pe>-1)return he[pe];throw new Error("unknown channel "+se+" in mode "+J)}else return he};var Ah=w,AW=g.type,kW=Math.pow,_W=1e-7,$W=20;Ah.prototype.luminance=function(j){if(j!==void 0&&AW(j)==="number"){if(j===0)return new Ah([0,0,0,this._rgb[3]],"rgb");if(j===1)return new Ah([255,255,255,this._rgb[3]],"rgb");var W=this.luminance(),J="rgb",se=$W,he=function(ue,xe){var we=ue.interpolate(xe,.5,J),$e=we.luminance();return Math.abs(j-$e)<_W||!se--?we:$e>j?he(ue,we):he(we,xe)},pe=(W>j?he(new Ah([0,0,0]),this):he(this,new Ah([255,255,255]))).rgb();return new Ah(pe.concat([this._rgb[3]]))}return FW.apply(void 0,this._rgb.slice(0,3))};var FW=function(j,W,J){return j=Nx(j),W=Nx(W),J=Nx(J),.2126*j+.7152*W+.0722*J},Nx=function(j){return j/=255,j<=.03928?j/12.92:kW((j+.055)/1.055,2.4)},Ss={},u2=w,c2=g.type,sy=Ss,h2=function(j,W,J){J===void 0&&(J=.5);for(var se=[],he=arguments.length-3;he-- >0;)se[he]=arguments[he+3];var pe=se[0]||"lrgb";if(!sy[pe]&&!se.length&&(pe=Object.keys(sy)[0]),!sy[pe])throw new Error("interpolation mode "+pe+" is not defined");return c2(j)!=="object"&&(j=new u2(j)),c2(W)!=="object"&&(W=new u2(W)),sy[pe](j,W,J).alpha(j.alpha()+J*(W.alpha()-j.alpha()))},d2=w,PW=h2;d2.prototype.mix=d2.prototype.interpolate=function(j,W){W===void 0&&(W=.5);for(var J=[],se=arguments.length-2;se-- >0;)J[se]=arguments[se+2];return PW.apply(void 0,[this,j,W].concat(J))};var f2=w;f2.prototype.premultiply=function(j){j===void 0&&(j=!1);var W=this._rgb,J=W[3];return j?(this._rgb=[W[0]*J,W[1]*J,W[2]*J,J],this):new f2([W[0]*J,W[1]*J,W[2]*J,J],"rgb")};var Mx=w,IW=bs;Mx.prototype.saturate=function(j){j===void 0&&(j=1);var W=this,J=W.lch();return J[1]+=IW.Kn*j,J[1]<0&&(J[1]=0),new Mx(J,"lch").alpha(W.alpha(),!0)},Mx.prototype.desaturate=function(j){return j===void 0&&(j=1),this.saturate(-j)};var p2=w,m2=g.type;p2.prototype.set=function(j,W,J){J===void 0&&(J=!1);var se=j.split("."),he=se[0],pe=se[1],ue=this[he]();if(pe){var xe=he.indexOf(pe)-(he.substr(0,2)==="ok"?2:0);if(xe>-1){if(m2(W)=="string")switch(W.charAt(0)){case"+":ue[xe]+=+W;break;case"-":ue[xe]+=+W;break;case"*":ue[xe]*=+W.substr(1);break;case"/":ue[xe]/=+W.substr(1);break;default:ue[xe]=+W}else if(m2(W)==="number")ue[xe]=W;else throw new Error("unsupported value for Color.set");var we=new p2(ue,he);return J?(this._rgb=we._rgb,this):we}throw new Error("unknown channel "+pe+" in mode "+he)}else return ue};var NW=w,MW=function(j,W,J){var se=j._rgb,he=W._rgb;return new NW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"rgb")};Ss.rgb=MW;var LW=w,Lx=Math.sqrt,kh=Math.pow,OW=function(j,W,J){var se=j._rgb,he=se[0],pe=se[1],ue=se[2],xe=W._rgb,we=xe[0],$e=xe[1],Be=xe[2];return new LW(Lx(kh(he,2)*(1-J)+kh(we,2)*J),Lx(kh(pe,2)*(1-J)+kh($e,2)*J),Lx(kh(ue,2)*(1-J)+kh(Be,2)*J),"rgb")};Ss.lrgb=OW;var RW=w,BW=function(j,W,J){var se=j.lab(),he=W.lab();return new RW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"lab")};Ss.lab=BW;var g2=w,_h=function(j,W,J,se){var he,pe,ue,xe;se==="hsl"?(ue=j.hsl(),xe=W.hsl()):se==="hsv"?(ue=j.hsv(),xe=W.hsv()):se==="hcg"?(ue=j.hcg(),xe=W.hcg()):se==="hsi"?(ue=j.hsi(),xe=W.hsi()):se==="lch"||se==="hcl"?(se="hcl",ue=j.hcl(),xe=W.hcl()):se==="oklch"&&(ue=j.oklch().reverse(),xe=W.oklch().reverse());var we,$e,Be,st,We,mt;(se.substr(0,1)==="h"||se==="oklch")&&(he=ue,we=he[0],Be=he[1],We=he[2],pe=xe,$e=pe[0],st=pe[1],mt=pe[2]);var ft,Wt,Xt,cr;return!isNaN(we)&&!isNaN($e)?($e>we&&$e-we>180?cr=$e-(we+360):$e180?cr=$e+360-we:cr=$e-we,Wt=we+J*cr):isNaN(we)?isNaN($e)?Wt=Number.NaN:(Wt=$e,(We==1||We==0)&&se!="hsv"&&(ft=st)):(Wt=we,(mt==1||mt==0)&&se!="hsv"&&(ft=Be)),ft===void 0&&(ft=Be+J*(st-Be)),Xt=We+J*(mt-We),se==="oklch"?new g2([Xt,ft,Wt],se):new g2([Wt,ft,Xt],se)},zW=_h,y2=function(j,W,J){return zW(j,W,J,"lch")};Ss.lch=y2,Ss.hcl=y2;var jW=w,HW=function(j,W,J){var se=j.num(),he=W.num();return new jW(se+J*(he-se),"num")};Ss.num=HW;var UW=_h,WW=function(j,W,J){return UW(j,W,J,"hcg")};Ss.hcg=WW;var VW=_h,GW=function(j,W,J){return VW(j,W,J,"hsi")};Ss.hsi=GW;var qW=_h,KW=function(j,W,J){return qW(j,W,J,"hsl")};Ss.hsl=KW;var JW=_h,XW=function(j,W,J){return JW(j,W,J,"hsv")};Ss.hsv=XW;var YW=w,ZW=function(j,W,J){var se=j.oklab(),he=W.oklab();return new YW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"oklab")};Ss.oklab=ZW;var QW=_h,eV=function(j,W,J){return QW(j,W,J,"oklch")};Ss.oklch=eV;var Ox=w,tV=g.clip_rgb,Rx=Math.pow,Bx=Math.sqrt,zx=Math.PI,v2=Math.cos,b2=Math.sin,rV=Math.atan2,nV=function(j,W,J){W===void 0&&(W="lrgb"),J===void 0&&(J=null);var se=j.length;J||(J=Array.from(new Array(se)).map(function(){return 1}));var he=se/J.reduce(function(Wt,Xt){return Wt+Xt});if(J.forEach(function(Wt,Xt){J[Xt]*=he}),j=j.map(function(Wt){return new Ox(Wt)}),W==="lrgb")return iV(j,J);for(var pe=j.shift(),ue=pe.get(W),xe=[],we=0,$e=0,Be=0;Be=360;)ft-=360;ue[mt]=ft}else ue[mt]=ue[mt]/xe[mt];return We/=se,new Ox(ue,W).alpha(We>.99999?1:We,!0)},iV=function(j,W){for(var J=j.length,se=[0,0,0,0],he=0;he.9999999&&(se[3]=1),new Ox(tV(se))},fo=A,$h=g.type,sV=Math.pow,jx=function(j){var W="rgb",J=fo("#ccc"),se=0,he=[0,1],pe=[],ue=[0,0],xe=!1,we=[],$e=!1,Be=0,st=1,We=!1,mt={},ft=!0,Wt=1,Xt=function(Ge){if(Ge=Ge||["#fff","#000"],Ge&&$h(Ge)==="string"&&fo.brewer&&fo.brewer[Ge.toLowerCase()]&&(Ge=fo.brewer[Ge.toLowerCase()]),$h(Ge)==="array"){Ge.length===1&&(Ge=[Ge[0],Ge[0]]),Ge=Ge.slice(0);for(var At=0;At=xe[qt];)qt++;return qt-1}return 0},wr=function(Ge){return Ge},ii=function(Ge){return Ge},jn=function(Ge,At){var qt,Vt;if(At==null&&(At=!1),isNaN(Ge)||Ge===null)return J;if(At)Vt=Ge;else if(xe&&xe.length>2){var si=cr(Ge);Vt=si/(xe.length-2)}else st!==Be?Vt=(Ge-Be)/(st-Be):Vt=1;Vt=ii(Vt),At||(Vt=wr(Vt)),Wt!==1&&(Vt=sV(Vt,Wt)),Vt=ue[0]+Vt*(1-ue[0]-ue[1]),Vt=Math.min(1,Math.max(0,Vt));var Vr=Math.floor(Vt*1e4);if(ft&&mt[Vr])qt=mt[Vr];else{if($h(we)==="array")for(var hr=0;hr=Tr&&hr===pe.length-1){qt=we[hr];break}if(Vt>Tr&&Vt2){var hr=Ge.map(function(Ar,Ir){return Ir/(Ge.length-1)}),Tr=Ge.map(function(Ar){return(Ar-Be)/(st-Be)});Tr.every(function(Ar,Ir){return hr[Ir]===Ar})||(ii=function(Ar){if(Ar<=0||Ar>=1)return Ar;for(var Ir=0;Ar>=Tr[Ir+1];)Ir++;var mo=(Ar-Tr[Ir])/(Tr[Ir+1]-Tr[Ir]),Dl=hr[Ir]+mo*(hr[Ir+1]-hr[Ir]);return Dl})}}return he=[Be,st],ar},ar.mode=function(Ge){return arguments.length?(W=Ge,rs(),ar):W},ar.range=function(Ge,At){return Xt(Ge),ar},ar.out=function(Ge){return $e=Ge,ar},ar.spread=function(Ge){return arguments.length?(se=Ge,ar):se},ar.correctLightness=function(Ge){return Ge==null&&(Ge=!0),We=Ge,rs(),We?wr=function(At){for(var qt=jn(0,!0).lab()[0],Vt=jn(1,!0).lab()[0],si=qt>Vt,Vr=jn(At,!0).lab()[0],hr=qt+(Vt-qt)*At,Tr=Vr-hr,Ar=0,Ir=1,mo=20;Math.abs(Tr)>.01&&mo-- >0;)(function(){return si&&(Tr*=-1),Tr<0?(Ar=At,At+=(Ir-At)*.5):(Ir=At,At+=(Ar-At)*.5),Vr=jn(At,!0).lab()[0],Tr=Vr-hr})();return At}:wr=function(At){return At},ar},ar.padding=function(Ge){return Ge!=null?($h(Ge)==="number"&&(Ge=[Ge,Ge]),ue=Ge,ar):ue},ar.colors=function(Ge,At){arguments.length<2&&(At="hex");var qt=[];if(arguments.length===0)qt=we.slice(0);else if(Ge===1)qt=[ar(.5)];else if(Ge>1){var Vt=he[0],si=he[1]-Vt;qt=oV(0,Ge,!1).map(function(Ir){return ar(Vt+Ir/(Ge-1)*si)})}else{j=[];var Vr=[];if(xe&&xe.length>2)for(var hr=1,Tr=xe.length,Ar=1<=Tr;Ar?hrTr;Ar?hr++:hr--)Vr.push((xe[hr-1]+xe[hr])*.5);else Vr=he;qt=Vr.map(function(Ir){return ar(Ir)})}return fo[At]&&(qt=qt.map(function(Ir){return Ir[At]()})),qt},ar.cache=function(Ge){return Ge!=null?(ft=Ge,ar):ft},ar.gamma=function(Ge){return Ge!=null?(Wt=Ge,ar):Wt},ar.nodata=function(Ge){return Ge!=null?(J=fo(Ge),ar):J},ar};function oV(j,W,J){for(var se=[],he=jpe;he?ue++:ue--)se.push(ue);return se}var rp=w,aV=jx,lV=function(j){for(var W=[1,1],J=1;J=5){var $e,Be,st;$e=j.map(function(We){return We.lab()}),st=j.length-1,Be=lV(st),he=function(We){var mt=1-We,ft=[0,1,2].map(function(Wt){return $e.reduce(function(Xt,cr,wr){return Xt+Be[wr]*Math.pow(mt,st-wr)*Math.pow(We,wr)*cr[Wt]},0)});return new rp(ft,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return he},cV=function(j){var W=uV(j);return W.scale=function(){return aV(W)},W},Hx=A,po=function(j,W,J){if(!po[J])throw new Error("unknown blend mode "+J);return po[J](j,W)},wl=function(j){return function(W,J){var se=Hx(J).rgb(),he=Hx(W).rgb();return Hx.rgb(j(se,he))}},Sl=function(j){return function(W,J){var se=[];return se[0]=j(W[0],J[0]),se[1]=j(W[1],J[1]),se[2]=j(W[2],J[2]),se}},hV=function(j){return j},dV=function(j,W){return j*W/255},fV=function(j,W){return j>W?W:j},pV=function(j,W){return j>W?j:W},mV=function(j,W){return 255*(1-(1-j/255)*(1-W/255))},gV=function(j,W){return W<128?2*j*W/255:255*(1-2*(1-j/255)*(1-W/255))},yV=function(j,W){return 255*(1-(1-W/255)/(j/255))},vV=function(j,W){return j===255?255:(j=255*(W/255)/(1-j/255),j>255?255:j)};po.normal=wl(Sl(hV)),po.multiply=wl(Sl(dV)),po.screen=wl(Sl(mV)),po.overlay=wl(Sl(gV)),po.darken=wl(Sl(fV)),po.lighten=wl(Sl(pV)),po.dodge=wl(Sl(vV)),po.burn=wl(Sl(yV));for(var bV=po,Ux=g.type,xV=g.clip_rgb,wV=g.TWOPI,SV=Math.pow,DV=Math.sin,EV=Math.cos,x2=A,CV=function(j,W,J,se,he){j===void 0&&(j=300),W===void 0&&(W=-1.5),J===void 0&&(J=1),se===void 0&&(se=1),he===void 0&&(he=[0,1]);var pe=0,ue;Ux(he)==="array"?ue=he[1]-he[0]:(ue=0,he=[he,he]);var xe=function(we){var $e=wV*((j+120)/360+W*we),Be=SV(he[0]+ue*we,se),st=pe!==0?J[0]+we*pe:J,We=st*Be*(1-Be)/2,mt=EV($e),ft=DV($e),Wt=Be+We*(-.14861*mt+1.78277*ft),Xt=Be+We*(-.29227*mt-.90649*ft),cr=Be+We*(1.97294*mt);return x2(xV([Wt*255,Xt*255,cr*255,1]))};return xe.start=function(we){return we==null?j:(j=we,xe)},xe.rotations=function(we){return we==null?W:(W=we,xe)},xe.gamma=function(we){return we==null?se:(se=we,xe)},xe.hue=function(we){return we==null?J:(J=we,Ux(J)==="array"?(pe=J[1]-J[0],pe===0&&(J=J[1])):pe=0,xe)},xe.lightness=function(we){return we==null?he:(Ux(we)==="array"?(he=we,ue=we[1]-we[0]):(he=[we,we],ue=0),xe)},xe.scale=function(){return x2.scale(xe)},xe.hue(J),xe},TV=w,AV="0123456789abcdef",kV=Math.floor,_V=Math.random,$V=function(){for(var j="#",W=0;W<6;W++)j+=AV.charAt(kV(_V()*16));return new TV(j,"hex")},Wx=c,w2=Math.log,FV=Math.pow,PV=Math.floor,IV=Math.abs,S2=function(j,W){W===void 0&&(W=null);var J={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Wx(j)==="object"&&(j=Object.values(j)),j.forEach(function(se){W&&Wx(se)==="object"&&(se=se[W]),se!=null&&!isNaN(se)&&(J.values.push(se),J.sum+=se,seJ.max&&(J.max=se),J.count+=1)}),J.domain=[J.min,J.max],J.limits=function(se,he){return D2(J,se,he)},J},D2=function(j,W,J){W===void 0&&(W="equal"),J===void 0&&(J=7),Wx(j)=="array"&&(j=S2(j));var se=j.min,he=j.max,pe=j.values.sort(function(Gx,qx){return Gx-qx});if(J===1)return[se,he];var ue=[];if(W.substr(0,1)==="c"&&(ue.push(se),ue.push(he)),W.substr(0,1)==="e"){ue.push(se);for(var xe=1;xe 0");var we=Math.LOG10E*w2(se),$e=Math.LOG10E*w2(he);ue.push(se);for(var Be=1;Be200&&(ii=!1)}for(var El={},Fh=0;Fhse?(J+.05)/(se+.05):(se+.05)/(J+.05)},T2=w,Ea=Math.sqrt,An=Math.pow,MV=Math.min,LV=Math.max,A2=Math.atan2,k2=Math.abs,oy=Math.cos,_2=Math.sin,OV=Math.exp,$2=Math.PI,RV=function(j,W,J,se,he){J===void 0&&(J=1),se===void 0&&(se=1),he===void 0&&(he=1);var pe=function(Uu){return 360*Uu/(2*$2)},ue=function(Uu){return 2*$2*Uu/360};j=new T2(j),W=new T2(W);var xe=Array.from(j.lab()),we=xe[0],$e=xe[1],Be=xe[2],st=Array.from(W.lab()),We=st[0],mt=st[1],ft=st[2],Wt=(we+We)/2,Xt=Ea(An($e,2)+An(Be,2)),cr=Ea(An(mt,2)+An(ft,2)),wr=(Xt+cr)/2,ii=.5*(1-Ea(An(wr,7)/(An(wr,7)+An(25,7)))),jn=$e*(1+ii),rs=mt*(1+ii),ar=Ea(An(jn,2)+An(Be,2)),Ge=Ea(An(rs,2)+An(ft,2)),At=(ar+Ge)/2,qt=pe(A2(Be,jn)),Vt=pe(A2(ft,rs)),si=qt>=0?qt:qt+360,Vr=Vt>=0?Vt:Vt+360,hr=k2(si-Vr)>180?(si+Vr+360)/2:(si+Vr)/2,Tr=1-.17*oy(ue(hr-30))+.24*oy(ue(2*hr))+.32*oy(ue(3*hr+6))-.2*oy(ue(4*hr-63)),Ar=Vr-si;Ar=k2(Ar)<=180?Ar:Vr<=si?Ar+360:Ar-360,Ar=2*Ea(ar*Ge)*_2(ue(Ar)/2);var Ir=We-we,mo=Ge-ar,Dl=1+.015*An(Wt-50,2)/Ea(20+An(Wt-50,2)),El=1+.045*At,Fh=1+.015*At*Tr,Ph=30*OV(-An((hr-275)/25,2)),Ca=2*Ea(An(At,7)/(An(At,7)+An(25,7))),Hu=-Ca*_2(2*ue(Ph)),np=Ea(An(Ir/(J*Dl),2)+An(mo/(se*El),2)+An(Ar/(he*Fh),2)+Hu*(mo/(se*El))*(Ar/(he*Fh)));return LV(0,MV(100,np))},F2=w,BV=function(j,W,J){J===void 0&&(J="lab"),j=new F2(j),W=new F2(W);var se=j.get(J),he=W.get(J),pe=0;for(var ue in se){var xe=(se[ue]||0)-(he[ue]||0);pe+=xe*xe}return Math.sqrt(pe)},zV=w,jV=function(){for(var j=[],W=arguments.length;W--;)j[W]=arguments[W];try{return new(Function.prototype.bind.apply(zV,[null].concat(j))),!0}catch{return!1}},P2=A,I2=jx,HV={cool:function(){return I2([P2.hsl(180,1,.9),P2.hsl(250,.7,.4)])},hot:function(){return I2(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ay={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Vx=0,N2=Object.keys(ay);Vx{const n=(t?e:e.reverse()).find(i=>Dn.contrast(Dn.hex(i.hex),Dn.hex((r==null?void 0:r.hex)||"#ff69b4"))>=3);return(n==null?void 0:n.hex)||"#ff69b4"},Hd=(e,t,r=g0)=>{const n=[];try{return r.forEach((i,s)=>{const o=new Ke;o.hex=t,o.hexToHsluv();const a={hex:"",saturation:o.hsluv_s,hue:o.hsluv_h,luminance:e==="neutral"&&s===r.length-1?100:i};o.hsluv_l=a.luminance,o.hsluvToHex(),a.hex=o.hex,n.push(a)}),[...n.sort((i,s)=>i.luminance>s.luminance?1:i.luminance({...i,index:s}))]}catch{return console.warn("Missing color",t),n}},Yb="/theme-builder/main",Jm=e=>e.startsWith("data:image")?e:`${Yb}/assets/images/${e||"peace-in-a-box.svg"}`,y4=e=>Dn.valid(e),Aie=e=>Dn.valid(e)?Dn.hex(e).luminance():-1,v4=(e,t)=>Dn.valid(e)&&Dn.valid(t)?Dn.contrast(e,t):-1,Qc=e=>!["neutral","informational","successful","warning","critical"].includes(e),ln=(e,t,r)=>{try{return e.replace(/-/g," ").split(" ").map((n,i)=>(t&&i===0?n[0]:n[0].toUpperCase())+n.substring(1,n.length)).join(r||"")}catch(n){console.error(n)}return"ERROR"},$r="db",Ku=e=>{let t="";for(const[r,n]of Object.entries(e))t+=`${r}: ${n}; -`;return t},kie=["opacity","elevation","transition","font"],_ie=e=>e[0]==="font"&&e[1]==="family"||e[0]!=="font",b4=(e,t)=>{const r={};return $c(e).forEach(function(n){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="colors"&&this.path[0]!=="customColors"&&this.path[0]!=="branding"&&_ie(this.path)&&!this.path.includes("_scale")){const i=`--${$r}-${this.path.map(s=>s.toLowerCase()).map(s=>s==="lineheight"?"line-height":s==="fontsize"?"font-size":s).join("-")}`;if(r[i]=!kie.includes(this.path[0])&&(typeof n=="string"||n instanceof String)?`${n}rem`:n,this.path.at(-1)==="fontSize"){const s=[...this.path];s[s.length-1]="lineHeight";const o=Number(n),a=Number($c(e).get(s)),l=this.path.filter(u=>u!=="typography"&&u!=="fontSize").join("-"),c=o*a;r[`--${$r}-base-icon-weight-${l}`]=c*16,r[`--${$r}-base-icon-font-size-${l}`]=`${c}rem`}}}),t?Ku(r):r},$ie=e=>`:root{ + */(function(e,t){(function(r,n){e.exports=n()})(Dr,function(){for(var r=function(z,W,J){return W===void 0&&(W=0),J===void 0&&(J=1),zJ?J:z},n=r,i=function(z){z._clipped=!1,z._unclipped=z.slice(0);for(var W=0;W<=3;W++)W<3?((z[W]<0||z[W]>255)&&(z._clipped=!0),z[W]=n(z[W],0,255)):W===3&&(z[W]=n(z[W],0,1));return z},s={},o=0,l=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];o=3?Array.prototype.slice.call(z):u(z[0])=="object"&&W?W.split("").filter(function(J){return z[0][J]!==void 0}).map(function(J){return z[0][J]}):z[0]},d=c,f=function(z){if(z.length<2)return null;var W=z.length-1;return d(z[W])=="string"?z[W].toLowerCase():null},p=Math.PI,g={clip_rgb:i,limit:r,type:c,unpack:h,last:f,PI:p,TWOPI:p*2,PITHIRD:p/3,DEG2RAD:p/180,RAD2DEG:180/p},y={format:{},autodetect:[]},b=g.last,v=g.clip_rgb,E=g.type,D=y,C=function(){for(var W=[],J=arguments.length;J--;)W[J]=arguments[J];var se=this;if(E(W[0])==="object"&&W[0].constructor&&W[0].constructor===this.constructor)return W[0];var he=b(W),pe=!1;if(!he){pe=!0,D.sorted||(D.autodetect=D.autodetect.sort(function(Be,st){return st.p-Be.p}),D.sorted=!0);for(var ue=0,xe=D.autodetect;ue4?z[4]:1;return pe===1?[0,0,0,ue]:[J>=1?0:255*(1-J)*(1-pe),se>=1?0:255*(1-se)*(1-pe),he>=1?0:255*(1-he)*(1-pe),ue]},_=P,M=A,j=w,R=y,G=g.unpack,q=g.type,ee=L;j.prototype.cmyk=function(){return ee(this._rgb)},M.cmyk=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(j,[null].concat(z,["cmyk"])))},R.format.cmyk=_,R.autodetect.push({p:2,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=G(z,"cmyk"),q(z)==="array"&&z.length===4)return"cmyk"}});var Y=g.unpack,X=g.last,Q=function(z){return Math.round(z*100)/100},te=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Y(z,"hsla"),se=X(z)||"lsa";return J[0]=Q(J[0]||0),J[1]=Q(J[1]*100)+"%",J[2]=Q(J[2]*100)+"%",se==="hsla"||J.length>3&&J[3]<1?(J[3]=J.length>3?J[3]:1,se="hsla"):J.length=3,se+"("+J.join(",")+")"},Z=te,de=g.unpack,ke=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=de(z,"rgba");var J=z[0],se=z[1],he=z[2];J/=255,se/=255,he/=255;var pe=Math.min(J,se,he),ue=Math.max(J,se,he),xe=(ue+pe)/2,we,$e;return ue===pe?(we=0,$e=Number.NaN):we=xe<.5?(ue-pe)/(ue+pe):(ue-pe)/(2-ue-pe),J==ue?$e=(se-he)/(ue-pe):se==ue?$e=2+(he-J)/(ue-pe):he==ue&&($e=4+(J-se)/(ue-pe)),$e*=60,$e<0&&($e+=360),z.length>3&&z[3]!==void 0?[$e,we,xe,z[3]]:[$e,we,xe]},me=ke,Fe=g.unpack,je=g.last,Xe=Z,$t=me,Pt=Math.round,V=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Fe(z,"rgba"),se=je(z)||"rgb";return se.substr(0,3)=="hsl"?Xe($t(J),se):(J[0]=Pt(J[0]),J[1]=Pt(J[1]),J[2]=Pt(J[2]),(se==="rgba"||J.length>3&&J[3]<1)&&(J[3]=J.length>3?J[3]:1,se="rgba"),se+"("+J.slice(0,se==="rgb"?3:4).join(",")+")")},Ee=V,De=g.unpack,oe=Math.round,ne=function(){for(var z,W=[],J=arguments.length;J--;)W[J]=arguments[J];W=De(W,"hsl");var se=W[0],he=W[1],pe=W[2],ue,xe,we;if(he===0)ue=xe=we=pe*255;else{var $e=[0,0,0],Be=[0,0,0],st=pe<.5?pe*(1+he):pe+he-pe*he,We=2*pe-st,mt=se/360;$e[0]=mt+1/3,$e[1]=mt,$e[2]=mt-1/3;for(var ft=0;ft<3;ft++)$e[ft]<0&&($e[ft]+=1),$e[ft]>1&&($e[ft]-=1),6*$e[ft]<1?Be[ft]=We+(st-We)*6*$e[ft]:2*$e[ft]<1?Be[ft]=st:3*$e[ft]<2?Be[ft]=We+(st-We)*(2/3-$e[ft])*6:Be[ft]=We;z=[oe(Be[0]*255),oe(Be[1]*255),oe(Be[2]*255)],ue=z[0],xe=z[1],we=z[2]}return W.length>3?[ue,xe,we,W[3]]:[ue,xe,we,1]},ge=ne,Ie=ge,_e=y,be=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Ne=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ze=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ce=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Te=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Oe=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ye=Math.round,Dt=function(z){z=z.toLowerCase().trim();var W;if(_e.format.named)try{return _e.format.named(z)}catch{}if(W=z.match(be)){for(var J=W.slice(1,4),se=0;se<3;se++)J[se]=+J[se];return J[3]=1,J}if(W=z.match(Ne)){for(var he=W.slice(1,5),pe=0;pe<4;pe++)he[pe]=+he[pe];return he}if(W=z.match(Ze)){for(var ue=W.slice(1,4),xe=0;xe<3;xe++)ue[xe]=Ye(ue[xe]*2.55);return ue[3]=1,ue}if(W=z.match(ce)){for(var we=W.slice(1,5),$e=0;$e<3;$e++)we[$e]=Ye(we[$e]*2.55);return we[3]=+we[3],we}if(W=z.match(Te)){var Be=W.slice(1,4);Be[1]*=.01,Be[2]*=.01;var st=Ie(Be);return st[3]=1,st}if(W=z.match(Oe)){var We=W.slice(1,4);We[1]*=.01,We[2]*=.01;var mt=Ie(We);return mt[3]=+W[4],mt}};Dt.test=function(z){return be.test(z)||Ne.test(z)||Ze.test(z)||ce.test(z)||Te.test(z)||Oe.test(z)};var St=Dt,Nt=A,_t=w,yt=y,Ft=g.type,Rt=Ee,sr=St;_t.prototype.css=function(z){return Rt(this._rgb,z)},Nt.css=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(_t,[null].concat(z,["css"])))},yt.format.css=sr,yt.autodetect.push({p:5,test:function(z){for(var W=[],J=arguments.length-1;J-- >0;)W[J]=arguments[J+1];if(!W.length&&Ft(z)==="string"&&sr.test(z))return"css"}});var tn=w,ys=A,Zn=y,Er=g.unpack;Zn.format.gl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Er(z,"rgba");return J[0]*=255,J[1]*=255,J[2]*=255,J},ys.gl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(tn,[null].concat(z,["gl"])))},tn.prototype.gl=function(){var z=this._rgb;return[z[0]/255,z[1]/255,z[2]/255,z[3]]};var Ln=g.unpack,On=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Ln(z,"rgb"),se=J[0],he=J[1],pe=J[2],ue=Math.min(se,he,pe),xe=Math.max(se,he,pe),we=xe-ue,$e=we*100/255,Be=ue/(255-we)*100,st;return we===0?st=Number.NaN:(se===xe&&(st=(he-pe)/we),he===xe&&(st=2+(pe-se)/we),pe===xe&&(st=4+(se-he)/we),st*=60,st<0&&(st+=360)),[st,$e,Be]},Qn=On,ye=g.unpack,Se=Math.floor,Ae=function(){for(var z,W,J,se,he,pe,ue=[],xe=arguments.length;xe--;)ue[xe]=arguments[xe];ue=ye(ue,"hcg");var we=ue[0],$e=ue[1],Be=ue[2],st,We,mt;Be=Be*255;var ft=$e*255;if($e===0)st=We=mt=Be;else{we===360&&(we=0),we>360&&(we-=360),we<0&&(we+=360),we/=60;var Wt=Se(we),Xt=we-Wt,cr=Be*(1-$e),wr=cr+ft*(1-Xt),ii=cr+ft*Xt,zn=cr+ft;switch(Wt){case 0:z=[zn,ii,cr],st=z[0],We=z[1],mt=z[2];break;case 1:W=[wr,zn,cr],st=W[0],We=W[1],mt=W[2];break;case 2:J=[cr,zn,ii],st=J[0],We=J[1],mt=J[2];break;case 3:se=[cr,wr,zn],st=se[0],We=se[1],mt=se[2];break;case 4:he=[ii,cr,zn],st=he[0],We=he[1],mt=he[2];break;case 5:pe=[zn,cr,wr],st=pe[0],We=pe[1],mt=pe[2];break}}return[st,We,mt,ue.length>3?ue[3]:1]},Ue=Ae,tt=g.unpack,Tt=g.type,vt=A,ot=w,xt=y,Ct=Qn;ot.prototype.hcg=function(){return Ct(this._rgb)},vt.hcg=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(ot,[null].concat(z,["hcg"])))},xt.format.hcg=Ue,xt.autodetect.push({p:1,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=tt(z,"hcg"),Tt(z)==="array"&&z.length===3)return"hcg"}});var Lr=g.unpack,Or=g.last,ct=Math.round,Kt=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Lr(z,"rgba"),se=J[0],he=J[1],pe=J[2],ue=J[3],xe=Or(z)||"auto";ue===void 0&&(ue=1),xe==="auto"&&(xe=ue<1?"rgba":"rgb"),se=ct(se),he=ct(he),pe=ct(pe);var we=se<<16|he<<8|pe,$e="000000"+we.toString(16);$e=$e.substr($e.length-6);var Be="0"+ct(ue*255).toString(16);switch(Be=Be.substr(Be.length-2),xe.toLowerCase()){case"rgba":return"#"+$e+Be;case"argb":return"#"+Be+$e;default:return"#"+$e}},or=Kt,Mi=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Tn=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,$n=function(z){if(z.match(Mi)){(z.length===4||z.length===7)&&(z=z.substr(1)),z.length===3&&(z=z.split(""),z=z[0]+z[0]+z[1]+z[1]+z[2]+z[2]);var W=parseInt(z,16),J=W>>16,se=W>>8&255,he=W&255;return[J,se,he,1]}if(z.match(Tn)){(z.length===5||z.length===9)&&(z=z.substr(1)),z.length===4&&(z=z.split(""),z=z[0]+z[0]+z[1]+z[1]+z[2]+z[2]+z[3]+z[3]);var pe=parseInt(z,16),ue=pe>>24&255,xe=pe>>16&255,we=pe>>8&255,$e=Math.round((pe&255)/255*100)/100;return[ue,xe,we,$e]}throw new Error("unknown hex color: "+z)},Ur=$n,ei=A,rt=w,fe=g.type,Le=y,it=or;rt.prototype.hex=function(z){return it(this._rgb,z)},ei.hex=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(rt,[null].concat(z,["hex"])))},Le.format.hex=Ur,Le.autodetect.push({p:4,test:function(z){for(var W=[],J=arguments.length-1;J-- >0;)W[J]=arguments[J+1];if(!W.length&&fe(z)==="string"&&[3,4,5,6,7,8,9].indexOf(z.length)>=0)return"hex"}});var Qe=g.unpack,Bt=g.TWOPI,Jt=Math.min,Gt=Math.sqrt,Wr=Math.acos,xi=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Qe(z,"rgb"),se=J[0],he=J[1],pe=J[2];se/=255,he/=255,pe/=255;var ue,xe=Jt(se,he,pe),we=(se+he+pe)/3,$e=we>0?1-xe/we:0;return $e===0?ue=NaN:(ue=(se-he+(se-pe))/2,ue/=Gt((se-he)*(se-he)+(se-pe)*(he-pe)),ue=Wr(ue),pe>he&&(ue=Bt-ue),ue/=Bt),[ue*360,$e,we]},zr=xi,xa=g.unpack,Zi=g.limit,ti=g.TWOPI,Qi=g.PITHIRD,zo=Math.cos,zf=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=xa(z,"hsi");var J=z[0],se=z[1],he=z[2],pe,ue,xe;return isNaN(J)&&(J=0),isNaN(se)&&(se=0),J>360&&(J-=360),J<0&&(J+=360),J/=360,J<1/3?(xe=(1-se)/3,pe=(1+se*zo(ti*J)/zo(Qi-ti*J))/3,ue=1-(xe+pe)):J<2/3?(J-=1/3,pe=(1-se)/3,ue=(1+se*zo(ti*J)/zo(Qi-ti*J))/3,xe=1-(pe+ue)):(J-=2/3,ue=(1-se)/3,xe=(1+se*zo(ti*J)/zo(Qi-ti*J))/3,pe=1-(ue+xe)),pe=Zi(he*pe*3),ue=Zi(he*ue*3),xe=Zi(he*xe*3),[pe*255,ue*255,xe*255,z.length>3?z[3]:1]},Hf=zf,fl=g.unpack,bh=g.type,pl=A,xh=w,Ho=y,wh=zr;xh.prototype.hsi=function(){return wh(this._rgb)},pl.hsi=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(xh,[null].concat(z,["hsi"])))},Ho.format.hsi=Hf,Ho.autodetect.push({p:2,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=fl(z,"hsi"),bh(z)==="array"&&z.length===3)return"hsi"}});var Ru=g.unpack,Uf=g.type,ml=A,Sh=w,wa=y,Sa=me;Sh.prototype.hsl=function(){return Sa(this._rgb)},ml.hsl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(Sh,[null].concat(z,["hsl"])))},wa.format.hsl=ge,wa.autodetect.push({p:2,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=Ru(z,"hsl"),Uf(z)==="array"&&z.length===3)return"hsl"}});var Bu=g.unpack,Wf=Math.min,es=Math.max,gl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=Bu(z,"rgb");var J=z[0],se=z[1],he=z[2],pe=Wf(J,se,he),ue=es(J,se,he),xe=ue-pe,we,$e,Be;return Be=ue/255,ue===0?(we=Number.NaN,$e=0):($e=xe/ue,J===ue&&(we=(se-he)/xe),se===ue&&(we=2+(he-J)/xe),he===ue&&(we=4+(J-se)/xe),we*=60,we<0&&(we+=360)),[we,$e,Be]},Uo=gl,Vf=g.unpack,wt=Math.floor,Bs=function(){for(var z,W,J,se,he,pe,ue=[],xe=arguments.length;xe--;)ue[xe]=arguments[xe];ue=Vf(ue,"hsv");var we=ue[0],$e=ue[1],Be=ue[2],st,We,mt;if(Be*=255,$e===0)st=We=mt=Be;else{we===360&&(we=0),we>360&&(we-=360),we<0&&(we+=360),we/=60;var ft=wt(we),Wt=we-ft,Xt=Be*(1-$e),cr=Be*(1-$e*Wt),wr=Be*(1-$e*(1-Wt));switch(ft){case 0:z=[Be,wr,Xt],st=z[0],We=z[1],mt=z[2];break;case 1:W=[cr,Be,Xt],st=W[0],We=W[1],mt=W[2];break;case 2:J=[Xt,Be,wr],st=J[0],We=J[1],mt=J[2];break;case 3:se=[Xt,cr,Be],st=se[0],We=se[1],mt=se[2];break;case 4:he=[wr,Xt,Be],st=he[0],We=he[1],mt=he[2];break;case 5:pe=[Be,Xt,cr],st=pe[0],We=pe[1],mt=pe[2];break}}return[st,We,mt,ue.length>3?ue[3]:1]},Dh=Bs,Gf=g.unpack,qf=g.type,Kf=A,Eh=w,Rn=y,vs=Uo;Eh.prototype.hsv=function(){return vs(this._rgb)},Kf.hsv=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(Eh,[null].concat(z,["hsv"])))},Rn.format.hsv=Dh,Rn.autodetect.push({p:2,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=Gf(z,"hsv"),qf(z)==="array"&&z.length===3)return"hsv"}});var bs={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},xs=bs,Jf=g.unpack,yl=Math.pow,Xf=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Jf(z,"rgb"),se=J[0],he=J[1],pe=J[2],ue=Ch(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2],Be=116*we-16;return[Be<0?0:Be,500*(xe-we),200*(we-$e)]},Da=function(z){return(z/=255)<=.04045?z/12.92:yl((z+.055)/1.055,2.4)},vl=function(z){return z>xs.t3?yl(z,1/3):z/xs.t2+xs.t0},Ch=function(z,W,J){z=Da(z),W=Da(W),J=Da(J);var se=vl((.4124564*z+.3575761*W+.1804375*J)/xs.Xn),he=vl((.2126729*z+.7151522*W+.072175*J)/xs.Yn),pe=vl((.0193339*z+.119192*W+.9503041*J)/xs.Zn);return[se,he,pe]},Wo=Xf,js=bs,ht=g.unpack,Yf=Math.pow,Th=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=ht(z,"lab");var J=z[0],se=z[1],he=z[2],pe,ue,xe,we,$e,Be;return ue=(J+16)/116,pe=isNaN(se)?ue:ue+se/500,xe=isNaN(he)?ue:ue-he/200,ue=js.Yn*ve(ue),pe=js.Xn*ve(pe),xe=js.Zn*ve(xe),we=ie(3.2404542*pe-1.5371385*ue-.4985314*xe),$e=ie(-.969266*pe+1.8760108*ue+.041556*xe),Be=ie(.0556434*pe-.2040259*ue+1.0572252*xe),[we,$e,Be,z.length>3?z[3]:1]},ie=function(z){return 255*(z<=.00304?12.92*z:1.055*Yf(z,1/2.4)-.055)},ve=function(z){return z>js.t1?z*z*z:js.t2*(z-js.t0)},Me=Th,lt=g.unpack,Cr=g.type,Lt=A,Rr=w,rn=y,bn=Wo;Rr.prototype.lab=function(){return bn(this._rgb)},Lt.lab=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(Rr,[null].concat(z,["lab"])))},rn.format.lab=Me,rn.autodetect.push({p:2,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=lt(z,"lab"),Cr(z)==="array"&&z.length===3)return"lab"}});var Hr=g.unpack,tr=g.RAD2DEG,gn=Math.sqrt,xn=Math.atan2,ri=Math.round,ni=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Hr(z,"lab"),se=J[0],he=J[1],pe=J[2],ue=gn(he*he+pe*pe),xe=(xn(pe,he)*tr+360)%360;return ri(ue*1e4)===0&&(xe=Number.NaN),[se,ue,xe]},ws=ni,ts=g.unpack,ho=Wo,bl=ws,xl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=ts(z,"rgb"),se=J[0],he=J[1],pe=J[2],ue=ho(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2];return bl(xe,we,$e)},wl=xl,Zf=g.unpack,xx=g.DEG2RAD,wx=Math.sin,Qf=Math.cos,Sx=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Zf(z,"lch"),se=J[0],he=J[1],pe=J[2];return isNaN(pe)&&(pe=0),pe=pe*xx,[se,Qf(pe)*he,wx(pe)*he]},Zg=Sx,Qg=g.unpack,Dx=Zg,Ex=Me,Cx=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=Qg(z,"lch");var J=z[0],se=z[1],he=z[2],pe=Dx(J,se,he),ue=pe[0],xe=pe[1],we=pe[2],$e=Ex(ue,xe,we),Be=$e[0],st=$e[1],We=$e[2];return[Be,st,We,z.length>3?z[3]:1]},ey=Cx,Tx=g.unpack,ju=ey,ty=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Tx(z,"hcl").reverse();return ju.apply(void 0,J)},Ax=ty,x=g.unpack,m=g.type,S=A,k=w,O=y,U=wl;k.prototype.lch=function(){return U(this._rgb)},k.prototype.hcl=function(){return U(this._rgb).reverse()},S.lch=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(k,[null].concat(z,["lch"])))},S.hcl=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(k,[null].concat(z,["hcl"])))},O.format.lch=ey,O.format.hcl=Ax,["lch","hcl"].forEach(function(z){return O.autodetect.push({p:2,test:function(){for(var W=[],J=arguments.length;J--;)W[J]=arguments[J];if(W=x(W,z),m(W)==="array"&&W.length===3)return z}})});var K={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},re=K,le=w,ae=y,Pe=g.type,Ve=re,at=Ur,nt=or;le.prototype.name=function(){for(var z=nt(this._rgb,"rgb"),W=0,J=Object.keys(Ve);W0;)W[J]=arguments[J+1];if(!W.length&&Pe(z)==="string"&&Ve[z.toLowerCase()])return"named"}});var xr=g.unpack,gr=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=xr(z,"rgb"),se=J[0],he=J[1],pe=J[2];return(se<<16)+(he<<8)+pe},wn=gr,Bn=g.type,Li=function(z){if(Bn(z)=="number"&&z>=0&&z<=16777215){var W=z>>16,J=z>>8&255,se=z&255;return[W,J,se,1]}throw new Error("unknown num color: "+z)},ep=Li,tp=A,J$=w,X$=y,HU=g.type,UU=wn;J$.prototype.num=function(){return UU(this._rgb)},tp.num=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(J$,[null].concat(z,["num"])))},X$.format.num=ep,X$.autodetect.push({p:5,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z.length===1&&HU(z[0])==="number"&&z[0]>=0&&z[0]<=16777215)return"num"}});var WU=A,kx=w,Y$=y,Z$=g.unpack,Q$=g.type,e2=Math.round;kx.prototype.rgb=function(z){return z===void 0&&(z=!0),z===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(e2)},kx.prototype.rgba=function(z){return z===void 0&&(z=!0),this._rgb.slice(0,4).map(function(W,J){return J<3?z===!1?W:e2(W):W})},WU.rgb=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(kx,[null].concat(z,["rgb"])))},Y$.format.rgb=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=Z$(z,"rgba");return J[3]===void 0&&(J[3]=1),J},Y$.autodetect.push({p:3,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=Z$(z,"rgba"),Q$(z)==="array"&&(z.length===3||z.length===4&&Q$(z[3])=="number"&&z[3]>=0&&z[3]<=1))return"rgb"}});var ry=Math.log,VU=function(z){var W=z/100,J,se,he;return W<66?(J=255,se=W<6?0:-155.25485562709179-.44596950469579133*(se=W-2)+104.49216199393888*ry(se),he=W<20?0:-254.76935184120902+.8274096064007395*(he=W-10)+115.67994401066147*ry(he)):(J=351.97690566805693+.114206453784165*(J=W-55)-40.25366309332127*ry(J),se=325.4494125711974+.07943456536662342*(se=W-50)-28.0852963507957*ry(se),he=255),[J,se,he,1]},t2=VU,GU=t2,qU=g.unpack,KU=Math.round,JU=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];for(var J=qU(z,"rgb"),se=J[0],he=J[2],pe=1e3,ue=4e4,xe=.4,we;ue-pe>xe;){we=(ue+pe)*.5;var $e=GU(we);$e[2]/$e[0]>=he/se?ue=we:pe=we}return KU(we)},XU=JU,_x=A,ny=w,$x=y,YU=XU;ny.prototype.temp=ny.prototype.kelvin=ny.prototype.temperature=function(){return YU(this._rgb)},_x.temp=_x.kelvin=_x.temperature=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(ny,[null].concat(z,["temp"])))},$x.format.temp=$x.format.kelvin=$x.format.temperature=t2;var ZU=g.unpack,Fx=Math.cbrt,QU=Math.pow,eW=Math.sign,tW=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=ZU(z,"rgb"),se=J[0],he=J[1],pe=J[2],ue=[Px(se/255),Px(he/255),Px(pe/255)],xe=ue[0],we=ue[1],$e=ue[2],Be=Fx(.4122214708*xe+.5363325363*we+.0514459929*$e),st=Fx(.2119034982*xe+.6806995451*we+.1073969566*$e),We=Fx(.0883024619*xe+.2817188376*we+.6299787005*$e);return[.2104542553*Be+.793617785*st-.0040720468*We,1.9779984951*Be-2.428592205*st+.4505937099*We,.0259040371*Be+.7827717662*st-.808675766*We]},r2=tW;function Px(z){var W=Math.abs(z);return W<.04045?z/12.92:(eW(z)||1)*QU((W+.055)/1.055,2.4)}var rW=g.unpack,iy=Math.pow,nW=Math.sign,iW=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=rW(z,"lab");var J=z[0],se=z[1],he=z[2],pe=iy(J+.3963377774*se+.2158037573*he,3),ue=iy(J-.1055613458*se-.0638541728*he,3),xe=iy(J-.0894841775*se-1.291485548*he,3);return[255*Ix(4.0767416621*pe-3.3077115913*ue+.2309699292*xe),255*Ix(-1.2684380046*pe+2.6097574011*ue-.3413193965*xe),255*Ix(-.0041960863*pe-.7034186147*ue+1.707614701*xe),z.length>3?z[3]:1]},n2=iW;function Ix(z){var W=Math.abs(z);return W>.0031308?(nW(z)||1)*(1.055*iy(W,1/2.4)-.055):z*12.92}var sW=g.unpack,oW=g.type,aW=A,i2=w,s2=y,lW=r2;i2.prototype.oklab=function(){return lW(this._rgb)},aW.oklab=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(i2,[null].concat(z,["oklab"])))},s2.format.oklab=n2,s2.autodetect.push({p:3,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=sW(z,"oklab"),oW(z)==="array"&&z.length===3)return"oklab"}});var uW=g.unpack,cW=r2,hW=ws,dW=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];var J=uW(z,"rgb"),se=J[0],he=J[1],pe=J[2],ue=cW(se,he,pe),xe=ue[0],we=ue[1],$e=ue[2];return hW(xe,we,$e)},fW=dW,pW=g.unpack,mW=Zg,gW=n2,yW=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];z=pW(z,"lch");var J=z[0],se=z[1],he=z[2],pe=mW(J,se,he),ue=pe[0],xe=pe[1],we=pe[2],$e=gW(ue,xe,we),Be=$e[0],st=$e[1],We=$e[2];return[Be,st,We,z.length>3?z[3]:1]},vW=yW,bW=g.unpack,xW=g.type,wW=A,o2=w,a2=y,SW=fW;o2.prototype.oklch=function(){return SW(this._rgb)},wW.oklch=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];return new(Function.prototype.bind.apply(o2,[null].concat(z,["oklch"])))},a2.format.oklch=vW,a2.autodetect.push({p:3,test:function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];if(z=bW(z,"oklch"),xW(z)==="array"&&z.length===3)return"oklch"}});var l2=w,DW=g.type;l2.prototype.alpha=function(z,W){return W===void 0&&(W=!1),z!==void 0&&DW(z)==="number"?W?(this._rgb[3]=z,this):new l2([this._rgb[0],this._rgb[1],this._rgb[2],z],"rgb"):this._rgb[3]};var EW=w;EW.prototype.clipped=function(){return this._rgb._clipped||!1};var zu=w,CW=bs;zu.prototype.darken=function(z){z===void 0&&(z=1);var W=this,J=W.lab();return J[0]-=CW.Kn*z,new zu(J,"lab").alpha(W.alpha(),!0)},zu.prototype.brighten=function(z){return z===void 0&&(z=1),this.darken(-z)},zu.prototype.darker=zu.prototype.darken,zu.prototype.brighter=zu.prototype.brighten;var TW=w;TW.prototype.get=function(z){var W=z.split("."),J=W[0],se=W[1],he=this[J]();if(se){var pe=J.indexOf(se)-(J.substr(0,2)==="ok"?2:0);if(pe>-1)return he[pe];throw new Error("unknown channel "+se+" in mode "+J)}else return he};var Ah=w,AW=g.type,kW=Math.pow,_W=1e-7,$W=20;Ah.prototype.luminance=function(z){if(z!==void 0&&AW(z)==="number"){if(z===0)return new Ah([0,0,0,this._rgb[3]],"rgb");if(z===1)return new Ah([255,255,255,this._rgb[3]],"rgb");var W=this.luminance(),J="rgb",se=$W,he=function(ue,xe){var we=ue.interpolate(xe,.5,J),$e=we.luminance();return Math.abs(z-$e)<_W||!se--?we:$e>z?he(ue,we):he(we,xe)},pe=(W>z?he(new Ah([0,0,0]),this):he(this,new Ah([255,255,255]))).rgb();return new Ah(pe.concat([this._rgb[3]]))}return FW.apply(void 0,this._rgb.slice(0,3))};var FW=function(z,W,J){return z=Nx(z),W=Nx(W),J=Nx(J),.2126*z+.7152*W+.0722*J},Nx=function(z){return z/=255,z<=.03928?z/12.92:kW((z+.055)/1.055,2.4)},Ss={},u2=w,c2=g.type,sy=Ss,h2=function(z,W,J){J===void 0&&(J=.5);for(var se=[],he=arguments.length-3;he-- >0;)se[he]=arguments[he+3];var pe=se[0]||"lrgb";if(!sy[pe]&&!se.length&&(pe=Object.keys(sy)[0]),!sy[pe])throw new Error("interpolation mode "+pe+" is not defined");return c2(z)!=="object"&&(z=new u2(z)),c2(W)!=="object"&&(W=new u2(W)),sy[pe](z,W,J).alpha(z.alpha()+J*(W.alpha()-z.alpha()))},d2=w,PW=h2;d2.prototype.mix=d2.prototype.interpolate=function(z,W){W===void 0&&(W=.5);for(var J=[],se=arguments.length-2;se-- >0;)J[se]=arguments[se+2];return PW.apply(void 0,[this,z,W].concat(J))};var f2=w;f2.prototype.premultiply=function(z){z===void 0&&(z=!1);var W=this._rgb,J=W[3];return z?(this._rgb=[W[0]*J,W[1]*J,W[2]*J,J],this):new f2([W[0]*J,W[1]*J,W[2]*J,J],"rgb")};var Mx=w,IW=bs;Mx.prototype.saturate=function(z){z===void 0&&(z=1);var W=this,J=W.lch();return J[1]+=IW.Kn*z,J[1]<0&&(J[1]=0),new Mx(J,"lch").alpha(W.alpha(),!0)},Mx.prototype.desaturate=function(z){return z===void 0&&(z=1),this.saturate(-z)};var p2=w,m2=g.type;p2.prototype.set=function(z,W,J){J===void 0&&(J=!1);var se=z.split("."),he=se[0],pe=se[1],ue=this[he]();if(pe){var xe=he.indexOf(pe)-(he.substr(0,2)==="ok"?2:0);if(xe>-1){if(m2(W)=="string")switch(W.charAt(0)){case"+":ue[xe]+=+W;break;case"-":ue[xe]+=+W;break;case"*":ue[xe]*=+W.substr(1);break;case"/":ue[xe]/=+W.substr(1);break;default:ue[xe]=+W}else if(m2(W)==="number")ue[xe]=W;else throw new Error("unsupported value for Color.set");var we=new p2(ue,he);return J?(this._rgb=we._rgb,this):we}throw new Error("unknown channel "+pe+" in mode "+he)}else return ue};var NW=w,MW=function(z,W,J){var se=z._rgb,he=W._rgb;return new NW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"rgb")};Ss.rgb=MW;var LW=w,Lx=Math.sqrt,kh=Math.pow,OW=function(z,W,J){var se=z._rgb,he=se[0],pe=se[1],ue=se[2],xe=W._rgb,we=xe[0],$e=xe[1],Be=xe[2];return new LW(Lx(kh(he,2)*(1-J)+kh(we,2)*J),Lx(kh(pe,2)*(1-J)+kh($e,2)*J),Lx(kh(ue,2)*(1-J)+kh(Be,2)*J),"rgb")};Ss.lrgb=OW;var RW=w,BW=function(z,W,J){var se=z.lab(),he=W.lab();return new RW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"lab")};Ss.lab=BW;var g2=w,_h=function(z,W,J,se){var he,pe,ue,xe;se==="hsl"?(ue=z.hsl(),xe=W.hsl()):se==="hsv"?(ue=z.hsv(),xe=W.hsv()):se==="hcg"?(ue=z.hcg(),xe=W.hcg()):se==="hsi"?(ue=z.hsi(),xe=W.hsi()):se==="lch"||se==="hcl"?(se="hcl",ue=z.hcl(),xe=W.hcl()):se==="oklch"&&(ue=z.oklch().reverse(),xe=W.oklch().reverse());var we,$e,Be,st,We,mt;(se.substr(0,1)==="h"||se==="oklch")&&(he=ue,we=he[0],Be=he[1],We=he[2],pe=xe,$e=pe[0],st=pe[1],mt=pe[2]);var ft,Wt,Xt,cr;return!isNaN(we)&&!isNaN($e)?($e>we&&$e-we>180?cr=$e-(we+360):$e180?cr=$e+360-we:cr=$e-we,Wt=we+J*cr):isNaN(we)?isNaN($e)?Wt=Number.NaN:(Wt=$e,(We==1||We==0)&&se!="hsv"&&(ft=st)):(Wt=we,(mt==1||mt==0)&&se!="hsv"&&(ft=Be)),ft===void 0&&(ft=Be+J*(st-Be)),Xt=We+J*(mt-We),se==="oklch"?new g2([Xt,ft,Wt],se):new g2([Wt,ft,Xt],se)},jW=_h,y2=function(z,W,J){return jW(z,W,J,"lch")};Ss.lch=y2,Ss.hcl=y2;var zW=w,HW=function(z,W,J){var se=z.num(),he=W.num();return new zW(se+J*(he-se),"num")};Ss.num=HW;var UW=_h,WW=function(z,W,J){return UW(z,W,J,"hcg")};Ss.hcg=WW;var VW=_h,GW=function(z,W,J){return VW(z,W,J,"hsi")};Ss.hsi=GW;var qW=_h,KW=function(z,W,J){return qW(z,W,J,"hsl")};Ss.hsl=KW;var JW=_h,XW=function(z,W,J){return JW(z,W,J,"hsv")};Ss.hsv=XW;var YW=w,ZW=function(z,W,J){var se=z.oklab(),he=W.oklab();return new YW(se[0]+J*(he[0]-se[0]),se[1]+J*(he[1]-se[1]),se[2]+J*(he[2]-se[2]),"oklab")};Ss.oklab=ZW;var QW=_h,eV=function(z,W,J){return QW(z,W,J,"oklch")};Ss.oklch=eV;var Ox=w,tV=g.clip_rgb,Rx=Math.pow,Bx=Math.sqrt,jx=Math.PI,v2=Math.cos,b2=Math.sin,rV=Math.atan2,nV=function(z,W,J){W===void 0&&(W="lrgb"),J===void 0&&(J=null);var se=z.length;J||(J=Array.from(new Array(se)).map(function(){return 1}));var he=se/J.reduce(function(Wt,Xt){return Wt+Xt});if(J.forEach(function(Wt,Xt){J[Xt]*=he}),z=z.map(function(Wt){return new Ox(Wt)}),W==="lrgb")return iV(z,J);for(var pe=z.shift(),ue=pe.get(W),xe=[],we=0,$e=0,Be=0;Be=360;)ft-=360;ue[mt]=ft}else ue[mt]=ue[mt]/xe[mt];return We/=se,new Ox(ue,W).alpha(We>.99999?1:We,!0)},iV=function(z,W){for(var J=z.length,se=[0,0,0,0],he=0;he.9999999&&(se[3]=1),new Ox(tV(se))},fo=A,$h=g.type,sV=Math.pow,zx=function(z){var W="rgb",J=fo("#ccc"),se=0,he=[0,1],pe=[],ue=[0,0],xe=!1,we=[],$e=!1,Be=0,st=1,We=!1,mt={},ft=!0,Wt=1,Xt=function(Ge){if(Ge=Ge||["#fff","#000"],Ge&&$h(Ge)==="string"&&fo.brewer&&fo.brewer[Ge.toLowerCase()]&&(Ge=fo.brewer[Ge.toLowerCase()]),$h(Ge)==="array"){Ge.length===1&&(Ge=[Ge[0],Ge[0]]),Ge=Ge.slice(0);for(var At=0;At=xe[qt];)qt++;return qt-1}return 0},wr=function(Ge){return Ge},ii=function(Ge){return Ge},zn=function(Ge,At){var qt,Vt;if(At==null&&(At=!1),isNaN(Ge)||Ge===null)return J;if(At)Vt=Ge;else if(xe&&xe.length>2){var si=cr(Ge);Vt=si/(xe.length-2)}else st!==Be?Vt=(Ge-Be)/(st-Be):Vt=1;Vt=ii(Vt),At||(Vt=wr(Vt)),Wt!==1&&(Vt=sV(Vt,Wt)),Vt=ue[0]+Vt*(1-ue[0]-ue[1]),Vt=Math.min(1,Math.max(0,Vt));var Vr=Math.floor(Vt*1e4);if(ft&&mt[Vr])qt=mt[Vr];else{if($h(we)==="array")for(var hr=0;hr=Tr&&hr===pe.length-1){qt=we[hr];break}if(Vt>Tr&&Vt2){var hr=Ge.map(function(Ar,Ir){return Ir/(Ge.length-1)}),Tr=Ge.map(function(Ar){return(Ar-Be)/(st-Be)});Tr.every(function(Ar,Ir){return hr[Ir]===Ar})||(ii=function(Ar){if(Ar<=0||Ar>=1)return Ar;for(var Ir=0;Ar>=Tr[Ir+1];)Ir++;var mo=(Ar-Tr[Ir])/(Tr[Ir+1]-Tr[Ir]),El=hr[Ir]+mo*(hr[Ir+1]-hr[Ir]);return El})}}return he=[Be,st],ar},ar.mode=function(Ge){return arguments.length?(W=Ge,rs(),ar):W},ar.range=function(Ge,At){return Xt(Ge),ar},ar.out=function(Ge){return $e=Ge,ar},ar.spread=function(Ge){return arguments.length?(se=Ge,ar):se},ar.correctLightness=function(Ge){return Ge==null&&(Ge=!0),We=Ge,rs(),We?wr=function(At){for(var qt=zn(0,!0).lab()[0],Vt=zn(1,!0).lab()[0],si=qt>Vt,Vr=zn(At,!0).lab()[0],hr=qt+(Vt-qt)*At,Tr=Vr-hr,Ar=0,Ir=1,mo=20;Math.abs(Tr)>.01&&mo-- >0;)(function(){return si&&(Tr*=-1),Tr<0?(Ar=At,At+=(Ir-At)*.5):(Ir=At,At+=(Ar-At)*.5),Vr=zn(At,!0).lab()[0],Tr=Vr-hr})();return At}:wr=function(At){return At},ar},ar.padding=function(Ge){return Ge!=null?($h(Ge)==="number"&&(Ge=[Ge,Ge]),ue=Ge,ar):ue},ar.colors=function(Ge,At){arguments.length<2&&(At="hex");var qt=[];if(arguments.length===0)qt=we.slice(0);else if(Ge===1)qt=[ar(.5)];else if(Ge>1){var Vt=he[0],si=he[1]-Vt;qt=oV(0,Ge,!1).map(function(Ir){return ar(Vt+Ir/(Ge-1)*si)})}else{z=[];var Vr=[];if(xe&&xe.length>2)for(var hr=1,Tr=xe.length,Ar=1<=Tr;Ar?hrTr;Ar?hr++:hr--)Vr.push((xe[hr-1]+xe[hr])*.5);else Vr=he;qt=Vr.map(function(Ir){return ar(Ir)})}return fo[At]&&(qt=qt.map(function(Ir){return Ir[At]()})),qt},ar.cache=function(Ge){return Ge!=null?(ft=Ge,ar):ft},ar.gamma=function(Ge){return Ge!=null?(Wt=Ge,ar):Wt},ar.nodata=function(Ge){return Ge!=null?(J=fo(Ge),ar):J},ar};function oV(z,W,J){for(var se=[],he=zpe;he?ue++:ue--)se.push(ue);return se}var rp=w,aV=zx,lV=function(z){for(var W=[1,1],J=1;J=5){var $e,Be,st;$e=z.map(function(We){return We.lab()}),st=z.length-1,Be=lV(st),he=function(We){var mt=1-We,ft=[0,1,2].map(function(Wt){return $e.reduce(function(Xt,cr,wr){return Xt+Be[wr]*Math.pow(mt,st-wr)*Math.pow(We,wr)*cr[Wt]},0)});return new rp(ft,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return he},cV=function(z){var W=uV(z);return W.scale=function(){return aV(W)},W},Hx=A,po=function(z,W,J){if(!po[J])throw new Error("unknown blend mode "+J);return po[J](z,W)},Sl=function(z){return function(W,J){var se=Hx(J).rgb(),he=Hx(W).rgb();return Hx.rgb(z(se,he))}},Dl=function(z){return function(W,J){var se=[];return se[0]=z(W[0],J[0]),se[1]=z(W[1],J[1]),se[2]=z(W[2],J[2]),se}},hV=function(z){return z},dV=function(z,W){return z*W/255},fV=function(z,W){return z>W?W:z},pV=function(z,W){return z>W?z:W},mV=function(z,W){return 255*(1-(1-z/255)*(1-W/255))},gV=function(z,W){return W<128?2*z*W/255:255*(1-2*(1-z/255)*(1-W/255))},yV=function(z,W){return 255*(1-(1-W/255)/(z/255))},vV=function(z,W){return z===255?255:(z=255*(W/255)/(1-z/255),z>255?255:z)};po.normal=Sl(Dl(hV)),po.multiply=Sl(Dl(dV)),po.screen=Sl(Dl(mV)),po.overlay=Sl(Dl(gV)),po.darken=Sl(Dl(fV)),po.lighten=Sl(Dl(pV)),po.dodge=Sl(Dl(vV)),po.burn=Sl(Dl(yV));for(var bV=po,Ux=g.type,xV=g.clip_rgb,wV=g.TWOPI,SV=Math.pow,DV=Math.sin,EV=Math.cos,x2=A,CV=function(z,W,J,se,he){z===void 0&&(z=300),W===void 0&&(W=-1.5),J===void 0&&(J=1),se===void 0&&(se=1),he===void 0&&(he=[0,1]);var pe=0,ue;Ux(he)==="array"?ue=he[1]-he[0]:(ue=0,he=[he,he]);var xe=function(we){var $e=wV*((z+120)/360+W*we),Be=SV(he[0]+ue*we,se),st=pe!==0?J[0]+we*pe:J,We=st*Be*(1-Be)/2,mt=EV($e),ft=DV($e),Wt=Be+We*(-.14861*mt+1.78277*ft),Xt=Be+We*(-.29227*mt-.90649*ft),cr=Be+We*(1.97294*mt);return x2(xV([Wt*255,Xt*255,cr*255,1]))};return xe.start=function(we){return we==null?z:(z=we,xe)},xe.rotations=function(we){return we==null?W:(W=we,xe)},xe.gamma=function(we){return we==null?se:(se=we,xe)},xe.hue=function(we){return we==null?J:(J=we,Ux(J)==="array"?(pe=J[1]-J[0],pe===0&&(J=J[1])):pe=0,xe)},xe.lightness=function(we){return we==null?he:(Ux(we)==="array"?(he=we,ue=we[1]-we[0]):(he=[we,we],ue=0),xe)},xe.scale=function(){return x2.scale(xe)},xe.hue(J),xe},TV=w,AV="0123456789abcdef",kV=Math.floor,_V=Math.random,$V=function(){for(var z="#",W=0;W<6;W++)z+=AV.charAt(kV(_V()*16));return new TV(z,"hex")},Wx=c,w2=Math.log,FV=Math.pow,PV=Math.floor,IV=Math.abs,S2=function(z,W){W===void 0&&(W=null);var J={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Wx(z)==="object"&&(z=Object.values(z)),z.forEach(function(se){W&&Wx(se)==="object"&&(se=se[W]),se!=null&&!isNaN(se)&&(J.values.push(se),J.sum+=se,seJ.max&&(J.max=se),J.count+=1)}),J.domain=[J.min,J.max],J.limits=function(se,he){return D2(J,se,he)},J},D2=function(z,W,J){W===void 0&&(W="equal"),J===void 0&&(J=7),Wx(z)=="array"&&(z=S2(z));var se=z.min,he=z.max,pe=z.values.sort(function(Gx,qx){return Gx-qx});if(J===1)return[se,he];var ue=[];if(W.substr(0,1)==="c"&&(ue.push(se),ue.push(he)),W.substr(0,1)==="e"){ue.push(se);for(var xe=1;xe 0");var we=Math.LOG10E*w2(se),$e=Math.LOG10E*w2(he);ue.push(se);for(var Be=1;Be200&&(ii=!1)}for(var Cl={},Fh=0;Fhse?(J+.05)/(se+.05):(se+.05)/(J+.05)},T2=w,Ea=Math.sqrt,An=Math.pow,MV=Math.min,LV=Math.max,A2=Math.atan2,k2=Math.abs,oy=Math.cos,_2=Math.sin,OV=Math.exp,$2=Math.PI,RV=function(z,W,J,se,he){J===void 0&&(J=1),se===void 0&&(se=1),he===void 0&&(he=1);var pe=function(Uu){return 360*Uu/(2*$2)},ue=function(Uu){return 2*$2*Uu/360};z=new T2(z),W=new T2(W);var xe=Array.from(z.lab()),we=xe[0],$e=xe[1],Be=xe[2],st=Array.from(W.lab()),We=st[0],mt=st[1],ft=st[2],Wt=(we+We)/2,Xt=Ea(An($e,2)+An(Be,2)),cr=Ea(An(mt,2)+An(ft,2)),wr=(Xt+cr)/2,ii=.5*(1-Ea(An(wr,7)/(An(wr,7)+An(25,7)))),zn=$e*(1+ii),rs=mt*(1+ii),ar=Ea(An(zn,2)+An(Be,2)),Ge=Ea(An(rs,2)+An(ft,2)),At=(ar+Ge)/2,qt=pe(A2(Be,zn)),Vt=pe(A2(ft,rs)),si=qt>=0?qt:qt+360,Vr=Vt>=0?Vt:Vt+360,hr=k2(si-Vr)>180?(si+Vr+360)/2:(si+Vr)/2,Tr=1-.17*oy(ue(hr-30))+.24*oy(ue(2*hr))+.32*oy(ue(3*hr+6))-.2*oy(ue(4*hr-63)),Ar=Vr-si;Ar=k2(Ar)<=180?Ar:Vr<=si?Ar+360:Ar-360,Ar=2*Ea(ar*Ge)*_2(ue(Ar)/2);var Ir=We-we,mo=Ge-ar,El=1+.015*An(Wt-50,2)/Ea(20+An(Wt-50,2)),Cl=1+.045*At,Fh=1+.015*At*Tr,Ph=30*OV(-An((hr-275)/25,2)),Ca=2*Ea(An(At,7)/(An(At,7)+An(25,7))),Hu=-Ca*_2(2*ue(Ph)),np=Ea(An(Ir/(J*El),2)+An(mo/(se*Cl),2)+An(Ar/(he*Fh),2)+Hu*(mo/(se*Cl))*(Ar/(he*Fh)));return LV(0,MV(100,np))},F2=w,BV=function(z,W,J){J===void 0&&(J="lab"),z=new F2(z),W=new F2(W);var se=z.get(J),he=W.get(J),pe=0;for(var ue in se){var xe=(se[ue]||0)-(he[ue]||0);pe+=xe*xe}return Math.sqrt(pe)},jV=w,zV=function(){for(var z=[],W=arguments.length;W--;)z[W]=arguments[W];try{return new(Function.prototype.bind.apply(jV,[null].concat(z))),!0}catch{return!1}},P2=A,I2=zx,HV={cool:function(){return I2([P2.hsl(180,1,.9),P2.hsl(250,.7,.4)])},hot:function(){return I2(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ay={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Vx=0,N2=Object.keys(ay);Vx{const n=(t?e:e.reverse()).find(i=>Dn.contrast(Dn.hex(i.hex),Dn.hex((r==null?void 0:r.hex)||"#ff69b4"))>=3);return(n==null?void 0:n.hex)||"#ff69b4"},Hd=(e,t,r=g0)=>{const n=[];try{return r.forEach((i,s)=>{const o=new Ke;o.hex=t,o.hexToHsluv();const l={hex:"",saturation:o.hsluv_s,hue:o.hsluv_h,luminance:e==="neutral"&&s===r.length-1?100:i};o.hsluv_l=l.luminance,o.hsluvToHex(),l.hex=o.hex,n.push(l)}),[...n.sort((i,s)=>i.luminance>s.luminance?1:i.luminance({...i,index:s}))]}catch{return console.warn("Missing color",t),n}},Yb="/theme-builder/main",Jm=e=>e.startsWith("data:image")?e:`${Yb}/assets/images/${e||"peace-in-a-box.svg"}`,y4=e=>Dn.valid(e),Aie=e=>Dn.valid(e)?Dn.hex(e).luminance():-1,v4=(e,t)=>Dn.valid(e)&&Dn.valid(t)?Dn.contrast(e,t):-1,Qc=e=>!["neutral","informational","successful","warning","critical"].includes(e),ln=(e,t,r)=>{try{return e.replace(/-/g," ").split(" ").map((n,i)=>(t&&i===0?n[0]:n[0].toUpperCase())+n.substring(1,n.length)).join(r||"")}catch(n){console.error(n)}return"ERROR"},$r="db",Ku=(e,t)=>{let r="";for(const[n,i]of Object.entries(e))r+=`${n}: ${i}; +`;return t?`:root{${r}}`:r},kie=["opacity","elevation","transition","font"],_ie=e=>e[0]==="font"&&e[1]==="family"||e[0]!=="font",b4=(e,t)=>{const r={};return $c(e).forEach(function(n){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="colors"&&this.path[0]!=="additionalColors"&&this.path[0]!=="customColors"&&this.path[0]!=="branding"&&_ie(this.path)&&!this.path.includes("_scale")){const i=`--${$r}-${this.path.map(s=>s.toLowerCase()).map(s=>s==="lineheight"?"line-height":s==="fontsize"?"font-size":s).join("-")}`;if(r[i]=!kie.includes(this.path[0])&&(typeof n=="string"||n instanceof String)?`${n}rem`:n,this.path.at(-1)==="fontSize"){const s=[...this.path];s[s.length-1]="lineHeight";const o=Number(n),l=Number($c(e).get(s)),a=this.path.filter(u=>u!=="typography"&&u!=="fontSize").join("-"),c=o*l;r[`--${$r}-base-icon-weight-${a}`]=c*16,r[`--${$r}-base-icon-font-size-${a}`]=`${c}rem`}}}),t?Ku(r):r},$ie=e=>`:root{ ${b4(e,!0)} } `,LI=(e,t,r)=>`:root{ @@ -162,10 +162,10 @@ Error generating stack: `+s.message+` [data-color-scheme="dark"] { ${r} } - `,x4=(e,t)=>Object.entries(e).map(r=>{const n=r[0],i=r[1],s=Hd(n,i,t);return{[n]:s}}).reduce((r,n)=>({...r,...n}),{}),_k=(e,t,r,n)=>{const i=r[n];if(!i)return{lightOrigin:void 0,darkOrigin:void 0};const s=i.dark?e[n]:i.hex,o=i.dark?i.hex:e[n],a=OI(s,!1,t),l=OI(o,!0,t);return{lightOrigin:a,darkOrigin:l}},CC=(e,t,r)=>{const n=x4(e,t),i={};return Object.entries(n).forEach(s=>{const o=s[0];if(s[1].forEach(l=>{i[`--${$r}-${o}-${l.index??l.name}`]=l.hex}),Qc(o)){const{lightOrigin:l,darkOrigin:c}=_k(e,t,r,o);l&&c&&(i[`--${$r}-${o}-on-pressed-light`]=l.onColorPressed,i[`--${$r}-${o}-on-hover-light`]=l.onColorHover,i[`--${$r}-${o}-on-light`]=l.onColor,i[`--${$r}-${o}-origin-light`]=l.color,i[`--${$r}-${o}-hover-light`]=l.hoverColor,i[`--${$r}-${o}-pressed-light`]=l.pressedColor,i[`--${$r}-${o}-on-pressed-dark`]=c.onColorPressed,i[`--${$r}-${o}-on-hover-dark`]=c.onColorHover,i[`--${$r}-${o}-on-dark`]=c.onColor,i[`--${$r}-${o}-origin-dark`]=c.color,i[`--${$r}-${o}-hover-dark`]=c.hoverColor,i[`--${$r}-${o}-pressed-dark`]=c.pressedColor)}}),i},My=5,OI=(e,t,r)=>{var g,y;const n=Hd("",e,r),i=new Ke;i.hex=e,i.hexToHsluv();const s=i.hsluv_l,o=v4("#fff",e)>=4.5,a=o?"#fff":"#000",l=((g=o?n.at(-2):n[2])==null?void 0:g.hex)||"#ff69b4",c=((y=o?n.at(-3):n[3])==null?void 0:y.hex)||"#ff69b4";let u,h;const d=t?b=>b>s+My:b=>bbb>s+My;let p=n.filter(b=>d(b.luminance));return p=t?p:p.reverse(),p.length>2&&(u=p[0].hex,h=p[1].hex),(!u||!h)&&(p=n.filter(b=>f(b.luminance)),p=t?p.reverse():p,p.length>2?(u=p[0].hex,h=p[1].hex):(u="#ff69b4",h="#ff69b4")),{color:e,onColor:a,onColorHover:l,onColorPressed:c,hoverColor:u,pressedColor:h}},Lp=(e,t,r)=>{let n={};return Object.entries(t).forEach(i=>{const s=i[0];if(Qc(s)){const o=r?"dark":"light";n={...n,[`--db-${s}-on-enabled`]:`var(--db-${s}-on-${o})`,[`--db-${s}-on-hover`]:`var(--db-${s}-on-hover-${o})`,[`--db-${s}-on-pressed`]:`var(--db-${s}-on-pressed-${o})`,[`--db-${s}-origin-enabled`]:`var(--db-${s}-origin-${o})`,[`--db-${s}-origin-hover`]:`var(--db-${s}-hover-${o})`,[`--db-${s}-origin-pressed`]:`var(--db-${s}-pressed-${o})`}}e.forEach(o=>{o.transparencyDark!==void 0||o.transparencyLight!==void 0?n[`--${$r}-${s}-${o.name}`]=`color-mix(in srgb, transparent ${r?o.transparencyDark:o.transparencyLight}%, var(--${$r}-${s}-${r?o.dark:o.light}))`:n[`--${$r}-${s}-${o.name}`]=`var(--${$r}-${s}-${r?o.dark:o.light})`})}),n},Fie=()=>{const{speakingNames:e,luminanceSteps:t,theme:r,darkMode:n}=pr(i=>i);return H.useEffect(()=>{const i={...r.colors,...r.customColors},s={...CC(i,t,r.branding.alternativeColors),...Lp(e,i,n),...b4(r)},o=document.getElementsByTagName("html");Array.from(o).forEach(a=>{a.setAttribute("style",Object.entries(s).map(l=>`${l[0]}:${l[1]};`).join(" "))})},[e,r,t,n]),z.jsxs(z.Fragment,{children:[z.jsx(uZ,{}),z.jsx(PJ,{})]})};function Pie(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),r=0;r()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}};function BI(e,t,r){e.loadNamespaces(t,w4(e,r))}function zI(e,t,r,n){typeof r=="string"&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,w4(e,n))}function Iie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=t.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(n,e)&&(!i||o(s,e)))}function Nie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(TC("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):Iie(e,t,r)}const Mie=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Lie={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Oie=e=>Lie[e],Rie=e=>e.replace(Mie,Oie);let AC={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rie};function Bie(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};AC={...AC,...e}}function zie(){return AC}let S4;function jie(e){S4=e}function Hie(){return S4}const Uie={type:"3rdParty",init(e){Bie(e.options.react),jie(e)}},Wie=H.createContext();class Vie{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Gie=(e,t)=>{const r=H.useRef();return H.useEffect(()=>{r.current=t?r.current:e},[e,t]),r.current};function D4(e,t,r,n){return e.getFixedT(t,r,n)}function qie(e,t,r,n){return H.useCallback(D4(e,t,r,n),[e,t,r,n])}function mr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=t,{i18n:n,defaultNS:i}=H.useContext(Wie)||{},s=r||n||Hie();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Vie),!s){TC("You will need to pass in an i18next instance by using initReactI18next");const D=(w,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(w)?w[w.length-1]:w,C=[D,{},!1];return C.t=D,C.i18n={},C.ready=!1,C}s.options.react&&s.options.react.wait!==void 0&&TC("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...zie(),...s.options.react,...t},{useSuspense:a,keyPrefix:l}=o;let c=e||i||s.options&&s.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(c);const u=(s.isInitialized||s.initializedStoreOnce)&&c.every(D=>Nie(D,s,o)),h=qie(s,t.lng||null,o.nsMode==="fallback"?c:c[0],l),d=()=>h,f=()=>D4(s,t.lng||null,o.nsMode==="fallback"?c:c[0],l),[p,g]=H.useState(d);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const b=Gie(y),v=H.useRef(!0);H.useEffect(()=>{const{bindI18n:D,bindI18nStore:C}=o;v.current=!0,!u&&!a&&(t.lng?zI(s,t.lng,c,()=>{v.current&&g(f)}):BI(s,c,()=>{v.current&&g(f)})),u&&b&&b!==y&&v.current&&g(f);function w(){v.current&&g(f)}return D&&s&&s.on(D,w),C&&s&&s.store.on(C,w),()=>{v.current=!1,D&&s&&D.split(" ").forEach(T=>s.off(T,w)),C&&s&&C.split(" ").forEach(T=>s.store.off(T,w))}},[s,y]),H.useEffect(()=>{v.current&&u&&g(d)},[s,l,u]);const E=[p,s,u];if(E.t=p,E.i18n=s,E.ready=u,u||!u&&!a)return E;throw new Promise(D=>{t.lng?zI(s,t.lng,c,()=>D()):BI(s,c,()=>D())})}const Kie=()=>{const{t:e}=mr(),{resetDefaults:t}=pr(n=>n),r=X5();return z.jsx("div",{className:"w-[100vw] h-[100vh] flex",children:z.jsxs("div",{className:"m-auto flex flex-col gap-fix-md",children:[z.jsx(Mr,{semantic:"critical",icon:"quiet_zone",children:e("errorMessage")}),z.jsx(Ot,{className:"mx-auto",size:"small",icon:"undo",onClick:()=>{t(),r(0)},children:e("reset")})]})})},Jie={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 _0{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||Jie,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[a,l]=o;for(let c=0;c{let[a,l]=o;for(let c=0;c{e=n,t=i});return r.resolve=e,r.reject=t,r}function jI(e){return e==null?"":""+e}function Xie(e,t,r){e.forEach(n=>{t[n]&&(r[n]=t[n])})}const Yie=/###/g;function am(e,t,r){function n(a){return a&&a.indexOf("###")>-1?a.replace(Yie,"."):a}function i(){return!e||typeof e=="string"}const s=typeof t!="string"?t:t.split(".");let o=0;for(;o":">",'"':""","'":"'","/":"/"};function tse(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>ese[t]):e}class rse{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const nse=[" ",",","?","!",";"],ise=new rse(20);function sse(e,t,r){t=t||"",r=r||"";const n=nse.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=ise.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s}function kC(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let s=0;s-1&&l0?e.replace("_","-"):e}class UI extends Zb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,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 r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,r],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&s?a.push(...n.split(s)):a.push(n)));const l=$0(this.data,a);return!l&&!r&&!n&&t.indexOf(".")>-1&&(t=a[0],r=a[1],n=a.slice(2).join(".")),l||!o||typeof n!="string"?l:kC(this.data&&this.data[t]&&this.data[t][r],n,s)}addResource(t,r,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[t,r];n&&(a=a.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(a=t.split("."),i=r,r=a[1]),this.addNamespaces(r),HI(this.data,a,i),s.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(typeof n[s]=="string"||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,r];t.indexOf(".")>-1&&(a=t.split("."),i=n,n=r,r=a[1]),this.addNamespaces(r);let l=$0(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?E4(l,n,s):l={...l,...n},HI(this.data,a,l),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var C4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,r,n,i))}),t}};const WI={};class P0 extends Zb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Xie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!sse(t,n,i);if(o&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:s};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],r),l=a[a.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const D=r.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${D}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${D}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:o}const h=this.resolve(t,r);let d=h&&h.res;const f=h&&h.usedKey||o,p=h&&h.exactUsedKey||o,g=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(g)<0&&!(typeof b=="string"&&Array.isArray(d))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...r,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=D,h.usedParams=this.getUsedParamsDetails(r),h):D}if(s){const D=Array.isArray(d),C=D?[]:{},w=D?p:f;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const A=`${w}${s}${T}`;C[T]=this.translate(A,{...r,joinArrays:!1,ns:a}),C[T]===A&&(C[T]=d[T])}d=C}}else if(v&&typeof b=="string"&&Array.isArray(d))d=d.join(b),d&&(d=this.extendTranslation(d,t,r,n));else{let D=!1,C=!1;const w=r.count!==void 0&&typeof r.count!="string",T=P0.hasDefaultValue(r),A=w?this.pluralResolver.getSuffix(c,r.count,r):"",$=r.ordinal&&w?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",I=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),N=I&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${A}`]||r[`defaultValue${$}`]||r.defaultValue;!this.isValidLookup(d)&&T&&(D=!0,d=N),this.isValidLookup(d)||(C=!0,d=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,P=T&&N!==d&&this.options.updateMissing;if(C||D||P){if(this.logger.log(P?"updateKey":"missingKey",c,l,o,P?N:d),s){const R=this.resolve(o,{...r,keySeparator:!1});R&&R.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 _=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let R=0;R{const ee=T&&q!==d?q:F;this.options.missingKeyHandler?this.options.missingKeyHandler(R,l,G,ee,P,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,l,G,ee,P,r),this.emit("missingKey",R,l,G,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?_.forEach(R=>{const G=this.pluralResolver.getSuffixes(R,r);I&&r[`defaultValue${this.options.pluralSeparator}zero`]&&G.indexOf(`${this.options.pluralSeparator}zero`)<0&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(q=>{B([R],o+q,r[`defaultValue${q}`]||N)})}):B(_,o,N))}d=this.extendTranslation(d,t,r,h,n),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(C||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,D?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(r),h):d}extendTranslation(t,r,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=typeof t=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const d=t.match(this.interpolator.nestingRegexp);u=d&&d.length}let h=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,n.lng||this.language,n),c){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;u1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return typeof t=="string"&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;i=u;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=r.count!==void 0&&typeof r.count!="string",f=d&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(y=>{this.isValidLookup(n)||(a=y,!WI[`${g[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(WI[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),g.forEach(b=>{if(this.isValidLookup(n))return;o=b;const v=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,u,b,y,r);else{let D;d&&(D=this.pluralResolver.getSuffix(b,r.count,r));const C=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(u+D),r.ordinal&&D.indexOf(w)===0&&v.push(u+D.replace(w,this.options.pluralSeparator)),f&&v.push(u+C)),p){const T=`${u}${this.options.contextSeparator}${r.context}`;v.push(T),d&&(v.push(T+D),r.ordinal&&D.indexOf(w)===0&&v.push(T+D.replace(w,this.options.pluralSeparator)),f&&v.push(T+C))}}let E;for(;E=v.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(b,y,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&typeof t.replace!="string";let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of r)delete i[s]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}function GS(e){return e.charAt(0).toUpperCase()+e.slice(1)}class VI{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zo.create("languageUtils")}getScriptPartFromCode(t){if(t=F0(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=F0(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=GS(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=GS(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=GS(n[2].toLowerCase()))),n.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 r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let ose=[{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}],ase={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const lse=["v1","v2","v3"],use=["v4"],GI={zero:0,one:1,two:2,few:3,many:4,other:5};function cse(){const e={};return ose.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:ase[t.fc]}})}),e}class hse{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Zo.create("pluralResolver"),(!this.options.compatibilityJSON||use.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=cse()}addRule(t,r){this.rules[t]=r}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(F0(t==="dev"?"en":t),{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>GI[i]-GI[s]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>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()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!lse.includes(this.options.compatibilityJSON)}}function qI(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Qie(e,t,r);return!s&&i&&typeof r=="string"&&(s=kC(e,r,n),s===void 0&&(s=kC(t,r,n))),s}class dse{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zo.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=r!==void 0?r:tse,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Oh(s):o||"{{",this.suffix=a?Oh(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?Oh(d):f||Oh("$t("),this.nestingSuffix=p?Oh(p):g||Oh(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"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,r,n,i){let s,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(p){return p.replace(/\$/g,"$$$$")}const u=p=>{if(p.indexOf(this.formatSeparator)<0){const v=qI(r,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,n,{...i,...r,interpolationkey:p}):v}const g=p.split(this.formatSeparator),y=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(qI(r,l,y,this.options.keySeparator,this.options.ignoreJSONStructure),b,n,{...i,...r,interpolationkey:y})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>c(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?c(this.escape(p)):c(p)}].forEach(p=>{for(a=0;s=p.regex.exec(t);){const g=s[1].trim();if(o=u(g),o===void 0)if(typeof h=="function"){const b=h(t,s,i);o=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(d){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=jI(o));const y=p.safeValue(o);if(t=t.replace(s[0],y),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=s[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function a(l,c){const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const h=l.split(new RegExp(`${u}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(f&&f.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l}for(;i=this.nestingRegexp.exec(t);){let l=[];o={...n},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=u.shift(),l=u,c=!0}if(s=r(a.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=jI(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),c&&(s=l.reduce((u,h)=>this.format(u,h,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}function fse(e){let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}}function Rh(e){const t={};return function(n,i,s){const o=i+JSON.stringify(s);let a=t[o];return a||(a=e(F0(i),s),t[o]=a),a(n)}}class pse{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zo.create("formatter"),this.options=t,this.formats={number:Rh((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return s=>i.format(s)}),currency:Rh((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return s=>i.format(s)}),datetime:Rh((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return s=>i.format(s)}),relativetime:Rh((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return s=>i.format(s,n.range||"day")}),list:Rh((r,n)=>{const i=new Intl.ListFormat(r,{...n});return s=>i.format(s)})},this.init(t)}init(t){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Rh(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:u}=fse(l);if(this.formats[c]){let h=a;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},f=d.locale||d.lng||i.locale||i.lng||n;h=this.formats[c](a,f,{...u,...i,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}function mse(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class gse extends Zb{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Zo.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(n,i.backend,i)}queueLoad(t,r,n,i){const s={},o={},a={},l={};return t.forEach(c=>{let u=!0;r.forEach(h=>{const d=`${c}|${h}`;!n.reload&&this.store.hasResourceBundle(c,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,u=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),l[h]===void 0&&(l[h]=!0)))}),u||(a[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,r,n){const i=t.split("|"),s=i[0],o=i[1];r&&this.emit("failedLoading",s,o,r),n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2;const a={};this.queue.forEach(l=>{Zie(l.loaded,[s],o),mse(l,t),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(h=>{a[c][h]===void 0&&(a[c][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&u&&i{this.read.call(this,t,r,n,i+1,s*2,o)},s);return}o(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(t,r);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,r,a)}prepareLoading(t,r){let n=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();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof r=="string"&&(r=[r]);const s=this.queueLoad(t,r,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${r}loaded namespace ${s} for language ${i}`,a),this.loaded(t,o,a)})}saveMissing(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,n,i,l):u=c(t,r,n,i),u&&typeof u.then=="function"?u.then(h=>a(null,h)).catch(a):a(null,u)}catch(u){a(u)}else c(t,r,n,i,a,l)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}function KI(){return{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:function(t){let r={};if(typeof t[1]=="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function JI(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ly(){}function yse(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}class Xm extends Zb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=JI(t),this.services={},this.logger=Zo,this.modules={external:[]},yse(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=KI();this.options={...i,...this.options,...JI(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function s(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Zo.init(s(this.modules.logger),this.options):Zo.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=pse);const h=new VI(this.options);this.store=new UI(this.options.resources,this.options);const d=this.services;d.logger=Zo,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new hse(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new dse(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new gse(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ly),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=gp(),c=()=>{const u=(h,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),l.resolve(d),n(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ly;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(t,r,n){const i=gp();return t||(t=this.languages),r||(r=this.options.ns),n||(n=Ly),this.services.backendConnector.reload(t,r,s=>{i.resolve(),n(s)}),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"&&C4.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 r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=gp();this.emit("languageChanging",t);const s=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(l,function(){return n.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{o(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,r,n){var i=this;const s=function(o,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),h=2;h`${l.keyPrefix}${d}${p}`):f=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,i.t(f,l)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}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 r=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 n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(r.precheck){const a=r.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(s,t)))}loadNamespaces(t,r){const n=gp();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=gp();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["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"],n=this.services&&this.services.languageUtils||new VI(KI());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Xm(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ly;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new Xm(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new UI(this.store.data,i),s.services.resourceStore=s.store),s.translator=new P0(s.services,i),s.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u"u"?"undefined":_C(XMLHttpRequest))==="object"}function vse(e){return!!e&&typeof e.then=="function"}function bse(e){return vse(e)?e:Promise.resolve(e)}function Op(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $C={exports:{}},Oy={exports:{}},XI;function xse(){return XI||(XI=1,function(e,t){var r={},n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof r<"u"&&r,i=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var l=typeof o<"u"&&o||typeof self<"u"&&self||typeof l<"u"&&l,c={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function u(M){return M&&DataView.prototype.isPrototypeOf(M)}if(c.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function f(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||M==="")throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function p(M){return typeof M!="string"&&(M=String(M)),M}function g(M){var B={next:function(){var R=M.shift();return{done:R===void 0,value:R}}};return c.iterable&&(B[Symbol.iterator]=function(){return B}),B}function y(M){this.map={},M instanceof y?M.forEach(function(B,R){this.append(R,B)},this):Array.isArray(M)?M.forEach(function(B){this.append(B[0],B[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(B){this.append(B,M[B])},this)}y.prototype.append=function(M,B){M=f(M),B=p(B);var R=this.map[M];this.map[M]=R?R+", "+B:B},y.prototype.delete=function(M){delete this.map[f(M)]},y.prototype.get=function(M){return M=f(M),this.has(M)?this.map[M]:null},y.prototype.has=function(M){return this.map.hasOwnProperty(f(M))},y.prototype.set=function(M,B){this.map[f(M)]=p(B)},y.prototype.forEach=function(M,B){for(var R in this.map)this.map.hasOwnProperty(R)&&M.call(B,this.map[R],R,this)},y.prototype.keys=function(){var M=[];return this.forEach(function(B,R){M.push(R)}),g(M)},y.prototype.values=function(){var M=[];return this.forEach(function(B){M.push(B)}),g(M)},y.prototype.entries=function(){var M=[];return this.forEach(function(B,R){M.push([R,B])}),g(M)},c.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function v(M){return new Promise(function(B,R){M.onload=function(){B(M.result)},M.onerror=function(){R(M.error)}})}function E(M){var B=new FileReader,R=v(B);return B.readAsArrayBuffer(M),R}function D(M){var B=new FileReader,R=v(B);return B.readAsText(M),R}function C(M){for(var B=new Uint8Array(M),R=new Array(B.length),G=0;G-1?B:M}function I(M,B){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B=B||{};var R=B.body;if(M instanceof I){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,B.headers||(this.headers=new y(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!R&&M._bodyInit!=null&&(R=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=B.credentials||this.credentials||"same-origin",(B.headers||!this.headers)&&(this.headers=new y(B.headers)),this.method=$(B.method||this.method||"GET"),this.mode=B.mode||this.mode||null,this.signal=B.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&R)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(R),(this.method==="GET"||this.method==="HEAD")&&(B.cache==="no-store"||B.cache==="no-cache")){var G=/([?&])_=[^&]*/;if(G.test(this.url))this.url=this.url.replace(G,"$1_="+new Date().getTime());else{var q=/\?/;this.url+=(q.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function N(M){var B=new FormData;return M.trim().split("&").forEach(function(R){if(R){var G=R.split("="),q=G.shift().replace(/\+/g," "),ee=G.join("=").replace(/\+/g," ");B.append(decodeURIComponent(q),decodeURIComponent(ee))}}),B}function L(M){var B=new y,R=M.replace(/\r?\n[\t ]+/g," ");return R.split("\r").map(function(G){return G.indexOf(` -`)===0?G.substr(1,G.length):G}).forEach(function(G){var q=G.split(":"),ee=q.shift().trim();if(ee){var Y=q.join(":").trim();B.append(ee,Y)}}),B}T.call(I.prototype);function F(M,B){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');B||(B={}),this.type="default",this.status=B.status===void 0?200:B.status,this.ok=this.status>=200&&this.status<300,this.statusText=B.statusText===void 0?"":""+B.statusText,this.headers=new y(B.headers),this.url=B.url||"",this._initBody(M)}T.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},F.error=function(){var M=new F(null,{status:0,statusText:""});return M.type="error",M};var P=[301,302,303,307,308];F.redirect=function(M,B){if(P.indexOf(B)===-1)throw new RangeError("Invalid status code");return new F(null,{status:B,headers:{location:M}})},a.DOMException=l.DOMException;try{new a.DOMException}catch{a.DOMException=function(B,R){this.message=B,this.name=R;var G=Error(B);this.stack=G.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function _(M,B){return new Promise(function(R,G){var q=new I(M,B);if(q.signal&&q.signal.aborted)return G(new a.DOMException("Aborted","AbortError"));var ee=new XMLHttpRequest;function Y(){ee.abort()}ee.onload=function(){var Q={status:ee.status,statusText:ee.statusText,headers:L(ee.getAllResponseHeaders()||"")};Q.url="responseURL"in ee?ee.responseURL:Q.headers.get("X-Request-URL");var te="response"in ee?ee.response:ee.responseText;setTimeout(function(){R(new F(te,Q))},0)},ee.onerror=function(){setTimeout(function(){G(new TypeError("Network request failed"))},0)},ee.ontimeout=function(){setTimeout(function(){G(new TypeError("Network request failed"))},0)},ee.onabort=function(){setTimeout(function(){G(new a.DOMException("Aborted","AbortError"))},0)};function X(Q){try{return Q===""&&l.location.href?l.location.href:Q}catch{return Q}}ee.open(q.method,X(q.url),!0),q.credentials==="include"?ee.withCredentials=!0:q.credentials==="omit"&&(ee.withCredentials=!1),"responseType"in ee&&(c.blob?ee.responseType="blob":c.arrayBuffer&&q.headers.get("Content-Type")&&q.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ee.responseType="arraybuffer")),B&&typeof B.headers=="object"&&!(B.headers instanceof y)?Object.getOwnPropertyNames(B.headers).forEach(function(Q){ee.setRequestHeader(Q,p(B.headers[Q]))}):q.headers.forEach(function(Q,te){ee.setRequestHeader(te,Q)}),q.signal&&(q.signal.addEventListener("abort",Y),ee.onreadystatechange=function(){ee.readyState===4&&q.signal.removeEventListener("abort",Y)}),ee.send(typeof q._bodyInit>"u"?null:q._bodyInit)})}return _.polyfill=!0,l.fetch||(l.fetch=_,l.Headers=y,l.Request=I,l.Response=F),a.Headers=y,a.Request=I,a.Response=F,a.fetch=_,a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}(Oy,Oy.exports)),Oy.exports}(function(e,t){var r={},n;if(typeof fetch=="function"&&(typeof r<"u"&&r.fetch?n=r.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Op<"u"&&typeof window>"u"){var i=n||xse();i.default&&(i=i.default),t.default=i,e.exports=t.default}})($C,$C.exports);var A4=$C.exports;const k4=uo(A4),YI=rA({__proto__:null,default:k4},[A4]);var Ei={};function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QI(e){for(var t=1;t"u"&&typeof Ei<"u"&&typeof Ei.process<"u"&&Ei.process.versions&&Ei.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(Ei.process.version,"; ").concat(Ei.process.platform," ").concat(Ei.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(n):t.requestOptions,a=QI({method:n?"POST":"GET",body:n?t.stringify(n):void 0,headers:s},tN?{}:o),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{eN(r,a,i,l)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(o).forEach(function(u){delete a[u]}),eN(r,a,i,l),tN=!0}catch(u){i(u)}}},Cse=function(t,r,n,i){n&&Fc(n)==="object"&&(n=FC("",n).slice(1)),t.queryStringParams&&(r=FC(r,t.queryStringParams));try{var s;Ym?s=new Ym:s=new I0("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",r,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(l){console&&console.log(l)}},Tse=function(t,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Ha&&r.indexOf("file:")!==0)return Ese(t,r,n,i);if(T4()||typeof ActiveXObject=="function")return Cse(t,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}function rN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qS(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ase(this,e),this.services=t,this.options=r,this.allOptions=n,this.type="backend",this.init(t,r,n)}return kse(e,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=qS(qS(qS({},$se()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);Ud(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,s,o){var a=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(r,i)),l=bse(l),l.then(function(c){if(!c)return o(null,{});var u=a.services.interpolator.interpolate(c,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(u,o,n,s)})}},{key:"loadUrl",value:function(r,n,i,s){var o=this,a=typeof i=="string"?[i]:i,l=typeof s=="string"?[s]:s,c=this.options.parseLoadPayload(a,l);this.options.request(this.options,r,c,function(u,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+r+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+r+"; status code: "+h.status,!1);if(!h&&u&&u.message&&u.message.indexOf("Failed to fetch")>-1)return n("failed loading "+r+": "+u.message,!0);if(u)return n(u,!1);var d,f;try{typeof h.data=="string"?d=o.options.parse(h.data,i,s):d=h.data}catch{f="failed parsing "+r+" to json"}if(f)return n(f,!1);n(null,d)})}},{key:"create",value:function(r,n,i,s,o){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var l=this.options.parsePayload(n,i,s),c=0,u=[],h=[];r.forEach(function(d){var f=a.options.addPath;typeof a.options.addPath=="function"&&(f=a.options.addPath(d,n));var p=a.services.interpolator.interpolate(f,{lng:d,ns:n});a.options.request(a.options,p,l,function(g,y){c+=1,u.push(g),h.push(y),c===r.length&&typeof o=="function"&&o(u,h)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var l=[],c=function(h){var d=s.toResolveHierarchy(h);d.forEach(function(f){l.indexOf(f)<0&&l.push(f)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){r.allOptions.ns.forEach(function(h){i.read(u,h,"read",null,null,function(d,f){d&&o.warn("loading namespace ".concat(h," for language ").concat(u," failed"),d),!d&&f&&o.log("loaded namespace ".concat(h," for language ").concat(u),f),i.loaded("".concat(u,"|").concat(h),d,f)})})})}}}])}();F4.type="backend";const{slice:Fse,forEach:Pse}=[];function Ise(e){return Pse.call(Fse.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const iN=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Nse=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!iN.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!iN.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},sN={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=Nse(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,l)===t&&(r=o[a].substring(l+1))}}return r}};let yp=null;const oN=()=>{if(yp!==null)return yp;try{yp=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{yp=!1}return yp};var Ose={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&oN())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&oN()&&window.localStorage.setItem(r,e)}};let vp=null;const aN=()=>{if(vp!==null)return vp;try{vp=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{vp=!1}return vp};var Rse={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&aN())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&aN()&&window.sessionStorage.setItem(r,e)}},Bse={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let s=0;s0?t:void 0}},zse={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},jse={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},Hse={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Use(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class P4{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Ise(r,this.options||{},Use()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Mse),this.addDetector(Lse),this.addDetector(Ose),this.addDetector(Rse),this.addDetector(Bse),this.addDetector(zse),this.addDetector(jse),this.addDetector(Hse)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}P4.type="languageDetector";var Wse={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};Pi.use(F4).use(P4).use(Uie).init({fallbackLng:"en",backend:{loadPath:`${Yb}/locales/{{lng}}/translation.json`},debug:Wse.PRODUCTION==="PRODUCTION",keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var Yr={},$k={},Fk={};Object.defineProperty(Fk,"__esModule",{value:!0});var lN="html",uN="head",Ry="body",Vse=/<([a-zA-Z]+[0-9]?)/,cN=//i,hN=//i,N0=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},PC=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},dN=typeof window=="object"&&window.DOMParser;if(typeof dN=="function"){var Gse=new dN,qse="text/html";PC=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),Gse.parseFromString(e,qse)},N0=PC}if(typeof document=="object"&&document.implementation){var By=document.implementation.createHTMLDocument();N0=function(e,t){if(t){var r=By.documentElement.querySelector(t);return r&&(r.innerHTML=e),By}return By.documentElement.innerHTML=e,By}}var zy=typeof document=="object"&&document.createElement("template"),IC;zy&&zy.content&&(IC=function(e){return zy.innerHTML=e,zy.content.childNodes});function Kse(e){var t,r,n=e.match(Vse),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case lN:{var s=PC(e);if(!cN.test(e)){var o=s.querySelector(uN);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!hN.test(e)){var o=s.querySelector(Ry);(r=o==null?void 0:o.parentNode)===null||r===void 0||r.removeChild(o)}return s.querySelectorAll(lN)}case uN:case Ry:{var a=N0(e).querySelectorAll(i);return hN.test(e)&&cN.test(e)?a[0].parentNode.childNodes:a}default:{if(IC)return IC(e);var o=N0(e,Ry).querySelector(Ry);return o.childNodes}}}Fk.default=Kse;var Wd={},Pk={},Ik={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Ik);var Zt={},Au=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lm=Dr&&Dr.__assign||function(){return lm=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(Nk);Zt.NodeWithChildren=e1;var L4=function(e){Au(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=fs.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(e1);Zt.CDATA=L4;var O4=function(e){Au(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=fs.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(e1);Zt.Document=O4;var R4=function(e){Au(t,e);function t(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?fs.ElementType.Script:r==="style"?fs.ElementType.Style:fs.ElementType.Tag);var o=e.call(this,i)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(e1);Zt.Element=R4;function B4(e){return(0,fs.isTag)(e)}Zt.isTag=B4;function z4(e){return e.type===fs.ElementType.CDATA}Zt.isCDATA=z4;function j4(e){return e.type===fs.ElementType.Text}Zt.isText=j4;function H4(e){return e.type===fs.ElementType.Comment}Zt.isComment=H4;function U4(e){return e.type===fs.ElementType.Directive}Zt.isDirective=U4;function W4(e){return e.type===fs.ElementType.Root}Zt.isDocument=W4;function Jse(e){return Object.prototype.hasOwnProperty.call(e,"children")}Zt.hasChildren=Jse;function Mk(e,t){t===void 0&&(t=!1);var r;if(j4(e))r=new I4(e.data);else if(H4(e))r=new N4(e.data);else if(B4(e)){var n=t?KS(e.children):[],i=new R4(e.name,lm({},e.attribs),n);n.forEach(function(l){return l.parent=i}),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=lm({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=lm({},e["x-attribsPrefix"])),r=i}else if(z4(e)){var n=t?KS(e.children):[],s=new L4(n);n.forEach(function(c){return c.parent=s}),r=s}else if(W4(e)){var n=t?KS(e.children):[],o=new O4(n);n.forEach(function(c){return c.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(U4(e)){var a=new M4(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),r=a}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Zt.cloneNode=Mk;function KS(e){for(var t=e.map(function(n){return Mk(n,!0)}),r=1;r/;function noe(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(roe),r=t?t[1]:void 0;return(0,toe.formatDOM)((0,eoe.default)(e),null,r)}$k.default=noe;var t1={},zo={},r1={},ioe=0;r1.SAME=ioe;var soe=1;r1.CAMELCASE=soe;r1.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const K4=0,ku=1,n1=2,i1=3,Lk=4,J4=5,X4=6;function ooe(e){return mi.hasOwnProperty(e)?mi[e]:null}function Yi(e,t,r,n,i,s,o){this.acceptsBooleans=t===n1||t===i1||t===Lk,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const mi={},aoe=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];aoe.forEach(e=>{mi[e]=new Yi(e,K4,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{mi[e]=new Yi(e,ku,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{mi[e]=new Yi(e,n1,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{mi[e]=new Yi(e,n1,!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"].forEach(e=>{mi[e]=new Yi(e,i1,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{mi[e]=new Yi(e,i1,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{mi[e]=new Yi(e,Lk,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{mi[e]=new Yi(e,X4,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{mi[e]=new Yi(e,J4,!1,e.toLowerCase(),null,!1,!1)});const Ok=/[\-\:]([a-z])/g,Rk=e=>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"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{mi[e]=new Yi(e,ku,!1,e.toLowerCase(),null,!1,!1)});const loe="xlinkHref";mi[loe]=new Yi("xlinkHref",ku,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{mi[e]=new Yi(e,ku,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:uoe,SAME:coe,possibleStandardNames:fN}=r1,hoe=":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",doe=hoe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",foe=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+doe+"]*$")),poe=Object.keys(fN).reduce((e,t)=>{const r=fN[t];return r===coe?e[t]=t:r===uoe?e[t.toLowerCase()]=t:e[t]=r,e},{});zo.BOOLEAN=i1;zo.BOOLEANISH_STRING=n1;zo.NUMERIC=J4;zo.OVERLOADED_BOOLEAN=Lk;zo.POSITIVE_NUMERIC=X4;zo.RESERVED=K4;zo.STRING=ku;zo.getPropertyInfo=ooe;zo.isCustomAttribute=foe;zo.possibleStandardNames=poe;var Bk={},zk={},pN=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,moe=/\n/g,goe=/^\s*/,yoe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,voe=/^:\s*/,boe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,xoe=/^[;\s]*/,woe=/^\s+|\s+$/g,Soe=` -`,mN="/",gN="*",Qu="",Doe="comment",Eoe="declaration",Coe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(p){var g=p.match(moe);g&&(r+=g.length);var y=p.lastIndexOf(Soe);n=~y?p.length-y:n+p.length}function s(){var p={line:r,column:n};return function(g){return g.position=new o(p),c(),g}}function o(p){this.start=p,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function a(p){var g=new Error(t.source+":"+r+":"+n+": "+p);if(g.reason=p,g.filename=t.source,g.line=r,g.column=n,g.source=e,!t.silent)throw g}function l(p){var g=p.exec(e);if(g){var y=g[0];return i(y),e=e.slice(y.length),g}}function c(){l(goe)}function u(p){var g;for(p=p||[];g=h();)g!==!1&&p.push(g);return p}function h(){var p=s();if(!(mN!=e.charAt(0)||gN!=e.charAt(1))){for(var g=2;Qu!=e.charAt(g)&&(gN!=e.charAt(g)||mN!=e.charAt(g+1));)++g;if(g+=2,Qu===e.charAt(g-1))return a("End of comment missing");var y=e.slice(2,g-2);return n+=2,i(y),e=e.slice(g),n+=2,p({type:Doe,comment:y})}}function d(){var p=s(),g=l(yoe);if(g){if(h(),!l(voe))return a("property missing ':'");var y=l(boe),b=p({type:Eoe,property:yN(g[0].replace(pN,Qu)),value:y?yN(y[0].replace(pN,Qu)):Qu});return l(xoe),b}}function f(){var p=[];u(p);for(var g;g=d();)g!==!1&&(p.push(g),u(p));return p}return c(),f()};function yN(e){return e?e.replace(woe,Qu):Qu}var Toe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zk,"__esModule",{value:!0});var Aoe=Toe(Coe);function koe(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,Aoe.default)(e),i=typeof t=="function";return n.forEach(function(s){if(s.type==="declaration"){var o=s.property,a=s.value;i?t(o,a,s):a&&(r=r||{},r[o]=a)}}),r}zk.default=koe;var s1={};Object.defineProperty(s1,"__esModule",{value:!0});s1.camelCase=void 0;var _oe=/^--[a-zA-Z0-9-]+$/,$oe=/-([a-z])/g,Foe=/^[^-]+$/,Poe=/^-(webkit|moz|ms|o|khtml)-/,Ioe=/^-(ms)-/,Noe=function(e){return!e||Foe.test(e)||_oe.test(e)},Moe=function(e,t){return t.toUpperCase()},vN=function(e,t){return"".concat(t,"-")},Loe=function(e,t){return t===void 0&&(t={}),Noe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ioe,vN):e=e.replace(Poe,vN),e.replace($oe,Moe))};s1.camelCase=Loe;var Ooe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Roe=Ooe(zk),Boe=s1;function NC(e,t){var r={};return!e||typeof e!="string"||(0,Roe.default)(e,function(n,i){n&&i&&(r[(0,Boe.camelCase)(n,t)]=i)}),r}NC.default=NC;var zoe=NC;(function(e){var t=Dr&&Dr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=e.setStyleProp=e.isCustomComponent=void 0;var r=H,n=t(zoe),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(u,h){return u.includes("-")?!i.has(u):!!(h&&typeof h.is=="string")}e.isCustomComponent=s;var o={reactCompat:!0};function a(u,h){if(typeof u=="string"){if(!u.trim()){h.style={};return}try{h.style=(0,n.default)(u,o)}catch{h.style={}}}}e.setStyleProp=a,e.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(u){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(u.name)};e.canTextBeChildOfNode=l;var c=function(u){return u};e.returnFirstArg=c})(Bk);Object.defineProperty(t1,"__esModule",{value:!0});var Rp=zo,bN=Bk,joe=["checked","value"],Hoe=["input","select","textarea"],Uoe={reset:!0,submit:!0};function Woe(e,t){e===void 0&&(e={});var r={},n=!!(e.type&&Uoe[e.type]);for(var i in e){var s=e[i];if((0,Rp.isCustomAttribute)(i)){r[i]=s;continue}var o=i.toLowerCase(),a=xN(o);if(a){var l=(0,Rp.getPropertyInfo)(a);switch(joe.includes(a)&&Hoe.includes(t)&&!n&&(a=xN("default"+o)),r[a]=s,l&&l.type){case Rp.BOOLEAN:r[a]=!0;break;case Rp.OVERLOADED_BOOLEAN:s===""&&(r[a]=!0);break}continue}bN.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,bN.setStyleProp)(e.style,r),r}t1.default=Woe;function xN(e){return Rp.possibleStandardNames[e]}var jk={},Voe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jk,"__esModule",{value:!0});var JS=H,Goe=Voe(t1),um=Bk,qoe={cloneElement:JS.cloneElement,createElement:JS.createElement,isValidElement:JS.isValidElement};function Y4(e,t){t===void 0&&(t={});for(var r=[],n=typeof t.replace=="function",i=t.transform||um.returnFirstArg,s=t.library||qoe,o=s.cloneElement,a=s.createElement,l=s.isValidElement,c=e.length,u=0;u1&&(d=o(d,{key:d.key||u})),r.push(i(d,h,u));continue}}if(h.type==="text"){var f=!h.data.trim().length;if(f&&h.parent&&!(0,um.canTextBeChildOfNode)(h.parent)||t.trim&&f)continue;r.push(i(h.data,h,u));continue}var p=h,g={};Koe(p)?((0,um.setStyleProp)(p.attribs.style,p.attribs),g=p.attribs):p.attribs&&(g=(0,Goe.default)(p.attribs,p.name));var y=void 0;switch(h.type){case"script":case"style":h.children[0]&&(g.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?g.defaultValue=h.children[0].data:h.children&&h.children.length&&(y=Y4(h.children,t));break;default:continue}c>1&&(g.key=u),r.push(i(a(h.name,g,y),h,u))}return r.length===1?r[0]:r}jk.default=Y4;function Koe(e){return um.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,um.isCustomComponent)(e.name,e.attribs)}(function(e){var t=Dr&&Dr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0;var r=t($k);e.htmlToDOM=r.default;var n=t(t1);e.attributesToProps=n.default;var i=t(jk);e.domToReact=i.default;var s=Pk;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function a(l,c){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,i.default)((0,r.default)(l,(c==null?void 0:c.htmlparser2)||o),c):[]}e.default=a})(Yr);const wN=uo(Yr),Z4=wN.default||wN;var Q4={exports:{}};(function(e,t){(function(){var r="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var i=function(u,h,d){if(typeof u!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=h),i.modules[u]||(i.payloads[u]=d,i.modules[u]=null)};i.modules={},i.payloads={};var s=function(u,h,d){if(typeof h=="string"){var f=l(u,h);if(f!=null)return d&&d(),f}else if(Object.prototype.toString.call(h)==="[object Array]"){for(var p=[],g=0,y=h.length;gl.length)&&(a=l.length),a-=o.length;var c=l.indexOf(o,a);return c!==-1&&c===a}),String.prototype.repeat||s(String.prototype,"repeat",function(o){for(var a="",l=this;o>0;)o&1&&(a+=l),(o>>=1)&&(l+=l);return a}),String.prototype.includes||s(String.prototype,"includes",function(o,a){return this.indexOf(o,a)!=-1}),Object.assign||(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(o),l=1;l>>0,c=arguments[1],u=c>>0,h=u<0?Math.max(l+u,0):Math.min(u,l),d=arguments[2],f=d===void 0?l:d>>0,p=f<0?Math.max(l+f,0):Math.min(f,l);h0;)l&1&&(c+=a),(l>>=1)&&(a+=a);return c};var s=/^\s\s*/,o=/\s\s*$/;n.stringTrimLeft=function(a){return a.replace(s,"")},n.stringTrimRight=function(a){return a.replace(o,"")},n.copyObject=function(a){var l={};for(var c in a)l[c]=a[c];return l},n.copyArray=function(a){for(var l=[],c=0,u=a.length;c65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,n,i){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),a=s.userAgent||"",l=s.appName||"";n.isWin=o=="win",n.isMac=o=="mac",n.isLinux=o=="linux",n.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=a.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(a.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(a.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(a.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(a.split(" Edge/")[1])||void 0,n.isAIR=a.indexOf("AdobeAIR")>=0,n.isAndroid=a.indexOf("Android")>=0,n.isChromeOS=a.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("./useragent"),o="http://www.w3.org/1999/xhtml";n.buildDom=function d(f,p,g){if(typeof f=="string"&&f){var y=document.createTextNode(f);return p&&p.appendChild(y),y}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var b=[],v=0;v"u")){if(l){if(p)c();else if(p===!1)return l.push([d,f])}if(!a){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var y=g.ownerDocument||g;if(f&&n.hasCssString(f,g))return null;f&&(d+=` -/*# sourceURL=ace/css/`+f+" */");var b=n.createElement("style");b.appendChild(y.createTextNode(d)),f&&(b.id=f),g==y&&(g=n.getDocumentHead(y)),g.insertBefore(b,g.firstChild)}}}if(n.importCssString=u,n.importCssStylsheet=function(d,f){n.buildDom(["link",{rel:"stylesheet",href:d}],n.getDocumentHead(f))},n.scrollbarWidth=function(d){var f=n.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=n.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var y=d&&d.documentElement||document&&document.documentElement;if(!y)return 0;y.appendChild(p);var b=f.offsetWidth;g.overflow="scroll";var v=f.offsetWidth;return b===v&&(v=p.clientWidth),y.removeChild(p),b-v},n.computedStyle=function(d,f){return window.getComputedStyle(d,"")||{}},n.setStyle=function(d,f,p){d[f]!==p&&(d[f]=p)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=s.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,s.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var h=document.createElement("div");n.HI_DPI&&h.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!s.isEdge&&typeof h.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),h=null}n.HAS_CSS_TRANSFORMS?n.translate=function(d,f,p){d.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:n.translate=function(d,f,p){d.style.top=Math.round(p)+"px",d.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("./dom");n.get=function(o,a){var l=new XMLHttpRequest;l.open("GET",o,!0),l.onreadystatechange=function(){l.readyState===4&&a(l.responseText)},l.send(null)},n.loadScript=function(o,a){var l=s.getDocumentHead(),c=document.createElement("script");c.src=o,l.appendChild(c),c.onload=c.onreadystatechange=function(u,h){(h||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,h||a())}},n.qualifyURL=function(o){var a=document.createElement("a");return a.href=o,a.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,n,i){n.inherits=function(s,o){s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(s,o){for(var a in o)s[a]=o[a];return s},n.implement=function(s,o){n.mixin(s,o)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(r,n,i){var s={},o=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(l,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var u=this._eventRegistry[l]||[],h=this._defaultHandlers[l];if(!(!u.length&&!h)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=l),c.stopPropagation||(c.stopPropagation=o),c.preventDefault||(c.preventDefault=a),u=u.slice();for(var d=0;dObject.entries(e).map(r=>{const n=r[0],i=r[1],s=Hd(n,i,t);return{[n]:s}}).reduce((r,n)=>({...r,...n}),{}),_k=(e,t,r,n)=>{const i=r[n];if(!i)return{lightOrigin:void 0,darkOrigin:void 0};const s=i.dark?e[n]:i.hex,o=i.dark?i.hex:e[n],l=OI(s,!1,t),a=OI(o,!0,t);return{lightOrigin:l,darkOrigin:a}},CC=(e,t,r)=>{const n=x4(e,t),i={};return Object.entries(n).forEach(s=>{const o=s[0];if(s[1].forEach(a=>{i[`--${$r}-${o}-${a.index??a.name}`]=a.hex}),Qc(o)){const{lightOrigin:a,darkOrigin:c}=_k(e,t,r,o);a&&c&&(i[`--${$r}-${o}-on-pressed-light`]=a.onColorPressed,i[`--${$r}-${o}-on-hover-light`]=a.onColorHover,i[`--${$r}-${o}-on-light`]=a.onColor,i[`--${$r}-${o}-origin-light`]=a.color,i[`--${$r}-${o}-hover-light`]=a.hoverColor,i[`--${$r}-${o}-pressed-light`]=a.pressedColor,i[`--${$r}-${o}-on-pressed-dark`]=c.onColorPressed,i[`--${$r}-${o}-on-hover-dark`]=c.onColorHover,i[`--${$r}-${o}-on-dark`]=c.onColor,i[`--${$r}-${o}-origin-dark`]=c.color,i[`--${$r}-${o}-hover-dark`]=c.hoverColor,i[`--${$r}-${o}-pressed-dark`]=c.pressedColor)}}),i},My=5,OI=(e,t,r)=>{var g,y;const n=Hd("",e,r),i=new Ke;i.hex=e,i.hexToHsluv();const s=i.hsluv_l,o=v4("#fff",e)>=4.5,l=o?"#fff":"#000",a=((g=o?n.at(-2):n[2])==null?void 0:g.hex)||"#ff69b4",c=((y=o?n.at(-3):n[3])==null?void 0:y.hex)||"#ff69b4";let u,h;const d=t?b=>b>s+My:b=>bbb>s+My;let p=n.filter(b=>d(b.luminance));return p=t?p:p.reverse(),p.length>2&&(u=p[0].hex,h=p[1].hex),(!u||!h)&&(p=n.filter(b=>f(b.luminance)),p=t?p.reverse():p,p.length>2?(u=p[0].hex,h=p[1].hex):(u="#ff69b4",h="#ff69b4")),{color:e,onColor:l,onColorHover:a,onColorPressed:c,hoverColor:u,pressedColor:h}},Lp=(e,t,r)=>{let n={};return Object.entries(t).forEach(i=>{const s=i[0];if(Qc(s)){const o=r?"dark":"light";n={...n,[`--db-${s}-on-enabled`]:`var(--db-${s}-on-${o})`,[`--db-${s}-on-hover`]:`var(--db-${s}-on-hover-${o})`,[`--db-${s}-on-pressed`]:`var(--db-${s}-on-pressed-${o})`,[`--db-${s}-origin-enabled`]:`var(--db-${s}-origin-${o})`,[`--db-${s}-origin-hover`]:`var(--db-${s}-hover-${o})`,[`--db-${s}-origin-pressed`]:`var(--db-${s}-pressed-${o})`}}e.forEach(o=>{o.transparencyDark!==void 0||o.transparencyLight!==void 0?n[`--${$r}-${s}-${o.name}`]=`color-mix(in srgb, transparent ${r?o.transparencyDark:o.transparencyLight}%, var(--${$r}-${s}-${r?o.dark:o.light}))`:n[`--${$r}-${s}-${o.name}`]=`var(--${$r}-${s}-${r?o.dark:o.light})`})}),n},Fie=()=>{const{speakingNames:e,luminanceSteps:t,theme:r,darkMode:n}=pr(i=>i);return H.useEffect(()=>{const i={...r.colors,...r.additionalColors,...r.customColors},s={...CC(i,t,r.branding.alternativeColors),...Lp(e,i,n),...b4(r)},o=document.getElementsByTagName("html");Array.from(o).forEach(l=>{l.setAttribute("style",Object.entries(s).map(a=>`${a[0]}:${a[1]};`).join(" "))})},[e,r,t,n]),B.jsxs(B.Fragment,{children:[B.jsx(uZ,{}),B.jsx(PJ,{})]})};function Pie(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),r=0;r()=>{if(e.isInitialized)t();else{const r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}};function BI(e,t,r){e.loadNamespaces(t,w4(e,r))}function jI(e,t,r,n){typeof r=="string"&&(r=[r]),r.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,w4(e,n))}function Iie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=t.languages[0],i=t.options?t.options.fallbackLng:!1,s=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(l,a)=>{const c=t.services.backendConnector.state[`${l}|${a}`];return c===-1||c===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(n,e)&&(!i||o(s,e)))}function Nie(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(TC("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(i,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,e))return!1}}):Iie(e,t,r)}const Mie=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Lie={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Oie=e=>Lie[e],Rie=e=>e.replace(Mie,Oie);let AC={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rie};function Bie(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};AC={...AC,...e}}function jie(){return AC}let S4;function zie(e){S4=e}function Hie(){return S4}const Uie={type:"3rdParty",init(e){Bie(e.options.react),zie(e)}},Wie=H.createContext();class Vie{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Gie=(e,t)=>{const r=H.useRef();return H.useEffect(()=>{r.current=t?r.current:e},[e,t]),r.current};function D4(e,t,r,n){return e.getFixedT(t,r,n)}function qie(e,t,r,n){return H.useCallback(D4(e,t,r,n),[e,t,r,n])}function mr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:r}=t,{i18n:n,defaultNS:i}=H.useContext(Wie)||{},s=r||n||Hie();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Vie),!s){TC("You will need to pass in an i18next instance by using initReactI18next");const D=(w,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(w)?w[w.length-1]:w,C=[D,{},!1];return C.t=D,C.i18n={},C.ready=!1,C}s.options.react&&s.options.react.wait!==void 0&&TC("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...jie(),...s.options.react,...t},{useSuspense:l,keyPrefix:a}=o;let c=e||i||s.options&&s.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(c);const u=(s.isInitialized||s.initializedStoreOnce)&&c.every(D=>Nie(D,s,o)),h=qie(s,t.lng||null,o.nsMode==="fallback"?c:c[0],a),d=()=>h,f=()=>D4(s,t.lng||null,o.nsMode==="fallback"?c:c[0],a),[p,g]=H.useState(d);let y=c.join();t.lng&&(y=`${t.lng}${y}`);const b=Gie(y),v=H.useRef(!0);H.useEffect(()=>{const{bindI18n:D,bindI18nStore:C}=o;v.current=!0,!u&&!l&&(t.lng?jI(s,t.lng,c,()=>{v.current&&g(f)}):BI(s,c,()=>{v.current&&g(f)})),u&&b&&b!==y&&v.current&&g(f);function w(){v.current&&g(f)}return D&&s&&s.on(D,w),C&&s&&s.store.on(C,w),()=>{v.current=!1,D&&s&&D.split(" ").forEach(T=>s.off(T,w)),C&&s&&C.split(" ").forEach(T=>s.store.off(T,w))}},[s,y]),H.useEffect(()=>{v.current&&u&&g(d)},[s,a,u]);const E=[p,s,u];if(E.t=p,E.i18n=s,E.ready=u,u||!u&&!l)return E;throw new Promise(D=>{t.lng?jI(s,t.lng,c,()=>D()):BI(s,c,()=>D())})}const Kie=()=>{const{t:e}=mr(),{resetDefaults:t}=pr(n=>n),r=X5();return B.jsx("div",{className:"w-[100vw] h-[100vh] flex",children:B.jsxs("div",{className:"m-auto flex flex-col gap-fix-md",children:[B.jsx(Mr,{semantic:"critical",icon:"quiet_zone",children:e("errorMessage")}),B.jsx(Ot,{className:"mx-auto",size:"small",icon:"undo",onClick:()=>{t(),r(0)},children:e("reset")})]})})},Jie={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 _0{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||Jie,this.options=r,this.debug=r.debug}log(){for(var t=arguments.length,r=new Array(t),n=0;n{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(t,r){if(this.observers[t]){if(!r){delete this.observers[t];return}this.observers[t].delete(r)}}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i{let[l,a]=o;for(let c=0;c{let[l,a]=o;for(let c=0;c{e=n,t=i});return r.resolve=e,r.reject=t,r}function zI(e){return e==null?"":""+e}function Xie(e,t,r){e.forEach(n=>{t[n]&&(r[n]=t[n])})}const Yie=/###/g;function am(e,t,r){function n(l){return l&&l.indexOf("###")>-1?l.replace(Yie,"."):l}function i(){return!e||typeof e=="string"}const s=typeof t!="string"?t:t.split(".");let o=0;for(;o":">",'"':""","'":"'","/":"/"};function tse(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>ese[t]):e}class rse{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const r=this.regExpMap.get(t);if(r!==void 0)return r;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const nse=[" ",",","?","!",";"],ise=new rse(20);function sse(e,t,r){t=t||"",r=r||"";const n=nse.filter(o=>t.indexOf(o)<0&&r.indexOf(o)<0);if(n.length===0)return!0;const i=ise.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(e);if(!s){const o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(s=!0)}return s}function kC(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let i=e;for(let s=0;s-1&&a0?e.replace("_","-"):e}class UI extends Zb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=r,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 r=this.options.ns.indexOf(t);r>-1&&this.options.ns.splice(r,1)}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,r],n&&(Array.isArray(n)?l.push(...n):typeof n=="string"&&s?l.push(...n.split(s)):l.push(n)));const a=$0(this.data,l);return!a&&!r&&!n&&t.indexOf(".")>-1&&(t=l[0],r=l[1],n=l.slice(2).join(".")),a||!o||typeof n!="string"?a:kC(this.data&&this.data[t]&&this.data[t][r],n,s)}addResource(t,r,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,r];n&&(l=l.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(l=t.split("."),i=r,r=l[1]),this.addNamespaces(r),HI(this.data,l,i),s.silent||this.emit("added",t,r,n,i)}addResources(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(typeof n[s]=="string"||Array.isArray(n[s]))&&this.addResource(t,r,s,n[s],{silent:!0});i.silent||this.emit("added",t,r,n)}addResourceBundle(t,r,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,r];t.indexOf(".")>-1&&(l=t.split("."),i=n,n=r,r=l[1]),this.addNamespaces(r);let a=$0(this.data,l)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?E4(a,n,s):a={...a,...n},HI(this.data,l,a),o.silent||this.emit("added",t,r,n)}removeResourceBundle(t,r){this.hasResourceBundle(t,r)&&delete this.data[t][r],this.removeNamespaces(r),this.emit("removed",t,r)}hasResourceBundle(t,r){return this.getResource(t,r)!==void 0}getResourceBundle(t,r){return r||(r=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,r)}:this.getResource(t,r)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const r=this.getDataByLanguage(t);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var C4={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,i){return e.forEach(s=>{this.processors[s]&&(t=this.processors[s].process(t,r,n,i))}),t}};const WI={};class P0 extends Zb{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Xie(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zo.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,r);return n&&n.res!==void 0}extractFromKey(t,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=r.ns||this.options.defaultNS||[];const o=n&&t.indexOf(n)>-1,l=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!sse(t,n,i);if(o&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:s};const c=t.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(i)}return typeof s=="string"&&(s=[s]),{key:t,namespaces:s}}translate(t,r,n){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(t[t.length-1],r),a=l[l.length-1],c=r.lng||this.language,u=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const D=r.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${D}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:a,usedParams:this.getUsedParamsDetails(r)}:`${a}${D}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:a,usedParams:this.getUsedParamsDetails(r)}:o}const h=this.resolve(t,r);let d=h&&h.res;const f=h&&h.usedKey||o,p=h&&h.exactUsedKey||o,g=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],b=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&y.indexOf(g)<0&&!(typeof b=="string"&&Array.isArray(d))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...r,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(h.res=D,h.usedParams=this.getUsedParamsDetails(r),h):D}if(s){const D=Array.isArray(d),C=D?[]:{},w=D?p:f;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const A=`${w}${s}${T}`;C[T]=this.translate(A,{...r,joinArrays:!1,ns:l}),C[T]===A&&(C[T]=d[T])}d=C}}else if(v&&typeof b=="string"&&Array.isArray(d))d=d.join(b),d&&(d=this.extendTranslation(d,t,r,n));else{let D=!1,C=!1;const w=r.count!==void 0&&typeof r.count!="string",T=P0.hasDefaultValue(r),A=w?this.pluralResolver.getSuffix(c,r.count,r):"",$=r.ordinal&&w?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",I=w&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),N=I&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${A}`]||r[`defaultValue${$}`]||r.defaultValue;!this.isValidLookup(d)&&T&&(D=!0,d=N),this.isValidLookup(d)||(C=!0,d=o);const F=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,P=T&&N!==d&&this.options.updateMissing;if(C||D||P){if(this.logger.log(P?"updateKey":"missingKey",c,a,o,P?N:d),s){const R=this.resolve(o,{...r,keySeparator:!1});R&&R.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 _=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let R=0;R{const ee=T&&q!==d?q:F;this.options.missingKeyHandler?this.options.missingKeyHandler(R,a,G,ee,P,r):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,a,G,ee,P,r),this.emit("missingKey",R,a,G,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?_.forEach(R=>{const G=this.pluralResolver.getSuffixes(R,r);I&&r[`defaultValue${this.options.pluralSeparator}zero`]&&G.indexOf(`${this.options.pluralSeparator}zero`)<0&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(q=>{j([R],o+q,r[`defaultValue${q}`]||N)})}):j(_,o,N))}d=this.extendTranslation(d,t,r,h,n),C&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${o}`),(C||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${o}`:o,D?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(h.res=d,h.usedParams=this.getUsedParamsDetails(r),h):d}extendTranslation(t,r,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=typeof t=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const d=t.match(this.interpolator.nestingRegexp);u=d&&d.length}let h=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,n.lng||this.language,n),c){const d=t.match(this.interpolator.nestingRegexp),f=d&&d.length;u1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,l;return typeof t=="string"&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(a,r),u=c.key;i=u;let h=c.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=r.count!==void 0&&typeof r.count!="string",f=d&&!r.ordinal&&r.count===0&&this.pluralResolver.shouldUseIntlApi(),p=r.context!==void 0&&(typeof r.context=="string"||typeof r.context=="number")&&r.context!=="",g=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(y=>{this.isValidLookup(n)||(l=y,!WI[`${g[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(WI[`${g[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${g.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!!!")),g.forEach(b=>{if(this.isValidLookup(n))return;o=b;const v=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,u,b,y,r);else{let D;d&&(D=this.pluralResolver.getSuffix(b,r.count,r));const C=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(u+D),r.ordinal&&D.indexOf(w)===0&&v.push(u+D.replace(w,this.options.pluralSeparator)),f&&v.push(u+C)),p){const T=`${u}${this.options.contextSeparator}${r.context}`;v.push(T),d&&(v.push(T+D),r.ordinal&&D.indexOf(w)===0&&v.push(T+D.replace(w,this.options.pluralSeparator)),f&&v.push(T+C))}}let E;for(;E=v.pop();)this.isValidLookup(n)||(s=E,n=this.getResource(b,y,E,r))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,r,n,i):this.resourceStore.getResource(t,r,n,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&typeof t.replace!="string";let i=n?t.replace:t;if(n&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of r)delete i[s]}return i}static hasDefaultValue(t){const r="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&r===n.substring(0,r.length)&&t[n]!==void 0)return!0;return!1}}function GS(e){return e.charAt(0).toUpperCase()+e.slice(1)}class VI{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zo.create("languageUtils")}getScriptPartFromCode(t){if(t=F0(t),!t||t.indexOf("-")<0)return null;const r=t.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(t){if(t=F0(t),!t||t.indexOf("-")<0)return t;const r=t.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const r=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=GS(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=GS(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=GS(n[2].toLowerCase()))),n.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 r;return t.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&t.forEach(n=>{if(r)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return r=i;r=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!r)return t.default||[];let n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}toResolveHierarchy(t,r){const n=this.getFallbackCodes(r||this.options.fallbackLng||[],t),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):typeof t=="string"&&s(this.formatLanguageCode(t)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let ose=[{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}],ase={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const lse=["v1","v2","v3"],use=["v4"],GI={zero:0,one:1,two:2,few:3,many:4,other:5};function cse(){const e={};return ose.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:ase[t.fc]}})}),e}class hse{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=r,this.logger=Zo.create("pluralResolver"),(!this.options.compatibilityJSON||use.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=cse()}addRule(t,r){this.rules[t]=r}getRule(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(F0(t==="dev"?"en":t),{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(i=>`${r}${i}`)}getSuffixes(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(t,r);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>GI[i]-GI[s]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(t,i,r)):[]}getSuffix(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:this.getSuffixRetroCompatible(i,r):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,r){const n=t.noAbs?t.plurals(r):t.plurals(Math.abs(r));let i=t.numbers[n];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>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()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!lse.includes(this.options.compatibilityJSON)}}function qI(e,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Qie(e,t,r);return!s&&i&&typeof r=="string"&&(s=kC(e,r,n),s===void 0&&(s=kC(t,r,n))),s}class dse{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zo.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:a,formatSeparator:c,unescapeSuffix:u,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:b,alwaysFormat:v}=t.interpolation;this.escape=r!==void 0?r:tse,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Oh(s):o||"{{",this.suffix=l?Oh(l):a||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?Oh(d):f||Oh("$t("),this.nestingSuffix=p?Oh(p):g||Oh(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=b||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(r,n)=>r&&r.source===n?(r.lastIndex=0,r):new RegExp(n,"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,r,n,i){let s,o,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(p){return p.replace(/\$/g,"$$$$")}const u=p=>{if(p.indexOf(this.formatSeparator)<0){const v=qI(r,a,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,n,{...i,...r,interpolationkey:p}):v}const g=p.split(this.formatSeparator),y=g.shift().trim(),b=g.join(this.formatSeparator).trim();return this.format(qI(r,a,y,this.options.keySeparator,this.options.ignoreJSONStructure),b,n,{...i,...r,interpolationkey:y})};this.resetRegExp();const h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>c(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?c(this.escape(p)):c(p)}].forEach(p=>{for(l=0;s=p.regex.exec(t);){const g=s[1].trim();if(o=u(g),o===void 0)if(typeof h=="function"){const b=h(t,s,i);o=typeof b=="string"?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))o="";else if(d){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=zI(o));const y=p.safeValue(o);if(t=t.replace(s[0],y),d?(p.regex.lastIndex+=o.length,p.regex.lastIndex-=s[0].length):p.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function l(a,c){const u=this.nestingOptionsSeparator;if(a.indexOf(u)<0)return a;const h=a.split(new RegExp(`${u}[ ]*{`));let d=`{${h[1]}`;a=h[0],d=this.interpolate(d,o);const f=d.match(/'/g),p=d.match(/"/g);(f&&f.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),c&&(o={...c,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,g),`${a}${u}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,a}for(;i=this.nestingRegexp.exec(t);){let a=[];o={...n},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(h=>h.trim());i[1]=u.shift(),a=u,c=!0}if(s=r(l.call(this,i[1].trim(),o),o),s&&i[0]===t&&typeof s!="string")return s;typeof s!="string"&&(s=zI(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),s=""),c&&(s=a.reduce((u,h)=>this.format(u,h,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),t=t.replace(i[0],s),this.regexp.lastIndex=0}return t}}function fse(e){let t=e.toLowerCase().trim();const r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);t==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[l,...a]=o.split(":"),c=a.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:r}}function Rh(e){const t={};return function(n,i,s){const o=i+JSON.stringify(s);let l=t[o];return l||(l=e(F0(i),s),t[o]=l),l(n)}}class pse{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Zo.create("formatter"),this.options=t,this.formats={number:Rh((r,n)=>{const i=new Intl.NumberFormat(r,{...n});return s=>i.format(s)}),currency:Rh((r,n)=>{const i=new Intl.NumberFormat(r,{...n,style:"currency"});return s=>i.format(s)}),datetime:Rh((r,n)=>{const i=new Intl.DateTimeFormat(r,{...n});return s=>i.format(s)}),relativetime:Rh((r,n)=>{const i=new Intl.RelativeTimeFormat(r,{...n});return s=>i.format(s,n.range||"day")}),list:Rh((r,n)=>{const i=new Intl.ListFormat(r,{...n});return s=>i.format(s)})},this.init(t)}init(t){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(t,r){this.formats[t.toLowerCase().trim()]=r}addCached(t,r){this.formats[t.toLowerCase().trim()]=Rh(r)}format(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return r.split(this.formatSeparator).reduce((l,a)=>{const{formatName:c,formatOptions:u}=fse(a);if(this.formats[c]){let h=l;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},f=d.locale||d.lng||i.locale||i.lng||n;h=this.formats[c](l,f,{...u,...i,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${c}`);return l},t)}}function mse(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class gse extends Zb{constructor(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=Zo.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(n,i.backend,i)}queueLoad(t,r,n,i){const s={},o={},l={},a={};return t.forEach(c=>{let u=!0;r.forEach(h=>{const d=`${c}|${h}`;!n.reload&&this.store.hasResourceBundle(c,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,u=!1,o[d]===void 0&&(o[d]=!0),s[d]===void 0&&(s[d]=!0),a[h]===void 0&&(a[h]=!0)))}),u||(l[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,r,n){const i=t.split("|"),s=i[0],o=i[1];r&&this.emit("failedLoading",s,o,r),n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[t]=r?-1:2;const l={};this.queue.forEach(a=>{Zie(a.loaded,[s],o),mse(a,t),r&&a.errors.push(r),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(c=>{l[c]||(l[c]={});const u=a.loaded[c];u.length&&u.forEach(h=>{l[c][h]===void 0&&(l[c][h]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:r,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const l=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(c&&u&&i{this.read.call(this,t,r,n,i+1,s*2,o)},s);return}o(c,u)},a=this.backend[n].bind(this.backend);if(a.length===2){try{const c=a(t,r);c&&typeof c.then=="function"?c.then(u=>l(null,u)).catch(l):l(null,c)}catch(c){l(c)}return}return a(t,r,l)}prepareLoading(t,r){let n=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();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof r=="string"&&(r=[r]);const s=this.queueLoad(t,r,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,r,n){this.prepareLoading(t,r,{},n)}reload(t,r,n){this.prepareLoading(t,r,{reload:!0},n)}loadOne(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${r}loading namespace ${s} for language ${i} failed`,o),!o&&l&&this.logger.log(`${r}loaded namespace ${s} for language ${i}`,l),this.loaded(t,o,l)})}saveMissing(t,r,n,i,s){let o=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(r)){this.logger.warn(`did not save key "${n}" as the namespace "${r}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const a={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,r,n,i,a):u=c(t,r,n,i),u&&typeof u.then=="function"?u.then(h=>l(null,h)).catch(l):l(null,u)}catch(u){l(u)}else c(t,r,n,i,l,a)}!t||!t[0]||this.store.addResource(t[0],r,n,i)}}}function KI(){return{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:function(t){let r={};if(typeof t[1]=="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function JI(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ly(){}function yse(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(r=>{typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}class Xm extends Zb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=JI(t),this.services={},this.logger=Zo,this.modules={external:[]},yse(this),r&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,r),this;setTimeout(()=>{this.init(t,r)},0)}}init(){var t=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(n=r,r={}),!r.defaultNS&&r.defaultNS!==!1&&r.ns&&(typeof r.ns=="string"?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const i=KI();this.options={...i,...this.options,...JI(r)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);function s(u){return u?typeof u=="function"?new u:u:null}if(!this.options.isClone){this.modules.logger?Zo.init(s(this.modules.logger),this.options):Zo.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=pse);const h=new VI(this.options);this.store=new UI(this.options.resources,this.options);const d=this.services;d.logger=Zo,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new hse(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=s(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new dse(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new gse(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var p=arguments.length,g=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Ly),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[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(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const a=gp(),c=()=>{const u=(h,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),a.resolve(d),n(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),a}loadResources(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ly;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>o(a)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(t,r,n){const i=gp();return t||(t=this.languages),r||(r=this.options.ns),n||(n=Ly),this.services.backendConnector.reload(t,r,s=>{i.resolve(),n(s)}),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"&&C4.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 r=0;r-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,r){var n=this;this.isLanguageChangingTo=t;const i=gp();this.emit("languageChanging",t);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},o=(a,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),r&&r(a,function(){return n.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const c=typeof a=="string"?a:this.services.languageUtils.getBestMatchFromCodes(a);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{o(u,c)})};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,r,n){var i=this;const s=function(o,l){let a;if(typeof l!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),h=2;h`${a.keyPrefix}${d}${p}`):f=a.keyPrefix?`${a.keyPrefix}${d}${o}`:o,i.t(f,a)};return typeof t=="string"?s.lng=t:s.lngs=t,s.ns=r,s.keyPrefix=n,s}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 r=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 n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(l,a)=>{const c=this.services.backendConnector.state[`${l}|${a}`];return c===-1||c===2};if(r.precheck){const l=r.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,t)&&(!i||o(s,t)))}loadNamespaces(t,r){const n=gp();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(t,r){const n=gp();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],s=t.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const r=["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"],n=this.services&&this.services.languageUtils||new VI(KI());return r.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new Xm(t,r)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ly;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},s=new Xm(i);return(t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new UI(this.store.data,i),s.services.resourceStore=s.store),s.translator=new P0(s.services,i),s.translator.on("*",function(l){for(var a=arguments.length,c=new Array(a>1?a-1:0),u=1;u"u"?"undefined":_C(XMLHttpRequest))==="object"}function vse(e){return!!e&&typeof e.then=="function"}function bse(e){return vse(e)?e:Promise.resolve(e)}function Op(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $C={exports:{}},Oy={exports:{}},XI;function xse(){return XI||(XI=1,function(e,t){var r={},n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof r<"u"&&r,i=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(l){var a=typeof o<"u"&&o||typeof self<"u"&&self||typeof a<"u"&&a,c={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function u(M){return M&&DataView.prototype.isPrototypeOf(M)}if(c.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function f(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(M)||M==="")throw new TypeError('Invalid character in header field name: "'+M+'"');return M.toLowerCase()}function p(M){return typeof M!="string"&&(M=String(M)),M}function g(M){var j={next:function(){var R=M.shift();return{done:R===void 0,value:R}}};return c.iterable&&(j[Symbol.iterator]=function(){return j}),j}function y(M){this.map={},M instanceof y?M.forEach(function(j,R){this.append(R,j)},this):Array.isArray(M)?M.forEach(function(j){this.append(j[0],j[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(j){this.append(j,M[j])},this)}y.prototype.append=function(M,j){M=f(M),j=p(j);var R=this.map[M];this.map[M]=R?R+", "+j:j},y.prototype.delete=function(M){delete this.map[f(M)]},y.prototype.get=function(M){return M=f(M),this.has(M)?this.map[M]:null},y.prototype.has=function(M){return this.map.hasOwnProperty(f(M))},y.prototype.set=function(M,j){this.map[f(M)]=p(j)},y.prototype.forEach=function(M,j){for(var R in this.map)this.map.hasOwnProperty(R)&&M.call(j,this.map[R],R,this)},y.prototype.keys=function(){var M=[];return this.forEach(function(j,R){M.push(R)}),g(M)},y.prototype.values=function(){var M=[];return this.forEach(function(j){M.push(j)}),g(M)},y.prototype.entries=function(){var M=[];return this.forEach(function(j,R){M.push([R,j])}),g(M)},c.iterable&&(y.prototype[Symbol.iterator]=y.prototype.entries);function b(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function v(M){return new Promise(function(j,R){M.onload=function(){j(M.result)},M.onerror=function(){R(M.error)}})}function E(M){var j=new FileReader,R=v(j);return j.readAsArrayBuffer(M),R}function D(M){var j=new FileReader,R=v(j);return j.readAsText(M),R}function C(M){for(var j=new Uint8Array(M),R=new Array(j.length),G=0;G-1?j:M}function I(M,j){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');j=j||{};var R=j.body;if(M instanceof I){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,j.headers||(this.headers=new y(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!R&&M._bodyInit!=null&&(R=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=j.credentials||this.credentials||"same-origin",(j.headers||!this.headers)&&(this.headers=new y(j.headers)),this.method=$(j.method||this.method||"GET"),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&R)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(R),(this.method==="GET"||this.method==="HEAD")&&(j.cache==="no-store"||j.cache==="no-cache")){var G=/([?&])_=[^&]*/;if(G.test(this.url))this.url=this.url.replace(G,"$1_="+new Date().getTime());else{var q=/\?/;this.url+=(q.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function N(M){var j=new FormData;return M.trim().split("&").forEach(function(R){if(R){var G=R.split("="),q=G.shift().replace(/\+/g," "),ee=G.join("=").replace(/\+/g," ");j.append(decodeURIComponent(q),decodeURIComponent(ee))}}),j}function L(M){var j=new y,R=M.replace(/\r?\n[\t ]+/g," ");return R.split("\r").map(function(G){return G.indexOf(` +`)===0?G.substr(1,G.length):G}).forEach(function(G){var q=G.split(":"),ee=q.shift().trim();if(ee){var Y=q.join(":").trim();j.append(ee,Y)}}),j}T.call(I.prototype);function F(M,j){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText=j.statusText===void 0?"":""+j.statusText,this.headers=new y(j.headers),this.url=j.url||"",this._initBody(M)}T.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},F.error=function(){var M=new F(null,{status:0,statusText:""});return M.type="error",M};var P=[301,302,303,307,308];F.redirect=function(M,j){if(P.indexOf(j)===-1)throw new RangeError("Invalid status code");return new F(null,{status:j,headers:{location:M}})},l.DOMException=a.DOMException;try{new l.DOMException}catch{l.DOMException=function(j,R){this.message=j,this.name=R;var G=Error(j);this.stack=G.stack},l.DOMException.prototype=Object.create(Error.prototype),l.DOMException.prototype.constructor=l.DOMException}function _(M,j){return new Promise(function(R,G){var q=new I(M,j);if(q.signal&&q.signal.aborted)return G(new l.DOMException("Aborted","AbortError"));var ee=new XMLHttpRequest;function Y(){ee.abort()}ee.onload=function(){var Q={status:ee.status,statusText:ee.statusText,headers:L(ee.getAllResponseHeaders()||"")};Q.url="responseURL"in ee?ee.responseURL:Q.headers.get("X-Request-URL");var te="response"in ee?ee.response:ee.responseText;setTimeout(function(){R(new F(te,Q))},0)},ee.onerror=function(){setTimeout(function(){G(new TypeError("Network request failed"))},0)},ee.ontimeout=function(){setTimeout(function(){G(new TypeError("Network request failed"))},0)},ee.onabort=function(){setTimeout(function(){G(new l.DOMException("Aborted","AbortError"))},0)};function X(Q){try{return Q===""&&a.location.href?a.location.href:Q}catch{return Q}}ee.open(q.method,X(q.url),!0),q.credentials==="include"?ee.withCredentials=!0:q.credentials==="omit"&&(ee.withCredentials=!1),"responseType"in ee&&(c.blob?ee.responseType="blob":c.arrayBuffer&&q.headers.get("Content-Type")&&q.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ee.responseType="arraybuffer")),j&&typeof j.headers=="object"&&!(j.headers instanceof y)?Object.getOwnPropertyNames(j.headers).forEach(function(Q){ee.setRequestHeader(Q,p(j.headers[Q]))}):q.headers.forEach(function(Q,te){ee.setRequestHeader(te,Q)}),q.signal&&(q.signal.addEventListener("abort",Y),ee.onreadystatechange=function(){ee.readyState===4&&q.signal.removeEventListener("abort",Y)}),ee.send(typeof q._bodyInit>"u"?null:q._bodyInit)})}return _.polyfill=!0,a.fetch||(a.fetch=_,a.Headers=y,a.Request=I,a.Response=F),l.Headers=y,l.Request=I,l.Response=F,l.fetch=_,l})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=n.fetch?n:i;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t}(Oy,Oy.exports)),Oy.exports}(function(e,t){var r={},n;if(typeof fetch=="function"&&(typeof r<"u"&&r.fetch?n=r.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Op<"u"&&typeof window>"u"){var i=n||xse();i.default&&(i=i.default),t.default=i,e.exports=t.default}})($C,$C.exports);var A4=$C.exports;const k4=uo(A4),YI=rA({__proto__:null,default:k4},[A4]);var Ei={};function ZI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QI(e){for(var t=1;t"u"&&typeof Ei<"u"&&typeof Ei.process<"u"&&Ei.process.versions&&Ei.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(Ei.process.version,"; ").concat(Ei.process.platform," ").concat(Ei.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(n):t.requestOptions,l=QI({method:n?"POST":"GET",body:n?t.stringify(n):void 0,headers:s},tN?{}:o),a=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{eN(r,l,i,a)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(o).forEach(function(u){delete l[u]}),eN(r,l,i,a),tN=!0}catch(u){i(u)}}},Cse=function(t,r,n,i){n&&Fc(n)==="object"&&(n=FC("",n).slice(1)),t.queryStringParams&&(r=FC(r,t.queryStringParams));try{var s;Ym?s=new Ym:s=new I0("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",r,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var l in o)s.setRequestHeader(l,o[l]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(a){console&&console.log(a)}},Tse=function(t,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Ua&&r.indexOf("file:")!==0)return Ese(t,r,n,i);if(T4()||typeof ActiveXObject=="function")return Cse(t,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}function rN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qS(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ase(this,e),this.services=t,this.options=r,this.allOptions=n,this.type="backend",this.init(t,r,n)}return kse(e,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=qS(qS(qS({},$se()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);Ud(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,s,o){var l=this,a=this.options.loadPath;typeof this.options.loadPath=="function"&&(a=this.options.loadPath(r,i)),a=bse(a),a.then(function(c){if(!c)return o(null,{});var u=l.services.interpolator.interpolate(c,{lng:r.join("+"),ns:i.join("+")});l.loadUrl(u,o,n,s)})}},{key:"loadUrl",value:function(r,n,i,s){var o=this,l=typeof i=="string"?[i]:i,a=typeof s=="string"?[s]:s,c=this.options.parseLoadPayload(l,a);this.options.request(this.options,r,c,function(u,h){if(h&&(h.status>=500&&h.status<600||!h.status))return n("failed loading "+r+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return n("failed loading "+r+"; status code: "+h.status,!1);if(!h&&u&&u.message&&u.message.indexOf("Failed to fetch")>-1)return n("failed loading "+r+": "+u.message,!0);if(u)return n(u,!1);var d,f;try{typeof h.data=="string"?d=o.options.parse(h.data,i,s):d=h.data}catch{f="failed parsing "+r+" to json"}if(f)return n(f,!1);n(null,d)})}},{key:"create",value:function(r,n,i,s,o){var l=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var a=this.options.parsePayload(n,i,s),c=0,u=[],h=[];r.forEach(function(d){var f=l.options.addPath;typeof l.options.addPath=="function"&&(f=l.options.addPath(d,n));var p=l.services.interpolator.interpolate(f,{lng:d,ns:n});l.options.request(l.options,p,a,function(g,y){c+=1,u.push(g),h.push(y),c===r.length&&typeof o=="function"&&o(u,h)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var a=[],c=function(h){var d=s.toResolveHierarchy(h);d.forEach(function(f){a.indexOf(f)<0&&a.push(f)})};c(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),a.forEach(function(u){r.allOptions.ns.forEach(function(h){i.read(u,h,"read",null,null,function(d,f){d&&o.warn("loading namespace ".concat(h," for language ").concat(u," failed"),d),!d&&f&&o.log("loaded namespace ".concat(h," for language ").concat(u),f),i.loaded("".concat(u,"|").concat(h),d,f)})})})}}}])}();F4.type="backend";const{slice:Fse,forEach:Pse}=[];function Ise(e){return Pse.call(Fse.call(arguments,1),t=>{if(t)for(const r in t)e[r]===void 0&&(e[r]=t[r])}),e}const iN=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Nse=(e,t,r)=>{const n=r||{};n.path=n.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!iN.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!iN.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},sN={create(e,t,r,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),n&&(i.domain=n),document.cookie=Nse(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,r=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let l=0;l0&&o[l].substring(0,a)===t&&(r=o[l].substring(a+1))}}return r}};let yp=null;const oN=()=>{if(yp!==null)return yp;try{yp=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{yp=!1}return yp};var Ose={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&oN())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:r}=t;r&&oN()&&window.localStorage.setItem(r,e)}};let vp=null;const aN=()=>{if(vp!==null)return vp;try{vp=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{vp=!1}return vp};var Rse={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&aN())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:r}=t;r&&aN()&&window.sessionStorage.setItem(r,e)}},Bse={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:r,userLanguage:n,language:i}=navigator;if(r)for(let s=0;s0?t:void 0}},jse={name:"htmlTag",lookup(e){let{htmlTag:t}=e,r;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},zse={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},Hse={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const r=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[r]}};function Use(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class P4{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,r)}init(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Ise(r,this.options||{},Use()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Mse),this.addDetector(Lse),this.addDetector(Ose),this.addDetector(Rse),this.addDetector(Bse),this.addDetector(jse),this.addDetector(zse),this.addDetector(Hse)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let r=[];return t.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(t,r){r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||r.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}P4.type="languageDetector";var Wse={VITE_FEATURE_BRANCH:"/main",BASE_URL:"/theme-builder/main",MODE:"production",DEV:!1,PROD:!0,SSR:!1};Pi.use(F4).use(P4).use(Uie).init({fallbackLng:"en",backend:{loadPath:`${Yb}/locales/{{lng}}/translation.json`},debug:Wse.PRODUCTION==="PRODUCTION",keySeparator:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1}});var Yr={},$k={},Fk={};Object.defineProperty(Fk,"__esModule",{value:!0});var lN="html",uN="head",Ry="body",Vse=/<([a-zA-Z]+[0-9]?)/,cN=//i,hN=//i,N0=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},PC=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},dN=typeof window=="object"&&window.DOMParser;if(typeof dN=="function"){var Gse=new dN,qse="text/html";PC=function(e,t){return t&&(e="<".concat(t,">").concat(e,"")),Gse.parseFromString(e,qse)},N0=PC}if(typeof document=="object"&&document.implementation){var By=document.implementation.createHTMLDocument();N0=function(e,t){if(t){var r=By.documentElement.querySelector(t);return r&&(r.innerHTML=e),By}return By.documentElement.innerHTML=e,By}}var jy=typeof document=="object"&&document.createElement("template"),IC;jy&&jy.content&&(IC=function(e){return jy.innerHTML=e,jy.content.childNodes});function Kse(e){var t,r,n=e.match(Vse),i=n&&n[1]?n[1].toLowerCase():"";switch(i){case lN:{var s=PC(e);if(!cN.test(e)){var o=s.querySelector(uN);(t=o==null?void 0:o.parentNode)===null||t===void 0||t.removeChild(o)}if(!hN.test(e)){var o=s.querySelector(Ry);(r=o==null?void 0:o.parentNode)===null||r===void 0||r.removeChild(o)}return s.querySelectorAll(lN)}case uN:case Ry:{var l=N0(e).querySelectorAll(i);return hN.test(e)&&cN.test(e)?l[0].parentNode.childNodes:l}default:{if(IC)return IC(e);var o=N0(e,Ry).querySelector(Ry);return o.childNodes}}}Fk.default=Kse;var Wd={},Pk={},Ik={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Ik);var Zt={},Au=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lm=Dr&&Dr.__assign||function(){return lm=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(Nk);Zt.NodeWithChildren=e1;var L4=function(e){Au(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=fs.ElementType.CDATA,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(e1);Zt.CDATA=L4;var O4=function(e){Au(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=fs.ElementType.Root,r}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(e1);Zt.Document=O4;var R4=function(e){Au(t,e);function t(r,n,i,s){i===void 0&&(i=[]),s===void 0&&(s=r==="script"?fs.ElementType.Script:r==="style"?fs.ElementType.Style:fs.ElementType.Tag);var o=e.call(this,i)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var i,s;return{name:n,value:r.attribs[n],namespace:(i=r["x-attribsNamespace"])===null||i===void 0?void 0:i[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(e1);Zt.Element=R4;function B4(e){return(0,fs.isTag)(e)}Zt.isTag=B4;function j4(e){return e.type===fs.ElementType.CDATA}Zt.isCDATA=j4;function z4(e){return e.type===fs.ElementType.Text}Zt.isText=z4;function H4(e){return e.type===fs.ElementType.Comment}Zt.isComment=H4;function U4(e){return e.type===fs.ElementType.Directive}Zt.isDirective=U4;function W4(e){return e.type===fs.ElementType.Root}Zt.isDocument=W4;function Jse(e){return Object.prototype.hasOwnProperty.call(e,"children")}Zt.hasChildren=Jse;function Mk(e,t){t===void 0&&(t=!1);var r;if(z4(e))r=new I4(e.data);else if(H4(e))r=new N4(e.data);else if(B4(e)){var n=t?KS(e.children):[],i=new R4(e.name,lm({},e.attribs),n);n.forEach(function(a){return a.parent=i}),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=lm({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=lm({},e["x-attribsPrefix"])),r=i}else if(j4(e)){var n=t?KS(e.children):[],s=new L4(n);n.forEach(function(c){return c.parent=s}),r=s}else if(W4(e)){var n=t?KS(e.children):[],o=new O4(n);n.forEach(function(c){return c.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(U4(e)){var l=new M4(e.name,e.data);e["x-name"]!=null&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Zt.cloneNode=Mk;function KS(e){for(var t=e.map(function(n){return Mk(n,!0)}),r=1;r/;function noe(e){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(roe),r=t?t[1]:void 0;return(0,toe.formatDOM)((0,eoe.default)(e),null,r)}$k.default=noe;var t1={},jo={},r1={},ioe=0;r1.SAME=ioe;var soe=1;r1.CAMELCASE=soe;r1.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1};const K4=0,ku=1,n1=2,i1=3,Lk=4,J4=5,X4=6;function ooe(e){return mi.hasOwnProperty(e)?mi[e]:null}function Yi(e,t,r,n,i,s,o){this.acceptsBooleans=t===n1||t===i1||t===Lk,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}const mi={},aoe=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];aoe.forEach(e=>{mi[e]=new Yi(e,K4,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{mi[e]=new Yi(e,ku,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(e=>{mi[e]=new Yi(e,n1,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{mi[e]=new Yi(e,n1,!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"].forEach(e=>{mi[e]=new Yi(e,i1,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(e=>{mi[e]=new Yi(e,i1,!0,e,null,!1,!1)});["capture","download"].forEach(e=>{mi[e]=new Yi(e,Lk,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(e=>{mi[e]=new Yi(e,X4,!1,e,null,!1,!1)});["rowSpan","start"].forEach(e=>{mi[e]=new Yi(e,J4,!1,e.toLowerCase(),null,!1,!1)});const Ok=/[\-\:]([a-z])/g,Rk=e=>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"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(Ok,Rk);mi[t]=new Yi(t,ku,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(e=>{mi[e]=new Yi(e,ku,!1,e.toLowerCase(),null,!1,!1)});const loe="xlinkHref";mi[loe]=new Yi("xlinkHref",ku,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(e=>{mi[e]=new Yi(e,ku,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:uoe,SAME:coe,possibleStandardNames:fN}=r1,hoe=":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",doe=hoe+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",foe=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+doe+"]*$")),poe=Object.keys(fN).reduce((e,t)=>{const r=fN[t];return r===coe?e[t]=t:r===uoe?e[t.toLowerCase()]=t:e[t]=r,e},{});jo.BOOLEAN=i1;jo.BOOLEANISH_STRING=n1;jo.NUMERIC=J4;jo.OVERLOADED_BOOLEAN=Lk;jo.POSITIVE_NUMERIC=X4;jo.RESERVED=K4;jo.STRING=ku;jo.getPropertyInfo=ooe;jo.isCustomAttribute=foe;jo.possibleStandardNames=poe;var Bk={},jk={},pN=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,moe=/\n/g,goe=/^\s*/,yoe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,voe=/^:\s*/,boe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,xoe=/^[;\s]*/,woe=/^\s+|\s+$/g,Soe=` +`,mN="/",gN="*",Qu="",Doe="comment",Eoe="declaration",Coe=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(p){var g=p.match(moe);g&&(r+=g.length);var y=p.lastIndexOf(Soe);n=~y?p.length-y:n+p.length}function s(){var p={line:r,column:n};return function(g){return g.position=new o(p),c(),g}}function o(p){this.start=p,this.end={line:r,column:n},this.source=t.source}o.prototype.content=e;function l(p){var g=new Error(t.source+":"+r+":"+n+": "+p);if(g.reason=p,g.filename=t.source,g.line=r,g.column=n,g.source=e,!t.silent)throw g}function a(p){var g=p.exec(e);if(g){var y=g[0];return i(y),e=e.slice(y.length),g}}function c(){a(goe)}function u(p){var g;for(p=p||[];g=h();)g!==!1&&p.push(g);return p}function h(){var p=s();if(!(mN!=e.charAt(0)||gN!=e.charAt(1))){for(var g=2;Qu!=e.charAt(g)&&(gN!=e.charAt(g)||mN!=e.charAt(g+1));)++g;if(g+=2,Qu===e.charAt(g-1))return l("End of comment missing");var y=e.slice(2,g-2);return n+=2,i(y),e=e.slice(g),n+=2,p({type:Doe,comment:y})}}function d(){var p=s(),g=a(yoe);if(g){if(h(),!a(voe))return l("property missing ':'");var y=a(boe),b=p({type:Eoe,property:yN(g[0].replace(pN,Qu)),value:y?yN(y[0].replace(pN,Qu)):Qu});return a(xoe),b}}function f(){var p=[];u(p);for(var g;g=d();)g!==!1&&(p.push(g),u(p));return p}return c(),f()};function yN(e){return e?e.replace(woe,Qu):Qu}var Toe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jk,"__esModule",{value:!0});var Aoe=Toe(Coe);function koe(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,Aoe.default)(e),i=typeof t=="function";return n.forEach(function(s){if(s.type==="declaration"){var o=s.property,l=s.value;i?t(o,l,s):l&&(r=r||{},r[o]=l)}}),r}jk.default=koe;var s1={};Object.defineProperty(s1,"__esModule",{value:!0});s1.camelCase=void 0;var _oe=/^--[a-zA-Z0-9-]+$/,$oe=/-([a-z])/g,Foe=/^[^-]+$/,Poe=/^-(webkit|moz|ms|o|khtml)-/,Ioe=/^-(ms)-/,Noe=function(e){return!e||Foe.test(e)||_oe.test(e)},Moe=function(e,t){return t.toUpperCase()},vN=function(e,t){return"".concat(t,"-")},Loe=function(e,t){return t===void 0&&(t={}),Noe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ioe,vN):e=e.replace(Poe,vN),e.replace($oe,Moe))};s1.camelCase=Loe;var Ooe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Roe=Ooe(jk),Boe=s1;function NC(e,t){var r={};return!e||typeof e!="string"||(0,Roe.default)(e,function(n,i){n&&i&&(r[(0,Boe.camelCase)(n,t)]=i)}),r}NC.default=NC;var joe=NC;(function(e){var t=Dr&&Dr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=e.setStyleProp=e.isCustomComponent=void 0;var r=H,n=t(joe),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function s(u,h){return u.includes("-")?!i.has(u):!!(h&&typeof h.is=="string")}e.isCustomComponent=s;var o={reactCompat:!0};function l(u,h){if(typeof u=="string"){if(!u.trim()){h.style={};return}try{h.style=(0,n.default)(u,o)}catch{h.style={}}}}e.setStyleProp=l,e.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var a=function(u){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(u.name)};e.canTextBeChildOfNode=a;var c=function(u){return u};e.returnFirstArg=c})(Bk);Object.defineProperty(t1,"__esModule",{value:!0});var Rp=jo,bN=Bk,zoe=["checked","value"],Hoe=["input","select","textarea"],Uoe={reset:!0,submit:!0};function Woe(e,t){e===void 0&&(e={});var r={},n=!!(e.type&&Uoe[e.type]);for(var i in e){var s=e[i];if((0,Rp.isCustomAttribute)(i)){r[i]=s;continue}var o=i.toLowerCase(),l=xN(o);if(l){var a=(0,Rp.getPropertyInfo)(l);switch(zoe.includes(l)&&Hoe.includes(t)&&!n&&(l=xN("default"+o)),r[l]=s,a&&a.type){case Rp.BOOLEAN:r[l]=!0;break;case Rp.OVERLOADED_BOOLEAN:s===""&&(r[l]=!0);break}continue}bN.PRESERVE_CUSTOM_ATTRIBUTES&&(r[i]=s)}return(0,bN.setStyleProp)(e.style,r),r}t1.default=Woe;function xN(e){return Rp.possibleStandardNames[e]}var zk={},Voe=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zk,"__esModule",{value:!0});var JS=H,Goe=Voe(t1),um=Bk,qoe={cloneElement:JS.cloneElement,createElement:JS.createElement,isValidElement:JS.isValidElement};function Y4(e,t){t===void 0&&(t={});for(var r=[],n=typeof t.replace=="function",i=t.transform||um.returnFirstArg,s=t.library||qoe,o=s.cloneElement,l=s.createElement,a=s.isValidElement,c=e.length,u=0;u1&&(d=o(d,{key:d.key||u})),r.push(i(d,h,u));continue}}if(h.type==="text"){var f=!h.data.trim().length;if(f&&h.parent&&!(0,um.canTextBeChildOfNode)(h.parent)||t.trim&&f)continue;r.push(i(h.data,h,u));continue}var p=h,g={};Koe(p)?((0,um.setStyleProp)(p.attribs.style,p.attribs),g=p.attribs):p.attribs&&(g=(0,Goe.default)(p.attribs,p.name));var y=void 0;switch(h.type){case"script":case"style":h.children[0]&&(g.dangerouslySetInnerHTML={__html:h.children[0].data});break;case"tag":h.name==="textarea"&&h.children[0]?g.defaultValue=h.children[0].data:h.children&&h.children.length&&(y=Y4(h.children,t));break;default:continue}c>1&&(g.key=u),r.push(i(l(h.name,g,y),h,u))}return r.length===1?r[0]:r}zk.default=Y4;function Koe(e){return um.PRESERVE_CUSTOM_ATTRIBUTES&&e.type==="tag"&&(0,um.isCustomComponent)(e.name,e.attribs)}(function(e){var t=Dr&&Dr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0;var r=t($k);e.htmlToDOM=r.default;var n=t(t1);e.attributesToProps=n.default;var i=t(zk);e.domToReact=i.default;var s=Pk;Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return s.Text}});var o={lowerCaseAttributeNames:!1};function l(a,c){if(typeof a!="string")throw new TypeError("First argument must be a string");return a?(0,i.default)((0,r.default)(a,(c==null?void 0:c.htmlparser2)||o),c):[]}e.default=l})(Yr);const wN=uo(Yr),Z4=wN.default||wN;var Q4={exports:{}};(function(e,t){(function(){var r="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var i=function(u,h,d){if(typeof u!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(d=h),i.modules[u]||(i.payloads[u]=d,i.modules[u]=null)};i.modules={},i.payloads={};var s=function(u,h,d){if(typeof h=="string"){var f=a(u,h);if(f!=null)return d&&d(),f}else if(Object.prototype.toString.call(h)==="[object Array]"){for(var p=[],g=0,y=h.length;ga.length)&&(l=a.length),l-=o.length;var c=a.indexOf(o,l);return c!==-1&&c===l}),String.prototype.repeat||s(String.prototype,"repeat",function(o){for(var l="",a=this;o>0;)o&1&&(l+=a),(o>>=1)&&(a+=a);return l}),String.prototype.includes||s(String.prototype,"includes",function(o,l){return this.indexOf(o,l)!=-1}),Object.assign||(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(o),a=1;a>>0,c=arguments[1],u=c>>0,h=u<0?Math.max(a+u,0):Math.min(u,a),d=arguments[2],f=d===void 0?a:d>>0,p=f<0?Math.max(a+f,0):Math.min(f,a);h0;)a&1&&(c+=l),(a>>=1)&&(l+=l);return c};var s=/^\s\s*/,o=/\s\s*$/;n.stringTrimLeft=function(l){return l.replace(s,"")},n.stringTrimRight=function(l){return l.replace(o,"")},n.copyObject=function(l){var a={};for(var c in l)a[c]=l[c];return a},n.copyArray=function(l){for(var a=[],c=0,u=l.length;c65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(r,n,i){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var s=typeof navigator=="object"?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),l=s.userAgent||"",a=s.appName||"";n.isWin=o=="win",n.isMac=o=="mac",n.isLinux=o=="linux",n.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((l.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((l.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=l.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(l.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(l.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(l.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(l.split(" Edge/")[1])||void 0,n.isAIR=l.indexOf("AdobeAIR")>=0,n.isAndroid=l.indexOf("Android")>=0,n.isChromeOS=l.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(l)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("./useragent"),o="http://www.w3.org/1999/xhtml";n.buildDom=function d(f,p,g){if(typeof f=="string"&&f){var y=document.createTextNode(f);return p&&p.appendChild(y),y}if(!Array.isArray(f))return f&&f.appendChild&&p&&p.appendChild(f),f;if(typeof f[0]!="string"||!f[0]){for(var b=[],v=0;v"u")){if(a){if(p)c();else if(p===!1)return a.push([d,f])}if(!l){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var y=g.ownerDocument||g;if(f&&n.hasCssString(f,g))return null;f&&(d+=` +/*# sourceURL=ace/css/`+f+" */");var b=n.createElement("style");b.appendChild(y.createTextNode(d)),f&&(b.id=f),g==y&&(g=n.getDocumentHead(y)),g.insertBefore(b,g.firstChild)}}}if(n.importCssString=u,n.importCssStylsheet=function(d,f){n.buildDom(["link",{rel:"stylesheet",href:d}],n.getDocumentHead(f))},n.scrollbarWidth=function(d){var f=n.createElement("ace_inner");f.style.width="100%",f.style.minWidth="0px",f.style.height="200px",f.style.display="block";var p=n.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(f);var y=d&&d.documentElement||document&&document.documentElement;if(!y)return 0;y.appendChild(p);var b=f.offsetWidth;g.overflow="scroll";var v=f.offsetWidth;return b===v&&(v=p.clientWidth),y.removeChild(p),b-v},n.computedStyle=function(d,f){return window.getComputedStyle(d,"")||{}},n.setStyle=function(d,f,p){d[f]!==p&&(d[f]=p)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=s.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,s.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var h=document.createElement("div");n.HI_DPI&&h.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!s.isEdge&&typeof h.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),h=null}n.HAS_CSS_TRANSFORMS?n.translate=function(d,f,p){d.style.transform="translate("+Math.round(f)+"px, "+Math.round(p)+"px)"}:n.translate=function(d,f,p){d.style.top=Math.round(p)+"px",d.style.left=Math.round(f)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("./dom");n.get=function(o,l){var a=new XMLHttpRequest;a.open("GET",o,!0),a.onreadystatechange=function(){a.readyState===4&&l(a.responseText)},a.send(null)},n.loadScript=function(o,l){var a=s.getDocumentHead(),c=document.createElement("script");c.src=o,a.appendChild(c),c.onload=c.onreadystatechange=function(u,h){(h||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,h||l())}},n.qualifyURL=function(o){var l=document.createElement("a");return l.href=o,l.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(r,n,i){n.inherits=function(s,o){s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(s,o){for(var l in o)s[l]=o[l];return s},n.implement=function(s,o){n.mixin(s,o)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(r,n,i){var s={},o=function(){this.propagationStopped=!0},l=function(){this.defaultPrevented=!0};s._emit=s._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var u=this._eventRegistry[a]||[],h=this._defaultHandlers[a];if(!(!u.length&&!h)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=o),c.preventDefault||(c.preventDefault=l),u=u.slice();for(var d=0;d1&&(b=g[g.length-2]);var E=c[p+"Path"];return E==null?E=c.basePath:y=="/"&&(p=y=""),E&&E.slice(-1)!="/"&&(E+="/"),E+p+y+b+this.get("suffix")},n.setModuleUrl=function(f,p){return c.$moduleUrls[f]=p};var u=function(f,p){if(f==="ace/theme/textmate"||f==="./theme/textmate")return p(null,r("./theme/textmate"));if(h)return h(f,p);console.error("loader is not configured")},h;n.setLoader=function(f){h=f},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(f,p){var g;if(Array.isArray(f))var y=f[0],b=f[1];else if(typeof f=="string")var b=f;var v=function(E){if(E&&!n.$loading[b])return p&&p(E);if(n.$loading[b]||(n.$loading[b]=[]),n.$loading[b].push(p),!(n.$loading[b].length>1)){var D=function(){u(b,function(C,w){w&&(n.$loaded[b]=w),n._emit("load.module",{name:b,module:w});var T=n.$loading[b];n.$loading[b]=null,T.forEach(function(A){A&&A(w)})})};if(!n.get("packaged"))return D();o.loadScript(n.moduleUrl(b,y),D),d()}};if(n.dynamicModules[b])n.dynamicModules[b]().then(function(E){E.default?v(E.default):v(E)});else{try{g=this.$require(b)}catch{}v(g||n.$loaded[b])}},n.$require=function(f){if(typeof i.require=="function"){var p="require";return i[p](f)}},n.setModuleLoader=function(f,p){n.dynamicModules[f]=p};var d=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),d=function(){})};n.version="1.34.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(r,n,i){r("./lib/fixoldbrowsers");var s=r("./config");s.setLoader(function(c,u){r([c],function(h){u(null,h)})});var o=function(){return this||typeof window<"u"&&window}();i.exports=function(c){s.init=a,s.$require=r,c.require=r},a(!0);function a(c){if(!(!o||!o.document)){s.set("packaged",c||r.packaged||i.packaged||o.define&&(void 0).packaged);var u={},h="",d=document.currentScript||document._currentScript,f=d&&d.ownerDocument||document;d&&d.src&&(h=d.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),g=0;g ["+this.end.row+"/"+this.end.column+"]"},o.prototype.contains=function(a,l){return this.compare(a,l)==0},o.prototype.compareRange=function(a){var l,c=a.end,u=a.start;return l=this.compare(c.row,c.column),l==1?(l=this.compare(u.row,u.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(u.row,u.column),l==-1?-1:l==1?42:0)},o.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},o.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},o.prototype.intersects=function(a){var l=this.compareRange(a);return l==-1||l==0||l==1},o.prototype.isEnd=function(a,l){return this.end.row==a&&this.end.column==l},o.prototype.isStart=function(a,l){return this.start.row==a&&this.start.column==l},o.prototype.setStart=function(a,l){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=l)},o.prototype.setEnd=function(a,l){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=l)},o.prototype.inside=function(a,l){return this.compare(a,l)==0?!(this.isEnd(a,l)||this.isStart(a,l)):!1},o.prototype.insideStart=function(a,l){return this.compare(a,l)==0?!this.isEnd(a,l):!1},o.prototype.insideEnd=function(a,l){return this.compare(a,l)==0?!this.isStart(a,l):!1},o.prototype.compare=function(a,l){return!this.isMultiLine()&&a===this.start.row?lthis.end.column?1:0:athis.end.row?1:this.start.row===a?l>=this.start.column?0:-1:this.end.row===a?l<=this.end.column?0:1:0},o.prototype.compareStart=function(a,l){return this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.compareEnd=function(a,l){return this.end.row==a&&this.end.column==l?1:this.compare(a,l)},o.prototype.compareInside=function(a,l){return this.end.row==a&&this.end.column==l?1:this.start.row==a&&this.start.column==l?-1:this.compare(a,l)},o.prototype.clipRows=function(a,l){if(this.end.row>l)var c={row:l+1,column:0};else if(this.end.rowl)var u={row:l+1,column:0};else if(this.start.row1?(A++,A>4&&(A=1)):A=1,o.isIE){var _=Math.abs(P.clientX-$)>5||Math.abs(P.clientY-I)>5;(!N||_)&&(A=1),N&&clearTimeout(N),N=setTimeout(function(){N=null},D[A-1]||600),A==1&&($=P.clientX,I=P.clientY)}if(P._clicks=A,C[w]("mousedown",P),A>4)A=0;else if(A>1)return C[w](L[A],P)}Array.isArray(E)||(E=[E]),E.forEach(function(P){f(P,"mousedown",F,T)})};function g(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}n.getModifierString=function(E){return s.KEY_MODS[g(E)]};function y(E,D,C){var w=g(D);if(!C&&D.code&&(C=s.$codeToKeyCode[D.code]||C),!o.isMac&&a){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(w|=8),a.altGr)if((3&w)!=3)a.altGr=0;else return;if(C===18||C===17){var T=D.location;if(C===17&&T===1)a[C]==1&&(l=D.timeStamp);else if(C===18&&w===3&&T===2){var A=D.timeStamp-l;A<50&&(a.altGr=!0)}}}if(C in s.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&D.location===3&&(E(D,w,-C),D.defaultPrevented))){if(o.isChromeOS&&w&8){if(E(D,w,C),D.defaultPrevented)return;w&=-9}return!w&&!(C in s.FUNCTION_KEYS)&&!(C in s.PRINTABLE_KEYS)?!1:E(D,w,C)}}n.addCommandKeyListener=function(E,D,C){var w=null;f(E,"keydown",function(T){a[T.keyCode]=(a[T.keyCode]||0)+1;var A=y(D,T,T.keyCode);return w=T.defaultPrevented,A},C),f(E,"keypress",function(T){w&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(n.stopEvent(T),w=null)},C),f(E,"keyup",function(T){a[T.keyCode]=null},C),a||(b(),f(window,"focus",b))};function b(){a=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!o.isOldIE){var v=1;n.nextTick=function(E,D){D=D||window;var C="zero-timeout-message-"+v++,w=function(T){T.data==C&&(n.stopPropagation(T),p(D,"message",w),E())};f(D,"message",w),D.postMessage(C,"*")}}n.$idleBlocked=!1,n.onIdle=function(E,D){return setTimeout(function C(){n.$idleBlocked?setTimeout(C,100):E()},D)},n.$idleBlockId=null,n.blockIdle=function(E){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},E||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(r,n,i){var s;i.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(r,n,i){var s=r("../lib/event"),o=r("../config").nls,a=r("../lib/useragent"),l=r("../lib/dom"),c=r("../lib/lang"),u=r("../clipboard"),h=a.isChrome<18,d=a.isIE,f=a.isChrome>63,p=400,g=r("../lib/keys"),y=g.KEY_MODS,b=a.isIOS,v=b?/\s/:/\n/,E=a.isMobile,D;D=function(C,w){var T=l.createElement("textarea");T.className="ace_text-input",T.setAttribute("wrap","off"),T.setAttribute("autocorrect","off"),T.setAttribute("autocapitalize","off"),T.setAttribute("spellcheck","false"),T.style.opacity="0",C.insertBefore(T,C.firstChild);var A=!1,$=!1,I=!1,N=!1,L="";E||(T.style.fontSize="1px");var F=!1,P=!1,_="",M=0,B=0,R=0,G=Number.MAX_SAFE_INTEGER,q=Number.MIN_SAFE_INTEGER,ee=0;try{var Y=document.activeElement===T}catch{}this.setNumberOfExtraLines=function(ce){if(G=Number.MAX_SAFE_INTEGER,q=Number.MIN_SAFE_INTEGER,ce<0){ee=0;return}ee=ce},this.setAriaOptions=function(ce){if(ce.activeDescendant?(T.setAttribute("aria-haspopup","true"),T.setAttribute("aria-autocomplete",ce.inline?"both":"list"),T.setAttribute("aria-activedescendant",ce.activeDescendant)):(T.setAttribute("aria-haspopup","false"),T.setAttribute("aria-autocomplete","both"),T.removeAttribute("aria-activedescendant")),ce.role&&T.setAttribute("role",ce.role),ce.setLabel){T.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor"));var Te="";if(w.$textInputAriaLabel&&(Te+="".concat(w.$textInputAriaLabel,", ")),w.session){var Oe=w.session.selection.cursor.row;Te+=o("text-input.aria-label","Cursor at row $0",[Oe+1])}T.setAttribute("aria-label",Te)}},this.setAriaOptions({role:"textbox"}),s.addListener(T,"blur",function(ce){P||(w.onBlur(ce),Y=!1)},w),s.addListener(T,"focus",function(ce){if(!P){if(Y=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(ce),a.isEdge?setTimeout(Q):Q()}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:w.renderer.enableKeyboardAccessibility}),L||f||this.$focusScroll=="browser")return T.focus({preventScroll:!0});var ce=T.style.top;T.style.position="fixed",T.style.top="0px";try{var Te=T.getBoundingClientRect().top!=0}catch{return}var Oe=[];if(Te)for(var Ye=T.parentElement;Ye&&Ye.nodeType==1;)Oe.push(Ye),Ye.setAttribute("ace_nocontext","true"),!Ye.parentElement&&Ye.getRootNode?Ye=Ye.getRootNode().host:Ye=Ye.parentElement;T.focus({preventScroll:!0}),Te&&Oe.forEach(function(Dt){Dt.removeAttribute("ace_nocontext")}),setTimeout(function(){T.style.position="",T.style.top=="0px"&&(T.style.top=ce)},0)},this.blur=function(){T.blur()},this.isFocused=function(){return Y},w.on("beforeEndOperation",function(){var ce=w.curOp,Te=ce&&ce.command&&ce.command.name;if(Te!="insertstring"){var Oe=Te&&(ce.docChanged||ce.selectionChanged);I&&Oe&&(_=T.value="",oe()),Q()}});var X=function(ce,Te){for(var Oe=Te,Ye=1;Ye<=ce-G&&Ye<2*ee+1;Ye++)Oe+=w.session.getLine(ce-Ye).length+1;return Oe},Q=b?function(ce){if(!(!Y||A&&!ce||N)){ce||(ce="");var Te=` +`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(r,n,i){n.isDark=!1,n.cssClass="ace-tm",n.cssText=r("./textmate-css"),n.$id="ace/theme/textmate";var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(r,n,i){"no use strict";var s=r("./lib/lang"),o=r("./lib/net"),l=r("./lib/dom"),a=r("./lib/app_config").AppConfig;i.exports=n=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(f){if(!c.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return c[f]},n.set=function(f,p){if(c.hasOwnProperty(f))c[f]=p;else if(this.setDefaultValue("",f,p)==!1)throw new Error("Unknown config key: "+f);f=="useStrictCSP"&&l.useStrictCSP(p)},n.all=function(){return s.copyObject(c)},n.$modes={},n.moduleUrl=function(f,p){if(c.$moduleUrls[f])return c.$moduleUrls[f];var g=f.split("/");p=p||g[g.length-2]||"";var y=p=="snippets"?"/":"-",b=g[g.length-1];if(p=="worker"&&y=="-"){var v=new RegExp("^"+p+"[\\-_]|[\\-_]"+p+"$","g");b=b.replace(v,"")}(!b||b==p)&&g.length>1&&(b=g[g.length-2]);var E=c[p+"Path"];return E==null?E=c.basePath:y=="/"&&(p=y=""),E&&E.slice(-1)!="/"&&(E+="/"),E+p+y+b+this.get("suffix")},n.setModuleUrl=function(f,p){return c.$moduleUrls[f]=p};var u=function(f,p){if(f==="ace/theme/textmate"||f==="./theme/textmate")return p(null,r("./theme/textmate"));if(h)return h(f,p);console.error("loader is not configured")},h;n.setLoader=function(f){h=f},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(f,p){var g;if(Array.isArray(f))var y=f[0],b=f[1];else if(typeof f=="string")var b=f;var v=function(E){if(E&&!n.$loading[b])return p&&p(E);if(n.$loading[b]||(n.$loading[b]=[]),n.$loading[b].push(p),!(n.$loading[b].length>1)){var D=function(){u(b,function(C,w){w&&(n.$loaded[b]=w),n._emit("load.module",{name:b,module:w});var T=n.$loading[b];n.$loading[b]=null,T.forEach(function(A){A&&A(w)})})};if(!n.get("packaged"))return D();o.loadScript(n.moduleUrl(b,y),D),d()}};if(n.dynamicModules[b])n.dynamicModules[b]().then(function(E){E.default?v(E.default):v(E)});else{try{g=this.$require(b)}catch{}v(g||n.$loaded[b])}},n.$require=function(f){if(typeof i.require=="function"){var p="require";return i[p](f)}},n.setModuleLoader=function(f,p){n.dynamicModules[f]=p};var d=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),d=function(){})};n.version="1.34.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(r,n,i){r("./lib/fixoldbrowsers");var s=r("./config");s.setLoader(function(c,u){r([c],function(h){u(null,h)})});var o=function(){return this||typeof window<"u"&&window}();i.exports=function(c){s.init=l,s.$require=r,c.require=r},l(!0);function l(c){if(!(!o||!o.document)){s.set("packaged",c||r.packaged||i.packaged||o.define&&(void 0).packaged);var u={},h="",d=document.currentScript||document._currentScript,f=d&&d.ownerDocument||document;d&&d.src&&(h=d.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=f.getElementsByTagName("script"),g=0;g ["+this.end.row+"/"+this.end.column+"]"},o.prototype.contains=function(l,a){return this.compare(l,a)==0},o.prototype.compareRange=function(l){var a,c=l.end,u=l.start;return a=this.compare(c.row,c.column),a==1?(a=this.compare(u.row,u.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(u.row,u.column),a==-1?-1:a==1?42:0)},o.prototype.comparePoint=function(l){return this.compare(l.row,l.column)},o.prototype.containsRange=function(l){return this.comparePoint(l.start)==0&&this.comparePoint(l.end)==0},o.prototype.intersects=function(l){var a=this.compareRange(l);return a==-1||a==0||a==1},o.prototype.isEnd=function(l,a){return this.end.row==l&&this.end.column==a},o.prototype.isStart=function(l,a){return this.start.row==l&&this.start.column==a},o.prototype.setStart=function(l,a){typeof l=="object"?(this.start.column=l.column,this.start.row=l.row):(this.start.row=l,this.start.column=a)},o.prototype.setEnd=function(l,a){typeof l=="object"?(this.end.column=l.column,this.end.row=l.row):(this.end.row=l,this.end.column=a)},o.prototype.inside=function(l,a){return this.compare(l,a)==0?!(this.isEnd(l,a)||this.isStart(l,a)):!1},o.prototype.insideStart=function(l,a){return this.compare(l,a)==0?!this.isEnd(l,a):!1},o.prototype.insideEnd=function(l,a){return this.compare(l,a)==0?!this.isStart(l,a):!1},o.prototype.compare=function(l,a){return!this.isMultiLine()&&l===this.start.row?athis.end.column?1:0:lthis.end.row?1:this.start.row===l?a>=this.start.column?0:-1:this.end.row===l?a<=this.end.column?0:1:0},o.prototype.compareStart=function(l,a){return this.start.row==l&&this.start.column==a?-1:this.compare(l,a)},o.prototype.compareEnd=function(l,a){return this.end.row==l&&this.end.column==a?1:this.compare(l,a)},o.prototype.compareInside=function(l,a){return this.end.row==l&&this.end.column==a?1:this.start.row==l&&this.start.column==a?-1:this.compare(l,a)},o.prototype.clipRows=function(l,a){if(this.end.row>a)var c={row:a+1,column:0};else if(this.end.rowa)var u={row:a+1,column:0};else if(this.start.row1?(A++,A>4&&(A=1)):A=1,o.isIE){var _=Math.abs(P.clientX-$)>5||Math.abs(P.clientY-I)>5;(!N||_)&&(A=1),N&&clearTimeout(N),N=setTimeout(function(){N=null},D[A-1]||600),A==1&&($=P.clientX,I=P.clientY)}if(P._clicks=A,C[w]("mousedown",P),A>4)A=0;else if(A>1)return C[w](L[A],P)}Array.isArray(E)||(E=[E]),E.forEach(function(P){f(P,"mousedown",F,T)})};function g(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}n.getModifierString=function(E){return s.KEY_MODS[g(E)]};function y(E,D,C){var w=g(D);if(!C&&D.code&&(C=s.$codeToKeyCode[D.code]||C),!o.isMac&&l){if(D.getModifierState&&(D.getModifierState("OS")||D.getModifierState("Win"))&&(w|=8),l.altGr)if((3&w)!=3)l.altGr=0;else return;if(C===18||C===17){var T=D.location;if(C===17&&T===1)l[C]==1&&(a=D.timeStamp);else if(C===18&&w===3&&T===2){var A=D.timeStamp-a;A<50&&(l.altGr=!0)}}}if(C in s.MODIFIER_KEYS&&(C=-1),!(!w&&C===13&&D.location===3&&(E(D,w,-C),D.defaultPrevented))){if(o.isChromeOS&&w&8){if(E(D,w,C),D.defaultPrevented)return;w&=-9}return!w&&!(C in s.FUNCTION_KEYS)&&!(C in s.PRINTABLE_KEYS)?!1:E(D,w,C)}}n.addCommandKeyListener=function(E,D,C){var w=null;f(E,"keydown",function(T){l[T.keyCode]=(l[T.keyCode]||0)+1;var A=y(D,T,T.keyCode);return w=T.defaultPrevented,A},C),f(E,"keypress",function(T){w&&(T.ctrlKey||T.altKey||T.shiftKey||T.metaKey)&&(n.stopEvent(T),w=null)},C),f(E,"keyup",function(T){l[T.keyCode]=null},C),l||(b(),f(window,"focus",b))};function b(){l=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!o.isOldIE){var v=1;n.nextTick=function(E,D){D=D||window;var C="zero-timeout-message-"+v++,w=function(T){T.data==C&&(n.stopPropagation(T),p(D,"message",w),E())};f(D,"message",w),D.postMessage(C,"*")}}n.$idleBlocked=!1,n.onIdle=function(E,D){return setTimeout(function C(){n.$idleBlocked?setTimeout(C,100):E()},D)},n.$idleBlockId=null,n.blockIdle=function(E){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},E||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(r,n,i){var s;i.exports={lineMode:!1,pasteCancelled:function(){return s&&s>Date.now()-50?!0:s=!1},cancel:function(){s=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(r,n,i){var s=r("../lib/event"),o=r("../config").nls,l=r("../lib/useragent"),a=r("../lib/dom"),c=r("../lib/lang"),u=r("../clipboard"),h=l.isChrome<18,d=l.isIE,f=l.isChrome>63,p=400,g=r("../lib/keys"),y=g.KEY_MODS,b=l.isIOS,v=b?/\s/:/\n/,E=l.isMobile,D;D=function(C,w){var T=a.createElement("textarea");T.className="ace_text-input",T.setAttribute("wrap","off"),T.setAttribute("autocorrect","off"),T.setAttribute("autocapitalize","off"),T.setAttribute("spellcheck","false"),T.style.opacity="0",C.insertBefore(T,C.firstChild);var A=!1,$=!1,I=!1,N=!1,L="";E||(T.style.fontSize="1px");var F=!1,P=!1,_="",M=0,j=0,R=0,G=Number.MAX_SAFE_INTEGER,q=Number.MIN_SAFE_INTEGER,ee=0;try{var Y=document.activeElement===T}catch{}this.setNumberOfExtraLines=function(ce){if(G=Number.MAX_SAFE_INTEGER,q=Number.MIN_SAFE_INTEGER,ce<0){ee=0;return}ee=ce},this.setAriaOptions=function(ce){if(ce.activeDescendant?(T.setAttribute("aria-haspopup","true"),T.setAttribute("aria-autocomplete",ce.inline?"both":"list"),T.setAttribute("aria-activedescendant",ce.activeDescendant)):(T.setAttribute("aria-haspopup","false"),T.setAttribute("aria-autocomplete","both"),T.removeAttribute("aria-activedescendant")),ce.role&&T.setAttribute("role",ce.role),ce.setLabel){T.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor"));var Te="";if(w.$textInputAriaLabel&&(Te+="".concat(w.$textInputAriaLabel,", ")),w.session){var Oe=w.session.selection.cursor.row;Te+=o("text-input.aria-label","Cursor at row $0",[Oe+1])}T.setAttribute("aria-label",Te)}},this.setAriaOptions({role:"textbox"}),s.addListener(T,"blur",function(ce){P||(w.onBlur(ce),Y=!1)},w),s.addListener(T,"focus",function(ce){if(!P){if(Y=!0,l.isEdge)try{if(!document.hasFocus())return}catch{}w.onFocus(ce),l.isEdge?setTimeout(Q):Q()}},w),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:w.renderer.enableKeyboardAccessibility}),L||f||this.$focusScroll=="browser")return T.focus({preventScroll:!0});var ce=T.style.top;T.style.position="fixed",T.style.top="0px";try{var Te=T.getBoundingClientRect().top!=0}catch{return}var Oe=[];if(Te)for(var Ye=T.parentElement;Ye&&Ye.nodeType==1;)Oe.push(Ye),Ye.setAttribute("ace_nocontext","true"),!Ye.parentElement&&Ye.getRootNode?Ye=Ye.getRootNode().host:Ye=Ye.parentElement;T.focus({preventScroll:!0}),Te&&Oe.forEach(function(Dt){Dt.removeAttribute("ace_nocontext")}),setTimeout(function(){T.style.position="",T.style.top=="0px"&&(T.style.top=ce)},0)},this.blur=function(){T.blur()},this.isFocused=function(){return Y},w.on("beforeEndOperation",function(){var ce=w.curOp,Te=ce&&ce.command&&ce.command.name;if(Te!="insertstring"){var Oe=Te&&(ce.docChanged||ce.selectionChanged);I&&Oe&&(_=T.value="",oe()),Q()}});var X=function(ce,Te){for(var Oe=Te,Ye=1;Ye<=ce-G&&Ye<2*ee+1;Ye++)Oe+=w.session.getLine(ce-Ye).length+1;return Oe},Q=b?function(ce){if(!(!Y||A&&!ce||N)){ce||(ce="");var Te=` ab`+ce+`cde fg -`;Te!=T.value&&(T.value=_=Te);var Oe=4,Ye=4+(ce.length||(w.selection.isEmpty()?0:1));(M!=Oe||B!=Ye)&&T.setSelectionRange(Oe,Ye),M=Oe,B=Ye}}:function(){if(!(I||N)&&!(!Y&&!ke)){I=!0;var ce=0,Te=0,Oe="";if(w.session){var Ye=w.selection,Dt=Ye.getRange(),St=Ye.cursor.row;St===q+1?(G=q+1,q=G+2*ee):St===G-1?(q=G-1,G=q-2*ee):(Stq+1)&&(G=St>ee?St-ee:0,q=St>ee?St+ee:2*ee);for(var Nt=[],_t=G;_t<=q;_t++)Nt.push(w.session.getLine(_t));if(Oe=Nt.join(` +`;Te!=T.value&&(T.value=_=Te);var Oe=4,Ye=4+(ce.length||(w.selection.isEmpty()?0:1));(M!=Oe||j!=Ye)&&T.setSelectionRange(Oe,Ye),M=Oe,j=Ye}}:function(){if(!(I||N)&&!(!Y&&!ke)){I=!0;var ce=0,Te=0,Oe="";if(w.session){var Ye=w.selection,Dt=Ye.getRange(),St=Ye.cursor.row;St===q+1?(G=q+1,q=G+2*ee):St===G-1?(q=G-1,G=q-2*ee):(Stq+1)&&(G=St>ee?St-ee:0,q=St>ee?St+ee:2*ee);for(var Nt=[],_t=G;_t<=q;_t++)Nt.push(w.session.getLine(_t));if(Oe=Nt.join(` `),ce=X(Dt.start.row,Dt.start.column),Te=X(Dt.end.row,Dt.end.column),Dt.start.rowq){var Ft=w.session.getLine(q+1);Te=Dt.end.row>q+1?Ft.length:Dt.end.column,Te+=Oe.length+1,Oe=Oe+` `+Ft}else E&&St>0&&(Oe=` `+Oe,Te+=1,ce+=1);Oe.length>p&&(ce=_.length&&ce.value===_&&_&&ce.selectionEnd!==B},Z=function(ce){I||(A?A=!1:te(T)?(w.selectAll(),Q()):E&&T.selectionStart!=M&&Q())},de=null;this.setInputHandler=function(ce){de=ce},this.getInputHandler=function(){return de};var ke=!1,me=function(ce,Te){if(ke&&(ke=!1),$)return Q(),ce&&w.onPaste(ce),$=!1,"";for(var Oe=T.selectionStart,Ye=T.selectionEnd,Dt=M,St=_.length-B,Nt=ce,_t=ce.length-Oe,yt=ce.length-Ye,Ft=0;Dt>0&&_[Ft]==ce[Ft];)Ft++,Dt--;for(Nt=Nt.slice(Ft),Ft=1;St>0&&_.length-Ft>M-1&&_[_.length-Ft]==ce[ce.length-Ft];)Ft++,St--;_t-=Ft-1,yt-=Ft-1;var Rt=Nt.length-Ft+1;if(Rt<0&&(Dt=-Rt,Rt=0),Nt=Nt.slice(0,Rt),!Te&&!Nt&&!_t&&!Dt&&!St&&!yt)return"";N=!0;var sr=!1;return a.isAndroid&&Nt==". "&&(Nt=" ",sr=!0),Nt&&!Dt&&!St&&!_t&&!yt||F?w.onTextInput(Nt):w.onTextInput(Nt,{extendLeft:Dt,extendRight:St,restoreStart:_t,restoreEnd:yt}),N=!1,_=ce,M=Oe,B=Ye,R=yt,sr?` -`:Nt},Fe=function(ce){if(I)return De();if(ce&&ce.inputType){if(ce.inputType=="historyUndo")return w.execCommand("undo");if(ce.inputType=="historyRedo")return w.execCommand("redo")}var Te=T.value,Oe=me(Te,!0);(Te.length>p+100||v.test(Oe)||E&&M<1&&M==B)&&Q()},ze=function(ce,Te,Oe){var Ye=ce.clipboardData||window.clipboardData;if(!(!Ye||h)){var Dt=d||Oe?"Text":"text/plain";try{return Te?Ye.setData(Dt,Te)!==!1:Ye.getData(Dt)}catch(St){if(!Oe)return ze(St,Te,!0)}}},Xe=function(ce,Te){var Oe=w.getCopyText();if(!Oe)return s.preventDefault(ce);ze(ce,Oe)?(b&&(Q(Oe),A=Oe,setTimeout(function(){A=!1},10)),Te?w.onCut():w.onCopy(),s.preventDefault(ce)):(A=!0,T.value=Oe,T.select(),setTimeout(function(){A=!1,Q(),Te?w.onCut():w.onCopy()}))},$t=function(ce){Xe(ce,!0)},Pt=function(ce){Xe(ce,!1)},V=function(ce){var Te=ze(ce);u.pasteCancelled()||(typeof Te=="string"?(Te&&w.onPaste(Te,ce),a.isIE&&setTimeout(Q),s.preventDefault(ce)):(T.value="",$=!0))};s.addCommandKeyListener(T,function(ce,Te,Oe){if(!I)return w.onCommandKey(ce,Te,Oe)},w),s.addListener(T,"select",Z,w),s.addListener(T,"input",Fe,w),s.addListener(T,"cut",$t,w),s.addListener(T,"copy",Pt,w),s.addListener(T,"paste",V,w),(!("oncut"in T)||!("oncopy"in T)||!("onpaste"in T))&&s.addListener(C,"keydown",function(ce){if(!(a.isMac&&!ce.metaKey||!ce.ctrlKey))switch(ce.keyCode){case 67:Pt(ce);break;case 86:V(ce);break;case 88:$t(ce);break}},w);var Ee=function(ce){if(!(I||!w.onCompositionStart||w.$readOnly)&&(I={},!F)){ce.data&&(I.useTextareaForIME=!1),setTimeout(De,0),w._signal("compositionStart"),w.on("mousedown",ne);var Te=w.getSelectionRange();Te.end.row=Te.start.row,Te.end.column=Te.start.column,I.markerRange=Te,I.selectionStart=M,w.onCompositionStart(I),I.useTextareaForIME?(_=T.value="",M=0,B=0):(T.msGetInputContext&&(I.context=T.msGetInputContext()),T.getInputContext&&(I.context=T.getInputContext()))}},De=function(){if(!(!I||!w.onCompositionUpdate||w.$readOnly)){if(F)return ne();if(I.useTextareaForIME)w.onCompositionUpdate(T.value);else{var ce=T.value;me(ce),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+B-I.selectionStart+R)}}},oe=function(ce){!w.onCompositionEnd||w.$readOnly||(I=!1,w.onCompositionEnd(),w.off("mousedown",ne),ce&&Fe())};function ne(){P=!0,T.blur(),T.focus(),P=!1}var ge=c.delayedCall(De,50).schedule.bind(null,null);function Ie(ce){ce.keyCode==27&&T.value.lengthB&&_[yt]==` -`?Ft=g.end:_tB&&_.slice(0,yt).split(` -`).length>2?Ft=g.down:yt>B&&_[yt-1]==" "?(Ft=g.right,Rt=y.option):(yt>B||yt==B&&B!=M&&_t==yt)&&(Ft=g.right),_t!==yt&&(Rt|=y.shift),Ft){var sr=Te.onCommandKey({},Rt,Ft);if(!sr&&Te.commands){Ft=g.keyCodeToString(Ft);var tn=Te.commands.findKeyCommand(Rt,Ft);tn&&Te.execCommand(tn)}M=_t,B=yt,Q("")}}};document.addEventListener("selectionchange",St),Te.on("destroy",function(){document.removeEventListener("selectionchange",St)})}this.destroy=function(){T.parentElement&&T.parentElement.removeChild(T)}},n.TextInput=D,n.$setUserAgentForTests=function(C,w){E=C,b=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("../lib/useragent"),o=0,a=550,l=function(){function h(d){d.$clickSelection=null;var f=d.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(d)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(d)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(d)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(d)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(d));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){d[g]=this[g]},this),d.selectByLines=this.extendSelectionBy.bind(d,"getLineRange"),d.selectByWords=this.extendSelectionBy.bind(d,"getWordRange")}return h.prototype.onMouseDown=function(d){var f=d.inSelection(),p=d.getDocumentPosition();this.mousedownEvent=d;var g=this.editor,y=d.getButton();if(y!==0){var b=g.getSelectionRange(),v=b.isEmpty();(v||y==1)&&g.selection.moveToPosition(p),y==2&&(g.textInput.onContextMenu(d.domEvent),s.isMozilla||d.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(d);return}return this.captureMouse(d),this.startSelect(p,d.domEvent._clicks>1),d.preventDefault()},h.prototype.startSelect=function(d,f){d=d||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(d):f||p.selection.moveToPosition(d),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var d,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)d=this.$clickSelection.end;else if(g==1)d=this.$clickSelection.start;else{var y=u(this.$clickSelection,p);p=y.cursor,d=y.anchor}f.selection.setSelectionAnchor(d.row,d.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(d){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),y=p.selection[d](g.row,g.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(y.start),v=this.$clickSelection.comparePoint(y.end);if(b==-1&&v<=0)f=this.$clickSelection.end,(y.end.row!=g.row||y.end.column!=g.column)&&(g=y.start);else if(v==1&&b>=0)f=this.$clickSelection.start,(y.start.row!=g.row||y.start.column!=g.column)&&(g=y.end);else if(b==-1&&v==1)g=y.end,f=y.start;else{var E=u(this.$clickSelection,g);g=E.cursor,f=E.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){var d=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(d>o||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(d){var f=d.getDocumentPosition(),p=this.editor,g=p.session,y=g.getBracketRange(f);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},h.prototype.onTripleClick=function(d){var f=d.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},h.prototype.onQuadClick=function(d){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(d){if(!d.getAccelKey()){d.getShiftKey()&&d.wheelY&&!d.wheelX&&(d.wheelX=d.wheelY,d.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=d.domEvent.timeStamp,y=g-p.t,b=y?d.wheelX/y:p.vx,v=y?d.wheelY/y:p.vy;y=1&&f.renderer.isScrollableBy(d.wheelX*d.speed,0)&&(D=!0),E<=1&&f.renderer.isScrollableBy(0,d.wheelY*d.speed)&&(D=!0),D)p.allowed=g;else if(g-p.alloweda.clientHeight;l||o.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(r,n,i){var s=this&&this.__extends||function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,E){v.__proto__=E}||function(v,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");g(y,b);function v(){this.constructor=y}y.prototype=b===null?Object.create(b):(v.prototype=b.prototype,new v)}}(),o=this&&this.__values||function(g){var y=typeof Symbol=="function"&&Symbol.iterator,b=y&&g[y],v=0;if(b)return b.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&v>=g.length&&(g=void 0),{value:g&&g[v++],done:!g}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("./lib/dom");r("./lib/event");var l=r("./range").Range,c=r("./lib/scroll").preventParentScroll,u="ace_tooltip",h=function(){function g(y){this.isOpen=!1,this.$element=null,this.$parentNode=y}return g.prototype.$init=function(){return this.$element=a.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},g.prototype.getElement=function(){return this.$element||this.$init()},g.prototype.setText=function(y){this.getElement().textContent=y},g.prototype.setHtml=function(y){this.getElement().innerHTML=y},g.prototype.setPosition=function(y,b){this.getElement().style.left=y+"px",this.getElement().style.top=b+"px"},g.prototype.setClassName=function(y){a.addCssClass(this.getElement(),y)},g.prototype.setTheme=function(y){this.$element.className=u+" "+(y.isDark?"ace_dark ":"")+(y.cssClass||"")},g.prototype.show=function(y,b,v){y!=null&&this.setText(y),b!=null&&v!=null&&this.setPosition(b,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},g.prototype.hide=function(y){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},g.prototype.getHeight=function(){return this.getElement().offsetHeight},g.prototype.getWidth=function(){return this.getElement().offsetWidth},g.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},g}(),d=function(){function g(){this.popups=[]}return g.prototype.addPopup=function(y){this.popups.push(y),this.updatePopups()},g.prototype.removePopup=function(y){var b=this.popups.indexOf(y);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},g.prototype.updatePopups=function(){var y,b,v,E;this.popups.sort(function(L,F){return F.priority-L.priority});var D=[];try{for(var C=o(this.popups),w=C.next();!w.done;w=C.next()){var T=w.value,A=!0;try{for(var $=(v=void 0,o(D)),I=$.next();!I.done;I=$.next()){var N=I.value;if(this.doPopupsOverlap(N,T)){A=!1;break}}}catch(L){v={error:L}}finally{try{I&&!I.done&&(E=$.return)&&E.call($)}finally{if(v)throw v.error}}A?D.push(T):T.hide()}}catch(L){y={error:L}}finally{try{w&&!w.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}},g.prototype.doPopupsOverlap=function(y,b){var v=y.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return v.leftE.left&&v.topE.top},g}(),f=new d;n.popupManager=f,n.Tooltip=h;var p=function(g){s(y,g);function y(b){b===void 0&&(b=document.body);var v=g.call(this,b)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var E=v.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",v.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(v)),E.addEventListener("wheel",c),v}return y.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},y.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},y.prototype.onMouseMove=function(b,v){this.lastEvent=b,this.lastT=Date.now();var E=v.$mouseHandler.isMousePressed;if(this.isOpen){var D=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(D.row,D.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},y.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},y.prototype.isOutsideOfText=function(b){var v=b.editor,E=b.getDocumentPosition(),D=v.session.getLine(E.row);if(E.column==D.length){var C=v.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),w=v.session.documentToScreenPosition(E.row,E.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},y.prototype.setDataProvider=function(b){this.$gatherData=b},y.prototype.showForRange=function(b,v,E,D){var C=10;if(!(D&&D!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=b.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,b.session),this.range=l.fromPoints(v.start,v.end);var T=w.textToScreenCoordinates(v.start.row,v.start.column),A=w.scroller.getBoundingClientRect();T.pageX=f.length&&(f=void 0),{value:f&&f[y++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},a=r("../lib/dom"),l=r("../lib/event"),c=r("../tooltip").Tooltip,u=r("../config").nls;function h(f){var p=f.editor,g=p.renderer.$gutterLayer,y=new d(p);f.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var T=g.getRegion(w);if(T!="foldWidgets"){var A=w.getDocumentPosition().row,$=p.session.selection;if(w.getShiftKey())$.selectTo(A,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();f.$clickSelection=p.selection.getLineRange(A)}return f.setState("selectByLines"),f.captureMouse(w),w.preventDefault()}}});var b,v;function E(){var w=v.getDocumentPosition().row,T=p.session.getLength();if(w==T){var A=p.renderer.pixelToScreenCoordinates(0,v.y).row,$=v.$pos;if(A>p.session.documentToScreenRow($.row,$.column))return D()}if(y.showTooltip(w),!!y.isOpen)if(p.on("mousewheel",D),f.$tooltipFollowsMouse)C(v);else{var I=v.getGutterRow(),N=g.$lines.get(I);if(N){var L=N.element.querySelector(".ace_gutter_annotation"),F=L.getBoundingClientRect(),P=y.getElement().style;P.left=F.right+"px",P.top=F.bottom+"px"}else C(v)}}function D(){b&&(b=clearTimeout(b)),y.isOpen&&(y.hideTooltip(),p.off("mousewheel",D))}function C(w){y.setPosition(w.x,w.y)}f.editor.setDefaultHandler("guttermousemove",function(w){var T=w.domEvent.target||w.domEvent.srcElement;if(a.hasCssClass(T,"ace_fold-widget"))return D();y.isOpen&&f.$tooltipFollowsMouse&&C(w),v=w,!b&&(b=setTimeout(function(){b=null,v&&!f.isMousePressed?E():D()},50))}),l.addListener(p.renderer.$gutter,"mouseout",function(w){v=null,!(!y.isOpen||b)&&(b=setTimeout(function(){b=null,D()},50))},p),p.on("changeSession",D),p.on("input",D)}n.GutterHandler=h;var d=function(f){s(p,f);function p(g){var y=f.call(this,g.container)||this;return y.editor=g,y}return p.prototype.setPosition=function(g,y){var b=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),D=this.getHeight();g+=15,y+=15,g+E>b&&(g-=g+E-b),y+D>v&&(y-=20+D),c.prototype.setPosition.call(this,g,y)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:u("gutter-tooltip.aria-label.error.singular","error"),plural:u("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:u("gutter-tooltip.aria-label.warning.singular","warning"),plural:u("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:u("gutter-tooltip.aria-label.info.singular","information message"),plural:u("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var y=this.editor.renderer.$gutterLayer,b=y.$annotations[g],v;b?v={text:Array.from(b.text),type:Array.from(b.type)}:v={text:[],type:[]};var E=y.session.getFoldLine(g);if(E&&y.$showFoldedAnnotations){for(var D={error:[],warning:[],info:[]},C,w=g+1;w<=E.end.row;w++)if(y.$annotations[w])for(var T=0;T ").concat(v.text[w]);I[v.type[w].replace("_fold","")].push(L)}var F=[].concat(I.error,I.warning,I.info).join("
");this.setHtml(F),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(g){var y,b,v=[],E=["error","warning","info"];try{for(var D=o(E),C=D.next();!C.done;C=D.next()){var w=C.value;if(g[w].length){var T=g[w].length===1?p.annotationLabels[w].singular:p.annotationLabels[w].plural;v.push("".concat(g[w].length," ").concat(T))}}}catch(A){y={error:A}}finally{try{C&&!C.done&&(b=D.return)&&b.call(D)}finally{if(y)throw y.error}}return v.join(", ")},p}(c);n.GutterTooltip=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(r,n,i){var s=r("../lib/event"),o=r("../lib/useragent"),a=function(){function l(c,u){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=u,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return l.prototype.stopPropagation=function(){s.stopPropagation(this.domEvent),this.propagationStopped=!0},l.prototype.preventDefault=function(){s.preventDefault(this.domEvent),this.defaultPrevented=!0},l.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},l.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},l.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,u=this.editor.session.documentToScreenRow(c,0),h=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return u-h},l.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,u=c.getSelectionRange();if(u.isEmpty())this.$inSelection=!1;else{var h=this.getDocumentPosition();this.$inSelection=u.contains(h.row,h.column)}return this.$inSelection},l.prototype.getButton=function(){return s.getButton(this.domEvent)},l.prototype.getShiftKey=function(){return this.domEvent.shiftKey},l.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},l}();n.MouseEvent=a}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/event"),a=r("../lib/useragent"),l=200,c=200,u=5;function h(f){var p=f.editor,g=s.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var y=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];y.forEach(function(X){f[X]=this[X]},this),p.on("mousedown",this.onMouseDown.bind(f));var b=p.container,v,E,D,C,w,T,A=0,$,I,N,L,F;this.onDragStart=function(X){if(this.cancelDrag||!b.draggable){var Q=this;return setTimeout(function(){Q.startSelect(),Q.captureMouse(X)},0),X.preventDefault()}w=p.getSelectionRange();var te=X.dataTransfer;te.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),te.setDragImage&&te.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),te.clearData(),te.setData("Text",p.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(X){if(b.draggable=!1,I=!1,this.setState(null),!p.getReadOnly()){var Q=X.dataTransfer.dropEffect;!$&&Q=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(X){if(!(p.getReadOnly()||!ee(X.dataTransfer)))return E=X.clientX,D=X.clientY,v||B(),A++,X.dataTransfer.dropEffect=$=Y(X),o.preventDefault(X)},this.onDragOver=function(X){if(!(p.getReadOnly()||!ee(X.dataTransfer)))return E=X.clientX,D=X.clientY,v||(B(),A++),G!==null&&(G=null),X.dataTransfer.dropEffect=$=Y(X),o.preventDefault(X)},this.onDragLeave=function(X){if(A--,A<=0&&v)return R(),$=null,o.preventDefault(X)},this.onDrop=function(X){if(T){var Q=X.dataTransfer;if(I)switch($){case"move":w.contains(T.row,T.column)?w={start:T,end:T}:w=p.moveText(w,T);break;case"copy":w=p.moveText(w,T,!0);break}else{var te=Q.getData("Text");w={start:T,end:p.session.insert(T,te)},p.focus(),$=null}return R(),o.preventDefault(X)}},o.addListener(b,"dragstart",this.onDragStart.bind(f),p),o.addListener(b,"dragend",this.onDragEnd.bind(f),p),o.addListener(b,"dragenter",this.onDragEnter.bind(f),p),o.addListener(b,"dragover",this.onDragOver.bind(f),p),o.addListener(b,"dragleave",this.onDragLeave.bind(f),p),o.addListener(b,"drop",this.onDrop.bind(f),p);function P(X,Q){var te=Date.now(),Z=!Q||X.row!=Q.row,de=!Q||X.column!=Q.column;if(!L||Z||de)p.moveCursorToPosition(X),L=te,F={x:E,y:D};else{var ke=d(F.x,F.y,E,D);ke>u?L=null:te-L>=c&&(p.renderer.scrollCursorIntoView(),L=null)}}function _(X,Q){var te=Date.now(),Z=p.renderer.layerConfig.lineHeight,de=p.renderer.layerConfig.characterWidth,ke=p.renderer.scroller.getBoundingClientRect(),me={x:{left:E-ke.left,right:ke.right-E},y:{top:D-ke.top,bottom:ke.bottom-D}},Fe=Math.min(me.x.left,me.x.right),ze=Math.min(me.y.top,me.y.bottom),Xe={row:X.row,column:X.column};Fe/de<=2&&(Xe.column+=me.x.left=l&&p.renderer.scrollCursorIntoView(Xe):N=te:N=null}function M(){var X=T;T=p.renderer.screenToTextCoordinates(E,D),P(T,X),_(T,X)}function B(){w=p.selection.toOrientedRange(),v=p.session.addMarker(w,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),M(),C=setInterval(M,20),A=0,o.addListener(document,"mousemove",q)}function R(){clearInterval(C),p.session.removeMarker(v),v=null,p.selection.fromOrientedRange(w),p.isFocused()&&!I&&p.$resetCursorStyle(),w=null,T=null,A=0,N=null,L=null,o.removeListener(document,"mousemove",q)}var G=null;function q(){G==null&&(G=setTimeout(function(){G!=null&&v&&R()},20))}function ee(X){var Q=X.types;return!Q||Array.prototype.some.call(Q,function(te){return te=="text/plain"||te=="Text"})}function Y(X){var Q=["copy","copymove","all","uninitialized"],te=["move","copymove","linkmove","all","uninitialized"],Z=a.isMac?X.altKey:X.ctrlKey,de="uninitialized";try{de=X.dataTransfer.effectAllowed.toLowerCase()}catch{}var ke="none";return Z&&Q.indexOf(de)>=0?ke="copy":te.indexOf(de)>=0?ke="move":Q.indexOf(de)>=0&&(ke="copy"),ke}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=a.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(a.isIE&&this.state=="dragReady"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),y=f.getButton(),b=f.domEvent.detail||1;if(b===1&&y===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),p.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var E=p.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(h.prototype);function d(f,p,g,y){return Math.sqrt(Math.pow(g-f,2)+Math.pow(y-p,2))}n.DragdropHandler=h}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(r,n,i){var s=r("./mouse_event").MouseEvent,o=r("../lib/event"),a=r("../lib/dom");n.addTouchListeners=function(l,c){var u="scroll",h,d,f,p,g,y,b=0,v,E=0,D=0,C=0,w,T;function A(){var P=window.navigator&&window.navigator.clipboard,_=!1,M=function(){var R=c.getCopyText(),G=c.session.getUndoManager().hasUndo();T.replaceChild(a.buildDom(_?["span",!R&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],P&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],G&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),T.firstChild)},B=function(R){var G=R.target.getAttribute("action");if(G=="more"||!_)return _=!_,M();G=="paste"?P.readText().then(function(q){c.execCommand(G,q)}):G&&((G=="cut"||G=="copy")&&(P?P.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(G)),T.firstChild.style.display="none",_=!1,G!="openCommandPalette"&&c.focus()};T=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){u="menu",R.stopPropagation(),R.preventDefault(),c.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),B(R)},onclick:B},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function $(){T||A();var P=c.selection.cursor,_=c.renderer.textToScreenCoordinates(P.row,P.column),M=c.renderer.textToScreenCoordinates(0,0).pageX,B=c.renderer.scrollLeft,R=c.container.getBoundingClientRect();T.style.top=_.pageY-R.top-3+"px",_.pageX-R.left=2?c.selection.getLineRange(v.row):c.session.getBracketRange(v);P&&!P.isEmpty()?c.selection.setRange(P):c.selection.selectWord(),u="wait"}o.addListener(l,"contextmenu",function(P){if(w){var _=c.textInput.getElement();_.focus()}},c),o.addListener(l,"touchstart",function(P){var _=P.touches;if(g||_.length>1){clearTimeout(g),g=null,f=-1,u="zoom";return}w=c.$mouseHandler.isMousePressed=!0;var M=c.renderer.layerConfig.lineHeight,B=c.renderer.layerConfig.lineHeight,R=P.timeStamp;p=R;var G=_[0],q=G.clientX,ee=G.clientY;Math.abs(h-q)+Math.abs(d-ee)>M&&(f=-1),h=P.clientX=q,d=P.clientY=ee,D=C=0;var Y=new s(P,c);if(v=Y.getDocumentPosition(),R-f<500&&_.length==1&&!b)E++,P.preventDefault(),P.button=0,L();else{E=0;var X=c.selection.cursor,Q=c.selection.isEmpty()?X:c.selection.anchor,te=c.renderer.$cursorLayer.getPixelPosition(X,!0),Z=c.renderer.$cursorLayer.getPixelPosition(Q,!0),de=c.renderer.scroller.getBoundingClientRect(),ke=c.renderer.layerConfig.offset,me=c.renderer.scrollLeft,Fe=function($t,Pt){return $t=$t/B,Pt=Pt/M-.75,$t*$t+Pt*Pt};if(P.clientXXe?"cursor":"anchor"),Xe<3.5?u="anchor":ze<3.5?u="cursor":u="scroll",g=setTimeout(N,450)}f=R},c),o.addListener(l,"touchend",function(P){w=c.$mouseHandler.isMousePressed=!1,y&&clearInterval(y),u=="zoom"?(u="",b=0):g?(c.selection.moveToPosition(v),b=0,$()):u=="scroll"?(F(),I()):$(),clearTimeout(g),g=null},c),o.addListener(l,"touchmove",function(P){g&&(clearTimeout(g),g=null);var _=P.touches;if(!(_.length>1||u=="zoom")){var M=_[0],B=h-M.clientX,R=d-M.clientY;if(u=="wait")if(B*B+R*R>4)u="cursor";else return P.preventDefault();h=M.clientX,d=M.clientY,P.clientX=M.clientX,P.clientY=M.clientY;var G=P.timeStamp,q=G-p;if(p=G,u=="scroll"){var ee=new s(P,c);ee.speed=1,ee.wheelX=B,ee.wheelY=R,10*Math.abs(B)0)if(Xe==16){for(V=Pt;V-1){for(V=Pt;V=0&&Z[oe]==w;oe--)Q[oe]=s}}}function q(X,Q,te){if(!(o=X){for(ke=de+1;ke=X;)ke++;for(me=de,Fe=ke-1;me=Q.length||(ke=te[Z-1])!=y&&ke!=b||(me=Q[Z+1])!=y&&me!=b?v:(a&&(me=b),me==ke?me:v);case A:return ke=Z>0?te[Z-1]:E,ke==y&&Z+10&&te[Z-1]==y)return y;if(a)return v;for(ze=Z+1,Fe=Q.length;ze=1425&&Xe<=2303||Xe==64286;if(ke=Q[ze],$t&&(ke==g||ke==C))return g}return Z<1||(ke=Q[Z-1])==E?v:te[Z-1];case E:return a=!1,l=!0,s;case D:return c=!0,v;case N:case L:case P:case _:case F:a=!1;case M:return v}}function Y(X){var Q=X.charCodeAt(0),te=Q>>8;return te==0?Q>191?p:B[Q]:te==5?/[\u0591-\u05f4]/.test(X)?g:p:te==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?I:/[\u0660-\u0669\u066b-\u066c]/.test(X)?b:Q==1642?$:/[\u06f0-\u06f9]/.test(X)?y:C:te==32&&Q<=8287?R[Q&255]:te==254&&Q>=65136?C:v}n.L=p,n.R=g,n.EN=y,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(X,Q,te){if(X.length<2)return{};var Z=X.split(""),de=new Array(Z.length),ke=new Array(Z.length),me=[];s=te?f:d,G(Z,me,Z.length,Q);for(var Fe=0;FeC&&Q[Fe]0&&Z[Fe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Z[Fe])&&(me[Fe-1]=me[Fe]=n.R_H,Fe++);Z[Z.length-1]===n.DOT&&(me[Z.length-1]=n.B),Z[0]==="‫"&&(me[0]=n.RLE);for(var Fe=0;Fe=0&&(u=this.session.$docRowCache[d])}return u},c.prototype.getSplitIndex=function(){var u=0,h=this.session.$screenRowCache;if(h.length)for(var d,f=this.session.$getRowCacheIndex(h,this.currentRow);this.currentRow-u>0&&(d=this.session.$getRowCacheIndex(h,this.currentRow-u-1),d===f);)f=d,u++;else u=this.currentRow;return u},c.prototype.updateRowLine=function(u,h){u===void 0&&(u=this.getDocumentRow());var d=u===this.session.getLength()-1,f=d?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(u),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[u];p&&(h===void 0&&(h=this.getSplitIndex()),h>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=hh?this.session.getOverwrite()?u:u-1:h,f=s.getVisualFromLogicalIdx(d,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&u<=h&&p[f]%2!==0&&f++;for(var y=0;yh&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},c.prototype.getSelections=function(u,h){var d=this.bidiMap,f=d.bidiLevels,p,g=[],y=0,b=Math.min(u,h)-this.wrapIndent,v=Math.max(u,h)-this.wrapIndent,E=!1,D=!1,C=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,T=0;T=b&&wf+y/2;){if(f+=y,p===g.length-1){y=0;break}y=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(d0&&g[p-1]%2===0&&g[p]%2!==0?h=1+(d>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&y===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?h=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&y!==0&&p--,h=this.bidiMap.logicalFromVisual[p]),h===0&&this.isRtlDir&&h++,h+this.wrapIndent},c}();n.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/lang"),a=r("./lib/event_emitter").EventEmitter,l=r("./range").Range,c=function(){function u(h){this.session=h,this.doc=h.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var d=this;this.cursor.on("change",function(f){d.$cursorChanged=!0,d.$silent||d._emit("changeCursor"),!d.$isEmpty&&!d.$silent&&d._emit("changeSelection"),!d.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(d.$desiredColumn=null)}),this.anchor.on("change",function(){d.$anchorChanged=!0,!d.$isEmpty&&!d.$silent&&d._emit("changeSelection")})}return u.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},u.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},u.prototype.getCursor=function(){return this.lead.getPosition()},u.prototype.setAnchor=function(h,d){this.$isEmpty=!1,this.anchor.setPosition(h,d)},u.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},u.prototype.getSelectionLead=function(){return this.lead.getPosition()},u.prototype.isBackwards=function(){var h=this.anchor,d=this.lead;return h.row>d.row||h.row==d.row&&h.column>d.column},u.prototype.getRange=function(){var h=this.anchor,d=this.lead;return this.$isEmpty?l.fromPoints(d,d):this.isBackwards()?l.fromPoints(d,h):l.fromPoints(h,d)},u.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},u.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},u.prototype.setRange=function(h,d){var f=d?h.end:h.start,p=d?h.start:h.end;this.$setSelection(f.row,f.column,p.row,p.column)},u.prototype.$setSelection=function(h,d,f,p){if(!this.$silent){var g=this.$isEmpty,y=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(h,d),this.cursor.setPosition(f,p),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||y)&&this._emit("changeSelection")}},u.prototype.$moveSelection=function(h){var d=this.lead;this.$isEmpty&&this.setSelectionAnchor(d.row,d.column),h.call(this)},u.prototype.selectTo=function(h,d){this.$moveSelection(function(){this.moveCursorTo(h,d)})},u.prototype.selectToPosition=function(h){this.$moveSelection(function(){this.moveCursorToPosition(h)})},u.prototype.moveTo=function(h,d){this.clearSelection(),this.moveCursorTo(h,d)},u.prototype.moveToPosition=function(h){this.clearSelection(),this.moveCursorToPosition(h)},u.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},u.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},u.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},u.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},u.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},u.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},u.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},u.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},u.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},u.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},u.prototype.getWordRange=function(h,d){if(typeof d>"u"){var f=h||this.lead;h=f.row,d=f.column}return this.session.getWordRange(h,d)},u.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},u.prototype.selectAWord=function(){var h=this.getCursor(),d=this.session.getAWordRange(h.row,h.column);this.setSelectionRange(d)},u.prototype.getLineRange=function(h,d){var f=typeof h=="number"?h:this.lead.row,p,g=this.session.getFoldLine(f);return g?(f=g.start.row,p=g.end.row):p=f,d===!0?new l(f,0,p,this.session.getLine(p).length):new l(f,0,p+1,0)},u.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},u.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},u.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},u.prototype.wouldMoveIntoSoftTab=function(h,d,f){var p=h.column,g=h.column+d;return f<0&&(p=h.column-d,g=h.column),this.session.isTabStop(h)&&this.doc.getLine(h.row).slice(p,g).split(" ").length-1==d},u.prototype.moveCursorLeft=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,-1))this.moveCursorTo(d.start.row,d.start.column);else if(h.column===0)h.row>0&&this.moveCursorTo(h.row-1,this.doc.getLine(h.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(h,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},u.prototype.moveCursorRight=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,1))this.moveCursorTo(d.end.row,d.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(d.column=p)}}this.moveCursorTo(d.row,d.column)},u.prototype.moveCursorFileEnd=function(){var h=this.doc.getLength()-1,d=this.doc.getLine(h).length;this.moveCursorTo(h,d)},u.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},u.prototype.moveCursorLongWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(h,d,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(p)&&(d+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(d)),d>=f.length){this.moveCursorTo(h,f.length),this.moveCursorRight(),h0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(d-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(h,d)},u.prototype.$shortWordEndIndex=function(h){var d=0,f,p=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(h))d=this.session.tokenRe.lastIndex;else{for(;(f=h[d])&&p.test(f);)d++;if(d<1){for(g.lastIndex=0;(f=h[d])&&!g.test(f);)if(g.lastIndex=0,d++,p.test(f))if(d>2){d--;break}else{for(;(f=h[d])&&p.test(f);)d++;if(d>2)break}}}return g.lastIndex=0,d},u.prototype.moveCursorShortWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d),g=this.session.getFoldAt(h,d,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(d==f.length){var y=this.doc.getLength();do h++,p=this.doc.getLine(h);while(h0&&/^\s*$/.test(p));d=p.length,/\s+$/.test(p)||(p="")}var g=o.stringReverse(p),y=this.$shortWordEndIndex(g);return this.moveCursorTo(h,d-y)},u.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},u.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},u.prototype.moveCursorBy=function(h,d){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(d===0&&(h!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),h!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];h<0?h-=g.rowsAbove||0:h>0&&(h+=g.rowCount-(g.rowsAbove||0))}var y=this.session.screenToDocumentPosition(f.row+h,f.column,p);h!==0&&d===0&&y.row===this.lead.row&&(y.column,this.lead.column),this.moveCursorTo(y.row,y.column+d,d===0)},u.prototype.moveCursorToPosition=function(h){this.moveCursorTo(h.row,h.column)},u.prototype.moveCursorTo=function(h,d,f){var p=this.session.getFoldAt(h,d,1);p&&(h=p.start.row,d=p.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(h);/[\uDC00-\uDFFF]/.test(g.charAt(d))&&g.charAt(d-1)&&(this.lead.row==h&&this.lead.column==d+1?d=d-1:d=d+1),this.lead.setPosition(h,d),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},u.prototype.moveCursorToScreen=function(h,d,f){var p=this.session.screenToDocumentPosition(h,d);this.moveCursorTo(p.row,p.column,f)},u.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},u.prototype.fromOrientedRange=function(h){this.setSelectionRange(h,h.cursor==h.start),this.$desiredColumn=h.desiredColumn||this.$desiredColumn},u.prototype.toOrientedRange=function(h){var d=this.getRange();return h?(h.start.column=d.start.column,h.start.row=d.start.row,h.end.column=d.end.column,h.end.row=d.end.row):h=d,h.cursor=this.isBackwards()?h.start:h.end,h.desiredColumn=this.$desiredColumn,h},u.prototype.getRangeOfMovements=function(h){var d=this.getCursor();try{h(this);var f=this.getCursor();return l.fromPoints(d,f)}catch{return l.fromPoints(d,d)}finally{this.moveCursorToPosition(d)}},u.prototype.toJSON=function(){if(this.rangeCount)var h=this.ranges.map(function(d){var f=d.clone();return f.isBackwards=d.cursor==d.start,f});else{var h=this.getRange();h.isBackwards=this.isBackwards()}return h},u.prototype.fromJSON=function(h){if(h.start==null)if(this.rangeList&&h.length>1){this.toSingleRange(h[0]);for(var d=h.length;d--;){var f=l.fromPoints(h[d].start,h[d].end);h[d].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else h=h[0];this.rangeList&&this.toSingleRange(h),this.setSelectionRange(h,h.isBackwards)},u.prototype.isEqual=function(h){if((h.length||this.rangeCount)&&h.length!=this.rangeCount)return!1;if(!h.length||!this.ranges)return this.getRange().isEqual(h);for(var d=this.ranges.length;d--;)if(!this.ranges[d].isEqual(h[d]))return!1;return!0},u}();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,s.implement(c.prototype,a),n.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(r,n,i){var s=r("./lib/report_error").reportError,o=2e3,a=function(){function l(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var u in this.states){for(var h=this.states[u],d=[],f=0,p=this.matchMappings[u]={defaultToken:"text"},g="g",y=[],b=0;b1?v.onMatch=this.$applyToken:v.onMatch=v.token),D>1&&(/\\\d/.test(v.regex)?E=v.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+f+1)}):(D=1,E=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&y.push(v)),p[f]=b,f+=D,d.push(E),v.onMatch||(v.onMatch=null)}}d.length||(p[0]=0,d.push("$")),y.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,g)},this),this.regExps[u]=new RegExp("("+d.join(")|(")+")|($)",g)}}return l.prototype.$setMaxTokenCount=function(c){o=c|0},l.prototype.$applyToken=function(c){var u=this.splitRegex.exec(c).slice(1),h=this.token.apply(this,u);if(typeof h=="string")return[{type:h,value:c}];for(var d=[],f=0,p=h.length;fv){var $=c.substring(v,A-T.length);D.type==C?D.value+=$:(D.type&&b.push(D),D={type:C,value:$})}for(var I=0;Io){for(E>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:u,line:c});v1&&h[0]!==d&&h.unshift("#tmp",d),{tokens:b,state:h.length?h:d}},l}();a.prototype.reportError=s,n.Tokenizer=a}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(r,n,i){var s=r("../lib/deep_copy").deepCopy,o;o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,u){if(!u){for(var h in c)this.$rules[h]=c[h];return}for(var h in c){for(var d=c[h],f=0;f=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},a.prototype.getCurrentTokenRow=function(){return this.$row},a.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,c=this.$tokenIndex,u=l[c].start;if(u!==void 0)return u;for(u=0;c>0;)c-=1,u+=l[c].value.length;return u},a.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},a.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new s(this.$row,c,this.$row,c+l.value.length)},a}();n.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator,l=r("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h,d={},f={'"':'"',"'":"'"},p=function(b){var v=-1;if(b.multiSelect&&(v=b.selection.index,d.rangeCount!=b.multiSelect.rangeCount&&(d={rangeCount:b.multiSelect.rangeCount})),d[v])return h=d[v];h=d[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(b,v,E,D){var C=b.end.row-b.start.row;return{text:E+v+D,selection:[0,b.start.column+1,C,b.end.column+(C?0:1)]}},y;y=function(b){b=b||{},this.add("braces","insertion",function(v,E,D,C,w){var T=D.getCursorPosition(),A=C.doc.getLine(T.row);if(w=="{"){p(D);var $=D.getSelectionRange(),I=C.doc.getTextRange($),N=C.getTokenAt(T.row,T.column);if(I!==""&&I!=="{"&&D.getWrapBehavioursEnabled())return g($,I,"{","}");if(N&&/(?:string)\.quasi|\.xml/.test(N.type)){var L=[/tag\-(?:open|name)/,/attribute\-name/];return L.some(function(G){return G.test(N.type)})||/(string)\.quasi/.test(N.type)&&N.value[T.column-N.start-1]!=="$"?void 0:(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]})}else if(y.isSaneInsertion(D,C))return/[\]\}\)]/.test(A[T.column])||D.inMultiSelectMode||b.braces?(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(D,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){p(D);var F=A.substring(T.column,T.column+1);if(F=="}"){var P=C.$findOpeningBracket("}",{column:T.column+1,row:T.row});if(P!==null&&y.isAutoInsertedClosing(T,A,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==` +`;Rt!=_&&(T.value=_=Rt,M=j=Rt.length)}if(ke&&(M=T.selectionStart,j=T.selectionEnd),j!=Te||M!=ce||T.selectionEnd!=j)try{T.setSelectionRange(ce,Te),M=ce,j=Te}catch{}I=!1}};this.resetSelection=Q,Y&&w.onFocus();var te=function(ce){return ce.selectionStart===0&&ce.selectionEnd>=_.length&&ce.value===_&&_&&ce.selectionEnd!==j},Z=function(ce){I||(A?A=!1:te(T)?(w.selectAll(),Q()):E&&T.selectionStart!=M&&Q())},de=null;this.setInputHandler=function(ce){de=ce},this.getInputHandler=function(){return de};var ke=!1,me=function(ce,Te){if(ke&&(ke=!1),$)return Q(),ce&&w.onPaste(ce),$=!1,"";for(var Oe=T.selectionStart,Ye=T.selectionEnd,Dt=M,St=_.length-j,Nt=ce,_t=ce.length-Oe,yt=ce.length-Ye,Ft=0;Dt>0&&_[Ft]==ce[Ft];)Ft++,Dt--;for(Nt=Nt.slice(Ft),Ft=1;St>0&&_.length-Ft>M-1&&_[_.length-Ft]==ce[ce.length-Ft];)Ft++,St--;_t-=Ft-1,yt-=Ft-1;var Rt=Nt.length-Ft+1;if(Rt<0&&(Dt=-Rt,Rt=0),Nt=Nt.slice(0,Rt),!Te&&!Nt&&!_t&&!Dt&&!St&&!yt)return"";N=!0;var sr=!1;return l.isAndroid&&Nt==". "&&(Nt=" ",sr=!0),Nt&&!Dt&&!St&&!_t&&!yt||F?w.onTextInput(Nt):w.onTextInput(Nt,{extendLeft:Dt,extendRight:St,restoreStart:_t,restoreEnd:yt}),N=!1,_=ce,M=Oe,j=Ye,R=yt,sr?` +`:Nt},Fe=function(ce){if(I)return De();if(ce&&ce.inputType){if(ce.inputType=="historyUndo")return w.execCommand("undo");if(ce.inputType=="historyRedo")return w.execCommand("redo")}var Te=T.value,Oe=me(Te,!0);(Te.length>p+100||v.test(Oe)||E&&M<1&&M==j)&&Q()},je=function(ce,Te,Oe){var Ye=ce.clipboardData||window.clipboardData;if(!(!Ye||h)){var Dt=d||Oe?"Text":"text/plain";try{return Te?Ye.setData(Dt,Te)!==!1:Ye.getData(Dt)}catch(St){if(!Oe)return je(St,Te,!0)}}},Xe=function(ce,Te){var Oe=w.getCopyText();if(!Oe)return s.preventDefault(ce);je(ce,Oe)?(b&&(Q(Oe),A=Oe,setTimeout(function(){A=!1},10)),Te?w.onCut():w.onCopy(),s.preventDefault(ce)):(A=!0,T.value=Oe,T.select(),setTimeout(function(){A=!1,Q(),Te?w.onCut():w.onCopy()}))},$t=function(ce){Xe(ce,!0)},Pt=function(ce){Xe(ce,!1)},V=function(ce){var Te=je(ce);u.pasteCancelled()||(typeof Te=="string"?(Te&&w.onPaste(Te,ce),l.isIE&&setTimeout(Q),s.preventDefault(ce)):(T.value="",$=!0))};s.addCommandKeyListener(T,function(ce,Te,Oe){if(!I)return w.onCommandKey(ce,Te,Oe)},w),s.addListener(T,"select",Z,w),s.addListener(T,"input",Fe,w),s.addListener(T,"cut",$t,w),s.addListener(T,"copy",Pt,w),s.addListener(T,"paste",V,w),(!("oncut"in T)||!("oncopy"in T)||!("onpaste"in T))&&s.addListener(C,"keydown",function(ce){if(!(l.isMac&&!ce.metaKey||!ce.ctrlKey))switch(ce.keyCode){case 67:Pt(ce);break;case 86:V(ce);break;case 88:$t(ce);break}},w);var Ee=function(ce){if(!(I||!w.onCompositionStart||w.$readOnly)&&(I={},!F)){ce.data&&(I.useTextareaForIME=!1),setTimeout(De,0),w._signal("compositionStart"),w.on("mousedown",ne);var Te=w.getSelectionRange();Te.end.row=Te.start.row,Te.end.column=Te.start.column,I.markerRange=Te,I.selectionStart=M,w.onCompositionStart(I),I.useTextareaForIME?(_=T.value="",M=0,j=0):(T.msGetInputContext&&(I.context=T.msGetInputContext()),T.getInputContext&&(I.context=T.getInputContext()))}},De=function(){if(!(!I||!w.onCompositionUpdate||w.$readOnly)){if(F)return ne();if(I.useTextareaForIME)w.onCompositionUpdate(T.value);else{var ce=T.value;me(ce),I.markerRange&&(I.context&&(I.markerRange.start.column=I.selectionStart=I.context.compositionStartOffset),I.markerRange.end.column=I.markerRange.start.column+j-I.selectionStart+R)}}},oe=function(ce){!w.onCompositionEnd||w.$readOnly||(I=!1,w.onCompositionEnd(),w.off("mousedown",ne),ce&&Fe())};function ne(){P=!0,T.blur(),T.focus(),P=!1}var ge=c.delayedCall(De,50).schedule.bind(null,null);function Ie(ce){ce.keyCode==27&&T.value.lengthj&&_[yt]==` +`?Ft=g.end:_tj&&_.slice(0,yt).split(` +`).length>2?Ft=g.down:yt>j&&_[yt-1]==" "?(Ft=g.right,Rt=y.option):(yt>j||yt==j&&j!=M&&_t==yt)&&(Ft=g.right),_t!==yt&&(Rt|=y.shift),Ft){var sr=Te.onCommandKey({},Rt,Ft);if(!sr&&Te.commands){Ft=g.keyCodeToString(Ft);var tn=Te.commands.findKeyCommand(Rt,Ft);tn&&Te.execCommand(tn)}M=_t,j=yt,Q("")}}};document.addEventListener("selectionchange",St),Te.on("destroy",function(){document.removeEventListener("selectionchange",St)})}this.destroy=function(){T.parentElement&&T.parentElement.removeChild(T)}},n.TextInput=D,n.$setUserAgentForTests=function(C,w){E=C,b=w}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(r,n,i){var s=r("../lib/useragent"),o=0,l=550,a=function(){function h(d){d.$clickSelection=null;var f=d.editor;f.setDefaultHandler("mousedown",this.onMouseDown.bind(d)),f.setDefaultHandler("dblclick",this.onDoubleClick.bind(d)),f.setDefaultHandler("tripleclick",this.onTripleClick.bind(d)),f.setDefaultHandler("quadclick",this.onQuadClick.bind(d)),f.setDefaultHandler("mousewheel",this.onMouseWheel.bind(d));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){d[g]=this[g]},this),d.selectByLines=this.extendSelectionBy.bind(d,"getLineRange"),d.selectByWords=this.extendSelectionBy.bind(d,"getWordRange")}return h.prototype.onMouseDown=function(d){var f=d.inSelection(),p=d.getDocumentPosition();this.mousedownEvent=d;var g=this.editor,y=d.getButton();if(y!==0){var b=g.getSelectionRange(),v=b.isEmpty();(v||y==1)&&g.selection.moveToPosition(p),y==2&&(g.textInput.onContextMenu(d.domEvent),s.isMozilla||d.preventDefault());return}if(this.mousedownEvent.time=Date.now(),f&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(d);return}return this.captureMouse(d),this.startSelect(p,d.domEvent._clicks>1),d.preventDefault()},h.prototype.startSelect=function(d,f){d=d||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(d):f||p.selection.moveToPosition(d),f||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},h.prototype.select=function(){var d,f=this.editor,p=f.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)d=this.$clickSelection.end;else if(g==1)d=this.$clickSelection.start;else{var y=u(this.$clickSelection,p);p=y.cursor,d=y.anchor}f.selection.setSelectionAnchor(d.row,d.column)}f.selection.selectToPosition(p),f.renderer.scrollCursorIntoView()},h.prototype.extendSelectionBy=function(d){var f,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),y=p.selection[d](g.row,g.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(y.start),v=this.$clickSelection.comparePoint(y.end);if(b==-1&&v<=0)f=this.$clickSelection.end,(y.end.row!=g.row||y.end.column!=g.column)&&(g=y.start);else if(v==1&&b>=0)f=this.$clickSelection.start,(y.start.row!=g.row||y.start.column!=g.column)&&(g=y.end);else if(b==-1&&v==1)g=y.end,f=y.start;else{var E=u(this.$clickSelection,g);g=E.cursor,f=E.anchor}p.selection.setSelectionAnchor(f.row,f.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},h.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},h.prototype.focusWait=function(){var d=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),f=Date.now();(d>o||f-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},h.prototype.onDoubleClick=function(d){var f=d.getDocumentPosition(),p=this.editor,g=p.session,y=g.getBracketRange(f);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=p.selection.getWordRange(f.row,f.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},h.prototype.onTripleClick=function(d){var f=d.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(f.row,f.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(f.row),this.select()},h.prototype.onQuadClick=function(d){var f=this.editor;f.selectAll(),this.$clickSelection=f.getSelectionRange(),this.setState("selectAll")},h.prototype.onMouseWheel=function(d){if(!d.getAccelKey()){d.getShiftKey()&&d.wheelY&&!d.wheelX&&(d.wheelX=d.wheelY,d.wheelY=0);var f=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=d.domEvent.timeStamp,y=g-p.t,b=y?d.wheelX/y:p.vx,v=y?d.wheelY/y:p.vy;y=1&&f.renderer.isScrollableBy(d.wheelX*d.speed,0)&&(D=!0),E<=1&&f.renderer.isScrollableBy(0,d.wheelY*d.speed)&&(D=!0),D)p.allowed=g;else if(g-p.allowedl.clientHeight;a||o.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(r,n,i){var s=this&&this.__extends||function(){var g=function(y,b){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,E){v.__proto__=E}||function(v,E){for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(v[D]=E[D])},g(y,b)};return function(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");g(y,b);function v(){this.constructor=y}y.prototype=b===null?Object.create(b):(v.prototype=b.prototype,new v)}}(),o=this&&this.__values||function(g){var y=typeof Symbol=="function"&&Symbol.iterator,b=y&&g[y],v=0;if(b)return b.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&v>=g.length&&(g=void 0),{value:g&&g[v++],done:!g}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},l=r("./lib/dom");r("./lib/event");var a=r("./range").Range,c=r("./lib/scroll").preventParentScroll,u="ace_tooltip",h=function(){function g(y){this.isOpen=!1,this.$element=null,this.$parentNode=y}return g.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=u,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},g.prototype.getElement=function(){return this.$element||this.$init()},g.prototype.setText=function(y){this.getElement().textContent=y},g.prototype.setHtml=function(y){this.getElement().innerHTML=y},g.prototype.setPosition=function(y,b){this.getElement().style.left=y+"px",this.getElement().style.top=b+"px"},g.prototype.setClassName=function(y){l.addCssClass(this.getElement(),y)},g.prototype.setTheme=function(y){this.$element.className=u+" "+(y.isDark?"ace_dark ":"")+(y.cssClass||"")},g.prototype.show=function(y,b,v){y!=null&&this.setText(y),b!=null&&v!=null&&this.setPosition(b,v),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},g.prototype.hide=function(y){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=u,this.isOpen=!1)},g.prototype.getHeight=function(){return this.getElement().offsetHeight},g.prototype.getWidth=function(){return this.getElement().offsetWidth},g.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},g}(),d=function(){function g(){this.popups=[]}return g.prototype.addPopup=function(y){this.popups.push(y),this.updatePopups()},g.prototype.removePopup=function(y){var b=this.popups.indexOf(y);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},g.prototype.updatePopups=function(){var y,b,v,E;this.popups.sort(function(L,F){return F.priority-L.priority});var D=[];try{for(var C=o(this.popups),w=C.next();!w.done;w=C.next()){var T=w.value,A=!0;try{for(var $=(v=void 0,o(D)),I=$.next();!I.done;I=$.next()){var N=I.value;if(this.doPopupsOverlap(N,T)){A=!1;break}}}catch(L){v={error:L}}finally{try{I&&!I.done&&(E=$.return)&&E.call($)}finally{if(v)throw v.error}}A?D.push(T):T.hide()}}catch(L){y={error:L}}finally{try{w&&!w.done&&(b=C.return)&&b.call(C)}finally{if(y)throw y.error}}},g.prototype.doPopupsOverlap=function(y,b){var v=y.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return v.leftE.left&&v.topE.top},g}(),f=new d;n.popupManager=f,n.Tooltip=h;var p=function(g){s(y,g);function y(b){b===void 0&&(b=document.body);var v=g.call(this,b)||this;v.timeout=void 0,v.lastT=0,v.idleTime=350,v.lastEvent=void 0,v.onMouseOut=v.onMouseOut.bind(v),v.onMouseMove=v.onMouseMove.bind(v),v.waitForHover=v.waitForHover.bind(v),v.hide=v.hide.bind(v);var E=v.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",v.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(v)),E.addEventListener("wheel",c),v}return y.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},y.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},y.prototype.onMouseMove=function(b,v){this.lastEvent=b,this.lastT=Date.now();var E=v.$mouseHandler.isMousePressed;if(this.isOpen){var D=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(D.row,D.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},y.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},y.prototype.isOutsideOfText=function(b){var v=b.editor,E=b.getDocumentPosition(),D=v.session.getLine(E.row);if(E.column==D.length){var C=v.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),w=v.session.documentToScreenPosition(E.row,E.column);if(w.column!=C.column||w.row!=C.row)return!0}return!1},y.prototype.setDataProvider=function(b){this.$gatherData=b},y.prototype.showForRange=function(b,v,E,D){var C=10;if(!(D&&D!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=b.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.addMarker(v,b.session),this.range=a.fromPoints(v.start,v.end);var T=w.textToScreenCoordinates(v.start.row,v.start.column),A=w.scroller.getBoundingClientRect();T.pageX=f.length&&(f=void 0),{value:f&&f[y++],done:!f}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},l=r("../lib/dom"),a=r("../lib/event"),c=r("../tooltip").Tooltip,u=r("../config").nls;function h(f){var p=f.editor,g=p.renderer.$gutterLayer,y=new d(p);f.editor.setDefaultHandler("guttermousedown",function(w){if(!(!p.isFocused()||w.getButton()!=0)){var T=g.getRegion(w);if(T!="foldWidgets"){var A=w.getDocumentPosition().row,$=p.session.selection;if(w.getShiftKey())$.selectTo(A,0);else{if(w.domEvent.detail==2)return p.selectAll(),w.preventDefault();f.$clickSelection=p.selection.getLineRange(A)}return f.setState("selectByLines"),f.captureMouse(w),w.preventDefault()}}});var b,v;function E(){var w=v.getDocumentPosition().row,T=p.session.getLength();if(w==T){var A=p.renderer.pixelToScreenCoordinates(0,v.y).row,$=v.$pos;if(A>p.session.documentToScreenRow($.row,$.column))return D()}if(y.showTooltip(w),!!y.isOpen)if(p.on("mousewheel",D),f.$tooltipFollowsMouse)C(v);else{var I=v.getGutterRow(),N=g.$lines.get(I);if(N){var L=N.element.querySelector(".ace_gutter_annotation"),F=L.getBoundingClientRect(),P=y.getElement().style;P.left=F.right+"px",P.top=F.bottom+"px"}else C(v)}}function D(){b&&(b=clearTimeout(b)),y.isOpen&&(y.hideTooltip(),p.off("mousewheel",D))}function C(w){y.setPosition(w.x,w.y)}f.editor.setDefaultHandler("guttermousemove",function(w){var T=w.domEvent.target||w.domEvent.srcElement;if(l.hasCssClass(T,"ace_fold-widget"))return D();y.isOpen&&f.$tooltipFollowsMouse&&C(w),v=w,!b&&(b=setTimeout(function(){b=null,v&&!f.isMousePressed?E():D()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(w){v=null,!(!y.isOpen||b)&&(b=setTimeout(function(){b=null,D()},50))},p),p.on("changeSession",D),p.on("input",D)}n.GutterHandler=h;var d=function(f){s(p,f);function p(g){var y=f.call(this,g.container)||this;return y.editor=g,y}return p.prototype.setPosition=function(g,y){var b=window.innerWidth||document.documentElement.clientWidth,v=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),D=this.getHeight();g+=15,y+=15,g+E>b&&(g-=g+E-b),y+D>v&&(y-=20+D),c.prototype.setPosition.call(this,g,y)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:u("gutter-tooltip.aria-label.error.singular","error"),plural:u("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:u("gutter-tooltip.aria-label.warning.singular","warning"),plural:u("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:u("gutter-tooltip.aria-label.info.singular","information message"),plural:u("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var y=this.editor.renderer.$gutterLayer,b=y.$annotations[g],v;b?v={text:Array.from(b.text),type:Array.from(b.type)}:v={text:[],type:[]};var E=y.session.getFoldLine(g);if(E&&y.$showFoldedAnnotations){for(var D={error:[],warning:[],info:[]},C,w=g+1;w<=E.end.row;w++)if(y.$annotations[w])for(var T=0;T ").concat(v.text[w]);I[v.type[w].replace("_fold","")].push(L)}var F=[].concat(I.error,I.warning,I.info).join("
");this.setHtml(F),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(g){var y,b,v=[],E=["error","warning","info"];try{for(var D=o(E),C=D.next();!C.done;C=D.next()){var w=C.value;if(g[w].length){var T=g[w].length===1?p.annotationLabels[w].singular:p.annotationLabels[w].plural;v.push("".concat(g[w].length," ").concat(T))}}}catch(A){y={error:A}}finally{try{C&&!C.done&&(b=D.return)&&b.call(D)}finally{if(y)throw y.error}}return v.join(", ")},p}(c);n.GutterTooltip=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(r,n,i){var s=r("../lib/event"),o=r("../lib/useragent"),l=function(){function a(c,u){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=u,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){s.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){s.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,u=this.editor.session.documentToScreenRow(c,0),h=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return u-h},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,u=c.getSelectionRange();if(u.isEmpty())this.$inSelection=!1;else{var h=this.getDocumentPosition();this.$inSelection=u.contains(h.row,h.column)}return this.$inSelection},a.prototype.getButton=function(){return s.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();n.MouseEvent=l}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/event"),l=r("../lib/useragent"),a=200,c=200,u=5;function h(f){var p=f.editor,g=s.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var y=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];y.forEach(function(X){f[X]=this[X]},this),p.on("mousedown",this.onMouseDown.bind(f));var b=p.container,v,E,D,C,w,T,A=0,$,I,N,L,F;this.onDragStart=function(X){if(this.cancelDrag||!b.draggable){var Q=this;return setTimeout(function(){Q.startSelect(),Q.captureMouse(X)},0),X.preventDefault()}w=p.getSelectionRange();var te=X.dataTransfer;te.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),te.setDragImage&&te.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),te.clearData(),te.setData("Text",p.session.getTextRange()),I=!0,this.setState("drag")},this.onDragEnd=function(X){if(b.draggable=!1,I=!1,this.setState(null),!p.getReadOnly()){var Q=X.dataTransfer.dropEffect;!$&&Q=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(X){if(!(p.getReadOnly()||!ee(X.dataTransfer)))return E=X.clientX,D=X.clientY,v||j(),A++,X.dataTransfer.dropEffect=$=Y(X),o.preventDefault(X)},this.onDragOver=function(X){if(!(p.getReadOnly()||!ee(X.dataTransfer)))return E=X.clientX,D=X.clientY,v||(j(),A++),G!==null&&(G=null),X.dataTransfer.dropEffect=$=Y(X),o.preventDefault(X)},this.onDragLeave=function(X){if(A--,A<=0&&v)return R(),$=null,o.preventDefault(X)},this.onDrop=function(X){if(T){var Q=X.dataTransfer;if(I)switch($){case"move":w.contains(T.row,T.column)?w={start:T,end:T}:w=p.moveText(w,T);break;case"copy":w=p.moveText(w,T,!0);break}else{var te=Q.getData("Text");w={start:T,end:p.session.insert(T,te)},p.focus(),$=null}return R(),o.preventDefault(X)}},o.addListener(b,"dragstart",this.onDragStart.bind(f),p),o.addListener(b,"dragend",this.onDragEnd.bind(f),p),o.addListener(b,"dragenter",this.onDragEnter.bind(f),p),o.addListener(b,"dragover",this.onDragOver.bind(f),p),o.addListener(b,"dragleave",this.onDragLeave.bind(f),p),o.addListener(b,"drop",this.onDrop.bind(f),p);function P(X,Q){var te=Date.now(),Z=!Q||X.row!=Q.row,de=!Q||X.column!=Q.column;if(!L||Z||de)p.moveCursorToPosition(X),L=te,F={x:E,y:D};else{var ke=d(F.x,F.y,E,D);ke>u?L=null:te-L>=c&&(p.renderer.scrollCursorIntoView(),L=null)}}function _(X,Q){var te=Date.now(),Z=p.renderer.layerConfig.lineHeight,de=p.renderer.layerConfig.characterWidth,ke=p.renderer.scroller.getBoundingClientRect(),me={x:{left:E-ke.left,right:ke.right-E},y:{top:D-ke.top,bottom:ke.bottom-D}},Fe=Math.min(me.x.left,me.x.right),je=Math.min(me.y.top,me.y.bottom),Xe={row:X.row,column:X.column};Fe/de<=2&&(Xe.column+=me.x.left=a&&p.renderer.scrollCursorIntoView(Xe):N=te:N=null}function M(){var X=T;T=p.renderer.screenToTextCoordinates(E,D),P(T,X),_(T,X)}function j(){w=p.selection.toOrientedRange(),v=p.session.addMarker(w,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),M(),C=setInterval(M,20),A=0,o.addListener(document,"mousemove",q)}function R(){clearInterval(C),p.session.removeMarker(v),v=null,p.selection.fromOrientedRange(w),p.isFocused()&&!I&&p.$resetCursorStyle(),w=null,T=null,A=0,N=null,L=null,o.removeListener(document,"mousemove",q)}var G=null;function q(){G==null&&(G=setTimeout(function(){G!=null&&v&&R()},20))}function ee(X){var Q=X.types;return!Q||Array.prototype.some.call(Q,function(te){return te=="text/plain"||te=="Text"})}function Y(X){var Q=["copy","copymove","all","uninitialized"],te=["move","copymove","linkmove","all","uninitialized"],Z=l.isMac?X.altKey:X.ctrlKey,de="uninitialized";try{de=X.dataTransfer.effectAllowed.toLowerCase()}catch{}var ke="none";return Z&&Q.indexOf(de)>=0?ke="copy":te.indexOf(de)>=0?ke="move":Q.indexOf(de)>=0&&(ke="copy"),ke}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,p=f.container;p.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var g=l.isWin?"default":"move";f.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(f){var p=this.editor.container;if(l.isIE&&this.state=="dragReady"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=d(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var p=this.editor,g=f.inSelection(),y=f.getButton(),b=f.domEvent.detail||1;if(b===1&&y===0&&g){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var v=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in v&&(v.unselectable="on"),p.getDragDelay()){if(l.isWebKit){this.cancelDrag=!0;var E=p.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(h.prototype);function d(f,p,g,y){return Math.sqrt(Math.pow(g-f,2)+Math.pow(y-p,2))}n.DragdropHandler=h}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(r,n,i){var s=r("./mouse_event").MouseEvent,o=r("../lib/event"),l=r("../lib/dom");n.addTouchListeners=function(a,c){var u="scroll",h,d,f,p,g,y,b=0,v,E=0,D=0,C=0,w,T;function A(){var P=window.navigator&&window.navigator.clipboard,_=!1,M=function(){var R=c.getCopyText(),G=c.session.getUndoManager().hasUndo();T.replaceChild(l.buildDom(_?["span",!R&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],P&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],G&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),T.firstChild)},j=function(R){var G=R.target.getAttribute("action");if(G=="more"||!_)return _=!_,M();G=="paste"?P.readText().then(function(q){c.execCommand(G,q)}):G&&((G=="cut"||G=="copy")&&(P?P.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(G)),T.firstChild.style.display="none",_=!1,G!="openCommandPalette"&&c.focus()};T=l.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){u="menu",R.stopPropagation(),R.preventDefault(),c.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),j(R)},onclick:j},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function $(){T||A();var P=c.selection.cursor,_=c.renderer.textToScreenCoordinates(P.row,P.column),M=c.renderer.textToScreenCoordinates(0,0).pageX,j=c.renderer.scrollLeft,R=c.container.getBoundingClientRect();T.style.top=_.pageY-R.top-3+"px",_.pageX-R.left=2?c.selection.getLineRange(v.row):c.session.getBracketRange(v);P&&!P.isEmpty()?c.selection.setRange(P):c.selection.selectWord(),u="wait"}o.addListener(a,"contextmenu",function(P){if(w){var _=c.textInput.getElement();_.focus()}},c),o.addListener(a,"touchstart",function(P){var _=P.touches;if(g||_.length>1){clearTimeout(g),g=null,f=-1,u="zoom";return}w=c.$mouseHandler.isMousePressed=!0;var M=c.renderer.layerConfig.lineHeight,j=c.renderer.layerConfig.lineHeight,R=P.timeStamp;p=R;var G=_[0],q=G.clientX,ee=G.clientY;Math.abs(h-q)+Math.abs(d-ee)>M&&(f=-1),h=P.clientX=q,d=P.clientY=ee,D=C=0;var Y=new s(P,c);if(v=Y.getDocumentPosition(),R-f<500&&_.length==1&&!b)E++,P.preventDefault(),P.button=0,L();else{E=0;var X=c.selection.cursor,Q=c.selection.isEmpty()?X:c.selection.anchor,te=c.renderer.$cursorLayer.getPixelPosition(X,!0),Z=c.renderer.$cursorLayer.getPixelPosition(Q,!0),de=c.renderer.scroller.getBoundingClientRect(),ke=c.renderer.layerConfig.offset,me=c.renderer.scrollLeft,Fe=function($t,Pt){return $t=$t/j,Pt=Pt/M-.75,$t*$t+Pt*Pt};if(P.clientXXe?"cursor":"anchor"),Xe<3.5?u="anchor":je<3.5?u="cursor":u="scroll",g=setTimeout(N,450)}f=R},c),o.addListener(a,"touchend",function(P){w=c.$mouseHandler.isMousePressed=!1,y&&clearInterval(y),u=="zoom"?(u="",b=0):g?(c.selection.moveToPosition(v),b=0,$()):u=="scroll"?(F(),I()):$(),clearTimeout(g),g=null},c),o.addListener(a,"touchmove",function(P){g&&(clearTimeout(g),g=null);var _=P.touches;if(!(_.length>1||u=="zoom")){var M=_[0],j=h-M.clientX,R=d-M.clientY;if(u=="wait")if(j*j+R*R>4)u="cursor";else return P.preventDefault();h=M.clientX,d=M.clientY,P.clientX=M.clientX,P.clientY=M.clientY;var G=P.timeStamp,q=G-p;if(p=G,u=="scroll"){var ee=new s(P,c);ee.speed=1,ee.wheelX=j,ee.wheelY=R,10*Math.abs(j)0)if(Xe==16){for(V=Pt;V-1){for(V=Pt;V=0&&Z[oe]==w;oe--)Q[oe]=s}}}function q(X,Q,te){if(!(o=X){for(ke=de+1;ke=X;)ke++;for(me=de,Fe=ke-1;me=Q.length||(ke=te[Z-1])!=y&&ke!=b||(me=Q[Z+1])!=y&&me!=b?v:(l&&(me=b),me==ke?me:v);case A:return ke=Z>0?te[Z-1]:E,ke==y&&Z+10&&te[Z-1]==y)return y;if(l)return v;for(je=Z+1,Fe=Q.length;je=1425&&Xe<=2303||Xe==64286;if(ke=Q[je],$t&&(ke==g||ke==C))return g}return Z<1||(ke=Q[Z-1])==E?v:te[Z-1];case E:return l=!1,a=!0,s;case D:return c=!0,v;case N:case L:case P:case _:case F:l=!1;case M:return v}}function Y(X){var Q=X.charCodeAt(0),te=Q>>8;return te==0?Q>191?p:j[Q]:te==5?/[\u0591-\u05f4]/.test(X)?g:p:te==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?I:/[\u0660-\u0669\u066b-\u066c]/.test(X)?b:Q==1642?$:/[\u06f0-\u06f9]/.test(X)?y:C:te==32&&Q<=8287?R[Q&255]:te==254&&Q>=65136?C:v}n.L=p,n.R=g,n.EN=y,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(X,Q,te){if(X.length<2)return{};var Z=X.split(""),de=new Array(Z.length),ke=new Array(Z.length),me=[];s=te?f:d,G(Z,me,Z.length,Q);for(var Fe=0;FeC&&Q[Fe]0&&Z[Fe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(Z[Fe])&&(me[Fe-1]=me[Fe]=n.R_H,Fe++);Z[Z.length-1]===n.DOT&&(me[Z.length-1]=n.B),Z[0]==="‫"&&(me[0]=n.RLE);for(var Fe=0;Fe=0&&(u=this.session.$docRowCache[d])}return u},c.prototype.getSplitIndex=function(){var u=0,h=this.session.$screenRowCache;if(h.length)for(var d,f=this.session.$getRowCacheIndex(h,this.currentRow);this.currentRow-u>0&&(d=this.session.$getRowCacheIndex(h,this.currentRow-u-1),d===f);)f=d,u++;else u=this.currentRow;return u},c.prototype.updateRowLine=function(u,h){u===void 0&&(u=this.getDocumentRow());var d=u===this.session.getLength()-1,f=d?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(u),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[u];p&&(h===void 0&&(h=this.getSplitIndex()),h>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[s.L],this.line=hh?this.session.getOverwrite()?u:u-1:h,f=s.getVisualFromLogicalIdx(d,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&u<=h&&p[f]%2!==0&&f++;for(var y=0;yh&&p[f]%2===0&&(g+=this.charWidths[p[f]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},c.prototype.getSelections=function(u,h){var d=this.bidiMap,f=d.bidiLevels,p,g=[],y=0,b=Math.min(u,h)-this.wrapIndent,v=Math.max(u,h)-this.wrapIndent,E=!1,D=!1,C=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var w,T=0;T=b&&wf+y/2;){if(f+=y,p===g.length-1){y=0;break}y=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(d0&&g[p-1]%2===0&&g[p]%2!==0?h=1+(d>f?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&y===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?h=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&y!==0&&p--,h=this.bidiMap.logicalFromVisual[p]),h===0&&this.isRtlDir&&h++,h+this.wrapIndent},c}();n.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/lang"),l=r("./lib/event_emitter").EventEmitter,a=r("./range").Range,c=function(){function u(h){this.session=h,this.doc=h.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var d=this;this.cursor.on("change",function(f){d.$cursorChanged=!0,d.$silent||d._emit("changeCursor"),!d.$isEmpty&&!d.$silent&&d._emit("changeSelection"),!d.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(d.$desiredColumn=null)}),this.anchor.on("change",function(){d.$anchorChanged=!0,!d.$isEmpty&&!d.$silent&&d._emit("changeSelection")})}return u.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},u.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},u.prototype.getCursor=function(){return this.lead.getPosition()},u.prototype.setAnchor=function(h,d){this.$isEmpty=!1,this.anchor.setPosition(h,d)},u.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},u.prototype.getSelectionLead=function(){return this.lead.getPosition()},u.prototype.isBackwards=function(){var h=this.anchor,d=this.lead;return h.row>d.row||h.row==d.row&&h.column>d.column},u.prototype.getRange=function(){var h=this.anchor,d=this.lead;return this.$isEmpty?a.fromPoints(d,d):this.isBackwards()?a.fromPoints(d,h):a.fromPoints(h,d)},u.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},u.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},u.prototype.setRange=function(h,d){var f=d?h.end:h.start,p=d?h.start:h.end;this.$setSelection(f.row,f.column,p.row,p.column)},u.prototype.$setSelection=function(h,d,f,p){if(!this.$silent){var g=this.$isEmpty,y=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(h,d),this.cursor.setPosition(f,p),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||g!=this.$isEmpty||y)&&this._emit("changeSelection")}},u.prototype.$moveSelection=function(h){var d=this.lead;this.$isEmpty&&this.setSelectionAnchor(d.row,d.column),h.call(this)},u.prototype.selectTo=function(h,d){this.$moveSelection(function(){this.moveCursorTo(h,d)})},u.prototype.selectToPosition=function(h){this.$moveSelection(function(){this.moveCursorToPosition(h)})},u.prototype.moveTo=function(h,d){this.clearSelection(),this.moveCursorTo(h,d)},u.prototype.moveToPosition=function(h){this.clearSelection(),this.moveCursorToPosition(h)},u.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},u.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},u.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},u.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},u.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},u.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},u.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},u.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},u.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},u.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},u.prototype.getWordRange=function(h,d){if(typeof d>"u"){var f=h||this.lead;h=f.row,d=f.column}return this.session.getWordRange(h,d)},u.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},u.prototype.selectAWord=function(){var h=this.getCursor(),d=this.session.getAWordRange(h.row,h.column);this.setSelectionRange(d)},u.prototype.getLineRange=function(h,d){var f=typeof h=="number"?h:this.lead.row,p,g=this.session.getFoldLine(f);return g?(f=g.start.row,p=g.end.row):p=f,d===!0?new a(f,0,p,this.session.getLine(p).length):new a(f,0,p+1,0)},u.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},u.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},u.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},u.prototype.wouldMoveIntoSoftTab=function(h,d,f){var p=h.column,g=h.column+d;return f<0&&(p=h.column-d,g=h.column),this.session.isTabStop(h)&&this.doc.getLine(h.row).slice(p,g).split(" ").length-1==d},u.prototype.moveCursorLeft=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,-1))this.moveCursorTo(d.start.row,d.start.column);else if(h.column===0)h.row>0&&this.moveCursorTo(h.row-1,this.doc.getLine(h.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(h,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},u.prototype.moveCursorRight=function(){var h=this.lead.getPosition(),d;if(d=this.session.getFoldAt(h.row,h.column,1))this.moveCursorTo(d.end.row,d.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(d.column=p)}}this.moveCursorTo(d.row,d.column)},u.prototype.moveCursorFileEnd=function(){var h=this.doc.getLength()-1,d=this.doc.getLine(h).length;this.moveCursorTo(h,d)},u.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},u.prototype.moveCursorLongWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var g=this.session.getFoldAt(h,d,1);if(g){this.moveCursorTo(g.end.row,g.end.column);return}if(this.session.nonTokenRe.exec(p)&&(d+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,p=f.substring(d)),d>=f.length){this.moveCursorTo(h,f.length),this.moveCursorRight(),h0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(g)&&(d-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(h,d)},u.prototype.$shortWordEndIndex=function(h){var d=0,f,p=/\s/,g=this.session.tokenRe;if(g.lastIndex=0,this.session.tokenRe.exec(h))d=this.session.tokenRe.lastIndex;else{for(;(f=h[d])&&p.test(f);)d++;if(d<1){for(g.lastIndex=0;(f=h[d])&&!g.test(f);)if(g.lastIndex=0,d++,p.test(f))if(d>2){d--;break}else{for(;(f=h[d])&&p.test(f);)d++;if(d>2)break}}}return g.lastIndex=0,d},u.prototype.moveCursorShortWordRight=function(){var h=this.lead.row,d=this.lead.column,f=this.doc.getLine(h),p=f.substring(d),g=this.session.getFoldAt(h,d,1);if(g)return this.moveCursorTo(g.end.row,g.end.column);if(d==f.length){var y=this.doc.getLength();do h++,p=this.doc.getLine(h);while(h0&&/^\s*$/.test(p));d=p.length,/\s+$/.test(p)||(p="")}var g=o.stringReverse(p),y=this.$shortWordEndIndex(g);return this.moveCursorTo(h,d-y)},u.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},u.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},u.prototype.moveCursorBy=function(h,d){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),p;if(d===0&&(h!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(p=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(p/this.session.$bidiHandler.charWidths[0])):p=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),h!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var g=this.session.lineWidgets[this.lead.row];h<0?h-=g.rowsAbove||0:h>0&&(h+=g.rowCount-(g.rowsAbove||0))}var y=this.session.screenToDocumentPosition(f.row+h,f.column,p);h!==0&&d===0&&y.row===this.lead.row&&(y.column,this.lead.column),this.moveCursorTo(y.row,y.column+d,d===0)},u.prototype.moveCursorToPosition=function(h){this.moveCursorTo(h.row,h.column)},u.prototype.moveCursorTo=function(h,d,f){var p=this.session.getFoldAt(h,d,1);p&&(h=p.start.row,d=p.start.column),this.$keepDesiredColumnOnChange=!0;var g=this.session.getLine(h);/[\uDC00-\uDFFF]/.test(g.charAt(d))&&g.charAt(d-1)&&(this.lead.row==h&&this.lead.column==d+1?d=d-1:d=d+1),this.lead.setPosition(h,d),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},u.prototype.moveCursorToScreen=function(h,d,f){var p=this.session.screenToDocumentPosition(h,d);this.moveCursorTo(p.row,p.column,f)},u.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},u.prototype.fromOrientedRange=function(h){this.setSelectionRange(h,h.cursor==h.start),this.$desiredColumn=h.desiredColumn||this.$desiredColumn},u.prototype.toOrientedRange=function(h){var d=this.getRange();return h?(h.start.column=d.start.column,h.start.row=d.start.row,h.end.column=d.end.column,h.end.row=d.end.row):h=d,h.cursor=this.isBackwards()?h.start:h.end,h.desiredColumn=this.$desiredColumn,h},u.prototype.getRangeOfMovements=function(h){var d=this.getCursor();try{h(this);var f=this.getCursor();return a.fromPoints(d,f)}catch{return a.fromPoints(d,d)}finally{this.moveCursorToPosition(d)}},u.prototype.toJSON=function(){if(this.rangeCount)var h=this.ranges.map(function(d){var f=d.clone();return f.isBackwards=d.cursor==d.start,f});else{var h=this.getRange();h.isBackwards=this.isBackwards()}return h},u.prototype.fromJSON=function(h){if(h.start==null)if(this.rangeList&&h.length>1){this.toSingleRange(h[0]);for(var d=h.length;d--;){var f=a.fromPoints(h[d].start,h[d].end);h[d].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else h=h[0];this.rangeList&&this.toSingleRange(h),this.setSelectionRange(h,h.isBackwards)},u.prototype.isEqual=function(h){if((h.length||this.rangeCount)&&h.length!=this.rangeCount)return!1;if(!h.length||!this.ranges)return this.getRange().isEqual(h);for(var d=this.ranges.length;d--;)if(!this.ranges[d].isEqual(h[d]))return!1;return!0},u}();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,s.implement(c.prototype,l),n.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(r,n,i){var s=r("./lib/report_error").reportError,o=2e3,l=function(){function a(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var u in this.states){for(var h=this.states[u],d=[],f=0,p=this.matchMappings[u]={defaultToken:"text"},g="g",y=[],b=0;b1?v.onMatch=this.$applyToken:v.onMatch=v.token),D>1&&(/\\\d/.test(v.regex)?E=v.regex.replace(/\\([0-9]+)/g,function(C,w){return"\\"+(parseInt(w,10)+f+1)}):(D=1,E=this.removeCapturingGroups(v.regex)),!v.splitRegex&&typeof v.token!="string"&&y.push(v)),p[f]=b,f+=D,d.push(E),v.onMatch||(v.onMatch=null)}}d.length||(p[0]=0,d.push("$")),y.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,g)},this),this.regExps[u]=new RegExp("("+d.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(c){o=c|0},a.prototype.$applyToken=function(c){var u=this.splitRegex.exec(c).slice(1),h=this.token.apply(this,u);if(typeof h=="string")return[{type:h,value:c}];for(var d=[],f=0,p=h.length;fv){var $=c.substring(v,A-T.length);D.type==C?D.value+=$:(D.type&&b.push(D),D={type:C,value:$})}for(var I=0;Io){for(E>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:u,line:c});v1&&h[0]!==d&&h.unshift("#tmp",d),{tokens:b,state:h.length?h:d}},a}();l.prototype.reportError=s,n.Tokenizer=l}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(r,n,i){var s=r("../lib/deep_copy").deepCopy,o;o=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,u){if(!u){for(var h in c)this.$rules[h]=c[h];return}for(var h in c){for(var d=c[h],f=0;f=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},l.prototype.getCurrentTokenRow=function(){return this.$row},l.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,u=a[c].start;if(u!==void 0)return u;for(u=0;c>0;)c-=1,u+=a[c].value.length;return u},l.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},l.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new s(this.$row,c,this.$row,c+a.value.length)},l}();n.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,l=r("../../token_iterator").TokenIterator,a=r("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h,d={},f={'"':'"',"'":"'"},p=function(b){var v=-1;if(b.multiSelect&&(v=b.selection.index,d.rangeCount!=b.multiSelect.rangeCount&&(d={rangeCount:b.multiSelect.rangeCount})),d[v])return h=d[v];h=d[v]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(b,v,E,D){var C=b.end.row-b.start.row;return{text:E+v+D,selection:[0,b.start.column+1,C,b.end.column+(C?0:1)]}},y;y=function(b){b=b||{},this.add("braces","insertion",function(v,E,D,C,w){var T=D.getCursorPosition(),A=C.doc.getLine(T.row);if(w=="{"){p(D);var $=D.getSelectionRange(),I=C.doc.getTextRange($),N=C.getTokenAt(T.row,T.column);if(I!==""&&I!=="{"&&D.getWrapBehavioursEnabled())return g($,I,"{","}");if(N&&/(?:string)\.quasi|\.xml/.test(N.type)){var L=[/tag\-(?:open|name)/,/attribute\-name/];return L.some(function(G){return G.test(N.type)})||/(string)\.quasi/.test(N.type)&&N.value[T.column-N.start-1]!=="$"?void 0:(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]})}else if(y.isSaneInsertion(D,C))return/[\]\}\)]/.test(A[T.column])||D.inMultiSelectMode||b.braces?(y.recordAutoInsert(D,C,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(D,C,"{"),{text:"{",selection:[1,1]})}else if(w=="}"){p(D);var F=A.substring(T.column,T.column+1);if(F=="}"){var P=C.$findOpeningBracket("}",{column:T.column+1,row:T.row});if(P!==null&&y.isAutoInsertedClosing(T,A,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(w==` `||w==`\r -`){p(D);var _="";y.isMaybeInsertedClosing(T,A)&&(_=l.stringRepeat("}",h.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var F=A.substring(T.column,T.column+1);if(F==="}"){var M=C.findMatchingBracket({row:T.row,column:T.column+1},"}");if(!M)return null;var B=this.$getIndent(C.getLine(M.row))}else if(_)var B=this.$getIndent(A);else{y.clearMaybeInsertedClosing();return}var R=B+C.getTabString();return{text:` +`){p(D);var _="";y.isMaybeInsertedClosing(T,A)&&(_=a.stringRepeat("}",h.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var F=A.substring(T.column,T.column+1);if(F==="}"){var M=C.findMatchingBracket({row:T.row,column:T.column+1},"}");if(!M)return null;var j=this.$getIndent(C.getLine(M.row))}else if(_)var j=this.$getIndent(A);else{y.clearMaybeInsertedClosing();return}var R=j+C.getTabString();return{text:` `+R+` -`+B+_,selection:[1,R.length,1,R.length]}}else y.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="{"){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.end.column,w.end.column+1);if($=="}")return w.end.column++,w;h.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,E,D,C,w){if(w=="("){p(D);var T=D.getSelectionRange(),A=C.doc.getTextRange(T);if(A!==""&&D.getWrapBehavioursEnabled())return g(T,A,"(",")");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){p(D);var $=D.getCursorPosition(),I=C.doc.getLine($.row),N=I.substring($.column,$.column+1);if(N==")"){var L=C.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(L!==null&&y.isAutoInsertedClosing($,I,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="("){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.start.column+1,w.start.column+2);if($==")")return w.end.column++,w}}),this.add("brackets","insertion",function(v,E,D,C,w){if(w=="["){p(D);var T=D.getSelectionRange(),A=C.doc.getTextRange(T);if(A!==""&&D.getWrapBehavioursEnabled())return g(T,A,"[","]");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){p(D);var $=D.getCursorPosition(),I=C.doc.getLine($.row),N=I.substring($.column,$.column+1);if(N=="]"){var L=C.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(L!==null&&y.isAutoInsertedClosing($,I,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="["){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.start.column+1,w.start.column+2);if($=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(v,E,D,C,w){var T=C.$mode.$quotes||f;if(w.length==1&&T[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;p(D);var A=w,$=D.getSelectionRange(),I=C.doc.getTextRange($);if(I!==""&&(I.length!=1||!T[I])&&D.getWrapBehavioursEnabled())return g($,I,A,A);if(!I){var N=D.getCursorPosition(),L=C.doc.getLine(N.row),F=L.substring(N.column-1,N.column),P=L.substring(N.column,N.column+1),_=C.getTokenAt(N.row,N.column),M=C.getTokenAt(N.row,N.column+1);if(F=="\\"&&_&&/escape/.test(_.type))return null;var B=_&&/string|escape/.test(_.type),R=!M||/string|escape/.test(M.type),G;if(P==A)G=B!==R,G&&/string\.end/.test(M.type)&&(G=!1);else{if(B&&!R||B&&R)return null;var q=C.$mode.tokenRe;q.lastIndex=0;var ee=q.test(F);q.lastIndex=0;var Y=q.test(P),X=C.$mode.$pairQuotesAfter,Q=X&&X[A]&&X[A].test(F);if(!Q&&ee||Y||P&&!/[\s;,.})\]\\]/.test(P))return null;var te=L[N.column-2];if(F==A&&(te==A||q.test(te)))return null;G=!0}return{text:G?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,E,D,C,w){var T=C.$mode.$quotes||f,A=C.doc.getTextRange(w);if(!w.isMultiLine()&&T.hasOwnProperty(A)){p(D);var $=C.doc.getLine(w.start.row),I=$.substring(w.start.column+1,w.start.column+2);if(I==A)return w.end.column++,w}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,E,D,C,w){if(v==="doc-start"&&(w===` +`+j+_,selection:[1,R.length,1,R.length]}}else y.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="{"){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.end.column,w.end.column+1);if($=="}")return w.end.column++,w;h.maybeInsertedBrackets--}}),this.add("parens","insertion",function(v,E,D,C,w){if(w=="("){p(D);var T=D.getSelectionRange(),A=C.doc.getTextRange(T);if(A!==""&&D.getWrapBehavioursEnabled())return g(T,A,"(",")");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,")"),{text:"()",selection:[1,1]}}else if(w==")"){p(D);var $=D.getCursorPosition(),I=C.doc.getLine($.row),N=I.substring($.column,$.column+1);if(N==")"){var L=C.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(L!==null&&y.isAutoInsertedClosing($,I,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="("){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.start.column+1,w.start.column+2);if($==")")return w.end.column++,w}}),this.add("brackets","insertion",function(v,E,D,C,w){if(w=="["){p(D);var T=D.getSelectionRange(),A=C.doc.getTextRange(T);if(A!==""&&D.getWrapBehavioursEnabled())return g(T,A,"[","]");if(y.isSaneInsertion(D,C))return y.recordAutoInsert(D,C,"]"),{text:"[]",selection:[1,1]}}else if(w=="]"){p(D);var $=D.getCursorPosition(),I=C.doc.getLine($.row),N=I.substring($.column,$.column+1);if(N=="]"){var L=C.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(L!==null&&y.isAutoInsertedClosing($,I,w))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(v,E,D,C,w){var T=C.doc.getTextRange(w);if(!w.isMultiLine()&&T=="["){p(D);var A=C.doc.getLine(w.start.row),$=A.substring(w.start.column+1,w.start.column+2);if($=="]")return w.end.column++,w}}),this.add("string_dquotes","insertion",function(v,E,D,C,w){var T=C.$mode.$quotes||f;if(w.length==1&&T[w]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(w)!=-1)return;p(D);var A=w,$=D.getSelectionRange(),I=C.doc.getTextRange($);if(I!==""&&(I.length!=1||!T[I])&&D.getWrapBehavioursEnabled())return g($,I,A,A);if(!I){var N=D.getCursorPosition(),L=C.doc.getLine(N.row),F=L.substring(N.column-1,N.column),P=L.substring(N.column,N.column+1),_=C.getTokenAt(N.row,N.column),M=C.getTokenAt(N.row,N.column+1);if(F=="\\"&&_&&/escape/.test(_.type))return null;var j=_&&/string|escape/.test(_.type),R=!M||/string|escape/.test(M.type),G;if(P==A)G=j!==R,G&&/string\.end/.test(M.type)&&(G=!1);else{if(j&&!R||j&&R)return null;var q=C.$mode.tokenRe;q.lastIndex=0;var ee=q.test(F);q.lastIndex=0;var Y=q.test(P),X=C.$mode.$pairQuotesAfter,Q=X&&X[A]&&X[A].test(F);if(!Q&&ee||Y||P&&!/[\s;,.})\]\\]/.test(P))return null;var te=L[N.column-2];if(F==A&&(te==A||q.test(te)))return null;G=!0}return{text:G?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(v,E,D,C,w){var T=C.$mode.$quotes||f,A=C.doc.getTextRange(w);if(!w.isMultiLine()&&T.hasOwnProperty(A)){p(D);var $=C.doc.getLine(w.start.row),I=$.substring(w.start.column+1,w.start.column+2);if(I==A)return w.end.column++,w}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(v,E,D,C,w){if(v==="doc-start"&&(w===` `||w===`\r -`)&&D.selection.isEmpty()){var T=D.getCursorPosition(),A=C.doc.getLine(T.row),$=C.doc.getLine(T.row+1),I=this.$getIndent(A);if(/\s*\*/.test($))return/^\s*\*/.test(A)?{text:w+I+"* ",selection:[1,3+I.length,1,3+I.length]}:{text:w+I+" * ",selection:[1,3+I.length,1,3+I.length]};if(/\/\*\*/.test(A.substring(0,T.column)))return{text:w+I+" * "+w+" "+I+"*/",selection:[1,4+I.length,1,4+I.length]}}})},y.isSaneInsertion=function(b,v){var E=b.getCursorPosition(),D=new a(v,E.row,E.column);if(!this.$matchTokenType(D.getCurrentToken()||"text",c)){if(/[)}\]]/.test(b.session.getLine(E.row)[E.column]))return!0;var C=new a(v,E.row,E.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",c))return!1}return D.stepForward(),D.getCurrentTokenRow()!==E.row||this.$matchTokenType(D.getCurrentToken()||"text",u)},y.$matchTokenType=function(b,v){return v.indexOf(b.type||b)>-1},y.recordAutoInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isAutoInsertedClosing(D,C,h.autoInsertedLineEnd[0])||(h.autoInsertedBrackets=0),h.autoInsertedRow=D.row,h.autoInsertedLineEnd=E+C.substr(D.column),h.autoInsertedBrackets++},y.recordMaybeInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isMaybeInsertedClosing(D,C)||(h.maybeInsertedBrackets=0),h.maybeInsertedRow=D.row,h.maybeInsertedLineStart=C.substr(0,D.column)+E,h.maybeInsertedLineEnd=C.substr(D.column),h.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(b,v,E){return h.autoInsertedBrackets>0&&b.row===h.autoInsertedRow&&E===h.autoInsertedLineEnd[0]&&v.substr(b.column)===h.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(b,v){return h.maybeInsertedBrackets>0&&b.row===h.maybeInsertedRow&&v.substr(b.column)===h.maybeInsertedLineEnd&&v.substr(0,b.column)==h.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){h.autoInsertedLineEnd=h.autoInsertedLineEnd.substr(1),h.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){h&&(h.maybeInsertedBrackets=0,h.maybeInsertedRow=-1)},s.inherits(y,o),n.CstyleBehaviour=y}),ace.define("ace/unicode",["require","exports","module"],function(r,n,i){for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,a=[],l=0;l2?te%w!=w-1:te%w==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,$=this.blockComment.end,I=new RegExp("^(\\s*)(?:"+u.escapeRegExp(A)+")"),N=new RegExp("(?:"+u.escapeRegExp($)+")\\s*$"),L=function(G,q){P(G,q)||(!E||/\S/.test(G))&&(v.insertInLine({row:q,column:G.length},$),v.insertInLine({row:q,column:C},A))},F=function(G,q){var ee;(ee=G.match(N))&&v.removeInLine(q,G.length-ee[0].length,G.length),(ee=G.match(I))&&v.removeInLine(q,ee[1].length,ee[0].length)},P=function(G,q){if(I.test(G))return!0;for(var ee=g.getTokens(q),Y=0;YG.length&&(R=G.length)}),C==1/0&&(C=R,E=!1,D=!1),T&&C%w!=0&&(C=Math.floor(C/w)*w),B(D?F:L)},this.toggleBlockComment=function(p,g,y,b){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var E=new h(g,b.row,b.column),D=E.getCurrentToken();g.selection;var C=g.selection.toOrientedRange(),w,T;if(D&&/comment/.test(D.type)){for(var A,$;D&&/comment/.test(D.type);){var I=D.value.indexOf(v.start);if(I!=-1){var N=E.getCurrentTokenRow(),L=E.getCurrentTokenColumn()+I;A=new d(N,L,N,L+v.start.length);break}D=E.stepBackward()}for(var E=new h(g,b.row,b.column),D=E.getCurrentToken();D&&/comment/.test(D.type);){var I=D.value.indexOf(v.end);if(I!=-1){var N=E.getCurrentTokenRow(),L=E.getCurrentTokenColumn()+I;$=new d(N,L,N,L+v.end.length);break}D=E.stepForward()}$&&g.remove($),A&&(g.remove(A),w=A.start.row,T=-v.start.length)}else T=v.start.length,w=y.start.row,g.insert(y.end,v.end),g.insert(y.start,v.start);C.start.row==w&&(C.start.column+=T),C.end.row==w&&(C.end.column+=T),g.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(p,g,y){return this.$getIndent(g)},this.checkOutdent=function(p,g,y){return!1},this.autoOutdent=function(p,g,y){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var y=p[g],b=y.prototype.$id,v=s.$modes[b];v||(s.$modes[b]=v=new y),s.$modes[g]||(s.$modes[g]=v),this.$embeds.push(g),this.$modes[g]=v}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],D=function(w){(function(T){var A=E[w],$=T[A];T[E[w]]=function(){return this.$delegator(A,arguments,$)}})(C)},C=this,g=0;gthis.row)){var d=c(h,{row:this.row,column:this.column},this.$insertRight);this.setPosition(d.row,d.column,!0)}},u.prototype.setPosition=function(h,d,f){var p;if(f?p={row:h,column:d}:p=this.$clipPositionToDocument(h,d),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},u.prototype.detach=function(){this.document.off("change",this.$onChange)},u.prototype.attach=function(h){this.document=h||this.document,this.document.on("change",this.$onChange)},u.prototype.$clipPositionToDocument=function(h,d){var f={};return h>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):h<0?(f.row=0,f.column=0):(f.row=h,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,d))),d<0&&(f.column=0),f},u}();a.prototype.$insertRight=!1,s.implement(a.prototype,o);function l(u,h,d){var f=d?u.column<=h.column:u.column-1},y.recordAutoInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isAutoInsertedClosing(D,C,h.autoInsertedLineEnd[0])||(h.autoInsertedBrackets=0),h.autoInsertedRow=D.row,h.autoInsertedLineEnd=E+C.substr(D.column),h.autoInsertedBrackets++},y.recordMaybeInsert=function(b,v,E){var D=b.getCursorPosition(),C=v.doc.getLine(D.row);this.isMaybeInsertedClosing(D,C)||(h.maybeInsertedBrackets=0),h.maybeInsertedRow=D.row,h.maybeInsertedLineStart=C.substr(0,D.column)+E,h.maybeInsertedLineEnd=C.substr(D.column),h.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(b,v,E){return h.autoInsertedBrackets>0&&b.row===h.autoInsertedRow&&E===h.autoInsertedLineEnd[0]&&v.substr(b.column)===h.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(b,v){return h.maybeInsertedBrackets>0&&b.row===h.maybeInsertedRow&&v.substr(b.column)===h.maybeInsertedLineEnd&&v.substr(0,b.column)==h.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){h.autoInsertedLineEnd=h.autoInsertedLineEnd.substr(1),h.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){h&&(h.maybeInsertedBrackets=0,h.maybeInsertedRow=-1)},s.inherits(y,o),n.CstyleBehaviour=y}),ace.define("ace/unicode",["require","exports","module"],function(r,n,i){for(var s=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,l=[],a=0;a2?te%w!=w-1:te%w==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,$=this.blockComment.end,I=new RegExp("^(\\s*)(?:"+u.escapeRegExp(A)+")"),N=new RegExp("(?:"+u.escapeRegExp($)+")\\s*$"),L=function(G,q){P(G,q)||(!E||/\S/.test(G))&&(v.insertInLine({row:q,column:G.length},$),v.insertInLine({row:q,column:C},A))},F=function(G,q){var ee;(ee=G.match(N))&&v.removeInLine(q,G.length-ee[0].length,G.length),(ee=G.match(I))&&v.removeInLine(q,ee[1].length,ee[0].length)},P=function(G,q){if(I.test(G))return!0;for(var ee=g.getTokens(q),Y=0;YG.length&&(R=G.length)}),C==1/0&&(C=R,E=!1,D=!1),T&&C%w!=0&&(C=Math.floor(C/w)*w),j(D?F:L)},this.toggleBlockComment=function(p,g,y,b){var v=this.blockComment;if(v){!v.start&&v[0]&&(v=v[0]);var E=new h(g,b.row,b.column),D=E.getCurrentToken();g.selection;var C=g.selection.toOrientedRange(),w,T;if(D&&/comment/.test(D.type)){for(var A,$;D&&/comment/.test(D.type);){var I=D.value.indexOf(v.start);if(I!=-1){var N=E.getCurrentTokenRow(),L=E.getCurrentTokenColumn()+I;A=new d(N,L,N,L+v.start.length);break}D=E.stepBackward()}for(var E=new h(g,b.row,b.column),D=E.getCurrentToken();D&&/comment/.test(D.type);){var I=D.value.indexOf(v.end);if(I!=-1){var N=E.getCurrentTokenRow(),L=E.getCurrentTokenColumn()+I;$=new d(N,L,N,L+v.end.length);break}D=E.stepForward()}$&&g.remove($),A&&(g.remove(A),w=A.start.row,T=-v.start.length)}else T=v.start.length,w=y.start.row,g.insert(y.end,v.end),g.insert(y.start,v.start);C.start.row==w&&(C.start.column+=T),C.end.row==w&&(C.end.column+=T),g.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(p,g,y){return this.$getIndent(g)},this.checkOutdent=function(p,g,y){return!1},this.autoOutdent=function(p,g,y){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var y=p[g],b=y.prototype.$id,v=s.$modes[b];v||(s.$modes[b]=v=new y),s.$modes[g]||(s.$modes[g]=v),this.$embeds.push(g),this.$modes[g]=v}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],D=function(w){(function(T){var A=E[w],$=T[A];T[E[w]]=function(){return this.$delegator(A,arguments,$)}})(C)},C=this,g=0;gthis.row)){var d=c(h,{row:this.row,column:this.column},this.$insertRight);this.setPosition(d.row,d.column,!0)}},u.prototype.setPosition=function(h,d,f){var p;if(f?p={row:h,column:d}:p=this.$clipPositionToDocument(h,d),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},u.prototype.detach=function(){this.document.off("change",this.$onChange)},u.prototype.attach=function(h){this.document=h||this.document,this.document.on("change",this.$onChange)},u.prototype.$clipPositionToDocument=function(h,d){var f={};return h>=this.document.getLength()?(f.row=Math.max(0,this.document.getLength()-1),f.column=this.document.getLine(f.row).length):h<0?(f.row=0,f.column=0):(f.row=h,f.column=Math.min(this.document.getLine(f.row).length,Math.max(0,d))),d<0&&(f.column=0),f},u}();l.prototype.$insertRight=!1,s.implement(l.prototype,o);function a(u,h,d){var f=d?u.column<=h.column:u.column=p&&(d=p-1,f=void 0);var g=this.getLine(d);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:d,column:f}},h.prototype.clonePos=function(d){return{row:d.row,column:d.column}},h.prototype.pos=function(d,f){return{row:d,column:f}},h.prototype.$clipPosition=function(d){var f=this.getLength();return d.row>=f?(d.row=Math.max(0,f-1),d.column=this.getLine(f-1).length):(d.row=Math.max(0,d.row),d.column=Math.min(Math.max(d.column,0),this.getLine(d.row).length)),d},h.prototype.insertFullLines=function(d,f){d=Math.min(Math.max(d,0),this.getLength());var p=0;d0,g=f=0&&this.applyDelta({start:this.pos(d,this.getLine(d).length),end:this.pos(d+1,0),action:"remove",lines:["",""]})},h.prototype.replace=function(d,f){if(d instanceof l||(d=l.fromPoints(d.start,d.end)),f.length===0&&d.isEmpty())return d.start;if(f==this.getTextRange(d))return d.end;this.remove(d);var p;return f?p=this.insert(d.start,f):p=d.start,p},h.prototype.applyDeltas=function(d){for(var f=0;f=0;f--)this.revertDelta(d[f])},h.prototype.applyDelta=function(d,f){var p=d.action=="insert";(p?d.lines.length<=1&&!d.lines[0]:!l.comparePoints(d.start,d.end))||(p&&d.lines.length>2e4?this.$splitAndapplyLargeDelta(d,2e4):(o(this.$lines,d,f),this._signal("change",d)))},h.prototype.$safeApplyDelta=function(d){var f=this.$lines.length;(d.action=="remove"&&d.start.row20){h.running=setTimeout(h.$worker,20);break}}h.currentLine=f,p==-1&&(p=f),y<=p&&h.fireUpdateEvent(y,p)}}}return l.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(c,u){var h={first:c,last:u};this._signal("update",{data:h})},l.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(c){var u=c.start.row,h=c.end.row-u;if(h===0)this.lines[u]=null;else if(c.action=="remove")this.lines.splice(u,h+1,null),this.states.splice(u,h+1,null);else{var d=Array(h+1);d.unshift(u,1),this.lines.splice.apply(this.lines,d),this.states.splice.apply(this.states,d)}this.currentLine=Math.min(u,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},l.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},l.prototype.$tokenizeRow=function(c){var u=this.doc.getLine(c),h=this.states[c-1],d=this.tokenizer.getLineTokens(u,h,c);return this.states[c]+""!=d.state+""?(this.states[c]=d.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=d.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();s.implement(a.prototype,o),n.BackgroundTokenizer=a}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./range").Range,a=function(){function l(c,u,h){h===void 0&&(h="text"),this.setRegexp(c),this.clazz=u,this.type=h}return l.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},l.prototype.update=function(c,u,h,d){if(this.regExp)for(var f=d.firstRow,p=d.lastRow,g={},y=f;y<=p;y++){var b=this.cache[y];b==null&&(b=s.getMatchOffsets(h.getLine(y),this.regExp),b.length>this.MAX_RANGES&&(b=b.slice(0,this.MAX_RANGES)),b=b.map(function(C){return new o(y,C.offset,y,C.offset+C.length)}),this.cache[y]=b.length?b:"");for(var v=b.length;v--;){var E=b[v].toScreenRange(h),D=E.toString();g[D]||(g[D]=!0,u.drawSingleLineMarker(c,E,this.clazz,d))}}},l}();a.prototype.MAX_RANGES=500,n.SearchHighlight=a}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(r,n,i){var s=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(w){this.$session=w},C.prototype.add=function(w,T,A){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),T===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},C.prototype.addSelection=function(w,T){this.selections.push({value:w,rev:T||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(w,T){T==null&&(T=this.$rev+1);for(var A=this.$undoStack,$=A.length;$--;){var I=A[$][0];if(I.id<=w)break;I.id0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},C.prototype.$prettyPrint=function(w){return w?h(w):h(this.$undoStack)+` +`},h.prototype.getLine=function(d){return this.$lines[d]||""},h.prototype.getLines=function(d,f){return this.$lines.slice(d,f+1)},h.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},h.prototype.getLength=function(){return this.$lines.length},h.prototype.getTextRange=function(d){return this.getLinesForRange(d).join(this.getNewLineCharacter())},h.prototype.getLinesForRange=function(d){var f;if(d.start.row===d.end.row)f=[this.getLine(d.start.row).substring(d.start.column,d.end.column)];else{f=this.getLines(d.start.row,d.end.row),f[0]=(f[0]||"").substring(d.start.column);var p=f.length-1;d.end.row-d.start.row==p&&(f[p]=f[p].substring(0,d.end.column))}return f},h.prototype.insertLines=function(d,f){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(d,f)},h.prototype.removeLines=function(d,f){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(d,f)},h.prototype.insertNewLine=function(d){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(d,["",""])},h.prototype.insert=function(d,f){return this.getLength()<=1&&this.$detectNewLine(f),this.insertMergedLines(d,this.$split(f))},h.prototype.insertInLine=function(d,f){var p=this.clippedPos(d.row,d.column),g=this.pos(d.row,d.column+f.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[f]},!0),this.clonePos(g)},h.prototype.clippedPos=function(d,f){var p=this.getLength();d===void 0?d=p:d<0?d=0:d>=p&&(d=p-1,f=void 0);var g=this.getLine(d);return f==null&&(f=g.length),f=Math.min(Math.max(f,0),g.length),{row:d,column:f}},h.prototype.clonePos=function(d){return{row:d.row,column:d.column}},h.prototype.pos=function(d,f){return{row:d,column:f}},h.prototype.$clipPosition=function(d){var f=this.getLength();return d.row>=f?(d.row=Math.max(0,f-1),d.column=this.getLine(f-1).length):(d.row=Math.max(0,d.row),d.column=Math.min(Math.max(d.column,0),this.getLine(d.row).length)),d},h.prototype.insertFullLines=function(d,f){d=Math.min(Math.max(d,0),this.getLength());var p=0;d0,g=f=0&&this.applyDelta({start:this.pos(d,this.getLine(d).length),end:this.pos(d+1,0),action:"remove",lines:["",""]})},h.prototype.replace=function(d,f){if(d instanceof a||(d=a.fromPoints(d.start,d.end)),f.length===0&&d.isEmpty())return d.start;if(f==this.getTextRange(d))return d.end;this.remove(d);var p;return f?p=this.insert(d.start,f):p=d.start,p},h.prototype.applyDeltas=function(d){for(var f=0;f=0;f--)this.revertDelta(d[f])},h.prototype.applyDelta=function(d,f){var p=d.action=="insert";(p?d.lines.length<=1&&!d.lines[0]:!a.comparePoints(d.start,d.end))||(p&&d.lines.length>2e4?this.$splitAndapplyLargeDelta(d,2e4):(o(this.$lines,d,f),this._signal("change",d)))},h.prototype.$safeApplyDelta=function(d){var f=this.$lines.length;(d.action=="remove"&&d.start.row20){h.running=setTimeout(h.$worker,20);break}}h.currentLine=f,p==-1&&(p=f),y<=p&&h.fireUpdateEvent(y,p)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,u){var h={first:c,last:u};this._signal("update",{data:h})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var u=c.start.row,h=c.end.row-u;if(h===0)this.lines[u]=null;else if(c.action=="remove")this.lines.splice(u,h+1,null),this.states.splice(u,h+1,null);else{var d=Array(h+1);d.unshift(u,1),this.lines.splice.apply(this.lines,d),this.states.splice.apply(this.states,d)}this.currentLine=Math.min(u,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var u=this.doc.getLine(c),h=this.states[c-1],d=this.tokenizer.getLineTokens(u,h,c);return this.states[c]+""!=d.state+""?(this.states[c]=d.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=d.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();s.implement(l.prototype,o),n.BackgroundTokenizer=l}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./range").Range,l=function(){function a(c,u,h){h===void 0&&(h="text"),this.setRegexp(c),this.clazz=u,this.type=h}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,u,h,d){if(this.regExp)for(var f=d.firstRow,p=d.lastRow,g={},y=f;y<=p;y++){var b=this.cache[y];b==null&&(b=s.getMatchOffsets(h.getLine(y),this.regExp),b.length>this.MAX_RANGES&&(b=b.slice(0,this.MAX_RANGES)),b=b.map(function(C){return new o(y,C.offset,y,C.offset+C.length)}),this.cache[y]=b.length?b:"");for(var v=b.length;v--;){var E=b[v].toScreenRange(h),D=E.toString();g[D]||(g[D]=!0,u.drawSingleLineMarker(c,E,this.clazz,d))}}},a}();l.prototype.MAX_RANGES=500,n.SearchHighlight=l}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(r,n,i){var s=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(w){this.$session=w},C.prototype.add=function(w,T,A){if(!this.$fromUndo&&w!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),T===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),w.id=this.$rev=++this.$maxRev}(w.action=="remove"||w.action=="insert")&&(this.$lastDelta=w),this.lastDeltas.push(w)}},C.prototype.addSelection=function(w,T){this.selections.push({value:w,rev:T||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(w,T){T==null&&(T=this.$rev+1);for(var A=this.$undoStack,$=A.length;$--;){var I=A[$][0];if(I.id<=w)break;I.id0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(w){w==null&&(w=this.$rev),this.mark=w},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(w){this.reset(),this.$undoStack=w.$undoStack,this.$redoStack=w.$redoStack},C.prototype.$prettyPrint=function(w){return w?h(w):h(this.$undoStack)+` --- -`+h(this.$redoStack)},C}();s.prototype.hasUndo=s.prototype.canUndo,s.prototype.hasRedo=s.prototype.canRedo,s.prototype.isClean=s.prototype.isAtBookmark,s.prototype.markClean=s.prototype.bookmark;function o(C,w){for(var T=w;T--;){var A=C[T];if(A&&!A[0].ignore){for(;T"+C.end.row+":"+C.end.column}function f(C,w){var T=C.action=="insert",A=w.action=="insert";if(T&&A)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(T&&!A)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;else if(!T&&A)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.start,C.start)<=0)y(C,w,1);else return null;else if(!T&&!A)if(l(w.start,C.start)>=0)y(w,C,1);else if(l(w.end,C.start)<=0)y(C,w,-1);else return null;return[w,C]}function p(C,w){for(var T=C.length;T--;)for(var A=0;A=0?y(C,w,-1):(l(C.start,w.start)<=0||y(C,a.fromPoints(w.start,C.start),-1),y(w,C,1));else if(!T&&A)l(w.start,C.end)>=0?y(w,C,-1):(l(w.start,C.start)<=0||y(w,a.fromPoints(C.start,w.start),-1),y(C,w,1));else if(!T&&!A)if(l(w.start,C.end)>=0)y(w,C,-1);else if(l(w.end,C.start)<=0)y(C,w,-1);else{var $,I;return l(C.start,w.start)<0&&($=C,C=v(C,w.start)),l(C.end,w.end)>0&&(I=v(C,w.end)),b(w.end,C.start,C.end,-1),I&&!$&&(C.lines=I.lines,C.start=I.start,C.end=I.end,I=C),[w,$,I].filter(Boolean)}return[w,C]}function y(C,w,T){b(C.start,w.start,w.end,T),b(C.end,w.start,w.end,T)}function b(C,w,T,A){C.row==(A==1?w:T).row&&(C.column+=A*(T.column-w.column)),C.row+=A*(T.row-w.row)}function v(C,w){var T=C.lines,A=C.end;C.end=c(w);var $=C.end.row-C.start.row,I=T.splice($,T.length),N=$?w.column:w.column-C.start.column;T.push(I[0].substring(0,N)),I[0]=I[0].substr(N);var L={start:c(w),end:A,lines:I,action:C.action};return L}function E(C,w){w=u(w);for(var T=C.length;T--;){for(var A=C[T],$=0;$this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(c,u){return-c.range.compareEnd(u.start.row,u.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},a.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},a.prototype.walk=function(l,c,u){var h=0,d=this.folds,f,p,g,y=!0;c==null&&(c=this.end.row,u=this.end.column);for(var b=0;b0)){var y=o(c,p.start);return g===0?u&&y!==0?-f-2:f:y>0||y===0&&!u?f:-f-1}}return-f-1},l.prototype.add=function(c){var u=!c.isEmpty(),h=this.pointIndex(c.start,u);h<0&&(h=-h-1);var d=this.pointIndex(c.end,u,h);return d<0?d=-d-1:d++,this.ranges.splice(h,d-h,c)},l.prototype.addList=function(c){for(var u=[],h=c.length;h--;)u.push.apply(u,this.add(c[h]));return u},l.prototype.substractPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges.splice(u,1)},l.prototype.merge=function(){var c=[],u=this.ranges;u=u.sort(function(g,y){return o(g.start,y.start)});for(var h=u[0],d,f=1;f=0},l.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},l.prototype.rangeAtPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges[u]},l.prototype.clipRows=function(c,u){var h=this.ranges;if(h[0].start.row>u||h[h.length-1].start.row=d)break}if(c.action=="insert")for(var v=f-d,E=-u.column+h.column;gd)break;if(b.start.row==d&&b.start.column>=u.column&&(b.start.column==u.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=v)),b.end.row==d&&b.end.column>=u.column){if(b.end.column==u.column&&this.$bias<0)continue;b.end.column==u.column&&E>0&&gb.start.column&&b.end.column==p[g+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=v}}else for(var v=d-f,E=u.column-h.column;gf)break;b.end.rowu.column)&&(b.end.column=u.column,b.end.row=u.row):(b.end.column+=E,b.end.row+=v):b.end.row>f&&(b.end.row+=v),b.start.rowu.column)&&(b.start.column=u.column,b.start.row=u.row):(b.start.column+=E,b.start.row+=v):b.start.row>f&&(b.start.row+=v)}if(v!=0&&g=h)return g;if(g.end.row>h)return null}return null},this.getNextFoldLine=function(h,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p=h)return g}return null},this.getFoldedRowCount=function(h,d){for(var f=this.$foldData,p=d-h+1,g=0;g=d){v=h?p-=d-v:p=0);break}else b>=h&&(v>=h?p-=b-v:p-=b-h+1)}return p},this.$addFoldLine=function(h){return this.$foldData.push(h),this.$foldData.sort(function(d,f){return d.start.row-f.start.row}),h},this.addFold=function(h,d){var f=this.$foldData,p=!1,g;h instanceof a?g=h:(g=new a(d,h),g.collapseChildren=d.collapseChildren),this.$clipRangeToDocument(g.range);var y=g.start.row,b=g.start.column,v=g.end.row,E=g.end.column,D=this.getFoldAt(y,b,1),C=this.getFoldAt(v,E,-1);if(D&&C==D)return D.addSubFold(g);D&&!D.range.isStart(y,b)&&this.removeFold(D),C&&!C.range.isEnd(v,E)&&this.removeFold(C);var w=this.getFoldsInRange(g.range);w.length>0&&(this.removeFolds(w),g.collapseChildren||w.forEach(function(I){g.addSubFold(I)}));for(var T=0;T0&&this.foldAll(h.start.row+1,h.end.row,h.collapseChildren-1),h.subFolds=[]},this.expandFolds=function(h){h.forEach(function(d){this.expandFold(d)},this)},this.unfold=function(h,d){var f,p;if(h==null)f=new s(0,0,this.getLength(),0),d==null&&(d=!0);else if(typeof h=="number")f=new s(h,0,h,this.getLine(h).length);else if("row"in h)f=s.fromPoints(h,h);else{if(Array.isArray(h))return p=[],h.forEach(function(y){p=p.concat(this.unfold(y))},this),p;f=h}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&s.comparePoints(p[0].start,f.start)<0&&s.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(d!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(h,d){return!!this.getFoldLine(h,d)},this.getRowFoldEnd=function(h,d){var f=this.getFoldLine(h,d);return f?f.end.row:h},this.getRowFoldStart=function(h,d){var f=this.getFoldLine(h,d);return f?f.start.row:h},this.getFoldDisplayLine=function(h,d,f,p,g){p==null&&(p=h.start.row),g==null&&(g=0),d==null&&(d=h.end.row),f==null&&(f=this.getLine(d).length);var y=this.doc,b="";return h.walk(function(v,E,D,C){if(!(ED)break;while(g&&b.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return v.end.row=p.getCurrentTokenRow(),v.end.column=p.getCurrentTokenColumn(),v}},this.foldAll=function(h,d,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){d=d||this.getLength(),h=h||0;for(var y=h;y=h&&(y=b.end.row,b.collapseChildren=f,this.addFold("...",b))}}},this.foldToLevel=function(h){for(this.foldAll();h-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var h=this;this.foldAll(null,null,null,function(d){for(var f=h.getTokens(d),p=0;p=0;){var y=f[p];if(y==null&&(y=f[p]=this.getFoldWidget(p)),y=="start"){var b=this.getFoldWidgetRange(p);if(g||(g=b),b&&b.end.row>=h)break}p--}return{range:p!==-1&&b,firstRange:g}},this.onFoldWidgetClick=function(h,d){d instanceof c&&(d=d.domEvent);var f={children:d.shiftKey,all:d.ctrlKey||d.metaKey,siblings:d.altKey},p=this.$toggleFoldWidget(h,f);if(!p){var g=d.target||d.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(h,d){if(this.getFoldWidget){var f=this.getFoldWidget(h),p=this.getLine(h),g=f==="end"?-1:1,y=this.getFoldAt(h,g===-1?0:p.length,g);if(y)return d.children||d.all?this.removeFold(y):this.expandFold(y),y;var b=this.getFoldWidgetRange(h,!0);if(b&&!b.isMultiLine()&&(y=this.getFoldAt(b.start.row,b.start.column,1),y&&b.isEqual(y.range)))return this.removeFold(y),y;if(d.siblings){var v=this.getParentFoldRangeData(h);if(v.range)var E=v.range.start.row+1,D=v.range.end.row;this.foldAll(E,D,d.all?1e4:0)}else d.children?(D=b?b.end.row:this.getLength(),this.foldAll(h+1,D,d.all?1e4:0)):b&&(d.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(h){var d=this.selection.getCursor().row;d=this.getRowFoldStart(d);var f=this.$toggleFoldWidget(d,{});if(!f){var p=this.getParentFoldRangeData(d,!0);if(f=p.range||p.firstRange,f){d=f.start.row;var g=this.getFoldAt(d,this.getLine(d).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(h){var d=h.start.row,f=h.end.row-d;if(f===0)this.foldWidgets[d]=null;else if(h.action=="remove")this.foldWidgets.splice(d,f+1,null);else{var p=Array(f+1);p.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(h){var d=h.data;d.first!=d.last&&this.foldWidgets.length>d.first&&this.foldWidgets.splice(d.first,this.foldWidgets.length)}}n.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=r("../range").Range;function a(){this.findMatchingBracket=function(l,c){if(l.column==0)return null;var u=c||this.getLine(l.row).charAt(l.column-1);if(u=="")return null;var h=u.match(/([\(\[\{])|([\)\]\}])/);return h?h[1]?this.$findClosingBracket(h[1],l):this.$findOpeningBracket(h[2],l):null},this.getBracketRange=function(l){var c=this.getLine(l.row),u=!0,h,d=c.charAt(l.column-1),f=d&&d.match(/([\(\[\{])|([\)\]\}])/);if(f||(d=c.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(/([\(\[\{])|([\)\]\}])/),u=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],l);if(!p)return null;h=o.fromPoints(l,p),u||(h.end.column++,h.start.column--),h.cursor=h.end}else{var p=this.$findOpeningBracket(f[2],l);if(!p)return null;h=o.fromPoints(p,l),u||(h.start.column++,h.end.column--),h.cursor=h.start}return h},this.getMatchingBracketRanges=function(l,c){var u=this.getLine(l.row),h=/([\(\[\{])|([\)\]\}])/,d=!c&&u.charAt(l.column-1),f=d&&d.match(h);if(f||(d=(c===void 0||c)&&u.charAt(l.column),l={row:l.row,column:l.column+1},f=d&&d.match(h)),!f)return null;var p=new o(l.row,l.column-1,l.row,l.column),g=f[1]?this.$findClosingBracket(f[1],l):this.$findOpeningBracket(f[2],l);if(!g)return[p];var y=new o(g.row,g.column,g.row,g.column+1);return[p,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,c,u){var h=this.$brackets[l],d=1,f=new s(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn()-2,y=p.value;;){for(;g>=0;){var b=y.charAt(g);if(b==h){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else b==l&&(d+=1);g-=1}do p=f.stepBackward();while(p&&!u.test(p.type));if(p==null)break;y=p.value,g=y.length-1}return null}},this.$findClosingBracket=function(l,c,u){var h=this.$brackets[l],d=1,f=new s(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn();;){for(var y=p.value,b=y.length;g"?h=!0:c.type.indexOf("tag-name")!==-1&&(u=!0));while(c&&!u);return c},this.$findClosingTag=function(l,c){var u,h=c.value,d=c.value,f=0,p=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);c=l.stepForward();var g=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+c.value.length),y=!1;do{if(u=c,u.type.indexOf("tag-close")!==-1&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(c=l.stepForward(),c){if(c.value===">"&&!y){var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);y=!0}if(c.type.indexOf("tag-name")!==-1){if(h=c.value,d===h){if(u.value==="<")f++;else if(u.value==="")var D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(d===h&&c.value==="/>"&&(f--,f<0))var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),E=v,D=E,b=new o(g.end.row,g.end.column,g.end.row,g.end.column+1)}}while(c&&f>=0);if(p&&b&&v&&D&&g&&E)return{openTag:new o(p.start.row,p.start.column,b.end.row,b.end.column),closeTag:new o(v.start.row,v.start.column,D.end.row,D.end.column),openTagName:g,closeTagName:E}},this.$findOpeningTag=function(l,c){var u=l.getCurrentToken(),h=c.value,d=0,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),g=p+2,y=new o(f,p,f,g);l.stepForward();var b=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=l.stepForward()),!(!c||c.value!==">")){var v=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(c=u,f=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn(),g=p+c.value.length,u=l.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(h===c.value)if(u.value==="<"){if(d++,d>0){var E=new o(f,p,f,g),D=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do c=l.stepForward();while(c&&c.value!==">");var C=new o(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else u.value===""){for(var w=0,T=u;T;){if(T.type.indexOf("tag-name")!==-1&&T.value===h){d--;break}else if(T.value==="<")break;T=l.stepBackward(),w++}for(var A=0;AP&&(this.$docRowCache.splice(P,F),this.$screenRowCache.splice(P,F))},N.prototype.$getRowCacheIndex=function(L,F){for(var P=0,_=L.length-1;P<=_;){var M=P+_>>1,B=L[M];if(F>B)P=M+1;else if(F=F));B++);return _=P[B],_?(_.index=B,_.start=M-_.value.length,_):null},N.prototype.setUndoManager=function(L){if(this.$undoManager=L,this.$informUndoManager&&this.$informUndoManager.cancel(),L){var F=this;L.addSession(this),this.$syncInformUndoManager=function(){F.$informUndoManager.cancel(),F.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},N.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},N.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},N.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):" "},N.prototype.setUseSoftTabs=function(L){this.setOption("useSoftTabs",L)},N.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},N.prototype.setTabSize=function(L){this.setOption("tabSize",L)},N.prototype.getTabSize=function(){return this.$tabSize},N.prototype.isTabStop=function(L){return this.$useSoftTabs&&L.column%this.$tabSize===0},N.prototype.setNavigateWithinSoftTabs=function(L){this.setOption("navigateWithinSoftTabs",L)},N.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},N.prototype.setOverwrite=function(L){this.setOption("overwrite",L)},N.prototype.getOverwrite=function(){return this.$overwrite},N.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},N.prototype.addGutterDecoration=function(L,F){this.$decorations[L]||(this.$decorations[L]=""),this.$decorations[L]+=" "+F,this._signal("changeBreakpoint",{})},N.prototype.removeGutterDecoration=function(L,F){this.$decorations[L]=(this.$decorations[L]||"").replace(" "+F,""),this._signal("changeBreakpoint",{})},N.prototype.getBreakpoints=function(){return this.$breakpoints},N.prototype.setBreakpoints=function(L){this.$breakpoints=[];for(var F=0;F0&&(_=!!P.charAt(F-1).match(this.tokenRe)),_||(_=!!P.charAt(F).match(this.tokenRe)),_)var M=this.tokenRe;else if(/^\s+$/.test(P.slice(F-1,F+1)))var M=/\s/;else var M=this.nonTokenRe;var B=F;if(B>0){do B--;while(B>=0&&P.charAt(B).match(M));B++}for(var R=F;RL&&(L=F.screenWidth)}),this.lineWidgetWidth=L},N.prototype.$computeWidth=function(L){if(this.$modified||L){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var F=this.doc.getAllLines(),P=this.$rowLengthCache,_=0,M=0,B=this.$foldData[M],R=B?B.start.row:1/0,G=F.length,q=0;qR){if(q=B.end.row+1,q>=G)break;B=this.$foldData[M++],R=B?B.start.row:1/0}P[q]==null&&(P[q]=this.$getStringScreenWidth(F[q])[0]),P[q]>_&&(_=P[q])}this.screenWidth=_}},N.prototype.getLine=function(L){return this.doc.getLine(L)},N.prototype.getLines=function(L,F){return this.doc.getLines(L,F)},N.prototype.getLength=function(){return this.doc.getLength()},N.prototype.getTextRange=function(L){return this.doc.getTextRange(L||this.selection.getRange())},N.prototype.insert=function(L,F){return this.doc.insert(L,F)},N.prototype.remove=function(L){return this.doc.remove(L)},N.prototype.removeFullLines=function(L,F){return this.doc.removeFullLines(L,F)},N.prototype.undoChanges=function(L,F){if(L.length){this.$fromUndo=!0;for(var P=L.length-1;P!=-1;P--){var _=L[P];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!F&&this.$undoSelect&&(L.selectionBefore?this.selection.fromJSON(L.selectionBefore):this.selection.setRange(this.$getUndoSelection(L,!0))),this.$fromUndo=!1}},N.prototype.redoChanges=function(L,F){if(L.length){this.$fromUndo=!0;for(var P=0;PL.end.column&&(B.start.column+=G),B.end.row==L.end.row&&B.end.column>L.end.column&&(B.end.column+=G)),R&&B.start.row>=L.end.row&&(B.start.row+=R,B.end.row+=R)}if(B.end=this.insert(B.start,_),M.length){var q=L.start,ee=B.start,R=ee.row-q.row,G=ee.column-q.column;this.addFolds(M.map(function(Q){return Q=Q.clone(),Q.start.row==q.row&&(Q.start.column+=G),Q.end.row==q.row&&(Q.end.column+=G),Q.start.row+=R,Q.end.row+=R,Q}))}return B},N.prototype.indentRows=function(L,F,P){P=P.replace(/\t/g,this.getTabString());for(var _=L;_<=F;_++)this.doc.insertInLine({row:_,column:0},P)},N.prototype.outdentRows=function(L){for(var F=L.collapseRows(),P=new d(0,0,0,0),_=this.getTabSize(),M=F.start.row;M<=F.end.row;++M){var B=this.getLine(M);P.start.row=M,P.end.row=M;for(var R=0;R<_&&B.charAt(R)==" ";++R);R<_&&B.charAt(R)==" "?(P.start.column=R,P.end.column=R+1):(P.start.column=0,P.end.column=R),this.remove(P)}},N.prototype.$moveLines=function(L,F,P){if(L=this.getRowFoldStart(L),F=this.getRowFoldEnd(F),P<0){var _=this.getRowFoldStart(L+P);if(_<0)return 0;var M=_-L}else if(P>0){var _=this.getRowFoldEnd(F+P);if(_>this.doc.getLength()-1)return 0;var M=_-F}else{L=this.$clipRowToDocument(L),F=this.$clipRowToDocument(F);var M=F-L+1}var B=new d(L,0,F,Number.MAX_VALUE),R=this.getFoldsInRange(B).map(function(q){return q=q.clone(),q.start.row+=M,q.end.row+=M,q}),G=P==0?this.doc.getLines(L,F):this.doc.removeFullLines(L,F);return this.doc.insertFullLines(L+M,G),R.length&&this.addFolds(R),M},N.prototype.moveLinesUp=function(L,F){return this.$moveLines(L,F,-1)},N.prototype.moveLinesDown=function(L,F){return this.$moveLines(L,F,1)},N.prototype.duplicateLines=function(L,F){return this.$moveLines(L,F,0)},N.prototype.$clipRowToDocument=function(L){return Math.max(0,Math.min(L,this.doc.getLength()-1))},N.prototype.$clipColumnToRow=function(L,F){return F<0?0:Math.min(this.doc.getLine(L).length,F)},N.prototype.$clipPositionToDocument=function(L,F){if(F=Math.max(0,F),L<0)L=0,F=0;else{var P=this.doc.getLength();L>=P?(L=P-1,F=this.doc.getLine(P-1).length):F=Math.min(this.doc.getLine(L).length,F)}return{row:L,column:F}},N.prototype.$clipRangeToDocument=function(L){L.start.row<0?(L.start.row=0,L.start.column=0):L.start.column=this.$clipColumnToRow(L.start.row,L.start.column);var F=this.doc.getLength()-1;return L.end.row>F?(L.end.row=F,L.end.column=this.doc.getLine(F).length):L.end.column=this.$clipColumnToRow(L.end.row,L.end.column),L},N.prototype.setUseWrapMode=function(L){if(L!=this.$useWrapMode){if(this.$useWrapMode=L,this.$modified=!0,this.$resetRowCache(0),L){var F=this.getLength();this.$wrapData=Array(F),this.$updateWrapData(0,F-1)}this._signal("changeWrapMode")}},N.prototype.getUseWrapMode=function(){return this.$useWrapMode},N.prototype.setWrapLimitRange=function(L,F){(this.$wrapLimitRange.min!==L||this.$wrapLimitRange.max!==F)&&(this.$wrapLimitRange={min:L,max:F},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},N.prototype.adjustWrapLimit=function(L,F){var P=this.$wrapLimitRange;P.max<0&&(P={min:F,max:F});var _=this.$constrainWrapLimit(L,P.min,P.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},N.prototype.$constrainWrapLimit=function(L,F,P){return F&&(L=Math.max(F,L)),P&&(L=Math.min(P,L)),L},N.prototype.getWrapLimit=function(){return this.$wrapLimit},N.prototype.setWrapLimit=function(L){this.setWrapLimitRange(L,L)},N.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},N.prototype.$updateInternalDataOnChange=function(L){var F=this.$useWrapMode,P=L.action,_=L.start,M=L.end,B=_.row,R=M.row,G=R-B,q=null;if(this.$updating=!0,G!=0)if(P==="remove"){this[F?"$wrapData":"$rowLengthCache"].splice(B,G);var ee=this.$foldData;q=this.getFoldsInRange(L),this.removeFolds(q);var Y=this.getFoldLine(M.row),X=0;if(Y){Y.addRemoveChars(M.row,M.column,_.column-M.column),Y.shiftRow(-G);var Q=this.getFoldLine(B);Q&&Q!==Y&&(Q.merge(Y),Y=Q),X=ee.indexOf(Y)+1}for(X;X=M.row&&Y.shiftRow(-G)}R=B}else{var te=Array(G);te.unshift(B,0);var Z=F?this.$wrapData:this.$rowLengthCache;Z.splice.apply(Z,te);var ee=this.$foldData,Y=this.getFoldLine(B),X=0;if(Y){var de=Y.range.compareInside(_.row,_.column);de==0?(Y=Y.split(_.row,_.column),Y&&(Y.shiftRow(G),Y.addRemoveChars(R,0,M.column-_.column))):de==-1&&(Y.addRemoveChars(B,0,M.column-_.column),Y.shiftRow(G)),X=ee.indexOf(Y)+1}for(X;X=B&&Y.shiftRow(G)}}else{G=Math.abs(L.start.column-L.end.column),P==="remove"&&(q=this.getFoldsInRange(L),this.removeFolds(q),G=-G);var Y=this.getFoldLine(B);Y&&Y.addRemoveChars(B,_.column,G)}return F&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,F?this.$updateWrapData(B,R):this.$updateRowLengthCache(B,R),q},N.prototype.$updateRowLengthCache=function(L,F){this.$rowLengthCache[L]=null,this.$rowLengthCache[F]=null},N.prototype.$updateWrapData=function(L,F){var P=this.doc.getAllLines(),_=this.getTabSize(),M=this.$wrapData,B=this.$wrapLimit,R,G,q=L;for(F=Math.min(F,P.length-1);q<=F;)G=this.getFoldLine(q,G),G?(R=[],G.walk((function(ee,Y,X,Q){var te;if(ee!=null){te=this.$getDisplayTokens(ee,R.length),te[0]=D;for(var Z=1;ZF-Q;){var te=B+F-Q;if(L[te-1]>=T&&L[te]>=T){X(te);continue}if(L[te]==D||L[te]==C){for(te;te!=B-1&&L[te]!=D;te--);if(te>B){X(te);continue}for(te=B+F,te;te>2)),B-1);te>Z&&L[te]Z&&L[te]Z&&L[te]==w;)te--}else for(;te>Z&&L[te]Z){X(++te);continue}te=B+F,L[te]==E&&te--,X(te-Q)}return _},N.prototype.$getDisplayTokens=function(L,F){var P=[],_;F=F||0;for(var M=0;M39&&B<48||B>57&&B<64?P.push(w):B>=4352&&I(B)?P.push(v,E):P.push(v)}return P},N.prototype.$getStringScreenWidth=function(L,F,P){if(F==0)return[0,0];F==null&&(F=1/0),P=P||0;var _,M;for(M=0;M=4352&&I(_)?P+=2:P+=1,!(P>F));M++);return[P,M]},N.prototype.getRowLength=function(L){var F=1;return this.lineWidgets&&(F+=this.lineWidgets[L]&&this.lineWidgets[L].rowCount||0),!this.$useWrapMode||!this.$wrapData[L]?F:this.$wrapData[L].length+F},N.prototype.getRowLineCount=function(L){return!this.$useWrapMode||!this.$wrapData[L]?1:this.$wrapData[L].length+1},N.prototype.getRowWrapIndent=function(L){if(this.$useWrapMode){var F=this.screenToDocumentPosition(L,Number.MAX_VALUE),P=this.$wrapData[F.row];return P.length&&P[0]=0)var G=ee[Y],M=this.$docRowCache[Y],Q=L>ee[X-1];else var Q=!X;for(var te=this.getLength()-1,Z=this.getNextFoldLine(M),de=Z?Z.start.row:1/0;G<=L&&(q=this.getRowLength(M),!(G+q>L||M>=te));)G+=q,M++,M>de&&(M=Z.end.row+1,Z=this.getNextFoldLine(M,Z),de=Z?Z.start.row:1/0),Q&&(this.$docRowCache.push(M),this.$screenRowCache.push(G));if(Z&&Z.start.row<=M)_=this.getFoldDisplayLine(Z),M=Z.start.row;else{if(G+q<=L||M>te)return{row:te,column:this.getLine(te).length};_=this.getLine(M),Z=null}var ke=0,me=Math.floor(L-G);if(this.$useWrapMode){var Fe=this.$wrapData[M];Fe&&(R=Fe[me],me>0&&Fe.length&&(ke=Fe.indent,B=Fe[me-1]||Fe[Fe.length-1],_=_.substring(B)))}return P!==void 0&&this.$bidiHandler.isBidiRow(G+me,M,me)&&(F=this.$bidiHandler.offsetToCol(P)),B+=this.$getStringScreenWidth(_,F-ke)[1],this.$useWrapMode&&B>=R&&(B=R-1),Z?Z.idxToPosition(B):{row:M,column:B}},N.prototype.documentToScreenPosition=function(L,F){if(typeof F>"u")var P=this.$clipPositionToDocument(L.row,L.column);else P=this.$clipPositionToDocument(L,F);L=P.row,F=P.column;var _=0,M=null,B=null;B=this.getFoldAt(L,F,1),B&&(L=B.start.row,F=B.start.column);var R,G=0,q=this.$docRowCache,ee=this.$getRowCacheIndex(q,L),Y=q.length;if(Y&&ee>=0)var G=q[ee],_=this.$screenRowCache[ee],X=L>q[Y-1];else var X=!Y;for(var Q=this.getNextFoldLine(G),te=Q?Q.start.row:1/0;G=te){if(R=Q.end.row+1,R>L)break;Q=this.getNextFoldLine(R,Q),te=Q?Q.start.row:1/0}else R=G+1;_+=this.getRowLength(G),G=R,X&&(this.$docRowCache.push(G),this.$screenRowCache.push(_))}var Z="";Q&&G>=te?(Z=this.getFoldDisplayLine(Q,L,F),M=Q.start.row):(Z=this.getLine(L).substring(0,F),M=L);var de=0;if(this.$useWrapMode){var ke=this.$wrapData[M];if(ke){for(var me=0;Z.length>=ke[me];)_++,me++;Z=Z.substring(ke[me-1]||0,Z.length),de=me>0?ke.indent:0}}return this.lineWidgets&&this.lineWidgets[G]&&this.lineWidgets[G].rowsAbove&&(_+=this.lineWidgets[G].rowsAbove),{row:_,column:de+this.$getStringScreenWidth(Z)[0]}},N.prototype.documentToScreenColumn=function(L,F){return this.documentToScreenPosition(L,F).column},N.prototype.documentToScreenRow=function(L,F){return this.documentToScreenPosition(L,F).row},N.prototype.getScreenLength=function(){var L=0,F=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,B=0,_=0,F=this.$foldData[_++],R=F?F.start.row:1/0;BR&&(B=F.end.row+1,F=this.$foldData[_++],R=F?F.start.row:1/0)}else{L=this.getLength();for(var P=this.$foldData,_=0;_P));B++);return[_,B]})},N.prototype.getPrecedingCharacter=function(){var L=this.selection.getCursor();if(L.column===0)return L.row===0?"":this.doc.getNewLineCharacter();var F=this.getLine(L.row);return F[L.column-1]},N.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},N}();b.$uid=0,b.prototype.$modes=l.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=I,s.implement(b.prototype,c);var v=1,E=2,D=3,C=4,w=9,T=10,A=11,$=12;function I(N){return N<4352?!1:N>=4352&&N<=4447||N>=4515&&N<=4519||N>=4602&&N<=4607||N>=9001&&N<=9002||N>=11904&&N<=11929||N>=11931&&N<=12019||N>=12032&&N<=12245||N>=12272&&N<=12283||N>=12288&&N<=12350||N>=12353&&N<=12438||N>=12441&&N<=12543||N>=12549&&N<=12589||N>=12593&&N<=12686||N>=12688&&N<=12730||N>=12736&&N<=12771||N>=12784&&N<=12830||N>=12832&&N<=12871||N>=12880&&N<=13054||N>=13056&&N<=19903||N>=19968&&N<=42124||N>=42128&&N<=42182||N>=43360&&N<=43388||N>=44032&&N<=55203||N>=55216&&N<=55238||N>=55243&&N<=55291||N>=63744&&N<=64255||N>=65040&&N<=65049||N>=65072&&N<=65106||N>=65108&&N<=65126||N>=65128&&N<=65131||N>=65281&&N<=65376||N>=65504&&N<=65510}r("./edit_session/folding").Folding.call(b.prototype),r("./edit_session/bracket_match").BracketMatch.call(b.prototype),l.defineOptions(b.prototype,"session",{wrap:{set:function(N){if(!N||N=="off"?N=!1:N=="free"?N=!0:N=="printMargin"?N=-1:typeof N=="string"&&(N=parseInt(N,10)||!1),this.$wrap!=N)if(this.$wrap=N,!N)this.setUseWrapMode(!1);else{var L=typeof N=="number"?N:null;this.setWrapLimitRange(L,L),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(N){N=N=="auto"?this.$mode.type!="text":N!="text",N!=this.$wrapAsCode&&(this.$wrapAsCode=N,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(N){this.$useWorker=N,this.$stopWorker(),N&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(N){N=parseInt(N),N>0&&this.$tabSize!==N&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=N,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(N){this.setFoldStyle(N)},handlesSet:!0},overwrite:{set:function(N){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(N){this.doc.setNewLineMode(N)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(N){this.setMode(N)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./lib/oop"),a=r("./range").Range,l=function(){function u(){this.$options={}}return u.prototype.set=function(h){return o.mixin(this.$options,h),this},u.prototype.getOptions=function(){return s.copyObject(this.$options)},u.prototype.setOptions=function(h){this.$options=h},u.prototype.find=function(h){var d=this.$options,f=this.$matchIterator(h,d);if(!f)return!1;var p=null;return f.forEach(function(g,y,b,v){return p=new a(g,y,b,v),y==v&&d.start&&d.start.start&&d.skipCurrent!=!1&&p.isEqual(d.start)?(p=null,!1):!0}),p},u.prototype.findAll=function(h){var d=this.$options;if(!d.needle)return[];this.$assembleRegExp(d);var f=d.range,p=f?h.getLines(f.start.row,f.end.row):h.doc.getAllLines(),g=[],y=d.re;if(d.$isMultiLine){var b=y.length,v=p.length-b,E;e:for(var D=y.offset||0;D<=v;D++){for(var C=0;CA||(g.push(E=new a(D,A,D+b-1,$)),b>2&&(D=D+b-2))}}else for(var I=0;IP&&g[C].end.row==_;)C--;for(g=g.slice(I,C+1),I=0,C=g.length;I"+C.end.row+":"+C.end.column}function f(C,w){var T=C.action=="insert",A=w.action=="insert";if(T&&A)if(a(w.start,C.end)>=0)y(w,C,-1);else if(a(w.start,C.start)<=0)y(C,w,1);else return null;else if(T&&!A)if(a(w.start,C.end)>=0)y(w,C,-1);else if(a(w.end,C.start)<=0)y(C,w,-1);else return null;else if(!T&&A)if(a(w.start,C.start)>=0)y(w,C,1);else if(a(w.start,C.start)<=0)y(C,w,1);else return null;else if(!T&&!A)if(a(w.start,C.start)>=0)y(w,C,1);else if(a(w.end,C.start)<=0)y(C,w,-1);else return null;return[w,C]}function p(C,w){for(var T=C.length;T--;)for(var A=0;A=0?y(C,w,-1):(a(C.start,w.start)<=0||y(C,l.fromPoints(w.start,C.start),-1),y(w,C,1));else if(!T&&A)a(w.start,C.end)>=0?y(w,C,-1):(a(w.start,C.start)<=0||y(w,l.fromPoints(C.start,w.start),-1),y(C,w,1));else if(!T&&!A)if(a(w.start,C.end)>=0)y(w,C,-1);else if(a(w.end,C.start)<=0)y(C,w,-1);else{var $,I;return a(C.start,w.start)<0&&($=C,C=v(C,w.start)),a(C.end,w.end)>0&&(I=v(C,w.end)),b(w.end,C.start,C.end,-1),I&&!$&&(C.lines=I.lines,C.start=I.start,C.end=I.end,I=C),[w,$,I].filter(Boolean)}return[w,C]}function y(C,w,T){b(C.start,w.start,w.end,T),b(C.end,w.start,w.end,T)}function b(C,w,T,A){C.row==(A==1?w:T).row&&(C.column+=A*(T.column-w.column)),C.row+=A*(T.row-w.row)}function v(C,w){var T=C.lines,A=C.end;C.end=c(w);var $=C.end.row-C.start.row,I=T.splice($,T.length),N=$?w.column:w.column-C.start.column;T.push(I[0].substring(0,N)),I[0]=I[0].substr(N);var L={start:c(w),end:A,lines:I,action:C.action};return L}function E(C,w){w=u(w);for(var T=C.length;T--;){for(var A=C[T],$=0;$this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,u){return-c.range.compareEnd(u.start.row,u.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},l.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},l.prototype.walk=function(a,c,u){var h=0,d=this.folds,f,p,g,y=!0;c==null&&(c=this.end.row,u=this.end.column);for(var b=0;b0)){var y=o(c,p.start);return g===0?u&&y!==0?-f-2:f:y>0||y===0&&!u?f:-f-1}}return-f-1},a.prototype.add=function(c){var u=!c.isEmpty(),h=this.pointIndex(c.start,u);h<0&&(h=-h-1);var d=this.pointIndex(c.end,u,h);return d<0?d=-d-1:d++,this.ranges.splice(h,d-h,c)},a.prototype.addList=function(c){for(var u=[],h=c.length;h--;)u.push.apply(u,this.add(c[h]));return u},a.prototype.substractPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges.splice(u,1)},a.prototype.merge=function(){var c=[],u=this.ranges;u=u.sort(function(g,y){return o(g.start,y.start)});for(var h=u[0],d,f=1;f=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges[u]},a.prototype.clipRows=function(c,u){var h=this.ranges;if(h[0].start.row>u||h[h.length-1].start.row=d)break}if(c.action=="insert")for(var v=f-d,E=-u.column+h.column;gd)break;if(b.start.row==d&&b.start.column>=u.column&&(b.start.column==u.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=v)),b.end.row==d&&b.end.column>=u.column){if(b.end.column==u.column&&this.$bias<0)continue;b.end.column==u.column&&E>0&&gb.start.column&&b.end.column==p[g+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=v}}else for(var v=d-f,E=u.column-h.column;gf)break;b.end.rowu.column)&&(b.end.column=u.column,b.end.row=u.row):(b.end.column+=E,b.end.row+=v):b.end.row>f&&(b.end.row+=v),b.start.rowu.column)&&(b.start.column=u.column,b.start.row=u.row):(b.start.column+=E,b.start.row+=v):b.start.row>f&&(b.start.row+=v)}if(v!=0&&g=h)return g;if(g.end.row>h)return null}return null},this.getNextFoldLine=function(h,d){var f=this.$foldData,p=0;for(d&&(p=f.indexOf(d)),p==-1&&(p=0),p;p=h)return g}return null},this.getFoldedRowCount=function(h,d){for(var f=this.$foldData,p=d-h+1,g=0;g=d){v=h?p-=d-v:p=0);break}else b>=h&&(v>=h?p-=b-v:p-=b-h+1)}return p},this.$addFoldLine=function(h){return this.$foldData.push(h),this.$foldData.sort(function(d,f){return d.start.row-f.start.row}),h},this.addFold=function(h,d){var f=this.$foldData,p=!1,g;h instanceof l?g=h:(g=new l(d,h),g.collapseChildren=d.collapseChildren),this.$clipRangeToDocument(g.range);var y=g.start.row,b=g.start.column,v=g.end.row,E=g.end.column,D=this.getFoldAt(y,b,1),C=this.getFoldAt(v,E,-1);if(D&&C==D)return D.addSubFold(g);D&&!D.range.isStart(y,b)&&this.removeFold(D),C&&!C.range.isEnd(v,E)&&this.removeFold(C);var w=this.getFoldsInRange(g.range);w.length>0&&(this.removeFolds(w),g.collapseChildren||w.forEach(function(I){g.addSubFold(I)}));for(var T=0;T0&&this.foldAll(h.start.row+1,h.end.row,h.collapseChildren-1),h.subFolds=[]},this.expandFolds=function(h){h.forEach(function(d){this.expandFold(d)},this)},this.unfold=function(h,d){var f,p;if(h==null)f=new s(0,0,this.getLength(),0),d==null&&(d=!0);else if(typeof h=="number")f=new s(h,0,h,this.getLine(h).length);else if("row"in h)f=s.fromPoints(h,h);else{if(Array.isArray(h))return p=[],h.forEach(function(y){p=p.concat(this.unfold(y))},this),p;f=h}p=this.getFoldsInRangeList(f);for(var g=p;p.length==1&&s.comparePoints(p[0].start,f.start)<0&&s.comparePoints(p[0].end,f.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(f);if(d!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(h,d){return!!this.getFoldLine(h,d)},this.getRowFoldEnd=function(h,d){var f=this.getFoldLine(h,d);return f?f.end.row:h},this.getRowFoldStart=function(h,d){var f=this.getFoldLine(h,d);return f?f.start.row:h},this.getFoldDisplayLine=function(h,d,f,p,g){p==null&&(p=h.start.row),g==null&&(g=0),d==null&&(d=h.end.row),f==null&&(f=this.getLine(d).length);var y=this.doc,b="";return h.walk(function(v,E,D,C){if(!(ED)break;while(g&&b.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return v.end.row=p.getCurrentTokenRow(),v.end.column=p.getCurrentTokenColumn(),v}},this.foldAll=function(h,d,f,p){f==null&&(f=1e5);var g=this.foldWidgets;if(g){d=d||this.getLength(),h=h||0;for(var y=h;y=h&&(y=b.end.row,b.collapseChildren=f,this.addFold("...",b))}}},this.foldToLevel=function(h){for(this.foldAll();h-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var h=this;this.foldAll(null,null,null,function(d){for(var f=h.getTokens(d),p=0;p=0;){var y=f[p];if(y==null&&(y=f[p]=this.getFoldWidget(p)),y=="start"){var b=this.getFoldWidgetRange(p);if(g||(g=b),b&&b.end.row>=h)break}p--}return{range:p!==-1&&b,firstRange:g}},this.onFoldWidgetClick=function(h,d){d instanceof c&&(d=d.domEvent);var f={children:d.shiftKey,all:d.ctrlKey||d.metaKey,siblings:d.altKey},p=this.$toggleFoldWidget(h,f);if(!p){var g=d.target||d.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(h,d){if(this.getFoldWidget){var f=this.getFoldWidget(h),p=this.getLine(h),g=f==="end"?-1:1,y=this.getFoldAt(h,g===-1?0:p.length,g);if(y)return d.children||d.all?this.removeFold(y):this.expandFold(y),y;var b=this.getFoldWidgetRange(h,!0);if(b&&!b.isMultiLine()&&(y=this.getFoldAt(b.start.row,b.start.column,1),y&&b.isEqual(y.range)))return this.removeFold(y),y;if(d.siblings){var v=this.getParentFoldRangeData(h);if(v.range)var E=v.range.start.row+1,D=v.range.end.row;this.foldAll(E,D,d.all?1e4:0)}else d.children?(D=b?b.end.row:this.getLength(),this.foldAll(h+1,D,d.all?1e4:0)):b&&(d.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(h){var d=this.selection.getCursor().row;d=this.getRowFoldStart(d);var f=this.$toggleFoldWidget(d,{});if(!f){var p=this.getParentFoldRangeData(d,!0);if(f=p.range||p.firstRange,f){d=f.start.row;var g=this.getFoldAt(d,this.getLine(d).length,1);g?this.removeFold(g):this.addFold("...",f)}}},this.updateFoldWidgets=function(h){var d=h.start.row,f=h.end.row-d;if(f===0)this.foldWidgets[d]=null;else if(h.action=="remove")this.foldWidgets.splice(d,f+1,null);else{var p=Array(f+1);p.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(h){var d=h.data;d.first!=d.last&&this.foldWidgets.length>d.first&&this.foldWidgets.splice(d.first,this.foldWidgets.length)}}n.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=r("../range").Range;function l(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var u=c||this.getLine(a.row).charAt(a.column-1);if(u=="")return null;var h=u.match(/([\(\[\{])|([\)\]\}])/);return h?h[1]?this.$findClosingBracket(h[1],a):this.$findOpeningBracket(h[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),u=!0,h,d=c.charAt(a.column-1),f=d&&d.match(/([\(\[\{])|([\)\]\}])/);if(f||(d=c.charAt(a.column),a={row:a.row,column:a.column+1},f=d&&d.match(/([\(\[\{])|([\)\]\}])/),u=!1),!f)return null;if(f[1]){var p=this.$findClosingBracket(f[1],a);if(!p)return null;h=o.fromPoints(a,p),u||(h.end.column++,h.start.column--),h.cursor=h.end}else{var p=this.$findOpeningBracket(f[2],a);if(!p)return null;h=o.fromPoints(p,a),u||(h.start.column++,h.end.column--),h.cursor=h.start}return h},this.getMatchingBracketRanges=function(a,c){var u=this.getLine(a.row),h=/([\(\[\{])|([\)\]\}])/,d=!c&&u.charAt(a.column-1),f=d&&d.match(h);if(f||(d=(c===void 0||c)&&u.charAt(a.column),a={row:a.row,column:a.column+1},f=d&&d.match(h)),!f)return null;var p=new o(a.row,a.column-1,a.row,a.column),g=f[1]?this.$findClosingBracket(f[1],a):this.$findOpeningBracket(f[2],a);if(!g)return[p];var y=new o(g.row,g.column,g.row,g.column+1);return[p,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,u){var h=this.$brackets[a],d=1,f=new s(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn()-2,y=p.value;;){for(;g>=0;){var b=y.charAt(g);if(b==h){if(d-=1,d==0)return{row:f.getCurrentTokenRow(),column:g+f.getCurrentTokenColumn()}}else b==a&&(d+=1);g-=1}do p=f.stepBackward();while(p&&!u.test(p.type));if(p==null)break;y=p.value,g=y.length-1}return null}},this.$findClosingBracket=function(a,c,u){var h=this.$brackets[a],d=1,f=new s(this,c.row,c.column),p=f.getCurrentToken();if(p||(p=f.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=c.column-f.getCurrentTokenColumn();;){for(var y=p.value,b=y.length;g"?h=!0:c.type.indexOf("tag-name")!==-1&&(u=!0));while(c&&!u);return c},this.$findClosingTag=function(a,c){var u,h=c.value,d=c.value,f=0,p=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var g=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),y=!1;do{if(u=c,u.type.indexOf("tag-close")!==-1&&!y){var b=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);y=!0}if(c=a.stepForward(),c){if(c.value===">"&&!y){var b=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);y=!0}if(c.type.indexOf("tag-name")!==-1){if(h=c.value,d===h){if(u.value==="<")f++;else if(u.value==="")var D=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(d===h&&c.value==="/>"&&(f--,f<0))var v=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),E=v,D=E,b=new o(g.end.row,g.end.column,g.end.row,g.end.column+1)}}while(c&&f>=0);if(p&&b&&v&&D&&g&&E)return{openTag:new o(p.start.row,p.start.column,b.end.row,b.end.column),closeTag:new o(v.start.row,v.start.column,D.end.row,D.end.column),openTagName:g,closeTagName:E}},this.$findOpeningTag=function(a,c){var u=a.getCurrentToken(),h=c.value,d=0,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,y=new o(f,p,f,g);a.stepForward();var b=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=a.stepForward()),!(!c||c.value!==">")){var v=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=u,f=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+c.value.length,u=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(h===c.value)if(u.value==="<"){if(d++,d>0){var E=new o(f,p,f,g),D=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var C=new o(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else u.value===""){for(var w=0,T=u;T;){if(T.type.indexOf("tag-name")!==-1&&T.value===h){d--;break}else if(T.value==="<")break;T=a.stepBackward(),w++}for(var A=0;AP&&(this.$docRowCache.splice(P,F),this.$screenRowCache.splice(P,F))},N.prototype.$getRowCacheIndex=function(L,F){for(var P=0,_=L.length-1;P<=_;){var M=P+_>>1,j=L[M];if(F>j)P=M+1;else if(F=F));j++);return _=P[j],_?(_.index=j,_.start=M-_.value.length,_):null},N.prototype.setUndoManager=function(L){if(this.$undoManager=L,this.$informUndoManager&&this.$informUndoManager.cancel(),L){var F=this;L.addSession(this),this.$syncInformUndoManager=function(){F.$informUndoManager.cancel(),F.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},N.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},N.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},N.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):" "},N.prototype.setUseSoftTabs=function(L){this.setOption("useSoftTabs",L)},N.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},N.prototype.setTabSize=function(L){this.setOption("tabSize",L)},N.prototype.getTabSize=function(){return this.$tabSize},N.prototype.isTabStop=function(L){return this.$useSoftTabs&&L.column%this.$tabSize===0},N.prototype.setNavigateWithinSoftTabs=function(L){this.setOption("navigateWithinSoftTabs",L)},N.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},N.prototype.setOverwrite=function(L){this.setOption("overwrite",L)},N.prototype.getOverwrite=function(){return this.$overwrite},N.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},N.prototype.addGutterDecoration=function(L,F){this.$decorations[L]||(this.$decorations[L]=""),this.$decorations[L]+=" "+F,this._signal("changeBreakpoint",{})},N.prototype.removeGutterDecoration=function(L,F){this.$decorations[L]=(this.$decorations[L]||"").replace(" "+F,""),this._signal("changeBreakpoint",{})},N.prototype.getBreakpoints=function(){return this.$breakpoints},N.prototype.setBreakpoints=function(L){this.$breakpoints=[];for(var F=0;F0&&(_=!!P.charAt(F-1).match(this.tokenRe)),_||(_=!!P.charAt(F).match(this.tokenRe)),_)var M=this.tokenRe;else if(/^\s+$/.test(P.slice(F-1,F+1)))var M=/\s/;else var M=this.nonTokenRe;var j=F;if(j>0){do j--;while(j>=0&&P.charAt(j).match(M));j++}for(var R=F;RL&&(L=F.screenWidth)}),this.lineWidgetWidth=L},N.prototype.$computeWidth=function(L){if(this.$modified||L){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var F=this.doc.getAllLines(),P=this.$rowLengthCache,_=0,M=0,j=this.$foldData[M],R=j?j.start.row:1/0,G=F.length,q=0;qR){if(q=j.end.row+1,q>=G)break;j=this.$foldData[M++],R=j?j.start.row:1/0}P[q]==null&&(P[q]=this.$getStringScreenWidth(F[q])[0]),P[q]>_&&(_=P[q])}this.screenWidth=_}},N.prototype.getLine=function(L){return this.doc.getLine(L)},N.prototype.getLines=function(L,F){return this.doc.getLines(L,F)},N.prototype.getLength=function(){return this.doc.getLength()},N.prototype.getTextRange=function(L){return this.doc.getTextRange(L||this.selection.getRange())},N.prototype.insert=function(L,F){return this.doc.insert(L,F)},N.prototype.remove=function(L){return this.doc.remove(L)},N.prototype.removeFullLines=function(L,F){return this.doc.removeFullLines(L,F)},N.prototype.undoChanges=function(L,F){if(L.length){this.$fromUndo=!0;for(var P=L.length-1;P!=-1;P--){var _=L[P];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!F&&this.$undoSelect&&(L.selectionBefore?this.selection.fromJSON(L.selectionBefore):this.selection.setRange(this.$getUndoSelection(L,!0))),this.$fromUndo=!1}},N.prototype.redoChanges=function(L,F){if(L.length){this.$fromUndo=!0;for(var P=0;PL.end.column&&(j.start.column+=G),j.end.row==L.end.row&&j.end.column>L.end.column&&(j.end.column+=G)),R&&j.start.row>=L.end.row&&(j.start.row+=R,j.end.row+=R)}if(j.end=this.insert(j.start,_),M.length){var q=L.start,ee=j.start,R=ee.row-q.row,G=ee.column-q.column;this.addFolds(M.map(function(Q){return Q=Q.clone(),Q.start.row==q.row&&(Q.start.column+=G),Q.end.row==q.row&&(Q.end.column+=G),Q.start.row+=R,Q.end.row+=R,Q}))}return j},N.prototype.indentRows=function(L,F,P){P=P.replace(/\t/g,this.getTabString());for(var _=L;_<=F;_++)this.doc.insertInLine({row:_,column:0},P)},N.prototype.outdentRows=function(L){for(var F=L.collapseRows(),P=new d(0,0,0,0),_=this.getTabSize(),M=F.start.row;M<=F.end.row;++M){var j=this.getLine(M);P.start.row=M,P.end.row=M;for(var R=0;R<_&&j.charAt(R)==" ";++R);R<_&&j.charAt(R)==" "?(P.start.column=R,P.end.column=R+1):(P.start.column=0,P.end.column=R),this.remove(P)}},N.prototype.$moveLines=function(L,F,P){if(L=this.getRowFoldStart(L),F=this.getRowFoldEnd(F),P<0){var _=this.getRowFoldStart(L+P);if(_<0)return 0;var M=_-L}else if(P>0){var _=this.getRowFoldEnd(F+P);if(_>this.doc.getLength()-1)return 0;var M=_-F}else{L=this.$clipRowToDocument(L),F=this.$clipRowToDocument(F);var M=F-L+1}var j=new d(L,0,F,Number.MAX_VALUE),R=this.getFoldsInRange(j).map(function(q){return q=q.clone(),q.start.row+=M,q.end.row+=M,q}),G=P==0?this.doc.getLines(L,F):this.doc.removeFullLines(L,F);return this.doc.insertFullLines(L+M,G),R.length&&this.addFolds(R),M},N.prototype.moveLinesUp=function(L,F){return this.$moveLines(L,F,-1)},N.prototype.moveLinesDown=function(L,F){return this.$moveLines(L,F,1)},N.prototype.duplicateLines=function(L,F){return this.$moveLines(L,F,0)},N.prototype.$clipRowToDocument=function(L){return Math.max(0,Math.min(L,this.doc.getLength()-1))},N.prototype.$clipColumnToRow=function(L,F){return F<0?0:Math.min(this.doc.getLine(L).length,F)},N.prototype.$clipPositionToDocument=function(L,F){if(F=Math.max(0,F),L<0)L=0,F=0;else{var P=this.doc.getLength();L>=P?(L=P-1,F=this.doc.getLine(P-1).length):F=Math.min(this.doc.getLine(L).length,F)}return{row:L,column:F}},N.prototype.$clipRangeToDocument=function(L){L.start.row<0?(L.start.row=0,L.start.column=0):L.start.column=this.$clipColumnToRow(L.start.row,L.start.column);var F=this.doc.getLength()-1;return L.end.row>F?(L.end.row=F,L.end.column=this.doc.getLine(F).length):L.end.column=this.$clipColumnToRow(L.end.row,L.end.column),L},N.prototype.setUseWrapMode=function(L){if(L!=this.$useWrapMode){if(this.$useWrapMode=L,this.$modified=!0,this.$resetRowCache(0),L){var F=this.getLength();this.$wrapData=Array(F),this.$updateWrapData(0,F-1)}this._signal("changeWrapMode")}},N.prototype.getUseWrapMode=function(){return this.$useWrapMode},N.prototype.setWrapLimitRange=function(L,F){(this.$wrapLimitRange.min!==L||this.$wrapLimitRange.max!==F)&&(this.$wrapLimitRange={min:L,max:F},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},N.prototype.adjustWrapLimit=function(L,F){var P=this.$wrapLimitRange;P.max<0&&(P={min:F,max:F});var _=this.$constrainWrapLimit(L,P.min,P.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},N.prototype.$constrainWrapLimit=function(L,F,P){return F&&(L=Math.max(F,L)),P&&(L=Math.min(P,L)),L},N.prototype.getWrapLimit=function(){return this.$wrapLimit},N.prototype.setWrapLimit=function(L){this.setWrapLimitRange(L,L)},N.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},N.prototype.$updateInternalDataOnChange=function(L){var F=this.$useWrapMode,P=L.action,_=L.start,M=L.end,j=_.row,R=M.row,G=R-j,q=null;if(this.$updating=!0,G!=0)if(P==="remove"){this[F?"$wrapData":"$rowLengthCache"].splice(j,G);var ee=this.$foldData;q=this.getFoldsInRange(L),this.removeFolds(q);var Y=this.getFoldLine(M.row),X=0;if(Y){Y.addRemoveChars(M.row,M.column,_.column-M.column),Y.shiftRow(-G);var Q=this.getFoldLine(j);Q&&Q!==Y&&(Q.merge(Y),Y=Q),X=ee.indexOf(Y)+1}for(X;X=M.row&&Y.shiftRow(-G)}R=j}else{var te=Array(G);te.unshift(j,0);var Z=F?this.$wrapData:this.$rowLengthCache;Z.splice.apply(Z,te);var ee=this.$foldData,Y=this.getFoldLine(j),X=0;if(Y){var de=Y.range.compareInside(_.row,_.column);de==0?(Y=Y.split(_.row,_.column),Y&&(Y.shiftRow(G),Y.addRemoveChars(R,0,M.column-_.column))):de==-1&&(Y.addRemoveChars(j,0,M.column-_.column),Y.shiftRow(G)),X=ee.indexOf(Y)+1}for(X;X=j&&Y.shiftRow(G)}}else{G=Math.abs(L.start.column-L.end.column),P==="remove"&&(q=this.getFoldsInRange(L),this.removeFolds(q),G=-G);var Y=this.getFoldLine(j);Y&&Y.addRemoveChars(j,_.column,G)}return F&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,F?this.$updateWrapData(j,R):this.$updateRowLengthCache(j,R),q},N.prototype.$updateRowLengthCache=function(L,F){this.$rowLengthCache[L]=null,this.$rowLengthCache[F]=null},N.prototype.$updateWrapData=function(L,F){var P=this.doc.getAllLines(),_=this.getTabSize(),M=this.$wrapData,j=this.$wrapLimit,R,G,q=L;for(F=Math.min(F,P.length-1);q<=F;)G=this.getFoldLine(q,G),G?(R=[],G.walk((function(ee,Y,X,Q){var te;if(ee!=null){te=this.$getDisplayTokens(ee,R.length),te[0]=D;for(var Z=1;ZF-Q;){var te=j+F-Q;if(L[te-1]>=T&&L[te]>=T){X(te);continue}if(L[te]==D||L[te]==C){for(te;te!=j-1&&L[te]!=D;te--);if(te>j){X(te);continue}for(te=j+F,te;te>2)),j-1);te>Z&&L[te]Z&&L[te]Z&&L[te]==w;)te--}else for(;te>Z&&L[te]Z){X(++te);continue}te=j+F,L[te]==E&&te--,X(te-Q)}return _},N.prototype.$getDisplayTokens=function(L,F){var P=[],_;F=F||0;for(var M=0;M39&&j<48||j>57&&j<64?P.push(w):j>=4352&&I(j)?P.push(v,E):P.push(v)}return P},N.prototype.$getStringScreenWidth=function(L,F,P){if(F==0)return[0,0];F==null&&(F=1/0),P=P||0;var _,M;for(M=0;M=4352&&I(_)?P+=2:P+=1,!(P>F));M++);return[P,M]},N.prototype.getRowLength=function(L){var F=1;return this.lineWidgets&&(F+=this.lineWidgets[L]&&this.lineWidgets[L].rowCount||0),!this.$useWrapMode||!this.$wrapData[L]?F:this.$wrapData[L].length+F},N.prototype.getRowLineCount=function(L){return!this.$useWrapMode||!this.$wrapData[L]?1:this.$wrapData[L].length+1},N.prototype.getRowWrapIndent=function(L){if(this.$useWrapMode){var F=this.screenToDocumentPosition(L,Number.MAX_VALUE),P=this.$wrapData[F.row];return P.length&&P[0]=0)var G=ee[Y],M=this.$docRowCache[Y],Q=L>ee[X-1];else var Q=!X;for(var te=this.getLength()-1,Z=this.getNextFoldLine(M),de=Z?Z.start.row:1/0;G<=L&&(q=this.getRowLength(M),!(G+q>L||M>=te));)G+=q,M++,M>de&&(M=Z.end.row+1,Z=this.getNextFoldLine(M,Z),de=Z?Z.start.row:1/0),Q&&(this.$docRowCache.push(M),this.$screenRowCache.push(G));if(Z&&Z.start.row<=M)_=this.getFoldDisplayLine(Z),M=Z.start.row;else{if(G+q<=L||M>te)return{row:te,column:this.getLine(te).length};_=this.getLine(M),Z=null}var ke=0,me=Math.floor(L-G);if(this.$useWrapMode){var Fe=this.$wrapData[M];Fe&&(R=Fe[me],me>0&&Fe.length&&(ke=Fe.indent,j=Fe[me-1]||Fe[Fe.length-1],_=_.substring(j)))}return P!==void 0&&this.$bidiHandler.isBidiRow(G+me,M,me)&&(F=this.$bidiHandler.offsetToCol(P)),j+=this.$getStringScreenWidth(_,F-ke)[1],this.$useWrapMode&&j>=R&&(j=R-1),Z?Z.idxToPosition(j):{row:M,column:j}},N.prototype.documentToScreenPosition=function(L,F){if(typeof F>"u")var P=this.$clipPositionToDocument(L.row,L.column);else P=this.$clipPositionToDocument(L,F);L=P.row,F=P.column;var _=0,M=null,j=null;j=this.getFoldAt(L,F,1),j&&(L=j.start.row,F=j.start.column);var R,G=0,q=this.$docRowCache,ee=this.$getRowCacheIndex(q,L),Y=q.length;if(Y&&ee>=0)var G=q[ee],_=this.$screenRowCache[ee],X=L>q[Y-1];else var X=!Y;for(var Q=this.getNextFoldLine(G),te=Q?Q.start.row:1/0;G=te){if(R=Q.end.row+1,R>L)break;Q=this.getNextFoldLine(R,Q),te=Q?Q.start.row:1/0}else R=G+1;_+=this.getRowLength(G),G=R,X&&(this.$docRowCache.push(G),this.$screenRowCache.push(_))}var Z="";Q&&G>=te?(Z=this.getFoldDisplayLine(Q,L,F),M=Q.start.row):(Z=this.getLine(L).substring(0,F),M=L);var de=0;if(this.$useWrapMode){var ke=this.$wrapData[M];if(ke){for(var me=0;Z.length>=ke[me];)_++,me++;Z=Z.substring(ke[me-1]||0,Z.length),de=me>0?ke.indent:0}}return this.lineWidgets&&this.lineWidgets[G]&&this.lineWidgets[G].rowsAbove&&(_+=this.lineWidgets[G].rowsAbove),{row:_,column:de+this.$getStringScreenWidth(Z)[0]}},N.prototype.documentToScreenColumn=function(L,F){return this.documentToScreenPosition(L,F).column},N.prototype.documentToScreenRow=function(L,F){return this.documentToScreenPosition(L,F).row},N.prototype.getScreenLength=function(){var L=0,F=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,j=0,_=0,F=this.$foldData[_++],R=F?F.start.row:1/0;jR&&(j=F.end.row+1,F=this.$foldData[_++],R=F?F.start.row:1/0)}else{L=this.getLength();for(var P=this.$foldData,_=0;_P));j++);return[_,j]})},N.prototype.getPrecedingCharacter=function(){var L=this.selection.getCursor();if(L.column===0)return L.row===0?"":this.doc.getNewLineCharacter();var F=this.getLine(L.row);return F[L.column-1]},N.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},N}();b.$uid=0,b.prototype.$modes=a.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=I,s.implement(b.prototype,c);var v=1,E=2,D=3,C=4,w=9,T=10,A=11,$=12;function I(N){return N<4352?!1:N>=4352&&N<=4447||N>=4515&&N<=4519||N>=4602&&N<=4607||N>=9001&&N<=9002||N>=11904&&N<=11929||N>=11931&&N<=12019||N>=12032&&N<=12245||N>=12272&&N<=12283||N>=12288&&N<=12350||N>=12353&&N<=12438||N>=12441&&N<=12543||N>=12549&&N<=12589||N>=12593&&N<=12686||N>=12688&&N<=12730||N>=12736&&N<=12771||N>=12784&&N<=12830||N>=12832&&N<=12871||N>=12880&&N<=13054||N>=13056&&N<=19903||N>=19968&&N<=42124||N>=42128&&N<=42182||N>=43360&&N<=43388||N>=44032&&N<=55203||N>=55216&&N<=55238||N>=55243&&N<=55291||N>=63744&&N<=64255||N>=65040&&N<=65049||N>=65072&&N<=65106||N>=65108&&N<=65126||N>=65128&&N<=65131||N>=65281&&N<=65376||N>=65504&&N<=65510}r("./edit_session/folding").Folding.call(b.prototype),r("./edit_session/bracket_match").BracketMatch.call(b.prototype),a.defineOptions(b.prototype,"session",{wrap:{set:function(N){if(!N||N=="off"?N=!1:N=="free"?N=!0:N=="printMargin"?N=-1:typeof N=="string"&&(N=parseInt(N,10)||!1),this.$wrap!=N)if(this.$wrap=N,!N)this.setUseWrapMode(!1);else{var L=typeof N=="number"?N:null;this.setWrapLimitRange(L,L),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(N){N=N=="auto"?this.$mode.type!="text":N!="text",N!=this.$wrapAsCode&&(this.$wrapAsCode=N,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(N){this.$useWorker=N,this.$stopWorker(),N&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(N){N=parseInt(N),N>0&&this.$tabSize!==N&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=N,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(N){this.setFoldStyle(N)},handlesSet:!0},overwrite:{set:function(N){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(N){this.doc.setNewLineMode(N)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(N){this.setMode(N)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(r,n,i){var s=r("./lib/lang"),o=r("./lib/oop"),l=r("./range").Range,a=function(){function u(){this.$options={}}return u.prototype.set=function(h){return o.mixin(this.$options,h),this},u.prototype.getOptions=function(){return s.copyObject(this.$options)},u.prototype.setOptions=function(h){this.$options=h},u.prototype.find=function(h){var d=this.$options,f=this.$matchIterator(h,d);if(!f)return!1;var p=null;return f.forEach(function(g,y,b,v){return p=new l(g,y,b,v),y==v&&d.start&&d.start.start&&d.skipCurrent!=!1&&p.isEqual(d.start)?(p=null,!1):!0}),p},u.prototype.findAll=function(h){var d=this.$options;if(!d.needle)return[];this.$assembleRegExp(d);var f=d.range,p=f?h.getLines(f.start.row,f.end.row):h.doc.getAllLines(),g=[],y=d.re;if(d.$isMultiLine){var b=y.length,v=p.length-b,E;e:for(var D=y.offset||0;D<=v;D++){for(var C=0;CA||(g.push(E=new l(D,A,D+b-1,$)),b>2&&(D=D+b-2))}}else for(var I=0;IP&&g[C].end.row==_;)C--;for(g=g.slice(I,C+1),I=0,C=g.length;I=E;$--)if(T($,Number.MAX_VALUE,A))return;if(d.wrap!=!1){for($=D,E=v.row;$>=E;$--)if(T($,Number.MAX_VALUE,A))return}}};else var C=function($){var I=v.row;if(!T(I,v.column,$)){for(I=I+1;I<=D;I++)if(T(I,0,$))return;if(d.wrap!=!1){for(I=E,D=v.row;I<=D;I++)if(T(I,0,$))return}}};if(d.$isMultiLine)var w=f.length,T=function(A,$,I){var N=p?A-w+1:A;if(!(N<0||N+w>h.getLength())){var L=h.getLine(N),F=L.search(f[0]);if(!(!p&&F<$||F===-1)){for(var P=1;P$)&&I(N,F,N+w-1,_))return!0}}};else if(p)var T=function($,I,N){var L=h.getLine($),F=[],P,_=0;for(f.lastIndex=0;P=f.exec(L);){var M=P[0].length;if(_=P.index,!M){if(_>=L.length)break;f.lastIndex=_+=s.skipEmptyMatch(L,_,y)}if(P.index+M>I)break;F.push(P.index,M)}for(var B=F.length-1;B>=0;B-=2){var R=F[B-1],M=F[B];if(N($,R,$,R+M))return!0}};else var T=function($,I,N){var L=h.getLine($),F,P;for(f.lastIndex=I;P=f.exec(L);){var _=P[0].length;if(F=P.index,N($,F,$,F+_))return!0;if(!_&&(f.lastIndex=F+=s.skipEmptyMatch(L,F,y),F>=L.length))return!1}};return{forEach:C}},u}();function c(u,h){var d=s.supportsLookbehind();function f(b,v){v===void 0&&(v=!0);var E=d&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(b)||h.regExp?d&&h.$supportsUnicodeFlag?v?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(u),g=p[0],y=p[p.length-1];return f(g)+u+f(y,!1)}n.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(r,n,i){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),o=r("../lib/keys"),a=r("../lib/useragent"),l=o.KEY_MODS,c=function(){function d(f,p){this.$init(f,p,!1)}return d.prototype.$init=function(f,p,g){this.platform=p||(a.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},d.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},d.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var y=this.commandKeyBinding;for(var b in y){var v=y[b];if(v==f)delete y[b];else if(Array.isArray(v)){var E=v.indexOf(f);E!=-1&&(v.splice(E,1),v.length==1&&(y[b]=v[0]))}}},d.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(y){var b="";if(y.indexOf(" ")!=-1){var v=y.split(/\s+/);y=v.pop(),v.forEach(function(C){var w=this.parseKeys(C),T=l[w.hashId]+w.key;b+=(b?" ":"")+T,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(y),D=l[E.hashId]+E.key;this._addCommandToBinding(b+D,p,g)},this)}},d.prototype._addCommandToBinding=function(f,p,g){var y=this.commandKeyBinding,b;if(!p)delete y[f];else if(!y[f]||this.$singleCommand)y[f]=p;else{Array.isArray(y[f])?(b=y[f].indexOf(p))!=-1&&y[f].splice(b,1):y[f]=[y[f]],typeof g!="number"&&(g=u(p));var v=y[f];for(b=0;bg)break}v.splice(b,0,p)}},d.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},d.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},d.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},d.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},d.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),g=p.pop(),y=o[g];if(o.FUNCTION_KEYS[y])g=o.FUNCTION_KEYS[y].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var b=0,v=p.length;v--;){var E=o.KEY_MODS[p[v]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+p[v]+" in "+f),!1;b|=E}return{key:g,hashId:b}},d.prototype.findKeyCommand=function(f,p){var g=l[f]+p;return this.commandKeyBinding[g]},d.prototype.handleKeyboard=function(f,p,g,y){if(!(y<0)){var b=l[p]+g,v=this.commandKeyBinding[b];return f.$keyChain&&(f.$keyChain+=" "+b,v=this.commandKeyBinding[f.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||b,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-b.length-1):(p==-1||y>0)&&(f.$keyChain="")),{command:v})}},d.prototype.getStatusText=function(f,p){return p.$keyChain||""},d}();function u(d){return typeof d=="object"&&d.bindKey&&d.bindKey.position||(d.isDefault?-100:0)}var h=function(d){s(f,d);function f(p,g){var y=d.call(this,p,g)||this;return y.$singleCommand=!0,y}return f}(c);h.call=function(d,f,p){c.prototype.$init.call(d,f,p,!0)},c.call=function(d,f,p){c.prototype.$init.call(d,f,p,!1)},n.HashHandler=h,n.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var u=function(h,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},u(h,d)};return function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(h,d);function f(){this.constructor=h}h.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=r("../lib/oop"),a=r("../keyboard/hash_handler").MultiHashHandler,l=r("../lib/event_emitter").EventEmitter,c=function(u){s(h,u);function h(d,f){var p=u.call(this,f,d)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return h.prototype.exec=function(d,f,p){if(Array.isArray(d)){for(var g=d.length;g--;)if(this.exec(d[g],f,p))return!0;return!1}if(typeof d=="string"&&(d=this.commands[d]),!d||f&&f.$readOnly&&!d.readOnly||this.$checkCommandState!=!1&&d.isAvailable&&!d.isAvailable(f))return!1;var y={editor:f,command:d,args:p};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},h.prototype.toggleRecording=function(d){if(!this.$inReplay)return d&&d._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},h.prototype.replay=function(d){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(d);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,d):this.exec(f[0],d,f[1])},this)}finally{this.$inReplay=!1}}},h.prototype.trimMacro=function(d){return d.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},h}(a);o.implement(c.prototype,l),n.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(r,n,i){var s=r("../lib/lang"),o=r("../config"),a=r("../range").Range;function l(u,h){return{win:u,mac:h}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(u){o.loadModule("ace/ext/settings_menu",function(h){h.init(u),u.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(u){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(u,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(u){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(u,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(u){u.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(u){u.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(u,h){typeof h=="number"&&!isNaN(h)&&u.gotoLine(h),u.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(u){u.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(u){u.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(u){u.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(u){u.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(u){u.session.foldAll(),u.session.unfold(u.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(u){u.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(u){u.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(u){u.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(u){o.loadModule("ace/ext/searchbox",function(h){h.Search(u)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(u){u.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(u){u.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(u){u.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(u){u.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(u,h){u.navigateUp(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(u){u.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(u){u.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(u){u.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(u,h){u.navigateDown(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(u){u.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(u){u.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(u){u.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(u){u.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(u,h){u.navigateLeft(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(u){u.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(u){u.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(u){u.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(u){u.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(u,h){u.navigateRight(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(u){u.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(u){u.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(u){u.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(u){u.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(u){u.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(u){u.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(u){u.renderer.scrollBy(0,-2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(u){u.renderer.scrollBy(0,2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(u){u.commands.toggleRecording(u)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(u){u.commands.replay(u)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(u){u.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(u){u.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(u){u.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(u){},readOnly:!0},{name:"cut",description:"Cut",exec:function(u){var h=u.$copyWithEmptySelection&&u.selection.isEmpty(),d=h?u.selection.getLineRange():u.selection.getRange();u._emit("cut",d),d.isEmpty()||u.session.remove(d),u.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(u,h){u.$handlePaste(h)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(u){u.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(u){u.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(u){u.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(u){u.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(u){u.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(u){u.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(u){u.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(u){o.loadModule("ace/ext/searchbox",function(h){h.Search(u,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(u){u.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(u){u.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(u){u.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(u){u.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(u){u.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(u){u.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(u){u.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(u){u.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(u){if(u.selection.isEmpty())u.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(u){u.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(u){u.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(u){var h=u.selection.getRange();h.start.column=0,u.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(u){var h=u.selection.getRange();h.end.column=Number.MAX_VALUE,u.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(u){u.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(u){u.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(u){u.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(u){u.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(u){u.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(u){u.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(u,h){u.insert(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(u,h){u.insert(s.stringRepeat(h.text||"",h.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(u){u.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(u){u.transposeLetters()},multiSelectAction:function(u){u.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(u){u.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(u){u.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(u){u.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(u){var h=u.selection.getRange();h.start.column=h.end.column=0,h.end.row++,u.selection.setRange(h,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(u){u.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(u){for(var h=u.selection.isBackwards(),d=h?u.selection.getSelectionLead():u.selection.getSelectionAnchor(),f=h?u.selection.getSelectionAnchor():u.selection.getSelectionLead(),p=u.session.doc.getLine(d.row).length,g=u.session.doc.getTextRange(u.selection.getRange()),y=g.replace(/\n\s*/," ").length,b=u.session.doc.getLine(d.row),v=d.row+1;v<=f.row+1;v++){var E=s.stringTrimLeft(s.stringTrimRight(u.session.doc.getLine(v)));E.length!==0&&(E=" "+E),b+=E}f.row+10?(u.selection.moveCursorTo(d.row,d.column),u.selection.selectTo(d.row,d.column+y)):(p=u.session.doc.getLine(d.row).length>p?p+1:p,u.selection.moveCursorTo(d.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(u){var h=u.session.doc.getLength()-1,d=u.session.doc.getLine(h).length,f=u.selection.rangeList.ranges,p=[];f.length<1&&(f=[u.selection.getRange()]);for(var g=0;g=E;$--)if(T($,Number.MAX_VALUE,A))return;if(d.wrap!=!1){for($=D,E=v.row;$>=E;$--)if(T($,Number.MAX_VALUE,A))return}}};else var C=function($){var I=v.row;if(!T(I,v.column,$)){for(I=I+1;I<=D;I++)if(T(I,0,$))return;if(d.wrap!=!1){for(I=E,D=v.row;I<=D;I++)if(T(I,0,$))return}}};if(d.$isMultiLine)var w=f.length,T=function(A,$,I){var N=p?A-w+1:A;if(!(N<0||N+w>h.getLength())){var L=h.getLine(N),F=L.search(f[0]);if(!(!p&&F<$||F===-1)){for(var P=1;P$)&&I(N,F,N+w-1,_))return!0}}};else if(p)var T=function($,I,N){var L=h.getLine($),F=[],P,_=0;for(f.lastIndex=0;P=f.exec(L);){var M=P[0].length;if(_=P.index,!M){if(_>=L.length)break;f.lastIndex=_+=s.skipEmptyMatch(L,_,y)}if(P.index+M>I)break;F.push(P.index,M)}for(var j=F.length-1;j>=0;j-=2){var R=F[j-1],M=F[j];if(N($,R,$,R+M))return!0}};else var T=function($,I,N){var L=h.getLine($),F,P;for(f.lastIndex=I;P=f.exec(L);){var _=P[0].length;if(F=P.index,N($,F,$,F+_))return!0;if(!_&&(f.lastIndex=F+=s.skipEmptyMatch(L,F,y),F>=L.length))return!1}};return{forEach:C}},u}();function c(u,h){var d=s.supportsLookbehind();function f(b,v){v===void 0&&(v=!0);var E=d&&h.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return E.test(b)||h.regExp?d&&h.$supportsUnicodeFlag?v?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var p=Array.from(u),g=p[0],y=p[p.length-1];return f(g)+u+f(y,!1)}n.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(r,n,i){var s=this&&this.__extends||function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(g[b]=y[b])},d(f,p)};return function(f,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");d(f,p);function g(){this.constructor=f}f.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),o=r("../lib/keys"),l=r("../lib/useragent"),a=o.KEY_MODS,c=function(){function d(f,p){this.$init(f,p,!1)}return d.prototype.$init=function(f,p,g){this.platform=p||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(f),this.$singleCommand=g},d.prototype.addCommand=function(f){this.commands[f.name]&&this.removeCommand(f),this.commands[f.name]=f,f.bindKey&&this._buildKeyHash(f)},d.prototype.removeCommand=function(f,p){var g=f&&(typeof f=="string"?f:f.name);f=this.commands[g],p||delete this.commands[g];var y=this.commandKeyBinding;for(var b in y){var v=y[b];if(v==f)delete y[b];else if(Array.isArray(v)){var E=v.indexOf(f);E!=-1&&(v.splice(E,1),v.length==1&&(y[b]=v[0]))}}},d.prototype.bindKey=function(f,p,g){if(typeof f=="object"&&f&&(g==null&&(g=f.position),f=f[this.platform]),!!f){if(typeof p=="function")return this.addCommand({exec:p,bindKey:f,name:p.name||f});f.split("|").forEach(function(y){var b="";if(y.indexOf(" ")!=-1){var v=y.split(/\s+/);y=v.pop(),v.forEach(function(C){var w=this.parseKeys(C),T=a[w.hashId]+w.key;b+=(b?" ":"")+T,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(y),D=a[E.hashId]+E.key;this._addCommandToBinding(b+D,p,g)},this)}},d.prototype._addCommandToBinding=function(f,p,g){var y=this.commandKeyBinding,b;if(!p)delete y[f];else if(!y[f]||this.$singleCommand)y[f]=p;else{Array.isArray(y[f])?(b=y[f].indexOf(p))!=-1&&y[f].splice(b,1):y[f]=[y[f]],typeof g!="number"&&(g=u(p));var v=y[f];for(b=0;bg)break}v.splice(b,0,p)}},d.prototype.addCommands=function(f){f&&Object.keys(f).forEach(function(p){var g=f[p];if(g){if(typeof g=="string")return this.bindKey(g,p);typeof g=="function"&&(g={exec:g}),typeof g=="object"&&(g.name||(g.name=p),this.addCommand(g))}},this)},d.prototype.removeCommands=function(f){Object.keys(f).forEach(function(p){this.removeCommand(f[p])},this)},d.prototype.bindKeys=function(f){Object.keys(f).forEach(function(p){this.bindKey(p,f[p])},this)},d.prototype._buildKeyHash=function(f){this.bindKey(f.bindKey,f)},d.prototype.parseKeys=function(f){var p=f.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(D){return D}),g=p.pop(),y=o[g];if(o.FUNCTION_KEYS[y])g=o.FUNCTION_KEYS[y].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:g.toUpperCase(),hashId:-1}}else return{key:g,hashId:-1};for(var b=0,v=p.length;v--;){var E=o.KEY_MODS[p[v]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+p[v]+" in "+f),!1;b|=E}return{key:g,hashId:b}},d.prototype.findKeyCommand=function(f,p){var g=a[f]+p;return this.commandKeyBinding[g]},d.prototype.handleKeyboard=function(f,p,g,y){if(!(y<0)){var b=a[p]+g,v=this.commandKeyBinding[b];return f.$keyChain&&(f.$keyChain+=" "+b,v=this.commandKeyBinding[f.$keyChain]||v),v&&(v=="chainKeys"||v[v.length-1]=="chainKeys")?(f.$keyChain=f.$keyChain||b,{command:"null"}):(f.$keyChain&&((!p||p==4)&&g.length==1?f.$keyChain=f.$keyChain.slice(0,-b.length-1):(p==-1||y>0)&&(f.$keyChain="")),{command:v})}},d.prototype.getStatusText=function(f,p){return p.$keyChain||""},d}();function u(d){return typeof d=="object"&&d.bindKey&&d.bindKey.position||(d.isDefault?-100:0)}var h=function(d){s(f,d);function f(p,g){var y=d.call(this,p,g)||this;return y.$singleCommand=!0,y}return f}(c);h.call=function(d,f,p){c.prototype.$init.call(d,f,p,!0)},c.call=function(d,f,p){c.prototype.$init.call(d,f,p,!1)},n.HashHandler=h,n.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var u=function(h,d){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])},u(h,d)};return function(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");u(h,d);function f(){this.constructor=h}h.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}}(),o=r("../lib/oop"),l=r("../keyboard/hash_handler").MultiHashHandler,a=r("../lib/event_emitter").EventEmitter,c=function(u){s(h,u);function h(d,f){var p=u.call(this,f,d)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return h.prototype.exec=function(d,f,p){if(Array.isArray(d)){for(var g=d.length;g--;)if(this.exec(d[g],f,p))return!0;return!1}if(typeof d=="string"&&(d=this.commands[d]),!d||f&&f.$readOnly&&!d.readOnly||this.$checkCommandState!=!1&&d.isAvailable&&!d.isAvailable(f))return!1;var y={editor:f,command:d,args:p};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},h.prototype.toggleRecording=function(d){if(!this.$inReplay)return d&&d._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(f){this.macro.push([f.command,f.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},h.prototype.replay=function(d){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(d);try{this.$inReplay=!0,this.macro.forEach(function(f){typeof f=="string"?this.exec(f,d):this.exec(f[0],d,f[1])},this)}finally{this.$inReplay=!1}}},h.prototype.trimMacro=function(d){return d.map(function(f){return typeof f[0]!="string"&&(f[0]=f[0].name),f[1]||(f=f[0]),f})},h}(l);o.implement(c.prototype,a),n.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(r,n,i){var s=r("../lib/lang"),o=r("../config"),l=r("../range").Range;function a(u,h){return{win:u,mac:h}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(u){o.loadModule("ace/ext/settings_menu",function(h){h.init(u),u.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(u){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(u,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(u){o.loadModule("ace/ext/error_marker",function(h){h.showErrorMarker(u,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(u){u.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(u){u.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(u,h){typeof h=="number"&&!isNaN(h)&&u.gotoLine(h),u.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(u){u.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(u){u.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(u){u.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(u){u.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(u){u.session.foldAll(),u.session.unfold(u.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(u){u.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(u){u.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(u){u.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(u){o.loadModule("ace/ext/searchbox",function(h){h.Search(u)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(u){u.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(u){u.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(u){u.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(u){u.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(u,h){u.navigateUp(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(u){u.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(u){u.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(u){u.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(u,h){u.navigateDown(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(u){u.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(u){u.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(u){u.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(u){u.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(u,h){u.navigateLeft(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(u){u.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(u){u.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(u){u.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(u){u.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(u,h){u.navigateRight(h.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(u){u.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(u){u.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(u){u.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(u){u.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(u){u.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(u){u.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(u){u.renderer.scrollBy(0,-2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(u){u.renderer.scrollBy(0,2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(u){u.commands.toggleRecording(u)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(u){u.commands.replay(u)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(u){u.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(u){u.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(u){u.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(u){},readOnly:!0},{name:"cut",description:"Cut",exec:function(u){var h=u.$copyWithEmptySelection&&u.selection.isEmpty(),d=h?u.selection.getLineRange():u.selection.getRange();u._emit("cut",d),d.isEmpty()||u.session.remove(d),u.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(u,h){u.$handlePaste(h)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(u){u.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(u){u.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(u){u.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(u){u.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(u){u.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(u){u.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(u){u.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(u){o.loadModule("ace/ext/searchbox",function(h){h.Search(u,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(u){u.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(u){u.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(u){u.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(u){u.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(u){u.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(u){u.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(u){u.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(u){u.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(u){if(u.selection.isEmpty())u.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(u){u.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(u){u.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(u){var h=u.selection.getRange();h.start.column=0,u.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(u){var h=u.selection.getRange();h.end.column=Number.MAX_VALUE,u.session.remove(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(u){u.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(u){u.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(u){u.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(u){u.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(u){u.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(u){u.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(u,h){u.insert(h)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(u,h){u.insert(s.stringRepeat(h.text||"",h.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(u){u.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(u){u.transposeLetters()},multiSelectAction:function(u){u.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(u){u.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(u){u.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(u){u.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(u){var h=u.selection.getRange();h.start.column=h.end.column=0,h.end.row++,u.selection.setRange(h,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(u){u.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(u){for(var h=u.selection.isBackwards(),d=h?u.selection.getSelectionLead():u.selection.getSelectionAnchor(),f=h?u.selection.getSelectionAnchor():u.selection.getSelectionLead(),p=u.session.doc.getLine(d.row).length,g=u.session.doc.getTextRange(u.selection.getRange()),y=g.replace(/\n\s*/," ").length,b=u.session.doc.getLine(d.row),v=d.row+1;v<=f.row+1;v++){var E=s.stringTrimLeft(s.stringTrimRight(u.session.doc.getLine(v)));E.length!==0&&(E=" "+E),b+=E}f.row+10?(u.selection.moveCursorTo(d.row,d.column),u.selection.selectTo(d.row,d.column+y)):(p=u.session.doc.getLine(d.row).length>p?p+1:p,u.selection.moveCursorTo(d.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(u){var h=u.session.doc.getLength()-1,d=u.session.doc.getLine(h).length,f=u.selection.rangeList.ranges,p=[];f.length<1&&(f=[u.selection.getRange()]);for(var g=0;gc[u].column&&u++,f.unshift(u,0),c.splice.apply(c,f),this.$updateRows()}}},a.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var c=!0;l.forEach(function(u,h){if(u)for(c=!1,u.row=h;u.$oldWidget;)u.$oldWidget.row=h,u=u.$oldWidget}),c&&(this.session.lineWidgets=null)}},a.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[l.row];return c&&(l.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},a.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var c=this.editor.renderer;l.html&&!l.el&&(l.el=s.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=s.createElement("div"),l.el.textContent=l.text),l.el&&(s.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&s.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",c.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/c.layerConfig.lineHeight);var u=this.session.getFoldAt(l.row,0);if(l.$fold=u,u){var h=this.session.lineWidgets;l.row==u.end.row&&!h[u.start.row]?h[u.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(l),l},a.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[l.row];if(c==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;c;){if(c.$oldWidget==l){c.$oldWidget=l.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},a.prototype.getWidgetsAtRow=function(l){for(var c=this.session.lineWidgets,u=c&&c[l],h=[];u;)h.push(u),u=u.$oldWidget;return h},a.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},a.prototype.measureWidgets=function(l,c){var u=this.session._changedWidgets,h=c.layerConfig;if(!(!u||!u.length)){for(var d=1/0,f=0;f0&&!h[d];)d--;this.firstRow=u.firstRow,this.lastRow=u.lastRow,c.$cursorLayer.config=u;for(var p=d;p<=f;p++){var g=h[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,c.container.appendChild(g.el));var y=c.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(y+=u.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=y-u.offset+"px";var b=g.coverGutter?0:c.gutterWidth;g.fixedWidth||(b-=c.scrollLeft),g.el.style.left=b+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=u.width+2*u.padding+"px"),g.fixedWidth?g.el.style.right=c.scrollBar.getWidth()+"px":g.el.style.right=""}}}},a}();n.LineWidgets=o}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(r,n,i){var s=r("../lib/keys"),o=r("../mouse/default_gutter_handler").GutterTooltip,a=function(){function c(u){this.editor=u,this.gutterLayer=u.renderer.$gutterLayer,this.element=u.renderer.$gutter,this.lines=u.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(u){if(this.annotationTooltip.isOpen){u.preventDefault(),u.keyCode===s.escape&&this.annotationTooltip.hideTooltip();return}if(u.target===this.element){if(u.keyCode!=s.enter)return;u.preventDefault();var h=this.editor.getCursorPosition().row;this.editor.isRowVisible(h)||this.editor.scrollToLine(h,!0,!0),setTimeout((function(){var d=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(d),p=this.$findNearestAnnotation(d);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-d)0||u+h=0&&this.$isFoldWidgetVisible(u-h))return u-h;if(u+h<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(u+h))return u+h}return null},c.prototype.$findNearestAnnotation=function(u){if(this.$isAnnotationVisible(u))return u;for(var h=0;u-h>0||u+h=0&&this.$isAnnotationVisible(u-h))return u-h;if(u+h<=this.lines.getLength()-1&&this.$isAnnotationVisible(u+h))return u+h}return null},c.prototype.$focusFoldWidget=function(u){if(u!=null){var h=this.$getFoldWidget(u);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$focusAnnotation=function(u){if(u!=null){var h=this.$getAnnotation(u);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$blurFoldWidget=function(u){var h=this.$getFoldWidget(u);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$blurAnnotation=function(u){var h=this.$getAnnotation(u);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isFoldWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var u=this.activeRowIndex;u0;)if(u--,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var u=this.activeRowIndex;u=F.length&&(F=void 0),{value:F&&F[M++],done:!F}}};throw new TypeError(P?"Object is not iterable.":"Symbol.iterator is not defined.")},o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/lang"),c=r("./lib/useragent"),u=r("./keyboard/textinput").TextInput,h=r("./mouse/mouse_handler").MouseHandler,d=r("./mouse/fold_handler").FoldHandler,f=r("./keyboard/keybinding").KeyBinding,p=r("./edit_session").EditSession,g=r("./search").Search,y=r("./range").Range,b=r("./lib/event_emitter").EventEmitter,v=r("./commands/command_manager").CommandManager,E=r("./commands/default_commands").commands,D=r("./config"),C=r("./token_iterator").TokenIterator,w=r("./line_widgets").LineWidgets,T=r("./keyboard/gutter_handler").GutterKeyboardHandler,A=r("./config").nls,$=r("./clipboard"),I=r("./lib/keys"),N=function(){function F(P,_,M){this.session,this.$toDestroy=[];var B=P.getContainerElement();this.container=B,this.renderer=P,this.id="editor"+ ++F.$uid,this.commands=new v(c.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new u(P.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new h(this),new d(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(R,G){G._$emitInputEvent.schedule(31)}),this.setSession(_||M&&M.session||new p("")),D.resetOptions(this),M&&this.setOptions(M),D._signal("editor",this)}return F.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=l.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},F.prototype.startOperation=function(P){if(this.curOp){if(!P||this.curOp.command)return;this.prevOp=this.curOp}P||(this.previousCommand=null,P={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:P.command||{},args:P.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},F.prototype.endOperation=function(P){if(this.curOp&&this.session){if(P&&P.returnValue===!1||!this.session)return this.curOp=null;if(P==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var _=this.curOp.command,M=_&&_.scrollIntoView;if(M){switch(M){case"center-animate":M="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var B=this.selection.getRange(),R=this.renderer.layerConfig;(B.start.row>=R.lastRow||B.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}M=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var G=this.selection.toJSON();this.curOp.selectionAfter=G,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(G),this.prevOp=this.curOp,this.curOp=null}},F.prototype.$historyTracker=function(P){if(this.$mergeUndoDeltas){var _=this.prevOp,M=this.$mergeableCommands,B=_.command&&P.command.name==_.command.name;if(P.command.name=="insertstring"){var R=P.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),B=B&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(_.args)),this.mergeNextCommand=!0}else B=B&&M.indexOf(P.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(B=!1),B?this.session.mergeUndoDeltas=!0:M.indexOf(P.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},F.prototype.setKeyboardHandler=function(P,_){if(P&&typeof P=="string"&&P!="ace"){this.$keybindingId=P;var M=this;D.loadModule(["keybinding",P],function(B){M.$keybindingId==P&&M.keyBinding.setKeyboardHandler(B&&B.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(P),_&&_()},F.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},F.prototype.setSession=function(P){if(this.session!=P){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var M=this.session.getSelection();M.off("changeCursor",this.$onCursorChange),M.off("changeSelection",this.$onSelectionChange)}this.session=P,P?(this.$onDocumentChange=this.onDocumentChange.bind(this),P.on("change",this.$onDocumentChange),this.renderer.setSession(P),this.$onChangeMode=this.onChangeMode.bind(this),P.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),P.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),P.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),P.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),P.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),P.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=P.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(P)),this._signal("changeSession",{session:P,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),P&&P._signal("changeEditor",{editor:this}),P&&!P.destroyed&&P.bgTokenizer.scheduleStart()}},F.prototype.getSession=function(){return this.session},F.prototype.setValue=function(P,_){return this.session.doc.setValue(P),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),P},F.prototype.getValue=function(){return this.session.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.resize=function(P){this.renderer.onResize(P)},F.prototype.setTheme=function(P,_){this.renderer.setTheme(P,_)},F.prototype.getTheme=function(){return this.renderer.getTheme()},F.prototype.setStyle=function(P){this.renderer.setStyle(P)},F.prototype.unsetStyle=function(P){this.renderer.unsetStyle(P)},F.prototype.getFontSize=function(){return this.getOption("fontSize")||a.computedStyle(this.container).fontSize},F.prototype.setFontSize=function(P){this.setOption("fontSize",P)},F.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var P=this;this.$highlightPending=!0,setTimeout(function(){P.$highlightPending=!1;var _=P.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(Q){_.removeMarker(Q)}),_.$bracketHighlight=null);var M=P.getCursorPosition(),B=P.getKeyboardHandler(),R=B&&B.$getDirectionForHighlight&&B.$getDirectionForHighlight(P),G=_.getMatchingBracketRanges(M,R);if(!G){var q=new C(_,M.row,M.column),ee=q.getCurrentToken();if(ee&&/\b(?:tag-open|tag-name)/.test(ee.type)){var Y=_.getMatchingTags(M);Y&&(G=[Y.openTagName.isEmpty()?Y.openTag:Y.openTagName,Y.closeTagName.isEmpty()?Y.closeTag:Y.closeTagName])}}if(!G&&_.$mode.getMatching&&(G=_.$mode.getMatching(P.session)),!G){P.getHighlightIndentGuides()&&P.renderer.$textLayer.$highlightIndentGuide();return}var X="ace_bracket";Array.isArray(G)?G.length==1&&(X="ace_error_bracket"):G=[G],G.length==2&&(y.comparePoints(G[0].end,G[1].start)==0?G=[y.fromPoints(G[0].start,G[1].end)]:y.comparePoints(G[0].start,G[1].end)==0&&(G=[y.fromPoints(G[1].start,G[0].end)])),_.$bracketHighlight={ranges:G,markerIds:G.map(function(Q){return _.addMarker(Q,X,"text")})},P.getHighlightIndentGuides()&&P.renderer.$textLayer.$highlightIndentGuide()}},50)}},F.prototype.focus=function(){this.textInput.focus()},F.prototype.isFocused=function(){return this.textInput.isFocused()},F.prototype.blur=function(){this.textInput.blur()},F.prototype.onFocus=function(P){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",P))},F.prototype.onBlur=function(P){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",P))},F.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},F.prototype.onDocumentChange=function(P){var _=this.session.$useWrapMode,M=P.start.row==P.end.row?P.end.row:1/0;this.renderer.updateLines(P.start.row,M,_),this._signal("change",P),this.$cursorChange()},F.prototype.onTokenizerUpdate=function(P){var _=P.data;this.renderer.updateLines(_.first,_.last)},F.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},F.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},F.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},F.prototype.$updateHighlightActiveLine=function(){var P=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),P.$highlightLineMarker&&!_)P.removeMarker(P.$highlightLineMarker.id),P.$highlightLineMarker=null;else if(!P.$highlightLineMarker&&_){var M=new y(_.row,_.column,_.row,1/0);M.id=P.addMarker(M,"ace_active-line","screenLine"),P.$highlightLineMarker=M}else _&&(P.$highlightLineMarker.start.row=_.row,P.$highlightLineMarker.end.row=_.row,P.$highlightLineMarker.start.column=_.column,P._signal("changeBackMarker"))},F.prototype.onSelectionChange=function(P){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var M=this.selection.getRange(),B=this.getSelectionStyle();_.$selectionMarker=_.addMarker(M,"ace_selection",B)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},F.prototype.$getSelectionHighLightRegexp=function(){var P=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var M=_.start.column,B=_.end.column,R=P.getLine(_.start.row),G=R.substring(M,B);if(!(G.length>5e3||!/[\w\d]/.test(G))){var q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:G}),ee=R.substring(M-1,B+1);if(q.test(ee))return q}}},F.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},F.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},F.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},F.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},F.prototype.onChangeMode=function(P){this.renderer.updateText(),this._emit("changeMode",P)},F.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},F.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},F.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},F.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},F.prototype.getCopyText=function(){var P=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),M=!1;if(!P&&this.$copyWithEmptySelection){M=!0;for(var B=this.selection.getAllRanges(),R=0;Rc[u].column&&u++,f.unshift(u,0),c.splice.apply(c,f),this.$updateRows()}}},l.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(u,h){if(u)for(c=!1,u.row=h;u.$oldWidget;)u.$oldWidget.row=h,u=u.$oldWidget}),c&&(this.session.lineWidgets=null)}},l.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},l.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=s.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=s.createElement("div"),a.el.textContent=a.text),a.el&&(s.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&s.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var u=this.session.getFoldAt(a.row,0);if(a.$fold=u,u){var h=this.session.lineWidgets;a.row==u.end.row&&!h[u.start.row]?h[u.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},l.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},l.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,u=c&&c[a],h=[];u;)h.push(u),u=u.$oldWidget;return h},l.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},l.prototype.measureWidgets=function(a,c){var u=this.session._changedWidgets,h=c.layerConfig;if(!(!u||!u.length)){for(var d=1/0,f=0;f0&&!h[d];)d--;this.firstRow=u.firstRow,this.lastRow=u.lastRow,c.$cursorLayer.config=u;for(var p=d;p<=f;p++){var g=h[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,c.container.appendChild(g.el));var y=c.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(y+=u.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=y-u.offset+"px";var b=g.coverGutter?0:c.gutterWidth;g.fixedWidth||(b-=c.scrollLeft),g.el.style.left=b+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=u.width+2*u.padding+"px"),g.fixedWidth?g.el.style.right=c.scrollBar.getWidth()+"px":g.el.style.right=""}}}},l}();n.LineWidgets=o}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(r,n,i){var s=r("../lib/keys"),o=r("../mouse/default_gutter_handler").GutterTooltip,l=function(){function c(u){this.editor=u,this.gutterLayer=u.renderer.$gutterLayer,this.element=u.renderer.$gutter,this.lines=u.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(u){if(this.annotationTooltip.isOpen){u.preventDefault(),u.keyCode===s.escape&&this.annotationTooltip.hideTooltip();return}if(u.target===this.element){if(u.keyCode!=s.enter)return;u.preventDefault();var h=this.editor.getCursorPosition().row;this.editor.isRowVisible(h)||this.editor.scrollToLine(h,!0,!0),setTimeout((function(){var d=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),f=this.$findNearestFoldWidget(d),p=this.$findNearestAnnotation(d);if(!(f===null&&p===null)){if(f===null&&p!==null){this.activeRowIndex=p,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(f!==null&&p===null){this.activeRowIndex=f,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(p-d)0||u+h=0&&this.$isFoldWidgetVisible(u-h))return u-h;if(u+h<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(u+h))return u+h}return null},c.prototype.$findNearestAnnotation=function(u){if(this.$isAnnotationVisible(u))return u;for(var h=0;u-h>0||u+h=0&&this.$isAnnotationVisible(u-h))return u-h;if(u+h<=this.lines.getLength()-1&&this.$isAnnotationVisible(u+h))return u+h}return null},c.prototype.$focusFoldWidget=function(u){if(u!=null){var h=this.$getFoldWidget(u);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$focusAnnotation=function(u){if(u!=null){var h=this.$getAnnotation(u);h.classList.add(this.editor.renderer.keyboardFocusClassName),h.focus()}},c.prototype.$blurFoldWidget=function(u){var h=this.$getFoldWidget(u);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$blurAnnotation=function(u){var h=this.$getAnnotation(u);h.classList.remove(this.editor.renderer.keyboardFocusClassName),h.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var u=this.activeRowIndex;u>0;)if(u--,this.$isFoldWidgetVisible(u)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=u,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var u=this.activeRowIndex;u0;)if(u--,this.$isAnnotationVisible(u)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var u=this.activeRowIndex;u=F.length&&(F=void 0),{value:F&&F[M++],done:!F}}};throw new TypeError(P?"Object is not iterable.":"Symbol.iterator is not defined.")},o=r("./lib/oop"),l=r("./lib/dom"),a=r("./lib/lang"),c=r("./lib/useragent"),u=r("./keyboard/textinput").TextInput,h=r("./mouse/mouse_handler").MouseHandler,d=r("./mouse/fold_handler").FoldHandler,f=r("./keyboard/keybinding").KeyBinding,p=r("./edit_session").EditSession,g=r("./search").Search,y=r("./range").Range,b=r("./lib/event_emitter").EventEmitter,v=r("./commands/command_manager").CommandManager,E=r("./commands/default_commands").commands,D=r("./config"),C=r("./token_iterator").TokenIterator,w=r("./line_widgets").LineWidgets,T=r("./keyboard/gutter_handler").GutterKeyboardHandler,A=r("./config").nls,$=r("./clipboard"),I=r("./lib/keys"),N=function(){function F(P,_,M){this.session,this.$toDestroy=[];var j=P.getContainerElement();this.container=j,this.renderer=P,this.id="editor"+ ++F.$uid,this.commands=new v(c.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new u(P.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new h(this),new d(this)),this.keyBinding=new f(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(R,G){G._$emitInputEvent.schedule(31)}),this.setSession(_||M&&M.session||new p("")),D.resetOptions(this),M&&this.setOptions(M),D._signal("editor",this)}return F.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},F.prototype.startOperation=function(P){if(this.curOp){if(!P||this.curOp.command)return;this.prevOp=this.curOp}P||(this.previousCommand=null,P={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:P.command||{},args:P.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},F.prototype.endOperation=function(P){if(this.curOp&&this.session){if(P&&P.returnValue===!1||!this.session)return this.curOp=null;if(P==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var _=this.curOp.command,M=_&&_.scrollIntoView;if(M){switch(M){case"center-animate":M="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var j=this.selection.getRange(),R=this.renderer.layerConfig;(j.start.row>=R.lastRow||j.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}M=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var G=this.selection.toJSON();this.curOp.selectionAfter=G,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(G),this.prevOp=this.curOp,this.curOp=null}},F.prototype.$historyTracker=function(P){if(this.$mergeUndoDeltas){var _=this.prevOp,M=this.$mergeableCommands,j=_.command&&P.command.name==_.command.name;if(P.command.name=="insertstring"){var R=P.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),j=j&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(_.args)),this.mergeNextCommand=!0}else j=j&&M.indexOf(P.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(j=!1),j?this.session.mergeUndoDeltas=!0:M.indexOf(P.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},F.prototype.setKeyboardHandler=function(P,_){if(P&&typeof P=="string"&&P!="ace"){this.$keybindingId=P;var M=this;D.loadModule(["keybinding",P],function(j){M.$keybindingId==P&&M.keyBinding.setKeyboardHandler(j&&j.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(P),_&&_()},F.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},F.prototype.setSession=function(P){if(this.session!=P){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var M=this.session.getSelection();M.off("changeCursor",this.$onCursorChange),M.off("changeSelection",this.$onSelectionChange)}this.session=P,P?(this.$onDocumentChange=this.onDocumentChange.bind(this),P.on("change",this.$onDocumentChange),this.renderer.setSession(P),this.$onChangeMode=this.onChangeMode.bind(this),P.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),P.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),P.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),P.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),P.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),P.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=P.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(P)),this._signal("changeSession",{session:P,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),P&&P._signal("changeEditor",{editor:this}),P&&!P.destroyed&&P.bgTokenizer.scheduleStart()}},F.prototype.getSession=function(){return this.session},F.prototype.setValue=function(P,_){return this.session.doc.setValue(P),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),P},F.prototype.getValue=function(){return this.session.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.resize=function(P){this.renderer.onResize(P)},F.prototype.setTheme=function(P,_){this.renderer.setTheme(P,_)},F.prototype.getTheme=function(){return this.renderer.getTheme()},F.prototype.setStyle=function(P){this.renderer.setStyle(P)},F.prototype.unsetStyle=function(P){this.renderer.unsetStyle(P)},F.prototype.getFontSize=function(){return this.getOption("fontSize")||l.computedStyle(this.container).fontSize},F.prototype.setFontSize=function(P){this.setOption("fontSize",P)},F.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var P=this;this.$highlightPending=!0,setTimeout(function(){P.$highlightPending=!1;var _=P.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(Q){_.removeMarker(Q)}),_.$bracketHighlight=null);var M=P.getCursorPosition(),j=P.getKeyboardHandler(),R=j&&j.$getDirectionForHighlight&&j.$getDirectionForHighlight(P),G=_.getMatchingBracketRanges(M,R);if(!G){var q=new C(_,M.row,M.column),ee=q.getCurrentToken();if(ee&&/\b(?:tag-open|tag-name)/.test(ee.type)){var Y=_.getMatchingTags(M);Y&&(G=[Y.openTagName.isEmpty()?Y.openTag:Y.openTagName,Y.closeTagName.isEmpty()?Y.closeTag:Y.closeTagName])}}if(!G&&_.$mode.getMatching&&(G=_.$mode.getMatching(P.session)),!G){P.getHighlightIndentGuides()&&P.renderer.$textLayer.$highlightIndentGuide();return}var X="ace_bracket";Array.isArray(G)?G.length==1&&(X="ace_error_bracket"):G=[G],G.length==2&&(y.comparePoints(G[0].end,G[1].start)==0?G=[y.fromPoints(G[0].start,G[1].end)]:y.comparePoints(G[0].start,G[1].end)==0&&(G=[y.fromPoints(G[1].start,G[0].end)])),_.$bracketHighlight={ranges:G,markerIds:G.map(function(Q){return _.addMarker(Q,X,"text")})},P.getHighlightIndentGuides()&&P.renderer.$textLayer.$highlightIndentGuide()}},50)}},F.prototype.focus=function(){this.textInput.focus()},F.prototype.isFocused=function(){return this.textInput.isFocused()},F.prototype.blur=function(){this.textInput.blur()},F.prototype.onFocus=function(P){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",P))},F.prototype.onBlur=function(P){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",P))},F.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},F.prototype.onDocumentChange=function(P){var _=this.session.$useWrapMode,M=P.start.row==P.end.row?P.end.row:1/0;this.renderer.updateLines(P.start.row,M,_),this._signal("change",P),this.$cursorChange()},F.prototype.onTokenizerUpdate=function(P){var _=P.data;this.renderer.updateLines(_.first,_.last)},F.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},F.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},F.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},F.prototype.$updateHighlightActiveLine=function(){var P=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),P.$highlightLineMarker&&!_)P.removeMarker(P.$highlightLineMarker.id),P.$highlightLineMarker=null;else if(!P.$highlightLineMarker&&_){var M=new y(_.row,_.column,_.row,1/0);M.id=P.addMarker(M,"ace_active-line","screenLine"),P.$highlightLineMarker=M}else _&&(P.$highlightLineMarker.start.row=_.row,P.$highlightLineMarker.end.row=_.row,P.$highlightLineMarker.start.column=_.column,P._signal("changeBackMarker"))},F.prototype.onSelectionChange=function(P){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var M=this.selection.getRange(),j=this.getSelectionStyle();_.$selectionMarker=_.addMarker(M,"ace_selection",j)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},F.prototype.$getSelectionHighLightRegexp=function(){var P=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var M=_.start.column,j=_.end.column,R=P.getLine(_.start.row),G=R.substring(M,j);if(!(G.length>5e3||!/[\w\d]/.test(G))){var q=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:G}),ee=R.substring(M-1,j+1);if(q.test(ee))return q}}},F.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},F.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},F.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},F.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},F.prototype.onChangeMode=function(P){this.renderer.updateText(),this._emit("changeMode",P)},F.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},F.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},F.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},F.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},F.prototype.getCopyText=function(){var P=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),M=!1;if(!P&&this.$copyWithEmptySelection){M=!0;for(var j=this.selection.getAllRanges(),R=0;RQ.search(/\S|$/)){var ee=Q.substr(R.column).search(/\S|$/);M.doc.removeInLine(R.row,R.column,R.column+ee)}}this.clearSelection();var Y=R.column,X=M.getState(R.row),Q=M.getLine(R.row),te=B.checkOutdent(X,Q,P);if(M.insert(R,P),G&&G.selection&&(G.selection.length==2?this.selection.setSelectionRange(new y(R.row,Y+G.selection[0],R.row,Y+G.selection[1])):this.selection.setSelectionRange(new y(R.row+G.selection[0],G.selection[1],R.row+G.selection[2],G.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(P)){var Z=B.getNextLineIndent(X,Q.slice(0,R.column),M.getTabString());M.insert({row:R.row+1,column:0},Z)}te&&B.autoOutdent(X,M,R.row)}},F.prototype.autoIndent=function(){for(var P=this.session,_=P.getMode(),M=this.selection.isEmpty()?[new y(0,0,P.doc.getLength()-1,0)]:this.selection.getAllRanges(),B="",R="",G="",q=P.getTabString(),ee=0;ee0&&(B=P.getState(Q-1),R=P.getLine(Q-1),G=_.getNextLineIndent(B,R,q));var te=P.getLine(Q),Z=_.$getIndent(te);if(G!==Z){if(Z.length>0){var de=new y(Q,0,Q,Z.length);P.remove(de)}G.length>0&&P.insert({row:Q,column:0},G)}_.autoOutdent(B,P,Q)}},F.prototype.onTextInput=function(P,_){if(!_)return this.keyBinding.onTextInput(P);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,P,_);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},F.prototype.applyComposition=function(P,_){if(_.extendLeft||_.extendRight){var M=this.selection.getRange();M.start.column-=_.extendLeft,M.end.column+=_.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!P&&!M.isEmpty()&&this.remove()}if((P||!this.selection.isEmpty())&&this.insert(P,!0),_.restoreStart||_.restoreEnd){var M=this.selection.getRange();M.start.column-=_.restoreStart,M.end.column-=_.restoreEnd,this.selection.setRange(M)}},F.prototype.onCommandKey=function(P,_,M){return this.keyBinding.onCommandKey(P,_,M)},F.prototype.setOverwrite=function(P){this.session.setOverwrite(P)},F.prototype.getOverwrite=function(){return this.session.getOverwrite()},F.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},F.prototype.setScrollSpeed=function(P){this.setOption("scrollSpeed",P)},F.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},F.prototype.setDragDelay=function(P){this.setOption("dragDelay",P)},F.prototype.getDragDelay=function(){return this.getOption("dragDelay")},F.prototype.setSelectionStyle=function(P){this.setOption("selectionStyle",P)},F.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},F.prototype.setHighlightActiveLine=function(P){this.setOption("highlightActiveLine",P)},F.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},F.prototype.setHighlightGutterLine=function(P){this.setOption("highlightGutterLine",P)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.setHighlightSelectedWord=function(P){this.setOption("highlightSelectedWord",P)},F.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},F.prototype.setAnimatedScroll=function(P){this.renderer.setAnimatedScroll(P)},F.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},F.prototype.setShowInvisibles=function(P){this.renderer.setShowInvisibles(P)},F.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},F.prototype.setDisplayIndentGuides=function(P){this.renderer.setDisplayIndentGuides(P)},F.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},F.prototype.setHighlightIndentGuides=function(P){this.renderer.setHighlightIndentGuides(P)},F.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},F.prototype.setShowPrintMargin=function(P){this.renderer.setShowPrintMargin(P)},F.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},F.prototype.setPrintMarginColumn=function(P){this.renderer.setPrintMarginColumn(P)},F.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},F.prototype.setReadOnly=function(P){this.setOption("readOnly",P)},F.prototype.getReadOnly=function(){return this.getOption("readOnly")},F.prototype.setBehavioursEnabled=function(P){this.setOption("behavioursEnabled",P)},F.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},F.prototype.setWrapBehavioursEnabled=function(P){this.setOption("wrapBehavioursEnabled",P)},F.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},F.prototype.setShowFoldWidgets=function(P){this.setOption("showFoldWidgets",P)},F.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},F.prototype.setFadeFoldWidgets=function(P){this.setOption("fadeFoldWidgets",P)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.remove=function(P){this.selection.isEmpty()&&(P=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,B=M.getState(_.start.row),R=M.getMode().transformAction(B,"deletion",this,M,_);if(_.end.column===0){var G=M.getTextRange(_);if(G[G.length-1]==` +`){var Q=M.getLine(R.row);if(R.column>Q.search(/\S|$/)){var ee=Q.substr(R.column).search(/\S|$/);M.doc.removeInLine(R.row,R.column,R.column+ee)}}this.clearSelection();var Y=R.column,X=M.getState(R.row),Q=M.getLine(R.row),te=j.checkOutdent(X,Q,P);if(M.insert(R,P),G&&G.selection&&(G.selection.length==2?this.selection.setSelectionRange(new y(R.row,Y+G.selection[0],R.row,Y+G.selection[1])):this.selection.setSelectionRange(new y(R.row+G.selection[0],G.selection[1],R.row+G.selection[2],G.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(P)){var Z=j.getNextLineIndent(X,Q.slice(0,R.column),M.getTabString());M.insert({row:R.row+1,column:0},Z)}te&&j.autoOutdent(X,M,R.row)}},F.prototype.autoIndent=function(){for(var P=this.session,_=P.getMode(),M=this.selection.isEmpty()?[new y(0,0,P.doc.getLength()-1,0)]:this.selection.getAllRanges(),j="",R="",G="",q=P.getTabString(),ee=0;ee0&&(j=P.getState(Q-1),R=P.getLine(Q-1),G=_.getNextLineIndent(j,R,q));var te=P.getLine(Q),Z=_.$getIndent(te);if(G!==Z){if(Z.length>0){var de=new y(Q,0,Q,Z.length);P.remove(de)}G.length>0&&P.insert({row:Q,column:0},G)}_.autoOutdent(j,P,Q)}},F.prototype.onTextInput=function(P,_){if(!_)return this.keyBinding.onTextInput(P);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,P,_);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},F.prototype.applyComposition=function(P,_){if(_.extendLeft||_.extendRight){var M=this.selection.getRange();M.start.column-=_.extendLeft,M.end.column+=_.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!P&&!M.isEmpty()&&this.remove()}if((P||!this.selection.isEmpty())&&this.insert(P,!0),_.restoreStart||_.restoreEnd){var M=this.selection.getRange();M.start.column-=_.restoreStart,M.end.column-=_.restoreEnd,this.selection.setRange(M)}},F.prototype.onCommandKey=function(P,_,M){return this.keyBinding.onCommandKey(P,_,M)},F.prototype.setOverwrite=function(P){this.session.setOverwrite(P)},F.prototype.getOverwrite=function(){return this.session.getOverwrite()},F.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},F.prototype.setScrollSpeed=function(P){this.setOption("scrollSpeed",P)},F.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},F.prototype.setDragDelay=function(P){this.setOption("dragDelay",P)},F.prototype.getDragDelay=function(){return this.getOption("dragDelay")},F.prototype.setSelectionStyle=function(P){this.setOption("selectionStyle",P)},F.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},F.prototype.setHighlightActiveLine=function(P){this.setOption("highlightActiveLine",P)},F.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},F.prototype.setHighlightGutterLine=function(P){this.setOption("highlightGutterLine",P)},F.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},F.prototype.setHighlightSelectedWord=function(P){this.setOption("highlightSelectedWord",P)},F.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},F.prototype.setAnimatedScroll=function(P){this.renderer.setAnimatedScroll(P)},F.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},F.prototype.setShowInvisibles=function(P){this.renderer.setShowInvisibles(P)},F.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},F.prototype.setDisplayIndentGuides=function(P){this.renderer.setDisplayIndentGuides(P)},F.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},F.prototype.setHighlightIndentGuides=function(P){this.renderer.setHighlightIndentGuides(P)},F.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},F.prototype.setShowPrintMargin=function(P){this.renderer.setShowPrintMargin(P)},F.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},F.prototype.setPrintMarginColumn=function(P){this.renderer.setPrintMarginColumn(P)},F.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},F.prototype.setReadOnly=function(P){this.setOption("readOnly",P)},F.prototype.getReadOnly=function(){return this.getOption("readOnly")},F.prototype.setBehavioursEnabled=function(P){this.setOption("behavioursEnabled",P)},F.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},F.prototype.setWrapBehavioursEnabled=function(P){this.setOption("wrapBehavioursEnabled",P)},F.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},F.prototype.setShowFoldWidgets=function(P){this.setOption("showFoldWidgets",P)},F.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},F.prototype.setFadeFoldWidgets=function(P){this.setOption("fadeFoldWidgets",P)},F.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},F.prototype.remove=function(P){this.selection.isEmpty()&&(P=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,j=M.getState(_.start.row),R=M.getMode().transformAction(j,"deletion",this,M,_);if(_.end.column===0){var G=M.getTextRange(_);if(G[G.length-1]==` `){var q=M.getLine(_.end.row);/^\s+$/.test(q)&&(_.end.column=q.length)}}R&&(_=R)}this.session.remove(_),this.clearSelection()},F.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},F.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},F.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},F.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var P=this.getSelectionRange();P.start.column==P.end.column&&P.start.row==P.end.row&&(P.end.column=0,P.end.row++),this.session.remove(P),this.clearSelection()},F.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var P=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(P)},F.prototype.setGhostText=function(P,_){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(P,_)},F.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},F.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var P=this.getCursorPosition(),_=P.column;if(_!==0){var M=this.session.getLine(P.row),B,R;_ee.toLowerCase()?1:0});for(var R=new y(0,0,0,0),B=P.first;B<=P.last;B++){var G=_.getLine(B);R.start.row=B,R.end.row=B,R.end.column=G.length,_.replace(R,M[B-P.first])}},F.prototype.toggleCommentLines=function(){var P=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(P,this.session,_.first,_.last)},F.prototype.toggleBlockComment=function(){var P=this.getCursorPosition(),_=this.session.getState(P.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,M,P)},F.prototype.getNumberAt=function(P,_){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var B=this.session.getLine(P);M.lastIndex<_;){var R=M.exec(B);if(R.index<=_&&R.index+R[0].length>=_){var G={value:R[0],start:R.index,end:R.index+R[0].length};return G}}return null},F.prototype.modifyNumber=function(P){var _=this.selection.getCursor().row,M=this.selection.getCursor().column,B=new y(_,M-1,_,M),R=this.session.getTextRange(B);if(!isNaN(parseFloat(R))&&isFinite(R)){var G=this.getNumberAt(_,M);if(G){var q=G.value.indexOf(".")>=0?G.start+G.value.indexOf(".")+1:G.end,ee=G.start+G.value.length-q,Y=parseFloat(G.value);Y*=Math.pow(10,ee),q!==G.end&&M=q&&G<=ee&&(M=ze,Y.selection.clearSelection(),Y.moveCursorTo(P,q+B),Y.selection.selectTo(P,ee+B)),q=ee});for(var X=this.$toggleWordPairs,Q,te=0;te=ee&&q<=Y&&Z.match(/((?:https?|ftp):\/\/[\S]+)/)){X=Z.replace(/[\s:.,'";}\]]+$/,"");break}ee=Y}}catch(de){M={error:de}}finally{try{te&&!te.done&&(B=Q.return)&&B.call(Q)}finally{if(M)throw M.error}}return X},F.prototype.openLink=function(){var P=this.selection.getCursor(),_=this.findLinkAt(P.row,P.column);return _&&window.open(_,"_blank"),_!=null},F.prototype.removeLines=function(){var P=this.$getSelectedRows();this.session.removeFullLines(P.first,P.last),this.clearSelection()},F.prototype.duplicateSelection=function(){var P=this.selection,_=this.session,M=P.getRange(),B=P.isBackwards();if(M.isEmpty()){var R=M.start.row;_.duplicateLines(R,R)}else{var G=B?M.start:M.end,q=_.insert(G,_.getTextRange(M));M.start=G,M.end=q,P.setSelectionRange(M,B)}},F.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},F.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},F.prototype.moveText=function(P,_,M){return this.session.moveText(P,_,M)},F.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},F.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},F.prototype.$moveLines=function(P,_){var M,B,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var G=R.toOrientedRange();M=this.$getSelectedRows(G),B=this.session.$moveLines(M.first,M.last,_?0:P),_&&P==-1&&(B=0),G.moveBy(B,0),R.fromOrientedRange(G)}else{var q=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ee=0,Y=0,X=q.length,Q=0;Qde+1)break;de=ke.last}for(Q--,ee=this.session.$moveLines(Z,de,_?0:P),_&&P==-1&&(te=Q+1);te<=Q;)q[te].moveBy(ee,0),te++;_||(ee=0),Y+=ee}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},F.prototype.$getSelectedRows=function(P){return P=(P||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(P.start.row),last:this.session.getRowFoldEnd(P.end.row)}},F.prototype.onCompositionStart=function(P){this.renderer.showComposition(P)},F.prototype.onCompositionUpdate=function(P){this.renderer.setCompositionText(P)},F.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},F.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},F.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},F.prototype.isRowVisible=function(P){return P>=this.getFirstVisibleRow()&&P<=this.getLastVisibleRow()},F.prototype.isRowFullyVisible=function(P){return P>=this.renderer.getFirstFullyVisibleRow()&&P<=this.renderer.getLastFullyVisibleRow()},F.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},F.prototype.$moveByPage=function(P,_){var M=this.renderer,B=this.renderer.layerConfig,R=P*Math.floor(B.height/B.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):_===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var G=M.scrollTop;M.scrollBy(0,R*B.lineHeight),_!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(G)},F.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},F.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},F.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},F.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},F.prototype.scrollPageDown=function(){this.$moveByPage(1)},F.prototype.scrollPageUp=function(){this.$moveByPage(-1)},F.prototype.scrollToRow=function(P){this.renderer.scrollToRow(P)},F.prototype.scrollToLine=function(P,_,M,B){this.renderer.scrollToLine(P,_,M,B)},F.prototype.centerSelection=function(){var P=this.getSelectionRange(),_={row:Math.floor(P.start.row+(P.end.row-P.start.row)/2),column:Math.floor(P.start.column+(P.end.column-P.start.column)/2)};this.renderer.alignCursor(_,.5)},F.prototype.getCursorPosition=function(){return this.selection.getCursor()},F.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},F.prototype.getSelectionRange=function(){return this.selection.getRange()},F.prototype.selectAll=function(){this.selection.selectAll()},F.prototype.clearSelection=function(){this.selection.clearSelection()},F.prototype.moveCursorTo=function(P,_){this.selection.moveCursorTo(P,_)},F.prototype.moveCursorToPosition=function(P){this.selection.moveCursorToPosition(P)},F.prototype.jumpToMatching=function(P,_){var M=this.getCursorPosition(),B=new C(this.session,M.row,M.column),R=B.getCurrentToken(),G=0;R&&R.type.indexOf("tag-name")!==-1&&(R=B.stepBackward());var q=R||B.stepForward();if(q){var ee,Y=!1,X={},Q=M.column-q.start,te,Z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(q.value.match(/[{}()\[\]]/g)){for(;Q1?X[q.value]++:R.value==="=0;--G)this.$tryReplace(M[G],P)&&B++;return this.selection.setSelectionRange(R),B},F.prototype.$tryReplace=function(P,_){var M=this.session.getTextRange(P);return _=this.$search.replace(M,_),_!==null?(P.end=this.session.replace(P,_),P):null},F.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},F.prototype.find=function(P,_,M){_||(_={}),typeof P=="string"||P instanceof RegExp?_.needle=P:typeof P=="object"&&o.mixin(_,P);var B=this.selection.getRange();_.needle==null&&(P=this.session.getTextRange(B)||this.$search.$options.needle,P||(B=this.session.getWordRange(B.start.row,B.start.column),P=this.session.getTextRange(B)),this.$search.set({needle:P})),this.$search.set(_),_.start||this.$search.set({start:B});var R=this.$search.find(this.session);if(_.preventScroll)return R;if(R)return this.revealRange(R,M),R;_.backwards?B.start=B.end:B.end=B.start,this.selection.setRange(B)},F.prototype.findNext=function(P,_){this.find({skipCurrent:!0,backwards:!1},P,_)},F.prototype.findPrevious=function(P,_){this.find(P,{skipCurrent:!0,backwards:!0},_)},F.prototype.revealRange=function(P,_){this.session.unfold(P),this.selection.setSelectionRange(P);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(P.start,P.end,.5),_!==!1&&this.renderer.animateScrolling(M)},F.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},F.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},F.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(P){P.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},F.prototype.setAutoScrollEditorIntoView=function(P){if(P){var _,M=this,B=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var G=this.on("changeSelection",function(){B=!0}),q=this.renderer.on("beforeRender",function(){B&&(_=M.renderer.container.getBoundingClientRect())}),ee=this.renderer.on("afterRender",function(){if(B&&_&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var Y=M.renderer,X=Y.$cursorLayer.$pixelPos,Q=Y.layerConfig,te=X.top-Q.offset;X.top>=0&&te+_.top<0?B=!0:X.topwindow.innerHeight?B=!1:B=null,B!=null&&(R.style.top=te+"px",R.style.left=X.left+"px",R.style.height=Q.lineHeight+"px",R.scrollIntoView(B)),B=_=null}});this.setAutoScrollEditorIntoView=function(Y){Y||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",G),this.renderer.off("afterRender",ee),this.renderer.off("beforeRender",q))}}},F.prototype.$resetCursorStyle=function(){var P=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(P)),_.isBlinking=!this.$readOnly&&P!="wide",a.setCssClass(_.element,"ace_slim-cursors",/slim/.test(P)))},F.prototype.prompt=function(P,_,M){var B=this;D.loadModule("ace/ext/prompt",function(R){R.prompt(B,P,_,M)})},F}();N.$uid=0,N.prototype.curOp=null,N.prototype.prevOp={},N.prototype.$mergeableCommands=["backspace","del","insertstring"],N.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(N.prototype,b),D.defineOptions(N.prototype,"editor",{selectionStyle:{set:function(F){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:F})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(F){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(F){this.textInput.setReadOnly(F),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(F){this.textInput.setCopyWithEmptySelection(F)},initialValue:!1},cursorStyle:{set:function(F){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(F){this.setAutoScrollEditorIntoView(F)}},keyboardHandler:{set:function(F){this.setKeyboardHandler(F)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(F){this.session.setValue(F)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(F){this.setSession(F)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(F){this.renderer.$gutterLayer.setShowLineNumbers(F),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),F&&this.$relativeLineNumbers?L.attach(this):L.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(F){this.$showLineNumbers&&F?L.attach(this):L.detach(this)}},placeholder:{set:function(F){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var P=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(P&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),a.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!P&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),a.addCssClass(this.container,"ace_hasPlaceholder");var _=a.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!P&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(F){var P={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(B){B.blur(),B.renderer.scroller.focus()},readOnly:!0},_=function(B){if(B.target==this.renderer.scroller&&B.keyCode===I.enter){B.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},M;F?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(P),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",A("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),M||(M=new T(this)),M.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",_.bind(this)),this.commands.removeCommand(P),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),M&&M.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(F){this.$textInputAriaLabel=F},initialValue:""},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var L={getText:function(F,P){return(Math.abs(F.selection.lead.row-P)||P+1+(P<9?"·":""))+""},getWidth:function(F,P,_){return Math.max(P.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(F,P){P.renderer.$loop.schedule(P.renderer.CHANGE_GUTTER)},attach:function(F){F.renderer.$gutterLayer.$renderer=this,F.on("changeSelection",this.update),this.update(null,F)},detach:function(F){F.renderer.$gutterLayer.$renderer==this&&(F.renderer.$gutterLayer.$renderer=null),F.off("changeSelection",this.update),this.update(null,F)}};n.Editor=N}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l,c){this.element=l,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return a.prototype.moveContainer=function(l){s.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},a.prototype.pageChanged=function(l,c){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},a.prototype.computeLineTop=function(l,c,u){var h=c.firstRowScreen*c.lineHeight,d=Math.floor(h/this.canvasHeight),f=u.documentToScreenRow(l,0)*c.lineHeight;return f-d*this.canvasHeight},a.prototype.computeLineHeight=function(l,c,u){return c.lineHeight*u.getRowLineCount(l)},a.prototype.getLength=function(){return this.cells.length},a.prototype.get=function(l){return this.cells[l]},a.prototype.shift=function(){this.$cacheCell(this.cells.shift())},a.prototype.pop=function(){this.$cacheCell(this.cells.pop())},a.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var c=s.createFragment(this.element),u=0;uE&&(w=v.end.row+1,v=g.getNextFoldLine(w,v),E=v?v.start.row:1/0),w>b){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}D=this.$lines.get(++C),D?D.row=w:(D=this.$lines.createCell(w,p,this.session,d),this.$lines.push(D)),this.$renderCell(D,p,v,w),w++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,y=g.gutterRenderer||this.$renderer,b=g.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(v=g.getLength()+b-1);var E=y?y.getWidth(g,v,p):v.toString().length*p.characterWidth,D=this.$padding||this.$computePadding();E+=D.left+D.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var y=0;y=this.$cursorRow){if(b.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(y>0&&v&&v.start.row==g[y-1].row)b=g[y-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var y=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=y,!g||b0;v--)this.$lines.shift();if(b>y)for(var v=this.session.getFoldedRowCount(y+1,b);v>0;v--)this.$lines.pop();p.firstRowb&&this.$lines.push(this.$renderLines(p,b+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,y){for(var b=[],v=g,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session,d);this.$renderCell(C,p,E,v),b.push(C),v++}return b},f.prototype.$renderCell=function(p,g,y,b){var v=p.element,E=this.session,D=v.childNodes[0],C=v.childNodes[1],w=v.childNodes[2],T=w.firstChild,A=E.$firstLineNumber,$=E.$breakpoints,I=E.$decorations,N=E.gutterRenderer||this.$renderer,L=this.$showFoldWidgets&&E.foldWidgets,F=y?y.start.row:Number.MAX_VALUE,P=g.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",B=(N?N.getText(E,b):b+A).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||y&&b=F&&this.$cursorRow<=y.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),$[b]&&(_+=$[b]),I[b]&&(_+=I[b]),this.$annotations[b]&&b!==F&&(_+=this.$annotations[b].className),L){var R=L[b];R==null&&(R=L[b]=E.getFoldWidget(b))}if(R){var G="ace_fold-widget ace_"+R,q=R=="start"&&b==F&&by.right-g.right)return"foldWidgets"},f}();h.prototype.$fixedWidth=!1,h.prototype.$highlightGutterLine=!0,h.prototype.$renderer="",h.prototype.$showLineNumbers=!0,h.prototype.$showFoldWidgets=!0,o.implement(h.prototype,l);function d(f){var p=document.createTextNode("");f.appendChild(p);var g=s.createElement("span");f.appendChild(g);var y=s.createElement("span");f.appendChild(y);var b=s.createElement("span");return y.appendChild(b),f}n.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(r,n,i){var s=r("../range").Range,o=r("../lib/dom"),a=function(){function c(u){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",u.appendChild(this.element)}return c.prototype.setPadding=function(u){this.$padding=u},c.prototype.setSession=function(u){this.session=u},c.prototype.setMarkers=function(u){this.markers=u},c.prototype.elt=function(u,h){var d=this.i!=-1&&this.element.childNodes[this.i];d?this.i++:(d=document.createElement("div"),this.element.appendChild(d),this.i=-1),d.style.cssText=h,d.className=u},c.prototype.update=function(u){if(u){this.config=u,this.i=0;var h;for(var d in this.markers){var f=this.markers[d];if(!f.range){f.update(h,this,this.session,u);continue}var p=f.range.clipRows(u.firstRow,u.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,u),y=this.$padding+p.start.column*u.characterWidth;f.renderer(h,p,y,g,u)}else f.type=="fullLine"?this.drawFullLineMarker(h,p,f.clazz,u):f.type=="screenLine"?this.drawScreenLineMarker(h,p,f.clazz,u):p.isMultiLine()?f.type=="text"?this.drawTextMarker(h,p,f.clazz,u):this.drawMultiLineMarker(h,p,f.clazz,u):this.drawSingleLineMarker(h,p,f.clazz+" ace_start ace_br15",u)}if(this.i!=-1)for(;this.iC,v==b),f,v==b?0:1,p)},c.prototype.drawMultiLineMarker=function(u,h,d,f,p){var g=this.$padding,y=f.lineHeight,b=this.$getTop(h.start.row,f),v=g+h.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(h.start.row)){var E=h.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(u,E,d+" ace_br1 ace_start",f,null,p)}else this.elt(d+" ace_br1 ace_start","height:"+y+"px;right:0;top:"+b+"px;left:"+v+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(h.end.row)){var E=h.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(u,E,d+" ace_br12",f,null,p)}else{b=this.$getTop(h.end.row,f);var D=h.end.column*f.characterWidth;this.elt(d+" ace_br12","height:"+y+"px;width:"+D+"px;top:"+b+"px;left:"+g+"px;"+(p||""))}if(y=(h.end.row-h.start.row-1)*f.lineHeight,!(y<=0)){b=this.$getTop(h.start.row+1,f);var C=(h.start.column?1:0)|(h.end.column?0:8);this.elt(d+(C?" ace_br"+C:""),"height:"+y+"px;right:0;top:"+b+"px;left:"+g+"px;"+(p||""))}},c.prototype.drawSingleLineMarker=function(u,h,d,f,p,g){if(this.session.$bidiHandler.isBidiRow(h.start.row))return this.drawBidiSingleLineMarker(u,h,d,f,p,g);var y=f.lineHeight,b=(h.end.column+(p||0)-h.start.column)*f.characterWidth,v=this.$getTop(h.start.row,f),E=this.$padding+h.start.column*f.characterWidth;this.elt(d,"height:"+y+"px;width:"+b+"px;top:"+v+"px;left:"+E+"px;"+(g||""))},c.prototype.drawBidiSingleLineMarker=function(u,h,d,f,p,g){var y=f.lineHeight,b=this.$getTop(h.start.row,f),v=this.$padding,E=this.session.$bidiHandler.getSelections(h.start.column,h.end.column);E.forEach(function(D){this.elt(d,"height:"+y+"px;width:"+(D.width+(p||0))+"px;top:"+b+"px;left:"+(v+D.left)+"px;"+(g||""))},this)},c.prototype.drawFullLineMarker=function(u,h,d,f,p){var g=this.$getTop(h.start.row,f),y=f.lineHeight;h.start.row!=h.end.row&&(y+=this.$getTop(h.end.row,f)-g),this.elt(d,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c.prototype.drawScreenLineMarker=function(u,h,d,f,p){var g=this.$getTop(h.start.row,f),y=f.lineHeight;this.elt(d,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c}();a.prototype.$padding=0;function l(c,u,h,d){return(c?1:0)|(u?2:0)|(h?4:0)|(d?8:0)}n.Marker=a}),ace.define("ace/layer/text_util",["require","exports","module"],function(r,n,i){var s=new Set(["text","rparen","lparen"]);n.isTextToken=function(o){return s.has(o)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("./lines").Lines,c=r("../lib/event_emitter").EventEmitter,u=r("../config").nls,h=r("./text_util").isTextToken,d=function(){function f(p){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,g=p.getNewLineCharacter()==` -`&&p.getNewLineMode()!="windows",y=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=y)return this.EOL_CHAR=y,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var g=this.$tabStrings=[0],y=1;yA&&(w=T.end.row+1,T=this.session.getNextFoldLine(w,T),A=T?T.start.row:1/0),!(w>v);){var $=E[D++];if($){this.dom.removeChildren($),this.$renderLine($,w,w==A?T:!1),C&&($.style.top=this.$lines.computeLineTop(w,p,this.session)+"px");var I=p.lineHeight*this.session.getRowLength(w)+"px";$.style.height!=I&&(C=!0,$.style.height=I)}w++}if(C)for(;D0;v--)this.$lines.shift();if(g.lastRow>p.lastRow)for(var v=this.session.getFoldedRowCount(p.lastRow+1,g.lastRow);v>0;v--)this.$lines.pop();p.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(p,g.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,g,y){for(var b=[],v=g,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session),w=C.element;this.dom.removeChildren(w),o.setStyle(w.style,"height",this.$lines.computeLineHeight(v,p,this.session)+"px"),o.setStyle(w.style,"top",this.$lines.computeLineTop(v,p,this.session)+"px"),this.$renderLine(w,v,v==D?E:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",b.push(C),v++}return b},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var g=p.firstRow,y=p.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(p,g,y))},f.prototype.$renderToken=function(p,g,y,b){for(var v=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,D=this.dom.createFragment(this.element),C,w=0;C=E.exec(b);){var T=C[1],A=C[2],$=C[3],I=C[4],N=C[5];if(!(!v.showSpaces&&A)){var L=w!=C.index?b.slice(w,C.index):"";if(w=C.index+C[0].length,L&&D.appendChild(this.dom.createTextNode(L,this.element)),T){var F=v.session.getScreenTabSize(g+C.index);D.appendChild(v.$tabStrings[F].cloneNode(!0)),g+=F-1}else if(A)if(v.showSpaces){var P=this.dom.createElement("span");P.className="ace_invisible ace_invisible_space",P.textContent=a.stringRepeat(v.SPACE_CHAR,A.length),D.appendChild(P)}else D.appendChild(this.dom.createTextNode(A,this.element));else if($){var P=this.dom.createElement("span");P.className="ace_invisible ace_invisible_space ace_invalid",P.textContent=a.stringRepeat(v.SPACE_CHAR,$.length),D.appendChild(P)}else if(I){g+=1;var P=this.dom.createElement("span");P.style.width=v.config.characterWidth*2+"px",P.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",P.textContent=v.showSpaces?v.SPACE_CHAR:I,D.appendChild(P)}else if(N){g+=1;var P=this.dom.createElement("span");P.style.width=v.config.characterWidth*2+"px",P.className="ace_cjk",P.textContent=N,D.appendChild(P)}}}if(D.appendChild(this.dom.createTextNode(w?b.slice(w):b,this.element)),h(y.type))p.appendChild(D);else{var _="ace_"+y.type.replace(/\./g," ace_"),P=this.dom.createElement("span");y.type=="fold"&&(P.style.width=y.value.length*this.config.characterWidth+"px",P.setAttribute("title",u("inline-fold.closed.title","Unfold code"))),P.className=_,P.appendChild(D),p.appendChild(P)}return g+b.length},f.prototype.renderIndentGuide=function(p,g,y){var b=g.search(this.$indentGuideRe);if(b<=0||b>=y)return g;if(g[0]==" "){b-=b%this.tabSize;for(var v=b/this.tabSize,E=0;EE[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[g.row]!==""&&g.column===p[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var D=g.row+1;D0){for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,g)}}else for(var y=p.length-1;y>=0;y--){var b=p[y];if(this.$highlightIndentGuideMarker.end&&b.row=E;)D=this.$renderToken(C,D,T,A.substring(0,E-b)),A=A.substring(E-b),b=E,C=this.$createLineElement(),p.appendChild(C),C.appendChild(this.dom.createTextNode(a.stringRepeat(" ",y.indent),this.element)),v++,D=0,E=y[v]||Number.MAX_VALUE;A.length!=0&&(b+=A.length,D=this.$renderToken(C,D,T,A))}}y[y.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,D,null,"",!0)},f.prototype.$renderSimpleLine=function(p,g){for(var y=0,b=0;bthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,y,v,E);y=this.$renderToken(p,y,v,E)}}},f.prototype.$renderOverflowMessage=function(p,g,y,b,v){y&&this.$renderToken(p,g,y,b.slice(0,this.MAX_LINE_LENGTH-g));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=v?"":"",p.appendChild(E)},f.prototype.$renderLine=function(p,g,y){if(!y&&y!=!1&&(y=this.session.getFoldLine(g)),y)var b=this.$getFoldLineTokens(g,y);else var b=this.session.getTokens(g);var v=p;if(b.length){var E=this.session.getRowSplitData(g);if(E&&E.length){this.$renderWrappedLine(p,b,E);var v=p.lastChild}else{var v=p;this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v)),this.$renderSimpleLine(v,b)}}else this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v));if(this.showEOL&&v){y&&(g=y.end.row);var D=this.dom.createElement("span");D.className="ace_invisible ace_invisible_eol",D.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(D)}},f.prototype.$getFoldLineTokens=function(p,g){var y=this.session,b=[];function v(D,C,w){for(var T=0,A=0;A+D[T].value.lengthw-C&&($=$.substring(0,w-C)),b.push({type:D[T].type,value:$}),A=C+$.length,T+=1}for(;Aw?b.push({type:D[T].type,value:$.substring(0,w-A)}):b.push(D[T]),A+=$.length,T+=1}}var E=y.getTokens(p);return g.walk(function(D,C,w,T,A){D!=null?b.push({type:"fold",value:D}):(A&&(E=y.getTokens(C)),E.length&&v(E,T,w))},g.end.row,this.session.getLine(g.end.row).length),b},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,s.implement(d.prototype,c),n.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function a(l){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return a.prototype.$updateOpacity=function(l){for(var c=this.cursors,u=c.length;u--;)s.setStyle(c[u].style,"opacity",l?"":"0")},a.prototype.$startCssAnimation=function(){for(var l=this.cursors,c=l.length;c--;)l[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},a.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},a.prototype.setPadding=function(l){this.$padding=l},a.prototype.setSession=function(l){this.session=l},a.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},a.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},a.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,s.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},a.prototype.addCursor=function(){var l=s.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},a.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},a.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},a.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),c()},this.blinkInterval),c()}},a.prototype.getPixelPosition=function(l,c){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(l),h=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,l.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),d=(u.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:h,top:d}},a.prototype.isCursorInView=function(l,c){return l.top>=0&&l.topl.height+l.offset||f.top<0)&&u>1)){var p=this.cursors[h++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,l,c[u],this.session):this.isCursorInView(f,l)?(s.setStyle(g,"display","block"),s.translate(p,f.left,f.top),s.setStyle(g,"width",Math.round(l.characterWidth)+"px"),s.setStyle(g,"height",l.lineHeight+"px")):s.setStyle(g,"display","none")}}for(;this.cursors.length>h;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=f,this.restartTimer()},a.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},a.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},a}();o.prototype.$padding=0,o.prototype.drawCursor=null,n.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,v){b.__proto__=v}||function(b,v){for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(b[E]=v[E])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(g,y);function b(){this.constructor=g}g.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),c=r("./lib/event_emitter").EventEmitter,u=32768,h=function(){function p(g,y){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();o.implement(h.prototype,c);var d=function(p){s(g,p);function g(y,b){var v=p.call(this,y,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,b.$scrollbarWidth=v.width=a.scrollbarWidth(y.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(y){this.element.style.height=y+"px"},g.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>u?(this.coeff=u/y,y=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},g.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},g}(h);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var f=function(p){s(g,p);function g(y,b){var v=p.call(this,y,"-h")||this;return v.scrollLeft=0,v.height=b.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(y){this.element.style.width=y+"px"},g.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},g}(h);n.ScrollBar=d,n.ScrollBarV=d,n.ScrollBarH=f,n.VScrollBar=d,n.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(y[v]=b[v])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function y(){this.constructor=p}p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}}(),o=r("./lib/oop"),a=r("./lib/dom"),l=r("./lib/event"),c=r("./lib/event_emitter").EventEmitter;a.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ +`),this.moveCursorToPosition(P)},F.prototype.setGhostText=function(P,_){this.session.widgetManager||(this.session.widgetManager=new w(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(P,_)},F.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},F.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var P=this.getCursorPosition(),_=P.column;if(_!==0){var M=this.session.getLine(P.row),j,R;_ee.toLowerCase()?1:0});for(var R=new y(0,0,0,0),j=P.first;j<=P.last;j++){var G=_.getLine(j);R.start.row=j,R.end.row=j,R.end.column=G.length,_.replace(R,M[j-P.first])}},F.prototype.toggleCommentLines=function(){var P=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(P,this.session,_.first,_.last)},F.prototype.toggleBlockComment=function(){var P=this.getCursorPosition(),_=this.session.getState(P.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,M,P)},F.prototype.getNumberAt=function(P,_){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var j=this.session.getLine(P);M.lastIndex<_;){var R=M.exec(j);if(R.index<=_&&R.index+R[0].length>=_){var G={value:R[0],start:R.index,end:R.index+R[0].length};return G}}return null},F.prototype.modifyNumber=function(P){var _=this.selection.getCursor().row,M=this.selection.getCursor().column,j=new y(_,M-1,_,M),R=this.session.getTextRange(j);if(!isNaN(parseFloat(R))&&isFinite(R)){var G=this.getNumberAt(_,M);if(G){var q=G.value.indexOf(".")>=0?G.start+G.value.indexOf(".")+1:G.end,ee=G.start+G.value.length-q,Y=parseFloat(G.value);Y*=Math.pow(10,ee),q!==G.end&&M=q&&G<=ee&&(M=je,Y.selection.clearSelection(),Y.moveCursorTo(P,q+j),Y.selection.selectTo(P,ee+j)),q=ee});for(var X=this.$toggleWordPairs,Q,te=0;te=ee&&q<=Y&&Z.match(/((?:https?|ftp):\/\/[\S]+)/)){X=Z.replace(/[\s:.,'";}\]]+$/,"");break}ee=Y}}catch(de){M={error:de}}finally{try{te&&!te.done&&(j=Q.return)&&j.call(Q)}finally{if(M)throw M.error}}return X},F.prototype.openLink=function(){var P=this.selection.getCursor(),_=this.findLinkAt(P.row,P.column);return _&&window.open(_,"_blank"),_!=null},F.prototype.removeLines=function(){var P=this.$getSelectedRows();this.session.removeFullLines(P.first,P.last),this.clearSelection()},F.prototype.duplicateSelection=function(){var P=this.selection,_=this.session,M=P.getRange(),j=P.isBackwards();if(M.isEmpty()){var R=M.start.row;_.duplicateLines(R,R)}else{var G=j?M.start:M.end,q=_.insert(G,_.getTextRange(M));M.start=G,M.end=q,P.setSelectionRange(M,j)}},F.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},F.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},F.prototype.moveText=function(P,_,M){return this.session.moveText(P,_,M)},F.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},F.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},F.prototype.$moveLines=function(P,_){var M,j,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var G=R.toOrientedRange();M=this.$getSelectedRows(G),j=this.session.$moveLines(M.first,M.last,_?0:P),_&&P==-1&&(j=0),G.moveBy(j,0),R.fromOrientedRange(G)}else{var q=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var ee=0,Y=0,X=q.length,Q=0;Qde+1)break;de=ke.last}for(Q--,ee=this.session.$moveLines(Z,de,_?0:P),_&&P==-1&&(te=Q+1);te<=Q;)q[te].moveBy(ee,0),te++;_||(ee=0),Y+=ee}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},F.prototype.$getSelectedRows=function(P){return P=(P||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(P.start.row),last:this.session.getRowFoldEnd(P.end.row)}},F.prototype.onCompositionStart=function(P){this.renderer.showComposition(P)},F.prototype.onCompositionUpdate=function(P){this.renderer.setCompositionText(P)},F.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},F.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},F.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},F.prototype.isRowVisible=function(P){return P>=this.getFirstVisibleRow()&&P<=this.getLastVisibleRow()},F.prototype.isRowFullyVisible=function(P){return P>=this.renderer.getFirstFullyVisibleRow()&&P<=this.renderer.getLastFullyVisibleRow()},F.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},F.prototype.$moveByPage=function(P,_){var M=this.renderer,j=this.renderer.layerConfig,R=P*Math.floor(j.height/j.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):_===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var G=M.scrollTop;M.scrollBy(0,R*j.lineHeight),_!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(G)},F.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},F.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},F.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},F.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},F.prototype.scrollPageDown=function(){this.$moveByPage(1)},F.prototype.scrollPageUp=function(){this.$moveByPage(-1)},F.prototype.scrollToRow=function(P){this.renderer.scrollToRow(P)},F.prototype.scrollToLine=function(P,_,M,j){this.renderer.scrollToLine(P,_,M,j)},F.prototype.centerSelection=function(){var P=this.getSelectionRange(),_={row:Math.floor(P.start.row+(P.end.row-P.start.row)/2),column:Math.floor(P.start.column+(P.end.column-P.start.column)/2)};this.renderer.alignCursor(_,.5)},F.prototype.getCursorPosition=function(){return this.selection.getCursor()},F.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},F.prototype.getSelectionRange=function(){return this.selection.getRange()},F.prototype.selectAll=function(){this.selection.selectAll()},F.prototype.clearSelection=function(){this.selection.clearSelection()},F.prototype.moveCursorTo=function(P,_){this.selection.moveCursorTo(P,_)},F.prototype.moveCursorToPosition=function(P){this.selection.moveCursorToPosition(P)},F.prototype.jumpToMatching=function(P,_){var M=this.getCursorPosition(),j=new C(this.session,M.row,M.column),R=j.getCurrentToken(),G=0;R&&R.type.indexOf("tag-name")!==-1&&(R=j.stepBackward());var q=R||j.stepForward();if(q){var ee,Y=!1,X={},Q=M.column-q.start,te,Z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(q.value.match(/[{}()\[\]]/g)){for(;Q1?X[q.value]++:R.value==="=0;--G)this.$tryReplace(M[G],P)&&j++;return this.selection.setSelectionRange(R),j},F.prototype.$tryReplace=function(P,_){var M=this.session.getTextRange(P);return _=this.$search.replace(M,_),_!==null?(P.end=this.session.replace(P,_),P):null},F.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},F.prototype.find=function(P,_,M){_||(_={}),typeof P=="string"||P instanceof RegExp?_.needle=P:typeof P=="object"&&o.mixin(_,P);var j=this.selection.getRange();_.needle==null&&(P=this.session.getTextRange(j)||this.$search.$options.needle,P||(j=this.session.getWordRange(j.start.row,j.start.column),P=this.session.getTextRange(j)),this.$search.set({needle:P})),this.$search.set(_),_.start||this.$search.set({start:j});var R=this.$search.find(this.session);if(_.preventScroll)return R;if(R)return this.revealRange(R,M),R;_.backwards?j.start=j.end:j.end=j.start,this.selection.setRange(j)},F.prototype.findNext=function(P,_){this.find({skipCurrent:!0,backwards:!1},P,_)},F.prototype.findPrevious=function(P,_){this.find(P,{skipCurrent:!0,backwards:!0},_)},F.prototype.revealRange=function(P,_){this.session.unfold(P),this.selection.setSelectionRange(P);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(P.start,P.end,.5),_!==!1&&this.renderer.animateScrolling(M)},F.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},F.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},F.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(P){P.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},F.prototype.setAutoScrollEditorIntoView=function(P){if(P){var _,M=this,j=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var G=this.on("changeSelection",function(){j=!0}),q=this.renderer.on("beforeRender",function(){j&&(_=M.renderer.container.getBoundingClientRect())}),ee=this.renderer.on("afterRender",function(){if(j&&_&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var Y=M.renderer,X=Y.$cursorLayer.$pixelPos,Q=Y.layerConfig,te=X.top-Q.offset;X.top>=0&&te+_.top<0?j=!0:X.topwindow.innerHeight?j=!1:j=null,j!=null&&(R.style.top=te+"px",R.style.left=X.left+"px",R.style.height=Q.lineHeight+"px",R.scrollIntoView(j)),j=_=null}});this.setAutoScrollEditorIntoView=function(Y){Y||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",G),this.renderer.off("afterRender",ee),this.renderer.off("beforeRender",q))}}},F.prototype.$resetCursorStyle=function(){var P=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(P)),_.isBlinking=!this.$readOnly&&P!="wide",l.setCssClass(_.element,"ace_slim-cursors",/slim/.test(P)))},F.prototype.prompt=function(P,_,M){var j=this;D.loadModule("ace/ext/prompt",function(R){R.prompt(j,P,_,M)})},F}();N.$uid=0,N.prototype.curOp=null,N.prototype.prevOp={},N.prototype.$mergeableCommands=["backspace","del","insertstring"],N.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(N.prototype,b),D.defineOptions(N.prototype,"editor",{selectionStyle:{set:function(F){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:F})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(F){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(F){this.textInput.setReadOnly(F),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(F){this.textInput.setCopyWithEmptySelection(F)},initialValue:!1},cursorStyle:{set:function(F){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(F){this.setAutoScrollEditorIntoView(F)}},keyboardHandler:{set:function(F){this.setKeyboardHandler(F)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(F){this.session.setValue(F)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(F){this.setSession(F)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(F){this.renderer.$gutterLayer.setShowLineNumbers(F),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),F&&this.$relativeLineNumbers?L.attach(this):L.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(F){this.$showLineNumbers&&F?L.attach(this):L.detach(this)}},placeholder:{set:function(F){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var P=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(P&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),l.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!P&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),l.addCssClass(this.container,"ace_hasPlaceholder");var _=l.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!P&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(F){var P={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(j){j.blur(),j.renderer.scroller.focus()},readOnly:!0},_=function(j){if(j.target==this.renderer.scroller&&j.keyCode===I.enter){j.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},M;F?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(P),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",A("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),M||(M=new T(this)),M.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",_.bind(this)),this.commands.removeCommand(P),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),M&&M.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(F){this.$textInputAriaLabel=F},initialValue:""},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var L={getText:function(F,P){return(Math.abs(F.selection.lead.row-P)||P+1+(P<9?"·":""))+""},getWidth:function(F,P,_){return Math.max(P.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(F,P){P.renderer.$loop.schedule(P.renderer.CHANGE_GUTTER)},attach:function(F){F.renderer.$gutterLayer.$renderer=this,F.on("changeSelection",this.update),this.update(null,F)},detach:function(F){F.renderer.$gutterLayer.$renderer==this&&(F.renderer.$gutterLayer.$renderer=null),F.off("changeSelection",this.update),this.update(null,F)}};n.Editor=N}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function l(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return l.prototype.moveContainer=function(a){s.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},l.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},l.prototype.computeLineTop=function(a,c,u){var h=c.firstRowScreen*c.lineHeight,d=Math.floor(h/this.canvasHeight),f=u.documentToScreenRow(a,0)*c.lineHeight;return f-d*this.canvasHeight},l.prototype.computeLineHeight=function(a,c,u){return c.lineHeight*u.getRowLineCount(a)},l.prototype.getLength=function(){return this.cells.length},l.prototype.get=function(a){return this.cells[a]},l.prototype.shift=function(){this.$cacheCell(this.cells.shift())},l.prototype.pop=function(){this.$cacheCell(this.cells.pop())},l.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=s.createFragment(this.element),u=0;uE&&(w=v.end.row+1,v=g.getNextFoldLine(w,v),E=v?v.start.row:1/0),w>b){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}D=this.$lines.get(++C),D?D.row=w:(D=this.$lines.createCell(w,p,this.session,d),this.$lines.push(D)),this.$renderCell(D,p,v,w),w++}this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$updateGutterWidth=function(p){var g=this.session,y=g.gutterRenderer||this.$renderer,b=g.$firstLineNumber,v=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(v=g.getLength()+b-1);var E=y?y.getWidth(g,v,p):v.toString().length*p.characterWidth,D=this.$padding||this.$computePadding();E+=D.left+D.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},f.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},f.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var y=0;y=this.$cursorRow){if(b.row>this.$cursorRow){var v=this.session.getFoldLine(this.$cursorRow);if(y>0&&v&&v.start.row==g[y-1].row)b=g[y-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},f.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var y=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=y,!g||b0;v--)this.$lines.shift();if(b>y)for(var v=this.session.getFoldedRowCount(y+1,b);v>0;v--)this.$lines.pop();p.firstRowb&&this.$lines.push(this.$renderLines(p,b+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},f.prototype.$renderLines=function(p,g,y){for(var b=[],v=g,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session,d);this.$renderCell(C,p,E,v),b.push(C),v++}return b},f.prototype.$renderCell=function(p,g,y,b){var v=p.element,E=this.session,D=v.childNodes[0],C=v.childNodes[1],w=v.childNodes[2],T=w.firstChild,A=E.$firstLineNumber,$=E.$breakpoints,I=E.$decorations,N=E.gutterRenderer||this.$renderer,L=this.$showFoldWidgets&&E.foldWidgets,F=y?y.start.row:Number.MAX_VALUE,P=g.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",j=(N?N.getText(E,b):b+A).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||y&&b=F&&this.$cursorRow<=y.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),$[b]&&(_+=$[b]),I[b]&&(_+=I[b]),this.$annotations[b]&&b!==F&&(_+=this.$annotations[b].className),L){var R=L[b];R==null&&(R=L[b]=E.getFoldWidget(b))}if(R){var G="ace_fold-widget ace_"+R,q=R=="start"&&b==F&&by.right-g.right)return"foldWidgets"},f}();h.prototype.$fixedWidth=!1,h.prototype.$highlightGutterLine=!0,h.prototype.$renderer="",h.prototype.$showLineNumbers=!0,h.prototype.$showFoldWidgets=!0,o.implement(h.prototype,a);function d(f){var p=document.createTextNode("");f.appendChild(p);var g=s.createElement("span");f.appendChild(g);var y=s.createElement("span");f.appendChild(y);var b=s.createElement("span");return y.appendChild(b),f}n.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(r,n,i){var s=r("../range").Range,o=r("../lib/dom"),l=function(){function c(u){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",u.appendChild(this.element)}return c.prototype.setPadding=function(u){this.$padding=u},c.prototype.setSession=function(u){this.session=u},c.prototype.setMarkers=function(u){this.markers=u},c.prototype.elt=function(u,h){var d=this.i!=-1&&this.element.childNodes[this.i];d?this.i++:(d=document.createElement("div"),this.element.appendChild(d),this.i=-1),d.style.cssText=h,d.className=u},c.prototype.update=function(u){if(u){this.config=u,this.i=0;var h;for(var d in this.markers){var f=this.markers[d];if(!f.range){f.update(h,this,this.session,u);continue}var p=f.range.clipRows(u.firstRow,u.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),f.renderer){var g=this.$getTop(p.start.row,u),y=this.$padding+p.start.column*u.characterWidth;f.renderer(h,p,y,g,u)}else f.type=="fullLine"?this.drawFullLineMarker(h,p,f.clazz,u):f.type=="screenLine"?this.drawScreenLineMarker(h,p,f.clazz,u):p.isMultiLine()?f.type=="text"?this.drawTextMarker(h,p,f.clazz,u):this.drawMultiLineMarker(h,p,f.clazz,u):this.drawSingleLineMarker(h,p,f.clazz+" ace_start ace_br15",u)}if(this.i!=-1)for(;this.iC,v==b),f,v==b?0:1,p)},c.prototype.drawMultiLineMarker=function(u,h,d,f,p){var g=this.$padding,y=f.lineHeight,b=this.$getTop(h.start.row,f),v=g+h.start.column*f.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(h.start.row)){var E=h.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(u,E,d+" ace_br1 ace_start",f,null,p)}else this.elt(d+" ace_br1 ace_start","height:"+y+"px;right:0;top:"+b+"px;left:"+v+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(h.end.row)){var E=h.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(u,E,d+" ace_br12",f,null,p)}else{b=this.$getTop(h.end.row,f);var D=h.end.column*f.characterWidth;this.elt(d+" ace_br12","height:"+y+"px;width:"+D+"px;top:"+b+"px;left:"+g+"px;"+(p||""))}if(y=(h.end.row-h.start.row-1)*f.lineHeight,!(y<=0)){b=this.$getTop(h.start.row+1,f);var C=(h.start.column?1:0)|(h.end.column?0:8);this.elt(d+(C?" ace_br"+C:""),"height:"+y+"px;right:0;top:"+b+"px;left:"+g+"px;"+(p||""))}},c.prototype.drawSingleLineMarker=function(u,h,d,f,p,g){if(this.session.$bidiHandler.isBidiRow(h.start.row))return this.drawBidiSingleLineMarker(u,h,d,f,p,g);var y=f.lineHeight,b=(h.end.column+(p||0)-h.start.column)*f.characterWidth,v=this.$getTop(h.start.row,f),E=this.$padding+h.start.column*f.characterWidth;this.elt(d,"height:"+y+"px;width:"+b+"px;top:"+v+"px;left:"+E+"px;"+(g||""))},c.prototype.drawBidiSingleLineMarker=function(u,h,d,f,p,g){var y=f.lineHeight,b=this.$getTop(h.start.row,f),v=this.$padding,E=this.session.$bidiHandler.getSelections(h.start.column,h.end.column);E.forEach(function(D){this.elt(d,"height:"+y+"px;width:"+(D.width+(p||0))+"px;top:"+b+"px;left:"+(v+D.left)+"px;"+(g||""))},this)},c.prototype.drawFullLineMarker=function(u,h,d,f,p){var g=this.$getTop(h.start.row,f),y=f.lineHeight;h.start.row!=h.end.row&&(y+=this.$getTop(h.end.row,f)-g),this.elt(d,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c.prototype.drawScreenLineMarker=function(u,h,d,f,p){var g=this.$getTop(h.start.row,f),y=f.lineHeight;this.elt(d,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c}();l.prototype.$padding=0;function a(c,u,h,d){return(c?1:0)|(u?2:0)|(h?4:0)|(d?8:0)}n.Marker=l}),ace.define("ace/layer/text_util",["require","exports","module"],function(r,n,i){var s=new Set(["text","rparen","lparen"]);n.isTextToken=function(o){return s.has(o)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),l=r("../lib/lang"),a=r("./lines").Lines,c=r("../lib/event_emitter").EventEmitter,u=r("../config").nls,h=r("./text_util").isTextToken,d=function(){function f(p){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",p.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var p=this.session.doc,g=p.getNewLineCharacter()==` +`&&p.getNewLineMode()!="windows",y=g?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=y)return this.EOL_CHAR=y,!0},f.prototype.setPadding=function(p){this.$padding=p,this.element.style.margin="0 "+p+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(p){this.$fontMetrics=p,this.$fontMetrics.on("changeCharacterSize",(function(g){this._signal("changeCharacterSize",g)}).bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(p){this.session=p,p&&this.$computeTabString()},f.prototype.setShowInvisibles=function(p){return this.showInvisibles==p?!1:(this.showInvisibles=p,typeof p=="string"?(this.showSpaces=/tab/i.test(p),this.showTabs=/space/i.test(p),this.showEOL=/eol/i.test(p)):this.showSpaces=this.showTabs=this.showEOL=p,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(p){return this.displayIndentGuides==p?!1:(this.displayIndentGuides=p,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(p){return this.$highlightIndentGuides===p?!1:(this.$highlightIndentGuides=p,p)},f.prototype.$computeTabString=function(){var p=this.session.getTabSize();this.tabSize=p;for(var g=this.$tabStrings=[0],y=1;yA&&(w=T.end.row+1,T=this.session.getNextFoldLine(w,T),A=T?T.start.row:1/0),!(w>v);){var $=E[D++];if($){this.dom.removeChildren($),this.$renderLine($,w,w==A?T:!1),C&&($.style.top=this.$lines.computeLineTop(w,p,this.session)+"px");var I=p.lineHeight*this.session.getRowLength(w)+"px";$.style.height!=I&&(C=!0,$.style.height=I)}w++}if(C)for(;D0;v--)this.$lines.shift();if(g.lastRow>p.lastRow)for(var v=this.session.getFoldedRowCount(p.lastRow+1,g.lastRow);v>0;v--)this.$lines.pop();p.firstRowg.lastRow&&this.$lines.push(this.$renderLinesFragment(p,g.lastRow+1,p.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(p,g,y){for(var b=[],v=g,E=this.session.getNextFoldLine(v),D=E?E.start.row:1/0;v>D&&(v=E.end.row+1,E=this.session.getNextFoldLine(v,E),D=E?E.start.row:1/0),!(v>y);){var C=this.$lines.createCell(v,p,this.session),w=C.element;this.dom.removeChildren(w),o.setStyle(w.style,"height",this.$lines.computeLineHeight(v,p,this.session)+"px"),o.setStyle(w.style,"top",this.$lines.computeLineTop(v,p,this.session)+"px"),this.$renderLine(w,v,v==D?E:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",b.push(C),v++}return b},f.prototype.update=function(p){this.$lines.moveContainer(p),this.config=p;for(var g=p.firstRow,y=p.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(p,g,y))},f.prototype.$renderToken=function(p,g,y,b){for(var v=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,D=this.dom.createFragment(this.element),C,w=0;C=E.exec(b);){var T=C[1],A=C[2],$=C[3],I=C[4],N=C[5];if(!(!v.showSpaces&&A)){var L=w!=C.index?b.slice(w,C.index):"";if(w=C.index+C[0].length,L&&D.appendChild(this.dom.createTextNode(L,this.element)),T){var F=v.session.getScreenTabSize(g+C.index);D.appendChild(v.$tabStrings[F].cloneNode(!0)),g+=F-1}else if(A)if(v.showSpaces){var P=this.dom.createElement("span");P.className="ace_invisible ace_invisible_space",P.textContent=l.stringRepeat(v.SPACE_CHAR,A.length),D.appendChild(P)}else D.appendChild(this.dom.createTextNode(A,this.element));else if($){var P=this.dom.createElement("span");P.className="ace_invisible ace_invisible_space ace_invalid",P.textContent=l.stringRepeat(v.SPACE_CHAR,$.length),D.appendChild(P)}else if(I){g+=1;var P=this.dom.createElement("span");P.style.width=v.config.characterWidth*2+"px",P.className=v.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",P.textContent=v.showSpaces?v.SPACE_CHAR:I,D.appendChild(P)}else if(N){g+=1;var P=this.dom.createElement("span");P.style.width=v.config.characterWidth*2+"px",P.className="ace_cjk",P.textContent=N,D.appendChild(P)}}}if(D.appendChild(this.dom.createTextNode(w?b.slice(w):b,this.element)),h(y.type))p.appendChild(D);else{var _="ace_"+y.type.replace(/\./g," ace_"),P=this.dom.createElement("span");y.type=="fold"&&(P.style.width=y.value.length*this.config.characterWidth+"px",P.setAttribute("title",u("inline-fold.closed.title","Unfold code"))),P.className=_,P.appendChild(D),p.appendChild(P)}return g+b.length},f.prototype.renderIndentGuide=function(p,g,y){var b=g.search(this.$indentGuideRe);if(b<=0||b>=y)return g;if(g[0]==" "){b-=b%this.tabSize;for(var v=b/this.tabSize,E=0;EE[D].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&p[g.row]!==""&&g.column===p[g.row].length){this.$highlightIndentGuideMarker.dir=1;for(var D=g.row+1;D0){for(var v=0;v=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,g)}}else for(var y=p.length-1;y>=0;y--){var b=p[y];if(this.$highlightIndentGuideMarker.end&&b.row=E;)D=this.$renderToken(C,D,T,A.substring(0,E-b)),A=A.substring(E-b),b=E,C=this.$createLineElement(),p.appendChild(C),C.appendChild(this.dom.createTextNode(l.stringRepeat(" ",y.indent),this.element)),v++,D=0,E=y[v]||Number.MAX_VALUE;A.length!=0&&(b+=A.length,D=this.$renderToken(C,D,T,A))}}y[y.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,D,null,"",!0)},f.prototype.$renderSimpleLine=function(p,g){for(var y=0,b=0;bthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(p,y,v,E);y=this.$renderToken(p,y,v,E)}}},f.prototype.$renderOverflowMessage=function(p,g,y,b,v){y&&this.$renderToken(p,g,y,b.slice(0,this.MAX_LINE_LENGTH-g));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=v?"":"",p.appendChild(E)},f.prototype.$renderLine=function(p,g,y){if(!y&&y!=!1&&(y=this.session.getFoldLine(g)),y)var b=this.$getFoldLineTokens(g,y);else var b=this.session.getTokens(g);var v=p;if(b.length){var E=this.session.getRowSplitData(g);if(E&&E.length){this.$renderWrappedLine(p,b,E);var v=p.lastChild}else{var v=p;this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v)),this.$renderSimpleLine(v,b)}}else this.$useLineGroups()&&(v=this.$createLineElement(),p.appendChild(v));if(this.showEOL&&v){y&&(g=y.end.row);var D=this.dom.createElement("span");D.className="ace_invisible ace_invisible_eol",D.textContent=g==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,v.appendChild(D)}},f.prototype.$getFoldLineTokens=function(p,g){var y=this.session,b=[];function v(D,C,w){for(var T=0,A=0;A+D[T].value.lengthw-C&&($=$.substring(0,w-C)),b.push({type:D[T].type,value:$}),A=C+$.length,T+=1}for(;Aw?b.push({type:D[T].type,value:$.substring(0,w-A)}):b.push(D[T]),A+=$.length,T+=1}}var E=y.getTokens(p);return g.walk(function(D,C,w,T,A){D!=null?b.push({type:"fold",value:D}):(A&&(E=y.getTokens(C)),E.length&&v(E,T,w))},g.end.row,this.session.getLine(g.end.row).length),b},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,s.implement(d.prototype,c),n.Text=d}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(r,n,i){var s=r("../lib/dom"),o=function(){function l(a){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return l.prototype.$updateOpacity=function(a){for(var c=this.cursors,u=c.length;u--;)s.setStyle(c[u].style,"opacity",a?"":"0")},l.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&s.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},l.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,s.removeCssClass(this.element,"ace_animate-blinking")},l.prototype.setPadding=function(a){this.$padding=a},l.prototype.setSession=function(a){this.session=a},l.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},l.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},l.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,s.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},l.prototype.addCursor=function(){var a=s.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},l.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},l.prototype.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},l.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,s.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&s.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),s.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},l.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(a),h=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,a.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),d=(u.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:h,top:d}},l.prototype.isCursorInView=function(a,c){return a.top>=0&&a.topa.height+a.offset||f.top<0)&&u>1)){var p=this.cursors[h++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,f,a,c[u],this.session):this.isCursorInView(f,a)?(s.setStyle(g,"display","block"),s.translate(p,f.left,f.top),s.setStyle(g,"width",Math.round(a.characterWidth)+"px"),s.setStyle(g,"height",a.lineHeight+"px")):s.setStyle(g,"display","none")}}for(;this.cursors.length>h;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=f,this.restartTimer()},l.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},l.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},l}();o.prototype.$padding=0,o.prototype.drawCursor=null,n.Cursor=o}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,v){b.__proto__=v}||function(b,v){for(var E in v)Object.prototype.hasOwnProperty.call(v,E)&&(b[E]=v[E])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(g,y);function b(){this.constructor=g}g.prototype=y===null?Object.create(y):(b.prototype=y.prototype,new b)}}(),o=r("./lib/oop"),l=r("./lib/dom"),a=r("./lib/event"),c=r("./lib/event_emitter").EventEmitter,u=32768,h=function(){function p(g,y){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();o.implement(h.prototype,c);var d=function(p){s(g,p);function g(y,b){var v=p.call(this,y,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,b.$scrollbarWidth=v.width=l.scrollbarWidth(y.ownerDocument),v.inner.style.width=v.element.style.width=(v.width||15)+5+"px",v.$minWidth=0,v}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(y){this.element.style.height=y+"px"},g.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>u?(this.coeff=u/y,y=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},g.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},g}(h);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var f=function(p){s(g,p);function g(y,b){var v=p.call(this,y,"-h")||this;return v.scrollLeft=0,v.height=b.$scrollbarWidth,v.inner.style.height=v.element.style.height=(v.height||15)+5+"px",v}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(y){this.element.style.width=y+"px"},g.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},g}(h);n.ScrollBar=d,n.ScrollBarV=d,n.ScrollBarH=f,n.VScrollBar=d,n.HScrollBar=f}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(r,n,i){var s=this&&this.__extends||function(){var f=function(p,g){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,b){y.__proto__=b}||function(y,b){for(var v in b)Object.prototype.hasOwnProperty.call(b,v)&&(y[v]=b[v])},f(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");f(p,g);function y(){this.constructor=p}p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}}(),o=r("./lib/oop"),l=r("./lib/dom"),a=r("./lib/event"),c=r("./lib/event_emitter").EventEmitter;l.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; @@ -403,7 +403,7 @@ Error generating stack: `+s.message+` .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var u=function(){function f(p,g){this.element=a.createElement("div"),this.element.className="ace_sb"+g,this.inner=a.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();o.implement(u.prototype,c);var h=function(f){s(p,f);function p(g,y){var b=f.call(this,g,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=g,b.width=b.VScrollWidth,b.renderer=y,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientY,E=function(I){v=I.clientY},D=function(){clearInterval(A)},C=y.clientY,w=this.thumbTop,T=function(){if(v!==void 0){var I=b.scrollTopFromThumbTop(w+v-C);I!==b.scrollTop&&b._emit("scroll",{data:I})}};l.capture(this.inner,E,D);var A=setInterval(T,20);return l.preventDefault(y)}var $=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var y=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y=y>>0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,y){this.pageHeight===g&&!y||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(u);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var d=function(f){s(p,f);function p(g,y){var b=f.call(this,g,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=y,b}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(l.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientX,E=function(I){v=I.clientX},D=function(){clearInterval(A)},C=y.clientX,w=this.thumbLeft,T=function(){if(v!==void 0){var I=b.scrollLeftFromThumbLeft(w+v-C);I!==b.scrollLeft&&b._emit("scroll",{data:I})}};l.capture(this.inner,E,D);var A=setInterval(T,20);return l.preventDefault(y)}var $=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),l.preventDefault(y)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var y=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y=y>>0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,y){this.pageWidth===g&&!y||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(u);d.prototype.setInnerWidth=d.prototype.setScrollWidth,n.ScrollBar=h,n.ScrollBarV=h,n.ScrollBarH=d,n.VScrollBar=h,n.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(r,n,i){var s=r("./lib/event"),o=function(){function a(l,c){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var u=this;this._flush=function(h){u.pending=!1;var d=u.changes;if(d&&(s.blockIdle(100),u.changes=0,u.onRender(d)),u.changes){if(u.$recursionLimit--<0)return;u.schedule()}else u.$recursionLimit=2}}return a.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},a.prototype.clear=function(l){var c=this.changes;return this.changes=0,c},a}();n.RenderLoop=o}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),a=r("../lib/lang"),l=r("../lib/event"),c=r("../lib/useragent"),u=r("../lib/event_emitter").EventEmitter,h=512,d=typeof ResizeObserver=="function",f=200,p=function(){function g(y){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=a.stringRepeat("X",h),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(y,b){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",c.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=b?"hidden":"visible"},g.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===y.width&&b.height===y.height,this._emit("changeCharacterSize",{data:y})}},g.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(b){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=l.onIdle(function b(){y.checkForSizeChanges(),l.onIdle(b,500)},500)},g.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(y){var b={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/h};return b.width===0||b.height===0?null:b},g.prototype.$measureCharWidth=function(y){this.$main.textContent=a.stringRepeat(y,h);var b=this.$main.getBoundingClientRect();return b.width/h},g.prototype.getCharacterWidth=function(y){var b=this.charSizes[y];return b===void 0&&(b=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),b},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(window.getComputedStyle(y).zoom||1)*this.$getZoom(y.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var y=function(b,v){return["div",{style:"position: absolute;top:"+b+"px;left:"+v+"px;"}]};this.els=o.buildDom([y(0,0),y(f,0),y(0,f),y(f,f)],this.el)},g.prototype.transformCoordinates=function(y,b){if(y){var v=this.$getZoom(this.el);y=w(1/v,y)}function E(q,ee,Y){var X=q[1]*ee[0]-q[0]*ee[1];return[(-ee[1]*Y[0]+ee[0]*Y[1])/X,(+q[1]*Y[0]-q[0]*Y[1])/X]}function D(q,ee){return[q[0]-ee[0],q[1]-ee[1]]}function C(q,ee){return[q[0]+ee[0],q[1]+ee[1]]}function w(q,ee){return[q*ee[0],q*ee[1]]}this.els||this.$initTransformMeasureNodes();function T(q){var ee=q.getBoundingClientRect();return[ee.left,ee.top]}var A=T(this.els[0]),$=T(this.els[1]),I=T(this.els[2]),N=T(this.els[3]),L=E(D(N,$),D(N,I),D(C($,I),C(N,A))),F=w(1+L[0],D($,A)),P=w(1+L[1],D(I,A));if(b){var _=b,M=L[0]*_[0]/f+L[1]*_[1]/f+1,B=C(w(_[0],F),w(_[1],P));return C(w(1/M/f,B),A)}var R=D(y,A),G=E(D(F,w(L[0],R)),D(P,w(L[1],R)),R);return w(f,G)},g}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,u),n.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(r,n,i){i.exports=` +}`,"ace_scrollbar.css",!1);var u=function(){function f(p,g){this.element=l.createElement("div"),this.element.className="ace_sb"+g,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return f.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},f}();o.implement(u.prototype,c);var h=function(f){s(p,f);function p(g,y){var b=f.call(this,g,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=g,b.width=b.VScrollWidth,b.renderer=y,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(a.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientY,E=function(I){v=I.clientY},D=function(){clearInterval(A)},C=y.clientY,w=this.thumbTop,T=function(){if(v!==void 0){var I=b.scrollTopFromThumbTop(w+v-C);I!==b.scrollTop&&b._emit("scroll",{data:I})}};a.capture(this.inner,E,D);var A=setInterval(T,20);return a.preventDefault(y)}var $=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),a.preventDefault(y)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var y=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y=y>>0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,y){this.pageHeight===g&&!y||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(u);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var d=function(f){s(p,f);function p(g,y){var b=f.call(this,g,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=y,b}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(a.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var b=this,v=y.clientX,E=function(I){v=I.clientX},D=function(){clearInterval(A)},C=y.clientX,w=this.thumbLeft,T=function(){if(v!==void 0){var I=b.scrollLeftFromThumbLeft(w+v-C);I!==b.scrollLeft&&b._emit("scroll",{data:I})}};a.capture(this.inner,E,D);var A=setInterval(T,20);return a.preventDefault(y)}var $=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),a.preventDefault(y)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var y=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y=y>>0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,y){this.pageWidth===g&&!y||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(u);d.prototype.setInnerWidth=d.prototype.setScrollWidth,n.ScrollBar=h,n.ScrollBarV=h,n.ScrollBarH=d,n.VScrollBar=h,n.HScrollBar=d}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(r,n,i){var s=r("./lib/event"),o=function(){function l(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var u=this;this._flush=function(h){u.pending=!1;var d=u.changes;if(d&&(s.blockIdle(100),u.changes=0,u.onRender(d)),u.changes){if(u.$recursionLimit--<0)return;u.schedule()}else u.$recursionLimit=2}}return l.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(s.nextFrame(this._flush),this.pending=!0)},l.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},l}();n.RenderLoop=o}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/dom"),l=r("../lib/lang"),a=r("../lib/event"),c=r("../lib/useragent"),u=r("../lib/event_emitter").EventEmitter,h=512,d=typeof ResizeObserver=="function",f=200,p=function(){function g(y){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=l.stringRepeat("X",h),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(y,b){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",c.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=b?"hidden":"visible"},g.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===y.width&&b.height===y.height,this._emit("changeCharacterSize",{data:y})}},g.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(b){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=a.onIdle(function b(){y.checkForSizeChanges(),a.onIdle(b,500)},500)},g.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(y){var b={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/h};return b.width===0||b.height===0?null:b},g.prototype.$measureCharWidth=function(y){this.$main.textContent=l.stringRepeat(y,h);var b=this.$main.getBoundingClientRect();return b.width/h},g.prototype.getCharacterWidth=function(y){var b=this.charSizes[y];return b===void 0&&(b=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),b},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(window.getComputedStyle(y).zoom||1)*this.$getZoom(y.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var y=function(b,v){return["div",{style:"position: absolute;top:"+b+"px;left:"+v+"px;"}]};this.els=o.buildDom([y(0,0),y(f,0),y(0,f),y(f,f)],this.el)},g.prototype.transformCoordinates=function(y,b){if(y){var v=this.$getZoom(this.el);y=w(1/v,y)}function E(q,ee,Y){var X=q[1]*ee[0]-q[0]*ee[1];return[(-ee[1]*Y[0]+ee[0]*Y[1])/X,(+q[1]*Y[0]-q[0]*Y[1])/X]}function D(q,ee){return[q[0]-ee[0],q[1]-ee[1]]}function C(q,ee){return[q[0]+ee[0],q[1]+ee[1]]}function w(q,ee){return[q*ee[0],q*ee[1]]}this.els||this.$initTransformMeasureNodes();function T(q){var ee=q.getBoundingClientRect();return[ee.left,ee.top]}var A=T(this.els[0]),$=T(this.els[1]),I=T(this.els[2]),N=T(this.els[3]),L=E(D(N,$),D(N,I),D(C($,I),C(N,A))),F=w(1+L[0],D($,A)),P=w(1+L[1],D(I,A));if(b){var _=b,M=L[0]*_[0]/f+L[1]*_[1]/f+1,j=C(w(_[0],F),w(_[1],P));return C(w(1/M/f,j),A)}var R=D(y,A),G=E(D(F,w(L[0],R)),D(P,w(L[1],R)),R);return w(f,G)},g}();p.prototype.$characterSize={width:0,height:0},s.implement(p.prototype,u),n.FontMetrics=p}),ace.define("ace/css/editor-css",["require","exports","module"],function(r,n,i){i.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -1072,9 +1072,9 @@ Error generating stack: `+s.message+` width:1px; height:1px; overflow:hidden; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/oop"),a=r("../lib/event_emitter").EventEmitter,l=function(){function c(u,h){this.canvas=s.createElement("canvas"),this.renderer=h,this.pixelRatio=1,this.maxHeight=h.layerConfig.maxHeight,this.lineHeight=h.layerConfig.lineHeight,this.canvasHeight=u.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=u.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},u.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(u){var h=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(u){this.maxHeight=u.maxHeight,this.lineHeight=u.lineHeight,this.canvasHeight=u.height;var d=(u.lastRow+1)*this.lineHeight;dL.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var y={info:1,warning:2,error:3};g.forEach(function(N){N.priority=y[N.type]||null}),g=g.sort(p);for(var b=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round($-this.halfMinDecorationHeight),T=Math.round($+this.halfMinDecorationHeight)}f.fillStyle=h[g[v].type]||null,f.fillRect(0,C,this.canvasWidth,T-w)}}var I=this.renderer.session.selection.getCursor();if(I){var D=this.compensateFoldRows(I.row,b),C=Math.round((I.row-D)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,C,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(u,h){var d=0;if(h&&h.length>0)for(var f=0;fh[f].start.row&&u=h[f].end.row&&(d+=h[f].end.row-h[f].start.row);return d},c}();o.implement(l.prototype,a),n.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/dom"),a=r("./lib/lang"),l=r("./config"),c=r("./layer/gutter").Gutter,u=r("./layer/marker").Marker,h=r("./layer/text").Text,d=r("./layer/cursor").Cursor,f=r("./scrollbar").HScrollBar,p=r("./scrollbar").VScrollBar,g=r("./scrollbar_custom").HScrollBar,y=r("./scrollbar_custom").VScrollBar,b=r("./renderloop").RenderLoop,v=r("./layer/font_metrics").FontMetrics,E=r("./lib/event_emitter").EventEmitter,D=r("./css/editor-css"),C=r("./layer/decorators").Decorator,w=r("./lib/useragent");o.importCssString(D,"ace_editor.css",!1);var T=function(){function A($,I){var N=this;this.container=$||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var L=this.$textLayer=new h(this.content);this.canvas=L.element,this.$markerFront=new u(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(F){N.$scrollAnimation||N.session.setScrollTop(F.data-N.scrollMargin.top)}),this.scrollBarH.on("scroll",function(F){N.$scrollAnimation||N.session.setScrollLeft(F.data-N.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(F){N.updateCharacterSize(),N.onResize(!0,N.gutterWidth,N.$size.width,N.$size.height),N._signal("changeCharacterSize",F)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function($,I,N){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function($,I,N,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var F=this.container;L||(L=F.clientHeight||F.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(!F.style.height||F.style.height=="0px")&&(F.style.height="1px",L=F.clientHeight||F.scrollHeight),N||(N=F.clientWidth||F.scrollWidth);var P=this.$updateCachedSize($,I,N,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!N&&!L)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(P|this.$changes,!0):this.$loop.schedule(P|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function($,I,N,L){L-=this.$extraHeight||0;var F=0,P=this.$size,_={width:P.width,height:P.height,scrollerHeight:P.scrollerHeight,scrollerWidth:P.scrollerWidth};if(L&&($||P.height!=L)&&(P.height=L,F|=this.CHANGE_SIZE,P.scrollerHeight=P.height,this.$horizScroll&&(P.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(P.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",F=F|this.CHANGE_SCROLL),N&&($||P.width!=N)){F|=this.CHANGE_SIZE,P.width=N,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,o.setStyle(this.scrollBarH.element.style,"left",I+"px"),o.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),P.scrollerWidth=Math.max(0,N-I-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var M=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",M),o.setStyle(this.scroller.style,"right",M),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(P.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(F|=this.CHANGE_FULL)}return P.$dirty=!N||!L,F&&this._signal("resize",_),F},A.prototype.onGutterResize=function($){var I=this.$showGutter?$:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,I=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},A.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},A.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=o.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){o.translate(this.textarea,-100,0);return}var N=this.$cursorLayer.$pixelPos;if(N){I&&I.markerRange&&(N=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var L=this.layerConfig,F=N.top,P=N.left;F-=L.offset;var _=I&&I.useTextareaForIME||w.isMobile?this.lineHeight:1;if(F<0||F>L.height-_){o.translate(this.textarea,0,0);return}var M=1,B=this.$size.height-_;if(!I)F+=this.lineHeight;else if(I.useTextareaForIME){var R=this.textarea.value;M=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else F+=this.lineHeight+2;P-=this.scrollLeft,P>this.$size.scrollerWidth-M&&(P=this.$size.scrollerWidth-M),P+=this.gutterWidth+this.margin.left,o.setStyle($,"height",_+"px"),o.setStyle($,"width",M+"px"),o.translate(this.textarea,Math.min(P,this.$size.scrollerWidth-M),Math.min(F,B))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,I=$.lastRow,N=this.session.documentToScreenRow(I,0)*$.lineHeight;return N-this.session.getScrollTop()>$.height-$.lineHeight?I-1:I},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function($,I,N,L){var F=this.scrollMargin;F.top=$|0,F.bottom=I|0,F.right=L|0,F.left=N|0,F.v=F.top+F.bottom,F.h=F.left+F.right,F.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-F.top),this.updateFull()},A.prototype.setMargin=function($,I,N,L){var F=this.margin;F.top=$|0,F.bottom=I|0,F.right=L|0,F.left=N|0,F.v=F.top+F.bottom,F.h=F.left+F.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},A.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-I&&($=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function($,I){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!I){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var N=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),N.firstRow!=this.layerConfig.firstRow&&N.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(N.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}N=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-N.offset);var F=N.width+2*this.$padding+"px",P=N.minHeight+"px";o.setStyle(this.content.style,"width",F),o.setStyle(this.content.style,"height",P)}if($&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-N.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(N):this.$textLayer.scrollLines(N),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(N):this.$gutterLayer.scrollLines(N)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(N),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(N),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(N),this._signal("afterRender",$)},A.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,N=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(N+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&N>this.$maxPixelHeight&&(N=this.$maxPixelHeight);var L=N<=2*this.lineHeight,F=!L&&$>I;if(N!=this.desiredHeight||this.$size.height!=this.desiredHeight||F!=this.$vScroll){F!=this.$vScroll&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var P=this.container.clientWidth;this.container.style.height=N+"px",this.$updateCachedSize(!0,this.$gutterWidth,P,N),this.desiredHeight=N,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var $=this.session,I=this.$size,N=I.height<=2*this.lineHeight,L=this.session.getScreenLength(),F=L*this.lineHeight,P=this.$getLongestLine(),_=!N&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-P-2*this.$padding<0),M=this.$horizScroll!==_;M&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var B=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var R=I.scrollerHeight+this.lineHeight,G=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;F+=G;var q=this.scrollMargin;this.session.setScrollTop(Math.max(-q.top,Math.min(this.scrollTop,F-I.scrollerHeight+q.bottom))),this.session.setScrollLeft(Math.max(-q.left,Math.min(this.scrollLeft,P+2*this.$padding-I.scrollerWidth+q.right)));var ee=!N&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-F+G<0||this.scrollTop>q.top),Y=B!==ee;Y&&(this.$vScroll=ee,this.scrollBarV.setVisible(ee));var X=this.scrollTop%this.lineHeight,Q=Math.ceil(R/this.lineHeight)-1,te=Math.max(0,Math.round((this.scrollTop-X)/this.lineHeight)),Z=te+Q,de,ke,me=this.lineHeight;te=$.screenToDocumentRow(te,0);var Fe=$.getFoldLine(te);Fe&&(te=Fe.start.row),de=$.documentToScreenRow(te,0),ke=$.getRowLength(te)*me,Z=Math.min($.screenToDocumentRow(Z,0),$.getLength()-1),R=I.scrollerHeight+$.getRowLength(Z)*me+ke,X=this.scrollTop-de*me;var ze=0;return(this.layerConfig.width!=P||M)&&(ze=this.CHANGE_H_SCROLL),(M||Y)&&(ze|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),Y&&(P=this.$getLongestLine())),this.layerConfig={width:P,padding:this.$padding,firstRow:te,firstRowScreen:de,lastRow:Z,lineHeight:me,characterWidth:this.characterWidth,minHeight:R,maxHeight:F,offset:X,gutterOffset:me?Math.max(0,Math.ceil((X+I.height-I.scrollerHeight)/me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(P-this.$padding),ze},A.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var N=this.layerConfig;if(!($>N.lastRow+1)&&!(Ithis.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function($,I){this.$gutterLayer.addGutterDecoration($,I)},A.prototype.removeGutterDecoration=function($,I){this.$gutterLayer.removeGutterDecoration($,I)},A.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function($,I,N){this.scrollCursorIntoView($,N),this.scrollCursorIntoView(I,N)},A.prototype.scrollCursorIntoView=function($,I,N){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition($),F=L.left,P=L.top,_=N&&N.top||0,M=N&&N.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var B=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;B+_>P?(I&&B+_>P+this.lineHeight&&(P-=I*this.$size.scrollerHeight),P===0&&(P=-this.scrollMargin.top),this.session.setScrollTop(P)):B+this.$size.scrollerHeight-M=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function($,I){var N;if(this.$hasCssTransforms){N={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,I]);$=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else N=this.scroller.getBoundingClientRect();var F=$+this.scrollLeft-N.left-this.$padding,P=F/this.characterWidth,_=Math.floor((I+this.scrollTop-N.top)/this.lineHeight),M=this.$blockCursor?Math.floor(P):Math.round(P);return{row:_,column:M,side:P-M>0?1:-1,offsetX:F}},A.prototype.screenToTextCoordinates=function($,I){var N;if(this.$hasCssTransforms){N={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,I]);$=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else N=this.scroller.getBoundingClientRect();var F=$+this.scrollLeft-N.left-this.$padding,P=F/this.characterWidth,_=this.$blockCursor?Math.floor(P):Math.round(P),M=Math.floor((I+this.scrollTop-N.top)/this.lineHeight);return this.session.screenToDocumentPosition(M,Math.max(_,0),F)},A.prototype.textToScreenCoordinates=function($,I){var N=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition($,I),F=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,$)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),P=L.row*this.lineHeight;return{pageX:N.left+F-this.scrollLeft,pageY:N.top+P-this.scrollTop}},A.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function($){var I=this.session.selection.cursor;this.addToken($,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function($,I){var N=this.session.selection.cursor,L=I||{row:N.row,column:N.column};this.removeGhostText();var F=this.$calculateWrappedTextChunks($,L);if(this.addToken(F[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:$,position:{row:L.row,column:L.column}},F.length>1){var P=F.slice(1).map(function(q){return"").concat(q.text,"")});this.$ghostTextWidget={html:P.join(""),row:L.row,column:L.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var _=this.$cursorLayer.getPixelPosition(L,!0),M=this.container,B=M.getBoundingClientRect().height,R=F.length*this.lineHeight,G=R0){var R=0;B.push(F[_].length);for(var G=0;G1||Math.abs($.$size.height-L)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,s.implement(T.prototype,E),l.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),n.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/net"),a=r("../lib/event_emitter").EventEmitter,l=r("../config");function c(f){var p="importScripts('"+o.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new g;return y.append(p),y.getBlob("application/javascript")}}function u(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var p=c(f),g=window.URL||window.webkitURL,y=g.createObjectURL(p);return new Worker(y)}return new Worker(f)}var h=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,a),this.$createWorkerFromOldConfig=function(f,p,g,y,b){if(r.nameToUrl&&!r.toUrl&&(r.toUrl=r.nameToUrl),l.get("packaged")||!r.toUrl)y=y||l.moduleUrl(p,"worker");else{var v=this.$normalizePath;y=y||v(r.toUrl("ace/worker/worker.js",null,"_"));var E={};f.forEach(function(D){E[D]=v(r.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=u(y),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return o.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var y=this.callbackId++;this.callbacks[y]=g,p.push(y)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(h.prototype);var d=function(f,p,g){var y=null,b=!1,v=Object.create(a),E=[],D=new h({messageBuffer:E,terminate:function(){},postMessage:function(w){E.push(w),y&&(b?setTimeout(C):C())}});D.setEmitSync=function(w){b=w};var C=function(){var w=E.shift();w.command?y[w.command].apply(y,w.args):w.event&&v._signal(w.event,w.data)};return v.postMessage=function(w){D.onMessage({data:w})},v.callback=function(w,T){this.postMessage({type:"call",id:T,data:w})},v.emit=function(w,T){this.postMessage({type:"event",name:w,data:T})},l.loadModule(["worker",p],function(w){for(y=new w[g](v);E.length;)C()}),D};n.UIWorkerClient=d,n.WorkerClient=h,n.createWorker=u}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(r,n,i){var s=r("./range").Range,o=r("./lib/event_emitter").EventEmitter,a=r("./lib/oop"),l=function(){function c(u,h,d,f,p,g){var y=this;this.length=h,this.session=u,this.doc=u.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=d;var b=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var u=this,h=this.doc,d=this.session;this.selectionBefore=d.selection.toJSON(),d.selection.inMultiSelectMode&&d.selection.toSingleRange(),this.pos=h.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=d.addMarker(new s(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=h.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),u.others.push(g)}),d.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,h=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=u.addMarker(new s(d.row,d.column,d.row,d.column+h.length),h.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u=this.pos.column&&h.start.column<=this.pos.column+this.length+1,p=h.start.column-this.pos.column;if(this.updateAnchors(u),f&&(this.length+=d),f&&!this.session.$fromUndo){if(u.action==="insert")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],b={row:y.row,column:y.column+p};this.doc.insertMergedLines(b,u.lines)}else if(u.action==="remove")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],b={row:y.row,column:y.column+p};this.doc.remove(new s(b.row,b.column,b.row,b.column-d))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(u){this.pos.onChange(u);for(var h=this.others.length;h--;)this.others[h].onChange(u);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var u=this,h=this.session,d=function(p,g){h.removeMarker(p.markerId),p.markerId=h.addMarker(new s(p.row,p.column,p.row,p.column+u.length),g,null,!1)};d(this.pos,this.mainClass);for(var f=this.others.length;f--;)d(this.others[f],this.othersClass)}},c.prototype.onCursorChange=function(u){if(!(this.$updating||!this.session)){var h=this.session.selection.getCursor();h.row===this.pos.row&&h.column>=this.pos.column&&h.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),h=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,d=0;d1?o.multiSelect.joinSelections():o.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(o){o.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(o){o.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(o){o.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(o){o.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(o){return o&&o.inMultiSelectMode}}];var s=r("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new s(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(r,n,i){var s=r("./range_list").RangeList,o=r("./range").Range,a=r("./selection").Selection,l=r("./mouse/multi_select_handler").onMouseDown,c=r("./lib/event"),u=r("./lib/lang"),h=r("./commands/multi_select_commands");n.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=r("./search").Search,f=new d;function p(D,C,w){return f.$options.wrap=!0,f.$options.needle=C,f.$options.backwards=w==-1,f.find(D)}var g=r("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,C){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}D.cursor||(D.cursor=D.end);var T=this.rangeList.add(D);return this.$onAddRange(D),T.length&&this.$onRemoveRange(T),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var C=this.rangeList.substractPoint(D);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();D.push(C),this.rangeCount=0}for(var w=D.length;w--;){var T=this.ranges.indexOf(D[w]);this.ranges.splice(T,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w1){var D=this.rangeList.ranges,C=D[D.length-1],w=o.fromPoints(D[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var T=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(T,A);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,C,w){var T=[],A=D.column0;)G--;if(G>0)for(var q=0;T[q].isEmpty();)q++;for(var ee=G;ee>=q;ee--)T[ee].isEmpty()&&T.splice(ee,1)}return T}}).call(a.prototype);var y=r("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var C=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",C),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var C=this.session.$selectionMarkers.indexOf(D);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var C=this.session.$selectionMarkers,w=D.length;w--;){var T=D[w];if(T.marker){this.session.removeMarker(T.marker);var A=C.indexOf(T);A!=-1&&C.splice(A,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var C=D.command,w=D.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?T=w.forEachSelection(C,D.args):C.multiSelectAction=="forEachLine"?T=w.forEachSelection(C,D.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),T=C.exec(w,D.args||{})):T=C.multiSelectAction(w,D.args||{});else{var T=C.exec(w,D.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return T}},this.forEachSelection=function(D,C,w){if(!this.inVirtualSelectionMode){var T=w&&w.keepOrder,A=w==!0||w&&w.$byLines,$=this.session,I=this.selection,N=I.rangeList,L=(T?I:N).ranges,F;if(!L.length)return D.exec?D.exec(this,C||{}):D(this,C||{});var P=I._eventRegistry;I._eventRegistry={};var _=new a($);this.inVirtualSelectionMode=!0;for(var M=L.length;M--;){if(A)for(;M>0&&L[M].start.row==L[M-1].end.row;)M--;_.fromOrientedRange(L[M]),_.index=M,this.selection=$.selection=_;var B=D.exec?D.exec(this,C||{}):D(this,C||{});!F&&B!==void 0&&(F=B),_.toOrientedRange(L[M])}_.detach(),this.selection=$.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=P,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),F}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],T=0;T0);I<0&&(I=0),N>=F&&(N=F-1)}var _=this.session.removeFullLines(I,N);_=this.$reAlignText(_,L),this.session.insert({row:I,column:0},_.join(` +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(r,n,i){var s=r("../lib/dom"),o=r("../lib/oop"),l=r("../lib/event_emitter").EventEmitter,a=function(){function c(u,h){this.canvas=s.createElement("canvas"),this.renderer=h,this.pixelRatio=1,this.maxHeight=h.layerConfig.maxHeight,this.lineHeight=h.layerConfig.lineHeight,this.canvasHeight=u.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=u.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},u.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(u){var h=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(u){this.maxHeight=u.maxHeight,this.lineHeight=u.lineHeight,this.canvasHeight=u.height;var d=(u.lastRow+1)*this.lineHeight;dL.priority?1:0}var g=this.renderer.session.$annotations;if(f.clearRect(0,0,this.canvas.width,this.canvas.height),g){var y={info:1,warning:2,error:3};g.forEach(function(N){N.priority=y[N.type]||null}),g=g.sort(p);for(var b=this.renderer.session.$foldData,v=0;vthis.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),w=Math.round($-this.halfMinDecorationHeight),T=Math.round($+this.halfMinDecorationHeight)}f.fillStyle=h[g[v].type]||null,f.fillRect(0,C,this.canvasWidth,T-w)}}var I=this.renderer.session.selection.getCursor();if(I){var D=this.compensateFoldRows(I.row,b),C=Math.round((I.row-D)*this.lineHeight*this.heightRatio);f.fillStyle="rgba(0, 0, 0, 0.5)",f.fillRect(0,C,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(u,h){var d=0;if(h&&h.length>0)for(var f=0;fh[f].start.row&&u=h[f].end.row&&(d+=h[f].end.row-h[f].start.row);return d},c}();o.implement(a.prototype,l),n.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(r,n,i){var s=r("./lib/oop"),o=r("./lib/dom"),l=r("./lib/lang"),a=r("./config"),c=r("./layer/gutter").Gutter,u=r("./layer/marker").Marker,h=r("./layer/text").Text,d=r("./layer/cursor").Cursor,f=r("./scrollbar").HScrollBar,p=r("./scrollbar").VScrollBar,g=r("./scrollbar_custom").HScrollBar,y=r("./scrollbar_custom").VScrollBar,b=r("./renderloop").RenderLoop,v=r("./layer/font_metrics").FontMetrics,E=r("./lib/event_emitter").EventEmitter,D=r("./css/editor-css"),C=r("./layer/decorators").Decorator,w=r("./lib/useragent");o.importCssString(D,"ace_editor.css",!1);var T=function(){function A($,I){var N=this;this.container=$||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(I),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var L=this.$textLayer=new h(this.content);this.canvas=L.element,this.$markerFront=new u(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.on("scroll",function(F){N.$scrollAnimation||N.session.setScrollTop(F.data-N.scrollMargin.top)}),this.scrollBarH.on("scroll",function(F){N.$scrollAnimation||N.session.setScrollLeft(F.data-N.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(F){N.updateCharacterSize(),N.onResize(!0,N.gutterWidth,N.$size.width,N.$size.height),N._signal("changeCharacterSize",F)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function($){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=$,$&&this.scrollMargin.top&&$.getScrollTop()<=0&&$.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession($),this.$markerBack.setSession($),this.$markerFront.setSession($),this.$gutterLayer.setSession($),this.$textLayer.setSession($),$&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function($,I,N){if(I===void 0&&(I=1/0),this.$changedLines?(this.$changedLines.firstRow>$&&(this.$changedLines.firstRow=$),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function($){$?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function($,I,N,L){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=$?1:0;var F=this.container;L||(L=F.clientHeight||F.scrollHeight),!L&&this.$maxLines&&this.lineHeight>1&&(!F.style.height||F.style.height=="0px")&&(F.style.height="1px",L=F.clientHeight||F.scrollHeight),N||(N=F.clientWidth||F.scrollWidth);var P=this.$updateCachedSize($,I,N,L);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!N&&!L)return this.resizing=0;$&&(this.$gutterLayer.$padding=null),$?this.$renderChanges(P|this.$changes,!0):this.$loop.schedule(P|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function($,I,N,L){L-=this.$extraHeight||0;var F=0,P=this.$size,_={width:P.width,height:P.height,scrollerHeight:P.scrollerHeight,scrollerWidth:P.scrollerWidth};if(L&&($||P.height!=L)&&(P.height=L,F|=this.CHANGE_SIZE,P.scrollerHeight=P.height,this.$horizScroll&&(P.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(P.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",F=F|this.CHANGE_SCROLL),N&&($||P.width!=N)){F|=this.CHANGE_SIZE,P.width=N,I==null&&(I=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=I,o.setStyle(this.scrollBarH.element.style,"left",I+"px"),o.setStyle(this.scroller.style,"left",I+this.margin.left+"px"),P.scrollerWidth=Math.max(0,N-I-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var M=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",M),o.setStyle(this.scroller.style,"right",M),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(P.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||$)&&(F|=this.CHANGE_FULL)}return P.$dirty=!N||!L,F&&this._signal("resize",_),F},A.prototype.onGutterResize=function($){var I=this.$showGutter?$:0;I!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,I,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var $=this.$size.scrollerWidth-this.$padding*2,I=Math.floor($/this.characterWidth);return this.session.adjustWrapLimit(I,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function($){this.setOption("animatedScroll",$)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function($){this.setOption("showInvisibles",$),this.session.$bidiHandler.setShowInvisibles($)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function($){this.setOption("displayIndentGuides",$)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function($){this.setOption("highlightIndentGuides",$)},A.prototype.setShowPrintMargin=function($){this.setOption("showPrintMargin",$)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function($){this.setOption("printMarginColumn",$)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function($){return this.setOption("showGutter",$)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function($){this.setOption("fadeFoldWidgets",$)},A.prototype.setHighlightGutterLine=function($){this.setOption("highlightGutterLine",$)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var $=o.createElement("div");$.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",$.appendChild(this.$printMarginEl),this.content.insertBefore($,this.content.firstChild)}var I=this.$printMarginEl.style;I.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",I.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var $=this.textarea.style,I=this.$composition;if(!this.$keepTextAreaAtCursor&&!I){o.translate(this.textarea,-100,0);return}var N=this.$cursorLayer.$pixelPos;if(N){I&&I.markerRange&&(N=this.$cursorLayer.getPixelPosition(I.markerRange.start,!0));var L=this.layerConfig,F=N.top,P=N.left;F-=L.offset;var _=I&&I.useTextareaForIME||w.isMobile?this.lineHeight:1;if(F<0||F>L.height-_){o.translate(this.textarea,0,0);return}var M=1,j=this.$size.height-_;if(!I)F+=this.lineHeight;else if(I.useTextareaForIME){var R=this.textarea.value;M=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else F+=this.lineHeight+2;P-=this.scrollLeft,P>this.$size.scrollerWidth-M&&(P=this.$size.scrollerWidth-M),P+=this.gutterWidth+this.margin.left,o.setStyle($,"height",_+"px"),o.setStyle($,"width",M+"px"),o.translate(this.textarea,Math.min(P,this.$size.scrollerWidth-M),Math.min(F,j))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var $=this.layerConfig,I=$.lastRow,N=this.session.documentToScreenRow(I,0)*$.lineHeight;return N-this.session.getScrollTop()>$.height-$.lineHeight?I-1:I},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function($){this.$padding=$,this.$textLayer.setPadding($),this.$cursorLayer.setPadding($),this.$markerFront.setPadding($),this.$markerBack.setPadding($),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function($,I,N,L){var F=this.scrollMargin;F.top=$|0,F.bottom=I|0,F.right=L|0,F.left=N|0,F.v=F.top+F.bottom,F.h=F.left+F.right,F.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-F.top),this.updateFull()},A.prototype.setMargin=function($,I,N,L){var F=this.margin;F.top=$|0,F.bottom=I|0,F.right=L|0,F.left=N|0,F.v=F.top+F.bottom,F.h=F.left+F.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function($){this.setOption("hScrollBarAlwaysVisible",$)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function($){this.setOption("vScrollBarAlwaysVisible",$)},A.prototype.$updateScrollBarV=function(){var $=this.layerConfig.maxHeight,I=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&($-=(I-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>$-I&&($=this.scrollTop+I,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight($+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function($,I){if(this.$changes&&($|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!$&&!I){this.$changes|=$;return}if(this.$size.$dirty)return this.$changes|=$,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",$),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var N=this.layerConfig;if($&this.CHANGE_FULL||$&this.CHANGE_SIZE||$&this.CHANGE_TEXT||$&this.CHANGE_LINES||$&this.CHANGE_SCROLL||$&this.CHANGE_H_SCROLL){if($|=this.$computeLayerConfig()|this.$loop.clear(),N.firstRow!=this.layerConfig.firstRow&&N.firstRowScreen==this.layerConfig.firstRowScreen){var L=this.scrollTop+(N.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;L>0&&(this.scrollTop=L,$=$|this.CHANGE_SCROLL,$|=this.$computeLayerConfig()|this.$loop.clear())}N=this.layerConfig,this.$updateScrollBarV(),$&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-N.offset);var F=N.width+2*this.$padding+"px",P=N.minHeight+"px";o.setStyle(this.content.style,"width",F),o.setStyle(this.content.style,"height",P)}if($&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-N.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),$&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}if($&this.CHANGE_SCROLL){this.$changedLines=null,$&this.CHANGE_TEXT||$&this.CHANGE_LINES?this.$textLayer.update(N):this.$textLayer.scrollLines(N),this.$showGutter&&($&this.CHANGE_GUTTER||$&this.CHANGE_LINES?this.$gutterLayer.update(N):this.$gutterLayer.scrollLines(N)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N),this.$markerBack.update(N),this.$markerFront.update(N),this.$cursorLayer.update(N),this.$moveTextAreaToCursor(),this._signal("afterRender",$);return}$&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(N),this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_LINES?((this.$updateLines()||$&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_TEXT||$&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)):$&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(N),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(N)),$&this.CHANGE_CURSOR&&(this.$cursorLayer.update(N),this.$moveTextAreaToCursor()),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(N),$&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(N),this._signal("afterRender",$)},A.prototype.$autosize=function(){var $=this.session.getScreenLength()*this.lineHeight,I=this.$maxLines*this.lineHeight,N=Math.min(I,Math.max((this.$minLines||1)*this.lineHeight,$))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(N+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&N>this.$maxPixelHeight&&(N=this.$maxPixelHeight);var L=N<=2*this.lineHeight,F=!L&&$>I;if(N!=this.desiredHeight||this.$size.height!=this.desiredHeight||F!=this.$vScroll){F!=this.$vScroll&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var P=this.container.clientWidth;this.container.style.height=N+"px",this.$updateCachedSize(!0,this.$gutterWidth,P,N),this.desiredHeight=N,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var $=this.session,I=this.$size,N=I.height<=2*this.lineHeight,L=this.session.getScreenLength(),F=L*this.lineHeight,P=this.$getLongestLine(),_=!N&&(this.$hScrollBarAlwaysVisible||I.scrollerWidth-P-2*this.$padding<0),M=this.$horizScroll!==_;M&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var j=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var R=I.scrollerHeight+this.lineHeight,G=!this.$maxLines&&this.$scrollPastEnd?(I.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;F+=G;var q=this.scrollMargin;this.session.setScrollTop(Math.max(-q.top,Math.min(this.scrollTop,F-I.scrollerHeight+q.bottom))),this.session.setScrollLeft(Math.max(-q.left,Math.min(this.scrollLeft,P+2*this.$padding-I.scrollerWidth+q.right)));var ee=!N&&(this.$vScrollBarAlwaysVisible||I.scrollerHeight-F+G<0||this.scrollTop>q.top),Y=j!==ee;Y&&(this.$vScroll=ee,this.scrollBarV.setVisible(ee));var X=this.scrollTop%this.lineHeight,Q=Math.ceil(R/this.lineHeight)-1,te=Math.max(0,Math.round((this.scrollTop-X)/this.lineHeight)),Z=te+Q,de,ke,me=this.lineHeight;te=$.screenToDocumentRow(te,0);var Fe=$.getFoldLine(te);Fe&&(te=Fe.start.row),de=$.documentToScreenRow(te,0),ke=$.getRowLength(te)*me,Z=Math.min($.screenToDocumentRow(Z,0),$.getLength()-1),R=I.scrollerHeight+$.getRowLength(Z)*me+ke,X=this.scrollTop-de*me;var je=0;return(this.layerConfig.width!=P||M)&&(je=this.CHANGE_H_SCROLL),(M||Y)&&(je|=this.$updateCachedSize(!0,this.gutterWidth,I.width,I.height),this._signal("scrollbarVisibilityChanged"),Y&&(P=this.$getLongestLine())),this.layerConfig={width:P,padding:this.$padding,firstRow:te,firstRowScreen:de,lastRow:Z,lineHeight:me,characterWidth:this.characterWidth,minHeight:R,maxHeight:F,offset:X,gutterOffset:me?Math.max(0,Math.ceil((X+I.height-I.scrollerHeight)/me)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(P-this.$padding),je},A.prototype.$updateLines=function(){if(this.$changedLines){var $=this.$changedLines.firstRow,I=this.$changedLines.lastRow;this.$changedLines=null;var N=this.layerConfig;if(!($>N.lastRow+1)&&!(Ithis.$textLayer.MAX_LINE_LENGTH&&($=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round($*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function($,I){this.$gutterLayer.addGutterDecoration($,I)},A.prototype.removeGutterDecoration=function($,I){this.$gutterLayer.removeGutterDecoration($,I)},A.prototype.updateBreakpoints=function($){this._rows=$,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function($){this.$gutterLayer.setAnnotations($),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function($,I,N){this.scrollCursorIntoView($,N),this.scrollCursorIntoView(I,N)},A.prototype.scrollCursorIntoView=function($,I,N){if(this.$size.scrollerHeight!==0){var L=this.$cursorLayer.getPixelPosition($),F=L.left,P=L.top,_=N&&N.top||0,M=N&&N.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var j=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;j+_>P?(I&&j+_>P+this.lineHeight&&(P-=I*this.$size.scrollerHeight),P===0&&(P=-this.scrollMargin.top),this.session.setScrollTop(P)):j+this.$size.scrollerHeight-M=1-this.scrollMargin.top||I>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||$<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||$>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function($,I){var N;if(this.$hasCssTransforms){N={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,I]);$=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else N=this.scroller.getBoundingClientRect();var F=$+this.scrollLeft-N.left-this.$padding,P=F/this.characterWidth,_=Math.floor((I+this.scrollTop-N.top)/this.lineHeight),M=this.$blockCursor?Math.floor(P):Math.round(P);return{row:_,column:M,side:P-M>0?1:-1,offsetX:F}},A.prototype.screenToTextCoordinates=function($,I){var N;if(this.$hasCssTransforms){N={top:0,left:0};var L=this.$fontMetrics.transformCoordinates([$,I]);$=L[1]-this.gutterWidth-this.margin.left,I=L[0]}else N=this.scroller.getBoundingClientRect();var F=$+this.scrollLeft-N.left-this.$padding,P=F/this.characterWidth,_=this.$blockCursor?Math.floor(P):Math.round(P),M=Math.floor((I+this.scrollTop-N.top)/this.lineHeight);return this.session.screenToDocumentPosition(M,Math.max(_,0),F)},A.prototype.textToScreenCoordinates=function($,I){var N=this.scroller.getBoundingClientRect(),L=this.session.documentToScreenPosition($,I),F=this.$padding+(this.session.$bidiHandler.isBidiRow(L.row,$)?this.session.$bidiHandler.getPosLeft(L.column):Math.round(L.column*this.characterWidth)),P=L.row*this.lineHeight;return{pageX:N.left+F-this.scrollLeft,pageY:N.top+P-this.scrollTop}},A.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function($){this.$composition=$,$.cssText||($.cssText=this.textarea.style.cssText),$.useTextareaForIME==null&&($.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):$.markerId=this.session.addMarker($.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function($){var I=this.session.selection.cursor;this.addToken($,"composition_placeholder",I.row,I.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var $=this.session.selection.cursor;this.removeExtraToken($.row,$.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function($,I){var N=this.session.selection.cursor,L=I||{row:N.row,column:N.column};this.removeGhostText();var F=this.$calculateWrappedTextChunks($,L);if(this.addToken(F[0].text,"ghost_text",L.row,L.column),this.$ghostText={text:$,position:{row:L.row,column:L.column}},F.length>1){var P=F.slice(1).map(function(q){return"").concat(q.text,"")});this.$ghostTextWidget={html:P.join(""),row:L.row,column:L.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var _=this.$cursorLayer.getPixelPosition(L,!0),M=this.container,j=M.getBoundingClientRect().height,R=F.length*this.lineHeight,G=R0){var R=0;j.push(F[_].length);for(var G=0;G1||Math.abs($.$size.height-L)>1?$.$resizeTimer.delay():$.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,s.implement(T.prototype,E),a.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!w.isMobile&&!w.isIE}}),n.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/net"),l=r("../lib/event_emitter").EventEmitter,a=r("../config");function c(f){var p="importScripts('"+o.qualifyURL(f)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new g;return y.append(p),y.getBlob("application/javascript")}}function u(f){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=c(f),g=window.URL||window.webkitURL,y=g.createObjectURL(p);return new Worker(y)}return new Worker(f)}var h=function(f){f.postMessage||(f=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=f,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){s.implement(this,l),this.$createWorkerFromOldConfig=function(f,p,g,y,b){if(r.nameToUrl&&!r.toUrl&&(r.toUrl=r.nameToUrl),a.get("packaged")||!r.toUrl)y=y||a.moduleUrl(p,"worker");else{var v=this.$normalizePath;y=y||v(r.toUrl("ace/worker/worker.js",null,"_"));var E={};f.forEach(function(D){E[D]=v(r.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=u(y),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:p,classname:g}),this.$worker},this.onMessage=function(f){var p=f.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(f){window.console&&console.error&&console.error(f)},this.$normalizePath=function(f){return o.qualifyURL(f)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(f){f.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(f,p){this.$worker.postMessage({command:f,args:p})},this.call=function(f,p,g){if(g){var y=this.callbackId++;this.callbacks[y]=g,p.push(y)}this.send(f,p)},this.emit=function(f,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:f,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(f){this.$doc&&this.terminate(),this.$doc=f,this.call("setValue",[f.getValue()]),f.on("change",this.changeListener,!0)},this.changeListener=function(f){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),f.action=="insert"?this.deltaQueue.push(f.start,f.lines):this.deltaQueue.push(f.start,f.end)},this.$sendDeltaQueue=function(){var f=this.deltaQueue;f&&(this.deltaQueue=null,f.length>50&&f.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:f}))}}).call(h.prototype);var d=function(f,p,g){var y=null,b=!1,v=Object.create(l),E=[],D=new h({messageBuffer:E,terminate:function(){},postMessage:function(w){E.push(w),y&&(b?setTimeout(C):C())}});D.setEmitSync=function(w){b=w};var C=function(){var w=E.shift();w.command?y[w.command].apply(y,w.args):w.event&&v._signal(w.event,w.data)};return v.postMessage=function(w){D.onMessage({data:w})},v.callback=function(w,T){this.postMessage({type:"call",id:T,data:w})},v.emit=function(w,T){this.postMessage({type:"event",name:w,data:T})},a.loadModule(["worker",p],function(w){for(y=new w[g](v);E.length;)C()}),D};n.UIWorkerClient=d,n.WorkerClient=h,n.createWorker=u}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(r,n,i){var s=r("./range").Range,o=r("./lib/event_emitter").EventEmitter,l=r("./lib/oop"),a=function(){function c(u,h,d,f,p,g){var y=this;this.length=h,this.session=u,this.doc=u.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=f,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=d;var b=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var u=this,h=this.doc,d=this.session;this.selectionBefore=d.selection.toJSON(),d.selection.inMultiSelectMode&&d.selection.toSingleRange(),this.pos=h.createAnchor(this.$pos.row,this.$pos.column);var f=this.pos;f.$insertRight=!0,f.detach(),f.markerId=d.addMarker(new s(f.row,f.column,f.row,f.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=h.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),u.others.push(g)}),d.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,h=this;this.othersActive=!0,this.others.forEach(function(d){d.markerId=u.addMarker(new s(d.row,d.column,d.row,d.column+h.length),h.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u=this.pos.column&&h.start.column<=this.pos.column+this.length+1,p=h.start.column-this.pos.column;if(this.updateAnchors(u),f&&(this.length+=d),f&&!this.session.$fromUndo){if(u.action==="insert")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],b={row:y.row,column:y.column+p};this.doc.insertMergedLines(b,u.lines)}else if(u.action==="remove")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],b={row:y.row,column:y.column+p};this.doc.remove(new s(b.row,b.column,b.row,b.column-d))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(u){this.pos.onChange(u);for(var h=this.others.length;h--;)this.others[h].onChange(u);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var u=this,h=this.session,d=function(p,g){h.removeMarker(p.markerId),p.markerId=h.addMarker(new s(p.row,p.column,p.row,p.column+u.length),g,null,!1)};d(this.pos,this.mainClass);for(var f=this.others.length;f--;)d(this.others[f],this.othersClass)}},c.prototype.onCursorChange=function(u){if(!(this.$updating||!this.session)){var h=this.session.selection.getCursor();h.row===this.pos.row&&h.column>=this.pos.column&&h.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),h=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,d=0;d1?o.multiSelect.joinSelections():o.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(o){o.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(o){o.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(o){o.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(o){o.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(o){return o&&o.inMultiSelectMode}}];var s=r("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new s(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(r,n,i){var s=r("./range_list").RangeList,o=r("./range").Range,l=r("./selection").Selection,a=r("./mouse/multi_select_handler").onMouseDown,c=r("./lib/event"),u=r("./lib/lang"),h=r("./commands/multi_select_commands");n.commands=h.defaultCommands.concat(h.multiSelectCommands);var d=r("./search").Search,f=new d;function p(D,C,w){return f.$options.wrap=!0,f.$options.needle=C,f.$options.backwards=w==-1,f.find(D)}var g=r("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(D,C){if(D){if(!this.inMultiSelectMode&&this.rangeCount===0){var w=this.toOrientedRange();if(this.rangeList.add(w),this.rangeList.add(D),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(D);this.rangeList.removeAll(),this.rangeList.add(w),this.$onAddRange(w)}D.cursor||(D.cursor=D.end);var T=this.rangeList.add(D);return this.$onAddRange(D),T.length&&this.$onRemoveRange(T),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(D)}},this.toSingleRange=function(D){D=D||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),D&&this.fromOrientedRange(D)},this.substractPoint=function(D){var C=this.rangeList.substractPoint(D);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var D=this.rangeList.merge();D.length&&this.$onRemoveRange(D)},this.$onAddRange=function(D){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(D),this._signal("addRange",{range:D})},this.$onRemoveRange=function(D){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();D.push(C),this.rangeCount=0}for(var w=D.length;w--;){var T=this.ranges.indexOf(D[w]);this.ranges.splice(T,1)}this._signal("removeRange",{ranges:D}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var D=this.ranges.length?this.ranges:[this.getRange()],C=[],w=0;w1){var D=this.rangeList.ranges,C=D[D.length-1],w=o.fromPoints(D[0].start,C.end);this.toSingleRange(),this.setSelectionRange(w,C.cursor==C.start)}else{var T=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(T,A);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(D,C,w){var T=[],A=D.column0;)G--;if(G>0)for(var q=0;T[q].isEmpty();)q++;for(var ee=G;ee>=q;ee--)T[ee].isEmpty()&&T.splice(ee,1)}return T}}).call(l.prototype);var y=r("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(D){D.cursor||(D.cursor=D.end);var C=this.getSelectionStyle();return D.marker=this.session.addMarker(D,"ace_selection",C),this.session.$selectionMarkers.push(D),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,D},this.removeSelectionMarker=function(D){if(D.marker){this.session.removeMarker(D.marker);var C=this.session.$selectionMarkers.indexOf(D);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(D){for(var C=this.session.$selectionMarkers,w=D.length;w--;){var T=D[w];if(T.marker){this.session.removeMarker(T.marker);var A=C.indexOf(T);A!=-1&&C.splice(A,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(D){this.addSelectionMarker(D.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(D){this.removeSelectionMarkers(D.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(D){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(D){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(D){var C=D.command,w=D.editor;if(w.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?T=w.forEachSelection(C,D.args):C.multiSelectAction=="forEachLine"?T=w.forEachSelection(C,D.args,!0):C.multiSelectAction=="single"?(w.exitMultiSelectMode(),T=C.exec(w,D.args||{})):T=C.multiSelectAction(w,D.args||{});else{var T=C.exec(w,D.args||{});w.multiSelect.addRange(w.multiSelect.toOrientedRange()),w.multiSelect.mergeOverlappingRanges()}return T}},this.forEachSelection=function(D,C,w){if(!this.inVirtualSelectionMode){var T=w&&w.keepOrder,A=w==!0||w&&w.$byLines,$=this.session,I=this.selection,N=I.rangeList,L=(T?I:N).ranges,F;if(!L.length)return D.exec?D.exec(this,C||{}):D(this,C||{});var P=I._eventRegistry;I._eventRegistry={};var _=new l($);this.inVirtualSelectionMode=!0;for(var M=L.length;M--;){if(A)for(;M>0&&L[M].start.row==L[M-1].end.row;)M--;_.fromOrientedRange(L[M]),_.index=M,this.selection=$.selection=_;var j=D.exec?D.exec(this,C||{}):D(this,C||{});!F&&j!==void 0&&(F=j),_.toOrientedRange(L[M])}_.detach(),this.selection=$.selection=I,this.inVirtualSelectionMode=!1,I._eventRegistry=P,I.mergeOverlappingRanges(),I.ranges[0]&&I.fromOrientedRange(I.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),F}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var D="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,w=[],T=0;T0);I<0&&(I=0),N>=F&&(N=F-1)}var _=this.session.removeFullLines(I,N);_=this.$reAlignText(_,L),this.session.insert({row:I,column:0},_.join(` `)+` -`),L||($.start.column=0,$.end.column=_[_.length-1].length),this.selection.setRange($)}else{A.forEach(function(G){C.substractPoint(G.cursor)});var M=0,B=1/0,R=w.map(function(G){var q=G.cursor,ee=D.getLine(q.row),Y=ee.substr(q.column).search(/\S/g);return Y==-1&&(Y=0),q.column>M&&(M=q.column),YX?D.insert(ee,u.stringRepeat(" ",Y-X)):D.remove(new o(ee.row,ee.column,ee.row,ee.column-Y+X)),G.start.column=G.end.column=M,G.start.row=G.end.row=ee.row,G.cursor=G.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,C){var w=!0,T=!0,A,$,I;return D.map(function(_){var M=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?A==null?(A=M[1].length,$=M[2].length,I=M[3].length,M):(A+$+I!=M[1].length+M[2].length+M[3].length&&(T=!1),A!=M[1].length&&(w=!1),A>M[1].length&&(A=M[1].length),$M[3].length&&(I=M[3].length),M):[_]}).map(C?L:w?T?F:L:P);function N(_){return u.stringRepeat(" ",_)}function L(_){return _[2]?N(A)+_[2]+N($-_[2].length+I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function F(_){return _[2]?N(A+$-_[2].length)+_[2]+N(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function P(_){return _[2]?N(A)+_[2]+N(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(y.prototype);function b(D,C){return D.row==C.row&&D.column==C.column}n.onSessionChange=function(D){var C=D.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=D.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=n.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",l),D.commands.addCommands(h.defaultCommands),E(D))}function E(D){if(!D.textInput)return;var C=D.textInput.getElement(),w=!1;c.addListener(C,"keydown",function(A){var $=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);D.$blockSelectEnabled&&$?w||(D.renderer.setMouseCursor("crosshair"),w=!0):w&&T()},D),c.addListener(C,"keyup",T,D),c.addListener(C,"blur",T,D);function T(A){w&&(D.renderer.setMouseCursor(""),w=!1)}}n.MultiSelect=v,r("./config").defineOptions(y.prototype,"editor",{enableMultiselect:{set:function(D){v(this),D?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(r,n,i){var s=r("../../range").Range,o=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,l,c){var u=a.getLine(c);return this.foldingStartMarker.test(u)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(u)?"end":""},this.getFoldWidgetRange=function(a,l,c){return null},this.indentationBlock=function(a,l,c){var u=/\S/,h=a.getLine(l),d=h.search(u);if(d!=-1){for(var f=c||h.length,p=a.getLength(),g=l,y=l;++lg){var E=a.getLine(y).length;return new s(g,f,y,E)}}},this.openingBracketBlock=function(a,l,c,u,h){var d={row:c,column:u+1},f=a.$findClosingBracket(l,d,h);if(f){var p=a.foldWidgets[f.row];return p==null&&(p=a.getFoldWidget(f.row)),p=="start"&&f.row>d.row&&(f.row--,f.column=a.getLine(f.row).length),s.fromPoints(d,f)}},this.closingBracketBlock=function(a,l,c,u,h){var d={row:c,column:u},f=a.$findOpeningBracket(l,d);if(f)return f.column++,d.column--,s.fromPoints(f,d)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(r,n,i){var s=r("../line_widgets").LineWidgets,o=r("../lib/dom"),a=r("../range").Range,l=r("../config").nls;function c(h,d,f){for(var p=0,g=h.length-1;p<=g;){var y=p+g>>1,b=f(d,h[y]);if(b>0)p=y+1;else if(b<0)g=y-1;else return y}return-(p+1)}function u(h,d,f){var p=h.getAnnotations().sort(a.comparePoints);if(p.length){var g=c(p,{row:d,column:-1},a.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var y=p[g];if(!(!y||!f)){if(y.row===d){do y=p[g+=f];while(y&&y.row===d);if(!y)return p.slice()}var b=[];d=y.row;do b[f<0?"unshift":"push"](y),y=p[g+=f];while(y&&y.row==d);return b.length&&b}}}n.showErrorMarker=function(h,d){var f=h.session;f.widgetManager||(f.widgetManager=new s(f),f.widgetManager.attach(h));var p=h.getCursorPosition(),g=p.row,y=f.widgetManager.getWidgetsAtRow(g).filter(function($){return $.type=="errorMarker"})[0];y?y.destroy():g-=d;var b=u(f,g,d),v;if(b){var E=b[0];p.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,p.row=E.row,v=h.renderer.$gutterLayer.$annotations[p.row]}else{if(y)return;v={text:[l("error-marker.good-state","Looks good!")],className:"ace_ok"}}h.session.unfold(p.row),h.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},C=D.el.appendChild(o.createElement("div")),w=D.el.appendChild(o.createElement("div"));w.className="error_widget_arrow "+v.className;var T=h.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=T+h.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",C.className="error_widget "+v.className,C.innerHTML=v.text.join("
"),C.appendChild(o.createElement("div"));var A=function($,I,N){if(I===0&&(N==="esc"||N==="return"))return D.destroy(),{command:"null"}};D.destroy=function(){h.$mouseHandler.isMousePressed||(h.keyBinding.removeKeyboardHandler(A),f.widgetManager.removeLineWidget(D),h.off("changeSelection",D.destroy),h.off("changeSession",D.destroy),h.off("mouseup",D.destroy),h.off("change",D.destroy))},h.keyBinding.addKeyboardHandler(A),h.on("changeSelection",D.destroy),h.on("changeSession",D.destroy),h.on("mouseup",D.destroy),h.on("change",D.destroy),h.session.widgetManager.addLineWidget(D),D.el.onmousedown=h.focus.bind(h),h.renderer.scrollCursorIntoView(null,.5,{bottom:D.el.offsetHeight})},o.importCssString(` +`),L||($.start.column=0,$.end.column=_[_.length-1].length),this.selection.setRange($)}else{A.forEach(function(G){C.substractPoint(G.cursor)});var M=0,j=1/0,R=w.map(function(G){var q=G.cursor,ee=D.getLine(q.row),Y=ee.substr(q.column).search(/\S/g);return Y==-1&&(Y=0),q.column>M&&(M=q.column),YX?D.insert(ee,u.stringRepeat(" ",Y-X)):D.remove(new o(ee.row,ee.column,ee.row,ee.column-Y+X)),G.start.column=G.end.column=M,G.start.row=G.end.row=ee.row,G.cursor=G.end}),C.fromOrientedRange(w[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(D,C){var w=!0,T=!0,A,$,I;return D.map(function(_){var M=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return M?A==null?(A=M[1].length,$=M[2].length,I=M[3].length,M):(A+$+I!=M[1].length+M[2].length+M[3].length&&(T=!1),A!=M[1].length&&(w=!1),A>M[1].length&&(A=M[1].length),$M[3].length&&(I=M[3].length),M):[_]}).map(C?L:w?T?F:L:P);function N(_){return u.stringRepeat(" ",_)}function L(_){return _[2]?N(A)+_[2]+N($-_[2].length+I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function F(_){return _[2]?N(A+$-_[2].length)+_[2]+N(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function P(_){return _[2]?N(A)+_[2]+N(I)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(y.prototype);function b(D,C){return D.row==C.row&&D.column==C.column}n.onSessionChange=function(D){var C=D.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var w=D.oldSession;w&&(w.multiSelect.off("addRange",this.$onAddRange),w.multiSelect.off("removeRange",this.$onRemoveRange),w.multiSelect.off("multiSelect",this.$onMultiSelect),w.multiSelect.off("singleSelect",this.$onSingleSelect),w.multiSelect.lead.off("change",this.$checkMultiselectChange),w.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function v(D){D.$multiselectOnSessionChange||(D.$onAddRange=D.$onAddRange.bind(D),D.$onRemoveRange=D.$onRemoveRange.bind(D),D.$onMultiSelect=D.$onMultiSelect.bind(D),D.$onSingleSelect=D.$onSingleSelect.bind(D),D.$multiselectOnSessionChange=n.onSessionChange.bind(D),D.$checkMultiselectChange=D.$checkMultiselectChange.bind(D),D.$multiselectOnSessionChange(D),D.on("changeSession",D.$multiselectOnSessionChange),D.on("mousedown",a),D.commands.addCommands(h.defaultCommands),E(D))}function E(D){if(!D.textInput)return;var C=D.textInput.getElement(),w=!1;c.addListener(C,"keydown",function(A){var $=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);D.$blockSelectEnabled&&$?w||(D.renderer.setMouseCursor("crosshair"),w=!0):w&&T()},D),c.addListener(C,"keyup",T,D),c.addListener(C,"blur",T,D);function T(A){w&&(D.renderer.setMouseCursor(""),w=!1)}}n.MultiSelect=v,r("./config").defineOptions(y.prototype,"editor",{enableMultiselect:{set:function(D){v(this),D?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(D){this.$blockSelectEnabled=D},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(r,n,i){var s=r("../../range").Range,o=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(l,a,c){var u=l.getLine(c);return this.foldingStartMarker.test(u)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(u)?"end":""},this.getFoldWidgetRange=function(l,a,c){return null},this.indentationBlock=function(l,a,c){var u=/\S/,h=l.getLine(a),d=h.search(u);if(d!=-1){for(var f=c||h.length,p=l.getLength(),g=a,y=a;++ag){var E=l.getLine(y).length;return new s(g,f,y,E)}}},this.openingBracketBlock=function(l,a,c,u,h){var d={row:c,column:u+1},f=l.$findClosingBracket(a,d,h);if(f){var p=l.foldWidgets[f.row];return p==null&&(p=l.getFoldWidget(f.row)),p=="start"&&f.row>d.row&&(f.row--,f.column=l.getLine(f.row).length),s.fromPoints(d,f)}},this.closingBracketBlock=function(l,a,c,u,h){var d={row:c,column:u},f=l.$findOpeningBracket(a,d);if(f)return f.column++,d.column--,s.fromPoints(f,d)}}).call(o.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(r,n,i){var s=r("../line_widgets").LineWidgets,o=r("../lib/dom"),l=r("../range").Range,a=r("../config").nls;function c(h,d,f){for(var p=0,g=h.length-1;p<=g;){var y=p+g>>1,b=f(d,h[y]);if(b>0)p=y+1;else if(b<0)g=y-1;else return y}return-(p+1)}function u(h,d,f){var p=h.getAnnotations().sort(l.comparePoints);if(p.length){var g=c(p,{row:d,column:-1},l.comparePoints);g<0&&(g=-g-1),g>=p.length?g=f>0?0:p.length-1:g===0&&f<0&&(g=p.length-1);var y=p[g];if(!(!y||!f)){if(y.row===d){do y=p[g+=f];while(y&&y.row===d);if(!y)return p.slice()}var b=[];d=y.row;do b[f<0?"unshift":"push"](y),y=p[g+=f];while(y&&y.row==d);return b.length&&b}}}n.showErrorMarker=function(h,d){var f=h.session;f.widgetManager||(f.widgetManager=new s(f),f.widgetManager.attach(h));var p=h.getCursorPosition(),g=p.row,y=f.widgetManager.getWidgetsAtRow(g).filter(function($){return $.type=="errorMarker"})[0];y?y.destroy():g-=d;var b=u(f,g,d),v;if(b){var E=b[0];p.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,p.row=E.row,v=h.renderer.$gutterLayer.$annotations[p.row]}else{if(y)return;v={text:[a("error-marker.good-state","Looks good!")],className:"ace_ok"}}h.session.unfold(p.row),h.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},C=D.el.appendChild(o.createElement("div")),w=D.el.appendChild(o.createElement("div"));w.className="error_widget_arrow "+v.className;var T=h.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=T+h.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",C.className="error_widget "+v.className,C.innerHTML=v.text.join("
"),C.appendChild(o.createElement("div"));var A=function($,I,N){if(I===0&&(N==="esc"||N==="return"))return D.destroy(),{command:"null"}};D.destroy=function(){h.$mouseHandler.isMousePressed||(h.keyBinding.removeKeyboardHandler(A),f.widgetManager.removeLineWidget(D),h.off("changeSelection",D.destroy),h.off("changeSession",D.destroy),h.off("mouseup",D.destroy),h.off("change",D.destroy))},h.keyBinding.addKeyboardHandler(A),h.on("changeSelection",D.destroy),h.on("changeSession",D.destroy),h.on("mouseup",D.destroy),h.on("change",D.destroy),h.session.widgetManager.addLineWidget(D),D.el.onmousedown=h.focus.bind(h),h.renderer.scrollCursorIntoView(null,.5,{bottom:D.el.offsetHeight})},o.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; @@ -1107,20 +1107,20 @@ Error generating stack: `+s.message+` border-left-color: transparent!important; top: -5px; } -`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(r,n,i){r("./loader_build")(n);var s=r("./lib/dom"),o=r("./range").Range,a=r("./editor").Editor,l=r("./edit_session").EditSession,c=r("./undomanager").UndoManager,u=r("./virtual_renderer").VirtualRenderer;r("./worker/worker_client"),r("./keyboard/hash_handler"),r("./placeholder"),r("./multi_select"),r("./mode/folding/fold_mode"),r("./theme/textmate"),r("./ext/error_marker"),n.config=r("./config"),n.edit=function(h,d){if(typeof h=="string"){var f=h;if(h=document.getElementById(f),!h)throw new Error("ace.edit can't find div #"+f)}if(h&&h.env&&h.env.editor instanceof a)return h.env.editor;var p="";if(h&&/input|textarea/i.test(h.tagName)){var g=h;p=g.value,h=s.createElement("pre"),g.parentNode.replaceChild(h,g)}else h&&(p=h.textContent,h.innerHTML="");var y=n.createEditSession(p),b=new a(new u(h),y,d),v={document:y,editor:b,onResize:b.resize.bind(b,null)};return g&&(v.textarea=g),b.on("destroy",function(){v.editor.container.env=null}),b.container.env=b.env=v,b},n.createEditSession=function(h,d){var f=new l(h,d);return f.setUndoManager(new c),f},n.Range=o,n.Editor=a,n.EditSession=l,n.UndoManager=c,n.VirtualRenderer=u,n.version=n.config.version}),function(){ace.require(["ace/ace"],function(r){r&&(r.config.init(!0),r.define=ace.define);var n=function(){return this}();!n&&typeof window<"u"&&(n=window),!n&&typeof self<"u"&&(n=self),n.ace||(n.ace=r);for(var i in r)r.hasOwnProperty(i)&&(n.ace[i]=r[i]);n.ace.default=n.ace,e&&(e.exports=n.ace)})}()})(Q4);var Zm=Q4.exports;const Joe=uo(Zm);var Vd={},Hk={},e8={exports:{}},Xoe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Yoe=Xoe,Zoe=Yoe;function t8(){}function r8(){}r8.resetWarningCache=t8;var Qoe=function(){function e(n,i,s,o,a,l){if(l!==Zoe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r8,resetWarningCache:t8};return r.PropTypes=r,r};e8.exports=Qoe();var Uk=e8.exports,M0={exports:{}};M0.exports;(function(e,t){var r={},n=200,i="__lodash_hash_undefined__",s=1,o=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",y="[object Map]",b="[object Number]",v="[object Null]",E="[object Object]",D="[object Promise]",C="[object Proxy]",w="[object RegExp]",T="[object Set]",A="[object String]",$="[object Symbol]",I="[object Undefined]",N="[object WeakMap]",L="[object ArrayBuffer]",F="[object DataView]",P="[object Float32Array]",_="[object Float64Array]",M="[object Int8Array]",B="[object Int16Array]",R="[object Int32Array]",G="[object Uint8Array]",q="[object Uint8ClampedArray]",ee="[object Uint16Array]",Y="[object Uint32Array]",X=/[\\^$.*+?()[\]{}|]/g,Q=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,Z={};Z[P]=Z[_]=Z[M]=Z[B]=Z[R]=Z[G]=Z[q]=Z[ee]=Z[Y]=!0,Z[l]=Z[c]=Z[L]=Z[h]=Z[F]=Z[d]=Z[f]=Z[p]=Z[y]=Z[b]=Z[E]=Z[w]=Z[T]=Z[A]=Z[N]=!1;var de=typeof r=="object"&&r&&r.Object===Object&&r,ke=typeof self=="object"&&self&&self.Object===Object&&self,me=de||ke||Function("return this")(),Fe=t&&!t.nodeType&&t,ze=Fe&&!0&&e&&!e.nodeType&&e,Xe=ze&&ze.exports===Fe,$t=Xe&&de.process,Pt=function(){try{return $t&&$t.binding&&$t.binding("util")}catch{}}(),V=Pt&&Pt.isTypedArray;function Ee(ie,ve){for(var Me=-1,lt=ie==null?0:ie.length,Cr=0,Lt=[];++Me-1}function it(ie,ve){var Me=this.__data__,lt=fl(Me,ie);return lt<0?(++this.size,Me.push([ie,ve])):Me[lt][1]=ve,this}Ur.prototype.clear=ei,Ur.prototype.delete=rt,Ur.prototype.get=fe,Ur.prototype.has=Le,Ur.prototype.set=it;function Qe(ie){var ve=-1,Me=ie==null?0:ie.length;for(this.clear();++vern))return!1;var Hr=Lt.get(ie);if(Hr&&Lt.get(ve))return Hr==ve;var tr=-1,gn=!0,xn=Me&o?new jr:void 0;for(Lt.set(ie,ve),Lt.set(ve,ie);++tr-1&&ie%1==0&&ie-1&&ie%1==0&&ie<=a}function Ch(ie){var ve=typeof ie;return ie!=null&&(ve=="object"||ve=="function")}function Wo(ie){return ie!=null&&typeof ie=="object"}var zs=V?ge(V):Sh;function ht(ie){return Jf(ie)?bh(ie):wa(ie)}function Yf(){return[]}function Th(){return!1}e.exports=Xf})(M0,M0.exports);var n8=M0.exports,_o={};Object.defineProperty(_o,"__esModule",{value:!0});_o.getAceInstance=_o.debounce=_o.editorEvents=_o.editorOptions=void 0;var eae=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];_o.editorOptions=eae;var tae=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];_o.editorEvents=tae;var rae=function(){var e;return typeof window>"u"?e=Zm:window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=Zm,e};_o.getAceInstance=rae;var nae=function(e,t){var r=null;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}};_o.debounce=nae;var iae=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),MC=Dr&&Dr.__assign||function(){return MC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&this.handleMarkers(T);var N=this.editor.$options;qh.editorOptions.forEach(function(L){N.hasOwnProperty(L)?r.editor.setOption(L,r.props[L]):r.props[L]&&console.warn("ReactAce: editor option ".concat(L," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(C)&&C.forEach(function(L){typeof L.exec=="string"?r.editor.commands.bindKey(L.bindKey,L.exec):r.editor.commands.addCommand(L)}),E&&this.editor.setKeyboardHandler("ace/keyboard/"+E),i&&(this.refEditor.className+=" "+i),D&&D(this.editor),this.editor.resize(),l&&this.editor.focus()},t.prototype.componentDidUpdate=function(r){for(var n=r,i=this.props,s=0;s 0!";if(h!=this.$splits){if(h>this.$splits){for(;this.$splitsh;)d=this.$editors[this.$splits-1],this.$container.removeChild(d.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(h){return this.$editors[h]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(h){this.$editors.forEach(function(d){d.setTheme(h)})},this.setKeyboardHandler=function(h){this.$editors.forEach(function(d){d.setKeyboardHandler(h)})},this.forEach=function(h,d){this.$editors.forEach(h,d)},this.$fontSize="",this.setFontSize=function(h){this.$fontSize=h,this.forEach(function(d){d.setFontSize(h)})},this.$cloneSession=function(h){var d=new c(h.getDocument(),h.getMode()),f=h.getUndoManager();return d.setUndoManager(f),d.setTabSize(h.getTabSize()),d.setUseSoftTabs(h.getUseSoftTabs()),d.setOverwrite(h.getOverwrite()),d.setBreakpoints(h.getBreakpoints()),d.setUseWrapMode(h.getUseWrapMode()),d.setUseWorker(h.getUseWorker()),d.setWrapLimitRange(h.$wrapLimitRange.min,h.$wrapLimitRange.max),d.$foldData=h.$cloneFoldData(),d},this.setSession=function(h,d){var f;d==null?f=this.$cEditor:f=this.$editors[d];var p=this.$editors.some(function(g){return g.session===h});return p&&(h=this.$cloneSession(h)),f.setSession(h),h},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(h){this.$orientation!=h&&(this.$orientation=h,this.resize())},this.resize=function(){var h=this.$container.clientWidth,d=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=h/this.$splits,g=0;g-1}function Oae(e,t){var r=this.__data__,n=a1(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}xf.prototype.clear=Iae;xf.prototype.delete=Nae;xf.prototype.get=Mae;xf.prototype.has=Lae;xf.prototype.set=Oae;function eh(e){var t=-1,r=e?e.length:0;for(this.clear();++t0&&r.handleMarkers(R,L);for(var P=0;P"u"&&(this.Diff_Timeout<=0?l=Number.MAX_VALUE:l=new Date().getTime()+this.Diff_Timeout*1e3);var c=l;if(s==null||o==null)throw new Error("Null input. (diff_main)");if(s==o)return s?[new t.Diff(i,s)]:[];typeof a>"u"&&(a=!0);var u=a,h=this.diff_commonPrefix(s,o),d=s.substring(0,h);s=s.substring(h),o=o.substring(h),h=this.diff_commonSuffix(s,o);var f=s.substring(s.length-h);s=s.substring(0,s.length-h),o=o.substring(0,o.length-h);var p=this.diff_compute_(s,o,u,c);return d&&p.unshift(new t.Diff(i,d)),f&&p.push(new t.Diff(i,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(s,o,a,l){var c;if(!s)return[new t.Diff(n,o)];if(!o)return[new t.Diff(r,s)];var u=s.length>o.length?s:o,h=s.length>o.length?o:s,d=u.indexOf(h);if(d!=-1)return c=[new t.Diff(n,u.substring(0,d)),new t.Diff(i,h),new t.Diff(n,u.substring(d+h.length))],s.length>o.length&&(c[0][0]=c[2][0]=r),c;if(h.length==1)return[new t.Diff(r,s),new t.Diff(n,o)];var f=this.diff_halfMatch_(s,o);if(f){var p=f[0],g=f[1],y=f[2],b=f[3],v=f[4],E=this.diff_main(p,y,a,l),D=this.diff_main(g,b,a,l);return E.concat([new t.Diff(i,v)],D)}return a&&s.length>100&&o.length>100?this.diff_lineMode_(s,o,l):this.diff_bisect_(s,o,l)},t.prototype.diff_lineMode_=function(s,o,a){var l=this.diff_linesToChars_(s,o);s=l.chars1,o=l.chars2;var c=l.lineArray,u=this.diff_main(s,o,!1,a);this.diff_charsToLines_(u,c),this.diff_cleanupSemantic(u),u.push(new t.Diff(i,""));for(var h=0,d=0,f=0,p="",g="";h=1&&f>=1){u.splice(h-d-f,d+f),h=h-d-f;for(var y=this.diff_main(p,g,!1,a),b=y.length-1;b>=0;b--)u.splice(h,0,y[b]);h=h+y.length}f=0,d=0,p="",g="";break}h++}return u.pop(),u},t.prototype.diff_bisect_=function(s,o,a){for(var l=s.length,c=o.length,u=Math.ceil((l+c)/2),h=u,d=2*u,f=new Array(d),p=new Array(d),g=0;ga);w++){for(var T=-w+v;T<=w-E;T+=2){var A=h+T,$;T==-w||T!=w&&f[A-1]l)E+=2;else if(I>c)v+=2;else if(b){var N=h+y-T;if(N>=0&&N=L)return this.diff_bisectSplit_(s,o,$,I,a)}}}for(var F=-w+D;F<=w-C;F+=2){var N=h+F,L;F==-w||F!=w&&p[N-1]l)C+=2;else if(P>c)D+=2;else if(!b){var A=h+y-F;if(A>=0&&A=L)return this.diff_bisectSplit_(s,o,$,I,a)}}}}return[new t.Diff(r,s),new t.Diff(n,o)]},t.prototype.diff_bisectSplit_=function(s,o,a,l,c){var u=s.substring(0,a),h=o.substring(0,l),d=s.substring(a),f=o.substring(l),p=this.diff_main(u,h,!1,c),g=this.diff_main(d,f,!1,c);return p.concat(g)},t.prototype.diff_linesToChars_=function(s,o){var a=[],l={};a[0]="";function c(f){for(var p="",g=0,y=-1,b=a.length;yl?s=s.substring(a-l):ao.length?s:o,l=s.length>o.length?o:s;if(a.length<4||l.length*2=E.length?[$,I,N,L,A]:null}var h=u(a,l,Math.ceil(a.length/4)),d=u(a,l,Math.ceil(a.length/2)),f;if(!h&&!d)return null;d?h?f=h[4].length>d[4].length?h:d:f=d:f=h;var p,g,y,b;s.length>o.length?(p=f[0],g=f[1],y=f[2],b=f[3]):(y=f[0],b=f[1],p=f[2],g=f[3]);var v=f[4];return[p,g,y,b,v]},t.prototype.diff_cleanupSemantic=function(s){for(var o=!1,a=[],l=0,c=null,u=0,h=0,d=0,f=0,p=0;u0?a[l-1]:-1,h=0,d=0,f=0,p=0,c=null,o=!0)),u++;for(o&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),u=1;u=v?(b>=g.length/2||b>=y.length/2)&&(s.splice(u,0,new t.Diff(i,y.substring(0,b))),s[u-1][1]=g.substring(0,g.length-b),s[u+1][1]=y.substring(b),u++):(v>=g.length/2||v>=y.length/2)&&(s.splice(u,0,new t.Diff(i,g.substring(0,v))),s[u-1][0]=n,s[u-1][1]=y.substring(0,y.length-v),s[u+1][0]=r,s[u+1][1]=g.substring(v),u++),u++}u++}},t.prototype.diff_cleanupSemanticLossless=function(s){function o(v,E){if(!v||!E)return 6;var D=v.charAt(v.length-1),C=E.charAt(0),w=D.match(t.nonAlphaNumericRegex_),T=C.match(t.nonAlphaNumericRegex_),A=w&&D.match(t.whitespaceRegex_),$=T&&C.match(t.whitespaceRegex_),I=A&&D.match(t.linebreakRegex_),N=$&&C.match(t.linebreakRegex_),L=I&&v.match(t.blanklineEndRegex_),F=N&&E.match(t.blanklineStartRegex_);return L||F?5:I||N?4:w&&!A&&$?3:A||$?2:w||T?1:0}for(var a=1;a=y&&(y=b,f=l,p=c,g=u)}s[a-1][1]!=f&&(f?s[a-1][1]=f:(s.splice(a-1,1),a--),s[a][1]=p,g?s[a+1][1]=g:(s.splice(a+1,1),a--))}a++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(s){for(var o=!1,a=[],l=0,c=null,u=0,h=!1,d=!1,f=!1,p=!1;u0?a[l-1]:-1,f=p=!1),o=!0)),u++;o&&this.diff_cleanupMerge(s)},t.prototype.diff_cleanupMerge=function(s){s.push(new t.Diff(i,""));for(var o=0,a=0,l=0,c="",u="",h;o1?(a!==0&&l!==0&&(h=this.diff_commonPrefix(u,c),h!==0&&(o-a-l>0&&s[o-a-l-1][0]==i?s[o-a-l-1][1]+=u.substring(0,h):(s.splice(0,0,new t.Diff(i,u.substring(0,h))),o++),u=u.substring(h),c=c.substring(h)),h=this.diff_commonSuffix(u,c),h!==0&&(s[o][1]=u.substring(u.length-h)+s[o][1],u=u.substring(0,u.length-h),c=c.substring(0,c.length-h))),o-=a+l,s.splice(o,a+l),c.length&&(s.splice(o,0,new t.Diff(r,c)),o++),u.length&&(s.splice(o,0,new t.Diff(n,u)),o++),o++):o!==0&&s[o-1][0]==i?(s[o-1][1]+=s[o][1],s.splice(o,1)):o++,l=0,a=0,c="",u="";break}s[s.length-1][1]===""&&s.pop();var d=!1;for(o=1;oo));h++)c=a,u=l;return s.length!=h&&s[h][0]===r?u:u+(o-c)},t.prototype.diff_prettyHtml=function(s){for(var o=[],a=/&/g,l=//g,u=/\n/g,h=0;h");switch(d){case n:o[h]=''+p+"";break;case r:o[h]=''+p+"";break;case i:o[h]=""+p+"";break}}return o.join("")},t.prototype.diff_text1=function(s){for(var o=[],a=0;athis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var l=this.match_alphabet_(o),c=this;function u($,I){var N=$/o.length,L=Math.abs(a-I);return c.Match_Distance?N+L/c.Match_Distance:L?1:N}var h=this.Match_Threshold,d=s.indexOf(o,a);d!=-1&&(h=Math.min(u(0,d),h),d=s.lastIndexOf(o,a+o.length),d!=-1&&(h=Math.min(u(0,d),h)));var f=1<=E;w--){var T=l[s.charAt(w-1)];if(v===0?C[w]=(C[w+1]<<1|1)&T:C[w]=(C[w+1]<<1|1)&T|((b[w+1]|b[w])<<1|1)|b[w+1],C[w]&f){var A=u(v,w-1);if(A<=h)if(h=A,d=w-1,d>a)E=Math.max(1,2*a-d);else break}}if(u(v+1,a)>h)break;b=C}return d},t.prototype.match_alphabet_=function(s){for(var o={},a=0;a"u")l=s,c=this.diff_main(l,o,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(s&&typeof s=="object"&&typeof o>"u"&&typeof a>"u")c=s,l=this.diff_text1(c);else if(typeof s=="string"&&o&&typeof o=="object"&&typeof a>"u")l=s,c=o;else if(typeof s=="string"&&typeof o=="string"&&a&&typeof a=="object")l=s,c=a;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var u=[],h=new t.patch_obj,d=0,f=0,p=0,g=l,y=l,b=0;b=2*this.Patch_Margin&&d&&(this.patch_addContext_(h,g),u.push(h),h=new t.patch_obj,d=0,g=y,f=p);break}v!==n&&(f+=E.length),v!==r&&(p+=E.length)}return d&&(this.patch_addContext_(h,g),u.push(h)),u},t.prototype.patch_deepCopy=function(s){for(var o=[],a=0;athis.Match_MaxBits?(f=this.match_main(o,d.substring(0,this.Match_MaxBits),h),f!=-1&&(p=this.match_main(o,d.substring(d.length-this.Match_MaxBits),h+d.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(o,d,h),f==-1)c[u]=!1,l-=s[u].length2-s[u].length1;else{c[u]=!0,l=f-h;var g;if(p==-1?g=o.substring(f,f+d.length):g=o.substring(f,p+this.Match_MaxBits),d==g)o=o.substring(0,f)+this.diff_text2(s[u].diffs)+o.substring(f+d.length);else{var y=this.diff_main(d,g,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(y)/d.length>this.Patch_DeleteThreshold)c[u]=!1;else{this.diff_cleanupSemanticLossless(y);for(var b=0,v,E=0;Eu[0][1].length){var h=o-u[0][1].length;u[0][1]=a.substring(u[0][1].length)+u[0][1],c.start1-=h,c.start2-=h,c.length1+=h,c.length2+=h}if(c=s[s.length-1],u=c.diffs,u.length==0||u[u.length-1][0]!=i)u.push(new t.Diff(i,a)),c.length1+=o,c.length2+=o;else if(o>u[u.length-1][1].length){var h=o-u[u.length-1][1].length;u[u.length-1][1]+=a.substring(0,h),c.length1+=h,c.length2+=h}return a},t.prototype.patch_splitMax=function(s){for(var o=this.Match_MaxBits,a=0;a2*o?(d.length1+=g.length,c+=g.length,f=!1,d.diffs.push(new t.Diff(p,g)),l.diffs.shift()):(g=g.substring(0,o-d.length1-this.Patch_Margin),d.length1+=g.length,c+=g.length,p===i?(d.length2+=g.length,u+=g.length):f=!1,d.diffs.push(new t.Diff(p,g)),g==l.diffs[0][1]?l.diffs.shift():l.diffs[0][1]=l.diffs[0][1].substring(g.length))}h=this.diff_text2(d.diffs),h=h.substring(h.length-this.Patch_Margin);var y=this.diff_text1(l.diffs).substring(0,this.Patch_Margin);y!==""&&(d.length1+=y.length,d.length2+=y.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===i?d.diffs[d.diffs.length-1][1]+=y:d.diffs.push(new t.Diff(i,y))),f||s.splice(++a,0,d)}}},t.prototype.patch_toText=function(s){for(var o=[],a=0;a-1}function it(ie,ve){var Me=this.__data__,lt=pl(Me,ie);return lt<0?(++this.size,Me.push([ie,ve])):Me[lt][1]=ve,this}Ur.prototype.clear=ei,Ur.prototype.delete=rt,Ur.prototype.get=fe,Ur.prototype.has=Le,Ur.prototype.set=it;function Qe(ie){var ve=-1,Me=ie==null?0:ie.length;for(this.clear();++vern))return!1;var Hr=Lt.get(ie);if(Hr&&Lt.get(ve))return Hr==ve;var tr=-1,gn=!0,xn=Me&o?new zr:void 0;for(Lt.set(ie,ve),Lt.set(ve,ie);++tr-1&&ie%1==0&&ie-1&&ie%1==0&&ie<=l}function Ch(ie){var ve=typeof ie;return ie!=null&&(ve=="object"||ve=="function")}function Wo(ie){return ie!=null&&typeof ie=="object"}var js=V?ge(V):Sh;function ht(ie){return Jf(ie)?bh(ie):wa(ie)}function Yf(){return[]}function Th(){return!1}e.exports=Xf})(M0,M0.exports);var n8=M0.exports,_o={};Object.defineProperty(_o,"__esModule",{value:!0});_o.getAceInstance=_o.debounce=_o.editorEvents=_o.editorOptions=void 0;var eae=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];_o.editorOptions=eae;var tae=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];_o.editorEvents=tae;var rae=function(){var e;return typeof window>"u"?e=Zm:window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=Zm,e};_o.getAceInstance=rae;var nae=function(e,t){var r=null;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(n,i)},t)}};_o.debounce=nae;var iae=Dr&&Dr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),MC=Dr&&Dr.__assign||function(){return MC=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&this.handleMarkers(T);var N=this.editor.$options;qh.editorOptions.forEach(function(L){N.hasOwnProperty(L)?r.editor.setOption(L,r.props[L]):r.props[L]&&console.warn("ReactAce: editor option ".concat(L," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(C)&&C.forEach(function(L){typeof L.exec=="string"?r.editor.commands.bindKey(L.bindKey,L.exec):r.editor.commands.addCommand(L)}),E&&this.editor.setKeyboardHandler("ace/keyboard/"+E),i&&(this.refEditor.className+=" "+i),D&&D(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(r){for(var n=r,i=this.props,s=0;s 0!";if(h!=this.$splits){if(h>this.$splits){for(;this.$splitsh;)d=this.$editors[this.$splits-1],this.$container.removeChild(d.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(h){return this.$editors[h]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(h){this.$editors.forEach(function(d){d.setTheme(h)})},this.setKeyboardHandler=function(h){this.$editors.forEach(function(d){d.setKeyboardHandler(h)})},this.forEach=function(h,d){this.$editors.forEach(h,d)},this.$fontSize="",this.setFontSize=function(h){this.$fontSize=h,this.forEach(function(d){d.setFontSize(h)})},this.$cloneSession=function(h){var d=new c(h.getDocument(),h.getMode()),f=h.getUndoManager();return d.setUndoManager(f),d.setTabSize(h.getTabSize()),d.setUseSoftTabs(h.getUseSoftTabs()),d.setOverwrite(h.getOverwrite()),d.setBreakpoints(h.getBreakpoints()),d.setUseWrapMode(h.getUseWrapMode()),d.setUseWorker(h.getUseWorker()),d.setWrapLimitRange(h.$wrapLimitRange.min,h.$wrapLimitRange.max),d.$foldData=h.$cloneFoldData(),d},this.setSession=function(h,d){var f;d==null?f=this.$cEditor:f=this.$editors[d];var p=this.$editors.some(function(g){return g.session===h});return p&&(h=this.$cloneSession(h)),f.setSession(h),h},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(h){this.$orientation!=h&&(this.$orientation=h,this.resize())},this.resize=function(){var h=this.$container.clientWidth,d=this.$container.clientHeight,f;if(this.$orientation==this.BESIDE)for(var p=h/this.$splits,g=0;g-1}function Oae(e,t){var r=this.__data__,n=a1(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}xf.prototype.clear=Iae;xf.prototype.delete=Nae;xf.prototype.get=Mae;xf.prototype.has=Lae;xf.prototype.set=Oae;function eh(e){var t=-1,r=e?e.length:0;for(this.clear();++t0&&r.handleMarkers(R,L);for(var P=0;P"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var c=a;if(s==null||o==null)throw new Error("Null input. (diff_main)");if(s==o)return s?[new t.Diff(i,s)]:[];typeof l>"u"&&(l=!0);var u=l,h=this.diff_commonPrefix(s,o),d=s.substring(0,h);s=s.substring(h),o=o.substring(h),h=this.diff_commonSuffix(s,o);var f=s.substring(s.length-h);s=s.substring(0,s.length-h),o=o.substring(0,o.length-h);var p=this.diff_compute_(s,o,u,c);return d&&p.unshift(new t.Diff(i,d)),f&&p.push(new t.Diff(i,f)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(s,o,l,a){var c;if(!s)return[new t.Diff(n,o)];if(!o)return[new t.Diff(r,s)];var u=s.length>o.length?s:o,h=s.length>o.length?o:s,d=u.indexOf(h);if(d!=-1)return c=[new t.Diff(n,u.substring(0,d)),new t.Diff(i,h),new t.Diff(n,u.substring(d+h.length))],s.length>o.length&&(c[0][0]=c[2][0]=r),c;if(h.length==1)return[new t.Diff(r,s),new t.Diff(n,o)];var f=this.diff_halfMatch_(s,o);if(f){var p=f[0],g=f[1],y=f[2],b=f[3],v=f[4],E=this.diff_main(p,y,l,a),D=this.diff_main(g,b,l,a);return E.concat([new t.Diff(i,v)],D)}return l&&s.length>100&&o.length>100?this.diff_lineMode_(s,o,a):this.diff_bisect_(s,o,a)},t.prototype.diff_lineMode_=function(s,o,l){var a=this.diff_linesToChars_(s,o);s=a.chars1,o=a.chars2;var c=a.lineArray,u=this.diff_main(s,o,!1,l);this.diff_charsToLines_(u,c),this.diff_cleanupSemantic(u),u.push(new t.Diff(i,""));for(var h=0,d=0,f=0,p="",g="";h=1&&f>=1){u.splice(h-d-f,d+f),h=h-d-f;for(var y=this.diff_main(p,g,!1,l),b=y.length-1;b>=0;b--)u.splice(h,0,y[b]);h=h+y.length}f=0,d=0,p="",g="";break}h++}return u.pop(),u},t.prototype.diff_bisect_=function(s,o,l){for(var a=s.length,c=o.length,u=Math.ceil((a+c)/2),h=u,d=2*u,f=new Array(d),p=new Array(d),g=0;gl);w++){for(var T=-w+v;T<=w-E;T+=2){var A=h+T,$;T==-w||T!=w&&f[A-1]a)E+=2;else if(I>c)v+=2;else if(b){var N=h+y-T;if(N>=0&&N=L)return this.diff_bisectSplit_(s,o,$,I,l)}}}for(var F=-w+D;F<=w-C;F+=2){var N=h+F,L;F==-w||F!=w&&p[N-1]a)C+=2;else if(P>c)D+=2;else if(!b){var A=h+y-F;if(A>=0&&A=L)return this.diff_bisectSplit_(s,o,$,I,l)}}}}return[new t.Diff(r,s),new t.Diff(n,o)]},t.prototype.diff_bisectSplit_=function(s,o,l,a,c){var u=s.substring(0,l),h=o.substring(0,a),d=s.substring(l),f=o.substring(a),p=this.diff_main(u,h,!1,c),g=this.diff_main(d,f,!1,c);return p.concat(g)},t.prototype.diff_linesToChars_=function(s,o){var l=[],a={};l[0]="";function c(f){for(var p="",g=0,y=-1,b=l.length;ya?s=s.substring(l-a):lo.length?s:o,a=s.length>o.length?o:s;if(l.length<4||a.length*2=E.length?[$,I,N,L,A]:null}var h=u(l,a,Math.ceil(l.length/4)),d=u(l,a,Math.ceil(l.length/2)),f;if(!h&&!d)return null;d?h?f=h[4].length>d[4].length?h:d:f=d:f=h;var p,g,y,b;s.length>o.length?(p=f[0],g=f[1],y=f[2],b=f[3]):(y=f[0],b=f[1],p=f[2],g=f[3]);var v=f[4];return[p,g,y,b,v]},t.prototype.diff_cleanupSemantic=function(s){for(var o=!1,l=[],a=0,c=null,u=0,h=0,d=0,f=0,p=0;u0?l[a-1]:-1,h=0,d=0,f=0,p=0,c=null,o=!0)),u++;for(o&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),u=1;u=v?(b>=g.length/2||b>=y.length/2)&&(s.splice(u,0,new t.Diff(i,y.substring(0,b))),s[u-1][1]=g.substring(0,g.length-b),s[u+1][1]=y.substring(b),u++):(v>=g.length/2||v>=y.length/2)&&(s.splice(u,0,new t.Diff(i,g.substring(0,v))),s[u-1][0]=n,s[u-1][1]=y.substring(0,y.length-v),s[u+1][0]=r,s[u+1][1]=g.substring(v),u++),u++}u++}},t.prototype.diff_cleanupSemanticLossless=function(s){function o(v,E){if(!v||!E)return 6;var D=v.charAt(v.length-1),C=E.charAt(0),w=D.match(t.nonAlphaNumericRegex_),T=C.match(t.nonAlphaNumericRegex_),A=w&&D.match(t.whitespaceRegex_),$=T&&C.match(t.whitespaceRegex_),I=A&&D.match(t.linebreakRegex_),N=$&&C.match(t.linebreakRegex_),L=I&&v.match(t.blanklineEndRegex_),F=N&&E.match(t.blanklineStartRegex_);return L||F?5:I||N?4:w&&!A&&$?3:A||$?2:w||T?1:0}for(var l=1;l=y&&(y=b,f=a,p=c,g=u)}s[l-1][1]!=f&&(f?s[l-1][1]=f:(s.splice(l-1,1),l--),s[l][1]=p,g?s[l+1][1]=g:(s.splice(l+1,1),l--))}l++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(s){for(var o=!1,l=[],a=0,c=null,u=0,h=!1,d=!1,f=!1,p=!1;u0?l[a-1]:-1,f=p=!1),o=!0)),u++;o&&this.diff_cleanupMerge(s)},t.prototype.diff_cleanupMerge=function(s){s.push(new t.Diff(i,""));for(var o=0,l=0,a=0,c="",u="",h;o1?(l!==0&&a!==0&&(h=this.diff_commonPrefix(u,c),h!==0&&(o-l-a>0&&s[o-l-a-1][0]==i?s[o-l-a-1][1]+=u.substring(0,h):(s.splice(0,0,new t.Diff(i,u.substring(0,h))),o++),u=u.substring(h),c=c.substring(h)),h=this.diff_commonSuffix(u,c),h!==0&&(s[o][1]=u.substring(u.length-h)+s[o][1],u=u.substring(0,u.length-h),c=c.substring(0,c.length-h))),o-=l+a,s.splice(o,l+a),c.length&&(s.splice(o,0,new t.Diff(r,c)),o++),u.length&&(s.splice(o,0,new t.Diff(n,u)),o++),o++):o!==0&&s[o-1][0]==i?(s[o-1][1]+=s[o][1],s.splice(o,1)):o++,a=0,l=0,c="",u="";break}s[s.length-1][1]===""&&s.pop();var d=!1;for(o=1;oo));h++)c=l,u=a;return s.length!=h&&s[h][0]===r?u:u+(o-c)},t.prototype.diff_prettyHtml=function(s){for(var o=[],l=/&/g,a=//g,u=/\n/g,h=0;h");switch(d){case n:o[h]=''+p+"";break;case r:o[h]=''+p+"";break;case i:o[h]=""+p+"";break}}return o.join("")},t.prototype.diff_text1=function(s){for(var o=[],l=0;lthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(o),c=this;function u($,I){var N=$/o.length,L=Math.abs(l-I);return c.Match_Distance?N+L/c.Match_Distance:L?1:N}var h=this.Match_Threshold,d=s.indexOf(o,l);d!=-1&&(h=Math.min(u(0,d),h),d=s.lastIndexOf(o,l+o.length),d!=-1&&(h=Math.min(u(0,d),h)));var f=1<=E;w--){var T=a[s.charAt(w-1)];if(v===0?C[w]=(C[w+1]<<1|1)&T:C[w]=(C[w+1]<<1|1)&T|((b[w+1]|b[w])<<1|1)|b[w+1],C[w]&f){var A=u(v,w-1);if(A<=h)if(h=A,d=w-1,d>l)E=Math.max(1,2*l-d);else break}}if(u(v+1,l)>h)break;b=C}return d},t.prototype.match_alphabet_=function(s){for(var o={},l=0;l"u")a=s,c=this.diff_main(a,o,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(s&&typeof s=="object"&&typeof o>"u"&&typeof l>"u")c=s,a=this.diff_text1(c);else if(typeof s=="string"&&o&&typeof o=="object"&&typeof l>"u")a=s,c=o;else if(typeof s=="string"&&typeof o=="string"&&l&&typeof l=="object")a=s,c=l;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var u=[],h=new t.patch_obj,d=0,f=0,p=0,g=a,y=a,b=0;b=2*this.Patch_Margin&&d&&(this.patch_addContext_(h,g),u.push(h),h=new t.patch_obj,d=0,g=y,f=p);break}v!==n&&(f+=E.length),v!==r&&(p+=E.length)}return d&&(this.patch_addContext_(h,g),u.push(h)),u},t.prototype.patch_deepCopy=function(s){for(var o=[],l=0;lthis.Match_MaxBits?(f=this.match_main(o,d.substring(0,this.Match_MaxBits),h),f!=-1&&(p=this.match_main(o,d.substring(d.length-this.Match_MaxBits),h+d.length-this.Match_MaxBits),(p==-1||f>=p)&&(f=-1))):f=this.match_main(o,d,h),f==-1)c[u]=!1,a-=s[u].length2-s[u].length1;else{c[u]=!0,a=f-h;var g;if(p==-1?g=o.substring(f,f+d.length):g=o.substring(f,p+this.Match_MaxBits),d==g)o=o.substring(0,f)+this.diff_text2(s[u].diffs)+o.substring(f+d.length);else{var y=this.diff_main(d,g,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(y)/d.length>this.Patch_DeleteThreshold)c[u]=!1;else{this.diff_cleanupSemanticLossless(y);for(var b=0,v,E=0;Eu[0][1].length){var h=o-u[0][1].length;u[0][1]=l.substring(u[0][1].length)+u[0][1],c.start1-=h,c.start2-=h,c.length1+=h,c.length2+=h}if(c=s[s.length-1],u=c.diffs,u.length==0||u[u.length-1][0]!=i)u.push(new t.Diff(i,l)),c.length1+=o,c.length2+=o;else if(o>u[u.length-1][1].length){var h=o-u[u.length-1][1].length;u[u.length-1][1]+=l.substring(0,h),c.length1+=h,c.length2+=h}return l},t.prototype.patch_splitMax=function(s){for(var o=this.Match_MaxBits,l=0;l2*o?(d.length1+=g.length,c+=g.length,f=!1,d.diffs.push(new t.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,o-d.length1-this.Patch_Margin),d.length1+=g.length,c+=g.length,p===i?(d.length2+=g.length,u+=g.length):f=!1,d.diffs.push(new t.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}h=this.diff_text2(d.diffs),h=h.substring(h.length-this.Patch_Margin);var y=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);y!==""&&(d.length1+=y.length,d.length2+=y.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===i?d.diffs[d.diffs.length-1][1]+=y:d.diffs.push(new t.Diff(i,y))),f||s.splice(++l,0,d)}}},t.prototype.patch_toText=function(s){for(var o=[],l=0;l/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:l},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),h("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[h("function_arguments"),{token:"variable.parameter",regex:l},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!d||!d.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,D,C){if(this.next=E=="{"?this.nextState:"",E=="{"&&C.length)C.unshift("start",D);else if(E=="}"&&C.length&&(C.shift(),this.next=C.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:y},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+l+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!d||d.jsx!=!1)&&u.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(c,a);function u(){var d=l.replace("\\d","\\d\\-"),f={onMatch:function(g,y,b){var v=g.charAt(1)=="/"?2:1;return v==1?(y!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):v==2&&y==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:g.slice(0,v)},{type:"meta.tag.tag-name.xml",value:g.substr(v)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,f,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(g,y,b){return y==b[0]&&b.shift(),g.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,h("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function h(d){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}n.JavaScriptHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(r,n,i){var s=r("../range").Range,o=function(){};(function(){this.checkOutdent=function(a,l){return/^\s+$/.test(a)?/^\s*\}/.test(l):!1},this.autoOutdent=function(a,l){var c=a.getLine(l),u=c.match(/^(\s*\})/);if(!u)return 0;var h=u[1].length,d=a.findMatchingBracket({row:l,column:h});if(!d||d.row==l)return 0;var f=this.$getIndent(a.getLine(d.row));a.replace(new s(l,0,l,h-1),f)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(o.prototype),n.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,a=r("../../token_iterator").TokenIterator;function l(u,h){return u&&u.type.lastIndexOf(h+".xml")>-1}var c=function(){this.add("string_dquotes","insertion",function(u,h,d,f,p){if(p=='"'||p=="'"){var g=p,y=f.doc.getTextRange(d.getSelectionRange());if(y!==""&&y!=="'"&&y!='"'&&d.getWrapBehavioursEnabled())return{text:g+y+g,selection:!1};var b=d.getCursorPosition(),v=f.doc.getLine(b.row),E=v.substring(b.column,b.column+1),D=new a(f,b.row,b.column),C=D.getCurrentToken();if(E==g&&(l(C,"attribute-value")||l(C,"string")))return{text:"",selection:[1,1]};if(C||(C=D.stepBackward()),!C)return;for(;l(C,"tag-whitespace")||l(C,"whitespace");)C=D.stepBackward();var w=!E||E.match(/\s/);if(l(C,"attribute-equals")&&(w||E==">")||l(C,"decl-attribute-equals")&&(w||E=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(u,h,d,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var y=f.doc.getLine(p.start.row),b=y.substring(p.start.column+1,p.start.column+2);if(b==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(u,h,d,f,p){if(p==">"){var g=d.getSelectionRange().start,y=new a(f,g.row,g.column),b=y.getCurrentToken()||y.stepBackward();if(!b||!(l(b,"tag-name")||l(b,"tag-whitespace")||l(b,"attribute-name")||l(b,"attribute-equals")||l(b,"attribute-value"))||l(b,"reference.attribute-value"))return;if(l(b,"attribute-value")){var v=y.getCurrentTokenColumn()+b.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!l(b,"tag-name");)if(b=y.stepBackward(),b.value=="<"){b=y.stepForward();break}var D=y.getCurrentTokenRow(),C=y.getCurrentTokenColumn();if(l(y.stepBackward(),"end-tag-open"))return;var w=b.value;return D==g.row&&(w=w.substring(0,g.column-C)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(u,h,d,f,p){if(p==` -`){var g=d.getCursorPosition(),y=f.getLine(g.row),b=new a(f,g.row,g.column),v=b.getCurrentToken();if(l(v,"")&&v.type.indexOf("tag-close")!==-1){if(v.value=="/>")return;for(;v&&v.type.indexOf("tag-name")===-1;)v=b.stepBackward();if(!v)return;var E=v.value,D=b.getCurrentTokenRow();if(v=b.stepBackward(),!v||v.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var C=f.getTokenAt(g.row,g.column+1),y=f.getLine(D),w=this.$getIndent(y),T=w+f.getTabString();return C&&C.value==="/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[o.getStartRule("doc-start"),h("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[h("function_arguments"),{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:y},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!d||!d.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,D,C){if(this.next=E=="{"?this.nextState:"",E=="{"&&C.length)C.unshift("start",D);else if(E=="}"&&C.length&&(C.shift(),this.next=C.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:y},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+a+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!d||d.jsx!=!1)&&u.call(this)),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};s.inherits(c,l);function u(){var d=a.replace("\\d","\\d\\-"),f={onMatch:function(g,y,b){var v=g.charAt(1)=="/"?2:1;return v==1?(y!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):v==2&&y==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(v==1?"":"end-")+"tag-open.xml",value:g.slice(0,v)},{type:"meta.tag.tag-name.xml",value:g.substr(v)}]},regex:"))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(f);var p={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[p,f,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(g,y,b){return y==b[0]&&b.shift(),g.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:g}]},nextState:"jsx"},p,h("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:d},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},f],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function h(d){return[{token:"comment",regex:/\/\*/,next:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[o.getTagRule(),{token:"comment",regex:"$|^",next:d||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}n.JavaScriptHighlightRules=c}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(r,n,i){var s=r("../range").Range,o=function(){};(function(){this.checkOutdent=function(l,a){return/^\s+$/.test(l)?/^\s*\}/.test(a):!1},this.autoOutdent=function(l,a){var c=l.getLine(a),u=c.match(/^(\s*\})/);if(!u)return 0;var h=u[1].length,d=l.findMatchingBracket({row:a,column:h});if(!d||d.row==a)return 0;var f=this.$getIndent(l.getLine(d.row));l.replace(new s(a,0,a,h-1),f)},this.$getIndent=function(l){return l.match(/^\s*/)[0]}}).call(o.prototype),n.MatchingBraceOutdent=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop"),o=r("../behaviour").Behaviour,l=r("../../token_iterator").TokenIterator;function a(u,h){return u&&u.type.lastIndexOf(h+".xml")>-1}var c=function(){this.add("string_dquotes","insertion",function(u,h,d,f,p){if(p=='"'||p=="'"){var g=p,y=f.doc.getTextRange(d.getSelectionRange());if(y!==""&&y!=="'"&&y!='"'&&d.getWrapBehavioursEnabled())return{text:g+y+g,selection:!1};var b=d.getCursorPosition(),v=f.doc.getLine(b.row),E=v.substring(b.column,b.column+1),D=new l(f,b.row,b.column),C=D.getCurrentToken();if(E==g&&(a(C,"attribute-value")||a(C,"string")))return{text:"",selection:[1,1]};if(C||(C=D.stepBackward()),!C)return;for(;a(C,"tag-whitespace")||a(C,"whitespace");)C=D.stepBackward();var w=!E||E.match(/\s/);if(a(C,"attribute-equals")&&(w||E==">")||a(C,"decl-attribute-equals")&&(w||E=="?"))return{text:g+g,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(u,h,d,f,p){var g=f.doc.getTextRange(p);if(!p.isMultiLine()&&(g=='"'||g=="'")){var y=f.doc.getLine(p.start.row),b=y.substring(p.start.column+1,p.start.column+2);if(b==g)return p.end.column++,p}}),this.add("autoclosing","insertion",function(u,h,d,f,p){if(p==">"){var g=d.getSelectionRange().start,y=new l(f,g.row,g.column),b=y.getCurrentToken()||y.stepBackward();if(!b||!(a(b,"tag-name")||a(b,"tag-whitespace")||a(b,"attribute-name")||a(b,"attribute-equals")||a(b,"attribute-value"))||a(b,"reference.attribute-value"))return;if(a(b,"attribute-value")){var v=y.getCurrentTokenColumn()+b.value.length;if(g.column/.test(f.getLine(g.row).slice(g.column)))return;for(;!a(b,"tag-name");)if(b=y.stepBackward(),b.value=="<"){b=y.stepForward();break}var D=y.getCurrentTokenRow(),C=y.getCurrentTokenColumn();if(a(y.stepBackward(),"end-tag-open"))return;var w=b.value;return D==g.row&&(w=w.substring(0,g.column-C)),this.voidElements&&this.voidElements.hasOwnProperty(w.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(u,h,d,f,p){if(p==` +`){var g=d.getCursorPosition(),y=f.getLine(g.row),b=new l(f,g.row,g.column),v=b.getCurrentToken();if(a(v,"")&&v.type.indexOf("tag-close")!==-1){if(v.value=="/>")return;for(;v&&v.type.indexOf("tag-name")===-1;)v=b.stepBackward();if(!v)return;var E=v.value,D=b.getCurrentTokenRow();if(v=b.stepBackward(),!v||v.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var C=f.getTokenAt(g.row,g.column+1),y=f.getLine(D),w=this.$getIndent(y),T=w+f.getTabString();return C&&C.value===""){var y=f.getSelectionRange().start,b=new o(p,y.row,y.column),v=b.getCurrentToken()||b.stepBackward();if(!v)return;if(v.value=="<")return{text:">",selection:[1,1]}}})};s.inherits(c,a),n.JavaScriptBehaviour=c}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("../../range").Range,a=r("./fold_mode").FoldMode,l=n.FoldMode=function(h,d){a.call(this),this.voidElements=h||{},this.optionalEndTags=s.mixin({},this.voidElements),d&&s.mixin(this.optionalEndTags,d)};s.inherits(l,a);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function u(h,d){return h.type.lastIndexOf(d+".xml")>-1}(function(){this.getFoldWidget=function(h,d,f){var p=this._getFirstTagInLine(h,f);return p?p.closing||!p.tagName&&p.selfClosing?d==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(h,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(h,f)},this.getCommentFoldWidget=function(h,d){return/comment/.test(h.getState(d))&&/";break}return p}else if(u(y,"tag-close"))return p.selfClosing=y.value=="/>",p;p.start.column+=y.value.length}return null},this._findEndTagInLine=function(h,d,f,p){for(var g=h.getTokens(d),y=0,b=0;bb)break;var v=this.getFoldWidgetRange(c,"all",u);if(v){if(v.start.row<=f)break;if(v.isMultiLine())u=v.end.row;else if(d==b)break}g=u}}return new o(f,p,g,c.getLine(g).length)},this.getCommentRegionBlock=function(c,u,h){for(var d=u.search(/\s*$/),f=c.getLength(),p=h,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++hp)return new o(p,d,v,u.length)}}).call(l.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./xml").FoldMode,a=r("./cstyle").FoldMode,l=n.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end))),this.xmlFoldMode=new o};s.inherits(l,a),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,u,h){var d=this.getFoldWidgetBase(c,u,h);return d||this.xmlFoldMode.getFoldWidget(c,u,h)},this.getFoldWidgetRange=function(c,u,h,d){var f=this.getFoldWidgetRangeBase(c,u,h,d);return f||this.xmlFoldMode.getFoldWidgetRange(c,u,h)}}).call(l.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./javascript_highlight_rules").JavaScriptHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,c=r("../worker/worker_client").WorkerClient,u=r("./behaviour/javascript").JavaScriptBehaviour,h=r("./folding/javascript").FoldMode,d=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new u,this.foldingRules=new h};s.inherits(d,o),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var y=this.$getIndent(p),b=this.getTokenizer().getLineTokens(p,f),v=b.tokens,E=b.state;if(v.length&&v[v.length-1].type=="comment")return y;if(f=="start"||f=="no_regex"){var D=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);D&&(y+=g)}else if(f=="doc-start"){if(E=="start"||E=="no_regex")return"";var D=p.match(/^\s*(\/?)\*/);D&&(D[1]&&(y+=" "),y+="* ")}return y},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new c(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(d.prototype),n.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop");r("../lib/lang");var o=r("./text_highlight_rules").TextHighlightRules,a=n.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",l=n.supportFunction="rgb|rgba|url|attr|counter|counters",c=n.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",u=n.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",h=n.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=n.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=n.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=n.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var y=this.createKeywordMapper({"support.function":l,"support.constant":c,"support.type":a,"support.constant.color":u,"support.constant.fonts":h},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:y,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(g,o),n.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(r,n,i){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var a=document.createElement("c").style;for(var l in a)if(typeof a[l]=="string"){var c=l.replace(/[A-Z]/g,function(u){return"-"+u.toLowerCase()});s.hasOwnProperty(c)||(s[c]=1)}}this.completionsDefined=!0},this.getCompletions=function(a,l,c,u){if(this.completionsDefined||this.defineCompletions(),a==="ruleset"||l.$mode.$id=="ace/mode/scss"){var h=l.getLine(c.row).substr(0,c.column),d=/\([^)]*$/.test(h);return d&&(h=h.substr(h.lastIndexOf("(")+1)),/:[^;]+$/.test(h)?this.getPropertyValueCompletions(a,l,c,u):this.getPropertyCompletions(a,l,c,u,d)}return[]},this.getPropertyCompletions=function(a,l,c,u,h){h=h||!1;var d=Object.keys(s);return d.map(function(f){return{caption:f,snippet:f+": $0"+(h?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(a,l,c,u){var h=l.getLine(c.row).substr(0,c.column),d=(/([\w\-]+):[^:]*$/.exec(h)||{})[1];if(!d)return[];var f=[];return d in s&&typeof s[d]=="object"&&(f=Object.keys(s[d])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(o.prototype),n.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop");r("../behaviour").Behaviour;var o=r("./cstyle").CstyleBehaviour,a=r("../../token_iterator").TokenIterator,l=function(){this.inherit(o),this.add("colon","insertion",function(c,u,h,d,f){if(f===":"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=new a(d,p.row,p.column),y=g.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=g.stepBackward()),y&&y.type==="support.type"){var b=d.doc.getLine(p.row),v=b.substring(p.column,p.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(c,u,h,d,f){var p=d.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=h.getCursorPosition(),y=new a(d,g.row,g.column),b=y.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=y.stepBackward()),b&&b.type==="support.type"){var v=d.doc.getLine(f.start.row),E=v.substring(f.end.column,f.end.column+1);if(E===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(c,u,h,d,f){if(f===";"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=d.doc.getLine(p.row),y=g.substring(p.column,p.column+1);if(y===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(c,u,h,d,f){if(f==="!"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=d.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(l,o),n.CssBehaviour=l}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,a=r("./css_highlight_rules").CssHighlightRules,l=r("./matching_brace_outdent").MatchingBraceOutdent,c=r("../worker/worker_client").WorkerClient,u=r("./css_completions").CssCompletions,h=r("./behaviour/css").CssBehaviour,d=r("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=a,this.$outdent=new l,this.$behaviour=new h,this.$completer=new u,this.foldingRules=new d};s.inherits(f,o),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,y){var b=this.$getIndent(g),v=this.getTokenizer().getLineTokens(g,p).tokens;if(v.length&&v[v.length-1].type=="comment")return b;var E=g.match(/^.*\{\s*$/);return E&&(b+=y),b},this.checkOutdent=function(p,g,y){return this.$outdent.checkOutdent(g,y)},this.autoOutdent=function(p,g,y){this.$outdent.autoOutdent(g,y)},this.getCompletions=function(p,g,y,b){return this.$completer.getCompletions(p,g,y,b)},this.createWorker=function(p){var g=new c(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(y){p.setAnnotations(y.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),n.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("./text_highlight_rules").TextHighlightRules,a=function(l){var c="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+c+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+c+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(l,c,u){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+u+".tag-name.xml"],regex:"(<)("+u+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:c+"start"}]}),this.$rules[u+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(h,d,f){return f.splice(0),this.token}}],this.embedRules(l,c,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+u+".tag-name.xml"],regex:"(|$))",next:u+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),s.inherits(a,o),n.XmlHighlightRules=a}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./css_highlight_rules").CssHighlightRules,l=r("./javascript_highlight_rules").JavaScriptHighlightRules,c=r("./xml_highlight_rules").XmlHighlightRules,u=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),h=function(){c.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(d,f){var p=u[f];return["meta.tag.punctuation."+(d=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(new l({jsx:!1}).getRules(),"js-","script"),this.constructor===h&&this.normalizeRules()};s.inherits(h,c),n.HtmlHighlightRules=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("./fold_mode").FoldMode,a=n.FoldMode=function(l,c){this.defaultMode=l,this.subModes=c};s.inherits(a,o),(function(){this.$getMode=function(l){typeof l!="string"&&(l=l[0]);for(var c in this.subModes)if(l.indexOf(c)===0)return this.subModes[c];return null},this.$tryMode=function(l,c,u,h){var d=this.$getMode(l);return d?d.getFoldWidget(c,u,h):""},this.getFoldWidget=function(l,c,u){return this.$tryMode(l.getState(u-1),l,c,u)||this.$tryMode(l.getState(u),l,c,u)||this.defaultMode.getFoldWidget(l,c,u)},this.getFoldWidgetRange=function(l,c,u){var h=this.$getMode(l.getState(u-1));return(!h||!h.getFoldWidget(l,c,u))&&(h=this.$getMode(l.getState(u))),(!h||!h.getFoldWidget(l,c,u))&&(h=this.defaultMode),h.getFoldWidgetRange(l,c,u)}}).call(a.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./mixed").FoldMode,a=r("./xml").FoldMode,l=r("./cstyle").FoldMode,c=n.FoldMode=function(u,h){o.call(this,new a(u,h),{"js-":new l,"css-":new l})};s.inherits(c,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],a=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=o.concat(a),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},u=Object.keys(c);function h(g,y){return g.type.lastIndexOf(y+".xml")>-1}function d(g,y){for(var b=new s(g,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"tag-name");)v=b.stepBackward();if(v)return v.value}function f(g,y){for(var b=new s(g,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"attribute-name");)v=b.stepBackward();if(v)return v.value}var p=function(){};(function(){this.getCompletions=function(g,y,b,v){var E=y.getTokenAt(b.row,b.column);if(!E)return[];if(h(E,"tag-name")||h(E,"tag-open")||h(E,"end-tag-open"))return this.getTagCompletions(g,y,b,v);if(h(E,"tag-whitespace")||h(E,"attribute-name"))return this.getAttributeCompletions(g,y,b,v);if(h(E,"attribute-value"))return this.getAttributeValueCompletions(g,y,b,v);var D=y.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(D)?this.getHTMLEntityCompletions(g,y,b,v):[]},this.getTagCompletions=function(g,y,b,v){return u.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,y,b,v){var E=d(y,b);if(!E)return[];var D=l;return E in c&&(D=D.concat(Object.keys(c[E]))),D.map(function(C){return{caption:C,snippet:C+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,y,b,v){var E=d(y,b),D=f(y,b);if(!E)return[];var C=[];return E in c&&D in c[E]&&typeof c[E][D]=="object"&&(C=Object.keys(c[E][D])),C.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,y,b,v){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(D){return{caption:D,snippet:D,meta:"html entity",score:1e6}})}}).call(p.prototype),n.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),a=r("./text").Mode,l=r("./javascript").Mode,c=r("./css").Mode,u=r("./html_highlight_rules").HtmlHighlightRules,h=r("./behaviour/xml").XmlBehaviour,d=r("./folding/html").FoldMode,f=r("./html_completions").HtmlCompletions,p=r("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],y=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(v){this.fragmentContext=v&&v.fragmentContext,this.HighlightRules=u,this.$behaviour=new h,this.$completer=new f,this.createModeDelegates({"js-":l,"css-":c}),this.foldingRules=new d(this.voidElements,o.arrayToMap(y))};s.inherits(b,a),(function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(g),this.getNextLineIndent=function(v,E,D){return this.$getIndent(E)},this.checkOutdent=function(v,E,D){return!1},this.getCompletions=function(v,E,D,C){return this.$completer.getCompletions(v,E,D,C)},this.createWorker=function(v){if(this.constructor==b){var E=new p(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(v.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(D){v.setAnnotations(D.data)}),E.on("terminate",function(){v.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),n.Mode=b}),function(){ace.require(["ace/mode/html"],function(r){e&&(e.exports=r)})}()})(vle);var ble={exports:{}};(function(e,t){ace.define("ace/theme/dracula-css",["require","exports","module"],function(r,n,i){i.exports=`/* +`+T}}}}})};s.inherits(c,o),n.XmlBehaviour=c}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(r,n,i){var s=r("../../lib/oop"),o=r("../../token_iterator").TokenIterator,l=r("../behaviour/cstyle").CstyleBehaviour,a=r("../behaviour/xml").XmlBehaviour,c=function(){var u=new a({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(u),this.inherit(l),this.add("autoclosing-fragment","insertion",function(h,d,f,p,g){if(g==">"){var y=f.getSelectionRange().start,b=new o(p,y.row,y.column),v=b.getCurrentToken()||b.stepBackward();if(!v)return;if(v.value=="<")return{text:">",selection:[1,1]}}})};s.inherits(c,l),n.JavaScriptBehaviour=c}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("../../range").Range,l=r("./fold_mode").FoldMode,a=n.FoldMode=function(h,d){l.call(this),this.voidElements=h||{},this.optionalEndTags=s.mixin({},this.voidElements),d&&s.mixin(this.optionalEndTags,d)};s.inherits(a,l);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};function u(h,d){return h.type.lastIndexOf(d+".xml")>-1}(function(){this.getFoldWidget=function(h,d,f){var p=this._getFirstTagInLine(h,f);return p?p.closing||!p.tagName&&p.selfClosing?d==="markbeginend"?"end":"":!p.tagName||p.selfClosing||this.voidElements.hasOwnProperty(p.tagName.toLowerCase())||this._findEndTagInLine(h,f,p.tagName,p.end.column)?"":"start":this.getCommentFoldWidget(h,f)},this.getCommentFoldWidget=function(h,d){return/comment/.test(h.getState(d))&&/";break}return p}else if(u(y,"tag-close"))return p.selfClosing=y.value=="/>",p;p.start.column+=y.value.length}return null},this._findEndTagInLine=function(h,d,f,p){for(var g=h.getTokens(d),y=0,b=0;bb)break;var v=this.getFoldWidgetRange(c,"all",u);if(v){if(v.start.row<=f)break;if(v.isMultiLine())u=v.end.row;else if(d==b)break}g=u}}return new o(f,p,g,c.getLine(g).length)},this.getCommentRegionBlock=function(c,u,h){for(var d=u.search(/\s*$/),f=c.getLength(),p=h,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++hp)return new o(p,d,v,u.length)}}).call(a.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./xml").FoldMode,l=r("./cstyle").FoldMode,a=n.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end))),this.xmlFoldMode=new o};s.inherits(a,l),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,u,h){var d=this.getFoldWidgetBase(c,u,h);return d||this.xmlFoldMode.getFoldWidget(c,u,h)},this.getFoldWidgetRange=function(c,u,h,d){var f=this.getFoldWidgetRangeBase(c,u,h,d);return f||this.xmlFoldMode.getFoldWidgetRange(c,u,h)}}).call(a.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,l=r("./javascript_highlight_rules").JavaScriptHighlightRules,a=r("./matching_brace_outdent").MatchingBraceOutdent,c=r("../worker/worker_client").WorkerClient,u=r("./behaviour/javascript").JavaScriptBehaviour,h=r("./folding/javascript").FoldMode,d=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new u,this.foldingRules=new h};s.inherits(d,o),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(f,p,g){var y=this.$getIndent(p),b=this.getTokenizer().getLineTokens(p,f),v=b.tokens,E=b.state;if(v.length&&v[v.length-1].type=="comment")return y;if(f=="start"||f=="no_regex"){var D=p.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);D&&(y+=g)}else if(f=="doc-start"){if(E=="start"||E=="no_regex")return"";var D=p.match(/^\s*(\/?)\*/);D&&(D[1]&&(y+=" "),y+="* ")}return y},this.checkOutdent=function(f,p,g){return this.$outdent.checkOutdent(p,g)},this.autoOutdent=function(f,p,g){this.$outdent.autoOutdent(p,g)},this.createWorker=function(f){var p=new c(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return p.attachToDocument(f.getDocument()),p.on("annotate",function(g){f.setAnnotations(g.data)}),p.on("terminate",function(){f.clearAnnotations()}),p},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(d.prototype),n.Mode=d}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop");r("../lib/lang");var o=r("./text_highlight_rules").TextHighlightRules,l=n.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",a=n.supportFunction="rgb|rgba|url|attr|counter|counters",c=n.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",u=n.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",h=n.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=n.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",f=n.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=n.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",g=function(){var y=this.createKeywordMapper({"support.function":a,"support.constant":c,"support.type":l,"support.constant.color":u,"support.constant.fonts":h},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:d},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:f},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{include:"url"},{token:y,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};s.inherits(g,o),n.CssHighlightRules=g}),ace.define("ace/mode/css_completions",["require","exports","module"],function(r,n,i){var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},o=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var l=document.createElement("c").style;for(var a in l)if(typeof l[a]=="string"){var c=a.replace(/[A-Z]/g,function(u){return"-"+u.toLowerCase()});s.hasOwnProperty(c)||(s[c]=1)}}this.completionsDefined=!0},this.getCompletions=function(l,a,c,u){if(this.completionsDefined||this.defineCompletions(),l==="ruleset"||a.$mode.$id=="ace/mode/scss"){var h=a.getLine(c.row).substr(0,c.column),d=/\([^)]*$/.test(h);return d&&(h=h.substr(h.lastIndexOf("(")+1)),/:[^;]+$/.test(h)?this.getPropertyValueCompletions(l,a,c,u):this.getPropertyCompletions(l,a,c,u,d)}return[]},this.getPropertyCompletions=function(l,a,c,u,h){h=h||!1;var d=Object.keys(s);return d.map(function(f){return{caption:f,snippet:f+": $0"+(h?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(l,a,c,u){var h=a.getLine(c.row).substr(0,c.column),d=(/([\w\-]+):[^:]*$/.exec(h)||{})[1];if(!d)return[];var f=[];return d in s&&typeof s[d]=="object"&&(f=Object.keys(s[d])),f.map(function(p){return{caption:p,snippet:p,meta:"property value",score:1e6}})}}).call(o.prototype),n.CssCompletions=o}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(r,n,i){var s=r("../../lib/oop");r("../behaviour").Behaviour;var o=r("./cstyle").CstyleBehaviour,l=r("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(c,u,h,d,f){if(f===":"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=new l(d,p.row,p.column),y=g.getCurrentToken();if(y&&y.value.match(/\s+/)&&(y=g.stepBackward()),y&&y.type==="support.type"){var b=d.doc.getLine(p.row),v=b.substring(p.column,p.column+1);if(v===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(p.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(c,u,h,d,f){var p=d.doc.getTextRange(f);if(!f.isMultiLine()&&p===":"){var g=h.getCursorPosition(),y=new l(d,g.row,g.column),b=y.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=y.stepBackward()),b&&b.type==="support.type"){var v=d.doc.getLine(f.start.row),E=v.substring(f.end.column,f.end.column+1);if(E===";")return f.end.column++,f}}}),this.add("semicolon","insertion",function(c,u,h,d,f){if(f===";"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=d.doc.getLine(p.row),y=g.substring(p.column,p.column+1);if(y===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(c,u,h,d,f){if(f==="!"&&h.selection.isEmpty()){var p=h.getCursorPosition(),g=d.doc.getLine(p.row);if(/^\s*(;|}|$)/.test(g.substring(p.column)))return{text:"!important",selection:[10,10]}}})};s.inherits(a,o),n.CssBehaviour=a}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../lib/oop"),o=r("./text").Mode,l=r("./css_highlight_rules").CssHighlightRules,a=r("./matching_brace_outdent").MatchingBraceOutdent,c=r("../worker/worker_client").WorkerClient,u=r("./css_completions").CssCompletions,h=r("./behaviour/css").CssBehaviour,d=r("./folding/cstyle").FoldMode,f=function(){this.HighlightRules=l,this.$outdent=new a,this.$behaviour=new h,this.$completer=new u,this.foldingRules=new d};s.inherits(f,o),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(p,g,y){var b=this.$getIndent(g),v=this.getTokenizer().getLineTokens(g,p).tokens;if(v.length&&v[v.length-1].type=="comment")return b;var E=g.match(/^.*\{\s*$/);return E&&(b+=y),b},this.checkOutdent=function(p,g,y){return this.$outdent.checkOutdent(g,y)},this.autoOutdent=function(p,g,y){this.$outdent.autoOutdent(g,y)},this.getCompletions=function(p,g,y,b){return this.$completer.getCompletions(p,g,y,b)},this.createWorker=function(p){var g=new c(["ace"],"ace/mode/css_worker","Worker");return g.attachToDocument(p.getDocument()),g.on("annotate",function(y){p.setAnnotations(y.data)}),g.on("terminate",function(){p.clearAnnotations()}),g},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(f.prototype),n.Mode=f}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("./text_highlight_rules").TextHighlightRules,l=function(a){var c="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+c+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+c+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:c},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===l&&this.normalizeRules()};(function(){this.embedTagRules=function(a,c,u){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+u+".tag-name.xml"],regex:"(<)("+u+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:c+"start"}]}),this.$rules[u+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(h,d,f){return f.splice(0),this.token}}],this.embedRules(a,c,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+u+".tag-name.xml"],regex:"(|$))",next:u+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),s.inherits(l,o),n.XmlHighlightRules=l}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),l=r("./css_highlight_rules").CssHighlightRules,a=r("./javascript_highlight_rules").JavaScriptHighlightRules,c=r("./xml_highlight_rules").XmlHighlightRules,u=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),h=function(){c.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(d,f){var p=u[f];return["meta.tag.punctuation."+(d=="<"?"":"end-")+"tag-open.xml","meta.tag"+(p?"."+p:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(l,"css-","style"),this.embedTagRules(new a({jsx:!1}).getRules(),"js-","script"),this.constructor===h&&this.normalizeRules()};s.inherits(h,c),n.HtmlHighlightRules=h}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(r,n,i){var s=r("../../lib/oop"),o=r("./fold_mode").FoldMode,l=n.FoldMode=function(a,c){this.defaultMode=a,this.subModes=c};s.inherits(l,o),(function(){this.$getMode=function(a){typeof a!="string"&&(a=a[0]);for(var c in this.subModes)if(a.indexOf(c)===0)return this.subModes[c];return null},this.$tryMode=function(a,c,u,h){var d=this.$getMode(a);return d?d.getFoldWidget(c,u,h):""},this.getFoldWidget=function(a,c,u){return this.$tryMode(a.getState(u-1),a,c,u)||this.$tryMode(a.getState(u),a,c,u)||this.defaultMode.getFoldWidget(a,c,u)},this.getFoldWidgetRange=function(a,c,u){var h=this.$getMode(a.getState(u-1));return(!h||!h.getFoldWidget(a,c,u))&&(h=this.$getMode(a.getState(u))),(!h||!h.getFoldWidget(a,c,u))&&(h=this.defaultMode),h.getFoldWidgetRange(a,c,u)}}).call(l.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(r,n,i){var s=r("../../lib/oop"),o=r("./mixed").FoldMode,l=r("./xml").FoldMode,a=r("./cstyle").FoldMode,c=n.FoldMode=function(u,h){o.call(this,new l(u,h),{"js-":new a,"css-":new a})};s.inherits(c,o)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(r,n,i){var s=r("../token_iterator").TokenIterator,o=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],l=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=o.concat(l),c={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},u=Object.keys(c);function h(g,y){return g.type.lastIndexOf(y+".xml")>-1}function d(g,y){for(var b=new s(g,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"tag-name");)v=b.stepBackward();if(v)return v.value}function f(g,y){for(var b=new s(g,y.row,y.column),v=b.getCurrentToken();v&&!h(v,"attribute-name");)v=b.stepBackward();if(v)return v.value}var p=function(){};(function(){this.getCompletions=function(g,y,b,v){var E=y.getTokenAt(b.row,b.column);if(!E)return[];if(h(E,"tag-name")||h(E,"tag-open")||h(E,"end-tag-open"))return this.getTagCompletions(g,y,b,v);if(h(E,"tag-whitespace")||h(E,"attribute-name"))return this.getAttributeCompletions(g,y,b,v);if(h(E,"attribute-value"))return this.getAttributeValueCompletions(g,y,b,v);var D=y.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(D)?this.getHTMLEntityCompletions(g,y,b,v):[]},this.getTagCompletions=function(g,y,b,v){return u.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(g,y,b,v){var E=d(y,b);if(!E)return[];var D=a;return E in c&&(D=D.concat(Object.keys(c[E]))),D.map(function(C){return{caption:C,snippet:C+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(g,y,b,v){var E=d(y,b),D=f(y,b);if(!E)return[];var C=[];return E in c&&D in c[E]&&typeof c[E][D]=="object"&&(C=Object.keys(c[E][D])),C.map(function(w){return{caption:w,snippet:w,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(g,y,b,v){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(D){return{caption:D,snippet:D,meta:"html entity",score:1e6}})}}).call(p.prototype),n.HtmlCompletions=p}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(r,n,i){var s=r("../lib/oop"),o=r("../lib/lang"),l=r("./text").Mode,a=r("./javascript").Mode,c=r("./css").Mode,u=r("./html_highlight_rules").HtmlHighlightRules,h=r("./behaviour/xml").XmlBehaviour,d=r("./folding/html").FoldMode,f=r("./html_completions").HtmlCompletions,p=r("../worker/worker_client").WorkerClient,g=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],y=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(v){this.fragmentContext=v&&v.fragmentContext,this.HighlightRules=u,this.$behaviour=new h,this.$completer=new f,this.createModeDelegates({"js-":a,"css-":c}),this.foldingRules=new d(this.voidElements,o.arrayToMap(y))};s.inherits(b,l),(function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(g),this.getNextLineIndent=function(v,E,D){return this.$getIndent(E)},this.checkOutdent=function(v,E,D){return!1},this.getCompletions=function(v,E,D,C){return this.$completer.getCompletions(v,E,D,C)},this.createWorker=function(v){if(this.constructor==b){var E=new p(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(v.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(D){v.setAnnotations(D.data)}),E.on("terminate",function(){v.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),n.Mode=b}),function(){ace.require(["ace/mode/html"],function(r){e&&(e.exports=r)})}()})(vle);var ble={exports:{}};(function(e,t){ace.define("ace/theme/dracula-css",["require","exports","module"],function(r,n,i){i.exports=`/* * Copyright © 2017 Zeno Rocha * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -1285,21 +1285,21 @@ Error generating stack: `+s.message+` .ace-dracula .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==") right repeat-y; } -`}),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],function(r,n,i){n.isDark=!0,n.cssClass="ace-dracula",n.cssText=r("./dracula-css"),n.$selectionColorConflict=!0;var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),function(){ace.require(["ace/theme/dracula"],function(r){e&&(e.exports=r)})}()})(ble);var xle={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(r,n,i){var s=r("./lib/dom"),o=r("./lib/oop"),a=r("./lib/event_emitter").EventEmitter,l=r("./lib/lang"),c=r("./range").Range,u=r("./range_list").RangeList,h=r("./keyboard/hash_handler").HashHandler,d=r("./tokenizer").Tokenizer,f=r("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,T,A){var $=w.session.getTextRange();return A?$.replace(/\n\r?([ \t]*\S)/g,` +`}),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],function(r,n,i){n.isDark=!0,n.cssClass="ace-dracula",n.cssText=r("./dracula-css"),n.$selectionColorConflict=!0;var s=r("../lib/dom");s.importCssString(n.cssText,n.cssClass,!1)}),function(){ace.require(["ace/theme/dracula"],function(r){e&&(e.exports=r)})}()})(ble);var xle={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(r,n,i){var s=r("./lib/dom"),o=r("./lib/oop"),l=r("./lib/event_emitter").EventEmitter,a=r("./lib/lang"),c=r("./range").Range,u=r("./range_list").RangeList,h=r("./keyboard/hash_handler").HashHandler,d=r("./tokenizer").Tokenizer,f=r("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,T,A){var $=w.session.getTextRange();return A?$.replace(/\n\r?([ \t]*\S)/g,` `+A+"$1"):$},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return f.getText&&f.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var T=w.session.$mode||{};return T.blockComment&&T.blockComment.start||""},BLOCK_COMMENT_END:function(w){var T=w.session.$mode||{};return T.blockComment&&T.blockComment.end||""},LINE_COMMENT:function(w){var T=w.session.$mode||{};return T.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function g(w){var T=new Date().toLocaleString("en-us",w);return T.length==1?"0"+T:T}var y=function(){function w(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return w.prototype.getTokenizer=function(){return w.$tokenizer||this.createTokenizer()},w.prototype.createTokenizer=function(){function T(I){return I=I.substr(1),/^\d+$/.test(I)?[{tabstopId:parseInt(I,10)}]:[{text:I}]}function A(I){return"(?:[^\\\\"+I+"]|\\\\.)"}var $={regex:"/("+A("/")+"+)/",onMatch:function(I,N,L){var F=L[0];return F.fmtString=!0,F.guard=I.slice(1,-1),F.flag="",""},next:"formatString"};return w.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(I,N,L){var F=I[1];return(F=="}"&&L.length||"`$\\".indexOf(F)!=-1)&&(I=F),[I]}},{regex:/}/,onMatch:function(I,N,L){return[L.length?L.shift():I]}},{regex:/\$(?:\d+|\w+)/,onMatch:T},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(I,N,L){var F=T(I.substr(1));return L.unshift(F[0]),F},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+A("\\|")+"*\\|",onMatch:function(I,N,L){var F=I.slice(1,-1).replace(/\\[,|\\]|,/g,function(P){return P.length==2?P[1]:"\0"}).split("\0").map(function(P){return{value:P}});return L[0].choices=F,[F[0]]},next:"start"},$,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(I,N,L){return L.length&&L[0].expectElse?(L[0].expectElse=!1,L[0].ifEnd={elseEnd:L[0]},[L[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(I,N,L){var F=I[1];return F=="}"&&L.length||"`$\\".indexOf(F)!=-1?I=F:F=="n"?I=` -`:F=="t"?I=" ":"ulULE".indexOf(F)!=-1&&(I={changeCase:F,local:F>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,N,L){var F=L.shift();return F&&(F.flag=I.slice(1,-1)),this.next=F&&F.tabstopId?"start":"",[F||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,N,L){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,N,L){var F={text:I.slice(2)};return L.unshift(F),[F]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,N,L){var F=L.shift();return this.next=F&&F.tabstopId?"start":"",[F||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,N,L){var F=L[0];return F.formatFunction=I.slice(2,-1),[L.shift()]},next:"formatString"},$,{regex:/:[\?\-+]?/,onMatch:function(I,N,L){I[1]=="+"&&(L[0].ifEnd=L[0]),I[1]=="?"&&(L[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(T,A){return this.getTokenizer().getLineTokens(T,A).tokens.map(function($){return $.value||$})},w.prototype.getVariableValue=function(T,A,$){if(/^\d+$/.test(A))return(this.variables.__||{})[A]||"";if(/^[A-Z]\d+$/.test(A))return(this.variables[A[0]+"__"]||{})[A.substr(1)]||"";if(A=A.replace(/^TM_/,""),!this.variables.hasOwnProperty(A))return"";var I=this.variables[A];return typeof I=="function"&&(I=this.variables[A](T,A,$)),I??""},w.prototype.tmStrFormat=function(T,A,$){if(!A.fmt)return T;var I=A.flag||"",N=A.guard;N=new RegExp(N,I.replace(/[^gim]/g,""));var L=typeof A.fmt=="string"?this.tokenizeTmSnippet(A.fmt,"formatString"):A.fmt,F=this,P=T.replace(N,function(){var _=F.variables.__;F.variables.__=[].slice.call(arguments);for(var M=F.resolveVariables(L,$),B="E",R=0;R=0&&P.splice(_,1)}}T.content?N(T):Array.isArray(T)&&T.forEach(N)},w.prototype.parseSnippetFile=function(T){T=T.replace(/\r/g,"");for(var A=[],$={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,N;N=I.exec(T);){if(N[1])try{$=JSON.parse(N[1]),A.push($)}catch{}if(N[4])$.content=N[4].replace(/^\t/gm,""),A.push($),$={};else{var L=N[2],F=N[3];if(L=="regex"){var P=/\/((?:[^\/\\]|\\.)*)|$/g;$.guard=P.exec(F)[1],$.trigger=P.exec(F)[1],$.endTrigger=P.exec(F)[1],$.endGuard=P.exec(F)[1]}else L=="snippet"?($.tabTrigger=F.match(/^\S*/)[0],$.name||($.name=F)):L&&($[L]=F)}}return A},w.prototype.getSnippetByName=function(T,A){var $=this.snippetNameMap,I;return this.getActiveScopes(A).some(function(N){var L=$[N];return L&&(I=L[T]),!!I},this),I},w}();o.implement(y.prototype,a);var b=function(w,T,A){A===void 0&&(A={});var $=w.getCursorPosition(),I=w.session.getLine($.row),N=w.session.getTabString(),L=I.match(/^\s*/)[0];$.column1?(Q=de[de.length-1].length,X+=de.length-1):Q+=Z.length,te+=Z}else Z&&(Z.start?Z.end={row:X,column:Q}:Z.start={row:X,column:Q})}),{text:te,tabstops:P,tokens:F}},v=function(){function w(T){if(this.index=0,this.ranges=[],this.tabstops=[],T.tabstopManager)return T.tabstopManager;T.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(T)}return w.prototype.attach=function(T){this.$openTabstops=null,this.selectedTabstop=null,this.editor=T,this.session=T.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(T){for(var A=T.action[0]=="r",$=this.selectedTabstop||{},I=$.parents||{},N=this.tabstops.slice(),L=0;L2&&(this.tabstops.length&&F.push(F.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,F))},w.prototype.addTabstopMarkers=function(T){var A=this.session;T.forEach(function($){$.markerId||($.markerId=A.addMarker($,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(T){var A=this.session;T.forEach(function($){A.removeMarker($.markerId),$.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var T=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&T--,this.tabstops.forEach(function(A){A.snippetId===T?this.addTabstopMarkers(A):this.removeTabstopMarkers(A)},this)}},w.prototype.removeRange=function(T){var A=T.tabstop.indexOf(T);A!=-1&&T.tabstop.splice(A,1),A=this.ranges.indexOf(T),A!=-1&&this.ranges.splice(A,1),A=T.tabstop.rangeList.ranges.indexOf(T),A!=-1&&T.tabstop.splice(A,1),this.session.removeMarker(T.markerId),T.tabstop.length||(A=this.tabstops.indexOf(T.tabstop),A!=-1&&this.tabstops.splice(A,1),this.tabstops.length||this.detach())},w}();v.prototype.keyboardHandler=new h,v.prototype.keyboardHandler.bindKeys({Tab:function(w){n.snippetManager&&n.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var E=function(w,T){w.row==0&&(w.column+=T.column),w.row+=T.row},D=function(w,T){w.row==T.row&&(w.column-=T.column),w.row-=T.row};s.importCssString(` +`:F=="t"?I=" ":"ulULE".indexOf(F)!=-1&&(I={changeCase:F,local:F>"a"}),[I]}},{regex:"/\\w*}",onMatch:function(I,N,L){var F=L.shift();return F&&(F.flag=I.slice(1,-1)),this.next=F&&F.tabstopId?"start":"",[F||I]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(I,N,L){return[{text:I.slice(1)}]}},{regex:/\${\w+/,onMatch:function(I,N,L){var F={text:I.slice(2)};return L.unshift(F),[F]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(I,N,L){var F=L.shift();return this.next=F&&F.tabstopId?"start":"",[F||I]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(I,N,L){var F=L[0];return F.formatFunction=I.slice(2,-1),[L.shift()]},next:"formatString"},$,{regex:/:[\?\-+]?/,onMatch:function(I,N,L){I[1]=="+"&&(L[0].ifEnd=L[0]),I[1]=="?"&&(L[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),w.$tokenizer},w.prototype.tokenizeTmSnippet=function(T,A){return this.getTokenizer().getLineTokens(T,A).tokens.map(function($){return $.value||$})},w.prototype.getVariableValue=function(T,A,$){if(/^\d+$/.test(A))return(this.variables.__||{})[A]||"";if(/^[A-Z]\d+$/.test(A))return(this.variables[A[0]+"__"]||{})[A.substr(1)]||"";if(A=A.replace(/^TM_/,""),!this.variables.hasOwnProperty(A))return"";var I=this.variables[A];return typeof I=="function"&&(I=this.variables[A](T,A,$)),I??""},w.prototype.tmStrFormat=function(T,A,$){if(!A.fmt)return T;var I=A.flag||"",N=A.guard;N=new RegExp(N,I.replace(/[^gim]/g,""));var L=typeof A.fmt=="string"?this.tokenizeTmSnippet(A.fmt,"formatString"):A.fmt,F=this,P=T.replace(N,function(){var _=F.variables.__;F.variables.__=[].slice.call(arguments);for(var M=F.resolveVariables(L,$),j="E",R=0;R=0&&P.splice(_,1)}}T.content?N(T):Array.isArray(T)&&T.forEach(N)},w.prototype.parseSnippetFile=function(T){T=T.replace(/\r/g,"");for(var A=[],$={},I=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,N;N=I.exec(T);){if(N[1])try{$=JSON.parse(N[1]),A.push($)}catch{}if(N[4])$.content=N[4].replace(/^\t/gm,""),A.push($),$={};else{var L=N[2],F=N[3];if(L=="regex"){var P=/\/((?:[^\/\\]|\\.)*)|$/g;$.guard=P.exec(F)[1],$.trigger=P.exec(F)[1],$.endTrigger=P.exec(F)[1],$.endGuard=P.exec(F)[1]}else L=="snippet"?($.tabTrigger=F.match(/^\S*/)[0],$.name||($.name=F)):L&&($[L]=F)}}return A},w.prototype.getSnippetByName=function(T,A){var $=this.snippetNameMap,I;return this.getActiveScopes(A).some(function(N){var L=$[N];return L&&(I=L[T]),!!I},this),I},w}();o.implement(y.prototype,l);var b=function(w,T,A){A===void 0&&(A={});var $=w.getCursorPosition(),I=w.session.getLine($.row),N=w.session.getTabString(),L=I.match(/^\s*/)[0];$.column1?(Q=de[de.length-1].length,X+=de.length-1):Q+=Z.length,te+=Z}else Z&&(Z.start?Z.end={row:X,column:Q}:Z.start={row:X,column:Q})}),{text:te,tabstops:P,tokens:F}},v=function(){function w(T){if(this.index=0,this.ranges=[],this.tabstops=[],T.tabstopManager)return T.tabstopManager;T.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(T)}return w.prototype.attach=function(T){this.$openTabstops=null,this.selectedTabstop=null,this.editor=T,this.session=T.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},w.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},w.prototype.onChange=function(T){for(var A=T.action[0]=="r",$=this.selectedTabstop||{},I=$.parents||{},N=this.tabstops.slice(),L=0;L2&&(this.tabstops.length&&F.push(F.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,F))},w.prototype.addTabstopMarkers=function(T){var A=this.session;T.forEach(function($){$.markerId||($.markerId=A.addMarker($,"ace_snippet-marker","text"))})},w.prototype.removeTabstopMarkers=function(T){var A=this.session;T.forEach(function($){A.removeMarker($.markerId),$.markerId=null})},w.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var T=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&T--,this.tabstops.forEach(function(A){A.snippetId===T?this.addTabstopMarkers(A):this.removeTabstopMarkers(A)},this)}},w.prototype.removeRange=function(T){var A=T.tabstop.indexOf(T);A!=-1&&T.tabstop.splice(A,1),A=this.ranges.indexOf(T),A!=-1&&this.ranges.splice(A,1),A=T.tabstop.rangeList.ranges.indexOf(T),A!=-1&&T.tabstop.splice(A,1),this.session.removeMarker(T.markerId),T.tabstop.length||(A=this.tabstops.indexOf(T.tabstop),A!=-1&&this.tabstops.splice(A,1),this.tabstops.length||this.detach())},w}();v.prototype.keyboardHandler=new h,v.prototype.keyboardHandler.bindKeys({Tab:function(w){n.snippetManager&&n.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}});var E=function(w,T){w.row==0&&(w.column+=T.column),w.row+=T.row},D=function(w,T){w.row==T.row&&(w.column-=T.column),w.row-=T.row};s.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; -}`,"snippets.css",!1),n.snippetManager=new y;var C=r("./editor").Editor;(function(){this.insertSnippet=function(w,T){return n.snippetManager.insertSnippet(this,w,T)},this.expandSnippet=function(w){return n.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(r,n,i){var s=r("../virtual_renderer").VirtualRenderer,o=r("../editor").Editor,a=r("../range").Range,l=r("../lib/event"),c=r("../lib/lang"),u=r("../lib/dom"),h=r("../config").nls,d=r("./../lib/useragent"),f=function(E){return"suggest-aria-id:".concat(E)},p=d.isSafari?"menu":"listbox",g=d.isSafari?"menuitem":"option",y=d.isSafari?"aria-current":"aria-selected",b=function(E){var D=new s(E);D.$maxLines=4;var C=new o(D);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},v=function(){function E(D){var C=u.createElement("div"),w=b(C);D&&D.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",p),w.renderer.$textLayer.element.setAttribute("aria-roledescription",h("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",h("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var T=function(){};w.focus=T,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=T,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(P){var _=P.getDocumentPosition();w.selection.moveToPosition(_),I.start.row=I.end.row=_.row,P.stop()});var A,$=new a(-1,0,-1,1/0),I=new a(-1,0,-1,1/0);I.id=w.session.addMarker(I,"ace_active-line","fullLine"),w.setSelectOnHover=function(P){P?$.id&&(w.session.removeMarker($.id),$.id=null):$.id=w.session.addMarker($,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(P){if(!A){A=P;return}if(!(A.x==P.x&&A.y==P.y)){A=P,A.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var _=A.getDocumentPosition().row;$.start.row!=_&&($.id||w.setRow(_),L(_))}}),w.renderer.on("beforeRender",function(){if(A&&$.start.row!=-1){A.$pos=null;var P=A.getDocumentPosition().row;$.id||w.setRow(P),L(P,!0)}}),w.renderer.on("afterRender",function(){var P=w.getRow(),_=w.renderer.$textLayer,M=_.element.childNodes[P-_.config.firstRow],B=document.activeElement;if(M!==w.selectedNode&&w.selectedNode&&(u.removeCssClass(w.selectedNode,"ace_selected"),B.removeAttribute("aria-activedescendant"),w.selectedNode.removeAttribute(y),w.selectedNode.removeAttribute("id")),w.selectedNode=M,M){u.addCssClass(M,"ace_selected");var R=f(P);M.id=R,_.element.setAttribute("aria-activedescendant",R),B.setAttribute("aria-activedescendant",R),M.setAttribute("role",g),M.setAttribute("aria-roledescription",h("autocomplete.popup.item.aria-roledescription","item")),M.setAttribute("aria-label",w.getData(P).caption||w.getData(P).value),M.setAttribute("aria-setsize",w.data.length),M.setAttribute("aria-posinset",P+1),M.setAttribute("aria-describedby","doc-tooltip"),M.setAttribute(y,"true")}});var N=function(){L(-1)},L=function(P,_){P!==$.start.row&&($.start.row=$.end.row=P,_||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return $.start.row},l.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,N()}),w.on("hide",N),w.on("changeSelection",N),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(P){var _=w.data[P];return typeof _=="string"?_:_&&_.value||""};var F=w.session.bgTokenizer;return F.$tokenizeRow=function(P){var _=w.data[P],M=[];if(!_)return M;typeof _=="string"&&(_={value:_});var B=_.caption||_.value||_.name;function R(Z,de){Z&&M.push({type:(_.className||"")+(de||""),value:Z})}for(var G=B.toLowerCase(),q=(w.filterText||"").toLowerCase(),ee=0,Y=0,X=0;X<=q.length;X++)if(X!=Y&&(_.matchMask&1<=Y?M="bottom":M="top"),M==="top"?(X.bottom=P.top-this.$borderSize,X.top=X.bottom-Y):M==="bottom"&&(X.top=P.top+_+this.$borderSize,X.bottom=X.top+Y);var Z=X.top>=0&&X.bottom<=G;if(!B&&!Z)return!1;Z?ee.$maxPixelHeight=null:M==="top"?ee.$maxPixelHeight=te:ee.$maxPixelHeight=Q,M==="top"?(R.style.top="",R.style.bottom=G-X.bottom+"px",w.isTopdown=!1):(R.style.top=X.top+"px",R.style.bottom="",w.isTopdown=!0),R.style.display="";var de=P.left;return de+R.offsetWidth>q&&(de=q-R.offsetWidth),R.style.left=de+"px",R.style.right="",w.isOpen||(w.isOpen=!0,this._signal("show"),A=null),w.anchorPos=P,w.anchor=M,!0},w.show=function(P,_,M){this.tryShow(P,_,M?"bottom":void 0,!0)},w.goTo=function(P){var _=this.getRow(),M=this.session.getLength()-1;switch(P){case"up":_=_<=0?M:_-1;break;case"down":_=_>=M?-1:_+1;break;case"start":_=0;break;case"end":_=M;break}this.setRow(_)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return E}();u.importCssString(` +}`,"snippets.css",!1),n.snippetManager=new y;var C=r("./editor").Editor;(function(){this.insertSnippet=function(w,T){return n.snippetManager.insertSnippet(this,w,T)},this.expandSnippet=function(w){return n.snippetManager.expandWithTab(this,w)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(r,n,i){var s=r("../virtual_renderer").VirtualRenderer,o=r("../editor").Editor,l=r("../range").Range,a=r("../lib/event"),c=r("../lib/lang"),u=r("../lib/dom"),h=r("../config").nls,d=r("./../lib/useragent"),f=function(E){return"suggest-aria-id:".concat(E)},p=d.isSafari?"menu":"listbox",g=d.isSafari?"menuitem":"option",y=d.isSafari?"aria-current":"aria-selected",b=function(E){var D=new s(E);D.$maxLines=4;var C=new o(D);return C.setHighlightActiveLine(!1),C.setShowPrintMargin(!1),C.renderer.setShowGutter(!1),C.renderer.setHighlightGutterLine(!1),C.$mouseHandler.$focusTimeout=0,C.$highlightTagPending=!0,C},v=function(){function E(D){var C=u.createElement("div"),w=b(C);D&&D.appendChild(C),C.style.display="none",w.renderer.content.style.cursor="default",w.renderer.setStyle("ace_autocomplete"),w.renderer.$textLayer.element.setAttribute("role",p),w.renderer.$textLayer.element.setAttribute("aria-roledescription",h("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),w.renderer.$textLayer.element.setAttribute("aria-label",h("autocomplete.popup.aria-label","Autocomplete suggestions")),w.renderer.textarea.setAttribute("aria-hidden","true"),w.setOption("displayIndentGuides",!1),w.setOption("dragDelay",150);var T=function(){};w.focus=T,w.$isFocused=!0,w.renderer.$cursorLayer.restartTimer=T,w.renderer.$cursorLayer.element.style.opacity="0",w.renderer.$maxLines=8,w.renderer.$keepTextAreaAtCursor=!1,w.setHighlightActiveLine(!1),w.session.highlight(""),w.session.$searchHighlight.clazz="ace_highlight-marker",w.on("mousedown",function(P){var _=P.getDocumentPosition();w.selection.moveToPosition(_),I.start.row=I.end.row=_.row,P.stop()});var A,$=new l(-1,0,-1,1/0),I=new l(-1,0,-1,1/0);I.id=w.session.addMarker(I,"ace_active-line","fullLine"),w.setSelectOnHover=function(P){P?$.id&&(w.session.removeMarker($.id),$.id=null):$.id=w.session.addMarker($,"ace_line-hover","fullLine")},w.setSelectOnHover(!1),w.on("mousemove",function(P){if(!A){A=P;return}if(!(A.x==P.x&&A.y==P.y)){A=P,A.scrollTop=w.renderer.scrollTop,w.isMouseOver=!0;var _=A.getDocumentPosition().row;$.start.row!=_&&($.id||w.setRow(_),L(_))}}),w.renderer.on("beforeRender",function(){if(A&&$.start.row!=-1){A.$pos=null;var P=A.getDocumentPosition().row;$.id||w.setRow(P),L(P,!0)}}),w.renderer.on("afterRender",function(){var P=w.getRow(),_=w.renderer.$textLayer,M=_.element.childNodes[P-_.config.firstRow],j=document.activeElement;if(M!==w.selectedNode&&w.selectedNode&&(u.removeCssClass(w.selectedNode,"ace_selected"),j.removeAttribute("aria-activedescendant"),w.selectedNode.removeAttribute(y),w.selectedNode.removeAttribute("id")),w.selectedNode=M,M){u.addCssClass(M,"ace_selected");var R=f(P);M.id=R,_.element.setAttribute("aria-activedescendant",R),j.setAttribute("aria-activedescendant",R),M.setAttribute("role",g),M.setAttribute("aria-roledescription",h("autocomplete.popup.item.aria-roledescription","item")),M.setAttribute("aria-label",w.getData(P).caption||w.getData(P).value),M.setAttribute("aria-setsize",w.data.length),M.setAttribute("aria-posinset",P+1),M.setAttribute("aria-describedby","doc-tooltip"),M.setAttribute(y,"true")}});var N=function(){L(-1)},L=function(P,_){P!==$.start.row&&($.start.row=$.end.row=P,_||w.session._emit("changeBackMarker"),w._emit("changeHoverMarker"))};w.getHoveredRow=function(){return $.start.row},a.addListener(w.container,"mouseout",function(){w.isMouseOver=!1,N()}),w.on("hide",N),w.on("changeSelection",N),w.session.doc.getLength=function(){return w.data.length},w.session.doc.getLine=function(P){var _=w.data[P];return typeof _=="string"?_:_&&_.value||""};var F=w.session.bgTokenizer;return F.$tokenizeRow=function(P){var _=w.data[P],M=[];if(!_)return M;typeof _=="string"&&(_={value:_});var j=_.caption||_.value||_.name;function R(Z,de){Z&&M.push({type:(_.className||"")+(de||""),value:Z})}for(var G=j.toLowerCase(),q=(w.filterText||"").toLowerCase(),ee=0,Y=0,X=0;X<=q.length;X++)if(X!=Y&&(_.matchMask&1<=Y?M="bottom":M="top"),M==="top"?(X.bottom=P.top-this.$borderSize,X.top=X.bottom-Y):M==="bottom"&&(X.top=P.top+_+this.$borderSize,X.bottom=X.top+Y);var Z=X.top>=0&&X.bottom<=G;if(!j&&!Z)return!1;Z?ee.$maxPixelHeight=null:M==="top"?ee.$maxPixelHeight=te:ee.$maxPixelHeight=Q,M==="top"?(R.style.top="",R.style.bottom=G-X.bottom+"px",w.isTopdown=!1):(R.style.top=X.top+"px",R.style.bottom="",w.isTopdown=!0),R.style.display="";var de=P.left;return de+R.offsetWidth>q&&(de=q-R.offsetWidth),R.style.left=de+"px",R.style.right="",w.isOpen||(w.isOpen=!0,this._signal("show"),A=null),w.anchorPos=P,w.anchor=M,!0},w.show=function(P,_,M){this.tryShow(P,_,M?"bottom":void 0,!0)},w.goTo=function(P){var _=this.getRow(),M=this.session.getLength()-1;switch(P){case"up":_=_<=0?M:_-1;break;case"down":_=_>=M?-1:_+1;break;case"start":_=0;break;case"end":_=M;break}this.setRow(_)},w.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},w.$imageSize=0,w.$borderSize=1,w}return E}();u.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; @@ -1391,109 +1391,109 @@ Error generating stack: `+s.message+` animation: none; } } -`,"autocompletion.css",!1),n.AcePopup=v,n.$singleLineEditor=b,n.getAriaId=f}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(r,n,i){var s=function(){function o(a){this.editor=a,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return o.prototype.setScreenReaderContent=function(a){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var c=this.popup.getRow(),u=this.popup.renderer.$textLayer,h=u.element.childNodes[c-u.config.firstRow];if(h){for(var d="doc-tooltip ",f=0;f=0&&l.test(o[u]);u--)c.push(o[u]);return c.reverse().join("")},n.retrieveFollowingIdentifier=function(o,a,l){l=l||s;for(var c=[],u=a;u0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var T=this.popup.getData(w);T&&(!C||T.hideInlinePreview)&&this.$seen(T)}},D.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},D.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},D.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},D.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},D.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,T=w.layerConfig.lineHeight,A=w.$cursorLayer.getPixelPosition(this.base,!0);A.left-=this.popup.getTextLeftOffset();var $=C.container.getBoundingClientRect();A.top+=$.top-w.layerConfig.offset,A.left+=$.left-C.renderer.scrollLeft,A.left+=w.gutterWidth;var I={top:A.top,left:A.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(I.top+=w.$ghostTextWidget.el.offsetHeight);var N=C.container.getBoundingClientRect().bottom-T,L=Nthis.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function(A,$){return $.exactMatch-A.exactMatch||$.$score-A.$score||(A.caption||A.value).localeCompare($.caption||$.value)});var T=null;w=w.filter(function(A){var $=A.snippet||A.caption||A.value;return $===T?!1:(T=$,!0)}),this.filtered=w},D.prototype.filterCompletions=function(C,w){var T=[],A=w.toUpperCase(),$=w.toLowerCase();e:for(var I=0,N;N=C[I];I++){var L=!this.ignoreCaption&&N.caption||N.value||N.snippet;if(L){var F=-1,P=0,_=0,M,B;if(this.exactMatch){if(w!==L.substr(0,w.length))continue e}else{var R=L.toLowerCase().indexOf($);if(R>-1)_=R;else for(var G=0;G=0&&(ee<0||q0&&(F===-1&&(_+=10),_+=B,P=P|1<",l.escapeHTML(A.caption),"","
",l.escapeHTML(d(A.snippet))].join(""))},id:"snippetCompleter"},p=[f,u,h];n.setCompleters=function(A){p.length=0,A&&p.push.apply(p,A)},n.addCompleter=function(A){p.push(A)},n.textCompleter=u,n.keyWordCompleter=h,n.snippetCompleter=f;var g={name:"expandSnippet",exec:function(A){return s.expandWithTab(A)},bindKey:"Tab"},y=function(A,$){b($.session.$mode)},b=function(A){typeof A=="string"&&(A=a.$modes[A]),A&&(s.files||(s.files={}),v(A.$id,A.snippetFileId),A.modes&&A.modes.forEach(b))},v=function(A,$){!$||!A||s.files[A]||(s.files[A]={},a.loadModule($,function(I){I&&(s.files[A]=I,!I.snippets&&I.snippetText&&(I.snippets=s.parseSnippetFile(I.snippetText)),s.register(I.snippets||[],I.scope),I.includeScopes&&(s.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(N){b("ace/mode/"+N)})))}))},E=function(A){var $=A.editor,I=$.completer&&$.completer.activated;if(A.command.name==="backspace")I&&!c.getCompletionPrefix($)&&$.completer.detach();else if(A.command.name==="insertstring"&&!I){D=A;var N=A.editor.$liveAutocompletionDelay;N?C.delay(N):w(A)}},D,C=l.delayedCall(function(){w(D)},0),w=function(A){var $=A.editor,I=c.getCompletionPrefix($),N=A.args,L=c.triggerAutocomplete($,N);if(I&&I.length>=$.$liveAutocompletionThreshold||L){var F=o.for($);F.autoShown=!0,F.showPopup($)}},T=r("../editor").Editor;r("../config").defineOptions(T.prototype,"editor",{enableBasicAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:p),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(A){A?(this.commands.addCommand(g),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(g),this.off("changeMode",y))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(r){e&&(e.exports=r)})}()})(xle);var wle=Object.create,u1=Object.defineProperty,Sle=Object.getOwnPropertyDescriptor,Dle=Object.getOwnPropertyNames,Ele=Object.getPrototypeOf,Cle=Object.prototype.hasOwnProperty,Tle=(e,t)=>()=>(e&&(t=e(e=0)),t),c1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h1=(e,t)=>{for(var r in t)u1(e,r,{get:t[r],enumerable:!0})},p8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Dle(t))!Cle.call(e,i)&&i!==r&&u1(e,i,{get:()=>t[i],enumerable:!(n=Sle(t,i))||n.enumerable});return e},Ng=(e,t,r)=>(r=e!=null?wle(Ele(e)):{},p8(t||!e||!e.__esModule?u1(r,"default",{value:e,enumerable:!0}):r,e)),Ale=e=>p8(u1({},"__esModule",{value:!0}),e),kle=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},$N=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},bp=(e,t,r)=>(kle(e,t,"access private method"),r),_le=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}t.prototype={diff:function(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var l=this;function c(v){return a?(setTimeout(function(){a(void 0,v)},0),!0):v}i=this.castInput(i),s=this.castInput(s),i=this.removeEmpty(this.tokenize(i)),s=this.removeEmpty(this.tokenize(s));var u=s.length,h=i.length,d=1,f=u+h;o.maxEditLength&&(f=Math.min(f,o.maxEditLength));var p=[{newPos:-1,components:[]}],g=this.extractCommon(p[0],s,i,0);if(p[0].newPos+1>=u&&g+1>=h)return c([{value:this.join(s),count:s.length}]);function y(){for(var v=-1*d;v<=d;v+=2){var E=void 0,D=p[v-1],C=p[v+1],w=(C?C.newPos:0)-v;D&&(p[v-1]=void 0);var T=D&&D.newPos+1=u&&w+1>=h)return c(r(l,E.components,s,i,l.useLongestToken));p[v]=E}d++}if(a)(function v(){setTimeout(function(){if(d>f)return a();y()||v()},0)})();else for(;d<=f;){var b=y();if(b)return b}},pushComponent:function(i,s,o){var a=i[i.length-1];a&&a.added===s&&a.removed===o?i[i.length-1]={count:a.count+1,added:s,removed:o}:i.push({count:1,added:s,removed:o})},extractCommon:function(i,s,o,a){for(var l=s.length,c=o.length,u=i.newPos,h=u-a,d=0;u+1b.length?E:b}),f.value=i.join(g)}else f.value=i.join(o.slice(h,h+f.count));h+=f.count,f.added||(d+=f.count)}}var y=s[u-1];return u>1&&typeof y.value=="string"&&(y.added||y.removed)&&i.equals("",y.value)&&(s[u-2].value+=y.value,s.pop()),s}function n(i){return{newPos:i.newPos,components:i.components.slice(0)}}}),$le=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=i,e.arrayDiff=void 0;var t=r(_le());function r(s){return s&&s.__esModule?s:{default:s}}var n=new t.default;e.arrayDiff=n,n.tokenize=function(s){return s.slice()},n.join=n.removeEmpty=function(s){return s};function i(s,o,a){return n.diff(s,o,a)}}),d1=c1((e,t)=>{var r=new Proxy(String,{get:()=>r});t.exports=r}),m8={};h1(m8,{default:()=>y8,shouldHighlight:()=>g8});var g8,y8,Fle=Tle(()=>{g8=()=>!1,y8=String}),Ple=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=h,e.default=d;var t=(Fle(),Ale(m8)),r=i(d1(),!0);function n(f){if(typeof WeakMap!="function")return null;var p=new WeakMap,g=new WeakMap;return(n=function(y){return y?g:p})(f)}function i(f,p){if(!p&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var g=n(p);if(g&&g.has(f))return g.get(f);var y={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in f)if(v!=="default"&&Object.prototype.hasOwnProperty.call(f,v)){var E=b?Object.getOwnPropertyDescriptor(f,v):null;E&&(E.get||E.set)?Object.defineProperty(y,v,E):y[v]=f[v]}return y.default=f,g&&g.set(f,y),y}var s;function o(f){return f?(s!=null||(s=new r.default.constructor({enabled:!0,level:1})),s):r.default}var a=!1;function l(f){return{gutter:f.grey,marker:f.red.bold,message:f.red.bold}}var c=/\r\n|[\n\r\u2028\u2029]/;function u(f,p,g){let y=Object.assign({column:0,line:-1},f.start),b=Object.assign({},y,f.end),{linesAbove:v=2,linesBelow:E=3}=g||{},D=y.line,C=y.column,w=b.line,T=b.column,A=Math.max(D-(v+1),0),$=Math.min(p.length,w+E);D===-1&&(A=0),w===-1&&($=p.length);let I=w-D,N={};if(I)for(let L=0;L<=I;L++){let F=L+D;if(!C)N[F]=!0;else if(L===0){let P=p[F-1].length;N[F]=[C,P-C+1]}else if(L===I)N[F]=[0,T];else{let P=p[F-L].length;N[F]=[0,P]}}else C===T?C?N[D]=[C,0]:N[D]=!0:N[D]=[C,T-C];return{start:A,end:$,markerLines:N}}function h(f,p,g={}){let y=(g.highlightCode||g.forceColor)&&(0,t.shouldHighlight)(g),b=o(g.forceColor),v=l(b),E=(N,L)=>y?N(L):L,D=f.split(c),{start:C,end:w,markerLines:T}=u(p,D,g),A=p.start&&typeof p.start.column=="number",$=String(w).length,I=(y?(0,t.default)(f,g):f).split(c,w).slice(C,w).map((N,L)=>{let F=C+1+L,P=` ${` ${F}`.slice(-$)} |`,_=T[F],M=!T[F+1];if(_){let B="";if(Array.isArray(_)){let R=N.slice(0,Math.max(_[0]-1,0)).replace(/[^\t]/g," "),G=_[1]||1;B=[` - `,E(v.gutter,P.replace(/\d/g," "))," ",R,E(v.marker,"^").repeat(G)].join(""),M&&g.message&&(B+=" "+E(v.message,g.message))}return[E(v.marker,">"),E(v.gutter,P),N.length>0?` ${N}`:"",B].join("")}else return` ${E(v.gutter,P)}${N.length>0?` ${N}`:""}`}).join(` +`,"autocompletion.css",!1),n.AcePopup=v,n.$singleLineEditor=b,n.getAriaId=f}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(r,n,i){var s=function(){function o(l){this.editor=l,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return o.prototype.setScreenReaderContent=function(l){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var c=this.popup.getRow(),u=this.popup.renderer.$textLayer,h=u.element.childNodes[c-u.config.firstRow];if(h){for(var d="doc-tooltip ",f=0;f=0&&a.test(o[u]);u--)c.push(o[u]);return c.reverse().join("")},n.retrieveFollowingIdentifier=function(o,l,a){a=a||s;for(var c=[],u=l;u0)for(var w=this.popup.getFirstVisibleRow();w<=this.popup.getLastVisibleRow();w++){var T=this.popup.getData(w);T&&(!C||T.hideInlinePreview)&&this.$seen(T)}},D.prototype.$onPopupShow=function(C){this.$onPopupChange(C),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},D.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var C=this.editor.container.parentNode,w=[];C;)w.push(C),C.addEventListener("scroll",this.onLayoutChange,{passive:!0}),C=C.parentNode;this.$elements=w}},D.prototype.unObserveLayoutChanges=function(){var C=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(w){w.removeEventListener("scroll",C.onLayoutChange,{passive:!0})}),this.$elements=null},D.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},D.prototype.$updatePopupPosition=function(){var C=this.editor,w=C.renderer,T=w.layerConfig.lineHeight,A=w.$cursorLayer.getPixelPosition(this.base,!0);A.left-=this.popup.getTextLeftOffset();var $=C.container.getBoundingClientRect();A.top+=$.top-w.layerConfig.offset,A.left+=$.left-C.renderer.scrollLeft,A.left+=w.gutterWidth;var I={top:A.top,left:A.left};w.$ghostText&&w.$ghostTextWidget&&this.base.row===w.$ghostText.position.row&&(I.top+=w.$ghostTextWidget.el.offsetHeight);var N=C.container.getBoundingClientRect().bottom-T,L=Nthis.filterText&&C.lastIndexOf(this.filterText,0)===0)var w=this.filtered;else var w=this.all;this.filterText=C,w=this.filterCompletions(w,this.filterText),w=w.sort(function(A,$){return $.exactMatch-A.exactMatch||$.$score-A.$score||(A.caption||A.value).localeCompare($.caption||$.value)});var T=null;w=w.filter(function(A){var $=A.snippet||A.caption||A.value;return $===T?!1:(T=$,!0)}),this.filtered=w},D.prototype.filterCompletions=function(C,w){var T=[],A=w.toUpperCase(),$=w.toLowerCase();e:for(var I=0,N;N=C[I];I++){var L=!this.ignoreCaption&&N.caption||N.value||N.snippet;if(L){var F=-1,P=0,_=0,M,j;if(this.exactMatch){if(w!==L.substr(0,w.length))continue e}else{var R=L.toLowerCase().indexOf($);if(R>-1)_=R;else for(var G=0;G=0&&(ee<0||q0&&(F===-1&&(_+=10),_+=j,P=P|1<",a.escapeHTML(A.caption),"","
",a.escapeHTML(d(A.snippet))].join(""))},id:"snippetCompleter"},p=[f,u,h];n.setCompleters=function(A){p.length=0,A&&p.push.apply(p,A)},n.addCompleter=function(A){p.push(A)},n.textCompleter=u,n.keyWordCompleter=h,n.snippetCompleter=f;var g={name:"expandSnippet",exec:function(A){return s.expandWithTab(A)},bindKey:"Tab"},y=function(A,$){b($.session.$mode)},b=function(A){typeof A=="string"&&(A=l.$modes[A]),A&&(s.files||(s.files={}),v(A.$id,A.snippetFileId),A.modes&&A.modes.forEach(b))},v=function(A,$){!$||!A||s.files[A]||(s.files[A]={},l.loadModule($,function(I){I&&(s.files[A]=I,!I.snippets&&I.snippetText&&(I.snippets=s.parseSnippetFile(I.snippetText)),s.register(I.snippets||[],I.scope),I.includeScopes&&(s.snippetMap[I.scope].includeScopes=I.includeScopes,I.includeScopes.forEach(function(N){b("ace/mode/"+N)})))}))},E=function(A){var $=A.editor,I=$.completer&&$.completer.activated;if(A.command.name==="backspace")I&&!c.getCompletionPrefix($)&&$.completer.detach();else if(A.command.name==="insertstring"&&!I){D=A;var N=A.editor.$liveAutocompletionDelay;N?C.delay(N):w(A)}},D,C=a.delayedCall(function(){w(D)},0),w=function(A){var $=A.editor,I=c.getCompletionPrefix($),N=A.args,L=c.triggerAutocomplete($,N);if(I&&I.length>=$.$liveAutocompletionThreshold||L){var F=o.for($);F.autoShown=!0,F.showPopup($)}},T=r("../editor").Editor;r("../config").defineOptions(T.prototype,"editor",{enableBasicAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:p),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(A){A?(this.completers||(this.completers=Array.isArray(A)?A:p),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(A){A?(this.commands.addCommand(g),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(g),this.off("changeMode",y))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(r){e&&(e.exports=r)})}()})(xle);var wle=Object.create,u1=Object.defineProperty,Sle=Object.getOwnPropertyDescriptor,Dle=Object.getOwnPropertyNames,Ele=Object.getPrototypeOf,Cle=Object.prototype.hasOwnProperty,Tle=(e,t)=>()=>(e&&(t=e(e=0)),t),c1=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h1=(e,t)=>{for(var r in t)u1(e,r,{get:t[r],enumerable:!0})},p8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Dle(t))!Cle.call(e,i)&&i!==r&&u1(e,i,{get:()=>t[i],enumerable:!(n=Sle(t,i))||n.enumerable});return e},Ng=(e,t,r)=>(r=e!=null?wle(Ele(e)):{},p8(t||!e||!e.__esModule?u1(r,"default",{value:e,enumerable:!0}):r,e)),Ale=e=>p8(u1({},"__esModule",{value:!0}),e),kle=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},$N=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},bp=(e,t,r)=>(kle(e,t,"access private method"),r),_le=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}t.prototype={diff:function(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=o.callback;typeof o=="function"&&(l=o,o={}),this.options=o;var a=this;function c(v){return l?(setTimeout(function(){l(void 0,v)},0),!0):v}i=this.castInput(i),s=this.castInput(s),i=this.removeEmpty(this.tokenize(i)),s=this.removeEmpty(this.tokenize(s));var u=s.length,h=i.length,d=1,f=u+h;o.maxEditLength&&(f=Math.min(f,o.maxEditLength));var p=[{newPos:-1,components:[]}],g=this.extractCommon(p[0],s,i,0);if(p[0].newPos+1>=u&&g+1>=h)return c([{value:this.join(s),count:s.length}]);function y(){for(var v=-1*d;v<=d;v+=2){var E=void 0,D=p[v-1],C=p[v+1],w=(C?C.newPos:0)-v;D&&(p[v-1]=void 0);var T=D&&D.newPos+1=u&&w+1>=h)return c(r(a,E.components,s,i,a.useLongestToken));p[v]=E}d++}if(l)(function v(){setTimeout(function(){if(d>f)return l();y()||v()},0)})();else for(;d<=f;){var b=y();if(b)return b}},pushComponent:function(i,s,o){var l=i[i.length-1];l&&l.added===s&&l.removed===o?i[i.length-1]={count:l.count+1,added:s,removed:o}:i.push({count:1,added:s,removed:o})},extractCommon:function(i,s,o,l){for(var a=s.length,c=o.length,u=i.newPos,h=u-l,d=0;u+1b.length?E:b}),f.value=i.join(g)}else f.value=i.join(o.slice(h,h+f.count));h+=f.count,f.added||(d+=f.count)}}var y=s[u-1];return u>1&&typeof y.value=="string"&&(y.added||y.removed)&&i.equals("",y.value)&&(s[u-2].value+=y.value,s.pop()),s}function n(i){return{newPos:i.newPos,components:i.components.slice(0)}}}),$le=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=i,e.arrayDiff=void 0;var t=r(_le());function r(s){return s&&s.__esModule?s:{default:s}}var n=new t.default;e.arrayDiff=n,n.tokenize=function(s){return s.slice()},n.join=n.removeEmpty=function(s){return s};function i(s,o,l){return n.diff(s,o,l)}}),d1=c1((e,t)=>{var r=new Proxy(String,{get:()=>r});t.exports=r}),m8={};h1(m8,{default:()=>y8,shouldHighlight:()=>g8});var g8,y8,Fle=Tle(()=>{g8=()=>!1,y8=String}),Ple=c1(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=h,e.default=d;var t=(Fle(),Ale(m8)),r=i(d1(),!0);function n(f){if(typeof WeakMap!="function")return null;var p=new WeakMap,g=new WeakMap;return(n=function(y){return y?g:p})(f)}function i(f,p){if(!p&&f&&f.__esModule)return f;if(f===null||typeof f!="object"&&typeof f!="function")return{default:f};var g=n(p);if(g&&g.has(f))return g.get(f);var y={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in f)if(v!=="default"&&Object.prototype.hasOwnProperty.call(f,v)){var E=b?Object.getOwnPropertyDescriptor(f,v):null;E&&(E.get||E.set)?Object.defineProperty(y,v,E):y[v]=f[v]}return y.default=f,g&&g.set(f,y),y}var s;function o(f){return f?(s!=null||(s=new r.default.constructor({enabled:!0,level:1})),s):r.default}var l=!1;function a(f){return{gutter:f.grey,marker:f.red.bold,message:f.red.bold}}var c=/\r\n|[\n\r\u2028\u2029]/;function u(f,p,g){let y=Object.assign({column:0,line:-1},f.start),b=Object.assign({},y,f.end),{linesAbove:v=2,linesBelow:E=3}=g||{},D=y.line,C=y.column,w=b.line,T=b.column,A=Math.max(D-(v+1),0),$=Math.min(p.length,w+E);D===-1&&(A=0),w===-1&&($=p.length);let I=w-D,N={};if(I)for(let L=0;L<=I;L++){let F=L+D;if(!C)N[F]=!0;else if(L===0){let P=p[F-1].length;N[F]=[C,P-C+1]}else if(L===I)N[F]=[0,T];else{let P=p[F-L].length;N[F]=[0,P]}}else C===T?C?N[D]=[C,0]:N[D]=!0:N[D]=[C,T-C];return{start:A,end:$,markerLines:N}}function h(f,p,g={}){let y=(g.highlightCode||g.forceColor)&&(0,t.shouldHighlight)(g),b=o(g.forceColor),v=a(b),E=(N,L)=>y?N(L):L,D=f.split(c),{start:C,end:w,markerLines:T}=u(p,D,g),A=p.start&&typeof p.start.column=="number",$=String(w).length,I=(y?(0,t.default)(f,g):f).split(c,w).slice(C,w).map((N,L)=>{let F=C+1+L,P=` ${` ${F}`.slice(-$)} |`,_=T[F],M=!T[F+1];if(_){let j="";if(Array.isArray(_)){let R=N.slice(0,Math.max(_[0]-1,0)).replace(/[^\t]/g," "),G=_[1]||1;j=[` + `,E(v.gutter,P.replace(/\d/g," "))," ",R,E(v.marker,"^").repeat(G)].join(""),M&&g.message&&(j+=" "+E(v.message,g.message))}return[E(v.marker,">"),E(v.gutter,P),N.length>0?` ${N}`:"",j].join("")}else return` ${E(v.gutter,P)}${N.length>0?` ${N}`:""}`}).join(` `);return g.message&&!A&&(I=`${" ".repeat($+1)}${g.message} -${I}`),y?b.reset(I):I}function d(f,p,g,y={}){if(!a){a=!0;let b="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let v=new Error(b);v.name="DeprecationWarning",console.warn(new Error(b))}}return g=Math.max(g,0),h(f,{start:{column:g,line:p}},y)}}),Ile={};h1(Ile,{__debug:()=>Fhe,check:()=>_he,doc:()=>tz,format:()=>l_,formatWithCursor:()=>nz,getSupportInfo:()=>$he,util:()=>rz,version:()=>she});var Nle=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},f1=Nle,Mle=Ng($le(),1);function Lle(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` +${I}`),y?b.reset(I):I}function d(f,p,g,y={}){if(!l){l=!0;let b="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let v=new Error(b);v.name="DeprecationWarning",console.warn(new Error(b))}}return g=Math.max(g,0),h(f,{start:{column:g,line:p}},y)}}),Ile={};h1(Ile,{__debug:()=>Fhe,check:()=>_he,doc:()=>tj,format:()=>l_,formatWithCursor:()=>nj,getSupportInfo:()=>$he,util:()=>rj,version:()=>she});var Nle=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},f1=Nle,Mle=Ng($le(),1);function Lle(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` `?"crlf":"cr":"lf"}function Jk(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` `}}function v8(e,t){let r;switch(t){case` `:r=/\n/g;break;case"\r":r=/\r/g;break;case`\r `:r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function Ole(e){return f1(!1,e,/\r\n?/g,` -`)}var th="string",du="array",rh="cursor",il="indent",sl="align",ol="trim",ms="group",ro="fill",_s="if-break",al="indent-if-break",ll="line-suffix",ul="line-suffix-boundary",gi="line",ya="label",no="break-parent",b8=new Set([rh,il,sl,ol,ms,ro,_s,al,ll,ul,gi,ya,no]);function Rle(e){if(typeof e=="string")return th;if(Array.isArray(e))return du;if(!e)return;let{type:t}=e;if(b8.has(t))return t}var nh=Rle,Ble=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function zle(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +`)}var th="string",du="array",rh="cursor",sl="indent",ol="align",al="trim",ms="group",ro="fill",_s="if-break",ll="indent-if-break",ul="line-suffix",cl="line-suffix-boundary",gi="line",ya="label",no="break-parent",b8=new Set([rh,sl,ol,al,ms,ro,_s,ll,ul,cl,gi,ya,no]);function Rle(e){if(typeof e=="string")return th;if(Array.isArray(e))return du;if(!e)return;let{type:t}=e;if(b8.has(t))return t}var nh=Rle,Ble=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function jle(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(nh(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ble([...b8].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var jle=class extends Error{constructor(r){super(zle(r));Ta(this,"name","InvalidDocError");this.doc=r}},Gd=jle,FN={};function Hle(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===FN){r(i.pop());continue}r&&i.push(s,FN);let o=nh(s);if(!o)throw new Gd(s);if((t==null?void 0:t(s))!==!1)switch(o){case du:case ro:{let a=o===du?s:s.parts;for(let l=a.length,c=l-1;c>=0;--c)i.push(a[c]);break}case _s:i.push(s.flatContents,s.breakContents);break;case ms:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case sl:case il:case al:case ya:case ll:i.push(s.contents);break;case th:case rh:case ol:case ul:case gi:case no:break;default:throw new Gd(s)}}}var Xk=Hle,Ule=()=>{},Wle=Ule;function L0(e){return{type:il,contents:e}}function qd(e,t){return{type:sl,contents:t,n:e}}function x8(e,t={}){return Wle(t.expandedStates),{type:ms,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Vle(e){return qd(Number.NEGATIVE_INFINITY,e)}function Gle(e){return qd({type:"root"},e)}function qle(e){return qd(-1,e)}function Kle(e,t){return x8(e[0],{...t,expandedStates:e})}function w8(e){return{type:ro,parts:e}}function Jle(e,t="",r={}){return{type:_s,breakContents:e,flatContents:t,groupId:r.groupId}}function Xle(e,t){return{type:al,contents:e,groupId:t.groupId,negate:t.negate}}function OC(e){return{type:ll,contents:e}}var Yle={type:ul},p1={type:no},Zle={type:ol},Yk={type:gi,hard:!0},S8={type:gi,hard:!0,literal:!0},D8={type:gi},Qle={type:gi,soft:!0},vc=[Yk,p1],E8=[S8,p1],RC={type:rh};function C8(e,t){let r=[];for(let n=0;n0){for(let i=0;i0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${n(s.contents)}${h})`}if(s.type===ms){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let h=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(d=>n(d)).join(",")}]${h})`:`group(${n(s.contents)}${h})`}if(s.type===ro)return`fill([${s.parts.map(u=>n(u)).join(", ")}])`;if(s.type===ll)return"lineSuffix("+n(s.contents)+")";if(s.type===ul)return"lineSuffixBoundary";if(s.type===ya)return`label(${JSON.stringify(s.label)}, ${n(s.contents)})`;throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let l=o+(a>0?` #${a}`:"");if(!r.has(l))return r.add(l),t[s]=`Symbol.for(${JSON.stringify(l)})`}}}var rue=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Vn=rue,nue=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function iue(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function sue(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var oue=e=>!(iue(e)||sue(e)),aue=/[^\x20-\x7F]/;function lue(e){if(!e)return 0;if(!aue.test(e))return e.length;e=e.replace(nue()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=oue(n)?1:2)}return t}var Zk=lue,uue=e=>{if(Array.isArray(e))return e;if(e.type!==ro)throw new Error(`Expect doc to be 'array' or '${ro}'.`);return e.parts};function m1(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(nh(s)){case du:return t(s.map(n));case ro:return t({...s,parts:s.parts.map(n)});case _s:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case ms:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case sl:case il:case al:case ya:case ll:return t({...s,contents:n(s.contents)});case th:case rh:case ol:case ul:case gi:case no:return t(s);default:throw new Gd(s)}}}function Qk(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,n=a)}return Xk(e,s),n}function cue(e){if(e.type===ms&&e.break||e.type===gi&&e.hard||e.type===no)return!0}function hue(e){return Qk(e,cue,!1)}function PN(e){if(e.length>0){let t=Vn(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function due(e){let t=new Set,r=[];function n(s){if(s.type===no&&PN(r),s.type===ms){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===ms&&r.pop().break&&PN(r)}Xk(e,n,i,!0)}function fue(e){return e.type===gi&&!e.hard?e.soft?"":" ":e.type===_s?e.flatContents:e}function pue(e){return m1(e,fue)}function IN(e){for(e=[...e];e.length>=2&&Vn(!1,e,-2).type===gi&&Vn(!1,e,-1).type===no;)e.length-=2;if(e.length>0){let t=cm(Vn(!1,e,-1));e[e.length-1]=t}return e}function cm(e){switch(nh(e)){case sl:case il:case al:case ms:case ll:case ya:{let t=cm(e.contents);return{...e,contents:t}}case _s:return{...e,breakContents:cm(e.breakContents),flatContents:cm(e.flatContents)};case ro:return{...e,parts:IN(e.parts)};case du:return IN(e);case th:return e.replace(/[\n\r]*$/,"");case rh:case ol:case ul:case gi:case no:break;default:throw new Gd(e)}return e}function A8(e){return cm(gue(e))}function mue(e){switch(nh(e)){case ro:if(e.parts.every(t=>t===""))return"";break;case ms:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ms&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case sl:case il:case al:case ll:if(!e.contents)return"";break;case _s:if(!e.flatContents&&!e.breakContents)return"";break;case du:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Vn(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case th:case rh:case ol:case ul:case gi:case ya:case no:break;default:throw new Gd(e)}return e}function gue(e){return m1(e,t=>mue(t))}function yue(e,t=E8){return m1(e,r=>typeof r=="string"?C8(t,r.split(` -`)):r)}function vue(e){if(e.type===gi)return!0}function bue(e){return Qk(e,vue,!1)}function k8(e,t){return e.type===ya?{...e,contents:t(e.contents)}:t(e)}var ns=Symbol("MODE_BREAK"),Go=Symbol("MODE_FLAT"),hm=Symbol("cursor");function _8(){return{value:"",length:0,queue:[]}}function xue(e,t){return BC(e,{type:"indent"},t)}function wue(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||_8():t<0?BC(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:BC(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function BC(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let p of n)switch(p.type){case"indent":u(),r.useTabs?l(1):c(r.tabWidth);break;case"stringAlign":u(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function l(p){i+=" ".repeat(p),s+=r.tabWidth*p}function c(p){i+=" ".repeat(p),s+=p}function u(){r.useTabs?h():d()}function h(){o>0&&l(o),f()}function d(){a>0&&c(a),f()}function f(){o=0,a=0}}function zC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===hm){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(hm);return t}function Wy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:c,doc:u}=a.pop();switch(nh(u)){case th:l.push(u),r-=Zk(u);break;case du:case ro:{let h=uue(u);for(let d=h.length-1;d>=0;d--)a.push({mode:c,doc:h[d]});break}case il:case sl:case al:case ya:a.push({mode:c,doc:u.contents});break;case ol:r+=zC(l);break;case ms:{if(s&&u.break)return!1;let h=u.break?ns:c,d=u.expandedStates&&h===ns?Vn(!1,u.expandedStates,-1):u.contents;a.push({mode:h,doc:d});break}case _s:{let h=(u.groupId?i[u.groupId]||Go:c)===ns?u.breakContents:u.flatContents;h&&a.push({mode:c,doc:h});break}case gi:if(c===ns||u.hard)return!0;u.soft||(l.push(" "),r--);break;case ll:n=!0;break;case ul:if(n)return!1;break}}return!1}function g1(e,t){let r={},n=t.printWidth,i=Jk(t.endOfLine),s=0,o=[{ind:_8(),mode:ns,doc:e}],a=[],l=!1,c=[],u=0;for(due(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(nh(p)){case th:{let g=i!==` +Expected it to be ${n}.`}var zle=class extends Error{constructor(r){super(jle(r));Ta(this,"name","InvalidDocError");this.doc=r}},Gd=zle,FN={};function Hle(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===FN){r(i.pop());continue}r&&i.push(s,FN);let o=nh(s);if(!o)throw new Gd(s);if((t==null?void 0:t(s))!==!1)switch(o){case du:case ro:{let l=o===du?s:s.parts;for(let a=l.length,c=a-1;c>=0;--c)i.push(l[c]);break}case _s:i.push(s.flatContents,s.breakContents);break;case ms:if(n&&s.expandedStates)for(let l=s.expandedStates.length,a=l-1;a>=0;--a)i.push(s.expandedStates[a]);else i.push(s.contents);break;case ol:case sl:case ll:case ya:case ul:i.push(s.contents);break;case th:case rh:case al:case cl:case gi:case no:break;default:throw new Gd(s)}}}var Xk=Hle,Ule=()=>{},Wle=Ule;function L0(e){return{type:sl,contents:e}}function qd(e,t){return{type:ol,contents:t,n:e}}function x8(e,t={}){return Wle(t.expandedStates),{type:ms,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Vle(e){return qd(Number.NEGATIVE_INFINITY,e)}function Gle(e){return qd({type:"root"},e)}function qle(e){return qd(-1,e)}function Kle(e,t){return x8(e[0],{...t,expandedStates:e})}function w8(e){return{type:ro,parts:e}}function Jle(e,t="",r={}){return{type:_s,breakContents:e,flatContents:t,groupId:r.groupId}}function Xle(e,t){return{type:ll,contents:e,groupId:t.groupId,negate:t.negate}}function OC(e){return{type:ul,contents:e}}var Yle={type:cl},p1={type:no},Zle={type:al},Yk={type:gi,hard:!0},S8={type:gi,hard:!0,literal:!0},D8={type:gi},Qle={type:gi,soft:!0},vc=[Yk,p1],E8=[S8,p1],RC={type:rh};function C8(e,t){let r=[];for(let n=0;n0){for(let i=0;i0?`, { ${u.join(", ")} }`:"";return`indentIfBreak(${n(s.contents)}${h})`}if(s.type===ms){let u=[];s.break&&s.break!=="propagated"&&u.push("shouldBreak: true"),s.id&&u.push(`id: ${i(s.id)}`);let h=u.length>0?`, { ${u.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(d=>n(d)).join(",")}]${h})`:`group(${n(s.contents)}${h})`}if(s.type===ro)return`fill([${s.parts.map(u=>n(u)).join(", ")}])`;if(s.type===ul)return"lineSuffix("+n(s.contents)+")";if(s.type===cl)return"lineSuffixBoundary";if(s.type===ya)return`label(${JSON.stringify(s.label)}, ${n(s.contents)})`;throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let l=0;;l++){let a=o+(l>0?` #${l}`:"");if(!r.has(a))return r.add(a),t[s]=`Symbol.for(${JSON.stringify(a)})`}}}var rue=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Vn=rue,nue=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function iue(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function sue(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var oue=e=>!(iue(e)||sue(e)),aue=/[^\x20-\x7F]/;function lue(e){if(!e)return 0;if(!aue.test(e))return e.length;e=e.replace(nue()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=oue(n)?1:2)}return t}var Zk=lue,uue=e=>{if(Array.isArray(e))return e;if(e.type!==ro)throw new Error(`Expect doc to be 'array' or '${ro}'.`);return e.parts};function m1(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(nh(s)){case du:return t(s.map(n));case ro:return t({...s,parts:s.parts.map(n)});case _s:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case ms:{let{expandedStates:o,contents:l}=s;return o?(o=o.map(n),l=o[0]):l=n(l),t({...s,contents:l,expandedStates:o})}case ol:case sl:case ll:case ya:case ul:return t({...s,contents:n(s.contents)});case th:case rh:case al:case cl:case gi:case no:return t(s);default:throw new Gd(s)}}}function Qk(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let l=t(o);l!==void 0&&(i=!0,n=l)}return Xk(e,s),n}function cue(e){if(e.type===ms&&e.break||e.type===gi&&e.hard||e.type===no)return!0}function hue(e){return Qk(e,cue,!1)}function PN(e){if(e.length>0){let t=Vn(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function due(e){let t=new Set,r=[];function n(s){if(s.type===no&&PN(r),s.type===ms){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===ms&&r.pop().break&&PN(r)}Xk(e,n,i,!0)}function fue(e){return e.type===gi&&!e.hard?e.soft?"":" ":e.type===_s?e.flatContents:e}function pue(e){return m1(e,fue)}function IN(e){for(e=[...e];e.length>=2&&Vn(!1,e,-2).type===gi&&Vn(!1,e,-1).type===no;)e.length-=2;if(e.length>0){let t=cm(Vn(!1,e,-1));e[e.length-1]=t}return e}function cm(e){switch(nh(e)){case ol:case sl:case ll:case ms:case ul:case ya:{let t=cm(e.contents);return{...e,contents:t}}case _s:return{...e,breakContents:cm(e.breakContents),flatContents:cm(e.flatContents)};case ro:return{...e,parts:IN(e.parts)};case du:return IN(e);case th:return e.replace(/[\n\r]*$/,"");case rh:case al:case cl:case gi:case no:break;default:throw new Gd(e)}return e}function A8(e){return cm(gue(e))}function mue(e){switch(nh(e)){case ro:if(e.parts.every(t=>t===""))return"";break;case ms:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ms&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case ol:case sl:case ll:case ul:if(!e.contents)return"";break;case _s:if(!e.flatContents&&!e.breakContents)return"";break;case du:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Vn(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case th:case rh:case al:case cl:case gi:case ya:case no:break;default:throw new Gd(e)}return e}function gue(e){return m1(e,t=>mue(t))}function yue(e,t=E8){return m1(e,r=>typeof r=="string"?C8(t,r.split(` +`)):r)}function vue(e){if(e.type===gi)return!0}function bue(e){return Qk(e,vue,!1)}function k8(e,t){return e.type===ya?{...e,contents:t(e.contents)}:t(e)}var ns=Symbol("MODE_BREAK"),Go=Symbol("MODE_FLAT"),hm=Symbol("cursor");function _8(){return{value:"",length:0,queue:[]}}function xue(e,t){return BC(e,{type:"indent"},t)}function wue(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||_8():t<0?BC(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:BC(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function BC(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,l=0;for(let p of n)switch(p.type){case"indent":u(),r.useTabs?a(1):c(r.tabWidth);break;case"stringAlign":u(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,l+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function a(p){i+=" ".repeat(p),s+=r.tabWidth*p}function c(p){i+=" ".repeat(p),s+=p}function u(){r.useTabs?h():d()}function h(){o>0&&a(o),f()}function d(){l>0&&c(l),f()}function f(){o=0,l=0}}function jC(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===hm){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(hm);return t}function Wy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,l=[e],a=[];for(;r>=0;){if(l.length===0){if(o===0)return!0;l.push(t[--o]);continue}let{mode:c,doc:u}=l.pop();switch(nh(u)){case th:a.push(u),r-=Zk(u);break;case du:case ro:{let h=uue(u);for(let d=h.length-1;d>=0;d--)l.push({mode:c,doc:h[d]});break}case sl:case ol:case ll:case ya:l.push({mode:c,doc:u.contents});break;case al:r+=jC(a);break;case ms:{if(s&&u.break)return!1;let h=u.break?ns:c,d=u.expandedStates&&h===ns?Vn(!1,u.expandedStates,-1):u.contents;l.push({mode:h,doc:d});break}case _s:{let h=(u.groupId?i[u.groupId]||Go:c)===ns?u.breakContents:u.flatContents;h&&l.push({mode:c,doc:h});break}case gi:if(c===ns||u.hard)return!0;u.soft||(a.push(" "),r--);break;case ul:n=!0;break;case cl:if(n)return!1;break}}return!1}function g1(e,t){let r={},n=t.printWidth,i=Jk(t.endOfLine),s=0,o=[{ind:_8(),mode:ns,doc:e}],l=[],a=!1,c=[],u=0;for(due(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(nh(p)){case th:{let g=i!==` `?f1(!1,p,` -`,i):p;a.push(g),o.length>0&&(s+=Zk(g));break}case du:for(let g=p.length-1;g>=0;g--)o.push({ind:d,mode:f,doc:p[g]});break;case rh:if(u>=2)throw new Error("There are too many 'cursor' in doc.");a.push(hm),u++;break;case il:o.push({ind:xue(d,t),mode:f,doc:p.contents});break;case sl:o.push({ind:wue(d,p.n,t),mode:f,doc:p.contents});break;case ol:s-=zC(a);break;case ms:switch(f){case Go:if(!l){o.push({ind:d,mode:p.break?ns:Go,doc:p.contents});break}case ns:{l=!1;let g={ind:d,mode:Go,doc:p.contents},y=n-s,b=c.length>0;if(!p.break&&Wy(g,o,y,b,r))o.push(g);else if(p.expandedStates){let v=Vn(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:ns,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:ns,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:Go,doc:D};if(Wy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:ns,doc:p.contents});break}}p.id&&(r[p.id]=Vn(!1,o,-1).mode);break;case ro:{let g=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:Go,doc:b},D={ind:d,mode:ns,doc:b},C=Wy(E,[],g,c.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:Go,doc:v},T={ind:d,mode:ns,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let A={ind:d,mode:f,doc:w8(y)},$=y[0];Wy({ind:d,mode:Go,doc:[b,v,$]},[],g,c.length>0,r,!0)?o.push(A,w,E):C?o.push(A,T,E):o.push(A,T,D);break}case _s:case al:{let g=p.groupId?r[p.groupId]:f;if(g===ns){let y=p.type===_s?p.breakContents:p.negate?p.contents:L0(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(g===Go){let y=p.type===_s?p.flatContents:p.negate?L0(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case ll:c.push({ind:d,mode:f,doc:p.contents});break;case ul:c.length>0&&o.push({ind:d,mode:f,doc:Yk});break;case gi:switch(f){case Go:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case ns:if(c.length>0){o.push({ind:d,mode:f,doc:p},...c.reverse()),c.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=zC(a),a.push(i+d.value),s=d.length);break}break;case ya:o.push({ind:d,mode:f,doc:p.contents});break;case no:break;default:throw new Gd(p)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let h=a.indexOf(hm);if(h!==-1){let d=a.indexOf(hm,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),g=a.slice(d+1).join("");return{formatted:f+p+g,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function Sue(e,t,r=0){let n=0;for(let i=r;i1?Vn(!1,t,-2):null}getValue(){return Vn(!1,this.stack,-1)}getNode(t=0){let r=bp(this,Nv,jC).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:i}=n,s=Vn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{return t(this)}finally{n.length=i}}callParent(t,r=0){let n=bp(this,Nv,jC).call(this,r+1),i=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...i)}}each(t,...r){let{stack:n}=this,{length:i}=n,s=Vn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{for(let o=0;o{n[s]=t(i,s,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,i=this.stack[r--];for(let s of t){if(i===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],i=this.stack[r--]),s&&!s(i,n,o))return!1;n=this.stack[r--],i=this.stack[r--]}return!0}findAncestor(t){for(let r of bp(this,Bp,Mv).call(this))if(t(r))return r}hasAncestor(t){for(let r of bp(this,Bp,Mv).call(this))if(t(r))return!0;return!1}};Nv=new WeakSet,jC=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},Bp=new WeakSet,Mv=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var Eue=Due,$8=new Proxy(()=>{},{get:()=>$8}),HC=$8;function Cue(e){return e!==null&&typeof e=="object"}var Tue=Cue;function*F8(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Tue(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*Aue(e,t){let r=[e];for(let n=0;n{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o0&&(s+=Zk(g));break}case du:for(let g=p.length-1;g>=0;g--)o.push({ind:d,mode:f,doc:p[g]});break;case rh:if(u>=2)throw new Error("There are too many 'cursor' in doc.");l.push(hm),u++;break;case sl:o.push({ind:xue(d,t),mode:f,doc:p.contents});break;case ol:o.push({ind:wue(d,p.n,t),mode:f,doc:p.contents});break;case al:s-=jC(l);break;case ms:switch(f){case Go:if(!a){o.push({ind:d,mode:p.break?ns:Go,doc:p.contents});break}case ns:{a=!1;let g={ind:d,mode:Go,doc:p.contents},y=n-s,b=c.length>0;if(!p.break&&Wy(g,o,y,b,r))o.push(g);else if(p.expandedStates){let v=Vn(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:ns,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:ns,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:Go,doc:D};if(Wy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:ns,doc:p.contents});break}}p.id&&(r[p.id]=Vn(!1,o,-1).mode);break;case ro:{let g=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:Go,doc:b},D={ind:d,mode:ns,doc:b},C=Wy(E,[],g,c.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:Go,doc:v},T={ind:d,mode:ns,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let A={ind:d,mode:f,doc:w8(y)},$=y[0];Wy({ind:d,mode:Go,doc:[b,v,$]},[],g,c.length>0,r,!0)?o.push(A,w,E):C?o.push(A,T,E):o.push(A,T,D);break}case _s:case ll:{let g=p.groupId?r[p.groupId]:f;if(g===ns){let y=p.type===_s?p.breakContents:p.negate?p.contents:L0(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(g===Go){let y=p.type===_s?p.flatContents:p.negate?L0(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case ul:c.push({ind:d,mode:f,doc:p.contents});break;case cl:c.length>0&&o.push({ind:d,mode:f,doc:Yk});break;case gi:switch(f){case Go:if(p.hard)a=!0;else{p.soft||(l.push(" "),s+=1);break}case ns:if(c.length>0){o.push({ind:d,mode:f,doc:p},...c.reverse()),c.length=0;break}p.literal?d.root?(l.push(i,d.root.value),s=d.root.length):(l.push(i),s=0):(s-=jC(l),l.push(i+d.value),s=d.length);break}break;case ya:o.push({ind:d,mode:f,doc:p.contents});break;case no:break;default:throw new Gd(p)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let h=l.indexOf(hm);if(h!==-1){let d=l.indexOf(hm,h+1),f=l.slice(0,h).join(""),p=l.slice(h+1,d).join(""),g=l.slice(d+1).join("");return{formatted:f+p+g,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:l.join("")}}function Sue(e,t,r=0){let n=0;for(let i=r;i1?Vn(!1,t,-2):null}getValue(){return Vn(!1,this.stack,-1)}getNode(t=0){let r=bp(this,Nv,zC).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:i}=n,s=Vn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{return t(this)}finally{n.length=i}}callParent(t,r=0){let n=bp(this,Nv,zC).call(this,r+1),i=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...i)}}each(t,...r){let{stack:n}=this,{length:i}=n,s=Vn(!1,n,-1);for(let o of r)s=s[o],n.push(o,s);try{for(let o=0;o{n[s]=t(i,s,o)},...r),n}match(...t){let r=this.stack.length-1,n=null,i=this.stack[r--];for(let s of t){if(i===void 0)return!1;let o=null;if(typeof n=="number"&&(o=n,n=this.stack[r--],i=this.stack[r--]),s&&!s(i,n,o))return!1;n=this.stack[r--],i=this.stack[r--]}return!0}findAncestor(t){for(let r of bp(this,Bp,Mv).call(this))if(t(r))return r}hasAncestor(t){for(let r of bp(this,Bp,Mv).call(this))if(t(r))return!0;return!1}};Nv=new WeakSet,zC=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},Bp=new WeakSet,Mv=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var Eue=Due,$8=new Proxy(()=>{},{get:()=>$8}),HC=$8;function Cue(e){return e!==null&&typeof e=="object"}var Tue=Cue;function*F8(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>Tue(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let l of o)i(l)&&(yield l);else i(o)&&(yield o)}}function*Aue(e,t){let r=[e];for(let n=0;n{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o0}var Pue=Fue,N8=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Iue=e=>Object.keys(e).filter(t=>!N8.has(t));function Nue(e){return e?t=>e(t,N8):Iue}var y1=Nue;function Mue(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function t_(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Mue(e)}function fd(e,t){t.leading=!0,t.trailing=!1,t_(e,t)}function Xu(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),t_(e,t)}function pd(e,t){t.leading=!1,t.trailing=!0,t_(e,t)}var QS=new WeakMap;function r_(e,t){if(QS.has(e))return QS.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:o}=t;if(!n)return[];let a=((r==null?void 0:r(e,t))??[...F8(e,{getVisitorKeys:y1(i)})]).flatMap(l=>n(l)?[l]:r_(l,t));return a.sort((l,c)=>s(l)-s(c)||o(l)-o(c)),QS.set(e,a),a}function M8(e,t,r,n){let{locStart:i,locEnd:s}=r,o=i(t),a=s(t),l=r_(e,r),c,u,h=0,d=l.length;for(;h>1,p=l[f],g=i(p),y=s(p);if(g<=o&&a<=y)return M8(p,t,r,p);if(y<=o){c=p,h=f+1;continue}if(a<=g){u=p,d=f;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:f}=n,p=tD(f,t,r);c&&tD(f,c,r)!==p&&(c=null),u&&tD(f,u,r)!==p&&(u=null)}return{enclosingNode:n,precedingNode:c,followingNode:u}}var eD=()=>!1;function Lue(e,t){let{comments:r}=e;if(delete e.comments,!Pue(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:a={}},originalText:l}=t,{ownLine:c=eD,endOfLine:u=eD,remaining:h=eD}=a,d=r.map((f,p)=>({...M8(e,f,t),comment:f,text:l,options:t,ast:e,isLastComment:r.length-1===p}));for(let[f,p]of d.entries()){let{comment:g,precedingNode:y,enclosingNode:b,followingNode:v,text:E,options:D,ast:C,isLastComment:w}=p;if(D.parser==="json"||D.parser==="json5"||D.parser==="jsonc"||D.parser==="__js_expression"||D.parser==="__ts_expression"||D.parser==="__vue_expression"||D.parser==="__vue_ts_expression"){if(i(g)-i(C)<=0){fd(C,g);continue}if(s(g)-s(C)>=0){pd(C,g);continue}}let T;if(o?T=[p]:(g.enclosingNode=b,g.precedingNode=y,g.followingNode=v,T=[g,E,D,C,w]),Oue(E,D,d,f))g.placement="ownLine",c(...T)||(v?fd(v,g):y?pd(y,g):Xu(b||C,g));else if(Rue(E,D,d,f))g.placement="endOfLine",u(...T)||(y?pd(y,g):v?fd(v,g):Xu(b||C,g));else if(g.placement="remaining",!h(...T))if(y&&v){let A=n.length;A>0&&n[A-1].followingNode!==v&&NN(n,D),n.push(p)}else y?pd(y,g):v?fd(v,g):Xu(b||C,g)}if(NN(n,t),!o)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var L8=e=>!/[\S\n\u2028\u2029]/.test(e);function Oue(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=o(i);if(s)for(let c=n-1;c>=0;c--){let{comment:u,precedingNode:h}=r[c];if(h!==s||!L8(e.slice(a(u),l)))break;l=o(u)}return nu(e,l,{backwards:!0})}function Rue(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:o,locEnd:a}=t,l=a(i);if(s)for(let c=n+1;c0;--l){let{comment:c,precedingNode:u,followingNode:h}=e[l-1];HC.strictEqual(u,s),HC.strictEqual(h,o);let d=t.originalText.slice(t.locEnd(c),a);if(((n=(r=t.printer).isGap)==null?void 0:n.call(r,d,t))??/^[\s(]*$/.test(d))a=t.locStart(c);else break}for(let[c,{comment:u}]of e.entries())c1&&c.comments.sort((u,h)=>t.locStart(u)-t.locStart(h));e.length=0}function tD(e,t,r){let n=r.locStart(t)-1;for(let i=1;i!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:c}=a;l?i.push(zue(e,t)):c&&(o=jue(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function Uue(e,t,r){let{leading:n,trailing:i}=Hue(e,r);return!n&&!i?t:k8(t,s=>[n,s,i])}function Wue(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var R8=class extends Error{constructor(){super(...arguments);Ta(this,"name","ConfigError")}},MN=class extends Error{constructor(){super(...arguments);Ta(this,"name","UndefinedParserError")}},Vue={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var Ic=_ue;function $ue(e,t,r={}){let n=fu(e,r.backwards?t-1:t,r),i=Ic(e,n,r);return n!==i}var nu=$ue;function Fue(e){return Array.isArray(e)&&e.length>0}var Pue=Fue,N8=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Iue=e=>Object.keys(e).filter(t=>!N8.has(t));function Nue(e){return e?t=>e(t,N8):Iue}var y1=Nue;function Mue(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function t_(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Mue(e)}function fd(e,t){t.leading=!0,t.trailing=!1,t_(e,t)}function Xu(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),t_(e,t)}function pd(e,t){t.leading=!1,t.trailing=!0,t_(e,t)}var QS=new WeakMap;function r_(e,t){if(QS.has(e))return QS.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:o}=t;if(!n)return[];let l=((r==null?void 0:r(e,t))??[...F8(e,{getVisitorKeys:y1(i)})]).flatMap(a=>n(a)?[a]:r_(a,t));return l.sort((a,c)=>s(a)-s(c)||o(a)-o(c)),QS.set(e,l),l}function M8(e,t,r,n){let{locStart:i,locEnd:s}=r,o=i(t),l=s(t),a=r_(e,r),c,u,h=0,d=a.length;for(;h>1,p=a[f],g=i(p),y=s(p);if(g<=o&&l<=y)return M8(p,t,r,p);if(y<=o){c=p,h=f+1;continue}if(l<=g){u=p,d=f;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:f}=n,p=tD(f,t,r);c&&tD(f,c,r)!==p&&(c=null),u&&tD(f,u,r)!==p&&(u=null)}return{enclosingNode:n,precedingNode:c,followingNode:u}}var eD=()=>!1;function Lue(e,t){let{comments:r}=e;if(delete e.comments,!Pue(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:l={}},originalText:a}=t,{ownLine:c=eD,endOfLine:u=eD,remaining:h=eD}=l,d=r.map((f,p)=>({...M8(e,f,t),comment:f,text:a,options:t,ast:e,isLastComment:r.length-1===p}));for(let[f,p]of d.entries()){let{comment:g,precedingNode:y,enclosingNode:b,followingNode:v,text:E,options:D,ast:C,isLastComment:w}=p;if(D.parser==="json"||D.parser==="json5"||D.parser==="jsonc"||D.parser==="__js_expression"||D.parser==="__ts_expression"||D.parser==="__vue_expression"||D.parser==="__vue_ts_expression"){if(i(g)-i(C)<=0){fd(C,g);continue}if(s(g)-s(C)>=0){pd(C,g);continue}}let T;if(o?T=[p]:(g.enclosingNode=b,g.precedingNode=y,g.followingNode=v,T=[g,E,D,C,w]),Oue(E,D,d,f))g.placement="ownLine",c(...T)||(v?fd(v,g):y?pd(y,g):Xu(b||C,g));else if(Rue(E,D,d,f))g.placement="endOfLine",u(...T)||(y?pd(y,g):v?fd(v,g):Xu(b||C,g));else if(g.placement="remaining",!h(...T))if(y&&v){let A=n.length;A>0&&n[A-1].followingNode!==v&&NN(n,D),n.push(p)}else y?pd(y,g):v?fd(v,g):Xu(b||C,g)}if(NN(n,t),!o)for(let f of r)delete f.precedingNode,delete f.enclosingNode,delete f.followingNode}var L8=e=>!/[\S\n\u2028\u2029]/.test(e);function Oue(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:o,locEnd:l}=t,a=o(i);if(s)for(let c=n-1;c>=0;c--){let{comment:u,precedingNode:h}=r[c];if(h!==s||!L8(e.slice(l(u),a)))break;a=o(u)}return nu(e,a,{backwards:!0})}function Rue(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:o,locEnd:l}=t,a=l(i);if(s)for(let c=n+1;c0;--a){let{comment:c,precedingNode:u,followingNode:h}=e[a-1];HC.strictEqual(u,s),HC.strictEqual(h,o);let d=t.originalText.slice(t.locEnd(c),l);if(((n=(r=t.printer).isGap)==null?void 0:n.call(r,d,t))??/^[\s(]*$/.test(d))l=t.locStart(c);else break}for(let[c,{comment:u}]of e.entries())c1&&c.comments.sort((u,h)=>t.locStart(u)-t.locStart(h));e.length=0}function tD(e,t,r){let n=r.locStart(t)-1;for(let i=1;i!n.has(l)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let l=e.node;if(n!=null&&n.has(l))return;let{leading:a,trailing:c}=l;a?i.push(jue(e,t)):c&&(o=zue(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function Uue(e,t,r){let{leading:n,trailing:i}=Hue(e,r);return!n&&!i?t:k8(t,s=>[n,s,i])}function Wue(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}var R8=class extends Error{constructor(){super(...arguments);Ta(this,"name","ConfigError")}},MN=class extends Error{constructor(){super(...arguments);Ta(this,"name","UndefinedParserError")}},Vue={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function B8({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(i=>i.languages??[]),n=[];for(let i of que(Object.assign({},...e.map(({options:s})=>s),Vue)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...Gue(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),n.push(i));return{languages:r,options:n}}function*Gue(e,t,r){let n=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!n.has(s)){n.add(s);let o=r.find(l=>l.parsers&&Object.prototype.hasOwnProperty.call(l.parsers,s)),a=i.name;o!=null&&o.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function que(e){let t=[];for(let[r,n]of Object.entries(e)){let i={name:r,...n};Array.isArray(i.default)&&(i.default=Vn(!1,i.default,-1).value),t.push(i)}return t}var Kue=e=>String(e).split(/[/\\]/).pop();function LN(e,t){if(!t)return;let r=Kue(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function Jue(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function Xue(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=Jue(r,t.language)??LN(r,t.physicalFile)??LN(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Yue=Xue,md={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>md.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${md.key(r)}: ${md.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>md.value({[e]:t})},ON=Ng(d1(),1),Zue=(e,t,{descriptor:r})=>{let n=[`${ON.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${ON.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."},gd=Ng(d1(),1),z8=Symbol.for("vnopts.VALUE_NOT_EXIST"),Lv=Symbol.for("vnopts.VALUE_UNCHANGED"),RN=" ".repeat(2),Que=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(BN(e,t,n,r.descriptor)),i&&s.push([BN(e,t,i.title,r.descriptor)].concat(i.values.map(o=>j8(o,r.loggerPrintWidth))).join(` -`)),H8(s,r.loggerPrintWidth)};function BN(e,t,r,n){return[`Invalid ${gd.default.red(n.key(e))} value.`,`Expected ${gd.default.blue(r)},`,`but received ${t===z8?gd.default.gray("nothing"):gd.default.red(n.value(t))}.`].join(" ")}function j8({text:e,list:t},r){let n=[];return e&&n.push(`- ${gd.default.blue(e)}`),t&&n.push([`- ${gd.default.blue(t.title)}:`].concat(t.values.map(i=>j8(i,r-RN.length).replace(/^|\n/g,`$&${RN}`))).join(` +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function B8({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(i=>i.languages??[]),n=[];for(let i of que(Object.assign({},...e.map(({options:s})=>s),Vue)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...Gue(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),n.push(i));return{languages:r,options:n}}function*Gue(e,t,r){let n=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!n.has(s)){n.add(s);let o=r.find(a=>a.parsers&&Object.prototype.hasOwnProperty.call(a.parsers,s)),l=i.name;o!=null&&o.name&&(l+=` (plugin: ${o.name})`),yield{value:s,description:l}}}}function que(e){let t=[];for(let[r,n]of Object.entries(e)){let i={name:r,...n};Array.isArray(i.default)&&(i.default=Vn(!1,i.default,-1).value),t.push(i)}return t}var Kue=e=>String(e).split(/[/\\]/).pop();function LN(e,t){if(!t)return;let r=Kue(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function Jue(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function Xue(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=Jue(r,t.language)??LN(r,t.physicalFile)??LN(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Yue=Xue,md={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>md.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${md.key(r)}: ${md.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>md.value({[e]:t})},ON=Ng(d1(),1),Zue=(e,t,{descriptor:r})=>{let n=[`${ON.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${ON.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."},gd=Ng(d1(),1),j8=Symbol.for("vnopts.VALUE_NOT_EXIST"),Lv=Symbol.for("vnopts.VALUE_UNCHANGED"),RN=" ".repeat(2),Que=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(BN(e,t,n,r.descriptor)),i&&s.push([BN(e,t,i.title,r.descriptor)].concat(i.values.map(o=>z8(o,r.loggerPrintWidth))).join(` +`)),H8(s,r.loggerPrintWidth)};function BN(e,t,r,n){return[`Invalid ${gd.default.red(n.key(e))} value.`,`Expected ${gd.default.blue(r)},`,`but received ${t===j8?gd.default.gray("nothing"):gd.default.red(n.value(t))}.`].join(" ")}function z8({text:e,list:t},r){let n=[];return e&&n.push(`- ${gd.default.blue(e)}`),t&&n.push([`- ${gd.default.blue(t.title)}:`].concat(t.values.map(i=>z8(i,r-RN.length).replace(/^|\n/g,`$&${RN}`))).join(` `)),H8(n,r)}function H8(e,t){if(e.length===1)return e[0];let[r,n]=e,[i,s]=e.map(o=>o.split(` -`,1)[0].length);return i>t&&i>s?n:r}var zN=Ng(d1(),1),rD=[],jN=[];function ece(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;sa?c>a?a+1:c:c>l?l+1:c;return a}var U8=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${zN.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(a=>ece(e,a)<3);o&&s.push(`Did you mean ${zN.default.blue(r.key(o))}?`),n.warn(s.join(" "))},tce=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function rce(e,t){let r=new e(t),n=Object.create(r);for(let i of tce)i in t&&(n[i]=nce(t[i],r,_u.prototype[i].length));return n}var _u=class{static create(t){return rce(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return Lv}};function nce(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var ice=class extends _u{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}},sce=class extends _u{expected(){return"anything"}validate(){return!0}},oce=class extends _u{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let i of t){let s=r.normalizeValidateResult(this._valueSchema.validate(i,r),i);s!==!0&&n.push(s.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let i of t){let s=r.normalizeDeprecatedResult(this._valueSchema.deprecated(i,r),i);s!==!1&&n.push(...s.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let i of t){let s=r.normalizeForwardResult(this._valueSchema.forward(i,r),i);n.push(...s.map(HN))}return n}redirect(t,r){let n=[],i=[];for(let s of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(s,r),s);"remain"in o&&n.push(o.remain),i.push(...o.redirect.map(HN))}return n.length===0?{redirect:i}:{redirect:i,remain:n}}overlap(t,r){return t.concat(r)}};function HN({from:e,to:t}){return{from:[e],to:t}}var lce=class extends _u{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function uce(e,t){let r=Object.create(null);for(let n of e){let i=n[t];if(r[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r[i]=n}return r}function cce(e,t){let r=new Map;for(let n of e){let i=n[t];if(r.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r.set(i,n)}return r}function hce(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function dce(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}function fce(e){return e===Math.floor(e)}function pce(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function mce(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function UN(e){return e===void 0?{}:e}function W8(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return gce((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(W8)}}:{text:t}}function WN(e,t){return e===!0?!0:e===!1?{value:t}:e}function VN(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function GN(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function UC(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>GN(r,t)):[GN(e,t)]}function qN(e,t){let r=UC(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function gce(e,t){if(!e)throw new Error(t)}var yce=class extends _u{constructor(t){super(t),this._choices=cce(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(s=>this._choices.get(s)).filter(({hidden:s})=>!s).map(s=>s.value).sort(pce).map(t.value),n=r.slice(0,-2),i=r.slice(-2);return{text:n.concat(i.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}},vce=class extends _u{expected(){return"a number"}validate(t,r){return typeof t=="number"}},bce=class extends vce{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&fce(t)}},KN=class extends _u{expected(){return"a string"}validate(t){return typeof t=="string"}},xce=md,wce=U8,Sce=Que,Dce=Zue,Ece=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:i=80,descriptor:s=xce,unknown:o=wce,invalid:a=Sce,deprecated:l=Dce,missing:c=()=>!1,required:u=()=>!1,preprocess:h=f=>f,postprocess:d=()=>Lv}=r||{};this._utils={descriptor:s,logger:n||{warn:()=>{}},loggerPrintWidth:i,schemas:uce(t,"name"),normalizeDefaultResult:UN,normalizeExpectedResult:W8,normalizeDeprecatedResult:VN,normalizeForwardResult:UC,normalizeRedirectResult:qN,normalizeValidateResult:WN},this._unknownHandler=o,this._invalidHandler=mce(a),this._deprecatedHandler=l,this._identifyMissing=(f,p)=>!(f in p)||c(f,p),this._identifyRequired=u,this._preprocess=h,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=hce()}normalize(t){let r={},n=[this._preprocess(t,this._utils)],i=()=>{for(;n.length!==0;){let s=n.shift(),o=this._applyNormalization(s,r);n.push(...o)}};i();for(let s of Object.keys(this._utils.schemas)){let o=this._utils.schemas[s];if(!(s in r)){let a=UN(o.default(this._utils));"value"in a&&n.push({[s]:a.value})}}i();for(let s of Object.keys(this._utils.schemas)){if(!(s in r))continue;let o=this._utils.schemas[s],a=r[s],l=o.postprocess(a,this._utils);l!==Lv&&(this._applyValidation(l,s,o),r[s]=l)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:i,unknownKeys:s}=this._partitionOptionKeys(t);for(let o of i){let a=this._utils.schemas[o],l=a.preprocess(t[o],this._utils);this._applyValidation(l,o,a);let c=({from:d,to:f})=>{n.push(typeof f=="string"?{[f]:d}:{[f.key]:f.value})},u=({value:d,redirectTo:f})=>{let p=VN(a.deprecated(d,this._utils),l,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,f,this._utils));else for(let{value:g}of p){let y={key:o,value:g};if(!this._hasDeprecationWarned(y)){let b=typeof f=="string"?{key:f,value:g}:f;this._utils.logger.warn(this._deprecatedHandler(y,b,this._utils))}}};UC(a.forward(l,this._utils),l).forEach(c);let h=qN(a.redirect(l,this._utils),l);if(h.redirect.forEach(c),"remain"in h){let d=h.remain;r[o]=o in r?a.overlap(r[o],d,this._utils):d,u({value:d})}for(let{from:d,to:f}of h.redirect)u({value:d,redirectTo:f})}for(let o of s){let a=t[o];this._applyUnknownHandler(o,a,r,(l,c)=>{n.push({[l]:c})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,z8,this._utils)}_partitionOptionKeys(t){let[r,n]=dce(Object.keys(t).filter(i=>!this._identifyMissing(i,t)),i=>i in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let i=WN(n.validate(t,this._utils),t);if(i!==!0)throw this._invalidHandler(r,i.value,this._utils)}_applyUnknownHandler(t,r,n,i){let s=this._unknownHandler(t,r,this._utils);if(s)for(let o of Object.keys(s)){if(this._identifyMissing(o,s))continue;let a=s[o];o in this._utils.schemas?i(o,a):n[o]=a}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==Lv){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(r.override);for(let s of n){let o=r.override[s];this._applyValidation(o,s,this._utils.schemas[s]),t[s]=o}for(let s of i){let o=r.override[s];this._applyUnknownHandler(s,o,t,(a,l)=>{let c=this._utils.schemas[a];this._applyValidation(l,a,c),t[a]=l})}}}}},nD;function Cce(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=md;let a=i?Array.isArray(i)?(d,f)=>i.includes(d)?{[d]:f}:void 0:(d,f)=>({[d]:f}):(d,f,p)=>{let{_:g,...y}=p.schemas;return U8(d,f,{...p,schemas:y})},l=Tce(t,{isCLI:n,FlagSchema:s}),c=new Ece(l,{logger:r,unknown:a,descriptor:o}),u=r!==!1;u&&nD&&(c._hasDeprecationWarned=nD);let h=c.normalize(e);return u&&(nD=c._hasDeprecationWarned),h}function Tce(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(sce.create({name:"_"}));for(let i of e)n.push(Ace(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(ice.create({name:i.alias,sourceName:i.name}));return n}function Ace(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=bce,t&&(s.preprocess=Number);break;case"string":o=KN;break;case"choice":o=yce,s.choices=e.choices.map(l=>l!=null&&l.redirect?{...l,redirect:{to:{key:e.name,value:l.redirect}}}:l);break;case"boolean":o=lce;break;case"flag":o=n,s.flags=r.flatMap(l=>[l.alias,l.description&&l.name,l.oppositeDescription&&`no-${l.name}`].filter(Boolean));break;case"path":o=KN;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(l,c,u)=>e.exception(l)||c.validate(l,u):s.validate=(l,c,u)=>l===void 0||c.validate(l,u),e.redirect&&(a.redirect=l=>l?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let l=s.preprocess||(c=>c);s.preprocess=(c,u,h)=>u.preprocess(l(Array.isArray(c)?Vn(!1,c,-1):c),h)}return e.array?oce.create({...t?{preprocess:l=>Array.isArray(l)?l:[l]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}var kce=Cce,_ce=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},V8=_ce;function G8(e,t){if(!t)throw new Error("parserName is required.");let r=V8(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function $ce(e,t){if(!t)throw new Error("astFormat is required.");let r=V8(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function q8({plugins:e,parser:t}){let r=G8(e,t);return K8(r,t)}function K8(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function Fce(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var JN={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Pce(e,t={}){var r;let n={...e};if(!n.parser)if(n.filepath){if(n.parser=Yue(n,{physicalFile:n.filepath}),!n.parser)throw new MN(`No parser could be inferred for file "${n.filepath}".`)}else throw new MN("No parser and no file path given, couldn't infer a parser.");let i=B8({plugins:e.plugins,showDeprecated:!0}).options,s={...JN,...Object.fromEntries(i.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},o=G8(n.plugins,n.parser),a=await K8(o,n.parser);n.astFormat=a.astFormat,n.locEnd=a.locEnd,n.locStart=a.locStart;let l=(r=o.printers)!=null&&r[a.astFormat]?o:$ce(n.plugins,a.astFormat),c=await Fce(l,a.astFormat);n.printer=c;let u=l.defaultOptions?Object.fromEntries(Object.entries(l.defaultOptions).filter(([,d])=>d!==void 0)):{},h={...s,...u};for(let[d,f]of Object.entries(h))(n[d]===null||n[d]===void 0)&&(n[d]=f);return n.parser==="json"&&(n.trailingComma="none"),kce(n,i,{passThrough:Object.keys(JN),...t})}var wf=Pce,Ice=Ng(Ple(),1);async function Nce(e,t){let r=await q8(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let i;try{i=await r.parse(n,t,t)}catch(s){Mce(s,e)}return{text:n,ast:i}}function Mce(e,t){let{loc:r}=e;if(r){let n=(0,Ice.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` -`+n,e.codeFrame=n,e}throw e}var Lg=Nce;async function Lce(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:o,hasPrettierIgnore:a=()=>!1,getVisitorKeys:l}}=r;if(!o||s!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let c=y1(o.getVisitorKeys??l),u=[];f();let h=e.stack;for(let{print:p,node:g,pathStack:y}of u)try{e.stack=y;let b=await p(d,t,e,r);b&&i.set(g,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=h;function d(p,g){return Oce(p,g,r,n)}function f(){let{node:p}=e;if(p===null||typeof p!="object"||a(e))return;for(let y of c(p))Array.isArray(p[y])?e.each(f,y):e.call(f,y);let g=o(e,r);if(g){if(typeof g=="function"){u.push({print:g,node:p,pathStack:[...e.stack]});return}i.set(p,g)}}}async function Oce(e,t,r,n){let i=await wf({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await Lg(e,i),o=await n(s,i);return A8(o)}function Rce(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,l=i(a),c=s(a);for(let u of n)i(u)>=l&&s(u)<=c&&o.add(u);return r.slice(l,c)}var Bce=Rce;async function v1(e,t){({ast:e}=await J8(e,t));let r=new Map,n=new Eue(e),i=new Map;await Lce(n,o,t,v1,i);let s=await XN(n,t,o,void 0,i);return Wue(t),s;function o(l,c){return l===void 0||l===n?a(c):Array.isArray(l)?n.call(()=>a(c),...l):n.call(()=>a(c),l)}function a(l){let c=n.node;if(c==null)return"";let u=c&&typeof c=="object"&&l===void 0;if(u&&r.has(c))return r.get(c);let h=XN(n,t,o,l,i);return u&&r.set(c,h),h}}function XN(e,t,r,n,i){var s;let{node:o}=e,{printer:a}=t,l;return(s=a.hasPrettierIgnore)!=null&&s.call(a,e)?l=Bce(e,t):i.has(o)?l=i.get(o):l=a.print(e,t,r,n),o===t.cursorNode&&(l=k8(l,c=>[RC,c,RC])),a.printComment&&(!a.willPrintOwnComments||!a.willPrintOwnComments(e,t))&&(l=Uue(e,l,t)),l}async function J8(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Lue(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function zce(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=y1(t.printer.getVisitorKeys),o=l=>n(l)<=r&&i(l)>=r,a=e;for(let l of Aue(e,{getVisitorKeys:s,filter:o}))a=l;return a}var jce=zce;function Hce(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=y1(n),s=r.ignoredProperties??new Set;return o(e);function o(a,l){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a))return a.map(d=>o(d,l)).filter(Boolean);let c={},u=new Set(i(a));for(let d in a)!Object.prototype.hasOwnProperty.call(a,d)||s.has(d)||(u.has(d)?c[d]=o(a[d],a):c[d]=a[d]);let h=r(a,c,l);if(h!==null)return h??c}}var Uce=Hce,Wce=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Vce(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(i=>X8.has(i.type)&&n.has(i))}function YN(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function Gce(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let o=r(e.node);for(let l of YN(t.parentNodes))if(r(l)>=o)s=l;else break;let a=n(t.node);for(let l of YN(e.parentNodes)){if(n(l)<=a)i=l;else break;if(i===s)break}return{startNode:i,endNode:s}}function WC(e,t,r,n,i=[],s){let{locStart:o,locEnd:a}=r,l=o(e),c=a(e);if(!(t>c||tn);let a=e.slice(n,i).search(/\S/),l=a===-1;if(!l)for(n+=a;i>n&&!/\S/.test(e[i-1]);--i);let c=WC(r,n,t,(f,p)=>ZN(t,f,p),[],"rangeStart"),u=l?c:WC(r,i,t,f=>ZN(t,f),[],"rangeEnd");if(!c||!u)return{rangeStart:0,rangeEnd:0};let h,d;if(Wce(t)){let f=Vce(c,u);h=f,d=f}else({startNode:h,endNode:d}=Gce(c,u,t));return{rangeStart:Math.min(s(h),s(d)),rangeEnd:Math.max(o(h),o(d))}}var Y8="\uFEFF",QN=Symbol("cursor");async function Z8(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await Lg(e,t);t.cursorOffset>=0&&(t.cursorNode=jce(n,t));let s=await v1(n,t);r>0&&(s=T8([vc,s],r,t.tabWidth));let o=g1(s,t);if(r>0){let l=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(l)),o.formatted=l+Jk(t.endOfLine)}let a=t[Symbol.for("comments")];if(t.cursorOffset>=0){let l,c,u,h,d;if(t.cursorNode&&o.cursorNodeText?(l=t.locStart(t.cursorNode),c=i.slice(l,t.locEnd(t.cursorNode)),u=t.cursorOffset-l,h=o.cursorNodeStart,d=o.cursorNodeText):(l=0,c=i,u=t.cursorOffset,h=0,d=o.formatted),c===d)return{formatted:o.formatted,cursorOffset:h+u,comments:a};let f=c.split("");f.splice(u,0,QN);let p=d.split(""),g=(0,Mle.diffArrays)(f,p),y=h;for(let b of g)if(b.removed){if(b.value.includes(QN))break}else y+=b.count;return{formatted:o.formatted,cursorOffset:y,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function Xce(e,t){let{ast:r,text:n}=await Lg(e,t),{rangeStart:i,rangeEnd:s}=Jce(n,t,r),o=n.slice(i,s),a=Math.min(i,n.lastIndexOf(` -`,i)+1),l=n.slice(a,i).match(/^\s*/)[0],c=e_(l,t.tabWidth),u=await Z8(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},c),h=u.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=h.length-o.length:u.cursorOffset>=0&&(d=u.cursorOffset+i);let f=n.slice(0,i)+h+n.slice(s);if(t.endOfLine!=="lf"){let p=Jk(t.endOfLine);d>=0&&p===`\r +`,1)[0].length);return i>t&&i>s?n:r}var jN=Ng(d1(),1),rD=[],zN=[];function ece(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;sl?c>l?l+1:c:c>a?a+1:c;return l}var U8=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${jN.default.yellow(r.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(l=>ece(e,l)<3);o&&s.push(`Did you mean ${jN.default.blue(r.key(o))}?`),n.warn(s.join(" "))},tce=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function rce(e,t){let r=new e(t),n=Object.create(r);for(let i of tce)i in t&&(n[i]=nce(t[i],r,_u.prototype[i].length));return n}var _u=class{static create(t){return rce(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return Lv}};function nce(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var ice=class extends _u{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}},sce=class extends _u{expected(){return"anything"}validate(){return!0}},oce=class extends _u{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let i of t){let s=r.normalizeValidateResult(this._valueSchema.validate(i,r),i);s!==!0&&n.push(s.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let i of t){let s=r.normalizeDeprecatedResult(this._valueSchema.deprecated(i,r),i);s!==!1&&n.push(...s.map(({value:o})=>({value:[o]})))}return n}forward(t,r){let n=[];for(let i of t){let s=r.normalizeForwardResult(this._valueSchema.forward(i,r),i);n.push(...s.map(HN))}return n}redirect(t,r){let n=[],i=[];for(let s of t){let o=r.normalizeRedirectResult(this._valueSchema.redirect(s,r),s);"remain"in o&&n.push(o.remain),i.push(...o.redirect.map(HN))}return n.length===0?{redirect:i}:{redirect:i,remain:n}}overlap(t,r){return t.concat(r)}};function HN({from:e,to:t}){return{from:[e],to:t}}var lce=class extends _u{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function uce(e,t){let r=Object.create(null);for(let n of e){let i=n[t];if(r[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r[i]=n}return r}function cce(e,t){let r=new Map;for(let n of e){let i=n[t];if(r.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);r.set(i,n)}return r}function hce(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function dce(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}function fce(e){return e===Math.floor(e)}function pce(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function mce(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function UN(e){return e===void 0?{}:e}function W8(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return gce((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(W8)}}:{text:t}}function WN(e,t){return e===!0?!0:e===!1?{value:t}:e}function VN(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function GN(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function UC(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>GN(r,t)):[GN(e,t)]}function qN(e,t){let r=UC(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function gce(e,t){if(!e)throw new Error(t)}var yce=class extends _u{constructor(t){super(t),this._choices=cce(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(s=>this._choices.get(s)).filter(({hidden:s})=>!s).map(s=>s.value).sort(pce).map(t.value),n=r.slice(0,-2),i=r.slice(-2);return{text:n.concat(i.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}},vce=class extends _u{expected(){return"a number"}validate(t,r){return typeof t=="number"}},bce=class extends vce{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&fce(t)}},KN=class extends _u{expected(){return"a string"}validate(t){return typeof t=="string"}},xce=md,wce=U8,Sce=Que,Dce=Zue,Ece=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:i=80,descriptor:s=xce,unknown:o=wce,invalid:l=Sce,deprecated:a=Dce,missing:c=()=>!1,required:u=()=>!1,preprocess:h=f=>f,postprocess:d=()=>Lv}=r||{};this._utils={descriptor:s,logger:n||{warn:()=>{}},loggerPrintWidth:i,schemas:uce(t,"name"),normalizeDefaultResult:UN,normalizeExpectedResult:W8,normalizeDeprecatedResult:VN,normalizeForwardResult:UC,normalizeRedirectResult:qN,normalizeValidateResult:WN},this._unknownHandler=o,this._invalidHandler=mce(l),this._deprecatedHandler=a,this._identifyMissing=(f,p)=>!(f in p)||c(f,p),this._identifyRequired=u,this._preprocess=h,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=hce()}normalize(t){let r={},n=[this._preprocess(t,this._utils)],i=()=>{for(;n.length!==0;){let s=n.shift(),o=this._applyNormalization(s,r);n.push(...o)}};i();for(let s of Object.keys(this._utils.schemas)){let o=this._utils.schemas[s];if(!(s in r)){let l=UN(o.default(this._utils));"value"in l&&n.push({[s]:l.value})}}i();for(let s of Object.keys(this._utils.schemas)){if(!(s in r))continue;let o=this._utils.schemas[s],l=r[s],a=o.postprocess(l,this._utils);a!==Lv&&(this._applyValidation(a,s,o),r[s]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:i,unknownKeys:s}=this._partitionOptionKeys(t);for(let o of i){let l=this._utils.schemas[o],a=l.preprocess(t[o],this._utils);this._applyValidation(a,o,l);let c=({from:d,to:f})=>{n.push(typeof f=="string"?{[f]:d}:{[f.key]:f.value})},u=({value:d,redirectTo:f})=>{let p=VN(l.deprecated(d,this._utils),a,!0);if(p!==!1)if(p===!0)this._hasDeprecationWarned(o)||this._utils.logger.warn(this._deprecatedHandler(o,f,this._utils));else for(let{value:g}of p){let y={key:o,value:g};if(!this._hasDeprecationWarned(y)){let b=typeof f=="string"?{key:f,value:g}:f;this._utils.logger.warn(this._deprecatedHandler(y,b,this._utils))}}};UC(l.forward(a,this._utils),a).forEach(c);let h=qN(l.redirect(a,this._utils),a);if(h.redirect.forEach(c),"remain"in h){let d=h.remain;r[o]=o in r?l.overlap(r[o],d,this._utils):d,u({value:d})}for(let{from:d,to:f}of h.redirect)u({value:d,redirectTo:f})}for(let o of s){let l=t[o];this._applyUnknownHandler(o,l,r,(a,c)=>{n.push({[a]:c})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,j8,this._utils)}_partitionOptionKeys(t){let[r,n]=dce(Object.keys(t).filter(i=>!this._identifyMissing(i,t)),i=>i in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let i=WN(n.validate(t,this._utils),t);if(i!==!0)throw this._invalidHandler(r,i.value,this._utils)}_applyUnknownHandler(t,r,n,i){let s=this._unknownHandler(t,r,this._utils);if(s)for(let o of Object.keys(s)){if(this._identifyMissing(o,s))continue;let l=s[o];o in this._utils.schemas?i(o,l):n[o]=l}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==Lv){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(r.override);for(let s of n){let o=r.override[s];this._applyValidation(o,s,this._utils.schemas[s]),t[s]=o}for(let s of i){let o=r.override[s];this._applyUnknownHandler(s,o,t,(l,a)=>{let c=this._utils.schemas[l];this._applyValidation(a,l,c),t[l]=a})}}}}},nD;function Cce(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=md;let l=i?Array.isArray(i)?(d,f)=>i.includes(d)?{[d]:f}:void 0:(d,f)=>({[d]:f}):(d,f,p)=>{let{_:g,...y}=p.schemas;return U8(d,f,{...p,schemas:y})},a=Tce(t,{isCLI:n,FlagSchema:s}),c=new Ece(a,{logger:r,unknown:l,descriptor:o}),u=r!==!1;u&&nD&&(c._hasDeprecationWarned=nD);let h=c.normalize(e);return u&&(nD=c._hasDeprecationWarned),h}function Tce(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(sce.create({name:"_"}));for(let i of e)n.push(Ace(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(ice.create({name:i.alias,sourceName:i.name}));return n}function Ace(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:i}=e,s={name:i},o,l={};switch(e.type){case"int":o=bce,t&&(s.preprocess=Number);break;case"string":o=KN;break;case"choice":o=yce,s.choices=e.choices.map(a=>a!=null&&a.redirect?{...a,redirect:{to:{key:e.name,value:a.redirect}}}:a);break;case"boolean":o=lce;break;case"flag":o=n,s.flags=r.flatMap(a=>[a.alias,a.description&&a.name,a.oppositeDescription&&`no-${a.name}`].filter(Boolean));break;case"path":o=KN;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(a,c,u)=>e.exception(a)||c.validate(a,u):s.validate=(a,c,u)=>a===void 0||c.validate(a,u),e.redirect&&(l.redirect=a=>a?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(l.deprecated=!0),t&&!e.array){let a=s.preprocess||(c=>c);s.preprocess=(c,u,h)=>u.preprocess(a(Array.isArray(c)?Vn(!1,c,-1):c),h)}return e.array?oce.create({...t?{preprocess:a=>Array.isArray(a)?a:[a]}:{},...l,valueSchema:o.create(s)}):o.create({...s,...l})}var kce=Cce,_ce=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},V8=_ce;function G8(e,t){if(!t)throw new Error("parserName is required.");let r=V8(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function $ce(e,t){if(!t)throw new Error("astFormat is required.");let r=V8(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new R8(n)}function q8({plugins:e,parser:t}){let r=G8(e,t);return K8(r,t)}function K8(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function Fce(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var JN={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Pce(e,t={}){var r;let n={...e};if(!n.parser)if(n.filepath){if(n.parser=Yue(n,{physicalFile:n.filepath}),!n.parser)throw new MN(`No parser could be inferred for file "${n.filepath}".`)}else throw new MN("No parser and no file path given, couldn't infer a parser.");let i=B8({plugins:e.plugins,showDeprecated:!0}).options,s={...JN,...Object.fromEntries(i.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},o=G8(n.plugins,n.parser),l=await K8(o,n.parser);n.astFormat=l.astFormat,n.locEnd=l.locEnd,n.locStart=l.locStart;let a=(r=o.printers)!=null&&r[l.astFormat]?o:$ce(n.plugins,l.astFormat),c=await Fce(a,l.astFormat);n.printer=c;let u=a.defaultOptions?Object.fromEntries(Object.entries(a.defaultOptions).filter(([,d])=>d!==void 0)):{},h={...s,...u};for(let[d,f]of Object.entries(h))(n[d]===null||n[d]===void 0)&&(n[d]=f);return n.parser==="json"&&(n.trailingComma="none"),kce(n,i,{passThrough:Object.keys(JN),...t})}var wf=Pce,Ice=Ng(Ple(),1);async function Nce(e,t){let r=await q8(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let i;try{i=await r.parse(n,t,t)}catch(s){Mce(s,e)}return{text:n,ast:i}}function Mce(e,t){let{loc:r}=e;if(r){let n=(0,Ice.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var Lg=Nce;async function Lce(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:o,hasPrettierIgnore:l=()=>!1,getVisitorKeys:a}}=r;if(!o||s!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let c=y1(o.getVisitorKeys??a),u=[];f();let h=e.stack;for(let{print:p,node:g,pathStack:y}of u)try{e.stack=y;let b=await p(d,t,e,r);b&&i.set(g,b)}catch(b){if(globalThis.PRETTIER_DEBUG)throw b}e.stack=h;function d(p,g){return Oce(p,g,r,n)}function f(){let{node:p}=e;if(p===null||typeof p!="object"||l(e))return;for(let y of c(p))Array.isArray(p[y])?e.each(f,y):e.call(f,y);let g=o(e,r);if(g){if(typeof g=="function"){u.push({print:g,node:p,pathStack:[...e.stack]});return}i.set(p,g)}}}async function Oce(e,t,r,n){let i=await wf({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await Lg(e,i),o=await n(s,i);return A8(o)}function Rce(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:l}=e,a=i(l),c=s(l);for(let u of n)i(u)>=a&&s(u)<=c&&o.add(u);return r.slice(a,c)}var Bce=Rce;async function v1(e,t){({ast:e}=await J8(e,t));let r=new Map,n=new Eue(e),i=new Map;await Lce(n,o,t,v1,i);let s=await XN(n,t,o,void 0,i);return Wue(t),s;function o(a,c){return a===void 0||a===n?l(c):Array.isArray(a)?n.call(()=>l(c),...a):n.call(()=>l(c),a)}function l(a){let c=n.node;if(c==null)return"";let u=c&&typeof c=="object"&&a===void 0;if(u&&r.has(c))return r.get(c);let h=XN(n,t,o,a,i);return u&&r.set(c,h),h}}function XN(e,t,r,n,i){var s;let{node:o}=e,{printer:l}=t,a;return(s=l.hasPrettierIgnore)!=null&&s.call(l,e)?a=Bce(e,t):i.has(o)?a=i.get(o):a=l.print(e,t,r,n),o===t.cursorNode&&(a=k8(a,c=>[RC,c,RC])),l.printComment&&(!l.willPrintOwnComments||!l.willPrintOwnComments(e,t))&&(a=Uue(e,a,t)),a}async function J8(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Lue(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function jce(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=y1(t.printer.getVisitorKeys),o=a=>n(a)<=r&&i(a)>=r,l=e;for(let a of Aue(e,{getVisitorKeys:s,filter:o}))l=a;return l}var zce=jce;function Hce(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=y1(n),s=r.ignoredProperties??new Set;return o(e);function o(l,a){if(!(l!==null&&typeof l=="object"))return l;if(Array.isArray(l))return l.map(d=>o(d,a)).filter(Boolean);let c={},u=new Set(i(l));for(let d in l)!Object.prototype.hasOwnProperty.call(l,d)||s.has(d)||(u.has(d)?c[d]=o(l[d],l):c[d]=l[d]);let h=r(l,c,a);if(h!==null)return h??c}}var Uce=Hce,Wce=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function Vce(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(i=>X8.has(i.type)&&n.has(i))}function YN(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function Gce(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let o=r(e.node);for(let a of YN(t.parentNodes))if(r(a)>=o)s=a;else break;let l=n(t.node);for(let a of YN(e.parentNodes)){if(n(a)<=l)i=a;else break;if(i===s)break}return{startNode:i,endNode:s}}function WC(e,t,r,n,i=[],s){let{locStart:o,locEnd:l}=r,a=o(e),c=l(e);if(!(t>c||tn);let l=e.slice(n,i).search(/\S/),a=l===-1;if(!a)for(n+=l;i>n&&!/\S/.test(e[i-1]);--i);let c=WC(r,n,t,(f,p)=>ZN(t,f,p),[],"rangeStart"),u=a?c:WC(r,i,t,f=>ZN(t,f),[],"rangeEnd");if(!c||!u)return{rangeStart:0,rangeEnd:0};let h,d;if(Wce(t)){let f=Vce(c,u);h=f,d=f}else({startNode:h,endNode:d}=Gce(c,u,t));return{rangeStart:Math.min(s(h),s(d)),rangeEnd:Math.max(o(h),o(d))}}var Y8="\uFEFF",QN=Symbol("cursor");async function Z8(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await Lg(e,t);t.cursorOffset>=0&&(t.cursorNode=zce(n,t));let s=await v1(n,t);r>0&&(s=T8([vc,s],r,t.tabWidth));let o=g1(s,t);if(r>0){let a=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(a)),o.formatted=a+Jk(t.endOfLine)}let l=t[Symbol.for("comments")];if(t.cursorOffset>=0){let a,c,u,h,d;if(t.cursorNode&&o.cursorNodeText?(a=t.locStart(t.cursorNode),c=i.slice(a,t.locEnd(t.cursorNode)),u=t.cursorOffset-a,h=o.cursorNodeStart,d=o.cursorNodeText):(a=0,c=i,u=t.cursorOffset,h=0,d=o.formatted),c===d)return{formatted:o.formatted,cursorOffset:h+u,comments:l};let f=c.split("");f.splice(u,0,QN);let p=d.split(""),g=(0,Mle.diffArrays)(f,p),y=h;for(let b of g)if(b.removed){if(b.value.includes(QN))break}else y+=b.count;return{formatted:o.formatted,cursorOffset:y,comments:l}}return{formatted:o.formatted,cursorOffset:-1,comments:l}}async function Xce(e,t){let{ast:r,text:n}=await Lg(e,t),{rangeStart:i,rangeEnd:s}=Jce(n,t,r),o=n.slice(i,s),l=Math.min(i,n.lastIndexOf(` +`,i)+1),a=n.slice(l,i).match(/^\s*/)[0],c=e_(a,t.tabWidth),u=await Z8(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},c),h=u.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=h.length-o.length:u.cursorOffset>=0&&(d=u.cursorOffset+i);let f=n.slice(0,i)+h+n.slice(s);if(t.endOfLine!=="lf"){let p=Jk(t.endOfLine);d>=0&&p===`\r `&&(d+=v8(f.slice(0,d),` `)),f=f1(!1,f,` -`,p)}return{formatted:f,cursorOffset:d,comments:u.comments}}function iD(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function eM(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=iD(e,r,-1),n=iD(e,n,0),i=iD(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function Q8(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=eM(e,t),o=e.charAt(0)===Y8;if(o&&(e=e.slice(1),r--,n--,i--),s==="auto"&&(s=Lle(e)),e.includes("\r")){let a=l=>v8(e.slice(0,Math.max(l,0)),`\r -`);r-=a(r),n-=a(n),i-=a(i),e=Ole(e)}return{hasBOM:o,text:e,options:eM(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function tM(e,t){let r=await q8(t);return!r.hasPragma||r.hasPragma(e)}async function ez(e,t){let{hasBOM:r,text:n,options:i}=Q8(e,await wf(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await tM(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function Yce(e,t,r){let{text:n,options:i}=Q8(e,await wf(t)),s=await Lg(n,i);return r&&(r.preprocessForPrint&&(s.ast=await J8(s.ast,i)),r.massage&&(s.ast=Uce(s.ast,i))),s}async function Zce(e,t){t=await wf(t);let r=await v1(e,t);return g1(r,t)}async function Qce(e,t){let r=tue(e),{formatted:n}=await ez(r,{...t,parser:"__js_expression"});return n}async function ehe(e,t){t=await wf(t);let{ast:r}=await Lg(e,t);return v1(r,t)}async function the(e,t){return g1(e,await wf(t))}var tz={};h1(tz,{builders:()=>rhe,printer:()=>nhe,utils:()=>ihe});var rhe={join:C8,line:D8,softline:Qle,hardline:vc,literalline:E8,group:x8,conditionalGroup:Kle,fill:w8,lineSuffix:OC,lineSuffixBoundary:Yle,cursor:RC,breakParent:p1,ifBreak:Jle,trim:Zle,indent:L0,indentIfBreak:Xle,align:qd,addAlignmentToDoc:T8,markAsRoot:Gle,dedentToRoot:Vle,dedent:qle,hardlineWithoutBreakParent:Yk,literallineWithoutBreakParent:S8,label:eue,concat:e=>e},nhe={printDocToString:g1},ihe={willBreak:hue,traverseDoc:Xk,findInDoc:Qk,mapDoc:m1,removeLines:pue,stripTrailingHardline:A8,replaceEndOfLine:yue,canBreak:bue},she="3.2.5",rz={};h1(rz,{addDanglingComment:()=>Xu,addLeadingComment:()=>fd,addTrailingComment:()=>pd,getAlignmentSize:()=>e_,getIndentSize:()=>hhe,getMaxContinuousCount:()=>phe,getNextNonSpaceNonCommentCharacter:()=>ghe,getNextNonSpaceNonCommentCharacterIndex:()=>Ehe,getStringWidth:()=>Zk,hasNewline:()=>nu,hasNewlineInRange:()=>vhe,hasSpaces:()=>xhe,isNextLineEmpty:()=>khe,isNextLineEmptyAfterIndex:()=>a_,isPreviousLineEmpty:()=>The,makeString:()=>She,skip:()=>Mg,skipEverythingButNewLine:()=>I8,skipInlineComment:()=>i_,skipNewline:()=>Ic,skipSpaces:()=>fu,skipToLineEnd:()=>P8,skipTrailingComment:()=>s_,skipWhitespace:()=>kue});function ohe(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;re.length?r:t}function eM(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=iD(e,r,-1),n=iD(e,n,0),i=iD(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function Q8(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=eM(e,t),o=e.charAt(0)===Y8;if(o&&(e=e.slice(1),r--,n--,i--),s==="auto"&&(s=Lle(e)),e.includes("\r")){let l=a=>v8(e.slice(0,Math.max(a,0)),`\r +`);r-=l(r),n-=l(n),i-=l(i),e=Ole(e)}return{hasBOM:o,text:e,options:eM(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function tM(e,t){let r=await q8(t);return!r.hasPragma||r.hasPragma(e)}async function ej(e,t){let{hasBOM:r,text:n,options:i}=Q8(e,await wf(t));if(i.rangeStart>=i.rangeEnd&&n!==""||i.requirePragma&&!await tM(n,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function Yce(e,t,r){let{text:n,options:i}=Q8(e,await wf(t)),s=await Lg(n,i);return r&&(r.preprocessForPrint&&(s.ast=await J8(s.ast,i)),r.massage&&(s.ast=Uce(s.ast,i))),s}async function Zce(e,t){t=await wf(t);let r=await v1(e,t);return g1(r,t)}async function Qce(e,t){let r=tue(e),{formatted:n}=await ej(r,{...t,parser:"__js_expression"});return n}async function ehe(e,t){t=await wf(t);let{ast:r}=await Lg(e,t);return v1(r,t)}async function the(e,t){return g1(e,await wf(t))}var tj={};h1(tj,{builders:()=>rhe,printer:()=>nhe,utils:()=>ihe});var rhe={join:C8,line:D8,softline:Qle,hardline:vc,literalline:E8,group:x8,conditionalGroup:Kle,fill:w8,lineSuffix:OC,lineSuffixBoundary:Yle,cursor:RC,breakParent:p1,ifBreak:Jle,trim:Zle,indent:L0,indentIfBreak:Xle,align:qd,addAlignmentToDoc:T8,markAsRoot:Gle,dedentToRoot:Vle,dedent:qle,hardlineWithoutBreakParent:Yk,literallineWithoutBreakParent:S8,label:eue,concat:e=>e},nhe={printDocToString:g1},ihe={willBreak:hue,traverseDoc:Xk,findInDoc:Qk,mapDoc:m1,removeLines:pue,stripTrailingHardline:A8,replaceEndOfLine:yue,canBreak:bue},she="3.2.5",rj={};h1(rj,{addDanglingComment:()=>Xu,addLeadingComment:()=>fd,addTrailingComment:()=>pd,getAlignmentSize:()=>e_,getIndentSize:()=>hhe,getMaxContinuousCount:()=>phe,getNextNonSpaceNonCommentCharacter:()=>ghe,getNextNonSpaceNonCommentCharacterIndex:()=>Ehe,getStringWidth:()=>Zk,hasNewline:()=>nu,hasNewlineInRange:()=>vhe,hasSpaces:()=>xhe,isNextLineEmpty:()=>khe,isNextLineEmptyAfterIndex:()=>a_,isPreviousLineEmpty:()=>The,makeString:()=>She,skip:()=>Mg,skipEverythingButNewLine:()=>I8,skipInlineComment:()=>i_,skipNewline:()=>Ic,skipSpaces:()=>fu,skipToLineEnd:()=>P8,skipTrailingComment:()=>s_,skipWhitespace:()=>kue});function ohe(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,i.length/t.length),0)}var phe=fhe;function mhe(e,t){let r=o_(e,t);return r===!1?"":e.charAt(r)}var ghe=mhe;function yhe(e,t,r){for(let n=t;no===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}var She=whe;function Dhe(e,t,r){return o_(e,r(t))}function Ehe(e,t){return arguments.length===2||typeof t=="number"?o_(e,t):Dhe(...arguments)}function Che(e,t,r){return n_(e,r(t))}function The(e,t){return arguments.length===2||typeof t=="number"?n_(e,t):Che(...arguments)}function Ahe(e,t,r){return a_(e,r(t))}function khe(e,t){return arguments.length===2||typeof t=="number"?a_(e,t):Ahe(...arguments)}function ec(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var nz=ec(ez);async function l_(e,t){let{formatted:r}=await nz(e,{...t,cursorOffset:-1});return r}async function _he(e,t){return await l_(e,t)===e}var $he=ec(B8,0),Fhe={parse:ec(Yce),formatAST:ec(Zce),formatDoc:ec(Qce),printToDoc:ec(ehe),printDocToString:ec(the)},Phe=Object.create,u_=Object.defineProperty,Ihe=Object.getOwnPropertyDescriptor,Nhe=Object.getOwnPropertyNames,Mhe=Object.getPrototypeOf,Lhe=Object.prototype.hasOwnProperty,iz=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ohe=(e,t)=>{for(var r in t)u_(e,r,{get:t[r],enumerable:!0})},Rhe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nhe(t))!Lhe.call(e,i)&&i!==r&&u_(e,i,{get:()=>t[i],enumerable:!(n=Ihe(t,i))||n.enumerable});return e},c_=(e,t,r)=>(r=e!=null?Phe(Mhe(e)):{},Rhe(t||!e||!e.__esModule?u_(r,"default",{value:e,enumerable:!0}):r,e)),sz=iz(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(x,m){if(x==null)return{};var S={},k=Object.keys(x),O,U;for(U=0;U=0)&&(S[O]=x[O]);return S}var r=class{constructor(x,m,S){this.line=void 0,this.column=void 0,this.index=void 0,this.line=x,this.column=m,this.index=S}},n=class{constructor(x,m){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=x,this.end=m}};function i(x,m){let{line:S,column:k,index:O}=x;return new r(S,k+m,O+m)}var s="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:s},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:s}},a={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},l=({type:x,prefix:m})=>x==="UpdateExpression"?a.UpdateExpression[String(m)]:a[x],c={AccessorIsGenerator:({kind:x})=>`A ${x}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:x})=>`Missing initializer in ${x} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:x})=>`\`${x}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:x})=>`'import.${x}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:x,exportName:m})=>`A string literal cannot be used as an exported binding without \`from\`. +`)return!0;return!1}var vhe=yhe;function bhe(e,t,r={}){return fu(e,r.backwards?t-1:t,r)!==t}var xhe=bhe;function whe(e,t,r){let n=t==='"'?"'":'"',i=f1(!1,e,/\\(.)|(["'])/gs,(s,o,l)=>o===n?o:l===t?"\\"+l:l||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}var She=whe;function Dhe(e,t,r){return o_(e,r(t))}function Ehe(e,t){return arguments.length===2||typeof t=="number"?o_(e,t):Dhe(...arguments)}function Che(e,t,r){return n_(e,r(t))}function The(e,t){return arguments.length===2||typeof t=="number"?n_(e,t):Che(...arguments)}function Ahe(e,t,r){return a_(e,r(t))}function khe(e,t){return arguments.length===2||typeof t=="number"?a_(e,t):Ahe(...arguments)}function ec(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var nj=ec(ej);async function l_(e,t){let{formatted:r}=await nj(e,{...t,cursorOffset:-1});return r}async function _he(e,t){return await l_(e,t)===e}var $he=ec(B8,0),Fhe={parse:ec(Yce),formatAST:ec(Zce),formatDoc:ec(Qce),printToDoc:ec(ehe),printDocToString:ec(the)},Phe=Object.create,u_=Object.defineProperty,Ihe=Object.getOwnPropertyDescriptor,Nhe=Object.getOwnPropertyNames,Mhe=Object.getPrototypeOf,Lhe=Object.prototype.hasOwnProperty,ij=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ohe=(e,t)=>{for(var r in t)u_(e,r,{get:t[r],enumerable:!0})},Rhe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nhe(t))!Lhe.call(e,i)&&i!==r&&u_(e,i,{get:()=>t[i],enumerable:!(n=Ihe(t,i))||n.enumerable});return e},c_=(e,t,r)=>(r=e!=null?Phe(Mhe(e)):{},Rhe(t||!e||!e.__esModule?u_(r,"default",{value:e,enumerable:!0}):r,e)),sj=ij(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(x,m){if(x==null)return{};var S={},k=Object.keys(x),O,U;for(U=0;U=0)&&(S[O]=x[O]);return S}var r=class{constructor(x,m,S){this.line=void 0,this.column=void 0,this.index=void 0,this.line=x,this.column=m,this.index=S}},n=class{constructor(x,m){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=x,this.end=m}};function i(x,m){let{line:S,column:k,index:O}=x;return new r(S,k+m,O+m)}var s="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:s},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:s}},l={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},a=({type:x,prefix:m})=>x==="UpdateExpression"?l.UpdateExpression[String(m)]:l[x],c={AccessorIsGenerator:({kind:x})=>`A ${x}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:x})=>`Missing initializer in ${x} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:x})=>`\`${x}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:x})=>`'import.${x}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:x,exportName:m})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${x}' as '${m}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:x})=>`'${x==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:x})=>`Unsyntactic ${x==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:x})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${x}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:x})=>`\`import()\` requires exactly ${x===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:x})=>`Expected number in radix ${x}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:x})=>`Escape sequence in keyword ${x}.`,InvalidIdentifier:({identifierName:x})=>`Invalid identifier ${x}.`,InvalidLhs:({ancestor:x})=>`Invalid left-hand side in ${l(x)}.`,InvalidLhsBinding:({ancestor:x})=>`Binding invalid left-hand side in ${l(x)}.`,InvalidLhsOptionalChaining:({ancestor:x})=>`Invalid optional chaining in the left-hand side of ${l(x)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:x})=>`Unexpected character '${x}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:x})=>`Private name #${x} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:x})=>`Label '${x}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:x})=>`This experimental syntax requires enabling the parser plugin: ${x.map(m=>JSON.stringify(m)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:x})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${x.map(m=>JSON.stringify(m)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:x})=>`Duplicate key "${x}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:x})=>`An export name cannot include a lone surrogate, found '\\u${x.toString(16)}'.`,ModuleExportUndefined:({localName:x})=>`Export '${x}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:x})=>`Private names are only allowed in property accesses (\`obj.#${x}\`) or in \`in\` expressions (\`#${x} in obj\`).`,PrivateNameRedeclaration:({identifierName:x})=>`Duplicate private name #${x}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:x})=>`Unexpected keyword '${x}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:x})=>`Unexpected reserved word '${x}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:x,unexpected:m})=>`Unexpected token${m?` '${m}'.`:""}${x?`, expected "${x}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:x,onlyValidPropertyName:m})=>`The only valid meta property for ${x} is ${x}.${m}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:x})=>`Identifier '${x}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},u={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:x})=>`Assigning to '${x}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:x})=>`Binding '${x}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),d={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:x})=>`Invalid topic token ${x}. In order to use ${x} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${x}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:x})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:x})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},f=["toMessage"],p=["message"];function g(x,m,S){Object.defineProperty(x,m,{enumerable:!1,configurable:!0,value:S})}function y(x){let{toMessage:m}=x,S=t(x,f);return function k(O,U){let K=new SyntaxError;return Object.assign(K,S,{loc:O,pos:O.index}),"missingPlugin"in U&&Object.assign(K,{missingPlugin:U.missingPlugin}),g(K,"clone",function(re={}){var le;let{line:ae,column:Pe,index:Ve}=(le=re.loc)!=null?le:O;return k(new r(ae,Pe,Ve),Object.assign({},U,re.details))}),g(K,"details",U),Object.defineProperty(K,"message",{configurable:!0,get(){let re=`${m(U)} (${O.line}:${O.column})`;return this.message=re,re},set(re){Object.defineProperty(this,"message",{value:re,writable:!0})}}),K}}function b(x,m){if(Array.isArray(x))return k=>b(k,x[0]);let S={};for(let k of Object.keys(x)){let O=x[k],U=typeof O=="string"?{message:()=>O}:typeof O=="function"?{message:O}:O,{message:K}=U,re=t(U,p),le=typeof K=="string"?()=>K:K;S[k]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:k,toMessage:le},m?{syntaxPlugin:m}:{},re))}return S}var v=Object.assign({},b(o),b(c),b(u),b`pipelineOperator`(d)),{defineProperty:E}=Object,D=(x,m)=>E(x,m,{enumerable:!1,value:x[m]});function C(x){return x.loc.start&&D(x.loc.start,"index"),x.loc.end&&D(x.loc.end,"index"),x}var w=x=>class extends x{parse(){let m=C(super.parse());return this.options.tokens&&(m.tokens=m.tokens.map(C)),m}parseRegExpLiteral({pattern:m,flags:S}){let k=null;try{k=new RegExp(m,S)}catch{}let O=this.estreeParseLiteral(k);return O.regex={pattern:m,flags:S},O}parseBigIntLiteral(m){let S;try{S=BigInt(m)}catch{S=null}let k=this.estreeParseLiteral(S);return k.bigint=String(k.value||m),k}parseDecimalLiteral(m){let S=this.estreeParseLiteral(null);return S.decimal=String(S.value||m),S}estreeParseLiteral(m){return this.parseLiteral(m,"Literal")}parseStringLiteral(m){return this.estreeParseLiteral(m)}parseNumericLiteral(m){return this.estreeParseLiteral(m)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(m){return this.estreeParseLiteral(m)}directiveToStmt(m){let S=m.value;delete m.value,S.type="Literal",S.raw=S.extra.raw,S.value=S.extra.expressionValue;let k=m;return k.type="ExpressionStatement",k.expression=S,k.directive=S.extra.rawValue,delete S.extra,k}initFunction(m,S){super.initFunction(m,S),m.expression=!1}checkDeclaration(m){m!=null&&this.isObjectProperty(m)?this.checkDeclaration(m.value):super.checkDeclaration(m)}getObjectOrClassMethodParams(m){return m.value.params}isValidDirective(m){var S;return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"&&!((S=m.expression.extra)!=null&&S.parenthesized)}parseBlockBody(m,S,k,O,U){super.parseBlockBody(m,S,k,O,U);let K=m.directives.map(re=>this.directiveToStmt(re));m.body=K.concat(m.body),delete m.directives}pushClassMethod(m,S,k,O,U,K){this.parseMethod(S,k,O,U,K,"ClassMethod",!0),S.typeParameters&&(S.value.typeParameters=S.typeParameters,delete S.typeParameters),m.body.push(S)}parsePrivateName(){let m=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(m):m}convertPrivateNameToPrivateIdentifier(m){let S=super.getPrivateNameSV(m);return m=m,delete m.id,m.name=S,m.type="PrivateIdentifier",m}isPrivateName(m){return this.getPluginOption("estree","classFeatures")?m.type==="PrivateIdentifier":super.isPrivateName(m)}getPrivateNameSV(m){return this.getPluginOption("estree","classFeatures")?m.name:super.getPrivateNameSV(m)}parseLiteral(m,S){let k=super.parseLiteral(m,S);return k.raw=k.extra.raw,delete k.extra,k}parseFunctionBody(m,S,k=!1){super.parseFunctionBody(m,S,k),m.expression=m.body.type!=="BlockStatement"}parseMethod(m,S,k,O,U,K,re=!1){let le=this.startNode();return le.kind=m.kind,le=super.parseMethod(le,S,k,O,U,K,re),le.type="FunctionExpression",delete le.kind,m.value=le,K==="ClassPrivateMethod"&&(m.computed=!1),this.finishNode(m,"MethodDefinition")}parseClassProperty(...m){let S=super.parseClassProperty(...m);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition"),S}parseClassPrivateProperty(...m){let S=super.parseClassPrivateProperty(...m);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition",S.computed=!1),S}parseObjectMethod(m,S,k,O,U){let K=super.parseObjectMethod(m,S,k,O,U);return K&&(K.type="Property",K.kind==="method"&&(K.kind="init"),K.shorthand=!1),K}parseObjectProperty(m,S,k,O){let U=super.parseObjectProperty(m,S,k,O);return U&&(U.kind="init",U.type="Property"),U}isValidLVal(m,S,k){return m==="Property"?"value":super.isValidLVal(m,S,k)}isAssignable(m,S){return m!=null&&this.isObjectProperty(m)?this.isAssignable(m.value,S):super.isAssignable(m,S)}toAssignable(m,S=!1){if(m!=null&&this.isObjectProperty(m)){let{key:k,value:O}=m;this.isPrivateName(k)&&this.classScope.usePrivateName(this.getPrivateNameSV(k),k.loc.start),this.toAssignable(O,S)}else super.toAssignable(m,S)}toAssignableObjectExpressionProp(m,S,k){m.kind==="get"||m.kind==="set"?this.raise(v.PatternHasAccessor,m.key):m.method?this.raise(v.PatternHasMethod,m.key):super.toAssignableObjectExpressionProp(m,S,k)}finishCallExpression(m,S){let k=super.finishCallExpression(m,S);if(k.callee.type==="Import"){if(k.type="ImportExpression",k.source=k.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var O,U;k.options=(O=k.arguments[1])!=null?O:null,k.attributes=(U=k.arguments[1])!=null?U:null}delete k.arguments,delete k.callee}return k}toReferencedArguments(m){m.type!=="ImportExpression"&&super.toReferencedArguments(m)}parseExport(m,S){let k=this.state.lastTokStartLoc,O=super.parseExport(m,S);switch(O.type){case"ExportAllDeclaration":O.exported=null;break;case"ExportNamedDeclaration":O.specifiers.length===1&&O.specifiers[0].type==="ExportNamespaceSpecifier"&&(O.type="ExportAllDeclaration",O.exported=O.specifiers[0].exported,delete O.specifiers);case"ExportDefaultDeclaration":{var U;let{declaration:K}=O;(K==null?void 0:K.type)==="ClassDeclaration"&&((U=K.decorators)==null?void 0:U.length)>0&&K.start===O.start&&this.resetStartLocation(O,k)}break}return O}parseSubscript(m,S,k,O){let U=super.parseSubscript(m,S,k,O);if(O.optionalChainMember){if((U.type==="OptionalMemberExpression"||U.type==="OptionalCallExpression")&&(U.type=U.type.substring(8)),O.stop){let K=this.startNodeAtNode(U);return K.expression=U,this.finishNode(K,"ChainExpression")}}else(U.type==="MemberExpression"||U.type==="CallExpression")&&(U.optional=!1);return U}isOptionalMemberExpression(m){return m.type==="ChainExpression"?m.expression.type==="MemberExpression":super.isOptionalMemberExpression(m)}hasPropertyAsPrivateName(m){return m.type==="ChainExpression"&&(m=m.expression),super.hasPropertyAsPrivateName(m)}isObjectProperty(m){return m.type==="Property"&&m.kind==="init"&&!m.method}isObjectMethod(m){return m.method||m.kind==="get"||m.kind==="set"}finishNodeAt(m,S,k){return C(super.finishNodeAt(m,S,k))}resetStartLocation(m,S){super.resetStartLocation(m,S),C(m)}resetEndLocation(m,S=this.state.lastTokEndLoc){super.resetEndLocation(m,S),C(m)}},T=class{constructor(x,m){this.token=void 0,this.preserveSpace=void 0,this.token=x,this.preserveSpace=!!m}},A={brace:new T("{"),j_oTag:new T("...",!0)};A.template=new T("`",!0);var $=!0,I=!0,N=!0,L=!0,F=!0,P=!0,_=class{constructor(x,m={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=x,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.rightAssociative=!!m.rightAssociative,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop!=null?m.binop:null,this.updateContext=null}},M=new Map;function B(x,m={}){m.keyword=x;let S=Z(x,m);return M.set(x,S),S}function R(x,m){return Z(x,{beforeExpr:$,binop:m})}var G=-1,q=[],ee=[],Y=[],X=[],Q=[],te=[];function Z(x,m={}){var S,k,O,U;return++G,ee.push(x),Y.push((S=m.binop)!=null?S:-1),X.push((k=m.beforeExpr)!=null?k:!1),Q.push((O=m.startsExpr)!=null?O:!1),te.push((U=m.prefix)!=null?U:!1),q.push(new _(x,m)),G}function de(x,m={}){var S,k,O,U;return++G,M.set(x,G),ee.push(x),Y.push((S=m.binop)!=null?S:-1),X.push((k=m.beforeExpr)!=null?k:!1),Q.push((O=m.startsExpr)!=null?O:!1),te.push((U=m.prefix)!=null?U:!1),q.push(new _("name",m)),G}var ke={bracketL:Z("[",{beforeExpr:$,startsExpr:I}),bracketHashL:Z("#[",{beforeExpr:$,startsExpr:I}),bracketBarL:Z("[|",{beforeExpr:$,startsExpr:I}),bracketR:Z("]"),bracketBarR:Z("|]"),braceL:Z("{",{beforeExpr:$,startsExpr:I}),braceBarL:Z("{|",{beforeExpr:$,startsExpr:I}),braceHashL:Z("#{",{beforeExpr:$,startsExpr:I}),braceR:Z("}"),braceBarR:Z("|}"),parenL:Z("(",{beforeExpr:$,startsExpr:I}),parenR:Z(")"),comma:Z(",",{beforeExpr:$}),semi:Z(";",{beforeExpr:$}),colon:Z(":",{beforeExpr:$}),doubleColon:Z("::",{beforeExpr:$}),dot:Z("."),question:Z("?",{beforeExpr:$}),questionDot:Z("?."),arrow:Z("=>",{beforeExpr:$}),template:Z("template"),ellipsis:Z("...",{beforeExpr:$}),backQuote:Z("`",{startsExpr:I}),dollarBraceL:Z("${",{beforeExpr:$,startsExpr:I}),templateTail:Z("...`",{startsExpr:I}),templateNonTail:Z("...${",{beforeExpr:$,startsExpr:I}),at:Z("@"),hash:Z("#",{startsExpr:I}),interpreterDirective:Z("#!..."),eq:Z("=",{beforeExpr:$,isAssign:L}),assign:Z("_=",{beforeExpr:$,isAssign:L}),slashAssign:Z("_=",{beforeExpr:$,isAssign:L}),xorAssign:Z("_=",{beforeExpr:$,isAssign:L}),moduloAssign:Z("_=",{beforeExpr:$,isAssign:L}),incDec:Z("++/--",{prefix:F,postfix:P,startsExpr:I}),bang:Z("!",{beforeExpr:$,prefix:F,startsExpr:I}),tilde:Z("~",{beforeExpr:$,prefix:F,startsExpr:I}),doubleCaret:Z("^^",{startsExpr:I}),doubleAt:Z("@@",{startsExpr:I}),pipeline:R("|>",0),nullishCoalescing:R("??",1),logicalOR:R("||",1),logicalAND:R("&&",2),bitwiseOR:R("|",3),bitwiseXOR:R("^",4),bitwiseAND:R("&",5),equality:R("==/!=/===/!==",6),lt:R("/<=/>=",7),gt:R("/<=/>=",7),relational:R("/<=/>=",7),bitShift:R("<>/>>>",8),bitShiftL:R("<>/>>>",8),bitShiftR:R("<>/>>>",8),plusMin:Z("+/-",{beforeExpr:$,binop:9,prefix:F,startsExpr:I}),modulo:Z("%",{binop:10,startsExpr:I}),star:Z("*",{binop:10}),slash:R("/",10),exponent:Z("**",{beforeExpr:$,binop:11,rightAssociative:!0}),_in:B("in",{beforeExpr:$,binop:7}),_instanceof:B("instanceof",{beforeExpr:$,binop:7}),_break:B("break"),_case:B("case",{beforeExpr:$}),_catch:B("catch"),_continue:B("continue"),_debugger:B("debugger"),_default:B("default",{beforeExpr:$}),_else:B("else",{beforeExpr:$}),_finally:B("finally"),_function:B("function",{startsExpr:I}),_if:B("if"),_return:B("return",{beforeExpr:$}),_switch:B("switch"),_throw:B("throw",{beforeExpr:$,prefix:F,startsExpr:I}),_try:B("try"),_var:B("var"),_const:B("const"),_with:B("with"),_new:B("new",{beforeExpr:$,startsExpr:I}),_this:B("this",{startsExpr:I}),_super:B("super",{startsExpr:I}),_class:B("class",{startsExpr:I}),_extends:B("extends",{beforeExpr:$}),_export:B("export"),_import:B("import",{startsExpr:I}),_null:B("null",{startsExpr:I}),_true:B("true",{startsExpr:I}),_false:B("false",{startsExpr:I}),_typeof:B("typeof",{beforeExpr:$,prefix:F,startsExpr:I}),_void:B("void",{beforeExpr:$,prefix:F,startsExpr:I}),_delete:B("delete",{beforeExpr:$,prefix:F,startsExpr:I}),_do:B("do",{isLoop:N,beforeExpr:$}),_for:B("for",{isLoop:N}),_while:B("while",{isLoop:N}),_as:de("as",{startsExpr:I}),_assert:de("assert",{startsExpr:I}),_async:de("async",{startsExpr:I}),_await:de("await",{startsExpr:I}),_defer:de("defer",{startsExpr:I}),_from:de("from",{startsExpr:I}),_get:de("get",{startsExpr:I}),_let:de("let",{startsExpr:I}),_meta:de("meta",{startsExpr:I}),_of:de("of",{startsExpr:I}),_sent:de("sent",{startsExpr:I}),_set:de("set",{startsExpr:I}),_source:de("source",{startsExpr:I}),_static:de("static",{startsExpr:I}),_using:de("using",{startsExpr:I}),_yield:de("yield",{startsExpr:I}),_asserts:de("asserts",{startsExpr:I}),_checks:de("checks",{startsExpr:I}),_exports:de("exports",{startsExpr:I}),_global:de("global",{startsExpr:I}),_implements:de("implements",{startsExpr:I}),_intrinsic:de("intrinsic",{startsExpr:I}),_infer:de("infer",{startsExpr:I}),_is:de("is",{startsExpr:I}),_mixins:de("mixins",{startsExpr:I}),_proto:de("proto",{startsExpr:I}),_require:de("require",{startsExpr:I}),_satisfies:de("satisfies",{startsExpr:I}),_keyof:de("keyof",{startsExpr:I}),_readonly:de("readonly",{startsExpr:I}),_unique:de("unique",{startsExpr:I}),_abstract:de("abstract",{startsExpr:I}),_declare:de("declare",{startsExpr:I}),_enum:de("enum",{startsExpr:I}),_module:de("module",{startsExpr:I}),_namespace:de("namespace",{startsExpr:I}),_interface:de("interface",{startsExpr:I}),_type:de("type",{startsExpr:I}),_opaque:de("opaque",{startsExpr:I}),name:Z("name",{startsExpr:I}),string:Z("string",{startsExpr:I}),num:Z("num",{startsExpr:I}),bigint:Z("bigint",{startsExpr:I}),decimal:Z("decimal",{startsExpr:I}),regexp:Z("regexp",{startsExpr:I}),privateName:Z("#name",{startsExpr:I}),eof:Z("eof"),jsxName:Z("jsxName"),jsxText:Z("jsxText",{beforeExpr:!0}),jsxTagStart:Z("jsxTagStart",{startsExpr:!0}),jsxTagEnd:Z("jsxTagEnd"),placeholder:Z("%%",{startsExpr:!0})};function me(x){return x>=93&&x<=132}function Fe(x){return x<=92}function ze(x){return x>=58&&x<=132}function Xe(x){return x>=58&&x<=136}function $t(x){return X[x]}function Pt(x){return Q[x]}function V(x){return x>=29&&x<=33}function Ee(x){return x>=129&&x<=131}function De(x){return x>=90&&x<=92}function oe(x){return x>=58&&x<=92}function ne(x){return x>=39&&x<=59}function ge(x){return x===34}function Ie(x){return te[x]}function _e(x){return x>=121&&x<=123}function be(x){return x>=124&&x<=130}function Ne(x){return ee[x]}function Ze(x){return Y[x]}function ce(x){return x===57}function Te(x){return x>=24&&x<=25}function Oe(x){return q[x]}q[8].updateContext=x=>{x.pop()},q[5].updateContext=q[7].updateContext=q[23].updateContext=x=>{x.push(A.brace)},q[22].updateContext=x=>{x[x.length-1]===A.template?x.pop():x.push(A.template)},q[142].updateContext=x=>{x.push(A.j_expr,A.j_oTag)};var Ye="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Dt="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",St=new RegExp("["+Ye+"]"),Nt=new RegExp("["+Ye+Dt+"]");Ye=Dt=null;var _t=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],yt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ft(x,m){let S=65536;for(let k=0,O=m.length;kx)return!1;if(S+=m[k+1],S>=x)return!0}return!1}function Rt(x){return x<65?x===36:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&St.test(String.fromCharCode(x)):Ft(x,_t)}function sr(x){return x<48?x===36:x<58?!0:x<65?!1:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&Nt.test(String.fromCharCode(x)):Ft(x,_t)||Ft(x,yt)}var tn={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ys=new Set(tn.keyword),Zn=new Set(tn.strict),Er=new Set(tn.strictBind);function Ln(x,m){return m&&x==="await"||x==="enum"}function On(x,m){return Ln(x,m)||Zn.has(x)}function Qn(x){return Er.has(x)}function ye(x,m){return On(x,m)||Qn(x)}function Se(x){return ys.has(x)}function Ae(x,m,S){return x===64&&m===64&&Rt(S)}var Ue=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function tt(x){return Ue.has(x)}var Tt=class{constructor(x){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=x}},vt=class{constructor(x,m){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=x,this.inModule=m}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let x=this.currentThisScopeFlags();return(x&64)>0&&(x&2)===0}get inStaticBlock(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&128)return!0;if(m&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(x){return new Tt(x)}enter(x){this.scopeStack.push(this.createScope(x))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(x){return!!(x.flags&130||!this.parser.inModule&&x.flags&1)}declareName(x,m,S){let k=this.currentScope();if(m&8||m&16){this.checkRedeclarationInScope(k,x,m,S);let O=k.names.get(x)||0;m&16?O=O|4:(k.firstLexicalName||(k.firstLexicalName=x),O=O|2),k.names.set(x,O),m&8&&this.maybeExportDefined(k,x)}else if(m&4)for(let O=this.scopeStack.length-1;O>=0&&(k=this.scopeStack[O],this.checkRedeclarationInScope(k,x,m,S),k.names.set(x,(k.names.get(x)||0)|1),this.maybeExportDefined(k,x),!(k.flags&387));--O);this.parser.inModule&&k.flags&1&&this.undefinedExports.delete(x)}maybeExportDefined(x,m){this.parser.inModule&&x.flags&1&&this.undefinedExports.delete(m)}checkRedeclarationInScope(x,m,S,k){this.isRedeclaredInScope(x,m,S)&&this.parser.raise(v.VarRedeclaration,k,{identifierName:m})}isRedeclaredInScope(x,m,S){if(!(S&1))return!1;if(S&8)return x.names.has(m);let k=x.names.get(m);return S&16?(k&2)>0||!this.treatFunctionsAsVarInScope(x)&&(k&1)>0:(k&2)>0&&!(x.flags&8&&x.firstLexicalName===m)||!this.treatFunctionsAsVarInScope(x)&&(k&4)>0}checkLocalExport(x){let{name:m}=x;this.scopeStack[0].names.has(m)||this.undefinedExports.set(m,x.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&387)return m}}currentThisScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&451&&!(m&4))return m}}},ot=class extends Tt{constructor(...x){super(...x),this.declareFunctions=new Set}},xt=class extends vt{createScope(x){return new ot(x)}declareName(x,m,S){let k=this.currentScope();if(m&2048){this.checkRedeclarationInScope(k,x,m,S),this.maybeExportDefined(k,x),k.declareFunctions.add(x);return}super.declareName(x,m,S)}isRedeclaredInScope(x,m,S){if(super.isRedeclaredInScope(x,m,S))return!0;if(S&2048&&!x.declareFunctions.has(m)){let k=x.names.get(m);return(k&4)>0||(k&2)>0}return!1}checkLocalExport(x){this.scopeStack[0].declareFunctions.has(x.name)||super.checkLocalExport(x)}},Ct=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(x){if(typeof x=="string")return this.plugins.has(x);{let[m,S]=x;if(!this.hasPlugin(m))return!1;let k=this.plugins.get(m);for(let O of Object.keys(S))if((k==null?void 0:k[O])!==S[O])return!1;return!0}}getPluginOption(x,m){var S;return(S=this.plugins.get(x))==null?void 0:S[m]}};function Lr(x,m){x.trailingComments===void 0?x.trailingComments=m:x.trailingComments.unshift(...m)}function Or(x,m){x.leadingComments===void 0?x.leadingComments=m:x.leadingComments.unshift(...m)}function ct(x,m){x.innerComments===void 0?x.innerComments=m:x.innerComments.unshift(...m)}function Kt(x,m,S){let k=null,O=m.length;for(;k===null&&O>0;)k=m[--O];k===null||k.start>S.start?ct(x,S.comments):Lr(k,S.comments)}var or=class extends Ct{addComment(x){this.filename&&(x.loc.filename=this.filename);let{commentsLen:m}=this.state;this.comments.length!=m&&(this.comments.length=m),this.comments.push(x),this.state.commentsLen++}processComment(x){let{commentStack:m}=this.state,S=m.length;if(S===0)return;let k=S-1,O=m[k];O.start===x.end&&(O.leadingNode=x,k--);let{start:U}=x;for(;k>=0;k--){let K=m[k],re=K.end;if(re>U)K.containingNode=x,this.finalizeComment(K),m.splice(k,1);else{re===U&&(K.trailingNode=x);break}}}finalizeComment(x){let{comments:m}=x;if(x.leadingNode!==null||x.trailingNode!==null)x.leadingNode!==null&&Lr(x.leadingNode,m),x.trailingNode!==null&&Or(x.trailingNode,m);else{let{containingNode:S,start:k}=x;if(this.input.charCodeAt(k-1)===44)switch(S.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Kt(S,S.properties,x);break;case"CallExpression":case"OptionalCallExpression":Kt(S,S.arguments,x);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Kt(S,S.params,x);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Kt(S,S.elements,x);break;case"ExportNamedDeclaration":case"ImportDeclaration":Kt(S,S.specifiers,x);break;default:ct(S,m)}else ct(S,m)}}finalizeRemainingComments(){let{commentStack:x}=this.state;for(let m=x.length-1;m>=0;m--)this.finalizeComment(x[m]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(x){let{commentStack:m}=this.state,{length:S}=m;if(S===0)return;let k=m[S-1];k.leadingNode===x&&(k.leadingNode=null)}resetPreviousIdentifierLeadingComments(x){let{commentStack:m}=this.state,{length:S}=m;S!==0&&(m[S-1].trailingNode===x?m[S-1].trailingNode=null:S>=2&&m[S-2].trailingNode===x&&(m[S-2].trailingNode=null))}takeSurroundingComments(x,m,S){let{commentStack:k}=this.state,O=k.length;if(O===0)return;let U=O-1;for(;U>=0;U--){let K=k[U],re=K.end;if(K.start===S)K.leadingNode=x;else if(re===m)K.trailingNode=x;else if(re0}set strict(m){m?this.flags|=1:this.flags&=-2}init({strictMode:m,sourceType:S,startLine:k,startColumn:O}){this.strict=m===!1?!1:m===!0?!0:S==="module",this.curLine=k,this.lineStart=-O,this.startLoc=this.endLoc=new r(k,O,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(m){m?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(m){m?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(m){m?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(m){m?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(m){m?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(m){m?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(m){m?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(m){m?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(m){m?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(m){m?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(m){m?this.flags|=2048:this.flags&=-2049}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let m=new oz;return m.flags=this.flags,m.curLine=this.curLine,m.lineStart=this.lineStart,m.startLoc=this.startLoc,m.endLoc=this.endLoc,m.errors=this.errors.slice(),m.potentialArrowAt=this.potentialArrowAt,m.noArrowAt=this.noArrowAt.slice(),m.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),m.topicContext=this.topicContext,m.labels=this.labels.slice(),m.commentsLen=this.commentsLen,m.commentStack=this.commentStack.slice(),m.pos=this.pos,m.type=this.type,m.value=this.value,m.start=this.start,m.end=this.end,m.lastTokEndLoc=this.lastTokEndLoc,m.lastTokStartLoc=this.lastTokStartLoc,m.context=this.context.slice(),m.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,m.strictErrors=this.strictErrors,m.tokensLength=this.tokensLength,m}},it=function(x){return x>=48&&x<=57},Qe={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Bt={bin:x=>x===48||x===49,oct:x=>x>=48&&x<=55,dec:x=>x>=48&&x<=57,hex:x=>x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102};function Jt(x,m,S,k,O,U){let K=S,re=k,le=O,ae="",Pe=null,Ve=S,{length:at}=m;for(;;){if(S>=at){U.unterminated(K,re,le),ae+=m.slice(Ve,S);break}let nt=m.charCodeAt(S);if(Gt(x,nt,m,S)){ae+=m.slice(Ve,S);break}if(nt===92){ae+=m.slice(Ve,S);let xr=Wr(m,S,k,O,x==="template",U);xr.ch===null&&!Pe?Pe={pos:S,lineStart:k,curLine:O}:ae+=xr.ch,{pos:S,lineStart:k,curLine:O}=xr,Ve=S}else nt===8232||nt===8233?(++S,++O,k=S):nt===10||nt===13?x==="template"?(ae+=m.slice(Ve,S)+` +- Did you mean \`import { "${x}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:x})=>`\`import()\` requires exactly ${x===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:x})=>`Expected number in radix ${x}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:x})=>`Escape sequence in keyword ${x}.`,InvalidIdentifier:({identifierName:x})=>`Invalid identifier ${x}.`,InvalidLhs:({ancestor:x})=>`Invalid left-hand side in ${a(x)}.`,InvalidLhsBinding:({ancestor:x})=>`Binding invalid left-hand side in ${a(x)}.`,InvalidLhsOptionalChaining:({ancestor:x})=>`Invalid optional chaining in the left-hand side of ${a(x)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:x})=>`Unexpected character '${x}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:x})=>`Private name #${x} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:x})=>`Label '${x}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:x})=>`This experimental syntax requires enabling the parser plugin: ${x.map(m=>JSON.stringify(m)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:x})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${x.map(m=>JSON.stringify(m)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:x})=>`Duplicate key "${x}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:x})=>`An export name cannot include a lone surrogate, found '\\u${x.toString(16)}'.`,ModuleExportUndefined:({localName:x})=>`Export '${x}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:x})=>`Private names are only allowed in property accesses (\`obj.#${x}\`) or in \`in\` expressions (\`#${x} in obj\`).`,PrivateNameRedeclaration:({identifierName:x})=>`Duplicate private name #${x}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:x})=>`Unexpected keyword '${x}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:x})=>`Unexpected reserved word '${x}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:x,unexpected:m})=>`Unexpected token${m?` '${m}'.`:""}${x?`, expected "${x}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:x,onlyValidPropertyName:m})=>`The only valid meta property for ${x} is ${x}.${m}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:x})=>`Identifier '${x}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},u={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:x})=>`Assigning to '${x}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:x})=>`Binding '${x}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),d={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:x})=>`Invalid topic token ${x}. In order to use ${x} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${x}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:x})=>`Hack-style pipe body cannot be an unparenthesized ${a({type:x})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},f=["toMessage"],p=["message"];function g(x,m,S){Object.defineProperty(x,m,{enumerable:!1,configurable:!0,value:S})}function y(x){let{toMessage:m}=x,S=t(x,f);return function k(O,U){let K=new SyntaxError;return Object.assign(K,S,{loc:O,pos:O.index}),"missingPlugin"in U&&Object.assign(K,{missingPlugin:U.missingPlugin}),g(K,"clone",function(re={}){var le;let{line:ae,column:Pe,index:Ve}=(le=re.loc)!=null?le:O;return k(new r(ae,Pe,Ve),Object.assign({},U,re.details))}),g(K,"details",U),Object.defineProperty(K,"message",{configurable:!0,get(){let re=`${m(U)} (${O.line}:${O.column})`;return this.message=re,re},set(re){Object.defineProperty(this,"message",{value:re,writable:!0})}}),K}}function b(x,m){if(Array.isArray(x))return k=>b(k,x[0]);let S={};for(let k of Object.keys(x)){let O=x[k],U=typeof O=="string"?{message:()=>O}:typeof O=="function"?{message:O}:O,{message:K}=U,re=t(U,p),le=typeof K=="string"?()=>K:K;S[k]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:k,toMessage:le},m?{syntaxPlugin:m}:{},re))}return S}var v=Object.assign({},b(o),b(c),b(u),b`pipelineOperator`(d)),{defineProperty:E}=Object,D=(x,m)=>E(x,m,{enumerable:!1,value:x[m]});function C(x){return x.loc.start&&D(x.loc.start,"index"),x.loc.end&&D(x.loc.end,"index"),x}var w=x=>class extends x{parse(){let m=C(super.parse());return this.options.tokens&&(m.tokens=m.tokens.map(C)),m}parseRegExpLiteral({pattern:m,flags:S}){let k=null;try{k=new RegExp(m,S)}catch{}let O=this.estreeParseLiteral(k);return O.regex={pattern:m,flags:S},O}parseBigIntLiteral(m){let S;try{S=BigInt(m)}catch{S=null}let k=this.estreeParseLiteral(S);return k.bigint=String(k.value||m),k}parseDecimalLiteral(m){let S=this.estreeParseLiteral(null);return S.decimal=String(S.value||m),S}estreeParseLiteral(m){return this.parseLiteral(m,"Literal")}parseStringLiteral(m){return this.estreeParseLiteral(m)}parseNumericLiteral(m){return this.estreeParseLiteral(m)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(m){return this.estreeParseLiteral(m)}directiveToStmt(m){let S=m.value;delete m.value,S.type="Literal",S.raw=S.extra.raw,S.value=S.extra.expressionValue;let k=m;return k.type="ExpressionStatement",k.expression=S,k.directive=S.extra.rawValue,delete S.extra,k}initFunction(m,S){super.initFunction(m,S),m.expression=!1}checkDeclaration(m){m!=null&&this.isObjectProperty(m)?this.checkDeclaration(m.value):super.checkDeclaration(m)}getObjectOrClassMethodParams(m){return m.value.params}isValidDirective(m){var S;return m.type==="ExpressionStatement"&&m.expression.type==="Literal"&&typeof m.expression.value=="string"&&!((S=m.expression.extra)!=null&&S.parenthesized)}parseBlockBody(m,S,k,O,U){super.parseBlockBody(m,S,k,O,U);let K=m.directives.map(re=>this.directiveToStmt(re));m.body=K.concat(m.body),delete m.directives}pushClassMethod(m,S,k,O,U,K){this.parseMethod(S,k,O,U,K,"ClassMethod",!0),S.typeParameters&&(S.value.typeParameters=S.typeParameters,delete S.typeParameters),m.body.push(S)}parsePrivateName(){let m=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(m):m}convertPrivateNameToPrivateIdentifier(m){let S=super.getPrivateNameSV(m);return m=m,delete m.id,m.name=S,m.type="PrivateIdentifier",m}isPrivateName(m){return this.getPluginOption("estree","classFeatures")?m.type==="PrivateIdentifier":super.isPrivateName(m)}getPrivateNameSV(m){return this.getPluginOption("estree","classFeatures")?m.name:super.getPrivateNameSV(m)}parseLiteral(m,S){let k=super.parseLiteral(m,S);return k.raw=k.extra.raw,delete k.extra,k}parseFunctionBody(m,S,k=!1){super.parseFunctionBody(m,S,k),m.expression=m.body.type!=="BlockStatement"}parseMethod(m,S,k,O,U,K,re=!1){let le=this.startNode();return le.kind=m.kind,le=super.parseMethod(le,S,k,O,U,K,re),le.type="FunctionExpression",delete le.kind,m.value=le,K==="ClassPrivateMethod"&&(m.computed=!1),this.finishNode(m,"MethodDefinition")}parseClassProperty(...m){let S=super.parseClassProperty(...m);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition"),S}parseClassPrivateProperty(...m){let S=super.parseClassPrivateProperty(...m);return this.getPluginOption("estree","classFeatures")&&(S.type="PropertyDefinition",S.computed=!1),S}parseObjectMethod(m,S,k,O,U){let K=super.parseObjectMethod(m,S,k,O,U);return K&&(K.type="Property",K.kind==="method"&&(K.kind="init"),K.shorthand=!1),K}parseObjectProperty(m,S,k,O){let U=super.parseObjectProperty(m,S,k,O);return U&&(U.kind="init",U.type="Property"),U}isValidLVal(m,S,k){return m==="Property"?"value":super.isValidLVal(m,S,k)}isAssignable(m,S){return m!=null&&this.isObjectProperty(m)?this.isAssignable(m.value,S):super.isAssignable(m,S)}toAssignable(m,S=!1){if(m!=null&&this.isObjectProperty(m)){let{key:k,value:O}=m;this.isPrivateName(k)&&this.classScope.usePrivateName(this.getPrivateNameSV(k),k.loc.start),this.toAssignable(O,S)}else super.toAssignable(m,S)}toAssignableObjectExpressionProp(m,S,k){m.kind==="get"||m.kind==="set"?this.raise(v.PatternHasAccessor,m.key):m.method?this.raise(v.PatternHasMethod,m.key):super.toAssignableObjectExpressionProp(m,S,k)}finishCallExpression(m,S){let k=super.finishCallExpression(m,S);if(k.callee.type==="Import"){if(k.type="ImportExpression",k.source=k.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var O,U;k.options=(O=k.arguments[1])!=null?O:null,k.attributes=(U=k.arguments[1])!=null?U:null}delete k.arguments,delete k.callee}return k}toReferencedArguments(m){m.type!=="ImportExpression"&&super.toReferencedArguments(m)}parseExport(m,S){let k=this.state.lastTokStartLoc,O=super.parseExport(m,S);switch(O.type){case"ExportAllDeclaration":O.exported=null;break;case"ExportNamedDeclaration":O.specifiers.length===1&&O.specifiers[0].type==="ExportNamespaceSpecifier"&&(O.type="ExportAllDeclaration",O.exported=O.specifiers[0].exported,delete O.specifiers);case"ExportDefaultDeclaration":{var U;let{declaration:K}=O;(K==null?void 0:K.type)==="ClassDeclaration"&&((U=K.decorators)==null?void 0:U.length)>0&&K.start===O.start&&this.resetStartLocation(O,k)}break}return O}parseSubscript(m,S,k,O){let U=super.parseSubscript(m,S,k,O);if(O.optionalChainMember){if((U.type==="OptionalMemberExpression"||U.type==="OptionalCallExpression")&&(U.type=U.type.substring(8)),O.stop){let K=this.startNodeAtNode(U);return K.expression=U,this.finishNode(K,"ChainExpression")}}else(U.type==="MemberExpression"||U.type==="CallExpression")&&(U.optional=!1);return U}isOptionalMemberExpression(m){return m.type==="ChainExpression"?m.expression.type==="MemberExpression":super.isOptionalMemberExpression(m)}hasPropertyAsPrivateName(m){return m.type==="ChainExpression"&&(m=m.expression),super.hasPropertyAsPrivateName(m)}isObjectProperty(m){return m.type==="Property"&&m.kind==="init"&&!m.method}isObjectMethod(m){return m.method||m.kind==="get"||m.kind==="set"}finishNodeAt(m,S,k){return C(super.finishNodeAt(m,S,k))}resetStartLocation(m,S){super.resetStartLocation(m,S),C(m)}resetEndLocation(m,S=this.state.lastTokEndLoc){super.resetEndLocation(m,S),C(m)}},T=class{constructor(x,m){this.token=void 0,this.preserveSpace=void 0,this.token=x,this.preserveSpace=!!m}},A={brace:new T("{"),j_oTag:new T("...",!0)};A.template=new T("`",!0);var $=!0,I=!0,N=!0,L=!0,F=!0,P=!0,_=class{constructor(x,m={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=x,this.keyword=m.keyword,this.beforeExpr=!!m.beforeExpr,this.startsExpr=!!m.startsExpr,this.rightAssociative=!!m.rightAssociative,this.isLoop=!!m.isLoop,this.isAssign=!!m.isAssign,this.prefix=!!m.prefix,this.postfix=!!m.postfix,this.binop=m.binop!=null?m.binop:null,this.updateContext=null}},M=new Map;function j(x,m={}){m.keyword=x;let S=Z(x,m);return M.set(x,S),S}function R(x,m){return Z(x,{beforeExpr:$,binop:m})}var G=-1,q=[],ee=[],Y=[],X=[],Q=[],te=[];function Z(x,m={}){var S,k,O,U;return++G,ee.push(x),Y.push((S=m.binop)!=null?S:-1),X.push((k=m.beforeExpr)!=null?k:!1),Q.push((O=m.startsExpr)!=null?O:!1),te.push((U=m.prefix)!=null?U:!1),q.push(new _(x,m)),G}function de(x,m={}){var S,k,O,U;return++G,M.set(x,G),ee.push(x),Y.push((S=m.binop)!=null?S:-1),X.push((k=m.beforeExpr)!=null?k:!1),Q.push((O=m.startsExpr)!=null?O:!1),te.push((U=m.prefix)!=null?U:!1),q.push(new _("name",m)),G}var ke={bracketL:Z("[",{beforeExpr:$,startsExpr:I}),bracketHashL:Z("#[",{beforeExpr:$,startsExpr:I}),bracketBarL:Z("[|",{beforeExpr:$,startsExpr:I}),bracketR:Z("]"),bracketBarR:Z("|]"),braceL:Z("{",{beforeExpr:$,startsExpr:I}),braceBarL:Z("{|",{beforeExpr:$,startsExpr:I}),braceHashL:Z("#{",{beforeExpr:$,startsExpr:I}),braceR:Z("}"),braceBarR:Z("|}"),parenL:Z("(",{beforeExpr:$,startsExpr:I}),parenR:Z(")"),comma:Z(",",{beforeExpr:$}),semi:Z(";",{beforeExpr:$}),colon:Z(":",{beforeExpr:$}),doubleColon:Z("::",{beforeExpr:$}),dot:Z("."),question:Z("?",{beforeExpr:$}),questionDot:Z("?."),arrow:Z("=>",{beforeExpr:$}),template:Z("template"),ellipsis:Z("...",{beforeExpr:$}),backQuote:Z("`",{startsExpr:I}),dollarBraceL:Z("${",{beforeExpr:$,startsExpr:I}),templateTail:Z("...`",{startsExpr:I}),templateNonTail:Z("...${",{beforeExpr:$,startsExpr:I}),at:Z("@"),hash:Z("#",{startsExpr:I}),interpreterDirective:Z("#!..."),eq:Z("=",{beforeExpr:$,isAssign:L}),assign:Z("_=",{beforeExpr:$,isAssign:L}),slashAssign:Z("_=",{beforeExpr:$,isAssign:L}),xorAssign:Z("_=",{beforeExpr:$,isAssign:L}),moduloAssign:Z("_=",{beforeExpr:$,isAssign:L}),incDec:Z("++/--",{prefix:F,postfix:P,startsExpr:I}),bang:Z("!",{beforeExpr:$,prefix:F,startsExpr:I}),tilde:Z("~",{beforeExpr:$,prefix:F,startsExpr:I}),doubleCaret:Z("^^",{startsExpr:I}),doubleAt:Z("@@",{startsExpr:I}),pipeline:R("|>",0),nullishCoalescing:R("??",1),logicalOR:R("||",1),logicalAND:R("&&",2),bitwiseOR:R("|",3),bitwiseXOR:R("^",4),bitwiseAND:R("&",5),equality:R("==/!=/===/!==",6),lt:R("/<=/>=",7),gt:R("/<=/>=",7),relational:R("/<=/>=",7),bitShift:R("<>/>>>",8),bitShiftL:R("<>/>>>",8),bitShiftR:R("<>/>>>",8),plusMin:Z("+/-",{beforeExpr:$,binop:9,prefix:F,startsExpr:I}),modulo:Z("%",{binop:10,startsExpr:I}),star:Z("*",{binop:10}),slash:R("/",10),exponent:Z("**",{beforeExpr:$,binop:11,rightAssociative:!0}),_in:j("in",{beforeExpr:$,binop:7}),_instanceof:j("instanceof",{beforeExpr:$,binop:7}),_break:j("break"),_case:j("case",{beforeExpr:$}),_catch:j("catch"),_continue:j("continue"),_debugger:j("debugger"),_default:j("default",{beforeExpr:$}),_else:j("else",{beforeExpr:$}),_finally:j("finally"),_function:j("function",{startsExpr:I}),_if:j("if"),_return:j("return",{beforeExpr:$}),_switch:j("switch"),_throw:j("throw",{beforeExpr:$,prefix:F,startsExpr:I}),_try:j("try"),_var:j("var"),_const:j("const"),_with:j("with"),_new:j("new",{beforeExpr:$,startsExpr:I}),_this:j("this",{startsExpr:I}),_super:j("super",{startsExpr:I}),_class:j("class",{startsExpr:I}),_extends:j("extends",{beforeExpr:$}),_export:j("export"),_import:j("import",{startsExpr:I}),_null:j("null",{startsExpr:I}),_true:j("true",{startsExpr:I}),_false:j("false",{startsExpr:I}),_typeof:j("typeof",{beforeExpr:$,prefix:F,startsExpr:I}),_void:j("void",{beforeExpr:$,prefix:F,startsExpr:I}),_delete:j("delete",{beforeExpr:$,prefix:F,startsExpr:I}),_do:j("do",{isLoop:N,beforeExpr:$}),_for:j("for",{isLoop:N}),_while:j("while",{isLoop:N}),_as:de("as",{startsExpr:I}),_assert:de("assert",{startsExpr:I}),_async:de("async",{startsExpr:I}),_await:de("await",{startsExpr:I}),_defer:de("defer",{startsExpr:I}),_from:de("from",{startsExpr:I}),_get:de("get",{startsExpr:I}),_let:de("let",{startsExpr:I}),_meta:de("meta",{startsExpr:I}),_of:de("of",{startsExpr:I}),_sent:de("sent",{startsExpr:I}),_set:de("set",{startsExpr:I}),_source:de("source",{startsExpr:I}),_static:de("static",{startsExpr:I}),_using:de("using",{startsExpr:I}),_yield:de("yield",{startsExpr:I}),_asserts:de("asserts",{startsExpr:I}),_checks:de("checks",{startsExpr:I}),_exports:de("exports",{startsExpr:I}),_global:de("global",{startsExpr:I}),_implements:de("implements",{startsExpr:I}),_intrinsic:de("intrinsic",{startsExpr:I}),_infer:de("infer",{startsExpr:I}),_is:de("is",{startsExpr:I}),_mixins:de("mixins",{startsExpr:I}),_proto:de("proto",{startsExpr:I}),_require:de("require",{startsExpr:I}),_satisfies:de("satisfies",{startsExpr:I}),_keyof:de("keyof",{startsExpr:I}),_readonly:de("readonly",{startsExpr:I}),_unique:de("unique",{startsExpr:I}),_abstract:de("abstract",{startsExpr:I}),_declare:de("declare",{startsExpr:I}),_enum:de("enum",{startsExpr:I}),_module:de("module",{startsExpr:I}),_namespace:de("namespace",{startsExpr:I}),_interface:de("interface",{startsExpr:I}),_type:de("type",{startsExpr:I}),_opaque:de("opaque",{startsExpr:I}),name:Z("name",{startsExpr:I}),string:Z("string",{startsExpr:I}),num:Z("num",{startsExpr:I}),bigint:Z("bigint",{startsExpr:I}),decimal:Z("decimal",{startsExpr:I}),regexp:Z("regexp",{startsExpr:I}),privateName:Z("#name",{startsExpr:I}),eof:Z("eof"),jsxName:Z("jsxName"),jsxText:Z("jsxText",{beforeExpr:!0}),jsxTagStart:Z("jsxTagStart",{startsExpr:!0}),jsxTagEnd:Z("jsxTagEnd"),placeholder:Z("%%",{startsExpr:!0})};function me(x){return x>=93&&x<=132}function Fe(x){return x<=92}function je(x){return x>=58&&x<=132}function Xe(x){return x>=58&&x<=136}function $t(x){return X[x]}function Pt(x){return Q[x]}function V(x){return x>=29&&x<=33}function Ee(x){return x>=129&&x<=131}function De(x){return x>=90&&x<=92}function oe(x){return x>=58&&x<=92}function ne(x){return x>=39&&x<=59}function ge(x){return x===34}function Ie(x){return te[x]}function _e(x){return x>=121&&x<=123}function be(x){return x>=124&&x<=130}function Ne(x){return ee[x]}function Ze(x){return Y[x]}function ce(x){return x===57}function Te(x){return x>=24&&x<=25}function Oe(x){return q[x]}q[8].updateContext=x=>{x.pop()},q[5].updateContext=q[7].updateContext=q[23].updateContext=x=>{x.push(A.brace)},q[22].updateContext=x=>{x[x.length-1]===A.template?x.pop():x.push(A.template)},q[142].updateContext=x=>{x.push(A.j_expr,A.j_oTag)};var Ye="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",Dt="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",St=new RegExp("["+Ye+"]"),Nt=new RegExp("["+Ye+Dt+"]");Ye=Dt=null;var _t=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],yt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ft(x,m){let S=65536;for(let k=0,O=m.length;kx)return!1;if(S+=m[k+1],S>=x)return!0}return!1}function Rt(x){return x<65?x===36:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&St.test(String.fromCharCode(x)):Ft(x,_t)}function sr(x){return x<48?x===36:x<58?!0:x<65?!1:x<=90?!0:x<97?x===95:x<=122?!0:x<=65535?x>=170&&Nt.test(String.fromCharCode(x)):Ft(x,_t)||Ft(x,yt)}var tn={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ys=new Set(tn.keyword),Zn=new Set(tn.strict),Er=new Set(tn.strictBind);function Ln(x,m){return m&&x==="await"||x==="enum"}function On(x,m){return Ln(x,m)||Zn.has(x)}function Qn(x){return Er.has(x)}function ye(x,m){return On(x,m)||Qn(x)}function Se(x){return ys.has(x)}function Ae(x,m,S){return x===64&&m===64&&Rt(S)}var Ue=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function tt(x){return Ue.has(x)}var Tt=class{constructor(x){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=x}},vt=class{constructor(x,m){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=x,this.inModule=m}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let x=this.currentThisScopeFlags();return(x&64)>0&&(x&2)===0}get inStaticBlock(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&128)return!0;if(m&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(x){return new Tt(x)}enter(x){this.scopeStack.push(this.createScope(x))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(x){return!!(x.flags&130||!this.parser.inModule&&x.flags&1)}declareName(x,m,S){let k=this.currentScope();if(m&8||m&16){this.checkRedeclarationInScope(k,x,m,S);let O=k.names.get(x)||0;m&16?O=O|4:(k.firstLexicalName||(k.firstLexicalName=x),O=O|2),k.names.set(x,O),m&8&&this.maybeExportDefined(k,x)}else if(m&4)for(let O=this.scopeStack.length-1;O>=0&&(k=this.scopeStack[O],this.checkRedeclarationInScope(k,x,m,S),k.names.set(x,(k.names.get(x)||0)|1),this.maybeExportDefined(k,x),!(k.flags&387));--O);this.parser.inModule&&k.flags&1&&this.undefinedExports.delete(x)}maybeExportDefined(x,m){this.parser.inModule&&x.flags&1&&this.undefinedExports.delete(m)}checkRedeclarationInScope(x,m,S,k){this.isRedeclaredInScope(x,m,S)&&this.parser.raise(v.VarRedeclaration,k,{identifierName:m})}isRedeclaredInScope(x,m,S){if(!(S&1))return!1;if(S&8)return x.names.has(m);let k=x.names.get(m);return S&16?(k&2)>0||!this.treatFunctionsAsVarInScope(x)&&(k&1)>0:(k&2)>0&&!(x.flags&8&&x.firstLexicalName===m)||!this.treatFunctionsAsVarInScope(x)&&(k&4)>0}checkLocalExport(x){let{name:m}=x;this.scopeStack[0].names.has(m)||this.undefinedExports.set(m,x.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&387)return m}}currentThisScopeFlags(){for(let x=this.scopeStack.length-1;;x--){let{flags:m}=this.scopeStack[x];if(m&451&&!(m&4))return m}}},ot=class extends Tt{constructor(...x){super(...x),this.declareFunctions=new Set}},xt=class extends vt{createScope(x){return new ot(x)}declareName(x,m,S){let k=this.currentScope();if(m&2048){this.checkRedeclarationInScope(k,x,m,S),this.maybeExportDefined(k,x),k.declareFunctions.add(x);return}super.declareName(x,m,S)}isRedeclaredInScope(x,m,S){if(super.isRedeclaredInScope(x,m,S))return!0;if(S&2048&&!x.declareFunctions.has(m)){let k=x.names.get(m);return(k&4)>0||(k&2)>0}return!1}checkLocalExport(x){this.scopeStack[0].declareFunctions.has(x.name)||super.checkLocalExport(x)}},Ct=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(x){if(typeof x=="string")return this.plugins.has(x);{let[m,S]=x;if(!this.hasPlugin(m))return!1;let k=this.plugins.get(m);for(let O of Object.keys(S))if((k==null?void 0:k[O])!==S[O])return!1;return!0}}getPluginOption(x,m){var S;return(S=this.plugins.get(x))==null?void 0:S[m]}};function Lr(x,m){x.trailingComments===void 0?x.trailingComments=m:x.trailingComments.unshift(...m)}function Or(x,m){x.leadingComments===void 0?x.leadingComments=m:x.leadingComments.unshift(...m)}function ct(x,m){x.innerComments===void 0?x.innerComments=m:x.innerComments.unshift(...m)}function Kt(x,m,S){let k=null,O=m.length;for(;k===null&&O>0;)k=m[--O];k===null||k.start>S.start?ct(x,S.comments):Lr(k,S.comments)}var or=class extends Ct{addComment(x){this.filename&&(x.loc.filename=this.filename);let{commentsLen:m}=this.state;this.comments.length!=m&&(this.comments.length=m),this.comments.push(x),this.state.commentsLen++}processComment(x){let{commentStack:m}=this.state,S=m.length;if(S===0)return;let k=S-1,O=m[k];O.start===x.end&&(O.leadingNode=x,k--);let{start:U}=x;for(;k>=0;k--){let K=m[k],re=K.end;if(re>U)K.containingNode=x,this.finalizeComment(K),m.splice(k,1);else{re===U&&(K.trailingNode=x);break}}}finalizeComment(x){let{comments:m}=x;if(x.leadingNode!==null||x.trailingNode!==null)x.leadingNode!==null&&Lr(x.leadingNode,m),x.trailingNode!==null&&Or(x.trailingNode,m);else{let{containingNode:S,start:k}=x;if(this.input.charCodeAt(k-1)===44)switch(S.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Kt(S,S.properties,x);break;case"CallExpression":case"OptionalCallExpression":Kt(S,S.arguments,x);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Kt(S,S.params,x);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Kt(S,S.elements,x);break;case"ExportNamedDeclaration":case"ImportDeclaration":Kt(S,S.specifiers,x);break;default:ct(S,m)}else ct(S,m)}}finalizeRemainingComments(){let{commentStack:x}=this.state;for(let m=x.length-1;m>=0;m--)this.finalizeComment(x[m]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(x){let{commentStack:m}=this.state,{length:S}=m;if(S===0)return;let k=m[S-1];k.leadingNode===x&&(k.leadingNode=null)}resetPreviousIdentifierLeadingComments(x){let{commentStack:m}=this.state,{length:S}=m;S!==0&&(m[S-1].trailingNode===x?m[S-1].trailingNode=null:S>=2&&m[S-2].trailingNode===x&&(m[S-2].trailingNode=null))}takeSurroundingComments(x,m,S){let{commentStack:k}=this.state,O=k.length;if(O===0)return;let U=O-1;for(;U>=0;U--){let K=k[U],re=K.end;if(K.start===S)K.leadingNode=x;else if(re===m)K.trailingNode=x;else if(re0}set strict(m){m?this.flags|=1:this.flags&=-2}init({strictMode:m,sourceType:S,startLine:k,startColumn:O}){this.strict=m===!1?!1:m===!0?!0:S==="module",this.curLine=k,this.lineStart=-O,this.startLoc=this.endLoc=new r(k,O,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(m){m?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(m){m?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(m){m?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(m){m?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(m){m?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(m){m?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(m){m?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(m){m?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(m){m?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(m){m?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(m){m?this.flags|=2048:this.flags&=-2049}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let m=new oj;return m.flags=this.flags,m.curLine=this.curLine,m.lineStart=this.lineStart,m.startLoc=this.startLoc,m.endLoc=this.endLoc,m.errors=this.errors.slice(),m.potentialArrowAt=this.potentialArrowAt,m.noArrowAt=this.noArrowAt.slice(),m.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),m.topicContext=this.topicContext,m.labels=this.labels.slice(),m.commentsLen=this.commentsLen,m.commentStack=this.commentStack.slice(),m.pos=this.pos,m.type=this.type,m.value=this.value,m.start=this.start,m.end=this.end,m.lastTokEndLoc=this.lastTokEndLoc,m.lastTokStartLoc=this.lastTokStartLoc,m.context=this.context.slice(),m.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,m.strictErrors=this.strictErrors,m.tokensLength=this.tokensLength,m}},it=function(x){return x>=48&&x<=57},Qe={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Bt={bin:x=>x===48||x===49,oct:x=>x>=48&&x<=55,dec:x=>x>=48&&x<=57,hex:x=>x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102};function Jt(x,m,S,k,O,U){let K=S,re=k,le=O,ae="",Pe=null,Ve=S,{length:at}=m;for(;;){if(S>=at){U.unterminated(K,re,le),ae+=m.slice(Ve,S);break}let nt=m.charCodeAt(S);if(Gt(x,nt,m,S)){ae+=m.slice(Ve,S);break}if(nt===92){ae+=m.slice(Ve,S);let xr=Wr(m,S,k,O,x==="template",U);xr.ch===null&&!Pe?Pe={pos:S,lineStart:k,curLine:O}:ae+=xr.ch,{pos:S,lineStart:k,curLine:O}=xr,Ve=S}else nt===8232||nt===8233?(++S,++O,k=S):nt===10||nt===13?x==="template"?(ae+=m.slice(Ve,S)+` `,++S,nt===13&&m.charCodeAt(S)===10&&++S,++O,Ve=k=S):U.unterminated(K,re,le):++S}return{pos:S,str:ae,firstInvalidLoc:Pe,lineStart:k,curLine:O,containsInvalid:!!Pe}}function Gt(x,m,S,k){return x==="template"?m===96||m===36&&S.charCodeAt(k+1)===123:m===(x==="double"?34:39)}function Wr(x,m,S,k,O,U){let K=!O;m++;let re=ae=>({pos:m,ch:ae,lineStart:S,curLine:k}),le=x.charCodeAt(m++);switch(le){case 110:return re(` -`);case 114:return re("\r");case 120:{let ae;return{code:ae,pos:m}=xi(x,m,S,k,2,!1,K,U),re(ae===null?null:String.fromCharCode(ae))}case 117:{let ae;return{code:ae,pos:m}=xa(x,m,S,k,K,U),re(ae===null?null:String.fromCodePoint(ae))}case 116:return re(" ");case 98:return re("\b");case 118:return re("\v");case 102:return re("\f");case 13:x.charCodeAt(m)===10&&++m;case 10:S=m,++k;case 8232:case 8233:return re("");case 56:case 57:if(O)return re(null);U.strictNumericEscape(m-1,S,k);default:if(le>=48&&le<=55){let ae=m-1,Pe=x.slice(ae,m+2).match(/^[0-7]+/)[0],Ve=parseInt(Pe,8);Ve>255&&(Pe=Pe.slice(0,-1),Ve=parseInt(Pe,8)),m+=Pe.length-1;let at=x.charCodeAt(m);if(Pe!=="0"||at===56||at===57){if(O)return re(null);U.strictNumericEscape(ae,S,k)}return re(String.fromCharCode(Ve))}return re(String.fromCharCode(le))}}function xi(x,m,S,k,O,U,K,re){let le=m,ae;return{n:ae,pos:m}=jr(x,m,S,k,16,O,U,!1,re,!K),ae===null&&(K?re.invalidEscapeSequence(le,S,k):m=le-1),{code:ae,pos:m}}function jr(x,m,S,k,O,U,K,re,le,ae){let Pe=m,Ve=O===16?Qe.hex:Qe.decBinOct,at=O===16?Bt.hex:O===10?Bt.dec:O===8?Bt.oct:Bt.bin,nt=!1,xr=0;for(let gr=0,wn=U??1/0;gr=97?Li=Bn-97+10:Bn>=65?Li=Bn-65+10:it(Bn)?Li=Bn-48:Li=1/0,Li>=O){if(Li<=9&&ae)return{n:null,pos:m};if(Li<=9&&le.invalidDigit(m,S,k,O))Li=0;else if(K)Li=0,nt=!0;else break}++m,xr=xr*O+Li}return m===Pe||U!=null&&m-Pe!==U||nt?{n:null,pos:m}:{n:xr,pos:m}}function xa(x,m,S,k,O,U){let K=x.charCodeAt(m),re;if(K===123){if(++m,{code:re,pos:m}=xi(x,m,S,k,x.indexOf("}",m)-m,!0,O,U),++m,re!==null&&re>1114111)if(O)U.invalidCodePoint(m,S,k);else return{code:null,pos:m}}else({code:re,pos:m}=xi(x,m,S,k,4,!1,O,U));return{code:re,pos:m}}function Zi(x,m,S){return new r(S,x-m,x)}var ti=new Set([103,109,115,105,121,117,100,118]),Qi=class{constructor(x){this.type=x.type,this.value=x.value,this.start=x.start,this.end=x.end,this.loc=new n(x.startLoc,x.endLoc)}},jo=class extends or{constructor(x,m){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(S,k,O,U)=>this.options.errorRecovery?(this.raise(v.InvalidDigit,Zi(S,k,O),{radix:U}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(S,k,O)=>{this.recordStrictModeErrors(v.StrictNumericEscape,Zi(S,k,O))},unterminated:(S,k,O)=>{throw this.raise(v.UnterminatedString,Zi(S-1,k,O))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(S,k,O)=>{throw this.raise(v.UnterminatedTemplate,Zi(S,k,O))}}),this.state=new Le,this.state.init(x),this.input=m,this.length=m.length,this.comments=[],this.isLookahead=!1}pushToken(x){this.tokens.length=this.state.tokensLength,this.tokens.push(x),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Qi(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(x){return this.match(x)?(this.next(),!0):!1}match(x){return this.state.type===x}createLookaheadState(x){return{pos:x.pos,value:null,type:x.type,start:x.start,end:x.end,context:[this.curContext()],inType:x.inType,startLoc:x.startLoc,lastTokEndLoc:x.lastTokEndLoc,curLine:x.curLine,lineStart:x.lineStart,curPosition:x.curPosition}}lookahead(){let x=this.state;this.state=this.createLookaheadState(x),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let m=this.state;return this.state=x,m}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(x){return Ur.lastIndex=x,Ur.test(this.input)?Ur.lastIndex:x}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(x){return ei.lastIndex=x,ei.test(this.input)?ei.lastIndex:x}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(x){let m=this.input.charCodeAt(x);if((m&64512)===55296&&++xthis.raise(m,S)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(x){let m;this.isLookahead||(m=this.state.curPosition());let S=this.state.pos,k=this.input.indexOf(x,S+2);if(k===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=k+x.length,Tn.lastIndex=S+2;Tn.test(this.input)&&Tn.lastIndex<=k;)++this.state.curLine,this.state.lineStart=Tn.lastIndex;if(this.isLookahead)return;let O={type:"CommentBlock",value:this.input.slice(S+2,k),start:S,end:k+x.length,loc:new n(m,this.state.curPosition())};return this.options.tokens&&this.pushToken(O),O}skipLineComment(x){let m=this.state.pos,S;this.isLookahead||(S=this.state.curPosition());let k=this.input.charCodeAt(this.state.pos+=x);if(this.state.posx)){let O=this.skipLineComment(3);O!==void 0&&(this.addComment(O),this.options.attachComment&&m.push(O))}else break e}else if(S===60&&!this.inModule&&this.options.annexB){let k=this.state.pos;if(this.input.charCodeAt(k+1)===33&&this.input.charCodeAt(k+2)===45&&this.input.charCodeAt(k+3)===45){let O=this.skipLineComment(4);O!==void 0&&(this.addComment(O),this.options.attachComment&&m.push(O))}else break e}else break e}}if(m.length>0){let S=this.state.pos,k={start:x,end:S,comments:m,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(k)}}finishToken(x,m){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let S=this.state.type;this.state.type=x,this.state.value=m,this.isLookahead||this.updateContext(S)}replaceToken(x){this.state.type=x,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let x=this.state.pos+1,m=this.codePointAtPos(x);if(m>=48&&m<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(m===123||m===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(m===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,m===123?this.finishToken(7):this.finishToken(1)}else Rt(m)?(++this.state.pos,this.finishToken(138,this.readWord1(m))):m===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let x=this.input.charCodeAt(this.state.pos+1);if(x>=48&&x<=57){this.readNumber(!0);return}x===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let x=this.input.charCodeAt(this.state.pos+1);if(x!==33)return!1;let m=this.state.pos;for(this.state.pos+=1;!$n(x)&&++this.state.pos=48&&m<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(x){switch(x){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let m=this.input.charCodeAt(this.state.pos+1);if(m===120||m===88){this.readRadixNumber(16);return}if(m===111||m===79){this.readRadixNumber(8);return}if(m===98||m===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(x);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(x);return;case 124:case 38:this.readToken_pipe_amp(x);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(x);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(x);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Rt(x)){this.readWord(x);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(x)})}finishOp(x,m){let S=this.input.slice(this.state.pos,this.state.pos+m);this.state.pos+=m,this.finishToken(x,S)}readRegexp(){let x=this.state.startLoc,m=this.state.start+1,S,k,{pos:O}=this.state;for(;;++O){if(O>=this.length)throw this.raise(v.UnterminatedRegExp,i(x,1));let le=this.input.charCodeAt(O);if($n(le))throw this.raise(v.UnterminatedRegExp,i(x,1));if(S)S=!1;else{if(le===91)k=!0;else if(le===93&&k)k=!1;else if(le===47&&!k)break;S=le===92}}let U=this.input.slice(m,O);++O;let K="",re=()=>i(x,O+2-m);for(;O=2&&this.input.charCodeAt(m)===48;if(le){let at=this.input.slice(m,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,S),!this.state.strict){let nt=at.indexOf("_");nt>0&&this.raise(v.ZeroDigitNumericSeparator,i(S,nt))}re=le&&!/[89]/.test(at)}let ae=this.input.charCodeAt(this.state.pos);if(ae===46&&!re&&(++this.state.pos,this.readInt(10),k=!0,ae=this.input.charCodeAt(this.state.pos)),(ae===69||ae===101)&&!re&&(ae=this.input.charCodeAt(++this.state.pos),(ae===43||ae===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,S),k=!0,K=!0,ae=this.input.charCodeAt(this.state.pos)),ae===110&&((k||le)&&this.raise(v.InvalidBigIntLiteral,S),++this.state.pos,O=!0),ae===109&&(this.expectPlugin("decimal",this.state.curPosition()),(K||le)&&this.raise(v.InvalidDecimal,S),++this.state.pos,U=!0),Rt(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let Pe=this.input.slice(m,this.state.pos).replace(/[_mn]/g,"");if(O){this.finishToken(135,Pe);return}if(U){this.finishToken(136,Pe);return}let Ve=re?parseInt(Pe,8):parseFloat(Pe);this.finishToken(134,Ve)}readCodePoint(x){let{code:m,pos:S}=xa(this.input,this.state.pos,this.state.lineStart,this.state.curLine,x,this.errorHandlers_readCodePoint);return this.state.pos=S,m}readString(x){let{str:m,pos:S,curLine:k,lineStart:O}=Jt(x===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=S+1,this.state.lineStart=O,this.state.curLine=k,this.finishToken(133,m)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let x=this.input[this.state.pos],{str:m,firstInvalidLoc:S,pos:k,curLine:O,lineStart:U}=Jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=k+1,this.state.lineStart=U,this.state.curLine=O,S&&(this.state.firstInvalidTemplateEscapePos=new r(S.curLine,S.pos-S.lineStart,S.pos)),this.input.codePointAt(k)===96?this.finishToken(24,S?null:x+m+"`"):(this.state.pos++,this.finishToken(25,S?null:x+m+"${"))}recordStrictModeErrors(x,m){let S=m.index;this.state.strict&&!this.state.strictErrors.has(S)?this.raise(x,m):this.state.strictErrors.set(S,[x,m])}readWord1(x){this.state.containsEsc=!1;let m="",S=this.state.pos,k=this.state.pos;for(x!==void 0&&(this.state.pos+=x<=65535?1:2);this.state.pos=0;K--){let re=U[K];if(re.loc.index===O)return U[K]=x(k,S);if(re.loc.indexthis.hasPlugin(m)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:x})}errorBuilder(x){return(m,S,k)=>{this.raise(x,Zi(m,S,k))}}},jf=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Hf=class{constructor(x){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=x}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new jf)}exit(){let x=this.stack.pop(),m=this.current();for(let[S,k]of Array.from(x.undefinedPrivateNames))m?m.undefinedPrivateNames.has(S)||m.undefinedPrivateNames.set(S,k):this.parser.raise(v.InvalidPrivateFieldResolution,k,{identifierName:S})}declarePrivateName(x,m,S){let{privateNames:k,loneAccessors:O,undefinedPrivateNames:U}=this.current(),K=k.has(x);if(m&3){let re=K&&O.get(x);if(re){let le=re&4,ae=m&4,Pe=re&3,Ve=m&3;K=Pe===Ve||le!==ae,K||O.delete(x)}else K||O.set(x,m)}K&&this.parser.raise(v.PrivateNameRedeclaration,S,{identifierName:x}),k.add(x),U.delete(x)}usePrivateName(x,m){let S;for(S of this.stack)if(S.privateNames.has(x))return;S?S.undefinedPrivateNames.set(x,m):this.parser.raise(v.InvalidPrivateFieldResolution,m,{identifierName:x})}},dl=class{constructor(x=0){this.type=x}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},bh=class extends dl{constructor(x){super(x),this.declarationErrors=new Map}recordDeclarationError(x,m){let S=m.index;this.declarationErrors.set(S,[x,m])}clearDeclarationError(x){this.declarationErrors.delete(x)}iterateErrors(x){this.declarationErrors.forEach(x)}},fl=class{constructor(x){this.parser=void 0,this.stack=[new dl],this.parser=x}enter(x){this.stack.push(x)}exit(){this.stack.pop()}recordParameterInitializerError(x,m){let S=m.loc.start,{stack:k}=this,O=k.length-1,U=k[O];for(;!U.isCertainlyParameterDeclaration();){if(U.canBeArrowParameterDeclaration())U.recordDeclarationError(x,S);else return;U=k[--O]}this.parser.raise(x,S)}recordArrowParameterBindingError(x,m){let{stack:S}=this,k=S[S.length-1],O=m.loc.start;if(k.isCertainlyParameterDeclaration())this.parser.raise(x,O);else if(k.canBeArrowParameterDeclaration())k.recordDeclarationError(x,O);else return}recordAsyncArrowParametersError(x){let{stack:m}=this,S=m.length-1,k=m[S];for(;k.canBeArrowParameterDeclaration();)k.type===2&&k.recordDeclarationError(v.AwaitBindingIdentifier,x),k=m[--S]}validateAsPattern(){let{stack:x}=this,m=x[x.length-1];m.canBeArrowParameterDeclaration()&&m.iterateErrors(([S,k])=>{this.parser.raise(S,k);let O=x.length-2,U=x[O];for(;U.canBeArrowParameterDeclaration();)U.clearDeclarationError(k.index),U=x[--O]})}};function xh(){return new dl(3)}function Ho(){return new bh(1)}function wh(){return new bh(2)}function Ru(){return new dl}var Uf=class{constructor(){this.stacks=[]}enter(x){this.stacks.push(x)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function pl(x,m){return(x?2:0)|(m?1:0)}var Sh=class extends jo{addExtra(x,m,S,k=!0){if(!x)return;let O=x.extra=x.extra||{};k?O[m]=S:Object.defineProperty(O,m,{enumerable:k,value:S})}isContextual(x){return this.state.type===x&&!this.state.containsEsc}isUnparsedContextual(x,m){let S=x+m.length;if(this.input.slice(x,S)===m){let k=this.input.charCodeAt(S);return!(sr(k)||(k&64512)===55296)}return!1}isLookaheadContextual(x){let m=this.nextTokenStart();return this.isUnparsedContextual(m,x)}eatContextual(x){return this.isContextual(x)?(this.next(),!0):!1}expectContextual(x,m){if(!this.eatContextual(x)){if(m!=null)throw this.raise(m,this.state.startLoc);this.unexpected(null,x)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Mi.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return rt.lastIndex=this.state.end,rt.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(x=!0){(x?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(x,m){this.eat(x)||this.unexpected(m,x)}tryParse(x,m=this.state.clone()){let S={node:null};try{let k=x((O=null)=>{throw S.node=O,S});if(this.state.errors.length>m.errors.length){let O=this.state;return this.state=m,this.state.tokensLength=O.tokensLength,{node:k,error:O.errors[m.errors.length],thrown:!1,aborted:!1,failState:O}}return{node:k,error:null,thrown:!1,aborted:!1,failState:null}}catch(k){let O=this.state;if(this.state=m,k instanceof SyntaxError)return{node:null,error:k,thrown:!0,aborted:!1,failState:O};if(k===S)return{node:S.node,error:null,thrown:!1,aborted:!0,failState:O};throw k}}checkExpressionErrors(x,m){if(!x)return!1;let{shorthandAssignLoc:S,doubleProtoLoc:k,privateKeyLoc:O,optionalParametersLoc:U}=x,K=!!S||!!k||!!U||!!O;if(!m)return K;S!=null&&this.raise(v.InvalidCoverInitializedName,S),k!=null&&this.raise(v.DuplicateProto,k),O!=null&&this.raise(v.UnexpectedPrivateField,O),U!=null&&this.unexpected(U)}isLiteralPropertyName(){return Xe(this.state.type)}isPrivateName(x){return x.type==="PrivateName"}getPrivateNameSV(x){return x.id.name}hasPropertyAsPrivateName(x){return(x.type==="MemberExpression"||x.type==="OptionalMemberExpression")&&this.isPrivateName(x.property)}isObjectProperty(x){return x.type==="ObjectProperty"}isObjectMethod(x){return x.type==="ObjectMethod"}initializeScopes(x=this.options.sourceType==="module"){let m=this.state.labels;this.state.labels=[];let S=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let k=this.inModule;this.inModule=x;let O=this.scope,U=this.getScopeHandler();this.scope=new U(this,x);let K=this.prodParam;this.prodParam=new Uf;let re=this.classScope;this.classScope=new Hf(this);let le=this.expressionScope;return this.expressionScope=new fl(this),()=>{this.state.labels=m,this.exportedIdentifiers=S,this.inModule=k,this.scope=O,this.prodParam=K,this.classScope=re,this.expressionScope=le}}enterInitialScopes(){let x=0;this.inModule&&(x|=2),this.scope.enter(1),this.prodParam.enter(x)}checkDestructuringPrivate(x){let{privateKeyLoc:m}=x;m!==null&&this.expectPlugin("destructuringPrivate",m)}},wa=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Sa=class{constructor(x,m,S){this.type="",this.start=m,this.end=0,this.loc=new n(S),x!=null&&x.options.ranges&&(this.range=[m,0]),x!=null&&x.filename&&(this.loc.filename=x.filename)}},Bu=Sa.prototype;Bu.__clone=function(){let x=new Sa(void 0,this.start,this.loc.start),m=Object.keys(this);for(let S=0,k=m.length;S`Cannot overwrite reserved type ${x}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:x,enumName:m})=>`Boolean enum members need to be initialized. Use either \`${x} = true,\` or \`${x} = false,\` in enum \`${m}\`.`,EnumDuplicateMemberName:({memberName:x,enumName:m})=>`Enum member names need to be unique, but the name \`${x}\` has already been used before in enum \`${m}\`.`,EnumInconsistentMemberValues:({enumName:x})=>`Enum \`${x}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:x,enumName:m})=>`Enum type \`${x}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${m}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:x})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${x}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:x,memberName:m,explicitType:S})=>`Enum \`${x}\` has type \`${S}\`, so the initializer of \`${m}\` needs to be a ${S} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:x,memberName:m})=>`Symbol enum members cannot be initialized. Use \`${m},\` in enum \`${x}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:x,memberName:m})=>`The enum member initializer for \`${m}\` needs to be a literal (either a boolean, number, or string) in enum \`${x}\`.`,EnumInvalidMemberName:({enumName:x,memberName:m,suggestion:S})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${m}\`, consider using \`${S}\`, in enum \`${x}\`.`,EnumNumberMemberNotInitialized:({enumName:x,memberName:m})=>`Number enum members need to be initialized, e.g. \`${m} = 1\` in enum \`${x}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:x})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${x}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:x})=>`Unexpected reserved type ${x}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:x,suggestion:m})=>`\`declare export ${x}\` is not supported. Use \`${m}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Bs(x){return x.type==="DeclareExportAllDeclaration"||x.type==="DeclareExportDeclaration"&&(!x.declaration||x.declaration.type!=="TypeAlias"&&x.declaration.type!=="InterfaceDeclaration")}function Dh(x){return x.importKind==="type"||x.importKind==="typeof"}var Gf={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function qf(x,m){let S=[],k=[];for(let O=0;Oclass extends x{constructor(...m){super(...m),this.flowPragma=void 0}getScopeHandler(){return xt}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(m,S){m!==133&&m!==13&&m!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(m,S)}addComment(m){if(this.flowPragma===void 0){let S=Kf.exec(m.value);if(S)if(S[1]==="flow")this.flowPragma="flow";else if(S[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(m)}flowParseTypeInitialiser(m){let S=this.state.inType;this.state.inType=!0,this.expect(m||14);let k=this.flowParseType();return this.state.inType=S,k}flowParsePredicate(){let m=this.startNode(),S=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>S.index+1&&this.raise(wt.UnexpectedSpaceBetweenModuloChecks,S),this.eat(10)?(m.value=super.parseExpression(),this.expect(11),this.finishNode(m,"DeclaredPredicate")):this.finishNode(m,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let m=this.state.inType;this.state.inType=!0,this.expect(14);let S=null,k=null;return this.match(54)?(this.state.inType=m,k=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=m,this.match(54)&&(k=this.flowParsePredicate())),[S,k]}flowParseDeclareClass(m){return this.next(),this.flowParseInterfaceish(m,!0),this.finishNode(m,"DeclareClass")}flowParseDeclareFunction(m){this.next();let S=m.id=this.parseIdentifier(),k=this.startNode(),O=this.startNode();this.match(47)?k.typeParameters=this.flowParseTypeParameterDeclaration():k.typeParameters=null,this.expect(10);let U=this.flowParseFunctionTypeParams();return k.params=U.params,k.rest=U.rest,k.this=U._this,this.expect(11),[k.returnType,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),O.typeAnnotation=this.finishNode(k,"FunctionTypeAnnotation"),S.typeAnnotation=this.finishNode(O,"TypeAnnotation"),this.resetEndLocation(S),this.semicolon(),this.scope.declareName(m.id.name,2048,m.id.loc.start),this.finishNode(m,"DeclareFunction")}flowParseDeclare(m,S){if(this.match(80))return this.flowParseDeclareClass(m);if(this.match(68))return this.flowParseDeclareFunction(m);if(this.match(74))return this.flowParseDeclareVariable(m);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(m):(S&&this.raise(wt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(m));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(m);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(m);if(this.isContextual(129))return this.flowParseDeclareInterface(m);if(this.match(82))return this.flowParseDeclareExportDeclaration(m,S);this.unexpected()}flowParseDeclareVariable(m){return this.next(),m.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(m.id.name,5,m.id.loc.start),this.semicolon(),this.finishNode(m,"DeclareVariable")}flowParseDeclareModule(m){this.scope.enter(0),this.match(133)?m.id=super.parseExprAtom():m.id=this.parseIdentifier();let S=m.body=this.startNode(),k=S.body=[];for(this.expect(5);!this.match(8);){let K=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(wt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(K)):(this.expectContextual(125,wt.UnsupportedStatementInDeclareModule),K=this.flowParseDeclare(K,!0)),k.push(K)}this.scope.exit(),this.expect(8),this.finishNode(S,"BlockStatement");let O=null,U=!1;return k.forEach(K=>{Bs(K)?(O==="CommonJS"&&this.raise(wt.AmbiguousDeclareModuleKind,K),O="ES"):K.type==="DeclareModuleExports"&&(U&&this.raise(wt.DuplicateDeclareModuleExports,K),O==="ES"&&this.raise(wt.AmbiguousDeclareModuleKind,K),O="CommonJS",U=!0)}),m.kind=O||"CommonJS",this.finishNode(m,"DeclareModule")}flowParseDeclareExportDeclaration(m,S){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?m.declaration=this.flowParseDeclare(this.startNode()):(m.declaration=this.flowParseType(),this.semicolon()),m.default=!0,this.finishNode(m,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!S){let k=this.state.value;throw this.raise(wt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:k,suggestion:Gf[k]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return m.declaration=this.flowParseDeclare(this.startNode()),m.default=!1,this.finishNode(m,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return m=this.parseExport(m,null),m.type==="ExportNamedDeclaration"&&(m.type="ExportDeclaration",m.default=!1,delete m.exportKind),m.type="Declare"+m.type,m;this.unexpected()}flowParseDeclareModuleExports(m){return this.next(),this.expectContextual(111),m.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(m,"DeclareModuleExports")}flowParseDeclareTypeAlias(m){this.next();let S=this.flowParseTypeAlias(m);return S.type="DeclareTypeAlias",S}flowParseDeclareOpaqueType(m){this.next();let S=this.flowParseOpaqueType(m,!0);return S.type="DeclareOpaqueType",S}flowParseDeclareInterface(m){return this.next(),this.flowParseInterfaceish(m,!1),this.finishNode(m,"DeclareInterface")}flowParseInterfaceish(m,S){if(m.id=this.flowParseRestrictedIdentifier(!S,!0),this.scope.declareName(m.id.name,S?17:8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.extends=[],this.eat(81))do m.extends.push(this.flowParseInterfaceExtends());while(!S&&this.eat(12));if(S){if(m.implements=[],m.mixins=[],this.eatContextual(117))do m.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do m.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}m.body=this.flowParseObjectType({allowStatic:S,allowExact:!1,allowSpread:!1,allowProto:S,allowInexact:!1})}flowParseInterfaceExtends(){let m=this.startNode();return m.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"InterfaceExtends")}flowParseInterface(m){return this.flowParseInterfaceish(m,!1),this.finishNode(m,"InterfaceDeclaration")}checkNotUnderscore(m){m==="_"&&this.raise(wt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(m,S,k){Vf.has(m)&&this.raise(k?wt.AssignReservedType:wt.UnexpectedReservedType,S,{reservedType:m})}flowParseRestrictedIdentifier(m,S){return this.checkReservedType(this.state.value,this.state.startLoc,S),this.parseIdentifier(m)}flowParseTypeAlias(m){return m.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(m.id.name,8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(m,"TypeAlias")}flowParseOpaqueType(m,S){return this.expectContextual(130),m.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(m.id.name,8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.supertype=null,this.match(14)&&(m.supertype=this.flowParseTypeInitialiser(14)),m.impltype=null,S||(m.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(m,"OpaqueType")}flowParseTypeParameter(m=!1){let S=this.state.startLoc,k=this.startNode(),O=this.flowParseVariance(),U=this.flowParseTypeAnnotatableIdentifier();return k.name=U.name,k.variance=O,k.bound=U.typeAnnotation,this.match(29)?(this.eat(29),k.default=this.flowParseType()):m&&this.raise(wt.MissingTypeParamDefault,S),this.finishNode(k,"TypeParameter")}flowParseTypeParameterDeclaration(){let m=this.state.inType,S=this.startNode();S.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let k=!1;do{let O=this.flowParseTypeParameter(k);S.params.push(O),O.default&&(k=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=m,this.finishNode(S,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let m=this.startNode(),S=this.state.inType;m.params=[],this.state.inType=!0,this.expect(47);let k=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)m.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=k,this.expect(48),this.state.inType=S,this.finishNode(m,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let m=this.startNode(),S=this.state.inType;for(m.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)m.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=S,this.finishNode(m,"TypeParameterInstantiation")}flowParseInterfaceType(){let m=this.startNode();if(this.expectContextual(129),m.extends=[],this.eat(81))do m.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return m.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(m,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(m,S,k){return m.static=S,this.lookahead().type===14?(m.id=this.flowParseObjectPropertyKey(),m.key=this.flowParseTypeInitialiser()):(m.id=null,m.key=this.flowParseType()),this.expect(3),m.value=this.flowParseTypeInitialiser(),m.variance=k,this.finishNode(m,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(m,S){return m.static=S,m.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(m.method=!0,m.optional=!1,m.value=this.flowParseObjectTypeMethodish(this.startNodeAt(m.loc.start))):(m.method=!1,this.eat(17)&&(m.optional=!0),m.value=this.flowParseTypeInitialiser()),this.finishNode(m,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(m){for(m.params=[],m.rest=null,m.typeParameters=null,m.this=null,this.match(47)&&(m.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(m.this=this.flowParseFunctionTypeParam(!0),m.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)m.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(m.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),m.returnType=this.flowParseTypeInitialiser(),this.finishNode(m,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(m,S){let k=this.startNode();return m.static=S,m.value=this.flowParseObjectTypeMethodish(k),this.finishNode(m,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:m,allowExact:S,allowSpread:k,allowProto:O,allowInexact:U}){let K=this.state.inType;this.state.inType=!0;let re=this.startNode();re.callProperties=[],re.properties=[],re.indexers=[],re.internalSlots=[];let le,ae,Pe=!1;for(S&&this.match(6)?(this.expect(6),le=9,ae=!0):(this.expect(5),le=8,ae=!1),re.exact=ae;!this.match(le);){let at=!1,nt=null,xr=null,gr=this.startNode();if(O&&this.isContextual(118)){let Bn=this.lookahead();Bn.type!==14&&Bn.type!==17&&(this.next(),nt=this.state.startLoc,m=!1)}if(m&&this.isContextual(106)){let Bn=this.lookahead();Bn.type!==14&&Bn.type!==17&&(this.next(),at=!0)}let wn=this.flowParseVariance();if(this.eat(0))nt!=null&&this.unexpected(nt),this.eat(0)?(wn&&this.unexpected(wn.loc.start),re.internalSlots.push(this.flowParseObjectTypeInternalSlot(gr,at))):re.indexers.push(this.flowParseObjectTypeIndexer(gr,at,wn));else if(this.match(10)||this.match(47))nt!=null&&this.unexpected(nt),wn&&this.unexpected(wn.loc.start),re.callProperties.push(this.flowParseObjectTypeCallProperty(gr,at));else{let Bn="init";if(this.isContextual(99)||this.isContextual(104)){let ep=this.lookahead();Xe(ep.type)&&(Bn=this.state.value,this.next())}let Li=this.flowParseObjectTypeProperty(gr,at,nt,wn,Bn,k,U??!ae);Li===null?(Pe=!0,xr=this.state.lastTokStartLoc):re.properties.push(Li)}this.flowObjectTypeSemicolon(),xr&&!this.match(8)&&!this.match(9)&&this.raise(wt.UnexpectedExplicitInexactInObject,xr)}this.expect(le),k&&(re.inexact=Pe);let Ve=this.finishNode(re,"ObjectTypeAnnotation");return this.state.inType=K,Ve}flowParseObjectTypeProperty(m,S,k,O,U,K,re){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(K?re||this.raise(wt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(wt.InexactInsideNonObject,this.state.lastTokStartLoc),O&&this.raise(wt.InexactVariance,O),null):(K||this.raise(wt.UnexpectedSpreadType,this.state.lastTokStartLoc),k!=null&&this.unexpected(k),O&&this.raise(wt.SpreadVariance,O),m.argument=this.flowParseType(),this.finishNode(m,"ObjectTypeSpreadProperty"));{m.key=this.flowParseObjectPropertyKey(),m.static=S,m.proto=k!=null,m.kind=U;let le=!1;return this.match(47)||this.match(10)?(m.method=!0,k!=null&&this.unexpected(k),O&&this.unexpected(O.loc.start),m.value=this.flowParseObjectTypeMethodish(this.startNodeAt(m.loc.start)),(U==="get"||U==="set")&&this.flowCheckGetterSetterParams(m),!K&&m.key.name==="constructor"&&m.value.this&&this.raise(wt.ThisParamBannedInConstructor,m.value.this)):(U!=="init"&&this.unexpected(),m.method=!1,this.eat(17)&&(le=!0),m.value=this.flowParseTypeInitialiser(),m.variance=O),m.optional=le,this.finishNode(m,"ObjectTypeProperty")}}flowCheckGetterSetterParams(m){let S=m.kind==="get"?0:1,k=m.value.params.length+(m.value.rest?1:0);m.value.this&&this.raise(m.kind==="get"?wt.GetterMayNotHaveThisParam:wt.SetterMayNotHaveThisParam,m.value.this),k!==S&&this.raise(m.kind==="get"?v.BadGetterArity:v.BadSetterArity,m),m.kind==="set"&&m.value.rest&&this.raise(v.BadSetterRestParameter,m)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(m,S){m!=null||(m=this.state.startLoc);let k=S||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let O=this.startNodeAt(m);O.qualification=k,O.id=this.flowParseRestrictedIdentifier(!0),k=this.finishNode(O,"QualifiedTypeIdentifier")}return k}flowParseGenericType(m,S){let k=this.startNodeAt(m);return k.typeParameters=null,k.id=this.flowParseQualifiedTypeIdentifier(m,S),this.match(47)&&(k.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(k,"GenericTypeAnnotation")}flowParseTypeofType(){let m=this.startNode();return this.expect(87),m.argument=this.flowParsePrimaryType(),this.finishNode(m,"TypeofTypeAnnotation")}flowParseTupleType(){let m=this.startNode();for(m.types=[],this.expect(0);this.state.possuper.parseFunctionBody(m,!0,k));return}super.parseFunctionBody(m,!1,k)}parseFunctionBodyAndFinish(m,S,k=!1){if(this.match(14)){let O=this.startNode();[O.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),m.returnType=O.typeAnnotation?this.finishNode(O,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(m,S,k)}parseStatementLike(m){if(this.state.strict&&this.isContextual(129)){let k=this.lookahead();if(ze(k.type)){let O=this.startNode();return this.next(),this.flowParseInterface(O)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let k=this.startNode();return this.next(),this.flowParseEnumDeclaration(k)}let S=super.parseStatementLike(m);return this.flowPragma===void 0&&!this.isValidDirective(S)&&(this.flowPragma=null),S}parseExpressionStatement(m,S,k){if(S.type==="Identifier"){if(S.name==="declare"){if(this.match(80)||me(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(m)}else if(me(this.state.type)){if(S.name==="interface")return this.flowParseInterface(m);if(S.name==="type")return this.flowParseTypeAlias(m);if(S.name==="opaque")return this.flowParseOpaqueType(m,!1)}}return super.parseExpressionStatement(m,S,k)}shouldParseExportDeclaration(){let{type:m}=this.state;return Ee(m)||this.shouldParseEnums()&&m===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:m}=this.state;return Ee(m)||this.shouldParseEnums()&&m===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let m=this.startNode();return this.next(),this.flowParseEnumDeclaration(m)}return super.parseExportDefaultExpression()}parseConditional(m,S,k){if(!this.match(17))return m;if(this.state.maybeInArrowParameters){let Ve=this.lookaheadCharCode();if(Ve===44||Ve===61||Ve===58||Ve===41)return this.setOptionalParametersError(k),m}this.expect(17);let O=this.state.clone(),U=this.state.noArrowAt,K=this.startNodeAt(S),{consequent:re,failed:le}=this.tryParseConditionalConsequent(),[ae,Pe]=this.getArrowLikeExpressions(re);if(le||Pe.length>0){let Ve=[...U];if(Pe.length>0){this.state=O,this.state.noArrowAt=Ve;for(let at=0;at1&&this.raise(wt.AmbiguousConditionalArrow,O.startLoc),le&&ae.length===1&&(this.state=O,Ve.push(ae[0].start),this.state.noArrowAt=Ve,{consequent:re,failed:le}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(re,!0),this.state.noArrowAt=U,this.expect(14),K.test=m,K.consequent=re,K.alternate=this.forwardNoArrowParamsConversionAt(K,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(K,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let m=this.parseMaybeAssignAllowIn(),S=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:m,failed:S}}getArrowLikeExpressions(m,S){let k=[m],O=[];for(;k.length!==0;){let U=k.pop();U.type==="ArrowFunctionExpression"?(U.typeParameters||!U.returnType?this.finishArrowValidation(U):O.push(U),k.push(U.body)):U.type==="ConditionalExpression"&&(k.push(U.consequent),k.push(U.alternate))}return S?(O.forEach(U=>this.finishArrowValidation(U)),[O,[]]):qf(O,U=>U.params.every(K=>this.isAssignable(K,!0)))}finishArrowValidation(m){var S;this.toAssignableList(m.params,(S=m.extra)==null?void 0:S.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(m,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(m,S){let k;return this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),k=S(),this.state.noArrowParamsConversionAt.pop()):k=S(),k}parseParenItem(m,S){if(m=super.parseParenItem(m,S),this.eat(17)&&(m.optional=!0,this.resetEndLocation(m)),this.match(14)){let k=this.startNodeAt(S);return k.expression=m,k.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(k,"TypeCastExpression")}return m}assertModuleNodeAllowed(m){m.type==="ImportDeclaration"&&(m.importKind==="type"||m.importKind==="typeof")||m.type==="ExportNamedDeclaration"&&m.exportKind==="type"||m.type==="ExportAllDeclaration"&&m.exportKind==="type"||super.assertModuleNodeAllowed(m)}parseExportDeclaration(m){if(this.isContextual(130)){m.exportKind="type";let S=this.startNode();return this.next(),this.match(5)?(m.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(m),null):this.flowParseTypeAlias(S)}else if(this.isContextual(131)){m.exportKind="type";let S=this.startNode();return this.next(),this.flowParseOpaqueType(S,!1)}else if(this.isContextual(129)){m.exportKind="type";let S=this.startNode();return this.next(),this.flowParseInterface(S)}else if(this.shouldParseEnums()&&this.isContextual(126)){m.exportKind="value";let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}else return super.parseExportDeclaration(m)}eatExportStar(m){return super.eatExportStar(m)?!0:this.isContextual(130)&&this.lookahead().type===55?(m.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(m){let{startLoc:S}=this.state,k=super.maybeParseExportNamespaceSpecifier(m);return k&&m.exportKind==="type"&&this.unexpected(S),k}parseClassId(m,S,k){super.parseClassId(m,S,k),this.match(47)&&(m.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(m,S,k){let{startLoc:O}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(m,S))return;S.declare=!0}super.parseClassMember(m,S,k),S.declare&&(S.type!=="ClassProperty"&&S.type!=="ClassPrivateProperty"&&S.type!=="PropertyDefinition"?this.raise(wt.DeclareClassElement,O):S.value&&this.raise(wt.DeclareClassFieldInitializer,S.value))}isIterator(m){return m==="iterator"||m==="asyncIterator"}readIterator(){let m=super.readWord1(),S="@@"+m;(!this.isIterator(m)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:S}),this.finishToken(132,S)}getTokenFromCode(m){let S=this.input.charCodeAt(this.state.pos+1);m===123&&S===124?this.finishOp(6,2):this.state.inType&&(m===62||m===60)?this.finishOp(m===62?48:47,1):this.state.inType&&m===63?S===46?this.finishOp(18,2):this.finishOp(17,1):Ae(m,S,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(m)}isAssignable(m,S){return m.type==="TypeCastExpression"?this.isAssignable(m.expression,S):super.isAssignable(m,S)}toAssignable(m,S=!1){!S&&m.type==="AssignmentExpression"&&m.left.type==="TypeCastExpression"&&(m.left=this.typeCastToParameter(m.left)),super.toAssignable(m,S)}toAssignableList(m,S,k){for(let O=0;O1||!S)&&this.raise(wt.TypeCastInPattern,U.typeAnnotation)}return m}parseArrayLike(m,S,k,O){let U=super.parseArrayLike(m,S,k,O);return S&&!this.state.maybeInArrowParameters&&this.toReferencedList(U.elements),U}isValidLVal(m,S,k){return m==="TypeCastExpression"||super.isValidLVal(m,S,k)}parseClassProperty(m){return this.match(14)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(m)}parseClassPrivateProperty(m){return this.match(14)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(m)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(m){return!this.match(14)&&super.isNonstaticConstructor(m)}pushClassMethod(m,S,k,O,U,K){if(S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(m,S,k,O,U,K),S.params&&U){let re=S.params;re.length>0&&this.isThisParam(re[0])&&this.raise(wt.ThisParamBannedInConstructor,S)}else if(S.type==="MethodDefinition"&&U&&S.value.params){let re=S.value.params;re.length>0&&this.isThisParam(re[0])&&this.raise(wt.ThisParamBannedInConstructor,S)}}pushClassPrivateMethod(m,S,k,O){S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(m,S,k,O)}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass&&this.match(47)&&(m.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let S=m.implements=[];do{let k=this.startNode();k.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?k.typeParameters=this.flowParseTypeParameterInstantiation():k.typeParameters=null,S.push(this.finishNode(k,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(m){super.checkGetterSetterParams(m);let S=this.getObjectOrClassMethodParams(m);if(S.length>0){let k=S[0];this.isThisParam(k)&&m.kind==="get"?this.raise(wt.GetterMayNotHaveThisParam,k):this.isThisParam(k)&&this.raise(wt.SetterMayNotHaveThisParam,k)}}parsePropertyNamePrefixOperator(m){m.variance=this.flowParseVariance()}parseObjPropValue(m,S,k,O,U,K,re){m.variance&&this.unexpected(m.variance.loc.start),delete m.variance;let le;this.match(47)&&!K&&(le=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let ae=super.parseObjPropValue(m,S,k,O,U,K,re);return le&&((ae.value||ae).typeParameters=le),ae}parseAssignableListItemTypes(m){return this.eat(17)&&(m.type!=="Identifier"&&this.raise(wt.PatternIsOptional,m),this.isThisParam(m)&&this.raise(wt.ThisParamMayNotBeOptional,m),m.optional=!0),this.match(14)?m.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(m)&&this.raise(wt.ThisParamAnnotationRequired,m),this.match(29)&&this.isThisParam(m)&&this.raise(wt.ThisParamNoDefault,m),this.resetEndLocation(m),m}parseMaybeDefault(m,S){let k=super.parseMaybeDefault(m,S);return k.type==="AssignmentPattern"&&k.typeAnnotation&&k.right.startsuper.parseMaybeAssign(m,S),O),!U.error)return U.node;let{context:le}=this.state,ae=le[le.length-1];(ae===A.j_oTag||ae===A.j_expr)&&le.pop()}if((k=U)!=null&&k.error||this.match(47)){var K,re;O=O||this.state.clone();let le,ae=this.tryParse(Ve=>{var at;le=this.flowParseTypeParameterDeclaration();let nt=this.forwardNoArrowParamsConversionAt(le,()=>{let gr=super.parseMaybeAssign(m,S);return this.resetStartLocationFromNode(gr,le),gr});(at=nt.extra)!=null&&at.parenthesized&&Ve();let xr=this.maybeUnwrapTypeCastExpression(nt);return xr.type!=="ArrowFunctionExpression"&&Ve(),xr.typeParameters=le,this.resetStartLocationFromNode(xr,le),nt},O),Pe=null;if(ae.node&&this.maybeUnwrapTypeCastExpression(ae.node).type==="ArrowFunctionExpression"){if(!ae.error&&!ae.aborted)return ae.node.async&&this.raise(wt.UnexpectedTypeParameterBeforeAsyncArrowFunction,le),ae.node;Pe=ae.node}if((K=U)!=null&&K.node)return this.state=U.failState,U.node;if(Pe)return this.state=ae.failState,Pe;throw(re=U)!=null&&re.thrown?U.error:ae.thrown?ae.error:this.raise(wt.UnexpectedTokenAfterTypeParameter,le)}return super.parseMaybeAssign(m,S)}parseArrow(m){if(this.match(14)){let S=this.tryParse(()=>{let k=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let O=this.startNode();return[O.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=k,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),O});if(S.thrown)return null;S.error&&(this.state=S.failState),m.returnType=S.node.typeAnnotation?this.finishNode(S.node,"TypeAnnotation"):null}return super.parseArrow(m)}shouldParseArrow(m){return this.match(14)||super.shouldParseArrow(m)}setArrowFunctionParameters(m,S){this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1?m.params=S:super.setArrowFunctionParameters(m,S)}checkParams(m,S,k,O=!0){if(!(k&&this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1)){for(let U=0;U0&&this.raise(wt.ThisParamMustBeFirst,m.params[U]);super.checkParams(m,S,k,O)}}parseParenAndDistinguishExpression(m){return super.parseParenAndDistinguishExpression(m&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(m,S,k){if(m.type==="Identifier"&&m.name==="async"&&this.state.noArrowAt.indexOf(S.index)!==-1){this.next();let O=this.startNodeAt(S);O.callee=m,O.arguments=super.parseCallExpressionArguments(11,!1),m=this.finishNode(O,"CallExpression")}else if(m.type==="Identifier"&&m.name==="async"&&this.match(47)){let O=this.state.clone(),U=this.tryParse(re=>this.parseAsyncArrowWithTypeParameters(S)||re(),O);if(!U.error&&!U.aborted)return U.node;let K=this.tryParse(()=>super.parseSubscripts(m,S,k),O);if(K.node&&!K.error)return K.node;if(U.node)return this.state=U.failState,U.node;if(K.node)return this.state=K.failState,K.node;throw U.error||K.error}return super.parseSubscripts(m,S,k)}parseSubscript(m,S,k,O){if(this.match(18)&&this.isLookaheadToken_lt()){if(O.optionalChainMember=!0,k)return O.stop=!0,m;this.next();let U=this.startNodeAt(S);return U.callee=m,U.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),U.arguments=this.parseCallExpressionArguments(11,!1),U.optional=!0,this.finishCallExpression(U,!0)}else if(!k&&this.shouldParseTypes()&&this.match(47)){let U=this.startNodeAt(S);U.callee=m;let K=this.tryParse(()=>(U.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),U.arguments=super.parseCallExpressionArguments(11,!1),O.optionalChainMember&&(U.optional=!1),this.finishCallExpression(U,O.optionalChainMember)));if(K.node)return K.error&&(this.state=K.failState),K.node}return super.parseSubscript(m,S,k,O)}parseNewCallee(m){super.parseNewCallee(m);let S=null;this.shouldParseTypes()&&this.match(47)&&(S=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),m.typeArguments=S}parseAsyncArrowWithTypeParameters(m){let S=this.startNodeAt(m);if(this.parseFunctionParams(S,!1),!!this.parseArrow(S))return super.parseArrowExpression(S,void 0,!0)}readToken_mult_modulo(m){let S=this.input.charCodeAt(this.state.pos+1);if(m===42&&S===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(m)}readToken_pipe_amp(m){let S=this.input.charCodeAt(this.state.pos+1);if(m===124&&S===125){this.finishOp(9,2);return}super.readToken_pipe_amp(m)}parseTopLevel(m,S){let k=super.parseTopLevel(m,S);return this.state.hasFlowComment&&this.raise(wt.UnterminatedFlowComment,this.state.curPosition()),k}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(wt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let m=this.skipFlowComment();m&&(this.state.pos+=m,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:m}=this.state,S=2;for(;[32,9].includes(this.input.charCodeAt(m+S));)S++;let k=this.input.charCodeAt(S+m),O=this.input.charCodeAt(S+m+1);return k===58&&O===58?S+2:this.input.slice(S+m,S+m+12)==="flow-include"?S+12:k===58&&O!==58?S:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(m,{enumName:S,memberName:k}){this.raise(wt.EnumBooleanMemberNotInitialized,m,{memberName:k,enumName:S})}flowEnumErrorInvalidMemberInitializer(m,S){return this.raise(S.explicitType?S.explicitType==="symbol"?wt.EnumInvalidMemberInitializerSymbolType:wt.EnumInvalidMemberInitializerPrimaryType:wt.EnumInvalidMemberInitializerUnknownType,m,S)}flowEnumErrorNumberMemberNotInitialized(m,S){this.raise(wt.EnumNumberMemberNotInitialized,m,S)}flowEnumErrorStringMemberInconsistentlyInitialized(m,S){this.raise(wt.EnumStringMemberInconsistentlyInitialized,m,S)}flowEnumMemberInit(){let m=this.state.startLoc,S=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let k=this.parseNumericLiteral(this.state.value);return S()?{type:"number",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}case 133:{let k=this.parseStringLiteral(this.state.value);return S()?{type:"string",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}case 85:case 86:{let k=this.parseBooleanLiteral(this.match(85));return S()?{type:"boolean",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}default:return{type:"invalid",loc:m}}}flowEnumMemberRaw(){let m=this.state.startLoc,S=this.parseIdentifier(!0),k=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:m};return{id:S,init:k}}flowEnumCheckExplicitTypeMismatch(m,S,k){let{explicitType:O}=S;O!==null&&O!==k&&this.flowEnumErrorInvalidMemberInitializer(m,S)}flowEnumMembers({enumName:m,explicitType:S}){let k=new Set,O={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},U=!1;for(;!this.match(8);){if(this.eat(21)){U=!0;break}let K=this.startNode(),{id:re,init:le}=this.flowEnumMemberRaw(),ae=re.name;if(ae==="")continue;/^[a-z]/.test(ae)&&this.raise(wt.EnumInvalidMemberName,re,{memberName:ae,suggestion:ae[0].toUpperCase()+ae.slice(1),enumName:m}),k.has(ae)&&this.raise(wt.EnumDuplicateMemberName,re,{memberName:ae,enumName:m}),k.add(ae);let Pe={enumName:m,explicitType:S,memberName:ae};switch(K.id=re,le.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"boolean"),K.init=le.value,O.booleanMembers.push(this.finishNode(K,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"number"),K.init=le.value,O.numberMembers.push(this.finishNode(K,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"string"),K.init=le.value,O.stringMembers.push(this.finishNode(K,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(le.loc,Pe);case"none":switch(S){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(le.loc,Pe);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(le.loc,Pe);break;default:O.defaultedMembers.push(this.finishNode(K,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:O,hasUnknownMembers:U}}flowEnumStringMembers(m,S,{enumName:k}){if(m.length===0)return S;if(S.length===0)return m;if(S.length>m.length){for(let O of m)this.flowEnumErrorStringMemberInconsistentlyInitialized(O,{enumName:k});return S}else{for(let O of S)this.flowEnumErrorStringMemberInconsistentlyInitialized(O,{enumName:k});return m}}flowEnumParseExplicitType({enumName:m}){if(!this.eatContextual(102))return null;if(!me(this.state.type))throw this.raise(wt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:m});let{value:S}=this.state;return this.next(),S!=="boolean"&&S!=="number"&&S!=="string"&&S!=="symbol"&&this.raise(wt.EnumInvalidExplicitType,this.state.startLoc,{enumName:m,invalidEnumType:S}),S}flowEnumBody(m,S){let k=S.name,O=S.loc.start,U=this.flowEnumParseExplicitType({enumName:k});this.expect(5);let{members:K,hasUnknownMembers:re}=this.flowEnumMembers({enumName:k,explicitType:U});switch(m.hasUnknownMembers=re,U){case"boolean":return m.explicitType=!0,m.members=K.booleanMembers,this.expect(8),this.finishNode(m,"EnumBooleanBody");case"number":return m.explicitType=!0,m.members=K.numberMembers,this.expect(8),this.finishNode(m,"EnumNumberBody");case"string":return m.explicitType=!0,m.members=this.flowEnumStringMembers(K.stringMembers,K.defaultedMembers,{enumName:k}),this.expect(8),this.finishNode(m,"EnumStringBody");case"symbol":return m.members=K.defaultedMembers,this.expect(8),this.finishNode(m,"EnumSymbolBody");default:{let le=()=>(m.members=[],this.expect(8),this.finishNode(m,"EnumStringBody"));m.explicitType=!1;let ae=K.booleanMembers.length,Pe=K.numberMembers.length,Ve=K.stringMembers.length,at=K.defaultedMembers.length;if(!ae&&!Pe&&!Ve&&!at)return le();if(!ae&&!Pe)return m.members=this.flowEnumStringMembers(K.stringMembers,K.defaultedMembers,{enumName:k}),this.expect(8),this.finishNode(m,"EnumStringBody");if(!Pe&&!Ve&&ae>=at){for(let nt of K.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(nt.loc.start,{enumName:k,memberName:nt.id.name});return m.members=K.booleanMembers,this.expect(8),this.finishNode(m,"EnumBooleanBody")}else if(!ae&&!Ve&&Pe>=at){for(let nt of K.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(nt.loc.start,{enumName:k,memberName:nt.id.name});return m.members=K.numberMembers,this.expect(8),this.finishNode(m,"EnumNumberBody")}else return this.raise(wt.EnumInconsistentMemberValues,O,{enumName:k}),le()}}}flowParseEnumDeclaration(m){let S=this.parseIdentifier();return m.id=S,m.body=this.flowEnumBody(this.startNode(),S),this.finishNode(m,"EnumDeclaration")}isLookaheadToken_lt(){let m=this.nextTokenStart();if(this.input.charCodeAt(m)===60){let S=this.input.charCodeAt(m+1);return S!==60&&S!==61}return!1}maybeUnwrapTypeCastExpression(m){return m.type==="TypeCastExpression"?m.expression:m}},Rn=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:x})=>`Expected corresponding JSX closing tag for <${x}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:x,HTMLEntity:m})=>`Unexpected token \`${x}\`. Did you mean \`${m}\` or \`{'${x}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function vs(x){return x?x.type==="JSXOpeningFragment"||x.type==="JSXClosingFragment":!1}function bs(x){if(x.type==="JSXIdentifier")return x.name;if(x.type==="JSXNamespacedName")return x.namespace.name+":"+x.name.name;if(x.type==="JSXMemberExpression")return bs(x.object)+"."+bs(x.property);throw new Error("Node had unexpected type: "+x.type)}var xs=x=>class extends x{jsxReadToken(){let m="",S=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Rn.UnterminatedJsxContent,this.state.startLoc);let k=this.input.charCodeAt(this.state.pos);switch(k){case 60:case 123:if(this.state.pos===this.state.start){k===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(k);return}m+=this.input.slice(S,this.state.pos),this.finishToken(141,m);return;case 38:m+=this.input.slice(S,this.state.pos),m+=this.jsxReadEntity(),S=this.state.pos;break;case 62:case 125:default:$n(k)?(m+=this.input.slice(S,this.state.pos),m+=this.jsxReadNewLine(!0),S=this.state.pos):++this.state.pos}}}jsxReadNewLine(m){let S=this.input.charCodeAt(this.state.pos),k;return++this.state.pos,S===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,k=m?` +`);case 114:return re("\r");case 120:{let ae;return{code:ae,pos:m}=xi(x,m,S,k,2,!1,K,U),re(ae===null?null:String.fromCharCode(ae))}case 117:{let ae;return{code:ae,pos:m}=xa(x,m,S,k,K,U),re(ae===null?null:String.fromCodePoint(ae))}case 116:return re(" ");case 98:return re("\b");case 118:return re("\v");case 102:return re("\f");case 13:x.charCodeAt(m)===10&&++m;case 10:S=m,++k;case 8232:case 8233:return re("");case 56:case 57:if(O)return re(null);U.strictNumericEscape(m-1,S,k);default:if(le>=48&&le<=55){let ae=m-1,Pe=x.slice(ae,m+2).match(/^[0-7]+/)[0],Ve=parseInt(Pe,8);Ve>255&&(Pe=Pe.slice(0,-1),Ve=parseInt(Pe,8)),m+=Pe.length-1;let at=x.charCodeAt(m);if(Pe!=="0"||at===56||at===57){if(O)return re(null);U.strictNumericEscape(ae,S,k)}return re(String.fromCharCode(Ve))}return re(String.fromCharCode(le))}}function xi(x,m,S,k,O,U,K,re){let le=m,ae;return{n:ae,pos:m}=zr(x,m,S,k,16,O,U,!1,re,!K),ae===null&&(K?re.invalidEscapeSequence(le,S,k):m=le-1),{code:ae,pos:m}}function zr(x,m,S,k,O,U,K,re,le,ae){let Pe=m,Ve=O===16?Qe.hex:Qe.decBinOct,at=O===16?Bt.hex:O===10?Bt.dec:O===8?Bt.oct:Bt.bin,nt=!1,xr=0;for(let gr=0,wn=U??1/0;gr=97?Li=Bn-97+10:Bn>=65?Li=Bn-65+10:it(Bn)?Li=Bn-48:Li=1/0,Li>=O){if(Li<=9&&ae)return{n:null,pos:m};if(Li<=9&&le.invalidDigit(m,S,k,O))Li=0;else if(K)Li=0,nt=!0;else break}++m,xr=xr*O+Li}return m===Pe||U!=null&&m-Pe!==U||nt?{n:null,pos:m}:{n:xr,pos:m}}function xa(x,m,S,k,O,U){let K=x.charCodeAt(m),re;if(K===123){if(++m,{code:re,pos:m}=xi(x,m,S,k,x.indexOf("}",m)-m,!0,O,U),++m,re!==null&&re>1114111)if(O)U.invalidCodePoint(m,S,k);else return{code:null,pos:m}}else({code:re,pos:m}=xi(x,m,S,k,4,!1,O,U));return{code:re,pos:m}}function Zi(x,m,S){return new r(S,x-m,x)}var ti=new Set([103,109,115,105,121,117,100,118]),Qi=class{constructor(x){this.type=x.type,this.value=x.value,this.start=x.start,this.end=x.end,this.loc=new n(x.startLoc,x.endLoc)}},zo=class extends or{constructor(x,m){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(S,k,O,U)=>this.options.errorRecovery?(this.raise(v.InvalidDigit,Zi(S,k,O),{radix:U}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(S,k,O)=>{this.recordStrictModeErrors(v.StrictNumericEscape,Zi(S,k,O))},unterminated:(S,k,O)=>{throw this.raise(v.UnterminatedString,Zi(S-1,k,O))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(S,k,O)=>{throw this.raise(v.UnterminatedTemplate,Zi(S,k,O))}}),this.state=new Le,this.state.init(x),this.input=m,this.length=m.length,this.comments=[],this.isLookahead=!1}pushToken(x){this.tokens.length=this.state.tokensLength,this.tokens.push(x),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Qi(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(x){return this.match(x)?(this.next(),!0):!1}match(x){return this.state.type===x}createLookaheadState(x){return{pos:x.pos,value:null,type:x.type,start:x.start,end:x.end,context:[this.curContext()],inType:x.inType,startLoc:x.startLoc,lastTokEndLoc:x.lastTokEndLoc,curLine:x.curLine,lineStart:x.lineStart,curPosition:x.curPosition}}lookahead(){let x=this.state;this.state=this.createLookaheadState(x),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let m=this.state;return this.state=x,m}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(x){return Ur.lastIndex=x,Ur.test(this.input)?Ur.lastIndex:x}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(x){return ei.lastIndex=x,ei.test(this.input)?ei.lastIndex:x}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(x){let m=this.input.charCodeAt(x);if((m&64512)===55296&&++xthis.raise(m,S)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(x){let m;this.isLookahead||(m=this.state.curPosition());let S=this.state.pos,k=this.input.indexOf(x,S+2);if(k===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=k+x.length,Tn.lastIndex=S+2;Tn.test(this.input)&&Tn.lastIndex<=k;)++this.state.curLine,this.state.lineStart=Tn.lastIndex;if(this.isLookahead)return;let O={type:"CommentBlock",value:this.input.slice(S+2,k),start:S,end:k+x.length,loc:new n(m,this.state.curPosition())};return this.options.tokens&&this.pushToken(O),O}skipLineComment(x){let m=this.state.pos,S;this.isLookahead||(S=this.state.curPosition());let k=this.input.charCodeAt(this.state.pos+=x);if(this.state.posx)){let O=this.skipLineComment(3);O!==void 0&&(this.addComment(O),this.options.attachComment&&m.push(O))}else break e}else if(S===60&&!this.inModule&&this.options.annexB){let k=this.state.pos;if(this.input.charCodeAt(k+1)===33&&this.input.charCodeAt(k+2)===45&&this.input.charCodeAt(k+3)===45){let O=this.skipLineComment(4);O!==void 0&&(this.addComment(O),this.options.attachComment&&m.push(O))}else break e}else break e}}if(m.length>0){let S=this.state.pos,k={start:x,end:S,comments:m,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(k)}}finishToken(x,m){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let S=this.state.type;this.state.type=x,this.state.value=m,this.isLookahead||this.updateContext(S)}replaceToken(x){this.state.type=x,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let x=this.state.pos+1,m=this.codePointAtPos(x);if(m>=48&&m<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(m===123||m===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(m===123?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,m===123?this.finishToken(7):this.finishToken(1)}else Rt(m)?(++this.state.pos,this.finishToken(138,this.readWord1(m))):m===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let x=this.input.charCodeAt(this.state.pos+1);if(x>=48&&x<=57){this.readNumber(!0);return}x===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let x=this.input.charCodeAt(this.state.pos+1);if(x!==33)return!1;let m=this.state.pos;for(this.state.pos+=1;!$n(x)&&++this.state.pos=48&&m<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(x){switch(x){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let m=this.input.charCodeAt(this.state.pos+1);if(m===120||m===88){this.readRadixNumber(16);return}if(m===111||m===79){this.readRadixNumber(8);return}if(m===98||m===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(x);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(x);return;case 124:case 38:this.readToken_pipe_amp(x);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(x);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(x);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(Rt(x)){this.readWord(x);return}}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(x)})}finishOp(x,m){let S=this.input.slice(this.state.pos,this.state.pos+m);this.state.pos+=m,this.finishToken(x,S)}readRegexp(){let x=this.state.startLoc,m=this.state.start+1,S,k,{pos:O}=this.state;for(;;++O){if(O>=this.length)throw this.raise(v.UnterminatedRegExp,i(x,1));let le=this.input.charCodeAt(O);if($n(le))throw this.raise(v.UnterminatedRegExp,i(x,1));if(S)S=!1;else{if(le===91)k=!0;else if(le===93&&k)k=!1;else if(le===47&&!k)break;S=le===92}}let U=this.input.slice(m,O);++O;let K="",re=()=>i(x,O+2-m);for(;O=2&&this.input.charCodeAt(m)===48;if(le){let at=this.input.slice(m,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,S),!this.state.strict){let nt=at.indexOf("_");nt>0&&this.raise(v.ZeroDigitNumericSeparator,i(S,nt))}re=le&&!/[89]/.test(at)}let ae=this.input.charCodeAt(this.state.pos);if(ae===46&&!re&&(++this.state.pos,this.readInt(10),k=!0,ae=this.input.charCodeAt(this.state.pos)),(ae===69||ae===101)&&!re&&(ae=this.input.charCodeAt(++this.state.pos),(ae===43||ae===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(v.InvalidOrMissingExponent,S),k=!0,K=!0,ae=this.input.charCodeAt(this.state.pos)),ae===110&&((k||le)&&this.raise(v.InvalidBigIntLiteral,S),++this.state.pos,O=!0),ae===109&&(this.expectPlugin("decimal",this.state.curPosition()),(K||le)&&this.raise(v.InvalidDecimal,S),++this.state.pos,U=!0),Rt(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());let Pe=this.input.slice(m,this.state.pos).replace(/[_mn]/g,"");if(O){this.finishToken(135,Pe);return}if(U){this.finishToken(136,Pe);return}let Ve=re?parseInt(Pe,8):parseFloat(Pe);this.finishToken(134,Ve)}readCodePoint(x){let{code:m,pos:S}=xa(this.input,this.state.pos,this.state.lineStart,this.state.curLine,x,this.errorHandlers_readCodePoint);return this.state.pos=S,m}readString(x){let{str:m,pos:S,curLine:k,lineStart:O}=Jt(x===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=S+1,this.state.lineStart=O,this.state.curLine=k,this.finishToken(133,m)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let x=this.input[this.state.pos],{str:m,firstInvalidLoc:S,pos:k,curLine:O,lineStart:U}=Jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=k+1,this.state.lineStart=U,this.state.curLine=O,S&&(this.state.firstInvalidTemplateEscapePos=new r(S.curLine,S.pos-S.lineStart,S.pos)),this.input.codePointAt(k)===96?this.finishToken(24,S?null:x+m+"`"):(this.state.pos++,this.finishToken(25,S?null:x+m+"${"))}recordStrictModeErrors(x,m){let S=m.index;this.state.strict&&!this.state.strictErrors.has(S)?this.raise(x,m):this.state.strictErrors.set(S,[x,m])}readWord1(x){this.state.containsEsc=!1;let m="",S=this.state.pos,k=this.state.pos;for(x!==void 0&&(this.state.pos+=x<=65535?1:2);this.state.pos=0;K--){let re=U[K];if(re.loc.index===O)return U[K]=x(k,S);if(re.loc.indexthis.hasPlugin(m)))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:x})}errorBuilder(x){return(m,S,k)=>{this.raise(x,Zi(m,S,k))}}},zf=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Hf=class{constructor(x){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=x}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new zf)}exit(){let x=this.stack.pop(),m=this.current();for(let[S,k]of Array.from(x.undefinedPrivateNames))m?m.undefinedPrivateNames.has(S)||m.undefinedPrivateNames.set(S,k):this.parser.raise(v.InvalidPrivateFieldResolution,k,{identifierName:S})}declarePrivateName(x,m,S){let{privateNames:k,loneAccessors:O,undefinedPrivateNames:U}=this.current(),K=k.has(x);if(m&3){let re=K&&O.get(x);if(re){let le=re&4,ae=m&4,Pe=re&3,Ve=m&3;K=Pe===Ve||le!==ae,K||O.delete(x)}else K||O.set(x,m)}K&&this.parser.raise(v.PrivateNameRedeclaration,S,{identifierName:x}),k.add(x),U.delete(x)}usePrivateName(x,m){let S;for(S of this.stack)if(S.privateNames.has(x))return;S?S.undefinedPrivateNames.set(x,m):this.parser.raise(v.InvalidPrivateFieldResolution,m,{identifierName:x})}},fl=class{constructor(x=0){this.type=x}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},bh=class extends fl{constructor(x){super(x),this.declarationErrors=new Map}recordDeclarationError(x,m){let S=m.index;this.declarationErrors.set(S,[x,m])}clearDeclarationError(x){this.declarationErrors.delete(x)}iterateErrors(x){this.declarationErrors.forEach(x)}},pl=class{constructor(x){this.parser=void 0,this.stack=[new fl],this.parser=x}enter(x){this.stack.push(x)}exit(){this.stack.pop()}recordParameterInitializerError(x,m){let S=m.loc.start,{stack:k}=this,O=k.length-1,U=k[O];for(;!U.isCertainlyParameterDeclaration();){if(U.canBeArrowParameterDeclaration())U.recordDeclarationError(x,S);else return;U=k[--O]}this.parser.raise(x,S)}recordArrowParameterBindingError(x,m){let{stack:S}=this,k=S[S.length-1],O=m.loc.start;if(k.isCertainlyParameterDeclaration())this.parser.raise(x,O);else if(k.canBeArrowParameterDeclaration())k.recordDeclarationError(x,O);else return}recordAsyncArrowParametersError(x){let{stack:m}=this,S=m.length-1,k=m[S];for(;k.canBeArrowParameterDeclaration();)k.type===2&&k.recordDeclarationError(v.AwaitBindingIdentifier,x),k=m[--S]}validateAsPattern(){let{stack:x}=this,m=x[x.length-1];m.canBeArrowParameterDeclaration()&&m.iterateErrors(([S,k])=>{this.parser.raise(S,k);let O=x.length-2,U=x[O];for(;U.canBeArrowParameterDeclaration();)U.clearDeclarationError(k.index),U=x[--O]})}};function xh(){return new fl(3)}function Ho(){return new bh(1)}function wh(){return new bh(2)}function Ru(){return new fl}var Uf=class{constructor(){this.stacks=[]}enter(x){this.stacks.push(x)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ml(x,m){return(x?2:0)|(m?1:0)}var Sh=class extends zo{addExtra(x,m,S,k=!0){if(!x)return;let O=x.extra=x.extra||{};k?O[m]=S:Object.defineProperty(O,m,{enumerable:k,value:S})}isContextual(x){return this.state.type===x&&!this.state.containsEsc}isUnparsedContextual(x,m){let S=x+m.length;if(this.input.slice(x,S)===m){let k=this.input.charCodeAt(S);return!(sr(k)||(k&64512)===55296)}return!1}isLookaheadContextual(x){let m=this.nextTokenStart();return this.isUnparsedContextual(m,x)}eatContextual(x){return this.isContextual(x)?(this.next(),!0):!1}expectContextual(x,m){if(!this.eatContextual(x)){if(m!=null)throw this.raise(m,this.state.startLoc);this.unexpected(null,x)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Mi.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return rt.lastIndex=this.state.end,rt.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(x=!0){(x?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(x,m){this.eat(x)||this.unexpected(m,x)}tryParse(x,m=this.state.clone()){let S={node:null};try{let k=x((O=null)=>{throw S.node=O,S});if(this.state.errors.length>m.errors.length){let O=this.state;return this.state=m,this.state.tokensLength=O.tokensLength,{node:k,error:O.errors[m.errors.length],thrown:!1,aborted:!1,failState:O}}return{node:k,error:null,thrown:!1,aborted:!1,failState:null}}catch(k){let O=this.state;if(this.state=m,k instanceof SyntaxError)return{node:null,error:k,thrown:!0,aborted:!1,failState:O};if(k===S)return{node:S.node,error:null,thrown:!1,aborted:!0,failState:O};throw k}}checkExpressionErrors(x,m){if(!x)return!1;let{shorthandAssignLoc:S,doubleProtoLoc:k,privateKeyLoc:O,optionalParametersLoc:U}=x,K=!!S||!!k||!!U||!!O;if(!m)return K;S!=null&&this.raise(v.InvalidCoverInitializedName,S),k!=null&&this.raise(v.DuplicateProto,k),O!=null&&this.raise(v.UnexpectedPrivateField,O),U!=null&&this.unexpected(U)}isLiteralPropertyName(){return Xe(this.state.type)}isPrivateName(x){return x.type==="PrivateName"}getPrivateNameSV(x){return x.id.name}hasPropertyAsPrivateName(x){return(x.type==="MemberExpression"||x.type==="OptionalMemberExpression")&&this.isPrivateName(x.property)}isObjectProperty(x){return x.type==="ObjectProperty"}isObjectMethod(x){return x.type==="ObjectMethod"}initializeScopes(x=this.options.sourceType==="module"){let m=this.state.labels;this.state.labels=[];let S=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let k=this.inModule;this.inModule=x;let O=this.scope,U=this.getScopeHandler();this.scope=new U(this,x);let K=this.prodParam;this.prodParam=new Uf;let re=this.classScope;this.classScope=new Hf(this);let le=this.expressionScope;return this.expressionScope=new pl(this),()=>{this.state.labels=m,this.exportedIdentifiers=S,this.inModule=k,this.scope=O,this.prodParam=K,this.classScope=re,this.expressionScope=le}}enterInitialScopes(){let x=0;this.inModule&&(x|=2),this.scope.enter(1),this.prodParam.enter(x)}checkDestructuringPrivate(x){let{privateKeyLoc:m}=x;m!==null&&this.expectPlugin("destructuringPrivate",m)}},wa=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Sa=class{constructor(x,m,S){this.type="",this.start=m,this.end=0,this.loc=new n(S),x!=null&&x.options.ranges&&(this.range=[m,0]),x!=null&&x.filename&&(this.loc.filename=x.filename)}},Bu=Sa.prototype;Bu.__clone=function(){let x=new Sa(void 0,this.start,this.loc.start),m=Object.keys(this);for(let S=0,k=m.length;S`Cannot overwrite reserved type ${x}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:x,enumName:m})=>`Boolean enum members need to be initialized. Use either \`${x} = true,\` or \`${x} = false,\` in enum \`${m}\`.`,EnumDuplicateMemberName:({memberName:x,enumName:m})=>`Enum member names need to be unique, but the name \`${x}\` has already been used before in enum \`${m}\`.`,EnumInconsistentMemberValues:({enumName:x})=>`Enum \`${x}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:x,enumName:m})=>`Enum type \`${x}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${m}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:x})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${x}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:x,memberName:m,explicitType:S})=>`Enum \`${x}\` has type \`${S}\`, so the initializer of \`${m}\` needs to be a ${S} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:x,memberName:m})=>`Symbol enum members cannot be initialized. Use \`${m},\` in enum \`${x}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:x,memberName:m})=>`The enum member initializer for \`${m}\` needs to be a literal (either a boolean, number, or string) in enum \`${x}\`.`,EnumInvalidMemberName:({enumName:x,memberName:m,suggestion:S})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${m}\`, consider using \`${S}\`, in enum \`${x}\`.`,EnumNumberMemberNotInitialized:({enumName:x,memberName:m})=>`Number enum members need to be initialized, e.g. \`${m} = 1\` in enum \`${x}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:x})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${x}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:x})=>`Unexpected reserved type ${x}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of ` async () => {}`, use `async () => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:x,suggestion:m})=>`\`declare export ${x}\` is not supported. Use \`${m}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Bs(x){return x.type==="DeclareExportAllDeclaration"||x.type==="DeclareExportDeclaration"&&(!x.declaration||x.declaration.type!=="TypeAlias"&&x.declaration.type!=="InterfaceDeclaration")}function Dh(x){return x.importKind==="type"||x.importKind==="typeof"}var Gf={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function qf(x,m){let S=[],k=[];for(let O=0;Oclass extends x{constructor(...m){super(...m),this.flowPragma=void 0}getScopeHandler(){return xt}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(m,S){m!==133&&m!==13&&m!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(m,S)}addComment(m){if(this.flowPragma===void 0){let S=Kf.exec(m.value);if(S)if(S[1]==="flow")this.flowPragma="flow";else if(S[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(m)}flowParseTypeInitialiser(m){let S=this.state.inType;this.state.inType=!0,this.expect(m||14);let k=this.flowParseType();return this.state.inType=S,k}flowParsePredicate(){let m=this.startNode(),S=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>S.index+1&&this.raise(wt.UnexpectedSpaceBetweenModuloChecks,S),this.eat(10)?(m.value=super.parseExpression(),this.expect(11),this.finishNode(m,"DeclaredPredicate")):this.finishNode(m,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let m=this.state.inType;this.state.inType=!0,this.expect(14);let S=null,k=null;return this.match(54)?(this.state.inType=m,k=this.flowParsePredicate()):(S=this.flowParseType(),this.state.inType=m,this.match(54)&&(k=this.flowParsePredicate())),[S,k]}flowParseDeclareClass(m){return this.next(),this.flowParseInterfaceish(m,!0),this.finishNode(m,"DeclareClass")}flowParseDeclareFunction(m){this.next();let S=m.id=this.parseIdentifier(),k=this.startNode(),O=this.startNode();this.match(47)?k.typeParameters=this.flowParseTypeParameterDeclaration():k.typeParameters=null,this.expect(10);let U=this.flowParseFunctionTypeParams();return k.params=U.params,k.rest=U.rest,k.this=U._this,this.expect(11),[k.returnType,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),O.typeAnnotation=this.finishNode(k,"FunctionTypeAnnotation"),S.typeAnnotation=this.finishNode(O,"TypeAnnotation"),this.resetEndLocation(S),this.semicolon(),this.scope.declareName(m.id.name,2048,m.id.loc.start),this.finishNode(m,"DeclareFunction")}flowParseDeclare(m,S){if(this.match(80))return this.flowParseDeclareClass(m);if(this.match(68))return this.flowParseDeclareFunction(m);if(this.match(74))return this.flowParseDeclareVariable(m);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(m):(S&&this.raise(wt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(m));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(m);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(m);if(this.isContextual(129))return this.flowParseDeclareInterface(m);if(this.match(82))return this.flowParseDeclareExportDeclaration(m,S);this.unexpected()}flowParseDeclareVariable(m){return this.next(),m.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(m.id.name,5,m.id.loc.start),this.semicolon(),this.finishNode(m,"DeclareVariable")}flowParseDeclareModule(m){this.scope.enter(0),this.match(133)?m.id=super.parseExprAtom():m.id=this.parseIdentifier();let S=m.body=this.startNode(),k=S.body=[];for(this.expect(5);!this.match(8);){let K=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(wt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(K)):(this.expectContextual(125,wt.UnsupportedStatementInDeclareModule),K=this.flowParseDeclare(K,!0)),k.push(K)}this.scope.exit(),this.expect(8),this.finishNode(S,"BlockStatement");let O=null,U=!1;return k.forEach(K=>{Bs(K)?(O==="CommonJS"&&this.raise(wt.AmbiguousDeclareModuleKind,K),O="ES"):K.type==="DeclareModuleExports"&&(U&&this.raise(wt.DuplicateDeclareModuleExports,K),O==="ES"&&this.raise(wt.AmbiguousDeclareModuleKind,K),O="CommonJS",U=!0)}),m.kind=O||"CommonJS",this.finishNode(m,"DeclareModule")}flowParseDeclareExportDeclaration(m,S){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?m.declaration=this.flowParseDeclare(this.startNode()):(m.declaration=this.flowParseType(),this.semicolon()),m.default=!0,this.finishNode(m,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!S){let k=this.state.value;throw this.raise(wt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:k,suggestion:Gf[k]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return m.declaration=this.flowParseDeclare(this.startNode()),m.default=!1,this.finishNode(m,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return m=this.parseExport(m,null),m.type==="ExportNamedDeclaration"&&(m.type="ExportDeclaration",m.default=!1,delete m.exportKind),m.type="Declare"+m.type,m;this.unexpected()}flowParseDeclareModuleExports(m){return this.next(),this.expectContextual(111),m.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(m,"DeclareModuleExports")}flowParseDeclareTypeAlias(m){this.next();let S=this.flowParseTypeAlias(m);return S.type="DeclareTypeAlias",S}flowParseDeclareOpaqueType(m){this.next();let S=this.flowParseOpaqueType(m,!0);return S.type="DeclareOpaqueType",S}flowParseDeclareInterface(m){return this.next(),this.flowParseInterfaceish(m,!1),this.finishNode(m,"DeclareInterface")}flowParseInterfaceish(m,S){if(m.id=this.flowParseRestrictedIdentifier(!S,!0),this.scope.declareName(m.id.name,S?17:8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.extends=[],this.eat(81))do m.extends.push(this.flowParseInterfaceExtends());while(!S&&this.eat(12));if(S){if(m.implements=[],m.mixins=[],this.eatContextual(117))do m.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do m.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}m.body=this.flowParseObjectType({allowStatic:S,allowExact:!1,allowSpread:!1,allowProto:S,allowInexact:!1})}flowParseInterfaceExtends(){let m=this.startNode();return m.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?m.typeParameters=this.flowParseTypeParameterInstantiation():m.typeParameters=null,this.finishNode(m,"InterfaceExtends")}flowParseInterface(m){return this.flowParseInterfaceish(m,!1),this.finishNode(m,"InterfaceDeclaration")}checkNotUnderscore(m){m==="_"&&this.raise(wt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(m,S,k){Vf.has(m)&&this.raise(k?wt.AssignReservedType:wt.UnexpectedReservedType,S,{reservedType:m})}flowParseRestrictedIdentifier(m,S){return this.checkReservedType(this.state.value,this.state.startLoc,S),this.parseIdentifier(m)}flowParseTypeAlias(m){return m.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(m.id.name,8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(m,"TypeAlias")}flowParseOpaqueType(m,S){return this.expectContextual(130),m.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(m.id.name,8201,m.id.loc.start),this.match(47)?m.typeParameters=this.flowParseTypeParameterDeclaration():m.typeParameters=null,m.supertype=null,this.match(14)&&(m.supertype=this.flowParseTypeInitialiser(14)),m.impltype=null,S||(m.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(m,"OpaqueType")}flowParseTypeParameter(m=!1){let S=this.state.startLoc,k=this.startNode(),O=this.flowParseVariance(),U=this.flowParseTypeAnnotatableIdentifier();return k.name=U.name,k.variance=O,k.bound=U.typeAnnotation,this.match(29)?(this.eat(29),k.default=this.flowParseType()):m&&this.raise(wt.MissingTypeParamDefault,S),this.finishNode(k,"TypeParameter")}flowParseTypeParameterDeclaration(){let m=this.state.inType,S=this.startNode();S.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let k=!1;do{let O=this.flowParseTypeParameter(k);S.params.push(O),O.default&&(k=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=m,this.finishNode(S,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let m=this.startNode(),S=this.state.inType;m.params=[],this.state.inType=!0,this.expect(47);let k=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)m.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=k,this.expect(48),this.state.inType=S,this.finishNode(m,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let m=this.startNode(),S=this.state.inType;for(m.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)m.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=S,this.finishNode(m,"TypeParameterInstantiation")}flowParseInterfaceType(){let m=this.startNode();if(this.expectContextual(129),m.extends=[],this.eat(81))do m.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return m.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(m,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(m,S,k){return m.static=S,this.lookahead().type===14?(m.id=this.flowParseObjectPropertyKey(),m.key=this.flowParseTypeInitialiser()):(m.id=null,m.key=this.flowParseType()),this.expect(3),m.value=this.flowParseTypeInitialiser(),m.variance=k,this.finishNode(m,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(m,S){return m.static=S,m.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(m.method=!0,m.optional=!1,m.value=this.flowParseObjectTypeMethodish(this.startNodeAt(m.loc.start))):(m.method=!1,this.eat(17)&&(m.optional=!0),m.value=this.flowParseTypeInitialiser()),this.finishNode(m,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(m){for(m.params=[],m.rest=null,m.typeParameters=null,m.this=null,this.match(47)&&(m.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(m.this=this.flowParseFunctionTypeParam(!0),m.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)m.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(m.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),m.returnType=this.flowParseTypeInitialiser(),this.finishNode(m,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(m,S){let k=this.startNode();return m.static=S,m.value=this.flowParseObjectTypeMethodish(k),this.finishNode(m,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:m,allowExact:S,allowSpread:k,allowProto:O,allowInexact:U}){let K=this.state.inType;this.state.inType=!0;let re=this.startNode();re.callProperties=[],re.properties=[],re.indexers=[],re.internalSlots=[];let le,ae,Pe=!1;for(S&&this.match(6)?(this.expect(6),le=9,ae=!0):(this.expect(5),le=8,ae=!1),re.exact=ae;!this.match(le);){let at=!1,nt=null,xr=null,gr=this.startNode();if(O&&this.isContextual(118)){let Bn=this.lookahead();Bn.type!==14&&Bn.type!==17&&(this.next(),nt=this.state.startLoc,m=!1)}if(m&&this.isContextual(106)){let Bn=this.lookahead();Bn.type!==14&&Bn.type!==17&&(this.next(),at=!0)}let wn=this.flowParseVariance();if(this.eat(0))nt!=null&&this.unexpected(nt),this.eat(0)?(wn&&this.unexpected(wn.loc.start),re.internalSlots.push(this.flowParseObjectTypeInternalSlot(gr,at))):re.indexers.push(this.flowParseObjectTypeIndexer(gr,at,wn));else if(this.match(10)||this.match(47))nt!=null&&this.unexpected(nt),wn&&this.unexpected(wn.loc.start),re.callProperties.push(this.flowParseObjectTypeCallProperty(gr,at));else{let Bn="init";if(this.isContextual(99)||this.isContextual(104)){let ep=this.lookahead();Xe(ep.type)&&(Bn=this.state.value,this.next())}let Li=this.flowParseObjectTypeProperty(gr,at,nt,wn,Bn,k,U??!ae);Li===null?(Pe=!0,xr=this.state.lastTokStartLoc):re.properties.push(Li)}this.flowObjectTypeSemicolon(),xr&&!this.match(8)&&!this.match(9)&&this.raise(wt.UnexpectedExplicitInexactInObject,xr)}this.expect(le),k&&(re.inexact=Pe);let Ve=this.finishNode(re,"ObjectTypeAnnotation");return this.state.inType=K,Ve}flowParseObjectTypeProperty(m,S,k,O,U,K,re){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(K?re||this.raise(wt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(wt.InexactInsideNonObject,this.state.lastTokStartLoc),O&&this.raise(wt.InexactVariance,O),null):(K||this.raise(wt.UnexpectedSpreadType,this.state.lastTokStartLoc),k!=null&&this.unexpected(k),O&&this.raise(wt.SpreadVariance,O),m.argument=this.flowParseType(),this.finishNode(m,"ObjectTypeSpreadProperty"));{m.key=this.flowParseObjectPropertyKey(),m.static=S,m.proto=k!=null,m.kind=U;let le=!1;return this.match(47)||this.match(10)?(m.method=!0,k!=null&&this.unexpected(k),O&&this.unexpected(O.loc.start),m.value=this.flowParseObjectTypeMethodish(this.startNodeAt(m.loc.start)),(U==="get"||U==="set")&&this.flowCheckGetterSetterParams(m),!K&&m.key.name==="constructor"&&m.value.this&&this.raise(wt.ThisParamBannedInConstructor,m.value.this)):(U!=="init"&&this.unexpected(),m.method=!1,this.eat(17)&&(le=!0),m.value=this.flowParseTypeInitialiser(),m.variance=O),m.optional=le,this.finishNode(m,"ObjectTypeProperty")}}flowCheckGetterSetterParams(m){let S=m.kind==="get"?0:1,k=m.value.params.length+(m.value.rest?1:0);m.value.this&&this.raise(m.kind==="get"?wt.GetterMayNotHaveThisParam:wt.SetterMayNotHaveThisParam,m.value.this),k!==S&&this.raise(m.kind==="get"?v.BadGetterArity:v.BadSetterArity,m),m.kind==="set"&&m.value.rest&&this.raise(v.BadSetterRestParameter,m)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(m,S){m!=null||(m=this.state.startLoc);let k=S||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let O=this.startNodeAt(m);O.qualification=k,O.id=this.flowParseRestrictedIdentifier(!0),k=this.finishNode(O,"QualifiedTypeIdentifier")}return k}flowParseGenericType(m,S){let k=this.startNodeAt(m);return k.typeParameters=null,k.id=this.flowParseQualifiedTypeIdentifier(m,S),this.match(47)&&(k.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(k,"GenericTypeAnnotation")}flowParseTypeofType(){let m=this.startNode();return this.expect(87),m.argument=this.flowParsePrimaryType(),this.finishNode(m,"TypeofTypeAnnotation")}flowParseTupleType(){let m=this.startNode();for(m.types=[],this.expect(0);this.state.possuper.parseFunctionBody(m,!0,k));return}super.parseFunctionBody(m,!1,k)}parseFunctionBodyAndFinish(m,S,k=!1){if(this.match(14)){let O=this.startNode();[O.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),m.returnType=O.typeAnnotation?this.finishNode(O,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(m,S,k)}parseStatementLike(m){if(this.state.strict&&this.isContextual(129)){let k=this.lookahead();if(je(k.type)){let O=this.startNode();return this.next(),this.flowParseInterface(O)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let k=this.startNode();return this.next(),this.flowParseEnumDeclaration(k)}let S=super.parseStatementLike(m);return this.flowPragma===void 0&&!this.isValidDirective(S)&&(this.flowPragma=null),S}parseExpressionStatement(m,S,k){if(S.type==="Identifier"){if(S.name==="declare"){if(this.match(80)||me(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(m)}else if(me(this.state.type)){if(S.name==="interface")return this.flowParseInterface(m);if(S.name==="type")return this.flowParseTypeAlias(m);if(S.name==="opaque")return this.flowParseOpaqueType(m,!1)}}return super.parseExpressionStatement(m,S,k)}shouldParseExportDeclaration(){let{type:m}=this.state;return Ee(m)||this.shouldParseEnums()&&m===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:m}=this.state;return Ee(m)||this.shouldParseEnums()&&m===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let m=this.startNode();return this.next(),this.flowParseEnumDeclaration(m)}return super.parseExportDefaultExpression()}parseConditional(m,S,k){if(!this.match(17))return m;if(this.state.maybeInArrowParameters){let Ve=this.lookaheadCharCode();if(Ve===44||Ve===61||Ve===58||Ve===41)return this.setOptionalParametersError(k),m}this.expect(17);let O=this.state.clone(),U=this.state.noArrowAt,K=this.startNodeAt(S),{consequent:re,failed:le}=this.tryParseConditionalConsequent(),[ae,Pe]=this.getArrowLikeExpressions(re);if(le||Pe.length>0){let Ve=[...U];if(Pe.length>0){this.state=O,this.state.noArrowAt=Ve;for(let at=0;at1&&this.raise(wt.AmbiguousConditionalArrow,O.startLoc),le&&ae.length===1&&(this.state=O,Ve.push(ae[0].start),this.state.noArrowAt=Ve,{consequent:re,failed:le}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(re,!0),this.state.noArrowAt=U,this.expect(14),K.test=m,K.consequent=re,K.alternate=this.forwardNoArrowParamsConversionAt(K,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(K,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let m=this.parseMaybeAssignAllowIn(),S=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:m,failed:S}}getArrowLikeExpressions(m,S){let k=[m],O=[];for(;k.length!==0;){let U=k.pop();U.type==="ArrowFunctionExpression"?(U.typeParameters||!U.returnType?this.finishArrowValidation(U):O.push(U),k.push(U.body)):U.type==="ConditionalExpression"&&(k.push(U.consequent),k.push(U.alternate))}return S?(O.forEach(U=>this.finishArrowValidation(U)),[O,[]]):qf(O,U=>U.params.every(K=>this.isAssignable(K,!0)))}finishArrowValidation(m){var S;this.toAssignableList(m.params,(S=m.extra)==null?void 0:S.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(m,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(m,S){let k;return this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),k=S(),this.state.noArrowParamsConversionAt.pop()):k=S(),k}parseParenItem(m,S){if(m=super.parseParenItem(m,S),this.eat(17)&&(m.optional=!0,this.resetEndLocation(m)),this.match(14)){let k=this.startNodeAt(S);return k.expression=m,k.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(k,"TypeCastExpression")}return m}assertModuleNodeAllowed(m){m.type==="ImportDeclaration"&&(m.importKind==="type"||m.importKind==="typeof")||m.type==="ExportNamedDeclaration"&&m.exportKind==="type"||m.type==="ExportAllDeclaration"&&m.exportKind==="type"||super.assertModuleNodeAllowed(m)}parseExportDeclaration(m){if(this.isContextual(130)){m.exportKind="type";let S=this.startNode();return this.next(),this.match(5)?(m.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(m),null):this.flowParseTypeAlias(S)}else if(this.isContextual(131)){m.exportKind="type";let S=this.startNode();return this.next(),this.flowParseOpaqueType(S,!1)}else if(this.isContextual(129)){m.exportKind="type";let S=this.startNode();return this.next(),this.flowParseInterface(S)}else if(this.shouldParseEnums()&&this.isContextual(126)){m.exportKind="value";let S=this.startNode();return this.next(),this.flowParseEnumDeclaration(S)}else return super.parseExportDeclaration(m)}eatExportStar(m){return super.eatExportStar(m)?!0:this.isContextual(130)&&this.lookahead().type===55?(m.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(m){let{startLoc:S}=this.state,k=super.maybeParseExportNamespaceSpecifier(m);return k&&m.exportKind==="type"&&this.unexpected(S),k}parseClassId(m,S,k){super.parseClassId(m,S,k),this.match(47)&&(m.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(m,S,k){let{startLoc:O}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(m,S))return;S.declare=!0}super.parseClassMember(m,S,k),S.declare&&(S.type!=="ClassProperty"&&S.type!=="ClassPrivateProperty"&&S.type!=="PropertyDefinition"?this.raise(wt.DeclareClassElement,O):S.value&&this.raise(wt.DeclareClassFieldInitializer,S.value))}isIterator(m){return m==="iterator"||m==="asyncIterator"}readIterator(){let m=super.readWord1(),S="@@"+m;(!this.isIterator(m)||!this.state.inType)&&this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:S}),this.finishToken(132,S)}getTokenFromCode(m){let S=this.input.charCodeAt(this.state.pos+1);m===123&&S===124?this.finishOp(6,2):this.state.inType&&(m===62||m===60)?this.finishOp(m===62?48:47,1):this.state.inType&&m===63?S===46?this.finishOp(18,2):this.finishOp(17,1):Ae(m,S,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(m)}isAssignable(m,S){return m.type==="TypeCastExpression"?this.isAssignable(m.expression,S):super.isAssignable(m,S)}toAssignable(m,S=!1){!S&&m.type==="AssignmentExpression"&&m.left.type==="TypeCastExpression"&&(m.left=this.typeCastToParameter(m.left)),super.toAssignable(m,S)}toAssignableList(m,S,k){for(let O=0;O1||!S)&&this.raise(wt.TypeCastInPattern,U.typeAnnotation)}return m}parseArrayLike(m,S,k,O){let U=super.parseArrayLike(m,S,k,O);return S&&!this.state.maybeInArrowParameters&&this.toReferencedList(U.elements),U}isValidLVal(m,S,k){return m==="TypeCastExpression"||super.isValidLVal(m,S,k)}parseClassProperty(m){return this.match(14)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(m)}parseClassPrivateProperty(m){return this.match(14)&&(m.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(m)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(m){return!this.match(14)&&super.isNonstaticConstructor(m)}pushClassMethod(m,S,k,O,U,K){if(S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(m,S,k,O,U,K),S.params&&U){let re=S.params;re.length>0&&this.isThisParam(re[0])&&this.raise(wt.ThisParamBannedInConstructor,S)}else if(S.type==="MethodDefinition"&&U&&S.value.params){let re=S.value.params;re.length>0&&this.isThisParam(re[0])&&this.raise(wt.ThisParamBannedInConstructor,S)}}pushClassPrivateMethod(m,S,k,O){S.variance&&this.unexpected(S.variance.loc.start),delete S.variance,this.match(47)&&(S.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(m,S,k,O)}parseClassSuper(m){if(super.parseClassSuper(m),m.superClass&&this.match(47)&&(m.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let S=m.implements=[];do{let k=this.startNode();k.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?k.typeParameters=this.flowParseTypeParameterInstantiation():k.typeParameters=null,S.push(this.finishNode(k,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(m){super.checkGetterSetterParams(m);let S=this.getObjectOrClassMethodParams(m);if(S.length>0){let k=S[0];this.isThisParam(k)&&m.kind==="get"?this.raise(wt.GetterMayNotHaveThisParam,k):this.isThisParam(k)&&this.raise(wt.SetterMayNotHaveThisParam,k)}}parsePropertyNamePrefixOperator(m){m.variance=this.flowParseVariance()}parseObjPropValue(m,S,k,O,U,K,re){m.variance&&this.unexpected(m.variance.loc.start),delete m.variance;let le;this.match(47)&&!K&&(le=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let ae=super.parseObjPropValue(m,S,k,O,U,K,re);return le&&((ae.value||ae).typeParameters=le),ae}parseAssignableListItemTypes(m){return this.eat(17)&&(m.type!=="Identifier"&&this.raise(wt.PatternIsOptional,m),this.isThisParam(m)&&this.raise(wt.ThisParamMayNotBeOptional,m),m.optional=!0),this.match(14)?m.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(m)&&this.raise(wt.ThisParamAnnotationRequired,m),this.match(29)&&this.isThisParam(m)&&this.raise(wt.ThisParamNoDefault,m),this.resetEndLocation(m),m}parseMaybeDefault(m,S){let k=super.parseMaybeDefault(m,S);return k.type==="AssignmentPattern"&&k.typeAnnotation&&k.right.startsuper.parseMaybeAssign(m,S),O),!U.error)return U.node;let{context:le}=this.state,ae=le[le.length-1];(ae===A.j_oTag||ae===A.j_expr)&&le.pop()}if((k=U)!=null&&k.error||this.match(47)){var K,re;O=O||this.state.clone();let le,ae=this.tryParse(Ve=>{var at;le=this.flowParseTypeParameterDeclaration();let nt=this.forwardNoArrowParamsConversionAt(le,()=>{let gr=super.parseMaybeAssign(m,S);return this.resetStartLocationFromNode(gr,le),gr});(at=nt.extra)!=null&&at.parenthesized&&Ve();let xr=this.maybeUnwrapTypeCastExpression(nt);return xr.type!=="ArrowFunctionExpression"&&Ve(),xr.typeParameters=le,this.resetStartLocationFromNode(xr,le),nt},O),Pe=null;if(ae.node&&this.maybeUnwrapTypeCastExpression(ae.node).type==="ArrowFunctionExpression"){if(!ae.error&&!ae.aborted)return ae.node.async&&this.raise(wt.UnexpectedTypeParameterBeforeAsyncArrowFunction,le),ae.node;Pe=ae.node}if((K=U)!=null&&K.node)return this.state=U.failState,U.node;if(Pe)return this.state=ae.failState,Pe;throw(re=U)!=null&&re.thrown?U.error:ae.thrown?ae.error:this.raise(wt.UnexpectedTokenAfterTypeParameter,le)}return super.parseMaybeAssign(m,S)}parseArrow(m){if(this.match(14)){let S=this.tryParse(()=>{let k=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let O=this.startNode();return[O.typeAnnotation,m.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=k,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),O});if(S.thrown)return null;S.error&&(this.state=S.failState),m.returnType=S.node.typeAnnotation?this.finishNode(S.node,"TypeAnnotation"):null}return super.parseArrow(m)}shouldParseArrow(m){return this.match(14)||super.shouldParseArrow(m)}setArrowFunctionParameters(m,S){this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1?m.params=S:super.setArrowFunctionParameters(m,S)}checkParams(m,S,k,O=!0){if(!(k&&this.state.noArrowParamsConversionAt.indexOf(m.start)!==-1)){for(let U=0;U0&&this.raise(wt.ThisParamMustBeFirst,m.params[U]);super.checkParams(m,S,k,O)}}parseParenAndDistinguishExpression(m){return super.parseParenAndDistinguishExpression(m&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(m,S,k){if(m.type==="Identifier"&&m.name==="async"&&this.state.noArrowAt.indexOf(S.index)!==-1){this.next();let O=this.startNodeAt(S);O.callee=m,O.arguments=super.parseCallExpressionArguments(11,!1),m=this.finishNode(O,"CallExpression")}else if(m.type==="Identifier"&&m.name==="async"&&this.match(47)){let O=this.state.clone(),U=this.tryParse(re=>this.parseAsyncArrowWithTypeParameters(S)||re(),O);if(!U.error&&!U.aborted)return U.node;let K=this.tryParse(()=>super.parseSubscripts(m,S,k),O);if(K.node&&!K.error)return K.node;if(U.node)return this.state=U.failState,U.node;if(K.node)return this.state=K.failState,K.node;throw U.error||K.error}return super.parseSubscripts(m,S,k)}parseSubscript(m,S,k,O){if(this.match(18)&&this.isLookaheadToken_lt()){if(O.optionalChainMember=!0,k)return O.stop=!0,m;this.next();let U=this.startNodeAt(S);return U.callee=m,U.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),U.arguments=this.parseCallExpressionArguments(11,!1),U.optional=!0,this.finishCallExpression(U,!0)}else if(!k&&this.shouldParseTypes()&&this.match(47)){let U=this.startNodeAt(S);U.callee=m;let K=this.tryParse(()=>(U.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),U.arguments=super.parseCallExpressionArguments(11,!1),O.optionalChainMember&&(U.optional=!1),this.finishCallExpression(U,O.optionalChainMember)));if(K.node)return K.error&&(this.state=K.failState),K.node}return super.parseSubscript(m,S,k,O)}parseNewCallee(m){super.parseNewCallee(m);let S=null;this.shouldParseTypes()&&this.match(47)&&(S=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),m.typeArguments=S}parseAsyncArrowWithTypeParameters(m){let S=this.startNodeAt(m);if(this.parseFunctionParams(S,!1),!!this.parseArrow(S))return super.parseArrowExpression(S,void 0,!0)}readToken_mult_modulo(m){let S=this.input.charCodeAt(this.state.pos+1);if(m===42&&S===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(m)}readToken_pipe_amp(m){let S=this.input.charCodeAt(this.state.pos+1);if(m===124&&S===125){this.finishOp(9,2);return}super.readToken_pipe_amp(m)}parseTopLevel(m,S){let k=super.parseTopLevel(m,S);return this.state.hasFlowComment&&this.raise(wt.UnterminatedFlowComment,this.state.curPosition()),k}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(wt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let m=this.skipFlowComment();m&&(this.state.pos+=m,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:m}=this.state,S=2;for(;[32,9].includes(this.input.charCodeAt(m+S));)S++;let k=this.input.charCodeAt(S+m),O=this.input.charCodeAt(S+m+1);return k===58&&O===58?S+2:this.input.slice(S+m,S+m+12)==="flow-include"?S+12:k===58&&O!==58?S:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(m,{enumName:S,memberName:k}){this.raise(wt.EnumBooleanMemberNotInitialized,m,{memberName:k,enumName:S})}flowEnumErrorInvalidMemberInitializer(m,S){return this.raise(S.explicitType?S.explicitType==="symbol"?wt.EnumInvalidMemberInitializerSymbolType:wt.EnumInvalidMemberInitializerPrimaryType:wt.EnumInvalidMemberInitializerUnknownType,m,S)}flowEnumErrorNumberMemberNotInitialized(m,S){this.raise(wt.EnumNumberMemberNotInitialized,m,S)}flowEnumErrorStringMemberInconsistentlyInitialized(m,S){this.raise(wt.EnumStringMemberInconsistentlyInitialized,m,S)}flowEnumMemberInit(){let m=this.state.startLoc,S=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let k=this.parseNumericLiteral(this.state.value);return S()?{type:"number",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}case 133:{let k=this.parseStringLiteral(this.state.value);return S()?{type:"string",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}case 85:case 86:{let k=this.parseBooleanLiteral(this.match(85));return S()?{type:"boolean",loc:k.loc.start,value:k}:{type:"invalid",loc:m}}default:return{type:"invalid",loc:m}}}flowEnumMemberRaw(){let m=this.state.startLoc,S=this.parseIdentifier(!0),k=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:m};return{id:S,init:k}}flowEnumCheckExplicitTypeMismatch(m,S,k){let{explicitType:O}=S;O!==null&&O!==k&&this.flowEnumErrorInvalidMemberInitializer(m,S)}flowEnumMembers({enumName:m,explicitType:S}){let k=new Set,O={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},U=!1;for(;!this.match(8);){if(this.eat(21)){U=!0;break}let K=this.startNode(),{id:re,init:le}=this.flowEnumMemberRaw(),ae=re.name;if(ae==="")continue;/^[a-z]/.test(ae)&&this.raise(wt.EnumInvalidMemberName,re,{memberName:ae,suggestion:ae[0].toUpperCase()+ae.slice(1),enumName:m}),k.has(ae)&&this.raise(wt.EnumDuplicateMemberName,re,{memberName:ae,enumName:m}),k.add(ae);let Pe={enumName:m,explicitType:S,memberName:ae};switch(K.id=re,le.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"boolean"),K.init=le.value,O.booleanMembers.push(this.finishNode(K,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"number"),K.init=le.value,O.numberMembers.push(this.finishNode(K,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(le.loc,Pe,"string"),K.init=le.value,O.stringMembers.push(this.finishNode(K,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(le.loc,Pe);case"none":switch(S){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(le.loc,Pe);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(le.loc,Pe);break;default:O.defaultedMembers.push(this.finishNode(K,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:O,hasUnknownMembers:U}}flowEnumStringMembers(m,S,{enumName:k}){if(m.length===0)return S;if(S.length===0)return m;if(S.length>m.length){for(let O of m)this.flowEnumErrorStringMemberInconsistentlyInitialized(O,{enumName:k});return S}else{for(let O of S)this.flowEnumErrorStringMemberInconsistentlyInitialized(O,{enumName:k});return m}}flowEnumParseExplicitType({enumName:m}){if(!this.eatContextual(102))return null;if(!me(this.state.type))throw this.raise(wt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:m});let{value:S}=this.state;return this.next(),S!=="boolean"&&S!=="number"&&S!=="string"&&S!=="symbol"&&this.raise(wt.EnumInvalidExplicitType,this.state.startLoc,{enumName:m,invalidEnumType:S}),S}flowEnumBody(m,S){let k=S.name,O=S.loc.start,U=this.flowEnumParseExplicitType({enumName:k});this.expect(5);let{members:K,hasUnknownMembers:re}=this.flowEnumMembers({enumName:k,explicitType:U});switch(m.hasUnknownMembers=re,U){case"boolean":return m.explicitType=!0,m.members=K.booleanMembers,this.expect(8),this.finishNode(m,"EnumBooleanBody");case"number":return m.explicitType=!0,m.members=K.numberMembers,this.expect(8),this.finishNode(m,"EnumNumberBody");case"string":return m.explicitType=!0,m.members=this.flowEnumStringMembers(K.stringMembers,K.defaultedMembers,{enumName:k}),this.expect(8),this.finishNode(m,"EnumStringBody");case"symbol":return m.members=K.defaultedMembers,this.expect(8),this.finishNode(m,"EnumSymbolBody");default:{let le=()=>(m.members=[],this.expect(8),this.finishNode(m,"EnumStringBody"));m.explicitType=!1;let ae=K.booleanMembers.length,Pe=K.numberMembers.length,Ve=K.stringMembers.length,at=K.defaultedMembers.length;if(!ae&&!Pe&&!Ve&&!at)return le();if(!ae&&!Pe)return m.members=this.flowEnumStringMembers(K.stringMembers,K.defaultedMembers,{enumName:k}),this.expect(8),this.finishNode(m,"EnumStringBody");if(!Pe&&!Ve&&ae>=at){for(let nt of K.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(nt.loc.start,{enumName:k,memberName:nt.id.name});return m.members=K.booleanMembers,this.expect(8),this.finishNode(m,"EnumBooleanBody")}else if(!ae&&!Ve&&Pe>=at){for(let nt of K.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(nt.loc.start,{enumName:k,memberName:nt.id.name});return m.members=K.numberMembers,this.expect(8),this.finishNode(m,"EnumNumberBody")}else return this.raise(wt.EnumInconsistentMemberValues,O,{enumName:k}),le()}}}flowParseEnumDeclaration(m){let S=this.parseIdentifier();return m.id=S,m.body=this.flowEnumBody(this.startNode(),S),this.finishNode(m,"EnumDeclaration")}isLookaheadToken_lt(){let m=this.nextTokenStart();if(this.input.charCodeAt(m)===60){let S=this.input.charCodeAt(m+1);return S!==60&&S!==61}return!1}maybeUnwrapTypeCastExpression(m){return m.type==="TypeCastExpression"?m.expression:m}},Rn=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:x})=>`Expected corresponding JSX closing tag for <${x}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:x,HTMLEntity:m})=>`Unexpected token \`${x}\`. Did you mean \`${m}\` or \`{'${x}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...?"});function vs(x){return x?x.type==="JSXOpeningFragment"||x.type==="JSXClosingFragment":!1}function bs(x){if(x.type==="JSXIdentifier")return x.name;if(x.type==="JSXNamespacedName")return x.namespace.name+":"+x.name.name;if(x.type==="JSXMemberExpression")return bs(x.object)+"."+bs(x.property);throw new Error("Node had unexpected type: "+x.type)}var xs=x=>class extends x{jsxReadToken(){let m="",S=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Rn.UnterminatedJsxContent,this.state.startLoc);let k=this.input.charCodeAt(this.state.pos);switch(k){case 60:case 123:if(this.state.pos===this.state.start){k===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(k);return}m+=this.input.slice(S,this.state.pos),this.finishToken(141,m);return;case 38:m+=this.input.slice(S,this.state.pos),m+=this.jsxReadEntity(),S=this.state.pos;break;case 62:case 125:default:$n(k)?(m+=this.input.slice(S,this.state.pos),m+=this.jsxReadNewLine(!0),S=this.state.pos):++this.state.pos}}}jsxReadNewLine(m){let S=this.input.charCodeAt(this.state.pos),k;return++this.state.pos,S===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,k=m?` `:`\r -`):k=String.fromCharCode(S),++this.state.curLine,this.state.lineStart=this.state.pos,k}jsxReadString(m){let S="",k=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let O=this.input.charCodeAt(this.state.pos);if(O===m)break;O===38?(S+=this.input.slice(k,this.state.pos),S+=this.jsxReadEntity(),k=this.state.pos):$n(O)?(S+=this.input.slice(k,this.state.pos),S+=this.jsxReadNewLine(!1),k=this.state.pos):++this.state.pos}S+=this.input.slice(k,this.state.pos++),this.finishToken(133,S)}jsxReadEntity(){let m=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let S=10;this.codePointAtPos(this.state.pos)===120&&(S=16,++this.state.pos);let k=this.readInt(S,void 0,!1,"bail");if(k!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(k)}else{let S=0,k=!1;for(;S++<10&&this.state.pos1){for(let k=0;k0){if(S&256){let O=!!(S&512),U=(k&4)>0;return O!==U}return!0}return S&128&&(k&8)>0?x.names.get(m)&2?!!(S&1):!1:S&2&&(k&1)>0?!0:super.isRedeclaredInScope(x,m,S)}checkLocalExport(x){let{name:m}=x;if(this.hasImport(m))return;let S=this.scopeStack.length;for(let k=S-1;k>=0;k--){let O=this.scopeStack[k].tsNames.get(m);if((O&1)>0||(O&16)>0)return}super.checkLocalExport(x)}},Xf=(x,m)=>Object.hasOwnProperty.call(x,m)&&x[m],Da=x=>x.type==="ParenthesizedExpression"?Da(x.expression):x,yl=class extends Uo{toAssignable(x,m=!1){var S,k;let O;switch((x.type==="ParenthesizedExpression"||(S=x.extra)!=null&&S.parenthesized)&&(O=Da(x),m?O.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,x):O.type!=="MemberExpression"&&!this.isOptionalMemberExpression(O)&&this.raise(v.InvalidParenthesizedAssignment,x):this.raise(v.InvalidParenthesizedAssignment,x)),x.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":x.type="ObjectPattern";for(let K=0,re=x.properties.length,le=re-1;Kk.type!=="ObjectMethod"&&(O===S||k.type!=="SpreadElement")&&this.isAssignable(k))}case"ObjectProperty":return this.isAssignable(x.value);case"SpreadElement":return this.isAssignable(x.argument);case"ArrayExpression":return x.elements.every(S=>S===null||this.isAssignable(S));case"AssignmentExpression":return x.operator==="=";case"ParenthesizedExpression":return this.isAssignable(x.expression);case"MemberExpression":case"OptionalMemberExpression":return!m;default:return!1}}toReferencedList(x,m){return x}toReferencedListDeep(x,m){this.toReferencedList(x,m);for(let S of x)(S==null?void 0:S.type)==="ArrayExpression"&&this.toReferencedListDeep(S.elements)}parseSpread(x){let m=this.startNode();return this.next(),m.argument=this.parseMaybeAssignAllowIn(x,void 0),this.finishNode(m,"SpreadElement")}parseRestBinding(){let x=this.startNode();return this.next(),x.argument=this.parseBindingAtom(),this.finishNode(x,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let x=this.startNode();return this.next(),x.elements=this.parseBindingList(3,93,1),this.finishNode(x,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(x,m,S){let k=S&1,O=[],U=!0;for(;!this.eat(x);)if(U?U=!1:this.expect(12),k&&this.match(12))O.push(null);else{if(this.eat(x))break;if(this.match(21)){if(O.push(this.parseAssignableListItemTypes(this.parseRestBinding(),S)),!this.checkCommaAfterRest(m)){this.expect(x);break}}else{let K=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)K.push(this.parseDecorator());O.push(this.parseAssignableListItem(S,K))}}return O}parseBindingRestProperty(x){return this.next(),x.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(x,"RestElement")}parseBindingProperty(){let x=this.startNode(),{type:m,startLoc:S}=this.state;return m===21?this.parseBindingRestProperty(x):(m===138?(this.expectPlugin("destructuringPrivate",S),this.classScope.usePrivateName(this.state.value,S),x.key=this.parsePrivateName()):this.parsePropertyName(x),x.method=!1,this.parseObjPropValue(x,S,!1,!1,!0,!1))}parseAssignableListItem(x,m){let S=this.parseMaybeDefault();this.parseAssignableListItemTypes(S,x);let k=this.parseMaybeDefault(S.loc.start,S);return m.length&&(S.decorators=m),k}parseAssignableListItemTypes(x,m){return x}parseMaybeDefault(x,m){var S;if(x!=null||(x=this.state.startLoc),m=(S=m)!=null?S:this.parseBindingAtom(),!this.eat(29))return m;let k=this.startNodeAt(x);return k.left=m,k.right=this.parseMaybeAssignAllowIn(),this.finishNode(k,"AssignmentPattern")}isValidLVal(x,m,S){return Xf({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},x)}isOptionalMemberExpression(x){return x.type==="OptionalMemberExpression"}checkLVal(x,{in:m,binding:S=64,checkClashes:k=!1,strictModeChanged:O=!1,hasParenthesizedAncestor:U=!1}){var K;let re=x.type;if(this.isObjectMethod(x))return;let le=this.isOptionalMemberExpression(x);if(le||re==="MemberExpression"){le&&(this.expectPlugin("optionalChainingAssign",x.loc.start),m.type!=="AssignmentExpression"&&this.raise(v.InvalidLhsOptionalChaining,x,{ancestor:m})),S!==64&&this.raise(v.InvalidPropertyBindingPattern,x);return}if(re==="Identifier"){this.checkIdentifier(x,S,O);let{name:nt}=x;k&&(k.has(nt)?this.raise(v.ParamDupe,x):k.add(nt));return}let ae=this.isValidLVal(re,!(U||(K=x.extra)!=null&&K.parenthesized)&&m.type==="AssignmentExpression",S);if(ae===!0)return;if(ae===!1){let nt=S===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(nt,x,{ancestor:m});return}let[Pe,Ve]=Array.isArray(ae)?ae:[ae,re==="ParenthesizedExpression"],at=re==="ArrayPattern"||re==="ObjectPattern"?{type:re}:m;for(let nt of[].concat(x[Pe]))nt&&this.checkLVal(nt,{in:at,binding:S,checkClashes:k,strictModeChanged:O,hasParenthesizedAncestor:Ve})}checkIdentifier(x,m,S=!1){this.state.strict&&(S?ye(x.name,this.inModule):Qn(x.name))&&(m===64?this.raise(v.StrictEvalArguments,x,{referenceName:x.name}):this.raise(v.StrictEvalArgumentsBinding,x,{bindingName:x.name})),m&8192&&x.name==="let"&&this.raise(v.LetInLexicalBinding,x),m&64||this.declareNameFromIdentifier(x,m)}declareNameFromIdentifier(x,m){this.scope.declareName(x.name,m,x.loc.start)}checkToRestConversion(x,m){switch(x.type){case"ParenthesizedExpression":this.checkToRestConversion(x.expression,m);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(m)break;default:this.raise(v.InvalidRestAssignmentPattern,x)}}checkCommaAfterRest(x){return this.match(12)?(this.raise(this.lookaheadCharCode()===x?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}},Ch=(x,m)=>Object.hasOwnProperty.call(x,m)&&x[m];function Wo(x){if(x==null)throw new Error(`Unexpected ${x} value.`);return x}function zs(x){if(!x)throw new Error("Assert fail")}var ht=b`typescript`({AbstractMethodHasImplementation:({methodName:x})=>`Method '${x}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:x})=>`Property '${x}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:x})=>`'declare' is not allowed in ${x}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:x})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:x})=>`Duplicate modifier: '${x}'.`,EmptyHeritageClauseType:({token:x})=>`'${x}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:x})=>`'${x[0]}' modifier cannot be used with '${x[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:x})=>`Index signatures cannot have an accessibility modifier ('${x}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:x})=>`'${x}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:x})=>`'${x}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:x})=>`'${x}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:x})=>`'${x[0]}' modifier must precede '${x[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:x})=>`Private elements cannot have an accessibility modifier ('${x}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:x})=>`Single type parameter ${x} should have a trailing comma. Example usage: <${x},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:x})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${x}.`});function Yf(x){switch(x){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Th(x){return x==="private"||x==="public"||x==="protected"}function ie(x){return x==="in"||x==="out"}var ve=x=>class extends x{constructor(...m){super(...m),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ht.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ht.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ht.InvalidModifierOnTypeParameter})}getScopeHandler(){return gl}tsIsIdentifier(){return me(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(m,S){if(!me(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let k=this.state.value;if(m.indexOf(k)!==-1){if(S&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return k}}tsParseModifiers({allowedModifiers:m,disallowedModifiers:S,stopOnStartOfClassStaticBlock:k,errorTemplate:O=ht.InvalidModifierOnTypeMember},U){let K=(le,ae,Pe,Ve)=>{ae===Pe&&U[Ve]&&this.raise(ht.InvalidModifiersOrder,le,{orderedModifiers:[Pe,Ve]})},re=(le,ae,Pe,Ve)=>{(U[Pe]&&ae===Ve||U[Ve]&&ae===Pe)&&this.raise(ht.IncompatibleModifiers,le,{modifiers:[Pe,Ve]})};for(;;){let{startLoc:le}=this.state,ae=this.tsParseModifier(m.concat(S??[]),k);if(!ae)break;Th(ae)?U.accessibility?this.raise(ht.DuplicateAccessibilityModifier,le,{modifier:ae}):(K(le,ae,ae,"override"),K(le,ae,ae,"static"),K(le,ae,ae,"readonly"),U.accessibility=ae):ie(ae)?(U[ae]&&this.raise(ht.DuplicateModifier,le,{modifier:ae}),U[ae]=!0,K(le,ae,"in","out")):(Object.hasOwnProperty.call(U,ae)?this.raise(ht.DuplicateModifier,le,{modifier:ae}):(K(le,ae,"static","readonly"),K(le,ae,"static","override"),K(le,ae,"override","readonly"),K(le,ae,"abstract","override"),re(le,ae,"declare","override"),re(le,ae,"static","abstract")),U[ae]=!0),S!=null&&S.includes(ae)&&this.raise(O,le,{modifier:ae})}}tsIsListTerminator(m){switch(m){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(m,S){let k=[];for(;!this.tsIsListTerminator(m);)k.push(S());return k}tsParseDelimitedList(m,S,k){return Wo(this.tsParseDelimitedListWorker(m,S,!0,k))}tsParseDelimitedListWorker(m,S,k,O){let U=[],K=-1;for(;!this.tsIsListTerminator(m);){K=-1;let re=S();if(re==null)return;if(U.push(re),this.eat(12)){K=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(m))break;k&&this.expect(12);return}return O&&(O.value=K),U}tsParseBracketedList(m,S,k,O,U){O||(k?this.expect(0):this.expect(47));let K=this.tsParseDelimitedList(m,S,U);return k?this.expect(3):this.expect(48),K}tsParseImportType(){let m=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ht.UnsupportedImportTypeArgument,this.state.startLoc),m.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(m.qualifier=this.tsParseEntityName()),this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSImportType")}tsParseEntityName(m=!0){let S=this.parseIdentifier(m);for(;this.eat(16);){let k=this.startNodeAtNode(S);k.left=S,k.right=this.parseIdentifier(m),S=this.finishNode(k,"TSQualifiedName")}return S}tsParseTypeReference(){let m=this.startNode();return m.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeReference")}tsParseThisTypePredicate(m){this.next();let S=this.startNodeAtNode(m);return S.parameterName=m,S.typeAnnotation=this.tsParseTypeAnnotation(!1),S.asserts=!1,this.finishNode(S,"TSTypePredicate")}tsParseThisTypeNode(){let m=this.startNode();return this.next(),this.finishNode(m,"TSThisType")}tsParseTypeQuery(){let m=this.startNode();return this.expect(87),this.match(83)?m.exprName=this.tsParseImportType():m.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeQuery")}tsParseTypeParameter(m){let S=this.startNode();return m(S),S.name=this.tsParseTypeParameterName(),S.constraint=this.tsEatThenParseType(81),S.default=this.tsEatThenParseType(29),this.finishNode(S,"TSTypeParameter")}tsTryParseTypeParameters(m){if(this.match(47))return this.tsParseTypeParameters(m)}tsParseTypeParameters(m){let S=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let k={value:-1};return S.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,m),!1,!0,k),S.params.length===0&&this.raise(ht.EmptyTypeParameters,S),k.value!==-1&&this.addExtra(S,"trailingComma",k.value),this.finishNode(S,"TSTypeParameterDeclaration")}tsFillSignature(m,S){let k=m===19,O="parameters",U="typeAnnotation";S.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),S[O]=this.tsParseBindingListForSignature(),k?S[U]=this.tsParseTypeOrTypePredicateAnnotation(m):this.match(m)&&(S[U]=this.tsParseTypeOrTypePredicateAnnotation(m))}tsParseBindingListForSignature(){let m=super.parseBindingList(11,41,2);for(let S of m){let{type:k}=S;(k==="AssignmentPattern"||k==="TSParameterProperty")&&this.raise(ht.UnsupportedSignatureParameterKind,S,{type:k})}return m}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(m,S){return this.tsFillSignature(14,S),this.tsParseTypeMemberSemicolon(),this.finishNode(S,m)}tsIsUnambiguouslyIndexSignature(){return this.next(),me(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(m){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let S=this.parseIdentifier();S.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(S),this.expect(3),m.parameters=[S];let k=this.tsTryParseTypeAnnotation();return k&&(m.typeAnnotation=k),this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSIndexSignature")}tsParsePropertyOrMethodSignature(m,S){this.eat(17)&&(m.optional=!0);let k=m;if(this.match(10)||this.match(47)){S&&this.raise(ht.ReadonlyForMethodSignature,m);let O=k;O.kind&&this.match(47)&&this.raise(ht.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,O),this.tsParseTypeMemberSemicolon();let U="parameters",K="typeAnnotation";if(O.kind==="get")O[U].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(O[U][0])&&this.raise(ht.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(O.kind==="set"){if(O[U].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let re=O[U][0];this.isThisParam(re)&&this.raise(ht.AccesorCannotDeclareThisParameter,this.state.curPosition()),re.type==="Identifier"&&re.optional&&this.raise(ht.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),re.type==="RestElement"&&this.raise(ht.SetAccesorCannotHaveRestParameter,this.state.curPosition())}O[K]&&this.raise(ht.SetAccesorCannotHaveReturnType,O[K])}else O.kind="method";return this.finishNode(O,"TSMethodSignature")}else{let O=k;S&&(O.readonly=!0);let U=this.tsTryParseTypeAnnotation();return U&&(O.typeAnnotation=U),this.tsParseTypeMemberSemicolon(),this.finishNode(O,"TSPropertySignature")}}tsParseTypeMember(){let m=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",m);if(this.match(77)){let k=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",m):(m.key=this.createIdentifier(k,"new"),this.tsParsePropertyOrMethodSignature(m,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},m),this.tsTryParseIndexSignature(m)||(super.parsePropertyName(m),!m.computed&&m.key.type==="Identifier"&&(m.key.name==="get"||m.key.name==="set")&&this.tsTokenCanFollowModifier()&&(m.kind=m.key.name,super.parsePropertyName(m)),this.tsParsePropertyOrMethodSignature(m,!!m.readonly))}tsParseTypeLiteral(){let m=this.startNode();return m.members=this.tsParseObjectTypeMembers(),this.finishNode(m,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let m=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),m}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let m=this.startNode();return m.name=this.tsParseTypeParameterName(),m.constraint=this.tsExpectThenParseType(58),this.finishNode(m,"TSTypeParameter")}tsParseMappedType(){let m=this.startNode();return this.expect(5),this.match(53)?(m.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(m.readonly=!0),this.expect(0),m.typeParameter=this.tsParseMappedTypeParameter(),m.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(m.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(m.optional=!0),m.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(m,"TSMappedType")}tsParseTupleType(){let m=this.startNode();m.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let S=!1;return m.elementTypes.forEach(k=>{let{type:O}=k;S&&O!=="TSRestType"&&O!=="TSOptionalType"&&!(O==="TSNamedTupleMember"&&k.optional)&&this.raise(ht.OptionalTypeBeforeRequired,k),S||(S=O==="TSNamedTupleMember"&&k.optional||O==="TSOptionalType")}),this.finishNode(m,"TSTupleType")}tsParseTupleElementType(){let{startLoc:m}=this.state,S=this.eat(21),k,O,U,K,re=ze(this.state.type)?this.lookaheadCharCode():null;if(re===58)k=!0,U=!1,O=this.parseIdentifier(!0),this.expect(14),K=this.tsParseType();else if(re===63){U=!0;let le=this.state.startLoc,ae=this.state.value,Pe=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(k=!0,O=this.createIdentifier(this.startNodeAt(le),ae),this.expect(17),this.expect(14),K=this.tsParseType()):(k=!1,K=Pe,this.expect(17))}else K=this.tsParseType(),U=this.eat(17),k=this.eat(14);if(k){let le;O?(le=this.startNodeAtNode(O),le.optional=U,le.label=O,le.elementType=K,this.eat(17)&&(le.optional=!0,this.raise(ht.TupleOptionalAfterType,this.state.lastTokStartLoc))):(le=this.startNodeAtNode(K),le.optional=U,this.raise(ht.InvalidTupleMemberLabel,K),le.label=K,le.elementType=this.tsParseType()),K=this.finishNode(le,"TSNamedTupleMember")}else if(U){let le=this.startNodeAtNode(K);le.typeAnnotation=K,K=this.finishNode(le,"TSOptionalType")}if(S){let le=this.startNodeAt(m);le.typeAnnotation=K,K=this.finishNode(le,"TSRestType")}return K}tsParseParenthesizedType(){let m=this.startNode();return this.expect(10),m.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(m,"TSParenthesizedType")}tsParseFunctionOrConstructorType(m,S){let k=this.startNode();return m==="TSConstructorType"&&(k.abstract=!!S,S&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,k)),this.finishNode(k,m)}tsParseLiteralTypeNode(){let m=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:m.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(m,"TSLiteralType")}tsParseTemplateLiteralType(){let m=this.startNode();return m.literal=super.parseTemplate(!1),this.finishNode(m,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let m=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(m):m}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let m=this.startNode(),S=this.lookahead();return S.type!==134&&S.type!==135&&this.unexpected(),m.literal=this.parseMaybeUnary(),this.finishNode(m,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:m}=this.state;if(me(m)||m===88||m===84){let S=m===88?"TSVoidKeyword":m===84?"TSNullKeyword":Yf(this.state.value);if(S!==void 0&&this.lookaheadCharCode()!==46){let k=this.startNode();return this.next(),this.finishNode(k,S)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let m=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let S=this.startNodeAtNode(m);S.elementType=m,this.expect(3),m=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAtNode(m);S.objectType=m,S.indexType=this.tsParseType(),this.expect(3),m=this.finishNode(S,"TSIndexedAccessType")}return m}tsParseTypeOperator(){let m=this.startNode(),S=this.state.value;return this.next(),m.operator=S,m.typeAnnotation=this.tsParseTypeOperatorOrHigher(),S==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(m),this.finishNode(m,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(m){switch(m.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ht.UnexpectedReadonly,m)}}tsParseInferType(){let m=this.startNode();this.expectContextual(115);let S=this.startNode();return S.name=this.tsParseTypeParameterName(),S.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),m.typeParameter=this.finishNode(S,"TSTypeParameter"),this.finishNode(m,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let m=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return m}}tsParseTypeOperatorOrHigher(){return _e(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(m,S,k){let O=this.startNode(),U=this.eat(k),K=[];do K.push(S());while(this.eat(k));return K.length===1&&!U?K[0]:(O.types=K,this.finishNode(O,m))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(me(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:m}=this.state,S=m.length;try{return this.parseObjectLike(8,!0),m.length===S}catch{return!1}}if(this.match(0)){this.next();let{errors:m}=this.state,S=m.length;try{return super.parseBindingList(3,93,1),m.length===S}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(m){return this.tsInType(()=>{let S=this.startNode();this.expect(m);let k=this.startNode(),O=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(O&&this.match(78)){let re=this.tsParseThisTypeOrThisTypePredicate();return re.type==="TSThisType"?(k.parameterName=re,k.asserts=!0,k.typeAnnotation=null,re=this.finishNode(k,"TSTypePredicate")):(this.resetStartLocationFromNode(re,k),re.asserts=!0),S.typeAnnotation=re,this.finishNode(S,"TSTypeAnnotation")}let U=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!U)return O?(k.parameterName=this.parseIdentifier(),k.asserts=O,k.typeAnnotation=null,S.typeAnnotation=this.finishNode(k,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,S);let K=this.tsParseTypeAnnotation(!1);return k.parameterName=U,k.typeAnnotation=K,k.asserts=O,S.typeAnnotation=this.finishNode(k,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let m=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),m}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let m=this.state.containsEsc;return this.next(),!me(this.state.type)&&!this.match(78)?!1:(m&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(m=!0,S=this.startNode()){return this.tsInType(()=>{m&&this.expect(14),S.typeAnnotation=this.tsParseType()}),this.finishNode(S,"TSTypeAnnotation")}tsParseType(){zs(this.state.inType);let m=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return m;let S=this.startNodeAtNode(m);return S.checkType=m,S.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),S.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),S.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(S,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ht.ReservedTypeAssertion,this.state.startLoc);let m=this.startNode();return m.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),m.expression=this.parseMaybeUnary(),this.finishNode(m,"TSTypeAssertion")}tsParseHeritageClause(m){let S=this.state.startLoc,k=this.tsParseDelimitedList("HeritageClauseElement",()=>{let O=this.startNode();return O.expression=this.tsParseEntityName(),this.match(47)&&(O.typeParameters=this.tsParseTypeArguments()),this.finishNode(O,"TSExpressionWithTypeArguments")});return k.length||this.raise(ht.EmptyHeritageClauseType,S,{token:m}),k}tsParseInterfaceDeclaration(m,S={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),S.declare&&(m.declare=!0),me(this.state.type)?(m.id=this.parseIdentifier(),this.checkIdentifier(m.id,130)):(m.id=null,this.raise(ht.MissingInterfaceName,this.state.startLoc)),m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(m.extends=this.tsParseHeritageClause("extends"));let k=this.startNode();return k.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),m.body=this.finishNode(k,"TSInterfaceBody"),this.finishNode(m,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(m){return m.id=this.parseIdentifier(),this.checkIdentifier(m.id,2),m.typeAnnotation=this.tsInType(()=>{if(m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let S=this.startNode();return this.next(),this.finishNode(S,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(m,"TSTypeAliasDeclaration")}tsInNoContext(m){let S=this.state.context;this.state.context=[S[0]];try{return m()}finally{this.state.context=S}}tsInType(m){let S=this.state.inType;this.state.inType=!0;try{return m()}finally{this.state.inType=S}}tsInDisallowConditionalTypesContext(m){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return m()}finally{this.state.inDisallowConditionalTypesContext=S}}tsInAllowConditionalTypesContext(m){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return m()}finally{this.state.inDisallowConditionalTypesContext=S}}tsEatThenParseType(m){if(this.match(m))return this.tsNextThenParseType()}tsExpectThenParseType(m){return this.tsInType(()=>(this.expect(m),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let m=this.startNode();return m.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(m.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(m,"TSEnumMember")}tsParseEnumDeclaration(m,S={}){return S.const&&(m.const=!0),S.declare&&(m.declare=!0),this.expectContextual(126),m.id=this.parseIdentifier(),this.checkIdentifier(m.id,m.const?8971:8459),this.expect(5),m.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(m,"TSEnumDeclaration")}tsParseModuleBlock(){let m=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(m.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(m,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(m,S=!1){if(m.id=this.parseIdentifier(),S||this.checkIdentifier(m.id,1024),this.eat(16)){let k=this.startNode();this.tsParseModuleOrNamespaceDeclaration(k,!0),m.body=k}else this.scope.enter(256),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(m,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(m){return this.isContextual(112)?(m.global=!0,m.id=this.parseIdentifier()):this.match(133)?m.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(m,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(m,S,k){m.isExport=k||!1,m.id=S||this.parseIdentifier(),this.checkIdentifier(m.id,4096),this.expect(29);let O=this.tsParseModuleReference();return m.importKind==="type"&&O.type!=="TSExternalModuleReference"&&this.raise(ht.ImportAliasHasImportType,O),m.moduleReference=O,this.semicolon(),this.finishNode(m,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let m=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),m.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(m,"TSExternalModuleReference")}tsLookAhead(m){let S=this.state.clone(),k=m();return this.state=S,k}tsTryParseAndCatch(m){let S=this.tryParse(k=>m()||k());if(!(S.aborted||!S.node))return S.error&&(this.state=S.failState),S.node}tsTryParse(m){let S=this.state.clone(),k=m();if(k!==void 0&&k!==!1)return k;this.state=S}tsTryParseDeclare(m){if(this.isLineTerminator())return;let S=this.state.type,k;return this.isContextual(100)&&(S=74,k="let"),this.tsInAmbientContext(()=>{switch(S){case 68:return m.declare=!0,super.parseFunctionStatement(m,!1,!1);case 80:return m.declare=!0,this.parseClass(m,!0,!1);case 126:return this.tsParseEnumDeclaration(m,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(m);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(m.declare=!0,this.parseVarStatement(m,k||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(m,{const:!0,declare:!0}));case 129:{let O=this.tsParseInterfaceDeclaration(m,{declare:!0});if(O)return O}default:if(me(S))return this.tsParseDeclaration(m,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(m,S,k){switch(S.name){case"declare":{let O=this.tsTryParseDeclare(m);return O&&(O.declare=!0),O}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let O=m;return O.global=!0,O.id=S,O.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(O,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(m,S.name,!1,k)}}tsParseDeclaration(m,S,k,O){switch(S){case"abstract":if(this.tsCheckLineTerminator(k)&&(this.match(80)||me(this.state.type)))return this.tsParseAbstractDeclaration(m,O);break;case"module":if(this.tsCheckLineTerminator(k)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(m);if(me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(m)}break;case"namespace":if(this.tsCheckLineTerminator(k)&&me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(m);break;case"type":if(this.tsCheckLineTerminator(k)&&me(this.state.type))return this.tsParseTypeAliasDeclaration(m);break}}tsCheckLineTerminator(m){return m?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(m){if(!this.match(47))return;let S=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let k=this.tsTryParseAndCatch(()=>{let O=this.startNodeAt(m);return O.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(O),O.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),O});if(this.state.maybeInArrowParameters=S,!!k)return super.parseArrowExpression(k,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let m=this.startNode();return m.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),m.params.length===0?this.raise(ht.EmptyTypeArguments,m):!this.state.inType&&this.curContext()===A.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(m,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return be(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(m,S){let k=this.state.startLoc,O={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},O);let U=O.accessibility,K=O.override,re=O.readonly;!(m&4)&&(U||re||K)&&this.raise(ht.UnexpectedParameterModifier,k);let le=this.parseMaybeDefault();this.parseAssignableListItemTypes(le,m);let ae=this.parseMaybeDefault(le.loc.start,le);if(U||re||K){let Pe=this.startNodeAt(k);return S.length&&(Pe.decorators=S),U&&(Pe.accessibility=U),re&&(Pe.readonly=re),K&&(Pe.override=K),ae.type!=="Identifier"&&ae.type!=="AssignmentPattern"&&this.raise(ht.UnsupportedParameterPropertyKind,Pe),Pe.parameter=ae,this.finishNode(Pe,"TSParameterProperty")}return S.length&&(le.decorators=S),ae}isSimpleParameter(m){return m.type==="TSParameterProperty"&&super.isSimpleParameter(m.parameter)||super.isSimpleParameter(m)}tsDisallowOptionalPattern(m){for(let S of m.params)S.type!=="Identifier"&&S.optional&&!this.state.isAmbientContext&&this.raise(ht.PatternIsOptional,S)}setArrowFunctionParameters(m,S,k){super.setArrowFunctionParameters(m,S,k),this.tsDisallowOptionalPattern(m)}parseFunctionBodyAndFinish(m,S,k=!1){this.match(14)&&(m.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let O=S==="FunctionDeclaration"?"TSDeclareFunction":S==="ClassMethod"||S==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return O&&!this.match(5)&&this.isLineTerminator()?this.finishNode(m,O):O==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ht.DeclareFunctionHasImplementation,m),m.declare)?super.parseFunctionBodyAndFinish(m,O,k):(this.tsDisallowOptionalPattern(m),super.parseFunctionBodyAndFinish(m,S,k))}registerFunctionStatementId(m){!m.body&&m.id?this.checkIdentifier(m.id,1024):super.registerFunctionStatementId(m)}tsCheckForInvalidTypeCasts(m){m.forEach(S=>{(S==null?void 0:S.type)==="TSTypeCastExpression"&&this.raise(ht.UnexpectedTypeAnnotation,S.typeAnnotation)})}toReferencedList(m,S){return this.tsCheckForInvalidTypeCasts(m),m}parseArrayLike(m,S,k,O){let U=super.parseArrayLike(m,S,k,O);return U.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(U.elements),U}parseSubscript(m,S,k,O){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let K=this.startNodeAt(S);return K.expression=m,this.finishNode(K,"TSNonNullExpression")}let U=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(k)return O.stop=!0,m;O.optionalChainMember=U=!0,this.next()}if(this.match(47)||this.match(51)){let K,re=this.tsTryParseAndCatch(()=>{if(!k&&this.atPossibleAsyncArrow(m)){let Ve=this.tsTryParseGenericAsyncArrowFunction(S);if(Ve)return Ve}let le=this.tsParseTypeArgumentsInExpression();if(!le)return;if(U&&!this.match(10)){K=this.state.curPosition();return}if(Te(this.state.type)){let Ve=super.parseTaggedTemplateExpression(m,S,O);return Ve.typeParameters=le,Ve}if(!k&&this.eat(10)){let Ve=this.startNodeAt(S);return Ve.callee=m,Ve.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(Ve.arguments),Ve.typeParameters=le,O.optionalChainMember&&(Ve.optional=U),this.finishCallExpression(Ve,O.optionalChainMember)}let ae=this.state.type;if(ae===48||ae===52||ae!==10&&Pt(ae)&&!this.hasPrecedingLineBreak())return;let Pe=this.startNodeAt(S);return Pe.expression=m,Pe.typeParameters=le,this.finishNode(Pe,"TSInstantiationExpression")});if(K&&this.unexpected(K,10),re)return re.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ht.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),re}return super.parseSubscript(m,S,k,O)}parseNewCallee(m){var S;super.parseNewCallee(m);let{callee:k}=m;k.type==="TSInstantiationExpression"&&!((S=k.extra)!=null&&S.parenthesized)&&(m.typeParameters=k.typeParameters,m.callee=k.expression)}parseExprOp(m,S,k){let O;if(Ze(58)>k&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(O=this.isContextual(120)))){let U=this.startNodeAt(S);return U.expression=m,U.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(O&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(U,O?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(U,S,k)}return super.parseExprOp(m,S,k)}checkReservedWord(m,S,k,O){this.state.isAmbientContext||super.checkReservedWord(m,S,k,O)}checkImportReflection(m){super.checkImportReflection(m),m.module&&m.importKind!=="value"&&this.raise(ht.ImportReflectionHasImportType,m.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(m){if(super.isPotentialImportPhase(m))return!0;if(this.isContextual(130)){let S=this.lookaheadCharCode();return m?S===123||S===42:S!==61}return!m&&this.isContextual(87)}applyImportPhase(m,S,k,O){super.applyImportPhase(m,S,k,O),S?m.exportKind=k==="type"?"type":"value":m.importKind=k==="type"||k==="typeof"?k:"value"}parseImport(m){if(this.match(133))return m.importKind="value",super.parseImport(m);let S;if(me(this.state.type)&&this.lookaheadCharCode()===61)return m.importKind="value",this.tsParseImportEqualsDeclaration(m);if(this.isContextual(130)){let k=this.parseMaybeImportPhase(m,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(m,k);S=super.parseImportSpecifiersAndAfter(m,k)}else S=super.parseImport(m);return S.importKind==="type"&&S.specifiers.length>1&&S.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ht.TypeImportCannotSpecifyDefaultAndNamed,S),S}parseExport(m,S){if(this.match(83)){this.next();let k=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?k=this.parseMaybeImportPhase(m,!1):m.importKind="value",this.tsParseImportEqualsDeclaration(m,k,!0)}else if(this.eat(29)){let k=m;return k.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(k,"TSExportAssignment")}else if(this.eatContextual(93)){let k=m;return this.expectContextual(128),k.id=this.parseIdentifier(),this.semicolon(),this.finishNode(k,"TSNamespaceExportDeclaration")}else return super.parseExport(m,S)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let m=this.startNode();return this.next(),m.abstract=!0,this.parseClass(m,!0,!0)}if(this.match(129)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseExportDefaultExpression()}parseVarStatement(m,S,k=!1){let{isAmbientContext:O}=this.state,U=super.parseVarStatement(m,S,k||O);if(!O)return U;for(let{id:K,init:re}of U.declarations)re&&(S!=="const"||K.typeAnnotation?this.raise(ht.InitializerNotAllowedInAmbientContext,re):lt(re,this.hasPlugin("estree"))||this.raise(ht.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,re));return U}parseStatementContent(m,S){if(this.match(75)&&this.isLookaheadContextual("enum")){let k=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(k,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let k=this.tsParseInterfaceDeclaration(this.startNode());if(k)return k}return super.parseStatementContent(m,S)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(m,S){return S.some(k=>Th(k)?m.accessibility===k:!!m[k])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(m,S,k){let O=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:O,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ht.InvalidModifierOnTypeParameterPositions},S);let U=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(S,O)&&this.raise(ht.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(m,S)):this.parseClassMemberWithIsStatic(m,S,k,!!S.static)};S.declare?this.tsInAmbientContext(U):U()}parseClassMemberWithIsStatic(m,S,k,O){let U=this.tsTryParseIndexSignature(S);if(U){m.body.push(U),S.abstract&&this.raise(ht.IndexSignatureHasAbstract,S),S.accessibility&&this.raise(ht.IndexSignatureHasAccessibility,S,{modifier:S.accessibility}),S.declare&&this.raise(ht.IndexSignatureHasDeclare,S),S.override&&this.raise(ht.IndexSignatureHasOverride,S);return}!this.state.inAbstractClass&&S.abstract&&this.raise(ht.NonAbstractClassHasAbstractMethod,S),S.override&&(k.hadSuperClass||this.raise(ht.OverrideNotInSubClass,S)),super.parseClassMemberWithIsStatic(m,S,k,O)}parsePostMemberNameModifiers(m){this.eat(17)&&(m.optional=!0),m.readonly&&this.match(10)&&this.raise(ht.ClassMethodHasReadonly,m),m.declare&&this.match(10)&&this.raise(ht.ClassMethodHasDeclare,m)}parseExpressionStatement(m,S,k){return(S.type==="Identifier"?this.tsParseExpressionStatement(m,S,k):void 0)||super.parseExpressionStatement(m,S,k)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(m,S,k){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(m,S,k);let O=this.tryParse(()=>super.parseConditional(m,S));return O.node?(O.error&&(this.state=O.failState),O.node):(O.error&&super.setOptionalParametersError(k,O.error),m)}parseParenItem(m,S){if(m=super.parseParenItem(m,S),this.eat(17)&&(m.optional=!0,this.resetEndLocation(m)),this.match(14)){let k=this.startNodeAt(S);return k.expression=m,k.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(k,"TSTypeCastExpression")}return m}parseExportDeclaration(m){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(m));let S=this.state.startLoc,k=this.eatContextual(125);if(k&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ht.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let O=me(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(m);return O?((O.type==="TSInterfaceDeclaration"||O.type==="TSTypeAliasDeclaration"||k)&&(m.exportKind="type"),k&&(this.resetStartLocation(O,S),O.declare=!0),O):null}parseClassId(m,S,k,O){if((!S||k)&&this.isContextual(113))return;super.parseClassId(m,S,k,m.declare?1024:8331);let U=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);U&&(m.typeParameters=U)}parseClassPropertyAnnotation(m){m.optional||(this.eat(35)?m.definite=!0:this.eat(17)&&(m.optional=!0));let S=this.tsTryParseTypeAnnotation();S&&(m.typeAnnotation=S)}parseClassProperty(m){if(this.parseClassPropertyAnnotation(m),this.state.isAmbientContext&&!(m.readonly&&!m.typeAnnotation)&&this.match(29)&&this.raise(ht.DeclareClassFieldHasInitializer,this.state.startLoc),m.abstract&&this.match(29)){let{key:S}=m;this.raise(ht.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:S.type==="Identifier"&&!m.computed?S.name:`[${this.input.slice(S.start,S.end)}]`})}return super.parseClassProperty(m)}parseClassPrivateProperty(m){return m.abstract&&this.raise(ht.PrivateElementHasAbstract,m),m.accessibility&&this.raise(ht.PrivateElementHasAccessibility,m,{modifier:m.accessibility}),this.parseClassPropertyAnnotation(m),super.parseClassPrivateProperty(m)}parseClassAccessorProperty(m){return this.parseClassPropertyAnnotation(m),m.optional&&this.raise(ht.AccessorCannotBeOptional,m),super.parseClassAccessorProperty(m)}pushClassMethod(m,S,k,O,U,K){let re=this.tsTryParseTypeParameters(this.tsParseConstModifier);re&&U&&this.raise(ht.ConstructorHasTypeParameters,re);let{declare:le=!1,kind:ae}=S;le&&(ae==="get"||ae==="set")&&this.raise(ht.DeclareAccessor,S,{kind:ae}),re&&(S.typeParameters=re),super.pushClassMethod(m,S,k,O,U,K)}pushClassPrivateMethod(m,S,k,O){let U=this.tsTryParseTypeParameters(this.tsParseConstModifier);U&&(S.typeParameters=U),super.pushClassPrivateMethod(m,S,k,O)}declareClassPrivateMethodInScope(m,S){m.type!=="TSDeclareMethod"&&(m.type==="MethodDefinition"&&!m.value.body||super.declareClassPrivateMethodInScope(m,S))}parseClassSuper(m){super.parseClassSuper(m),m.superClass&&(this.match(47)||this.match(51))&&(m.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(m.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(m,S,k,O,U,K,re){let le=this.tsTryParseTypeParameters(this.tsParseConstModifier);return le&&(m.typeParameters=le),super.parseObjPropValue(m,S,k,O,U,K,re)}parseFunctionParams(m,S){let k=this.tsTryParseTypeParameters(this.tsParseConstModifier);k&&(m.typeParameters=k),super.parseFunctionParams(m,S)}parseVarId(m,S){super.parseVarId(m,S),m.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(m.definite=!0);let k=this.tsTryParseTypeAnnotation();k&&(m.id.typeAnnotation=k,this.resetEndLocation(m.id))}parseAsyncArrowFromCallExpression(m,S){return this.match(14)&&(m.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(m,S)}parseMaybeAssign(m,S){var k,O,U,K,re;let le,ae,Pe;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(le=this.state.clone(),ae=this.tryParse(()=>super.parseMaybeAssign(m,S),le),!ae.error)return ae.node;let{context:nt}=this.state,xr=nt[nt.length-1];(xr===A.j_oTag||xr===A.j_expr)&&nt.pop()}if(!((k=ae)!=null&&k.error)&&!this.match(47))return super.parseMaybeAssign(m,S);(!le||le===this.state)&&(le=this.state.clone());let Ve,at=this.tryParse(nt=>{var xr,gr;Ve=this.tsParseTypeParameters(this.tsParseConstModifier);let wn=super.parseMaybeAssign(m,S);return(wn.type!=="ArrowFunctionExpression"||(xr=wn.extra)!=null&&xr.parenthesized)&&nt(),((gr=Ve)==null?void 0:gr.params.length)!==0&&this.resetStartLocationFromNode(wn,Ve),wn.typeParameters=Ve,wn},le);if(!at.error&&!at.aborted)return Ve&&this.reportReservedArrowTypeParam(Ve),at.node;if(!ae&&(zs(!this.hasPlugin("jsx")),Pe=this.tryParse(()=>super.parseMaybeAssign(m,S),le),!Pe.error))return Pe.node;if((O=ae)!=null&&O.node)return this.state=ae.failState,ae.node;if(at.node)return this.state=at.failState,Ve&&this.reportReservedArrowTypeParam(Ve),at.node;if((U=Pe)!=null&&U.node)return this.state=Pe.failState,Pe.node;throw((K=ae)==null?void 0:K.error)||at.error||((re=Pe)==null?void 0:re.error)}reportReservedArrowTypeParam(m){var S;m.params.length===1&&!m.params[0].constraint&&!((S=m.extra)!=null&&S.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ht.ReservedArrowTypeParam,m)}parseMaybeUnary(m,S){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(m,S)}parseArrow(m){if(this.match(14)){let S=this.tryParse(k=>{let O=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&k(),O});if(S.aborted)return;S.thrown||(S.error&&(this.state=S.failState),m.returnType=S.node)}return super.parseArrow(m)}parseAssignableListItemTypes(m,S){if(!(S&2))return m;this.eat(17)&&(m.optional=!0);let k=this.tsTryParseTypeAnnotation();return k&&(m.typeAnnotation=k),this.resetEndLocation(m),m}isAssignable(m,S){switch(m.type){case"TSTypeCastExpression":return this.isAssignable(m.expression,S);case"TSParameterProperty":return!0;default:return super.isAssignable(m,S)}}toAssignable(m,S=!1){switch(m.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(m,S);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":S?this.expressionScope.recordArrowParameterBindingError(ht.UnexpectedTypeCastInParameter,m):this.raise(ht.UnexpectedTypeCastInParameter,m),this.toAssignable(m.expression,S);break;case"AssignmentExpression":!S&&m.left.type==="TSTypeCastExpression"&&(m.left=this.typeCastToParameter(m.left));default:super.toAssignable(m,S)}}toAssignableParenthesizedExpression(m,S){switch(m.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(m.expression,S);break;default:super.toAssignable(m,S)}}checkToRestConversion(m,S){switch(m.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(m.expression,!1);break;default:super.checkToRestConversion(m,S)}}isValidLVal(m,S,k){return Ch({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(k!==64||!S)&&["expression",!0],TSSatisfiesExpression:(k!==64||!S)&&["expression",!0],TSTypeAssertion:(k!==64||!S)&&["expression",!0]},m)||super.isValidLVal(m,S,k)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(m){if(this.match(47)||this.match(51)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let k=super.parseMaybeDecoratorArguments(m);return k.typeParameters=S,k}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(m)}checkCommaAfterRest(m){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===m?(this.next(),!1):super.checkCommaAfterRest(m)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(m,S){let k=super.parseMaybeDefault(m,S);return k.type==="AssignmentPattern"&&k.typeAnnotation&&k.right.startthis.isAssignable(S,!0)):super.shouldParseArrow(m)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(m){if(this.match(47)||this.match(51)){let S=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());S&&(m.typeParameters=S)}return super.jsxParseOpeningElementAfterName(m)}getGetterSetterExpectedParamCount(m){let S=super.getGetterSetterExpectedParamCount(m),k=this.getObjectOrClassMethodParams(m)[0];return k&&this.isThisParam(k)?S+1:S}parseCatchClauseParam(){let m=super.parseCatchClauseParam(),S=this.tsTryParseTypeAnnotation();return S&&(m.typeAnnotation=S,this.resetEndLocation(m)),m}tsInAmbientContext(m){let S=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return m()}finally{this.state.isAmbientContext=S}}parseClass(m,S,k){let O=this.state.inAbstractClass;this.state.inAbstractClass=!!m.abstract;try{return super.parseClass(m,S,k)}finally{this.state.inAbstractClass=O}}tsParseAbstractDeclaration(m,S){if(this.match(80))return m.abstract=!0,this.maybeTakeDecorators(S,this.parseClass(m,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return m.abstract=!0,this.raise(ht.NonClassMethodPropertyHasAbstractModifer,m),this.tsParseInterfaceDeclaration(m)}else this.unexpected(null,80)}parseMethod(m,S,k,O,U,K,re){let le=super.parseMethod(m,S,k,O,U,K,re);if(le.abstract&&(this.hasPlugin("estree")?le.value.body:le.body)){let{key:ae}=le;this.raise(ht.AbstractMethodHasImplementation,le,{methodName:ae.type==="Identifier"&&!le.computed?ae.name:`[${this.input.slice(ae.start,ae.end)}]`})}return le}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(m,S,k,O){return!S&&O?(this.parseTypeOnlyImportExportSpecifier(m,!1,k),this.finishNode(m,"ExportSpecifier")):(m.exportKind="value",super.parseExportSpecifier(m,S,k,O))}parseImportSpecifier(m,S,k,O,U){return!S&&O?(this.parseTypeOnlyImportExportSpecifier(m,!0,k),this.finishNode(m,"ImportSpecifier")):(m.importKind="value",super.parseImportSpecifier(m,S,k,O,k?4098:4096))}parseTypeOnlyImportExportSpecifier(m,S,k){let O=S?"imported":"local",U=S?"local":"exported",K=m[O],re,le=!1,ae=!0,Pe=K.loc.start;if(this.isContextual(93)){let at=this.parseIdentifier();if(this.isContextual(93)){let nt=this.parseIdentifier();ze(this.state.type)?(le=!0,K=at,re=S?this.parseIdentifier():this.parseModuleExportName(),ae=!1):(re=nt,ae=!1)}else ze(this.state.type)?(ae=!1,re=S?this.parseIdentifier():this.parseModuleExportName()):(le=!0,K=at)}else ze(this.state.type)&&(le=!0,S?(K=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(K.name,K.loc.start,!0,!0)):K=this.parseModuleExportName());le&&k&&this.raise(S?ht.TypeModifierIsUsedInTypeImports:ht.TypeModifierIsUsedInTypeExports,Pe),m[O]=K,m[U]=re;let Ve=S?"importKind":"exportKind";m[Ve]=le?"type":"value",ae&&this.eatContextual(93)&&(m[U]=S?this.parseIdentifier():this.parseModuleExportName()),m[U]||(m[U]=es(m[O])),S&&this.checkIdentifier(m[U],le?4098:4096)}};function Me(x){if(x.type!=="MemberExpression")return!1;let{computed:m,property:S}=x;return m&&S.type!=="StringLiteral"&&(S.type!=="TemplateLiteral"||S.expressions.length>0)?!1:Rr(x.object)}function lt(x,m){var S;let{type:k}=x;if((S=x.extra)!=null&&S.parenthesized)return!1;if(m){if(k==="Literal"){let{value:O}=x;if(typeof O=="string"||typeof O=="boolean")return!0}}else if(k==="StringLiteral"||k==="BooleanLiteral")return!0;return!!(Cr(x,m)||Lt(x,m)||k==="TemplateLiteral"&&x.expressions.length===0||Me(x))}function Cr(x,m){return m?x.type==="Literal"&&(typeof x.value=="number"||"bigint"in x):x.type==="NumericLiteral"||x.type==="BigIntLiteral"}function Lt(x,m){if(x.type==="UnaryExpression"){let{operator:S,argument:k}=x;if(S==="-"&&Cr(k,m))return!0}return!1}function Rr(x){return x.type==="Identifier"?!0:x.type!=="MemberExpression"||x.computed?!1:Rr(x.object)}var rn=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),bn=x=>class extends x{parsePlaceholder(m){if(this.match(144)){let S=this.startNode();return this.next(),this.assertNoSpace(),S.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(S,m)}}finishPlaceholder(m,S){let k=!!(m.expectedNode&&m.type==="Placeholder");return m.expectedNode=S,k?m:this.finishNode(m,"Placeholder")}getTokenFromCode(m){m===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(m)}parseExprAtom(m){return this.parsePlaceholder("Expression")||super.parseExprAtom(m)}parseIdentifier(m){return this.parsePlaceholder("Identifier")||super.parseIdentifier(m)}checkReservedWord(m,S,k,O){m!==void 0&&super.checkReservedWord(m,S,k,O)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(m,S,k){return m==="Placeholder"||super.isValidLVal(m,S,k)}toAssignable(m,S){m&&m.type==="Placeholder"&&m.expectedNode==="Expression"?m.expectedNode="Pattern":super.toAssignable(m,S)}chStartsBindingIdentifier(m,S){return!!(super.chStartsBindingIdentifier(m,S)||this.lookahead().type===144)}verifyBreakContinue(m,S){m.label&&m.label.type==="Placeholder"||super.verifyBreakContinue(m,S)}parseExpressionStatement(m,S){var k;if(S.type!=="Placeholder"||(k=S.extra)!=null&&k.parenthesized)return super.parseExpressionStatement(m,S);if(this.match(14)){let O=m;return O.label=this.finishPlaceholder(S,"Identifier"),this.next(),O.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(O,"LabeledStatement")}return this.semicolon(),m.name=S.name,this.finishPlaceholder(m,"Statement")}parseBlock(m,S,k){return this.parsePlaceholder("BlockStatement")||super.parseBlock(m,S,k)}parseFunctionId(m){return this.parsePlaceholder("Identifier")||super.parseFunctionId(m)}parseClass(m,S,k){let O=S?"ClassDeclaration":"ClassExpression";this.next();let U=this.state.strict,K=this.parsePlaceholder("Identifier");if(K)if(this.match(81)||this.match(144)||this.match(5))m.id=K;else{if(k||!S)return m.id=null,m.body=this.finishPlaceholder(K,"ClassBody"),this.finishNode(m,O);throw this.raise(rn.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(m,S,k);return super.parseClassSuper(m),m.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!m.superClass,U),this.finishNode(m,O)}parseExport(m,S){let k=this.parsePlaceholder("Identifier");if(!k)return super.parseExport(m,S);if(!this.isContextual(98)&&!this.match(12))return m.specifiers=[],m.source=null,m.declaration=this.finishPlaceholder(k,"Declaration"),this.finishNode(m,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let O=this.startNode();return O.exported=k,m.specifiers=[this.finishNode(O,"ExportDefaultSpecifier")],super.parseExport(m,S)}isExportDefaultSpecifier(){if(this.match(65)){let m=this.nextTokenStart();if(this.isUnparsedContextual(m,"from")&&this.input.startsWith(Ne(144),this.nextTokenStartSince(m+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(m,S){var k;return(k=m.specifiers)!=null&&k.length?!0:super.maybeParseExportDefaultSpecifier(m,S)}checkExport(m){let{specifiers:S}=m;S!=null&&S.length&&(m.specifiers=S.filter(k=>k.exported.type==="Placeholder")),super.checkExport(m),m.specifiers=S}parseImport(m){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseImport(m);if(m.specifiers=[],!this.isContextual(98)&&!this.match(12))return m.source=this.finishPlaceholder(S,"StringLiteral"),this.semicolon(),this.finishNode(m,"ImportDeclaration");let k=this.startNodeAtNode(S);return k.local=S,m.specifiers.push(this.finishNode(k,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(m)||this.parseNamedImportSpecifiers(m)),this.expectContextual(98),m.source=this.parseImportSource(),this.semicolon(),this.finishNode(m,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(rn.UnexpectedSpace,this.state.lastTokEndLoc)}},Hr=x=>class extends x{parseV8Intrinsic(){if(this.match(54)){let m=this.state.startLoc,S=this.startNode();if(this.next(),me(this.state.type)){let k=this.parseIdentifierName(),O=this.createIdentifier(S,k);if(O.type="V8IntrinsicIdentifier",this.match(10))return O}this.unexpected(m)}}parseExprAtom(m){return this.parseV8Intrinsic()||super.parseExprAtom(m)}};function tr(x,m){let[S,k]=typeof m=="string"?[m,{}]:m,O=Object.keys(k),U=O.length===0;return x.some(K=>{if(typeof K=="string")return U&&K===S;{let[re,le]=K;if(re!==S)return!1;for(let ae of O)if(le[ae]!==k[ae])return!1;return!0}})}function gn(x,m,S){let k=x.find(O=>Array.isArray(O)?O[0]===m:O===m);return k&&Array.isArray(k)&&k.length>1?k[1][S]:null}var xn=["minimal","fsharp","hack","smart"],ri=["^^","@@","^","%","#"],ni=["hash","bar"];function ws(x){if(tr(x,"decorators")){if(tr(x,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let m=gn(x,"decorators","decoratorsBeforeExport");if(m!=null&&typeof m!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let S=gn(x,"decorators","allowCallParenthesized");if(S!=null&&typeof S!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(tr(x,"flow")&&tr(x,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(tr(x,"placeholders")&&tr(x,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(tr(x,"pipelineOperator")){let m=gn(x,"pipelineOperator","proposal");if(!xn.includes(m)){let k=xn.map(O=>`"${O}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${k}.`)}let S=tr(x,["recordAndTuple",{syntaxType:"hash"}]);if(m==="hack"){if(tr(x,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(tr(x,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let k=gn(x,"pipelineOperator","topicToken");if(!ri.includes(k)){let O=ri.map(U=>`"${U}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${O}.`)}if(k==="#"&&S)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(m==="smart"&&S)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(tr(x,"moduleAttributes")){if(tr(x,"importAssertions")||tr(x,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(gn(x,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(tr(x,"importAssertions")&&tr(x,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(tr(x,"recordAndTuple")&&gn(x,"recordAndTuple","syntaxType")!=null&&!ni.includes(gn(x,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+ni.map(m=>`'${m}'`).join(", "));if(tr(x,"asyncDoExpressions")&&!tr(x,"doExpressions")){let m=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw m.missingPlugins="doExpressions",m}if(tr(x,"optionalChainingAssign")&&gn(x,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var ts={estree:w,jsx:xs,flow:Eh,typescript:ve,v8intrinsic:Hr,placeholders:bn},ho=Object.keys(ts),vl={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function bl(x){if(x==null)return Object.assign({},vl);if(x.annexB!=null&&x.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let m={};for(let k of Object.keys(vl)){var S;m[k]=(S=x[k])!=null?S:vl[k]}return m}var xl=class extends yl{checkProto(x,m,S,k){if(x.type==="SpreadElement"||this.isObjectMethod(x)||x.computed||x.shorthand)return;let O=x.key;if((O.type==="Identifier"?O.name:O.value)==="__proto__"){if(m){this.raise(v.RecordNoProto,O);return}S.used&&(k?k.doubleProtoLoc===null&&(k.doubleProtoLoc=O.loc.start):this.raise(v.DuplicateProto,O)),S.used=!0}}shouldExitDescending(x,m){return x.type==="ArrowFunctionExpression"&&x.start===m}getExpression(){this.enterInitialScopes(),this.nextToken();let x=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),x.comments=this.comments,x.errors=this.state.errors,this.options.tokens&&(x.tokens=this.tokens),x}parseExpression(x,m){return x?this.disallowInAnd(()=>this.parseExpressionBase(m)):this.allowInAnd(()=>this.parseExpressionBase(m))}parseExpressionBase(x){let m=this.state.startLoc,S=this.parseMaybeAssign(x);if(this.match(12)){let k=this.startNodeAt(m);for(k.expressions=[S];this.eat(12);)k.expressions.push(this.parseMaybeAssign(x));return this.toReferencedList(k.expressions),this.finishNode(k,"SequenceExpression")}return S}parseMaybeAssignDisallowIn(x,m){return this.disallowInAnd(()=>this.parseMaybeAssign(x,m))}parseMaybeAssignAllowIn(x,m){return this.allowInAnd(()=>this.parseMaybeAssign(x,m))}setOptionalParametersError(x,m){var S;x.optionalParametersLoc=(S=m==null?void 0:m.loc)!=null?S:this.state.startLoc}parseMaybeAssign(x,m){let S=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let K=this.parseYield();return m&&(K=m.call(this,K,S)),K}let k;x?k=!1:(x=new wa,k=!0);let{type:O}=this.state;(O===10||me(O))&&(this.state.potentialArrowAt=this.state.start);let U=this.parseMaybeConditional(x);if(m&&(U=m.call(this,U,S)),V(this.state.type)){let K=this.startNodeAt(S),re=this.state.value;if(K.operator=re,this.match(29)){this.toAssignable(U,!0),K.left=U;let le=S.index;x.doubleProtoLoc!=null&&x.doubleProtoLoc.index>=le&&(x.doubleProtoLoc=null),x.shorthandAssignLoc!=null&&x.shorthandAssignLoc.index>=le&&(x.shorthandAssignLoc=null),x.privateKeyLoc!=null&&x.privateKeyLoc.index>=le&&(this.checkDestructuringPrivate(x),x.privateKeyLoc=null)}else K.left=U;return this.next(),K.right=this.parseMaybeAssign(),this.checkLVal(U,{in:this.finishNode(K,"AssignmentExpression")}),K}else k&&this.checkExpressionErrors(x,!0);return U}parseMaybeConditional(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseExprOps(x);return this.shouldExitDescending(k,S)?k:this.parseConditional(k,m,x)}parseConditional(x,m,S){if(this.eat(17)){let k=this.startNodeAt(m);return k.test=x,k.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),k.alternate=this.parseMaybeAssign(),this.finishNode(k,"ConditionalExpression")}return x}parseMaybeUnaryOrPrivate(x){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(x)}parseExprOps(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseMaybeUnaryOrPrivate(x);return this.shouldExitDescending(k,S)?k:this.parseExprOp(k,m,-1)}parseExprOp(x,m,S){if(this.isPrivateName(x)){let O=this.getPrivateNameSV(x);(S>=Ze(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,x,{identifierName:O}),this.classScope.usePrivateName(O,x.loc.start)}let k=this.state.type;if(ne(k)&&(this.prodParam.hasIn||!this.match(58))){let O=Ze(k);if(O>S){if(k===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return x;this.checkPipelineAtInfixOperator(x,m)}let U=this.startNodeAt(m);U.left=x,U.operator=this.state.value;let K=k===41||k===42,re=k===40;if(re&&(O=Ze(42)),this.next(),k===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);U.right=this.parseExprOpRightExpr(k,O);let le=this.finishNode(U,K||re?"LogicalExpression":"BinaryExpression"),ae=this.state.type;if(re&&(ae===41||ae===42)||K&&ae===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(le,m,S)}}return x}parseExprOpRightExpr(x,m){let S=this.state.startLoc;switch(x){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(x,m),S)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(m))}default:return this.parseExprOpBaseRightExpr(x,m)}}parseExprOpBaseRightExpr(x,m){let S=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),S,ce(x)?m-1:m)}parseHackPipeBody(){var x;let{startLoc:m}=this.state,S=this.parseMaybeAssign();return h.has(S.type)&&!((x=S.extra)!=null&&x.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,m,{type:S.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,m),S}checkExponentialAfterUnary(x){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,x.argument)}parseMaybeUnary(x,m){let S=this.state.startLoc,k=this.isContextual(96);if(k&&this.isAwaitAllowed()){this.next();let re=this.parseAwait(S);return m||this.checkExponentialAfterUnary(re),re}let O=this.match(34),U=this.startNode();if(Ie(this.state.type)){U.operator=this.state.value,U.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let re=this.match(89);if(this.next(),U.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(x,!0),this.state.strict&&re){let le=U.argument;le.type==="Identifier"?this.raise(v.StrictDelete,U):this.hasPropertyAsPrivateName(le)&&this.raise(v.DeletePrivateField,U)}if(!O)return m||this.checkExponentialAfterUnary(U),this.finishNode(U,"UnaryExpression")}let K=this.parseUpdate(U,O,x);if(k){let{type:re}=this.state;if((this.hasPlugin("v8intrinsic")?Pt(re):Pt(re)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,S),this.parseAwait(S)}return K}parseUpdate(x,m,S){if(m){let U=x;return this.checkLVal(U.argument,{in:this.finishNode(U,"UpdateExpression")}),x}let k=this.state.startLoc,O=this.parseExprSubscripts(S);if(this.checkExpressionErrors(S,!1))return O;for(;ge(this.state.type)&&!this.canInsertSemicolon();){let U=this.startNodeAt(k);U.operator=this.state.value,U.prefix=!1,U.argument=O,this.next(),this.checkLVal(O,{in:O=this.finishNode(U,"UpdateExpression")})}return O}parseExprSubscripts(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseExprAtom(x);return this.shouldExitDescending(k,S)?k:this.parseSubscripts(k,m)}parseSubscripts(x,m,S){let k={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(x),stop:!1};do x=this.parseSubscript(x,m,S,k),k.maybeAsyncArrow=!1;while(!k.stop);return x}parseSubscript(x,m,S,k){let{type:O}=this.state;if(!S&&O===15)return this.parseBind(x,m,S,k);if(Te(O))return this.parseTaggedTemplateExpression(x,m,k);let U=!1;if(O===18){if(S&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return k.stop=!0,x;k.optionalChainMember=U=!0,this.next()}if(!S&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(x,m,k,U);{let K=this.eat(0);return K||U||this.eat(16)?this.parseMember(x,m,k,K,U):(k.stop=!0,x)}}parseMember(x,m,S,k,O){let U=this.startNodeAt(m);return U.object=x,U.computed=k,k?(U.property=this.parseExpression(),this.expect(3)):this.match(138)?(x.type==="Super"&&this.raise(v.SuperPrivateField,m),this.classScope.usePrivateName(this.state.value,this.state.startLoc),U.property=this.parsePrivateName()):U.property=this.parseIdentifier(!0),S.optionalChainMember?(U.optional=O,this.finishNode(U,"OptionalMemberExpression")):this.finishNode(U,"MemberExpression")}parseBind(x,m,S,k){let O=this.startNodeAt(m);return O.object=x,this.next(),O.callee=this.parseNoCallExpr(),k.stop=!0,this.parseSubscripts(this.finishNode(O,"BindExpression"),m,S)}parseCoverCallAndAsyncArrowHead(x,m,S,k){let O=this.state.maybeInArrowParameters,U=null;this.state.maybeInArrowParameters=!0,this.next();let K=this.startNodeAt(m);K.callee=x;let{maybeAsyncArrow:re,optionalChainMember:le}=S;re&&(this.expressionScope.enter(wh()),U=new wa),le&&(K.optional=k),k?K.arguments=this.parseCallExpressionArguments(11):K.arguments=this.parseCallExpressionArguments(11,x.type==="Import",x.type!=="Super",K,U);let ae=this.finishCallExpression(K,le);return re&&this.shouldParseAsyncArrow()&&!k?(S.stop=!0,this.checkDestructuringPrivate(U),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),ae=this.parseAsyncArrowFromCallExpression(this.startNodeAt(m),ae)):(re&&(this.checkExpressionErrors(U,!0),this.expressionScope.exit()),this.toReferencedArguments(ae)),this.state.maybeInArrowParameters=O,ae}toReferencedArguments(x,m){this.toReferencedListDeep(x.arguments,m)}parseTaggedTemplateExpression(x,m,S){let k=this.startNodeAt(m);return k.tag=x,k.quasi=this.parseTemplate(!0),S.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,m),this.finishNode(k,"TaggedTemplateExpression")}atPossibleAsyncArrow(x){return x.type==="Identifier"&&x.name==="async"&&this.state.lastTokEndLoc.index===x.end&&!this.canInsertSemicolon()&&x.end-x.start===5&&x.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(x,m){if(x.callee.type==="Import")if(x.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),x.arguments.length===0||x.arguments.length>2)this.raise(v.ImportCallArity,x,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let S of x.arguments)S.type==="SpreadElement"&&this.raise(v.ImportCallSpreadArgument,S);return this.finishNode(x,m?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(x,m,S,k,O){let U=[],K=!0,re=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(x);){if(K)K=!1;else if(this.expect(12),this.match(x)){m&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),k&&this.addTrailingCommaExtraToNode(k),this.next();break}U.push(this.parseExprListItem(!1,O,S))}return this.state.inFSharpPipelineDirectBody=re,U}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(x,m){var S;return this.resetPreviousNodeTrailingComments(m),this.expect(19),this.parseArrowExpression(x,m.arguments,!0,(S=m.extra)==null?void 0:S.trailingCommaLoc),m.innerComments&&ct(x,m.innerComments),m.callee.trailingComments&&ct(x,m.callee.trailingComments),x}parseNoCallExpr(){let x=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),x,!0)}parseExprAtom(x){let m,S=null,{type:k}=this.state;switch(k){case 79:return this.parseSuper();case 83:return m=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(m):this.match(10)?this.options.createImportExpressions?this.parseImportCall(m):this.finishNode(m,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(m,"Import"));case 78:return m=this.startNode(),this.next(),this.finishNode(m,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let O=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(O)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,x);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,x);case 68:return this.parseFunctionOrFunctionSent();case 26:S=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(S,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{m=this.startNode(),this.next(),m.object=null;let O=m.callee=this.parseNoCallExpr();if(O.type==="MemberExpression")return this.finishNode(m,"BindExpression");throw this.raise(v.UnsupportedBind,O)}case 138:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let O=this.getPluginOption("pipelineOperator","proposal");if(O)return this.parseTopicReference(O);this.unexpected();break}case 47:{let O=this.input.codePointAt(this.nextTokenStart());Rt(O)||O===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(me(k)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let O=this.state.potentialArrowAt===this.state.start,U=this.state.containsEsc,K=this.parseIdentifier();if(!U&&K.name==="async"&&!this.canInsertSemicolon()){let{type:re}=this.state;if(re===68)return this.resetPreviousNodeTrailingComments(K),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(K));if(me(re))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(K)):K;if(re===90)return this.resetPreviousNodeTrailingComments(K),this.parseDo(this.startNodeAtNode(K),!0)}return O&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(K),[K],!1)):K}else this.unexpected()}}parseTopicReferenceThenEqualsSign(x,m){let S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.state.type=x,this.state.value=m,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(S);this.unexpected()}parseTopicReference(x){let m=this.startNode(),S=this.state.startLoc,k=this.state.type;return this.next(),this.finishTopicReference(m,S,x,k)}finishTopicReference(x,m,S,k){if(this.testTopicReferenceConfiguration(S,m,k)){let O=S==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(S==="smart"?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,m),this.registerTopicReference(),this.finishNode(x,O)}else throw this.raise(v.PipeTopicUnconfiguredToken,m,{token:Ne(k)})}testTopicReferenceConfiguration(x,m,S){switch(x){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ne(S)}]);case"smart":return S===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,m)}}parseAsyncArrowUnaryFunction(x){this.prodParam.enter(pl(!0,this.prodParam.hasYield));let m=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(x,m,!0)}parseDo(x,m){this.expectPlugin("doExpressions"),m&&this.expectPlugin("asyncDoExpressions"),x.async=m,this.next();let S=this.state.labels;return this.state.labels=[],m?(this.prodParam.enter(2),x.body=this.parseBlock(),this.prodParam.exit()):x.body=this.parseBlock(),this.state.labels=S,this.finishNode(x,"DoExpression")}parseSuper(){let x=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(v.SuperNotAllowed,x):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,x),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,x),this.finishNode(x,"Super")}parsePrivateName(){let x=this.startNode(),m=this.startNodeAt(i(this.state.startLoc,1)),S=this.state.value;return this.next(),x.id=this.createIdentifier(m,S),this.finishNode(x,"PrivateName")}parseFunctionOrFunctionSent(){let x=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let m=this.createIdentifier(this.startNodeAtNode(x),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(x,m,"sent")}return this.parseFunction(x)}parseMetaProperty(x,m,S){x.meta=m;let k=this.state.containsEsc;return x.property=this.parseIdentifier(!0),(x.property.name!==S||k)&&this.raise(v.UnsupportedMetaProperty,x.property,{target:m.name,onlyValidPropertyName:S}),this.finishNode(x,"MetaProperty")}parseImportMetaProperty(x){let m=this.createIdentifier(this.startNodeAtNode(x),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(v.ImportMetaOutsideModule,m),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let S=this.isContextual(105);if(S||this.unexpected(),this.expectPlugin(S?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(v.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),x.phase=S?"source":"defer",this.parseImportCall(x)}return this.parseMetaProperty(x,m,"meta")}parseLiteralAtNode(x,m,S){return this.addExtra(S,"rawValue",x),this.addExtra(S,"raw",this.input.slice(S.start,this.state.end)),S.value=x,this.next(),this.finishNode(S,m)}parseLiteral(x,m){let S=this.startNode();return this.parseLiteralAtNode(x,m,S)}parseStringLiteral(x){return this.parseLiteral(x,"StringLiteral")}parseNumericLiteral(x){return this.parseLiteral(x,"NumericLiteral")}parseBigIntLiteral(x){return this.parseLiteral(x,"BigIntLiteral")}parseDecimalLiteral(x){return this.parseLiteral(x,"DecimalLiteral")}parseRegExpLiteral(x){let m=this.parseLiteral(x.value,"RegExpLiteral");return m.pattern=x.pattern,m.flags=x.flags,m}parseBooleanLiteral(x){let m=this.startNode();return m.value=x,this.next(),this.finishNode(m,"BooleanLiteral")}parseNullLiteral(){let x=this.startNode();return this.next(),this.finishNode(x,"NullLiteral")}parseParenAndDistinguishExpression(x){let m=this.state.startLoc,S;this.next(),this.expressionScope.enter(Ho());let k=this.state.maybeInArrowParameters,O=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let U=this.state.startLoc,K=[],re=new wa,le=!0,ae,Pe;for(;!this.match(11);){if(le)le=!1;else if(this.expect(12,re.optionalParametersLoc===null?null:re.optionalParametersLoc),this.match(11)){Pe=this.state.startLoc;break}if(this.match(21)){let nt=this.state.startLoc;if(ae=this.state.startLoc,K.push(this.parseParenItem(this.parseRestBinding(),nt)),!this.checkCommaAfterRest(41))break}else K.push(this.parseMaybeAssignAllowIn(re,this.parseParenItem))}let Ve=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=k,this.state.inFSharpPipelineDirectBody=O;let at=this.startNodeAt(m);return x&&this.shouldParseArrow(K)&&(at=this.parseArrow(at))?(this.checkDestructuringPrivate(re),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(at,K,!1),at):(this.expressionScope.exit(),K.length||this.unexpected(this.state.lastTokStartLoc),Pe&&this.unexpected(Pe),ae&&this.unexpected(ae),this.checkExpressionErrors(re,!0),this.toReferencedListDeep(K,!0),K.length>1?(S=this.startNodeAt(U),S.expressions=K,this.finishNode(S,"SequenceExpression"),this.resetEndLocation(S,Ve)):S=K[0],this.wrapParenthesis(m,S))}wrapParenthesis(x,m){if(!this.options.createParenthesizedExpressions)return this.addExtra(m,"parenthesized",!0),this.addExtra(m,"parenStart",x.index),this.takeSurroundingComments(m,x.index,this.state.lastTokEndLoc.index),m;let S=this.startNodeAt(x);return S.expression=m,this.finishNode(S,"ParenthesizedExpression")}shouldParseArrow(x){return!this.canInsertSemicolon()}parseArrow(x){if(this.eat(19))return x}parseParenItem(x,m){return x}parseNewOrNewTarget(){let x=this.startNode();if(this.next(),this.match(16)){let m=this.createIdentifier(this.startNodeAtNode(x),"new");this.next();let S=this.parseMetaProperty(x,m,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,S),S}return this.parseNew(x)}parseNew(x){if(this.parseNewCallee(x),this.eat(10)){let m=this.parseExprList(11);this.toReferencedList(m),x.arguments=m}else x.arguments=[];return this.finishNode(x,"NewExpression")}parseNewCallee(x){let m=this.match(83),S=this.parseNoCallExpr();x.callee=S,m&&(S.type==="Import"||S.type==="ImportExpression")&&this.raise(v.ImportCallNotNewExpression,S)}parseTemplateElement(x){let{start:m,startLoc:S,end:k,value:O}=this.state,U=m+1,K=this.startNodeAt(i(S,1));O===null&&(x||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let re=this.match(24),le=re?-1:-2,ae=k+le;K.value={raw:this.input.slice(U,ae).replace(/\r\n?/g,` -`),cooked:O===null?null:O.slice(1,le)},K.tail=re,this.next();let Pe=this.finishNode(K,"TemplateElement");return this.resetEndLocation(Pe,i(this.state.lastTokEndLoc,le)),Pe}parseTemplate(x){let m=this.startNode();m.expressions=[];let S=this.parseTemplateElement(x);for(m.quasis=[S];!S.tail;)m.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),m.quasis.push(S=this.parseTemplateElement(x));return this.finishNode(m,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(x,m,S,k){S&&this.expectPlugin("recordAndTuple");let O=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let U=Object.create(null),K=!0,re=this.startNode();for(re.properties=[],this.next();!this.match(x);){if(K)K=!1;else if(this.expect(12),this.match(x)){this.addTrailingCommaExtraToNode(re);break}let ae;m?ae=this.parseBindingProperty():(ae=this.parsePropertyDefinition(k),this.checkProto(ae,S,U,k)),S&&!this.isObjectProperty(ae)&&ae.type!=="SpreadElement"&&this.raise(v.InvalidRecordProperty,ae),ae.shorthand&&this.addExtra(ae,"shorthand",!0),re.properties.push(ae)}this.next(),this.state.inFSharpPipelineDirectBody=O;let le="ObjectExpression";return m?le="ObjectPattern":S&&(le="RecordExpression"),this.finishNode(re,le)}addTrailingCommaExtraToNode(x){this.addExtra(x,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(x,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(x){return!x.computed&&x.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(x){let m=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)m.push(this.parseDecorator());let S=this.startNode(),k=!1,O=!1,U;if(this.match(21))return m.length&&this.unexpected(),this.parseSpread();m.length&&(S.decorators=m,m=[]),S.method=!1,x&&(U=this.state.startLoc);let K=this.eat(55);this.parsePropertyNamePrefixOperator(S);let re=this.state.containsEsc,le=this.parsePropertyName(S,x);if(!K&&!re&&this.maybeAsyncOrAccessorProp(S)){let ae=le.name;ae==="async"&&!this.hasPrecedingLineBreak()&&(k=!0,this.resetPreviousNodeTrailingComments(le),K=this.eat(55),this.parsePropertyName(S)),(ae==="get"||ae==="set")&&(O=!0,this.resetPreviousNodeTrailingComments(le),S.kind=ae,this.match(55)&&(K=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:ae}),this.next()),this.parsePropertyName(S))}return this.parseObjPropValue(S,U,K,k,!1,O,x)}getGetterSetterExpectedParamCount(x){return x.kind==="get"?0:1}getObjectOrClassMethodParams(x){return x.params}checkGetterSetterParams(x){var m;let S=this.getGetterSetterExpectedParamCount(x),k=this.getObjectOrClassMethodParams(x);k.length!==S&&this.raise(x.kind==="get"?v.BadGetterArity:v.BadSetterArity,x),x.kind==="set"&&((m=k[k.length-1])==null?void 0:m.type)==="RestElement"&&this.raise(v.BadSetterRestParameter,x)}parseObjectMethod(x,m,S,k,O){if(O){let U=this.parseMethod(x,m,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(U),U}if(S||m||this.match(10))return k&&this.unexpected(),x.kind="method",x.method=!0,this.parseMethod(x,m,S,!1,!1,"ObjectMethod")}parseObjectProperty(x,m,S,k){if(x.shorthand=!1,this.eat(14))return x.value=S?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(k),this.finishNode(x,"ObjectProperty");if(!x.computed&&x.key.type==="Identifier"){if(this.checkReservedWord(x.key.name,x.key.loc.start,!0,!1),S)x.value=this.parseMaybeDefault(m,es(x.key));else if(this.match(29)){let O=this.state.startLoc;k!=null?k.shorthandAssignLoc===null&&(k.shorthandAssignLoc=O):this.raise(v.InvalidCoverInitializedName,O),x.value=this.parseMaybeDefault(m,es(x.key))}else x.value=es(x.key);return x.shorthand=!0,this.finishNode(x,"ObjectProperty")}}parseObjPropValue(x,m,S,k,O,U,K){let re=this.parseObjectMethod(x,S,k,O,U)||this.parseObjectProperty(x,m,O,K);return re||this.unexpected(),re}parsePropertyName(x,m){if(this.eat(0))x.computed=!0,x.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:S,value:k}=this.state,O;if(ze(S))O=this.parseIdentifier(!0);else switch(S){case 134:O=this.parseNumericLiteral(k);break;case 133:O=this.parseStringLiteral(k);break;case 135:O=this.parseBigIntLiteral(k);break;case 136:O=this.parseDecimalLiteral(k);break;case 138:{let U=this.state.startLoc;m!=null?m.privateKeyLoc===null&&(m.privateKeyLoc=U):this.raise(v.UnexpectedPrivateField,U),O=this.parsePrivateName();break}default:this.unexpected()}x.key=O,S!==138&&(x.computed=!1)}return x.key}initFunction(x,m){x.id=null,x.generator=!1,x.async=m}parseMethod(x,m,S,k,O,U,K=!1){this.initFunction(x,S),x.generator=m,this.scope.enter(18|(K?64:0)|(O?32:0)),this.prodParam.enter(pl(S,x.generator)),this.parseFunctionParams(x,k);let re=this.parseFunctionBodyAndFinish(x,U,!0);return this.prodParam.exit(),this.scope.exit(),re}parseArrayLike(x,m,S,k){S&&this.expectPlugin("recordAndTuple");let O=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let U=this.startNode();return this.next(),U.elements=this.parseExprList(x,!S,k,U),this.state.inFSharpPipelineDirectBody=O,this.finishNode(U,S?"TupleExpression":"ArrayExpression")}parseArrowExpression(x,m,S,k){this.scope.enter(6);let O=pl(S,!1);!this.match(5)&&this.prodParam.hasIn&&(O|=8),this.prodParam.enter(O),this.initFunction(x,S);let U=this.state.maybeInArrowParameters;return m&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(x,m,k)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(x,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=U,this.finishNode(x,"ArrowFunctionExpression")}setArrowFunctionParameters(x,m,S){this.toAssignableList(m,S,!1),x.params=m}parseFunctionBodyAndFinish(x,m,S=!1){return this.parseFunctionBody(x,!1,S),this.finishNode(x,m)}parseFunctionBody(x,m,S=!1){let k=m&&!this.match(5);if(this.expressionScope.enter(Ru()),k)x.body=this.parseMaybeAssign(),this.checkParams(x,!1,m,!1);else{let O=this.state.strict,U=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),x.body=this.parseBlock(!0,!1,K=>{let re=!this.isSimpleParamList(x.params);K&&re&&this.raise(v.IllegalLanguageModeDirective,(x.kind==="method"||x.kind==="constructor")&&x.key?x.key.loc.end:x);let le=!O&&this.state.strict;this.checkParams(x,!this.state.strict&&!m&&!S&&!re,m,le),this.state.strict&&x.id&&this.checkIdentifier(x.id,65,le)}),this.prodParam.exit(),this.state.labels=U}this.expressionScope.exit()}isSimpleParameter(x){return x.type==="Identifier"}isSimpleParamList(x){for(let m=0,S=x.length;m10||!tt(x))){if(S&&Se(x)){this.raise(v.UnexpectedKeyword,m,{keyword:x});return}if((this.state.strict?k?ye:On:Ln)(x,this.inModule)){this.raise(v.UnexpectedReservedWord,m,{reservedWord:x});return}else if(x==="yield"){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,m);return}}else if(x==="await"){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,m);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,m);return}this.expressionScope.recordAsyncArrowParametersError(m)}else if(x==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,m);return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(x){let m=this.startNodeAt(x);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,m),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,m),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(m.argument=this.parseMaybeUnary(null,!0)),this.finishNode(m,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:x}=this.state;return x===53||x===10||x===0||Te(x)||x===102&&!this.state.containsEsc||x===137||x===56||this.hasPlugin("v8intrinsic")&&x===54}parseYield(){let x=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,x),this.next();let m=!1,S=null;if(!this.hasPrecedingLineBreak())switch(m=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!m)break;default:S=this.parseMaybeAssign()}return x.delegate=m,x.argument=S,this.finishNode(x,"YieldExpression")}parseImportCall(x){return this.next(),x.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(x.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(x.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(x,"ImportExpression")}checkPipelineAtInfixOperator(x,m){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&x.type==="SequenceExpression"&&this.raise(v.PipelineHeadSequenceExpression,m)}parseSmartPipelineBodyInStyle(x,m){if(this.isSimpleReference(x)){let S=this.startNodeAt(m);return S.callee=x,this.finishNode(S,"PipelineBareFunction")}else{let S=this.startNodeAt(m);return this.checkSmartPipeTopicBodyEarlyErrors(m),S.expression=x,this.finishNode(S,"PipelineTopicExpression")}}isSimpleReference(x){switch(x.type){case"MemberExpression":return!x.computed&&this.isSimpleReference(x.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(x){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,x)}withTopicBindingContext(x){let m=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=m}}withSmartMixTopicForbiddingContext(x){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let m=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=m}}else return x()}withSoloAwaitPermittingContext(x){let m=this.state.soloAwait;this.state.soloAwait=!0;try{return x()}finally{this.state.soloAwait=m}}allowInAnd(x){let m=this.prodParam.currentFlags();if(8&~m){this.prodParam.enter(m|8);try{return x()}finally{this.prodParam.exit()}}return x()}disallowInAnd(x){let m=this.prodParam.currentFlags();if(8&m){this.prodParam.enter(m&-9);try{return x()}finally{this.prodParam.exit()}}return x()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(x){let m=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let k=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),m,x);return this.state.inFSharpPipelineDirectBody=S,k}parseModuleExpression(){this.expectPlugin("moduleBlocks");let x=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let m=this.startNodeAt(this.state.endLoc);this.next();let S=this.initializeScopes(!0);this.enterInitialScopes();try{x.body=this.parseProgram(m,8,"module")}finally{S()}return this.finishNode(x,"ModuleExpression")}parsePropertyNamePrefixOperator(x){}},Zf={kind:1},xx={kind:2},wx=/[\uD800-\uDFFF]/u,Qf=/in(?:stanceof)?/y;function Sx(x,m){for(let S=0;S0)for(let[O,U]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,U,{localName:O});let k;return m===139?k=this.finishNode(x,"Program"):k=this.finishNodeAt(x,"Program",i(this.state.startLoc,-1)),k}stmtToDirective(x){let m=x;m.type="Directive",m.value=m.expression,delete m.expression;let S=m.value,k=S.value,O=this.input.slice(S.start,S.end),U=S.value=O.slice(1,-1);return this.addExtra(S,"raw",O),this.addExtra(S,"rawValue",U),this.addExtra(S,"expressionValue",k),S.type="DirectiveLiteral",m}parseInterpreterDirective(){if(!this.match(28))return null;let x=this.startNode();return x.value=this.state.value,this.next(),this.finishNode(x,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(x,m){if(Rt(x)){if(Qf.lastIndex=m,Qf.test(this.input)){let S=this.codePointAtPos(Qf.lastIndex);if(!sr(S)&&S!==92)return!1}return!0}else return x===92}chStartsBindingPattern(x){return x===91||x===123}hasFollowingBindingAtom(){let x=this.nextTokenStart(),m=this.codePointAtPos(x);return this.chStartsBindingPattern(m)||this.chStartsBindingIdentifier(m,x)}hasInLineFollowingBindingIdentifier(){let x=this.nextTokenInLineStart(),m=this.codePointAtPos(x);return this.chStartsBindingIdentifier(m,x)}startsUsingForOf(){let{type:x,containsEsc:m}=this.lookahead();if(x===102&&!m)return!1;if(me(x)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let x=this.nextTokenInLineStart();if(this.isUnparsedContextual(x,"using")){x=this.nextTokenInLineStartSince(x+5);let m=this.codePointAtPos(x);if(this.chStartsBindingIdentifier(m,x))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(x=!1){let m=0;return this.options.annexB&&!this.state.strict&&(m|=4,x&&(m|=8)),this.parseStatementLike(m)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(x){let m=null;return this.match(26)&&(m=this.parseDecorators(!0)),this.parseStatementContent(x,m)}parseStatementContent(x,m){let S=this.state.type,k=this.startNode(),O=!!(x&2),U=!!(x&4),K=x&1;switch(S){case 60:return this.parseBreakContinueStatement(k,!0);case 63:return this.parseBreakContinueStatement(k,!1);case 64:return this.parseDebuggerStatement(k);case 90:return this.parseDoWhileStatement(k);case 91:return this.parseForStatement(k);case 68:if(this.lookaheadCharCode()===46)break;return U||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(k,!1,!O&&U);case 80:return O||this.unexpected(),this.parseClass(this.maybeTakeDecorators(m,k),!0);case 69:return this.parseIfStatement(k);case 70:return this.parseReturnStatement(k);case 71:return this.parseSwitchStatement(k);case 72:return this.parseThrowStatement(k);case 73:return this.parseTryStatement(k);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?O||this.raise(v.UnexpectedLexicalDeclaration,k):this.raise(v.AwaitUsingNotInAsyncContext,k),this.next(),this.parseVarStatement(k,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc):O||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(k,"using");case 100:{if(this.state.containsEsc)break;let ae=this.nextTokenStart(),Pe=this.codePointAtPos(ae);if(Pe!==91&&(!O&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(Pe,ae)&&Pe!==123))break}case 75:O||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let ae=this.state.value;return this.parseVarStatement(k,ae)}case 92:return this.parseWhileStatement(k);case 76:return this.parseWithStatement(k);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(k);case 83:{let ae=this.lookaheadCharCode();if(ae===40||ae===46)break}case 82:{!this.options.allowImportExportEverywhere&&!K&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let ae;return S===83?(ae=this.parseImport(k),ae.type==="ImportDeclaration"&&(!ae.importKind||ae.importKind==="value")&&(this.sawUnambiguousESM=!0)):(ae=this.parseExport(k,m),(ae.type==="ExportNamedDeclaration"&&(!ae.exportKind||ae.exportKind==="value")||ae.type==="ExportAllDeclaration"&&(!ae.exportKind||ae.exportKind==="value")||ae.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(ae),ae}default:if(this.isAsyncFunction())return O||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(k,!0,!O&&U)}let re=this.state.value,le=this.parseExpression();return me(S)&&le.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(k,re,le,x):this.parseExpressionStatement(k,le,m)}assertModuleNodeAllowed(x){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,x)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(x,m,S){return x&&(m.decorators&&m.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(v.DecoratorsBeforeAfterExport,m.decorators[0]),m.decorators.unshift(...x)):m.decorators=x,this.resetStartLocationFromNode(m,x[0]),S&&this.resetStartLocationFromNode(S,m)),m}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(x){let m=[];do m.push(this.parseDecorator());while(this.match(26));if(this.match(82))x||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return m}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let x=this.startNode();if(this.next(),this.hasPlugin("decorators")){let m=this.state.startLoc,S;if(this.match(10)){let k=this.state.startLoc;this.next(),S=this.parseExpression(),this.expect(11),S=this.wrapParenthesis(k,S);let O=this.state.startLoc;x.expression=this.parseMaybeDecoratorArguments(S),this.getPluginOption("decorators","allowCallParenthesized")===!1&&x.expression!==S&&this.raise(v.DecoratorArgumentsOutsideParentheses,O)}else{for(S=this.parseIdentifier(!1);this.eat(16);){let k=this.startNodeAt(m);k.object=S,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),k.property=this.parsePrivateName()):k.property=this.parseIdentifier(!0),k.computed=!1,S=this.finishNode(k,"MemberExpression")}x.expression=this.parseMaybeDecoratorArguments(S)}}else x.expression=this.parseExprSubscripts();return this.finishNode(x,"Decorator")}parseMaybeDecoratorArguments(x){if(this.eat(10)){let m=this.startNodeAtNode(x);return m.callee=x,m.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(m.arguments),this.finishNode(m,"CallExpression")}return x}parseBreakContinueStatement(x,m){return this.next(),this.isLineTerminator()?x.label=null:(x.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(x,m),this.finishNode(x,m?"BreakStatement":"ContinueStatement")}verifyBreakContinue(x,m){let S;for(S=0;Sthis.parseStatement()),this.state.labels.pop(),this.expect(92),x.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(x,"DoWhileStatement")}parseForStatement(x){this.next(),this.state.labels.push(Zf);let m=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(m=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return m!==null&&this.unexpected(m),this.parseFor(x,null);let S=this.isContextual(100);{let re=this.isContextual(96)&&this.startsAwaitUsing(),le=re||this.isContextual(107)&&this.startsUsingForOf(),ae=S&&this.hasFollowingBindingAtom()||le;if(this.match(74)||this.match(75)||ae){let Pe=this.startNode(),Ve;re?(Ve="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):Ve=this.state.value,this.next(),this.parseVar(Pe,!0,Ve);let at=this.finishNode(Pe,"VariableDeclaration"),nt=this.match(58);return nt&&le&&this.raise(v.ForInUsing,at),(nt||this.isContextual(102))&&at.declarations.length===1?this.parseForIn(x,at,m):(m!==null&&this.unexpected(m),this.parseFor(x,at))}}let k=this.isContextual(95),O=new wa,U=this.parseExpression(!0,O),K=this.isContextual(102);if(K&&(S&&this.raise(v.ForOfLet,U),m===null&&k&&U.type==="Identifier"&&this.raise(v.ForOfAsync,U)),K||this.match(58)){this.checkDestructuringPrivate(O),this.toAssignable(U,!0);let re=K?"ForOfStatement":"ForInStatement";return this.checkLVal(U,{in:{type:re}}),this.parseForIn(x,U,m)}else this.checkExpressionErrors(O,!0);return m!==null&&this.unexpected(m),this.parseFor(x,U)}parseFunctionStatement(x,m,S){return this.next(),this.parseFunction(x,1|(S?2:0)|(m?8:0))}parseIfStatement(x){return this.next(),x.test=this.parseHeaderExpression(),x.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),x.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(x,"IfStatement")}parseReturnStatement(x){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?x.argument=null:(x.argument=this.parseExpression(),this.semicolon()),this.finishNode(x,"ReturnStatement")}parseSwitchStatement(x){this.next(),x.discriminant=this.parseHeaderExpression();let m=x.cases=[];this.expect(5),this.state.labels.push(xx),this.scope.enter(0);let S;for(let k;!this.match(8);)if(this.match(61)||this.match(65)){let O=this.match(61);S&&this.finishNode(S,"SwitchCase"),m.push(S=this.startNode()),S.consequent=[],this.next(),O?S.test=this.parseExpression():(k&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),k=!0,S.test=null),this.expect(14)}else S?S.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),S&&this.finishNode(S,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(x,"SwitchStatement")}parseThrowStatement(x){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),x.argument=this.parseExpression(),this.semicolon(),this.finishNode(x,"ThrowStatement")}parseCatchClauseParam(){let x=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&x.type==="Identifier"?8:0),this.checkLVal(x,{in:{type:"CatchClause"},binding:9}),x}parseTryStatement(x){if(this.next(),x.block=this.parseBlock(),x.handler=null,this.match(62)){let m=this.startNode();this.next(),this.match(10)?(this.expect(10),m.param=this.parseCatchClauseParam(),this.expect(11)):(m.param=null,this.scope.enter(0)),m.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),x.handler=this.finishNode(m,"CatchClause")}return x.finalizer=this.eat(67)?this.parseBlock():null,!x.handler&&!x.finalizer&&this.raise(v.NoCatchOrFinally,x),this.finishNode(x,"TryStatement")}parseVarStatement(x,m,S=!1){return this.next(),this.parseVar(x,!1,m,S),this.semicolon(),this.finishNode(x,"VariableDeclaration")}parseWhileStatement(x){return this.next(),x.test=this.parseHeaderExpression(),this.state.labels.push(Zf),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(x,"WhileStatement")}parseWithStatement(x){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),x.object=this.parseHeaderExpression(),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(x,"WithStatement")}parseEmptyStatement(x){return this.next(),this.finishNode(x,"EmptyStatement")}parseLabeledStatement(x,m,S,k){for(let U of this.state.labels)U.name===m&&this.raise(v.LabelRedeclaration,S,{labelName:m});let O=De(this.state.type)?1:this.match(71)?2:null;for(let U=this.state.labels.length-1;U>=0;U--){let K=this.state.labels[U];if(K.statementStart===x.start)K.statementStart=this.state.start,K.kind=O;else break}return this.state.labels.push({name:m,kind:O,statementStart:this.state.start}),x.body=k&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),x.label=S,this.finishNode(x,"LabeledStatement")}parseExpressionStatement(x,m,S){return x.expression=m,this.semicolon(),this.finishNode(x,"ExpressionStatement")}parseBlock(x=!1,m=!0,S){let k=this.startNode();return x&&this.state.strictErrors.clear(),this.expect(5),m&&this.scope.enter(0),this.parseBlockBody(k,x,!1,8,S),m&&this.scope.exit(),this.finishNode(k,"BlockStatement")}isValidDirective(x){return x.type==="ExpressionStatement"&&x.expression.type==="StringLiteral"&&!x.expression.extra.parenthesized}parseBlockBody(x,m,S,k,O){let U=x.body=[],K=x.directives=[];this.parseBlockOrModuleBlockBody(U,m?K:void 0,S,k,O)}parseBlockOrModuleBlockBody(x,m,S,k,O){let U=this.state.strict,K=!1,re=!1;for(;!this.match(k);){let le=S?this.parseModuleItem():this.parseStatementListItem();if(m&&!re){if(this.isValidDirective(le)){let ae=this.stmtToDirective(le);m.push(ae),!K&&ae.value.value==="use strict"&&(K=!0,this.setStrict(!0));continue}re=!0,this.state.strictErrors.clear()}x.push(le)}O==null||O.call(this,K),U||this.setStrict(!1),this.next()}parseFor(x,m){return x.init=m,this.semicolon(!1),x.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),x.update=this.match(11)?null:this.parseExpression(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,"ForStatement")}parseForIn(x,m,S){let k=this.match(58);return this.next(),k?S!==null&&this.unexpected(S):x.await=S!==null,m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!k||!this.options.annexB||this.state.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(v.ForInOfLoopInitializer,m,{type:k?"ForInStatement":"ForOfStatement"}),m.type==="AssignmentPattern"&&this.raise(v.InvalidLhs,m,{ancestor:{type:"ForStatement"}}),x.left=m,x.right=k?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,k?"ForInStatement":"ForOfStatement")}parseVar(x,m,S,k=!1){let O=x.declarations=[];for(x.kind=S;;){let U=this.startNode();if(this.parseVarId(U,S),U.init=this.eat(29)?m?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,U.init===null&&!k&&(U.id.type!=="Identifier"&&!(m&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):S==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),O.push(this.finishNode(U,"VariableDeclarator")),!this.eat(12))break}return x}parseVarId(x,m){let S=this.parseBindingAtom();this.checkLVal(S,{in:{type:"VariableDeclarator"},binding:m==="var"?5:8201}),x.id=S}parseAsyncFunctionExpression(x){return this.parseFunction(x,8)}parseFunction(x,m=0){let S=m&2,k=!!(m&1),O=k&&!(m&4),U=!!(m&8);this.initFunction(x,U),this.match(55)&&(S&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),x.generator=!0),k&&(x.id=this.parseFunctionId(O));let K=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(pl(U,x.generator)),k||(x.id=this.parseFunctionId()),this.parseFunctionParams(x,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(x,k?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),k&&!S&&this.registerFunctionStatementId(x),this.state.maybeInArrowParameters=K,x}parseFunctionId(x){return x||me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(x,m){this.expect(10),this.expressionScope.enter(xh()),x.params=this.parseBindingList(11,41,2|(m?4:0)),this.expressionScope.exit()}registerFunctionStatementId(x){x.id&&this.scope.declareName(x.id.name,!this.options.annexB||this.state.strict||x.generator||x.async?this.scope.treatFunctionsAsVar?5:8201:17,x.id.loc.start)}parseClass(x,m,S){this.next();let k=this.state.strict;return this.state.strict=!0,this.parseClassId(x,m,S),this.parseClassSuper(x),x.body=this.parseClassBody(!!x.superClass,k),this.finishNode(x,m?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(x){return!x.computed&&!x.static&&(x.key.name==="constructor"||x.key.value==="constructor")}parseClassBody(x,m){this.classScope.enter();let S={hadConstructor:!1,hadSuperClass:x},k=[],O=this.startNode();if(O.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(k.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){k.push(this.parseDecorator());continue}let U=this.startNode();k.length&&(U.decorators=k,this.resetStartLocationFromNode(U,k[0]),k=[]),this.parseClassMember(O,U,S),U.kind==="constructor"&&U.decorators&&U.decorators.length>0&&this.raise(v.DecoratorConstructor,U)}}),this.state.strict=m,this.next(),k.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(O,"ClassBody")}parseClassMemberFromModifier(x,m){let S=this.parseIdentifier(!0);if(this.isClassMethod()){let k=m;return k.kind="method",k.computed=!1,k.key=S,k.static=!1,this.pushClassMethod(x,k,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let k=m;return k.computed=!1,k.key=S,k.static=!1,x.body.push(this.parseClassProperty(k)),!0}return this.resetPreviousNodeTrailingComments(S),!1}parseClassMember(x,m,S){let k=this.isContextual(106);if(k){if(this.parseClassMemberFromModifier(x,m))return;if(this.eat(5)){this.parseClassStaticBlock(x,m);return}}this.parseClassMemberWithIsStatic(x,m,S,k)}parseClassMemberWithIsStatic(x,m,S,k){let O=m,U=m,K=m,re=m,le=m,ae=O,Pe=O;if(m.static=k,this.parsePropertyNamePrefixOperator(m),this.eat(55)){ae.kind="method";let gr=this.match(138);if(this.parseClassElementName(ae),gr){this.pushClassPrivateMethod(x,U,!0,!1);return}this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsGenerator,O.key),this.pushClassMethod(x,O,!0,!1,!1,!1);return}let Ve=me(this.state.type)&&!this.state.containsEsc,at=this.match(138),nt=this.parseClassElementName(m),xr=this.state.startLoc;if(this.parsePostMemberNameModifiers(Pe),this.isClassMethod()){if(ae.kind="method",at){this.pushClassPrivateMethod(x,U,!1,!1);return}let gr=this.isNonstaticConstructor(O),wn=!1;gr&&(O.kind="constructor",S.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,nt),gr&&this.hasPlugin("typescript")&&m.override&&this.raise(v.OverrideOnConstructor,nt),S.hadConstructor=!0,wn=S.hadSuperClass),this.pushClassMethod(x,O,!1,!1,gr,wn)}else if(this.isClassProperty())at?this.pushClassPrivateProperty(x,re):this.pushClassProperty(x,K);else if(Ve&&nt.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(nt);let gr=this.eat(55);Pe.optional&&this.unexpected(xr),ae.kind="method";let wn=this.match(138);this.parseClassElementName(ae),this.parsePostMemberNameModifiers(Pe),wn?this.pushClassPrivateMethod(x,U,gr,!0):(this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsAsync,O.key),this.pushClassMethod(x,O,gr,!0,!1,!1))}else if(Ve&&(nt.name==="get"||nt.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(nt),ae.kind=nt.name;let gr=this.match(138);this.parseClassElementName(O),gr?this.pushClassPrivateMethod(x,U,!1,!1):(this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsAccessor,O.key),this.pushClassMethod(x,O,!1,!1,!1,!1)),this.checkGetterSetterParams(O)}else if(Ve&&nt.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(nt);let gr=this.match(138);this.parseClassElementName(K),this.pushClassAccessorProperty(x,le,gr)}else this.isLineTerminator()?at?this.pushClassPrivateProperty(x,re):this.pushClassProperty(x,K):this.unexpected()}parseClassElementName(x){let{type:m,value:S}=this.state;if((m===132||m===133)&&x.static&&S==="prototype"&&this.raise(v.StaticPrototype,this.state.startLoc),m===138){S==="constructor"&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let k=this.parsePrivateName();return x.key=k,k}return this.parsePropertyName(x)}parseClassStaticBlock(x,m){var S;this.scope.enter(208);let k=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let O=m.body=[];this.parseBlockOrModuleBlockBody(O,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=k,x.body.push(this.finishNode(m,"StaticBlock")),(S=m.decorators)!=null&&S.length&&this.raise(v.DecoratorStaticBlock,m)}pushClassProperty(x,m){!m.computed&&(m.key.name==="constructor"||m.key.value==="constructor")&&this.raise(v.ConstructorClassField,m.key),x.body.push(this.parseClassProperty(m))}pushClassPrivateProperty(x,m){let S=this.parseClassPrivateProperty(m);x.body.push(S),this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.loc.start)}pushClassAccessorProperty(x,m,S){if(!S&&!m.computed){let O=m.key;(O.name==="constructor"||O.value==="constructor")&&this.raise(v.ConstructorClassField,O)}let k=this.parseClassAccessorProperty(m);x.body.push(k),S&&this.classScope.declarePrivateName(this.getPrivateNameSV(k.key),0,k.key.loc.start)}pushClassMethod(x,m,S,k,O,U){x.body.push(this.parseMethod(m,S,k,O,U,"ClassMethod",!0))}pushClassPrivateMethod(x,m,S,k){let O=this.parseMethod(m,S,k,!1,!1,"ClassPrivateMethod",!0);x.body.push(O);let U=O.kind==="get"?O.static?6:2:O.kind==="set"?O.static?5:1:0;this.declareClassPrivateMethodInScope(O,U)}declareClassPrivateMethodInScope(x,m){this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),m,x.key.loc.start)}parsePostMemberNameModifiers(x){}parseClassPrivateProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassPrivateProperty")}parseClassProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassProperty")}parseClassAccessorProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassAccessorProperty")}parseInitializer(x){this.scope.enter(80),this.expressionScope.enter(Ru()),this.prodParam.enter(0),x.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(x,m,S,k=8331){if(me(this.state.type))x.id=this.parseIdentifier(),m&&this.declareNameFromIdentifier(x.id,k);else if(S||!m)x.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(x){x.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(x,m){let S=this.parseMaybeImportPhase(x,!0),k=this.maybeParseExportDefaultSpecifier(x,S),O=!k||this.eat(12),U=O&&this.eatExportStar(x),K=U&&this.maybeParseExportNamespaceSpecifier(x),re=O&&(!K||this.eat(12)),le=k||U;if(U&&!K){if(k&&this.unexpected(),m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.parseExportFrom(x,!0),this.finishNode(x,"ExportAllDeclaration")}let ae=this.maybeParseExportNamedSpecifiers(x);k&&O&&!U&&!ae&&this.unexpected(null,5),K&&re&&this.unexpected(null,98);let Pe;if(le||ae){if(Pe=!1,m)throw this.raise(v.UnsupportedDecoratorExport,x);this.parseExportFrom(x,le)}else Pe=this.maybeParseExportDeclaration(x);if(le||ae||Pe){var Ve;let at=x;if(this.checkExport(at,!0,!1,!!at.source),((Ve=at.declaration)==null?void 0:Ve.type)==="ClassDeclaration")this.maybeTakeDecorators(m,at.declaration,at);else if(m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.finishNode(at,"ExportNamedDeclaration")}if(this.eat(65)){let at=x,nt=this.parseExportDefaultExpression();if(at.declaration=nt,nt.type==="ClassDeclaration")this.maybeTakeDecorators(m,nt,at);else if(m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.checkExport(at,!0,!0),this.finishNode(at,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(x){return this.eat(55)}maybeParseExportDefaultSpecifier(x,m){if(m||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",m==null?void 0:m.loc.start);let S=m||this.parseIdentifier(!0),k=this.startNodeAtNode(S);return k.exported=S,x.specifiers=[this.finishNode(k,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(x){if(this.isContextual(93)){x.specifiers||(x.specifiers=[]);let m=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),m.exported=this.parseModuleExportName(),x.specifiers.push(this.finishNode(m,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(x){if(this.match(5)){x.specifiers||(x.specifiers=[]);let m=x.exportKind==="type";return x.specifiers.push(...this.parseExportSpecifiers(m)),x.source=null,x.declaration=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),!0}return!1}maybeParseExportDeclaration(x){return this.shouldParseExportDeclaration()?(x.specifiers=[],x.source=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),x.declaration=this.parseExportDeclaration(x),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let x=this.nextTokenInLineStart();return this.isUnparsedContextual(x,"function")}parseExportDefaultExpression(){let x=this.startNode();if(this.match(68))return this.next(),this.parseFunction(x,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(x,13);if(this.match(80))return this.parseClass(x,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let m=this.parseMaybeAssignAllowIn();return this.semicolon(),m}parseExportDeclaration(x){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:x}=this.state;if(me(x)){if(x===95&&!this.state.containsEsc||x===100)return!1;if((x===130||x===129)&&!this.state.containsEsc){let{type:k}=this.lookahead();if(me(k)&&k!==98||k===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let m=this.nextTokenStart(),S=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||me(this.state.type)&&S)return!0;if(this.match(65)&&S){let k=this.input.charCodeAt(this.nextTokenStartSince(m+4));return k===34||k===39}return!1}parseExportFrom(x,m){this.eatContextual(98)?(x.source=this.parseImportSource(),this.checkExport(x),this.maybeParseImportAttributes(x),this.checkJSONModuleImport(x)):m&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:x}=this.state;return x===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):x===74||x===75||x===68||x===80||this.isLet()||this.isAsyncFunction()}checkExport(x,m,S,k){if(m){var O;if(S){if(this.checkDuplicateExports(x,"default"),this.hasPlugin("exportDefaultFrom")){var U;let K=x.declaration;K.type==="Identifier"&&K.name==="from"&&K.end-K.start===4&&!((U=K.extra)!=null&&U.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,K)}}else if((O=x.specifiers)!=null&&O.length)for(let K of x.specifiers){let{exported:re}=K,le=re.type==="Identifier"?re.name:re.value;if(this.checkDuplicateExports(K,le),!k&&K.local){let{local:ae}=K;ae.type!=="Identifier"?this.raise(v.ExportBindingIsString,K,{localName:ae.value,exportName:le}):(this.checkReservedWord(ae.name,ae.loc.start,!0,!1),this.scope.checkLocalExport(ae))}}else if(x.declaration){if(x.declaration.type==="FunctionDeclaration"||x.declaration.type==="ClassDeclaration"){let K=x.declaration.id;if(!K)throw new Error("Assertion failure");this.checkDuplicateExports(x,K.name)}else if(x.declaration.type==="VariableDeclaration")for(let K of x.declaration.declarations)this.checkDeclaration(K.id)}}}checkDeclaration(x){if(x.type==="Identifier")this.checkDuplicateExports(x,x.name);else if(x.type==="ObjectPattern")for(let m of x.properties)this.checkDeclaration(m);else if(x.type==="ArrayPattern")for(let m of x.elements)m&&this.checkDeclaration(m);else x.type==="ObjectProperty"?this.checkDeclaration(x.value):x.type==="RestElement"?this.checkDeclaration(x.argument):x.type==="AssignmentPattern"&&this.checkDeclaration(x.left)}checkDuplicateExports(x,m){this.exportedIdentifiers.has(m)&&(m==="default"?this.raise(v.DuplicateDefaultExport,x):this.raise(v.DuplicateExport,x,{exportName:m})),this.exportedIdentifiers.add(m)}parseExportSpecifiers(x){let m=[],S=!0;for(this.expect(5);!this.eat(8);){if(S)S=!1;else if(this.expect(12),this.eat(8))break;let k=this.isContextual(130),O=this.match(133),U=this.startNode();U.local=this.parseModuleExportName(),m.push(this.parseExportSpecifier(U,O,x,k))}return m}parseExportSpecifier(x,m,S,k){return this.eatContextual(93)?x.exported=this.parseModuleExportName():m?x.exported=ml(x.local):x.exported||(x.exported=es(x.local)),this.finishNode(x,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let x=this.parseStringLiteral(this.state.value),m=x.value.match(wx);return m&&this.raise(v.ModuleExportNameHasLoneSurrogate,x,{surrogateCharCode:m[0].charCodeAt(0)}),x}return this.parseIdentifier(!0)}isJSONModuleImport(x){return x.assertions!=null?x.assertions.some(({key:m,value:S})=>S.value==="json"&&(m.type==="Identifier"?m.name==="type":m.value==="type")):!1}checkImportReflection(x){let{specifiers:m}=x,S=m.length===1?m[0].type:null;if(x.phase==="source")S!=="ImportDefaultSpecifier"&&this.raise(v.SourcePhaseImportRequiresDefault,m[0].loc.start);else if(x.phase==="defer")S!=="ImportNamespaceSpecifier"&&this.raise(v.DeferImportRequiresNamespace,m[0].loc.start);else if(x.module){var k;S!=="ImportDefaultSpecifier"&&this.raise(v.ImportReflectionNotBinding,m[0].loc.start),((k=x.assertions)==null?void 0:k.length)>0&&this.raise(v.ImportReflectionHasAssertion,m[0].loc.start)}}checkJSONModuleImport(x){if(this.isJSONModuleImport(x)&&x.type!=="ExportAllDeclaration"){let{specifiers:m}=x;if(m!=null){let S=m.find(k=>{let O;if(k.type==="ExportSpecifier"?O=k.local:k.type==="ImportSpecifier"&&(O=k.imported),O!==void 0)return O.type==="Identifier"?O.name!=="default":O.value!=="default"});S!==void 0&&this.raise(v.ImportJSONBindingNotDefault,S.loc.start)}}}isPotentialImportPhase(x){return x?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(x,m,S,k){m||(S==="module"?(this.expectPlugin("importReflection",k),x.module=!0):this.hasPlugin("importReflection")&&(x.module=!1),S==="source"?(this.expectPlugin("sourcePhaseImports",k),x.phase="source"):S==="defer"?(this.expectPlugin("deferredImportEvaluation",k),x.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(x.phase=null))}parseMaybeImportPhase(x,m){if(!this.isPotentialImportPhase(m))return this.applyImportPhase(x,m,null),null;let S=this.parseIdentifier(!0),{type:k}=this.state;return(ze(k)?k!==98||this.lookaheadCharCode()===102:k!==12)?(this.resetPreviousIdentifierLeadingComments(S),this.applyImportPhase(x,m,S.name,S.loc.start),null):(this.applyImportPhase(x,m,null),S)}isPrecedingIdImportPhase(x){let{type:m}=this.state;return me(m)?m!==98||this.lookaheadCharCode()===102:m!==12}parseImport(x){return this.match(133)?this.parseImportSourceAndAttributes(x):this.parseImportSpecifiersAndAfter(x,this.parseMaybeImportPhase(x,!1))}parseImportSpecifiersAndAfter(x,m){x.specifiers=[];let S=!this.maybeParseDefaultImportSpecifier(x,m)||this.eat(12),k=S&&this.maybeParseStarImportSpecifier(x);return S&&!k&&this.parseNamedImportSpecifiers(x),this.expectContextual(98),this.parseImportSourceAndAttributes(x)}parseImportSourceAndAttributes(x){return x.specifiers!=null||(x.specifiers=[]),x.source=this.parseImportSource(),this.maybeParseImportAttributes(x),this.checkImportReflection(x),this.checkJSONModuleImport(x),this.semicolon(),this.finishNode(x,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(x,m,S){m.local=this.parseIdentifier(),x.specifiers.push(this.finishImportSpecifier(m,S))}finishImportSpecifier(x,m,S=8201){return this.checkLVal(x.local,{in:{type:m},binding:S}),this.finishNode(x,m)}parseImportAttributes(){this.expect(5);let x=[],m=new Set;do{if(this.match(8))break;let S=this.startNode(),k=this.state.value;if(m.has(k)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:k}),m.add(k),this.match(133)?S.key=this.parseStringLiteral(k):S.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return this.expect(8),x}parseModuleAttributes(){let x=[],m=new Set;do{let S=this.startNode();if(S.key=this.parseIdentifier(!0),S.key.name!=="type"&&this.raise(v.ModuleAttributeDifferentFromType,S.key),m.has(S.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,S.key,{key:S.key.name}),m.add(S.key.name),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return x}maybeParseImportAttributes(x){let m,S=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?m=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),m=this.parseImportAttributes()),S=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(x,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),m=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))m=[];else if(this.hasPlugin("moduleAttributes"))m=[];else return;!S&&this.hasPlugin("importAssertions")?x.assertions=m:x.attributes=m}maybeParseDefaultImportSpecifier(x,m){if(m){let S=this.startNodeAtNode(m);return S.local=m,x.specifiers.push(this.finishImportSpecifier(S,"ImportDefaultSpecifier")),!0}else if(ze(this.state.type))return this.parseImportSpecifierLocal(x,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(x){if(this.match(55)){let m=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(x,m,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(x){let m=!0;for(this.expect(5);!this.eat(8);){if(m)m=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let S=this.startNode(),k=this.match(133),O=this.isContextual(130);S.imported=this.parseModuleExportName();let U=this.parseImportSpecifier(S,k,x.importKind==="type"||x.importKind==="typeof",O,void 0);x.specifiers.push(U)}}parseImportSpecifier(x,m,S,k,O){if(this.eatContextual(93))x.local=this.parseIdentifier();else{let{imported:U}=x;if(m)throw this.raise(v.ImportBindingIsString,x,{importName:U.value});this.checkReservedWord(U.name,x.loc.start,!0,!0),x.local||(x.local=es(U))}return this.finishImportSpecifier(x,"ImportSpecifier",O)}isThisParam(x){return x.type==="Identifier"&&x.name==="this"}},Qg=class extends Zg{constructor(x,m){x=bl(x),super(x,m),this.options=x,this.initializeScopes(),this.plugins=Dx(this.options.plugins),this.filename=x.sourceFilename}getScopeHandler(){return vt}parse(){this.enterInitialScopes();let x=this.startNode(),m=this.startNode();return this.nextToken(),x.errors=null,this.parseTopLevel(x,m),x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function Dx(x){let m=new Map;for(let S of x){let[k,O]=Array.isArray(S)?S:[S,{}];m.has(k)||m.set(k,O||{})}return m}function Ex(x,m){var S;if(((S=m)==null?void 0:S.sourceType)==="unambiguous"){m=Object.assign({},m);try{m.sourceType="module";let k=zu(m,x),O=k.parse();if(k.sawUnambiguousESM)return O;if(k.ambiguousScriptDifferentAst)try{return m.sourceType="script",zu(m,x).parse()}catch{}else O.program.sourceType="script";return O}catch(k){try{return m.sourceType="script",zu(m,x).parse()}catch{}throw k}}else return zu(m,x).parse()}function Cx(x,m){let S=zu(m,x);return S.options.strictMode&&(S.state.strict=!0),S.getExpression()}function ey(x){let m={};for(let S of Object.keys(x))m[S]=Oe(x[S]);return m}var Tx=ey(ke);function zu(x,m){let S=Qg;return x!=null&&x.plugins&&(ws(x.plugins),S=Ax(x.plugins)),new S(x,m)}var ty={};function Ax(x){let m=ho.filter(O=>tr(x,O)),S=m.join("/"),k=ty[S];if(!k){k=Qg;for(let O of m)k=ts[O](k);ty[S]=k}return k}e.parse=Ex,e.parseExpression=Cx,e.tokTypes=Tx}),Bhe=iz(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=u,e.parse=d,e.parseWithComments=f,e.print=p,e.strip=h;var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,o=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,a=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,l=/(\r?\n|^) *\* ?/g,c=[];function u(y){let b=y.match(n);return b?b[0].trimLeft():""}function h(y){let b=y.match(n);return b&&b[0]?y.substring(b[0].length):y}function d(y){return f(y).pragmas}function f(y){let b=` -`;y=y.replace(r,"").replace(t,"").replace(l,"$1");let v="";for(;v!==y;)v=y,y=y.replace(o,`${b}$1 $2${b}`);y=y.replace(s,"").trimRight();let E=Object.create(null),D=y.replace(a,"").replace(s,"").trimRight(),C;for(;C=a.exec(y);){let w=C[2].replace(i,"");typeof E[C[1]]=="string"||Array.isArray(E[C[1]])?E[C[1]]=c.concat(E[C[1]],w):E[C[1]]=w}return{comments:D,pragmas:E}}function p({comments:y="",pragmas:b={}}){let v=` -`,E="/**",D=" *",C=" */",w=Object.keys(b),T=w.flatMap($=>g($,b[$])).map($=>`${D} ${$}${v}`).join("");if(!y){if(w.length===0)return"";if(w.length===1&&!Array.isArray(b[w[0]])){let $=b[w[0]];return`${E} ${g(w[0],$)[0]}${C}`}}let A=y.split(v).map($=>`${D} ${$}`).join(v)+v;return E+v+(y?A:"")+(y&&w.length?D+v:"")+T+C}function g(y,b){return c.concat(b).map(v=>`@${y} ${v}`.trim())}}),az={};Ohe(az,{parsers:()=>Lde});var rM=c_(sz(),1);function lz(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);let O=this.input.charCodeAt(this.state.pos);if(O===m)break;O===38?(S+=this.input.slice(k,this.state.pos),S+=this.jsxReadEntity(),k=this.state.pos):$n(O)?(S+=this.input.slice(k,this.state.pos),S+=this.jsxReadNewLine(!1),k=this.state.pos):++this.state.pos}S+=this.input.slice(k,this.state.pos++),this.finishToken(133,S)}jsxReadEntity(){let m=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let S=10;this.codePointAtPos(this.state.pos)===120&&(S=16,++this.state.pos);let k=this.readInt(S,void 0,!1,"bail");if(k!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(k)}else{let S=0,k=!1;for(;S++<10&&this.state.pos1){for(let k=0;k0){if(S&256){let O=!!(S&512),U=(k&4)>0;return O!==U}return!0}return S&128&&(k&8)>0?x.names.get(m)&2?!!(S&1):!1:S&2&&(k&1)>0?!0:super.isRedeclaredInScope(x,m,S)}checkLocalExport(x){let{name:m}=x;if(this.hasImport(m))return;let S=this.scopeStack.length;for(let k=S-1;k>=0;k--){let O=this.scopeStack[k].tsNames.get(m);if((O&1)>0||(O&16)>0)return}super.checkLocalExport(x)}},Xf=(x,m)=>Object.hasOwnProperty.call(x,m)&&x[m],Da=x=>x.type==="ParenthesizedExpression"?Da(x.expression):x,vl=class extends Uo{toAssignable(x,m=!1){var S,k;let O;switch((x.type==="ParenthesizedExpression"||(S=x.extra)!=null&&S.parenthesized)&&(O=Da(x),m?O.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,x):O.type!=="MemberExpression"&&!this.isOptionalMemberExpression(O)&&this.raise(v.InvalidParenthesizedAssignment,x):this.raise(v.InvalidParenthesizedAssignment,x)),x.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":x.type="ObjectPattern";for(let K=0,re=x.properties.length,le=re-1;Kk.type!=="ObjectMethod"&&(O===S||k.type!=="SpreadElement")&&this.isAssignable(k))}case"ObjectProperty":return this.isAssignable(x.value);case"SpreadElement":return this.isAssignable(x.argument);case"ArrayExpression":return x.elements.every(S=>S===null||this.isAssignable(S));case"AssignmentExpression":return x.operator==="=";case"ParenthesizedExpression":return this.isAssignable(x.expression);case"MemberExpression":case"OptionalMemberExpression":return!m;default:return!1}}toReferencedList(x,m){return x}toReferencedListDeep(x,m){this.toReferencedList(x,m);for(let S of x)(S==null?void 0:S.type)==="ArrayExpression"&&this.toReferencedListDeep(S.elements)}parseSpread(x){let m=this.startNode();return this.next(),m.argument=this.parseMaybeAssignAllowIn(x,void 0),this.finishNode(m,"SpreadElement")}parseRestBinding(){let x=this.startNode();return this.next(),x.argument=this.parseBindingAtom(),this.finishNode(x,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let x=this.startNode();return this.next(),x.elements=this.parseBindingList(3,93,1),this.finishNode(x,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(x,m,S){let k=S&1,O=[],U=!0;for(;!this.eat(x);)if(U?U=!1:this.expect(12),k&&this.match(12))O.push(null);else{if(this.eat(x))break;if(this.match(21)){if(O.push(this.parseAssignableListItemTypes(this.parseRestBinding(),S)),!this.checkCommaAfterRest(m)){this.expect(x);break}}else{let K=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)K.push(this.parseDecorator());O.push(this.parseAssignableListItem(S,K))}}return O}parseBindingRestProperty(x){return this.next(),x.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(x,"RestElement")}parseBindingProperty(){let x=this.startNode(),{type:m,startLoc:S}=this.state;return m===21?this.parseBindingRestProperty(x):(m===138?(this.expectPlugin("destructuringPrivate",S),this.classScope.usePrivateName(this.state.value,S),x.key=this.parsePrivateName()):this.parsePropertyName(x),x.method=!1,this.parseObjPropValue(x,S,!1,!1,!0,!1))}parseAssignableListItem(x,m){let S=this.parseMaybeDefault();this.parseAssignableListItemTypes(S,x);let k=this.parseMaybeDefault(S.loc.start,S);return m.length&&(S.decorators=m),k}parseAssignableListItemTypes(x,m){return x}parseMaybeDefault(x,m){var S;if(x!=null||(x=this.state.startLoc),m=(S=m)!=null?S:this.parseBindingAtom(),!this.eat(29))return m;let k=this.startNodeAt(x);return k.left=m,k.right=this.parseMaybeAssignAllowIn(),this.finishNode(k,"AssignmentPattern")}isValidLVal(x,m,S){return Xf({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},x)}isOptionalMemberExpression(x){return x.type==="OptionalMemberExpression"}checkLVal(x,{in:m,binding:S=64,checkClashes:k=!1,strictModeChanged:O=!1,hasParenthesizedAncestor:U=!1}){var K;let re=x.type;if(this.isObjectMethod(x))return;let le=this.isOptionalMemberExpression(x);if(le||re==="MemberExpression"){le&&(this.expectPlugin("optionalChainingAssign",x.loc.start),m.type!=="AssignmentExpression"&&this.raise(v.InvalidLhsOptionalChaining,x,{ancestor:m})),S!==64&&this.raise(v.InvalidPropertyBindingPattern,x);return}if(re==="Identifier"){this.checkIdentifier(x,S,O);let{name:nt}=x;k&&(k.has(nt)?this.raise(v.ParamDupe,x):k.add(nt));return}let ae=this.isValidLVal(re,!(U||(K=x.extra)!=null&&K.parenthesized)&&m.type==="AssignmentExpression",S);if(ae===!0)return;if(ae===!1){let nt=S===64?v.InvalidLhs:v.InvalidLhsBinding;this.raise(nt,x,{ancestor:m});return}let[Pe,Ve]=Array.isArray(ae)?ae:[ae,re==="ParenthesizedExpression"],at=re==="ArrayPattern"||re==="ObjectPattern"?{type:re}:m;for(let nt of[].concat(x[Pe]))nt&&this.checkLVal(nt,{in:at,binding:S,checkClashes:k,strictModeChanged:O,hasParenthesizedAncestor:Ve})}checkIdentifier(x,m,S=!1){this.state.strict&&(S?ye(x.name,this.inModule):Qn(x.name))&&(m===64?this.raise(v.StrictEvalArguments,x,{referenceName:x.name}):this.raise(v.StrictEvalArgumentsBinding,x,{bindingName:x.name})),m&8192&&x.name==="let"&&this.raise(v.LetInLexicalBinding,x),m&64||this.declareNameFromIdentifier(x,m)}declareNameFromIdentifier(x,m){this.scope.declareName(x.name,m,x.loc.start)}checkToRestConversion(x,m){switch(x.type){case"ParenthesizedExpression":this.checkToRestConversion(x.expression,m);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(m)break;default:this.raise(v.InvalidRestAssignmentPattern,x)}}checkCommaAfterRest(x){return this.match(12)?(this.raise(this.lookaheadCharCode()===x?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0):!1}},Ch=(x,m)=>Object.hasOwnProperty.call(x,m)&&x[m];function Wo(x){if(x==null)throw new Error(`Unexpected ${x} value.`);return x}function js(x){if(!x)throw new Error("Assert fail")}var ht=b`typescript`({AbstractMethodHasImplementation:({methodName:x})=>`Method '${x}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:x})=>`Property '${x}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:x})=>`'declare' is not allowed in ${x}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:x})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:x})=>`Duplicate modifier: '${x}'.`,EmptyHeritageClauseType:({token:x})=>`'${x}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:x})=>`'${x[0]}' modifier cannot be used with '${x[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:x})=>`Index signatures cannot have an accessibility modifier ('${x}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:x})=>`'${x}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:x})=>`'${x}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:x})=>`'${x}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:x})=>`'${x[0]}' modifier must precede '${x[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:x})=>`Private elements cannot have an accessibility modifier ('${x}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:x})=>`Single type parameter ${x} should have a trailing comma. Example usage: <${x},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:x})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${x}.`});function Yf(x){switch(x){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Th(x){return x==="private"||x==="public"||x==="protected"}function ie(x){return x==="in"||x==="out"}var ve=x=>class extends x{constructor(...m){super(...m),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ht.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ht.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ht.InvalidModifierOnTypeParameter})}getScopeHandler(){return yl}tsIsIdentifier(){return me(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(m,S){if(!me(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let k=this.state.value;if(m.indexOf(k)!==-1){if(S&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return k}}tsParseModifiers({allowedModifiers:m,disallowedModifiers:S,stopOnStartOfClassStaticBlock:k,errorTemplate:O=ht.InvalidModifierOnTypeMember},U){let K=(le,ae,Pe,Ve)=>{ae===Pe&&U[Ve]&&this.raise(ht.InvalidModifiersOrder,le,{orderedModifiers:[Pe,Ve]})},re=(le,ae,Pe,Ve)=>{(U[Pe]&&ae===Ve||U[Ve]&&ae===Pe)&&this.raise(ht.IncompatibleModifiers,le,{modifiers:[Pe,Ve]})};for(;;){let{startLoc:le}=this.state,ae=this.tsParseModifier(m.concat(S??[]),k);if(!ae)break;Th(ae)?U.accessibility?this.raise(ht.DuplicateAccessibilityModifier,le,{modifier:ae}):(K(le,ae,ae,"override"),K(le,ae,ae,"static"),K(le,ae,ae,"readonly"),U.accessibility=ae):ie(ae)?(U[ae]&&this.raise(ht.DuplicateModifier,le,{modifier:ae}),U[ae]=!0,K(le,ae,"in","out")):(Object.hasOwnProperty.call(U,ae)?this.raise(ht.DuplicateModifier,le,{modifier:ae}):(K(le,ae,"static","readonly"),K(le,ae,"static","override"),K(le,ae,"override","readonly"),K(le,ae,"abstract","override"),re(le,ae,"declare","override"),re(le,ae,"static","abstract")),U[ae]=!0),S!=null&&S.includes(ae)&&this.raise(O,le,{modifier:ae})}}tsIsListTerminator(m){switch(m){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(m,S){let k=[];for(;!this.tsIsListTerminator(m);)k.push(S());return k}tsParseDelimitedList(m,S,k){return Wo(this.tsParseDelimitedListWorker(m,S,!0,k))}tsParseDelimitedListWorker(m,S,k,O){let U=[],K=-1;for(;!this.tsIsListTerminator(m);){K=-1;let re=S();if(re==null)return;if(U.push(re),this.eat(12)){K=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(m))break;k&&this.expect(12);return}return O&&(O.value=K),U}tsParseBracketedList(m,S,k,O,U){O||(k?this.expect(0):this.expect(47));let K=this.tsParseDelimitedList(m,S,U);return k?this.expect(3):this.expect(48),K}tsParseImportType(){let m=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ht.UnsupportedImportTypeArgument,this.state.startLoc),m.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(m.qualifier=this.tsParseEntityName()),this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSImportType")}tsParseEntityName(m=!0){let S=this.parseIdentifier(m);for(;this.eat(16);){let k=this.startNodeAtNode(S);k.left=S,k.right=this.parseIdentifier(m),S=this.finishNode(k,"TSQualifiedName")}return S}tsParseTypeReference(){let m=this.startNode();return m.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeReference")}tsParseThisTypePredicate(m){this.next();let S=this.startNodeAtNode(m);return S.parameterName=m,S.typeAnnotation=this.tsParseTypeAnnotation(!1),S.asserts=!1,this.finishNode(S,"TSTypePredicate")}tsParseThisTypeNode(){let m=this.startNode();return this.next(),this.finishNode(m,"TSThisType")}tsParseTypeQuery(){let m=this.startNode();return this.expect(87),this.match(83)?m.exprName=this.tsParseImportType():m.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(m.typeParameters=this.tsParseTypeArguments()),this.finishNode(m,"TSTypeQuery")}tsParseTypeParameter(m){let S=this.startNode();return m(S),S.name=this.tsParseTypeParameterName(),S.constraint=this.tsEatThenParseType(81),S.default=this.tsEatThenParseType(29),this.finishNode(S,"TSTypeParameter")}tsTryParseTypeParameters(m){if(this.match(47))return this.tsParseTypeParameters(m)}tsParseTypeParameters(m){let S=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let k={value:-1};return S.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,m),!1,!0,k),S.params.length===0&&this.raise(ht.EmptyTypeParameters,S),k.value!==-1&&this.addExtra(S,"trailingComma",k.value),this.finishNode(S,"TSTypeParameterDeclaration")}tsFillSignature(m,S){let k=m===19,O="parameters",U="typeAnnotation";S.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),S[O]=this.tsParseBindingListForSignature(),k?S[U]=this.tsParseTypeOrTypePredicateAnnotation(m):this.match(m)&&(S[U]=this.tsParseTypeOrTypePredicateAnnotation(m))}tsParseBindingListForSignature(){let m=super.parseBindingList(11,41,2);for(let S of m){let{type:k}=S;(k==="AssignmentPattern"||k==="TSParameterProperty")&&this.raise(ht.UnsupportedSignatureParameterKind,S,{type:k})}return m}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(m,S){return this.tsFillSignature(14,S),this.tsParseTypeMemberSemicolon(),this.finishNode(S,m)}tsIsUnambiguouslyIndexSignature(){return this.next(),me(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(m){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let S=this.parseIdentifier();S.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(S),this.expect(3),m.parameters=[S];let k=this.tsTryParseTypeAnnotation();return k&&(m.typeAnnotation=k),this.tsParseTypeMemberSemicolon(),this.finishNode(m,"TSIndexSignature")}tsParsePropertyOrMethodSignature(m,S){this.eat(17)&&(m.optional=!0);let k=m;if(this.match(10)||this.match(47)){S&&this.raise(ht.ReadonlyForMethodSignature,m);let O=k;O.kind&&this.match(47)&&this.raise(ht.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,O),this.tsParseTypeMemberSemicolon();let U="parameters",K="typeAnnotation";if(O.kind==="get")O[U].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(O[U][0])&&this.raise(ht.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(O.kind==="set"){if(O[U].length!==1)this.raise(v.BadSetterArity,this.state.curPosition());else{let re=O[U][0];this.isThisParam(re)&&this.raise(ht.AccesorCannotDeclareThisParameter,this.state.curPosition()),re.type==="Identifier"&&re.optional&&this.raise(ht.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),re.type==="RestElement"&&this.raise(ht.SetAccesorCannotHaveRestParameter,this.state.curPosition())}O[K]&&this.raise(ht.SetAccesorCannotHaveReturnType,O[K])}else O.kind="method";return this.finishNode(O,"TSMethodSignature")}else{let O=k;S&&(O.readonly=!0);let U=this.tsTryParseTypeAnnotation();return U&&(O.typeAnnotation=U),this.tsParseTypeMemberSemicolon(),this.finishNode(O,"TSPropertySignature")}}tsParseTypeMember(){let m=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",m);if(this.match(77)){let k=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",m):(m.key=this.createIdentifier(k,"new"),this.tsParsePropertyOrMethodSignature(m,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},m),this.tsTryParseIndexSignature(m)||(super.parsePropertyName(m),!m.computed&&m.key.type==="Identifier"&&(m.key.name==="get"||m.key.name==="set")&&this.tsTokenCanFollowModifier()&&(m.kind=m.key.name,super.parsePropertyName(m)),this.tsParsePropertyOrMethodSignature(m,!!m.readonly))}tsParseTypeLiteral(){let m=this.startNode();return m.members=this.tsParseObjectTypeMembers(),this.finishNode(m,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let m=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),m}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let m=this.startNode();return m.name=this.tsParseTypeParameterName(),m.constraint=this.tsExpectThenParseType(58),this.finishNode(m,"TSTypeParameter")}tsParseMappedType(){let m=this.startNode();return this.expect(5),this.match(53)?(m.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(m.readonly=!0),this.expect(0),m.typeParameter=this.tsParseMappedTypeParameter(),m.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(m.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(m.optional=!0),m.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(m,"TSMappedType")}tsParseTupleType(){let m=this.startNode();m.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let S=!1;return m.elementTypes.forEach(k=>{let{type:O}=k;S&&O!=="TSRestType"&&O!=="TSOptionalType"&&!(O==="TSNamedTupleMember"&&k.optional)&&this.raise(ht.OptionalTypeBeforeRequired,k),S||(S=O==="TSNamedTupleMember"&&k.optional||O==="TSOptionalType")}),this.finishNode(m,"TSTupleType")}tsParseTupleElementType(){let{startLoc:m}=this.state,S=this.eat(21),k,O,U,K,re=je(this.state.type)?this.lookaheadCharCode():null;if(re===58)k=!0,U=!1,O=this.parseIdentifier(!0),this.expect(14),K=this.tsParseType();else if(re===63){U=!0;let le=this.state.startLoc,ae=this.state.value,Pe=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(k=!0,O=this.createIdentifier(this.startNodeAt(le),ae),this.expect(17),this.expect(14),K=this.tsParseType()):(k=!1,K=Pe,this.expect(17))}else K=this.tsParseType(),U=this.eat(17),k=this.eat(14);if(k){let le;O?(le=this.startNodeAtNode(O),le.optional=U,le.label=O,le.elementType=K,this.eat(17)&&(le.optional=!0,this.raise(ht.TupleOptionalAfterType,this.state.lastTokStartLoc))):(le=this.startNodeAtNode(K),le.optional=U,this.raise(ht.InvalidTupleMemberLabel,K),le.label=K,le.elementType=this.tsParseType()),K=this.finishNode(le,"TSNamedTupleMember")}else if(U){let le=this.startNodeAtNode(K);le.typeAnnotation=K,K=this.finishNode(le,"TSOptionalType")}if(S){let le=this.startNodeAt(m);le.typeAnnotation=K,K=this.finishNode(le,"TSRestType")}return K}tsParseParenthesizedType(){let m=this.startNode();return this.expect(10),m.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(m,"TSParenthesizedType")}tsParseFunctionOrConstructorType(m,S){let k=this.startNode();return m==="TSConstructorType"&&(k.abstract=!!S,S&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,k)),this.finishNode(k,m)}tsParseLiteralTypeNode(){let m=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:m.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(m,"TSLiteralType")}tsParseTemplateLiteralType(){let m=this.startNode();return m.literal=super.parseTemplate(!1),this.finishNode(m,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let m=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(m):m}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let m=this.startNode(),S=this.lookahead();return S.type!==134&&S.type!==135&&this.unexpected(),m.literal=this.parseMaybeUnary(),this.finishNode(m,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:m}=this.state;if(me(m)||m===88||m===84){let S=m===88?"TSVoidKeyword":m===84?"TSNullKeyword":Yf(this.state.value);if(S!==void 0&&this.lookaheadCharCode()!==46){let k=this.startNode();return this.next(),this.finishNode(k,S)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let m=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let S=this.startNodeAtNode(m);S.elementType=m,this.expect(3),m=this.finishNode(S,"TSArrayType")}else{let S=this.startNodeAtNode(m);S.objectType=m,S.indexType=this.tsParseType(),this.expect(3),m=this.finishNode(S,"TSIndexedAccessType")}return m}tsParseTypeOperator(){let m=this.startNode(),S=this.state.value;return this.next(),m.operator=S,m.typeAnnotation=this.tsParseTypeOperatorOrHigher(),S==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(m),this.finishNode(m,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(m){switch(m.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ht.UnexpectedReadonly,m)}}tsParseInferType(){let m=this.startNode();this.expectContextual(115);let S=this.startNode();return S.name=this.tsParseTypeParameterName(),S.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),m.typeParameter=this.finishNode(S,"TSTypeParameter"),this.finishNode(m,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let m=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return m}}tsParseTypeOperatorOrHigher(){return _e(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(m,S,k){let O=this.startNode(),U=this.eat(k),K=[];do K.push(S());while(this.eat(k));return K.length===1&&!U?K[0]:(O.types=K,this.finishNode(O,m))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(me(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:m}=this.state,S=m.length;try{return this.parseObjectLike(8,!0),m.length===S}catch{return!1}}if(this.match(0)){this.next();let{errors:m}=this.state,S=m.length;try{return super.parseBindingList(3,93,1),m.length===S}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(m){return this.tsInType(()=>{let S=this.startNode();this.expect(m);let k=this.startNode(),O=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(O&&this.match(78)){let re=this.tsParseThisTypeOrThisTypePredicate();return re.type==="TSThisType"?(k.parameterName=re,k.asserts=!0,k.typeAnnotation=null,re=this.finishNode(k,"TSTypePredicate")):(this.resetStartLocationFromNode(re,k),re.asserts=!0),S.typeAnnotation=re,this.finishNode(S,"TSTypeAnnotation")}let U=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!U)return O?(k.parameterName=this.parseIdentifier(),k.asserts=O,k.typeAnnotation=null,S.typeAnnotation=this.finishNode(k,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,S);let K=this.tsParseTypeAnnotation(!1);return k.parameterName=U,k.typeAnnotation=K,k.asserts=O,S.typeAnnotation=this.finishNode(k,"TSTypePredicate"),this.finishNode(S,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let m=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),m}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let m=this.state.containsEsc;return this.next(),!me(this.state.type)&&!this.match(78)?!1:(m&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(m=!0,S=this.startNode()){return this.tsInType(()=>{m&&this.expect(14),S.typeAnnotation=this.tsParseType()}),this.finishNode(S,"TSTypeAnnotation")}tsParseType(){js(this.state.inType);let m=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return m;let S=this.startNodeAtNode(m);return S.checkType=m,S.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),S.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),S.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(S,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ht.ReservedTypeAssertion,this.state.startLoc);let m=this.startNode();return m.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),m.expression=this.parseMaybeUnary(),this.finishNode(m,"TSTypeAssertion")}tsParseHeritageClause(m){let S=this.state.startLoc,k=this.tsParseDelimitedList("HeritageClauseElement",()=>{let O=this.startNode();return O.expression=this.tsParseEntityName(),this.match(47)&&(O.typeParameters=this.tsParseTypeArguments()),this.finishNode(O,"TSExpressionWithTypeArguments")});return k.length||this.raise(ht.EmptyHeritageClauseType,S,{token:m}),k}tsParseInterfaceDeclaration(m,S={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),S.declare&&(m.declare=!0),me(this.state.type)?(m.id=this.parseIdentifier(),this.checkIdentifier(m.id,130)):(m.id=null,this.raise(ht.MissingInterfaceName,this.state.startLoc)),m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(m.extends=this.tsParseHeritageClause("extends"));let k=this.startNode();return k.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),m.body=this.finishNode(k,"TSInterfaceBody"),this.finishNode(m,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(m){return m.id=this.parseIdentifier(),this.checkIdentifier(m.id,2),m.typeAnnotation=this.tsInType(()=>{if(m.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let S=this.startNode();return this.next(),this.finishNode(S,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(m,"TSTypeAliasDeclaration")}tsInNoContext(m){let S=this.state.context;this.state.context=[S[0]];try{return m()}finally{this.state.context=S}}tsInType(m){let S=this.state.inType;this.state.inType=!0;try{return m()}finally{this.state.inType=S}}tsInDisallowConditionalTypesContext(m){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return m()}finally{this.state.inDisallowConditionalTypesContext=S}}tsInAllowConditionalTypesContext(m){let S=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return m()}finally{this.state.inDisallowConditionalTypesContext=S}}tsEatThenParseType(m){if(this.match(m))return this.tsNextThenParseType()}tsExpectThenParseType(m){return this.tsInType(()=>(this.expect(m),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let m=this.startNode();return m.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(m.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(m,"TSEnumMember")}tsParseEnumDeclaration(m,S={}){return S.const&&(m.const=!0),S.declare&&(m.declare=!0),this.expectContextual(126),m.id=this.parseIdentifier(),this.checkIdentifier(m.id,m.const?8971:8459),this.expect(5),m.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(m,"TSEnumDeclaration")}tsParseModuleBlock(){let m=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(m.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(m,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(m,S=!1){if(m.id=this.parseIdentifier(),S||this.checkIdentifier(m.id,1024),this.eat(16)){let k=this.startNode();this.tsParseModuleOrNamespaceDeclaration(k,!0),m.body=k}else this.scope.enter(256),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(m,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(m){return this.isContextual(112)?(m.global=!0,m.id=this.parseIdentifier()):this.match(133)?m.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),m.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(m,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(m,S,k){m.isExport=k||!1,m.id=S||this.parseIdentifier(),this.checkIdentifier(m.id,4096),this.expect(29);let O=this.tsParseModuleReference();return m.importKind==="type"&&O.type!=="TSExternalModuleReference"&&this.raise(ht.ImportAliasHasImportType,O),m.moduleReference=O,this.semicolon(),this.finishNode(m,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let m=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),m.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(m,"TSExternalModuleReference")}tsLookAhead(m){let S=this.state.clone(),k=m();return this.state=S,k}tsTryParseAndCatch(m){let S=this.tryParse(k=>m()||k());if(!(S.aborted||!S.node))return S.error&&(this.state=S.failState),S.node}tsTryParse(m){let S=this.state.clone(),k=m();if(k!==void 0&&k!==!1)return k;this.state=S}tsTryParseDeclare(m){if(this.isLineTerminator())return;let S=this.state.type,k;return this.isContextual(100)&&(S=74,k="let"),this.tsInAmbientContext(()=>{switch(S){case 68:return m.declare=!0,super.parseFunctionStatement(m,!1,!1);case 80:return m.declare=!0,this.parseClass(m,!0,!1);case 126:return this.tsParseEnumDeclaration(m,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(m);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(m.declare=!0,this.parseVarStatement(m,k||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(m,{const:!0,declare:!0}));case 129:{let O=this.tsParseInterfaceDeclaration(m,{declare:!0});if(O)return O}default:if(me(S))return this.tsParseDeclaration(m,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(m,S,k){switch(S.name){case"declare":{let O=this.tsTryParseDeclare(m);return O&&(O.declare=!0),O}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let O=m;return O.global=!0,O.id=S,O.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(O,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(m,S.name,!1,k)}}tsParseDeclaration(m,S,k,O){switch(S){case"abstract":if(this.tsCheckLineTerminator(k)&&(this.match(80)||me(this.state.type)))return this.tsParseAbstractDeclaration(m,O);break;case"module":if(this.tsCheckLineTerminator(k)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(m);if(me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(m)}break;case"namespace":if(this.tsCheckLineTerminator(k)&&me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(m);break;case"type":if(this.tsCheckLineTerminator(k)&&me(this.state.type))return this.tsParseTypeAliasDeclaration(m);break}}tsCheckLineTerminator(m){return m?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(m){if(!this.match(47))return;let S=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let k=this.tsTryParseAndCatch(()=>{let O=this.startNodeAt(m);return O.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(O),O.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),O});if(this.state.maybeInArrowParameters=S,!!k)return super.parseArrowExpression(k,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let m=this.startNode();return m.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),m.params.length===0?this.raise(ht.EmptyTypeArguments,m):!this.state.inType&&this.curContext()===A.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(m,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return be(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(m,S){let k=this.state.startLoc,O={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},O);let U=O.accessibility,K=O.override,re=O.readonly;!(m&4)&&(U||re||K)&&this.raise(ht.UnexpectedParameterModifier,k);let le=this.parseMaybeDefault();this.parseAssignableListItemTypes(le,m);let ae=this.parseMaybeDefault(le.loc.start,le);if(U||re||K){let Pe=this.startNodeAt(k);return S.length&&(Pe.decorators=S),U&&(Pe.accessibility=U),re&&(Pe.readonly=re),K&&(Pe.override=K),ae.type!=="Identifier"&&ae.type!=="AssignmentPattern"&&this.raise(ht.UnsupportedParameterPropertyKind,Pe),Pe.parameter=ae,this.finishNode(Pe,"TSParameterProperty")}return S.length&&(le.decorators=S),ae}isSimpleParameter(m){return m.type==="TSParameterProperty"&&super.isSimpleParameter(m.parameter)||super.isSimpleParameter(m)}tsDisallowOptionalPattern(m){for(let S of m.params)S.type!=="Identifier"&&S.optional&&!this.state.isAmbientContext&&this.raise(ht.PatternIsOptional,S)}setArrowFunctionParameters(m,S,k){super.setArrowFunctionParameters(m,S,k),this.tsDisallowOptionalPattern(m)}parseFunctionBodyAndFinish(m,S,k=!1){this.match(14)&&(m.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let O=S==="FunctionDeclaration"?"TSDeclareFunction":S==="ClassMethod"||S==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return O&&!this.match(5)&&this.isLineTerminator()?this.finishNode(m,O):O==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ht.DeclareFunctionHasImplementation,m),m.declare)?super.parseFunctionBodyAndFinish(m,O,k):(this.tsDisallowOptionalPattern(m),super.parseFunctionBodyAndFinish(m,S,k))}registerFunctionStatementId(m){!m.body&&m.id?this.checkIdentifier(m.id,1024):super.registerFunctionStatementId(m)}tsCheckForInvalidTypeCasts(m){m.forEach(S=>{(S==null?void 0:S.type)==="TSTypeCastExpression"&&this.raise(ht.UnexpectedTypeAnnotation,S.typeAnnotation)})}toReferencedList(m,S){return this.tsCheckForInvalidTypeCasts(m),m}parseArrayLike(m,S,k,O){let U=super.parseArrayLike(m,S,k,O);return U.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(U.elements),U}parseSubscript(m,S,k,O){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let K=this.startNodeAt(S);return K.expression=m,this.finishNode(K,"TSNonNullExpression")}let U=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(k)return O.stop=!0,m;O.optionalChainMember=U=!0,this.next()}if(this.match(47)||this.match(51)){let K,re=this.tsTryParseAndCatch(()=>{if(!k&&this.atPossibleAsyncArrow(m)){let Ve=this.tsTryParseGenericAsyncArrowFunction(S);if(Ve)return Ve}let le=this.tsParseTypeArgumentsInExpression();if(!le)return;if(U&&!this.match(10)){K=this.state.curPosition();return}if(Te(this.state.type)){let Ve=super.parseTaggedTemplateExpression(m,S,O);return Ve.typeParameters=le,Ve}if(!k&&this.eat(10)){let Ve=this.startNodeAt(S);return Ve.callee=m,Ve.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(Ve.arguments),Ve.typeParameters=le,O.optionalChainMember&&(Ve.optional=U),this.finishCallExpression(Ve,O.optionalChainMember)}let ae=this.state.type;if(ae===48||ae===52||ae!==10&&Pt(ae)&&!this.hasPrecedingLineBreak())return;let Pe=this.startNodeAt(S);return Pe.expression=m,Pe.typeParameters=le,this.finishNode(Pe,"TSInstantiationExpression")});if(K&&this.unexpected(K,10),re)return re.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ht.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),re}return super.parseSubscript(m,S,k,O)}parseNewCallee(m){var S;super.parseNewCallee(m);let{callee:k}=m;k.type==="TSInstantiationExpression"&&!((S=k.extra)!=null&&S.parenthesized)&&(m.typeParameters=k.typeParameters,m.callee=k.expression)}parseExprOp(m,S,k){let O;if(Ze(58)>k&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(O=this.isContextual(120)))){let U=this.startNodeAt(S);return U.expression=m,U.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(O&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(U,O?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(U,S,k)}return super.parseExprOp(m,S,k)}checkReservedWord(m,S,k,O){this.state.isAmbientContext||super.checkReservedWord(m,S,k,O)}checkImportReflection(m){super.checkImportReflection(m),m.module&&m.importKind!=="value"&&this.raise(ht.ImportReflectionHasImportType,m.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(m){if(super.isPotentialImportPhase(m))return!0;if(this.isContextual(130)){let S=this.lookaheadCharCode();return m?S===123||S===42:S!==61}return!m&&this.isContextual(87)}applyImportPhase(m,S,k,O){super.applyImportPhase(m,S,k,O),S?m.exportKind=k==="type"?"type":"value":m.importKind=k==="type"||k==="typeof"?k:"value"}parseImport(m){if(this.match(133))return m.importKind="value",super.parseImport(m);let S;if(me(this.state.type)&&this.lookaheadCharCode()===61)return m.importKind="value",this.tsParseImportEqualsDeclaration(m);if(this.isContextual(130)){let k=this.parseMaybeImportPhase(m,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(m,k);S=super.parseImportSpecifiersAndAfter(m,k)}else S=super.parseImport(m);return S.importKind==="type"&&S.specifiers.length>1&&S.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ht.TypeImportCannotSpecifyDefaultAndNamed,S),S}parseExport(m,S){if(this.match(83)){this.next();let k=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?k=this.parseMaybeImportPhase(m,!1):m.importKind="value",this.tsParseImportEqualsDeclaration(m,k,!0)}else if(this.eat(29)){let k=m;return k.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(k,"TSExportAssignment")}else if(this.eatContextual(93)){let k=m;return this.expectContextual(128),k.id=this.parseIdentifier(),this.semicolon(),this.finishNode(k,"TSNamespaceExportDeclaration")}else return super.parseExport(m,S)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let m=this.startNode();return this.next(),m.abstract=!0,this.parseClass(m,!0,!0)}if(this.match(129)){let m=this.tsParseInterfaceDeclaration(this.startNode());if(m)return m}return super.parseExportDefaultExpression()}parseVarStatement(m,S,k=!1){let{isAmbientContext:O}=this.state,U=super.parseVarStatement(m,S,k||O);if(!O)return U;for(let{id:K,init:re}of U.declarations)re&&(S!=="const"||K.typeAnnotation?this.raise(ht.InitializerNotAllowedInAmbientContext,re):lt(re,this.hasPlugin("estree"))||this.raise(ht.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,re));return U}parseStatementContent(m,S){if(this.match(75)&&this.isLookaheadContextual("enum")){let k=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(k,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let k=this.tsParseInterfaceDeclaration(this.startNode());if(k)return k}return super.parseStatementContent(m,S)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(m,S){return S.some(k=>Th(k)?m.accessibility===k:!!m[k])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(m,S,k){let O=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:O,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ht.InvalidModifierOnTypeParameterPositions},S);let U=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(S,O)&&this.raise(ht.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(m,S)):this.parseClassMemberWithIsStatic(m,S,k,!!S.static)};S.declare?this.tsInAmbientContext(U):U()}parseClassMemberWithIsStatic(m,S,k,O){let U=this.tsTryParseIndexSignature(S);if(U){m.body.push(U),S.abstract&&this.raise(ht.IndexSignatureHasAbstract,S),S.accessibility&&this.raise(ht.IndexSignatureHasAccessibility,S,{modifier:S.accessibility}),S.declare&&this.raise(ht.IndexSignatureHasDeclare,S),S.override&&this.raise(ht.IndexSignatureHasOverride,S);return}!this.state.inAbstractClass&&S.abstract&&this.raise(ht.NonAbstractClassHasAbstractMethod,S),S.override&&(k.hadSuperClass||this.raise(ht.OverrideNotInSubClass,S)),super.parseClassMemberWithIsStatic(m,S,k,O)}parsePostMemberNameModifiers(m){this.eat(17)&&(m.optional=!0),m.readonly&&this.match(10)&&this.raise(ht.ClassMethodHasReadonly,m),m.declare&&this.match(10)&&this.raise(ht.ClassMethodHasDeclare,m)}parseExpressionStatement(m,S,k){return(S.type==="Identifier"?this.tsParseExpressionStatement(m,S,k):void 0)||super.parseExpressionStatement(m,S,k)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(m,S,k){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(m,S,k);let O=this.tryParse(()=>super.parseConditional(m,S));return O.node?(O.error&&(this.state=O.failState),O.node):(O.error&&super.setOptionalParametersError(k,O.error),m)}parseParenItem(m,S){if(m=super.parseParenItem(m,S),this.eat(17)&&(m.optional=!0,this.resetEndLocation(m)),this.match(14)){let k=this.startNodeAt(S);return k.expression=m,k.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(k,"TSTypeCastExpression")}return m}parseExportDeclaration(m){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(m));let S=this.state.startLoc,k=this.eatContextual(125);if(k&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ht.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let O=me(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(m);return O?((O.type==="TSInterfaceDeclaration"||O.type==="TSTypeAliasDeclaration"||k)&&(m.exportKind="type"),k&&(this.resetStartLocation(O,S),O.declare=!0),O):null}parseClassId(m,S,k,O){if((!S||k)&&this.isContextual(113))return;super.parseClassId(m,S,k,m.declare?1024:8331);let U=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);U&&(m.typeParameters=U)}parseClassPropertyAnnotation(m){m.optional||(this.eat(35)?m.definite=!0:this.eat(17)&&(m.optional=!0));let S=this.tsTryParseTypeAnnotation();S&&(m.typeAnnotation=S)}parseClassProperty(m){if(this.parseClassPropertyAnnotation(m),this.state.isAmbientContext&&!(m.readonly&&!m.typeAnnotation)&&this.match(29)&&this.raise(ht.DeclareClassFieldHasInitializer,this.state.startLoc),m.abstract&&this.match(29)){let{key:S}=m;this.raise(ht.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:S.type==="Identifier"&&!m.computed?S.name:`[${this.input.slice(S.start,S.end)}]`})}return super.parseClassProperty(m)}parseClassPrivateProperty(m){return m.abstract&&this.raise(ht.PrivateElementHasAbstract,m),m.accessibility&&this.raise(ht.PrivateElementHasAccessibility,m,{modifier:m.accessibility}),this.parseClassPropertyAnnotation(m),super.parseClassPrivateProperty(m)}parseClassAccessorProperty(m){return this.parseClassPropertyAnnotation(m),m.optional&&this.raise(ht.AccessorCannotBeOptional,m),super.parseClassAccessorProperty(m)}pushClassMethod(m,S,k,O,U,K){let re=this.tsTryParseTypeParameters(this.tsParseConstModifier);re&&U&&this.raise(ht.ConstructorHasTypeParameters,re);let{declare:le=!1,kind:ae}=S;le&&(ae==="get"||ae==="set")&&this.raise(ht.DeclareAccessor,S,{kind:ae}),re&&(S.typeParameters=re),super.pushClassMethod(m,S,k,O,U,K)}pushClassPrivateMethod(m,S,k,O){let U=this.tsTryParseTypeParameters(this.tsParseConstModifier);U&&(S.typeParameters=U),super.pushClassPrivateMethod(m,S,k,O)}declareClassPrivateMethodInScope(m,S){m.type!=="TSDeclareMethod"&&(m.type==="MethodDefinition"&&!m.value.body||super.declareClassPrivateMethodInScope(m,S))}parseClassSuper(m){super.parseClassSuper(m),m.superClass&&(this.match(47)||this.match(51))&&(m.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(m.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(m,S,k,O,U,K,re){let le=this.tsTryParseTypeParameters(this.tsParseConstModifier);return le&&(m.typeParameters=le),super.parseObjPropValue(m,S,k,O,U,K,re)}parseFunctionParams(m,S){let k=this.tsTryParseTypeParameters(this.tsParseConstModifier);k&&(m.typeParameters=k),super.parseFunctionParams(m,S)}parseVarId(m,S){super.parseVarId(m,S),m.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(m.definite=!0);let k=this.tsTryParseTypeAnnotation();k&&(m.id.typeAnnotation=k,this.resetEndLocation(m.id))}parseAsyncArrowFromCallExpression(m,S){return this.match(14)&&(m.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(m,S)}parseMaybeAssign(m,S){var k,O,U,K,re;let le,ae,Pe;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(le=this.state.clone(),ae=this.tryParse(()=>super.parseMaybeAssign(m,S),le),!ae.error)return ae.node;let{context:nt}=this.state,xr=nt[nt.length-1];(xr===A.j_oTag||xr===A.j_expr)&&nt.pop()}if(!((k=ae)!=null&&k.error)&&!this.match(47))return super.parseMaybeAssign(m,S);(!le||le===this.state)&&(le=this.state.clone());let Ve,at=this.tryParse(nt=>{var xr,gr;Ve=this.tsParseTypeParameters(this.tsParseConstModifier);let wn=super.parseMaybeAssign(m,S);return(wn.type!=="ArrowFunctionExpression"||(xr=wn.extra)!=null&&xr.parenthesized)&&nt(),((gr=Ve)==null?void 0:gr.params.length)!==0&&this.resetStartLocationFromNode(wn,Ve),wn.typeParameters=Ve,wn},le);if(!at.error&&!at.aborted)return Ve&&this.reportReservedArrowTypeParam(Ve),at.node;if(!ae&&(js(!this.hasPlugin("jsx")),Pe=this.tryParse(()=>super.parseMaybeAssign(m,S),le),!Pe.error))return Pe.node;if((O=ae)!=null&&O.node)return this.state=ae.failState,ae.node;if(at.node)return this.state=at.failState,Ve&&this.reportReservedArrowTypeParam(Ve),at.node;if((U=Pe)!=null&&U.node)return this.state=Pe.failState,Pe.node;throw((K=ae)==null?void 0:K.error)||at.error||((re=Pe)==null?void 0:re.error)}reportReservedArrowTypeParam(m){var S;m.params.length===1&&!m.params[0].constraint&&!((S=m.extra)!=null&&S.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ht.ReservedArrowTypeParam,m)}parseMaybeUnary(m,S){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(m,S)}parseArrow(m){if(this.match(14)){let S=this.tryParse(k=>{let O=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&k(),O});if(S.aborted)return;S.thrown||(S.error&&(this.state=S.failState),m.returnType=S.node)}return super.parseArrow(m)}parseAssignableListItemTypes(m,S){if(!(S&2))return m;this.eat(17)&&(m.optional=!0);let k=this.tsTryParseTypeAnnotation();return k&&(m.typeAnnotation=k),this.resetEndLocation(m),m}isAssignable(m,S){switch(m.type){case"TSTypeCastExpression":return this.isAssignable(m.expression,S);case"TSParameterProperty":return!0;default:return super.isAssignable(m,S)}}toAssignable(m,S=!1){switch(m.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(m,S);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":S?this.expressionScope.recordArrowParameterBindingError(ht.UnexpectedTypeCastInParameter,m):this.raise(ht.UnexpectedTypeCastInParameter,m),this.toAssignable(m.expression,S);break;case"AssignmentExpression":!S&&m.left.type==="TSTypeCastExpression"&&(m.left=this.typeCastToParameter(m.left));default:super.toAssignable(m,S)}}toAssignableParenthesizedExpression(m,S){switch(m.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(m.expression,S);break;default:super.toAssignable(m,S)}}checkToRestConversion(m,S){switch(m.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(m.expression,!1);break;default:super.checkToRestConversion(m,S)}}isValidLVal(m,S,k){return Ch({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(k!==64||!S)&&["expression",!0],TSSatisfiesExpression:(k!==64||!S)&&["expression",!0],TSTypeAssertion:(k!==64||!S)&&["expression",!0]},m)||super.isValidLVal(m,S,k)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(m){if(this.match(47)||this.match(51)){let S=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let k=super.parseMaybeDecoratorArguments(m);return k.typeParameters=S,k}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(m)}checkCommaAfterRest(m){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===m?(this.next(),!1):super.checkCommaAfterRest(m)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(m,S){let k=super.parseMaybeDefault(m,S);return k.type==="AssignmentPattern"&&k.typeAnnotation&&k.right.startthis.isAssignable(S,!0)):super.shouldParseArrow(m)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(m){if(this.match(47)||this.match(51)){let S=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());S&&(m.typeParameters=S)}return super.jsxParseOpeningElementAfterName(m)}getGetterSetterExpectedParamCount(m){let S=super.getGetterSetterExpectedParamCount(m),k=this.getObjectOrClassMethodParams(m)[0];return k&&this.isThisParam(k)?S+1:S}parseCatchClauseParam(){let m=super.parseCatchClauseParam(),S=this.tsTryParseTypeAnnotation();return S&&(m.typeAnnotation=S,this.resetEndLocation(m)),m}tsInAmbientContext(m){let S=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return m()}finally{this.state.isAmbientContext=S}}parseClass(m,S,k){let O=this.state.inAbstractClass;this.state.inAbstractClass=!!m.abstract;try{return super.parseClass(m,S,k)}finally{this.state.inAbstractClass=O}}tsParseAbstractDeclaration(m,S){if(this.match(80))return m.abstract=!0,this.maybeTakeDecorators(S,this.parseClass(m,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return m.abstract=!0,this.raise(ht.NonClassMethodPropertyHasAbstractModifer,m),this.tsParseInterfaceDeclaration(m)}else this.unexpected(null,80)}parseMethod(m,S,k,O,U,K,re){let le=super.parseMethod(m,S,k,O,U,K,re);if(le.abstract&&(this.hasPlugin("estree")?le.value.body:le.body)){let{key:ae}=le;this.raise(ht.AbstractMethodHasImplementation,le,{methodName:ae.type==="Identifier"&&!le.computed?ae.name:`[${this.input.slice(ae.start,ae.end)}]`})}return le}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(m,S,k,O){return!S&&O?(this.parseTypeOnlyImportExportSpecifier(m,!1,k),this.finishNode(m,"ExportSpecifier")):(m.exportKind="value",super.parseExportSpecifier(m,S,k,O))}parseImportSpecifier(m,S,k,O,U){return!S&&O?(this.parseTypeOnlyImportExportSpecifier(m,!0,k),this.finishNode(m,"ImportSpecifier")):(m.importKind="value",super.parseImportSpecifier(m,S,k,O,k?4098:4096))}parseTypeOnlyImportExportSpecifier(m,S,k){let O=S?"imported":"local",U=S?"local":"exported",K=m[O],re,le=!1,ae=!0,Pe=K.loc.start;if(this.isContextual(93)){let at=this.parseIdentifier();if(this.isContextual(93)){let nt=this.parseIdentifier();je(this.state.type)?(le=!0,K=at,re=S?this.parseIdentifier():this.parseModuleExportName(),ae=!1):(re=nt,ae=!1)}else je(this.state.type)?(ae=!1,re=S?this.parseIdentifier():this.parseModuleExportName()):(le=!0,K=at)}else je(this.state.type)&&(le=!0,S?(K=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(K.name,K.loc.start,!0,!0)):K=this.parseModuleExportName());le&&k&&this.raise(S?ht.TypeModifierIsUsedInTypeImports:ht.TypeModifierIsUsedInTypeExports,Pe),m[O]=K,m[U]=re;let Ve=S?"importKind":"exportKind";m[Ve]=le?"type":"value",ae&&this.eatContextual(93)&&(m[U]=S?this.parseIdentifier():this.parseModuleExportName()),m[U]||(m[U]=es(m[O])),S&&this.checkIdentifier(m[U],le?4098:4096)}};function Me(x){if(x.type!=="MemberExpression")return!1;let{computed:m,property:S}=x;return m&&S.type!=="StringLiteral"&&(S.type!=="TemplateLiteral"||S.expressions.length>0)?!1:Rr(x.object)}function lt(x,m){var S;let{type:k}=x;if((S=x.extra)!=null&&S.parenthesized)return!1;if(m){if(k==="Literal"){let{value:O}=x;if(typeof O=="string"||typeof O=="boolean")return!0}}else if(k==="StringLiteral"||k==="BooleanLiteral")return!0;return!!(Cr(x,m)||Lt(x,m)||k==="TemplateLiteral"&&x.expressions.length===0||Me(x))}function Cr(x,m){return m?x.type==="Literal"&&(typeof x.value=="number"||"bigint"in x):x.type==="NumericLiteral"||x.type==="BigIntLiteral"}function Lt(x,m){if(x.type==="UnaryExpression"){let{operator:S,argument:k}=x;if(S==="-"&&Cr(k,m))return!0}return!1}function Rr(x){return x.type==="Identifier"?!0:x.type!=="MemberExpression"||x.computed?!1:Rr(x.object)}var rn=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),bn=x=>class extends x{parsePlaceholder(m){if(this.match(144)){let S=this.startNode();return this.next(),this.assertNoSpace(),S.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(S,m)}}finishPlaceholder(m,S){let k=!!(m.expectedNode&&m.type==="Placeholder");return m.expectedNode=S,k?m:this.finishNode(m,"Placeholder")}getTokenFromCode(m){m===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(m)}parseExprAtom(m){return this.parsePlaceholder("Expression")||super.parseExprAtom(m)}parseIdentifier(m){return this.parsePlaceholder("Identifier")||super.parseIdentifier(m)}checkReservedWord(m,S,k,O){m!==void 0&&super.checkReservedWord(m,S,k,O)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(m,S,k){return m==="Placeholder"||super.isValidLVal(m,S,k)}toAssignable(m,S){m&&m.type==="Placeholder"&&m.expectedNode==="Expression"?m.expectedNode="Pattern":super.toAssignable(m,S)}chStartsBindingIdentifier(m,S){return!!(super.chStartsBindingIdentifier(m,S)||this.lookahead().type===144)}verifyBreakContinue(m,S){m.label&&m.label.type==="Placeholder"||super.verifyBreakContinue(m,S)}parseExpressionStatement(m,S){var k;if(S.type!=="Placeholder"||(k=S.extra)!=null&&k.parenthesized)return super.parseExpressionStatement(m,S);if(this.match(14)){let O=m;return O.label=this.finishPlaceholder(S,"Identifier"),this.next(),O.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(O,"LabeledStatement")}return this.semicolon(),m.name=S.name,this.finishPlaceholder(m,"Statement")}parseBlock(m,S,k){return this.parsePlaceholder("BlockStatement")||super.parseBlock(m,S,k)}parseFunctionId(m){return this.parsePlaceholder("Identifier")||super.parseFunctionId(m)}parseClass(m,S,k){let O=S?"ClassDeclaration":"ClassExpression";this.next();let U=this.state.strict,K=this.parsePlaceholder("Identifier");if(K)if(this.match(81)||this.match(144)||this.match(5))m.id=K;else{if(k||!S)return m.id=null,m.body=this.finishPlaceholder(K,"ClassBody"),this.finishNode(m,O);throw this.raise(rn.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(m,S,k);return super.parseClassSuper(m),m.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!m.superClass,U),this.finishNode(m,O)}parseExport(m,S){let k=this.parsePlaceholder("Identifier");if(!k)return super.parseExport(m,S);if(!this.isContextual(98)&&!this.match(12))return m.specifiers=[],m.source=null,m.declaration=this.finishPlaceholder(k,"Declaration"),this.finishNode(m,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let O=this.startNode();return O.exported=k,m.specifiers=[this.finishNode(O,"ExportDefaultSpecifier")],super.parseExport(m,S)}isExportDefaultSpecifier(){if(this.match(65)){let m=this.nextTokenStart();if(this.isUnparsedContextual(m,"from")&&this.input.startsWith(Ne(144),this.nextTokenStartSince(m+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(m,S){var k;return(k=m.specifiers)!=null&&k.length?!0:super.maybeParseExportDefaultSpecifier(m,S)}checkExport(m){let{specifiers:S}=m;S!=null&&S.length&&(m.specifiers=S.filter(k=>k.exported.type==="Placeholder")),super.checkExport(m),m.specifiers=S}parseImport(m){let S=this.parsePlaceholder("Identifier");if(!S)return super.parseImport(m);if(m.specifiers=[],!this.isContextual(98)&&!this.match(12))return m.source=this.finishPlaceholder(S,"StringLiteral"),this.semicolon(),this.finishNode(m,"ImportDeclaration");let k=this.startNodeAtNode(S);return k.local=S,m.specifiers.push(this.finishNode(k,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(m)||this.parseNamedImportSpecifiers(m)),this.expectContextual(98),m.source=this.parseImportSource(),this.semicolon(),this.finishNode(m,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(rn.UnexpectedSpace,this.state.lastTokEndLoc)}},Hr=x=>class extends x{parseV8Intrinsic(){if(this.match(54)){let m=this.state.startLoc,S=this.startNode();if(this.next(),me(this.state.type)){let k=this.parseIdentifierName(),O=this.createIdentifier(S,k);if(O.type="V8IntrinsicIdentifier",this.match(10))return O}this.unexpected(m)}}parseExprAtom(m){return this.parseV8Intrinsic()||super.parseExprAtom(m)}};function tr(x,m){let[S,k]=typeof m=="string"?[m,{}]:m,O=Object.keys(k),U=O.length===0;return x.some(K=>{if(typeof K=="string")return U&&K===S;{let[re,le]=K;if(re!==S)return!1;for(let ae of O)if(le[ae]!==k[ae])return!1;return!0}})}function gn(x,m,S){let k=x.find(O=>Array.isArray(O)?O[0]===m:O===m);return k&&Array.isArray(k)&&k.length>1?k[1][S]:null}var xn=["minimal","fsharp","hack","smart"],ri=["^^","@@","^","%","#"],ni=["hash","bar"];function ws(x){if(tr(x,"decorators")){if(tr(x,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let m=gn(x,"decorators","decoratorsBeforeExport");if(m!=null&&typeof m!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let S=gn(x,"decorators","allowCallParenthesized");if(S!=null&&typeof S!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(tr(x,"flow")&&tr(x,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(tr(x,"placeholders")&&tr(x,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(tr(x,"pipelineOperator")){let m=gn(x,"pipelineOperator","proposal");if(!xn.includes(m)){let k=xn.map(O=>`"${O}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${k}.`)}let S=tr(x,["recordAndTuple",{syntaxType:"hash"}]);if(m==="hack"){if(tr(x,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(tr(x,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let k=gn(x,"pipelineOperator","topicToken");if(!ri.includes(k)){let O=ri.map(U=>`"${U}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${O}.`)}if(k==="#"&&S)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(m==="smart"&&S)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(tr(x,"moduleAttributes")){if(tr(x,"importAssertions")||tr(x,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(gn(x,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(tr(x,"importAssertions")&&tr(x,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(tr(x,"recordAndTuple")&&gn(x,"recordAndTuple","syntaxType")!=null&&!ni.includes(gn(x,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+ni.map(m=>`'${m}'`).join(", "));if(tr(x,"asyncDoExpressions")&&!tr(x,"doExpressions")){let m=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw m.missingPlugins="doExpressions",m}if(tr(x,"optionalChainingAssign")&&gn(x,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var ts={estree:w,jsx:xs,flow:Eh,typescript:ve,v8intrinsic:Hr,placeholders:bn},ho=Object.keys(ts),bl={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function xl(x){if(x==null)return Object.assign({},bl);if(x.annexB!=null&&x.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let m={};for(let k of Object.keys(bl)){var S;m[k]=(S=x[k])!=null?S:bl[k]}return m}var wl=class extends vl{checkProto(x,m,S,k){if(x.type==="SpreadElement"||this.isObjectMethod(x)||x.computed||x.shorthand)return;let O=x.key;if((O.type==="Identifier"?O.name:O.value)==="__proto__"){if(m){this.raise(v.RecordNoProto,O);return}S.used&&(k?k.doubleProtoLoc===null&&(k.doubleProtoLoc=O.loc.start):this.raise(v.DuplicateProto,O)),S.used=!0}}shouldExitDescending(x,m){return x.type==="ArrowFunctionExpression"&&x.start===m}getExpression(){this.enterInitialScopes(),this.nextToken();let x=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),x.comments=this.comments,x.errors=this.state.errors,this.options.tokens&&(x.tokens=this.tokens),x}parseExpression(x,m){return x?this.disallowInAnd(()=>this.parseExpressionBase(m)):this.allowInAnd(()=>this.parseExpressionBase(m))}parseExpressionBase(x){let m=this.state.startLoc,S=this.parseMaybeAssign(x);if(this.match(12)){let k=this.startNodeAt(m);for(k.expressions=[S];this.eat(12);)k.expressions.push(this.parseMaybeAssign(x));return this.toReferencedList(k.expressions),this.finishNode(k,"SequenceExpression")}return S}parseMaybeAssignDisallowIn(x,m){return this.disallowInAnd(()=>this.parseMaybeAssign(x,m))}parseMaybeAssignAllowIn(x,m){return this.allowInAnd(()=>this.parseMaybeAssign(x,m))}setOptionalParametersError(x,m){var S;x.optionalParametersLoc=(S=m==null?void 0:m.loc)!=null?S:this.state.startLoc}parseMaybeAssign(x,m){let S=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let K=this.parseYield();return m&&(K=m.call(this,K,S)),K}let k;x?k=!1:(x=new wa,k=!0);let{type:O}=this.state;(O===10||me(O))&&(this.state.potentialArrowAt=this.state.start);let U=this.parseMaybeConditional(x);if(m&&(U=m.call(this,U,S)),V(this.state.type)){let K=this.startNodeAt(S),re=this.state.value;if(K.operator=re,this.match(29)){this.toAssignable(U,!0),K.left=U;let le=S.index;x.doubleProtoLoc!=null&&x.doubleProtoLoc.index>=le&&(x.doubleProtoLoc=null),x.shorthandAssignLoc!=null&&x.shorthandAssignLoc.index>=le&&(x.shorthandAssignLoc=null),x.privateKeyLoc!=null&&x.privateKeyLoc.index>=le&&(this.checkDestructuringPrivate(x),x.privateKeyLoc=null)}else K.left=U;return this.next(),K.right=this.parseMaybeAssign(),this.checkLVal(U,{in:this.finishNode(K,"AssignmentExpression")}),K}else k&&this.checkExpressionErrors(x,!0);return U}parseMaybeConditional(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseExprOps(x);return this.shouldExitDescending(k,S)?k:this.parseConditional(k,m,x)}parseConditional(x,m,S){if(this.eat(17)){let k=this.startNodeAt(m);return k.test=x,k.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),k.alternate=this.parseMaybeAssign(),this.finishNode(k,"ConditionalExpression")}return x}parseMaybeUnaryOrPrivate(x){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(x)}parseExprOps(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseMaybeUnaryOrPrivate(x);return this.shouldExitDescending(k,S)?k:this.parseExprOp(k,m,-1)}parseExprOp(x,m,S){if(this.isPrivateName(x)){let O=this.getPrivateNameSV(x);(S>=Ze(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,x,{identifierName:O}),this.classScope.usePrivateName(O,x.loc.start)}let k=this.state.type;if(ne(k)&&(this.prodParam.hasIn||!this.match(58))){let O=Ze(k);if(O>S){if(k===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return x;this.checkPipelineAtInfixOperator(x,m)}let U=this.startNodeAt(m);U.left=x,U.operator=this.state.value;let K=k===41||k===42,re=k===40;if(re&&(O=Ze(42)),this.next(),k===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);U.right=this.parseExprOpRightExpr(k,O);let le=this.finishNode(U,K||re?"LogicalExpression":"BinaryExpression"),ae=this.state.type;if(re&&(ae===41||ae===42)||K&&ae===40)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(le,m,S)}}return x}parseExprOpRightExpr(x,m){let S=this.state.startLoc;switch(x){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(x,m),S)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(m))}default:return this.parseExprOpBaseRightExpr(x,m)}}parseExprOpBaseRightExpr(x,m){let S=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),S,ce(x)?m-1:m)}parseHackPipeBody(){var x;let{startLoc:m}=this.state,S=this.parseMaybeAssign();return h.has(S.type)&&!((x=S.extra)!=null&&x.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,m,{type:S.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,m),S}checkExponentialAfterUnary(x){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,x.argument)}parseMaybeUnary(x,m){let S=this.state.startLoc,k=this.isContextual(96);if(k&&this.isAwaitAllowed()){this.next();let re=this.parseAwait(S);return m||this.checkExponentialAfterUnary(re),re}let O=this.match(34),U=this.startNode();if(Ie(this.state.type)){U.operator=this.state.value,U.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let re=this.match(89);if(this.next(),U.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(x,!0),this.state.strict&&re){let le=U.argument;le.type==="Identifier"?this.raise(v.StrictDelete,U):this.hasPropertyAsPrivateName(le)&&this.raise(v.DeletePrivateField,U)}if(!O)return m||this.checkExponentialAfterUnary(U),this.finishNode(U,"UnaryExpression")}let K=this.parseUpdate(U,O,x);if(k){let{type:re}=this.state;if((this.hasPlugin("v8intrinsic")?Pt(re):Pt(re)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,S),this.parseAwait(S)}return K}parseUpdate(x,m,S){if(m){let U=x;return this.checkLVal(U.argument,{in:this.finishNode(U,"UpdateExpression")}),x}let k=this.state.startLoc,O=this.parseExprSubscripts(S);if(this.checkExpressionErrors(S,!1))return O;for(;ge(this.state.type)&&!this.canInsertSemicolon();){let U=this.startNodeAt(k);U.operator=this.state.value,U.prefix=!1,U.argument=O,this.next(),this.checkLVal(O,{in:O=this.finishNode(U,"UpdateExpression")})}return O}parseExprSubscripts(x){let m=this.state.startLoc,S=this.state.potentialArrowAt,k=this.parseExprAtom(x);return this.shouldExitDescending(k,S)?k:this.parseSubscripts(k,m)}parseSubscripts(x,m,S){let k={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(x),stop:!1};do x=this.parseSubscript(x,m,S,k),k.maybeAsyncArrow=!1;while(!k.stop);return x}parseSubscript(x,m,S,k){let{type:O}=this.state;if(!S&&O===15)return this.parseBind(x,m,S,k);if(Te(O))return this.parseTaggedTemplateExpression(x,m,k);let U=!1;if(O===18){if(S&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return k.stop=!0,x;k.optionalChainMember=U=!0,this.next()}if(!S&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(x,m,k,U);{let K=this.eat(0);return K||U||this.eat(16)?this.parseMember(x,m,k,K,U):(k.stop=!0,x)}}parseMember(x,m,S,k,O){let U=this.startNodeAt(m);return U.object=x,U.computed=k,k?(U.property=this.parseExpression(),this.expect(3)):this.match(138)?(x.type==="Super"&&this.raise(v.SuperPrivateField,m),this.classScope.usePrivateName(this.state.value,this.state.startLoc),U.property=this.parsePrivateName()):U.property=this.parseIdentifier(!0),S.optionalChainMember?(U.optional=O,this.finishNode(U,"OptionalMemberExpression")):this.finishNode(U,"MemberExpression")}parseBind(x,m,S,k){let O=this.startNodeAt(m);return O.object=x,this.next(),O.callee=this.parseNoCallExpr(),k.stop=!0,this.parseSubscripts(this.finishNode(O,"BindExpression"),m,S)}parseCoverCallAndAsyncArrowHead(x,m,S,k){let O=this.state.maybeInArrowParameters,U=null;this.state.maybeInArrowParameters=!0,this.next();let K=this.startNodeAt(m);K.callee=x;let{maybeAsyncArrow:re,optionalChainMember:le}=S;re&&(this.expressionScope.enter(wh()),U=new wa),le&&(K.optional=k),k?K.arguments=this.parseCallExpressionArguments(11):K.arguments=this.parseCallExpressionArguments(11,x.type==="Import",x.type!=="Super",K,U);let ae=this.finishCallExpression(K,le);return re&&this.shouldParseAsyncArrow()&&!k?(S.stop=!0,this.checkDestructuringPrivate(U),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),ae=this.parseAsyncArrowFromCallExpression(this.startNodeAt(m),ae)):(re&&(this.checkExpressionErrors(U,!0),this.expressionScope.exit()),this.toReferencedArguments(ae)),this.state.maybeInArrowParameters=O,ae}toReferencedArguments(x,m){this.toReferencedListDeep(x.arguments,m)}parseTaggedTemplateExpression(x,m,S){let k=this.startNodeAt(m);return k.tag=x,k.quasi=this.parseTemplate(!0),S.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,m),this.finishNode(k,"TaggedTemplateExpression")}atPossibleAsyncArrow(x){return x.type==="Identifier"&&x.name==="async"&&this.state.lastTokEndLoc.index===x.end&&!this.canInsertSemicolon()&&x.end-x.start===5&&x.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(x,m){if(x.callee.type==="Import")if(x.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),x.arguments.length===0||x.arguments.length>2)this.raise(v.ImportCallArity,x,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let S of x.arguments)S.type==="SpreadElement"&&this.raise(v.ImportCallSpreadArgument,S);return this.finishNode(x,m?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(x,m,S,k,O){let U=[],K=!0,re=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(x);){if(K)K=!1;else if(this.expect(12),this.match(x)){m&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),k&&this.addTrailingCommaExtraToNode(k),this.next();break}U.push(this.parseExprListItem(!1,O,S))}return this.state.inFSharpPipelineDirectBody=re,U}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(x,m){var S;return this.resetPreviousNodeTrailingComments(m),this.expect(19),this.parseArrowExpression(x,m.arguments,!0,(S=m.extra)==null?void 0:S.trailingCommaLoc),m.innerComments&&ct(x,m.innerComments),m.callee.trailingComments&&ct(x,m.callee.trailingComments),x}parseNoCallExpr(){let x=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),x,!0)}parseExprAtom(x){let m,S=null,{type:k}=this.state;switch(k){case 79:return this.parseSuper();case 83:return m=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(m):this.match(10)?this.options.createImportExpressions?this.parseImportCall(m):this.finishNode(m,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(m,"Import"));case 78:return m=this.startNode(),this.next(),this.finishNode(m,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let O=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(O)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,x);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,x);case 68:return this.parseFunctionOrFunctionSent();case 26:S=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(S,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{m=this.startNode(),this.next(),m.object=null;let O=m.callee=this.parseNoCallExpr();if(O.type==="MemberExpression")return this.finishNode(m,"BindExpression");throw this.raise(v.UnsupportedBind,O)}case 138:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let O=this.getPluginOption("pipelineOperator","proposal");if(O)return this.parseTopicReference(O);this.unexpected();break}case 47:{let O=this.input.codePointAt(this.nextTokenStart());Rt(O)||O===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(me(k)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let O=this.state.potentialArrowAt===this.state.start,U=this.state.containsEsc,K=this.parseIdentifier();if(!U&&K.name==="async"&&!this.canInsertSemicolon()){let{type:re}=this.state;if(re===68)return this.resetPreviousNodeTrailingComments(K),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(K));if(me(re))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(K)):K;if(re===90)return this.resetPreviousNodeTrailingComments(K),this.parseDo(this.startNodeAtNode(K),!0)}return O&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(K),[K],!1)):K}else this.unexpected()}}parseTopicReferenceThenEqualsSign(x,m){let S=this.getPluginOption("pipelineOperator","proposal");if(S)return this.state.type=x,this.state.value=m,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(S);this.unexpected()}parseTopicReference(x){let m=this.startNode(),S=this.state.startLoc,k=this.state.type;return this.next(),this.finishTopicReference(m,S,x,k)}finishTopicReference(x,m,S,k){if(this.testTopicReferenceConfiguration(S,m,k)){let O=S==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(S==="smart"?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,m),this.registerTopicReference(),this.finishNode(x,O)}else throw this.raise(v.PipeTopicUnconfiguredToken,m,{token:Ne(k)})}testTopicReferenceConfiguration(x,m,S){switch(x){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ne(S)}]);case"smart":return S===27;default:throw this.raise(v.PipeTopicRequiresHackPipes,m)}}parseAsyncArrowUnaryFunction(x){this.prodParam.enter(ml(!0,this.prodParam.hasYield));let m=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(x,m,!0)}parseDo(x,m){this.expectPlugin("doExpressions"),m&&this.expectPlugin("asyncDoExpressions"),x.async=m,this.next();let S=this.state.labels;return this.state.labels=[],m?(this.prodParam.enter(2),x.body=this.parseBlock(),this.prodParam.exit()):x.body=this.parseBlock(),this.state.labels=S,this.finishNode(x,"DoExpression")}parseSuper(){let x=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(v.SuperNotAllowed,x):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,x),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,x),this.finishNode(x,"Super")}parsePrivateName(){let x=this.startNode(),m=this.startNodeAt(i(this.state.startLoc,1)),S=this.state.value;return this.next(),x.id=this.createIdentifier(m,S),this.finishNode(x,"PrivateName")}parseFunctionOrFunctionSent(){let x=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let m=this.createIdentifier(this.startNodeAtNode(x),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(x,m,"sent")}return this.parseFunction(x)}parseMetaProperty(x,m,S){x.meta=m;let k=this.state.containsEsc;return x.property=this.parseIdentifier(!0),(x.property.name!==S||k)&&this.raise(v.UnsupportedMetaProperty,x.property,{target:m.name,onlyValidPropertyName:S}),this.finishNode(x,"MetaProperty")}parseImportMetaProperty(x){let m=this.createIdentifier(this.startNodeAtNode(x),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(v.ImportMetaOutsideModule,m),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let S=this.isContextual(105);if(S||this.unexpected(),this.expectPlugin(S?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(v.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),x.phase=S?"source":"defer",this.parseImportCall(x)}return this.parseMetaProperty(x,m,"meta")}parseLiteralAtNode(x,m,S){return this.addExtra(S,"rawValue",x),this.addExtra(S,"raw",this.input.slice(S.start,this.state.end)),S.value=x,this.next(),this.finishNode(S,m)}parseLiteral(x,m){let S=this.startNode();return this.parseLiteralAtNode(x,m,S)}parseStringLiteral(x){return this.parseLiteral(x,"StringLiteral")}parseNumericLiteral(x){return this.parseLiteral(x,"NumericLiteral")}parseBigIntLiteral(x){return this.parseLiteral(x,"BigIntLiteral")}parseDecimalLiteral(x){return this.parseLiteral(x,"DecimalLiteral")}parseRegExpLiteral(x){let m=this.parseLiteral(x.value,"RegExpLiteral");return m.pattern=x.pattern,m.flags=x.flags,m}parseBooleanLiteral(x){let m=this.startNode();return m.value=x,this.next(),this.finishNode(m,"BooleanLiteral")}parseNullLiteral(){let x=this.startNode();return this.next(),this.finishNode(x,"NullLiteral")}parseParenAndDistinguishExpression(x){let m=this.state.startLoc,S;this.next(),this.expressionScope.enter(Ho());let k=this.state.maybeInArrowParameters,O=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let U=this.state.startLoc,K=[],re=new wa,le=!0,ae,Pe;for(;!this.match(11);){if(le)le=!1;else if(this.expect(12,re.optionalParametersLoc===null?null:re.optionalParametersLoc),this.match(11)){Pe=this.state.startLoc;break}if(this.match(21)){let nt=this.state.startLoc;if(ae=this.state.startLoc,K.push(this.parseParenItem(this.parseRestBinding(),nt)),!this.checkCommaAfterRest(41))break}else K.push(this.parseMaybeAssignAllowIn(re,this.parseParenItem))}let Ve=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=k,this.state.inFSharpPipelineDirectBody=O;let at=this.startNodeAt(m);return x&&this.shouldParseArrow(K)&&(at=this.parseArrow(at))?(this.checkDestructuringPrivate(re),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(at,K,!1),at):(this.expressionScope.exit(),K.length||this.unexpected(this.state.lastTokStartLoc),Pe&&this.unexpected(Pe),ae&&this.unexpected(ae),this.checkExpressionErrors(re,!0),this.toReferencedListDeep(K,!0),K.length>1?(S=this.startNodeAt(U),S.expressions=K,this.finishNode(S,"SequenceExpression"),this.resetEndLocation(S,Ve)):S=K[0],this.wrapParenthesis(m,S))}wrapParenthesis(x,m){if(!this.options.createParenthesizedExpressions)return this.addExtra(m,"parenthesized",!0),this.addExtra(m,"parenStart",x.index),this.takeSurroundingComments(m,x.index,this.state.lastTokEndLoc.index),m;let S=this.startNodeAt(x);return S.expression=m,this.finishNode(S,"ParenthesizedExpression")}shouldParseArrow(x){return!this.canInsertSemicolon()}parseArrow(x){if(this.eat(19))return x}parseParenItem(x,m){return x}parseNewOrNewTarget(){let x=this.startNode();if(this.next(),this.match(16)){let m=this.createIdentifier(this.startNodeAtNode(x),"new");this.next();let S=this.parseMetaProperty(x,m,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,S),S}return this.parseNew(x)}parseNew(x){if(this.parseNewCallee(x),this.eat(10)){let m=this.parseExprList(11);this.toReferencedList(m),x.arguments=m}else x.arguments=[];return this.finishNode(x,"NewExpression")}parseNewCallee(x){let m=this.match(83),S=this.parseNoCallExpr();x.callee=S,m&&(S.type==="Import"||S.type==="ImportExpression")&&this.raise(v.ImportCallNotNewExpression,S)}parseTemplateElement(x){let{start:m,startLoc:S,end:k,value:O}=this.state,U=m+1,K=this.startNodeAt(i(S,1));O===null&&(x||this.raise(v.InvalidEscapeSequenceTemplate,i(this.state.firstInvalidTemplateEscapePos,1)));let re=this.match(24),le=re?-1:-2,ae=k+le;K.value={raw:this.input.slice(U,ae).replace(/\r\n?/g,` +`),cooked:O===null?null:O.slice(1,le)},K.tail=re,this.next();let Pe=this.finishNode(K,"TemplateElement");return this.resetEndLocation(Pe,i(this.state.lastTokEndLoc,le)),Pe}parseTemplate(x){let m=this.startNode();m.expressions=[];let S=this.parseTemplateElement(x);for(m.quasis=[S];!S.tail;)m.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),m.quasis.push(S=this.parseTemplateElement(x));return this.finishNode(m,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(x,m,S,k){S&&this.expectPlugin("recordAndTuple");let O=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let U=Object.create(null),K=!0,re=this.startNode();for(re.properties=[],this.next();!this.match(x);){if(K)K=!1;else if(this.expect(12),this.match(x)){this.addTrailingCommaExtraToNode(re);break}let ae;m?ae=this.parseBindingProperty():(ae=this.parsePropertyDefinition(k),this.checkProto(ae,S,U,k)),S&&!this.isObjectProperty(ae)&&ae.type!=="SpreadElement"&&this.raise(v.InvalidRecordProperty,ae),ae.shorthand&&this.addExtra(ae,"shorthand",!0),re.properties.push(ae)}this.next(),this.state.inFSharpPipelineDirectBody=O;let le="ObjectExpression";return m?le="ObjectPattern":S&&(le="RecordExpression"),this.finishNode(re,le)}addTrailingCommaExtraToNode(x){this.addExtra(x,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(x,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(x){return!x.computed&&x.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(x){let m=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)m.push(this.parseDecorator());let S=this.startNode(),k=!1,O=!1,U;if(this.match(21))return m.length&&this.unexpected(),this.parseSpread();m.length&&(S.decorators=m,m=[]),S.method=!1,x&&(U=this.state.startLoc);let K=this.eat(55);this.parsePropertyNamePrefixOperator(S);let re=this.state.containsEsc,le=this.parsePropertyName(S,x);if(!K&&!re&&this.maybeAsyncOrAccessorProp(S)){let ae=le.name;ae==="async"&&!this.hasPrecedingLineBreak()&&(k=!0,this.resetPreviousNodeTrailingComments(le),K=this.eat(55),this.parsePropertyName(S)),(ae==="get"||ae==="set")&&(O=!0,this.resetPreviousNodeTrailingComments(le),S.kind=ae,this.match(55)&&(K=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:ae}),this.next()),this.parsePropertyName(S))}return this.parseObjPropValue(S,U,K,k,!1,O,x)}getGetterSetterExpectedParamCount(x){return x.kind==="get"?0:1}getObjectOrClassMethodParams(x){return x.params}checkGetterSetterParams(x){var m;let S=this.getGetterSetterExpectedParamCount(x),k=this.getObjectOrClassMethodParams(x);k.length!==S&&this.raise(x.kind==="get"?v.BadGetterArity:v.BadSetterArity,x),x.kind==="set"&&((m=k[k.length-1])==null?void 0:m.type)==="RestElement"&&this.raise(v.BadSetterRestParameter,x)}parseObjectMethod(x,m,S,k,O){if(O){let U=this.parseMethod(x,m,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(U),U}if(S||m||this.match(10))return k&&this.unexpected(),x.kind="method",x.method=!0,this.parseMethod(x,m,S,!1,!1,"ObjectMethod")}parseObjectProperty(x,m,S,k){if(x.shorthand=!1,this.eat(14))return x.value=S?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(k),this.finishNode(x,"ObjectProperty");if(!x.computed&&x.key.type==="Identifier"){if(this.checkReservedWord(x.key.name,x.key.loc.start,!0,!1),S)x.value=this.parseMaybeDefault(m,es(x.key));else if(this.match(29)){let O=this.state.startLoc;k!=null?k.shorthandAssignLoc===null&&(k.shorthandAssignLoc=O):this.raise(v.InvalidCoverInitializedName,O),x.value=this.parseMaybeDefault(m,es(x.key))}else x.value=es(x.key);return x.shorthand=!0,this.finishNode(x,"ObjectProperty")}}parseObjPropValue(x,m,S,k,O,U,K){let re=this.parseObjectMethod(x,S,k,O,U)||this.parseObjectProperty(x,m,O,K);return re||this.unexpected(),re}parsePropertyName(x,m){if(this.eat(0))x.computed=!0,x.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:S,value:k}=this.state,O;if(je(S))O=this.parseIdentifier(!0);else switch(S){case 134:O=this.parseNumericLiteral(k);break;case 133:O=this.parseStringLiteral(k);break;case 135:O=this.parseBigIntLiteral(k);break;case 136:O=this.parseDecimalLiteral(k);break;case 138:{let U=this.state.startLoc;m!=null?m.privateKeyLoc===null&&(m.privateKeyLoc=U):this.raise(v.UnexpectedPrivateField,U),O=this.parsePrivateName();break}default:this.unexpected()}x.key=O,S!==138&&(x.computed=!1)}return x.key}initFunction(x,m){x.id=null,x.generator=!1,x.async=m}parseMethod(x,m,S,k,O,U,K=!1){this.initFunction(x,S),x.generator=m,this.scope.enter(18|(K?64:0)|(O?32:0)),this.prodParam.enter(ml(S,x.generator)),this.parseFunctionParams(x,k);let re=this.parseFunctionBodyAndFinish(x,U,!0);return this.prodParam.exit(),this.scope.exit(),re}parseArrayLike(x,m,S,k){S&&this.expectPlugin("recordAndTuple");let O=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let U=this.startNode();return this.next(),U.elements=this.parseExprList(x,!S,k,U),this.state.inFSharpPipelineDirectBody=O,this.finishNode(U,S?"TupleExpression":"ArrayExpression")}parseArrowExpression(x,m,S,k){this.scope.enter(6);let O=ml(S,!1);!this.match(5)&&this.prodParam.hasIn&&(O|=8),this.prodParam.enter(O),this.initFunction(x,S);let U=this.state.maybeInArrowParameters;return m&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(x,m,k)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(x,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=U,this.finishNode(x,"ArrowFunctionExpression")}setArrowFunctionParameters(x,m,S){this.toAssignableList(m,S,!1),x.params=m}parseFunctionBodyAndFinish(x,m,S=!1){return this.parseFunctionBody(x,!1,S),this.finishNode(x,m)}parseFunctionBody(x,m,S=!1){let k=m&&!this.match(5);if(this.expressionScope.enter(Ru()),k)x.body=this.parseMaybeAssign(),this.checkParams(x,!1,m,!1);else{let O=this.state.strict,U=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),x.body=this.parseBlock(!0,!1,K=>{let re=!this.isSimpleParamList(x.params);K&&re&&this.raise(v.IllegalLanguageModeDirective,(x.kind==="method"||x.kind==="constructor")&&x.key?x.key.loc.end:x);let le=!O&&this.state.strict;this.checkParams(x,!this.state.strict&&!m&&!S&&!re,m,le),this.state.strict&&x.id&&this.checkIdentifier(x.id,65,le)}),this.prodParam.exit(),this.state.labels=U}this.expressionScope.exit()}isSimpleParameter(x){return x.type==="Identifier"}isSimpleParamList(x){for(let m=0,S=x.length;m10||!tt(x))){if(S&&Se(x)){this.raise(v.UnexpectedKeyword,m,{keyword:x});return}if((this.state.strict?k?ye:On:Ln)(x,this.inModule)){this.raise(v.UnexpectedReservedWord,m,{reservedWord:x});return}else if(x==="yield"){if(this.prodParam.hasYield){this.raise(v.YieldBindingIdentifier,m);return}}else if(x==="await"){if(this.prodParam.hasAwait){this.raise(v.AwaitBindingIdentifier,m);return}if(this.scope.inStaticBlock){this.raise(v.AwaitBindingIdentifierInStaticBlock,m);return}this.expressionScope.recordAsyncArrowParametersError(m)}else if(x==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(v.ArgumentsInClass,m);return}}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(x){let m=this.startNodeAt(x);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,m),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,m),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(m.argument=this.parseMaybeUnary(null,!0)),this.finishNode(m,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:x}=this.state;return x===53||x===10||x===0||Te(x)||x===102&&!this.state.containsEsc||x===137||x===56||this.hasPlugin("v8intrinsic")&&x===54}parseYield(){let x=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,x),this.next();let m=!1,S=null;if(!this.hasPrecedingLineBreak())switch(m=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!m)break;default:S=this.parseMaybeAssign()}return x.delegate=m,x.argument=S,this.finishNode(x,"YieldExpression")}parseImportCall(x){return this.next(),x.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(x.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(x.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(x,"ImportExpression")}checkPipelineAtInfixOperator(x,m){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&x.type==="SequenceExpression"&&this.raise(v.PipelineHeadSequenceExpression,m)}parseSmartPipelineBodyInStyle(x,m){if(this.isSimpleReference(x)){let S=this.startNodeAt(m);return S.callee=x,this.finishNode(S,"PipelineBareFunction")}else{let S=this.startNodeAt(m);return this.checkSmartPipeTopicBodyEarlyErrors(m),S.expression=x,this.finishNode(S,"PipelineTopicExpression")}}isSimpleReference(x){switch(x.type){case"MemberExpression":return!x.computed&&this.isSimpleReference(x.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(x){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,x)}withTopicBindingContext(x){let m=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=m}}withSmartMixTopicForbiddingContext(x){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let m=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return x()}finally{this.state.topicContext=m}}else return x()}withSoloAwaitPermittingContext(x){let m=this.state.soloAwait;this.state.soloAwait=!0;try{return x()}finally{this.state.soloAwait=m}}allowInAnd(x){let m=this.prodParam.currentFlags();if(8&~m){this.prodParam.enter(m|8);try{return x()}finally{this.prodParam.exit()}}return x()}disallowInAnd(x){let m=this.prodParam.currentFlags();if(8&m){this.prodParam.enter(m&-9);try{return x()}finally{this.prodParam.exit()}}return x()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(x){let m=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let S=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let k=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),m,x);return this.state.inFSharpPipelineDirectBody=S,k}parseModuleExpression(){this.expectPlugin("moduleBlocks");let x=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let m=this.startNodeAt(this.state.endLoc);this.next();let S=this.initializeScopes(!0);this.enterInitialScopes();try{x.body=this.parseProgram(m,8,"module")}finally{S()}return this.finishNode(x,"ModuleExpression")}parsePropertyNamePrefixOperator(x){}},Zf={kind:1},xx={kind:2},wx=/[\uD800-\uDFFF]/u,Qf=/in(?:stanceof)?/y;function Sx(x,m){for(let S=0;S0)for(let[O,U]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,U,{localName:O});let k;return m===139?k=this.finishNode(x,"Program"):k=this.finishNodeAt(x,"Program",i(this.state.startLoc,-1)),k}stmtToDirective(x){let m=x;m.type="Directive",m.value=m.expression,delete m.expression;let S=m.value,k=S.value,O=this.input.slice(S.start,S.end),U=S.value=O.slice(1,-1);return this.addExtra(S,"raw",O),this.addExtra(S,"rawValue",U),this.addExtra(S,"expressionValue",k),S.type="DirectiveLiteral",m}parseInterpreterDirective(){if(!this.match(28))return null;let x=this.startNode();return x.value=this.state.value,this.next(),this.finishNode(x,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(x,m){if(Rt(x)){if(Qf.lastIndex=m,Qf.test(this.input)){let S=this.codePointAtPos(Qf.lastIndex);if(!sr(S)&&S!==92)return!1}return!0}else return x===92}chStartsBindingPattern(x){return x===91||x===123}hasFollowingBindingAtom(){let x=this.nextTokenStart(),m=this.codePointAtPos(x);return this.chStartsBindingPattern(m)||this.chStartsBindingIdentifier(m,x)}hasInLineFollowingBindingIdentifier(){let x=this.nextTokenInLineStart(),m=this.codePointAtPos(x);return this.chStartsBindingIdentifier(m,x)}startsUsingForOf(){let{type:x,containsEsc:m}=this.lookahead();if(x===102&&!m)return!1;if(me(x)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let x=this.nextTokenInLineStart();if(this.isUnparsedContextual(x,"using")){x=this.nextTokenInLineStartSince(x+5);let m=this.codePointAtPos(x);if(this.chStartsBindingIdentifier(m,x))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(x=!1){let m=0;return this.options.annexB&&!this.state.strict&&(m|=4,x&&(m|=8)),this.parseStatementLike(m)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(x){let m=null;return this.match(26)&&(m=this.parseDecorators(!0)),this.parseStatementContent(x,m)}parseStatementContent(x,m){let S=this.state.type,k=this.startNode(),O=!!(x&2),U=!!(x&4),K=x&1;switch(S){case 60:return this.parseBreakContinueStatement(k,!0);case 63:return this.parseBreakContinueStatement(k,!1);case 64:return this.parseDebuggerStatement(k);case 90:return this.parseDoWhileStatement(k);case 91:return this.parseForStatement(k);case 68:if(this.lookaheadCharCode()===46)break;return U||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(k,!1,!O&&U);case 80:return O||this.unexpected(),this.parseClass(this.maybeTakeDecorators(m,k),!0);case 69:return this.parseIfStatement(k);case 70:return this.parseReturnStatement(k);case 71:return this.parseSwitchStatement(k);case 72:return this.parseThrowStatement(k);case 73:return this.parseTryStatement(k);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?O||this.raise(v.UnexpectedLexicalDeclaration,k):this.raise(v.AwaitUsingNotInAsyncContext,k),this.next(),this.parseVarStatement(k,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc):O||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(k,"using");case 100:{if(this.state.containsEsc)break;let ae=this.nextTokenStart(),Pe=this.codePointAtPos(ae);if(Pe!==91&&(!O&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(Pe,ae)&&Pe!==123))break}case 75:O||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let ae=this.state.value;return this.parseVarStatement(k,ae)}case 92:return this.parseWhileStatement(k);case 76:return this.parseWithStatement(k);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(k);case 83:{let ae=this.lookaheadCharCode();if(ae===40||ae===46)break}case 82:{!this.options.allowImportExportEverywhere&&!K&&this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next();let ae;return S===83?(ae=this.parseImport(k),ae.type==="ImportDeclaration"&&(!ae.importKind||ae.importKind==="value")&&(this.sawUnambiguousESM=!0)):(ae=this.parseExport(k,m),(ae.type==="ExportNamedDeclaration"&&(!ae.exportKind||ae.exportKind==="value")||ae.type==="ExportAllDeclaration"&&(!ae.exportKind||ae.exportKind==="value")||ae.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(ae),ae}default:if(this.isAsyncFunction())return O||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(k,!0,!O&&U)}let re=this.state.value,le=this.parseExpression();return me(S)&&le.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(k,re,le,x):this.parseExpressionStatement(k,le,m)}assertModuleNodeAllowed(x){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,x)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(x,m,S){return x&&(m.decorators&&m.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(v.DecoratorsBeforeAfterExport,m.decorators[0]),m.decorators.unshift(...x)):m.decorators=x,this.resetStartLocationFromNode(m,x[0]),S&&this.resetStartLocationFromNode(S,m)),m}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(x){let m=[];do m.push(this.parseDecorator());while(this.match(26));if(this.match(82))x||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return m}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let x=this.startNode();if(this.next(),this.hasPlugin("decorators")){let m=this.state.startLoc,S;if(this.match(10)){let k=this.state.startLoc;this.next(),S=this.parseExpression(),this.expect(11),S=this.wrapParenthesis(k,S);let O=this.state.startLoc;x.expression=this.parseMaybeDecoratorArguments(S),this.getPluginOption("decorators","allowCallParenthesized")===!1&&x.expression!==S&&this.raise(v.DecoratorArgumentsOutsideParentheses,O)}else{for(S=this.parseIdentifier(!1);this.eat(16);){let k=this.startNodeAt(m);k.object=S,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),k.property=this.parsePrivateName()):k.property=this.parseIdentifier(!0),k.computed=!1,S=this.finishNode(k,"MemberExpression")}x.expression=this.parseMaybeDecoratorArguments(S)}}else x.expression=this.parseExprSubscripts();return this.finishNode(x,"Decorator")}parseMaybeDecoratorArguments(x){if(this.eat(10)){let m=this.startNodeAtNode(x);return m.callee=x,m.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(m.arguments),this.finishNode(m,"CallExpression")}return x}parseBreakContinueStatement(x,m){return this.next(),this.isLineTerminator()?x.label=null:(x.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(x,m),this.finishNode(x,m?"BreakStatement":"ContinueStatement")}verifyBreakContinue(x,m){let S;for(S=0;Sthis.parseStatement()),this.state.labels.pop(),this.expect(92),x.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(x,"DoWhileStatement")}parseForStatement(x){this.next(),this.state.labels.push(Zf);let m=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(m=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return m!==null&&this.unexpected(m),this.parseFor(x,null);let S=this.isContextual(100);{let re=this.isContextual(96)&&this.startsAwaitUsing(),le=re||this.isContextual(107)&&this.startsUsingForOf(),ae=S&&this.hasFollowingBindingAtom()||le;if(this.match(74)||this.match(75)||ae){let Pe=this.startNode(),Ve;re?(Ve="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):Ve=this.state.value,this.next(),this.parseVar(Pe,!0,Ve);let at=this.finishNode(Pe,"VariableDeclaration"),nt=this.match(58);return nt&&le&&this.raise(v.ForInUsing,at),(nt||this.isContextual(102))&&at.declarations.length===1?this.parseForIn(x,at,m):(m!==null&&this.unexpected(m),this.parseFor(x,at))}}let k=this.isContextual(95),O=new wa,U=this.parseExpression(!0,O),K=this.isContextual(102);if(K&&(S&&this.raise(v.ForOfLet,U),m===null&&k&&U.type==="Identifier"&&this.raise(v.ForOfAsync,U)),K||this.match(58)){this.checkDestructuringPrivate(O),this.toAssignable(U,!0);let re=K?"ForOfStatement":"ForInStatement";return this.checkLVal(U,{in:{type:re}}),this.parseForIn(x,U,m)}else this.checkExpressionErrors(O,!0);return m!==null&&this.unexpected(m),this.parseFor(x,U)}parseFunctionStatement(x,m,S){return this.next(),this.parseFunction(x,1|(S?2:0)|(m?8:0))}parseIfStatement(x){return this.next(),x.test=this.parseHeaderExpression(),x.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),x.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(x,"IfStatement")}parseReturnStatement(x){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?x.argument=null:(x.argument=this.parseExpression(),this.semicolon()),this.finishNode(x,"ReturnStatement")}parseSwitchStatement(x){this.next(),x.discriminant=this.parseHeaderExpression();let m=x.cases=[];this.expect(5),this.state.labels.push(xx),this.scope.enter(0);let S;for(let k;!this.match(8);)if(this.match(61)||this.match(65)){let O=this.match(61);S&&this.finishNode(S,"SwitchCase"),m.push(S=this.startNode()),S.consequent=[],this.next(),O?S.test=this.parseExpression():(k&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),k=!0,S.test=null),this.expect(14)}else S?S.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),S&&this.finishNode(S,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(x,"SwitchStatement")}parseThrowStatement(x){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),x.argument=this.parseExpression(),this.semicolon(),this.finishNode(x,"ThrowStatement")}parseCatchClauseParam(){let x=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&x.type==="Identifier"?8:0),this.checkLVal(x,{in:{type:"CatchClause"},binding:9}),x}parseTryStatement(x){if(this.next(),x.block=this.parseBlock(),x.handler=null,this.match(62)){let m=this.startNode();this.next(),this.match(10)?(this.expect(10),m.param=this.parseCatchClauseParam(),this.expect(11)):(m.param=null,this.scope.enter(0)),m.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),x.handler=this.finishNode(m,"CatchClause")}return x.finalizer=this.eat(67)?this.parseBlock():null,!x.handler&&!x.finalizer&&this.raise(v.NoCatchOrFinally,x),this.finishNode(x,"TryStatement")}parseVarStatement(x,m,S=!1){return this.next(),this.parseVar(x,!1,m,S),this.semicolon(),this.finishNode(x,"VariableDeclaration")}parseWhileStatement(x){return this.next(),x.test=this.parseHeaderExpression(),this.state.labels.push(Zf),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(x,"WhileStatement")}parseWithStatement(x){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),x.object=this.parseHeaderExpression(),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(x,"WithStatement")}parseEmptyStatement(x){return this.next(),this.finishNode(x,"EmptyStatement")}parseLabeledStatement(x,m,S,k){for(let U of this.state.labels)U.name===m&&this.raise(v.LabelRedeclaration,S,{labelName:m});let O=De(this.state.type)?1:this.match(71)?2:null;for(let U=this.state.labels.length-1;U>=0;U--){let K=this.state.labels[U];if(K.statementStart===x.start)K.statementStart=this.state.start,K.kind=O;else break}return this.state.labels.push({name:m,kind:O,statementStart:this.state.start}),x.body=k&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),x.label=S,this.finishNode(x,"LabeledStatement")}parseExpressionStatement(x,m,S){return x.expression=m,this.semicolon(),this.finishNode(x,"ExpressionStatement")}parseBlock(x=!1,m=!0,S){let k=this.startNode();return x&&this.state.strictErrors.clear(),this.expect(5),m&&this.scope.enter(0),this.parseBlockBody(k,x,!1,8,S),m&&this.scope.exit(),this.finishNode(k,"BlockStatement")}isValidDirective(x){return x.type==="ExpressionStatement"&&x.expression.type==="StringLiteral"&&!x.expression.extra.parenthesized}parseBlockBody(x,m,S,k,O){let U=x.body=[],K=x.directives=[];this.parseBlockOrModuleBlockBody(U,m?K:void 0,S,k,O)}parseBlockOrModuleBlockBody(x,m,S,k,O){let U=this.state.strict,K=!1,re=!1;for(;!this.match(k);){let le=S?this.parseModuleItem():this.parseStatementListItem();if(m&&!re){if(this.isValidDirective(le)){let ae=this.stmtToDirective(le);m.push(ae),!K&&ae.value.value==="use strict"&&(K=!0,this.setStrict(!0));continue}re=!0,this.state.strictErrors.clear()}x.push(le)}O==null||O.call(this,K),U||this.setStrict(!1),this.next()}parseFor(x,m){return x.init=m,this.semicolon(!1),x.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),x.update=this.match(11)?null:this.parseExpression(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,"ForStatement")}parseForIn(x,m,S){let k=this.match(58);return this.next(),k?S!==null&&this.unexpected(S):x.await=S!==null,m.type==="VariableDeclaration"&&m.declarations[0].init!=null&&(!k||!this.options.annexB||this.state.strict||m.kind!=="var"||m.declarations[0].id.type!=="Identifier")&&this.raise(v.ForInOfLoopInitializer,m,{type:k?"ForInStatement":"ForOfStatement"}),m.type==="AssignmentPattern"&&this.raise(v.InvalidLhs,m,{ancestor:{type:"ForStatement"}}),x.left=m,x.right=k?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),x.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(x,k?"ForInStatement":"ForOfStatement")}parseVar(x,m,S,k=!1){let O=x.declarations=[];for(x.kind=S;;){let U=this.startNode();if(this.parseVarId(U,S),U.init=this.eat(29)?m?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,U.init===null&&!k&&(U.id.type!=="Identifier"&&!(m&&(this.match(58)||this.isContextual(102)))?this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):S==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),O.push(this.finishNode(U,"VariableDeclarator")),!this.eat(12))break}return x}parseVarId(x,m){let S=this.parseBindingAtom();this.checkLVal(S,{in:{type:"VariableDeclarator"},binding:m==="var"?5:8201}),x.id=S}parseAsyncFunctionExpression(x){return this.parseFunction(x,8)}parseFunction(x,m=0){let S=m&2,k=!!(m&1),O=k&&!(m&4),U=!!(m&8);this.initFunction(x,U),this.match(55)&&(S&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),x.generator=!0),k&&(x.id=this.parseFunctionId(O));let K=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ml(U,x.generator)),k||(x.id=this.parseFunctionId()),this.parseFunctionParams(x,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(x,k?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),k&&!S&&this.registerFunctionStatementId(x),this.state.maybeInArrowParameters=K,x}parseFunctionId(x){return x||me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(x,m){this.expect(10),this.expressionScope.enter(xh()),x.params=this.parseBindingList(11,41,2|(m?4:0)),this.expressionScope.exit()}registerFunctionStatementId(x){x.id&&this.scope.declareName(x.id.name,!this.options.annexB||this.state.strict||x.generator||x.async?this.scope.treatFunctionsAsVar?5:8201:17,x.id.loc.start)}parseClass(x,m,S){this.next();let k=this.state.strict;return this.state.strict=!0,this.parseClassId(x,m,S),this.parseClassSuper(x),x.body=this.parseClassBody(!!x.superClass,k),this.finishNode(x,m?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(x){return!x.computed&&!x.static&&(x.key.name==="constructor"||x.key.value==="constructor")}parseClassBody(x,m){this.classScope.enter();let S={hadConstructor:!1,hadSuperClass:x},k=[],O=this.startNode();if(O.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(k.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){k.push(this.parseDecorator());continue}let U=this.startNode();k.length&&(U.decorators=k,this.resetStartLocationFromNode(U,k[0]),k=[]),this.parseClassMember(O,U,S),U.kind==="constructor"&&U.decorators&&U.decorators.length>0&&this.raise(v.DecoratorConstructor,U)}}),this.state.strict=m,this.next(),k.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(O,"ClassBody")}parseClassMemberFromModifier(x,m){let S=this.parseIdentifier(!0);if(this.isClassMethod()){let k=m;return k.kind="method",k.computed=!1,k.key=S,k.static=!1,this.pushClassMethod(x,k,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let k=m;return k.computed=!1,k.key=S,k.static=!1,x.body.push(this.parseClassProperty(k)),!0}return this.resetPreviousNodeTrailingComments(S),!1}parseClassMember(x,m,S){let k=this.isContextual(106);if(k){if(this.parseClassMemberFromModifier(x,m))return;if(this.eat(5)){this.parseClassStaticBlock(x,m);return}}this.parseClassMemberWithIsStatic(x,m,S,k)}parseClassMemberWithIsStatic(x,m,S,k){let O=m,U=m,K=m,re=m,le=m,ae=O,Pe=O;if(m.static=k,this.parsePropertyNamePrefixOperator(m),this.eat(55)){ae.kind="method";let gr=this.match(138);if(this.parseClassElementName(ae),gr){this.pushClassPrivateMethod(x,U,!0,!1);return}this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsGenerator,O.key),this.pushClassMethod(x,O,!0,!1,!1,!1);return}let Ve=me(this.state.type)&&!this.state.containsEsc,at=this.match(138),nt=this.parseClassElementName(m),xr=this.state.startLoc;if(this.parsePostMemberNameModifiers(Pe),this.isClassMethod()){if(ae.kind="method",at){this.pushClassPrivateMethod(x,U,!1,!1);return}let gr=this.isNonstaticConstructor(O),wn=!1;gr&&(O.kind="constructor",S.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,nt),gr&&this.hasPlugin("typescript")&&m.override&&this.raise(v.OverrideOnConstructor,nt),S.hadConstructor=!0,wn=S.hadSuperClass),this.pushClassMethod(x,O,!1,!1,gr,wn)}else if(this.isClassProperty())at?this.pushClassPrivateProperty(x,re):this.pushClassProperty(x,K);else if(Ve&&nt.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(nt);let gr=this.eat(55);Pe.optional&&this.unexpected(xr),ae.kind="method";let wn=this.match(138);this.parseClassElementName(ae),this.parsePostMemberNameModifiers(Pe),wn?this.pushClassPrivateMethod(x,U,gr,!0):(this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsAsync,O.key),this.pushClassMethod(x,O,gr,!0,!1,!1))}else if(Ve&&(nt.name==="get"||nt.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(nt),ae.kind=nt.name;let gr=this.match(138);this.parseClassElementName(O),gr?this.pushClassPrivateMethod(x,U,!1,!1):(this.isNonstaticConstructor(O)&&this.raise(v.ConstructorIsAccessor,O.key),this.pushClassMethod(x,O,!1,!1,!1,!1)),this.checkGetterSetterParams(O)}else if(Ve&&nt.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(nt);let gr=this.match(138);this.parseClassElementName(K),this.pushClassAccessorProperty(x,le,gr)}else this.isLineTerminator()?at?this.pushClassPrivateProperty(x,re):this.pushClassProperty(x,K):this.unexpected()}parseClassElementName(x){let{type:m,value:S}=this.state;if((m===132||m===133)&&x.static&&S==="prototype"&&this.raise(v.StaticPrototype,this.state.startLoc),m===138){S==="constructor"&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);let k=this.parsePrivateName();return x.key=k,k}return this.parsePropertyName(x)}parseClassStaticBlock(x,m){var S;this.scope.enter(208);let k=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let O=m.body=[];this.parseBlockOrModuleBlockBody(O,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=k,x.body.push(this.finishNode(m,"StaticBlock")),(S=m.decorators)!=null&&S.length&&this.raise(v.DecoratorStaticBlock,m)}pushClassProperty(x,m){!m.computed&&(m.key.name==="constructor"||m.key.value==="constructor")&&this.raise(v.ConstructorClassField,m.key),x.body.push(this.parseClassProperty(m))}pushClassPrivateProperty(x,m){let S=this.parseClassPrivateProperty(m);x.body.push(S),this.classScope.declarePrivateName(this.getPrivateNameSV(S.key),0,S.key.loc.start)}pushClassAccessorProperty(x,m,S){if(!S&&!m.computed){let O=m.key;(O.name==="constructor"||O.value==="constructor")&&this.raise(v.ConstructorClassField,O)}let k=this.parseClassAccessorProperty(m);x.body.push(k),S&&this.classScope.declarePrivateName(this.getPrivateNameSV(k.key),0,k.key.loc.start)}pushClassMethod(x,m,S,k,O,U){x.body.push(this.parseMethod(m,S,k,O,U,"ClassMethod",!0))}pushClassPrivateMethod(x,m,S,k){let O=this.parseMethod(m,S,k,!1,!1,"ClassPrivateMethod",!0);x.body.push(O);let U=O.kind==="get"?O.static?6:2:O.kind==="set"?O.static?5:1:0;this.declareClassPrivateMethodInScope(O,U)}declareClassPrivateMethodInScope(x,m){this.classScope.declarePrivateName(this.getPrivateNameSV(x.key),m,x.key.loc.start)}parsePostMemberNameModifiers(x){}parseClassPrivateProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassPrivateProperty")}parseClassProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassProperty")}parseClassAccessorProperty(x){return this.parseInitializer(x),this.semicolon(),this.finishNode(x,"ClassAccessorProperty")}parseInitializer(x){this.scope.enter(80),this.expressionScope.enter(Ru()),this.prodParam.enter(0),x.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(x,m,S,k=8331){if(me(this.state.type))x.id=this.parseIdentifier(),m&&this.declareNameFromIdentifier(x.id,k);else if(S||!m)x.id=null;else throw this.raise(v.MissingClassName,this.state.startLoc)}parseClassSuper(x){x.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(x,m){let S=this.parseMaybeImportPhase(x,!0),k=this.maybeParseExportDefaultSpecifier(x,S),O=!k||this.eat(12),U=O&&this.eatExportStar(x),K=U&&this.maybeParseExportNamespaceSpecifier(x),re=O&&(!K||this.eat(12)),le=k||U;if(U&&!K){if(k&&this.unexpected(),m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.parseExportFrom(x,!0),this.finishNode(x,"ExportAllDeclaration")}let ae=this.maybeParseExportNamedSpecifiers(x);k&&O&&!U&&!ae&&this.unexpected(null,5),K&&re&&this.unexpected(null,98);let Pe;if(le||ae){if(Pe=!1,m)throw this.raise(v.UnsupportedDecoratorExport,x);this.parseExportFrom(x,le)}else Pe=this.maybeParseExportDeclaration(x);if(le||ae||Pe){var Ve;let at=x;if(this.checkExport(at,!0,!1,!!at.source),((Ve=at.declaration)==null?void 0:Ve.type)==="ClassDeclaration")this.maybeTakeDecorators(m,at.declaration,at);else if(m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.finishNode(at,"ExportNamedDeclaration")}if(this.eat(65)){let at=x,nt=this.parseExportDefaultExpression();if(at.declaration=nt,nt.type==="ClassDeclaration")this.maybeTakeDecorators(m,nt,at);else if(m)throw this.raise(v.UnsupportedDecoratorExport,x);return this.checkExport(at,!0,!0),this.finishNode(at,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(x){return this.eat(55)}maybeParseExportDefaultSpecifier(x,m){if(m||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",m==null?void 0:m.loc.start);let S=m||this.parseIdentifier(!0),k=this.startNodeAtNode(S);return k.exported=S,x.specifiers=[this.finishNode(k,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(x){if(this.isContextual(93)){x.specifiers||(x.specifiers=[]);let m=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),m.exported=this.parseModuleExportName(),x.specifiers.push(this.finishNode(m,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(x){if(this.match(5)){x.specifiers||(x.specifiers=[]);let m=x.exportKind==="type";return x.specifiers.push(...this.parseExportSpecifiers(m)),x.source=null,x.declaration=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),!0}return!1}maybeParseExportDeclaration(x){return this.shouldParseExportDeclaration()?(x.specifiers=[],x.source=null,this.hasPlugin("importAssertions")&&(x.assertions=[]),x.declaration=this.parseExportDeclaration(x),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let x=this.nextTokenInLineStart();return this.isUnparsedContextual(x,"function")}parseExportDefaultExpression(){let x=this.startNode();if(this.match(68))return this.next(),this.parseFunction(x,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(x,13);if(this.match(80))return this.parseClass(x,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);let m=this.parseMaybeAssignAllowIn();return this.semicolon(),m}parseExportDeclaration(x){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:x}=this.state;if(me(x)){if(x===95&&!this.state.containsEsc||x===100)return!1;if((x===130||x===129)&&!this.state.containsEsc){let{type:k}=this.lookahead();if(me(k)&&k!==98||k===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let m=this.nextTokenStart(),S=this.isUnparsedContextual(m,"from");if(this.input.charCodeAt(m)===44||me(this.state.type)&&S)return!0;if(this.match(65)&&S){let k=this.input.charCodeAt(this.nextTokenStartSince(m+4));return k===34||k===39}return!1}parseExportFrom(x,m){this.eatContextual(98)?(x.source=this.parseImportSource(),this.checkExport(x),this.maybeParseImportAttributes(x),this.checkJSONModuleImport(x)):m&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:x}=this.state;return x===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):x===74||x===75||x===68||x===80||this.isLet()||this.isAsyncFunction()}checkExport(x,m,S,k){if(m){var O;if(S){if(this.checkDuplicateExports(x,"default"),this.hasPlugin("exportDefaultFrom")){var U;let K=x.declaration;K.type==="Identifier"&&K.name==="from"&&K.end-K.start===4&&!((U=K.extra)!=null&&U.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,K)}}else if((O=x.specifiers)!=null&&O.length)for(let K of x.specifiers){let{exported:re}=K,le=re.type==="Identifier"?re.name:re.value;if(this.checkDuplicateExports(K,le),!k&&K.local){let{local:ae}=K;ae.type!=="Identifier"?this.raise(v.ExportBindingIsString,K,{localName:ae.value,exportName:le}):(this.checkReservedWord(ae.name,ae.loc.start,!0,!1),this.scope.checkLocalExport(ae))}}else if(x.declaration){if(x.declaration.type==="FunctionDeclaration"||x.declaration.type==="ClassDeclaration"){let K=x.declaration.id;if(!K)throw new Error("Assertion failure");this.checkDuplicateExports(x,K.name)}else if(x.declaration.type==="VariableDeclaration")for(let K of x.declaration.declarations)this.checkDeclaration(K.id)}}}checkDeclaration(x){if(x.type==="Identifier")this.checkDuplicateExports(x,x.name);else if(x.type==="ObjectPattern")for(let m of x.properties)this.checkDeclaration(m);else if(x.type==="ArrayPattern")for(let m of x.elements)m&&this.checkDeclaration(m);else x.type==="ObjectProperty"?this.checkDeclaration(x.value):x.type==="RestElement"?this.checkDeclaration(x.argument):x.type==="AssignmentPattern"&&this.checkDeclaration(x.left)}checkDuplicateExports(x,m){this.exportedIdentifiers.has(m)&&(m==="default"?this.raise(v.DuplicateDefaultExport,x):this.raise(v.DuplicateExport,x,{exportName:m})),this.exportedIdentifiers.add(m)}parseExportSpecifiers(x){let m=[],S=!0;for(this.expect(5);!this.eat(8);){if(S)S=!1;else if(this.expect(12),this.eat(8))break;let k=this.isContextual(130),O=this.match(133),U=this.startNode();U.local=this.parseModuleExportName(),m.push(this.parseExportSpecifier(U,O,x,k))}return m}parseExportSpecifier(x,m,S,k){return this.eatContextual(93)?x.exported=this.parseModuleExportName():m?x.exported=gl(x.local):x.exported||(x.exported=es(x.local)),this.finishNode(x,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let x=this.parseStringLiteral(this.state.value),m=x.value.match(wx);return m&&this.raise(v.ModuleExportNameHasLoneSurrogate,x,{surrogateCharCode:m[0].charCodeAt(0)}),x}return this.parseIdentifier(!0)}isJSONModuleImport(x){return x.assertions!=null?x.assertions.some(({key:m,value:S})=>S.value==="json"&&(m.type==="Identifier"?m.name==="type":m.value==="type")):!1}checkImportReflection(x){let{specifiers:m}=x,S=m.length===1?m[0].type:null;if(x.phase==="source")S!=="ImportDefaultSpecifier"&&this.raise(v.SourcePhaseImportRequiresDefault,m[0].loc.start);else if(x.phase==="defer")S!=="ImportNamespaceSpecifier"&&this.raise(v.DeferImportRequiresNamespace,m[0].loc.start);else if(x.module){var k;S!=="ImportDefaultSpecifier"&&this.raise(v.ImportReflectionNotBinding,m[0].loc.start),((k=x.assertions)==null?void 0:k.length)>0&&this.raise(v.ImportReflectionHasAssertion,m[0].loc.start)}}checkJSONModuleImport(x){if(this.isJSONModuleImport(x)&&x.type!=="ExportAllDeclaration"){let{specifiers:m}=x;if(m!=null){let S=m.find(k=>{let O;if(k.type==="ExportSpecifier"?O=k.local:k.type==="ImportSpecifier"&&(O=k.imported),O!==void 0)return O.type==="Identifier"?O.name!=="default":O.value!=="default"});S!==void 0&&this.raise(v.ImportJSONBindingNotDefault,S.loc.start)}}}isPotentialImportPhase(x){return x?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(x,m,S,k){m||(S==="module"?(this.expectPlugin("importReflection",k),x.module=!0):this.hasPlugin("importReflection")&&(x.module=!1),S==="source"?(this.expectPlugin("sourcePhaseImports",k),x.phase="source"):S==="defer"?(this.expectPlugin("deferredImportEvaluation",k),x.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(x.phase=null))}parseMaybeImportPhase(x,m){if(!this.isPotentialImportPhase(m))return this.applyImportPhase(x,m,null),null;let S=this.parseIdentifier(!0),{type:k}=this.state;return(je(k)?k!==98||this.lookaheadCharCode()===102:k!==12)?(this.resetPreviousIdentifierLeadingComments(S),this.applyImportPhase(x,m,S.name,S.loc.start),null):(this.applyImportPhase(x,m,null),S)}isPrecedingIdImportPhase(x){let{type:m}=this.state;return me(m)?m!==98||this.lookaheadCharCode()===102:m!==12}parseImport(x){return this.match(133)?this.parseImportSourceAndAttributes(x):this.parseImportSpecifiersAndAfter(x,this.parseMaybeImportPhase(x,!1))}parseImportSpecifiersAndAfter(x,m){x.specifiers=[];let S=!this.maybeParseDefaultImportSpecifier(x,m)||this.eat(12),k=S&&this.maybeParseStarImportSpecifier(x);return S&&!k&&this.parseNamedImportSpecifiers(x),this.expectContextual(98),this.parseImportSourceAndAttributes(x)}parseImportSourceAndAttributes(x){return x.specifiers!=null||(x.specifiers=[]),x.source=this.parseImportSource(),this.maybeParseImportAttributes(x),this.checkImportReflection(x),this.checkJSONModuleImport(x),this.semicolon(),this.finishNode(x,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(x,m,S){m.local=this.parseIdentifier(),x.specifiers.push(this.finishImportSpecifier(m,S))}finishImportSpecifier(x,m,S=8201){return this.checkLVal(x.local,{in:{type:m},binding:S}),this.finishNode(x,m)}parseImportAttributes(){this.expect(5);let x=[],m=new Set;do{if(this.match(8))break;let S=this.startNode(),k=this.state.value;if(m.has(k)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:k}),m.add(k),this.match(133)?S.key=this.parseStringLiteral(k):S.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return this.expect(8),x}parseModuleAttributes(){let x=[],m=new Set;do{let S=this.startNode();if(S.key=this.parseIdentifier(!0),S.key.name!=="type"&&this.raise(v.ModuleAttributeDifferentFromType,S.key),m.has(S.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,S.key,{key:S.key.name}),m.add(S.key.name),this.expect(14),!this.match(133))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);S.value=this.parseStringLiteral(this.state.value),x.push(this.finishNode(S,"ImportAttribute"))}while(this.eat(12));return x}maybeParseImportAttributes(x){let m,S=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?m=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),m=this.parseImportAttributes()),S=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(x,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),m=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))m=[];else if(this.hasPlugin("moduleAttributes"))m=[];else return;!S&&this.hasPlugin("importAssertions")?x.assertions=m:x.attributes=m}maybeParseDefaultImportSpecifier(x,m){if(m){let S=this.startNodeAtNode(m);return S.local=m,x.specifiers.push(this.finishImportSpecifier(S,"ImportDefaultSpecifier")),!0}else if(je(this.state.type))return this.parseImportSpecifierLocal(x,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(x){if(this.match(55)){let m=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(x,m,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(x){let m=!0;for(this.expect(5);!this.eat(8);){if(m)m=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let S=this.startNode(),k=this.match(133),O=this.isContextual(130);S.imported=this.parseModuleExportName();let U=this.parseImportSpecifier(S,k,x.importKind==="type"||x.importKind==="typeof",O,void 0);x.specifiers.push(U)}}parseImportSpecifier(x,m,S,k,O){if(this.eatContextual(93))x.local=this.parseIdentifier();else{let{imported:U}=x;if(m)throw this.raise(v.ImportBindingIsString,x,{importName:U.value});this.checkReservedWord(U.name,x.loc.start,!0,!0),x.local||(x.local=es(U))}return this.finishImportSpecifier(x,"ImportSpecifier",O)}isThisParam(x){return x.type==="Identifier"&&x.name==="this"}},Qg=class extends Zg{constructor(x,m){x=xl(x),super(x,m),this.options=x,this.initializeScopes(),this.plugins=Dx(this.options.plugins),this.filename=x.sourceFilename}getScopeHandler(){return vt}parse(){this.enterInitialScopes();let x=this.startNode(),m=this.startNode();return this.nextToken(),x.errors=null,this.parseTopLevel(x,m),x.errors=this.state.errors,x.comments.length=this.state.commentsLen,x}};function Dx(x){let m=new Map;for(let S of x){let[k,O]=Array.isArray(S)?S:[S,{}];m.has(k)||m.set(k,O||{})}return m}function Ex(x,m){var S;if(((S=m)==null?void 0:S.sourceType)==="unambiguous"){m=Object.assign({},m);try{m.sourceType="module";let k=ju(m,x),O=k.parse();if(k.sawUnambiguousESM)return O;if(k.ambiguousScriptDifferentAst)try{return m.sourceType="script",ju(m,x).parse()}catch{}else O.program.sourceType="script";return O}catch(k){try{return m.sourceType="script",ju(m,x).parse()}catch{}throw k}}else return ju(m,x).parse()}function Cx(x,m){let S=ju(m,x);return S.options.strictMode&&(S.state.strict=!0),S.getExpression()}function ey(x){let m={};for(let S of Object.keys(x))m[S]=Oe(x[S]);return m}var Tx=ey(ke);function ju(x,m){let S=Qg;return x!=null&&x.plugins&&(ws(x.plugins),S=Ax(x.plugins)),new S(x,m)}var ty={};function Ax(x){let m=ho.filter(O=>tr(x,O)),S=m.join("/"),k=ty[S];if(!k){k=Qg;for(let O of m)k=ts[O](k);ty[S]=k}return k}e.parse=Ex,e.parseExpression=Cx,e.tokTypes=Tx}),Bhe=ij(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=u,e.parse=d,e.parseWithComments=f,e.print=p,e.strip=h;var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,o=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,a=/(\r?\n|^) *\* ?/g,c=[];function u(y){let b=y.match(n);return b?b[0].trimLeft():""}function h(y){let b=y.match(n);return b&&b[0]?y.substring(b[0].length):y}function d(y){return f(y).pragmas}function f(y){let b=` +`;y=y.replace(r,"").replace(t,"").replace(a,"$1");let v="";for(;v!==y;)v=y,y=y.replace(o,`${b}$1 $2${b}`);y=y.replace(s,"").trimRight();let E=Object.create(null),D=y.replace(l,"").replace(s,"").trimRight(),C;for(;C=l.exec(y);){let w=C[2].replace(i,"");typeof E[C[1]]=="string"||Array.isArray(E[C[1]])?E[C[1]]=c.concat(E[C[1]],w):E[C[1]]=w}return{comments:D,pragmas:E}}function p({comments:y="",pragmas:b={}}){let v=` +`,E="/**",D=" *",C=" */",w=Object.keys(b),T=w.flatMap($=>g($,b[$])).map($=>`${D} ${$}${v}`).join("");if(!y){if(w.length===0)return"";if(w.length===1&&!Array.isArray(b[w[0]])){let $=b[w[0]];return`${E} ${g(w[0],$)[0]}${C}`}}let A=y.split(v).map($=>`${D} ${$}`).join(v)+v;return E+v+(y?A:"")+(y&&w.length?D+v:"")+T+C}function g(y,b){return c.concat(b).map(v=>`@${y} ${v}`.trim())}}),aj={};Ohe(aj,{parsers:()=>Lde});var rM=c_(sj(),1);function lj(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},nM=Qhe;function ede(e){return Array.isArray(e)&&e.length>0}var h_=ede;function Eo(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(Eo(s),i):i}function zl(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function tde(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var rde=tde,nde=rde(["Block","CommentBlock","MultiLine"]),VC=nde;function ide(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var iM=ide;function sde(e){return VC(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var ode=sde,xp=null;function dm(e){if(xp!==null&&typeof xp.property){let t=xp;return xp=dm.prototype=null,t}return xp=dm.prototype=e??Object.create(null),new dm}var ade=10;for(let e=0;e<=ade;e++)dm();function lde(e){return dm(e)}function ude(e,t="type"){lde(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var cde=ude,hde={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]},dde=cde(hde),fde=dde;function GC(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let n=0;n{var o;(o=s.leadingComments)!=null&&o.some(ode)&&i.add(Eo(s))}),e=sD(e,s=>{if(s.type==="ParenthesizedExpression"){let{expression:o}=s;if(o.type==="TypeCastExpression")return o.range=[...s.range],o;let a=Eo(s);if(!i.has(a))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=sD(e,i=>{var s;switch(i.type){case"LogicalExpression":if(cz(i))return qC(i);break;case"VariableDeclaration":{let o=nM(!1,i.declarations,-1);o!=null&&o.init&&n[zl(o)]!==";"&&(i.range=[Eo(i),zl(o)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let o=Eo(i);i.name={type:"Identifier",name:i.name,range:[o,o+i.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(r==="meriyah"&&((s=i.exported)==null?void 0:s.type)==="Identifier"){let{exported:o}=i,a=n.slice(Eo(o),zl(o));(a.startsWith('"')||a.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:a})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),h_(e.comments)){let i=nM(!1,e.comments,-1);for(let s=e.comments.length-2;s>=0;s--){let o=e.comments[s];zl(o)===Eo(i)&&VC(o)&&VC(i)&&iM(o)&&iM(i)&&(e.comments.splice(s+1,1),o.value+="*//*"+i.value,o.range=[Eo(o),zl(i)]),i=o}}return e.type==="Program"&&(e.range=[0,n.length]),e}function cz(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function qC(e){return cz(e)?qC({type:"LogicalExpression",operator:e.operator,left:qC({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Eo(e.left),zl(e.right.left)]}),right:e.right.right,range:[Eo(e),zl(e)]}):e}var mde=pde;function gde(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var hz=gde;function yde(e){let{message:t,loc:{line:r,column:n},reasonCode:i}=e,s=e;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",s=void 0);let o=` (${r}:${n})`;return t.endsWith(o)&&(t=t.slice(0,-o.length)),hz(t,{loc:{start:{line:r,column:n+1}},cause:s})}var dz=yde,sM=c_(Bhe(),1);function vde(e){let t=uz(e);t&&(e=e.slice(t.length+1));let r=(0,sM.extract)(e),{pragmas:n,comments:i}=(0,sM.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}function bde(e){let{pragmas:t}=vde(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function xde(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:bde,locStart:Eo,locEnd:zl,...e}}var zp=xde;function wde(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Sde=wde;function Dde(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:o}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:o,type:r,node:e,range:[0,i.length],rootMarker:n}}var fz=Dde,Sf=e=>zp(_de(e)),Ede={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Cde=["recordAndTuple",{syntaxType:"hash"}],oM="v8intrinsic",aM=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],ia=(e,t=Ede)=>({...t,plugins:[...t.plugins,...e]}),Tde=/@(?:no)?flow\b/;function Ade(e,t){var r;if((r=t.filepath)!=null&&r.endsWith(".js.flow"))return!0;let n=uz(e);n&&(e=e.slice(n.length));let i=Jhe(e,0);return i!==!1&&(e=e.slice(0,i)),Tde.test(e)}function kde(e,t,r){let n=e(t,r),i=n.errors.find(s=>!$de.has(s.reasonCode));if(i)throw i;return n}function _de({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if((n.parser==="babel"||n.parser==="__babel_estree")&&Ade(r,n))return n.parser="babel-flow",mz.parse(r,n);let i=t;(n.__babelSourceType??Sde(n))==="script"&&(i=i.map(l=>({...l,sourceType:"script"}))),/#[[{]/.test(r)&&(i=i.map(l=>ia([Cde],l)));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...aM,oM]:aM).flatMap(l=>i.map(c=>ia([l],c))):s&&(i=i.map(l=>ia([oM],l)));let o=e?rM.parseExpression:rM.parse,a;try{a=Yhe(i.map(l=>()=>kde(o,r,l)))}catch({errors:[l]}){throw dz(l)}return e&&(a=fz(a,{text:r,rootMarker:n.rootMarker})),mde(a,{parser:"babel",text:r})}}var $de=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),pz=[ia(["jsx"])],lM=Sf({optionsCombinations:pz}),uM=Sf({optionsCombinations:[ia(["jsx","typescript"]),ia(["typescript"])]}),cM=Sf({isExpression:!0,optionsCombinations:[ia(["jsx"])]}),hM=Sf({isExpression:!0,optionsCombinations:[ia(["typescript"])]}),mz=Sf({optionsCombinations:[ia(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),Fde=Sf({optionsCombinations:pz.map(e=>ia(["estree"],e))}),Pde={babel:lM,"babel-flow":mz,"babel-ts":uM,__js_expression:cM,__ts_expression:hM,__vue_expression:cM,__vue_ts_expression:hM,__vue_event_binding:lM,__vue_ts_event_binding:uM,__babel_estree:Fde},Ide=c_(sz(),1);function gz(e={}){let{allowComments:t=!0}=e;return function(r){let n;try{n=(0,Ide.parseExpression)(r,{tokens:!0,ranges:!0,attachComment:!1})}catch(i){throw dz(i)}if(!t&&h_(n.comments))throw Pl(n.comments[0],"Comment");return Kh(n),fz(n,{type:"JsonRoot",text:r})}}function Pl(e,t){let[r,n]=[e.loc.start,e.loc.end].map(({line:i,column:s})=>({line:i,column:s+1}));return hz(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function Kh(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)t!==null&&Kh(t);return;case"ObjectExpression":for(let t of e.properties)Kh(t);return;case"ObjectProperty":if(e.computed)throw Pl(e.key,"Computed key");if(e.shorthand)throw Pl(e.key,"Shorthand property");e.key.type!=="Identifier"&&Kh(e.key),Kh(e.value);return;case"UnaryExpression":{let{operator:t,argument:r}=e;if(t!=="+"&&t!=="-")throw Pl(e,`Operator '${e.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw Pl(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if(e.name!=="Infinity"&&e.name!=="NaN"&&e.name!=="undefined")throw Pl(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(h_(e.expressions))throw Pl(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)Kh(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Pl(e,`'${e.type}'`)}}var oD=gz(),Nde={json:zp({parse:oD,hasPragma(){return!0}}),json5:zp(oD),jsonc:zp(oD),"json-stringify":zp({parse:gz({allowComments:!1}),astFormat:"estree-json"})},Mde=Nde,Lde={...Pde,...Mde},Ode=az,Rde=Object.create,d_=Object.defineProperty,Bde=Object.getOwnPropertyDescriptor,zde=Object.getOwnPropertyNames,jde=Object.getPrototypeOf,Hde=Object.prototype.hasOwnProperty,Ude=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b1=(e,t)=>{for(var r in t)d_(e,r,{get:t[r],enumerable:!0})},Wde=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of zde(t))!Hde.call(e,i)&&i!==r&&d_(e,i,{get:()=>t[i],enumerable:!(n=Bde(t,i))||n.enumerable});return e},Vde=(e,t,r)=>(r=e!=null?Rde(jde(e)):{},Wde(t||!e||!e.__esModule?d_(r,"default",{value:e,enumerable:!0}):r,e)),yz=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Tl=(e,t,r)=>(yz(e,t,"read from private field"),r?r.call(e):t.get(e)),Gde=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},qde=(e,t,r,n)=>(yz(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Kde=Ude(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=u,e.parse=d,e.parseWithComments=f,e.print=p,e.strip=h;var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,o=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,a=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,l=/(\r?\n|^) *\* ?/g,c=[];function u(y){let b=y.match(n);return b?b[0].trimLeft():""}function h(y){let b=y.match(n);return b&&b[0]?y.substring(b[0].length):y}function d(y){return f(y).pragmas}function f(y){let b=` -`;y=y.replace(r,"").replace(t,"").replace(l,"$1");let v="";for(;v!==y;)v=y,y=y.replace(o,`${b}$1 $2${b}`);y=y.replace(s,"").trimRight();let E=Object.create(null),D=y.replace(a,"").replace(s,"").trimRight(),C;for(;C=a.exec(y);){let w=C[2].replace(i,"");typeof E[C[1]]=="string"||Array.isArray(E[C[1]])?E[C[1]]=c.concat(E[C[1]],w):E[C[1]]=w}return{comments:D,pragmas:E}}function p({comments:y="",pragmas:b={}}){let v=` -`,E="/**",D=" *",C=" */",w=Object.keys(b),T=w.flatMap($=>g($,b[$])).map($=>`${D} ${$}${v}`).join("");if(!y){if(w.length===0)return"";if(w.length===1&&!Array.isArray(b[w[0]])){let $=b[w[0]];return`${E} ${g(w[0],$)[0]}${C}`}}let A=y.split(v).map($=>`${D} ${$}`).join(v)+v;return E+v+(y?A:"")+(y&&w.length?D+v:"")+T+C}function g(y,b){return c.concat(b).map(v=>`@${y} ${v}`.trim())}}),vz={};b1(vz,{languages:()=>Fve,options:()=>_ve,printers:()=>$ve});var Jde=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],bz={};b1(bz,{canAttachComment:()=>rme,embed:()=>Ume,experimentalFeatures:()=>xve,getCommentChildNodes:()=>nme,getVisitorKeys:()=>Sz,handleComments:()=>qz,insertPragma:()=>qme,isBlockComment:()=>co,isGap:()=>ime,massageAstNode:()=>rpe,print:()=>bve,printComment:()=>wpe,willPrintOwnComments:()=>nj});var Xde=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},As=Xde,Yde=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Sr=Yde,Zde=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,Qde=e=>Zde.test(e),efe=Qde;function tfe(e){return e!==null&&typeof e=="object"}var rfe=tfe;function*nfe(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>rfe(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*ife(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function afe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function lfe(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var ufe=e=>!(afe(e)||lfe(e)),cfe=/[^\x20-\x7F]/;function hfe(e){if(!e)return 0;if(!cfe.test(e))return e.length;e=e.replace(ofe()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=ufe(n)?1:2)}return t}var Kd=hfe;function f_(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},nM=Qhe;function ede(e){return Array.isArray(e)&&e.length>0}var h_=ede;function Eo(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(Eo(s),i):i}function jl(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function tde(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var rde=tde,nde=rde(["Block","CommentBlock","MultiLine"]),VC=nde;function ide(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var iM=ide;function sde(e){return VC(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var ode=sde,xp=null;function dm(e){if(xp!==null&&typeof xp.property){let t=xp;return xp=dm.prototype=null,t}return xp=dm.prototype=e??Object.create(null),new dm}var ade=10;for(let e=0;e<=ade;e++)dm();function lde(e){return dm(e)}function ude(e,t="type"){lde(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var cde=ude,hde={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]},dde=cde(hde),fde=dde;function GC(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let n=0;n{var o;(o=s.leadingComments)!=null&&o.some(ode)&&i.add(Eo(s))}),e=sD(e,s=>{if(s.type==="ParenthesizedExpression"){let{expression:o}=s;if(o.type==="TypeCastExpression")return o.range=[...s.range],o;let l=Eo(s);if(!i.has(l))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=sD(e,i=>{var s;switch(i.type){case"LogicalExpression":if(cj(i))return qC(i);break;case"VariableDeclaration":{let o=nM(!1,i.declarations,-1);o!=null&&o.init&&n[jl(o)]!==";"&&(i.range=[Eo(i),jl(o)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let o=Eo(i);i.name={type:"Identifier",name:i.name,range:[o,o+i.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(r==="meriyah"&&((s=i.exported)==null?void 0:s.type)==="Identifier"){let{exported:o}=i,l=n.slice(Eo(o),jl(o));(l.startsWith('"')||l.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:l})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),h_(e.comments)){let i=nM(!1,e.comments,-1);for(let s=e.comments.length-2;s>=0;s--){let o=e.comments[s];jl(o)===Eo(i)&&VC(o)&&VC(i)&&iM(o)&&iM(i)&&(e.comments.splice(s+1,1),o.value+="*//*"+i.value,o.range=[Eo(o),jl(i)]),i=o}}return e.type==="Program"&&(e.range=[0,n.length]),e}function cj(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function qC(e){return cj(e)?qC({type:"LogicalExpression",operator:e.operator,left:qC({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Eo(e.left),jl(e.right.left)]}),right:e.right.right,range:[Eo(e),jl(e)]}):e}var mde=pde;function gde(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var hj=gde;function yde(e){let{message:t,loc:{line:r,column:n},reasonCode:i}=e,s=e;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",s=void 0);let o=` (${r}:${n})`;return t.endsWith(o)&&(t=t.slice(0,-o.length)),hj(t,{loc:{start:{line:r,column:n+1}},cause:s})}var dj=yde,sM=c_(Bhe(),1);function vde(e){let t=uj(e);t&&(e=e.slice(t.length+1));let r=(0,sM.extract)(e),{pragmas:n,comments:i}=(0,sM.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}function bde(e){let{pragmas:t}=vde(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function xde(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:bde,locStart:Eo,locEnd:jl,...e}}var jp=xde;function wde(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Sde=wde;function Dde(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:o}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:o,type:r,node:e,range:[0,i.length],rootMarker:n}}var fj=Dde,Sf=e=>jp(_de(e)),Ede={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Cde=["recordAndTuple",{syntaxType:"hash"}],oM="v8intrinsic",aM=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],ia=(e,t=Ede)=>({...t,plugins:[...t.plugins,...e]}),Tde=/@(?:no)?flow\b/;function Ade(e,t){var r;if((r=t.filepath)!=null&&r.endsWith(".js.flow"))return!0;let n=uj(e);n&&(e=e.slice(n.length));let i=Jhe(e,0);return i!==!1&&(e=e.slice(0,i)),Tde.test(e)}function kde(e,t,r){let n=e(t,r),i=n.errors.find(s=>!$de.has(s.reasonCode));if(i)throw i;return n}function _de({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if((n.parser==="babel"||n.parser==="__babel_estree")&&Ade(r,n))return n.parser="babel-flow",mj.parse(r,n);let i=t;(n.__babelSourceType??Sde(n))==="script"&&(i=i.map(a=>({...a,sourceType:"script"}))),/#[[{]/.test(r)&&(i=i.map(a=>ia([Cde],a)));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...aM,oM]:aM).flatMap(a=>i.map(c=>ia([a],c))):s&&(i=i.map(a=>ia([oM],a)));let o=e?rM.parseExpression:rM.parse,l;try{l=Yhe(i.map(a=>()=>kde(o,r,a)))}catch({errors:[a]}){throw dj(a)}return e&&(l=fj(l,{text:r,rootMarker:n.rootMarker})),mde(l,{parser:"babel",text:r})}}var $de=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),pj=[ia(["jsx"])],lM=Sf({optionsCombinations:pj}),uM=Sf({optionsCombinations:[ia(["jsx","typescript"]),ia(["typescript"])]}),cM=Sf({isExpression:!0,optionsCombinations:[ia(["jsx"])]}),hM=Sf({isExpression:!0,optionsCombinations:[ia(["typescript"])]}),mj=Sf({optionsCombinations:[ia(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),Fde=Sf({optionsCombinations:pj.map(e=>ia(["estree"],e))}),Pde={babel:lM,"babel-flow":mj,"babel-ts":uM,__js_expression:cM,__ts_expression:hM,__vue_expression:cM,__vue_ts_expression:hM,__vue_event_binding:lM,__vue_ts_event_binding:uM,__babel_estree:Fde},Ide=c_(sj(),1);function gj(e={}){let{allowComments:t=!0}=e;return function(r){let n;try{n=(0,Ide.parseExpression)(r,{tokens:!0,ranges:!0,attachComment:!1})}catch(i){throw dj(i)}if(!t&&h_(n.comments))throw Pl(n.comments[0],"Comment");return Kh(n),fj(n,{type:"JsonRoot",text:r})}}function Pl(e,t){let[r,n]=[e.loc.start,e.loc.end].map(({line:i,column:s})=>({line:i,column:s+1}));return hj(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function Kh(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)t!==null&&Kh(t);return;case"ObjectExpression":for(let t of e.properties)Kh(t);return;case"ObjectProperty":if(e.computed)throw Pl(e.key,"Computed key");if(e.shorthand)throw Pl(e.key,"Shorthand property");e.key.type!=="Identifier"&&Kh(e.key),Kh(e.value);return;case"UnaryExpression":{let{operator:t,argument:r}=e;if(t!=="+"&&t!=="-")throw Pl(e,`Operator '${e.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw Pl(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if(e.name!=="Infinity"&&e.name!=="NaN"&&e.name!=="undefined")throw Pl(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(h_(e.expressions))throw Pl(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)Kh(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Pl(e,`'${e.type}'`)}}var oD=gj(),Nde={json:jp({parse:oD,hasPragma(){return!0}}),json5:jp(oD),jsonc:jp(oD),"json-stringify":jp({parse:gj({allowComments:!1}),astFormat:"estree-json"})},Mde=Nde,Lde={...Pde,...Mde},Ode=aj,Rde=Object.create,d_=Object.defineProperty,Bde=Object.getOwnPropertyDescriptor,jde=Object.getOwnPropertyNames,zde=Object.getPrototypeOf,Hde=Object.prototype.hasOwnProperty,Ude=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b1=(e,t)=>{for(var r in t)d_(e,r,{get:t[r],enumerable:!0})},Wde=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jde(t))!Hde.call(e,i)&&i!==r&&d_(e,i,{get:()=>t[i],enumerable:!(n=Bde(t,i))||n.enumerable});return e},Vde=(e,t,r)=>(r=e!=null?Rde(zde(e)):{},Wde(t||!e||!e.__esModule?d_(r,"default",{value:e,enumerable:!0}):r,e)),yj=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Al=(e,t,r)=>(yj(e,t,"read from private field"),r?r.call(e):t.get(e)),Gde=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},qde=(e,t,r,n)=>(yj(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Kde=Ude(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=u,e.parse=d,e.parseWithComments=f,e.print=p,e.strip=h;var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,o=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,l=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,a=/(\r?\n|^) *\* ?/g,c=[];function u(y){let b=y.match(n);return b?b[0].trimLeft():""}function h(y){let b=y.match(n);return b&&b[0]?y.substring(b[0].length):y}function d(y){return f(y).pragmas}function f(y){let b=` +`;y=y.replace(r,"").replace(t,"").replace(a,"$1");let v="";for(;v!==y;)v=y,y=y.replace(o,`${b}$1 $2${b}`);y=y.replace(s,"").trimRight();let E=Object.create(null),D=y.replace(l,"").replace(s,"").trimRight(),C;for(;C=l.exec(y);){let w=C[2].replace(i,"");typeof E[C[1]]=="string"||Array.isArray(E[C[1]])?E[C[1]]=c.concat(E[C[1]],w):E[C[1]]=w}return{comments:D,pragmas:E}}function p({comments:y="",pragmas:b={}}){let v=` +`,E="/**",D=" *",C=" */",w=Object.keys(b),T=w.flatMap($=>g($,b[$])).map($=>`${D} ${$}${v}`).join("");if(!y){if(w.length===0)return"";if(w.length===1&&!Array.isArray(b[w[0]])){let $=b[w[0]];return`${E} ${g(w[0],$)[0]}${C}`}}let A=y.split(v).map($=>`${D} ${$}`).join(v)+v;return E+v+(y?A:"")+(y&&w.length?D+v:"")+T+C}function g(y,b){return c.concat(b).map(v=>`@${y} ${v}`.trim())}}),vj={};b1(vj,{languages:()=>Fve,options:()=>_ve,printers:()=>$ve});var Jde=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}],bj={};b1(bj,{canAttachComment:()=>rme,embed:()=>Ume,experimentalFeatures:()=>xve,getCommentChildNodes:()=>nme,getVisitorKeys:()=>Sj,handleComments:()=>qj,insertPragma:()=>qme,isBlockComment:()=>co,isGap:()=>ime,massageAstNode:()=>rpe,print:()=>bve,printComment:()=>wpe,willPrintOwnComments:()=>nz});var Xde=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},As=Xde,Yde=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Sr=Yde,Zde=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,Qde=e=>Zde.test(e),efe=Qde;function tfe(e){return e!==null&&typeof e=="object"}var rfe=tfe;function*nfe(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,i=s=>rfe(s)&&n(s);for(let s of r(e)){let o=e[s];if(Array.isArray(o))for(let l of o)i(l)&&(yield l);else i(o)&&(yield o)}}function*ife(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function afe(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function lfe(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var ufe=e=>!(afe(e)||lfe(e)),cfe=/[^\x20-\x7F]/;function hfe(e){if(!e)return 0;if(!cfe.test(e))return e.length;e=e.replace(ofe()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=ufe(n)?1:2)}return t}var Kd=hfe;function f_(e){return(t,r,n)=>{let i=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:s}=t,o=r;for(;o>=0&&o0}var vr=bfe,Vy="'",dM='"';function xfe(e,t){let r=t===!0||t===Vy?Vy:dM,n=r===Vy?dM:Vy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var xz=xfe;function wfe(e,t,r){let n=t==='"'?"'":'"',i=As(!1,e,/\\(.)|(["'])/gs,(s,o,a)=>o===n?o:a===t?"\\"+a:a||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}var Sfe=wfe;function Dfe(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":xz(r,t.singleQuote);return Sfe(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var eg=Dfe;function cn(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(cn(s),i):i}function br(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function x1(e,t){let r=cn(e);return Number.isInteger(r)&&r===cn(t)}function Efe(e,t){let r=br(e);return Number.isInteger(r)&&r===br(t)}function Cfe(e,t){return x1(e,t)&&Efe(e,t)}var wp=null;function fm(e){if(wp!==null&&typeof wp.property){let t=wp;return wp=fm.prototype=null,t}return wp=fm.prototype=e??Object.create(null),new fm}var Tfe=10;for(let e=0;e<=Tfe;e++)fm();function Afe(e){return fm(e)}function kfe(e,t="type"){Afe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var wz=kfe,_fe={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]},$fe=wz(_fe),Sz=$fe;function Ffe(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var zr=Ffe,Pfe=zr(["Block","CommentBlock","MultiLine"]),co=Pfe,Ife=zr(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Dz=Ife;function Nfe(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let i=r[n];if(n===0)return e.type==="Identifier"&&e.name===i;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==i)return!1;e=e.object}}function Mfe(e,t){return t.some(r=>Nfe(e,r))}var Lfe=Mfe;function Ofe({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Ez=Ofe;function KC(e,t){return t(e)||sfe(e,{getVisitorKeys:Sz,predicate:t})}function y_(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||yr(e)||un(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Qo(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function Rfe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Cz(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var w1=zr(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Bfe=zr(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),yi=zr(["ArrayExpression","TupleExpression"]),Oo=zr(["ObjectExpression","RecordExpression"]);function pu(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Tz(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&pu(e.argument)}function gs(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Az(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var S1=zr(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),kz=zr(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),mu=zr(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),tg=zr(["FunctionExpression","ArrowFunctionExpression"]);function zfe(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function aD(e){return yr(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Jn=zr(["JSXElement","JSXFragment"]);function D1(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function _z(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function jfe(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!x1(e,e.typeAnnotation)}var Ja=zr(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Jh(e){return un(e)||e.type==="BindExpression"&&!!e.object}var Hfe=zr(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function v_(e){return Ez(e)||Dz(e)||Hfe(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function Ufe(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var Wfe=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function Vfe(e){return Lfe(e,Wfe)}function E1(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(aD(e)&&t&&E1(t))return tg(e.arguments[0]);if(Ufe(e))return aD(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||gs(e.arguments[0]))&&Vfe(e.callee))return e.arguments[2]&&!pu(e.arguments[2])?!1:(e.arguments.length===2?tg(e.arguments[1]):zfe(e.arguments[1])&&Fi(e.arguments[1]).length<=1)||aD(e.arguments[1]);return!1}var $z=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),yr=$z(zr(["CallExpression","OptionalCallExpression"])),un=$z(zr(["MemberExpression","OptionalMemberExpression"]));function Gfe(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(JC(n)||Fz(n))return!0})}function Fz(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(et(e))return!1;if(e.type==="ChainExpression")return Fz(e.expression,{maxDepth:t});if(!un(e))return!1;let r=e,n=0;for(;un(r)&&n++<=t;)if(!JC(r.property)||(r=r.object,et(r)))return!1;return JC(r)}function JC(e){return et(e)?!1:S1(e)||kz(e)}function fM(e,t=5){return Pz(e,t)<=t}function Pz(e,t){let r=0;for(let n in e){let i=e[n];if(i&&typeof i=="object"&&typeof i.type=="string"&&(r++,r+=Pz(i,t-r)),r>t)return r}return r}var qfe=.25;function b_(e,t){let{printWidth:r}=t;if(et(e))return!1;let n=r*qfe;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Tz(e)&&!et(e.argument))return!0;let i=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return i?i.length<=n:gs(e)?eg(io(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` -`):e.type==="UnaryExpression"?b_(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:S1(e)}function Nc(e,t){return Jn(t)?C1(t):et(t,gt.Leading,r=>$s(e,br(r)))}function pM(e,t){return t.parser!=="json"&&t.parser!=="jsonc"&&gs(e.key)&&io(e.key).slice(1,-1)===e.key.value&&(efe(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Iz(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Iz(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function mM(e){return e.quasis.some(t=>t.value.raw.includes(` -`))}function Nz(e,t){return(e.type==="TemplateLiteral"&&mM(e)||e.type==="TaggedTemplateExpression"&&mM(e.quasi))&&!$s(t,cn(e),{backwards:!0})}function Mz(e){if(!et(e))return!1;let t=Sr(!1,Td(e,gt.Dangling),-1);return t&&!co(t)}function Kfe(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(tg(r)){if(t+=1,t>1)return!0}else if(yr(r)){for(let n of so(r))if(tg(n))return!0}return!1}function Lz(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&yr(t)&&yr(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Jfe=new Set(["!","-","+","~"]);function To(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return To(e.expression,t);let r=n=>To(n,t-1);if(Az(e))return Kd(e.pattern??e.regex.pattern)<=5;if(S1(e)||kz(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` -`))&&e.expressions.every(r);if(Oo(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(yi(e))return e.elements.every(n=>n===null||r(n));if(Yd(e)){if(e.type==="ImportExpression"||To(e.callee,t)){let n=so(e);return n.length<=t&&n.every(r)}return!1}return un(e)?To(e.object,t)&&To(e.property,t):e.type==="UnaryExpression"&&Jfe.has(e.operator)||e.type==="UpdateExpression"?To(e.argument,t):!1}function io(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function Xfe(e){return e}function $u(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function Bi(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Bi(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Bi(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:Bi(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:Bi(e.callee,t);case"ConditionalExpression":return Bi(e.test,t);case"UpdateExpression":return!e.prefix&&Bi(e.argument,t);case"BindExpression":return e.object&&Bi(e.object,t);case"SequenceExpression":return Bi(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Bi(e.expression,t);default:return t(e)}}var gM={"==":!0,"!=":!0,"===":!0,"!==":!0},Gy={"*":!0,"/":!0,"%":!0},XC={">>":!0,">>>":!0,"<<":!0};function x_(e,t){return!(O0(t)!==O0(e)||e==="**"||gM[e]&&gM[t]||t==="%"&&Gy[e]||e==="%"&&Gy[t]||t!==e&&Gy[t]&&Gy[e]||XC[e]&&XC[t])}var Yfe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function O0(e){return Yfe.get(e)}function Zfe(e){return!!XC[e]||e==="|"||e==="^"||e==="&"}function Qfe(e){var t;if(e.rest)return!0;let r=Fi(e);return((t=Sr(!1,r,-1))==null?void 0:t.type)==="RestElement"}var lD=new WeakMap;function Fi(e){if(lD.has(e))return lD.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),lD.set(e,t),t}function epe(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}var uD=new WeakMap;function so(e){if(uD.has(e))return uD.get(e);if(e.type==="ChainExpression")return so(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),uD.set(e,t),t}function w_(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>w_(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function yM(e,t){let r=[];if(e.type==="ChainExpression"&&r.push("expression"),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function R0(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function C1(e){return(e==null?void 0:e.prettierIgnore)||et(e,gt.PrettierIgnore)}var gt={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Oz=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,i)=>!(e>.Leading&&!r.leading||e>.Trailing&&!r.trailing||e>.Dangling&&(r.leading||r.trailing)||e>.Block&&!co(r)||e>.Line&&!w1(r)||e>.First&&n!==0||e>.Last&&n!==i.length-1||e>.PrettierIgnore&&!R0(r)||t&&!t(r))};function et(e,t,r){if(!vr(e==null?void 0:e.comments))return!1;let n=Oz(t,r);return n?e.comments.some(n):!0}function Td(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Oz(t,r);return n?e.comments.filter(n):e.comments}var Fu=(e,{originalText:t})=>g_(t,br(e));function Yd(e){return yr(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function cl(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!D1(e))}var Qo=zr(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Mc=zr(["UnionTypeAnnotation","TSUnionType"]),Rz=zr(["IntersectionTypeAnnotation","TSIntersectionType"]),tpe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Bh=e=>{for(let t of e.quasis)delete t.value};function Bz(e,t,r){var n,i;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:a}of t.children)o==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&Bh(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&Bh(t.value.expression),e.type==="JSXAttribute"&&((n=e.value)==null?void 0:n.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=As(!1,t.value.value,/["']|"|'/g,'"'));let s=e.expression||e.callee;if(e.type==="Decorator"&&s.type==="CallExpression"&&s.callee.name==="Component"&&s.arguments.length===1){let o=e.expression.arguments[0].properties;for(let[a,l]of t.expression.arguments[0].properties.entries())switch(o[a].key.name){case"styles":yi(l.value)&&Bh(l.value.elements[0]);break;case"template":l.value.type==="TemplateLiteral"&&Bh(l.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&Bh(t.quasi),e.type==="TemplateLiteral"&&((i=e.leadingComments)!=null&&i.some(o=>co(o)&&["GraphQL","HTML"].some(a=>o.value===` ${a} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&Bh(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}Bz.ignoredProperties=tpe;var rpe=Bz,Df="string",Lc="array",Ef="cursor",ih="indent",sh="align",Cf="trim",oo="group",la="fill",sa="if-break",oh="indent-if-break",ah="line-suffix",lh="line-suffix-boundary",Rs="line",Pu="label",Iu="break-parent",zz=new Set([Ef,ih,sh,Cf,oo,la,sa,oh,ah,lh,Rs,Pu,Iu]);function npe(e){if(typeof e=="string")return Df;if(Array.isArray(e))return Lc;if(!e)return;let{type:t}=e;if(zz.has(t))return t}var Tf=npe,ipe=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function spe(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(Tf(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ipe([...zz].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var ope=class extends Error{constructor(r){super(spe(r));Ta(this,"name","InvalidDocError");this.doc=r}},rg=ope,vM={};function ape(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===vM){r(i.pop());continue}r&&i.push(s,vM);let o=Tf(s);if(!o)throw new rg(s);if((t==null?void 0:t(s))!==!1)switch(o){case Lc:case la:{let a=o===Lc?s:s.parts;for(let l=a.length,c=l-1;c>=0;--c)i.push(a[c]);break}case sa:i.push(s.flatContents,s.breakContents);break;case oo:if(n&&s.expandedStates)for(let a=s.expandedStates.length,l=a-1;l>=0;--l)i.push(s.expandedStates[l]);else i.push(s.contents);break;case sh:case ih:case oh:case Pu:case ah:i.push(s.contents);break;case Df:case Ef:case Cf:case lh:case Rs:case Iu:break;default:throw new rg(s)}}}var jz=ape,lpe=()=>{},upe=lpe;function He(e){return{type:ih,contents:e}}function ua(e,t){return{type:sh,contents:t,n:e}}function Ce(e,t={}){return upe(t.expandedStates),{type:oo,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function cpe(e){return ua(Number.NEGATIVE_INFINITY,e)}function Hz(e){return ua(-1,e)}function lc(e,t){return Ce(e[0],{...t,expandedStates:e})}function S_(e){return{type:la,parts:e}}function Ht(e,t="",r={}){return{type:sa,breakContents:e,flatContents:t,groupId:r.groupId}}function T1(e,t){return{type:oh,contents:e,groupId:t.groupId,negate:t.negate}}function bM(e){return{type:ah,contents:e}}var Xa={type:lh},ca={type:Iu},Uz={type:Rs,hard:!0},hpe={type:Rs,hard:!0,literal:!0},dt={type:Rs},Re={type:Rs,soft:!0},je=[Uz,ca],Wz=[hpe,ca],xM={type:Ef};function lr(e,t){let r=[];for(let n=0;n0){for(let i=0;i{if(Array.isArray(e))return e;if(e.type!==la)throw new Error(`Expect doc to be 'array' or '${la}'.`);return e.parts};function Af(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(Tf(s)){case Lc:return t(s.map(n));case la:return t({...s,parts:s.parts.map(n)});case sa:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case oo:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case sh:case ih:case oh:case Pu:case ah:return t({...s,contents:n(s.contents)});case Df:case Ef:case Cf:case lh:case Rs:case Iu:return t(s);default:throw new rg(s)}}}function Gz(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,n=a)}return jz(e,s),n}function fpe(e){if(e.type===oo&&e.break||e.type===Rs&&e.hard||e.type===Iu)return!0}function Hi(e){return Gz(e,fpe,!1)}function wM(e){if(e.length>0){let t=Sr(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function ppe(e){let t=new Set,r=[];function n(s){if(s.type===Iu&&wM(r),s.type===oo){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===oo&&r.pop().break&&wM(r)}jz(e,n,i,!0)}function mpe(e){return e.type===Rs&&!e.hard?e.soft?"":" ":e.type===sa?e.flatContents:e}function YC(e){return Af(e,mpe)}function gpe(e){switch(Tf(e)){case la:if(e.parts.every(t=>t===""))return"";break;case oo:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===oo&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case sh:case ih:case oh:case ah:if(!e.contents)return"";break;case sa:if(!e.flatContents&&!e.breakContents)return"";break;case Lc:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Sr(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Df:case Ef:case Cf:case lh:case Rs:case Pu:case Iu:break;default:throw new rg(e)}return e}function D_(e){return Af(e,t=>gpe(t))}function Oc(e,t=Wz){return Af(e,r=>typeof r=="string"?lr(t,r.split(` -`)):r)}function ype(e){if(e.type===Rs)return!0}function vpe(e){return Gz(e,ype,!1)}function ZC(e,t){return e.type===Pu?{...e,contents:t(e.contents)}:t(e)}function bpe(e){let t=`*${e.value}*`.split(` +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var Xd=pfe;function mfe(e,t,r={}){let n=Jd(e,r.backwards?t-1:t,r),i=Xd(e,n,r);return n!==i}var $s=mfe;function gfe(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;r0}var vr=bfe,Vy="'",dM='"';function xfe(e,t){let r=t===!0||t===Vy?Vy:dM,n=r===Vy?dM:Vy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var xj=xfe;function wfe(e,t,r){let n=t==='"'?"'":'"',i=As(!1,e,/\\(.)|(["'])/gs,(s,o,l)=>o===n?o:l===t?"\\"+l:l||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}var Sfe=wfe;function Dfe(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":xj(r,t.singleQuote);return Sfe(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var eg=Dfe;function cn(e){var t,r,n;let i=((t=e.range)==null?void 0:t[0])??e.start,s=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return s?Math.min(cn(s),i):i}function br(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function x1(e,t){let r=cn(e);return Number.isInteger(r)&&r===cn(t)}function Efe(e,t){let r=br(e);return Number.isInteger(r)&&r===br(t)}function Cfe(e,t){return x1(e,t)&&Efe(e,t)}var wp=null;function fm(e){if(wp!==null&&typeof wp.property){let t=wp;return wp=fm.prototype=null,t}return wp=fm.prototype=e??Object.create(null),new fm}var Tfe=10;for(let e=0;e<=Tfe;e++)fm();function Afe(e){return fm(e)}function kfe(e,t="type"){Afe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var wj=kfe,_fe={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]},$fe=wj(_fe),Sj=$fe;function Ffe(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var jr=Ffe,Pfe=jr(["Block","CommentBlock","MultiLine"]),co=Pfe,Ife=jr(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Dj=Ife;function Nfe(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let i=r[n];if(n===0)return e.type==="Identifier"&&e.name===i;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==i)return!1;e=e.object}}function Mfe(e,t){return t.some(r=>Nfe(e,r))}var Lfe=Mfe;function Ofe({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Ej=Ofe;function KC(e,t){return t(e)||sfe(e,{getVisitorKeys:Sj,predicate:t})}function y_(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||yr(e)||un(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Qo(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function Rfe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Cj(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var w1=jr(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Bfe=jr(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),yi=jr(["ArrayExpression","TupleExpression"]),Oo=jr(["ObjectExpression","RecordExpression"]);function pu(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Tj(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&pu(e.argument)}function gs(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Aj(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var S1=jr(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),kj=jr(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),mu=jr(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),tg=jr(["FunctionExpression","ArrowFunctionExpression"]);function jfe(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function aD(e){return yr(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Jn=jr(["JSXElement","JSXFragment"]);function D1(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function _j(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function zfe(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!x1(e,e.typeAnnotation)}var Xa=jr(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Jh(e){return un(e)||e.type==="BindExpression"&&!!e.object}var Hfe=jr(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function v_(e){return Ej(e)||Dj(e)||Hfe(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function Ufe(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var Wfe=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function Vfe(e){return Lfe(e,Wfe)}function E1(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(aD(e)&&t&&E1(t))return tg(e.arguments[0]);if(Ufe(e))return aD(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||gs(e.arguments[0]))&&Vfe(e.callee))return e.arguments[2]&&!pu(e.arguments[2])?!1:(e.arguments.length===2?tg(e.arguments[1]):jfe(e.arguments[1])&&Fi(e.arguments[1]).length<=1)||aD(e.arguments[1]);return!1}var $j=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),yr=$j(jr(["CallExpression","OptionalCallExpression"])),un=$j(jr(["MemberExpression","OptionalMemberExpression"]));function Gfe(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(JC(n)||Fj(n))return!0})}function Fj(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(et(e))return!1;if(e.type==="ChainExpression")return Fj(e.expression,{maxDepth:t});if(!un(e))return!1;let r=e,n=0;for(;un(r)&&n++<=t;)if(!JC(r.property)||(r=r.object,et(r)))return!1;return JC(r)}function JC(e){return et(e)?!1:S1(e)||kj(e)}function fM(e,t=5){return Pj(e,t)<=t}function Pj(e,t){let r=0;for(let n in e){let i=e[n];if(i&&typeof i=="object"&&typeof i.type=="string"&&(r++,r+=Pj(i,t-r)),r>t)return r}return r}var qfe=.25;function b_(e,t){let{printWidth:r}=t;if(et(e))return!1;let n=r*qfe;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Tj(e)&&!et(e.argument))return!0;let i=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return i?i.length<=n:gs(e)?eg(io(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` +`):e.type==="UnaryExpression"?b_(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:S1(e)}function Nc(e,t){return Jn(t)?C1(t):et(t,gt.Leading,r=>$s(e,br(r)))}function pM(e,t){return t.parser!=="json"&&t.parser!=="jsonc"&&gs(e.key)&&io(e.key).slice(1,-1)===e.key.value&&(efe(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Ij(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Ij(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function mM(e){return e.quasis.some(t=>t.value.raw.includes(` +`))}function Nj(e,t){return(e.type==="TemplateLiteral"&&mM(e)||e.type==="TaggedTemplateExpression"&&mM(e.quasi))&&!$s(t,cn(e),{backwards:!0})}function Mj(e){if(!et(e))return!1;let t=Sr(!1,Td(e,gt.Dangling),-1);return t&&!co(t)}function Kfe(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(tg(r)){if(t+=1,t>1)return!0}else if(yr(r)){for(let n of so(r))if(tg(n))return!0}return!1}function Lj(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&yr(t)&&yr(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Jfe=new Set(["!","-","+","~"]);function To(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return To(e.expression,t);let r=n=>To(n,t-1);if(Aj(e))return Kd(e.pattern??e.regex.pattern)<=5;if(S1(e)||kj(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` +`))&&e.expressions.every(r);if(Oo(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(yi(e))return e.elements.every(n=>n===null||r(n));if(Yd(e)){if(e.type==="ImportExpression"||To(e.callee,t)){let n=so(e);return n.length<=t&&n.every(r)}return!1}return un(e)?To(e.object,t)&&To(e.property,t):e.type==="UnaryExpression"&&Jfe.has(e.operator)||e.type==="UpdateExpression"?To(e.argument,t):!1}function io(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function Xfe(e){return e}function $u(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function Bi(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Bi(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Bi(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:Bi(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:Bi(e.callee,t);case"ConditionalExpression":return Bi(e.test,t);case"UpdateExpression":return!e.prefix&&Bi(e.argument,t);case"BindExpression":return e.object&&Bi(e.object,t);case"SequenceExpression":return Bi(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Bi(e.expression,t);default:return t(e)}}var gM={"==":!0,"!=":!0,"===":!0,"!==":!0},Gy={"*":!0,"/":!0,"%":!0},XC={">>":!0,">>>":!0,"<<":!0};function x_(e,t){return!(O0(t)!==O0(e)||e==="**"||gM[e]&&gM[t]||t==="%"&&Gy[e]||e==="%"&&Gy[t]||t!==e&&Gy[t]&&Gy[e]||XC[e]&&XC[t])}var Yfe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function O0(e){return Yfe.get(e)}function Zfe(e){return!!XC[e]||e==="|"||e==="^"||e==="&"}function Qfe(e){var t;if(e.rest)return!0;let r=Fi(e);return((t=Sr(!1,r,-1))==null?void 0:t.type)==="RestElement"}var lD=new WeakMap;function Fi(e){if(lD.has(e))return lD.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),lD.set(e,t),t}function epe(e,t){let{node:r}=e,n=0,i=s=>t(s,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}var uD=new WeakMap;function so(e){if(uD.has(e))return uD.get(e);if(e.type==="ChainExpression")return so(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),uD.set(e,t),t}function w_(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>w_(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function yM(e,t){let r=[];if(e.type==="ChainExpression"&&r.push("expression"),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function R0(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function C1(e){return(e==null?void 0:e.prettierIgnore)||et(e,gt.PrettierIgnore)}var gt={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Oj=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,i)=>!(e>.Leading&&!r.leading||e>.Trailing&&!r.trailing||e>.Dangling&&(r.leading||r.trailing)||e>.Block&&!co(r)||e>.Line&&!w1(r)||e>.First&&n!==0||e>.Last&&n!==i.length-1||e>.PrettierIgnore&&!R0(r)||t&&!t(r))};function et(e,t,r){if(!vr(e==null?void 0:e.comments))return!1;let n=Oj(t,r);return n?e.comments.some(n):!0}function Td(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Oj(t,r);return n?e.comments.filter(n):e.comments}var Fu=(e,{originalText:t})=>g_(t,br(e));function Yd(e){return yr(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function hl(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!D1(e))}var Qo=jr(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Mc=jr(["UnionTypeAnnotation","TSUnionType"]),Rj=jr(["IntersectionTypeAnnotation","TSIntersectionType"]),tpe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Bh=e=>{for(let t of e.quasis)delete t.value};function Bj(e,t,r){var n,i;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"))for(let{type:o,expression:l}of t.children)o==="JSXExpressionContainer"&&l.type==="TemplateLiteral"&&Bh(l);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&Bh(t.value.expression),e.type==="JSXAttribute"&&((n=e.value)==null?void 0:n.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=As(!1,t.value.value,/["']|"|'/g,'"'));let s=e.expression||e.callee;if(e.type==="Decorator"&&s.type==="CallExpression"&&s.callee.name==="Component"&&s.arguments.length===1){let o=e.expression.arguments[0].properties;for(let[l,a]of t.expression.arguments[0].properties.entries())switch(o[l].key.name){case"styles":yi(a.value)&&Bh(a.value.elements[0]);break;case"template":a.value.type==="TemplateLiteral"&&Bh(a.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&Bh(t.quasi),e.type==="TemplateLiteral"&&((i=e.leadingComments)!=null&&i.some(o=>co(o)&&["GraphQL","HTML"].some(l=>o.value===` ${l} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&Bh(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}Bj.ignoredProperties=tpe;var rpe=Bj,Df="string",Lc="array",Ef="cursor",ih="indent",sh="align",Cf="trim",oo="group",la="fill",sa="if-break",oh="indent-if-break",ah="line-suffix",lh="line-suffix-boundary",Rs="line",Pu="label",Iu="break-parent",jj=new Set([Ef,ih,sh,Cf,oo,la,sa,oh,ah,lh,Rs,Pu,Iu]);function npe(e){if(typeof e=="string")return Df;if(Array.isArray(e))return Lc;if(!e)return;let{type:t}=e;if(jj.has(t))return t}var Tf=npe,ipe=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function spe(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(Tf(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ipe([...jj].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var ope=class extends Error{constructor(r){super(spe(r));Ta(this,"name","InvalidDocError");this.doc=r}},rg=ope,vM={};function ape(e,t,r,n){let i=[e];for(;i.length>0;){let s=i.pop();if(s===vM){r(i.pop());continue}r&&i.push(s,vM);let o=Tf(s);if(!o)throw new rg(s);if((t==null?void 0:t(s))!==!1)switch(o){case Lc:case la:{let l=o===Lc?s:s.parts;for(let a=l.length,c=a-1;c>=0;--c)i.push(l[c]);break}case sa:i.push(s.flatContents,s.breakContents);break;case oo:if(n&&s.expandedStates)for(let l=s.expandedStates.length,a=l-1;a>=0;--a)i.push(s.expandedStates[a]);else i.push(s.contents);break;case sh:case ih:case oh:case Pu:case ah:i.push(s.contents);break;case Df:case Ef:case Cf:case lh:case Rs:case Iu:break;default:throw new rg(s)}}}var zj=ape,lpe=()=>{},upe=lpe;function He(e){return{type:ih,contents:e}}function ua(e,t){return{type:sh,contents:t,n:e}}function Ce(e,t={}){return upe(t.expandedStates),{type:oo,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function cpe(e){return ua(Number.NEGATIVE_INFINITY,e)}function Hj(e){return ua(-1,e)}function lc(e,t){return Ce(e[0],{...t,expandedStates:e})}function S_(e){return{type:la,parts:e}}function Ht(e,t="",r={}){return{type:sa,breakContents:e,flatContents:t,groupId:r.groupId}}function T1(e,t){return{type:oh,contents:e,groupId:t.groupId,negate:t.negate}}function bM(e){return{type:ah,contents:e}}var Ya={type:lh},ca={type:Iu},Uj={type:Rs,hard:!0},hpe={type:Rs,hard:!0,literal:!0},dt={type:Rs},Re={type:Rs,soft:!0},ze=[Uj,ca],Wj=[hpe,ca],xM={type:Ef};function lr(e,t){let r=[];for(let n=0;n0){for(let i=0;i{if(Array.isArray(e))return e;if(e.type!==la)throw new Error(`Expect doc to be 'array' or '${la}'.`);return e.parts};function Af(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(Tf(s)){case Lc:return t(s.map(n));case la:return t({...s,parts:s.parts.map(n)});case sa:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case oo:{let{expandedStates:o,contents:l}=s;return o?(o=o.map(n),l=o[0]):l=n(l),t({...s,contents:l,expandedStates:o})}case sh:case ih:case oh:case Pu:case ah:return t({...s,contents:n(s.contents)});case Df:case Ef:case Cf:case lh:case Rs:case Iu:return t(s);default:throw new rg(s)}}}function Gj(e,t,r){let n=r,i=!1;function s(o){if(i)return!1;let l=t(o);l!==void 0&&(i=!0,n=l)}return zj(e,s),n}function fpe(e){if(e.type===oo&&e.break||e.type===Rs&&e.hard||e.type===Iu)return!0}function Hi(e){return Gj(e,fpe,!1)}function wM(e){if(e.length>0){let t=Sr(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function ppe(e){let t=new Set,r=[];function n(s){if(s.type===Iu&&wM(r),s.type===oo){if(r.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===oo&&r.pop().break&&wM(r)}zj(e,n,i,!0)}function mpe(e){return e.type===Rs&&!e.hard?e.soft?"":" ":e.type===sa?e.flatContents:e}function YC(e){return Af(e,mpe)}function gpe(e){switch(Tf(e)){case la:if(e.parts.every(t=>t===""))return"";break;case oo:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===oo&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case sh:case ih:case oh:case ah:if(!e.contents)return"";break;case sa:if(!e.flatContents&&!e.breakContents)return"";break;case Lc:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Sr(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Df:case Ef:case Cf:case lh:case Rs:case Pu:case Iu:break;default:throw new rg(e)}return e}function D_(e){return Af(e,t=>gpe(t))}function Oc(e,t=Wj){return Af(e,r=>typeof r=="string"?lr(t,r.split(` +`)):r)}function ype(e){if(e.type===Rs)return!0}function vpe(e){return Gj(e,ype,!1)}function ZC(e,t){return e.type===Pu?{...e,contents:t(e.contents)}:t(e)}function bpe(e){let t=`*${e.value}*`.split(` `);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var xpe=bpe;function wpe(e,t){let r=e.node;if(w1(r))return t.originalText.slice(cn(r),br(r)).trimEnd();if(co(r))return xpe(r)?Spe(r):["/*",Oc(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Spe(e){let t=e.value.split(` -`);return["/*",lr(je,t.map((r,n)=>n===0?r.trimEnd():" "+(n$pe,ownLine:()=>_pe,remaining:()=>Fpe});function Dpe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function E_(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Dpe(e)}function vi(e,t){t.leading=!0,t.trailing=!1,E_(e,t)}function Fs(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),E_(e,t)}function Cn(e,t){t.leading=!1,t.trailing=!0,E_(e,t)}function Epe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Jd(e,n),n=p_(e,n),n=m_(e,n),n=Xd(e,n);return n}var Rg=Epe;function Cpe(e,t){let r=Rg(e,t);return r===!1?"":e.charAt(r)}var Ya=Cpe;function Tpe(e,t,r){for(let n=t;nt(e))}function $pe(e){return[Ppe,Zz,Jz,ej,C_,T_,Kz,Xz,Qz,Hpe,Wpe,k_,Jpe,A_,Zpe,Qpe].some(t=>t(e))}function Fpe(e){return[tj,C_,T_,Mpe,jpe,Yz,k_,zpe,Bpe,Ype,A_,Xpe].some(t=>t(e))}function uh(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?vi(r,t):Fs(e,t)}function QC(e,t){e.type==="BlockStatement"?uh(e,t):vi(e,t)}function Ppe({comment:e,followingNode:t}){return t&&kpe(e)?(vi(t,e),!0):!1}function C_({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Ya(i,br(e))===")")return Cn(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")Cn(t,e);else{let s=w1(e)||e.loc.start.line===e.loc.end.line,o=e.loc.start.line===t.loc.start.line;s&&o?Cn(t,e):Fs(r,e)}return!0}return n.type==="BlockStatement"?(uh(n,e),!0):n.type==="IfStatement"?(QC(n.consequent,e),!0):r.consequent===n?(vi(n,e),!0):!1}function T_({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Ya(i,br(e))===")"?(Cn(t,e),!0):n.type==="BlockStatement"?(uh(n,e),!0):r.body===n?(vi(n,e),!0):!1}function Kz({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(Cn(t,e),!0):n.type==="BlockStatement"?(uh(n,e),!0):n.type==="TryStatement"?(QC(n.finalizer,e),!0):n.type==="CatchClause"?(QC(n.body,e),!0):!1}function Ipe({comment:e,enclosingNode:t,followingNode:r}){return un(t)&&(r==null?void 0:r.type)==="Identifier"?(vi(t,e),!0):!1}function Npe({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(Fs(t,e),!0):!1}function Jz({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i,options:s}){let o=t&&!gu(i,br(t),cn(e));return(!t||!o)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?s.experimentalTernaries&&r.alternate===n&&!(co(e)&&!gu(s.originalText,cn(e),br(e)))?(Fs(r,e),!0):(vi(n,e),!0):!1}function Mpe({comment:e,precedingNode:t,enclosingNode:r}){return cl(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(Cn(r.value.left,e),!0):!1}var Lpe=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Xz({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Lpe.has(r==null?void 0:r.type)){if(vr(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return Cn(Sr(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return uh(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return Cn(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?Cn(t,e):Fs(r,e,i),!0}}return!1}var Ope=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Yz({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Ya(n,br(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Ya(n,br(t))!==":"||(t==null?void 0:t.type)==="Decorator"&&Ope.has(r==null?void 0:r.type)?(Cn(t,e),!0):!1}var Rpe=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Bpe({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Ya(n,br(e))!=="("?!1:t&&Rpe.has(r==null?void 0:r.type)?(Cn(t,e),!0):!1}function zpe({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=Rg(r,br(e));return n!==!1&&r.slice(n,n+2)==="=>"?(Fs(t,e),!0):!1}function jpe({comment:e,enclosingNode:t,text:r}){return Ya(r,br(e))!==")"?!1:t&&(rj(t)&&Fi(t).length===0||Yd(t)&&so(t).length===0)?(Fs(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Fi(t.value).length===0?(Fs(t.value,e),!0):!1}function Zz({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"||((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&rj(r)&&Ya(i,br(e))===")"?(Cn(t,e),!0):!co(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&Rg(i,br(e))===cn(n)?(uh(n,e),!0):!1}function Qz({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(vi(t,e),!0):!1}function A_({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(Cn(t,e),!0):!1}function Hpe({comment:e,precedingNode:t,enclosingNode:r}){return yr(r)&&t&&r.callee===t&&r.arguments.length>0?(vi(r.arguments[0],e),!0):!1}function Upe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return Mc(r)?(R0(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(Cn(t,e),!0):!1):(Mc(n)&&R0(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wpe({comment:e,enclosingNode:t}){return cl(t)?(vi(t,e),!0):!1}function k_({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return((s=n==null?void 0:n.body)==null?void 0:s.length)===0?(i?Fs(n,e):vi(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!vr(t.directives)?(i?Fs(t,e):vi(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(Fs(r,e),!0):!1}function Vpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(vi(t,e),!0):!1}function ej({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return vi(r,e),!0;let i=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",s=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(i||s)&&$s(n,br(e))?(Cn(t,e),!0):!1}function Gpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(vi(t,e),!0):!1}var qpe=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Kpe=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Jpe({comment:e,enclosingNode:t,followingNode:r}){return qpe.has(t==null?void 0:t.type)&&r&&(Kpe.has(r.type)||co(e))?(vi(r,e),!0):!1}function Xpe({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Ya(n,br(e))===";"?(Cn(t,e),!0):!1}function tj({comment:e,enclosingNode:t,followingNode:r}){if(R0(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Ype({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(vi(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(Cn(t.constraint,e),!0):!1}function Zpe({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&w1(e)?uh(r,e):Fs(t,e),!0)}function Qpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return Mc(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||Rz(r))?(Cn(Sr(!1,t.types,-1),e),!0):!1}function eme({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?Cn(r,e):Fs(t,e),!0}var rj=zr(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),tme=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function rme(e){return!tme.has(e.type)}function nme(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&Fi(e.value).length===0&&!e.value.returnType&&!vr(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function nj(e){let{node:t,parent:r}=e;return(Jn(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||Mc(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!C1(t)||Mc(r))}function ime(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=As(!1,e,/[\s(]/g,""),e===""||e==="/*"||e==="/*::"}function sme(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`);return["/*",lr(ze,t.map((r,n)=>n===0?r.trimEnd():" "+(n$pe,ownLine:()=>_pe,remaining:()=>Fpe});function Dpe(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}function E_(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Dpe(e)}function vi(e,t){t.leading=!0,t.trailing=!1,E_(e,t)}function Fs(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),E_(e,t)}function Cn(e,t){t.leading=!1,t.trailing=!0,E_(e,t)}function Epe(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Jd(e,n),n=p_(e,n),n=m_(e,n),n=Xd(e,n);return n}var Rg=Epe;function Cpe(e,t){let r=Rg(e,t);return r===!1?"":e.charAt(r)}var Za=Cpe;function Tpe(e,t,r){for(let n=t;nt(e))}function $pe(e){return[Ppe,Zj,Jj,ez,C_,T_,Kj,Xj,Qj,Hpe,Wpe,k_,Jpe,A_,Zpe,Qpe].some(t=>t(e))}function Fpe(e){return[tz,C_,T_,Mpe,zpe,Yj,k_,jpe,Bpe,Ype,A_,Xpe].some(t=>t(e))}function uh(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?vi(r,t):Fs(e,t)}function QC(e,t){e.type==="BlockStatement"?uh(e,t):vi(e,t)}function Ppe({comment:e,followingNode:t}){return t&&kpe(e)?(vi(t,e),!0):!1}function C_({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Za(i,br(e))===")")return Cn(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")Cn(t,e);else{let s=w1(e)||e.loc.start.line===e.loc.end.line,o=e.loc.start.line===t.loc.start.line;s&&o?Cn(t,e):Fs(r,e)}return!0}return n.type==="BlockStatement"?(uh(n,e),!0):n.type==="IfStatement"?(QC(n.consequent,e),!0):r.consequent===n?(vi(n,e),!0):!1}function T_({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Za(i,br(e))===")"?(Cn(t,e),!0):n.type==="BlockStatement"?(uh(n,e),!0):r.body===n?(vi(n,e),!0):!1}function Kj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(Cn(t,e),!0):n.type==="BlockStatement"?(uh(n,e),!0):n.type==="TryStatement"?(QC(n.finalizer,e),!0):n.type==="CatchClause"?(QC(n.body,e),!0):!1}function Ipe({comment:e,enclosingNode:t,followingNode:r}){return un(t)&&(r==null?void 0:r.type)==="Identifier"?(vi(t,e),!0):!1}function Npe({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(Fs(t,e),!0):!1}function Jj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i,options:s}){let o=t&&!gu(i,br(t),cn(e));return(!t||!o)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?s.experimentalTernaries&&r.alternate===n&&!(co(e)&&!gu(s.originalText,cn(e),br(e)))?(Fs(r,e),!0):(vi(n,e),!0):!1}function Mpe({comment:e,precedingNode:t,enclosingNode:r}){return hl(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(Cn(r.value.left,e),!0):!1}var Lpe=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Xj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Lpe.has(r==null?void 0:r.type)){if(vr(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return Cn(Sr(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return uh(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return Cn(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?Cn(t,e):Fs(r,e,i),!0}}return!1}var Ope=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Yj({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Za(n,br(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Za(n,br(t))!==":"||(t==null?void 0:t.type)==="Decorator"&&Ope.has(r==null?void 0:r.type)?(Cn(t,e),!0):!1}var Rpe=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Bpe({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Za(n,br(e))!=="("?!1:t&&Rpe.has(r==null?void 0:r.type)?(Cn(t,e),!0):!1}function jpe({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=Rg(r,br(e));return n!==!1&&r.slice(n,n+2)==="=>"?(Fs(t,e),!0):!1}function zpe({comment:e,enclosingNode:t,text:r}){return Za(r,br(e))!==")"?!1:t&&(rz(t)&&Fi(t).length===0||Yd(t)&&so(t).length===0)?(Fs(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Fi(t.value).length===0?(Fs(t.value,e),!0):!1}function Zj({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"||((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&rz(r)&&Za(i,br(e))===")"?(Cn(t,e),!0):!co(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&Rg(i,br(e))===cn(n)?(uh(n,e),!0):!1}function Qj({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(vi(t,e),!0):!1}function A_({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(Cn(t,e),!0):!1}function Hpe({comment:e,precedingNode:t,enclosingNode:r}){return yr(r)&&t&&r.callee===t&&r.arguments.length>0?(vi(r.arguments[0],e),!0):!1}function Upe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return Mc(r)?(R0(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(Cn(t,e),!0):!1):(Mc(n)&&R0(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wpe({comment:e,enclosingNode:t}){return hl(t)?(vi(t,e),!0):!1}function k_({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return((s=n==null?void 0:n.body)==null?void 0:s.length)===0?(i?Fs(n,e):vi(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!vr(t.directives)?(i?Fs(t,e):vi(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(Fs(r,e),!0):!1}function Vpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(vi(t,e),!0):!1}function ez({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return vi(r,e),!0;let i=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",s=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(i||s)&&$s(n,br(e))?(Cn(t,e),!0):!1}function Gpe({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(vi(t,e),!0):!1}var qpe=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Kpe=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Jpe({comment:e,enclosingNode:t,followingNode:r}){return qpe.has(t==null?void 0:t.type)&&r&&(Kpe.has(r.type)||co(e))?(vi(r,e),!0):!1}function Xpe({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Za(n,br(e))===";"?(Cn(t,e),!0):!1}function tz({comment:e,enclosingNode:t,followingNode:r}){if(R0(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Ype({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(vi(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(Cn(t.constraint,e),!0):!1}function Zpe({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&w1(e)?uh(r,e):Fs(t,e),!0)}function Qpe({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return Mc(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||Rj(r))?(Cn(Sr(!1,t.types,-1),e),!0):!1}function eme({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?Cn(r,e):Fs(t,e),!0}var rz=jr(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),tme=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function rme(e){return!tme.has(e.type)}function nme(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&Fi(e.value).length===0&&!e.value.returnType&&!vr(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function nz(e){let{node:t,parent:r}=e;return(Jn(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||Mc(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!C1(t)||Mc(r))}function ime(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=As(!1,e,/[\s(]/g,""),e===""||e==="/*"||e==="/*::"}function sme(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}var is=Symbol("MODE_BREAK"),qo=Symbol("MODE_FLAT"),pm=Symbol("cursor");function ij(){return{value:"",length:0,queue:[]}}function ome(e,t){return eT(e,{type:"indent"},t)}function ame(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||ij():t<0?eT(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:eT(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function eT(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let p of n)switch(p.type){case"indent":u(),r.useTabs?l(1):c(r.tabWidth);break;case"stringAlign":u(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,a+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function l(p){i+=" ".repeat(p),s+=r.tabWidth*p}function c(p){i+=" ".repeat(p),s+=p}function u(){r.useTabs?h():d()}function h(){o>0&&l(o),f()}function d(){a>0&&c(a),f()}function f(){o=0,a=0}}function tT(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===pm){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(pm);return t}function qy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],l=[];for(;r>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:c,doc:u}=a.pop();switch(Tf(u)){case Df:l.push(u),r-=Kd(u);break;case Lc:case la:{let h=Vz(u);for(let d=h.length-1;d>=0;d--)a.push({mode:c,doc:h[d]});break}case ih:case sh:case oh:case Pu:a.push({mode:c,doc:u.contents});break;case Cf:r+=tT(l);break;case oo:{if(s&&u.break)return!1;let h=u.break?is:c,d=u.expandedStates&&h===is?Sr(!1,u.expandedStates,-1):u.contents;a.push({mode:h,doc:d});break}case sa:{let h=(u.groupId?i[u.groupId]||qo:c)===is?u.breakContents:u.flatContents;h&&a.push({mode:c,doc:h});break}case Rs:if(c===is||u.hard)return!0;u.soft||(l.push(" "),r--);break;case ah:n=!0;break;case lh:if(n)return!1;break}}return!1}function rT(e,t){let r={},n=t.printWidth,i=sme(t.endOfLine),s=0,o=[{ind:ij(),mode:is,doc:e}],a=[],l=!1,c=[],u=0;for(ppe(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(Tf(p)){case Df:{let g=i!==` +`}}var is=Symbol("MODE_BREAK"),qo=Symbol("MODE_FLAT"),pm=Symbol("cursor");function iz(){return{value:"",length:0,queue:[]}}function ome(e,t){return eT(e,{type:"indent"},t)}function ame(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||iz():t<0?eT(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:eT(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function eT(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,l=0;for(let p of n)switch(p.type){case"indent":u(),r.useTabs?a(1):c(r.tabWidth);break;case"stringAlign":u(),i+=p.n,s+=p.n.length;break;case"numberAlign":o+=1,l+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return d(),{...e,value:i,length:s,queue:n};function a(p){i+=" ".repeat(p),s+=r.tabWidth*p}function c(p){i+=" ".repeat(p),s+=p}function u(){r.useTabs?h():d()}function h(){o>0&&a(o),f()}function d(){l>0&&c(l),f()}function f(){o=0,l=0}}function tT(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i===pm){r++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[n]=i.slice(0,s+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(pm);return t}function qy(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let o=t.length,l=[e],a=[];for(;r>=0;){if(l.length===0){if(o===0)return!0;l.push(t[--o]);continue}let{mode:c,doc:u}=l.pop();switch(Tf(u)){case Df:a.push(u),r-=Kd(u);break;case Lc:case la:{let h=Vj(u);for(let d=h.length-1;d>=0;d--)l.push({mode:c,doc:h[d]});break}case ih:case sh:case oh:case Pu:l.push({mode:c,doc:u.contents});break;case Cf:r+=tT(a);break;case oo:{if(s&&u.break)return!1;let h=u.break?is:c,d=u.expandedStates&&h===is?Sr(!1,u.expandedStates,-1):u.contents;l.push({mode:h,doc:d});break}case sa:{let h=(u.groupId?i[u.groupId]||qo:c)===is?u.breakContents:u.flatContents;h&&l.push({mode:c,doc:h});break}case Rs:if(c===is||u.hard)return!0;u.soft||(a.push(" "),r--);break;case ah:n=!0;break;case lh:if(n)return!1;break}}return!1}function rT(e,t){let r={},n=t.printWidth,i=sme(t.endOfLine),s=0,o=[{ind:iz(),mode:is,doc:e}],l=[],a=!1,c=[],u=0;for(ppe(e);o.length>0;){let{ind:d,mode:f,doc:p}=o.pop();switch(Tf(p)){case Df:{let g=i!==` `?As(!1,p,` -`,i):p;a.push(g),o.length>0&&(s+=Kd(g));break}case Lc:for(let g=p.length-1;g>=0;g--)o.push({ind:d,mode:f,doc:p[g]});break;case Ef:if(u>=2)throw new Error("There are too many 'cursor' in doc.");a.push(pm),u++;break;case ih:o.push({ind:ome(d,t),mode:f,doc:p.contents});break;case sh:o.push({ind:ame(d,p.n,t),mode:f,doc:p.contents});break;case Cf:s-=tT(a);break;case oo:switch(f){case qo:if(!l){o.push({ind:d,mode:p.break?is:qo,doc:p.contents});break}case is:{l=!1;let g={ind:d,mode:qo,doc:p.contents},y=n-s,b=c.length>0;if(!p.break&&qy(g,o,y,b,r))o.push(g);else if(p.expandedStates){let v=Sr(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:is,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:is,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:qo,doc:D};if(qy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:is,doc:p.contents});break}}p.id&&(r[p.id]=Sr(!1,o,-1).mode);break;case la:{let g=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:qo,doc:b},D={ind:d,mode:is,doc:b},C=qy(E,[],g,c.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:qo,doc:v},T={ind:d,mode:is,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let A={ind:d,mode:f,doc:S_(y)},$=y[0];qy({ind:d,mode:qo,doc:[b,v,$]},[],g,c.length>0,r,!0)?o.push(A,w,E):C?o.push(A,T,E):o.push(A,T,D);break}case sa:case oh:{let g=p.groupId?r[p.groupId]:f;if(g===is){let y=p.type===sa?p.breakContents:p.negate?p.contents:He(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(g===qo){let y=p.type===sa?p.flatContents:p.negate?He(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case ah:c.push({ind:d,mode:f,doc:p.contents});break;case lh:c.length>0&&o.push({ind:d,mode:f,doc:Uz});break;case Rs:switch(f){case qo:if(p.hard)l=!0;else{p.soft||(a.push(" "),s+=1);break}case is:if(c.length>0){o.push({ind:d,mode:f,doc:p},...c.reverse()),c.length=0;break}p.literal?d.root?(a.push(i,d.root.value),s=d.root.length):(a.push(i),s=0):(s-=tT(a),a.push(i+d.value),s=d.length);break}break;case Pu:o.push({ind:d,mode:f,doc:p.contents});break;case Iu:break;default:throw new rg(p)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let h=a.indexOf(pm);if(h!==-1){let d=a.indexOf(pm,h+1),f=a.slice(0,h).join(""),p=a.slice(h+1,d).join(""),g=a.slice(d+1).join("");return{formatted:f+p+g,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:a.join("")}}function lme(e,t,r=0){let n=0;for(let i=r;irT(c,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),s.push(Xa,"`");let l=0;return e.each(({index:c,node:u})=>{if(s.push(t()),u.tail)return;let{tabWidth:h}=r,d=u.value.raw,f=d.includes(` -`)?hme(d,h):l;l=f;let p=o[c];if(!a){let y=n[i][c],b=gu(r.originalText,br(u),cn(n.quasis[c+1]));if(!b){let v=rT(p,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;v.includes(` -`)?b=!0:p=v}b&&(et(y)||un(y)||y.type==="ConditionalExpression"||y.type==="SequenceExpression"||Qo(y)||Ja(y))&&(p=[He([Re,p]),Re])}let g=f===0&&d.endsWith(` -`)?ua(Number.NEGATIVE_INFINITY,p):dpe(p,f,h);s.push(Ce(["${",g,Xa,"}"]))},"quasis"),s.push("`"),s}function dme(e){let t=e("quasi");return Og(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),Xa,t])}function fme(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some(s=>s.length>0)){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let o=[],a=s.map(d=>"${"+rT(d,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),l=[{hasLineBreak:!1,cells:[]}];for(let d=1;d0&&(s+=Kd(g));break}case Lc:for(let g=p.length-1;g>=0;g--)o.push({ind:d,mode:f,doc:p[g]});break;case Ef:if(u>=2)throw new Error("There are too many 'cursor' in doc.");l.push(pm),u++;break;case ih:o.push({ind:ome(d,t),mode:f,doc:p.contents});break;case sh:o.push({ind:ame(d,p.n,t),mode:f,doc:p.contents});break;case Cf:s-=tT(l);break;case oo:switch(f){case qo:if(!a){o.push({ind:d,mode:p.break?is:qo,doc:p.contents});break}case is:{a=!1;let g={ind:d,mode:qo,doc:p.contents},y=n-s,b=c.length>0;if(!p.break&&qy(g,o,y,b,r))o.push(g);else if(p.expandedStates){let v=Sr(!1,p.expandedStates,-1);if(p.break){o.push({ind:d,mode:is,doc:v});break}else for(let E=1;E=p.expandedStates.length){o.push({ind:d,mode:is,doc:v});break}else{let D=p.expandedStates[E],C={ind:d,mode:qo,doc:D};if(qy(C,o,y,b,r)){o.push(C);break}}}else o.push({ind:d,mode:is,doc:p.contents});break}}p.id&&(r[p.id]=Sr(!1,o,-1).mode);break;case la:{let g=n-s,{parts:y}=p;if(y.length===0)break;let[b,v]=y,E={ind:d,mode:qo,doc:b},D={ind:d,mode:is,doc:b},C=qy(E,[],g,c.length>0,r,!0);if(y.length===1){C?o.push(E):o.push(D);break}let w={ind:d,mode:qo,doc:v},T={ind:d,mode:is,doc:v};if(y.length===2){C?o.push(w,E):o.push(T,D);break}y.splice(0,2);let A={ind:d,mode:f,doc:S_(y)},$=y[0];qy({ind:d,mode:qo,doc:[b,v,$]},[],g,c.length>0,r,!0)?o.push(A,w,E):C?o.push(A,T,E):o.push(A,T,D);break}case sa:case oh:{let g=p.groupId?r[p.groupId]:f;if(g===is){let y=p.type===sa?p.breakContents:p.negate?p.contents:He(p.contents);y&&o.push({ind:d,mode:f,doc:y})}if(g===qo){let y=p.type===sa?p.flatContents:p.negate?He(p.contents):p.contents;y&&o.push({ind:d,mode:f,doc:y})}break}case ah:c.push({ind:d,mode:f,doc:p.contents});break;case lh:c.length>0&&o.push({ind:d,mode:f,doc:Uj});break;case Rs:switch(f){case qo:if(p.hard)a=!0;else{p.soft||(l.push(" "),s+=1);break}case is:if(c.length>0){o.push({ind:d,mode:f,doc:p},...c.reverse()),c.length=0;break}p.literal?d.root?(l.push(i,d.root.value),s=d.root.length):(l.push(i),s=0):(s-=tT(l),l.push(i+d.value),s=d.length);break}break;case Pu:o.push({ind:d,mode:f,doc:p.contents});break;case Iu:break;default:throw new rg(p)}o.length===0&&c.length>0&&(o.push(...c.reverse()),c.length=0)}let h=l.indexOf(pm);if(h!==-1){let d=l.indexOf(pm,h+1),f=l.slice(0,h).join(""),p=l.slice(h+1,d).join(""),g=l.slice(d+1).join("");return{formatted:f+p+g,cursorNodeStart:f.length,cursorNodeText:p}}return{formatted:l.join("")}}function lme(e,t,r=0){let n=0;for(let i=r;irT(c,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),s.push(Ya,"`");let a=0;return e.each(({index:c,node:u})=>{if(s.push(t()),u.tail)return;let{tabWidth:h}=r,d=u.value.raw,f=d.includes(` +`)?hme(d,h):a;a=f;let p=o[c];if(!l){let y=n[i][c],b=gu(r.originalText,br(u),cn(n.quasis[c+1]));if(!b){let v=rT(p,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;v.includes(` +`)?b=!0:p=v}b&&(et(y)||un(y)||y.type==="ConditionalExpression"||y.type==="SequenceExpression"||Qo(y)||Xa(y))&&(p=[He([Re,p]),Re])}let g=f===0&&d.endsWith(` +`)?ua(Number.NEGATIVE_INFINITY,p):dpe(p,f,h);s.push(Ce(["${",g,Ya,"}"]))},"quasis"),s.push("`"),s}function dme(e){let t=e("quasi");return Og(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),Ya,t])}function fme(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some(s=>s.length>0)){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let o=[],l=s.map(d=>"${"+rT(d,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),a=[{hasLineBreak:!1,cells:[]}];for(let d=1;dd.cells.length)),u=Array.from({length:c}).fill(0),h=[{cells:i},...l.filter(d=>d.cells.length>0)];for(let{cells:d}of h.filter(f=>!f.hasLineBreak))for(let[f,p]of d.entries())u[f]=Math.max(u[f],Kd(p));return o.push(Xa,"`",He([je,lr(je,h.map(d=>lr(" | ",d.cells.map((f,p)=>d.hasLineBreak?f:f+" ".repeat(u[p]-Kd(f))))))]),je,"`"),o}}function pme(e,t){let{node:r}=e,n=t();return et(r)&&(n=Ce([He([Re,n]),Re])),["${",n,Xa,"}"]}function __(e,t){return e.map(r=>pme(r,t),"expressions")}function oj(e,t){return Af(e,r=>typeof r=="string"?t?As(!1,r,/(\\*)`/g,"$1$1\\`"):aj(r):r)}function aj(e){return As(!1,e,/([\\`]|\${)/g,"\\$1")}function mme({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var nT=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function gme(e){let t=n=>n.type==="TemplateLiteral",r=(n,i)=>cl(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&i==="value";return e.match(t,(n,i)=>yi(n)&&i==="elements",r,...nT)||e.match(t,r,...nT)}function yme(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>cl(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...nT)}function SM(e,t){return et(e,gt.Block|gt.Leading,({value:r})=>r===` ${t} `)}function lj({node:e,parent:t},r){return SM(e,r)||vme(t)&&SM(t,r)}function vme(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function bme(e,t,r){let{node:n}=r,i=n.quasis.map(u=>u.value.raw),s=0,o=i.reduce((u,h,d)=>d===0?h:u+"@prettier-placeholder-"+s+++"-id"+h,""),a=await e(o,{parser:"scss"}),l=__(r,t),c=xme(a,l);if(!c)throw new Error("Couldn't insert all the expressions");return["`",He([je,c]),Re,"`"]}function xme(e,t){if(!vr(t))return e;let r=0,n=Af(D_(e),i=>typeof i!="string"||!i.includes("@prettier-placeholder")?i:i.split(/@prettier-placeholder-(\d+)-id/).map((s,o)=>o%2===0?Oc(s):(r++,t[s])));return t.length===r?n:null}function wme({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Ky(e){return e.type==="Identifier"&&e.name==="styled"}function DM(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Sme({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Ky(t.object)||DM(t);case"CallExpression":return Ky(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Ky(t.callee.object.object)||DM(t.callee.object))||t.callee.object.type==="CallExpression"&&Ky(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Dme({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Eme(e){if(wme(e)||Sme(e)||Dme(e)||gme(e))return bme}var Cme=Eme;async function Tme(e,t,r){let{node:n}=r,i=n.quasis.length,s=__(r,t),o=[];for(let a=0;a2&&d[0].trim()===""&&d[1].trim()==="",y=f>2&&d[f-1].trim()===""&&d[f-2].trim()==="",b=d.every(E=>/^\s*(?:#[^\n\r]*)?$/.test(E));if(!u&&/#[^\n\r]*$/.test(d[f-1]))return null;let v=null;b?v=Ame(d):v=await e(h,{parser:"graphql"}),v?(v=oj(v,!1),!c&&g&&o.push(""),o.push(v),!u&&y&&o.push("")):!c&&!u&&g&&o.push(""),p&&o.push(p)}return["`",He([je,lr(je,o)]),je,"`"]}function Ame(e){let t=[],r=!1,n=e.map(i=>i.trim());for(let[i,s]of n.entries())s!==""&&(n[i-1]===""&&r?t.push([je,s]):t.push(s),r=!0);return t.length===0?null:lr(je,t)}function kme({node:e,parent:t}){return lj({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function _me(e){if(kme(e))return Tme}var $me=_me,cD=0;async function uj(e,t,r,n,i){let{node:s}=n,o=cD;cD=cD+1>>>0;let a=b=>`PRETTIER_HTML_PLACEHOLDER_${b}_${o}_IN_JS`,l=s.quasis.map((b,v,E)=>v===E.length-1?b.value.cooked:b.value.cooked+a(v)).join(""),c=__(n,r),u=new RegExp(a("(\\d+)"),"g"),h=0,d=await t(l,{parser:e,__onHtmlRoot(b){h=b.children.length}}),f=Af(d,b=>{if(typeof b!="string")return b;let v=[],E=b.split(u);for(let D=0;D1?He(Ce(f)):Ce(f),g,"`"]))}function Fme(e){return lj(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Pme=uj.bind(void 0,"html"),Ime=uj.bind(void 0,"angular");function Nme(e){if(Fme(e))return Pme;if(yme(e))return Ime}var Mme=Nme;async function Lme(e,t,r){let{node:n}=r,i=As(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(l,c)=>"\\".repeat(c.length/2)+"`"),s=Ome(i),o=s!=="";o&&(i=As(!1,i,new RegExp(`^${s}`,"gm"),""));let a=oj(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?He([Re,a]):[Wz,cpe(a)],Re,"`"]}function Ome(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Rme(e){if(Bme(e))return Lme}function Bme({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var zme=Rme;function jme(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Hme(t))return;let r;for(let n of[Cme,$me,Mme,zme])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...i)=>{let s=await r(...i);return s&&Og({embed:!0,...s.label},s)}}function Hme({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Ume=jme,B0=Vde(Kde(),1);function Wme(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`)&&a.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...a.map(d=>d.cells.length)),u=Array.from({length:c}).fill(0),h=[{cells:i},...a.filter(d=>d.cells.length>0)];for(let{cells:d}of h.filter(f=>!f.hasLineBreak))for(let[f,p]of d.entries())u[f]=Math.max(u[f],Kd(p));return o.push(Ya,"`",He([ze,lr(ze,h.map(d=>lr(" | ",d.cells.map((f,p)=>d.hasLineBreak?f:f+" ".repeat(u[p]-Kd(f))))))]),ze,"`"),o}}function pme(e,t){let{node:r}=e,n=t();return et(r)&&(n=Ce([He([Re,n]),Re])),["${",n,Ya,"}"]}function __(e,t){return e.map(r=>pme(r,t),"expressions")}function oz(e,t){return Af(e,r=>typeof r=="string"?t?As(!1,r,/(\\*)`/g,"$1$1\\`"):az(r):r)}function az(e){return As(!1,e,/([\\`]|\${)/g,"\\$1")}function mme({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var nT=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function gme(e){let t=n=>n.type==="TemplateLiteral",r=(n,i)=>hl(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&i==="value";return e.match(t,(n,i)=>yi(n)&&i==="elements",r,...nT)||e.match(t,r,...nT)}function yme(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>hl(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...nT)}function SM(e,t){return et(e,gt.Block|gt.Leading,({value:r})=>r===` ${t} `)}function lz({node:e,parent:t},r){return SM(e,r)||vme(t)&&SM(t,r)}function vme(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function bme(e,t,r){let{node:n}=r,i=n.quasis.map(u=>u.value.raw),s=0,o=i.reduce((u,h,d)=>d===0?h:u+"@prettier-placeholder-"+s+++"-id"+h,""),l=await e(o,{parser:"scss"}),a=__(r,t),c=xme(l,a);if(!c)throw new Error("Couldn't insert all the expressions");return["`",He([ze,c]),Re,"`"]}function xme(e,t){if(!vr(t))return e;let r=0,n=Af(D_(e),i=>typeof i!="string"||!i.includes("@prettier-placeholder")?i:i.split(/@prettier-placeholder-(\d+)-id/).map((s,o)=>o%2===0?Oc(s):(r++,t[s])));return t.length===r?n:null}function wme({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Ky(e){return e.type==="Identifier"&&e.name==="styled"}function DM(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Sme({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Ky(t.object)||DM(t);case"CallExpression":return Ky(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Ky(t.callee.object.object)||DM(t.callee.object))||t.callee.object.type==="CallExpression"&&Ky(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Dme({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Eme(e){if(wme(e)||Sme(e)||Dme(e)||gme(e))return bme}var Cme=Eme;async function Tme(e,t,r){let{node:n}=r,i=n.quasis.length,s=__(r,t),o=[];for(let l=0;l2&&d[0].trim()===""&&d[1].trim()==="",y=f>2&&d[f-1].trim()===""&&d[f-2].trim()==="",b=d.every(E=>/^\s*(?:#[^\n\r]*)?$/.test(E));if(!u&&/#[^\n\r]*$/.test(d[f-1]))return null;let v=null;b?v=Ame(d):v=await e(h,{parser:"graphql"}),v?(v=oz(v,!1),!c&&g&&o.push(""),o.push(v),!u&&y&&o.push("")):!c&&!u&&g&&o.push(""),p&&o.push(p)}return["`",He([ze,lr(ze,o)]),ze,"`"]}function Ame(e){let t=[],r=!1,n=e.map(i=>i.trim());for(let[i,s]of n.entries())s!==""&&(n[i-1]===""&&r?t.push([ze,s]):t.push(s),r=!0);return t.length===0?null:lr(ze,t)}function kme({node:e,parent:t}){return lz({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function _me(e){if(kme(e))return Tme}var $me=_me,cD=0;async function uz(e,t,r,n,i){let{node:s}=n,o=cD;cD=cD+1>>>0;let l=b=>`PRETTIER_HTML_PLACEHOLDER_${b}_${o}_IN_JS`,a=s.quasis.map((b,v,E)=>v===E.length-1?b.value.cooked:b.value.cooked+l(v)).join(""),c=__(n,r),u=new RegExp(l("(\\d+)"),"g"),h=0,d=await t(a,{parser:e,__onHtmlRoot(b){h=b.children.length}}),f=Af(d,b=>{if(typeof b!="string")return b;let v=[],E=b.split(u);for(let D=0;D1?He(Ce(f)):Ce(f),g,"`"]))}function Fme(e){return lz(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Pme=uz.bind(void 0,"html"),Ime=uz.bind(void 0,"angular");function Nme(e){if(Fme(e))return Pme;if(yme(e))return Ime}var Mme=Nme;async function Lme(e,t,r){let{node:n}=r,i=As(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(a,c)=>"\\".repeat(c.length/2)+"`"),s=Ome(i),o=s!=="";o&&(i=As(!1,i,new RegExp(`^${s}`,"gm"),""));let l=oz(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",o?He([Re,l]):[Wj,cpe(l)],Re,"`"]}function Ome(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Rme(e){if(Bme(e))return Lme}function Bme({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var jme=Rme;function zme(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Hme(t))return;let r;for(let n of[Cme,$me,Mme,jme])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...i)=>{let s=await r(...i);return s&&Og({embed:!0,...s.label},s)}}function Hme({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Ume=zme,B0=Vde(Kde(),1);function Wme(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` `);return t===-1?e:e.slice(0,t)}var Vme=Wme;function Gme(e){let t=Vme(e);t&&(e=e.slice(t.length+1));let r=(0,B0.extract)(e),{pragmas:n,comments:i}=(0,B0.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}function qme(e){let{shebang:t,text:r,pragmas:n,comments:i}=Gme(e),s=(0,B0.strip)(r),o=(0,B0.print)({pragmas:{format:"",...n},comments:i.trimStart()});return(t?`${t} `:"")+o+(s.startsWith(` `)?` `:` -`)+s}function Kme(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,l=i(a),c=s(a);for(let u of n)i(u)>=l&&s(u)<=c&&o.add(u);return r.slice(l,c)}var Jme=Kme;function iT(e,t){var r,n,i,s,o,a,l;if(e.isRoot)return!1;let{node:c,key:u,parent:h}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Qme(c)&&jp(e))return!0;if(Xme(c))return!1;if(c.type==="Identifier"){if((r=c.extra)!=null&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(c.name)||u==="left"&&(c.name==="async"&&!h.await||c.name==="let")&&h.type==="ForOfStatement")return!0;if(c.name==="let"){let d=(n=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:n.left;if(d&&Bi(d,f=>f===c))return!0}if(u==="object"&&c.name==="let"&&h.type==="MemberExpression"&&h.computed&&!h.optional){let d=e.findAncestor(p=>p.type==="ExpressionStatement"||p.type==="ForStatement"||p.type==="ForInStatement"),f=d?d.type==="ExpressionStatement"?d.expression:d.type==="ForStatement"?d.init:d.left:void 0;if(f&&Bi(f,p=>p===c))return!0}if(u==="expression")switch(c.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let d=e.findAncestor(f=>!Qo(f));if(d!==h&&d.type==="ExpressionStatement")return!0}}return!1}if(c.type==="ObjectExpression"||c.type==="FunctionExpression"||c.type==="ClassExpression"||c.type==="DoExpression"){let d=(i=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:i.expression;if(d&&Bi(d,f=>f===c))return!0}if(c.type==="ObjectExpression"){let d=(s=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:s.body;if(d&&d.type!=="SequenceExpression"&&d.type!=="AssignmentExpression"&&Bi(d,f=>f===c))return!0}switch(h.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(u==="superClass"&&(c.type==="ArrowFunctionExpression"||c.type==="AssignmentExpression"||c.type==="AwaitExpression"||c.type==="BinaryExpression"||c.type==="ConditionalExpression"||c.type==="LogicalExpression"||c.type==="NewExpression"||c.type==="ObjectExpression"||c.type==="SequenceExpression"||c.type==="TaggedTemplateExpression"||c.type==="UnaryExpression"||c.type==="UpdateExpression"||c.type==="YieldExpression"||c.type==="TSNonNullExpression"||c.type==="ClassExpression"&&vr(c.decorators)))return!0;break;case"ExportDefaultDeclaration":return cj(e,t)||c.type==="SequenceExpression";case"Decorator":if(u==="expression"){if(un(c)&&c.computed)return!0;let d=!1,f=!1,p=c;for(;p;)switch(p.type){case"MemberExpression":f=!0,p=p.object;break;case"CallExpression":if(f||d)return t.parser!=="typescript";d=!0,p=p.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(d,f)=>f==="returnType"&&d.type==="ArrowFunctionExpression")&&Zme(c))return!0;break;case"BinaryExpression":if(u==="left"&&(h.operator==="in"||h.operator==="instanceof")&&c.type==="UnaryExpression")return!0;break}switch(c.type){case"UpdateExpression":if(h.type==="UnaryExpression")return c.prefix&&(c.operator==="++"&&h.operator==="+"||c.operator==="--"&&h.operator==="-");case"UnaryExpression":switch(h.type){case"UnaryExpression":return c.operator===h.operator&&(c.operator==="+"||c.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"BinaryExpression":return u==="left"&&h.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(h.type==="UpdateExpression"||c.operator==="in"&&Yme(e))return!0;if(c.operator==="|>"&&(o=c.extra)!=null&&o.parenthesized){let d=e.grandparent;if(d.type==="BinaryExpression"&&d.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(h.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Qo(c);case"ConditionalExpression":return Qo(c);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return u==="callee";case"ClassExpression":case"ClassDeclaration":return u==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"AssignmentExpression":case"AssignmentPattern":return u==="left"&&(c.type==="TSTypeAssertion"||Qo(c));case"LogicalExpression":if(c.type==="LogicalExpression")return h.operator!==c.operator;case"BinaryExpression":{let{operator:d,type:f}=c;if(!d&&f!=="TSTypeAssertion")return!0;let p=O0(d),g=h.operator,y=O0(g);return y>p||u==="right"&&y===p||y===p&&!x_(g,d)?!0:y");default:return!1}case"TSFunctionType":if(e.match(d=>d.type==="TSFunctionType",(d,f)=>f==="typeAnnotation"&&d.type==="TSTypeAnnotation",(d,f)=>f==="returnType"&&d.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(u==="extendsType"&&h.type==="TSConditionalType"){if(c.type==="TSConditionalType")return!0;let{typeAnnotation:d}=c.returnType||c.typeAnnotation;if(d.type==="TSTypePredicate"&&d.typeAnnotation&&(d=d.typeAnnotation.typeAnnotation),d.type==="TSInferType"&&d.typeParameter.constraint)return!0}if(u==="checkType"&&h.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((h.type==="TSUnionType"||h.type==="TSIntersectionType")&&h.types.length>1&&(!c.types||c.types.length>1))return!0;case"TSInferType":if(c.type==="TSInferType"&&h.type==="TSRestType")return!1;case"TSTypeOperator":return h.type==="TSArrayType"||h.type==="TSOptionalType"||h.type==="TSRestType"||u==="objectType"&&h.type==="TSIndexedAccessType"||h.type==="TSTypeOperator"||h.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return u==="objectType"&&h.type==="TSIndexedAccessType"||u==="elementType"&&h.type==="TSArrayType";case"TypeofTypeAnnotation":return u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType")||u==="elementType"&&h.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return h.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return h.type==="ArrayTypeAnnotation"||h.type==="NullableTypeAnnotation"||h.type==="IntersectionTypeAnnotation"||h.type==="UnionTypeAnnotation"||u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return h.type==="ArrayTypeAnnotation"||u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,p)=>p==="typeAnnotation"&&f.type==="TypeAnnotation",(f,p)=>p==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,p)=>p==="typeAnnotation"&&f.type==="TypePredicate",(f,p)=>p==="typeAnnotation"&&f.type==="TypeAnnotation",(f,p)=>p==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let d=h.type==="NullableTypeAnnotation"?e.grandparent:h;return d.type==="UnionTypeAnnotation"||d.type==="IntersectionTypeAnnotation"||d.type==="ArrayTypeAnnotation"||u==="objectType"&&(d.type==="IndexedAccessType"||d.type==="OptionalIndexedAccessType")||u==="checkType"&&h.type==="ConditionalTypeAnnotation"||u==="extendsType"&&h.type==="ConditionalTypeAnnotation"&&c.returnType.type==="InferTypeAnnotation"&&c.returnType.typeParameter.bound||d.type==="NullableTypeAnnotation"||h.type==="FunctionTypeParam"&&h.name===null&&Fi(c).some(f=>{var p;return((p=f.typeAnnotation)==null?void 0:p.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(u==="extendsType"&&h.type==="ConditionalTypeAnnotation"&&c.type==="ConditionalTypeAnnotation"||u==="checkType"&&h.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return u==="objectType"&&h.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof c.value=="string"&&h.type==="ExpressionStatement"&&!h.directive){let d=e.grandparent;return d.type==="Program"||d.type==="BlockStatement"}return u==="object"&&h.type==="MemberExpression"&&typeof c.value=="number";case"AssignmentExpression":{let d=e.grandparent;return u==="body"&&h.type==="ArrowFunctionExpression"?!0:u==="key"&&(h.type==="ClassProperty"||h.type==="PropertyDefinition")&&h.computed||(u==="init"||u==="update")&&h.type==="ForStatement"?!1:h.type==="ExpressionStatement"?c.left.type==="ObjectPattern":!(u==="key"&&h.type==="TSPropertySignature"||h.type==="AssignmentExpression"||h.type==="SequenceExpression"&&d.type==="ForStatement"&&(d.init===h||d.update===h)||u==="value"&&h.type==="Property"&&d.type==="ObjectPattern"&&d.properties.includes(h)||h.type==="NGChainedExpression")}case"ConditionalExpression":switch(h.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:u==="test";case"MemberExpression":case"OptionalMemberExpression":return u==="object";default:return!1}case"FunctionExpression":switch(h.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(h.type){case"BinaryExpression":return h.operator!=="|>"||((a=c.extra)==null?void 0:a.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return u==="test";default:return!1}case"ClassExpression":switch(h.type){case"NewExpression":return u==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(ege(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(u==="callee"&&(h.type==="BindExpression"||h.type==="NewExpression")){let d=c;for(;d;)switch(d.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":d=d.object;break;case"TaggedTemplateExpression":d=d.tag;break;case"TSNonNullExpression":d=d.expression;break;default:return!1}}return!1;case"BindExpression":return u==="callee"&&(h.type==="BindExpression"||h.type==="NewExpression")||u==="object"&&un(h);case"NGPipeExpression":return!(h.type==="NGRoot"||h.type==="NGMicrosyntaxExpression"||h.type==="ObjectProperty"&&!((l=c.extra)!=null&&l.parenthesized)||yi(h)||u==="arguments"&&yr(h)||u==="right"&&h.type==="NGPipeExpression"||u==="property"&&h.type==="MemberExpression"||h.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return u==="callee"||u==="left"&&h.type==="BinaryExpression"&&h.operator==="<"||!yi(h)&&h.type!=="ArrowFunctionExpression"&&h.type!=="AssignmentExpression"&&h.type!=="AssignmentPattern"&&h.type!=="BinaryExpression"&&h.type!=="NewExpression"&&h.type!=="ConditionalExpression"&&h.type!=="ExpressionStatement"&&h.type!=="JsExpressionRoot"&&h.type!=="JSXAttribute"&&h.type!=="JSXElement"&&h.type!=="JSXExpressionContainer"&&h.type!=="JSXFragment"&&h.type!=="LogicalExpression"&&!yr(h)&&!cl(h)&&h.type!=="ReturnStatement"&&h.type!=="ThrowStatement"&&h.type!=="TypeCastExpression"&&h.type!=="VariableDeclarator"&&h.type!=="YieldExpression";case"TSInstantiationExpression":return u==="object"&&un(h)}return!1}var Xme=zr(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function Yme(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function Zme(e){return KC(e,t=>t.type==="ObjectTypeAnnotation"&&KC(t,r=>r.type==="FunctionTypeAnnotation"))}function Qme(e){return Oo(e)}function jp(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(jp);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(jp);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(jp);break;case"UnaryExpression":if(t.prefix)return e.callParent(jp);break}return!1}function cj(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!iT(e,t):!y_(r)||n.type!=="ExportDefaultDeclaration"&&iT(e,t)?!1:e.call(()=>cj(e,t),...Cz(r))}function ege(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(i==="object"&&r.type==="MemberExpression"||i==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression")&&(e.match(void 0,void 0,(s,o)=>o==="callee"&&(s.type==="CallExpression"&&!s.optional||s.type==="NewExpression")||o==="object"&&s.type==="MemberExpression"&&!s.optional)||e.match(void 0,void 0,(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))}var ch=iT;function tge(e,t){let r=t-1;r=Jd(e,r,{backwards:!0}),r=Xd(e,r,{backwards:!0}),r=Jd(e,r,{backwards:!0});let n=Xd(e,r,{backwards:!0});return r!==n}var rge=tge,nge=()=>!0;function $_(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function ige(e,t){var r;let n=e.node,i=[$_(e,t)],{printer:s,originalText:o,locStart:a,locEnd:l}=t;if((r=s.isBlockComment)!=null&&r.call(s,n)){let u=$s(o,l(n))?$s(o,a(n),{backwards:!0})?je:dt:" ";i.push(u)}else i.push(je);let c=Xd(o,Jd(o,l(n)));return c!==!1&&$s(o,c)&&i.push(je),i}function sge(e,t,r){var n;let i=e.node,s=$_(e,t),{printer:o,originalText:a,locStart:l}=t,c=(n=o.isBlockComment)==null?void 0:n.call(o,i);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||$s(a,l(i),{backwards:!0})){let u=rge(a,l(i));return{doc:bM([je,u?je:"",s]),isBlock:c,hasLineSuffix:!0}}return!c||r!=null&&r.hasLineSuffix?{doc:[bM([" ",s]),ca],isBlock:c,hasLineSuffix:!0}:{doc:[" ",s],isBlock:c,hasLineSuffix:!1}}function fn(e,t,r={}){let{node:n}=e;if(!vr(n==null?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:o=nge}=r,a=[];if(e.each(({node:c})=>{c.leading||c.trailing||c.marker!==s||!o(c)||a.push($_(e,t))},"comments"),a.length===0)return"";let l=lr(je,a);return i?He([je,l]):l}function hj(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(a=>!n.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(n!=null&&n.has(a))return;let{leading:l,trailing:c}=a;l?i.push(ige(e,t)):c&&(o=sge(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function No(e,t,r){let{leading:n,trailing:i}=hj(e,r);return!n&&!i?t:ZC(t,s=>[n,s,i])}var oge=class extends Error{constructor(r,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(r[i])}.`);Ta(this,"name","UnexpectedNodeError");this.node=r}},kf=oge;function age(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var vo,lge=class{constructor(e){Gde(this,vo,void 0),qde(this,vo,new Set(e))}getLeadingWhitespaceCount(e){let t=Tl(this,vo),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return Tl(this,vo).has(e.charAt(0))}hasTrailingWhitespace(e){return Tl(this,vo).has(Sr(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${age([...Tl(this,vo)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=Tl(this,vo);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=Tl(this,vo);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=Tl(this,vo);return Array.prototype.every.call(e,r=>t.has(r))}};vo=new WeakMap;var uge=lge,Ov=new uge(` -\r `),hD=e=>e===""||e===dt||e===je||e===Re;function cge(e,t,r){var n,i,s;let{node:o}=e;if(o.type==="JSXElement"&&Cge(o))return[r("openingElement"),r("closingElement")];let a=o.type==="JSXElement"?r("openingElement"):r("openingFragment"),l=o.type==="JSXElement"?r("closingElement"):r("closingFragment");if(o.children.length===1&&o.children[0].type==="JSXExpressionContainer"&&(o.children[0].expression.type==="TemplateLiteral"||o.children[0].expression.type==="TaggedTemplateExpression"))return[a,...e.map(r,"children"),l];o.children=o.children.map(w=>Tge(w)?{type:"JSXText",value:" ",raw:" "}:w);let c=o.children.some(Jn),u=o.children.filter(w=>w.type==="JSXExpressionContainer").length>1,h=o.type==="JSXElement"&&o.openingElement.attributes.length>1,d=Hi(a)||c||h||u,f=e.parent.rootMarker==="mdx",p=t.singleQuote?"{' '}":'{" "}',g=f?" ":Ht([p,Re]," "),y=((i=(n=o.openingElement)==null?void 0:n.name)==null?void 0:i.name)==="fbt",b=hge(e,t,r,g,y),v=o.children.some(w=>ng(w));for(let w=b.length-2;w>=0;w--){let T=b[w]===""&&b[w+1]==="",A=b[w]===je&&b[w+1]===""&&b[w+2]===je,$=(b[w]===Re||b[w]===je)&&b[w+1]===""&&b[w+2]===g,I=b[w]===g&&b[w+1]===""&&(b[w+2]===Re||b[w+2]===je),N=b[w]===g&&b[w+1]===""&&b[w+2]===g,L=b[w]===Re&&b[w+1]===""&&b[w+2]===je||b[w]===je&&b[w+1]===""&&b[w+2]===Re;A&&v||T||$||N||L?b.splice(w,2):I&&b.splice(w+1,2)}for(;b.length>0&&hD(Sr(!1,b,-1));)b.pop();for(;b.length>1&&hD(b[0])&&hD(b[1]);)b.shift(),b.shift();let E=[];for(let[w,T]of b.entries()){if(T===g){if(w===1&&b[w-1]===""){if(b.length===2){E.push(p);continue}E.push([p,je]);continue}else if(w===b.length-1){E.push(p);continue}else if(b[w-1]===""&&b[w-2]===je){E.push(p);continue}}E.push(T),Hi(T)&&(d=!0)}let D=v?S_(E):Ce(E,{shouldBreak:!0});if(((s=t.cursorNode)==null?void 0:s.type)==="JSXText"&&o.children.includes(t.cursorNode)&&(D=[xM,D,xM]),f)return D;let C=Ce([a,He([je,D]),je,l]);return d?C:lc([Ce([a,...b,l]),C])}function hge(e,t,r,n,i){let s=[];return e.each(({node:o,next:a})=>{if(o.type==="JSXText"){let l=io(o);if(ng(o)){let c=Ov.split(l,!0);c[0]===""&&(s.push(""),c.shift(),/\n/.test(c[0])?s.push(CM(i,c[1],o,a)):s.push(n),c.shift());let u;if(Sr(!1,c,-1)===""&&(c.pop(),u=c.pop()),c.length===0)return;for(let[h,d]of c.entries())h%2===1?s.push(dt):s.push(d);u!==void 0?/\n/.test(u)?s.push(CM(i,Sr(!1,s,-1),o,a)):s.push(n):s.push(EM(i,Sr(!1,s,-1),o,a))}else/\n/.test(l)?l.match(/\n/g).length>1&&s.push("",je):s.push("",n)}else{let l=r();if(s.push(l),a&&ng(a)){let c=Ov.trim(io(a)),[u]=Ov.split(c);s.push(EM(i,u,o,a))}else s.push(je)}},"children"),s}function EM(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?Re:je:Re}function CM(e,t,r,n){return e?je:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?je:Re:je}var dge=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function fge(e,t,r){let{parent:n}=e;if(dge.has(n.type))return t;let i=e.match(void 0,o=>o.type==="ArrowFunctionExpression",yr,o=>o.type==="JSXExpressionContainer"),s=ch(e,r);return Ce([s?"":Ht("("),He([Re,t]),Re,s?"":Ht(")")],{shouldBreak:i})}function pge(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(gs(n.value)){let o=io(n.value),a=As(!1,As(!1,o.slice(1,-1),"'","'"),""",'"'),l=xz(a,t.jsxSingleQuote);a=l==='"'?As(!1,a,'"',"""):As(!1,a,"'","'"),s=e.call(()=>No(e,Oc(l+a+l),t),"value")}else s=r("value");i.push("=",s)}return i}function mge(e,t,r){let{node:n}=e,i=(s,o)=>s.type==="JSXEmptyExpression"||!et(s)&&(yi(s)||Oo(s)||s.type==="ArrowFunctionExpression"||s.type==="AwaitExpression"&&(i(s.argument,s)||s.argument.type==="JSXElement")||yr(s)||s.type==="ChainExpression"&&yr(s.expression)||s.type==="FunctionExpression"||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||s.type==="DoExpression"||Jn(o)&&(s.type==="ConditionalExpression"||Ja(s)));return i(n.expression,e.parent)?Ce(["{",r("expression"),Xa,"}"]):Ce(["{",He([Re,r("expression")]),Re,Xa,"}"])}function gge(e,t,r){var n,i;let{node:s}=e,o=et(s.name)||et(s.typeParameters)||et(s.typeArguments);if(s.selfClosing&&s.attributes.length===0&&!o)return["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((n=s.attributes)==null?void 0:n.length)===1&&s.attributes[0].value&&gs(s.attributes[0].value)&&!s.attributes[0].value.value.includes(` -`)&&!o&&!et(s.attributes[0]))return Ce(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let a=(i=s.attributes)==null?void 0:i.some(c=>c.value&&gs(c.value)&&c.value.value.includes(` -`)),l=t.singleAttributePerLine&&s.attributes.length>1?je:dt;return Ce(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters"),He(e.map(()=>[l,r()],"attributes")),...yge(s,t,o)],{shouldBreak:a})}function yge(e,t,r){return e.selfClosing?[dt,"/>"]:vge(e,t,r)?[">"]:[Re,">"]}function vge(e,t,r){let n=e.attributes.length>0&&et(Sr(!1,e.attributes,-1),gt.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function bge(e,t,r){let{node:n}=e,i=[];i.push(""),i}function xge(e,t){let{node:r}=e,n=et(r),i=et(r,gt.Line),s=r.type==="JSXOpeningFragment";return[s?"<":""]}function wge(e,t,r){let n=No(e,cge(e,t,r),t);return fge(e,n,t)}function Sge(e,t){let{node:r}=e,n=et(r,gt.Line);return[fn(e,t,{indent:n}),n?je:""]}function Dge(e,t,r){let{node:n}=e;return["{",e.call(({node:i})=>{let s=["...",r()];return!et(i)||!nj(e)?s:[He([Re,No(e,s,t)]),Re]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ege(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return pge(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return lr(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return lr(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Dge(e,t,r);case"JSXExpressionContainer":return mge(e,t,r);case"JSXFragment":case"JSXElement":return wge(e,t,r);case"JSXOpeningElement":return gge(e,t,r);case"JSXClosingElement":return bge(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return xge(e,t);case"JSXEmptyExpression":return Sge(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new kf(n,"JSX")}}function Cge(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!ng(t)}function ng(e){return e.type==="JSXText"&&(Ov.hasNonWhitespaceCharacter(io(e))||!/\n/.test(io(e)))}function Tge(e){return e.type==="JSXExpressionContainer"&&gs(e.expression)&&e.expression.value===" "&&!et(e.expression)}function Age(e){let{node:t,parent:r}=e;if(!Jn(t)||!Jn(r))return!1;let{index:n,siblings:i}=e,s;for(let o=n;o>0;o--){let a=i[o-1];if(!(a.type==="JSXText"&&!ng(a))){s=a;break}}return(s==null?void 0:s.type)==="JSXExpressionContainer"&&s.expression.type==="JSXEmptyExpression"&&C1(s.expression)}function kge(e){return C1(e.node)||Age(e)}var dj=kge,_ge=0;function fj(e,t,r){var n;let{node:i,parent:s,grandparent:o,key:a}=e,l=a!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),c=i.operator==="|>"&&((n=e.root.extra)==null?void 0:n.__isUsingHackPipeline),u=sT(e,r,t,!1,l);if(l)return u;if(c)return Ce(u);if(yr(s)&&s.callee===i||s.type==="UnaryExpression"||un(s)&&!s.computed)return Ce([He([Re,...u]),Re]);let h=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&o.type==="JSXAttribute"||i.operator!=="|"&&s.type==="JsExpressionRoot"||i.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&o.type==="NGMicrosyntax"&&o.body.length===1)||i===s.body&&s.type==="ArrowFunctionExpression"||i!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&o.type!=="ReturnStatement"&&o.type!=="ThrowStatement"&&!yr(o)||s.type==="TemplateLiteral",d=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||cl(s),f=Ja(i.left)&&x_(i.operator,i.left.operator);if(h||ig(i)&&!f||!ig(i)&&d)return Ce(u);if(u.length===0)return"";let p=Jn(i.right),g=u.findIndex(C=>typeof C!="string"&&!Array.isArray(C)&&C.type===oo),y=u.slice(0,g===-1?1:g+1),b=u.slice(y.length,p?-1:void 0),v=Symbol("logicalChain-"+ ++_ge),E=Ce([...y,He(b)],{id:v});if(!p)return E;let D=Sr(!1,u,-1);return Ce([E,T1(D,{groupId:v})])}function sT(e,t,r,n,i){var s;let{node:o}=e;if(!Ja(o))return[Ce(t())];let a=[];x_(o.operator,o.left.operator)?a=e.call(y=>sT(y,t,r,!0,i),"left"):a.push(Ce(t("left")));let l=ig(o),c=(o.operator==="|>"||o.type==="NGPipeExpression"||$ge(e,r))&&!Nc(r.originalText,o.right),u=o.type==="NGPipeExpression"?"|":o.operator,h=o.type==="NGPipeExpression"&&o.arguments.length>0?Ce(He([Re,": ",lr([dt,": "],e.map(()=>ua(2,Ce(t())),"arguments"))])):"",d;if(l)d=[u," ",t("right"),h];else{let y=u==="|>"&&((s=e.root.extra)!=null&&s.__isUsingHackPipeline)?e.call(b=>sT(b,t,r,!0,i),"right"):t("right");d=[c?dt:"",u,c?" ":dt,y,h]}let{parent:f}=e,p=et(o.left,gt.Trailing|gt.Line),g=p||!(i&&o.type==="LogicalExpression")&&f.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type;if(a.push(c?"":" ",g?Ce(d,{shouldBreak:p}):d),n&&et(o)){let y=D_(No(e,a,r));return Array.isArray(y)||y.type===la?Vz(y):[y]}return a}function ig(e){return e.type!=="LogicalExpression"?!1:!!(Oo(e.right)&&e.right.properties.length>0||yi(e.right)&&e.right.elements.length>0||Jn(e.right))}var TM=e=>e.type==="BinaryExpression"&&e.operator==="|";function $ge(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&TM(e.node)&&!e.hasAncestor(r=>!TM(r)&&r.type!=="JsExpressionRoot")}function Fge(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),et(n.node)?" //"+Td(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return fj(e,t,r);case"NGChainedExpression":return Ce(lr([";",dt],e.map(()=>Ige(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":AM(e)?" ":[";",dt],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:i,parent:s}=e,o=AM(e)||(i===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(i===2||i===3)&&(n.key.name==="else"&&s.body[i-1].type==="NGMicrosyntaxKeyedExpression"&&s.body[i-1].key.name==="then"||n.key.name==="track"))&&s.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new kf(n,"Angular")}}function AM({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var Pge=zr(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Ige({node:e}){return KC(e,Pge)}function pj(e,t,r){let{node:n}=e;return Ce([lr(dt,e.map(r,"decorators")),mj(n,t)?je:dt])}function Nge(e,t,r){return gj(e.node)?[lr(je,e.map(r,"declaration","decorators")),je]:""}function Mge(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!vr(s)||gj(i)||dj(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||mj(n,t);return[e.key==="declaration"&&Bfe(i)?je:o?ca:"",lr(dt,e.map(r,"decorators")),dt]}function mj(e,t){return e.decorators.some(r=>$s(t.originalText,br(r)))}function gj(e){var t;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let r=(t=e.declaration)==null?void 0:t.decorators;return vr(r)&&x1(e,r[0])}var z0=class extends Error{constructor(){super(...arguments);Ta(this,"name","ArgExpansionBailout")}};function Lge(e,t,r){let{node:n}=e,i=so(n);if(i.length===0)return["(",fn(e,t),")"];if(Bge(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,o=i.length-1,a=[];w_(e,({node:h},d)=>{let f=r();d===o||(Fu(h,t)?(s=!0,f=[f,",",je,je]):f=[f,",",dt]),a.push(f)});let l=!(n.type==="ImportExpression"||n.callee.type==="Import")&&$u(t,"all")?",":"";function c(){return Ce(["(",He([dt,...a]),l,dt,")"],{shouldBreak:!0})}if(s||e.parent.type!=="Decorator"&&Kfe(i))return c();if(Rge(i)){let h=a.slice(1);if(h.some(Hi))return c();let d;try{d=r(yM(n,0),{expandFirstArg:!0})}catch(f){if(f instanceof z0)return c();throw f}return Hi(d)?[ca,lc([["(",Ce(d,{shouldBreak:!0}),", ",...h,")"],c()])]:lc([["(",d,", ",...h,")"],["(",Ce(d,{shouldBreak:!0}),", ",...h,")"],c()])}if(Oge(i,a,t)){let h=a.slice(0,-1);if(h.some(Hi))return c();let d;try{d=r(yM(n,-1),{expandLastArg:!0})}catch(f){if(f instanceof z0)return c();throw f}return Hi(d)?[ca,lc([["(",...h,Ce(d,{shouldBreak:!0}),")"],c()])]:lc([["(",...h,d,")"],["(",...h,Ce(d,{shouldBreak:!0}),")"],c()])}let u=["(",He([Re,...a]),Ht(l),Re,")"];return Lz(e)?u:Ce(u,{shouldBreak:a.some(Hi)||s})}function mm(e,t=!1){return Oo(e)&&(e.properties.length>0||et(e))||yi(e)&&(e.elements.length>0||et(e))||e.type==="TSTypeAssertion"&&mm(e.expression)||Qo(e)&&mm(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||zge(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&mm(e.body,!0)||Oo(e.body)||yi(e.body)||!t&&(yr(e.body)||e.body.type==="ConditionalExpression")||Jn(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function Oge(e,t,r){var n,i;let s=Sr(!1,e,-1);if(e.length===1){let a=Sr(!1,t,-1);if((n=a.label)!=null&&n.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let o=Sr(!1,e,-2);return!et(s,gt.Leading)&&!et(s,gt.Trailing)&&mm(s)&&(!o||o.type!==s.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!yi(s))&&!(e.length>1&&Hj(s,r))}function Rge(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&jge(r)?!0:!et(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&yj(r)&&!mm(r)}function yj(e){var t;if(e.type==="ParenthesizedExpression")return yj(e.expression);if(Qo(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),v_(r)&&To(e.expression,1)}return Yd(e)&&so(e).length>1?!1:Ja(e)?To(e.left,1)&&To(e.right,1):Az(e)||To(e)}function Bge(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&Fi(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>et(t))}function zge(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||et(e,gt.Dangling))}function jge(e){return e.type==="ObjectExpression"&&e.properties.length===1&&cl(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&gs(e.properties[0].value)&&e.properties[0].value.value==="module"}var oT=Lge,Hge=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),yr(e)&&so(e).length>0);function Uge(e,t,r){var n;let i=r("object"),s=vj(e,t,r),{node:o}=e,a=e.findAncestor(u=>!(un(u)||u.type==="TSNonNullExpression")),l=e.findAncestor(u=>!(u.type==="ChainExpression"||u.type==="TSNonNullExpression")),c=a&&(a.type==="NewExpression"||a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier")||o.computed||o.object.type==="Identifier"&&o.property.type==="Identifier"&&!un(l)||(l.type==="AssignmentExpression"||l.type==="VariableDeclarator")&&(Hge(o.object)||((n=i.label)==null?void 0:n.memberChain));return Og(i.label,[i,c?s:Ce(He([Re,s]))])}function vj(e,t,r){let n=r("property"),{node:i}=e,s=Wi(e);return i.computed?!i.property||pu(i.property)?[s,"[",n,"]"]:Ce([s,"[",He([Re,n]),Re,"]"]):[s,".",n]}function bj(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>bj(e,t,r),"expression");let{parent:n}=e,i=!n||n.type==="ExpressionStatement",s=[];function o(P){let{originalText:_}=t,M=Rg(_,br(P));return _.charAt(M)===")"?M!==!1&&g_(_,M+1):Fu(P,t)}function a(P){let{node:_}=P;if(_.type==="ChainExpression")return P.call(()=>a(P),"expression");if(yr(_)&&(Jh(_.callee)||yr(_.callee))){let M=o(_);s.unshift({node:_,hasTrailingEmptyLine:M,printed:[No(P,[Wi(P),Rc(P,t,r),oT(P,t,r)],t),M?je:""]}),P.call(B=>a(B),"callee")}else Jh(_)?(s.unshift({node:_,needsParens:ch(P,t),printed:No(P,un(_)?vj(P,t,r):zj(P,t,r),t)}),P.call(M=>a(M),"object")):_.type==="TSNonNullExpression"?(s.unshift({node:_,printed:No(P,"!",t)}),P.call(M=>a(M),"expression")):s.unshift({node:_,printed:r()})}let{node:l}=e;s.unshift({node:l,printed:[Wi(e),Rc(e,t,r),oT(e,t,r)]}),l.callee&&e.call(P=>a(P),"callee");let c=[],u=[s[0]],h=1;for(;h0&&c.push(u);function f(P){return/^[A-Z]|^[$_]+$/.test(P)}function p(P){return P.length<=t.tabWidth}function g(P){var _;let M=(_=P[1][0])==null?void 0:_.node.computed;if(P[0].length===1){let R=P[0][0].node;return R.type==="ThisExpression"||R.type==="Identifier"&&(f(R.name)||i&&p(R.name)||M)}let B=Sr(!1,P[0],-1).node;return un(B)&&B.property.type==="Identifier"&&(f(B.property.name)||M)}let y=c.length>=2&&!et(c[1][0].node)&&g(c);function b(P){let _=P.map(M=>M.printed);return P.length>0&&Sr(!1,P,-1).needsParens?["(",..._,")"]:_}function v(P){return P.length===0?"":He([je,lr(je,P.map(b))])}let E=c.map(b),D=E,C=y?3:2,w=c.flat(),T=w.slice(1,-1).some(P=>et(P.node,gt.Leading))||w.slice(0,-1).some(P=>et(P.node,gt.Trailing))||c[C]&&et(c[C][0].node,gt.Leading);if(c.length<=C&&!T&&!c.some(P=>Sr(!1,P,-1).hasTrailingEmptyLine))return Lz(e)?D:Ce(D);let A=Sr(!1,c[y?1:0],-1).node,$=!yr(A)&&o(A),I=[b(c[0]),y?c.slice(1,2).map(b):"",$?je:"",v(c.slice(y?2:1))],N=s.map(({node:P})=>P).filter(yr);function L(){let P=Sr(!1,Sr(!1,c,-1),-1).node,_=Sr(!1,E,-1);return yr(P)&&Hi(_)&&N.slice(0,-1).some(M=>M.arguments.some(tg))}let F;return T||N.length>2&&N.some(P=>!P.arguments.every(_=>To(_)))||E.slice(0,-1).some(Hi)||L()?F=Ce(I):F=[Hi(D)||$?ca:"",lc([D,I])],Og({memberChain:!0},F)}var Wge=bj;function xj(e,t,r){var n;let{node:i,parent:s}=e,o=i.type==="NewExpression",a=i.type==="ImportExpression",l=Wi(e),c=so(i),u=c.length===1&&Nz(c[0],t.originalText);if(u||c.length>0&&!o&&!a&&(Gge(i,s)||E1(i,s))){let d=[];if(w_(e,()=>{d.push(r())}),!(u&&(n=d[0].label)!=null&&n.embed))return[o?"new ":"",r("callee"),l,Rc(e,t,r),"(",lr(", ",d),")"]}if(!a&&!o&&Jh(i.callee)&&!e.call(d=>ch(d,t),"callee",...i.callee.type==="ChainExpression"?["expression"]:[]))return Wge(e,t,r);let h=[o?"new ":"",a?Vge(i):r("callee"),l,Rc(e,t,r),oT(e,t,r)];return a||yr(i.callee)?Ce(h):h}function Vge(e){return e.phase?`import.${e.phase}`:"import"}function Gge(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=so(e);return r.length===1&&gs(r[0])||r.length>1}if(e.callee.name==="define"){let r=so(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&gs(r[0])&&r[1].type==="ArrayExpression")}return!1}function Bg(e,t,r,n,i,s){let o=Jge(e,t,r,n,s),a=s?r(s,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return Ce([Ce(n),i,Ce(He([dt,a]))]);case"never-break-after-operator":return Ce([Ce(n),i," ",a]);case"fluid":{let l=Symbol("assignment");return Ce([Ce(n),i,Ce(He(dt),{id:l}),Xa,T1(a,{groupId:l})])}case"break-lhs":return Ce([n,i," ",Ce(a)]);case"chain":return[Ce(n),i,dt,a];case"chain-tail":return[Ce(n),i,He([dt,a])];case"chain-tail-arrow-chain":return[Ce(n),i,a];case"only-left":return n}}function qge(e,t,r){let{node:n}=e;return Bg(e,t,r,r("left"),[" ",n.operator],"right")}function Kge(e,t,r){return Bg(e,t,r,r("id")," =","init")}function Jge(e,t,r,n,i){let{node:s}=e,o=s[i];if(!o)return"only-left";let a=!Rv(o);if(e.match(Rv,wj,u=>!a||u.type!=="ExpressionStatement"&&u.type!=="VariableDeclaration"))return a?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Rv(o.right)||Nc(t.originalText,o))return"break-after-operator";if(o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let l=vpe(n);if(Yge(s)||tye(s)||Sj(s)&&l)return"break-lhs";let c=nye(s,n,t);return e.call(()=>Xge(e,t,r,c),i)?"break-after-operator":Zge(s)?"break-lhs":!l&&(c||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||o.type==="BooleanLiteral"||pu(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Xge(e,t,r,n){let i=e.node;if(Ja(i)&&!ig(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!oye(i))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:c}=i;return Ja(c)&&!ig(c)}let{consequent:a,alternate:l}=i;return a.type==="ConditionalExpression"||l.type==="ConditionalExpression"}case"ClassExpression":return vr(i.decorators)}if(n)return!1;let s=i,o=[];for(;;)if(s.type==="UnaryExpression"||s.type==="AwaitExpression"||s.type==="YieldExpression"&&s.argument!==null)s=s.argument,o.push("argument");else if(s.type==="TSNonNullExpression")s=s.expression,o.push("expression");else break;return!!(gs(s)||e.call(()=>Dj(e,t,r),...o))}function Yge(e){if(wj(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return cl(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Rv(e){return e.type==="AssignmentExpression"}function wj(e){return Rv(e)||e.type==="VariableDeclarator"}function Zge(e){let t=eye(e);if(vr(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Qge=zr(["TSTypeAliasDeclaration","TypeAlias"]);function eye(e){var t;if(Qge(e))return(t=e.typeParameters)==null?void 0:t.params}function tye(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=kM(t.typeAnnotation);return vr(r)&&r.length>1&&r.some(n=>vr(kM(n))||n.type==="TSConditionalType")}function Sj(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var rye=zr(["TSTypeReference","GenericTypeAnnotation"]);function kM(e){var t;if(rye(e))return(t=e.typeParameters)==null?void 0:t.params}function Dj(e,t,r,n=!1){var i;let{node:s}=e,o=()=>Dj(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(o,"expression");if(yr(s)){if((i=xj(e,t,r).label)!=null&&i.memberChain)return!1;let a=so(s);return!(a.length===0||a.length===1&&b_(a[0],t))||iye(s,r)?!1:e.call(o,"callee")}return un(s)?e.call(o,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function nye(e,t,r){return cl(e)?(t=D_(t),typeof t=="string"&&Kd(t)1)return!0;if(r.length===1){let i=r[0];if(Mc(i)||Rz(i)||i.type==="TSTypeLiteral"||i.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(Hi(t(n)))return!0}return!1}function sye(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function oye(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":case"TSTypeReference":return!!r.typeParameters;default:return!1}}return t(e.checkType)||t(e.extendsType)}function zg(e,t,r,n,i){let s=e.node,o=Fi(s),a=i?Rc(e,r,t):"";if(o.length===0)return[a,"(",fn(e,r,{filter:f=>Ya(r.originalText,br(f))===")"}),")"];let{parent:l}=e,c=E1(l),u=Ej(s),h=[];if(epe(e,(f,p)=>{let g=p===o.length-1;g&&s.rest&&h.push("..."),h.push(t()),!g&&(h.push(","),c||u?h.push(" "):Fu(o[p],r)?h.push(je,je):h.push(dt))}),n&&!lye(e)){if(Hi(a)||Hi(h))throw new z0;return Ce([YC(a),"(",YC(h),")"])}let d=o.every(f=>!vr(f.decorators));return u&&d?[a,"(",...h,")"]:c?[a,"(",...h,")"]:(_z(l)||jfe(l)||l.type==="TypeAlias"||l.type==="UnionTypeAnnotation"||l.type==="IntersectionTypeAnnotation"||l.type==="FunctionTypeAnnotation"&&l.returnType===s)&&o.length===1&&o[0].name===null&&s.this!==o[0]&&o[0].typeAnnotation&&s.typeParameters===null&&v_(o[0].typeAnnotation)&&!s.rest?r.arrowParens==="always"?["(",...h,")"]:h:[a,"(",He([Re,...h]),Ht(!Qfe(s)&&$u(r,"all")?",":""),Re,")"]}function Ej(e){if(!e)return!1;let t=Fi(e);if(t.length!==1)return!1;let[r]=t;return!et(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&mu(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&mu(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||Oo(r.right)&&r.right.properties.length===0||yi(r.right)&&r.right.elements.length===0))}function aye(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function A1(e,t){var r;let n=aye(e);if(!n)return!1;let i=(r=e.typeParameters)==null?void 0:r.params;if(i){if(i.length>1)return!1;if(i.length===1){let s=i[0];if(s.constraint||s.default)return!1}}return Fi(e).length===1&&(mu(n)||Hi(t))}function lye(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function uye(e){let t=Fi(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var cye=zr(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),hye=zr(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function dye(e){let{types:t}=e;if(t.some(n=>et(n)))return!1;let r=t.find(n=>hye(n));return r?t.every(n=>n===r||cye(n)):!1}function Cj(e){return v_(e)||mu(e)?!0:Mc(e)?dye(e):!1}function fye(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[ao(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}function Tj(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[ao(e)];s.push("type ",r("id"),r("typeParameters"));let o=i.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[Bg(e,t,r,s," =",o),n]}function Aj(e,t,r){let n=!1;return Ce(e.map(({isFirst:i,previous:s,node:o,index:a})=>{let l=r();if(i)return l;let c=mu(o),u=mu(s);return u&&c?[" & ",n?He(l):l]:!u&&!c?He([" &",dt,l]):(a>1&&(n=!0),[" & ",a>1?He(l):l])},"types"))}function kj(e,t,r){let{node:n}=e,{parent:i}=e,s=i.type!=="TypeParameterInstantiation"&&(i.type!=="TSConditionalType"||!t.experimentalTernaries)&&(i.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&i.type!=="TSTypeParameterInstantiation"&&i.type!=="GenericTypeAnnotation"&&i.type!=="TSTypeReference"&&i.type!=="TSTypeAssertion"&&i.type!=="TupleTypeAnnotation"&&i.type!=="TSTupleType"&&!(i.type==="FunctionTypeParam"&&!i.name&&e.grandparent.this!==i)&&!((i.type==="TypeAlias"||i.type==="VariableDeclarator"||i.type==="TSTypeAliasDeclaration")&&Nc(t.originalText,n)),o=Cj(n),a=e.map(u=>{let h=r();return o||(h=ua(2,h)),No(u,h,t)},"types");if(o)return lr(" | ",a);let l=s&&!Nc(t.originalText,n),c=[Ht([l?dt:"","| "]),lr([dt,"| "],a)];return ch(e,t)?Ce([He(c),Re]):(i.type==="TupleTypeAnnotation"||i.type==="TSTupleType")&&i[i.type==="TupleTypeAnnotation"&&i.types?"types":"elementTypes"].length>1?Ce([He([Ht(["(",Re]),c]),Re,Ht(")")]):Ce(s?He(c):c)}function pye(e){var t;let{node:r,parent:n}=e;return r.type==="FunctionTypeAnnotation"&&(_z(n)||!((n.type==="ObjectTypeProperty"||n.type==="ObjectTypeInternalSlot")&&!n.variance&&!n.optional&&x1(n,r)||n.type==="ObjectTypeCallProperty"||((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareFunction"))}function _j(e,t,r){let{node:n}=e,i=[k1(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&i.push("new ");let s=zg(e,r,t,!1,!0),o=[];return n.type==="FunctionTypeAnnotation"?o.push(pye(e)?" => ":": ",r("returnType")):o.push(di(e,r,n.returnType?"returnType":"typeAnnotation")),A1(n,o)&&(s=Ce(s)),i.push(s,o),Ce(i)}function $j(e,t,r){return[r("objectType"),Wi(e),"[",r("indexType"),"]"]}function Fj(e,t,r){return["infer ",r("typeParameter")]}function _M(e,t,r){let{node:n}=e;return[n.postfix?"":r,di(e,t),n.postfix?r:""]}function Pj(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Ij(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var mye=new WeakSet;function di(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let s=e.call(Nj,r);(s==="=>"||s===":"&&et(n,gt.Leading))&&(i=!0),mye.add(n)}return i?[" ",t(r)]:t(r)}var Nj=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Mj(e,t,r){let n=Nj(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Lj(e){return[e("elementType"),"[]"]}function Oj({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function Rj(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",di(e,t)]:""]}function Wi(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":yr(t)||un(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function Bj(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var gye=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ao(e){let{node:t}=e;return t.declare||gye.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var yye=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function k1({node:e}){return e.abstract||yye.has(e.type)?"abstract ":""}function Rc(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function zj(e,t,r){return["::",r("callee")]}function Al(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:He([dt,t])}function jj(e,t){return["...",t("argument"),di(e,t)]}function j0(e){return e.accessibility?e.accessibility+" ":""}function vye(e,t,r,n){let{node:i}=e;return et(i,gt.Dangling)?Ce([r,fn(e,t,{indent:!0}),Re,n]):[r,n]}function F_(e,t,r){let{node:n}=e,i=[],s=n.type==="TupleExpression"?"#[":"[",o="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",l=n[a];if(l.length===0)i.push(vye(e,t,s,o));else{let c=Sr(!1,l,-1),u=(c==null?void 0:c.type)!=="RestElement",h=c===null,d=Symbol("array"),f=!t.__inJestEach&&l.length>1&&l.every((y,b,v)=>{let E=y==null?void 0:y.type;if(!yi(y)&&!Oo(y))return!1;let D=v[b+1];if(D&&E!==D.type)return!1;let C=yi(y)?"elements":"properties";return y[C]&&y[C].length>1}),p=Hj(n,t),g=u?h?",":$u(t)?p?Ht(",","",{groupId:d}):Ht(","):"":"";i.push(Ce([s,He([Re,p?xye(e,t,r,g):[bye(e,t,a,r),g],fn(e,t)]),Re,o],{shouldBreak:f,id:d}))}return i.push(Wi(e),di(e,r)),i}function Hj(e,t){return yi(e)&&e.elements.length>1&&e.elements.every(r=>r&&(pu(r)||Tz(r)&&!et(r.argument))&&!et(r,gt.Trailing|gt.Line,n=>!$s(t.originalText,cn(n),{backwards:!0})))}function Uj({node:e},{originalText:t}){let r=i=>p_(t,m_(t,i)),n=i=>t[i]===","?i:n(r(i+1));return g_(t,n(br(e)))}function bye(e,t,r,n){let i=[];return e.each(({node:s,isLast:o})=>{i.push(s?Ce(n()):""),o||i.push([",",dt,s&&Uj(e,t)?Re:""])},r),i}function xye(e,t,r,n){let i=[];return e.each(({isLast:s,next:o})=>{i.push([r(),s?n:","]),s||i.push(Uj(e,t)?[je,je]:et(o,gt.Leading|gt.Line)?je:dt)},"elements"),S_(i)}var Wj=new Proxy(()=>{},{get:()=>Wj}),Vj=Wj;function wye(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Vl=wye,Jy=new WeakMap;function jg(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if(t.quoteProps==="consistent"&&!Jy.has(i)){let o=(i.properties||i.body||i.members).some(a=>!a.computed&&a.key&&gs(a.key)&&!pM(a,t));Jy.set(i,o)}if((s.type==="Identifier"||pu(s)&&Iz(Vl(io(s)))&&String(s.value)===Vl(io(s))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&Jy.get(i))){let o=eg(JSON.stringify(s.type==="Identifier"?s.name:s.value.toString()),t);return e.call(a=>No(a,o,t),"key")}return pM(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!Jy.get(i))?e.call(o=>No(o,/^\d/.test(s.value)?Vl(s.value):s.value,t),"key"):r("key")}function $M(e,t,r){let{node:n}=e;return n.shorthand?r("value"):Bg(e,t,r,jg(e,t,r),":","value")}var Sye=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&D1(r));function Gj(e,t,r,n){if(Sye(e))return P_(e,r,t);let{node:i}=e,s=!1;if((i.type==="FunctionDeclaration"||i.type==="FunctionExpression")&&n!=null&&n.expandLastArg){let{parent:u}=e;yr(u)&&(so(u).length>1||Fi(i).every(h=>h.type==="Identifier"&&!h.typeAnnotation))&&(s=!0)}let o=[ao(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],a=zg(e,t,r,s),l=I_(e,t),c=A1(i,l);return o.push(Rc(e,r,t),Ce([c?Ce(a):a,l]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&o.push(";"),o}function aT(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,o=[];return!i||i==="init"||i==="method"||i==="constructor"?s.async&&o.push("async "):(Vj.ok(i==="get"||i==="set"),o.push(i," ")),s.generator&&o.push("*"),o.push(jg(e,t,r),n.optional||n.key.optional?"?":"",n===s?P_(e,t,r):r("value")),o}function P_(e,t,r){let{node:n}=e,i=zg(e,r,t),s=I_(e,r),o=uye(n),a=A1(n,s),l=[Rc(e,t,r),Ce([o?Ce(i,{shouldBreak:!0}):a?Ce(i):i,s])];return n.body?l.push(" ",r("body")):l.push(t.semi?";":""),l}function Dye(e){let t=Fi(e);return t.length===1&&!e.typeParameters&&!et(e,gt.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!et(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function qj(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Dye(r)}return!1}function I_(e,t){let{node:r}=e,n=[di(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Kj(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let l=r("argument");Tye(t,n.argument)?l=["(",He([je,l]),je,")"]:(Ja(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(l=Ce([Ht("("),He([Re,l]),Re,Ht(")")])),s.push(" ",l)}let o=et(n,gt.Dangling),a=i&&o&&et(n,gt.Last|gt.Line);return a&&s.push(i),o&&s.push(" ",fn(e,t)),a||s.push(i),s}function Eye(e,t,r){return["return",Kj(e,t,r)]}function Cye(e,t,r){return["throw",Kj(e,t,r)]}function Tye(e,t){if(Nc(e.originalText,t)||et(t,gt.Leading,r=>gu(e.originalText,cn(r),br(r)))&&!Jn(t))return!0;if(y_(t)){let r=t,n;for(;n=Rfe(r);)if(r=n,Nc(e.originalText,r))return!0}return!1}var dD=new WeakMap;function Jj(e){return dD.has(e)||dD.set(e,e.type==="ConditionalExpression"&&!Bi(e,t=>t.type==="ObjectExpression")),dD.get(e)}var Xj=e=>e.type==="SequenceExpression";function Aye(e,t,r,n={}){let i=[],s,o=[],a=!1,l=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function y(){let{node:b}=e,v=kye(e,t,r,n);if(i.length===0)i.push(v);else{let{leading:E,trailing:D}=hj(e,t);i.push([E,v]),o.unshift(D)}l&&(a||(a=b.returnType&&Fi(b).length>0||b.typeParameters||Fi(b).some(E=>E.type!=="Identifier"))),!l||b.body.type!=="ArrowFunctionExpression"?(s=r("body",n),c=b.body):e.call(y,"body")})();let u=!Nc(t.originalText,c)&&(Xj(c)||_ye(c,s,t)||!a&&Jj(c)),h=e.key==="callee"&&Yd(e.parent),d=Symbol("arrow-chain"),f=$ye(e,n,{signatureDocs:i,shouldBreak:a}),p,g=!1;return l&&(h||n.assignmentLayout)&&(g=!0,p=n.assignmentLayout==="chain-tail-arrow-chain"||h&&!u),s=Fye(e,t,n,{bodyDoc:s,bodyComments:o,functionBody:c,shouldPutBodyOnSameLine:u}),Ce([Ce(g?He([Re,f]):f,{shouldBreak:p,id:d})," =>",l?T1(s,{groupId:d}):Ce(s),l&&h?Ht(Re,"",{groupId:d}):""])}function kye(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),qj(e,t))s.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,l=I_(e,r);if(a){if(Hi(l))throw new z0;l=Ce(YC(l))}s.push(Ce([zg(e,r,t,a,!0),l]))}let o=fn(e,t,{filter(a){let l=Rg(t.originalText,br(a));return l!==!1&&t.originalText.slice(l,l+2)==="=>"}});return o&&s.push(" ",o),s}function _ye(e,t,r){var n,i;return yi(e)||Oo(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||Jn(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((i=t.label)==null?void 0:i.embed)||Nz(e,r.originalText))}function $ye(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:i,key:s}=e;return s!=="callee"&&Yd(i)||Ja(i)?Ce([r[0]," =>",He([dt,lr([" =>",dt],r.slice(1))])],{shouldBreak:n}):s==="callee"&&Yd(i)||t.assignmentLayout?Ce(lr([" =>",dt],r),{shouldBreak:n}):Ce(He(lr([" =>",dt],r)),{shouldBreak:n})}function Fye(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:o}){let{node:a,parent:l}=e,c=r.expandLastArg&&$u(t,"all")?Ht(","):"",u=(r.expandLastArg||l.type==="JSXExpressionContainer")&&!et(a)?Re:"";return o&&Jj(s)?[" ",Ce([Ht("","("),He([Re,n]),Ht("",")"),c,u]),i]:(Xj(s)&&(n=Ce(["(",He([Re,n]),Re,")"])),o?[" ",n,i]:[He([dt,n,i]),c,u])}var Pye=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},Iye=Pye;function lT(e,t,r,n){let{node:i}=e,s=[],o=Iye(!1,i[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(s.push(r()),a!==o&&(s.push(je),Fu(a,t)&&s.push(je)))},n),s}function Yj(e,t,r){let{node:n}=e,i=[];n.type==="StaticBlock"&&i.push("static "),i.push("{");let s=Zj(e,t,r);if(s)i.push(He([je,s]),je);else{let{parent:o}=e,a=e.grandparent;o.type==="ArrowFunctionExpression"||o.type==="FunctionExpression"||o.type==="FunctionDeclaration"||o.type==="ObjectMethod"||o.type==="ClassMethod"||o.type==="ClassPrivateMethod"||o.type==="ForStatement"||o.type==="WhileStatement"||o.type==="DoWhileStatement"||o.type==="DoExpression"||o.type==="CatchClause"&&!a.finalizer||o.type==="TSModuleDeclaration"||o.type==="TSDeclareFunction"||n.type==="StaticBlock"||i.push(je)}return i.push("}"),i}function Zj(e,t,r){var n;let{node:i}=e,s=vr(i.directives),o=i.body.some(c=>c.type!=="EmptyStatement"),a=et(i,gt.Dangling);if(!s&&!o&&!a)return"";let l=[];return s&&(l.push(lT(e,t,r,"directives")),(o||a)&&(l.push(je),Fu(Sr(!1,i.directives,-1),t)&&l.push(je))),o&&l.push(lT(e,t,r,"body")),a&&l.push(fn(e,t)),i.type==="Program"&&((n=e.parent)==null?void 0:n.type)!=="ModuleExpression"&&l.push(je),l}function Nye(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var Qj=Nye;function Mye(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Lye(e,t,r){let{node:n}=e;return Ce([n.variance?r("variance"):"","[",He([r("keyTparam")," in ",r("sourceType")]),"]",Mye(n.optional),": ",r("propType")])}function e7(e,t){return e==="+"||e==="-"?e+t:t}function Oye(e,t,r){let{node:n}=e,i=gu(t.originalText,cn(n),cn(n.typeParameter));return Ce(["{",He([t.bracketSpacing?dt:Re,Ce([r("typeParameter"),n.optional?e7(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Ht(";"):""]),fn(e,t),t.bracketSpacing?dt:Re,"}"],{shouldBreak:i})}var N_=Qj("typeParameters");function Rye(e,t,r){let{node:n}=e;return Fi(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function gm(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),o=s&&E1(s),a=e.match(c=>!(c[n].length===1&&mu(c[n][0])),void 0,(c,u)=>u==="typeAnnotation",c=>c.type==="Identifier",Sj);if(i[n].length===0||!a&&(o||i[n].length===1&&(i[n][0].type==="NullableTypeAnnotation"||Cj(i[n][0]))))return["<",lr(", ",e.map(r,n)),Bye(e,t),">"];let l=i.type==="TSTypeParameterInstantiation"?"":Rye(e,t,n)?",":$u(t)?Ht(","):"";return Ce(["<",He([Re,lr([",",dt],e.map(r,n))]),l,Re,">"],{id:N_(i)})}function Bye(e,t){let{node:r}=e;if(!et(r,gt.Dangling))return"";let n=!et(r,gt.Line),i=fn(e,t,{indent:!n});return n?i:[i,je]}function t7(e,t,r){let{node:n,parent:i}=e,s=[n.type==="TSTypeParameter"&&n.const?"const ":""],o=n.type==="TSTypeParameter"?r("name"):n.name;if(i.type==="TSMappedType")return i.readonly&&s.push(e7(i.readonly,"readonly")," "),s.push("[",o),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent(()=>r("nameType"))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(o),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(di(e,r,"bound"))),n.constraint){let a=Symbol("constraint");s.push(" extends",Ce(He(dt),{id:a}),Xa,T1(r("constraint"),{groupId:a}))}return n.default&&s.push(" = ",r("default")),Ce(s)}var r7=zr(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function n7(e,t,r){let{node:n}=e,i=[ao(e),k1(e),"class"],s=et(n.id,gt.Trailing)||et(n.typeParameters,gt.Trailing)||et(n.superClass)||vr(n.extends)||vr(n.mixins)||vr(n.implements),o=[],a=[];if(n.id&&o.push(" ",r("id")),o.push(r("typeParameters")),n.superClass){let l=[jye(e,t,r),r("superTypeParameters")],c=e.call(u=>["extends ",No(u,l,t)],"superClass");s?a.push(dt,Ce(c)):a.push(" ",c)}else a.push(fD(e,t,r,"extends"));if(a.push(fD(e,t,r,"mixins"),fD(e,t,r,"implements")),s){let l;o7(n)?l=[...o,He(a)]:l=He([...o,a]),i.push(Ce(l,{id:i7(n)}))}else i.push(...o,...a);return i.push(" ",r("body")),i}var i7=Qj("heritageGroup");function s7(e){return Ht(je,"",{groupId:i7(e)})}function zye(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function o7(e){return e.typeParameters&&!et(e.typeParameters,gt.Trailing|gt.Line)&&!zye(e)}function fD(e,t,r,n){let{node:i}=e;if(!vr(i[n]))return"";let s=fn(e,t,{marker:n});return[o7(i)?Ht(" ",dt,{groupId:N_(i.typeParameters)}):dt,s,s&&je,n,Ce(He([dt,lr([",",dt],e.map(r,n))]))]}function jye(e,t,r){let n=r("superClass"),{parent:i}=e;return i.type==="AssignmentExpression"?Ce(Ht(["(",He([Re,n]),Re,")"],n)):n}function a7(e,t,r){let{node:n}=e,i=[];return vr(n.decorators)&&i.push(pj(e,t,r)),i.push(j0(n)),n.static&&i.push("static "),i.push(k1(e)),n.override&&i.push("override "),i.push(aT(e,t,r)),i}function l7(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";vr(n.decorators)&&i.push(pj(e,t,r)),i.push(j0(n),ao(e)),n.static&&i.push("static "),i.push(k1(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&i.push("accessor "),i.push(jg(e,t,r),Wi(e),Bj(e),di(e,r));let o=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[Bg(e,t,r,i," =",o?void 0:"value"),s]}function Hye(e,t,r){let{node:n}=e,i=[];return e.each(({node:s,next:o,isLast:a})=>{i.push(r()),!t.semi&&r7(s)&&Uye(s,o)&&i.push(";"),a||(i.push(je),Fu(s,t)&&i.push(je))},"body"),et(n,gt.Dangling)&&i.push(fn(e,t)),[vr(n.body)?s7(e.parent):"","{",i.length>0?[He([je,i]),je]:"","}"]}function Uye(e,t){var r;let{type:n,name:i}=e.key;if(!e.computed&&n==="Identifier"&&(i==="static"||i==="get"||i==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let s=(r=t.key)==null?void 0:r.name;if(s==="in"||s==="instanceof")return!0}if(r7(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let s=t.value?t.value.generator:t.generator;return!!(t.computed||s)}case"TSIndexSignature":return!0}return!1}function Wye(e,t){if(t.semi||c7(e,t)||d7(e,t))return!1;let{node:r,key:n,parent:i}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(i.type==="Program"||i.type==="BlockStatement"||i.type==="StaticBlock"||i.type==="TSModuleBlock")||n==="consequent"&&i.type==="SwitchCase")&&e.call(()=>u7(e,t),"expression"))}function u7(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!qj(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:i}=r;if(n&&(i==="+"||i==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(Jn(r))return!0}return ch(e,t)?!0:y_(r)?e.call(()=>u7(e,t),...Cz(r)):!1}function c7({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&Jn(e.expression)&&t.type==="Program"&&t.body.length===1}function h7(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return h7(e.object)}return!1;case"Identifier":return!0;default:return!1}}function d7({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function Vye(e,t,r){let n=[r("expression")];return d7(e,t)?h7(e.node.expression)&&n.push(";"):c7(e,t)||t.semi&&n.push(";"),n}function Gye(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let i=lr([",",dt],n);return t.__isVueForBindingLeft?["(",He([Re,Ce(i)]),Re,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return lr([",",dt],n)}}function qye(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return FM(r);case"BigIntLiteral":return uT(r.extra.raw);case"NumericLiteral":return Vl(r.extra.raw);case"StringLiteral":return Oc(eg(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Vl(r.value)+"m";case"DirectiveLiteral":return PM(r.extra.raw,t);case"Literal":{if(r.regex)return FM(r.regex);if(r.bigint)return uT(r.raw);if(r.decimal)return Vl(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Vl(r.raw):typeof n=="string"?Kye(e)?PM(r.raw,t):Oc(eg(r.raw,t)):String(n)}}}function Kye(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function uT(e){return e.toLowerCase()}function FM({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function PM(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Jye(e,t,r){let n=e.originalText.slice(t,r);for(let i of e[Symbol.for("comments")]){let s=cn(i);if(s>r)break;let o=br(i);if(oe.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function p7(e,t,r){let{node:n}=e,i=[Nge(e,t,r),ao(e),"export",f7(n)?" default":""],{declaration:s,exported:o}=n;return et(n,gt.Dangling)&&(i.push(" ",fn(e,t)),Mz(n)&&i.push(je)),s?i.push(" ",r("declaration")):(i.push(Qye(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(i.push(" *"),o&&i.push(" as ",r("exported"))):i.push(y7(e,t,r)),i.push(g7(e,t,r),b7(e,t,r))),i.push(Zye(n,t)),i}var Yye=zr(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Zye(e,t){return t.semi&&(!e.declaration||f7(e)&&!Yye(e.declaration))?";":""}function L_(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function m7(e,t){return L_(e.importKind,t)}function Qye(e){return L_(e.exportKind)}function g7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return v7(n,t)&&i.push(" from"),i.push(" ",r("source")),i}function y7(e,t,r){let{node:n}=e;if(!v7(n,t))return"";let i=[" "];if(vr(n.specifiers)){let s=[],o=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")s.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")o.push(r());else throw new kf(n,"specifier")},"specifiers"),i.push(lr(", ",s)),o.length>0&&(s.length>0&&i.push(", "),o.length>1||s.length>0||n.specifiers.some(a=>et(a))?i.push(Ce(["{",He([t.bracketSpacing?dt:Re,lr([",",dt],o)]),Ht($u(t)?",":""),t.bracketSpacing?dt:Re,"}"])):i.push(["{",t.bracketSpacing?" ":"",...o,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function v7(e,t){return e.type!=="ImportDeclaration"||vr(e.specifiers)||e.importKind==="type"?!0:M_(t,cn(e),cn(e.source)).trimEnd().endsWith("from")}function eve(e,t){var r,n;if((r=e.extra)!=null&&r.deprecatedAssertSyntax)return"assert";let i=M_(t,br(e.source),(n=e.attributes)!=null&&n[0]?cn(e.attributes[0]):br(e)).trimStart();return i.startsWith("assert")?"assert":i.startsWith("with")||vr(e.attributes)?"with":void 0}function b7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=eve(n,t);if(!i)return"";let s=[` ${i} {`];return vr(n.attributes)&&(t.bracketSpacing&&s.push(" "),s.push(lr(", ",e.map(r,"attributes"))),t.bracketSpacing&&s.push(" ")),s.push("}"),s}function tve(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),o=s?"imported":"local",a=s?"local":"exported",l=n[o],c=n[a],u="",h="";return i==="ExportNamespaceSpecifier"||i==="ImportNamespaceSpecifier"?u="*":l&&(u=r(o)),c&&!rve(n)&&(h=r(a)),[L_(i==="ImportSpecifier"?n.importKind:n.exportKind,!1),u,u&&h?" as ":"",h]}function rve(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!Cfe(t,r))return!1;if(gs(t))return t.value===r.value&&io(t)===io(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function _1(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,o=s.type==="ObjectTypeAnnotation",a=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",l=[s.type==="TSTypeLiteral"||a?"members":s.type==="TSInterfaceBody"?"body":"properties"];o&&l.push("indexers","callProperties","internalSlots");let c=l.flatMap(w=>e.map(({node:T})=>({node:T,printed:r(),loc:cn(T)}),w));l.length>1&&c.sort((w,T)=>w.loc-T.loc);let{parent:u,key:h}=e,d=o&&h==="body"&&(u.type==="InterfaceDeclaration"||u.type==="DeclareInterface"||u.type==="DeclareClass"),f=s.type==="TSInterfaceBody"||a||d||s.type==="ObjectPattern"&&u.type!=="FunctionDeclaration"&&u.type!=="FunctionExpression"&&u.type!=="ArrowFunctionExpression"&&u.type!=="ObjectMethod"&&u.type!=="ClassMethod"&&u.type!=="ClassPrivateMethod"&&u.type!=="AssignmentPattern"&&u.type!=="CatchClause"&&s.properties.some(w=>w.value&&(w.value.type==="ObjectPattern"||w.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&c.length>0&&gu(t.originalText,cn(s),c[0].loc),p=d?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?Ht(i,";"):",",g=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",b=[],v=c.map(w=>{let T=[...b,Ce(w.printed)];return b=[p,dt],(w.node.type==="TSPropertySignature"||w.node.type==="TSMethodSignature"||w.node.type==="TSConstructSignatureDeclaration"||w.node.type==="TSCallSignatureDeclaration")&&et(w.node,gt.PrettierIgnore)&&b.shift(),Fu(w.node,t)&&b.push(je),T});if(s.inexact||s.hasUnknownMembers){let w;if(et(s,gt.Dangling)){let T=et(s,gt.Line);w=[fn(e,t),T||$s(t.originalText,br(Sr(!1,Td(s),-1)))?je:dt,"..."]}else w=["..."];v.push([...b,...w])}let E=(n=Sr(!1,c,-1))==null?void 0:n.node,D=!(s.inexact||s.hasUnknownMembers||E&&(E.type==="RestElement"||(E.type==="TSPropertySignature"||E.type==="TSCallSignatureDeclaration"||E.type==="TSMethodSignature"||E.type==="TSConstructSignatureDeclaration")&&et(E,gt.PrettierIgnore))),C;if(v.length===0){if(!et(s,gt.Dangling))return[g,y,di(e,r)];C=Ce([g,fn(e,t,{indent:!0}),Re,y,Wi(e),di(e,r)])}else C=[d&&vr(s.properties)?s7(u):"",g,He([t.bracketSpacing?dt:Re,...v]),Ht(D&&(p!==","||$u(t))?p:""),t.bracketSpacing?dt:Re,y,Wi(e),di(e,r)];return e.match(w=>w.type==="ObjectPattern"&&!vr(w.decorators),pD)||mu(s)&&(e.match(void 0,(w,T)=>T==="typeAnnotation",(w,T)=>T==="typeAnnotation",pD)||e.match(void 0,(w,T)=>w.type==="FunctionTypeParam"&&T==="typeAnnotation",pD))||!f&&e.match(w=>w.type==="ObjectPattern",w=>w.type==="AssignmentExpression"||w.type==="VariableDeclarator")?C:Ce(C,{shouldBreak:f})}function pD(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&Ej(e)}function nve(e){let t=[e];for(let r=0;rd[$]===n),p=d.type===n.type&&!f,g,y,b=0;do y=g||n,g=e.getParentNode(b),b++;while(g&&g.type===n.type&&a.every($=>g[$]!==y));let v=g||d,E=y;if(i&&(Jn(n[a[0]])||Jn(l)||Jn(c)||nve(E))){h=!0,p=!0;let $=N=>[Ht("("),He([Re,N]),Re,Ht(")")],I=N=>N.type==="NullLiteral"||N.type==="Literal"&&N.value===null||N.type==="Identifier"&&N.name==="undefined";u.push(" ? ",I(l)?r(s):$(r(s))," : ",c.type===n.type||I(c)?r(o):$(r(o)))}else{let $=N=>t.useTabs?He(r(N)):ua(2,r(N)),I=[dt,"? ",l.type===n.type?Ht("","("):"",$(s),l.type===n.type?Ht("",")"):"",dt,": ",$(o)];u.push(d.type!==n.type||d[o]===n||f?I:t.useTabs?Hz(He(I)):ua(Math.max(0,t.tabWidth-2),I))}let D=[s,o,...a].some($=>et(n[$],I=>co(I)&&gu(t.originalText,cn(I),br(I)))),C=$=>d===v?Ce($,{shouldBreak:D}):D?[$,ca]:$,w=!h&&(un(d)||d.type==="NGPipeExpression"&&d.left===n)&&!d.computed,T=ove(e),A=C([ive(e,t,r),p?u:He(u),i&&w&&!T?Re:""]);return f||T?Ce([He([Re,A]),Re]):A}function lve(e,t){return(un(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function uve(e,t,r,n){return[...e.map(i=>Td(i)),Td(t),Td(r)].flat().some(i=>co(i)&&gu(n.originalText,cn(i),br(i)))}var cve=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function hve(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let i=0;!r;i++){let s=e.getParentNode(i);if(s.type==="ChainExpression"&&s.expression===n||yr(s)&&s.callee===n||un(s)&&s.object===n||s.type==="TSNonNullExpression"&&s.expression===n){n=s;continue}s.type==="NewExpression"&&s.callee===n||Qo(s)&&s.expression===n?(r=e.getParentNode(i+1),n=s):r=s}return n===t?!1:r[cve.get(r.type)]===n}var mD=e=>[Ht("("),He([Re,e]),Re,Ht(")")];function O_(e,t,r,n){if(!t.experimentalTernaries)return ave(e,t,r);let{node:i}=e,s=i.type==="ConditionalExpression",o=i.type==="TSConditionalType"||i.type==="ConditionalTypeAnnotation",a=s?"consequent":"trueType",l=s?"alternate":"falseType",c=s?["test"]:["checkType","extendsType"],u=i[a],h=i[l],d=c.map(Xe=>i[Xe]),{parent:f}=e,p=f.type===i.type,g=p&&c.some(Xe=>f[Xe]===i),y=p&&f[l]===i,b=u.type===i.type,v=h.type===i.type,E=v||y,D=t.tabWidth>2||t.useTabs,C,w,T=0;do w=C||i,C=e.getParentNode(T),T++;while(C&&C.type===i.type&&c.every(Xe=>C[Xe]!==w));let A=C||f,$=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),I=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(b||v),N=s&&A.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",L=hve(e),F=lve(i,f),P=o&&ch(e,t),_=D?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",M=uve(d,u,h,t)||b||v,B=!E&&!p&&!o&&(N?u.type==="NullLiteral"||u.type==="Literal"&&u.value===null:b_(u,t)&&fM(i.test,3)),R=E||y||o&&!p||p&&s&&fM(i.test,1)||B,G=[];!b&&et(u,gt.Dangling)&&e.call(Xe=>{G.push(fn(Xe,t),je)},"consequent");let q=[];et(i.test,gt.Dangling)&&e.call(Xe=>{q.push(fn(Xe,t))},"test"),!v&&et(h,gt.Dangling)&&e.call(Xe=>{q.push(fn(Xe,t))},"alternate"),et(i,gt.Dangling)&&q.push(fn(e,t));let ee=Symbol("test"),Y=Symbol("consequent"),X=Symbol("test-and-consequent"),Q=s?[mD(r("test")),i.test.type==="ConditionalExpression"?ca:""]:[r("checkType")," ","extends"," ",i.extendsType.type==="TSConditionalType"||i.extendsType.type==="ConditionalTypeAnnotation"||i.extendsType.type==="TSMappedType"?r("extendsType"):Ce(mD(r("extendsType")))],te=Ce([Q," ?"],{id:ee}),Z=r(a),de=He([b||N&&(Jn(u)||p||E)?je:dt,G,Z]),ke=R?Ce([te,E?de:Ht(de,Ce(de,{id:Y}),{groupId:ee})],{id:X}):[te,de],me=r(l),Fe=B?Ht(me,Hz(mD(me)),{groupId:X}):me,ze=[ke,q.length>0?[He([je,q]),je]:v?je:B?Ht(dt," ",{groupId:X}):dt,":",v?" ":D?R?Ht(_,Ht(E||B?" ":_," "),{groupId:X}):Ht(_," "):" ",v?Fe:Ce([He(Fe),N&&!B?Re:""]),F&&!L?Re:"",M?ca:""];return $&&!M?Ce(He([Re,Ce(ze)])):$||I?Ce(He(ze)):L||o&&g?Ce([He([Re,ze]),P?Re:""]):f===A?Ce(ze):ze}function dve(e,t,r,n){let{node:i}=e;if(S1(i))return qye(e,t);let s=t.semi?";":"",o=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),je];case"File":return Gye(e,t,r)??r("program");case"Program":return Zj(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Vye(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!et(i.expression)&&(Oo(i.expression)||yi(i.expression))?["(",r("expression"),")"]:Ce(["(",He([Re,r("expression")]),Re,")"]);case"AssignmentExpression":return qge(e,t,r);case"VariableDeclarator":return Kge(e,t,r);case"BinaryExpression":case"LogicalExpression":return fj(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Uge(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&o.push(r("object")),o.push(Ce(He([Re,zj(e,t,r)]))),o;case"Identifier":return[i.name,Wi(e),Bj(e),di(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return jj(e,r);case"FunctionDeclaration":case"FunctionExpression":return Gj(e,r,t,n);case"ArrowFunctionExpression":return Aye(e,t,r,n);case"YieldExpression":return o.push("yield"),i.delegate&&o.push("*"),i.argument&&o.push(" ",r("argument")),o;case"AwaitExpression":if(o.push("await"),i.argument){o.push(" ",r("argument"));let{parent:a}=e;if(yr(a)&&a.callee===i||un(a)&&a.object===i){o=[He([Re,...o]),Re];let l=e.findAncestor(c=>c.type==="AwaitExpression"||c.type==="BlockStatement");if((l==null?void 0:l.type)!=="AwaitExpression"||!Bi(l.argument,c=>c===i))return Ce(o)}}return o;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return p7(e,t,r);case"ImportDeclaration":return Xye(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return tve(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Yj(e,t,r);case"ClassBody":return Hye(e,t,r);case"ThrowStatement":return Cye(e,t,r);case"ReturnStatement":return Eye(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return xj(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return _1(e,t,r);case"Property":return D1(i)?aT(e,t,r):$M(e,t,r);case"ObjectProperty":return $M(e,t,r);case"ObjectMethod":return aT(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return F_(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let l=[];return e.each(({isFirst:c})=>{c?l.push(r()):l.push(",",He([dt,r()]))},"expressions"),Ce(l)}return Ce(lr([",",dt],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return o.push(i.operator),/[a-z]$/.test(i.operator)&&o.push(" "),et(i.argument)?o.push(Ce(["(",He([Re,r("argument")]),Re,")"])):o.push(r("argument")),o;case"UpdateExpression":return o.push(r("argument"),i.operator),i.prefix&&o.reverse(),o;case"ConditionalExpression":return O_(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),l=e.parent,c=l.type==="ForStatement"||l.type==="ForInStatement"||l.type==="ForOfStatement",u=i.declarations.some(d=>d.init),h;return a.length===1&&!et(i.declarations[0])?h=a[0]:a.length>0&&(h=He(a[0])),o=[ao(e),i.kind,h?[" ",h]:"",He(a.slice(1).map(d=>[",",u&&!c?je:dt,d]))],c&&l.body!==i||o.push(s),Ce(o)}case"WithStatement":return Ce(["with (",r("object"),")",Al(i.body,r("body"))]);case"IfStatement":{let a=Al(i.consequent,r("consequent")),l=Ce(["if (",Ce([He([Re,r("test")]),Re]),")",a]);if(o.push(l),i.alternate){let c=et(i.consequent,gt.Trailing|gt.Line)||Mz(i),u=i.consequent.type==="BlockStatement"&&!c;o.push(u?" ":je),et(i,gt.Dangling)&&o.push(fn(e,t),c?je:" "),o.push("else",Ce(Al(i.alternate,r("alternate"),i.alternate.type==="IfStatement")))}return o}case"ForStatement":{let a=Al(i.body,r("body")),l=fn(e,t),c=l?[l,Re]:"";return!i.init&&!i.test&&!i.update?[c,Ce(["for (;;)",a])]:[c,Ce(["for (",Ce([He([Re,r("init"),";",dt,r("test"),";",dt,r("update")]),Re]),")",a])]}case"WhileStatement":return Ce(["while (",Ce([He([Re,r("test")]),Re]),")",Al(i.body,r("body"))]);case"ForInStatement":return Ce(["for (",r("left")," in ",r("right"),")",Al(i.body,r("body"))]);case"ForOfStatement":return Ce(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Al(i.body,r("body"))]);case"DoWhileStatement":{let a=Al(i.body,r("body"));return o=[Ce(["do",a])],i.body.type==="BlockStatement"?o.push(" "):o.push(je),o.push("while (",Ce([He([Re,r("test")]),Re]),")",s),o}case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return o.push(i.type==="BreakStatement"?"break":"continue"),i.label&&o.push(" ",r("label")),o.push(s),o;case"LabeledStatement":return i.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let a=et(i.param,c=>!co(c)||c.leading&&$s(t.originalText,br(c))||c.trailing&&$s(t.originalText,cn(c),{backwards:!0})),l=r("param");return["catch ",a?["(",He([Re,l]),Re,") "]:["(",l,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Ce(["switch (",He([Re,r("discriminant")]),Re,")"])," {",i.cases.length>0?He([je,lr(je,e.map(({node:a,isLast:l})=>[r(),!l&&Fu(a,t)?je:""],"cases"))]):"",je,"}"];case"SwitchCase":{i.test?o.push("case ",r("test"),":"):o.push("default:"),et(i,gt.Dangling)&&o.push(" ",fn(e,t));let a=i.consequent.filter(l=>l.type!=="EmptyStatement");if(a.length>0){let l=lT(e,t,r,"consequent");o.push(a.length===1&&a[0].type==="BlockStatement"?[" ",l]:He([je,l]))}return o}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return n7(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return a7(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return l7(e,t,r);case"TemplateElement":return Oc(i.value.raw);case"TemplateLiteral":return sj(e,r,t);case"TaggedTemplateExpression":return dme(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{o.push("module {");let a=r("body");return a&&o.push(He([je,a]),je),o.push("}"),o}case"InterpreterDirective":default:throw new kf(i,"ESTree")}}function x7(e,t,r){let{parent:n,node:i,key:s}=e,o=[r("expression")];switch(i.type){case"AsConstExpression":o.push(" as const");break;case"AsExpression":case"TSAsExpression":o.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":o.push(" satisfies ",r("typeAnnotation"));break}return s==="callee"&&yr(n)||s==="object"&&un(n)?Ce([He([Re,...o]),Re]):o}function w7(e,t,r){return _1(e,r,t)}function S7(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function fve(e,t,r){let{node:n}=e,i;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":i="boolean";break;case"EnumNumberBody":i="number";break;case"EnumStringBody":i="string";break;case"EnumSymbolBody":i="symbol";break}return[i?`of ${i} `:"",w7(e,t,r)]}function D7(e,t,r){let{node:n}=e;return[ao(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?w7(e,t,r):t("body")]}function E7(e,t,r){let{node:n}=e,i=[ao(e),"interface"],s=[],o=[];n.type!=="InterfaceTypeAnnotation"&&s.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!et(n.typeParameters,gt.Trailing|gt.Line);return vr(n.extends)&&o.push(a?Ht(" ",dt,{groupId:N_(n.typeParameters)}):dt,"extends ",(n.extends.length===1?Xfe:He)(lr([",",dt],e.map(r,"extends")))),et(n.id,gt.Trailing)||vr(n.extends)?a?i.push(Ce([...s,He(o)])):i.push(Ce(He([...s,...o]))):i.push(...s,...o),i.push(" ",r("body")),Ce(i)}function pve(e,t,r){let{node:n}=e;if(Dz(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return n7(e,t,r);case"DeclareFunction":return[ao(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",di(e,r),i];case"DeclareVariable":return[ao(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return p7(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return fye(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Tj(e,t,r);case"IntersectionTypeAnnotation":return Aj(e,t,r);case"UnionTypeAnnotation":return kj(e,t,r);case"ConditionalTypeAnnotation":return O_(e,t,r);case"InferTypeAnnotation":return Fj(e,t,r);case"FunctionTypeAnnotation":return _j(e,t,r);case"TupleTypeAnnotation":return F_(e,t,r);case"TupleTypeLabeledElement":return Ij(e,t,r);case"TupleTypeSpreadElement":return Pj(e,t,r);case"GenericTypeAnnotation":return[r("id"),gm(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return $j(e,t,r);case"TypeAnnotation":return Mj(e,t,r);case"TypeParameter":return t7(e,t,r);case"TypeofTypeAnnotation":return Oj(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Lj(r);case"DeclareEnum":case"EnumDeclaration":return D7(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return fve(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return S7(e,r);case"FunctionTypeParam":{let s=n.name?r("name"):e.parent.this===n?"this":"";return[s,Wi(e),s?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return E7(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:s}=n;return Vj.ok(s==="plus"||s==="minus"),s==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return Lye(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let s="";return n.proto?s="proto ":n.static&&(s="static "),[s,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",jg(e,t,r),Wi(e),D1(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return _1(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Wi(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return jj(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Oc(eg(io(n),t));case"NumberLiteralTypeAnnotation":return Vl(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return uT(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),di(e,r),")"];case"TypePredicate":return Rj(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return gm(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return x7(e,t,r)}}function mve(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Ez(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",o=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(yi(i.expression)||Oo(i.expression)),l=Ce(["<",He([Re,r("typeAnnotation")]),Re,">"]),c=[Ht("("),He([Re,r("expression")]),Re,Ht(")")];return a?lc([[l,r("expression")],[l,Ce(c,{shouldBreak:!0})],[l,r("expression")]]):Ce([l,r("expression")])}case"TSDeclareFunction":return Gj(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Yj(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return _1(e,t,r);case"TSTypeAliasDeclaration":return Tj(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return a7(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return l7(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return sj(e,r,t);case"TSNamedTupleMember":return Ij(e,t,r);case"TSRestType":return Pj(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return E7(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return gm(e,t,r,"params");case"TSTypeParameter":return t7(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return x7(e,t,r);case"TSArrayType":return Lj(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",jg(e,t,r),Wi(e),di(e,r)];case"TSParameterProperty":return[j0(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Oj(e,r);case"TSIndexSignature":{let a=i.parameters.length>1?Ht($u(t)?",":""):"",l=Ce([He([Re,lr([", ",Re],e.map(r,"parameters"))]),a,Re]),c=e.parent.type==="ClassBody"&&e.key==="body";return[c&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?l:"","]",di(e,r),c?s:""]}case"TSTypePredicate":return Rj(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",gm(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return $j(e,t,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return Oye(e,t,r);case"TSMethodSignature":{let a=i.kind&&i.kind!=="method"?`${i.kind} `:"";o.push(j0(i),a,i.computed?"[":"",r("key"),i.computed?"]":"",Wi(e));let l=zg(e,r,t,!1,!0),c=i.returnType?"returnType":"typeAnnotation",u=i[c],h=u?di(e,r,c):"",d=A1(i,h);return o.push(d?Ce(l):l),u&&o.push(Ce(h)),Ce(o)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return D7(e,r,t);case"TSEnumMember":return S7(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",m7(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,l=a.type==="TSModuleDeclaration",c=((n=i.body)==null?void 0:n.type)==="TSModuleDeclaration";if(l)o.push(".");else if(o.push(ao(e)),!(i.kind==="global"||i.global)){let u=i.kind??(gs(i.id)||M_(t,cn(i),cn(i.id)).trim().endsWith("module")?"module":"namespace");o.push(u," ")}return o.push(r("id")),c?o.push(r("body")):i.body?o.push(" ",Ce(r("body"))):o.push(s),o}case"TSConditionalType":return O_(e,t,r);case"TSInferType":return Fj(e,t,r);case"TSIntersectionType":return Aj(e,t,r);case"TSUnionType":return kj(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return _j(e,t,r);case"TSTupleType":return F_(e,t,r);case"TSTypeReference":return[r("typeName"),gm(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Mj(e,t,r);case"TSEmptyBodyFunctionExpression":return P_(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return _M(e,r,"?");case"TSJSDocNonNullableType":return _M(e,r,"!");case"TSParenthesizedType":default:throw new kf(i,"TypeScript")}}function gve(e,t,r,n){if(dj(e))return Jme(e,t);for(let i of[Fge,Ege,pve,mve,dve]){let s=i(e,t,r,n);if(s!==void 0)return s}}var yve=zr(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function vve(e,t,r,n){var i;e.isRoot&&((i=t.__onHtmlBindingRoot)==null||i.call(t,e.node,t));let s=gve(e,t,r,n);if(!s)return"";let{node:o}=e;if(yve(o))return s;let a=vr(o.decorators),l=Mge(e,t,r),c=o.type==="ClassExpression";if(a&&!c)return ZC(s,d=>Ce([l,d]));let u=ch(e,t),h=Wye(e,t);return!l&&!u&&!h?s:ZC(s,d=>[h?";":"",u?"(":"",u&&c&&a?[He([dt,l,d]),dt]:[l,d],u?")":""])}var bve=vve,xve={avoidAstMutation:!0},wve=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],C7={};b1(C7,{getVisitorKeys:()=>Cve,massageAstNode:()=>T7,print:()=>Tve});var Sve={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},Dve=Sve,Eve=wz(Dve),Cve=Eve;function Tve(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),je];case"ArrayExpression":{if(n.elements.length===0)return"[]";let i=e.map(()=>e.node===null?"null":r(),"elements");return["[",He([je,lr([",",je],i)]),je,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",He([je,lr([",",je],e.map(r,"properties"))]),je,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return IM(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return IM(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new kf(n,"JSON")}}function IM(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Ave=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function T7(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,i]of e.elements.entries())i===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}T7.ignoredProperties=Ave;var Xy={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Wu="JavaScript",kve={arrowParens:{category:Wu,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Xy.bracketSameLine,bracketSpacing:Xy.bracketSpacing,jsxBracketSameLine:{category:Wu,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Wu,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Wu,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Xy.singleQuote,jsxSingleQuote:{category:Wu,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Wu,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Wu,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Xy.singleAttributePerLine},_ve=kve,$ve={estree:bz,"estree-json":C7},Fve=[...Jde,...wve],Pve=vz,Ive=Object.defineProperty,A7=(e,t)=>{for(var r in t)Ive(e,r,{get:t[r],enumerable:!0})},k7=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},kl=(e,t,r)=>(k7(e,t,"read from private field"),r?r.call(e):t.get(e)),Nve=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Mve=(e,t,r,n)=>(k7(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),_7={};A7(_7,{languages:()=>x1e,options:()=>S1e,parsers:()=>uH,printers:()=>Axe});var Lve=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Ps=Lve,R_="string",B_="array",z_="cursor",$1="indent",F1="align",j_="trim",sg="group",P1="fill",I1="if-break",N1="indent-if-break",H_="line-suffix",U_="line-suffix-boundary",hh="line",W_="label",M1="break-parent",$7=new Set([z_,$1,F1,j_,sg,P1,I1,N1,H_,U_,hh,W_,M1]);function Ove(e){if(typeof e=="string")return R_;if(Array.isArray(e))return B_;if(!e)return;let{type:t}=e;if($7.has(t))return t}var V_=Ove,Rve=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Bve(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +`)+s}function Kme(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:l}=e,a=i(l),c=s(l);for(let u of n)i(u)>=a&&s(u)<=c&&o.add(u);return r.slice(a,c)}var Jme=Kme;function iT(e,t){var r,n,i,s,o,l,a;if(e.isRoot)return!1;let{node:c,key:u,parent:h}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&Qme(c)&&zp(e))return!0;if(Xme(c))return!1;if(c.type==="Identifier"){if((r=c.extra)!=null&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(c.name)||u==="left"&&(c.name==="async"&&!h.await||c.name==="let")&&h.type==="ForOfStatement")return!0;if(c.name==="let"){let d=(n=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:n.left;if(d&&Bi(d,f=>f===c))return!0}if(u==="object"&&c.name==="let"&&h.type==="MemberExpression"&&h.computed&&!h.optional){let d=e.findAncestor(p=>p.type==="ExpressionStatement"||p.type==="ForStatement"||p.type==="ForInStatement"),f=d?d.type==="ExpressionStatement"?d.expression:d.type==="ForStatement"?d.init:d.left:void 0;if(f&&Bi(f,p=>p===c))return!0}if(u==="expression")switch(c.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let d=e.findAncestor(f=>!Qo(f));if(d!==h&&d.type==="ExpressionStatement")return!0}}return!1}if(c.type==="ObjectExpression"||c.type==="FunctionExpression"||c.type==="ClassExpression"||c.type==="DoExpression"){let d=(i=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:i.expression;if(d&&Bi(d,f=>f===c))return!0}if(c.type==="ObjectExpression"){let d=(s=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:s.body;if(d&&d.type!=="SequenceExpression"&&d.type!=="AssignmentExpression"&&Bi(d,f=>f===c))return!0}switch(h.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(u==="superClass"&&(c.type==="ArrowFunctionExpression"||c.type==="AssignmentExpression"||c.type==="AwaitExpression"||c.type==="BinaryExpression"||c.type==="ConditionalExpression"||c.type==="LogicalExpression"||c.type==="NewExpression"||c.type==="ObjectExpression"||c.type==="SequenceExpression"||c.type==="TaggedTemplateExpression"||c.type==="UnaryExpression"||c.type==="UpdateExpression"||c.type==="YieldExpression"||c.type==="TSNonNullExpression"||c.type==="ClassExpression"&&vr(c.decorators)))return!0;break;case"ExportDefaultDeclaration":return cz(e,t)||c.type==="SequenceExpression";case"Decorator":if(u==="expression"){if(un(c)&&c.computed)return!0;let d=!1,f=!1,p=c;for(;p;)switch(p.type){case"MemberExpression":f=!0,p=p.object;break;case"CallExpression":if(f||d)return t.parser!=="typescript";d=!0,p=p.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(d,f)=>f==="returnType"&&d.type==="ArrowFunctionExpression")&&Zme(c))return!0;break;case"BinaryExpression":if(u==="left"&&(h.operator==="in"||h.operator==="instanceof")&&c.type==="UnaryExpression")return!0;break}switch(c.type){case"UpdateExpression":if(h.type==="UnaryExpression")return c.prefix&&(c.operator==="++"&&h.operator==="+"||c.operator==="--"&&h.operator==="-");case"UnaryExpression":switch(h.type){case"UnaryExpression":return c.operator===h.operator&&(c.operator==="+"||c.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"BinaryExpression":return u==="left"&&h.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(h.type==="UpdateExpression"||c.operator==="in"&&Yme(e))return!0;if(c.operator==="|>"&&(o=c.extra)!=null&&o.parenthesized){let d=e.grandparent;if(d.type==="BinaryExpression"&&d.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(h.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Qo(c);case"ConditionalExpression":return Qo(c);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return u==="callee";case"ClassExpression":case"ClassDeclaration":return u==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"AssignmentExpression":case"AssignmentPattern":return u==="left"&&(c.type==="TSTypeAssertion"||Qo(c));case"LogicalExpression":if(c.type==="LogicalExpression")return h.operator!==c.operator;case"BinaryExpression":{let{operator:d,type:f}=c;if(!d&&f!=="TSTypeAssertion")return!0;let p=O0(d),g=h.operator,y=O0(g);return y>p||u==="right"&&y===p||y===p&&!x_(g,d)?!0:y");default:return!1}case"TSFunctionType":if(e.match(d=>d.type==="TSFunctionType",(d,f)=>f==="typeAnnotation"&&d.type==="TSTypeAnnotation",(d,f)=>f==="returnType"&&d.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(u==="extendsType"&&h.type==="TSConditionalType"){if(c.type==="TSConditionalType")return!0;let{typeAnnotation:d}=c.returnType||c.typeAnnotation;if(d.type==="TSTypePredicate"&&d.typeAnnotation&&(d=d.typeAnnotation.typeAnnotation),d.type==="TSInferType"&&d.typeParameter.constraint)return!0}if(u==="checkType"&&h.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((h.type==="TSUnionType"||h.type==="TSIntersectionType")&&h.types.length>1&&(!c.types||c.types.length>1))return!0;case"TSInferType":if(c.type==="TSInferType"&&h.type==="TSRestType")return!1;case"TSTypeOperator":return h.type==="TSArrayType"||h.type==="TSOptionalType"||h.type==="TSRestType"||u==="objectType"&&h.type==="TSIndexedAccessType"||h.type==="TSTypeOperator"||h.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return u==="objectType"&&h.type==="TSIndexedAccessType"||u==="elementType"&&h.type==="TSArrayType";case"TypeofTypeAnnotation":return u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType")||u==="elementType"&&h.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return h.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return h.type==="ArrayTypeAnnotation"||h.type==="NullableTypeAnnotation"||h.type==="IntersectionTypeAnnotation"||h.type==="UnionTypeAnnotation"||u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return h.type==="ArrayTypeAnnotation"||u==="objectType"&&(h.type==="IndexedAccessType"||h.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,p)=>p==="typeAnnotation"&&f.type==="TypeAnnotation",(f,p)=>p==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,p)=>p==="typeAnnotation"&&f.type==="TypePredicate",(f,p)=>p==="typeAnnotation"&&f.type==="TypeAnnotation",(f,p)=>p==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let d=h.type==="NullableTypeAnnotation"?e.grandparent:h;return d.type==="UnionTypeAnnotation"||d.type==="IntersectionTypeAnnotation"||d.type==="ArrayTypeAnnotation"||u==="objectType"&&(d.type==="IndexedAccessType"||d.type==="OptionalIndexedAccessType")||u==="checkType"&&h.type==="ConditionalTypeAnnotation"||u==="extendsType"&&h.type==="ConditionalTypeAnnotation"&&c.returnType.type==="InferTypeAnnotation"&&c.returnType.typeParameter.bound||d.type==="NullableTypeAnnotation"||h.type==="FunctionTypeParam"&&h.name===null&&Fi(c).some(f=>{var p;return((p=f.typeAnnotation)==null?void 0:p.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(u==="extendsType"&&h.type==="ConditionalTypeAnnotation"&&c.type==="ConditionalTypeAnnotation"||u==="checkType"&&h.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return u==="objectType"&&h.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof c.value=="string"&&h.type==="ExpressionStatement"&&!h.directive){let d=e.grandparent;return d.type==="Program"||d.type==="BlockStatement"}return u==="object"&&h.type==="MemberExpression"&&typeof c.value=="number";case"AssignmentExpression":{let d=e.grandparent;return u==="body"&&h.type==="ArrowFunctionExpression"?!0:u==="key"&&(h.type==="ClassProperty"||h.type==="PropertyDefinition")&&h.computed||(u==="init"||u==="update")&&h.type==="ForStatement"?!1:h.type==="ExpressionStatement"?c.left.type==="ObjectPattern":!(u==="key"&&h.type==="TSPropertySignature"||h.type==="AssignmentExpression"||h.type==="SequenceExpression"&&d.type==="ForStatement"&&(d.init===h||d.update===h)||u==="value"&&h.type==="Property"&&d.type==="ObjectPattern"&&d.properties.includes(h)||h.type==="NGChainedExpression")}case"ConditionalExpression":switch(h.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:u==="test";case"MemberExpression":case"OptionalMemberExpression":return u==="object";default:return!1}case"FunctionExpression":switch(h.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(h.type){case"BinaryExpression":return h.operator!=="|>"||((l=c.extra)==null?void 0:l.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return u==="callee";case"MemberExpression":case"OptionalMemberExpression":return u==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return u==="test";default:return!1}case"ClassExpression":switch(h.type){case"NewExpression":return u==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(ege(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(u==="callee"&&(h.type==="BindExpression"||h.type==="NewExpression")){let d=c;for(;d;)switch(d.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":d=d.object;break;case"TaggedTemplateExpression":d=d.tag;break;case"TSNonNullExpression":d=d.expression;break;default:return!1}}return!1;case"BindExpression":return u==="callee"&&(h.type==="BindExpression"||h.type==="NewExpression")||u==="object"&&un(h);case"NGPipeExpression":return!(h.type==="NGRoot"||h.type==="NGMicrosyntaxExpression"||h.type==="ObjectProperty"&&!((a=c.extra)!=null&&a.parenthesized)||yi(h)||u==="arguments"&&yr(h)||u==="right"&&h.type==="NGPipeExpression"||u==="property"&&h.type==="MemberExpression"||h.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return u==="callee"||u==="left"&&h.type==="BinaryExpression"&&h.operator==="<"||!yi(h)&&h.type!=="ArrowFunctionExpression"&&h.type!=="AssignmentExpression"&&h.type!=="AssignmentPattern"&&h.type!=="BinaryExpression"&&h.type!=="NewExpression"&&h.type!=="ConditionalExpression"&&h.type!=="ExpressionStatement"&&h.type!=="JsExpressionRoot"&&h.type!=="JSXAttribute"&&h.type!=="JSXElement"&&h.type!=="JSXExpressionContainer"&&h.type!=="JSXFragment"&&h.type!=="LogicalExpression"&&!yr(h)&&!hl(h)&&h.type!=="ReturnStatement"&&h.type!=="ThrowStatement"&&h.type!=="TypeCastExpression"&&h.type!=="VariableDeclarator"&&h.type!=="YieldExpression";case"TSInstantiationExpression":return u==="object"&&un(h)}return!1}var Xme=jr(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function Yme(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function Zme(e){return KC(e,t=>t.type==="ObjectTypeAnnotation"&&KC(t,r=>r.type==="FunctionTypeAnnotation"))}function Qme(e){return Oo(e)}function zp(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(zp);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(zp);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(zp);break;case"UnaryExpression":if(t.prefix)return e.callParent(zp);break}return!1}function cz(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!iT(e,t):!y_(r)||n.type!=="ExportDefaultDeclaration"&&iT(e,t)?!1:e.call(()=>cz(e,t),...Cj(r))}function ege(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(i==="object"&&r.type==="MemberExpression"||i==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression")&&(e.match(void 0,void 0,(s,o)=>o==="callee"&&(s.type==="CallExpression"&&!s.optional||s.type==="NewExpression")||o==="object"&&s.type==="MemberExpression"&&!s.optional)||e.match(void 0,void 0,(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(s,o)=>o==="expression"&&s.type==="TSNonNullExpression",(s,o)=>o==="expression"&&s.type==="ChainExpression",(s,o)=>o==="object"&&s.type==="MemberExpression"))}var ch=iT;function tge(e,t){let r=t-1;r=Jd(e,r,{backwards:!0}),r=Xd(e,r,{backwards:!0}),r=Jd(e,r,{backwards:!0});let n=Xd(e,r,{backwards:!0});return r!==n}var rge=tge,nge=()=>!0;function $_(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function ige(e,t){var r;let n=e.node,i=[$_(e,t)],{printer:s,originalText:o,locStart:l,locEnd:a}=t;if((r=s.isBlockComment)!=null&&r.call(s,n)){let u=$s(o,a(n))?$s(o,l(n),{backwards:!0})?ze:dt:" ";i.push(u)}else i.push(ze);let c=Xd(o,Jd(o,a(n)));return c!==!1&&$s(o,c)&&i.push(ze),i}function sge(e,t,r){var n;let i=e.node,s=$_(e,t),{printer:o,originalText:l,locStart:a}=t,c=(n=o.isBlockComment)==null?void 0:n.call(o,i);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||$s(l,a(i),{backwards:!0})){let u=rge(l,a(i));return{doc:bM([ze,u?ze:"",s]),isBlock:c,hasLineSuffix:!0}}return!c||r!=null&&r.hasLineSuffix?{doc:[bM([" ",s]),ca],isBlock:c,hasLineSuffix:!0}:{doc:[" ",s],isBlock:c,hasLineSuffix:!1}}function fn(e,t,r={}){let{node:n}=e;if(!vr(n==null?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:o=nge}=r,l=[];if(e.each(({node:c})=>{c.leading||c.trailing||c.marker!==s||!o(c)||l.push($_(e,t))},"comments"),l.length===0)return"";let a=lr(ze,l);return i?He([ze,a]):a}function hz(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(l=>!n.has(l)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let l=e.node;if(n!=null&&n.has(l))return;let{leading:a,trailing:c}=l;a?i.push(ige(e,t)):c&&(o=sge(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function No(e,t,r){let{leading:n,trailing:i}=hz(e,r);return!n&&!i?t:ZC(t,s=>[n,s,i])}var oge=class extends Error{constructor(r,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(r[i])}.`);Ta(this,"name","UnexpectedNodeError");this.node=r}},kf=oge;function age(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var vo,lge=class{constructor(e){Gde(this,vo,void 0),qde(this,vo,new Set(e))}getLeadingWhitespaceCount(e){let t=Al(this,vo),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return Al(this,vo).has(e.charAt(0))}hasTrailingWhitespace(e){return Al(this,vo).has(Sr(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${age([...Al(this,vo)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=Al(this,vo);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=Al(this,vo);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=Al(this,vo);return Array.prototype.every.call(e,r=>t.has(r))}};vo=new WeakMap;var uge=lge,Ov=new uge(` +\r `),hD=e=>e===""||e===dt||e===ze||e===Re;function cge(e,t,r){var n,i,s;let{node:o}=e;if(o.type==="JSXElement"&&Cge(o))return[r("openingElement"),r("closingElement")];let l=o.type==="JSXElement"?r("openingElement"):r("openingFragment"),a=o.type==="JSXElement"?r("closingElement"):r("closingFragment");if(o.children.length===1&&o.children[0].type==="JSXExpressionContainer"&&(o.children[0].expression.type==="TemplateLiteral"||o.children[0].expression.type==="TaggedTemplateExpression"))return[l,...e.map(r,"children"),a];o.children=o.children.map(w=>Tge(w)?{type:"JSXText",value:" ",raw:" "}:w);let c=o.children.some(Jn),u=o.children.filter(w=>w.type==="JSXExpressionContainer").length>1,h=o.type==="JSXElement"&&o.openingElement.attributes.length>1,d=Hi(l)||c||h||u,f=e.parent.rootMarker==="mdx",p=t.singleQuote?"{' '}":'{" "}',g=f?" ":Ht([p,Re]," "),y=((i=(n=o.openingElement)==null?void 0:n.name)==null?void 0:i.name)==="fbt",b=hge(e,t,r,g,y),v=o.children.some(w=>ng(w));for(let w=b.length-2;w>=0;w--){let T=b[w]===""&&b[w+1]==="",A=b[w]===ze&&b[w+1]===""&&b[w+2]===ze,$=(b[w]===Re||b[w]===ze)&&b[w+1]===""&&b[w+2]===g,I=b[w]===g&&b[w+1]===""&&(b[w+2]===Re||b[w+2]===ze),N=b[w]===g&&b[w+1]===""&&b[w+2]===g,L=b[w]===Re&&b[w+1]===""&&b[w+2]===ze||b[w]===ze&&b[w+1]===""&&b[w+2]===Re;A&&v||T||$||N||L?b.splice(w,2):I&&b.splice(w+1,2)}for(;b.length>0&&hD(Sr(!1,b,-1));)b.pop();for(;b.length>1&&hD(b[0])&&hD(b[1]);)b.shift(),b.shift();let E=[];for(let[w,T]of b.entries()){if(T===g){if(w===1&&b[w-1]===""){if(b.length===2){E.push(p);continue}E.push([p,ze]);continue}else if(w===b.length-1){E.push(p);continue}else if(b[w-1]===""&&b[w-2]===ze){E.push(p);continue}}E.push(T),Hi(T)&&(d=!0)}let D=v?S_(E):Ce(E,{shouldBreak:!0});if(((s=t.cursorNode)==null?void 0:s.type)==="JSXText"&&o.children.includes(t.cursorNode)&&(D=[xM,D,xM]),f)return D;let C=Ce([l,He([ze,D]),ze,a]);return d?C:lc([Ce([l,...b,a]),C])}function hge(e,t,r,n,i){let s=[];return e.each(({node:o,next:l})=>{if(o.type==="JSXText"){let a=io(o);if(ng(o)){let c=Ov.split(a,!0);c[0]===""&&(s.push(""),c.shift(),/\n/.test(c[0])?s.push(CM(i,c[1],o,l)):s.push(n),c.shift());let u;if(Sr(!1,c,-1)===""&&(c.pop(),u=c.pop()),c.length===0)return;for(let[h,d]of c.entries())h%2===1?s.push(dt):s.push(d);u!==void 0?/\n/.test(u)?s.push(CM(i,Sr(!1,s,-1),o,l)):s.push(n):s.push(EM(i,Sr(!1,s,-1),o,l))}else/\n/.test(a)?a.match(/\n/g).length>1&&s.push("",ze):s.push("",n)}else{let a=r();if(s.push(a),l&&ng(l)){let c=Ov.trim(io(l)),[u]=Ov.split(c);s.push(EM(i,u,o,l))}else s.push(ze)}},"children"),s}function EM(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?Re:ze:Re}function CM(e,t,r,n){return e?ze:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?ze:Re:ze}var dge=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function fge(e,t,r){let{parent:n}=e;if(dge.has(n.type))return t;let i=e.match(void 0,o=>o.type==="ArrowFunctionExpression",yr,o=>o.type==="JSXExpressionContainer"),s=ch(e,r);return Ce([s?"":Ht("("),He([Re,t]),Re,s?"":Ht(")")],{shouldBreak:i})}function pge(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(gs(n.value)){let o=io(n.value),l=As(!1,As(!1,o.slice(1,-1),"'","'"),""",'"'),a=xj(l,t.jsxSingleQuote);l=a==='"'?As(!1,l,'"',"""):As(!1,l,"'","'"),s=e.call(()=>No(e,Oc(a+l+a),t),"value")}else s=r("value");i.push("=",s)}return i}function mge(e,t,r){let{node:n}=e,i=(s,o)=>s.type==="JSXEmptyExpression"||!et(s)&&(yi(s)||Oo(s)||s.type==="ArrowFunctionExpression"||s.type==="AwaitExpression"&&(i(s.argument,s)||s.argument.type==="JSXElement")||yr(s)||s.type==="ChainExpression"&&yr(s.expression)||s.type==="FunctionExpression"||s.type==="TemplateLiteral"||s.type==="TaggedTemplateExpression"||s.type==="DoExpression"||Jn(o)&&(s.type==="ConditionalExpression"||Xa(s)));return i(n.expression,e.parent)?Ce(["{",r("expression"),Ya,"}"]):Ce(["{",He([Re,r("expression")]),Re,Ya,"}"])}function gge(e,t,r){var n,i;let{node:s}=e,o=et(s.name)||et(s.typeParameters)||et(s.typeArguments);if(s.selfClosing&&s.attributes.length===0&&!o)return["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((n=s.attributes)==null?void 0:n.length)===1&&s.attributes[0].value&&gs(s.attributes[0].value)&&!s.attributes[0].value.value.includes(` +`)&&!o&&!et(s.attributes[0]))return Ce(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let l=(i=s.attributes)==null?void 0:i.some(c=>c.value&&gs(c.value)&&c.value.value.includes(` +`)),a=t.singleAttributePerLine&&s.attributes.length>1?ze:dt;return Ce(["<",r("name"),s.typeArguments?r("typeArguments"):r("typeParameters"),He(e.map(()=>[a,r()],"attributes")),...yge(s,t,o)],{shouldBreak:l})}function yge(e,t,r){return e.selfClosing?[dt,"/>"]:vge(e,t,r)?[">"]:[Re,">"]}function vge(e,t,r){let n=e.attributes.length>0&&et(Sr(!1,e.attributes,-1),gt.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function bge(e,t,r){let{node:n}=e,i=[];i.push(""),i}function xge(e,t){let{node:r}=e,n=et(r),i=et(r,gt.Line),s=r.type==="JSXOpeningFragment";return[s?"<":""]}function wge(e,t,r){let n=No(e,cge(e,t,r),t);return fge(e,n,t)}function Sge(e,t){let{node:r}=e,n=et(r,gt.Line);return[fn(e,t,{indent:n}),n?ze:""]}function Dge(e,t,r){let{node:n}=e;return["{",e.call(({node:i})=>{let s=["...",r()];return!et(i)||!nz(e)?s:[He([Re,No(e,s,t)]),Re]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ege(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return pge(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return lr(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return lr(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Dge(e,t,r);case"JSXExpressionContainer":return mge(e,t,r);case"JSXFragment":case"JSXElement":return wge(e,t,r);case"JSXOpeningElement":return gge(e,t,r);case"JSXClosingElement":return bge(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return xge(e,t);case"JSXEmptyExpression":return Sge(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new kf(n,"JSX")}}function Cge(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!ng(t)}function ng(e){return e.type==="JSXText"&&(Ov.hasNonWhitespaceCharacter(io(e))||!/\n/.test(io(e)))}function Tge(e){return e.type==="JSXExpressionContainer"&&gs(e.expression)&&e.expression.value===" "&&!et(e.expression)}function Age(e){let{node:t,parent:r}=e;if(!Jn(t)||!Jn(r))return!1;let{index:n,siblings:i}=e,s;for(let o=n;o>0;o--){let l=i[o-1];if(!(l.type==="JSXText"&&!ng(l))){s=l;break}}return(s==null?void 0:s.type)==="JSXExpressionContainer"&&s.expression.type==="JSXEmptyExpression"&&C1(s.expression)}function kge(e){return C1(e.node)||Age(e)}var dz=kge,_ge=0;function fz(e,t,r){var n;let{node:i,parent:s,grandparent:o,key:l}=e,a=l!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),c=i.operator==="|>"&&((n=e.root.extra)==null?void 0:n.__isUsingHackPipeline),u=sT(e,r,t,!1,a);if(a)return u;if(c)return Ce(u);if(yr(s)&&s.callee===i||s.type==="UnaryExpression"||un(s)&&!s.computed)return Ce([He([Re,...u]),Re]);let h=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&o.type==="JSXAttribute"||i.operator!=="|"&&s.type==="JsExpressionRoot"||i.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&o.type==="NGMicrosyntax"&&o.body.length===1)||i===s.body&&s.type==="ArrowFunctionExpression"||i!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&o.type!=="ReturnStatement"&&o.type!=="ThrowStatement"&&!yr(o)||s.type==="TemplateLiteral",d=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||hl(s),f=Xa(i.left)&&x_(i.operator,i.left.operator);if(h||ig(i)&&!f||!ig(i)&&d)return Ce(u);if(u.length===0)return"";let p=Jn(i.right),g=u.findIndex(C=>typeof C!="string"&&!Array.isArray(C)&&C.type===oo),y=u.slice(0,g===-1?1:g+1),b=u.slice(y.length,p?-1:void 0),v=Symbol("logicalChain-"+ ++_ge),E=Ce([...y,He(b)],{id:v});if(!p)return E;let D=Sr(!1,u,-1);return Ce([E,T1(D,{groupId:v})])}function sT(e,t,r,n,i){var s;let{node:o}=e;if(!Xa(o))return[Ce(t())];let l=[];x_(o.operator,o.left.operator)?l=e.call(y=>sT(y,t,r,!0,i),"left"):l.push(Ce(t("left")));let a=ig(o),c=(o.operator==="|>"||o.type==="NGPipeExpression"||$ge(e,r))&&!Nc(r.originalText,o.right),u=o.type==="NGPipeExpression"?"|":o.operator,h=o.type==="NGPipeExpression"&&o.arguments.length>0?Ce(He([Re,": ",lr([dt,": "],e.map(()=>ua(2,Ce(t())),"arguments"))])):"",d;if(a)d=[u," ",t("right"),h];else{let y=u==="|>"&&((s=e.root.extra)!=null&&s.__isUsingHackPipeline)?e.call(b=>sT(b,t,r,!0,i),"right"):t("right");d=[c?dt:"",u,c?" ":dt,y,h]}let{parent:f}=e,p=et(o.left,gt.Trailing|gt.Line),g=p||!(i&&o.type==="LogicalExpression")&&f.type!==o.type&&o.left.type!==o.type&&o.right.type!==o.type;if(l.push(c?"":" ",g?Ce(d,{shouldBreak:p}):d),n&&et(o)){let y=D_(No(e,l,r));return Array.isArray(y)||y.type===la?Vj(y):[y]}return l}function ig(e){return e.type!=="LogicalExpression"?!1:!!(Oo(e.right)&&e.right.properties.length>0||yi(e.right)&&e.right.elements.length>0||Jn(e.right))}var TM=e=>e.type==="BinaryExpression"&&e.operator==="|";function $ge(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&TM(e.node)&&!e.hasAncestor(r=>!TM(r)&&r.type!=="JsExpressionRoot")}function Fge(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),et(n.node)?" //"+Td(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return fz(e,t,r);case"NGChainedExpression":return Ce(lr([";",dt],e.map(()=>Ige(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":AM(e)?" ":[";",dt],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:i,parent:s}=e,o=AM(e)||(i===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(i===2||i===3)&&(n.key.name==="else"&&s.body[i-1].type==="NGMicrosyntaxKeyedExpression"&&s.body[i-1].key.name==="then"||n.key.name==="track"))&&s.body[0].type==="NGMicrosyntaxExpression";return[r("key"),o?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new kf(n,"Angular")}}function AM({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var Pge=jr(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Ige({node:e}){return KC(e,Pge)}function pz(e,t,r){let{node:n}=e;return Ce([lr(dt,e.map(r,"decorators")),mz(n,t)?ze:dt])}function Nge(e,t,r){return gz(e.node)?[lr(ze,e.map(r,"declaration","decorators")),ze]:""}function Mge(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!vr(s)||gz(i)||dz(e))return"";let o=n.type==="ClassExpression"||n.type==="ClassDeclaration"||mz(n,t);return[e.key==="declaration"&&Bfe(i)?ze:o?ca:"",lr(dt,e.map(r,"decorators")),dt]}function mz(e,t){return e.decorators.some(r=>$s(t.originalText,br(r)))}function gz(e){var t;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let r=(t=e.declaration)==null?void 0:t.decorators;return vr(r)&&x1(e,r[0])}var j0=class extends Error{constructor(){super(...arguments);Ta(this,"name","ArgExpansionBailout")}};function Lge(e,t,r){let{node:n}=e,i=so(n);if(i.length===0)return["(",fn(e,t),")"];if(Bge(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,o=i.length-1,l=[];w_(e,({node:h},d)=>{let f=r();d===o||(Fu(h,t)?(s=!0,f=[f,",",ze,ze]):f=[f,",",dt]),l.push(f)});let a=!(n.type==="ImportExpression"||n.callee.type==="Import")&&$u(t,"all")?",":"";function c(){return Ce(["(",He([dt,...l]),a,dt,")"],{shouldBreak:!0})}if(s||e.parent.type!=="Decorator"&&Kfe(i))return c();if(Rge(i)){let h=l.slice(1);if(h.some(Hi))return c();let d;try{d=r(yM(n,0),{expandFirstArg:!0})}catch(f){if(f instanceof j0)return c();throw f}return Hi(d)?[ca,lc([["(",Ce(d,{shouldBreak:!0}),", ",...h,")"],c()])]:lc([["(",d,", ",...h,")"],["(",Ce(d,{shouldBreak:!0}),", ",...h,")"],c()])}if(Oge(i,l,t)){let h=l.slice(0,-1);if(h.some(Hi))return c();let d;try{d=r(yM(n,-1),{expandLastArg:!0})}catch(f){if(f instanceof j0)return c();throw f}return Hi(d)?[ca,lc([["(",...h,Ce(d,{shouldBreak:!0}),")"],c()])]:lc([["(",...h,d,")"],["(",...h,Ce(d,{shouldBreak:!0}),")"],c()])}let u=["(",He([Re,...l]),Ht(a),Re,")"];return Lj(e)?u:Ce(u,{shouldBreak:l.some(Hi)||s})}function mm(e,t=!1){return Oo(e)&&(e.properties.length>0||et(e))||yi(e)&&(e.elements.length>0||et(e))||e.type==="TSTypeAssertion"&&mm(e.expression)||Qo(e)&&mm(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||jge(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&mm(e.body,!0)||Oo(e.body)||yi(e.body)||!t&&(yr(e.body)||e.body.type==="ConditionalExpression")||Jn(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function Oge(e,t,r){var n,i;let s=Sr(!1,e,-1);if(e.length===1){let l=Sr(!1,t,-1);if((n=l.label)!=null&&n.embed&&((i=l.label)==null?void 0:i.hug)!==!1)return!0}let o=Sr(!1,e,-2);return!et(s,gt.Leading)&&!et(s,gt.Trailing)&&mm(s)&&(!o||o.type!==s.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!yi(s))&&!(e.length>1&&Hz(s,r))}function Rge(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&zge(r)?!0:!et(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&yz(r)&&!mm(r)}function yz(e){var t;if(e.type==="ParenthesizedExpression")return yz(e.expression);if(Qo(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),v_(r)&&To(e.expression,1)}return Yd(e)&&so(e).length>1?!1:Xa(e)?To(e.left,1)&&To(e.right,1):Aj(e)||To(e)}function Bge(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&Fi(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>et(t))}function jge(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||et(e,gt.Dangling))}function zge(e){return e.type==="ObjectExpression"&&e.properties.length===1&&hl(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&gs(e.properties[0].value)&&e.properties[0].value.value==="module"}var oT=Lge,Hge=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),yr(e)&&so(e).length>0);function Uge(e,t,r){var n;let i=r("object"),s=vz(e,t,r),{node:o}=e,l=e.findAncestor(u=>!(un(u)||u.type==="TSNonNullExpression")),a=e.findAncestor(u=>!(u.type==="ChainExpression"||u.type==="TSNonNullExpression")),c=l&&(l.type==="NewExpression"||l.type==="BindExpression"||l.type==="AssignmentExpression"&&l.left.type!=="Identifier")||o.computed||o.object.type==="Identifier"&&o.property.type==="Identifier"&&!un(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(Hge(o.object)||((n=i.label)==null?void 0:n.memberChain));return Og(i.label,[i,c?s:Ce(He([Re,s]))])}function vz(e,t,r){let n=r("property"),{node:i}=e,s=Wi(e);return i.computed?!i.property||pu(i.property)?[s,"[",n,"]"]:Ce([s,"[",He([Re,n]),Re,"]"]):[s,".",n]}function bz(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>bz(e,t,r),"expression");let{parent:n}=e,i=!n||n.type==="ExpressionStatement",s=[];function o(P){let{originalText:_}=t,M=Rg(_,br(P));return _.charAt(M)===")"?M!==!1&&g_(_,M+1):Fu(P,t)}function l(P){let{node:_}=P;if(_.type==="ChainExpression")return P.call(()=>l(P),"expression");if(yr(_)&&(Jh(_.callee)||yr(_.callee))){let M=o(_);s.unshift({node:_,hasTrailingEmptyLine:M,printed:[No(P,[Wi(P),Rc(P,t,r),oT(P,t,r)],t),M?ze:""]}),P.call(j=>l(j),"callee")}else Jh(_)?(s.unshift({node:_,needsParens:ch(P,t),printed:No(P,un(_)?vz(P,t,r):jz(P,t,r),t)}),P.call(M=>l(M),"object")):_.type==="TSNonNullExpression"?(s.unshift({node:_,printed:No(P,"!",t)}),P.call(M=>l(M),"expression")):s.unshift({node:_,printed:r()})}let{node:a}=e;s.unshift({node:a,printed:[Wi(e),Rc(e,t,r),oT(e,t,r)]}),a.callee&&e.call(P=>l(P),"callee");let c=[],u=[s[0]],h=1;for(;h0&&c.push(u);function f(P){return/^[A-Z]|^[$_]+$/.test(P)}function p(P){return P.length<=t.tabWidth}function g(P){var _;let M=(_=P[1][0])==null?void 0:_.node.computed;if(P[0].length===1){let R=P[0][0].node;return R.type==="ThisExpression"||R.type==="Identifier"&&(f(R.name)||i&&p(R.name)||M)}let j=Sr(!1,P[0],-1).node;return un(j)&&j.property.type==="Identifier"&&(f(j.property.name)||M)}let y=c.length>=2&&!et(c[1][0].node)&&g(c);function b(P){let _=P.map(M=>M.printed);return P.length>0&&Sr(!1,P,-1).needsParens?["(",..._,")"]:_}function v(P){return P.length===0?"":He([ze,lr(ze,P.map(b))])}let E=c.map(b),D=E,C=y?3:2,w=c.flat(),T=w.slice(1,-1).some(P=>et(P.node,gt.Leading))||w.slice(0,-1).some(P=>et(P.node,gt.Trailing))||c[C]&&et(c[C][0].node,gt.Leading);if(c.length<=C&&!T&&!c.some(P=>Sr(!1,P,-1).hasTrailingEmptyLine))return Lj(e)?D:Ce(D);let A=Sr(!1,c[y?1:0],-1).node,$=!yr(A)&&o(A),I=[b(c[0]),y?c.slice(1,2).map(b):"",$?ze:"",v(c.slice(y?2:1))],N=s.map(({node:P})=>P).filter(yr);function L(){let P=Sr(!1,Sr(!1,c,-1),-1).node,_=Sr(!1,E,-1);return yr(P)&&Hi(_)&&N.slice(0,-1).some(M=>M.arguments.some(tg))}let F;return T||N.length>2&&N.some(P=>!P.arguments.every(_=>To(_)))||E.slice(0,-1).some(Hi)||L()?F=Ce(I):F=[Hi(D)||$?ca:"",lc([D,I])],Og({memberChain:!0},F)}var Wge=bz;function xz(e,t,r){var n;let{node:i,parent:s}=e,o=i.type==="NewExpression",l=i.type==="ImportExpression",a=Wi(e),c=so(i),u=c.length===1&&Nj(c[0],t.originalText);if(u||c.length>0&&!o&&!l&&(Gge(i,s)||E1(i,s))){let d=[];if(w_(e,()=>{d.push(r())}),!(u&&(n=d[0].label)!=null&&n.embed))return[o?"new ":"",r("callee"),a,Rc(e,t,r),"(",lr(", ",d),")"]}if(!l&&!o&&Jh(i.callee)&&!e.call(d=>ch(d,t),"callee",...i.callee.type==="ChainExpression"?["expression"]:[]))return Wge(e,t,r);let h=[o?"new ":"",l?Vge(i):r("callee"),a,Rc(e,t,r),oT(e,t,r)];return l||yr(i.callee)?Ce(h):h}function Vge(e){return e.phase?`import.${e.phase}`:"import"}function Gge(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=so(e);return r.length===1&&gs(r[0])||r.length>1}if(e.callee.name==="define"){let r=so(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&gs(r[0])&&r[1].type==="ArrayExpression")}return!1}function Bg(e,t,r,n,i,s){let o=Jge(e,t,r,n,s),l=s?r(s,{assignmentLayout:o}):"";switch(o){case"break-after-operator":return Ce([Ce(n),i,Ce(He([dt,l]))]);case"never-break-after-operator":return Ce([Ce(n),i," ",l]);case"fluid":{let a=Symbol("assignment");return Ce([Ce(n),i,Ce(He(dt),{id:a}),Ya,T1(l,{groupId:a})])}case"break-lhs":return Ce([n,i," ",Ce(l)]);case"chain":return[Ce(n),i,dt,l];case"chain-tail":return[Ce(n),i,He([dt,l])];case"chain-tail-arrow-chain":return[Ce(n),i,l];case"only-left":return n}}function qge(e,t,r){let{node:n}=e;return Bg(e,t,r,r("left"),[" ",n.operator],"right")}function Kge(e,t,r){return Bg(e,t,r,r("id")," =","init")}function Jge(e,t,r,n,i){let{node:s}=e,o=s[i];if(!o)return"only-left";let l=!Rv(o);if(e.match(Rv,wz,u=>!l||u.type!=="ExpressionStatement"&&u.type!=="VariableDeclaration"))return l?o.type==="ArrowFunctionExpression"&&o.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!l&&Rv(o.right)||Nc(t.originalText,o))return"break-after-operator";if(o.type==="CallExpression"&&o.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let a=vpe(n);if(Yge(s)||tye(s)||Sz(s)&&a)return"break-lhs";let c=nye(s,n,t);return e.call(()=>Xge(e,t,r,c),i)?"break-after-operator":Zge(s)?"break-lhs":!a&&(c||o.type==="TemplateLiteral"||o.type==="TaggedTemplateExpression"||o.type==="BooleanLiteral"||pu(o)||o.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Xge(e,t,r,n){let i=e.node;if(Xa(i)&&!ig(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!oye(i))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:c}=i;return Xa(c)&&!ig(c)}let{consequent:l,alternate:a}=i;return l.type==="ConditionalExpression"||a.type==="ConditionalExpression"}case"ClassExpression":return vr(i.decorators)}if(n)return!1;let s=i,o=[];for(;;)if(s.type==="UnaryExpression"||s.type==="AwaitExpression"||s.type==="YieldExpression"&&s.argument!==null)s=s.argument,o.push("argument");else if(s.type==="TSNonNullExpression")s=s.expression,o.push("expression");else break;return!!(gs(s)||e.call(()=>Dz(e,t,r),...o))}function Yge(e){if(wz(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return hl(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Rv(e){return e.type==="AssignmentExpression"}function wz(e){return Rv(e)||e.type==="VariableDeclarator"}function Zge(e){let t=eye(e);if(vr(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Qge=jr(["TSTypeAliasDeclaration","TypeAlias"]);function eye(e){var t;if(Qge(e))return(t=e.typeParameters)==null?void 0:t.params}function tye(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=kM(t.typeAnnotation);return vr(r)&&r.length>1&&r.some(n=>vr(kM(n))||n.type==="TSConditionalType")}function Sz(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var rye=jr(["TSTypeReference","GenericTypeAnnotation"]);function kM(e){var t;if(rye(e))return(t=e.typeParameters)==null?void 0:t.params}function Dz(e,t,r,n=!1){var i;let{node:s}=e,o=()=>Dz(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(o,"expression");if(yr(s)){if((i=xz(e,t,r).label)!=null&&i.memberChain)return!1;let l=so(s);return!(l.length===0||l.length===1&&b_(l[0],t))||iye(s,r)?!1:e.call(o,"callee")}return un(s)?e.call(o,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function nye(e,t,r){return hl(e)?(t=D_(t),typeof t=="string"&&Kd(t)1)return!0;if(r.length===1){let i=r[0];if(Mc(i)||Rj(i)||i.type==="TSTypeLiteral"||i.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(Hi(t(n)))return!0}return!1}function sye(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function oye(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":case"TSTypeReference":return!!r.typeParameters;default:return!1}}return t(e.checkType)||t(e.extendsType)}function jg(e,t,r,n,i){let s=e.node,o=Fi(s),l=i?Rc(e,r,t):"";if(o.length===0)return[l,"(",fn(e,r,{filter:f=>Za(r.originalText,br(f))===")"}),")"];let{parent:a}=e,c=E1(a),u=Ez(s),h=[];if(epe(e,(f,p)=>{let g=p===o.length-1;g&&s.rest&&h.push("..."),h.push(t()),!g&&(h.push(","),c||u?h.push(" "):Fu(o[p],r)?h.push(ze,ze):h.push(dt))}),n&&!lye(e)){if(Hi(l)||Hi(h))throw new j0;return Ce([YC(l),"(",YC(h),")"])}let d=o.every(f=>!vr(f.decorators));return u&&d?[l,"(",...h,")"]:c?[l,"(",...h,")"]:(_j(a)||zfe(a)||a.type==="TypeAlias"||a.type==="UnionTypeAnnotation"||a.type==="IntersectionTypeAnnotation"||a.type==="FunctionTypeAnnotation"&&a.returnType===s)&&o.length===1&&o[0].name===null&&s.this!==o[0]&&o[0].typeAnnotation&&s.typeParameters===null&&v_(o[0].typeAnnotation)&&!s.rest?r.arrowParens==="always"?["(",...h,")"]:h:[l,"(",He([Re,...h]),Ht(!Qfe(s)&&$u(r,"all")?",":""),Re,")"]}function Ez(e){if(!e)return!1;let t=Fi(e);if(t.length!==1)return!1;let[r]=t;return!et(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&mu(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&mu(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||Oo(r.right)&&r.right.properties.length===0||yi(r.right)&&r.right.elements.length===0))}function aye(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function A1(e,t){var r;let n=aye(e);if(!n)return!1;let i=(r=e.typeParameters)==null?void 0:r.params;if(i){if(i.length>1)return!1;if(i.length===1){let s=i[0];if(s.constraint||s.default)return!1}}return Fi(e).length===1&&(mu(n)||Hi(t))}function lye(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function uye(e){let t=Fi(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var cye=jr(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),hye=jr(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function dye(e){let{types:t}=e;if(t.some(n=>et(n)))return!1;let r=t.find(n=>hye(n));return r?t.every(n=>n===r||cye(n)):!1}function Cz(e){return v_(e)||mu(e)?!0:Mc(e)?dye(e):!1}function fye(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[ao(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}function Tz(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[ao(e)];s.push("type ",r("id"),r("typeParameters"));let o=i.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[Bg(e,t,r,s," =",o),n]}function Az(e,t,r){let n=!1;return Ce(e.map(({isFirst:i,previous:s,node:o,index:l})=>{let a=r();if(i)return a;let c=mu(o),u=mu(s);return u&&c?[" & ",n?He(a):a]:!u&&!c?He([" &",dt,a]):(l>1&&(n=!0),[" & ",l>1?He(a):a])},"types"))}function kz(e,t,r){let{node:n}=e,{parent:i}=e,s=i.type!=="TypeParameterInstantiation"&&(i.type!=="TSConditionalType"||!t.experimentalTernaries)&&(i.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&i.type!=="TSTypeParameterInstantiation"&&i.type!=="GenericTypeAnnotation"&&i.type!=="TSTypeReference"&&i.type!=="TSTypeAssertion"&&i.type!=="TupleTypeAnnotation"&&i.type!=="TSTupleType"&&!(i.type==="FunctionTypeParam"&&!i.name&&e.grandparent.this!==i)&&!((i.type==="TypeAlias"||i.type==="VariableDeclarator"||i.type==="TSTypeAliasDeclaration")&&Nc(t.originalText,n)),o=Cz(n),l=e.map(u=>{let h=r();return o||(h=ua(2,h)),No(u,h,t)},"types");if(o)return lr(" | ",l);let a=s&&!Nc(t.originalText,n),c=[Ht([a?dt:"","| "]),lr([dt,"| "],l)];return ch(e,t)?Ce([He(c),Re]):(i.type==="TupleTypeAnnotation"||i.type==="TSTupleType")&&i[i.type==="TupleTypeAnnotation"&&i.types?"types":"elementTypes"].length>1?Ce([He([Ht(["(",Re]),c]),Re,Ht(")")]):Ce(s?He(c):c)}function pye(e){var t;let{node:r,parent:n}=e;return r.type==="FunctionTypeAnnotation"&&(_j(n)||!((n.type==="ObjectTypeProperty"||n.type==="ObjectTypeInternalSlot")&&!n.variance&&!n.optional&&x1(n,r)||n.type==="ObjectTypeCallProperty"||((t=e.getParentNode(2))==null?void 0:t.type)==="DeclareFunction"))}function _z(e,t,r){let{node:n}=e,i=[k1(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&i.push("new ");let s=jg(e,r,t,!1,!0),o=[];return n.type==="FunctionTypeAnnotation"?o.push(pye(e)?" => ":": ",r("returnType")):o.push(di(e,r,n.returnType?"returnType":"typeAnnotation")),A1(n,o)&&(s=Ce(s)),i.push(s,o),Ce(i)}function $z(e,t,r){return[r("objectType"),Wi(e),"[",r("indexType"),"]"]}function Fz(e,t,r){return["infer ",r("typeParameter")]}function _M(e,t,r){let{node:n}=e;return[n.postfix?"":r,di(e,t),n.postfix?r:""]}function Pz(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Iz(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var mye=new WeakSet;function di(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let s=e.call(Nz,r);(s==="=>"||s===":"&&et(n,gt.Leading))&&(i=!0),mye.add(n)}return i?[" ",t(r)]:t(r)}var Nz=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Mz(e,t,r){let n=Nz(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Lz(e){return[e("elementType"),"[]"]}function Oz({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function Rz(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",di(e,t)]:""]}function Wi(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":yr(t)||un(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function Bz(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var gye=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ao(e){let{node:t}=e;return t.declare||gye.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var yye=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function k1({node:e}){return e.abstract||yye.has(e.type)?"abstract ":""}function Rc(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function jz(e,t,r){return["::",r("callee")]}function kl(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:He([dt,t])}function zz(e,t){return["...",t("argument"),di(e,t)]}function z0(e){return e.accessibility?e.accessibility+" ":""}function vye(e,t,r,n){let{node:i}=e;return et(i,gt.Dangling)?Ce([r,fn(e,t,{indent:!0}),Re,n]):[r,n]}function F_(e,t,r){let{node:n}=e,i=[],s=n.type==="TupleExpression"?"#[":"[",o="]",l=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",a=n[l];if(a.length===0)i.push(vye(e,t,s,o));else{let c=Sr(!1,a,-1),u=(c==null?void 0:c.type)!=="RestElement",h=c===null,d=Symbol("array"),f=!t.__inJestEach&&a.length>1&&a.every((y,b,v)=>{let E=y==null?void 0:y.type;if(!yi(y)&&!Oo(y))return!1;let D=v[b+1];if(D&&E!==D.type)return!1;let C=yi(y)?"elements":"properties";return y[C]&&y[C].length>1}),p=Hz(n,t),g=u?h?",":$u(t)?p?Ht(",","",{groupId:d}):Ht(","):"":"";i.push(Ce([s,He([Re,p?xye(e,t,r,g):[bye(e,t,l,r),g],fn(e,t)]),Re,o],{shouldBreak:f,id:d}))}return i.push(Wi(e),di(e,r)),i}function Hz(e,t){return yi(e)&&e.elements.length>1&&e.elements.every(r=>r&&(pu(r)||Tj(r)&&!et(r.argument))&&!et(r,gt.Trailing|gt.Line,n=>!$s(t.originalText,cn(n),{backwards:!0})))}function Uz({node:e},{originalText:t}){let r=i=>p_(t,m_(t,i)),n=i=>t[i]===","?i:n(r(i+1));return g_(t,n(br(e)))}function bye(e,t,r,n){let i=[];return e.each(({node:s,isLast:o})=>{i.push(s?Ce(n()):""),o||i.push([",",dt,s&&Uz(e,t)?Re:""])},r),i}function xye(e,t,r,n){let i=[];return e.each(({isLast:s,next:o})=>{i.push([r(),s?n:","]),s||i.push(Uz(e,t)?[ze,ze]:et(o,gt.Leading|gt.Line)?ze:dt)},"elements"),S_(i)}var Wz=new Proxy(()=>{},{get:()=>Wz}),Vz=Wz;function wye(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Vl=wye,Jy=new WeakMap;function zg(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if(t.quoteProps==="consistent"&&!Jy.has(i)){let o=(i.properties||i.body||i.members).some(l=>!l.computed&&l.key&&gs(l.key)&&!pM(l,t));Jy.set(i,o)}if((s.type==="Identifier"||pu(s)&&Ij(Vl(io(s)))&&String(s.value)===Vl(io(s))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&Jy.get(i))){let o=eg(JSON.stringify(s.type==="Identifier"?s.name:s.value.toString()),t);return e.call(l=>No(l,o,t),"key")}return pM(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!Jy.get(i))?e.call(o=>No(o,/^\d/.test(s.value)?Vl(s.value):s.value,t),"key"):r("key")}function $M(e,t,r){let{node:n}=e;return n.shorthand?r("value"):Bg(e,t,r,zg(e,t,r),":","value")}var Sye=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&D1(r));function Gz(e,t,r,n){if(Sye(e))return P_(e,r,t);let{node:i}=e,s=!1;if((i.type==="FunctionDeclaration"||i.type==="FunctionExpression")&&n!=null&&n.expandLastArg){let{parent:u}=e;yr(u)&&(so(u).length>1||Fi(i).every(h=>h.type==="Identifier"&&!h.typeAnnotation))&&(s=!0)}let o=[ao(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],l=jg(e,t,r,s),a=I_(e,t),c=A1(i,a);return o.push(Rc(e,r,t),Ce([c?Ce(l):l,a]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&o.push(";"),o}function aT(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,o=[];return!i||i==="init"||i==="method"||i==="constructor"?s.async&&o.push("async "):(Vz.ok(i==="get"||i==="set"),o.push(i," ")),s.generator&&o.push("*"),o.push(zg(e,t,r),n.optional||n.key.optional?"?":"",n===s?P_(e,t,r):r("value")),o}function P_(e,t,r){let{node:n}=e,i=jg(e,r,t),s=I_(e,r),o=uye(n),l=A1(n,s),a=[Rc(e,t,r),Ce([o?Ce(i,{shouldBreak:!0}):l?Ce(i):i,s])];return n.body?a.push(" ",r("body")):a.push(t.semi?";":""),a}function Dye(e){let t=Fi(e);return t.length===1&&!e.typeParameters&&!et(e,gt.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!et(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function qz(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Dye(r)}return!1}function I_(e,t){let{node:r}=e,n=[di(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Kz(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let a=r("argument");Tye(t,n.argument)?a=["(",He([ze,a]),ze,")"]:(Xa(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(a=Ce([Ht("("),He([Re,a]),Re,Ht(")")])),s.push(" ",a)}let o=et(n,gt.Dangling),l=i&&o&&et(n,gt.Last|gt.Line);return l&&s.push(i),o&&s.push(" ",fn(e,t)),l||s.push(i),s}function Eye(e,t,r){return["return",Kz(e,t,r)]}function Cye(e,t,r){return["throw",Kz(e,t,r)]}function Tye(e,t){if(Nc(e.originalText,t)||et(t,gt.Leading,r=>gu(e.originalText,cn(r),br(r)))&&!Jn(t))return!0;if(y_(t)){let r=t,n;for(;n=Rfe(r);)if(r=n,Nc(e.originalText,r))return!0}return!1}var dD=new WeakMap;function Jz(e){return dD.has(e)||dD.set(e,e.type==="ConditionalExpression"&&!Bi(e,t=>t.type==="ObjectExpression")),dD.get(e)}var Xz=e=>e.type==="SequenceExpression";function Aye(e,t,r,n={}){let i=[],s,o=[],l=!1,a=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function y(){let{node:b}=e,v=kye(e,t,r,n);if(i.length===0)i.push(v);else{let{leading:E,trailing:D}=hz(e,t);i.push([E,v]),o.unshift(D)}a&&(l||(l=b.returnType&&Fi(b).length>0||b.typeParameters||Fi(b).some(E=>E.type!=="Identifier"))),!a||b.body.type!=="ArrowFunctionExpression"?(s=r("body",n),c=b.body):e.call(y,"body")})();let u=!Nc(t.originalText,c)&&(Xz(c)||_ye(c,s,t)||!l&&Jz(c)),h=e.key==="callee"&&Yd(e.parent),d=Symbol("arrow-chain"),f=$ye(e,n,{signatureDocs:i,shouldBreak:l}),p,g=!1;return a&&(h||n.assignmentLayout)&&(g=!0,p=n.assignmentLayout==="chain-tail-arrow-chain"||h&&!u),s=Fye(e,t,n,{bodyDoc:s,bodyComments:o,functionBody:c,shouldPutBodyOnSameLine:u}),Ce([Ce(g?He([Re,f]):f,{shouldBreak:p,id:d})," =>",a?T1(s,{groupId:d}):Ce(s),a&&h?Ht(Re,"",{groupId:d}):""])}function kye(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),qz(e,t))s.push(r(["params",0]));else{let l=n.expandLastArg||n.expandFirstArg,a=I_(e,r);if(l){if(Hi(a))throw new j0;a=Ce(YC(a))}s.push(Ce([jg(e,r,t,l,!0),a]))}let o=fn(e,t,{filter(l){let a=Rg(t.originalText,br(l));return a!==!1&&t.originalText.slice(a,a+2)==="=>"}});return o&&s.push(" ",o),s}function _ye(e,t,r){var n,i;return yi(e)||Oo(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||Jn(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((i=t.label)==null?void 0:i.embed)||Nj(e,r.originalText))}function $ye(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:i,key:s}=e;return s!=="callee"&&Yd(i)||Xa(i)?Ce([r[0]," =>",He([dt,lr([" =>",dt],r.slice(1))])],{shouldBreak:n}):s==="callee"&&Yd(i)||t.assignmentLayout?Ce(lr([" =>",dt],r),{shouldBreak:n}):Ce(He(lr([" =>",dt],r)),{shouldBreak:n})}function Fye(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:o}){let{node:l,parent:a}=e,c=r.expandLastArg&&$u(t,"all")?Ht(","):"",u=(r.expandLastArg||a.type==="JSXExpressionContainer")&&!et(l)?Re:"";return o&&Jz(s)?[" ",Ce([Ht("","("),He([Re,n]),Ht("",")"),c,u]),i]:(Xz(s)&&(n=Ce(["(",He([Re,n]),Re,")"])),o?[" ",n,i]:[He([dt,n,i]),c,u])}var Pye=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let i=t[n];if(r(i,n,t))return i}}},Iye=Pye;function lT(e,t,r,n){let{node:i}=e,s=[],o=Iye(!1,i[n],l=>l.type!=="EmptyStatement");return e.each(({node:l})=>{l.type!=="EmptyStatement"&&(s.push(r()),l!==o&&(s.push(ze),Fu(l,t)&&s.push(ze)))},n),s}function Yz(e,t,r){let{node:n}=e,i=[];n.type==="StaticBlock"&&i.push("static "),i.push("{");let s=Zz(e,t,r);if(s)i.push(He([ze,s]),ze);else{let{parent:o}=e,l=e.grandparent;o.type==="ArrowFunctionExpression"||o.type==="FunctionExpression"||o.type==="FunctionDeclaration"||o.type==="ObjectMethod"||o.type==="ClassMethod"||o.type==="ClassPrivateMethod"||o.type==="ForStatement"||o.type==="WhileStatement"||o.type==="DoWhileStatement"||o.type==="DoExpression"||o.type==="CatchClause"&&!l.finalizer||o.type==="TSModuleDeclaration"||o.type==="TSDeclareFunction"||n.type==="StaticBlock"||i.push(ze)}return i.push("}"),i}function Zz(e,t,r){var n;let{node:i}=e,s=vr(i.directives),o=i.body.some(c=>c.type!=="EmptyStatement"),l=et(i,gt.Dangling);if(!s&&!o&&!l)return"";let a=[];return s&&(a.push(lT(e,t,r,"directives")),(o||l)&&(a.push(ze),Fu(Sr(!1,i.directives,-1),t)&&a.push(ze))),o&&a.push(lT(e,t,r,"body")),l&&a.push(fn(e,t)),i.type==="Program"&&((n=e.parent)==null?void 0:n.type)!=="ModuleExpression"&&a.push(ze),a}function Nye(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var Qz=Nye;function Mye(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Lye(e,t,r){let{node:n}=e;return Ce([n.variance?r("variance"):"","[",He([r("keyTparam")," in ",r("sourceType")]),"]",Mye(n.optional),": ",r("propType")])}function e7(e,t){return e==="+"||e==="-"?e+t:t}function Oye(e,t,r){let{node:n}=e,i=gu(t.originalText,cn(n),cn(n.typeParameter));return Ce(["{",He([t.bracketSpacing?dt:Re,Ce([r("typeParameter"),n.optional?e7(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Ht(";"):""]),fn(e,t),t.bracketSpacing?dt:Re,"}"],{shouldBreak:i})}var N_=Qz("typeParameters");function Rye(e,t,r){let{node:n}=e;return Fi(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function gm(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),o=s&&E1(s),l=e.match(c=>!(c[n].length===1&&mu(c[n][0])),void 0,(c,u)=>u==="typeAnnotation",c=>c.type==="Identifier",Sz);if(i[n].length===0||!l&&(o||i[n].length===1&&(i[n][0].type==="NullableTypeAnnotation"||Cz(i[n][0]))))return["<",lr(", ",e.map(r,n)),Bye(e,t),">"];let a=i.type==="TSTypeParameterInstantiation"?"":Rye(e,t,n)?",":$u(t)?Ht(","):"";return Ce(["<",He([Re,lr([",",dt],e.map(r,n))]),a,Re,">"],{id:N_(i)})}function Bye(e,t){let{node:r}=e;if(!et(r,gt.Dangling))return"";let n=!et(r,gt.Line),i=fn(e,t,{indent:!n});return n?i:[i,ze]}function t7(e,t,r){let{node:n,parent:i}=e,s=[n.type==="TSTypeParameter"&&n.const?"const ":""],o=n.type==="TSTypeParameter"?r("name"):n.name;if(i.type==="TSMappedType")return i.readonly&&s.push(e7(i.readonly,"readonly")," "),s.push("[",o),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent(()=>r("nameType"))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(o),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(di(e,r,"bound"))),n.constraint){let l=Symbol("constraint");s.push(" extends",Ce(He(dt),{id:l}),Ya,T1(r("constraint"),{groupId:l}))}return n.default&&s.push(" = ",r("default")),Ce(s)}var r7=jr(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function n7(e,t,r){let{node:n}=e,i=[ao(e),k1(e),"class"],s=et(n.id,gt.Trailing)||et(n.typeParameters,gt.Trailing)||et(n.superClass)||vr(n.extends)||vr(n.mixins)||vr(n.implements),o=[],l=[];if(n.id&&o.push(" ",r("id")),o.push(r("typeParameters")),n.superClass){let a=[zye(e,t,r),r("superTypeParameters")],c=e.call(u=>["extends ",No(u,a,t)],"superClass");s?l.push(dt,Ce(c)):l.push(" ",c)}else l.push(fD(e,t,r,"extends"));if(l.push(fD(e,t,r,"mixins"),fD(e,t,r,"implements")),s){let a;o7(n)?a=[...o,He(l)]:a=He([...o,l]),i.push(Ce(a,{id:i7(n)}))}else i.push(...o,...l);return i.push(" ",r("body")),i}var i7=Qz("heritageGroup");function s7(e){return Ht(ze,"",{groupId:i7(e)})}function jye(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function o7(e){return e.typeParameters&&!et(e.typeParameters,gt.Trailing|gt.Line)&&!jye(e)}function fD(e,t,r,n){let{node:i}=e;if(!vr(i[n]))return"";let s=fn(e,t,{marker:n});return[o7(i)?Ht(" ",dt,{groupId:N_(i.typeParameters)}):dt,s,s&&ze,n,Ce(He([dt,lr([",",dt],e.map(r,n))]))]}function zye(e,t,r){let n=r("superClass"),{parent:i}=e;return i.type==="AssignmentExpression"?Ce(Ht(["(",He([Re,n]),Re,")"],n)):n}function a7(e,t,r){let{node:n}=e,i=[];return vr(n.decorators)&&i.push(pz(e,t,r)),i.push(z0(n)),n.static&&i.push("static "),i.push(k1(e)),n.override&&i.push("override "),i.push(aT(e,t,r)),i}function l7(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";vr(n.decorators)&&i.push(pz(e,t,r)),i.push(z0(n),ao(e)),n.static&&i.push("static "),i.push(k1(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&i.push("accessor "),i.push(zg(e,t,r),Wi(e),Bz(e),di(e,r));let o=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[Bg(e,t,r,i," =",o?void 0:"value"),s]}function Hye(e,t,r){let{node:n}=e,i=[];return e.each(({node:s,next:o,isLast:l})=>{i.push(r()),!t.semi&&r7(s)&&Uye(s,o)&&i.push(";"),l||(i.push(ze),Fu(s,t)&&i.push(ze))},"body"),et(n,gt.Dangling)&&i.push(fn(e,t)),[vr(n.body)?s7(e.parent):"","{",i.length>0?[He([ze,i]),ze]:"","}"]}function Uye(e,t){var r;let{type:n,name:i}=e.key;if(!e.computed&&n==="Identifier"&&(i==="static"||i==="get"||i==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let s=(r=t.key)==null?void 0:r.name;if(s==="in"||s==="instanceof")return!0}if(r7(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let s=t.value?t.value.generator:t.generator;return!!(t.computed||s)}case"TSIndexSignature":return!0}return!1}function Wye(e,t){if(t.semi||c7(e,t)||d7(e,t))return!1;let{node:r,key:n,parent:i}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(i.type==="Program"||i.type==="BlockStatement"||i.type==="StaticBlock"||i.type==="TSModuleBlock")||n==="consequent"&&i.type==="SwitchCase")&&e.call(()=>u7(e,t),"expression"))}function u7(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!qz(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:i}=r;if(n&&(i==="+"||i==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(Jn(r))return!0}return ch(e,t)?!0:y_(r)?e.call(()=>u7(e,t),...Cj(r)):!1}function c7({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&Jn(e.expression)&&t.type==="Program"&&t.body.length===1}function h7(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return h7(e.object)}return!1;case"Identifier":return!0;default:return!1}}function d7({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function Vye(e,t,r){let n=[r("expression")];return d7(e,t)?h7(e.node.expression)&&n.push(";"):c7(e,t)||t.semi&&n.push(";"),n}function Gye(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let i=lr([",",dt],n);return t.__isVueForBindingLeft?["(",He([Re,Ce(i)]),Re,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return lr([",",dt],n)}}function qye(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return FM(r);case"BigIntLiteral":return uT(r.extra.raw);case"NumericLiteral":return Vl(r.extra.raw);case"StringLiteral":return Oc(eg(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Vl(r.value)+"m";case"DirectiveLiteral":return PM(r.extra.raw,t);case"Literal":{if(r.regex)return FM(r.regex);if(r.bigint)return uT(r.raw);if(r.decimal)return Vl(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Vl(r.raw):typeof n=="string"?Kye(e)?PM(r.raw,t):Oc(eg(r.raw,t)):String(n)}}}function Kye(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function uT(e){return e.toLowerCase()}function FM({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function PM(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Jye(e,t,r){let n=e.originalText.slice(t,r);for(let i of e[Symbol.for("comments")]){let s=cn(i);if(s>r)break;let o=br(i);if(oe.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function p7(e,t,r){let{node:n}=e,i=[Nge(e,t,r),ao(e),"export",f7(n)?" default":""],{declaration:s,exported:o}=n;return et(n,gt.Dangling)&&(i.push(" ",fn(e,t)),Mj(n)&&i.push(ze)),s?i.push(" ",r("declaration")):(i.push(Qye(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(i.push(" *"),o&&i.push(" as ",r("exported"))):i.push(y7(e,t,r)),i.push(g7(e,t,r),b7(e,t,r))),i.push(Zye(n,t)),i}var Yye=jr(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Zye(e,t){return t.semi&&(!e.declaration||f7(e)&&!Yye(e.declaration))?";":""}function L_(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function m7(e,t){return L_(e.importKind,t)}function Qye(e){return L_(e.exportKind)}function g7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return v7(n,t)&&i.push(" from"),i.push(" ",r("source")),i}function y7(e,t,r){let{node:n}=e;if(!v7(n,t))return"";let i=[" "];if(vr(n.specifiers)){let s=[],o=[];e.each(()=>{let l=e.node.type;if(l==="ExportNamespaceSpecifier"||l==="ExportDefaultSpecifier"||l==="ImportNamespaceSpecifier"||l==="ImportDefaultSpecifier")s.push(r());else if(l==="ExportSpecifier"||l==="ImportSpecifier")o.push(r());else throw new kf(n,"specifier")},"specifiers"),i.push(lr(", ",s)),o.length>0&&(s.length>0&&i.push(", "),o.length>1||s.length>0||n.specifiers.some(l=>et(l))?i.push(Ce(["{",He([t.bracketSpacing?dt:Re,lr([",",dt],o)]),Ht($u(t)?",":""),t.bracketSpacing?dt:Re,"}"])):i.push(["{",t.bracketSpacing?" ":"",...o,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function v7(e,t){return e.type!=="ImportDeclaration"||vr(e.specifiers)||e.importKind==="type"?!0:M_(t,cn(e),cn(e.source)).trimEnd().endsWith("from")}function eve(e,t){var r,n;if((r=e.extra)!=null&&r.deprecatedAssertSyntax)return"assert";let i=M_(t,br(e.source),(n=e.attributes)!=null&&n[0]?cn(e.attributes[0]):br(e)).trimStart();return i.startsWith("assert")?"assert":i.startsWith("with")||vr(e.attributes)?"with":void 0}function b7(e,t,r){let{node:n}=e;if(!n.source)return"";let i=eve(n,t);if(!i)return"";let s=[` ${i} {`];return vr(n.attributes)&&(t.bracketSpacing&&s.push(" "),s.push(lr(", ",e.map(r,"attributes"))),t.bracketSpacing&&s.push(" ")),s.push("}"),s}function tve(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),o=s?"imported":"local",l=s?"local":"exported",a=n[o],c=n[l],u="",h="";return i==="ExportNamespaceSpecifier"||i==="ImportNamespaceSpecifier"?u="*":a&&(u=r(o)),c&&!rve(n)&&(h=r(l)),[L_(i==="ImportSpecifier"?n.importKind:n.exportKind,!1),u,u&&h?" as ":"",h]}function rve(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!Cfe(t,r))return!1;if(gs(t))return t.value===r.value&&io(t)===io(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function _1(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,o=s.type==="ObjectTypeAnnotation",l=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||l?"members":s.type==="TSInterfaceBody"?"body":"properties"];o&&a.push("indexers","callProperties","internalSlots");let c=a.flatMap(w=>e.map(({node:T})=>({node:T,printed:r(),loc:cn(T)}),w));a.length>1&&c.sort((w,T)=>w.loc-T.loc);let{parent:u,key:h}=e,d=o&&h==="body"&&(u.type==="InterfaceDeclaration"||u.type==="DeclareInterface"||u.type==="DeclareClass"),f=s.type==="TSInterfaceBody"||l||d||s.type==="ObjectPattern"&&u.type!=="FunctionDeclaration"&&u.type!=="FunctionExpression"&&u.type!=="ArrowFunctionExpression"&&u.type!=="ObjectMethod"&&u.type!=="ClassMethod"&&u.type!=="ClassPrivateMethod"&&u.type!=="AssignmentPattern"&&u.type!=="CatchClause"&&s.properties.some(w=>w.value&&(w.value.type==="ObjectPattern"||w.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&c.length>0&&gu(t.originalText,cn(s),c[0].loc),p=d?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?Ht(i,";"):",",g=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",b=[],v=c.map(w=>{let T=[...b,Ce(w.printed)];return b=[p,dt],(w.node.type==="TSPropertySignature"||w.node.type==="TSMethodSignature"||w.node.type==="TSConstructSignatureDeclaration"||w.node.type==="TSCallSignatureDeclaration")&&et(w.node,gt.PrettierIgnore)&&b.shift(),Fu(w.node,t)&&b.push(ze),T});if(s.inexact||s.hasUnknownMembers){let w;if(et(s,gt.Dangling)){let T=et(s,gt.Line);w=[fn(e,t),T||$s(t.originalText,br(Sr(!1,Td(s),-1)))?ze:dt,"..."]}else w=["..."];v.push([...b,...w])}let E=(n=Sr(!1,c,-1))==null?void 0:n.node,D=!(s.inexact||s.hasUnknownMembers||E&&(E.type==="RestElement"||(E.type==="TSPropertySignature"||E.type==="TSCallSignatureDeclaration"||E.type==="TSMethodSignature"||E.type==="TSConstructSignatureDeclaration")&&et(E,gt.PrettierIgnore))),C;if(v.length===0){if(!et(s,gt.Dangling))return[g,y,di(e,r)];C=Ce([g,fn(e,t,{indent:!0}),Re,y,Wi(e),di(e,r)])}else C=[d&&vr(s.properties)?s7(u):"",g,He([t.bracketSpacing?dt:Re,...v]),Ht(D&&(p!==","||$u(t))?p:""),t.bracketSpacing?dt:Re,y,Wi(e),di(e,r)];return e.match(w=>w.type==="ObjectPattern"&&!vr(w.decorators),pD)||mu(s)&&(e.match(void 0,(w,T)=>T==="typeAnnotation",(w,T)=>T==="typeAnnotation",pD)||e.match(void 0,(w,T)=>w.type==="FunctionTypeParam"&&T==="typeAnnotation",pD))||!f&&e.match(w=>w.type==="ObjectPattern",w=>w.type==="AssignmentExpression"||w.type==="VariableDeclarator")?C:Ce(C,{shouldBreak:f})}function pD(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&Ez(e)}function nve(e){let t=[e];for(let r=0;rd[$]===n),p=d.type===n.type&&!f,g,y,b=0;do y=g||n,g=e.getParentNode(b),b++;while(g&&g.type===n.type&&l.every($=>g[$]!==y));let v=g||d,E=y;if(i&&(Jn(n[l[0]])||Jn(a)||Jn(c)||nve(E))){h=!0,p=!0;let $=N=>[Ht("("),He([Re,N]),Re,Ht(")")],I=N=>N.type==="NullLiteral"||N.type==="Literal"&&N.value===null||N.type==="Identifier"&&N.name==="undefined";u.push(" ? ",I(a)?r(s):$(r(s))," : ",c.type===n.type||I(c)?r(o):$(r(o)))}else{let $=N=>t.useTabs?He(r(N)):ua(2,r(N)),I=[dt,"? ",a.type===n.type?Ht("","("):"",$(s),a.type===n.type?Ht("",")"):"",dt,": ",$(o)];u.push(d.type!==n.type||d[o]===n||f?I:t.useTabs?Hj(He(I)):ua(Math.max(0,t.tabWidth-2),I))}let D=[s,o,...l].some($=>et(n[$],I=>co(I)&&gu(t.originalText,cn(I),br(I)))),C=$=>d===v?Ce($,{shouldBreak:D}):D?[$,ca]:$,w=!h&&(un(d)||d.type==="NGPipeExpression"&&d.left===n)&&!d.computed,T=ove(e),A=C([ive(e,t,r),p?u:He(u),i&&w&&!T?Re:""]);return f||T?Ce([He([Re,A]),Re]):A}function lve(e,t){return(un(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function uve(e,t,r,n){return[...e.map(i=>Td(i)),Td(t),Td(r)].flat().some(i=>co(i)&&gu(n.originalText,cn(i),br(i)))}var cve=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function hve(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let i=0;!r;i++){let s=e.getParentNode(i);if(s.type==="ChainExpression"&&s.expression===n||yr(s)&&s.callee===n||un(s)&&s.object===n||s.type==="TSNonNullExpression"&&s.expression===n){n=s;continue}s.type==="NewExpression"&&s.callee===n||Qo(s)&&s.expression===n?(r=e.getParentNode(i+1),n=s):r=s}return n===t?!1:r[cve.get(r.type)]===n}var mD=e=>[Ht("("),He([Re,e]),Re,Ht(")")];function O_(e,t,r,n){if(!t.experimentalTernaries)return ave(e,t,r);let{node:i}=e,s=i.type==="ConditionalExpression",o=i.type==="TSConditionalType"||i.type==="ConditionalTypeAnnotation",l=s?"consequent":"trueType",a=s?"alternate":"falseType",c=s?["test"]:["checkType","extendsType"],u=i[l],h=i[a],d=c.map(Xe=>i[Xe]),{parent:f}=e,p=f.type===i.type,g=p&&c.some(Xe=>f[Xe]===i),y=p&&f[a]===i,b=u.type===i.type,v=h.type===i.type,E=v||y,D=t.tabWidth>2||t.useTabs,C,w,T=0;do w=C||i,C=e.getParentNode(T),T++;while(C&&C.type===i.type&&c.every(Xe=>C[Xe]!==w));let A=C||f,$=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),I=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(b||v),N=s&&A.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",L=hve(e),F=lve(i,f),P=o&&ch(e,t),_=D?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",M=uve(d,u,h,t)||b||v,j=!E&&!p&&!o&&(N?u.type==="NullLiteral"||u.type==="Literal"&&u.value===null:b_(u,t)&&fM(i.test,3)),R=E||y||o&&!p||p&&s&&fM(i.test,1)||j,G=[];!b&&et(u,gt.Dangling)&&e.call(Xe=>{G.push(fn(Xe,t),ze)},"consequent");let q=[];et(i.test,gt.Dangling)&&e.call(Xe=>{q.push(fn(Xe,t))},"test"),!v&&et(h,gt.Dangling)&&e.call(Xe=>{q.push(fn(Xe,t))},"alternate"),et(i,gt.Dangling)&&q.push(fn(e,t));let ee=Symbol("test"),Y=Symbol("consequent"),X=Symbol("test-and-consequent"),Q=s?[mD(r("test")),i.test.type==="ConditionalExpression"?ca:""]:[r("checkType")," ","extends"," ",i.extendsType.type==="TSConditionalType"||i.extendsType.type==="ConditionalTypeAnnotation"||i.extendsType.type==="TSMappedType"?r("extendsType"):Ce(mD(r("extendsType")))],te=Ce([Q," ?"],{id:ee}),Z=r(l),de=He([b||N&&(Jn(u)||p||E)?ze:dt,G,Z]),ke=R?Ce([te,E?de:Ht(de,Ce(de,{id:Y}),{groupId:ee})],{id:X}):[te,de],me=r(a),Fe=j?Ht(me,Hj(mD(me)),{groupId:X}):me,je=[ke,q.length>0?[He([ze,q]),ze]:v?ze:j?Ht(dt," ",{groupId:X}):dt,":",v?" ":D?R?Ht(_,Ht(E||j?" ":_," "),{groupId:X}):Ht(_," "):" ",v?Fe:Ce([He(Fe),N&&!j?Re:""]),F&&!L?Re:"",M?ca:""];return $&&!M?Ce(He([Re,Ce(je)])):$||I?Ce(He(je)):L||o&&g?Ce([He([Re,je]),P?Re:""]):f===A?Ce(je):je}function dve(e,t,r,n){let{node:i}=e;if(S1(i))return qye(e,t);let s=t.semi?";":"",o=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),ze];case"File":return Gye(e,t,r)??r("program");case"Program":return Zz(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Vye(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!et(i.expression)&&(Oo(i.expression)||yi(i.expression))?["(",r("expression"),")"]:Ce(["(",He([Re,r("expression")]),Re,")"]);case"AssignmentExpression":return qge(e,t,r);case"VariableDeclarator":return Kge(e,t,r);case"BinaryExpression":case"LogicalExpression":return fz(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Uge(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&o.push(r("object")),o.push(Ce(He([Re,jz(e,t,r)]))),o;case"Identifier":return[i.name,Wi(e),Bz(e),di(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return zz(e,r);case"FunctionDeclaration":case"FunctionExpression":return Gz(e,r,t,n);case"ArrowFunctionExpression":return Aye(e,t,r,n);case"YieldExpression":return o.push("yield"),i.delegate&&o.push("*"),i.argument&&o.push(" ",r("argument")),o;case"AwaitExpression":if(o.push("await"),i.argument){o.push(" ",r("argument"));let{parent:l}=e;if(yr(l)&&l.callee===i||un(l)&&l.object===i){o=[He([Re,...o]),Re];let a=e.findAncestor(c=>c.type==="AwaitExpression"||c.type==="BlockStatement");if((a==null?void 0:a.type)!=="AwaitExpression"||!Bi(a.argument,c=>c===i))return Ce(o)}}return o;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return p7(e,t,r);case"ImportDeclaration":return Xye(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return tve(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Yz(e,t,r);case"ClassBody":return Hye(e,t,r);case"ThrowStatement":return Cye(e,t,r);case"ReturnStatement":return Eye(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return xz(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return _1(e,t,r);case"Property":return D1(i)?aT(e,t,r):$M(e,t,r);case"ObjectProperty":return $M(e,t,r);case"ObjectMethod":return aT(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return F_(e,t,r);case"SequenceExpression":{let{parent:l}=e;if(l.type==="ExpressionStatement"||l.type==="ForStatement"){let a=[];return e.each(({isFirst:c})=>{c?a.push(r()):a.push(",",He([dt,r()]))},"expressions"),Ce(a)}return Ce(lr([",",dt],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return o.push(i.operator),/[a-z]$/.test(i.operator)&&o.push(" "),et(i.argument)?o.push(Ce(["(",He([Re,r("argument")]),Re,")"])):o.push(r("argument")),o;case"UpdateExpression":return o.push(r("argument"),i.operator),i.prefix&&o.reverse(),o;case"ConditionalExpression":return O_(e,t,r,n);case"VariableDeclaration":{let l=e.map(r,"declarations"),a=e.parent,c=a.type==="ForStatement"||a.type==="ForInStatement"||a.type==="ForOfStatement",u=i.declarations.some(d=>d.init),h;return l.length===1&&!et(i.declarations[0])?h=l[0]:l.length>0&&(h=He(l[0])),o=[ao(e),i.kind,h?[" ",h]:"",He(l.slice(1).map(d=>[",",u&&!c?ze:dt,d]))],c&&a.body!==i||o.push(s),Ce(o)}case"WithStatement":return Ce(["with (",r("object"),")",kl(i.body,r("body"))]);case"IfStatement":{let l=kl(i.consequent,r("consequent")),a=Ce(["if (",Ce([He([Re,r("test")]),Re]),")",l]);if(o.push(a),i.alternate){let c=et(i.consequent,gt.Trailing|gt.Line)||Mj(i),u=i.consequent.type==="BlockStatement"&&!c;o.push(u?" ":ze),et(i,gt.Dangling)&&o.push(fn(e,t),c?ze:" "),o.push("else",Ce(kl(i.alternate,r("alternate"),i.alternate.type==="IfStatement")))}return o}case"ForStatement":{let l=kl(i.body,r("body")),a=fn(e,t),c=a?[a,Re]:"";return!i.init&&!i.test&&!i.update?[c,Ce(["for (;;)",l])]:[c,Ce(["for (",Ce([He([Re,r("init"),";",dt,r("test"),";",dt,r("update")]),Re]),")",l])]}case"WhileStatement":return Ce(["while (",Ce([He([Re,r("test")]),Re]),")",kl(i.body,r("body"))]);case"ForInStatement":return Ce(["for (",r("left")," in ",r("right"),")",kl(i.body,r("body"))]);case"ForOfStatement":return Ce(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",kl(i.body,r("body"))]);case"DoWhileStatement":{let l=kl(i.body,r("body"));return o=[Ce(["do",l])],i.body.type==="BlockStatement"?o.push(" "):o.push(ze),o.push("while (",Ce([He([Re,r("test")]),Re]),")",s),o}case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return o.push(i.type==="BreakStatement"?"break":"continue"),i.label&&o.push(" ",r("label")),o.push(s),o;case"LabeledStatement":return i.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let l=et(i.param,c=>!co(c)||c.leading&&$s(t.originalText,br(c))||c.trailing&&$s(t.originalText,cn(c),{backwards:!0})),a=r("param");return["catch ",l?["(",He([Re,a]),Re,") "]:["(",a,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Ce(["switch (",He([Re,r("discriminant")]),Re,")"])," {",i.cases.length>0?He([ze,lr(ze,e.map(({node:l,isLast:a})=>[r(),!a&&Fu(l,t)?ze:""],"cases"))]):"",ze,"}"];case"SwitchCase":{i.test?o.push("case ",r("test"),":"):o.push("default:"),et(i,gt.Dangling)&&o.push(" ",fn(e,t));let l=i.consequent.filter(a=>a.type!=="EmptyStatement");if(l.length>0){let a=lT(e,t,r,"consequent");o.push(l.length===1&&l[0].type==="BlockStatement"?[" ",a]:He([ze,a]))}return o}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return n7(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return a7(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return l7(e,t,r);case"TemplateElement":return Oc(i.value.raw);case"TemplateLiteral":return sz(e,r,t);case"TaggedTemplateExpression":return dme(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{o.push("module {");let l=r("body");return l&&o.push(He([ze,l]),ze),o.push("}"),o}case"InterpreterDirective":default:throw new kf(i,"ESTree")}}function x7(e,t,r){let{parent:n,node:i,key:s}=e,o=[r("expression")];switch(i.type){case"AsConstExpression":o.push(" as const");break;case"AsExpression":case"TSAsExpression":o.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":o.push(" satisfies ",r("typeAnnotation"));break}return s==="callee"&&yr(n)||s==="object"&&un(n)?Ce([He([Re,...o]),Re]):o}function w7(e,t,r){return _1(e,r,t)}function S7(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function fve(e,t,r){let{node:n}=e,i;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":i="boolean";break;case"EnumNumberBody":i="number";break;case"EnumStringBody":i="string";break;case"EnumSymbolBody":i="symbol";break}return[i?`of ${i} `:"",w7(e,t,r)]}function D7(e,t,r){let{node:n}=e;return[ao(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?w7(e,t,r):t("body")]}function E7(e,t,r){let{node:n}=e,i=[ao(e),"interface"],s=[],o=[];n.type!=="InterfaceTypeAnnotation"&&s.push(" ",r("id"),r("typeParameters"));let l=n.typeParameters&&!et(n.typeParameters,gt.Trailing|gt.Line);return vr(n.extends)&&o.push(l?Ht(" ",dt,{groupId:N_(n.typeParameters)}):dt,"extends ",(n.extends.length===1?Xfe:He)(lr([",",dt],e.map(r,"extends")))),et(n.id,gt.Trailing)||vr(n.extends)?l?i.push(Ce([...s,He(o)])):i.push(Ce(He([...s,...o]))):i.push(...s,...o),i.push(" ",r("body")),Ce(i)}function pve(e,t,r){let{node:n}=e;if(Dj(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return n7(e,t,r);case"DeclareFunction":return[ao(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",di(e,r),i];case"DeclareVariable":return[ao(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return p7(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return fye(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Tz(e,t,r);case"IntersectionTypeAnnotation":return Az(e,t,r);case"UnionTypeAnnotation":return kz(e,t,r);case"ConditionalTypeAnnotation":return O_(e,t,r);case"InferTypeAnnotation":return Fz(e,t,r);case"FunctionTypeAnnotation":return _z(e,t,r);case"TupleTypeAnnotation":return F_(e,t,r);case"TupleTypeLabeledElement":return Iz(e,t,r);case"TupleTypeSpreadElement":return Pz(e,t,r);case"GenericTypeAnnotation":return[r("id"),gm(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return $z(e,t,r);case"TypeAnnotation":return Mz(e,t,r);case"TypeParameter":return t7(e,t,r);case"TypeofTypeAnnotation":return Oz(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Lz(r);case"DeclareEnum":case"EnumDeclaration":return D7(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return fve(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return S7(e,r);case"FunctionTypeParam":{let s=n.name?r("name"):e.parent.this===n?"this":"";return[s,Wi(e),s?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return E7(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:s}=n;return Vz.ok(s==="plus"||s==="minus"),s==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return Lye(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let s="";return n.proto?s="proto ":n.static&&(s="static "),[s,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",zg(e,t,r),Wi(e),D1(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return _1(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Wi(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return zz(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Oc(eg(io(n),t));case"NumberLiteralTypeAnnotation":return Vl(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return uT(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),di(e,r),")"];case"TypePredicate":return Rz(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return gm(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return x7(e,t,r)}}function mve(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Ej(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",o=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let l=!(yi(i.expression)||Oo(i.expression)),a=Ce(["<",He([Re,r("typeAnnotation")]),Re,">"]),c=[Ht("("),He([Re,r("expression")]),Re,Ht(")")];return l?lc([[a,r("expression")],[a,Ce(c,{shouldBreak:!0})],[a,r("expression")]]):Ce([a,r("expression")])}case"TSDeclareFunction":return Gz(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Yz(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return _1(e,t,r);case"TSTypeAliasDeclaration":return Tz(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return a7(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return l7(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return sz(e,r,t);case"TSNamedTupleMember":return Iz(e,t,r);case"TSRestType":return Pz(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return E7(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return gm(e,t,r,"params");case"TSTypeParameter":return t7(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return x7(e,t,r);case"TSArrayType":return Lz(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",zg(e,t,r),Wi(e),di(e,r)];case"TSParameterProperty":return[z0(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Oz(e,r);case"TSIndexSignature":{let l=i.parameters.length>1?Ht($u(t)?",":""):"",a=Ce([He([Re,lr([", ",Re],e.map(r,"parameters"))]),l,Re]),c=e.parent.type==="ClassBody"&&e.key==="body";return[c&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",di(e,r),c?s:""]}case"TSTypePredicate":return Rz(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",gm(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return $z(e,t,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return Oye(e,t,r);case"TSMethodSignature":{let l=i.kind&&i.kind!=="method"?`${i.kind} `:"";o.push(z0(i),l,i.computed?"[":"",r("key"),i.computed?"]":"",Wi(e));let a=jg(e,r,t,!1,!0),c=i.returnType?"returnType":"typeAnnotation",u=i[c],h=u?di(e,r,c):"",d=A1(i,h);return o.push(d?Ce(a):a),u&&o.push(Ce(h)),Ce(o)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return D7(e,r,t);case"TSEnumMember":return S7(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",m7(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:l}=e,a=l.type==="TSModuleDeclaration",c=((n=i.body)==null?void 0:n.type)==="TSModuleDeclaration";if(a)o.push(".");else if(o.push(ao(e)),!(i.kind==="global"||i.global)){let u=i.kind??(gs(i.id)||M_(t,cn(i),cn(i.id)).trim().endsWith("module")?"module":"namespace");o.push(u," ")}return o.push(r("id")),c?o.push(r("body")):i.body?o.push(" ",Ce(r("body"))):o.push(s),o}case"TSConditionalType":return O_(e,t,r);case"TSInferType":return Fz(e,t,r);case"TSIntersectionType":return Az(e,t,r);case"TSUnionType":return kz(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return _z(e,t,r);case"TSTupleType":return F_(e,t,r);case"TSTypeReference":return[r("typeName"),gm(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Mz(e,t,r);case"TSEmptyBodyFunctionExpression":return P_(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return _M(e,r,"?");case"TSJSDocNonNullableType":return _M(e,r,"!");case"TSParenthesizedType":default:throw new kf(i,"TypeScript")}}function gve(e,t,r,n){if(dz(e))return Jme(e,t);for(let i of[Fge,Ege,pve,mve,dve]){let s=i(e,t,r,n);if(s!==void 0)return s}}var yve=jr(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function vve(e,t,r,n){var i;e.isRoot&&((i=t.__onHtmlBindingRoot)==null||i.call(t,e.node,t));let s=gve(e,t,r,n);if(!s)return"";let{node:o}=e;if(yve(o))return s;let l=vr(o.decorators),a=Mge(e,t,r),c=o.type==="ClassExpression";if(l&&!c)return ZC(s,d=>Ce([a,d]));let u=ch(e,t),h=Wye(e,t);return!a&&!u&&!h?s:ZC(s,d=>[h?";":"",u?"(":"",u&&c&&l?[He([dt,a,d]),dt]:[a,d],u?")":""])}var bve=vve,xve={avoidAstMutation:!0},wve=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],C7={};b1(C7,{getVisitorKeys:()=>Cve,massageAstNode:()=>T7,print:()=>Tve});var Sve={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},Dve=Sve,Eve=wj(Dve),Cve=Eve;function Tve(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),ze];case"ArrayExpression":{if(n.elements.length===0)return"[]";let i=e.map(()=>e.node===null?"null":r(),"elements");return["[",He([ze,lr([",",ze],i)]),ze,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",He([ze,lr([",",ze],e.map(r,"properties"))]),ze,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return IM(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return IM(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new kf(n,"JSON")}}function IM(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Ave=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function T7(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,i]of e.elements.entries())i===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}T7.ignoredProperties=Ave;var Xy={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Wu="JavaScript",kve={arrowParens:{category:Wu,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Xy.bracketSameLine,bracketSpacing:Xy.bracketSpacing,jsxBracketSameLine:{category:Wu,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Wu,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Wu,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Xy.singleQuote,jsxSingleQuote:{category:Wu,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Wu,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Wu,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Xy.singleAttributePerLine},_ve=kve,$ve={estree:bj,"estree-json":C7},Fve=[...Jde,...wve],Pve=vj,Ive=Object.defineProperty,A7=(e,t)=>{for(var r in t)Ive(e,r,{get:t[r],enumerable:!0})},k7=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},_l=(e,t,r)=>(k7(e,t,"read from private field"),r?r.call(e):t.get(e)),Nve=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Mve=(e,t,r,n)=>(k7(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),_7={};A7(_7,{languages:()=>x1e,options:()=>S1e,parsers:()=>uH,printers:()=>Axe});var Lve=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Ps=Lve,R_="string",B_="array",j_="cursor",$1="indent",F1="align",z_="trim",sg="group",P1="fill",I1="if-break",N1="indent-if-break",H_="line-suffix",U_="line-suffix-boundary",hh="line",W_="label",M1="break-parent",$7=new Set([j_,$1,F1,z_,sg,P1,I1,N1,H_,U_,hh,W_,M1]);function Ove(e){if(typeof e=="string")return R_;if(Array.isArray(e))return B_;if(!e)return;let{type:t}=e;if($7.has(t))return t}var V_=Ove,Rve=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Bve(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(V_(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Rve([...$7].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var zve=class extends Error{constructor(t){super(Bve(t));Ta(this,"name","InvalidDocError");this.doc=t}},F7=zve,jve=()=>{},Hve=jve;function hl(e){return{type:$1,contents:e}}function P7(e,t){return{type:F1,contents:t,n:e}}function ki(e,t={}){return Hve(t.expandedStates),{type:sg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Uve(e){return P7(Number.NEGATIVE_INFINITY,e)}function Wve(e){return P7({type:"root"},e)}function I7(e){return{type:P1,parts:e}}function H0(e,t="",r={}){return{type:I1,breakContents:e,flatContents:t,groupId:r.groupId}}function Vve(e,t){return{type:N1,contents:e,groupId:t.groupId,negate:t.negate}}var Hg={type:M1},Gve={type:hh,hard:!0},qve={type:hh,hard:!0,literal:!0},fi={type:hh},Ti={type:hh,soft:!0},nn=[Gve,Hg],Kve=[qve,Hg];function _f(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Ug=Jve;function G_(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(V_(s)){case B_:return t(s.map(n));case P1:return t({...s,parts:s.parts.map(n)});case I1:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case sg:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(n),a=o[0]):a=n(a),t({...s,contents:a,expandedStates:o})}case F1:case $1:case N1:case W_:case H_:return t({...s,contents:n(s.contents)});case R_:case z_:case j_:case U_:case hh:case M1:return t(s);default:throw new F7(s)}}}function Xve(e){switch(V_(e)){case P1:if(e.parts.every(t=>t===""))return"";break;case sg:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===sg&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case F1:case $1:case N1:case H_:if(!e.contents)return"";break;case I1:if(!e.flatContents&&!e.breakContents)return"";break;case B_:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Ug(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case R_:case z_:case j_:case U_:case hh:case W_:case M1:break;default:throw new F7(e)}return e}function Yve(e){return G_(e,t=>Xve(t))}function $o(e,t=Kve){return G_(e,r=>typeof r=="string"?_f(t,r.split(` -`)):r)}var Yy="'",NM='"';function Zve(e,t){let r=t===!0||t===Yy?Yy:NM,n=r===Yy?NM:Yy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var Qve=Zve;function e0e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var bo,t0e=class{constructor(e){Nve(this,bo,void 0),Mve(this,bo,new Set(e))}getLeadingWhitespaceCount(e){let t=kl(this,bo),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return kl(this,bo).has(e.charAt(0))}hasTrailingWhitespace(e){return kl(this,bo).has(Ug(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${e0e([...kl(this,bo)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=kl(this,bo);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=kl(this,bo);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=kl(this,bo);return Array.prototype.every.call(e,r=>t.has(r))}};bo=new WeakMap;var r0e=t0e,n0e=[" ",` -`,"\f","\r"," "],i0e=new r0e(n0e),ha=i0e,s0e=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);Ta(this,"name","UnexpectedNodeError");this.node=t}},o0e=s0e;function a0e(e){return(e==null?void 0:e.type)==="front-matter"}var L1=a0e,l0e=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),u0e=new Set(["if","else if","for","switch","case"]);function N7(e,t){var r;if(e.type==="text"||e.type==="comment"||L1(e)||e.type==="yaml"||e.type==="toml")return null;if(e.type==="attribute"&&delete t.value,e.type==="docType"&&delete t.value,e.type==="angularControlFlowBlock"&&(r=t.parameters)!=null&&r.children)for(let n of t.parameters.children)u0e.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.type==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim())}N7.ignoredProperties=l0e;var c0e=N7;async function h0e(e,t){if(e.lang==="yaml"){let r=e.value.trim(),n=r?await t(r,{parser:"yaml"}):"";return Wve([e.startDelimiter,nn,n,n?nn:"",e.endDelimiter])}}var d0e=h0e;function O1(e,t=!0){return[hl([Ti,e]),t?Ti:""]}function $f(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function da(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(o,a)=>{i=n(o,a)});let s=await t(e,r,t);return i?ki(s):O1(s)}function f0e(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":da(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},$f)}var p0e=f0e,m0e=e=>String(e).split(/[/\\]/).pop();function MM(e,t){if(!t)return;let r=m0e(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function g0e(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function y0e(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=g0e(r,t.language)??MM(r,t.physicalFile)??MM(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var R1=y0e,v0e="inline",b0e={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},x0e="normal",w0e={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function S0e(e){return e.type==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var og=S0e,D0e=e=>Ps(!1,e,/^[\t\f\r ]*\n/g,""),M7=e=>D0e(ha.trimEnd(e)),E0e=e=>{let t=e,r=ha.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=ha.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function L7(e,t){return!!(e.type==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.type==="ieConditionalComment"&&!e.complete||Zd(e)&&e.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||K_(e,t)&&!Za(e)&&e.type!=="interpolation")}function B1(e){return e.type==="attribute"||!e.parent||!e.prev?!1:C0e(e.prev)}function C0e(e){return e.type==="comment"&&e.value.trim()==="prettier-ignore"}function Js(e){return e.type==="text"||e.type==="comment"}function Za(e){return e.type==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||og(e)&&(e.name==="script"||e.name==="style"))}function T0e(e){return e.children&&!Za(e)}function A0e(e){return Za(e)||e.type==="interpolation"||O7(e)}function O7(e){return W7(e).startsWith("pre")}function k0e(e,t){var r,n;let i=s();if(i&&!e.prev&&(n=(r=e.parent)==null?void 0:r.tagDefinition)!=null&&n.ignoreFirstLf)return e.type==="interpolation";return i;function s(){return L1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.prev&&(e.prev.type==="text"||e.prev.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Zd(e.parent)?!0:!(!e.prev&&(e.parent.type==="root"||Zd(e)&&e.parent||Za(e.parent)||z1(e.parent,t)||!O0e(e.parent.cssDisplay))||e.prev&&!z0e(e.prev.cssDisplay))}}function _0e(e,t){return L1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.next&&(e.next.type==="text"||e.next.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Zd(e.parent)?!0:!(!e.next&&(e.parent.type==="root"||Zd(e)&&e.parent||Za(e.parent)||z1(e.parent,t)||!R0e(e.parent.cssDisplay))||e.next&&!B0e(e.next.cssDisplay))}function $0e(e){return j0e(e.cssDisplay)&&!Za(e)}function Zy(e){return L1(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+10&&(["body","script","style"].includes(e.name)||e.children.some(t=>I0e(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.type!=="text"&&z7(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||j7(e.lastChild))}function R7(e){return e.type==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function gD(e){return H7(e)||e.prev&&P0e(e.prev)||B7(e)}function P0e(e){return H7(e)||e.type==="element"&&e.fullName==="br"||B7(e)}function B7(e){return z7(e)&&j7(e)}function z7(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:e.parent.type==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function H7(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function q_(e){return e.lastChild?q_(e.lastChild):e}function I0e(e){var t;return(t=e.children)==null?void 0:t.some(r=>r.type!=="text")}function U7(e){if(e)switch(e){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(e.endsWith("json")||e.endsWith("importmap")||e==="speculationrules")return"json"}}function N0e(e,t){let{name:r,attrMap:n}=e;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:i,lang:s}=e.attrMap;return!s&&!i?"babel":R1(t,{language:s})??U7(i)}function M0e(e,t){if(!K_(e,t))return;let{attrMap:r}=e;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:i}=r;return R1(t,{language:i})??U7(n)}function L0e(e,t){if(e.name!=="style")return;let{lang:r}=e.attrMap;return r?R1(t,{language:r}):"css"}function LM(e,t){return N0e(e,t)??L0e(e,t)??M0e(e,t)}function Wg(e){return e==="block"||e==="list-item"||e.startsWith("table")}function O0e(e){return!Wg(e)&&e!=="inline-block"}function R0e(e){return!Wg(e)&&e!=="inline-block"}function B0e(e){return!Wg(e)}function z0e(e){return!Wg(e)}function j0e(e){return!Wg(e)&&e!=="inline-block"}function Zd(e){return W7(e).startsWith("pre")}function H0e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}function U0e(e,t){var r;if(Ff(e,t))return"block";if(((r=e.prev)==null?void 0:r.type)==="comment"){let i=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(i)return i[1]}let n=!1;if(e.type==="element"&&e.namespace==="svg")if(H0e(e,i=>i.fullName==="svg:foreignObject"))n=!0;else return e.name==="svg"?"inline-block":"block";switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return e.type==="element"&&(!e.namespace||n||og(e))&&b0e[e.name]||v0e}}function W7(e){return e.type==="element"&&(!e.namespace||og(e))&&w0e[e.name]||x0e}function W0e(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(` +Expected it to be ${n}.`}var jve=class extends Error{constructor(t){super(Bve(t));Ta(this,"name","InvalidDocError");this.doc=t}},F7=jve,zve=()=>{},Hve=zve;function dl(e){return{type:$1,contents:e}}function P7(e,t){return{type:F1,contents:t,n:e}}function ki(e,t={}){return Hve(t.expandedStates),{type:sg,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Uve(e){return P7(Number.NEGATIVE_INFINITY,e)}function Wve(e){return P7({type:"root"},e)}function I7(e){return{type:P1,parts:e}}function H0(e,t="",r={}){return{type:I1,breakContents:e,flatContents:t,groupId:r.groupId}}function Vve(e,t){return{type:N1,contents:e,groupId:t.groupId,negate:t.negate}}var Hg={type:M1},Gve={type:hh,hard:!0},qve={type:hh,hard:!0,literal:!0},fi={type:hh},Ti={type:hh,soft:!0},nn=[Gve,Hg],Kve=[qve,Hg];function _f(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Ug=Jve;function G_(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){if(r.has(s))return r.get(s);let o=i(s);return r.set(s,o),o}function i(s){switch(V_(s)){case B_:return t(s.map(n));case P1:return t({...s,parts:s.parts.map(n)});case I1:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case sg:{let{expandedStates:o,contents:l}=s;return o?(o=o.map(n),l=o[0]):l=n(l),t({...s,contents:l,expandedStates:o})}case F1:case $1:case N1:case W_:case H_:return t({...s,contents:n(s.contents)});case R_:case j_:case z_:case U_:case hh:case M1:return t(s);default:throw new F7(s)}}}function Xve(e){switch(V_(e)){case P1:if(e.parts.every(t=>t===""))return"";break;case sg:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===sg&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case F1:case $1:case N1:case H_:if(!e.contents)return"";break;case I1:if(!e.flatContents&&!e.breakContents)return"";break;case B_:{let t=[];for(let r of e){if(!r)continue;let[n,...i]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Ug(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case R_:case j_:case z_:case U_:case hh:case W_:case M1:break;default:throw new F7(e)}return e}function Yve(e){return G_(e,t=>Xve(t))}function $o(e,t=Kve){return G_(e,r=>typeof r=="string"?_f(t,r.split(` +`)):r)}var Yy="'",NM='"';function Zve(e,t){let r=t===!0||t===Yy?Yy:NM,n=r===Yy?NM:Yy,i=0,s=0;for(let o of e)o===r?i++:o===n&&s++;return i>s?n:r}var Qve=Zve;function e0e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var bo,t0e=class{constructor(e){Nve(this,bo,void 0),Mve(this,bo,new Set(e))}getLeadingWhitespaceCount(e){let t=_l(this,bo),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return _l(this,bo).has(e.charAt(0))}hasTrailingWhitespace(e){return _l(this,bo).has(Ug(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${e0e([..._l(this,bo)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=_l(this,bo);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=_l(this,bo);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=_l(this,bo);return Array.prototype.every.call(e,r=>t.has(r))}};bo=new WeakMap;var r0e=t0e,n0e=[" ",` +`,"\f","\r"," "],i0e=new r0e(n0e),ha=i0e,s0e=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);Ta(this,"name","UnexpectedNodeError");this.node=t}},o0e=s0e;function a0e(e){return(e==null?void 0:e.type)==="front-matter"}var L1=a0e,l0e=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),u0e=new Set(["if","else if","for","switch","case"]);function N7(e,t){var r;if(e.type==="text"||e.type==="comment"||L1(e)||e.type==="yaml"||e.type==="toml")return null;if(e.type==="attribute"&&delete t.value,e.type==="docType"&&delete t.value,e.type==="angularControlFlowBlock"&&(r=t.parameters)!=null&&r.children)for(let n of t.parameters.children)u0e.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.type==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim())}N7.ignoredProperties=l0e;var c0e=N7;async function h0e(e,t){if(e.lang==="yaml"){let r=e.value.trim(),n=r?await t(r,{parser:"yaml"}):"";return Wve([e.startDelimiter,nn,n,n?nn:"",e.endDelimiter])}}var d0e=h0e;function O1(e,t=!0){return[dl([Ti,e]),t?Ti:""]}function $f(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function da(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(o,l)=>{i=n(o,l)});let s=await t(e,r,t);return i?ki(s):O1(s)}function f0e(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":da(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},$f)}var p0e=f0e,m0e=e=>String(e).split(/[/\\]/).pop();function MM(e,t){if(!t)return;let r=m0e(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(i=>r.endsWith(i)))}function g0e(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function y0e(e,t){let r=e.plugins.flatMap(i=>i.languages??[]),n=g0e(r,t.language)??MM(r,t.physicalFile)??MM(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var R1=y0e,v0e="inline",b0e={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},x0e="normal",w0e={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function S0e(e){return e.type==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var og=S0e,D0e=e=>Ps(!1,e,/^[\t\f\r ]*\n/g,""),M7=e=>D0e(ha.trimEnd(e)),E0e=e=>{let t=e,r=ha.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=ha.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function L7(e,t){return!!(e.type==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.type==="ieConditionalComment"&&!e.complete||Zd(e)&&e.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||K_(e,t)&&!Qa(e)&&e.type!=="interpolation")}function B1(e){return e.type==="attribute"||!e.parent||!e.prev?!1:C0e(e.prev)}function C0e(e){return e.type==="comment"&&e.value.trim()==="prettier-ignore"}function Js(e){return e.type==="text"||e.type==="comment"}function Qa(e){return e.type==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||og(e)&&(e.name==="script"||e.name==="style"))}function T0e(e){return e.children&&!Qa(e)}function A0e(e){return Qa(e)||e.type==="interpolation"||O7(e)}function O7(e){return W7(e).startsWith("pre")}function k0e(e,t){var r,n;let i=s();if(i&&!e.prev&&(n=(r=e.parent)==null?void 0:r.tagDefinition)!=null&&n.ignoreFirstLf)return e.type==="interpolation";return i;function s(){return L1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.prev&&(e.prev.type==="text"||e.prev.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Zd(e.parent)?!0:!(!e.prev&&(e.parent.type==="root"||Zd(e)&&e.parent||Qa(e.parent)||j1(e.parent,t)||!O0e(e.parent.cssDisplay))||e.prev&&!j0e(e.prev.cssDisplay))}}function _0e(e,t){return L1(e)||e.type==="angularControlFlowBlock"?!1:(e.type==="text"||e.type==="interpolation")&&e.next&&(e.next.type==="text"||e.next.type==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Zd(e.parent)?!0:!(!e.next&&(e.parent.type==="root"||Zd(e)&&e.parent||Qa(e.parent)||j1(e.parent,t)||!R0e(e.parent.cssDisplay))||e.next&&!B0e(e.next.cssDisplay))}function $0e(e){return z0e(e.cssDisplay)&&!Qa(e)}function Zy(e){return L1(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+10&&(["body","script","style"].includes(e.name)||e.children.some(t=>I0e(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.type!=="text"&&j7(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||z7(e.lastChild))}function R7(e){return e.type==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function gD(e){return H7(e)||e.prev&&P0e(e.prev)||B7(e)}function P0e(e){return H7(e)||e.type==="element"&&e.fullName==="br"||B7(e)}function B7(e){return j7(e)&&z7(e)}function j7(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.linee.sourceSpan.end.line:e.parent.type==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function H7(e){switch(e.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function q_(e){return e.lastChild?q_(e.lastChild):e}function I0e(e){var t;return(t=e.children)==null?void 0:t.some(r=>r.type!=="text")}function U7(e){if(e)switch(e){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(e.endsWith("json")||e.endsWith("importmap")||e==="speculationrules")return"json"}}function N0e(e,t){let{name:r,attrMap:n}=e;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:i,lang:s}=e.attrMap;return!s&&!i?"babel":R1(t,{language:s})??U7(i)}function M0e(e,t){if(!K_(e,t))return;let{attrMap:r}=e;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:i}=r;return R1(t,{language:i})??U7(n)}function L0e(e,t){if(e.name!=="style")return;let{lang:r}=e.attrMap;return r?R1(t,{language:r}):"css"}function LM(e,t){return N0e(e,t)??L0e(e,t)??M0e(e,t)}function Wg(e){return e==="block"||e==="list-item"||e.startsWith("table")}function O0e(e){return!Wg(e)&&e!=="inline-block"}function R0e(e){return!Wg(e)&&e!=="inline-block"}function B0e(e){return!Wg(e)}function j0e(e){return!Wg(e)}function z0e(e){return!Wg(e)&&e!=="inline-block"}function Zd(e){return W7(e).startsWith("pre")}function H0e(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}function U0e(e,t){var r;if(Ff(e,t))return"block";if(((r=e.prev)==null?void 0:r.type)==="comment"){let i=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(i)return i[1]}let n=!1;if(e.type==="element"&&e.namespace==="svg")if(H0e(e,i=>i.fullName==="svg:foreignObject"))n=!0;else return e.name==="svg"?"inline-block":"block";switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return e.type==="element"&&(!e.namespace||n||og(e))&&b0e[e.name]||v0e}}function W7(e){return e.type==="element"&&(!e.namespace||og(e))&&w0e[e.name]||x0e}function W0e(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(` `)){if(r.length===0)continue;let n=ha.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(t)).join(` -`)}function G7(e){return Ps(!1,Ps(!1,e,"'","'"),""",'"')}function Nu(e){return G7(e.value)}var V0e=new Set(["template","style","script"]);function z1(e,t){return Ff(e,t)&&!V0e.has(e.fullName)}function Ff(e,t){return t.parser==="vue"&&e.type==="element"&&e.parent.type==="root"&&e.fullName.toLowerCase()!=="html"}function K_(e,t){return Ff(e,t)&&(z1(e,t)||e.attrMap.lang&&e.attrMap.lang!=="html")}function G0e(e){let t=e.fullName;return t.charAt(0)==="#"||t==="slot-scope"||t==="v-slot"||t.startsWith("v-slot:")}function q0e(e,t){let r=e.parent;if(!Ff(r,t))return!1;let n=r.fullName,i=e.fullName;return n==="script"&&i==="setup"||n==="style"&&i==="vars"}function q7(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?$o(t):$o(V7(M7(t)),nn):_f(fi,ha.split(t))}function K7(e,t){return Ff(e,t)&&e.name==="script"}var J7=/{{(.+?)}}/s;async function K0e(e,t){let r=[];for(let[n,i]of e.split(J7).entries())if(n%2===0)r.push($o(i));else try{r.push(ki(["{{",hl([fi,await da(i,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),fi,"}}"]))}catch{r.push("{{",$o(i),"}}")}return r}function J_({parser:e}){return(t,r,n)=>da(Nu(n.node),t,{parser:e,trailingComma:"none"},$f)}var J0e=J_({parser:"__ng_action"}),X0e=J_({parser:"__ng_binding"}),Y0e=J_({parser:"__ng_directive"});function Z0e(e,t){if(t.parser!=="angular")return;let{node:r}=e,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return J0e;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return X0e;if(n.startsWith("*"))return Y0e;let i=Nu(r);if(/^i18n(?:-.+)?$/.test(n))return()=>O1(I7(q7(r,i.trim())),!i.includes("@@"));if(J7.test(i))return s=>K0e(i,s)}var Q0e=Z0e;function ebe(e,t){let{node:r}=e,n=Nu(r);if(r.fullName==="class"&&!t.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var tbe=ebe;function OM(e){return e===" "||e===` -`||e==="\f"||e==="\r"||e===" "}var rbe=/^[ \t\n\r\u000c]+/,nbe=/^[, \t\n\r\u000c]+/,ibe=/^[^ \t\n\r\u000c]+/,sbe=/[,]+$/,RM=/^\d+$/,obe=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function abe(e){let t=e.length,r,n,i,s,o,a=0,l;function c(f){let p,g=f.exec(e.substring(a));if(g)return[p]=g,a+=p.length,p}let u=[];for(;;){if(c(nbe),a>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=a,r=c(ibe),n=[],r.slice(-1)===","?(r=r.replace(sbe,""),d()):h()}function h(){for(c(rbe),i="",s="in descriptor";;){if(o=e.charAt(a),s==="in descriptor")if(OM(o))i&&(n.push(i),i="",s="after descriptor");else if(o===","){a+=1,i&&n.push(i),d();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&n.push(i),d();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){n.push(i),d();return}else i+=o;else if(s==="after descriptor"&&!OM(o))if(o===""){d();return}else s="in descriptor",a-=1;a+=1}}function d(){let f=!1,p,g,y,b,v={},E,D,C,w,T;for(b=0;bhbe(Nu(e.node))}var X7={width:"w",height:"h",density:"x"},cbe=Object.keys(X7);function hbe(e){let t=lbe(e),r=cbe.filter(u=>t.some(h=>Object.prototype.hasOwnProperty.call(h,u)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,i=X7[n],s=t.map(u=>u.source.value),o=Math.max(...s.map(u=>u.length)),a=t.map(u=>u[n]?String(u[n].value):""),l=a.map(u=>{let h=u.indexOf(".");return h===-1?u.length:h}),c=Math.max(...l);return O1(_f([",",fi],s.map((u,h)=>{let d=[u],f=a[h];if(f){let p=o-u.length+1,g=c-l[h],y=" ".repeat(p+g);d.push(H0(y," "),f+i)}return d})))}var dbe=ube;function fbe(e,t){let{node:r}=e,n=Nu(e.node).trim();if(r.fullName==="style"&&!t.parentParser&&!n.includes("{{"))return async i=>O1(await i(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var yD=new WeakMap;function pbe(e,t){let{root:r}=e;return yD.has(r)||yD.set(r,r.children.some(n=>K7(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),yD.get(r)}var X_=pbe;function mbe(e,t,r){let{node:n}=r,i=Nu(n);return da(`type T<${i}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},$f)}function gbe(e,t,{parseWithTs:r}){return da(`function _(${e}) {}`,t,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function ybe(e){let t=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=e.trim();return t.test(n)||r.test(n)}async function vbe(e,t,r,n){let i=Nu(r.node),{left:s,operator:o,right:a}=bbe(i),l=X_(r,n);return[ki(await da(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await da(a,e,{parser:l?"__ts_expression":"__js_expression"})]}function bbe(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,i=e.match(t);if(!i)return;let s={};if(s.for=i[3].trim(),!s.for)return;let o=Ps(!1,i[1].trim(),n,""),a=o.match(r);a?(s.alias=o.replace(r,""),s.iterator1=a[1].trim(),a[2]&&(s.iterator2=a[2].trim())):s.alias=o;let l=[s.alias,s.iterator1,s.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:i[2],right:s.for}}function xbe(e,t){if(t.parser!=="vue")return;let{node:r}=e,n=r.fullName;if(n==="v-for")return vbe;if(n==="generic"&&K7(r.parent,t))return mbe;let i=Nu(r),s=X_(e,t);if(G0e(r)||q0e(r,t))return o=>gbe(i,o,{parseWithTs:s});if(n.startsWith("@")||n.startsWith("v-on:"))return o=>wbe(i,o,{parseWithTs:s});if(n.startsWith(":")||n.startsWith("v-bind:"))return o=>Sbe(i,o,{parseWithTs:s});if(n.startsWith("v-"))return o=>Y7(i,o,{parseWithTs:s})}function wbe(e,t,{parseWithTs:r}){return ybe(e)?Y7(e,t,{parseWithTs:r}):da(e,t,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},$f)}function Sbe(e,t,{parseWithTs:r}){return da(e,t,{parser:r?"__vue_ts_expression":"__vue_expression"},$f)}function Y7(e,t,{parseWithTs:r}){return da(e,t,{parser:r?"__ts_expression":"__js_expression"},$f)}var Dbe=xbe;function Ebe(e,t){let{node:r}=e;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(t.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||t.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[dbe,fbe,tbe,Dbe,Q0e]){let i=n(e,t);if(i)return Cbe(i)}}}function Cbe(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=G_(s,o=>typeof o=="string"?Ps(!1,o,'"',"""):o),[n.node.rawName,'="',ki(s),'"']}}var Tbe=Ebe,Z7=new Proxy(()=>{},{get:()=>Z7}),Q7=Z7;function Abe(e){return Array.isArray(e)&&e.length>0}var Y_=Abe;function j1(e){return e.sourceSpan.start.offset}function H1(e){return e.sourceSpan.end.offset}function cT(e,t){return[e.isSelfClosing?"":kbe(e,t),ym(e,t)]}function kbe(e,t){return e.lastChild&&ag(e.lastChild)?"":[_be(e,t),Z_(e,t)]}function ym(e,t){return(e.next?zc(e.next):Gg(e.parent))?"":[Vg(e,t),Bc(e,t)]}function _be(e,t){return Gg(e)?Vg(e.lastChild,t):""}function Bc(e,t){return ag(e)?Z_(e.parent,t):U1(e)?Q_(e.next):""}function Z_(e,t){if(Q7(!e.isSelfClosing),eH(e,t))return"";switch(e.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function eH(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(B1(e)||L7(e.parent,t))}function zc(e){return e.prev&&e.prev.type!=="docType"&&e.type!=="angularControlFlowBlock"&&!Js(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Gg(e){var t;return((t=e.lastChild)==null?void 0:t.isTrailingSpaceSensitive)&&!e.lastChild.hasTrailingSpaces&&!Js(q_(e.lastChild))&&!Zd(e)}function ag(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&Js(q_(e))}function U1(e){return e.next&&!Js(e.next)&&Js(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function $be(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return t?t[1]?t[1].split(/\s+/):!0:!1}function W1(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Fbe(e,t,r){var n;let{node:i}=e;if(!Y_(i.attrs))return i.isSelfClosing?" ":"";let s=((n=i.prev)==null?void 0:n.type)==="comment"&&$be(i.prev.value),o=typeof s=="boolean"?()=>s:Array.isArray(s)?h=>s.includes(h.rawName):()=>!1,a=e.map(({node:h})=>o(h)?$o(t.originalText.slice(j1(h),H1(h))):r(),"attrs"),l=i.type==="element"&&i.fullName==="script"&&i.attrs.length===1&&i.attrs[0].fullName==="src"&&i.children.length===0,c=t.singleAttributePerLine&&i.attrs.length>1&&!Ff(i,t)?nn:fi,u=[hl([l?" ":fi,_f(c,a)])];return i.firstChild&&W1(i.firstChild)||i.isSelfClosing&&Gg(i.parent)||l?u.push(i.isSelfClosing?" ":""):u.push(t.bracketSameLine?i.isSelfClosing?" ":"":i.isSelfClosing?fi:Ti),u}function Pbe(e){return e.firstChild&&W1(e.firstChild)?"":e$(e)}function hT(e,t,r){let{node:n}=e;return[vm(n,t),Fbe(e,t,r),n.isSelfClosing?"":Pbe(n)]}function vm(e,t){return e.prev&&U1(e.prev)?"":[jc(e,t),Q_(e)]}function jc(e,t){return W1(e)?e$(e.parent):zc(e)?Vg(e.prev,t):""}function Q_(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${e.rawName}`;default:return`<${e.rawName}`}}function e$(e){switch(Q7(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">";default:return">"}}function Ibe(e,t){if(!e.endSourceSpan)return"";let r=e.startSourceSpan.end.offset;e.firstChild&&W1(e.firstChild)&&(r-=e$(e).length);let n=e.endSourceSpan.start.offset;return e.lastChild&&ag(e.lastChild)?n+=Z_(e,t).length:Gg(e)&&(n-=Vg(e.lastChild,t).length),t.originalText.slice(r,n)}var tH=Ibe,Nbe=new Set(["if","else if","for","switch","case"]);function Mbe(e,t){let{node:r}=e;switch(r.type){case"element":if(Za(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&K_(r,t)){let n=LM(r,t);return n?async(i,s)=>{let o=tH(r,t),a=/^\s*$/.test(o),l="";return a||(l=await i(M7(o),{parser:n,__embeddedInHtml:!0}),a=l===""),[jc(r,t),ki(hT(e,t,s)),a?"":nn,l,a?"":nn,cT(r,t),Bc(r,t)]}:void 0}break;case"text":if(Za(r.parent)){let n=LM(r.parent,t);if(n)return async i=>{let s=n==="markdown"?V7(r.value.replace(/^[^\S\n]*\n/,"")):r.value,o={parser:n,__embeddedInHtml:!0};if(t.parser==="html"&&n==="babel"){let a="script",{attrMap:l}=r.parent;l&&(l.type==="module"||l.type==="text/babel"&&l["data-type"]==="module")&&(a="module"),o.__babelSourceType=a}return[Hg,jc(r,t),await i(s,o),Bc(r,t)]}}else if(r.parent.type==="interpolation")return async n=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser==="angular"?(i.parser="__ng_interpolation",i.trailingComma="none"):t.parser==="vue"?i.parser=X_(e,t)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[hl([fi,await n(r.value,i)]),r.parent.next&&zc(r.parent.next)?" ":fi]};break;case"attribute":return Tbe(e,t);case"front-matter":return n=>d0e(r,n);case"angularControlFlowBlockParameters":return Nbe.has(e.parent.name)?p0e:void 0}}var Lbe=Mbe,Sp=null;function bm(e){if(Sp!==null&&typeof Sp.property){let t=Sp;return Sp=bm.prototype=null,t}return Sp=bm.prototype=e??Object.create(null),new bm}var Obe=10;for(let e=0;e<=Obe;e++)bm();function Rbe(e){return bm(e)}function Bbe(e,t="type"){Rbe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var zbe=Bbe,jbe={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Hbe=jbe,Ube=zbe(Hbe),Wbe=Ube;function Vbe(e){return/^\s*/.test(e)}function Gbe(e){return` - -`+e}var qbe=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function rH(e){let t=H1(e);return e.type==="element"&&!e.endSourceSpan&&Y_(e.children)?Math.max(t,rH(Ug(!1,e.children,-1))):t}function Dp(e,t,r){let n=e.node;if(B1(n)){let i=rH(n);return[jc(n,t),$o(ha.trimEnd(t.originalText.slice(j1(n)+(n.prev&&U1(n.prev)?Q_(n).length:0),i-(n.next&&zc(n.next)?Vg(n,t).length:0)))),Bc(n,t)]}return r()}function Qy(e,t){return Js(e)&&Js(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?gD(t)?nn:fi:"":gD(t)?nn:Ti:U1(e)&&(B1(t)||t.firstChild||t.isSelfClosing||t.type==="element"&&t.attrs.length>0)||e.type==="element"&&e.isSelfClosing&&zc(t)?"":!t.isLeadingSpaceSensitive||gD(t)||zc(t)&&e.lastChild&&ag(e.lastChild)&&e.lastChild.lastChild&&ag(e.lastChild.lastChild)?nn:t.hasLeadingSpaces?fi:Ti}function t$(e,t,r){let{node:n}=e;if(R7(n))return[Hg,...e.map(s=>{let o=s.node,a=o.prev?Qy(o.prev,o):"";return[a?[a,Zy(o.prev)?nn:""]:"",Dp(s,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map((s,o)=>{let a=s.node;if(Js(a)){if(a.prev&&Js(a.prev)){let p=Qy(a.prev,a);if(p)return Zy(a.prev)?[nn,nn,Dp(s,t,r)]:[p,Dp(s,t,r)]}return Dp(s,t,r)}let l=[],c=[],u=[],h=[],d=a.prev?Qy(a.prev,a):"",f=a.next?Qy(a,a.next):"";return d&&(Zy(a.prev)?l.push(nn,nn):d===nn?l.push(nn):Js(a.prev)?c.push(d):c.push(H0("",Ti,{groupId:i[o-1]}))),f&&(Zy(a)?Js(a.next)&&h.push(nn,nn):f===nn?Js(a.next)&&h.push(nn):u.push(f)),[...l,ki([...c,ki([Dp(s,t,r),...u],{id:i[o]})]),...h]},"children")}function Kbe(e,t,r){let{node:n}=e,i=[];Jbe(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",ki(r("parameters")),")"),i.push(" {");let s=nH(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(hl([nn,t$(e,t,r)])),s&&i.push(nn,"}")):s&&i.push("}"),ki(i,{shouldBreak:!0})}function nH(e){var t,r;return!(((t=e.next)==null?void 0:t.type)==="angularControlFlowBlock"&&(r=qbe.get(e.name))!=null&&r.has(e.next.name))}function Jbe(e){let{previous:t}=e;return(t==null?void 0:t.type)==="angularControlFlowBlock"&&!B1(t)&&!nH(t)}function Xbe(e,t,r){return[hl([Ti,_f([";",fi],e.map(r,"children"))]),Ti]}function Ybe(e,t,r){let{node:n}=e;return[vm(n,t),ki([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",hl([fi,_f(fi,e.map(r,"cases"))])]:"",Ti]),ym(n,t)]}function Zbe(e,t,r){let{node:n}=e;return[n.value," {",ki([hl([Ti,e.map(({node:i})=>i.type==="text"&&!ha.trim(i.value)?"":r(),"expression")]),Ti]),"}"]}function Qbe(e,t,r){let{node:n}=e;if(L7(n,t))return[jc(n,t),ki(hT(e,t,r)),$o(tH(n,t)),...cT(n,t),Bc(n,t)];let i=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),o=u=>ki([ki(hT(e,t,r),{id:s}),u,cT(n,t)]),a=u=>i?Vve(u,{groupId:s}):(Za(n)||z1(n,t))&&n.parent.type==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:hl(u),l=()=>i?H0(Ti,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?fi:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Uve(Ti):Ti,c=()=>(n.next?zc(n.next):Gg(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?H0(Ti,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?fi:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`).test(n.lastChild.value)?"":Ti;return n.children.length===0?o(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?fi:""):o([F0e(n)?Hg:"",a([l(),t$(e,t,r)]),c()])}function r$(e){return e>=9&&e<=32||e==160}function iH(e){return 48<=e&&e<=57}function n$(e){return e>=97&&e<=122||e>=65&&e<=90}function e1e(e){return e>=97&&e<=102||e>=65&&e<=70||iH(e)}function sH(e){return e===10||e===13}function BM(e){return 48<=e&&e<=55}function zM(e){return e===39||e===34||e===96}var t1e=/-+([a-z0-9])/g;function r1e(e){return e.replace(t1e,(...t)=>t[1].toUpperCase())}var dT=class oH{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let a=r.substring(0,i-1).lastIndexOf(` -`);o=a>0?i-a:i}else o--;for(;i0;){let a=r.charCodeAt(i);i++,t--,a==10?(s++,o=0):o++}return new oH(this.file,i,s,o)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,o=0,a=0;for(;o0&&(i--,o++,!(n[i]==` -`&&++a==r)););for(o=0,a=0;o]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},n1e=[s1e,o1e,l1e,c1e,h1e,p1e,d1e,f1e,m1e,u1e];function i1e(e,t){for(let r of n1e)r(e,t);return e}function s1e(e){e.walk(t=>{if(t.type==="element"&&t.tagDefinition.ignoreFirstLf&&t.children.length>0&&t.children[0].type==="text"&&t.children[0].value[0]===` -`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function o1e(e){let t=r=>{var n,i;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((i=r.firstChild)==null?void 0:i.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};e.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let i=0;it.type==="cdata",t=>``)}function u1e(e){let t=r=>{var n,i;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!ha.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((i=r.next)==null?void 0:i.type)==="text"};e.walk(r=>{if(r.children)for(let n=0;n`+i.firstChild.value+``+o.value,s.sourceSpan=new dr(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(o)}})}function c1e(e,t){if(t.parser==="html")return;let r=/{{(.+?)}}/s;e.walk(n=>{if(T0e(n))for(let i of n.children){if(i.type!=="text")continue;let s=i.sourceSpan.start,o=null,a=i.value.split(r);for(let l=0;l0&&n.insertChildBefore(i,{type:"text",value:c,sourceSpan:new dr(s,o)});continue}o=s.moveBy(c.length+4),n.insertChildBefore(i,{type:"interpolation",sourceSpan:new dr(s,o),children:c.length===0?[]:[{type:"text",value:c,sourceSpan:new dr(s.moveBy(2),o.moveBy(-2))}]})}n.removeChild(i)}})}function h1e(e){e.walk(t=>{if(!t.children)return;if(t.children.length===0||t.children.length===1&&t.children[0].type==="text"&&ha.trim(t.children[0].value).length===0){t.hasDanglingSpaces=t.children.length>0,t.children=[];return}let r=A0e(t),n=O7(t);if(!r)for(let i=0;i{t.isSelfClosing=!t.children||t.type==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function f1e(e,t){e.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function p1e(e,t){e.walk(r=>{r.cssDisplay=U0e(r,t)})}function m1e(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=$0e(r);return}for(let i of n)i.isLeadingSpaceSensitive=k0e(i,t),i.isTrailingSpaceSensitive=_0e(i,t);for(let i=0;i of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},HM="HTML",w1e={bracketSameLine:jM.bracketSameLine,htmlWhitespaceSensitivity:{category:HM,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:jM.singleAttributePerLine,vueIndentScriptAndStyle:{category:HM,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},S1e=w1e,uH={};A7(uH,{angular:()=>Exe,html:()=>Dxe,lwc:()=>Txe,vue:()=>Cxe});var UM;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(UM||(UM={}));var WM;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(WM||(WM={}));var VM={name:"custom-elements"},GM={name:"no-errors-schema"},uc;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(uc||(uc={}));var qM;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(qM||(qM={}));var ko;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(ko||(ko={}));function V1(e){if(e[0]!=":")return[null,e];let t=e.indexOf(":",1);if(t===-1)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function KM(e){return V1(e)[1]==="ng-container"}function JM(e){return V1(e)[1]==="ng-content"}function Bv(e){return e===null?null:V1(e)[0]}function W0(e,t){return e?`:${e}:${t}`:t}var zv;function XM(){return zv||(zv={},ev(uc.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ev(uc.STYLE,["*|style"]),ev(uc.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),ev(uc.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),zv}function ev(e,t){for(let r of t)zv[r.toLowerCase()]=e}var D1e=class{},E1e="boolean",C1e="number",T1e="string",A1e="object",k1e=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],cH=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),_1e=Array.from(cH).reduce((e,[t,r])=>(e.set(t,r),e),new Map),$1e=class extends D1e{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,k1e.forEach(e=>{let t=new Map,r=new Set,[n,i]=e.split("|"),s=i.split(","),[o,a]=n.split("^");o.split(",").forEach(c=>{this._schema.set(c.toLowerCase(),t),this._eventSchema.set(c.toLowerCase(),r)});let l=a&&this._schema.get(a.toLowerCase());if(l){for(let[c,u]of l)t.set(c,u);for(let c of this._eventSchema.get(a.toLowerCase()))r.add(c)}s.forEach(c=>{if(c.length>0)switch(c[0]){case"*":r.add(c.substring(1));break;case"!":t.set(c.substring(1),E1e);break;case"#":t.set(c.substring(1),C1e);break;case"%":t.set(c.substring(1),A1e);break;default:t.set(c,T1e)}})})}hasProperty(e,t,r){if(r.some(n=>n.name===GM.name))return!0;if(e.indexOf("-")>-1){if(KM(e)||JM(e))return!1;if(r.some(n=>n.name===VM.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(t)}hasElement(e,t){return t.some(r=>r.name===GM.name)||e.indexOf("-")>-1&&(KM(e)||JM(e)||t.some(r=>r.name===VM.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,t,r){r&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let n=XM()[e+"|"+t];return n||(n=XM()["*|"+t],n||uc.NONE)}getMappedPropName(e){return cH.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... -If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>_1e.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return r1e(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(F1e(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let o=r.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function F1e(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var zt=class{constructor({closedByChildren:t,implicitNamespacePrefix:r,contentType:n=ko.PARSABLE_DATA,closedByParent:i=!1,isVoid:s=!1,ignoreFirstLf:o=!1,preventNamespaceInheritance:a=!1,canSelfClose:l=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(c=>this.closedByChildren[c]=!0),this.isVoid=s,this.closedByParent=i||s,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=o,this.preventNamespaceInheritance=a,this.canSelfClose=l??s}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},YM,Ep;function fT(e){return Ep||(YM=new zt({canSelfClose:!0}),Ep=Object.assign(Object.create(null),{base:new zt({isVoid:!0}),meta:new zt({isVoid:!0}),area:new zt({isVoid:!0}),embed:new zt({isVoid:!0}),link:new zt({isVoid:!0}),img:new zt({isVoid:!0}),input:new zt({isVoid:!0}),param:new zt({isVoid:!0}),hr:new zt({isVoid:!0}),br:new zt({isVoid:!0}),source:new zt({isVoid:!0}),track:new zt({isVoid:!0}),wbr:new zt({isVoid:!0}),p:new zt({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new zt({closedByChildren:["tbody","tfoot"]}),tbody:new zt({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new zt({closedByChildren:["tbody"],closedByParent:!0}),tr:new zt({closedByChildren:["tr"],closedByParent:!0}),td:new zt({closedByChildren:["td","th"],closedByParent:!0}),th:new zt({closedByChildren:["td","th"],closedByParent:!0}),col:new zt({isVoid:!0}),svg:new zt({implicitNamespacePrefix:"svg"}),foreignObject:new zt({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new zt({implicitNamespacePrefix:"math"}),li:new zt({closedByChildren:["li"],closedByParent:!0}),dt:new zt({closedByChildren:["dt","dd"]}),dd:new zt({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new zt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new zt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new zt({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new zt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new zt({closedByChildren:["optgroup"],closedByParent:!0}),option:new zt({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new zt({ignoreFirstLf:!0}),listing:new zt({ignoreFirstLf:!0}),style:new zt({contentType:ko.RAW_TEXT}),script:new zt({contentType:ko.RAW_TEXT}),title:new zt({contentType:{default:ko.ESCAPABLE_RAW_TEXT,svg:ko.PARSABLE_DATA}}),textarea:new zt({contentType:ko.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $1e().allKnownElementNames().forEach(t=>{!Ep[t]&&Bv(t)===null&&(Ep[t]=new zt({canSelfClose:!1}))})),Ep[e]??YM}var qg=class{constructor(t,r){this.sourceSpan=t,this.i18n=r}},P1e=class extends qg{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="text"}visit(e,t){return e.visitText(this,t)}},I1e=class extends qg{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}},N1e=class extends qg{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}},M1e=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.type="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},L1e=class extends qg{constructor(e,t,r,n,i,s,o){super(r,o),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},_l=class extends qg{constructor(t,r,n,i,s,o=null,a=null,l){super(i,l),this.name=t,this.attrs=r,this.children=n,this.startSourceSpan=s,this.endSourceSpan=o,this.nameSpan=a,this.type="element"}visit(t,r){return t.visitElement(this,r)}},O1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}},R1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}},zh=class{constructor(t,r,n,i,s,o=null){this.name=t,this.parameters=r,this.children=n,this.sourceSpan=i,this.startSourceSpan=s,this.endSourceSpan=o,this.type="block"}visit(t,r){return t.visitBlock(this,r)}},ZM=class{constructor(e,t){this.expression=e,this.sourceSpan=t,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitBlockParameter(this,t)}};function hH(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let o=i(s);o&&n.push(o)}),n}var B1e=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(hH(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}},V0={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",af:"⁡",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"⁣",ic:"⁣",InvisibleTimes:"⁢",it:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",ZeroWidthSpace:"​",NewLine:` -`,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},z1e="";V0.ngsp=z1e;var j1e=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function H1e(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let r=t[0],n=t[1];j1e.forEach(i=>{if(i.test(r)||i.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var U1e=class dH{static fromArray(t){return t?(H1e("interpolation",t),new dH(t[0],t[1])):fH}constructor(t,r){this.start=t,this.end=r}},fH=new U1e("{{","}}"),vD=class extends lH{constructor(e,t,r){super(r,e),this.tokenType=t}},W1e=class{constructor(e,t,r){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=r}};function V1e(e,t,r,n={}){let i=new K1e(new aH(e,t),r,n);return i.tokenize(),new W1e(exe(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var G1e=/\r\n?/g;function jh(e){return`Unexpected character "${e===0?"EOF":String.fromCharCode(e)}"`}function QM(e){return`Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`}function q1e(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}var G0;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(G0||(G0={}));var bD=class{constructor(e){this.error=e}},K1e=class{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||fH,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;let n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new txe(e,n):new pH(e,n),this._preserveLineEndings=r.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=r.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=r.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(G1e,` -`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>r$(r)?!e:rL(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._beginToken(25,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(oi),this._attemptCharCode(41))this._attemptCharCodeUntilFn(oi);else{t.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):t.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(nL);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&zM(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(nL)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Z1e(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new vD("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(this._currentTokenType===null)throw new vD("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new vD(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new bD(r)}handleError(e){if(e instanceof i$&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof bD)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Q1e(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(jh(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){let t=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==58&&!J1e(this._cursor.peek());)this._cursor.advance();let r;this._cursor.peek()===58?(t=this._cursor.getChars(e),this._cursor.advance(),r=this._cursor.clone()):r=e,this._requireCharCodeUntilFn(eL,t===""?0:1);let n=this._cursor.getChars(r);return[t,n]}_consumeTagOpen(e){let t,r,n,i=[];try{if(!n$(this._cursor.peek()))throw this._createError(jh(this._cursor.peek()),this._cursor.getSpan(e));for(n=this._consumeTagOpenStart(e),r=n.parts[0],t=n.parts[1],this._attemptCharCodeUntilFn(oi);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,a]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(oi),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(oi);let l=this._consumeAttributeValue();i.push({prefix:o,name:a,value:l})}else i.push({prefix:o,name:a});this._attemptCharCodeUntilFn(oi)}this._consumeTagOpenEnd()}catch(o){if(o instanceof bD){n?n.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let s=this._getTagContentType(t,r,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(r,t),s===ko.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):s===ko.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(oi),!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t))?!1:(this._attemptCharCodeUntilFn(oi),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(n=>n===62,3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(0,e);let t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(jh(e),this._cursor.getSpan());this._beginToken(14);let t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let t=this._cursor.peek();this._consumeQuote(t);let r=()=>this._cursor.peek()===t;e=this._consumeWithInterpolation(16,17,r,r),this._consumeQuote(t)}else{let t=()=>eL(this._cursor.peek());e=this._consumeWithInterpolation(16,17,t,t)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(oi),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(oi),this._requireCharCode(62),this._endToken([]);else{let[t,r]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(oi),this._requireCharCode(62),this._endToken([t,r]),this._handleFullNameStackForTagClose(t,r)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{let n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(oi),this._beginToken(7);let r=this._readUntil(44);this._endToken([r]),this._requireCharCode(44),this._attemptCharCodeUntilFn(oi)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(oi),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(oi),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(oi),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,t,r,n){this._beginToken(e);let i=[];for(;!r();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(t,o,n),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let s=this._processCarriageReturns(i.join(""));return this._endToken([s]),s}_consumeInterpolation(e,t,r){let n=[];this._beginToken(e,t),n.push(this._interpolationConfig.start);let i=this._cursor.clone(),s=null,o=!1;for(;this._cursor.peek()!==0&&(r===null||!r());){let a=this._cursor.clone();if(this._isTagStart()){this._cursor=a,n.push(this._getProcessedChars(i,a)),this._endToken(n);return}if(s===null)if(this._attemptStr(this._interpolationConfig.end)){n.push(this._getProcessedChars(i,a)),n.push(this._interpolationConfig.end),this._endToken(n);return}else this._attemptStr("//")&&(o=!0);let l=this._cursor.peek();this._cursor.advance(),l===92?this._cursor.advance():l===s?s=null:!o&&s===null&&zM(l)&&(s=l)}n.push(this._getProcessedChars(i,this._cursor)),this._endToken(n)}_getProcessedChars(e,t){return this._processCarriageReturns(t.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let t=e.peek();if(97<=t&&t<=122||65<=t&&t<=90||t===47||t===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),rL(e.peek()))return!0}return!1}_readUntil(e){let t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){let r=W0(e,t);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===r)&&this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){let r=W0(e,t);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}};function oi(e){return!r$(e)||e===0}function eL(e){return r$(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function J1e(e){return(e<97||12257)}function X1e(e){return e===59||e===0||!e1e(e)}function Y1e(e){return e===59||e===0||!n$(e)}function Z1e(e){return e!==125}function Q1e(e,t){return tL(e)===tL(t)}function tL(e){return e>=97&&e<=122?e-97+65:e}function rL(e){return n$(e)||iH(e)||e===95}function nL(e){return e!==59&&oi(e)}function exe(e){let t=[],r;for(let n=0;n0&&r.indexOf(t.peek())!==-1;)n===t&&(t=t.clone()),t.advance();let i=this.locationFromCursor(t),s=this.locationFromCursor(this),o=n!==t?this.locationFromCursor(n):i;return new dr(i,s,o)}getChars(t){return this.input.substring(t.state.offset,this.state.offset)}charAt(t){return this.input.charCodeAt(t)}advanceState(t){if(t.offset>=this.end)throw this.state=t,new i$('Unexpected character "EOF"',this);let r=this.charAt(t.offset);r===10?(t.line++,t.column=0):sH(r)||t.column++,t.offset++,this.updatePeek(t)}updatePeek(t){t.peek=t.offset>=this.end?0:this.charAt(t.offset)}locationFromCursor(t){return new dT(t.file,t.state.offset,t.state.line,t.state.column)}},txe=class mT extends pH{constructor(t,r){t instanceof mT?(super(t),this.internalState={...t.internalState}):(super(t,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new mT(this)}getChars(t){let r=t.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(t()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),t()===110)this.state.peek=10;else if(t()===114)this.state.peek=13;else if(t()===118)this.state.peek=11;else if(t()===116)this.state.peek=9;else if(t()===98)this.state.peek=8;else if(t()===102)this.state.peek=12;else if(t()===117)if(this.advanceState(this.internalState),t()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;t()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(t()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(BM(t())){let r="",n=0,i=this.clone();for(;BM(t())&&n<3;)i=this.clone(),r+=String.fromCodePoint(t()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=i.internalState}else sH(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(t,r){let n=this.input.slice(t.internalState.offset,t.internalState.offset+r),i=parseInt(n,16);if(isNaN(i))throw t.state=t.internalState,new i$("Invalid hexadecimal escape sequence",t);return i}},i$=class{constructor(e,t){this.msg=e,this.cursor=t}},js=class mH extends lH{static create(t,r,n){return new mH(t,r,n)}constructor(t,r,n){super(r,n),this.elementName=t}},rxe=class{constructor(e,t){this.rootNodes=e,this.errors=t}},nxe=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){let s=f=>(p,...g)=>f(p.toLowerCase(),...g),o=n?this.getTagDefinition:s(this.getTagDefinition),a=f=>o(f).getContentType(),l=n?i:s(i),c=V1e(e,t,i?(f,p,g,y)=>{let b=l(f,p,g,y);return b!==void 0?b:a(f)}:a,r),u=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,d=new ixe(c.tokens,o,u,h,n);return d.build(),new rxe(d.rootNodes,c.errors.concat(d.errors))}},ixe=class gH{constructor(t,r,n,i,s){this.tokens=t,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=s,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let t of this._containerStack)t instanceof zh&&this.errors.push(js.create(t.name,t.sourceSpan,`Unclosed block "${t.name}"`))}_advance(){let t=this._peek;return this._index0)return this.errors=this.errors.concat(s.errors),null;let o=new dr(t.sourceSpan.start,i.sourceSpan.end,t.sourceSpan.fullStart),a=new dr(r.sourceSpan.start,i.sourceSpan.end,r.sourceSpan.fullStart);return new M1e(t.parts[0],s.rootNodes,o,t.sourceSpan,a)}_collectExpansionExpTokens(t){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(iL(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(js.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(iL(n,20))n.pop();else return this.errors.push(js.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push(js.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(t){let r=t.parts[0];if(r.length>0&&r[0]==` +`)}function G7(e){return Ps(!1,Ps(!1,e,"'","'"),""",'"')}function Nu(e){return G7(e.value)}var V0e=new Set(["template","style","script"]);function j1(e,t){return Ff(e,t)&&!V0e.has(e.fullName)}function Ff(e,t){return t.parser==="vue"&&e.type==="element"&&e.parent.type==="root"&&e.fullName.toLowerCase()!=="html"}function K_(e,t){return Ff(e,t)&&(j1(e,t)||e.attrMap.lang&&e.attrMap.lang!=="html")}function G0e(e){let t=e.fullName;return t.charAt(0)==="#"||t==="slot-scope"||t==="v-slot"||t.startsWith("v-slot:")}function q0e(e,t){let r=e.parent;if(!Ff(r,t))return!1;let n=r.fullName,i=e.fullName;return n==="script"&&i==="setup"||n==="style"&&i==="vars"}function q7(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?$o(t):$o(V7(M7(t)),nn):_f(fi,ha.split(t))}function K7(e,t){return Ff(e,t)&&e.name==="script"}var J7=/{{(.+?)}}/s;async function K0e(e,t){let r=[];for(let[n,i]of e.split(J7).entries())if(n%2===0)r.push($o(i));else try{r.push(ki(["{{",dl([fi,await da(i,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),fi,"}}"]))}catch{r.push("{{",$o(i),"}}")}return r}function J_({parser:e}){return(t,r,n)=>da(Nu(n.node),t,{parser:e,trailingComma:"none"},$f)}var J0e=J_({parser:"__ng_action"}),X0e=J_({parser:"__ng_binding"}),Y0e=J_({parser:"__ng_directive"});function Z0e(e,t){if(t.parser!=="angular")return;let{node:r}=e,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return J0e;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return X0e;if(n.startsWith("*"))return Y0e;let i=Nu(r);if(/^i18n(?:-.+)?$/.test(n))return()=>O1(I7(q7(r,i.trim())),!i.includes("@@"));if(J7.test(i))return s=>K0e(i,s)}var Q0e=Z0e;function ebe(e,t){let{node:r}=e,n=Nu(r);if(r.fullName==="class"&&!t.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var tbe=ebe;function OM(e){return e===" "||e===` +`||e==="\f"||e==="\r"||e===" "}var rbe=/^[ \t\n\r\u000c]+/,nbe=/^[, \t\n\r\u000c]+/,ibe=/^[^ \t\n\r\u000c]+/,sbe=/[,]+$/,RM=/^\d+$/,obe=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function abe(e){let t=e.length,r,n,i,s,o,l=0,a;function c(f){let p,g=f.exec(e.substring(l));if(g)return[p]=g,l+=p.length,p}let u=[];for(;;){if(c(nbe),l>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}a=l,r=c(ibe),n=[],r.slice(-1)===","?(r=r.replace(sbe,""),d()):h()}function h(){for(c(rbe),i="",s="in descriptor";;){if(o=e.charAt(l),s==="in descriptor")if(OM(o))i&&(n.push(i),i="",s="after descriptor");else if(o===","){l+=1,i&&n.push(i),d();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&n.push(i),d();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){n.push(i),d();return}else i+=o;else if(s==="after descriptor"&&!OM(o))if(o===""){d();return}else s="in descriptor",l-=1;l+=1}}function d(){let f=!1,p,g,y,b,v={},E,D,C,w,T;for(b=0;bhbe(Nu(e.node))}var X7={width:"w",height:"h",density:"x"},cbe=Object.keys(X7);function hbe(e){let t=lbe(e),r=cbe.filter(u=>t.some(h=>Object.prototype.hasOwnProperty.call(h,u)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,i=X7[n],s=t.map(u=>u.source.value),o=Math.max(...s.map(u=>u.length)),l=t.map(u=>u[n]?String(u[n].value):""),a=l.map(u=>{let h=u.indexOf(".");return h===-1?u.length:h}),c=Math.max(...a);return O1(_f([",",fi],s.map((u,h)=>{let d=[u],f=l[h];if(f){let p=o-u.length+1,g=c-a[h],y=" ".repeat(p+g);d.push(H0(y," "),f+i)}return d})))}var dbe=ube;function fbe(e,t){let{node:r}=e,n=Nu(e.node).trim();if(r.fullName==="style"&&!t.parentParser&&!n.includes("{{"))return async i=>O1(await i(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var yD=new WeakMap;function pbe(e,t){let{root:r}=e;return yD.has(r)||yD.set(r,r.children.some(n=>K7(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),yD.get(r)}var X_=pbe;function mbe(e,t,r){let{node:n}=r,i=Nu(n);return da(`type T<${i}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},$f)}function gbe(e,t,{parseWithTs:r}){return da(`function _(${e}) {}`,t,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function ybe(e){let t=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=e.trim();return t.test(n)||r.test(n)}async function vbe(e,t,r,n){let i=Nu(r.node),{left:s,operator:o,right:l}=bbe(i),a=X_(r,n);return[ki(await da(`function _(${s}) {}`,e,{parser:a?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await da(l,e,{parser:a?"__ts_expression":"__js_expression"})]}function bbe(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,i=e.match(t);if(!i)return;let s={};if(s.for=i[3].trim(),!s.for)return;let o=Ps(!1,i[1].trim(),n,""),l=o.match(r);l?(s.alias=o.replace(r,""),s.iterator1=l[1].trim(),l[2]&&(s.iterator2=l[2].trim())):s.alias=o;let a=[s.alias,s.iterator1,s.iterator2];if(!a.some((c,u)=>!c&&(u===0||a.slice(u+1).some(Boolean))))return{left:a.filter(Boolean).join(","),operator:i[2],right:s.for}}function xbe(e,t){if(t.parser!=="vue")return;let{node:r}=e,n=r.fullName;if(n==="v-for")return vbe;if(n==="generic"&&K7(r.parent,t))return mbe;let i=Nu(r),s=X_(e,t);if(G0e(r)||q0e(r,t))return o=>gbe(i,o,{parseWithTs:s});if(n.startsWith("@")||n.startsWith("v-on:"))return o=>wbe(i,o,{parseWithTs:s});if(n.startsWith(":")||n.startsWith("v-bind:"))return o=>Sbe(i,o,{parseWithTs:s});if(n.startsWith("v-"))return o=>Y7(i,o,{parseWithTs:s})}function wbe(e,t,{parseWithTs:r}){return ybe(e)?Y7(e,t,{parseWithTs:r}):da(e,t,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},$f)}function Sbe(e,t,{parseWithTs:r}){return da(e,t,{parser:r?"__vue_ts_expression":"__vue_expression"},$f)}function Y7(e,t,{parseWithTs:r}){return da(e,t,{parser:r?"__ts_expression":"__js_expression"},$f)}var Dbe=xbe;function Ebe(e,t){let{node:r}=e;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(t.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||t.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[dbe,fbe,tbe,Dbe,Q0e]){let i=n(e,t);if(i)return Cbe(i)}}}function Cbe(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=G_(s,o=>typeof o=="string"?Ps(!1,o,'"',"""):o),[n.node.rawName,'="',ki(s),'"']}}var Tbe=Ebe,Z7=new Proxy(()=>{},{get:()=>Z7}),Q7=Z7;function Abe(e){return Array.isArray(e)&&e.length>0}var Y_=Abe;function z1(e){return e.sourceSpan.start.offset}function H1(e){return e.sourceSpan.end.offset}function cT(e,t){return[e.isSelfClosing?"":kbe(e,t),ym(e,t)]}function kbe(e,t){return e.lastChild&&ag(e.lastChild)?"":[_be(e,t),Z_(e,t)]}function ym(e,t){return(e.next?jc(e.next):Gg(e.parent))?"":[Vg(e,t),Bc(e,t)]}function _be(e,t){return Gg(e)?Vg(e.lastChild,t):""}function Bc(e,t){return ag(e)?Z_(e.parent,t):U1(e)?Q_(e.next):""}function Z_(e,t){if(Q7(!e.isSelfClosing),eH(e,t))return"";switch(e.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function eH(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(B1(e)||L7(e.parent,t))}function jc(e){return e.prev&&e.prev.type!=="docType"&&e.type!=="angularControlFlowBlock"&&!Js(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Gg(e){var t;return((t=e.lastChild)==null?void 0:t.isTrailingSpaceSensitive)&&!e.lastChild.hasTrailingSpaces&&!Js(q_(e.lastChild))&&!Zd(e)}function ag(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&Js(q_(e))}function U1(e){return e.next&&!Js(e.next)&&Js(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function $be(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return t?t[1]?t[1].split(/\s+/):!0:!1}function W1(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function Fbe(e,t,r){var n;let{node:i}=e;if(!Y_(i.attrs))return i.isSelfClosing?" ":"";let s=((n=i.prev)==null?void 0:n.type)==="comment"&&$be(i.prev.value),o=typeof s=="boolean"?()=>s:Array.isArray(s)?h=>s.includes(h.rawName):()=>!1,l=e.map(({node:h})=>o(h)?$o(t.originalText.slice(z1(h),H1(h))):r(),"attrs"),a=i.type==="element"&&i.fullName==="script"&&i.attrs.length===1&&i.attrs[0].fullName==="src"&&i.children.length===0,c=t.singleAttributePerLine&&i.attrs.length>1&&!Ff(i,t)?nn:fi,u=[dl([a?" ":fi,_f(c,l)])];return i.firstChild&&W1(i.firstChild)||i.isSelfClosing&&Gg(i.parent)||a?u.push(i.isSelfClosing?" ":""):u.push(t.bracketSameLine?i.isSelfClosing?" ":"":i.isSelfClosing?fi:Ti),u}function Pbe(e){return e.firstChild&&W1(e.firstChild)?"":e$(e)}function hT(e,t,r){let{node:n}=e;return[vm(n,t),Fbe(e,t,r),n.isSelfClosing?"":Pbe(n)]}function vm(e,t){return e.prev&&U1(e.prev)?"":[zc(e,t),Q_(e)]}function zc(e,t){return W1(e)?e$(e.parent):jc(e)?Vg(e.prev,t):""}function Q_(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${e.rawName}`;default:return`<${e.rawName}`}}function e$(e){switch(Q7(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">";default:return">"}}function Ibe(e,t){if(!e.endSourceSpan)return"";let r=e.startSourceSpan.end.offset;e.firstChild&&W1(e.firstChild)&&(r-=e$(e).length);let n=e.endSourceSpan.start.offset;return e.lastChild&&ag(e.lastChild)?n+=Z_(e,t).length:Gg(e)&&(n-=Vg(e.lastChild,t).length),t.originalText.slice(r,n)}var tH=Ibe,Nbe=new Set(["if","else if","for","switch","case"]);function Mbe(e,t){let{node:r}=e;switch(r.type){case"element":if(Qa(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&K_(r,t)){let n=LM(r,t);return n?async(i,s)=>{let o=tH(r,t),l=/^\s*$/.test(o),a="";return l||(a=await i(M7(o),{parser:n,__embeddedInHtml:!0}),l=a===""),[zc(r,t),ki(hT(e,t,s)),l?"":nn,a,l?"":nn,cT(r,t),Bc(r,t)]}:void 0}break;case"text":if(Qa(r.parent)){let n=LM(r.parent,t);if(n)return async i=>{let s=n==="markdown"?V7(r.value.replace(/^[^\S\n]*\n/,"")):r.value,o={parser:n,__embeddedInHtml:!0};if(t.parser==="html"&&n==="babel"){let l="script",{attrMap:a}=r.parent;a&&(a.type==="module"||a.type==="text/babel"&&a["data-type"]==="module")&&(l="module"),o.__babelSourceType=l}return[Hg,zc(r,t),await i(s,o),Bc(r,t)]}}else if(r.parent.type==="interpolation")return async n=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser==="angular"?(i.parser="__ng_interpolation",i.trailingComma="none"):t.parser==="vue"?i.parser=X_(e,t)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[dl([fi,await n(r.value,i)]),r.parent.next&&jc(r.parent.next)?" ":fi]};break;case"attribute":return Tbe(e,t);case"front-matter":return n=>d0e(r,n);case"angularControlFlowBlockParameters":return Nbe.has(e.parent.name)?p0e:void 0}}var Lbe=Mbe,Sp=null;function bm(e){if(Sp!==null&&typeof Sp.property){let t=Sp;return Sp=bm.prototype=null,t}return Sp=bm.prototype=e??Object.create(null),new bm}var Obe=10;for(let e=0;e<=Obe;e++)bm();function Rbe(e){return bm(e)}function Bbe(e,t="type"){Rbe(e);function r(n){let i=n[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:n});return s}return r}var jbe=Bbe,zbe={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Hbe=zbe,Ube=jbe(Hbe),Wbe=Ube;function Vbe(e){return/^\s*/.test(e)}function Gbe(e){return` + +`+e}var qbe=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function rH(e){let t=H1(e);return e.type==="element"&&!e.endSourceSpan&&Y_(e.children)?Math.max(t,rH(Ug(!1,e.children,-1))):t}function Dp(e,t,r){let n=e.node;if(B1(n)){let i=rH(n);return[zc(n,t),$o(ha.trimEnd(t.originalText.slice(z1(n)+(n.prev&&U1(n.prev)?Q_(n).length:0),i-(n.next&&jc(n.next)?Vg(n,t).length:0)))),Bc(n,t)]}return r()}function Qy(e,t){return Js(e)&&Js(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?gD(t)?nn:fi:"":gD(t)?nn:Ti:U1(e)&&(B1(t)||t.firstChild||t.isSelfClosing||t.type==="element"&&t.attrs.length>0)||e.type==="element"&&e.isSelfClosing&&jc(t)?"":!t.isLeadingSpaceSensitive||gD(t)||jc(t)&&e.lastChild&&ag(e.lastChild)&&e.lastChild.lastChild&&ag(e.lastChild.lastChild)?nn:t.hasLeadingSpaces?fi:Ti}function t$(e,t,r){let{node:n}=e;if(R7(n))return[Hg,...e.map(s=>{let o=s.node,l=o.prev?Qy(o.prev,o):"";return[l?[l,Zy(o.prev)?nn:""]:"",Dp(s,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map((s,o)=>{let l=s.node;if(Js(l)){if(l.prev&&Js(l.prev)){let p=Qy(l.prev,l);if(p)return Zy(l.prev)?[nn,nn,Dp(s,t,r)]:[p,Dp(s,t,r)]}return Dp(s,t,r)}let a=[],c=[],u=[],h=[],d=l.prev?Qy(l.prev,l):"",f=l.next?Qy(l,l.next):"";return d&&(Zy(l.prev)?a.push(nn,nn):d===nn?a.push(nn):Js(l.prev)?c.push(d):c.push(H0("",Ti,{groupId:i[o-1]}))),f&&(Zy(l)?Js(l.next)&&h.push(nn,nn):f===nn?Js(l.next)&&h.push(nn):u.push(f)),[...a,ki([...c,ki([Dp(s,t,r),...u],{id:i[o]})]),...h]},"children")}function Kbe(e,t,r){let{node:n}=e,i=[];Jbe(e)&&i.push("} "),i.push("@",n.name),n.parameters&&i.push(" (",ki(r("parameters")),")"),i.push(" {");let s=nH(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(dl([nn,t$(e,t,r)])),s&&i.push(nn,"}")):s&&i.push("}"),ki(i,{shouldBreak:!0})}function nH(e){var t,r;return!(((t=e.next)==null?void 0:t.type)==="angularControlFlowBlock"&&(r=qbe.get(e.name))!=null&&r.has(e.next.name))}function Jbe(e){let{previous:t}=e;return(t==null?void 0:t.type)==="angularControlFlowBlock"&&!B1(t)&&!nH(t)}function Xbe(e,t,r){return[dl([Ti,_f([";",fi],e.map(r,"children"))]),Ti]}function Ybe(e,t,r){let{node:n}=e;return[vm(n,t),ki([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",dl([fi,_f(fi,e.map(r,"cases"))])]:"",Ti]),ym(n,t)]}function Zbe(e,t,r){let{node:n}=e;return[n.value," {",ki([dl([Ti,e.map(({node:i})=>i.type==="text"&&!ha.trim(i.value)?"":r(),"expression")]),Ti]),"}"]}function Qbe(e,t,r){let{node:n}=e;if(L7(n,t))return[zc(n,t),ki(hT(e,t,r)),$o(tH(n,t)),...cT(n,t),Bc(n,t)];let i=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),o=u=>ki([ki(hT(e,t,r),{id:s}),u,cT(n,t)]),l=u=>i?Vve(u,{groupId:s}):(Qa(n)||j1(n,t))&&n.parent.type==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:dl(u),a=()=>i?H0(Ti,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?fi:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Uve(Ti):Ti,c=()=>(n.next?jc(n.next):Gg(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":i?H0(Ti,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?fi:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`).test(n.lastChild.value)?"":Ti;return n.children.length===0?o(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?fi:""):o([F0e(n)?Hg:"",l([a(),t$(e,t,r)]),c()])}function r$(e){return e>=9&&e<=32||e==160}function iH(e){return 48<=e&&e<=57}function n$(e){return e>=97&&e<=122||e>=65&&e<=90}function e1e(e){return e>=97&&e<=102||e>=65&&e<=70||iH(e)}function sH(e){return e===10||e===13}function BM(e){return 48<=e&&e<=55}function jM(e){return e===39||e===34||e===96}var t1e=/-+([a-z0-9])/g;function r1e(e){return e.replace(t1e,(...t)=>t[1].toUpperCase())}var dT=class oH{constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let l=r.substring(0,i-1).lastIndexOf(` +`);o=l>0?i-l:i}else o--;for(;i0;){let l=r.charCodeAt(i);i++,t--,l==10?(s++,o=0):o++}return new oH(this.file,i,s,o)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,o=0,l=0;for(;o0&&(i--,o++,!(n[i]==` +`&&++l==r)););for(o=0,l=0;o]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},n1e=[s1e,o1e,l1e,c1e,h1e,p1e,d1e,f1e,m1e,u1e];function i1e(e,t){for(let r of n1e)r(e,t);return e}function s1e(e){e.walk(t=>{if(t.type==="element"&&t.tagDefinition.ignoreFirstLf&&t.children.length>0&&t.children[0].type==="text"&&t.children[0].value[0]===` +`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function o1e(e){let t=r=>{var n,i;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((i=r.firstChild)==null?void 0:i.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};e.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let i=0;it.type==="cdata",t=>``)}function u1e(e){let t=r=>{var n,i;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!ha.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((i=r.next)==null?void 0:i.type)==="text"};e.walk(r=>{if(r.children)for(let n=0;n`+i.firstChild.value+``+o.value,s.sourceSpan=new dr(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(o)}})}function c1e(e,t){if(t.parser==="html")return;let r=/{{(.+?)}}/s;e.walk(n=>{if(T0e(n))for(let i of n.children){if(i.type!=="text")continue;let s=i.sourceSpan.start,o=null,l=i.value.split(r);for(let a=0;a0&&n.insertChildBefore(i,{type:"text",value:c,sourceSpan:new dr(s,o)});continue}o=s.moveBy(c.length+4),n.insertChildBefore(i,{type:"interpolation",sourceSpan:new dr(s,o),children:c.length===0?[]:[{type:"text",value:c,sourceSpan:new dr(s.moveBy(2),o.moveBy(-2))}]})}n.removeChild(i)}})}function h1e(e){e.walk(t=>{if(!t.children)return;if(t.children.length===0||t.children.length===1&&t.children[0].type==="text"&&ha.trim(t.children[0].value).length===0){t.hasDanglingSpaces=t.children.length>0,t.children=[];return}let r=A0e(t),n=O7(t);if(!r)for(let i=0;i{t.isSelfClosing=!t.children||t.type==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function f1e(e,t){e.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function p1e(e,t){e.walk(r=>{r.cssDisplay=U0e(r,t)})}function m1e(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=$0e(r);return}for(let i of n)i.isLeadingSpaceSensitive=k0e(i,t),i.isTrailingSpaceSensitive=_0e(i,t);for(let i=0;i of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},HM="HTML",w1e={bracketSameLine:zM.bracketSameLine,htmlWhitespaceSensitivity:{category:HM,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:zM.singleAttributePerLine,vueIndentScriptAndStyle:{category:HM,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},S1e=w1e,uH={};A7(uH,{angular:()=>Exe,html:()=>Dxe,lwc:()=>Txe,vue:()=>Cxe});var UM;(function(e){e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom"})(UM||(UM={}));var WM;(function(e){e[e.OnPush=0]="OnPush",e[e.Default=1]="Default"})(WM||(WM={}));var VM={name:"custom-elements"},GM={name:"no-errors-schema"},uc;(function(e){e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL"})(uc||(uc={}));var qM;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore"})(qM||(qM={}));var ko;(function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"})(ko||(ko={}));function V1(e){if(e[0]!=":")return[null,e];let t=e.indexOf(":",1);if(t===-1)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[e.slice(1,t),e.slice(t+1)]}function KM(e){return V1(e)[1]==="ng-container"}function JM(e){return V1(e)[1]==="ng-content"}function Bv(e){return e===null?null:V1(e)[0]}function W0(e,t){return e?`:${e}:${t}`:t}var jv;function XM(){return jv||(jv={},ev(uc.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ev(uc.STYLE,["*|style"]),ev(uc.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),ev(uc.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),jv}function ev(e,t){for(let r of t)jv[r.toLowerCase()]=e}var D1e=class{},E1e="boolean",C1e="number",T1e="string",A1e="object",k1e=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],cH=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),_1e=Array.from(cH).reduce((e,[t,r])=>(e.set(t,r),e),new Map),$1e=class extends D1e{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,k1e.forEach(e=>{let t=new Map,r=new Set,[n,i]=e.split("|"),s=i.split(","),[o,l]=n.split("^");o.split(",").forEach(c=>{this._schema.set(c.toLowerCase(),t),this._eventSchema.set(c.toLowerCase(),r)});let a=l&&this._schema.get(l.toLowerCase());if(a){for(let[c,u]of a)t.set(c,u);for(let c of this._eventSchema.get(l.toLowerCase()))r.add(c)}s.forEach(c=>{if(c.length>0)switch(c[0]){case"*":r.add(c.substring(1));break;case"!":t.set(c.substring(1),E1e);break;case"#":t.set(c.substring(1),C1e);break;case"%":t.set(c.substring(1),A1e);break;default:t.set(c,T1e)}})})}hasProperty(e,t,r){if(r.some(n=>n.name===GM.name))return!0;if(e.indexOf("-")>-1){if(KM(e)||JM(e))return!1;if(r.some(n=>n.name===VM.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(t)}hasElement(e,t){return t.some(r=>r.name===GM.name)||e.indexOf("-")>-1&&(KM(e)||JM(e)||t.some(r=>r.name===VM.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,t,r){r&&(t=this.getMappedPropName(t)),e=e.toLowerCase(),t=t.toLowerCase();let n=XM()[e+"|"+t];return n||(n=XM()["*|"+t],n||uc.NONE)}getMappedPropName(e){return cH.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(t.keys()).map(r=>_1e.get(r)??r)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return r1e(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(F1e(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let o=r.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function F1e(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var jt=class{constructor({closedByChildren:t,implicitNamespacePrefix:r,contentType:n=ko.PARSABLE_DATA,closedByParent:i=!1,isVoid:s=!1,ignoreFirstLf:o=!1,preventNamespaceInheritance:l=!1,canSelfClose:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,t&&t.length>0&&t.forEach(c=>this.closedByChildren[c]=!0),this.isVoid=s,this.closedByParent=i||s,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=o,this.preventNamespaceInheritance=l,this.canSelfClose=a??s}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},YM,Ep;function fT(e){return Ep||(YM=new jt({canSelfClose:!0}),Ep=Object.assign(Object.create(null),{base:new jt({isVoid:!0}),meta:new jt({isVoid:!0}),area:new jt({isVoid:!0}),embed:new jt({isVoid:!0}),link:new jt({isVoid:!0}),img:new jt({isVoid:!0}),input:new jt({isVoid:!0}),param:new jt({isVoid:!0}),hr:new jt({isVoid:!0}),br:new jt({isVoid:!0}),source:new jt({isVoid:!0}),track:new jt({isVoid:!0}),wbr:new jt({isVoid:!0}),p:new jt({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new jt({closedByChildren:["tbody","tfoot"]}),tbody:new jt({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new jt({closedByChildren:["tbody"],closedByParent:!0}),tr:new jt({closedByChildren:["tr"],closedByParent:!0}),td:new jt({closedByChildren:["td","th"],closedByParent:!0}),th:new jt({closedByChildren:["td","th"],closedByParent:!0}),col:new jt({isVoid:!0}),svg:new jt({implicitNamespacePrefix:"svg"}),foreignObject:new jt({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new jt({implicitNamespacePrefix:"math"}),li:new jt({closedByChildren:["li"],closedByParent:!0}),dt:new jt({closedByChildren:["dt","dd"]}),dd:new jt({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new jt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new jt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new jt({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new jt({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new jt({closedByChildren:["optgroup"],closedByParent:!0}),option:new jt({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new jt({ignoreFirstLf:!0}),listing:new jt({ignoreFirstLf:!0}),style:new jt({contentType:ko.RAW_TEXT}),script:new jt({contentType:ko.RAW_TEXT}),title:new jt({contentType:{default:ko.ESCAPABLE_RAW_TEXT,svg:ko.PARSABLE_DATA}}),textarea:new jt({contentType:ko.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $1e().allKnownElementNames().forEach(t=>{!Ep[t]&&Bv(t)===null&&(Ep[t]=new jt({canSelfClose:!1}))})),Ep[e]??YM}var qg=class{constructor(t,r){this.sourceSpan=t,this.i18n=r}},P1e=class extends qg{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="text"}visit(e,t){return e.visitText(this,t)}},I1e=class extends qg{constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r,this.type="cdata"}visit(e,t){return e.visitCdata(this,t)}},N1e=class extends qg{constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}},M1e=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i,this.type="expansionCase"}visit(e,t){return e.visitExpansionCase(this,t)}},L1e=class extends qg{constructor(e,t,r,n,i,s,o){super(r,o),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s,this.type="attribute"}visit(e,t){return e.visitAttribute(this,t)}get nameSpan(){return this.keySpan}},$l=class extends qg{constructor(t,r,n,i,s,o=null,l=null,a){super(i,a),this.name=t,this.attrs=r,this.children=n,this.startSourceSpan=s,this.endSourceSpan=o,this.nameSpan=l,this.type="element"}visit(t,r){return t.visitElement(this,r)}},O1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="comment"}visit(e,t){return e.visitComment(this,t)}},R1e=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type="docType"}visit(e,t){return e.visitDocType(this,t)}},jh=class{constructor(t,r,n,i,s,o=null){this.name=t,this.parameters=r,this.children=n,this.sourceSpan=i,this.startSourceSpan=s,this.endSourceSpan=o,this.type="block"}visit(t,r){return t.visitBlock(this,r)}},ZM=class{constructor(e,t){this.expression=e,this.sourceSpan=t,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,t){return e.visitBlockParameter(this,t)}};function hH(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let o=i(s);o&&n.push(o)}),n}var B1e=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.children)})}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitChildren(e,t){let r=[],n=this;function i(s){s&&r.push(hH(n,s,e))}return t(i),Array.prototype.concat.apply([],r)}},V0={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",af:"⁡",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"⁣",ic:"⁣",InvisibleTimes:"⁢",it:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",ZeroWidthSpace:"​",NewLine:` +`,Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},j1e="";V0.ngsp=j1e;var z1e=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function H1e(e,t){if(t!=null&&!(Array.isArray(t)&&t.length==2))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(t!=null){let r=t[0],n=t[1];z1e.forEach(i=>{if(i.test(r)||i.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var U1e=class dH{static fromArray(t){return t?(H1e("interpolation",t),new dH(t[0],t[1])):fH}constructor(t,r){this.start=t,this.end=r}},fH=new U1e("{{","}}"),vD=class extends lH{constructor(e,t,r){super(r,e),this.tokenType=t}},W1e=class{constructor(e,t,r){this.tokens=e,this.errors=t,this.nonNormalizedIcuExpressions=r}};function V1e(e,t,r,n={}){let i=new K1e(new aH(e,t),r,n);return i.tokenize(),new W1e(exe(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var G1e=/\r\n?/g;function zh(e){return`Unexpected character "${e===0?"EOF":String.fromCharCode(e)}"`}function QM(e){return`Unknown entity "${e}" - use the "&#;" or "&#x;" syntax`}function q1e(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}var G0;(function(e){e.HEX="hexadecimal",e.DEC="decimal"})(G0||(G0={}));var bD=class{constructor(e){this.error=e}},K1e=class{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||fH,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;let n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new txe(e,n):new pH(e,n),this._preserveLineEndings=r.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=r.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=r.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(G1e,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>r$(r)?!e:rL(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeBlockStart(e){this._beginToken(25,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(oi),this._attemptCharCode(41))this._attemptCharCodeUntilFn(oi);else{t.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):t.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(nL);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&jM(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(nL)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Z1e(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new vD("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(t));if(this._currentTokenType===null)throw new vD("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new vD(e,this._currentTokenType,t);return this._currentTokenStart=null,this._currentTokenType=null,new bD(r)}handleError(e){if(e instanceof i$&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof bD)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Q1e(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let t=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(zh(this._cursor.peek()),this._cursor.getSpan(t))}_attemptStr(e){let t=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),t="";for(;this._cursor.peek()!==58&&!J1e(this._cursor.peek());)this._cursor.advance();let r;this._cursor.peek()===58?(t=this._cursor.getChars(e),this._cursor.advance(),r=this._cursor.clone()):r=e,this._requireCharCodeUntilFn(eL,t===""?0:1);let n=this._cursor.getChars(r);return[t,n]}_consumeTagOpen(e){let t,r,n,i=[];try{if(!n$(this._cursor.peek()))throw this._createError(zh(this._cursor.peek()),this._cursor.getSpan(e));for(n=this._consumeTagOpenStart(e),r=n.parts[0],t=n.parts[1],this._attemptCharCodeUntilFn(oi);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,l]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(oi),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(oi);let a=this._consumeAttributeValue();i.push({prefix:o,name:l,value:a})}else i.push({prefix:o,name:l});this._attemptCharCodeUntilFn(oi)}this._consumeTagOpenEnd()}catch(o){if(o instanceof bD){n?n.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let s=this._getTagContentType(t,r,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(r,t),s===ko.RAW_TEXT?this._consumeRawTextWithTagClose(r,t,!1):s===ko.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,t,!0)}_consumeRawTextWithTagClose(e,t,r){this._consumeRawText(r,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(oi),!this._attemptStrCaseInsensitive(e?`${e}:${t}`:t))?!1:(this._attemptCharCodeUntilFn(oi),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(n=>n===62,3),this._cursor.advance(),this._endToken([e,t]),this._handleFullNameStackForTagClose(e,t)}_consumeTagOpenStart(e){this._beginToken(0,e);let t=this._consumePrefixAndName();return this._endToken(t)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(zh(e),this._cursor.getSpan());this._beginToken(14);let t=this._consumePrefixAndName();return this._endToken(t),t}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let t=this._cursor.peek();this._consumeQuote(t);let r=()=>this._cursor.peek()===t;e=this._consumeWithInterpolation(16,17,r,r),this._consumeQuote(t)}else{let t=()=>eL(this._cursor.peek());e=this._consumeWithInterpolation(16,17,t,t)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(oi),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(oi),this._requireCharCode(62),this._endToken([]);else{let[t,r]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(oi),this._requireCharCode(62),this._endToken([t,r]),this._handleFullNameStackForTagClose(t,r)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),t=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([t]);else{let n=this._endToken([e]);t!==e&&this.nonNormalizedIcuExpressions.push(n)}this._requireCharCode(44),this._attemptCharCodeUntilFn(oi),this._beginToken(7);let r=this._readUntil(44);this._endToken([r]),this._requireCharCode(44),this._attemptCharCodeUntilFn(oi)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(oi),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(oi),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(oi),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,t,r,n){this._beginToken(e);let i=[];for(;!r();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(t,o,n),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let s=this._processCarriageReturns(i.join(""));return this._endToken([s]),s}_consumeInterpolation(e,t,r){let n=[];this._beginToken(e,t),n.push(this._interpolationConfig.start);let i=this._cursor.clone(),s=null,o=!1;for(;this._cursor.peek()!==0&&(r===null||!r());){let l=this._cursor.clone();if(this._isTagStart()){this._cursor=l,n.push(this._getProcessedChars(i,l)),this._endToken(n);return}if(s===null)if(this._attemptStr(this._interpolationConfig.end)){n.push(this._getProcessedChars(i,l)),n.push(this._interpolationConfig.end),this._endToken(n);return}else this._attemptStr("//")&&(o=!0);let a=this._cursor.peek();this._cursor.advance(),a===92?this._cursor.advance():a===s?s=null:!o&&s===null&&jM(a)&&(s=a)}n.push(this._getProcessedChars(i,this._cursor)),this._endToken(n)}_getProcessedChars(e,t){return this._processCarriageReturns(t.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let t=e.peek();if(97<=t&&t<=122||65<=t&&t<=90||t===47||t===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),rL(e.peek()))return!0}return!1}_readUntil(e){let t=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(t)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),t=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!t}return!0}_handleFullNameStackForTagOpen(e,t){let r=W0(e,t);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===r)&&this._fullNameStack.push(r)}_handleFullNameStackForTagClose(e,t){let r=W0(e,t);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}};function oi(e){return!r$(e)||e===0}function eL(e){return r$(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function J1e(e){return(e<97||12257)}function X1e(e){return e===59||e===0||!e1e(e)}function Y1e(e){return e===59||e===0||!n$(e)}function Z1e(e){return e!==125}function Q1e(e,t){return tL(e)===tL(t)}function tL(e){return e>=97&&e<=122?e-97+65:e}function rL(e){return n$(e)||iH(e)||e===95}function nL(e){return e!==59&&oi(e)}function exe(e){let t=[],r;for(let n=0;n0&&r.indexOf(t.peek())!==-1;)n===t&&(t=t.clone()),t.advance();let i=this.locationFromCursor(t),s=this.locationFromCursor(this),o=n!==t?this.locationFromCursor(n):i;return new dr(i,s,o)}getChars(t){return this.input.substring(t.state.offset,this.state.offset)}charAt(t){return this.input.charCodeAt(t)}advanceState(t){if(t.offset>=this.end)throw this.state=t,new i$('Unexpected character "EOF"',this);let r=this.charAt(t.offset);r===10?(t.line++,t.column=0):sH(r)||t.column++,t.offset++,this.updatePeek(t)}updatePeek(t){t.peek=t.offset>=this.end?0:this.charAt(t.offset)}locationFromCursor(t){return new dT(t.file,t.state.offset,t.state.line,t.state.column)}},txe=class mT extends pH{constructor(t,r){t instanceof mT?(super(t),this.internalState={...t.internalState}):(super(t,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new mT(this)}getChars(t){let r=t.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(t()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),t()===110)this.state.peek=10;else if(t()===114)this.state.peek=13;else if(t()===118)this.state.peek=11;else if(t()===116)this.state.peek=9;else if(t()===98)this.state.peek=8;else if(t()===102)this.state.peek=12;else if(t()===117)if(this.advanceState(this.internalState),t()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;t()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(t()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(BM(t())){let r="",n=0,i=this.clone();for(;BM(t())&&n<3;)i=this.clone(),r+=String.fromCodePoint(t()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=i.internalState}else sH(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(t,r){let n=this.input.slice(t.internalState.offset,t.internalState.offset+r),i=parseInt(n,16);if(isNaN(i))throw t.state=t.internalState,new i$("Invalid hexadecimal escape sequence",t);return i}},i$=class{constructor(e,t){this.msg=e,this.cursor=t}},zs=class mH extends lH{static create(t,r,n){return new mH(t,r,n)}constructor(t,r,n){super(r,n),this.elementName=t}},rxe=class{constructor(e,t){this.rootNodes=e,this.errors=t}},nxe=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){let s=f=>(p,...g)=>f(p.toLowerCase(),...g),o=n?this.getTagDefinition:s(this.getTagDefinition),l=f=>o(f).getContentType(),a=n?i:s(i),c=V1e(e,t,i?(f,p,g,y)=>{let b=a(f,p,g,y);return b!==void 0?b:l(f)}:l,r),u=r&&r.canSelfClose||!1,h=r&&r.allowHtmComponentClosingTags||!1,d=new ixe(c.tokens,o,u,h,n);return d.build(),new rxe(d.rootNodes,c.errors.concat(d.errors))}},ixe=class gH{constructor(t,r,n,i,s){this.tokens=t,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=s,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let t of this._containerStack)t instanceof jh&&this.errors.push(zs.create(t.name,t.sourceSpan,`Unclosed block "${t.name}"`))}_advance(){let t=this._peek;return this._index0)return this.errors=this.errors.concat(s.errors),null;let o=new dr(t.sourceSpan.start,i.sourceSpan.end,t.sourceSpan.fullStart),l=new dr(r.sourceSpan.start,i.sourceSpan.end,r.sourceSpan.fullStart);return new M1e(t.parts[0],s.rootNodes,o,t.sourceSpan,l)}_collectExpansionExpTokens(t){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(iL(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(zs.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(iL(n,20))n.pop();else return this.errors.push(zs.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push(zs.create(null,t.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(t){let r=t.parts[0];if(r.length>0&&r[0]==` `){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===` -`){let s=this._getContainer();s!=null&&s.children.length===0&&this.getTagDefinition(s.name).ignoreFirstLf&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,sL):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let s=t.sourceSpan;this._addToParent(new P1e(i,new dr(n.start,s.end,n.fullStart,n.details),r))}}_closeVoidElement(){let t=this._getContainer();t instanceof _l&&this.getTagDefinition(t.name).isVoid&&this._containerStack.pop()}_consumeStartTag(t){let[r,n]=t.parts,i=[];for(;this._peek.type===14;)i.push(this._consumeAttr(this._advance()));let s=this._getElementFullName(r,n,this._getClosestParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let f=this.getTagDefinition(s);this.canSelfClose||f.canSelfClose||Bv(s)!==null||f.isVoid||this.errors.push(js.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let a=this._peek.sourceSpan.fullStart,l=new dr(t.sourceSpan.start,a,t.sourceSpan.fullStart),c=new dr(t.sourceSpan.start,a,t.sourceSpan.fullStart),u=new dr(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new _l(s,i,[],l,c,void 0,u),d=this._getContainer();this._pushContainer(h,d instanceof _l&&this.getTagDefinition(d.name).isClosedByChild(h.name)),o?this._popContainer(s,_l,l):t.type===4&&(this._popContainer(s,_l,null),this.errors.push(js.create(s,l,`Opening tag "${s}" not terminated.`)))}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeEndTag(t){let r=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t.parts[0],t.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(js.create(r,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(r,_l,t.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(js.create(r,t.sourceSpan,n))}}_popContainer(t,r,n){let i=!1;for(let s=this._containerStack.length-1;s>=0;s--){let o=this._containerStack[s];if(Bv(o.name)?o.name===t:(t==null||o.name.toLowerCase()===t.toLowerCase())&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(s,this._containerStack.length-s),!i;(o instanceof zh||o instanceof _l&&!this.getTagDefinition(o.name).closedByParent)&&(i=!0)}return!1}_consumeAttr(t){let r=W0(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===15&&(i=this._advance());let s="",o=[],a,l;if(this._peek.type===16)for(a=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let u=this._advance();o.push(u),u.type===17?s+=u.parts.join("").replace(/&([^;]+);/g,sL):u.type===9?s+=u.parts[0]:s+=u.parts.join(""),l=n=u.sourceSpan.end}this._peek.type===15&&(l=n=this._advance().sourceSpan.end);let c=a&&l&&new dr((i==null?void 0:i.sourceSpan.start)??a.start,l,(i==null?void 0:i.sourceSpan.fullStart)??a.fullStart);return new L1e(r,s,new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),t.sourceSpan,c,o.length>0?o:void 0,void 0)}_consumeBlockOpen(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new ZM(a.parts[0],a.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,i=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new zh(t.parts[0],r,[],i,s);this._pushContainer(o,!1)}_consumeBlockClose(t){this._popContainer(null,zh,t.sourceSpan)||this.errors.push(js.create(null,t.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(t){let r=[];for(;this._peek.type===28;){let a=this._advance();r.push(new ZM(a.parts[0],a.sourceSpan))}let n=this._peek.sourceSpan.fullStart,i=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new zh(t.parts[0],r,[],i,s);this._pushContainer(o,!1),this._popContainer(null,zh,null),this.errors.push(js.create(t.parts[0],i,`Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let t=this._containerStack.length-1;t>-1;t--)if(this._containerStack[t]instanceof _l)return this._containerStack[t];return null}_addToParent(t){let r=this._getContainer();r===null?this.rootNodes.push(t):r.children.push(t)}_getElementFullName(t,r,n){if(t===""&&(t=this.getTagDefinition(r).implicitNamespacePrefix||"",t===""&&n!=null)){let i=V1(n.name)[1];this.getTagDefinition(i).preventNamespaceInheritance||(t=Bv(n.name))}return W0(t,r)}};function iL(e,t){return e.length>0&&e[e.length-1]===t}function sL(e,t){return V0[t]!==void 0?V0[t]||e:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e}var sxe=class extends nxe{constructor(){super(fT)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}},xD=null,oxe=()=>(xD||(xD=new sxe),xD);function oL(e,t={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s,tokenizeAngularBlocks:o=!1}=t;return oxe().parse(e,"angular-html-parser",{tokenizeExpansionForms:o,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:o},i,s)}function axe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var lxe=axe,uxe=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function cxe(e){let t=e.match(uxe);if(!t)return{content:e};let{startDelimiter:r,language:n,value:i="",endDelimiter:s}=t.groups,o=n.trim()||"yaml";if(r==="+++"&&(o="toml"),o!=="yaml"&&r!==s)return{content:e};let[a]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:r,endDelimiter:s,raw:a.replace(/\n$/,"")},content:Ps(!1,a,/[^\n]/g," ")+e.slice(a.length)}}var hxe=cxe,tv={attrs:!0,children:!0,cases:!0,expression:!0},aL=new Set(["parent"]),dxe=class Hp{constructor(t={}){for(let r of new Set([...aL,...Object.keys(t)]))this.setProperty(r,t[r])}setProperty(t,r){if(this[t]!==r){if(t in tv&&(r=r.map(n=>this.createChild(n))),!aL.has(t)){this[t]=r;return}Object.defineProperty(this,t,{value:r,enumerable:!1,configurable:!0})}}map(t){let r;for(let n in tv){let i=this[n];if(i){let s=fxe(i,o=>o.map(t));r!==i&&(r||(r=new Hp({parent:this.parent})),r.setProperty(n,s))}}if(r)for(let n in this)n in tv||(r[n]=this[n]);return t(r||this)}walk(t){for(let r in tv){let n=this[r];if(n)for(let i=0;i[t.fullName,t.value]))}};function fxe(e,t){let r=e.map(t);return r.some((n,i)=>n!==e[i])?r:e}var pxe=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,t(s,a).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new dr(a,l)}]]}})();return{type:"ieConditionalComment",complete:c,children:u,condition:Ps(!1,i.trim(),/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new dr(e.sourceSpan.start,a),endSourceSpan:new dr(l,e.sourceSpan.end)}}function yxe(e,t,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:Ps(!1,n.trim(),/\s+/g," "),sourceSpan:e.sourceSpan}}function vxe(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}var wD=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),bxe=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function xxe(e){if(e.type==="block"){if(e.name=Ps(!1,e.name.toLowerCase(),/\s+/g," ").trim(),e.type="angularControlFlowBlock",!Y_(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.type="angularControlFlowBlockParameter";e.parameters={type:"angularControlFlowBlockParameters",children:e.parameters,sourceSpan:new dr(e.parameters[0].sourceSpan.start,Ug(!1,e.parameters,-1).sourceSpan.end)}}}function wxe(e){(e.type==="plural"||e.type==="select")&&(e.clause=e.type,e.type="angularIcuExpression"),e.type==="expansionCase"&&(e.type="angularIcuCase")}function yH(e,t,r){let{name:n,canSelfClose:i=!0,normalizeTagName:s=!1,normalizeAttributeName:o=!1,allowHtmComponentClosingTags:a=!1,isTagNameCaseSensitive:l=!1,shouldParseAsRawText:c}=t,{rootNodes:u,errors:h}=oL(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l,getTagContentType:c?(...v)=>c(...v)?ko.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(u.some(C=>C.type==="docType"&&C.value==="html"||C.type==="element"&&C.name.toLowerCase()==="html"))return yH(e,bH,r);let v,E=()=>v??(v=oL(e,{canSelfClose:i,allowHtmComponentClosingTags:a,isTagNameCaseSensitive:l})),D=C=>E().rootNodes.find(({startSourceSpan:w})=>w&&w.start.offset===C.startSourceSpan.start.offset)??C;for(let[C,w]of u.entries()){let{endSourceSpan:T,startSourceSpan:A}=w;if(T===null)h=E().errors,u[C]=D(w);else if(Sxe(w,r)){let $=E().errors.find(I=>I.span.start.offset>A.start.offset&&I.span.start.offset0&&lL(h[0]);let d=v=>{let E=v.name.startsWith(":")?v.name.slice(1).split(":")[0]:null,D=v.nameSpan.toString(),C=E!==null&&D.startsWith(`${E}:`),w=C?D.slice(E.length+1):D;v.name=w,v.namespace=E,v.hasExplicitNamespace=C},f=v=>{switch(v.type){case"element":d(v);for(let E of v.attrs)d(E),E.valueSpan?(E.value=E.valueSpan.toString(),/["']/.test(E.value[0])&&(E.value=E.value.slice(1,-1))):E.value=null;break;case"comment":v.value=v.sourceSpan.toString().slice(4,-3);break;case"text":v.value=v.sourceSpan.toString();break}},p=(v,E)=>{let D=v.toLowerCase();return E(D)?D:v},g=v=>{if(v.type==="element"&&(s&&(!v.namespace||v.namespace===v.tagDefinition.implicitNamespacePrefix||og(v))&&(v.name=p(v.name,E=>bxe.has(E))),o))for(let E of v.attrs)E.namespace||(E.name=p(E.name,D=>wD.has(v.name)&&(wD.get("*").has(D)||wD.get(v.name).has(D))))},y=v=>{v.sourceSpan&&v.endSourceSpan&&(v.sourceSpan=new dr(v.sourceSpan.start,v.endSourceSpan.end))},b=v=>{if(v.type==="element"){let E=fT(l?v.name:v.name.toLowerCase());!v.namespace||v.namespace===E.implicitNamespacePrefix||og(v)?v.tagDefinition=E:v.tagDefinition=fT("")}};return hH(new class extends B1e{visitExpansionCase(v,E){n==="angular"&&this.visitChildren(E,D=>{D(v.expression)})}visit(v){f(v),b(v),g(v),y(v)}},u),u}function Sxe(e,t){var r;if(e.type!=="element"||e.name!=="template")return!1;let n=(r=e.attrs.find(i=>i.name==="lang"))==null?void 0:r.value;return!n||R1(t,{language:n})==="html"}function lL(e){let{msg:t,span:{start:r,end:n}}=e;throw lxe(t,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:e})}function vH(e,t,r={},n=!0){let{frontMatter:i,content:s}=n?hxe(e):{frontMatter:null,content:e},o=new aH(e,r.filepath),a=new dT(o,0,0,0),l=a.moveBy(e.length),c={type:"root",sourceSpan:new dr(a,l),children:yH(s,t,r)};if(i){let d=new dT(o,0,0,0),f=d.moveBy(i.raw.length);i.sourceSpan=new dr(d,f),c.children.unshift(i)}let u=new dxe(c),h=(d,f)=>{let{offset:p}=f,g=Ps(!1,e.slice(0,p),/[^\n\r]/g," "),y=vH(g+d,t,r,!1);y.sourceSpan=new dr(f,Ug(!1,y.children,-1).sourceSpan.end);let b=y.children[0];return b.length===p?y.children.shift():(b.sourceSpan=new dr(b.sourceSpan.start.moveBy(p),b.sourceSpan.end),b.value=b.value.slice(p)),y};return u.walk(d=>{if(d.type==="comment"){let f=mxe(d,h);f&&d.parent.replaceChild(d,f)}xxe(d),wxe(d)}),u}function G1(e){return{parse:(t,r)=>vH(t,e,r),hasPragma:Vbe,astFormat:"html",locStart:j1,locEnd:H1}}var bH={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Dxe=G1(bH),Exe=G1({name:"angular"}),Cxe=G1({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(e,t,r,n){return e.toLowerCase()!=="html"&&!r&&(e!=="template"||n.some(({name:i,value:s})=>i==="lang"&&s!=="html"&&s!==""&&s!==void 0))}}),Txe=G1({name:"lwc",canSelfClose:!1}),Axe={html:b1e},kxe=_7;const _xe=["DBAccordion","DBAccordionItem","DBButton","DBBadge","DBNotification","DBCard","DBCheckbox","DBBrand","DBDrawer","DBDivider","DBHeader","DBInfotext","DBIcon","DBLink","DBInput","DBMainNavigation","DBNavigationItem","DBRadio","DBSection","DBPage","DBSelect","DBTextarea","DBTag"],$xe=[{value:"variant",snippet:'variant=""',meta:"attribute"},{value:"primary",meta:"button-variant"},{value:"outlined",meta:"button-variant"},{value:"solid",meta:"button-variant"},{value:"text",meta:"button-variant"},{value:"primaryVariant",snippet:'variant="brand"',meta:"button-variant"},{value:"outlinedVariant",snippet:'variant="outlined"',meta:"button-variant"},{value:"solidVariant",snippet:'variant="filled"',meta:"button-variant"},{value:"textVariant",snippet:'variant="ghost"',meta:"button-variant"},{value:"adaptive",meta:"semantic-variant"},{value:"informational",meta:"semantic-variant"},{value:"critical",meta:"semantic-variant"},{value:"successful",meta:"semantic-variant"},{value:"warning",meta:"semantic-variant"},{value:"adaptiveVariant",snippet:'variant="adaptive"',meta:"semantic-variant"},{value:"informationalVariant",snippet:'variant="informational"',meta:"semantic-variant"},{value:"criticalVariant",snippet:'variant="critical"',meta:"semantic-variant"},{value:"successfulVariant",snippet:'variant="successful"',meta:"semantic-variant"},{value:"warningVariant",snippet:'variant="warning"',meta:"semantic-variant"}],Fxe=()=>{const e=_xe.map(r=>({caption:r,value:r})),t=$xe.map(r=>({...r,caption:r.value}));return{getCompletions:(r,n,i,s,o)=>{o(null,[...e,...t].map(a=>({...a,meta:a.meta||"dbux"})))}}},uL=(e,t)=>{const r=e.slice(t.length);return t+r.charAt(0).toUpperCase()+r.slice(1)},Pxe=(e,t)=>{const r={};return e&&Object.keys(e).forEach(i=>{if(i==="classname")r.className=e[i];else if(i.startsWith("on"))try{const s=uL(i,"on");r[s]=Function(e[i].replace(/"/g,""))}catch{}else if(i.startsWith("slot"))try{const s=uL(i,"slot");r[s]=Z4(e[i],t)}catch{}else r[i]=e[i]}),r},Xr={transform:e=>e.type&&e.type.endsWith&&e.type.endsWith("<")?e.type:e,replace:({name:e,attribs:t,children:r})=>{const n=Pxe(t,Xr);if(e==="dbaccordion")return z.jsx(KY,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbaccordionitem")return z.jsx(d6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbutton")return z.jsx(Ot,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbadge")return z.jsx(aC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbalert")return z.jsx(v0,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbcard")return z.jsx(ls,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbcheckbox")return z.jsx(b0,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbrand")return z.jsx(iY,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbdrawer")return z.jsx(hf,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbdivider")return z.jsx(aa,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbheader")return z.jsx(c6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbinfotext")return z.jsx(Mr,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbicon")return z.jsx(df,{...n,children:Yr.domToReact(r,Xr)});if(e==="dblink")return z.jsx(hd,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbinput")return z.jsx(an,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbmainnavigation")return z.jsx(f6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbnavigationitem")return z.jsx(cC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbradio")return z.jsx(lC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbsection")return z.jsx(kg,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbpage")return z.jsx(h6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbselect")return z.jsx(mc,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbtextarea")return z.jsx(im,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbtag")return z.jsx(uC,{...n,children:Yr.domToReact(r,Xr)})}},Ixe=[{key:"page",label:"Page",content:`0){let s=t.sourceSpan;this._addToParent(new P1e(i,new dr(n.start,s.end,n.fullStart,n.details),r))}}_closeVoidElement(){let t=this._getContainer();t instanceof $l&&this.getTagDefinition(t.name).isVoid&&this._containerStack.pop()}_consumeStartTag(t){let[r,n]=t.parts,i=[];for(;this._peek.type===14;)i.push(this._consumeAttr(this._advance()));let s=this._getElementFullName(r,n,this._getClosestParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let f=this.getTagDefinition(s);this.canSelfClose||f.canSelfClose||Bv(s)!==null||f.isVoid||this.errors.push(zs.create(s,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let l=this._peek.sourceSpan.fullStart,a=new dr(t.sourceSpan.start,l,t.sourceSpan.fullStart),c=new dr(t.sourceSpan.start,l,t.sourceSpan.fullStart),u=new dr(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new $l(s,i,[],a,c,void 0,u),d=this._getContainer();this._pushContainer(h,d instanceof $l&&this.getTagDefinition(d.name).isClosedByChild(h.name)),o?this._popContainer(s,$l,a):t.type===4&&(this._popContainer(s,$l,null),this.errors.push(zs.create(s,a,`Opening tag "${s}" not terminated.`)))}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeEndTag(t){let r=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t.parts[0],t.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(zs.create(r,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(r,$l,t.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(zs.create(r,t.sourceSpan,n))}}_popContainer(t,r,n){let i=!1;for(let s=this._containerStack.length-1;s>=0;s--){let o=this._containerStack[s];if(Bv(o.name)?o.name===t:(t==null||o.name.toLowerCase()===t.toLowerCase())&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(s,this._containerStack.length-s),!i;(o instanceof jh||o instanceof $l&&!this.getTagDefinition(o.name).closedByParent)&&(i=!0)}return!1}_consumeAttr(t){let r=W0(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===15&&(i=this._advance());let s="",o=[],l,a;if(this._peek.type===16)for(l=this._peek.sourceSpan,a=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let u=this._advance();o.push(u),u.type===17?s+=u.parts.join("").replace(/&([^;]+);/g,sL):u.type===9?s+=u.parts[0]:s+=u.parts.join(""),a=n=u.sourceSpan.end}this._peek.type===15&&(a=n=this._advance().sourceSpan.end);let c=l&&a&&new dr((i==null?void 0:i.sourceSpan.start)??l.start,a,(i==null?void 0:i.sourceSpan.fullStart)??l.fullStart);return new L1e(r,s,new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),t.sourceSpan,c,o.length>0?o:void 0,void 0)}_consumeBlockOpen(t){let r=[];for(;this._peek.type===28;){let l=this._advance();r.push(new ZM(l.parts[0],l.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,i=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new jh(t.parts[0],r,[],i,s);this._pushContainer(o,!1)}_consumeBlockClose(t){this._popContainer(null,jh,t.sourceSpan)||this.errors.push(zs.create(null,t.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(t){let r=[];for(;this._peek.type===28;){let l=this._advance();r.push(new ZM(l.parts[0],l.sourceSpan))}let n=this._peek.sourceSpan.fullStart,i=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),s=new dr(t.sourceSpan.start,n,t.sourceSpan.fullStart),o=new jh(t.parts[0],r,[],i,s);this._pushContainer(o,!1),this._popContainer(null,jh,null),this.errors.push(zs.create(t.parts[0],i,`Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let t=this._containerStack.length-1;t>-1;t--)if(this._containerStack[t]instanceof $l)return this._containerStack[t];return null}_addToParent(t){let r=this._getContainer();r===null?this.rootNodes.push(t):r.children.push(t)}_getElementFullName(t,r,n){if(t===""&&(t=this.getTagDefinition(r).implicitNamespacePrefix||"",t===""&&n!=null)){let i=V1(n.name)[1];this.getTagDefinition(i).preventNamespaceInheritance||(t=Bv(n.name))}return W0(t,r)}};function iL(e,t){return e.length>0&&e[e.length-1]===t}function sL(e,t){return V0[t]!==void 0?V0[t]||e:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e}var sxe=class extends nxe{constructor(){super(fT)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}},xD=null,oxe=()=>(xD||(xD=new sxe),xD);function oL(e,t={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s,tokenizeAngularBlocks:o=!1}=t;return oxe().parse(e,"angular-html-parser",{tokenizeExpansionForms:o,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:o},i,s)}function axe(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var lxe=axe,uxe=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function cxe(e){let t=e.match(uxe);if(!t)return{content:e};let{startDelimiter:r,language:n,value:i="",endDelimiter:s}=t.groups,o=n.trim()||"yaml";if(r==="+++"&&(o="toml"),o!=="yaml"&&r!==s)return{content:e};let[l]=t;return{frontMatter:{type:"front-matter",lang:o,value:i,startDelimiter:r,endDelimiter:s,raw:l.replace(/\n$/,"")},content:Ps(!1,l,/[^\n]/g," ")+e.slice(l.length)}}var hxe=cxe,tv={attrs:!0,children:!0,cases:!0,expression:!0},aL=new Set(["parent"]),dxe=class Hp{constructor(t={}){for(let r of new Set([...aL,...Object.keys(t)]))this.setProperty(r,t[r])}setProperty(t,r){if(this[t]!==r){if(t in tv&&(r=r.map(n=>this.createChild(n))),!aL.has(t)){this[t]=r;return}Object.defineProperty(this,t,{value:r,enumerable:!1,configurable:!0})}}map(t){let r;for(let n in tv){let i=this[n];if(i){let s=fxe(i,o=>o.map(t));r!==i&&(r||(r=new Hp({parent:this.parent})),r.setProperty(n,s))}}if(r)for(let n in this)n in tv||(r[n]=this[n]);return t(r||this)}walk(t){for(let r in tv){let n=this[r];if(n)for(let i=0;i[t.fullName,t.value]))}};function fxe(e,t){let r=e.map(t);return r.some((n,i)=>n!==e[i])?r:e}var pxe=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,t(s,l).children]}catch{return[!1,[{type:"text",value:s,sourceSpan:new dr(l,a)}]]}})();return{type:"ieConditionalComment",complete:c,children:u,condition:Ps(!1,i.trim(),/\s+/g," "),sourceSpan:e.sourceSpan,startSourceSpan:new dr(e.sourceSpan.start,l),endSourceSpan:new dr(a,e.sourceSpan.end)}}function yxe(e,t,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:Ps(!1,n.trim(),/\s+/g," "),sourceSpan:e.sourceSpan}}function vxe(e){return{type:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}var wD=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),bxe=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]);function xxe(e){if(e.type==="block"){if(e.name=Ps(!1,e.name.toLowerCase(),/\s+/g," ").trim(),e.type="angularControlFlowBlock",!Y_(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.type="angularControlFlowBlockParameter";e.parameters={type:"angularControlFlowBlockParameters",children:e.parameters,sourceSpan:new dr(e.parameters[0].sourceSpan.start,Ug(!1,e.parameters,-1).sourceSpan.end)}}}function wxe(e){(e.type==="plural"||e.type==="select")&&(e.clause=e.type,e.type="angularIcuExpression"),e.type==="expansionCase"&&(e.type="angularIcuCase")}function yH(e,t,r){let{name:n,canSelfClose:i=!0,normalizeTagName:s=!1,normalizeAttributeName:o=!1,allowHtmComponentClosingTags:l=!1,isTagNameCaseSensitive:a=!1,shouldParseAsRawText:c}=t,{rootNodes:u,errors:h}=oL(e,{canSelfClose:i,allowHtmComponentClosingTags:l,isTagNameCaseSensitive:a,getTagContentType:c?(...v)=>c(...v)?ko.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(u.some(C=>C.type==="docType"&&C.value==="html"||C.type==="element"&&C.name.toLowerCase()==="html"))return yH(e,bH,r);let v,E=()=>v??(v=oL(e,{canSelfClose:i,allowHtmComponentClosingTags:l,isTagNameCaseSensitive:a})),D=C=>E().rootNodes.find(({startSourceSpan:w})=>w&&w.start.offset===C.startSourceSpan.start.offset)??C;for(let[C,w]of u.entries()){let{endSourceSpan:T,startSourceSpan:A}=w;if(T===null)h=E().errors,u[C]=D(w);else if(Sxe(w,r)){let $=E().errors.find(I=>I.span.start.offset>A.start.offset&&I.span.start.offset0&&lL(h[0]);let d=v=>{let E=v.name.startsWith(":")?v.name.slice(1).split(":")[0]:null,D=v.nameSpan.toString(),C=E!==null&&D.startsWith(`${E}:`),w=C?D.slice(E.length+1):D;v.name=w,v.namespace=E,v.hasExplicitNamespace=C},f=v=>{switch(v.type){case"element":d(v);for(let E of v.attrs)d(E),E.valueSpan?(E.value=E.valueSpan.toString(),/["']/.test(E.value[0])&&(E.value=E.value.slice(1,-1))):E.value=null;break;case"comment":v.value=v.sourceSpan.toString().slice(4,-3);break;case"text":v.value=v.sourceSpan.toString();break}},p=(v,E)=>{let D=v.toLowerCase();return E(D)?D:v},g=v=>{if(v.type==="element"&&(s&&(!v.namespace||v.namespace===v.tagDefinition.implicitNamespacePrefix||og(v))&&(v.name=p(v.name,E=>bxe.has(E))),o))for(let E of v.attrs)E.namespace||(E.name=p(E.name,D=>wD.has(v.name)&&(wD.get("*").has(D)||wD.get(v.name).has(D))))},y=v=>{v.sourceSpan&&v.endSourceSpan&&(v.sourceSpan=new dr(v.sourceSpan.start,v.endSourceSpan.end))},b=v=>{if(v.type==="element"){let E=fT(a?v.name:v.name.toLowerCase());!v.namespace||v.namespace===E.implicitNamespacePrefix||og(v)?v.tagDefinition=E:v.tagDefinition=fT("")}};return hH(new class extends B1e{visitExpansionCase(v,E){n==="angular"&&this.visitChildren(E,D=>{D(v.expression)})}visit(v){f(v),b(v),g(v),y(v)}},u),u}function Sxe(e,t){var r;if(e.type!=="element"||e.name!=="template")return!1;let n=(r=e.attrs.find(i=>i.name==="lang"))==null?void 0:r.value;return!n||R1(t,{language:n})==="html"}function lL(e){let{msg:t,span:{start:r,end:n}}=e;throw lxe(t,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:e})}function vH(e,t,r={},n=!0){let{frontMatter:i,content:s}=n?hxe(e):{frontMatter:null,content:e},o=new aH(e,r.filepath),l=new dT(o,0,0,0),a=l.moveBy(e.length),c={type:"root",sourceSpan:new dr(l,a),children:yH(s,t,r)};if(i){let d=new dT(o,0,0,0),f=d.moveBy(i.raw.length);i.sourceSpan=new dr(d,f),c.children.unshift(i)}let u=new dxe(c),h=(d,f)=>{let{offset:p}=f,g=Ps(!1,e.slice(0,p),/[^\n\r]/g," "),y=vH(g+d,t,r,!1);y.sourceSpan=new dr(f,Ug(!1,y.children,-1).sourceSpan.end);let b=y.children[0];return b.length===p?y.children.shift():(b.sourceSpan=new dr(b.sourceSpan.start.moveBy(p),b.sourceSpan.end),b.value=b.value.slice(p)),y};return u.walk(d=>{if(d.type==="comment"){let f=mxe(d,h);f&&d.parent.replaceChild(d,f)}xxe(d),wxe(d)}),u}function G1(e){return{parse:(t,r)=>vH(t,e,r),hasPragma:Vbe,astFormat:"html",locStart:z1,locEnd:H1}}var bH={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Dxe=G1(bH),Exe=G1({name:"angular"}),Cxe=G1({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(e,t,r,n){return e.toLowerCase()!=="html"&&!r&&(e!=="template"||n.some(({name:i,value:s})=>i==="lang"&&s!=="html"&&s!==""&&s!==void 0))}}),Txe=G1({name:"lwc",canSelfClose:!1}),Axe={html:b1e},kxe=_7;const _xe=["DBAccordion","DBAccordionItem","DBButton","DBBadge","DBNotification","DBCard","DBCheckbox","DBBrand","DBDrawer","DBDivider","DBHeader","DBInfotext","DBIcon","DBLink","DBInput","DBMainNavigation","DBNavigationItem","DBRadio","DBSection","DBPage","DBSelect","DBTextarea","DBTag"],$xe=[{value:"variant",snippet:'variant=""',meta:"attribute"},{value:"primary",meta:"button-variant"},{value:"outlined",meta:"button-variant"},{value:"solid",meta:"button-variant"},{value:"text",meta:"button-variant"},{value:"primaryVariant",snippet:'variant="brand"',meta:"button-variant"},{value:"outlinedVariant",snippet:'variant="outlined"',meta:"button-variant"},{value:"solidVariant",snippet:'variant="filled"',meta:"button-variant"},{value:"textVariant",snippet:'variant="ghost"',meta:"button-variant"},{value:"adaptive",meta:"semantic-variant"},{value:"informational",meta:"semantic-variant"},{value:"critical",meta:"semantic-variant"},{value:"successful",meta:"semantic-variant"},{value:"warning",meta:"semantic-variant"},{value:"adaptiveVariant",snippet:'variant="adaptive"',meta:"semantic-variant"},{value:"informationalVariant",snippet:'variant="informational"',meta:"semantic-variant"},{value:"criticalVariant",snippet:'variant="critical"',meta:"semantic-variant"},{value:"successfulVariant",snippet:'variant="successful"',meta:"semantic-variant"},{value:"warningVariant",snippet:'variant="warning"',meta:"semantic-variant"}],Fxe=()=>{const e=_xe.map(r=>({caption:r,value:r})),t=$xe.map(r=>({...r,caption:r.value}));return{getCompletions:(r,n,i,s,o)=>{o(null,[...e,...t].map(l=>({...l,meta:l.meta||"dbux"})))}}},uL=(e,t)=>{const r=e.slice(t.length);return t+r.charAt(0).toUpperCase()+r.slice(1)},Pxe=(e,t)=>{const r={};return e&&Object.keys(e).forEach(i=>{if(i==="classname")r.className=e[i];else if(i.startsWith("on"))try{const s=uL(i,"on");r[s]=Function(e[i].replace(/"/g,""))}catch{}else if(i.startsWith("slot"))try{const s=uL(i,"slot");r[s]=Z4(e[i],t)}catch{}else r[i]=e[i]}),r},Xr={transform:e=>e.type&&e.type.endsWith&&e.type.endsWith("<")?e.type:e,replace:({name:e,attribs:t,children:r})=>{const n=Pxe(t,Xr);if(e==="dbaccordion")return B.jsx(KY,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbaccordionitem")return B.jsx(d6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbutton")return B.jsx(Ot,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbadge")return B.jsx(aC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbalert")return B.jsx(v0,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbcard")return B.jsx(ls,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbcheckbox")return B.jsx(b0,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbbrand")return B.jsx(iY,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbdrawer")return B.jsx(hf,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbdivider")return B.jsx(aa,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbheader")return B.jsx(c6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbinfotext")return B.jsx(Mr,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbicon")return B.jsx(df,{...n,children:Yr.domToReact(r,Xr)});if(e==="dblink")return B.jsx(hd,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbinput")return B.jsx(an,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbmainnavigation")return B.jsx(f6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbnavigationitem")return B.jsx(cC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbradio")return B.jsx(lC,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbsection")return B.jsx(kg,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbpage")return B.jsx(h6,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbselect")return B.jsx(mc,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbtextarea")return B.jsx(im,{...n,children:Yr.domToReact(r,Xr)});if(e==="dbtag")return B.jsx(uC,{...n,children:Yr.domToReact(r,Xr)})}},Ixe=[{key:"page",label:"Page",content:` -`}],q1=({name:e,children:t,actionBar:r,className:n,density:i,navigation:s,withDevMode:o})=>{const{t:a}=mr(),{theme:l,darkMode:c,developerMode:u}=pr(f=>f),[h,d]=H.useState();return z.jsx("div",{className:"contents","data-density":i||"regular",children:z.jsx(h6,{className:n,variant:"fixed",header:z.jsx(c6,{drawerOpen:h,onToggle:()=>d(!h),brand:z.jsxs("div",{className:"db-brand",children:[z.jsx("img",{className:"logo",src:Jm(c&&l.branding.image.dark?l.branding.image.dark:l.branding.image.light),alt:"brand"}),e]}),secondaryAction:r,primaryAction:z.jsxs("div",{className:"flex gap-fix-sm",children:[o&&z.jsxs(Ot,{className:u?"":"opacity-0",icon:"wrench",variant:"ghost",noText:!0,onClick:()=>pr.setState({developerMode:!u}),children:["Developer Mode",z.jsx(Ks,{placement:"bottom",children:a(u?"disableDevMode":"enableDevMode")})]}),z.jsxs(Ot,{variant:"ghost",icon:c?"sun":"moon",noText:!0,className:"p-0 w-siz-md",onClick:()=>{pr.setState({darkMode:!c})},children:[c?"🌞":"🌛",z.jsx(Ks,{placement:"left",children:a(c?"enableLightMode":"enableDarkMode")})]})]}),children:s}),children:t})})},Nxe=()=>{const{t:e}=mr(),{editorMarkup:t}=pr(n=>n);H.useEffect(()=>{Joe.require("ace/ext/language_tools").addCompleter(Fxe())},[]);const r=async()=>{const n=await l_(t,{parser:"babel",plugins:[Ode,Pve,kxe],semi:!1});pr.setState({editorMarkup:n.replace(/\n$/,"").replace(";","")})};return z.jsx(q1,{name:e("editor"),children:z.jsxs("div",{className:"editor w-full h-full grid grid-cols-2 gap-fix-xs p-fix-xs",children:[z.jsxs("div",{className:"flex flex-col gap-fix-xs",children:[z.jsx(yle,{mode:"html",theme:"dracula",onChange:n=>pr.setState({editorMarkup:n}),name:"ace-editor",value:t||"",fontSize:16,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,height:"100%",width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,useWorker:!1}}),z.jsxs("div",{className:"flex flex-wrap db-density-functional gap-fix-xs",children:[z.jsx(Ot,{icon:"grid_view",onClick:()=>r(),children:e("formatCode")}),z.jsx(aa,{variant:"vertical"}),Ixe.map(n=>z.jsxs(Ot,{icon:"copy",onClick:()=>{navigator.clipboard.writeText(n.content||""),pr.setState({notification:`${n.label} Template copied`})},children:[n.label," Template"]},n.key))]})]}),z.jsx(ls,{className:"rounded-none h-full overflow-auto",children:Z4(t,Xr)})]})})},$l=({label:e,color:t,setColor:r,onAddColor:n,onDelete:i,customColor:s,isAddColor:o,isOrigin:a,setAlternativeColor:l,setAlternativeCustom:c})=>{var $,I,N,L,F,P,_,M,B,R,G,q,ee,Y,X;const{t:u}=mr(),[h,d]=H.useState(t),[f,p]=H.useState(),[g,y]=H.useState(!0),[b,v]=H.useState(o?"":e),{darkMode:E,theme:D,setCustomColors:C,developerMode:w}=pr(Q=>Q),T=H.useCallback(()=>D.branding.alternativeColors[e],[e,D.branding.alternativeColors]),A=H.useCallback(()=>{var Q,te;return a&&((Q=T())==null?void 0:Q.dark)===E?((te=T())==null?void 0:te.hex)??"#ff69b4":t},[a,T,E,t]);return z.jsx("div",{className:"color-picker-container",children:z.jsxs("div",{className:"color-input-container",children:[z.jsxs("button",{"data-icon":o?"plus":void 0,className:"color-tag",style:{"--current-color":a?`var(--db-${e}-on-enabled)`:v4("#fff",t)>=4.5?"#fff":"#000",backgroundColor:A(),color:"var(--current-color)","--db-current-icon-color":"var(--current-color)",borderColor:`var(--db-${e.toLowerCase()}-contrast-high-enabled)`},onClick:()=>p(!0),children:[u(e),!o&&z.jsx(Ks,{placement:"bottom",className:"db-neutral-bg-lvl-1",children:u("adaptColor")})]}),z.jsxs(hf,{backdrop:"weak",open:f,onClose:()=>p(!1),drawerHeader:u("editColor",{colorName:b}),withCloseButton:!0,children:[z.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-md",children:[z.jsx(an,{id:`input-${b}`,label:u("colorName"),required:!0,value:b,disabled:!s,customValidity:s&&(($=D.customColors)!=null&&$[b])&&e!==b?"invalid":"no-validation",message:s&&((I=D.customColors)!=null&&I[b])&&e!==b?u("customColorExists"):void 0,pattern:"[a-zA-Z0-9\\-_]+",onChange:Q=>{v(Q.target.value),y(Q.target.validity.valid)}}),z.jsx(an,{label:u("colorInputPicker"),type:"color",value:o?h:t,onChange:Q=>{o?d(Q.target.value):r&&r(Q.target.value)}}),z.jsx(an,{label:u("colorInputHex"),placeholder:u("colorInputHex"),value:o?h:t,onChange:Q=>{o?d(Q.target.value):r&&r(Q.target.value)}}),a&&(((N=T())==null?void 0:N.custom)||((L=T())==null?void 0:L.hex)!==t)&&z.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-lg",children:[z.jsx("h6",{children:u("alternativeBrand")}),!((F=T())!=null&&F.custom&&((P=T())!=null&&P.isValid))&&z.jsx(Mr,{semantic:(_=T())!=null&&_.custom&&!((M=T())!=null&&M.isValid)?"critical":"warning",children:(B=T())!=null&&B.custom&&!((R=T())!=null&&R.isValid)?u("alternativeBrandCritical"):u("alternativeBrandWarning")}),w&&z.jsx(b0,{label:u("alternativeBrandCheckbox"),defaultChecked:(G=T())==null?void 0:G.custom,onChange:Q=>{c&&c(Q.target.checked)}}),z.jsx(an,{label:u("colorInputPicker"),type:"color",value:(q=T())==null?void 0:q.hex,disabled:!((ee=T())!=null&&ee.custom),onChange:Q=>{l&&l(Q.target.value)}}),z.jsx(an,{label:u("colorInputHex"),placeholder:u("colorInputHex"),value:(Y=T())==null?void 0:Y.hex,disabled:!((X=T())!=null&&X.custom),onChange:Q=>{l&&l(Q.target.value)}})]})]}),s&&z.jsxs(z.Fragment,{children:[z.jsx(aa,{}),z.jsxs("div",{className:"ml-auto flex gap-fix-md",children:[!o&&z.jsx(Ot,{icon:"bin",onClick:()=>{i&&i()},children:u("deleteColor")}),z.jsx(Ot,{className:"ml-auto",variant:"brand",disabled:b.length===0||e===b||!g,onClick:()=>{if(o)p(!1),n&&n(b,h),d("#ffffff"),v("");else if(D.customColors){const Q={};Object.keys(D.customColors).forEach(te=>{var Z,de;te===e?Q[b]=((Z=D.customColors)==null?void 0:Z[te])||"":Q[te]=((de=D.customColors)==null?void 0:de[te])||""}),C(Q)}},children:u(o?"addColor":"changeColor")})]})]})]})]})})},Mxe=(e,t,r,n,i,s)=>{var b;const o=s??e[t],a=y4(o)?o:"#ff69b4",l=Hd("neutral",e.neutral,r),c=Hd(t,o,r),u=l.at(0),h=l.at(-1),d=Dn.contrast(Dn.hex(a),Dn.hex((u==null?void 0:u.hex)||"#ff69b4"))<3,f=Dn.contrast(Dn.hex(a),Dn.hex((h==null?void 0:h.hex)||"#ff69b4"))<3;let p=i,g=!0;n||(d&&(p=MI(c,!0,u)),f&&(g=!1,p=MI(c,!1,h)),!d&&!f&&(p=a));const y=Dn.contrast(Dn.hex(p),Dn.hex(((b=l.at(g?-1:0))==null?void 0:b.hex)||"#ff69b4"))<3;return{custom:n,hex:p,dark:g,isValid:y}},Lxe=()=>{const{t:e}=mr(),{setColors:t,theme:r,setCustomColors:n,setAlternativeColors:i,luminanceSteps:s}=pr(a=>a),o=H.useCallback(({name:a,altColor:l,custom:c,currentColor:u})=>{var p,g;const h={...r.colors,...r.customColors},d=(g=(p=r==null?void 0:r.branding)==null?void 0:p.alternativeColors)==null?void 0:g[a],f=Mxe(h,a,s,c??(d==null?void 0:d.custom)??!1,l??(d==null?void 0:d.hex),u);i({...r.branding.alternativeColors,[a]:f})},[r.colors,r.customColors,r.branding.alternativeColors,i,s]);return z.jsxs(z.Fragment,{children:[z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx("h5",{children:e("colors")}),z.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[z.jsx($l,{color:r.colors.neutral,label:"Neutral",setColor:a=>t({...r.colors,neutral:a})}),z.jsx($l,{isOrigin:!0,color:r.colors.brand,label:"brand",setAlternativeCustom:a=>{o({name:"brand",custom:a})},setAlternativeColor:a=>{o({name:"brand",altColor:a})},setColor:a=>{t({...r.colors,brand:a}),o({name:"brand",currentColor:a})}}),z.jsx($l,{color:r.colors.informational,label:"Informational",setColor:a=>t({...r.colors,informational:a})}),z.jsx($l,{color:r.colors.successful,label:"Successful",setColor:a=>t({...r.colors,successful:a})}),z.jsx($l,{color:r.colors.warning,label:"Warning",setColor:a=>t({...r.colors,warning:a})}),z.jsx($l,{color:r.colors.critical,label:"Critical",setColor:a=>t({...r.colors,critical:a})})]})]}),z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx("h5",{children:e("custom")}),z.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[z.jsx($l,{color:"#ffffff",label:e("addColor"),onAddColor:(a,l)=>{n({...r.customColors,[a]:l}),o({name:a,currentColor:l})},customColor:!0,isAddColor:!0}),r.customColors&&Object.entries(r.customColors).map(([a,l])=>z.jsx($l,{color:l,label:a,isOrigin:!0,setAlternativeCustom:c=>{o({name:a,custom:c})},setAlternativeColor:c=>{o({name:a,altColor:c})},setColor:c=>{n({...r.customColors,[a]:c}),o({name:a,currentColor:c})},customColor:!0,onDelete:()=>{const c={...r.customColors};delete c[a],n(c)}},a))]})]})]})},Hh=["adaptive","neutral","critical","informational","warning","successful"],SD=e=>e.charAt(0).toUpperCase()+e.slice(1),Oxe=[{title:"Button",component:z.jsx("div",{className:"grid grid-cols-5 gap-fix-sm items-center",children:["outlined","filled","ghost","brand"].map(e=>z.jsxs(H.Fragment,{children:[z.jsxs("h6",{children:[SD(e),":"]}),z.jsx(Ot,{variant:e,children:"Default"}),z.jsx(Ot,{variant:e,icon:"user",children:"Icon"}),z.jsx(Ot,{variant:e,disabled:!0,children:"Disabled"}),z.jsx(Ot,{variant:e,size:"small",children:"Small"})]},`button-${e}`))})},{title:"Link",component:z.jsxs(H.Fragment,{children:[z.jsx(hd,{href:"#",children:"Text Link"}),z.jsx(hd,{href:"#",variant:"brand",children:"Brand Text Link"}),z.jsx(hd,{href:"#",disabled:!0,children:"Disabled Link"}),z.jsx(hd,{href:"#",size:"small",children:"Small Link"})]})},{title:"Infotext",component:z.jsxs(H.Fragment,{children:[Hh.map(e=>z.jsx(Mr,{semantic:e,children:SD(e)},`infotext-${e}`)),z.jsx(Mr,{size:"small",children:"Small"})]})},{title:"Tag",component:z.jsxs(H.Fragment,{children:[z.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[z.jsx("h6",{children:"Weak:"}),Hh.map(e=>z.jsxs(uC,{semantic:e,children:["Tag ",e]},`tag-${e}`))]}),z.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[z.jsx("h6",{children:"Strong:"}),Hh.map(e=>z.jsxs(uC,{semantic:e,emphasis:"strong",children:["Tag ",e]},`tag-strong-${e}`))]})]})},{title:"Badge",component:z.jsxs(H.Fragment,{children:[z.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[z.jsx("h6",{children:"Weak:"}),Hh.map(e=>z.jsxs(aC,{semantic:e,children:["Badge ",e]},`badge-${e}`))]}),z.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[z.jsx("h6",{children:"Strong:"}),Hh.map(e=>z.jsxs(aC,{semantic:e,emphasis:"strong",children:["Badge ",e]},`badge-strong-${e}`))]})]})},{title:"Notification",component:z.jsxs(H.Fragment,{children:[Hh.map(e=>z.jsx(v0,{semantic:e,variant:"standalone",headline:"Variant",linkVariant:"inline",link:z.jsx("a",{href:"#",children:"Link"}),children:SD(e)},`alert-component-${e}`)),z.jsx(v0,{variant:"docked",icon:"user",headline:"Type",linkVariant:"inline",link:z.jsx("a",{href:"#",children:"Link"}),children:"Docked"})]})},{title:"Input",component:z.jsxs(H.Fragment,{children:[z.jsx(an,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),z.jsx(an,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),z.jsx(an,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Checkbox",component:z.jsxs(H.Fragment,{children:[z.jsx(b0,{name:"checkbox",children:"Checkbox"}),z.jsx(b0,{name:"checkbox",required:!0,children:"Checkbox required"})]})},{title:"Radio",component:z.jsxs(H.Fragment,{children:[z.jsx(lC,{name:"radio",children:"Radio"}),z.jsx(lC,{name:"radio",required:!0,children:"Radio required"})]})},{title:"Select",component:z.jsxs(H.Fragment,{children:[z.jsxs(mc,{variant:"floating",label:"Select",placeholder:"Select",message:"Select Message",disabled:!0,children:[z.jsx("option",{children:"Option1"}),z.jsx("option",{children:"Option2"})]}),z.jsxs(mc,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0,children:[z.jsx("option",{children:"Option1"}),z.jsx("option",{children:"Option2"})]}),z.jsxs(mc,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0,children:[z.jsx("option",{children:"Option1"}),z.jsx("option",{children:"Option2"})]})]})},{title:"Textarea",component:z.jsxs(H.Fragment,{children:[z.jsx(im,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),z.jsx(im,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),z.jsx(im,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Divider",component:z.jsxs(H.Fragment,{children:[z.jsx(aa,{}),z.jsx(aa,{emphasis:"strong"})]})}],Rxe=()=>{const[e,t]=H.useState(""),{t:r}=mr();return z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx(an,{variant:"floating",label:r("search"),placeholder:r("search"),type:"search",onChange:n=>t(n.target.value)}),z.jsx("div",{className:"grid gap-fix-sm",children:Oxe.map(n=>n.title.toLowerCase().includes(e.toLowerCase())?z.jsx(ls,{spacing:"small",children:z.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[z.jsx("h5",{children:n.title}),z.jsx("div",{className:"flex flex-wrap gap-fix-sm items-center",children:n.component})]})},`component-list-${n.title}`):null)})]})},cL=({hue:e,hex:t,saturation:r,luminance:n,children:i,index:s,hideText:o})=>z.jsxs("div",{className:"palette-box gap-fix-md",style:{backgroundColor:t,color:Aie(t)<.4?"#fff":"#000","--color-index":s},children:[i,!o&&z.jsxs("div",{className:"flex flex-col",children:[z.jsxs("span",{className:"whitespace-nowrap",children:["hex: ",t]}),z.jsxs("span",{className:"whitespace-nowrap",children:["hsl: ",Math.round(e),"/",Math.round(r),"/",Math.round(n)]})]})]}),Bxe=()=>{const{luminanceSteps:e,developerMode:t,theme:r}=pr(o=>o),{t:n}=mr(),[i,s]=H.useState({});return H.useEffect(()=>{s({...r.colors,...r.customColors})},[r]),z.jsxs("div",{className:"flex flex-col",children:[t&&z.jsx(an,{label:n("luminanceSteps"),value:e,onChange:o=>{const a=o.target.value.split(",").map(l=>Number(l||0));pr.setState({luminanceSteps:a})}}),z.jsxs("div",{className:"flex gap-fix-2xs",children:[z.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[z.jsx("div",{className:"py-fix-sm",children:z.jsx("span",{className:"font-bold invisible",children:"Palette"})}),e.map((o,a)=>z.jsx("div",{className:"flex items-center",children:z.jsx("span",{className:"font-bold whitespace-nowrap pr-fix-xs md:pr-fix-lg",children:a})},`luminance-step-${o}`))]}),Object.entries(i).filter(([,o])=>y4(o)).map(([o,a],l)=>{const c=Hd(o,a,e);return z.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[z.jsx("div",{className:"py-fix-sm",children:z.jsx("span",{className:"font-bold",children:o})}),c.map(({hex:u,hue:h,saturation:d,luminance:f},p)=>z.jsx(H.Fragment,{children:z.jsx(QY,{style:{"--color-index":p},placement:l>3?"left-start":"right-start",trigger:z.jsx(cL,{hex:u,hue:h,saturation:d,luminance:f,index:p}),children:z.jsx("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:c.map((g,y)=>z.jsx(H.Fragment,{children:z.jsx(cL,{hex:g.hex,hue:g.hue,saturation:g.saturation,luminance:g.luminance,hideText:!0,children:z.jsx("span",{className:"m-auto",children:Dn.contrast(Dn.hex(u),Dn.hex(g.hex)).toFixed(2)})})},`popover-${o}-${g.hex}-${y}`))})})},`${o}-${u}-${p}`))]},`${o}-header`)})]})]})},q0=H.memo(({label:e,accept:t,onUpload:r,size:n,variant:i,noText:s,tooltip:o})=>{const{t:a}=mr();return z.jsxs("label",{className:"upload-button relative","data-icon":"upload","data-size":n,"data-variant":i,"data-no-text":s,children:[a(e),z.jsx("input",{type:"file",accept:t,className:"absolute w-full h-full",title:"",onChange:l=>{const c=l.target.files;if(c&&c.length>0){const u=new FileReader;u.addEventListener("load",()=>{r(u.result)},!1),u.readAsDataURL(c[0])}}}),o&&z.jsx(Ks,{placement:"bottom",children:a(o)})]})});var xH={exports:{}};(function(e,t){var r={};/*! +`}],q1=({name:e,children:t,actionBar:r,className:n,density:i,navigation:s,withDevMode:o})=>{const{t:l}=mr(),{theme:a,darkMode:c,developerMode:u}=pr(f=>f),[h,d]=H.useState();return B.jsx("div",{className:"contents","data-density":i||"regular",children:B.jsx(h6,{className:n,variant:"fixed",header:B.jsx(c6,{drawerOpen:h,onToggle:()=>d(!h),brand:B.jsxs("div",{className:"db-brand",children:[B.jsx("img",{className:"logo",src:Jm(c&&a.branding.image.dark?a.branding.image.dark:a.branding.image.light),alt:"brand"}),e]}),secondaryAction:r,primaryAction:B.jsxs("div",{className:"flex gap-fix-sm",children:[o&&B.jsxs(Ot,{className:u?"":"opacity-0",icon:"wrench",variant:"ghost",noText:!0,onClick:()=>pr.setState({developerMode:!u}),children:["Developer Mode",B.jsx(Ks,{placement:"bottom",children:l(u?"disableDevMode":"enableDevMode")})]}),B.jsxs(Ot,{variant:"ghost",icon:c?"sun":"moon",noText:!0,className:"p-0 w-siz-md",onClick:()=>{pr.setState({darkMode:!c})},children:[c?"🌞":"🌛",B.jsx(Ks,{placement:"left",children:l(c?"enableLightMode":"enableDarkMode")})]})]}),children:s}),children:t})})},Nxe=()=>{const{t:e}=mr(),{editorMarkup:t}=pr(n=>n);H.useEffect(()=>{Joe.require("ace/ext/language_tools").addCompleter(Fxe())},[]);const r=async()=>{const n=await l_(t,{parser:"babel",plugins:[Ode,Pve,kxe],semi:!1});pr.setState({editorMarkup:n.replace(/\n$/,"").replace(";","")})};return B.jsx(q1,{name:e("editor"),children:B.jsxs("div",{className:"editor w-full h-full grid grid-cols-2 gap-fix-xs p-fix-xs",children:[B.jsxs("div",{className:"flex flex-col gap-fix-xs",children:[B.jsx(yle,{mode:"html",theme:"dracula",onChange:n=>pr.setState({editorMarkup:n}),name:"ace-editor",value:t||"",fontSize:16,showPrintMargin:!0,showGutter:!0,highlightActiveLine:!0,height:"100%",width:"100%",setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,showLineNumbers:!0,useWorker:!1}}),B.jsxs("div",{className:"flex flex-wrap db-density-functional gap-fix-xs",children:[B.jsx(Ot,{icon:"grid_view",onClick:()=>r(),children:e("formatCode")}),B.jsx(aa,{variant:"vertical"}),Ixe.map(n=>B.jsxs(Ot,{icon:"copy",onClick:()=>{navigator.clipboard.writeText(n.content||""),pr.setState({notification:`${n.label} Template copied`})},children:[n.label," Template"]},n.key))]})]}),B.jsx(ls,{className:"rounded-none h-full overflow-auto",children:Z4(t,Xr)})]})})},$a=({label:e,color:t,setColor:r,onAddColor:n,onDelete:i,customColor:s,isAddColor:o,isOrigin:l,setAlternativeColor:a,setAlternativeCustom:c})=>{var $,I,N,L,F,P,_,M,j,R,G,q,ee,Y,X;const{t:u}=mr(),[h,d]=H.useState(t),[f,p]=H.useState(),[g,y]=H.useState(!0),[b,v]=H.useState(o?"":e),{darkMode:E,theme:D,setCustomColors:C,developerMode:w}=pr(Q=>Q),T=H.useCallback(()=>D.branding.alternativeColors[e],[e,D.branding.alternativeColors]),A=H.useCallback(()=>{var Q,te;return l&&((Q=T())==null?void 0:Q.dark)===E?((te=T())==null?void 0:te.hex)??"#ff69b4":t},[l,T,E,t]);return B.jsx("div",{className:"color-picker-container",children:B.jsxs("div",{className:"color-input-container",children:[B.jsxs("button",{"data-icon":o?"plus":void 0,className:"color-tag",style:{"--current-color":l?`var(--db-${e}-on-enabled)`:v4("#fff",t)>=4.5?"#fff":"#000",backgroundColor:A(),color:"var(--current-color)","--db-current-icon-color":"var(--current-color)",borderColor:`var(--db-${e.toLowerCase()}-contrast-high-enabled)`},onClick:()=>p(!0),children:[u(e),!o&&B.jsx(Ks,{placement:"bottom",className:"db-neutral-bg-lvl-1",children:u("adaptColor")})]}),B.jsxs(hf,{backdrop:"weak",open:f,onClose:()=>p(!1),drawerHeader:u("editColor",{colorName:b}),withCloseButton:!0,children:[B.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-md",children:[B.jsx(an,{id:`input-${b}`,label:u("colorName"),required:!0,value:b,disabled:!s,customValidity:s&&(($=D.customColors)!=null&&$[b])&&e!==b?"invalid":"no-validation",message:s&&((I=D.customColors)!=null&&I[b])&&e!==b?u("customColorExists"):void 0,pattern:"[a-zA-Z0-9\\-_]+",onChange:Q=>{v(Q.target.value),y(Q.target.validity.valid)}}),B.jsx(an,{label:u("colorInputPicker"),type:"color",value:o?h:t,onChange:Q=>{o?d(Q.target.value):r&&r(Q.target.value)}}),B.jsx(an,{label:u("colorInputHex"),placeholder:u("colorInputHex"),value:o?h:t,onChange:Q=>{o?d(Q.target.value):r&&r(Q.target.value)}}),l&&(((N=T())==null?void 0:N.custom)||((L=T())==null?void 0:L.hex)!==t)&&B.jsxs("div",{className:"flex flex-col gap-fix-sm mt-fix-lg",children:[B.jsx("h6",{children:u("alternativeBrand")}),!((F=T())!=null&&F.custom&&((P=T())!=null&&P.isValid))&&B.jsx(Mr,{semantic:(_=T())!=null&&_.custom&&!((M=T())!=null&&M.isValid)?"critical":"warning",children:(j=T())!=null&&j.custom&&!((R=T())!=null&&R.isValid)?u("alternativeBrandCritical"):u("alternativeBrandWarning")}),w&&B.jsx(b0,{label:u("alternativeBrandCheckbox"),defaultChecked:(G=T())==null?void 0:G.custom,onChange:Q=>{c&&c(Q.target.checked)}}),B.jsx(an,{label:u("colorInputPicker"),type:"color",value:(q=T())==null?void 0:q.hex,disabled:!((ee=T())!=null&&ee.custom),onChange:Q=>{a&&a(Q.target.value)}}),B.jsx(an,{label:u("colorInputHex"),placeholder:u("colorInputHex"),value:(Y=T())==null?void 0:Y.hex,disabled:!((X=T())!=null&&X.custom),onChange:Q=>{a&&a(Q.target.value)}})]})]}),s&&B.jsxs(B.Fragment,{children:[B.jsx(aa,{}),B.jsxs("div",{className:"ml-auto flex gap-fix-md",children:[!o&&B.jsx(Ot,{icon:"bin",onClick:()=>{i&&i()},children:u("deleteColor")}),B.jsx(Ot,{className:"ml-auto",variant:"brand",disabled:b.length===0||e===b||!g,onClick:()=>{if(o)p(!1),n&&n(b,h),d("#ffffff"),v("");else if(D.customColors){const Q={};Object.keys(D.customColors).forEach(te=>{var Z,de;te===e?Q[b]=((Z=D.customColors)==null?void 0:Z[te])||"":Q[te]=((de=D.customColors)==null?void 0:de[te])||""}),C(Q)}},children:u(o?"addColor":"changeColor")})]})]})]})]})})},Mxe=(e,t,r,n,i,s)=>{var b;const o=s??e[t],l=y4(o)?o:"#ff69b4",a=Hd("neutral",e.neutral,r),c=Hd(t,o,r),u=a.at(0),h=a.at(-1),d=Dn.contrast(Dn.hex(l),Dn.hex((u==null?void 0:u.hex)||"#ff69b4"))<3,f=Dn.contrast(Dn.hex(l),Dn.hex((h==null?void 0:h.hex)||"#ff69b4"))<3;let p=i,g=!0;n||(d&&(p=MI(c,!0,u)),f&&(g=!1,p=MI(c,!1,h)),!d&&!f&&(p=l));const y=Dn.contrast(Dn.hex(p),Dn.hex(((b=a.at(g?-1:0))==null?void 0:b.hex)||"#ff69b4"))<3;return{custom:n,hex:p,dark:g,isValid:y}},Lxe=()=>{const{t:e}=mr(),{setColors:t,theme:r,setAdditionalColors:n,setCustomColors:i,setAlternativeColors:s,luminanceSteps:o}=pr(a=>a),l=H.useCallback(({name:a,altColor:c,custom:u,currentColor:h})=>{var g,y;const d={...r.colors,...r.additionalColors,...r.customColors},f=(y=(g=r==null?void 0:r.branding)==null?void 0:g.alternativeColors)==null?void 0:y[a],p=Mxe(d,a,o,u??(f==null?void 0:f.custom)??!1,c??(f==null?void 0:f.hex),h);s({...r.branding.alternativeColors,[a]:p})},[r.colors,r.additionalColors,r.customColors,r.branding.alternativeColors,s,o]);return B.jsxs(B.Fragment,{children:[B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:e("colors")}),B.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[B.jsx($a,{color:r.colors.neutral,label:"Neutral",setColor:a=>t({...r.colors,neutral:a})}),B.jsx($a,{isOrigin:!0,color:r.colors.brand,label:"brand",setAlternativeCustom:a=>{l({name:"brand",custom:a})},setAlternativeColor:a=>{l({name:"brand",altColor:a})},setColor:a=>{t({...r.colors,brand:a}),l({name:"brand",currentColor:a})}}),B.jsx($a,{color:r.colors.informational,label:"Informational",setColor:a=>t({...r.colors,informational:a})}),B.jsx($a,{color:r.colors.successful,label:"Successful",setColor:a=>t({...r.colors,successful:a})}),B.jsx($a,{color:r.colors.warning,label:"Warning",setColor:a=>t({...r.colors,warning:a})}),B.jsx($a,{color:r.colors.critical,label:"Critical",setColor:a=>t({...r.colors,critical:a})})]})]}),B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:e("additional-colors")}),B.jsx("div",{className:"flex flex-wrap gap-fix-xs",children:Object.entries(r.additionalColors).map(([a,c])=>B.jsx($a,{color:c,label:a,isOrigin:!0,setAlternativeCustom:u=>{l({name:a,custom:u})},setAlternativeColor:u=>{l({name:a,altColor:u})},setColor:u=>{n({...r.additionalColors,[a]:u}),l({name:a,currentColor:u})}},a))})]}),B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:e("custom")}),B.jsxs("div",{className:"flex flex-wrap gap-fix-xs",children:[B.jsx($a,{color:"#ffffff",label:e("addColor"),onAddColor:(a,c)=>{i({...r.customColors,[a]:c}),l({name:a,currentColor:c})},customColor:!0,isAddColor:!0}),r.customColors&&Object.entries(r.customColors).map(([a,c])=>B.jsx($a,{color:c,label:a,isOrigin:!0,setAlternativeCustom:u=>{l({name:a,custom:u})},setAlternativeColor:u=>{l({name:a,altColor:u})},setColor:u=>{i({...r.customColors,[a]:u}),l({name:a,currentColor:u})},customColor:!0,onDelete:()=>{const u={...r.customColors};delete u[a],i(u)}},a))]})]})]})},Hh=["adaptive","neutral","critical","informational","warning","successful"],SD=e=>e.charAt(0).toUpperCase()+e.slice(1),Oxe=[{title:"Button",component:B.jsx("div",{className:"grid grid-cols-5 gap-fix-sm items-center",children:["outlined","filled","ghost","brand"].map(e=>B.jsxs(H.Fragment,{children:[B.jsxs("h6",{children:[SD(e),":"]}),B.jsx(Ot,{variant:e,children:"Default"}),B.jsx(Ot,{variant:e,icon:"user",children:"Icon"}),B.jsx(Ot,{variant:e,disabled:!0,children:"Disabled"}),B.jsx(Ot,{variant:e,size:"small",children:"Small"})]},`button-${e}`))})},{title:"Link",component:B.jsxs(H.Fragment,{children:[B.jsx(hd,{href:"#",children:"Text Link"}),B.jsx(hd,{href:"#",variant:"brand",children:"Brand Text Link"}),B.jsx(hd,{href:"#",disabled:!0,children:"Disabled Link"}),B.jsx(hd,{href:"#",size:"small",children:"Small Link"})]})},{title:"Infotext",component:B.jsxs(H.Fragment,{children:[Hh.map(e=>B.jsx(Mr,{semantic:e,children:SD(e)},`infotext-${e}`)),B.jsx(Mr,{size:"small",children:"Small"})]})},{title:"Tag",component:B.jsxs(H.Fragment,{children:[B.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[B.jsx("h6",{children:"Weak:"}),Hh.map(e=>B.jsxs(uC,{semantic:e,children:["Tag ",e]},`tag-${e}`))]}),B.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[B.jsx("h6",{children:"Strong:"}),Hh.map(e=>B.jsxs(uC,{semantic:e,emphasis:"strong",children:["Tag ",e]},`tag-strong-${e}`))]})]})},{title:"Badge",component:B.jsxs(H.Fragment,{children:[B.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[B.jsx("h6",{children:"Weak:"}),Hh.map(e=>B.jsxs(aC,{semantic:e,children:["Badge ",e]},`badge-${e}`))]}),B.jsxs("div",{className:"flex flex-wrap gap-fix-sm",children:[B.jsx("h6",{children:"Strong:"}),Hh.map(e=>B.jsxs(aC,{semantic:e,emphasis:"strong",children:["Badge ",e]},`badge-strong-${e}`))]})]})},{title:"Notification",component:B.jsxs(H.Fragment,{children:[Hh.map(e=>B.jsx(v0,{semantic:e,variant:"standalone",headline:"Variant",linkVariant:"inline",link:B.jsx("a",{href:"#",children:"Link"}),children:SD(e)},`alert-component-${e}`)),B.jsx(v0,{variant:"docked",icon:"user",headline:"Type",linkVariant:"inline",link:B.jsx("a",{href:"#",children:"Link"}),children:"Docked"})]})},{title:"Input",component:B.jsxs(H.Fragment,{children:[B.jsx(an,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),B.jsx(an,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),B.jsx(an,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Checkbox",component:B.jsxs(H.Fragment,{children:[B.jsx(b0,{name:"checkbox",children:"Checkbox"}),B.jsx(b0,{name:"checkbox",required:!0,children:"Checkbox required"})]})},{title:"Radio",component:B.jsxs(H.Fragment,{children:[B.jsx(lC,{name:"radio",children:"Radio"}),B.jsx(lC,{name:"radio",required:!0,children:"Radio required"})]})},{title:"Select",component:B.jsxs(H.Fragment,{children:[B.jsxs(mc,{variant:"floating",label:"Select",placeholder:"Select",message:"Select Message",disabled:!0,children:[B.jsx("option",{children:"Option1"}),B.jsx("option",{children:"Option2"})]}),B.jsxs(mc,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0,children:[B.jsx("option",{children:"Option1"}),B.jsx("option",{children:"Option2"})]}),B.jsxs(mc,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0,children:[B.jsx("option",{children:"Option1"}),B.jsx("option",{children:"Option2"})]})]})},{title:"Textarea",component:B.jsxs(H.Fragment,{children:[B.jsx(im,{variant:"floating",label:"Disabled",placeholder:"Disabled",message:"Disabled Message",disabled:!0}),B.jsx(im,{variant:"floating",label:"Readonly",placeholder:"Readonly",message:"Readonly Message",readOnly:!0,value:"Readonly"}),B.jsx(im,{variant:"floating",label:"Required",placeholder:"Required",message:"Required Message",required:!0})]})},{title:"Divider",component:B.jsxs(H.Fragment,{children:[B.jsx(aa,{}),B.jsx(aa,{emphasis:"strong"})]})}],Rxe=()=>{const[e,t]=H.useState(""),{t:r}=mr();return B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx(an,{variant:"floating",label:r("search"),placeholder:r("search"),type:"search",onChange:n=>t(n.target.value)}),B.jsx("div",{className:"grid gap-fix-sm",children:Oxe.map(n=>n.title.toLowerCase().includes(e.toLowerCase())?B.jsx(ls,{spacing:"small",children:B.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[B.jsx("h5",{children:n.title}),B.jsx("div",{className:"flex flex-wrap gap-fix-sm items-center",children:n.component})]})},`component-list-${n.title}`):null)})]})},cL=({hue:e,hex:t,saturation:r,luminance:n,children:i,index:s,hideText:o})=>B.jsxs("div",{className:"palette-box gap-fix-md",style:{backgroundColor:t,color:Aie(t)<.4?"#fff":"#000","--color-index":s},children:[i,!o&&B.jsxs("div",{className:"flex flex-col",children:[B.jsxs("span",{className:"whitespace-nowrap",children:["hex: ",t]}),B.jsxs("span",{className:"whitespace-nowrap",children:["hsl: ",Math.round(e),"/",Math.round(r),"/",Math.round(n)]})]})]}),Bxe=()=>{const{luminanceSteps:e,developerMode:t,theme:r}=pr(o=>o),{t:n}=mr(),[i,s]=H.useState({});return H.useEffect(()=>{s({...r.colors,...r.additionalColors,...r.customColors})},[r]),B.jsxs("div",{className:"flex flex-col",children:[t&&B.jsx(an,{label:n("luminanceSteps"),value:e,onChange:o=>{const l=o.target.value.split(",").map(a=>Number(a||0));pr.setState({luminanceSteps:l})}}),B.jsxs("div",{className:"flex gap-fix-2xs",children:[B.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[B.jsx("div",{className:"py-fix-sm",children:B.jsx("span",{className:"font-bold invisible",children:"Palette"})}),e.map((o,l)=>B.jsx("div",{className:"flex items-center",children:B.jsx("span",{className:"font-bold whitespace-nowrap pr-fix-xs md:pr-fix-lg",children:l})},`luminance-step-${o}`))]}),Object.entries(i).filter(([,o])=>y4(o)).map(([o,l],a)=>{const c=Hd(o,l,e);return B.jsxs("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:[B.jsx("div",{className:"py-fix-sm",children:B.jsx("span",{className:"font-bold",children:o})}),c.map(({hex:u,hue:h,saturation:d,luminance:f},p)=>B.jsx(H.Fragment,{children:B.jsx(QY,{style:{"--color-index":p},placement:a>3?"left-start":"right-start",trigger:B.jsx(cL,{hex:u,hue:h,saturation:d,luminance:f,index:p}),children:B.jsx("div",{className:"flex flex-col gap-fix-2xs items-center grid-color-palettes",children:c.map((g,y)=>B.jsx(H.Fragment,{children:B.jsx(cL,{hex:g.hex,hue:g.hue,saturation:g.saturation,luminance:g.luminance,hideText:!0,children:B.jsx("span",{className:"m-auto",children:Dn.contrast(Dn.hex(u),Dn.hex(g.hex)).toFixed(2)})})},`popover-${o}-${g.hex}-${y}`))})})},`${o}-${u}-${p}`))]},`${o}-header`)})]})]})},q0=H.memo(({label:e,accept:t,onUpload:r,size:n,variant:i,noText:s,tooltip:o})=>{const{t:l}=mr();return B.jsxs("label",{className:"upload-button relative","data-icon":"upload","data-size":n,"data-variant":i,"data-no-text":s,children:[l(e),B.jsx("input",{type:"file",accept:t,className:"absolute w-full h-full",title:"",onChange:a=>{const c=a.target.files;if(c&&c.length>0){const u=new FileReader;u.addEventListener("load",()=>{r(u.result)},!1),u.readAsDataURL(c[0])}}}),o&&B.jsx(Ks,{placement:"bottom",children:l(o)})]})});var xH={exports:{}};(function(e,t){var r={};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files @@ -1538,8 +1538,8 @@ slotHeader=" JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/main/LICENSE - */(function(n){e.exports=n()})(function(){return function n(i,s,o){function a(u,h){if(!s[u]){if(!i[u]){var d=typeof Op=="function"&&Op;if(!h&&d)return d(u,!0);if(l)return l(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var p=s[u]={exports:{}};i[u][0].call(p.exports,function(g){var y=i[u][1][g];return a(y||g)},p,p.exports,n,i,s,o)}return s[u].exports}for(var l=typeof Op=="function"&&Op,c=0;c>2,p=(3&u)<<4|h>>4,g=1>6:64,y=2>4,h=(15&f)<<4|(p=l.indexOf(c.charAt(y++)))>>2,d=(3&p)<<6|(g=l.indexOf(c.charAt(y++))),E[b++]=u,p!==64&&(E[b++]=h),g!==64&&(E[b++]=d);return E}},{"./support":30,"./utils":32}],2:[function(n,i,s){var o=n("./external"),a=n("./stream/DataWorker"),l=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(h,d,f,p,g){this.compressedSize=h,this.uncompressedSize=d,this.crc32=f,this.compression=p,this.compressedContent=g}u.prototype={getContentWorker:function(){var h=new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(h,d,f){return h.pipe(new l).pipe(new c("uncompressedSize")).pipe(d.compressWorker(f)).pipe(new c("compressedSize")).withStreamInfo("compression",d)},i.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var o=n("./utils"),a=function(){for(var l,c=[],u=0;u<256;u++){l=u;for(var h=0;h<8;h++)l=1&l?3988292384^l>>>1:l>>>1;c[u]=l}return c}();i.exports=function(l,c){return l!==void 0&&l.length?o.getTypeOf(l)!=="string"?function(u,h,d,f){var p=a,g=f+d;u^=-1;for(var y=f;y>>8^p[255&(u^h[y])];return-1^u}(0|c,l,l.length,0):function(u,h,d,f){var p=a,g=f+d;u^=-1;for(var y=f;y>>8^p[255&(u^h.charCodeAt(y))];return-1^u}(0|c,l,l.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:o}},{lie:37}],7:[function(n,i,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=n("pako"),l=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function h(d,f){c.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=f,this.meta={}}s.magic="\b\0",l.inherits(h,c),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(l.transformTo(u,d.data),!1)},h.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(f){d.push({data:f,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function o(p,g){var y,b="";for(y=0;y>>=8;return b}function a(p,g,y,b,v,E){var D,C,w=p.file,T=p.compression,A=E!==u.utf8encode,$=l.transformTo("string",E(w.name)),I=l.transformTo("string",u.utf8encode(w.name)),N=w.comment,L=l.transformTo("string",E(N)),F=l.transformTo("string",u.utf8encode(N)),P=I.length!==w.name.length,_=F.length!==N.length,M="",B="",R="",G=w.dir,q=w.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};g&&!y||(ee.crc32=p.crc32,ee.compressedSize=p.compressedSize,ee.uncompressedSize=p.uncompressedSize);var Y=0;g&&(Y|=8),A||!P&&!_||(Y|=2048);var X=0,Q=0;G&&(X|=16),v==="UNIX"?(Q=798,X|=function(Z,de){var ke=Z;return Z||(ke=de?16893:33204),(65535&ke)<<16}(w.unixPermissions,G)):(Q=20,X|=function(Z){return 63&(Z||0)}(w.dosPermissions)),D=q.getUTCHours(),D<<=6,D|=q.getUTCMinutes(),D<<=5,D|=q.getUTCSeconds()/2,C=q.getUTCFullYear()-1980,C<<=4,C|=q.getUTCMonth()+1,C<<=5,C|=q.getUTCDate(),P&&(B=o(1,1)+o(h($),4)+I,M+="up"+o(B.length,2)+B),_&&(R=o(1,1)+o(h(L),4)+F,M+="uc"+o(R.length,2)+R);var te="";return te+=` -\0`,te+=o(Y,2),te+=T.magic,te+=o(D,2),te+=o(C,2),te+=o(ee.crc32,4),te+=o(ee.compressedSize,4),te+=o(ee.uncompressedSize,4),te+=o($.length,2),te+=o(M.length,2),{fileRecord:d.LOCAL_FILE_HEADER+te+$+M,dirRecord:d.CENTRAL_FILE_HEADER+o(Q,2)+te+o(L.length,2)+"\0\0\0\0"+o(X,4)+o(b,4)+$+M+L}}var l=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),h=n("../crc32"),d=n("../signature");function f(p,g,y,b){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=y,this.encodeFileName=b,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}l.inherits(f,c),f.prototype.push=function(p){var g=p.meta.percent||0,y=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,c.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:y?(g+100*(y-b-1))/y:100}}))},f.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var g=this.streamFiles&&!p.file.dir;if(g){var y=a(p,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(p){this.accumulate=!1;var g=this.streamFiles&&!p.file.dir,y=a(p,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),g)this.push({data:function(b){return d.DATA_DESCRIPTOR+o(b.crc32,4)+o(b.compressedSize,4)+o(b.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var p=this.bytesWritten,g=0;g=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=l,u},readString:function(l){return o.transformTo("string",this.readData(l))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var l=this.readInt(4);return new Date(Date.UTC(1980+(l>>25&127),(l>>21&15)-1,l>>16&31,l>>11&31,l>>5&63,(31&l)<<1))}},i.exports=a},{"../utils":32}],19:[function(n,i,s){var o=n("./Uint8ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},i.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var o=n("./DataReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.byteAt=function(l){return this.data.charCodeAt(this.zero+l)},a.prototype.lastIndexOfSignature=function(l){return this.data.lastIndexOf(l)-this.zero},a.prototype.readAndCheckSignature=function(l){return l===this.readData(4)},a.prototype.readData=function(l){this.checkOffset(l);var c=this.data.slice(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},i.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var o=n("./ArrayReader");function a(l){o.call(this,l)}n("../utils").inherits(a,o),a.prototype.readData=function(l){if(this.checkOffset(l),l===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+l);return this.index+=l,c},i.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var o=n("../utils"),a=n("../support"),l=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),h=n("./Uint8ArrayReader");i.exports=function(d){var f=o.getTypeOf(d);return o.checkSupport(f),f!=="string"||a.uint8array?f==="nodebuffer"?new u(d):a.uint8array?new h(o.transformTo("uint8array",d)):new l(o.transformTo("array",d)):new c(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var o=n("./GenericWorker"),a=n("../utils");function l(c){o.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(l,o),l.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},i.exports=l},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var o=n("./GenericWorker"),a=n("../crc32");function l(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(l,o),l.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},i.exports=l},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(l,a),l.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}a.prototype.processChunk.call(this,c)},i.exports=l},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var o=n("../utils"),a=n("./GenericWorker");function l(c){a.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(h){u.dataIsReady=!0,u.data=h,u.max=h&&h.length||0,u.type=o.getTypeOf(h),u.isPaused||u._tickAndRepeat()},function(h){u.error(h)})}o.inherits(l,a),l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},l.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},l.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=l},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function o(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,l){return this._listeners[a].push(l),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,l){if(this._listeners[a])for(var c=0;c "+a:a}},i.exports=o},{}],29:[function(n,i,s){var o=n("../utils"),a=n("./ConvertWorker"),l=n("./GenericWorker"),c=n("../base64"),u=n("../support"),h=n("../external"),d=null;if(u.nodestream)try{d=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(g,y){return new h.Promise(function(b,v){var E=[],D=g._internalType,C=g._outputType,w=g._mimeType;g.on("data",function(T,A){E.push(T),y&&y(A)}).on("error",function(T){E=[],v(T)}).on("end",function(){try{var T=function(A,$,I){switch(A){case"blob":return o.newBlob(o.transformTo("arraybuffer",$),I);case"base64":return c.encode($);default:return o.transformTo(A,$)}}(C,function(A,$){var I,N=0,L=null,F=0;for(I=0;I<$.length;I++)F+=$[I].length;switch(A){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":for(L=new Uint8Array(F),I=0;I<$.length;I++)L.set($[I],N),N+=$[I].length;return L;case"nodebuffer":return Buffer.concat($);default:throw new Error("concat : unsupported type '"+A+"'")}}(D,E),w);b(T)}catch(A){v(A)}E=[]}).resume()})}function p(g,y,b){var v=y;switch(y){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=y,this._mimeType=b,o.checkSupport(v),this._worker=g.pipe(new a(v)),g.lock()}catch(E){this._worker=new l("error"),this._worker.error(E)}}p.prototype={accumulate:function(g){return f(this,g)},on:function(g,y){var b=this;return g==="data"?this._worker.on(g,function(v){y.call(b,v.data,v.meta)}):this._worker.on(g,function(){o.delay(y,arguments,b)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},g)}},i.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,i,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(o),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var o=n("./utils"),a=n("./support"),l=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),h=0;h<256;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;u[254]=u[254]=1;function d(){c.call(this,"utf-8 decode"),this.leftOver=null}function f(){c.call(this,"utf-8 encode")}s.utf8encode=function(p){return a.nodebuffer?l.newBufferFrom(p,"utf-8"):function(g){var y,b,v,E,D,C=g.length,w=0;for(E=0;E>>6:(b<65536?y[D++]=224|b>>>12:(y[D++]=240|b>>>18,y[D++]=128|b>>>12&63),y[D++]=128|b>>>6&63),y[D++]=128|63&b);return y}(p)},s.utf8decode=function(p){return a.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(g){var y,b,v,E,D=g.length,C=new Array(2*D);for(y=b=0;y>10&1023,C[b++]=56320|1023&v)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),o.applyFromCharCode(C)}(p=o.transformTo(a.uint8array?"uint8array":"array",p))},o.inherits(d,c),d.prototype.processChunk=function(p){var g=o.transformTo(a.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var y=g;(g=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),g.set(y,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=function(E,D){var C;for((D=D||E.length)>E.length&&(D=E.length),C=D-1;0<=C&&(192&E[C])==128;)C--;return C<0||C===0?D:C+u[E[C]]>D?C:D}(g),v=g;b!==g.length&&(a.uint8array?(v=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(v=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:s.utf8decode(v),meta:p.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(f,c),f.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var o=n("./support"),a=n("./base64"),l=n("./nodejsUtils"),c=n("./external");function u(y){return y}function h(y,b){for(var v=0;v>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var g,y,b,v=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?f[b++]=224|p>>>12:(f[b++]=240|p>>>18,f[b++]=128|p>>>12&63),f[b++]=128|p>>>6&63),f[b++]=128|63&p);return f},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var f=new o.Buf8(d.length),p=0,g=f.length;p>10&1023,E[g++]=56320|1023&y)}return h(E,g)},s.utf8border=function(d,f){var p;for((f=f||d.length)>d.length&&(f=d.length),p=f-1;0<=p&&(192&d[p])==128;)p--;return p<0||p===0?f:p+c[d[p]]>f?p:f}},{"./common":41}],43:[function(n,i,s){i.exports=function(o,a,l,c){for(var u=65535&o|0,h=o>>>16&65535|0,d=0;l!==0;){for(l-=d=2e3>>1:a>>>1;l[c]=a}return l}();i.exports=function(a,l,c,u){var h=o,d=u+c;a^=-1;for(var f=u;f>>8^h[255&(a^l[f])];return-1^a}},{}],46:[function(n,i,s){var o,a=n("../utils/common"),l=n("./trees"),c=n("./adler32"),u=n("./crc32"),h=n("./messages"),d=0,f=4,p=0,g=-2,y=-1,b=4,v=2,E=8,D=9,C=286,w=30,T=19,A=2*C+1,$=15,I=3,N=258,L=N+I+1,F=42,P=113,_=1,M=2,B=3,R=4;function G(V,Ee){return V.msg=h[Ee],Ee}function q(V){return(V<<1)-(4V.avail_out&&(De=V.avail_out),De!==0&&(a.arraySet(V.output,Ee.pending_buf,Ee.pending_out,De,V.next_out),V.next_out+=De,Ee.pending_out+=De,V.total_out+=De,V.avail_out-=De,Ee.pending-=De,Ee.pending===0&&(Ee.pending_out=0))}function X(V,Ee){l._tr_flush_block(V,0<=V.block_start?V.block_start:-1,V.strstart-V.block_start,Ee),V.block_start=V.strstart,Y(V.strm)}function Q(V,Ee){V.pending_buf[V.pending++]=Ee}function te(V,Ee){V.pending_buf[V.pending++]=Ee>>>8&255,V.pending_buf[V.pending++]=255&Ee}function Z(V,Ee){var De,oe,ne=V.max_chain_length,ge=V.strstart,Ie=V.prev_length,_e=V.nice_match,be=V.strstart>V.w_size-L?V.strstart-(V.w_size-L):0,Ne=V.window,Ze=V.w_mask,ce=V.prev,Te=V.strstart+N,Oe=Ne[ge+Ie-1],Ye=Ne[ge+Ie];V.prev_length>=V.good_match&&(ne>>=2),_e>V.lookahead&&(_e=V.lookahead);do if(Ne[(De=Ee)+Ie]===Ye&&Ne[De+Ie-1]===Oe&&Ne[De]===Ne[ge]&&Ne[++De]===Ne[ge+1]){ge+=2,De++;do;while(Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&gebe&&--ne!=0);return Ie<=V.lookahead?Ie:V.lookahead}function de(V){var Ee,De,oe,ne,ge,Ie,_e,be,Ne,Ze,ce=V.w_size;do{if(ne=V.window_size-V.lookahead-V.strstart,V.strstart>=ce+(ce-L)){for(a.arraySet(V.window,V.window,ce,ce,0),V.match_start-=ce,V.strstart-=ce,V.block_start-=ce,Ee=De=V.hash_size;oe=V.head[--Ee],V.head[Ee]=ce<=oe?oe-ce:0,--De;);for(Ee=De=ce;oe=V.prev[--Ee],V.prev[Ee]=ce<=oe?oe-ce:0,--De;);ne+=ce}if(V.strm.avail_in===0)break;if(Ie=V.strm,_e=V.window,be=V.strstart+V.lookahead,Ne=ne,Ze=void 0,Ze=Ie.avail_in,Ne=I)for(ge=V.strstart-V.insert,V.ins_h=V.window[ge],V.ins_h=(V.ins_h<=I&&(V.ins_h=(V.ins_h<=I)if(oe=l._tr_tally(V,V.strstart-V.match_start,V.match_length-I),V.lookahead-=V.match_length,V.match_length<=V.max_lazy_match&&V.lookahead>=I){for(V.match_length--;V.strstart++,V.ins_h=(V.ins_h<=I&&(V.ins_h=(V.ins_h<=I&&V.match_length<=V.prev_length){for(ne=V.strstart+V.lookahead-I,oe=l._tr_tally(V,V.strstart-1-V.prev_match,V.prev_length-I),V.lookahead-=V.prev_length-1,V.prev_length-=2;++V.strstart<=ne&&(V.ins_h=(V.ins_h<V.pending_buf_size-5&&(De=V.pending_buf_size-5);;){if(V.lookahead<=1){if(de(V),V.lookahead===0&&Ee===d)return _;if(V.lookahead===0)break}V.strstart+=V.lookahead,V.lookahead=0;var oe=V.block_start+De;if((V.strstart===0||V.strstart>=oe)&&(V.lookahead=V.strstart-oe,V.strstart=oe,X(V,!1),V.strm.avail_out===0)||V.strstart-V.block_start>=V.w_size-L&&(X(V,!1),V.strm.avail_out===0))return _}return V.insert=0,Ee===f?(X(V,!0),V.strm.avail_out===0?B:R):(V.strstart>V.block_start&&(X(V,!1),V.strm.avail_out),_)}),new Fe(4,4,8,4,ke),new Fe(4,5,16,8,ke),new Fe(4,6,32,32,ke),new Fe(4,4,16,16,me),new Fe(8,16,32,32,me),new Fe(8,16,128,128,me),new Fe(8,32,128,256,me),new Fe(32,128,258,1024,me),new Fe(32,258,258,4096,me)],s.deflateInit=function(V,Ee){return Pt(V,Ee,E,15,8,0)},s.deflateInit2=Pt,s.deflateReset=$t,s.deflateResetKeep=Xe,s.deflateSetHeader=function(V,Ee){return V&&V.state?V.state.wrap!==2?g:(V.state.gzhead=Ee,p):g},s.deflate=function(V,Ee){var De,oe,ne,ge;if(!V||!V.state||5>8&255),Q(oe,oe.gzhead.time>>16&255),Q(oe,oe.gzhead.time>>24&255),Q(oe,oe.level===9?2:2<=oe.strategy||oe.level<2?4:0),Q(oe,255&oe.gzhead.os),oe.gzhead.extra&&oe.gzhead.extra.length&&(Q(oe,255&oe.gzhead.extra.length),Q(oe,oe.gzhead.extra.length>>8&255)),oe.gzhead.hcrc&&(V.adler=u(V.adler,oe.pending_buf,oe.pending,0)),oe.gzindex=0,oe.status=69):(Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,oe.level===9?2:2<=oe.strategy||oe.level<2?4:0),Q(oe,3),oe.status=P);else{var Ie=E+(oe.w_bits-8<<4)<<8;Ie|=(2<=oe.strategy||oe.level<2?0:oe.level<6?1:oe.level===6?2:3)<<6,oe.strstart!==0&&(Ie|=32),Ie+=31-Ie%31,oe.status=P,te(oe,Ie),oe.strstart!==0&&(te(oe,V.adler>>>16),te(oe,65535&V.adler)),V.adler=1}if(oe.status===69)if(oe.gzhead.extra){for(ne=oe.pending;oe.gzindex<(65535&oe.gzhead.extra.length)&&(oe.pending!==oe.pending_buf_size||(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending!==oe.pending_buf_size));)Q(oe,255&oe.gzhead.extra[oe.gzindex]),oe.gzindex++;oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),oe.gzindex===oe.gzhead.extra.length&&(oe.gzindex=0,oe.status=73)}else oe.status=73;if(oe.status===73)if(oe.gzhead.name){ne=oe.pending;do{if(oe.pending===oe.pending_buf_size&&(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending===oe.pending_buf_size)){ge=1;break}ge=oe.gzindexne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),ge===0&&(oe.gzindex=0,oe.status=91)}else oe.status=91;if(oe.status===91)if(oe.gzhead.comment){ne=oe.pending;do{if(oe.pending===oe.pending_buf_size&&(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending===oe.pending_buf_size)){ge=1;break}ge=oe.gzindexne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),ge===0&&(oe.status=103)}else oe.status=103;if(oe.status===103&&(oe.gzhead.hcrc?(oe.pending+2>oe.pending_buf_size&&Y(V),oe.pending+2<=oe.pending_buf_size&&(Q(oe,255&V.adler),Q(oe,V.adler>>8&255),V.adler=0,oe.status=P)):oe.status=P),oe.pending!==0){if(Y(V),V.avail_out===0)return oe.last_flush=-1,p}else if(V.avail_in===0&&q(Ee)<=q(De)&&Ee!==f)return G(V,-5);if(oe.status===666&&V.avail_in!==0)return G(V,-5);if(V.avail_in!==0||oe.lookahead!==0||Ee!==d&&oe.status!==666){var _e=oe.strategy===2?function(be,Ne){for(var Ze;;){if(be.lookahead===0&&(de(be),be.lookahead===0)){if(Ne===d)return _;break}if(be.match_length=0,Ze=l._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++,Ze&&(X(be,!1),be.strm.avail_out===0))return _}return be.insert=0,Ne===f?(X(be,!0),be.strm.avail_out===0?B:R):be.last_lit&&(X(be,!1),be.strm.avail_out===0)?_:M}(oe,Ee):oe.strategy===3?function(be,Ne){for(var Ze,ce,Te,Oe,Ye=be.window;;){if(be.lookahead<=N){if(de(be),be.lookahead<=N&&Ne===d)return _;if(be.lookahead===0)break}if(be.match_length=0,be.lookahead>=I&&0be.lookahead&&(be.match_length=be.lookahead)}if(be.match_length>=I?(Ze=l._tr_tally(be,1,be.match_length-I),be.lookahead-=be.match_length,be.strstart+=be.match_length,be.match_length=0):(Ze=l._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++),Ze&&(X(be,!1),be.strm.avail_out===0))return _}return be.insert=0,Ne===f?(X(be,!0),be.strm.avail_out===0?B:R):be.last_lit&&(X(be,!1),be.strm.avail_out===0)?_:M}(oe,Ee):o[oe.level].func(oe,Ee);if(_e!==B&&_e!==R||(oe.status=666),_e===_||_e===B)return V.avail_out===0&&(oe.last_flush=-1),p;if(_e===M&&(Ee===1?l._tr_align(oe):Ee!==5&&(l._tr_stored_block(oe,0,0,!1),Ee===3&&(ee(oe.head),oe.lookahead===0&&(oe.strstart=0,oe.block_start=0,oe.insert=0))),Y(V),V.avail_out===0))return oe.last_flush=-1,p}return Ee!==f?p:oe.wrap<=0?1:(oe.wrap===2?(Q(oe,255&V.adler),Q(oe,V.adler>>8&255),Q(oe,V.adler>>16&255),Q(oe,V.adler>>24&255),Q(oe,255&V.total_in),Q(oe,V.total_in>>8&255),Q(oe,V.total_in>>16&255),Q(oe,V.total_in>>24&255)):(te(oe,V.adler>>>16),te(oe,65535&V.adler)),Y(V),0=De.w_size&&(ge===0&&(ee(De.head),De.strstart=0,De.block_start=0,De.insert=0),Ne=new a.Buf8(De.w_size),a.arraySet(Ne,Ee,Ze-De.w_size,De.w_size,0),Ee=Ne,Ze=De.w_size),Ie=V.avail_in,_e=V.next_in,be=V.input,V.avail_in=Ze,V.next_in=0,V.input=Ee,de(De);De.lookahead>=I;){for(oe=De.strstart,ne=De.lookahead-(I-1);De.ins_h=(De.ins_h<>>=I=$>>>24,D-=I,(I=$>>>16&255)===0)M[h++]=65535&$;else{if(!(16&I)){if(!(64&I)){$=C[(65535&$)+(E&(1<>>=I,D-=I),D<15&&(E+=_[c++]<>>=I=$>>>24,D-=I,!(16&(I=$>>>16&255))){if(!(64&I)){$=w[(65535&$)+(E&(1<>>=I,D-=I,(I=h-d)>3,E&=(1<<(D-=N<<3))-1,o.next_in=c,o.next_out=h,o.avail_in=c>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function E(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(F){var P;return F&&F.state?(P=F.state,F.total_in=F.total_out=P.total=0,F.msg="",P.wrap&&(F.adler=1&P.wrap),P.mode=g,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new o.Buf32(y),P.distcode=P.distdyn=new o.Buf32(b),P.sane=1,P.back=-1,f):p}function C(F){var P;return F&&F.state?((P=F.state).wsize=0,P.whave=0,P.wnext=0,D(F)):p}function w(F,P){var _,M;return F&&F.state?(M=F.state,P<0?(_=0,P=-P):(_=1+(P>>4),P<48&&(P&=15)),P&&(P<8||15=R.wsize?(o.arraySet(R.window,P,_-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(M<(B=R.wsize-R.wnext)&&(B=M),o.arraySet(R.window,P,_-M,B,R.wnext),(M-=B)?(o.arraySet(R.window,P,_-M,M,0),R.wnext=M,R.whave=R.wsize):(R.wnext+=B,R.wnext===R.wsize&&(R.wnext=0),R.whave>>8&255,_.check=l(_.check,ge,2,0),X=Y=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&Y)<<8)+(Y>>8))%31){F.msg="incorrect header check",_.mode=30;break}if((15&Y)!=8){F.msg="unknown compression method",_.mode=30;break}if(X-=4,V=8+(15&(Y>>>=4)),_.wbits===0)_.wbits=V;else if(V>_.wbits){F.msg="invalid window size",_.mode=30;break}_.dmax=1<>8&1),512&_.flags&&(ge[0]=255&Y,ge[1]=Y>>>8&255,_.check=l(_.check,ge,2,0)),X=Y=0,_.mode=3;case 3:for(;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>8&255,ge[2]=Y>>>16&255,ge[3]=Y>>>24&255,_.check=l(_.check,ge,4,0)),X=Y=0,_.mode=4;case 4:for(;X<16;){if(q===0)break e;q--,Y+=M[R++]<>8),512&_.flags&&(ge[0]=255&Y,ge[1]=Y>>>8&255,_.check=l(_.check,ge,2,0)),X=Y=0,_.mode=5;case 5:if(1024&_.flags){for(;X<16;){if(q===0)break e;q--,Y+=M[R++]<>>8&255,_.check=l(_.check,ge,2,0)),X=Y=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(q<(Z=_.length)&&(Z=q),Z&&(_.head&&(V=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),o.arraySet(_.head.extra,M,R,Z,V)),512&_.flags&&(_.check=l(_.check,M,Z,R)),q-=Z,R+=Z,_.length-=Z),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(q===0)break e;for(Z=0;V=M[R+Z++],_.head&&V&&_.length<65536&&(_.head.name+=String.fromCharCode(V)),V&&Z>9&1,_.head.done=!0),F.adler=_.check=0,_.mode=12;break;case 10:for(;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>=7&X,X-=7&X,_.mode=27;break}for(;X<3;){if(q===0)break e;q--,Y+=M[R++]<>>=1)){case 0:_.mode=14;break;case 1:if(N(_),_.mode=20,P!==6)break;Y>>>=2,X-=2;break e;case 2:_.mode=17;break;case 3:F.msg="invalid block type",_.mode=30}Y>>>=2,X-=2;break;case 14:for(Y>>>=7&X,X-=7&X;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>16^65535)){F.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&Y,X=Y=0,_.mode=15,P===6)break e;case 15:_.mode=16;case 16:if(Z=_.length){if(q>>=5,X-=5,_.ndist=1+(31&Y),Y>>>=5,X-=5,_.ncode=4+(15&Y),Y>>>=4,X-=4,286<_.nlen||30<_.ndist){F.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;X<3;){if(q===0)break e;q--,Y+=M[R++]<>>=3,X-=3}for(;_.have<19;)_.lens[Ie[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,De={bits:_.lenbits},Ee=u(0,_.lens,0,19,_.lencode,0,_.work,De),_.lenbits=De.bits,Ee){F.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;Fe=(ne=_.lencode[Y&(1<<_.lenbits)-1])>>>16&255,ze=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=me,X-=me,_.lens[_.have++]=ze;else{if(ze===16){for(oe=me+2;X>>=me,X-=me,_.have===0){F.msg="invalid bit length repeat",_.mode=30;break}V=_.lens[_.have-1],Z=3+(3&Y),Y>>>=2,X-=2}else if(ze===17){for(oe=me+3;X>>=me)),Y>>>=3,X-=3}else{for(oe=me+7;X>>=me)),Y>>>=7,X-=7}if(_.have+Z>_.nlen+_.ndist){F.msg="invalid bit length repeat",_.mode=30;break}for(;Z--;)_.lens[_.have++]=V}}if(_.mode===30)break;if(_.lens[256]===0){F.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,De={bits:_.lenbits},Ee=u(h,_.lens,0,_.nlen,_.lencode,0,_.work,De),_.lenbits=De.bits,Ee){F.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,De={bits:_.distbits},Ee=u(d,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,De),_.distbits=De.bits,Ee){F.msg="invalid distances set",_.mode=30;break}if(_.mode=20,P===6)break e;case 20:_.mode=21;case 21:if(6<=q&&258<=ee){F.next_out=G,F.avail_out=ee,F.next_in=R,F.avail_in=q,_.hold=Y,_.bits=X,c(F,te),G=F.next_out,B=F.output,ee=F.avail_out,R=F.next_in,M=F.input,q=F.avail_in,Y=_.hold,X=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;Fe=(ne=_.lencode[Y&(1<<_.lenbits)-1])>>>16&255,ze=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>Xe)])>>>16&255,ze=65535&ne,!(Xe+(me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=Xe,X-=Xe,_.back+=Xe}if(Y>>>=me,X-=me,_.back+=me,_.length=ze,Fe===0){_.mode=26;break}if(32&Fe){_.back=-1,_.mode=12;break}if(64&Fe){F.msg="invalid literal/length code",_.mode=30;break}_.extra=15&Fe,_.mode=22;case 22:if(_.extra){for(oe=_.extra;X>>=_.extra,X-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;Fe=(ne=_.distcode[Y&(1<<_.distbits)-1])>>>16&255,ze=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>Xe)])>>>16&255,ze=65535&ne,!(Xe+(me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=Xe,X-=Xe,_.back+=Xe}if(Y>>>=me,X-=me,_.back+=me,64&Fe){F.msg="invalid distance code",_.mode=30;break}_.offset=ze,_.extra=15&Fe,_.mode=24;case 24:if(_.extra){for(oe=_.extra;X>>=_.extra,X-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){F.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(ee===0)break e;if(Z=te-ee,_.offset>Z){if((Z=_.offset-Z)>_.whave&&_.sane){F.msg="invalid distance too far back",_.mode=30;break}de=Z>_.wnext?(Z-=_.wnext,_.wsize-Z):_.wnext-Z,Z>_.length&&(Z=_.length),ke=_.window}else ke=B,de=G-_.offset,Z=_.length;for(eeA?(I=de[ke+b[P]],X[Q+b[P]]):(I=96,0),E=1<>G)+(D-=E)]=$<<24|I<<16|N|0,D!==0;);for(E=1<>=1;if(E!==0?(Y&=E-1,Y+=E):Y=0,P++,--te[F]==0){if(F===M)break;F=d[f+b[P]]}if(B>>7)]}function Q(ne,ge){ne.pending_buf[ne.pending++]=255&ge,ne.pending_buf[ne.pending++]=ge>>>8&255}function te(ne,ge,Ie){ne.bi_valid>v-Ie?(ne.bi_buf|=ge<>v-ne.bi_valid,ne.bi_valid+=Ie-v):(ne.bi_buf|=ge<>>=1,Ie<<=1,0<--ge;);return Ie>>>1}function ke(ne,ge,Ie){var _e,be,Ne=new Array(b+1),Ze=0;for(_e=1;_e<=b;_e++)Ne[_e]=Ze=Ze+Ie[_e-1]<<1;for(be=0;be<=ge;be++){var ce=ne[2*be+1];ce!==0&&(ne[2*be]=de(Ne[ce]++,ce))}}function me(ne){var ge;for(ge=0;ge>1;1<=Ie;Ie--)Xe(ne,Ne,Ie);for(be=Te;Ie=ne.heap[1],ne.heap[1]=ne.heap[ne.heap_len--],Xe(ne,Ne,1),_e=ne.heap[1],ne.heap[--ne.heap_max]=Ie,ne.heap[--ne.heap_max]=_e,Ne[2*be]=Ne[2*Ie]+Ne[2*_e],ne.depth[be]=(ne.depth[Ie]>=ne.depth[_e]?ne.depth[Ie]:ne.depth[_e])+1,Ne[2*Ie+1]=Ne[2*_e+1]=be,ne.heap[1]=be++,Xe(ne,Ne,1),2<=ne.heap_len;);ne.heap[--ne.heap_max]=ne.heap[1],function(Ye,Dt){var St,Nt,_t,yt,Ft,Rt,sr=Dt.dyn_tree,tn=Dt.max_code,ys=Dt.stat_desc.static_tree,Zn=Dt.stat_desc.has_stree,Er=Dt.stat_desc.extra_bits,Ln=Dt.stat_desc.extra_base,On=Dt.stat_desc.max_length,Qn=0;for(yt=0;yt<=b;yt++)Ye.bl_count[yt]=0;for(sr[2*Ye.heap[Ye.heap_max]+1]=0,St=Ye.heap_max+1;St>=7;be>>=1)if(1&Oe&&ce.dyn_ltree[2*Te]!==0)return a;if(ce.dyn_ltree[18]!==0||ce.dyn_ltree[20]!==0||ce.dyn_ltree[26]!==0)return l;for(Te=32;Te>>3,(Ne=ne.static_len+3+7>>>3)<=be&&(be=Ne)):be=Ne=Ie+5,Ie+4<=be&&ge!==-1?oe(ne,ge,Ie,_e):ne.strategy===4||Ne===be?(te(ne,2+(_e?1:0),3),$t(ne,L,F)):(te(ne,4+(_e?1:0),3),function(ce,Te,Oe,Ye){var Dt;for(te(ce,Te-257,5),te(ce,Oe-1,5),te(ce,Ye-4,4),Dt=0;Dt>>8&255,ne.pending_buf[ne.d_buf+2*ne.last_lit+1]=255&ge,ne.pending_buf[ne.l_buf+ne.last_lit]=255&Ie,ne.last_lit++,ge===0?ne.dyn_ltree[2*Ie]++:(ne.matches++,ge--,ne.dyn_ltree[2*(_[Ie]+d+1)]++,ne.dyn_dtree[2*X(ge)]++),ne.last_lit===ne.lit_bufsize-1},s._tr_align=function(ne){te(ne,2,3),Z(ne,D,L),function(ge){ge.bi_valid===16?(Q(ge,ge.bi_buf),ge.bi_buf=0,ge.bi_valid=0):8<=ge.bi_valid&&(ge.pending_buf[ge.pending++]=255&ge.bi_buf,ge.bi_buf>>=8,ge.bi_valid-=8)}(ne)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(o){(function(a,l){if(!a.setImmediate){var c,u,h,d,f=1,p={},g=!1,y=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,c={}.toString.call(a.process)==="[object process]"?function(C){process.nextTick(function(){E(C)})}:function(){if(a.postMessage&&!a.importScripts){var C=!0,w=a.onmessage;return a.onmessage=function(){C=!1},a.postMessage("","*"),a.onmessage=w,C}}()?(d="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",D,!1):a.attachEvent("onmessage",D),function(C){a.postMessage(d+C,"*")}):a.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){E(C.data)},function(C){h.port2.postMessage(C)}):y&&"onreadystatechange"in y.createElement("script")?(u=y.documentElement,function(C){var w=y.createElement("script");w.onreadystatechange=function(){E(C),w.onreadystatechange=null,u.removeChild(w),w=null},u.appendChild(w)}):function(C){setTimeout(E,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var w=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(xH);var zxe=xH.exports;const wH=uo(zxe),hL=e=>`# Custom Theme for Web + */(function(n){e.exports=n()})(function(){return function n(i,s,o){function l(u,h){if(!s[u]){if(!i[u]){var d=typeof Op=="function"&&Op;if(!h&&d)return d(u,!0);if(a)return a(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var p=s[u]={exports:{}};i[u][0].call(p.exports,function(g){var y=i[u][1][g];return l(y||g)},p,p.exports,n,i,s,o)}return s[u].exports}for(var a=typeof Op=="function"&&Op,c=0;c>2,p=(3&u)<<4|h>>4,g=1>6:64,y=2>4,h=(15&f)<<4|(p=a.indexOf(c.charAt(y++)))>>2,d=(3&p)<<6|(g=a.indexOf(c.charAt(y++))),E[b++]=u,p!==64&&(E[b++]=h),g!==64&&(E[b++]=d);return E}},{"./support":30,"./utils":32}],2:[function(n,i,s){var o=n("./external"),l=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function u(h,d,f,p,g){this.compressedSize=h,this.uncompressedSize=d,this.crc32=f,this.compression=p,this.compressedContent=g}u.prototype={getContentWorker:function(){var h=new l(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),d=this;return h.on("end",function(){if(this.streamInfo.data_length!==d.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new l(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},u.createWorkerFrom=function(h,d,f){return h.pipe(new a).pipe(new c("uncompressedSize")).pipe(d.compressWorker(f)).pipe(new c("compressedSize")).withStreamInfo("compression",d)},i.exports=u},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,i,s){var o=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,i,s){var o=n("./utils"),l=function(){for(var a,c=[],u=0;u<256;u++){a=u;for(var h=0;h<8;h++)a=1&a?3988292384^a>>>1:a>>>1;c[u]=a}return c}();i.exports=function(a,c){return a!==void 0&&a.length?o.getTypeOf(a)!=="string"?function(u,h,d,f){var p=l,g=f+d;u^=-1;for(var y=f;y>>8^p[255&(u^h[y])];return-1^u}(0|c,a,a.length,0):function(u,h,d,f){var p=l,g=f+d;u^=-1;for(var y=f;y>>8^p[255&(u^h.charCodeAt(y))];return-1^u}(0|c,a,a.length,0):0}},{"./utils":32}],5:[function(n,i,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,i,s){var o=null;o=typeof Promise<"u"?Promise:n("lie"),i.exports={Promise:o}},{lie:37}],7:[function(n,i,s){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",l=n("pako"),a=n("./utils"),c=n("./stream/GenericWorker"),u=o?"uint8array":"array";function h(d,f){c.call(this,"FlateWorker/"+d),this._pako=null,this._pakoAction=d,this._pakoOptions=f,this.meta={}}s.magic="\b\0",a.inherits(h,c),h.prototype.processChunk=function(d){this.meta=d.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(u,d.data),!1)},h.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var d=this;this._pako.onData=function(f){d.push({data:f,meta:d.meta})}},s.compressWorker=function(d){return new h("Deflate",d)},s.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,i,s){function o(p,g){var y,b="";for(y=0;y>>=8;return b}function l(p,g,y,b,v,E){var D,C,w=p.file,T=p.compression,A=E!==u.utf8encode,$=a.transformTo("string",E(w.name)),I=a.transformTo("string",u.utf8encode(w.name)),N=w.comment,L=a.transformTo("string",E(N)),F=a.transformTo("string",u.utf8encode(N)),P=I.length!==w.name.length,_=F.length!==N.length,M="",j="",R="",G=w.dir,q=w.date,ee={crc32:0,compressedSize:0,uncompressedSize:0};g&&!y||(ee.crc32=p.crc32,ee.compressedSize=p.compressedSize,ee.uncompressedSize=p.uncompressedSize);var Y=0;g&&(Y|=8),A||!P&&!_||(Y|=2048);var X=0,Q=0;G&&(X|=16),v==="UNIX"?(Q=798,X|=function(Z,de){var ke=Z;return Z||(ke=de?16893:33204),(65535&ke)<<16}(w.unixPermissions,G)):(Q=20,X|=function(Z){return 63&(Z||0)}(w.dosPermissions)),D=q.getUTCHours(),D<<=6,D|=q.getUTCMinutes(),D<<=5,D|=q.getUTCSeconds()/2,C=q.getUTCFullYear()-1980,C<<=4,C|=q.getUTCMonth()+1,C<<=5,C|=q.getUTCDate(),P&&(j=o(1,1)+o(h($),4)+I,M+="up"+o(j.length,2)+j),_&&(R=o(1,1)+o(h(L),4)+F,M+="uc"+o(R.length,2)+R);var te="";return te+=` +\0`,te+=o(Y,2),te+=T.magic,te+=o(D,2),te+=o(C,2),te+=o(ee.crc32,4),te+=o(ee.compressedSize,4),te+=o(ee.uncompressedSize,4),te+=o($.length,2),te+=o(M.length,2),{fileRecord:d.LOCAL_FILE_HEADER+te+$+M,dirRecord:d.CENTRAL_FILE_HEADER+o(Q,2)+te+o(L.length,2)+"\0\0\0\0"+o(X,4)+o(b,4)+$+M+L}}var a=n("../utils"),c=n("../stream/GenericWorker"),u=n("../utf8"),h=n("../crc32"),d=n("../signature");function f(p,g,y,b){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=y,this.encodeFileName=b,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(f,c),f.prototype.push=function(p){var g=p.meta.percent||0,y=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,c.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:y?(g+100*(y-b-1))/y:100}}))},f.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var g=this.streamFiles&&!p.file.dir;if(g){var y=l(p,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:y.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(p){this.accumulate=!1;var g=this.streamFiles&&!p.file.dir,y=l(p,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(y.dirRecord),g)this.push({data:function(b){return d.DATA_DESCRIPTOR+o(b.crc32,4)+o(b.compressedSize,4)+o(b.uncompressedSize,4)}(p),meta:{percent:100}});else for(this.push({data:y.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var p=this.bytesWritten,g=0;g=this.index;c--)u=(u<<8)+this.byteAt(c);return this.index+=a,u},readString:function(a){return o.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},i.exports=l},{"../utils":32}],19:[function(n,i,s){var o=n("./Uint8ArrayReader");function l(a){o.call(this,a)}n("../utils").inherits(l,o),l.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},i.exports=l},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,i,s){var o=n("./DataReader");function l(a){o.call(this,a)}n("../utils").inherits(l,o),l.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},l.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},l.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},l.prototype.readData=function(a){this.checkOffset(a);var c=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},i.exports=l},{"../utils":32,"./DataReader":18}],21:[function(n,i,s){var o=n("./ArrayReader");function l(a){o.call(this,a)}n("../utils").inherits(l,o),l.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,c},i.exports=l},{"../utils":32,"./ArrayReader":17}],22:[function(n,i,s){var o=n("../utils"),l=n("../support"),a=n("./ArrayReader"),c=n("./StringReader"),u=n("./NodeBufferReader"),h=n("./Uint8ArrayReader");i.exports=function(d){var f=o.getTypeOf(d);return o.checkSupport(f),f!=="string"||l.uint8array?f==="nodebuffer"?new u(d):l.uint8array?new h(o.transformTo("uint8array",d)):new a(o.transformTo("array",d)):new c(d)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,i,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,i,s){var o=n("./GenericWorker"),l=n("../utils");function a(c){o.call(this,"ConvertWorker to "+c),this.destType=c}l.inherits(a,o),a.prototype.processChunk=function(c){this.push({data:l.transformTo(this.destType,c.data),meta:c.meta})},i.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,i,s){var o=n("./GenericWorker"),l=n("../crc32");function a(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,o),a.prototype.processChunk=function(c){this.streamInfo.crc32=l(c.data,this.streamInfo.crc32||0),this.push(c)},i.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,i,s){var o=n("../utils"),l=n("./GenericWorker");function a(c){l.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}o.inherits(a,l),a.prototype.processChunk=function(c){if(c){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+c.data.length}l.prototype.processChunk.call(this,c)},i.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,i,s){var o=n("../utils"),l=n("./GenericWorker");function a(c){l.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(h){u.dataIsReady=!0,u.data=h,u.max=h&&h.length||0,u.type=o.getTypeOf(h),u.isPaused||u._tickAndRepeat()},function(h){u.error(h)})}o.inherits(a,l),a.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,u);break;case"uint8array":c=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":c=this.data.slice(this.index,u)}return this.index=u,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,i,s){function o(l){this.name=l||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(l){this.emit("data",l)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(l){this.emit("error",l)}return!0},error:function(l){return!this.isFinished&&(this.isPaused?this.generatedError=l:(this.isFinished=!0,this.emit("error",l),this.previous&&this.previous.error(l),this.cleanUp()),!0)},on:function(l,a){return this._listeners[l].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(l,a){if(this._listeners[l])for(var c=0;c "+l:l}},i.exports=o},{}],29:[function(n,i,s){var o=n("../utils"),l=n("./ConvertWorker"),a=n("./GenericWorker"),c=n("../base64"),u=n("../support"),h=n("../external"),d=null;if(u.nodestream)try{d=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function f(g,y){return new h.Promise(function(b,v){var E=[],D=g._internalType,C=g._outputType,w=g._mimeType;g.on("data",function(T,A){E.push(T),y&&y(A)}).on("error",function(T){E=[],v(T)}).on("end",function(){try{var T=function(A,$,I){switch(A){case"blob":return o.newBlob(o.transformTo("arraybuffer",$),I);case"base64":return c.encode($);default:return o.transformTo(A,$)}}(C,function(A,$){var I,N=0,L=null,F=0;for(I=0;I<$.length;I++)F+=$[I].length;switch(A){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":for(L=new Uint8Array(F),I=0;I<$.length;I++)L.set($[I],N),N+=$[I].length;return L;case"nodebuffer":return Buffer.concat($);default:throw new Error("concat : unsupported type '"+A+"'")}}(D,E),w);b(T)}catch(A){v(A)}E=[]}).resume()})}function p(g,y,b){var v=y;switch(y){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=y,this._mimeType=b,o.checkSupport(v),this._worker=g.pipe(new l(v)),g.lock()}catch(E){this._worker=new a("error"),this._worker.error(E)}}p.prototype={accumulate:function(g){return f(this,g)},on:function(g,y){var b=this;return g==="data"?this._worker.on(g,function(v){y.call(b,v.data,v.meta)}):this._worker.on(g,function(){o.delay(y,arguments,b)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new d(this,{objectMode:this._outputType!=="nodebuffer"},g)}},i.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,i,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var o=new ArrayBuffer(0);try{s.blob=new Blob([o],{type:"application/zip"}).size===0}catch{try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);l.append(o),s.blob=l.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,i,s){for(var o=n("./utils"),l=n("./support"),a=n("./nodejsUtils"),c=n("./stream/GenericWorker"),u=new Array(256),h=0;h<256;h++)u[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;u[254]=u[254]=1;function d(){c.call(this,"utf-8 decode"),this.leftOver=null}function f(){c.call(this,"utf-8 encode")}s.utf8encode=function(p){return l.nodebuffer?a.newBufferFrom(p,"utf-8"):function(g){var y,b,v,E,D,C=g.length,w=0;for(E=0;E>>6:(b<65536?y[D++]=224|b>>>12:(y[D++]=240|b>>>18,y[D++]=128|b>>>12&63),y[D++]=128|b>>>6&63),y[D++]=128|63&b);return y}(p)},s.utf8decode=function(p){return l.nodebuffer?o.transformTo("nodebuffer",p).toString("utf-8"):function(g){var y,b,v,E,D=g.length,C=new Array(2*D);for(y=b=0;y>10&1023,C[b++]=56320|1023&v)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),o.applyFromCharCode(C)}(p=o.transformTo(l.uint8array?"uint8array":"array",p))},o.inherits(d,c),d.prototype.processChunk=function(p){var g=o.transformTo(l.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var y=g;(g=new Uint8Array(y.length+this.leftOver.length)).set(this.leftOver,0),g.set(y,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=function(E,D){var C;for((D=D||E.length)>E.length&&(D=E.length),C=D-1;0<=C&&(192&E[C])==128;)C--;return C<0||C===0?D:C+u[E[C]]>D?C:D}(g),v=g;b!==g.length&&(l.uint8array?(v=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(v=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:s.utf8decode(v),meta:p.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=d,o.inherits(f,c),f.prototype.processChunk=function(p){this.push({data:s.utf8encode(p.data),meta:p.meta})},s.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,i,s){var o=n("./support"),l=n("./base64"),a=n("./nodejsUtils"),c=n("./external");function u(y){return y}function h(y,b){for(var v=0;v>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=o(this.extraFields[1].value);this.uncompressedSize===l.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===l.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var g,y,b,v=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4>>6:(p<65536?f[b++]=224|p>>>12:(f[b++]=240|p>>>18,f[b++]=128|p>>>12&63),f[b++]=128|p>>>6&63),f[b++]=128|63&p);return f},s.buf2binstring=function(d){return h(d,d.length)},s.binstring2buf=function(d){for(var f=new o.Buf8(d.length),p=0,g=f.length;p>10&1023,E[g++]=56320|1023&y)}return h(E,g)},s.utf8border=function(d,f){var p;for((f=f||d.length)>d.length&&(f=d.length),p=f-1;0<=p&&(192&d[p])==128;)p--;return p<0||p===0?f:p+c[d[p]]>f?p:f}},{"./common":41}],43:[function(n,i,s){i.exports=function(o,l,a,c){for(var u=65535&o|0,h=o>>>16&65535|0,d=0;a!==0;){for(a-=d=2e3>>1:l>>>1;a[c]=l}return a}();i.exports=function(l,a,c,u){var h=o,d=u+c;l^=-1;for(var f=u;f>>8^h[255&(l^a[f])];return-1^l}},{}],46:[function(n,i,s){var o,l=n("../utils/common"),a=n("./trees"),c=n("./adler32"),u=n("./crc32"),h=n("./messages"),d=0,f=4,p=0,g=-2,y=-1,b=4,v=2,E=8,D=9,C=286,w=30,T=19,A=2*C+1,$=15,I=3,N=258,L=N+I+1,F=42,P=113,_=1,M=2,j=3,R=4;function G(V,Ee){return V.msg=h[Ee],Ee}function q(V){return(V<<1)-(4V.avail_out&&(De=V.avail_out),De!==0&&(l.arraySet(V.output,Ee.pending_buf,Ee.pending_out,De,V.next_out),V.next_out+=De,Ee.pending_out+=De,V.total_out+=De,V.avail_out-=De,Ee.pending-=De,Ee.pending===0&&(Ee.pending_out=0))}function X(V,Ee){a._tr_flush_block(V,0<=V.block_start?V.block_start:-1,V.strstart-V.block_start,Ee),V.block_start=V.strstart,Y(V.strm)}function Q(V,Ee){V.pending_buf[V.pending++]=Ee}function te(V,Ee){V.pending_buf[V.pending++]=Ee>>>8&255,V.pending_buf[V.pending++]=255&Ee}function Z(V,Ee){var De,oe,ne=V.max_chain_length,ge=V.strstart,Ie=V.prev_length,_e=V.nice_match,be=V.strstart>V.w_size-L?V.strstart-(V.w_size-L):0,Ne=V.window,Ze=V.w_mask,ce=V.prev,Te=V.strstart+N,Oe=Ne[ge+Ie-1],Ye=Ne[ge+Ie];V.prev_length>=V.good_match&&(ne>>=2),_e>V.lookahead&&(_e=V.lookahead);do if(Ne[(De=Ee)+Ie]===Ye&&Ne[De+Ie-1]===Oe&&Ne[De]===Ne[ge]&&Ne[++De]===Ne[ge+1]){ge+=2,De++;do;while(Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&Ne[++ge]===Ne[++De]&&gebe&&--ne!=0);return Ie<=V.lookahead?Ie:V.lookahead}function de(V){var Ee,De,oe,ne,ge,Ie,_e,be,Ne,Ze,ce=V.w_size;do{if(ne=V.window_size-V.lookahead-V.strstart,V.strstart>=ce+(ce-L)){for(l.arraySet(V.window,V.window,ce,ce,0),V.match_start-=ce,V.strstart-=ce,V.block_start-=ce,Ee=De=V.hash_size;oe=V.head[--Ee],V.head[Ee]=ce<=oe?oe-ce:0,--De;);for(Ee=De=ce;oe=V.prev[--Ee],V.prev[Ee]=ce<=oe?oe-ce:0,--De;);ne+=ce}if(V.strm.avail_in===0)break;if(Ie=V.strm,_e=V.window,be=V.strstart+V.lookahead,Ne=ne,Ze=void 0,Ze=Ie.avail_in,Ne=I)for(ge=V.strstart-V.insert,V.ins_h=V.window[ge],V.ins_h=(V.ins_h<=I&&(V.ins_h=(V.ins_h<=I)if(oe=a._tr_tally(V,V.strstart-V.match_start,V.match_length-I),V.lookahead-=V.match_length,V.match_length<=V.max_lazy_match&&V.lookahead>=I){for(V.match_length--;V.strstart++,V.ins_h=(V.ins_h<=I&&(V.ins_h=(V.ins_h<=I&&V.match_length<=V.prev_length){for(ne=V.strstart+V.lookahead-I,oe=a._tr_tally(V,V.strstart-1-V.prev_match,V.prev_length-I),V.lookahead-=V.prev_length-1,V.prev_length-=2;++V.strstart<=ne&&(V.ins_h=(V.ins_h<V.pending_buf_size-5&&(De=V.pending_buf_size-5);;){if(V.lookahead<=1){if(de(V),V.lookahead===0&&Ee===d)return _;if(V.lookahead===0)break}V.strstart+=V.lookahead,V.lookahead=0;var oe=V.block_start+De;if((V.strstart===0||V.strstart>=oe)&&(V.lookahead=V.strstart-oe,V.strstart=oe,X(V,!1),V.strm.avail_out===0)||V.strstart-V.block_start>=V.w_size-L&&(X(V,!1),V.strm.avail_out===0))return _}return V.insert=0,Ee===f?(X(V,!0),V.strm.avail_out===0?j:R):(V.strstart>V.block_start&&(X(V,!1),V.strm.avail_out),_)}),new Fe(4,4,8,4,ke),new Fe(4,5,16,8,ke),new Fe(4,6,32,32,ke),new Fe(4,4,16,16,me),new Fe(8,16,32,32,me),new Fe(8,16,128,128,me),new Fe(8,32,128,256,me),new Fe(32,128,258,1024,me),new Fe(32,258,258,4096,me)],s.deflateInit=function(V,Ee){return Pt(V,Ee,E,15,8,0)},s.deflateInit2=Pt,s.deflateReset=$t,s.deflateResetKeep=Xe,s.deflateSetHeader=function(V,Ee){return V&&V.state?V.state.wrap!==2?g:(V.state.gzhead=Ee,p):g},s.deflate=function(V,Ee){var De,oe,ne,ge;if(!V||!V.state||5>8&255),Q(oe,oe.gzhead.time>>16&255),Q(oe,oe.gzhead.time>>24&255),Q(oe,oe.level===9?2:2<=oe.strategy||oe.level<2?4:0),Q(oe,255&oe.gzhead.os),oe.gzhead.extra&&oe.gzhead.extra.length&&(Q(oe,255&oe.gzhead.extra.length),Q(oe,oe.gzhead.extra.length>>8&255)),oe.gzhead.hcrc&&(V.adler=u(V.adler,oe.pending_buf,oe.pending,0)),oe.gzindex=0,oe.status=69):(Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,0),Q(oe,oe.level===9?2:2<=oe.strategy||oe.level<2?4:0),Q(oe,3),oe.status=P);else{var Ie=E+(oe.w_bits-8<<4)<<8;Ie|=(2<=oe.strategy||oe.level<2?0:oe.level<6?1:oe.level===6?2:3)<<6,oe.strstart!==0&&(Ie|=32),Ie+=31-Ie%31,oe.status=P,te(oe,Ie),oe.strstart!==0&&(te(oe,V.adler>>>16),te(oe,65535&V.adler)),V.adler=1}if(oe.status===69)if(oe.gzhead.extra){for(ne=oe.pending;oe.gzindex<(65535&oe.gzhead.extra.length)&&(oe.pending!==oe.pending_buf_size||(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending!==oe.pending_buf_size));)Q(oe,255&oe.gzhead.extra[oe.gzindex]),oe.gzindex++;oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),oe.gzindex===oe.gzhead.extra.length&&(oe.gzindex=0,oe.status=73)}else oe.status=73;if(oe.status===73)if(oe.gzhead.name){ne=oe.pending;do{if(oe.pending===oe.pending_buf_size&&(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending===oe.pending_buf_size)){ge=1;break}ge=oe.gzindexne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),ge===0&&(oe.gzindex=0,oe.status=91)}else oe.status=91;if(oe.status===91)if(oe.gzhead.comment){ne=oe.pending;do{if(oe.pending===oe.pending_buf_size&&(oe.gzhead.hcrc&&oe.pending>ne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),Y(V),ne=oe.pending,oe.pending===oe.pending_buf_size)){ge=1;break}ge=oe.gzindexne&&(V.adler=u(V.adler,oe.pending_buf,oe.pending-ne,ne)),ge===0&&(oe.status=103)}else oe.status=103;if(oe.status===103&&(oe.gzhead.hcrc?(oe.pending+2>oe.pending_buf_size&&Y(V),oe.pending+2<=oe.pending_buf_size&&(Q(oe,255&V.adler),Q(oe,V.adler>>8&255),V.adler=0,oe.status=P)):oe.status=P),oe.pending!==0){if(Y(V),V.avail_out===0)return oe.last_flush=-1,p}else if(V.avail_in===0&&q(Ee)<=q(De)&&Ee!==f)return G(V,-5);if(oe.status===666&&V.avail_in!==0)return G(V,-5);if(V.avail_in!==0||oe.lookahead!==0||Ee!==d&&oe.status!==666){var _e=oe.strategy===2?function(be,Ne){for(var Ze;;){if(be.lookahead===0&&(de(be),be.lookahead===0)){if(Ne===d)return _;break}if(be.match_length=0,Ze=a._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++,Ze&&(X(be,!1),be.strm.avail_out===0))return _}return be.insert=0,Ne===f?(X(be,!0),be.strm.avail_out===0?j:R):be.last_lit&&(X(be,!1),be.strm.avail_out===0)?_:M}(oe,Ee):oe.strategy===3?function(be,Ne){for(var Ze,ce,Te,Oe,Ye=be.window;;){if(be.lookahead<=N){if(de(be),be.lookahead<=N&&Ne===d)return _;if(be.lookahead===0)break}if(be.match_length=0,be.lookahead>=I&&0be.lookahead&&(be.match_length=be.lookahead)}if(be.match_length>=I?(Ze=a._tr_tally(be,1,be.match_length-I),be.lookahead-=be.match_length,be.strstart+=be.match_length,be.match_length=0):(Ze=a._tr_tally(be,0,be.window[be.strstart]),be.lookahead--,be.strstart++),Ze&&(X(be,!1),be.strm.avail_out===0))return _}return be.insert=0,Ne===f?(X(be,!0),be.strm.avail_out===0?j:R):be.last_lit&&(X(be,!1),be.strm.avail_out===0)?_:M}(oe,Ee):o[oe.level].func(oe,Ee);if(_e!==j&&_e!==R||(oe.status=666),_e===_||_e===j)return V.avail_out===0&&(oe.last_flush=-1),p;if(_e===M&&(Ee===1?a._tr_align(oe):Ee!==5&&(a._tr_stored_block(oe,0,0,!1),Ee===3&&(ee(oe.head),oe.lookahead===0&&(oe.strstart=0,oe.block_start=0,oe.insert=0))),Y(V),V.avail_out===0))return oe.last_flush=-1,p}return Ee!==f?p:oe.wrap<=0?1:(oe.wrap===2?(Q(oe,255&V.adler),Q(oe,V.adler>>8&255),Q(oe,V.adler>>16&255),Q(oe,V.adler>>24&255),Q(oe,255&V.total_in),Q(oe,V.total_in>>8&255),Q(oe,V.total_in>>16&255),Q(oe,V.total_in>>24&255)):(te(oe,V.adler>>>16),te(oe,65535&V.adler)),Y(V),0=De.w_size&&(ge===0&&(ee(De.head),De.strstart=0,De.block_start=0,De.insert=0),Ne=new l.Buf8(De.w_size),l.arraySet(Ne,Ee,Ze-De.w_size,De.w_size,0),Ee=Ne,Ze=De.w_size),Ie=V.avail_in,_e=V.next_in,be=V.input,V.avail_in=Ze,V.next_in=0,V.input=Ee,de(De);De.lookahead>=I;){for(oe=De.strstart,ne=De.lookahead-(I-1);De.ins_h=(De.ins_h<>>=I=$>>>24,D-=I,(I=$>>>16&255)===0)M[h++]=65535&$;else{if(!(16&I)){if(!(64&I)){$=C[(65535&$)+(E&(1<>>=I,D-=I),D<15&&(E+=_[c++]<>>=I=$>>>24,D-=I,!(16&(I=$>>>16&255))){if(!(64&I)){$=w[(65535&$)+(E&(1<>>=I,D-=I,(I=h-d)>3,E&=(1<<(D-=N<<3))-1,o.next_in=c,o.next_out=h,o.avail_in=c>>24&255)+(F>>>8&65280)+((65280&F)<<8)+((255&F)<<24)}function E(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(F){var P;return F&&F.state?(P=F.state,F.total_in=F.total_out=P.total=0,F.msg="",P.wrap&&(F.adler=1&P.wrap),P.mode=g,P.last=0,P.havedict=0,P.dmax=32768,P.head=null,P.hold=0,P.bits=0,P.lencode=P.lendyn=new o.Buf32(y),P.distcode=P.distdyn=new o.Buf32(b),P.sane=1,P.back=-1,f):p}function C(F){var P;return F&&F.state?((P=F.state).wsize=0,P.whave=0,P.wnext=0,D(F)):p}function w(F,P){var _,M;return F&&F.state?(M=F.state,P<0?(_=0,P=-P):(_=1+(P>>4),P<48&&(P&=15)),P&&(P<8||15=R.wsize?(o.arraySet(R.window,P,_-R.wsize,R.wsize,0),R.wnext=0,R.whave=R.wsize):(M<(j=R.wsize-R.wnext)&&(j=M),o.arraySet(R.window,P,_-M,j,R.wnext),(M-=j)?(o.arraySet(R.window,P,_-M,M,0),R.wnext=M,R.whave=R.wsize):(R.wnext+=j,R.wnext===R.wsize&&(R.wnext=0),R.whave>>8&255,_.check=a(_.check,ge,2,0),X=Y=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&Y)<<8)+(Y>>8))%31){F.msg="incorrect header check",_.mode=30;break}if((15&Y)!=8){F.msg="unknown compression method",_.mode=30;break}if(X-=4,V=8+(15&(Y>>>=4)),_.wbits===0)_.wbits=V;else if(V>_.wbits){F.msg="invalid window size",_.mode=30;break}_.dmax=1<>8&1),512&_.flags&&(ge[0]=255&Y,ge[1]=Y>>>8&255,_.check=a(_.check,ge,2,0)),X=Y=0,_.mode=3;case 3:for(;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>8&255,ge[2]=Y>>>16&255,ge[3]=Y>>>24&255,_.check=a(_.check,ge,4,0)),X=Y=0,_.mode=4;case 4:for(;X<16;){if(q===0)break e;q--,Y+=M[R++]<>8),512&_.flags&&(ge[0]=255&Y,ge[1]=Y>>>8&255,_.check=a(_.check,ge,2,0)),X=Y=0,_.mode=5;case 5:if(1024&_.flags){for(;X<16;){if(q===0)break e;q--,Y+=M[R++]<>>8&255,_.check=a(_.check,ge,2,0)),X=Y=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(q<(Z=_.length)&&(Z=q),Z&&(_.head&&(V=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),o.arraySet(_.head.extra,M,R,Z,V)),512&_.flags&&(_.check=a(_.check,M,Z,R)),q-=Z,R+=Z,_.length-=Z),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(q===0)break e;for(Z=0;V=M[R+Z++],_.head&&V&&_.length<65536&&(_.head.name+=String.fromCharCode(V)),V&&Z>9&1,_.head.done=!0),F.adler=_.check=0,_.mode=12;break;case 10:for(;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>=7&X,X-=7&X,_.mode=27;break}for(;X<3;){if(q===0)break e;q--,Y+=M[R++]<>>=1)){case 0:_.mode=14;break;case 1:if(N(_),_.mode=20,P!==6)break;Y>>>=2,X-=2;break e;case 2:_.mode=17;break;case 3:F.msg="invalid block type",_.mode=30}Y>>>=2,X-=2;break;case 14:for(Y>>>=7&X,X-=7&X;X<32;){if(q===0)break e;q--,Y+=M[R++]<>>16^65535)){F.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&Y,X=Y=0,_.mode=15,P===6)break e;case 15:_.mode=16;case 16:if(Z=_.length){if(q>>=5,X-=5,_.ndist=1+(31&Y),Y>>>=5,X-=5,_.ncode=4+(15&Y),Y>>>=4,X-=4,286<_.nlen||30<_.ndist){F.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;X<3;){if(q===0)break e;q--,Y+=M[R++]<>>=3,X-=3}for(;_.have<19;)_.lens[Ie[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,De={bits:_.lenbits},Ee=u(0,_.lens,0,19,_.lencode,0,_.work,De),_.lenbits=De.bits,Ee){F.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;Fe=(ne=_.lencode[Y&(1<<_.lenbits)-1])>>>16&255,je=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=me,X-=me,_.lens[_.have++]=je;else{if(je===16){for(oe=me+2;X>>=me,X-=me,_.have===0){F.msg="invalid bit length repeat",_.mode=30;break}V=_.lens[_.have-1],Z=3+(3&Y),Y>>>=2,X-=2}else if(je===17){for(oe=me+3;X>>=me)),Y>>>=3,X-=3}else{for(oe=me+7;X>>=me)),Y>>>=7,X-=7}if(_.have+Z>_.nlen+_.ndist){F.msg="invalid bit length repeat",_.mode=30;break}for(;Z--;)_.lens[_.have++]=V}}if(_.mode===30)break;if(_.lens[256]===0){F.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,De={bits:_.lenbits},Ee=u(h,_.lens,0,_.nlen,_.lencode,0,_.work,De),_.lenbits=De.bits,Ee){F.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,De={bits:_.distbits},Ee=u(d,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,De),_.distbits=De.bits,Ee){F.msg="invalid distances set",_.mode=30;break}if(_.mode=20,P===6)break e;case 20:_.mode=21;case 21:if(6<=q&&258<=ee){F.next_out=G,F.avail_out=ee,F.next_in=R,F.avail_in=q,_.hold=Y,_.bits=X,c(F,te),G=F.next_out,j=F.output,ee=F.avail_out,R=F.next_in,M=F.input,q=F.avail_in,Y=_.hold,X=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;Fe=(ne=_.lencode[Y&(1<<_.lenbits)-1])>>>16&255,je=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>Xe)])>>>16&255,je=65535&ne,!(Xe+(me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=Xe,X-=Xe,_.back+=Xe}if(Y>>>=me,X-=me,_.back+=me,_.length=je,Fe===0){_.mode=26;break}if(32&Fe){_.back=-1,_.mode=12;break}if(64&Fe){F.msg="invalid literal/length code",_.mode=30;break}_.extra=15&Fe,_.mode=22;case 22:if(_.extra){for(oe=_.extra;X>>=_.extra,X-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;Fe=(ne=_.distcode[Y&(1<<_.distbits)-1])>>>16&255,je=65535&ne,!((me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>Xe)])>>>16&255,je=65535&ne,!(Xe+(me=ne>>>24)<=X);){if(q===0)break e;q--,Y+=M[R++]<>>=Xe,X-=Xe,_.back+=Xe}if(Y>>>=me,X-=me,_.back+=me,64&Fe){F.msg="invalid distance code",_.mode=30;break}_.offset=je,_.extra=15&Fe,_.mode=24;case 24:if(_.extra){for(oe=_.extra;X>>=_.extra,X-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){F.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(ee===0)break e;if(Z=te-ee,_.offset>Z){if((Z=_.offset-Z)>_.whave&&_.sane){F.msg="invalid distance too far back",_.mode=30;break}de=Z>_.wnext?(Z-=_.wnext,_.wsize-Z):_.wnext-Z,Z>_.length&&(Z=_.length),ke=_.window}else ke=j,de=G-_.offset,Z=_.length;for(eeA?(I=de[ke+b[P]],X[Q+b[P]]):(I=96,0),E=1<>G)+(D-=E)]=$<<24|I<<16|N|0,D!==0;);for(E=1<>=1;if(E!==0?(Y&=E-1,Y+=E):Y=0,P++,--te[F]==0){if(F===M)break;F=d[f+b[P]]}if(j>>7)]}function Q(ne,ge){ne.pending_buf[ne.pending++]=255&ge,ne.pending_buf[ne.pending++]=ge>>>8&255}function te(ne,ge,Ie){ne.bi_valid>v-Ie?(ne.bi_buf|=ge<>v-ne.bi_valid,ne.bi_valid+=Ie-v):(ne.bi_buf|=ge<>>=1,Ie<<=1,0<--ge;);return Ie>>>1}function ke(ne,ge,Ie){var _e,be,Ne=new Array(b+1),Ze=0;for(_e=1;_e<=b;_e++)Ne[_e]=Ze=Ze+Ie[_e-1]<<1;for(be=0;be<=ge;be++){var ce=ne[2*be+1];ce!==0&&(ne[2*be]=de(Ne[ce]++,ce))}}function me(ne){var ge;for(ge=0;ge>1;1<=Ie;Ie--)Xe(ne,Ne,Ie);for(be=Te;Ie=ne.heap[1],ne.heap[1]=ne.heap[ne.heap_len--],Xe(ne,Ne,1),_e=ne.heap[1],ne.heap[--ne.heap_max]=Ie,ne.heap[--ne.heap_max]=_e,Ne[2*be]=Ne[2*Ie]+Ne[2*_e],ne.depth[be]=(ne.depth[Ie]>=ne.depth[_e]?ne.depth[Ie]:ne.depth[_e])+1,Ne[2*Ie+1]=Ne[2*_e+1]=be,ne.heap[1]=be++,Xe(ne,Ne,1),2<=ne.heap_len;);ne.heap[--ne.heap_max]=ne.heap[1],function(Ye,Dt){var St,Nt,_t,yt,Ft,Rt,sr=Dt.dyn_tree,tn=Dt.max_code,ys=Dt.stat_desc.static_tree,Zn=Dt.stat_desc.has_stree,Er=Dt.stat_desc.extra_bits,Ln=Dt.stat_desc.extra_base,On=Dt.stat_desc.max_length,Qn=0;for(yt=0;yt<=b;yt++)Ye.bl_count[yt]=0;for(sr[2*Ye.heap[Ye.heap_max]+1]=0,St=Ye.heap_max+1;St>=7;be>>=1)if(1&Oe&&ce.dyn_ltree[2*Te]!==0)return l;if(ce.dyn_ltree[18]!==0||ce.dyn_ltree[20]!==0||ce.dyn_ltree[26]!==0)return a;for(Te=32;Te>>3,(Ne=ne.static_len+3+7>>>3)<=be&&(be=Ne)):be=Ne=Ie+5,Ie+4<=be&&ge!==-1?oe(ne,ge,Ie,_e):ne.strategy===4||Ne===be?(te(ne,2+(_e?1:0),3),$t(ne,L,F)):(te(ne,4+(_e?1:0),3),function(ce,Te,Oe,Ye){var Dt;for(te(ce,Te-257,5),te(ce,Oe-1,5),te(ce,Ye-4,4),Dt=0;Dt>>8&255,ne.pending_buf[ne.d_buf+2*ne.last_lit+1]=255&ge,ne.pending_buf[ne.l_buf+ne.last_lit]=255&Ie,ne.last_lit++,ge===0?ne.dyn_ltree[2*Ie]++:(ne.matches++,ge--,ne.dyn_ltree[2*(_[Ie]+d+1)]++,ne.dyn_dtree[2*X(ge)]++),ne.last_lit===ne.lit_bufsize-1},s._tr_align=function(ne){te(ne,2,3),Z(ne,D,L),function(ge){ge.bi_valid===16?(Q(ge,ge.bi_buf),ge.bi_buf=0,ge.bi_valid=0):8<=ge.bi_valid&&(ge.pending_buf[ge.pending++]=255&ge.bi_buf,ge.bi_buf>>=8,ge.bi_valid-=8)}(ne)}},{"../utils/common":41}],53:[function(n,i,s){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,i,s){(function(o){(function(l,a){if(!l.setImmediate){var c,u,h,d,f=1,p={},g=!1,y=l.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(l);b=b&&b.setTimeout?b:l,c={}.toString.call(l.process)==="[object process]"?function(C){process.nextTick(function(){E(C)})}:function(){if(l.postMessage&&!l.importScripts){var C=!0,w=l.onmessage;return l.onmessage=function(){C=!1},l.postMessage("","*"),l.onmessage=w,C}}()?(d="setImmediate$"+Math.random()+"$",l.addEventListener?l.addEventListener("message",D,!1):l.attachEvent("onmessage",D),function(C){l.postMessage(d+C,"*")}):l.MessageChannel?((h=new MessageChannel).port1.onmessage=function(C){E(C.data)},function(C){h.port2.postMessage(C)}):y&&"onreadystatechange"in y.createElement("script")?(u=y.documentElement,function(C){var w=y.createElement("script");w.onreadystatechange=function(){E(C),w.onreadystatechange=null,u.removeChild(w),w=null},u.appendChild(w)}):function(C){setTimeout(E,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var w=new Array(arguments.length-1),T=0;T"u"?o===void 0?this:o:self)}).call(this,typeof r<"u"?r:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(xH);var jxe=xH.exports;const wH=uo(jxe),hL=e=>`# Custom Theme for Web This folder contains \`.css\` files you can include for you web project. @@ -1575,7 +1575,7 @@ To enable automatic light-/dark-mode you need to add a media-query: \`@media (prefers-color-scheme: dark) {\` You may want to use \`${e}-custom-colors-full.css\` or you can copy it from the file as needed. -`,fa="replace",s$=["Functional","Regular","Expressive"],SH=["Mobile","Tablet"],K1=["3xs","2xs","xs","sm","md","lg","xl","2xl","3xl"],jxe=e=>`package ${fa}.theme +`,fa="replace",s$=["Functional","Regular","Expressive"],SH=["Mobile","Tablet"],K1=["3xs","2xs","xs","sm","md","lg","xl","2xl","3xl"],zxe=e=>`package ${fa}.theme import android.app.Activity import androidx.compose.foundation.isSystemInDarkTheme @@ -1672,30 +1672,30 @@ fun ${e}( content() } } -`,Hxe=[{name:"onEnabled",light:0,dark:0},{name:"originEnabled",light:0,dark:0},{name:"originHover",light:0,dark:0},{name:"originPressed",light:0,dark:0}],$a=e=>`Color(0xff${e.replace("#","")})`,Uxe=(e,t,r)=>{let n=`package ${fa}.theme +`,Hxe=[{name:"onEnabled",light:0,dark:0},{name:"originEnabled",light:0,dark:0},{name:"originHover",light:0,dark:0},{name:"originPressed",light:0,dark:0}],Fa=e=>`Color(0xff${e.replace("#","")})`,Uxe=(e,t,r)=>{let n=`package ${fa}.theme import androidx.compose.ui.graphics.Color object Colors { -`;const i=x4(e,t);return Object.entries(i).forEach(([s,o])=>{if(o.forEach(a=>{const l=`${s}${a.index}`;n+=`val ${l} = ${$a(a.hex)} -`}),Qc(s)){const{lightOrigin:a,darkOrigin:l}=_k(e,t,r,s);a&&l&&(n+=`val ${s}OnLight = ${$a(a.onColor)} -`,n+=`val ${s}OriginLight = ${$a(a.color)} -`,n+=`val ${s}HoverLight = ${$a(a.hoverColor)} -`,n+=`val ${s}PressedLight = ${$a(a.pressedColor)} -`,n+=`val ${s}OnDark = ${$a(l.onColor)} -`,n+=`val ${s}OriginDark = ${$a(l.color)} -`,n+=`val ${s}HoverDark = ${$a(l.hoverColor)} -`,n+=`val ${s}PressedDark = ${$a(l.pressedColor)} +`;const i=x4(e,t);return Object.entries(i).forEach(([s,o])=>{if(o.forEach(l=>{const a=`${s}${l.index}`;n+=`val ${a} = ${Fa(l.hex)} +`}),Qc(s)){const{lightOrigin:l,darkOrigin:a}=_k(e,t,r,s);l&&a&&(n+=`val ${s}OnLight = ${Fa(l.onColor)} +`,n+=`val ${s}OriginLight = ${Fa(l.color)} +`,n+=`val ${s}HoverLight = ${Fa(l.hoverColor)} +`,n+=`val ${s}PressedLight = ${Fa(l.pressedColor)} +`,n+=`val ${s}OnDark = ${Fa(a.onColor)} +`,n+=`val ${s}OriginDark = ${Fa(a.color)} +`,n+=`val ${s}HoverDark = ${Fa(a.hoverColor)} +`,n+=`val ${s}PressedDark = ${Fa(a.pressedColor)} `)}}),n+="}",n},dL=(e,t,r,n,i)=>{const s=ln(i?"dark":"light");for(const o of r){n+=`val ${ln(o)}Colors${s} = ${ln(o)}Colors( -`;for(const a of t){const l=`${o}${i?a.dark:a.light}`;if(a.transparencyDark!==void 0||a.transparencyLight!==void 0){const c=(a.transparencyDark!==void 0?a.transparencyDark:a.transparencyLight||0)/100;n+=`Colors.${l}.copy(${c}f), -`}else n+=`Colors.${l}, +`;for(const l of t){const a=`${o}${i?l.dark:l.light}`;if(l.transparencyDark!==void 0||l.transparencyLight!==void 0){const c=(l.transparencyDark!==void 0?l.transparencyDark:l.transparencyLight||0)/100;n+=`Colors.${a}.copy(${c}f), +`}else n+=`Colors.${a}, `}Qc(o)&&(n+=`Colors.${o}On${s}, `,n+=`Colors.${o}Origin${s}, `,n+=`Colors.${o}Hover${s}, `,n+=`Colors.${o}Pressed${s}, `),n+=`) `}n+=`fun getColorScheme${s}( -`;for(const o of r){const a=`${ln(o)}Colors`;n+=`${o}: ${a} = ${ln(o)}Colors${s}, +`;for(const o of r){const l=`${ln(o)}Colors`;n+=`${o}: ${l} = ${ln(o)}Colors${s}, `}n+=` ):${e}ColorScheme = ${e}ColorScheme( `;for(const o of r)n+=`${o}=${o}, @@ -1709,14 +1709,14 @@ import androidx.compose.runtime.structuralEqualityPolicy import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.graphics.Color -`;for(const o of i){const a=Qc(o)?[...t,...Hxe]:t;s+=`class ${ln(o)}Colors( -`;for(const l of a){const c=`${ln(l.name,!0)}`;n[`${o}${l.name}`]=c,s+=`${c}: Color, +`;for(const o of i){const l=Qc(o)?[...t,...Hxe]:t;s+=`class ${ln(o)}Colors( +`;for(const a of l){const c=`${ln(a.name,!0)}`;n[`${o}${a.name}`]=c,s+=`${c}: Color, `}s+=`) { -`;for(const l of a){const c=n[`${o}${l.name}`];s+=`var ${c} by mutableStateOf(${c}, structuralEqualityPolicy()) +`;for(const a of l){const c=n[`${o}${a.name}`];s+=`var ${c} by mutableStateOf(${c}, structuralEqualityPolicy()) internal set `}s+=`} `}s+=`class ${e}ColorScheme( -`;for(const o of i){const a=`${ln(o)}Colors`;s+=`${o}: ${a}, +`;for(const o of i){const l=`${ln(o)}Colors`;s+=`${o}: ${l}, `}s+=`){ `;for(const o of i)s+=`var ${o} by mutableStateOf(${o}, structuralEqualityPolicy()) internal set @@ -1731,7 +1731,7 @@ object Dimensions { `;return $c(e).forEach(function(r){if(this.isLeaf&&this.path.length>0&&this.path[0]!=="branding"&&this.path[0]!=="colors"&&this.path[0]!=="font"&&this.path[0]!=="transition"&&this.path[0]!=="elevation"&&this.path[0]!=="typography"&&!this.path.includes("desktop")&&!this.path.includes("_scale")){const n=`${ln(this.path.join("-"),!0)}`,i=typeof r=="string"||r instanceof String?`${Number(r)*16}.dp`:r;t+=`val ${n}: Dp = ${i} `}}),t+=`} -`,t},xm={spacing:["responsive","fixed"],sizing:["base"],border:["height","radius"]},Gxe=(e,t,r,n)=>{for(const[i,s]of Object.entries(xm)){t+=`val ${i}Dimensions${r}${n} = ${ln(i)}Dimensions(`;for(const o of s){const a=o==="base"?"":`-${o}`,l=o==="responsive"?`-${n}`:"",c=i==="border"?"":`-${r}`;for(const u of K1)t+=`Dimensions.${ln(`${i}${a}${c}${l}-${u}`,!0)}, +`,t},xm={spacing:["responsive","fixed"],sizing:["base"],border:["height","radius"]},Gxe=(e,t,r,n)=>{for(const[i,s]of Object.entries(xm)){t+=`val ${i}Dimensions${r}${n} = ${ln(i)}Dimensions(`;for(const o of s){const l=o==="base"?"":`-${o}`,a=o==="responsive"?`-${n}`:"",c=i==="border"?"":`-${r}`;for(const u of K1)t+=`Dimensions.${ln(`${i}${l}${c}${a}-${u}`,!0)}, `}t+=`) `}t+=`fun getDimensions${r}${n}(`;for(const i of Object.keys(xm))t+=`${i}: ${ln(i)}Dimensions = ${i}Dimensions${r}${n}, `;t+=` @@ -1832,7 +1832,7 @@ val LocalTypography = staticCompositionLocalOf { getTextStyles(getTypographyRegu enum class Density { ${s$.map(e=>e.toUpperCase()).join(",")} } -`,pL=e=>e.includes("enabled")||e.includes("hover")||e.includes("pressed"),mL=e=>{const t=e.lastIndexOf("-"),r=e.slice(t+1);return{nameWithoutState:e.slice(0,t),state:r}},Qxe=(e,t)=>e.transparencyDark!==void 0||e.transparencyLight!==void 0?t?e.transparencyDark:e.transparencyLight:0,ewe=(e,t)=>Object.entries(e).map(([r,n])=>{const i=Hd(r,n,t);return{[r]:i}}).reduce((r,n)=>({...r,...n}),{}),gL=(e,t,r,n,i,s,o)=>{let a={};return Object.entries(r).forEach(([l,c])=>{if(Qc(l)){const{lightOrigin:u,darkOrigin:h}=_k(t,i,o,l),d=n?h:u;d&&(a={...a,[`${$r}-${l}/on/origin/enabled`]:`transparency 0%, ${d.onColor}`,[`${$r}-${l}/on/origin/hover`]:`transparency 0%, ${d.onColorHover}`,[`${$r}-${l}/on/origin/pressed`]:`transparency 0%, ${d.onColorPressed}`,[`${$r}-${l}/origin/enabled`]:`transparency 0%, ${d.color}`,[`${$r}-${l}/origin/hover`]:`transparency 0%, ${d.hoverColor}`,[`${$r}-${l}/origin/pressed`]:`transparency 0%, ${d.pressedColor}`})}e.forEach(u=>{const h=s.find(d=>d.name===u.name);if(h){const d=n?h.dark:h.light,f=c[d].hex,p=Qxe(u,n);if(u.name.includes("on-")){const g=u.name.replace("on-","");if(pL(u.name)){const{nameWithoutState:y,state:b}=mL(g);b.replace(/^ak-/,"").replace(/^bg-/,""),a[`${$r}-${l}/on/${y}/${b}`]=`transparency ${p}%, ${f}`}else a[`${$r}-${l}/on/${g}`]=`transparency ${p}%, ${f}`}else if(pL(u.name)){const{nameWithoutState:g,state:y}=mL(u.name);a[`${$r}-${l}/${g}/${y}`]=`transparency ${p}%, ${f}`}else a[`${$r}-${l}/${u.name}`]=`transparency ${p}%, ${f}`}})}),a},twe=(e,t,r,n,i)=>{const s=ewe(t,r),o=gL(e,t,s,!1,r,n,i),a=gL(e,t,s,!0,r,n,i);return JSON.stringify({light:o,dark:a})},rwe=e=>{let t='@use "default.assets-paths" as assets-paths;';for(const r of["sans","head"]){const n=r==="sans"?e.font.sans:e.font.head;Object.entries(n).forEach(([i,s])=>{t+=` +`,pL=e=>e.includes("enabled")||e.includes("hover")||e.includes("pressed"),mL=e=>{const t=e.lastIndexOf("-"),r=e.slice(t+1);return{nameWithoutState:e.slice(0,t),state:r}},Qxe=(e,t)=>e.transparencyDark!==void 0||e.transparencyLight!==void 0?t?e.transparencyDark:e.transparencyLight:0,ewe=(e,t)=>Object.entries(e).map(([r,n])=>{const i=Hd(r,n,t);return{[r]:i}}).reduce((r,n)=>({...r,...n}),{}),gL=(e,t,r,n,i,s,o)=>{let l={};return Object.entries(r).forEach(([a,c])=>{if(Qc(a)){const{lightOrigin:u,darkOrigin:h}=_k(t,i,o,a),d=n?h:u;d&&(l={...l,[`${$r}-${a}/on/origin/enabled`]:`transparency 0%, ${d.onColor}`,[`${$r}-${a}/on/origin/hover`]:`transparency 0%, ${d.onColorHover}`,[`${$r}-${a}/on/origin/pressed`]:`transparency 0%, ${d.onColorPressed}`,[`${$r}-${a}/origin/enabled`]:`transparency 0%, ${d.color}`,[`${$r}-${a}/origin/hover`]:`transparency 0%, ${d.hoverColor}`,[`${$r}-${a}/origin/pressed`]:`transparency 0%, ${d.pressedColor}`})}e.forEach(u=>{const h=s.find(d=>d.name===u.name);if(h){const d=n?h.dark:h.light,f=c[d].hex,p=Qxe(u,n);if(u.name.includes("on-")){const g=u.name.replace("on-","");if(pL(u.name)){const{nameWithoutState:y,state:b}=mL(g);b.replace(/^ak-/,"").replace(/^bg-/,""),l[`${$r}-${a}/on/${y}/${b}`]=`transparency ${p}%, ${f}`}else l[`${$r}-${a}/on/${g}`]=`transparency ${p}%, ${f}`}else if(pL(u.name)){const{nameWithoutState:g,state:y}=mL(u.name);l[`${$r}-${a}/${g}/${y}`]=`transparency ${p}%, ${f}`}else l[`${$r}-${a}/${u.name}`]=`transparency ${p}%, ${f}`}})}),l},twe=(e,t,r,n,i)=>{const s=ewe(t,r),o=gL(e,t,s,!1,r,n,i),l=gL(e,t,s,!0,r,n,i);return JSON.stringify({light:o,dark:l})},rwe=e=>{let t='@use "default.assets-paths" as assets-paths;';for(const r of["sans","head"]){const n=r==="sans"?e.font.sans:e.font.head;Object.entries(n).forEach(([i,s])=>{t+=` $${i}: assets-paths.$fonts-path + '${s.woff2}'; @font-face { font-family: '${s.family}'; @@ -2005,31 +2005,31 @@ $${i}: assets-paths.$fonts-path + '${s.woff2}'; --db-current-color-bg-transparent-semi-enabled ); } -`,EH=(e,t)=>{const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)},iwe=async e=>{const t=new wH;for(const[n,i]of Object.entries(e))t.file(`${n}.json`,i);const r=await t.generateAsync({type:"blob"});EH("Playground.zip",r)},swe=async(e,t,r)=>{const n={...r.colors,...r.customColors},i=(r.branding.name||"default-theme")+"Theme",s=JSON.stringify(r),o=$ie(r),a=ln(r.branding.name),l=new wH;l.file(`${i}.json`,s);const c="Android",u=`${c}/theme`,h=`${u}/data`;l.file(`${c}/README.md`,hL(a)),l.file(`${u}/${a}.kt`,jxe(a)),l.file(`${u}/${a}ColorScheme.kt`,Wxe(a,e,n)),l.file(`${u}/${a}Dimensions.kt`,qxe(a)),l.file(`${u}/${a}Typography.kt`,Yxe(a)),l.file(`${h}/Fonts.kt`,Kxe()),l.file(`${h}/Dimensions.kt`,Vxe(r)),l.file(`${h}/Typography.kt`,Jxe(r)),l.file(`${h}/Colors.kt`,Uxe(n,t,r.branding.alternativeColors)),l.file(`${h}/Density.kt`,Zxe());const d="Utils";l.file(`${d}/${i}-sketch-colors.json`,twe(e,n,t,y0,r.branding.alternativeColors)),l.file(`${d}/${i}-font-faces.scss`,rwe(r));const f="Web";l.file(`${f}/${i}-theme.css`,o);const p=Ku(CC(n,t,r.branding.alternativeColors)),g=Ku(Lp(e,n,!1)),y=Ku(Lp(e,n,!0));if(l.file(`${f}/${i}-colors-full.css`,LI(p,g,y)),l.file(`${f}/${i}-palette.css`,p),l.file(`${f}/${i}-speaking-names-light.css`,g),l.file(`${f}/${i}-speaking-names-dark.css`,y),l.file(`${f}/README.md`,hL(i)),r.customColors){const v="Custom Colors",E=Ku(CC(r.customColors,t,r.branding.alternativeColors)),D=Ku(Lp(e,r.customColors,!1)),C=Ku(Lp(e,r.customColors,!0));let w="";for(const T of Object.keys(r.customColors)){const A=nwe(T);l.file(`${f}/${v}/classes/${T}.css`,A),w+=A}l.file(`${f}/${v}/classes/all.css`,w),l.file(`${f}/${v}/${i}-custom-colors-full.css`,LI(E,D,C)),l.file(`${f}/${v}/${i}-custom-colors-palette.css`,E),l.file(`${f}/${v}/${i}-speaking-names-custom-colors-light.css`,D),l.file(`${f}/${v}/${i}-speaking-names-custom-colors-dark.css`,C)}const b=await l.generateAsync({type:"blob"});EH(`${i}.zip`,b)},owe=()=>{const{t:e}=mr(),{resetDefaults:t,luminanceSteps:r,theme:n,speakingNames:i,developerMode:s}=pr(o=>o);return z.jsxs(z.Fragment,{children:[s&&z.jsx(Ot,{icon:"undo",onClick:()=>t(),children:e("reset")}),z.jsx(q0,{label:"import",accept:"application/JSON",onUpload:o=>{try{const a=atob(o.split("base64,")[1]),l=JSON.parse(a);pr.setState({theme:l})}catch(a){pr.setState({notification:a.message}),console.error(a)}}}),z.jsx(Ot,{variant:"brand",icon:"download",onClick:()=>swe(i,r,n),children:e("export")})]})},awe=()=>{const{speakingNames:e}=pr(i=>i),{t}=mr(),r=(i,s)=>{const o=[...e];o[s]=i,pr.setState({speakingNames:o})},n=(i,s)=>{pr.setState({speakingNames:e.map(o=>{const a={...o};return i?a.light=s?a.light+1:a.light-1:a.dark=s?a.dark+1:a.dark-1,a})})};return z.jsxs("div",{"data-density":"functional",className:"grid grid-cols-3 gap-fix-md",children:[z.jsx("div",{className:"flex items-center",children:z.jsx("h6",{children:t("colorName")})}),z.jsxs("div",{className:"flex items-center",children:[z.jsx("h6",{className:"mr-auto",children:t("dark")}),z.jsx(Ot,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!1,!1),children:"Decrease"}),z.jsx(Ot,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!1,!0),children:"Increase"})]}),z.jsxs("div",{className:"flex items-center",children:[z.jsx("h6",{className:"mr-auto",children:t("light")}),z.jsx(Ot,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!0,!1),children:"Decrease"}),z.jsx(Ot,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!0,!0),children:"Increase"})]}),e.map((i,s)=>z.jsxs(H.Fragment,{children:[z.jsx("span",{children:t(i.name)}),z.jsxs("div",{className:"flex gap-fix-md",children:[z.jsx(an,{className:"w-full",variant:"floating",label:t("dark"),value:i.dark,type:"number",min:"0",onChange:o=>r({...i,dark:Number(o.target.value)},s)}),i.transparencyDark!==void 0&&z.jsx(an,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyDark,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyDark:Number(o.target.value)},s)})]}),z.jsxs("div",{className:"flex gap-fix-md",children:[z.jsx(an,{className:"w-full",variant:"floating",label:t("light"),value:i.light,type:"number",min:"0",onChange:o=>r({...i,light:Number(o.target.value)},s)}),i.transparencyLight!==void 0&&z.jsx(an,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyLight,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyLight:Number(o.target.value)},s)})]})]},i.name))]})},lwe=H.memo(()=>{const{t:e}=mr(),{theme:t}=pr(r=>r);return z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx("h5",{children:e("logo")}),z.jsxs("div",{className:"flex gap-fix-md",children:[z.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"light",children:[z.jsx(Mr,{icon:"sun",children:"Light"}),z.jsx("img",{className:"h-siz-md mx-auto",src:Jm(t.branding.image.light),alt:"logo"}),z.jsx(q0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{pr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,light:r}}}})}})]}),z.jsx(aa,{margin:"none",variant:"vertical"}),z.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"dark",children:[z.jsx(Mr,{icon:"moon",children:"Dark"}),z.jsx("img",{className:"h-siz-md mx-auto",src:Jm(t.branding.image.dark||t.branding.image.light),alt:"logo"}),z.jsx(q0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{pr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,dark:r}}}})}})]})]})]})}),uwe=["folder_open","document","user","wrench","toys"],cwe=()=>{const{t:e}=mr();return z.jsx("div",{className:`demo-side-nav w-full min-w-auto md:min-w-fit md:w-auto db-neutral-bg-lvl-1 +`,EH=(e,t)=>{const r=document.createElement("a");r.href=URL.createObjectURL(t),r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)},iwe=async e=>{const t=new wH;for(const[n,i]of Object.entries(e))t.file(`${n}.json`,i);const r=await t.generateAsync({type:"blob"});EH("Playground.zip",r)},swe=async(e,t,r)=>{const n={...r.colors,...r.additionalColors,...r.customColors},i=(r.branding.name||"default-theme")+"Theme",s=JSON.stringify(r),o=$ie(r),l=ln(r.branding.name),a=new wH;a.file(`${i}.json`,s);const c="Android",u=`${c}/theme`,h=`${u}/data`;a.file(`${c}/README.md`,hL(l)),a.file(`${u}/${l}.kt`,zxe(l)),a.file(`${u}/${l}ColorScheme.kt`,Wxe(l,e,n)),a.file(`${u}/${l}Dimensions.kt`,qxe(l)),a.file(`${u}/${l}Typography.kt`,Yxe(l)),a.file(`${h}/Fonts.kt`,Kxe()),a.file(`${h}/Dimensions.kt`,Vxe(r)),a.file(`${h}/Typography.kt`,Jxe(r)),a.file(`${h}/Colors.kt`,Uxe(n,t,r.branding.alternativeColors)),a.file(`${h}/Density.kt`,Zxe());const d="Utils";a.file(`${d}/${i}-sketch-colors.json`,twe(e,n,t,y0,r.branding.alternativeColors)),a.file(`${d}/${i}-font-faces.scss`,rwe(r));const f="Web";a.file(`${f}/${i}-theme.css`,o);const p=Ku(CC(n,t,r.branding.alternativeColors),!0),g=Ku(Lp(e,n,!1),!0),y=Ku(Lp(e,n,!0),!0);if(a.file(`${f}/${i}-colors-full.css`,LI(p,g,y)),a.file(`${f}/${i}-palette.css`,p),a.file(`${f}/${i}-speaking-names-light.css`,g),a.file(`${f}/${i}-speaking-names-dark.css`,y),a.file(`${f}/README.md`,hL(i)),r.customColors){const v="Custom Colors",E=Ku(CC(r.customColors,t,r.branding.alternativeColors),!0),D=Ku(Lp(e,r.customColors,!1),!0),C=Ku(Lp(e,r.customColors,!0),!0);let w="";for(const T of Object.keys(r.customColors)){const A=nwe(T);a.file(`${f}/${v}/classes/${T}.css`,A),w+=A}a.file(`${f}/${v}/classes/all.css`,w),a.file(`${f}/${v}/${i}-custom-colors-full.css`,LI(E,D,C)),a.file(`${f}/${v}/${i}-custom-colors-palette.css`,E),a.file(`${f}/${v}/${i}-speaking-names-custom-colors-light.css`,D),a.file(`${f}/${v}/${i}-speaking-names-custom-colors-dark.css`,C)}const b=await a.generateAsync({type:"blob"});EH(`${i}.zip`,b)},owe=()=>{const{t:e}=mr(),{resetDefaults:t,luminanceSteps:r,theme:n,speakingNames:i,developerMode:s}=pr(o=>o);return B.jsxs(B.Fragment,{children:[s&&B.jsx(Ot,{icon:"undo",onClick:()=>t(),children:e("reset")}),B.jsx(q0,{label:"import",accept:"application/JSON",onUpload:o=>{try{const l=atob(o.split("base64,")[1]),a=JSON.parse(l);pr.setState({theme:a})}catch(l){pr.setState({notification:l.message}),console.error(l)}}}),B.jsx(Ot,{variant:"brand",icon:"download",onClick:()=>swe(i,r,n),children:e("export")})]})},awe=()=>{const{speakingNames:e}=pr(i=>i),{t}=mr(),r=(i,s)=>{const o=[...e];o[s]=i,pr.setState({speakingNames:o})},n=(i,s)=>{pr.setState({speakingNames:e.map(o=>{const l={...o};return i?l.light=s?l.light+1:l.light-1:l.dark=s?l.dark+1:l.dark-1,l})})};return B.jsxs("div",{"data-density":"functional",className:"grid grid-cols-3 gap-fix-md",children:[B.jsx("div",{className:"flex items-center",children:B.jsx("h6",{children:t("colorName")})}),B.jsxs("div",{className:"flex items-center",children:[B.jsx("h6",{className:"mr-auto",children:t("dark")}),B.jsx(Ot,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!1,!1),children:"Decrease"}),B.jsx(Ot,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!1,!0),children:"Increase"})]}),B.jsxs("div",{className:"flex items-center",children:[B.jsx("h6",{className:"mr-auto",children:t("light")}),B.jsx(Ot,{icon:"minus",noText:!0,variant:"ghost",onClick:()=>n(!0,!1),children:"Decrease"}),B.jsx(Ot,{icon:"plus",noText:!0,variant:"ghost",onClick:()=>n(!0,!0),children:"Increase"})]}),e.map((i,s)=>B.jsxs(H.Fragment,{children:[B.jsx("span",{children:t(i.name)}),B.jsxs("div",{className:"flex gap-fix-md",children:[B.jsx(an,{className:"w-full",variant:"floating",label:t("dark"),value:i.dark,type:"number",min:"0",onChange:o=>r({...i,dark:Number(o.target.value)},s)}),i.transparencyDark!==void 0&&B.jsx(an,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyDark,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyDark:Number(o.target.value)},s)})]}),B.jsxs("div",{className:"flex gap-fix-md",children:[B.jsx(an,{className:"w-full",variant:"floating",label:t("light"),value:i.light,type:"number",min:"0",onChange:o=>r({...i,light:Number(o.target.value)},s)}),i.transparencyLight!==void 0&&B.jsx(an,{className:"w-full",variant:"floating",label:t("transparency"),value:i.transparencyLight,type:"number",min:"0",max:"100",onChange:o=>r({...i,transparencyLight:Number(o.target.value)},s)})]})]},i.name))]})},lwe=H.memo(()=>{const{t:e}=mr(),{theme:t}=pr(r=>r);return B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:e("logo")}),B.jsxs("div",{className:"flex gap-fix-md",children:[B.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"light",children:[B.jsx(Mr,{icon:"sun",children:"Light"}),B.jsx("img",{className:"h-siz-md mx-auto",src:Jm(t.branding.image.light),alt:"logo"}),B.jsx(q0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{pr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,light:r}}}})}})]}),B.jsx(aa,{margin:"none",variant:"vertical"}),B.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-sm","data-color-scheme":"dark",children:[B.jsx(Mr,{icon:"moon",children:"Dark"}),B.jsx("img",{className:"h-siz-md mx-auto",src:Jm(t.branding.image.dark||t.branding.image.light),alt:"logo"}),B.jsx(q0,{size:"small",label:"uploadLogo",accept:"image/*",onUpload:r=>{pr.setState({theme:{...t,branding:{...t.branding,image:{...t.branding.image,dark:r}}}})}})]})]})]})}),uwe=["folder_open","document","user","wrench","toys"],cwe=()=>{const{t:e}=mr();return B.jsx("div",{className:`demo-side-nav w-full min-w-auto md:min-w-fit md:w-auto db-neutral-bg-lvl-1 p-fix-md gap-fix-md mx-[1px] md:mx-0 border-b md:border-b-0 md:border-r flex md:flex-col h-auto md:h-full - overflow-x-auto overflow-y-hidden md:overflow-x-hidden md:overflow-y-auto`,children:uwe.map(t=>z.jsx(Ot,{icon:t,variant:"ghost",width:"full",children:e(t)},`dashboard-sidenav-button-${t}`))})},o$=({linkToDemo:e,density:t})=>{const{t:r}=mr();return z.jsx(q1,{name:"Demo",density:t,actionBar:z.jsx(z.Fragment,{children:z.jsx(ik,{to:e?"/demo":"/",className:"db-button","data-variant":"brand",target:"_blank",children:r(e?"openDemo":"openMainPage")})}),children:z.jsx("main",{className:"overflow-hidden",children:z.jsxs("div",{className:"flex flex-col md:flex-row h-full",children:[z.jsx(cwe,{}),z.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md px-res-sm db-neutral-bg-lvl-2 w-full h-full overflow-y-auto",children:[z.jsx("h1",{children:r("dashboard")}),z.jsxs("div",{className:"demo-dashboard grid gap-fix-md h-full",children:[z.jsx(ls,{spacing:"small",className:"dashboard-short1 db-neutral-bg-lvl-1",children:z.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[z.jsx("h5",{children:"Mobile Users"}),z.jsx("h3",{children:"500"}),z.jsx(Mr,{className:"mt-auto",semantic:"successful",children:"Good capacity"})]})}),z.jsx(ls,{spacing:"small",className:"dashboard-short2 db-neutral-bg-lvl-1",children:z.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[z.jsx("h5",{children:"Tablet Users"}),z.jsx("h3",{children:"200"}),z.jsx(Mr,{className:"mt-auto",semantic:"warning",children:"Medium capacity"})]})}),z.jsx(ls,{spacing:"small",className:"dashboard-long db-brand-bg",elevationLevel:"1",children:z.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[z.jsx("h5",{children:"Progress"}),z.jsx("div",{className:"dashboard-progress",children:z.jsx("h5",{className:"m-auto",children:"50%"})})]})}),z.jsx(ls,{spacing:"small",className:"dashboard-big db-neutral-bg-lvl-1 flex-row justify-between",children:z.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[z.jsx("h5",{children:"Desktop Users"}),z.jsx("h3",{children:"100"}),z.jsx(Mr,{className:"mt-auto",semantic:"critical",children:"Bad capacity"})]})})]})]})]})})})},hwe=H.memo(()=>{const{t:e}=mr(),[t,r]=H.useState("regular");return z.jsxs("div",{className:"flex-col flex w-full h-full gap-fix-md p-fix-sm overflow-hidden relative",children:[z.jsx("div",{className:"flex gap-fix-md",children:z.jsxs(mc,{label:e("density"),variant:"floating",value:t,onChange:n=>r(n.target.value),children:[z.jsx("option",{value:"functional",children:"functional"}),z.jsx("option",{value:"regular",children:"regular"}),z.jsx("option",{value:"expressive",children:"expressive"})]})}),z.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:z.jsx(o$,{linkToDemo:!0,density:t})})]})}),Cp=$c(sk),dwe=(e,t)=>{if(t.at(-1)==="_scale")return e;let r=1;if(e==="none"?r=0:e==="full"?r=5:r=Number(e.replace("%",""))/100,!(t.length<1&&!Cp.has(t))){if(t[0]==="elevation"){if(t.at(-1)==="sm")return`0 0 ${r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${4*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${2*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="md")return`0 0 ${2*r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${4*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="lg")return`0 0 ${4*r}px -${3*r}px rgba(0, 0, 0, 0.2),0 0 ${16*r}px ${3*r}px rgba(0, 0, 0, 0.12),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.14)`}if(!(t.length<2)){if(t[0]==="border"){if(t[1]==="radius")return`${Number(Cp.get(t))*r}`;if(t[1]==="height"){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}}if(t[0]==="sizing"&&!t.includes("fixed")){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}if(t[0]==="spacing"){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}}}},fwe=(e,t)=>{try{let r=t;return e.forEach(n=>{r=r[n]}),r}catch(r){console.error(r)}return 1},Tp=({label:e,params:t})=>{const{t:r}=mr(),{theme:n}=pr(s=>s),i=s=>{const o=[...t];let a={...n};a=$c(a).map(function(l){this.isLeaf&&this.path.length>0&&o.every((c,u)=>c===this.path[u])&&this.update(dwe(s,this.path)||l)}),pr.setState({theme:a})};return z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx("h5",{children:r(e)}),z.jsxs(mc,{label:`${r(e)} ${r("scale")}`,variant:"floating",value:fwe([...t,"_scale"],n),onChange:s=>{i(s.target.value)},children:[t.includes("sizing")&&z.jsxs(z.Fragment,{children:[z.jsx("option",{children:"90%"}),z.jsx("option",{children:"100%"}),z.jsx("option",{children:"110%"}),z.jsx("option",{children:"120%"})]}),t.includes("spacing")&&z.jsxs(z.Fragment,{children:[z.jsx("option",{children:"90%"}),z.jsx("option",{children:"100%"}),z.jsx("option",{children:"110%"}),z.jsx("option",{children:"120%"})]}),t.includes("height")&&z.jsxs(z.Fragment,{children:[z.jsx("option",{children:"90%"}),z.jsx("option",{children:"100%"}),z.jsx("option",{children:"110%"}),z.jsx("option",{children:"120%"})]}),(t.includes("elevation")||t.includes("radius"))&&z.jsxs(z.Fragment,{children:[z.jsx("option",{children:"none"}),z.jsx("option",{children:"50%"}),z.jsx("option",{children:"100%"}),z.jsx("option",{children:"150%"}),z.jsx("option",{children:"200%"})]}),t.includes("radius")&&z.jsx("option",{children:"full"})]})]})},pwe=({tabs:e})=>{const{t}=mr(),{developerMode:r}=pr(n=>n);return z.jsxs(p6,{alignment:"center",width:"full",className:"h-full",children:[z.jsx(lk,{children:e.filter(n=>r||!n.onlyDeveloper).map(n=>z.jsx(x0,{children:t(n.text)},`tab-${n.text}`))}),e.filter(n=>r||!n.onlyDeveloper).map(n=>z.jsx(w0,{className:"h-full",children:n.component},`tab-panel-${n.text}`))]})},mwe=()=>z.jsx("div",{className:"grid grid-cols-3 md:grid-cols-9 gap-fix-md",children:J1.map(e=>z.jsxs("div",{className:"flex flex-col h-full justify-between items-center",children:[z.jsx("div",{className:"rounded w-siz-xl",style:{height:`var(--db-border-height-${e})`,border:`var(--db-border-height-${e}) solid var(--db-brand-border)`}}),z.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`border-height-${e}`))}),gwe=()=>z.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-fix-md",children:[...J1,"full"].map(e=>z.jsx("div",{className:"flex w-siz-xl h-siz-xl md:w-siz-2xl md:h-siz-2xl db-successful-bg-lvl-1 items-center justify-center",style:{borderRadius:`var(--db-border-radius-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:e},`border-radius-${e}`))}),ywe=()=>z.jsx("div",{className:"grid grid-cols-3 gap-fix-md",children:CH.map(e=>z.jsx("div",{className:"db-card items-center","data-spacing":"medium",style:{boxShadow:`var(--db-elevation-${e})`},children:e},`elevation-${e}`))}),vwe=()=>z.jsx("div",{className:"flex flex-wrap gap-fix-md",children:J1.map(e=>z.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[z.jsx("div",{className:"flex db-informational-bg-lvl-1 items-center justify-center",style:{width:`var(--db-sizing-${e})`,height:`var(--db-sizing-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:z.jsx("span",{className:"hidden",children:e})}),z.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`sizing-${e}`))}),bwe=()=>z.jsx("div",{className:"flex flex-wrap gap-fix-md",children:J1.map(e=>z.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[z.jsx("div",{className:"flex db-warning-bg-lvl-1 items-center justify-center",style:{width:`var(--db-spacing-fixed-${e})`,height:`var(--db-spacing-fixed-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:z.jsx("span",{className:"hidden",children:e})}),z.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`spacing-${e}`))}),CH=["sm","md","lg"],J1=["3xs","2xs","xs",...CH,"xl","2xl","3xl"],xwe=[{title:"spacing",component:z.jsx(bwe,{})},{title:"sizing",component:z.jsx(vwe,{})},{title:"elevation",component:z.jsx(ywe,{})},{title:"borderHeight",component:z.jsx(mwe,{})},{title:"borderRadius",component:z.jsx(gwe,{})}],Ds=({colorName:e,type:t,isBorder:r,bgTransparent:n})=>z.jsxs("div",{className:"flex flex-col gap-fix-md text-center",children:[z.jsx("p",{className:"font-bold",children:ln(`${t}${n?`-${n}`:""}`,!1," ")}),z.jsx("div",{className:"flex flex-col",children:(r?["enabled"]:["enabled","hover","pressed"]).map(i=>{const s=`var(--db-${e}-${t}${n&&i==="enabled"?`-${n}`:""}${r?"":`-${i}`})`,o=`var(--db-${e}-border)`;let a=`var(--db-${e}-on-bg-enabled)`;return t.startsWith("on-bg")?a=`var(--db-${e}-bg-lvl-1-enabled)`:t==="origin"?a=`var(--db-${e}-on-enabled)`:t==="on"?a=`var(--db-${e}-origin-enabled)`:(t==="contrast-high"||t==="contrast-low"||t==="border")&&(a=`var(--db-${e}-on-contrast-enabled)`),z.jsx("div",{className:"flex w-full md:min-w-siz-2xl h-siz-md mx-auto rounded-sm",style:{backgroundColor:s,border:`1px solid ${o}`,color:a},children:z.jsx("span",{className:"m-auto",children:i})},`color-preview-${e}-${t}-${i}`)})})]}),wwe=({colorName:e})=>z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[Qc(e)&&z.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[z.jsx(Ds,{colorName:e,type:"on"}),z.jsx(Ds,{colorName:e,type:"origin"})]}),z.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[z.jsx(Ds,{colorName:e,type:"on-bg"}),z.jsx(Ds,{colorName:e,type:"on-bg-weak"}),z.jsx(Ds,{colorName:e,type:"on-contrast"})]}),z.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[z.jsx(Ds,{colorName:e,type:"contrast-high"}),z.jsx(Ds,{colorName:e,type:"contrast-low"}),z.jsx(Ds,{colorName:e,type:"border",isBorder:!0})]}),z.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[z.jsx(Ds,{colorName:e,type:"bg-lvl-1"}),z.jsx(Ds,{colorName:e,type:"bg-lvl-2"}),z.jsx(Ds,{colorName:e,type:"bg-lvl-3"}),z.jsx(Ds,{colorName:e,type:"bg-transparent",bgTransparent:"full"}),z.jsx(Ds,{colorName:e,type:"bg-transparent",bgTransparent:"semi"})]})]}),Swe=()=>{const{theme:e}=pr(o=>o),[t,r]=H.useState(""),[n,i]=H.useState([]),{t:s}=mr();return H.useEffect(()=>{i(Object.keys({...e.colors,...e.customColors}).map(o=>({title:o,component:z.jsx(wwe,{colorName:o}),isColor:!0})))},[s,e.colors,e.customColors]),z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx(an,{variant:"floating",label:s("search"),placeholder:s("search"),type:"search",onChange:o=>r(o.target.value)}),z.jsx("div",{className:"flex flex-col gap-fix-sm w-full",children:[...xwe,...n].map(({title:o,component:a,isColor:l})=>(l?`${s("color")}: ${o}`:s(o)).toLowerCase().includes(t.toLowerCase())?z.jsx(ls,{spacing:"small",className:"w-full",children:z.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[z.jsx("h5",{children:l?`${s("color")}: ${o}`:s(o)}),a]})},`token-card-${o}`):null)})]})},Dwe=[{text:"demo",component:z.jsx(hwe,{})},{text:"components",component:z.jsx(Rxe,{})},{text:"token",component:z.jsx(Swe,{})},{text:"colorPalettes",component:z.jsx(Bxe,{}),onlyDeveloper:!0},{text:"speakingColors",component:z.jsx(awe,{}),onlyDeveloper:!0}],Ewe=()=>{const{t:e}=mr(),{theme:t}=pr(r=>r);return z.jsx(q1,{withDevMode:!0,actionBar:z.jsx(owe,{}),name:e("customization"),children:z.jsxs("div",{className:"content flex flex-col md:flex-row md:h-full md:overflow-hidden",children:[z.jsxs("div",{className:"flex flex-col p-fix-lg w-full md:w-2/5 md:h-full md:overflow-auto border-r gap-fix-xl",children:[z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsx("h5",{children:e("name")}),z.jsx(an,{variant:"floating",label:e("themeName"),placeholder:e("themeName"),value:t.branding.name,onChange:r=>pr.setState({theme:{...t,branding:{...t.branding,name:r.target.value}}})})]}),z.jsx(lwe,{}),z.jsx(aa,{margin:"none"}),z.jsx(Lxe,{}),z.jsx(aa,{margin:"none"}),z.jsx(Tp,{label:"spacing",params:["spacing"]}),z.jsx(Tp,{label:"sizing",params:["sizing"]}),z.jsx(Tp,{label:"elevation",params:["elevation"]}),z.jsx(Tp,{label:"borderHeight",params:["border","height"]}),z.jsx(Tp,{label:"borderRadius",params:["border","radius"]})]}),z.jsx("div",{className:`db-neutral-bg-lvl-2 p-fix-sm md:p-res-sm - flex flex-col gap-res-sm w-full overflow-auto`,children:z.jsx(pwe,{tabs:Dwe})})]})})},Cwe=["accessible","adaptive","efficient"],Twe=()=>{const{t:e}=mr();return z.jsx(z.Fragment,{children:Cwe.map((t,r)=>z.jsx(kg,{spacing:"medium",width:"large",className:`flex h-[100vh] items-center${r%2===0?" db-neutral-bg-lvl-2":""}`,children:z.jsxs("div",{className:"flex flex-col text-balance text-center items-center gap-fix-md",children:[z.jsx("h6",{children:e(`landingHowItFeature${r+1}Title`)}),z.jsxs("h2",{children:[e(`landingHowItFeature${r+1}Strong`),e(`landingHowItFeature${r+1}Desc`)]})]})},`feature-card-${t}`))})},Awe=()=>{const{t:e}=mr();return z.jsx(kg,{spacing:"medium",width:"large",className:"flex items-center db-brand-bg-lvl-3",children:z.jsxs("div",{className:"flex flex-col gap-fix-xl items-center text-center text-balance",children:[z.jsx("h2",{"data-icon-after":"heart",children:e("landingMoreTitle")}),z.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md mx-auto items-center",children:[z.jsx(ik,{to:"/playground",className:"db-button capitalize hidden md:block",target:"_blank","data-variant":"filled","data-width":"full",children:e("tryIt")}),z.jsx("a",{className:"db-button capitalize","data-variant":"brand",href:"https://marketingportal.extranet.deutschebahn.com/marketingportal",target:"_blank","data-width":"full",children:e("gettingStarted")})]})]})})},kwe=()=>{const{theme:e,darkMode:t}=pr(r=>r);return z.jsx(kg,{spacing:"none",width:"large",children:z.jsxs("div",{className:"flex justify-between min-h-siz-md py-fix-xs md:py-fix-md",children:[z.jsx("img",{className:"logo",src:Jm(t&&e.branding.image.dark?e.branding.image.dark:e.branding.image.light),alt:"brand"}),z.jsx("a",{href:"https://github.com/db-ui/theme-builder",target:"_blank",referrerPolicy:"no-referrer",children:z.jsx("img",{className:"my-auto logo",src:`${Yb}/assets/images/github-mark${t?"-white":""}.svg`,alt:"GitHub Mark"})})]})})},_we={name:"Deutsche Bahn",image:{light:"db_logo.svg"},alternativeColors:{brand:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1},green2:{custom:!1,hex:"#408335",dark:!0,isValid:!1}}},$we={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Fwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},Pwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Iwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Nwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Mwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},Lwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Owe={neutral:"#242629",brand:"#ec0016",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},Rwe={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},Bwe={branding:_we,spacing:$we,sizing:Fwe,typography:Pwe,border:Iwe,elevation:Nwe,transition:Mwe,font:Lwe,colors:Owe,customColors:Rwe},zwe={name:"S-Bahn",image:{light:"sbahn_logo.svg"},alternativeColors:{brand:{hex:"#4D8E45",dark:!0},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1}}},jwe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Hwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},Uwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Wwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Vwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Gwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},qwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Kwe={neutral:"#242629",brand:"#4D8E45",brandDark:"#4D8E45",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},Jwe={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},Xwe={branding:zwe,spacing:jwe,sizing:Hwe,typography:Uwe,border:Wwe,elevation:Vwe,transition:Gwe,font:qwe,colors:Kwe,customColors:Jwe},Ywe=sk,Zwe=Xwe,Qwe=Bwe,eSe={neutralTheme:Ywe,dbTheme:Qwe,sbahnTheme:Zwe},tSe=()=>{const{t:e}=mr(),[t,r]=H.useState("neutralTheme"),{darkMode:n,theme:i}=pr(s=>s);return z.jsx(kg,{width:"large",spacing:"large",className:"flex md:h-[100vh] items-center",children:z.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-fix-md md:gap-fix-3xl",children:[z.jsxs("div",{className:"flex flex-col gap-fix-md",children:[z.jsxs("h1",{children:[z.jsx("span",{className:"brand-name",children:i.branding.name}),z.jsx("br",{}),"Design System Platform"]}),z.jsx("h4",{"data-variant":"light",children:"By all, for all"}),z.jsx("p",{children:e("landingDesignSystemText")}),z.jsxs("div",{className:"grid grid-cols-4 gap-fix-md",children:[Object.entries(eSe).map(([s,o])=>z.jsx("button",{onClick:()=>{r(s),pr.setState({theme:o,luminanceSteps:g0,speakingNames:y0})},children:z.jsxs(ls,{className:"min-h-siz-xl",spacing:"small","data-selected":t===s,elevationLevel:"2",behaviour:"interactive",children:[z.jsx("img",{className:"logo m-auto",src:Jm(n&&o.branding.image.dark?o.branding.image.dark:o.branding.image.light),alt:"brand"}),z.jsx(Ks,{placement:"bottom",children:e(s)})]})},s)),z.jsx(ik,{className:"no-underline",to:"/customization",target:"_blank",children:z.jsx(ls,{className:"items-center justify-center min-h-siz-xl",spacing:"small","data-selected":"false",elevationLevel:"2",behaviour:"interactive",children:z.jsx(df,{icon:"plus",children:"Add custom theme"})})})]})]}),z.jsx("div",{className:"flex col-span-2 relative",children:z.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:z.jsx(o$,{linkToDemo:!0})})})]})})},rSe=()=>z.jsxs("div",{className:"flex flex-col overflow-y-auto h-full",children:[z.jsx(kwe,{}),z.jsxs("main",{children:[z.jsx(tSe,{}),z.jsx(Twe,{}),z.jsx(Awe,{})]})]});function ci(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:X1(e)?2:Y1(e)?3:0}function lg(e,t){return yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jv(e,t){return yu(e)===2?e.get(t):e[t]}function TH(e,t,r){var n=yu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function nSe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function X1(e){return uSe&&e instanceof Map}function Y1(e){return cSe&&e instanceof Set}function Un(e){return e.o||e.t}function a$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=dSe(e);delete t[_r];for(var r=d$(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=iSe),Object.freeze(e),t&&Uc(e,function(r,n){return l$(n,!0)},!0)),e}function iSe(){ci(2)}function u$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function oa(e){var t=yT[e];return t||ci(18,e),t}function AH(e,t){yT[e]||(yT[e]=t)}function K0(){return cg}function DD(e,t){t&&(oa("Patches"),e.u=[],e.s=[],e.v=t)}function J0(e){gT(e),e.p.forEach(sSe),e.p=null}function gT(e){e===cg&&(cg=e.l)}function yL(e){return cg={p:[],l:cg,h:e,m:!0,_:0}}function sSe(e){var t=e[_r];t.i===0||t.i===1?t.j():t.g=!0}function ED(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||oa("ES5").S(t,e,n),n?(r[_r].P&&(J0(t),ci(4)),pa(e)&&(e=X0(t,e),t.l||Y0(t,e)),t.u&&oa("Patches").M(r[_r].t,e,t.u,t.s)):e=X0(t,r,[]),J0(t),t.u&&t.v(t.u,t.s),e!==h$?e:void 0}function X0(e,t,r){if(u$(t))return t;var n=t[_r];if(!n)return Uc(t,function(a,l){return vL(e,n,t,a,l,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Y0(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=a$(n.k):n.o,s=i,o=!1;n.i===3&&(s=new Set(i),i.clear(),o=!0),Uc(s,function(a,l){return vL(e,n,i,a,l,r,o)}),Y0(e,i,!1),r&&e.u&&oa("Patches").N(n,r,e.u,e.s)}return n.o}function vL(e,t,r,n,i,s,o){if(Hc(i)){var a=X0(e,i,s&&t&&t.i!==3&&!lg(t.R,n)?s.concat(n):void 0);if(TH(r,n,a),!Hc(a))return;e.m=!1}else o&&r.add(i);if(pa(i)&&!u$(i)){if(!e.h.D&&e._<1)return;X0(e,i),t&&t.A.l||Y0(e,i)}}function Y0(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&l$(t,r)}function CD(e,t){var r=e[_r];return(r?Un(r):e)[t]}function bL(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function La(e){e.P||(e.P=!0,e.l&&La(e.l))}function TD(e){e.o||(e.o=a$(e.t))}function ug(e,t,r){var n=X1(t)?oa("MapSet").F(t,r):Y1(t)?oa("MapSet").T(t,r):e.O?function(i,s){var o=Array.isArray(i),a={i:o?1:0,A:s?s.A:K0(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},l=a,c=vT;o&&(l=[a],c=Up);var u=Proxy.revocable(l,c),h=u.revoke,d=u.proxy;return a.k=d,a.j=h,d}(t,r):oa("ES5").J(t,r);return(r?r.A:K0()).p.push(n),n}function oSe(e){return Hc(e)||ci(22,e),function t(r){if(!pa(r))return r;var n,i=r[_r],s=yu(r);if(i){if(!i.P&&(i.i<4||!oa("ES5").K(i)))return i.t;i.I=!0,n=xL(r,s),i.I=!1}else n=xL(r,s);return Uc(n,function(o,a){i&&jv(i.t,o)===a||TH(n,o,t(a))}),s===3?new Set(n):n}(e)}function xL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a$(e)}function aSe(){function e(n){if(!pa(n))return n;if(Array.isArray(n))return n.map(e);if(X1(n))return new Map(Array.from(n.entries()).map(function(o){return[o[0],e(o[1])]}));if(Y1(n))return new Set(Array.from(n).map(e));var i=Object.create(Object.getPrototypeOf(n));for(var s in n)i[s]=e(n[s]);return lg(n,Sm)&&(i[Sm]=n[Sm]),i}function t(n){return Hc(n)?e(n):n}var r="add";AH("Patches",{$:function(n,i){return i.forEach(function(s){for(var o=s.path,a=s.op,l=n,c=0;c1?b-1:0),E=1;E1?u-1:0),d=1;d=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var o=oa("Patches").$;return Hc(r)?o(r,n):this.produce(r,function(a){return o(a,n)})},e}(),Ns=new fSe,pSe=Ns.produce,DL=Ns.produceWithPatches.bind(Ns);Ns.setAutoFreeze.bind(Ns);Ns.setUseProxies.bind(Ns);var EL=Ns.applyPatches.bind(Ns);Ns.createDraft.bind(Ns);Ns.finishDraft.bind(Ns);function mSe(){this.__data__=[],this.size=0}var gSe=mSe;function ySe(e,t){return e===t||e!==e&&t!==t}var kH=ySe,vSe=kH;function bSe(e,t){for(var r=e.length;r--;)if(vSe(e[r][0],t))return r;return-1}var Z1=bSe,xSe=Z1,wSe=Array.prototype,SSe=wSe.splice;function DSe(e){var t=this.__data__,r=xSe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():SSe.call(t,r,1),--this.size,!0}var ESe=DSe,CSe=Z1;function TSe(e){var t=this.__data__,r=CSe(t,e);return r<0?void 0:t[r][1]}var ASe=TSe,kSe=Z1;function _Se(e){return kSe(this.__data__,e)>-1}var $Se=_Se,FSe=Z1;function PSe(e,t){var r=this.__data__,n=FSe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ISe=PSe,NSe=gSe,MSe=ESe,LSe=ASe,OSe=$Se,RSe=ISe;function Pf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ta))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=r&CCe?new wCe:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=MTe}var OH=LTe,OTe=tx,RTe=OH,BTe=ix,zTe="[object Arguments]",jTe="[object Array]",HTe="[object Boolean]",UTe="[object Date]",WTe="[object Error]",VTe="[object Function]",GTe="[object Map]",qTe="[object Number]",KTe="[object Object]",JTe="[object RegExp]",XTe="[object Set]",YTe="[object String]",ZTe="[object WeakMap]",QTe="[object ArrayBuffer]",eAe="[object DataView]",tAe="[object Float32Array]",rAe="[object Float64Array]",nAe="[object Int8Array]",iAe="[object Int16Array]",sAe="[object Int32Array]",oAe="[object Uint8Array]",aAe="[object Uint8ClampedArray]",lAe="[object Uint16Array]",uAe="[object Uint32Array]",Zr={};Zr[tAe]=Zr[rAe]=Zr[nAe]=Zr[iAe]=Zr[sAe]=Zr[oAe]=Zr[aAe]=Zr[lAe]=Zr[uAe]=!0;Zr[zTe]=Zr[jTe]=Zr[QTe]=Zr[HTe]=Zr[eAe]=Zr[UTe]=Zr[WTe]=Zr[VTe]=Zr[GTe]=Zr[qTe]=Zr[KTe]=Zr[JTe]=Zr[XTe]=Zr[YTe]=Zr[ZTe]=!1;function cAe(e){return BTe(e)&&RTe(e.length)&&!!Zr[OTe(e)]}var hAe=cAe;function dAe(e){return function(t){return e(t)}}var fAe=dAe,eb={exports:{}};eb.exports;(function(e,t){var r=_H,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=a})(eb,eb.exports);var g$=eb.exports,pAe=hAe,mAe=fAe,LL=g$,OL=LL&&LL.isTypedArray,gAe=OL?mAe(OL):pAe,RH=gAe,yAe=yTe,vAe=kTe,bAe=m$,xAe=LH,wAe=NTe,SAe=RH,DAe=Object.prototype,EAe=DAe.hasOwnProperty;function CAe(e,t){var r=bAe(e),n=!r&&vAe(e),i=!r&&!n&&xAe(e),s=!r&&!n&&!i&&SAe(e),o=r||n||i||s,a=o?yAe(e.length,String):[],l=a.length;for(var c in e)(t||EAe.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wAe(c,l)))&&a.push(c);return a}var TAe=CAe,AAe=Object.prototype;function kAe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AAe;return e===r}var _Ae=kAe;function $Ae(e,t){return function(r){return e(t(r))}}var FAe=$Ae,PAe=FAe,IAe=PAe(Object.keys,Object),NAe=IAe,MAe=_Ae,LAe=NAe,OAe=Object.prototype,RAe=OAe.hasOwnProperty;function BAe(e){if(!MAe(e))return LAe(e);var t=[];for(var r in Object(e))RAe.call(e,r)&&r!="constructor"&&t.push(r);return t}var zAe=BAe,jAe=f$,HAe=OH;function UAe(e){return e!=null&&HAe(e.length)&&!jAe(e)}var WAe=UAe,VAe=TAe,GAe=zAe,qAe=WAe;function KAe(e){return qAe(e)?VAe(e):GAe(e)}var JAe=KAe,XAe=sTe,YAe=mTe,ZAe=JAe;function QAe(e){return XAe(e,ZAe,YAe)}var eke=QAe,RL=eke,tke=1,rke=Object.prototype,nke=rke.hasOwnProperty;function ike(e,t,r,n,i,s){var o=r&tke,a=RL(e),l=a.length,c=RL(t),u=c.length;if(l!=u&&!o)return!1;for(var h=l;h--;){var d=a[h];if(!(o?d in t:nke.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var y=o;++hcrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var Gke="Invariant failed";function Gr(e,t){if(!e)throw new Error(Gke)}var Ua="ROOT",jH="canvas-ROOT",qke="Attempting to add a node with duplicated id",Kke="Node cannot be dropped into target parent",Jke="Target parent rejects incoming node",Xke="Current parent rejects outgoing node",YL="Cannot move node that is not a direct child of a Canvas node",Yke="Cannot move node into a non-Canvas parent",ZL="A top-level Node cannot be moved",Zke="Cannot move node into a descendant",HH="The component type specified for this node (%node_type%) does not exist in the resolver",Qke="The node has specified a canDrag() rule that prevents it from being dragged",e_e=`An Error occurred while deserializing components: Cannot find component <%displayName% /> in resolver map. Please check your resolver in + overflow-x-auto overflow-y-hidden md:overflow-x-hidden md:overflow-y-auto`,children:uwe.map(t=>B.jsx(Ot,{icon:t,variant:"ghost",width:"full",children:e(t)},`dashboard-sidenav-button-${t}`))})},o$=({linkToDemo:e,density:t})=>{const{t:r}=mr();return B.jsx(q1,{name:"Demo",density:t,actionBar:B.jsx(B.Fragment,{children:B.jsx(ik,{to:e?"/demo":"/",className:"db-button","data-variant":"brand",target:"_blank",children:r(e?"openDemo":"openMainPage")})}),children:B.jsx("main",{className:"overflow-hidden",children:B.jsxs("div",{className:"flex flex-col md:flex-row h-full",children:[B.jsx(cwe,{}),B.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md px-res-sm db-neutral-bg-lvl-2 w-full h-full overflow-y-auto",children:[B.jsx("h1",{children:r("dashboard")}),B.jsxs("div",{className:"demo-dashboard grid gap-fix-md h-full",children:[B.jsx(ls,{spacing:"small",className:"dashboard-short1 db-neutral-bg-lvl-1",children:B.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[B.jsx("h5",{children:"Mobile Users"}),B.jsx("h3",{children:"500"}),B.jsx(Mr,{className:"mt-auto",semantic:"successful",children:"Good capacity"})]})}),B.jsx(ls,{spacing:"small",className:"dashboard-short2 db-neutral-bg-lvl-1",children:B.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[B.jsx("h5",{children:"Tablet Users"}),B.jsx("h3",{children:"200"}),B.jsx(Mr,{className:"mt-auto",semantic:"warning",children:"Medium capacity"})]})}),B.jsx(ls,{spacing:"small",className:"dashboard-long db-brand-bg",elevationLevel:"1",children:B.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[B.jsx("h5",{children:"Progress"}),B.jsx("div",{className:"dashboard-progress",children:B.jsx("h5",{className:"m-auto",children:"50%"})})]})}),B.jsx(ls,{spacing:"small",className:"dashboard-big db-neutral-bg-lvl-1 flex-row justify-between",children:B.jsxs("div",{className:"flex flex-col gap-fix-md h-full",children:[B.jsx("h5",{children:"Desktop Users"}),B.jsx("h3",{children:"100"}),B.jsx(Mr,{className:"mt-auto",semantic:"critical",children:"Bad capacity"})]})})]})]})]})})})},hwe=H.memo(()=>{const{t:e}=mr(),[t,r]=H.useState("regular");return B.jsxs("div",{className:"flex-col flex w-full h-full gap-fix-md p-fix-sm overflow-hidden relative",children:[B.jsx("div",{className:"flex gap-fix-md",children:B.jsxs(mc,{label:e("density"),variant:"floating",value:t,onChange:n=>r(n.target.value),children:[B.jsx("option",{value:"functional",children:"functional"}),B.jsx("option",{value:"regular",children:"regular"}),B.jsx("option",{value:"expressive",children:"expressive"})]})}),B.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:B.jsx(o$,{linkToDemo:!0,density:t})})]})}),Cp=$c(sk),dwe=(e,t)=>{if(t.at(-1)==="_scale")return e;let r=1;if(e==="none"?r=0:e==="full"?r=5:r=Number(e.replace("%",""))/100,!(t.length<1&&!Cp.has(t))){if(t[0]==="elevation"){if(t.at(-1)==="sm")return`0 0 ${r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${4*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${2*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="md")return`0 0 ${2*r}px -${r}px rgba(0, 0, 0, 0.2),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.12),0 0 ${4*r}px 0 rgba(0, 0, 0, 0.14)`;if(t.at(-1)==="lg")return`0 0 ${4*r}px -${3*r}px rgba(0, 0, 0, 0.2),0 0 ${16*r}px ${3*r}px rgba(0, 0, 0, 0.12),0 0 ${8*r}px ${r}px rgba(0, 0, 0, 0.14)`}if(!(t.length<2)){if(t[0]==="border"){if(t[1]==="radius")return`${Number(Cp.get(t))*r}`;if(t[1]==="height"){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}}if(t[0]==="sizing"&&!t.includes("fixed")){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}if(t[0]==="spacing"){const n=Number(Cp.get(t));return`${n+n*(r-1)}`}}}},fwe=(e,t)=>{try{let r=t;return e.forEach(n=>{r=r[n]}),r}catch(r){console.error(r)}return 1},Tp=({label:e,params:t})=>{const{t:r}=mr(),{theme:n}=pr(s=>s),i=s=>{const o=[...t];let l={...n};l=$c(l).map(function(a){this.isLeaf&&this.path.length>0&&o.every((c,u)=>c===this.path[u])&&this.update(dwe(s,this.path)||a)}),pr.setState({theme:l})};return B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:r(e)}),B.jsxs(mc,{label:`${r(e)} ${r("scale")}`,variant:"floating",value:fwe([...t,"_scale"],n),onChange:s=>{i(s.target.value)},children:[t.includes("sizing")&&B.jsxs(B.Fragment,{children:[B.jsx("option",{children:"90%"}),B.jsx("option",{children:"100%"}),B.jsx("option",{children:"110%"}),B.jsx("option",{children:"120%"})]}),t.includes("spacing")&&B.jsxs(B.Fragment,{children:[B.jsx("option",{children:"90%"}),B.jsx("option",{children:"100%"}),B.jsx("option",{children:"110%"}),B.jsx("option",{children:"120%"})]}),t.includes("height")&&B.jsxs(B.Fragment,{children:[B.jsx("option",{children:"90%"}),B.jsx("option",{children:"100%"}),B.jsx("option",{children:"110%"}),B.jsx("option",{children:"120%"})]}),(t.includes("elevation")||t.includes("radius"))&&B.jsxs(B.Fragment,{children:[B.jsx("option",{children:"none"}),B.jsx("option",{children:"50%"}),B.jsx("option",{children:"100%"}),B.jsx("option",{children:"150%"}),B.jsx("option",{children:"200%"})]}),t.includes("radius")&&B.jsx("option",{children:"full"})]})]})},pwe=({tabs:e})=>{const{t}=mr(),{developerMode:r}=pr(n=>n);return B.jsxs(p6,{alignment:"center",width:"full",className:"h-full",children:[B.jsx(lk,{children:e.filter(n=>r||!n.onlyDeveloper).map(n=>B.jsx(x0,{children:t(n.text)},`tab-${n.text}`))}),e.filter(n=>r||!n.onlyDeveloper).map(n=>B.jsx(w0,{className:"h-full",children:n.component},`tab-panel-${n.text}`))]})},mwe=()=>B.jsx("div",{className:"grid grid-cols-3 md:grid-cols-9 gap-fix-md",children:J1.map(e=>B.jsxs("div",{className:"flex flex-col h-full justify-between items-center",children:[B.jsx("div",{className:"rounded w-siz-xl",style:{height:`var(--db-border-height-${e})`,border:`var(--db-border-height-${e}) solid var(--db-brand-border)`}}),B.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`border-height-${e}`))}),gwe=()=>B.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-fix-md",children:[...J1,"full"].map(e=>B.jsx("div",{className:"flex w-siz-xl h-siz-xl md:w-siz-2xl md:h-siz-2xl db-successful-bg-lvl-1 items-center justify-center",style:{borderRadius:`var(--db-border-radius-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:e},`border-radius-${e}`))}),ywe=()=>B.jsx("div",{className:"grid grid-cols-3 gap-fix-md",children:CH.map(e=>B.jsx("div",{className:"db-card items-center","data-spacing":"medium",style:{boxShadow:`var(--db-elevation-${e})`},children:e},`elevation-${e}`))}),vwe=()=>B.jsx("div",{className:"flex flex-wrap gap-fix-md",children:J1.map(e=>B.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[B.jsx("div",{className:"flex db-informational-bg-lvl-1 items-center justify-center",style:{width:`var(--db-sizing-${e})`,height:`var(--db-sizing-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:B.jsx("span",{className:"hidden",children:e})}),B.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`sizing-${e}`))}),bwe=()=>B.jsx("div",{className:"flex flex-wrap gap-fix-md",children:J1.map(e=>B.jsxs("div",{className:"flex flex-col h-full justify-between items-center gap-fix-md",children:[B.jsx("div",{className:"flex db-warning-bg-lvl-1 items-center justify-center",style:{width:`var(--db-spacing-fixed-${e})`,height:`var(--db-spacing-fixed-${e})`,border:"var(--db-border-height-3xs) solid var(--db-current-color-border)"},children:B.jsx("span",{className:"hidden",children:e})}),B.jsx(Mr,{semantic:"informational",icon:"none",children:e})]},`spacing-${e}`))}),CH=["sm","md","lg"],J1=["3xs","2xs","xs",...CH,"xl","2xl","3xl"],xwe=[{title:"spacing",component:B.jsx(bwe,{})},{title:"sizing",component:B.jsx(vwe,{})},{title:"elevation",component:B.jsx(ywe,{})},{title:"borderHeight",component:B.jsx(mwe,{})},{title:"borderRadius",component:B.jsx(gwe,{})}],Ds=({colorName:e,type:t,isBorder:r,bgTransparent:n})=>B.jsxs("div",{className:"flex flex-col gap-fix-md text-center",children:[B.jsx("p",{className:"font-bold",children:ln(`${t}${n?`-${n}`:""}`,!1," ")}),B.jsx("div",{className:"flex flex-col",children:(r?["enabled"]:["enabled","hover","pressed"]).map(i=>{const s=`var(--db-${e}-${t}${n&&i==="enabled"?`-${n}`:""}${r?"":`-${i}`})`,o=`var(--db-${e}-border)`;let l=`var(--db-${e}-on-bg-enabled)`;return t.startsWith("on-bg")?l=`var(--db-${e}-bg-lvl-1-enabled)`:t==="origin"?l=`var(--db-${e}-on-enabled)`:t==="on"?l=`var(--db-${e}-origin-enabled)`:(t==="contrast-high"||t==="contrast-low"||t==="border")&&(l=`var(--db-${e}-on-contrast-enabled)`),B.jsx("div",{className:"flex w-full md:min-w-siz-2xl h-siz-md mx-auto rounded-sm",style:{backgroundColor:s,border:`1px solid ${o}`,color:l},children:B.jsx("span",{className:"m-auto",children:i})},`color-preview-${e}-${t}-${i}`)})})]}),wwe=({colorName:e})=>B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[Qc(e)&&B.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[B.jsx(Ds,{colorName:e,type:"on"}),B.jsx(Ds,{colorName:e,type:"origin"})]}),B.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[B.jsx(Ds,{colorName:e,type:"on-bg"}),B.jsx(Ds,{colorName:e,type:"on-bg-weak"}),B.jsx(Ds,{colorName:e,type:"on-contrast"})]}),B.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[B.jsx(Ds,{colorName:e,type:"contrast-high"}),B.jsx(Ds,{colorName:e,type:"contrast-low"}),B.jsx(Ds,{colorName:e,type:"border",isBorder:!0})]}),B.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md",children:[B.jsx(Ds,{colorName:e,type:"bg-lvl-1"}),B.jsx(Ds,{colorName:e,type:"bg-lvl-2"}),B.jsx(Ds,{colorName:e,type:"bg-lvl-3"}),B.jsx(Ds,{colorName:e,type:"bg-transparent",bgTransparent:"full"}),B.jsx(Ds,{colorName:e,type:"bg-transparent",bgTransparent:"semi"})]})]}),Swe=()=>{const{theme:e}=pr(o=>o),[t,r]=H.useState(""),[n,i]=H.useState([]),{t:s}=mr();return H.useEffect(()=>{i(Object.keys({...e.colors,...e.additionalColors,...e.customColors}).map(o=>({title:o,component:B.jsx(wwe,{colorName:o}),isColor:!0})))},[s,e.additionalColors,e.colors,e.customColors]),B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx(an,{variant:"floating",label:s("search"),placeholder:s("search"),type:"search",onChange:o=>r(o.target.value)}),B.jsx("div",{className:"flex flex-col gap-fix-sm w-full",children:[...xwe,...n].map(({title:o,component:l,isColor:a})=>(a?`${s("color")}: ${o}`:s(o)).toLowerCase().includes(t.toLowerCase())?B.jsx(ls,{spacing:"small",className:"w-full",children:B.jsxs("div",{className:"flex flex-col gap-fix-sm",children:[B.jsx("h5",{children:a?`${s("color")}: ${o}`:s(o)}),l]})},`token-card-${o}`):null)})]})},Dwe=[{text:"demo",component:B.jsx(hwe,{})},{text:"components",component:B.jsx(Rxe,{})},{text:"token",component:B.jsx(Swe,{})},{text:"colorPalettes",component:B.jsx(Bxe,{}),onlyDeveloper:!0},{text:"speakingColors",component:B.jsx(awe,{}),onlyDeveloper:!0}],Ewe=()=>{const{t:e}=mr(),{theme:t}=pr(r=>r);return B.jsx(q1,{withDevMode:!0,actionBar:B.jsx(owe,{}),name:e("customization"),children:B.jsxs("div",{className:"content flex flex-col md:flex-row md:h-full md:overflow-hidden",children:[B.jsxs("div",{className:"flex flex-col p-fix-lg w-full md:w-2/5 md:h-full md:overflow-auto border-r gap-fix-xl",children:[B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsx("h5",{children:e("name")}),B.jsx(an,{variant:"floating",label:e("themeName"),placeholder:e("themeName"),value:t.branding.name,onChange:r=>pr.setState({theme:{...t,branding:{...t.branding,name:r.target.value}}})})]}),B.jsx(lwe,{}),B.jsx(aa,{margin:"none"}),B.jsx(Lxe,{}),B.jsx(aa,{margin:"none"}),B.jsx(Tp,{label:"spacing",params:["spacing"]}),B.jsx(Tp,{label:"sizing",params:["sizing"]}),B.jsx(Tp,{label:"elevation",params:["elevation"]}),B.jsx(Tp,{label:"borderHeight",params:["border","height"]}),B.jsx(Tp,{label:"borderRadius",params:["border","radius"]})]}),B.jsx("div",{className:`db-neutral-bg-lvl-2 p-fix-sm md:p-res-sm + flex flex-col gap-res-sm w-full overflow-auto`,children:B.jsx(pwe,{tabs:Dwe})})]})})},Cwe=["accessible","adaptive","efficient"],Twe=()=>{const{t:e}=mr();return B.jsx(B.Fragment,{children:Cwe.map((t,r)=>B.jsx(kg,{spacing:"medium",width:"large",className:`flex h-[100vh] items-center${r%2===0?" db-neutral-bg-lvl-2":""}`,children:B.jsxs("div",{className:"flex flex-col text-balance text-center items-center gap-fix-md",children:[B.jsx("h6",{children:e(`landingHowItFeature${r+1}Title`)}),B.jsxs("h2",{children:[e(`landingHowItFeature${r+1}Strong`),e(`landingHowItFeature${r+1}Desc`)]})]})},`feature-card-${t}`))})},Awe=()=>{const{t:e}=mr();return B.jsx(kg,{spacing:"medium",width:"large",className:"flex items-center db-brand-bg-lvl-3",children:B.jsxs("div",{className:"flex flex-col gap-fix-xl items-center text-center text-balance",children:[B.jsx("h2",{"data-icon-after":"heart",children:e("landingMoreTitle")}),B.jsxs("div",{className:"flex flex-col md:flex-row gap-fix-md mx-auto items-center",children:[B.jsx(ik,{to:"/playground",className:"db-button capitalize hidden md:block",target:"_blank","data-variant":"filled","data-width":"full",children:e("tryIt")}),B.jsx("a",{className:"db-button capitalize","data-variant":"brand",href:"https://marketingportal.extranet.deutschebahn.com/marketingportal",target:"_blank","data-width":"full",children:e("gettingStarted")})]})]})})},kwe=()=>{const{theme:e,darkMode:t}=pr(r=>r);return B.jsx(kg,{spacing:"none",width:"large",children:B.jsxs("div",{className:"flex justify-between min-h-siz-md py-fix-xs md:py-fix-md",children:[B.jsx("img",{className:"logo",src:Jm(t&&e.branding.image.dark?e.branding.image.dark:e.branding.image.light),alt:"brand"}),B.jsx("a",{href:"https://github.com/db-ui/theme-builder",target:"_blank",referrerPolicy:"no-referrer",children:B.jsx("img",{className:"my-auto logo",src:`${Yb}/assets/images/github-mark${t?"-white":""}.svg`,alt:"GitHub Mark"})})]})})},_we={name:"Deutsche Bahn",image:{light:"db_logo.svg"},alternativeColors:{brand:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1},green2:{custom:!1,hex:"#408335",dark:!0,isValid:!1}}},$we={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Fwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},Pwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Iwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Nwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Mwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},Lwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Owe={neutral:"#242629",brand:"#ec0016",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},Rwe={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},Bwe={branding:_we,spacing:$we,sizing:Fwe,typography:Pwe,border:Iwe,elevation:Nwe,transition:Mwe,font:Lwe,colors:Owe,additionalColors:Rwe},jwe={name:"S-Bahn",image:{light:"sbahn_logo.svg"},alternativeColors:{brand:{hex:"#4D8E45",dark:!0},yellow:{custom:!1,hex:"#aa8f00",dark:!1,isValid:!1},orange:{custom:!1,hex:"#d17d00",dark:!1,isValid:!1},red:{custom:!1,hex:"#EC0016",dark:!0,isValid:!1},burgundy:{custom:!1,hex:"#A9455D",dark:!0,isValid:!1},pink:{custom:!1,hex:"#E93E8F",dark:!0,isValid:!1},violet:{custom:!1,hex:"#814997",dark:!0,isValid:!1},blue:{custom:!1,hex:"#1558c6",dark:!0,isValid:!1},cyan:{custom:!1,hex:"#2e9acb",dark:!1,isValid:!1},turquoise:{custom:!1,hex:"#00A099",dark:!0,isValid:!1},green:{custom:!1,hex:"#63A615",dark:!0,isValid:!1}}},zwe={_scale:"100%",responsive:{regular:{desktop:{"3xl":"40","2xl":"30",xl:"15",lg:"7.5",md:"5",sm:"3",xs:"2","2xs":"1.5","3xs":"1.25"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"}},functional:{desktop:{"3xs":"1","2xs":"1.25",xs:"1.75",sm:"2.5",md:"4",lg:"6",xl:"10","2xl":"15","3xl":"30"},tablet:{"3xs":"1","2xs":"1.25",xs:"1.5",sm:"2",md:"3",lg:"5",xl:"7.5","2xl":"10","3xl":"15"},mobile:{"3xs":"1","2xs":"1.25",xs:"1.25",sm:"1.75",md:"2.5",lg:"4",xl:"6","2xl":"7.5","3xl":"10"}},expressive:{desktop:{"3xs":"1.75","2xs":"2",xs:"3",sm:"5",md:"7.5",lg:"15",xl:"30","2xl":"40","3xl":"50"},tablet:{"3xs":"1.5","2xs":"1.75",xs:"2.5",sm:"4",md:"6",lg:"10",xl:"15","2xl":"30","3xl":"40"},mobile:{"3xs":"1.25","2xs":"1.5",xs:"2",sm:"3",md:"5",lg:"7.5",xl:"10","2xl":"15","3xl":"30"}}},fixed:{regular:{"3xs":"0.125","2xs":"0.25",xs:"0.5",sm:"0.75",md:"1",lg:"1.5",xl:"2","2xl":"3","3xl":"5"},functional:{"3xs":"0.125","2xs":"0.25",xs:"0.375",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"2","3xl":"3"},expressive:{"3xs":"0.25","2xs":"0.5",xs:"0.75",sm:"1",md:"1.5",lg:"2",xl:"3","2xl":"5","3xl":"7.5"}}},Hwe={_scale:"100%",fixed:{mobile:{header:"3.5"}},regular:{"3xl":"15","2xl":"10",xl:"6",lg:"4",md:"2.5",sm:"1.5",xs:"1","2xs":"0.75","3xs":"0.5"},functional:{"3xs":"0.375","2xs":"0.625",xs:"0.875",sm:"1.25",md:"2",lg:"3",xl:"5","2xl":"7.5","3xl":"10"},expressive:{"3xs":"0.625","2xs":"0.875",xs:"1.25",sm:"1.75",md:"3",lg:"5",xl:"7.5","2xl":"15","3xl":"30"}},Uwe={regular:{desktop:{headline:{"3xl":{lineHeight:1.2,fontSize:"5"},"2xl":{lineHeight:1.25,fontSize:"4"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xs":{lineHeight:1.25,fontSize:"1"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"}},body:{lg:{lineHeight:1.4,fontSize:"1.25"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"}}},mobile:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4,fontSize:"1.25"},"3xl":{lineHeight:1.4,fontSize:"1.25"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.4,fontSize:"1.25"},md:{lineHeight:1.5,fontSize:"1"},sm:{lineHeight:1.4285714285714286,fontSize:"0.875"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.3333333333333333,fontSize:"0.75"},"2xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"3xl":{lineHeight:1.5,fontSize:"2"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.3333333333333333,fontSize:"3"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.3333333333333333,fontSize:"3"},"3xs":{lineHeight:1.25,fontSize:"1"}}}},functional:{desktop:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},tablet:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.4,fontSize:"1.25"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.4285714285714286,fontSize:"1.75"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1428571428571428,fontSize:"1.75"},md:{lineHeight:1.1666666666666667,fontSize:"1.5"},sm:{lineHeight:1.2,fontSize:"1.25"},xl:{lineHeight:1.25,fontSize:"2"},xs:{lineHeight:1.25,fontSize:"1"},"2xl":{lineHeight:1.25,fontSize:"2"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.25,fontSize:"2"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}},mobile:{body:{lg:{lineHeight:1.5,fontSize:"1"},md:{lineHeight:1.4285714285714286,fontSize:"0.875"},sm:{lineHeight:1.3333333333333333,fontSize:"0.75"},xl:{lineHeight:1.5,fontSize:"1"},xs:{lineHeight:1.4,fontSize:"0.625"},"2xl":{lineHeight:1.5,fontSize:"1"},"3xl":{lineHeight:1.5,fontSize:"1"},"2xs":{lineHeight:1.4,fontSize:"0.625"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.1666666666666667,fontSize:"1.5"},md:{lineHeight:1.2,fontSize:"1.25"},sm:{lineHeight:1.25,fontSize:"1"},xl:{lineHeight:1.1428571428571428,fontSize:"1.75"},xs:{lineHeight:1.1428571428571428,fontSize:"0.875"},"2xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xs":{lineHeight:1.1428571428571428,fontSize:"0.875"},"3xl":{lineHeight:1.1428571428571428,fontSize:"1.75"},"3xs":{lineHeight:1.1428571428571428,fontSize:"0.875"}}}},expressive:{desktop:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.3333333333333333,fontSize:"3"},md:{lineHeight:1.2,fontSize:"2.5"},sm:{lineHeight:1.25,fontSize:"2"},xl:{lineHeight:1.25,fontSize:"4"},xs:{lineHeight:1.1428571428571428,fontSize:"1.75"},"2xl":{lineHeight:1.2,fontSize:"5"},"2xs":{lineHeight:1.1666666666666667,fontSize:"1.5"},"3xl":{lineHeight:1.25,fontSize:"6"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},tablet:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.4285714285714286,fontSize:"1.75"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.5,fontSize:"2"},"3xl":{lineHeight:1.6,fontSize:"2.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.2,fontSize:"2.5"},md:{lineHeight:1.25,fontSize:"2"},sm:{lineHeight:1.1428571428571428,fontSize:"1.75"},xl:{lineHeight:1.3333333333333333,fontSize:"3"},xs:{lineHeight:1.1666666666666667,fontSize:"1.5"},"2xl":{lineHeight:1.25,fontSize:"4"},"2xs":{lineHeight:1.2,fontSize:"1.25"},"3xl":{lineHeight:1.2,fontSize:"5"},"3xs":{lineHeight:1.2,fontSize:"1.25"}}},mobile:{body:{lg:{lineHeight:1.3333333333333333,fontSize:"1.5"},md:{lineHeight:1.4,fontSize:"1.25"},sm:{lineHeight:1.5,fontSize:"1"},xl:{lineHeight:1.3333333333333333,fontSize:"1.5"},xs:{lineHeight:1.4285714285714286,fontSize:"0.875"},"2xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"3xl":{lineHeight:1.3333333333333333,fontSize:"1.5"},"2xs":{lineHeight:1.3333333333333333,fontSize:"0.75"},"3xs":{lineHeight:1.4,fontSize:"0.625"}},headline:{lg:{lineHeight:1.25,fontSize:"2"},md:{lineHeight:1.1428571428571428,fontSize:"1.75"},sm:{lineHeight:1.1666666666666667,fontSize:"1.5"},xl:{lineHeight:1.2,fontSize:"2.5"},xs:{lineHeight:1.2,fontSize:"1.25"},"2xl":{lineHeight:1.2,fontSize:"2.5"},"2xs":{lineHeight:1.25,fontSize:"1"},"3xl":{lineHeight:1.2,fontSize:"2.5"},"3xs":{lineHeight:1.25,fontSize:"1"}}}}},Wwe={height:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.375",md:"0.5",lg:"0.625",xl:"0.75","2xl":"0.875","3xl":"1"},radius:{_scale:"100%","3xs":"0.0625","2xs":"0.125",xs:"0.25",sm:"0.5",md:"0.75",lg:"1",xl:"1.5","2xl":"1.75","3xl":"2",full:"500"}},Vwe={_scale:"100%",sm:"0 0 1px -1px rgba(0, 0, 0, 0.2), 0 0 4px 1px rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)",md:"0 0 2px -1px rgba(0, 0, 0, 0.2), 0 0 8px 1px rgba(0, 0, 0, 0.12), 0 0 4px 0 rgba(0, 0, 0, 0.14)",lg:"0 0 4px -3px rgba(0, 0, 0, 0.2), 0 0 16px 3px rgba(0, 0, 0, 0.12), 0 0 8px 1px rgba(0, 0, 0, 0.14)"},Gwe={duration:{"x-slow":"0.5s",slow:"0.4s",medium:"0.3s",fast:"0.15s","x-fast":"0.075s"},timing:{show:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"cubic-bezier(0.15, 0, 0.45, 1)"},straight:{show:"0.5s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",hide:"0.4s cubic-bezier(0.49, 0.1, 0.16, 1) normal both",emotional:"0.3s cubic-bezier(0.27, 0.05, 0.4, 0.95)",functional:"0.3s cubic-bezier(0.15, 0, 0.45, 1)"}},qwe={family:{sans:"'DB Screen Sans', Helvetica, Arial, sans-serif",head:"'DB Screen Head', Helvetica, Arial, sans-serif"},sans:{digitalregular:{name:"DB Screen Sans Digital Regular",localName:"DB Screen Sans Digital",localShortName:"DB Sans Digital",family:"DB Screen Sans",weight:300,woff2:"dbscreensans-digitalregular.woff2"},regular:{name:"DB Screen Sans Regular",localName:"DB Screen Sans",localShortName:"DB Sans",family:"DB Screen Sans",weight:400,woff2:"dbscreensans-regular.woff2"},medium:{name:"DB Screen Sans Medium",localName:"DB Screen Sans Medium",localShortName:"DB Sans Medium",family:"DB Screen Sans",weight:500,woff2:"dbscreensans-medium.woff2"},semibold:{name:"DB Screen Sans SemiBold",localName:"DB Screen Sans SemiBold",localShortName:"DB Sans SemiBold",family:"DB Screen Sans",weight:600,woff2:"dbscreensans-semibold.woff2"},bold:{name:"DB Screen Sans Bold",localName:"DB Screen Sans Bold",localShortName:"DB Sans Bold",family:"DB Screen Sans",weight:700,woff2:"dbscreensans-bold.woff2"}},head:{light:{name:"DB Screen Head Light",localName:"DB Screen Head Light",localShortName:"DB Head Light",family:"DB Screen Head",weight:300,woff2:"dbscreenhead-light.woff2"},regular:{name:"DB Screen Head",localName:"DB Screen Head",localShortName:"DB Head",family:"DB Screen Head",weight:400,woff2:"dbscreenhead-regular.woff2"},black:{name:"DB Screen Head Black",localName:"DB Screen Head Black",localShortName:"DB Head Black",family:"DB Screen Head",weight:900,woff2:"dbscreenhead-black.woff2"}}},Kwe={neutral:"#242629",brand:"#4D8E45",brandDark:"#4D8E45",informational:"#309FD1",warning:"#F39200",successful:"#63A615",critical:"#EC0016"},Jwe={yellow:"#FFD800",orange:"#F39200",red:"#EC0016",pink:"#E93E8F",violet:"#814997",blue:"#1455C0",cyan:"#309FD1",turquoise:"#00A099",green:"#63A615"},Xwe={branding:jwe,spacing:zwe,sizing:Hwe,typography:Uwe,border:Wwe,elevation:Vwe,transition:Gwe,font:qwe,colors:Kwe,additionalColors:Jwe},Ywe=sk,Zwe=Xwe,Qwe=Bwe,eSe={neutralTheme:Ywe,dbTheme:Qwe,sbahnTheme:Zwe},tSe=()=>{const{t:e}=mr(),[t,r]=H.useState("neutralTheme"),{darkMode:n,theme:i}=pr(s=>s);return B.jsx(kg,{width:"large",spacing:"large",className:"flex md:h-[100vh] items-center",children:B.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-fix-md md:gap-fix-3xl",children:[B.jsxs("div",{className:"flex flex-col gap-fix-md",children:[B.jsxs("h1",{children:[B.jsx("span",{className:"brand-name",children:i.branding.name}),B.jsx("br",{}),"Design System Platform"]}),B.jsx("h4",{"data-variant":"light",children:"By all, for all"}),B.jsx("p",{children:e("landingDesignSystemText")}),B.jsxs("div",{className:"grid grid-cols-4 gap-fix-md",children:[Object.entries(eSe).map(([s,o])=>B.jsx("button",{onClick:()=>{r(s),pr.setState({theme:o,luminanceSteps:g0,speakingNames:y0})},children:B.jsxs(ls,{className:"min-h-siz-xl",spacing:"small","data-selected":t===s,elevationLevel:"2",behaviour:"interactive",children:[B.jsx("img",{className:"logo m-auto",src:Jm(n&&o.branding.image.dark?o.branding.image.dark:o.branding.image.light),alt:"brand"}),B.jsx(Ks,{placement:"bottom",children:e(s)})]})},s)),B.jsx(ik,{className:"no-underline",to:"/customization",target:"_blank",children:B.jsx(ls,{className:"items-center justify-center min-h-siz-xl",spacing:"small","data-selected":"false",elevationLevel:"2",behaviour:"interactive",children:B.jsx(df,{icon:"plus",children:"Add custom theme"})})})]})]}),B.jsx("div",{className:"flex col-span-2 relative",children:B.jsx("div",{className:"scale-down w-full md:w-[100vw] md:h-[100vh] md:absolute",children:B.jsx(o$,{linkToDemo:!0})})})]})})},rSe=()=>B.jsxs("div",{className:"flex flex-col overflow-y-auto h-full",children:[B.jsx(kwe,{}),B.jsxs("main",{children:[B.jsx(tSe,{}),B.jsx(Twe,{}),B.jsx(Awe,{})]})]});function ci(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:X1(e)?2:Y1(e)?3:0}function lg(e,t){return yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function zv(e,t){return yu(e)===2?e.get(t):e[t]}function TH(e,t,r){var n=yu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function nSe(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function X1(e){return uSe&&e instanceof Map}function Y1(e){return cSe&&e instanceof Set}function Un(e){return e.o||e.t}function a$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=dSe(e);delete t[_r];for(var r=d$(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=iSe),Object.freeze(e),t&&Uc(e,function(r,n){return l$(n,!0)},!0)),e}function iSe(){ci(2)}function u$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function oa(e){var t=yT[e];return t||ci(18,e),t}function AH(e,t){yT[e]||(yT[e]=t)}function K0(){return cg}function DD(e,t){t&&(oa("Patches"),e.u=[],e.s=[],e.v=t)}function J0(e){gT(e),e.p.forEach(sSe),e.p=null}function gT(e){e===cg&&(cg=e.l)}function yL(e){return cg={p:[],l:cg,h:e,m:!0,_:0}}function sSe(e){var t=e[_r];t.i===0||t.i===1?t.j():t.g=!0}function ED(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||oa("ES5").S(t,e,n),n?(r[_r].P&&(J0(t),ci(4)),pa(e)&&(e=X0(t,e),t.l||Y0(t,e)),t.u&&oa("Patches").M(r[_r].t,e,t.u,t.s)):e=X0(t,r,[]),J0(t),t.u&&t.v(t.u,t.s),e!==h$?e:void 0}function X0(e,t,r){if(u$(t))return t;var n=t[_r];if(!n)return Uc(t,function(l,a){return vL(e,n,t,l,a,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Y0(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=a$(n.k):n.o,s=i,o=!1;n.i===3&&(s=new Set(i),i.clear(),o=!0),Uc(s,function(l,a){return vL(e,n,i,l,a,r,o)}),Y0(e,i,!1),r&&e.u&&oa("Patches").N(n,r,e.u,e.s)}return n.o}function vL(e,t,r,n,i,s,o){if(Hc(i)){var l=X0(e,i,s&&t&&t.i!==3&&!lg(t.R,n)?s.concat(n):void 0);if(TH(r,n,l),!Hc(l))return;e.m=!1}else o&&r.add(i);if(pa(i)&&!u$(i)){if(!e.h.D&&e._<1)return;X0(e,i),t&&t.A.l||Y0(e,i)}}function Y0(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&l$(t,r)}function CD(e,t){var r=e[_r];return(r?Un(r):e)[t]}function bL(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function Oa(e){e.P||(e.P=!0,e.l&&Oa(e.l))}function TD(e){e.o||(e.o=a$(e.t))}function ug(e,t,r){var n=X1(t)?oa("MapSet").F(t,r):Y1(t)?oa("MapSet").T(t,r):e.O?function(i,s){var o=Array.isArray(i),l={i:o?1:0,A:s?s.A:K0(),P:!1,I:!1,R:{},l:s,t:i,k:null,o:null,j:null,C:!1},a=l,c=vT;o&&(a=[l],c=Up);var u=Proxy.revocable(a,c),h=u.revoke,d=u.proxy;return l.k=d,l.j=h,d}(t,r):oa("ES5").J(t,r);return(r?r.A:K0()).p.push(n),n}function oSe(e){return Hc(e)||ci(22,e),function t(r){if(!pa(r))return r;var n,i=r[_r],s=yu(r);if(i){if(!i.P&&(i.i<4||!oa("ES5").K(i)))return i.t;i.I=!0,n=xL(r,s),i.I=!1}else n=xL(r,s);return Uc(n,function(o,l){i&&zv(i.t,o)===l||TH(n,o,t(l))}),s===3?new Set(n):n}(e)}function xL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return a$(e)}function aSe(){function e(n){if(!pa(n))return n;if(Array.isArray(n))return n.map(e);if(X1(n))return new Map(Array.from(n.entries()).map(function(o){return[o[0],e(o[1])]}));if(Y1(n))return new Set(Array.from(n).map(e));var i=Object.create(Object.getPrototypeOf(n));for(var s in n)i[s]=e(n[s]);return lg(n,Sm)&&(i[Sm]=n[Sm]),i}function t(n){return Hc(n)?e(n):n}var r="add";AH("Patches",{$:function(n,i){return i.forEach(function(s){for(var o=s.path,l=s.op,a=n,c=0;c1?b-1:0),E=1;E1?u-1:0),d=1;d=0;i--){var s=n[i];if(s.path.length===0&&s.op==="replace"){r=s.value;break}}i>-1&&(n=n.slice(i+1));var o=oa("Patches").$;return Hc(r)?o(r,n):this.produce(r,function(l){return o(l,n)})},e}(),Ns=new fSe,pSe=Ns.produce,DL=Ns.produceWithPatches.bind(Ns);Ns.setAutoFreeze.bind(Ns);Ns.setUseProxies.bind(Ns);var EL=Ns.applyPatches.bind(Ns);Ns.createDraft.bind(Ns);Ns.finishDraft.bind(Ns);function mSe(){this.__data__=[],this.size=0}var gSe=mSe;function ySe(e,t){return e===t||e!==e&&t!==t}var kH=ySe,vSe=kH;function bSe(e,t){for(var r=e.length;r--;)if(vSe(e[r][0],t))return r;return-1}var Z1=bSe,xSe=Z1,wSe=Array.prototype,SSe=wSe.splice;function DSe(e){var t=this.__data__,r=xSe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():SSe.call(t,r,1),--this.size,!0}var ESe=DSe,CSe=Z1;function TSe(e){var t=this.__data__,r=CSe(t,e);return r<0?void 0:t[r][1]}var ASe=TSe,kSe=Z1;function _Se(e){return kSe(this.__data__,e)>-1}var $Se=_Se,FSe=Z1;function PSe(e,t){var r=this.__data__,n=FSe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ISe=PSe,NSe=gSe,MSe=ESe,LSe=ASe,OSe=$Se,RSe=ISe;function Pf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tl))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,f=r&CCe?new wCe:void 0;for(s.set(e,t),s.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=MTe}var OH=LTe,OTe=tx,RTe=OH,BTe=ix,jTe="[object Arguments]",zTe="[object Array]",HTe="[object Boolean]",UTe="[object Date]",WTe="[object Error]",VTe="[object Function]",GTe="[object Map]",qTe="[object Number]",KTe="[object Object]",JTe="[object RegExp]",XTe="[object Set]",YTe="[object String]",ZTe="[object WeakMap]",QTe="[object ArrayBuffer]",eAe="[object DataView]",tAe="[object Float32Array]",rAe="[object Float64Array]",nAe="[object Int8Array]",iAe="[object Int16Array]",sAe="[object Int32Array]",oAe="[object Uint8Array]",aAe="[object Uint8ClampedArray]",lAe="[object Uint16Array]",uAe="[object Uint32Array]",Zr={};Zr[tAe]=Zr[rAe]=Zr[nAe]=Zr[iAe]=Zr[sAe]=Zr[oAe]=Zr[aAe]=Zr[lAe]=Zr[uAe]=!0;Zr[jTe]=Zr[zTe]=Zr[QTe]=Zr[HTe]=Zr[eAe]=Zr[UTe]=Zr[WTe]=Zr[VTe]=Zr[GTe]=Zr[qTe]=Zr[KTe]=Zr[JTe]=Zr[XTe]=Zr[YTe]=Zr[ZTe]=!1;function cAe(e){return BTe(e)&&RTe(e.length)&&!!Zr[OTe(e)]}var hAe=cAe;function dAe(e){return function(t){return e(t)}}var fAe=dAe,eb={exports:{}};eb.exports;(function(e,t){var r=_H,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s&&r.process,l=function(){try{var a=i&&i.require&&i.require("util").types;return a||o&&o.binding&&o.binding("util")}catch{}}();e.exports=l})(eb,eb.exports);var g$=eb.exports,pAe=hAe,mAe=fAe,LL=g$,OL=LL&&LL.isTypedArray,gAe=OL?mAe(OL):pAe,RH=gAe,yAe=yTe,vAe=kTe,bAe=m$,xAe=LH,wAe=NTe,SAe=RH,DAe=Object.prototype,EAe=DAe.hasOwnProperty;function CAe(e,t){var r=bAe(e),n=!r&&vAe(e),i=!r&&!n&&xAe(e),s=!r&&!n&&!i&&SAe(e),o=r||n||i||s,l=o?yAe(e.length,String):[],a=l.length;for(var c in e)(t||EAe.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||wAe(c,a)))&&l.push(c);return l}var TAe=CAe,AAe=Object.prototype;function kAe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||AAe;return e===r}var _Ae=kAe;function $Ae(e,t){return function(r){return e(t(r))}}var FAe=$Ae,PAe=FAe,IAe=PAe(Object.keys,Object),NAe=IAe,MAe=_Ae,LAe=NAe,OAe=Object.prototype,RAe=OAe.hasOwnProperty;function BAe(e){if(!MAe(e))return LAe(e);var t=[];for(var r in Object(e))RAe.call(e,r)&&r!="constructor"&&t.push(r);return t}var jAe=BAe,zAe=f$,HAe=OH;function UAe(e){return e!=null&&HAe(e.length)&&!zAe(e)}var WAe=UAe,VAe=TAe,GAe=jAe,qAe=WAe;function KAe(e){return qAe(e)?VAe(e):GAe(e)}var JAe=KAe,XAe=sTe,YAe=mTe,ZAe=JAe;function QAe(e){return XAe(e,ZAe,YAe)}var eke=QAe,RL=eke,tke=1,rke=Object.prototype,nke=rke.hasOwnProperty;function ike(e,t,r,n,i,s){var o=r&tke,l=RL(e),a=l.length,c=RL(t),u=c.length;if(a!=u&&!o)return!1;for(var h=a;h--;){var d=l[h];if(!(o?d in t:nke.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var y=o;++hcrypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var Gke="Invariant failed";function Gr(e,t){if(!e)throw new Error(Gke)}var Wa="ROOT",zH="canvas-ROOT",qke="Attempting to add a node with duplicated id",Kke="Node cannot be dropped into target parent",Jke="Target parent rejects incoming node",Xke="Current parent rejects outgoing node",YL="Cannot move node that is not a direct child of a Canvas node",Yke="Cannot move node into a non-Canvas parent",ZL="A top-level Node cannot be moved",Zke="Cannot move node into a descendant",HH="The component type specified for this node (%node_type%) does not exist in the resolver",Qke="The node has specified a canDrag() rule that prevents it from being dragged",e_e=`An Error occurred while deserializing components: Cannot find component <%displayName% /> in resolver map. Please check your resolver in Available components in resolver: %availableComponents% -More info: https://craft.js.org/r/docs/api/editor#props`;function QL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qs(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:500;if(t.length!==0||r.length!==0){if(this.timeline.length&&this.pointer>=0){var i=this.timeline[this.pointer],s=i.patches,o=i.inversePatches,a=i.timestamp;if(new Date().getTime()-a=0){var n=this.timeline[this.pointer],i=n.inversePatches;this.timeline[this.pointer]={timestamp:n.timestamp,patches:[].concat(zi(n.patches),zi(t)),inversePatches:[].concat(zi(r),zi(i))}}else this.add(t,r)}},{key:"clear",value:function(){this.timeline=[],this.pointer=-1}},{key:"canUndo",value:function(){return this.pointer>=0}},{key:"canRedo",value:function(){return this.pointer-1)return this.subscribers.splice(r,1)}}},{key:"notify",value:function(){this.subscribers.forEach(function(t){return t.collect()})}}]),e}(),i_e=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];Of(this,e),Nn(this,"collected",void 0),Nn(this,"collector",void 0),Nn(this,"onChange",void 0),Nn(this,"id",void 0),this.collector=t,this.onChange=r,n&&this.collect()}return Rf(e,[{key:"collect",value:function(){try{var t=this.collector();Hke(t,this.collected)||(this.collected=t,this.onChange&&this.onChange(this.collected))}catch(r){console.warn(r)}}}]),e}(),hg=function(e){var t=e.getBoundingClientRect(),r=t.x,n=t.y,i=t.top,s=t.left,o=t.bottom,a=t.right,l=t.width,c=t.height,u=window.getComputedStyle(e),h={left:parseInt(u.marginLeft),right:parseInt(u.marginRight),bottom:parseInt(u.marginBottom),top:parseInt(u.marginTop)},d={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight),bottom:parseInt(u.paddingBottom),top:parseInt(u.paddingTop)};return{x:r,y:n,top:i,left:s,bottom:o,right:a,width:l,height:c,outerWidth:Math.round(l+h.left+h.right),outerHeight:Math.round(c+h.top+h.bottom),margin:h,padding:d,inFlow:e.parentElement&&!!function(f){var p=getComputedStyle(f);if(!(u.overflow&&u.overflow!=="visible"||p.float!=="none"||p.display==="grid"||p.display==="flex"&&p["flex-direction"]!=="column")){switch(u.position){case"static":case"relative":break;default:return}switch(e.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(u.display){case"block":case"list-item":case"table":case"flex":case"grid":return!0}}}(e.parentElement)}};function s_e(e,t){const{subscribe:r,getState:n,actions:i,query:s}=e,o=H.useRef(!0),a=H.useRef(null),l=H.useRef(t);l.current=t;const c=H.useCallback(d=>({...d,actions:i,query:s}),[i,s]);o.current&&t&&(a.current=t(n(),s),o.current=!1);const[u,h]=H.useState(c(a.current));return H.useEffect(()=>{let d;return l.current&&(d=r(f=>l.current(f,s),f=>{h(c(f))})),()=>{d&&d()}},[c,s,r]),u}var Qd,KH=function(){return Vke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:10)},o_e=function(){function e(){Of(this,e),Nn(this,"isEnabled",!0),Nn(this,"elementIdMap",new WeakMap),Nn(this,"registry",new Map)}return Rf(e,[{key:"getElementId",value:function(t){var r=this.elementIdMap.get(t);if(r)return r;var n=KH();return this.elementIdMap.set(t,n),n}},{key:"getConnectorId",value:function(t,r){var n=this.getElementId(t);return"".concat(r,"--").concat(n)}},{key:"register",value:function(t,r){var n=this,i=this.getByElement(t,r.name);if(i){if(Wke(r.required,i.required))return i;this.getByElement(t,r.name).disable()}var s=null,o=this.getConnectorId(t,r.name);return this.registry.set(o,{id:o,required:r.required,enable:function(){s&&s(),s=r.connector(t,r.required,r.options)},disable:function(){s&&s()},remove:function(){return n.remove(o)}}),this.isEnabled&&this.registry.get(o).enable(),this.registry.get(o)}},{key:"get",value:function(t){return this.registry.get(t)}},{key:"remove",value:function(t){var r=this.get(t);r&&(r.disable(),this.registry.delete(r.id))}},{key:"enable",value:function(){this.isEnabled=!0,this.registry.forEach(function(t){t.enable()})}},{key:"disable",value:function(){this.isEnabled=!1,this.registry.forEach(function(t){t.disable()})}},{key:"getByElement",value:function(t,r){return this.get(this.getConnectorId(t,r))}},{key:"removeByElement",value:function(t,r){return this.remove(this.getConnectorId(t,r))}},{key:"clear",value:function(){this.disable(),this.elementIdMap=new WeakMap,this.registry=new Map}}]),e}();(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(Qd||(Qd={}));var JH=function(){function e(t){Of(this,e),Nn(this,"options",void 0),Nn(this,"registry",new o_e),Nn(this,"subscribers",new Set),this.options=t}return Rf(e,[{key:"listen",value:function(t){var r=this;return this.subscribers.add(t),function(){return r.subscribers.delete(t)}}},{key:"disable",value:function(){this.onDisable&&this.onDisable(),this.registry.disable(),this.subscribers.forEach(function(t){t(Qd.HandlerDisabled)})}},{key:"enable",value:function(){this.onEnable&&this.onEnable(),this.registry.enable(),this.subscribers.forEach(function(t){t(Qd.HandlerEnabled)})}},{key:"cleanup",value:function(){this.disable(),this.subscribers.clear(),this.registry.clear()}},{key:"addCraftEventListener",value:function(t,r,n,i){var s=function(o){(function(a,l,c){a.craft||(a.craft={stopPropagation:function(){},blockedEvents:{}});for(var u=a.craft&&a.craft.blockedEvents[l]||[],h=0;h1?u-1:0),d=1;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,o=Ad(t);if(r){var a=Ad(this).constructor;s=Reflect.construct(o,arguments,a)}else s=o.apply(this,arguments);return function(l,c){if(c&&(typeof c=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $D(l)}(this,s)});function i(s,o){var a;return Of(this,i),Nn($D(a=n.call(this,o)),"derived",void 0),Nn($D(a),"unsubscribeParentHandlerListener",void 0),a.derived=s,a.options=o,a.unsubscribeParentHandlerListener=a.derived.listen(function(l){switch(l){case Qd.HandlerEnabled:return a.enable();case Qd.HandlerDisabled:return a.disable();default:return}}),a}return Rf(i,[{key:"inherit",value:function(s){return this.createProxyHandlers(this.derived,s)}},{key:"cleanup",value:function(){CT(Ad(i.prototype),"cleanup",this).call(this),this.unsubscribeParentHandlerListener()}}]),i}();function rO(e,t){t&&(typeof e=="function"?e(t):e.current=t)}function l_e(e,t){const r=e.ref;return Gr(typeof r!="string"),H.cloneElement(e,r?{ref:n=>{rO(r,n),rO(t,n)}}:{ref:t})}function u_e(e){return(t=null,...r)=>{if(!H.isValidElement(t)){if(!t)return;const i=t;return i&&e(i,...r),i}const n=t;return function(i){if(typeof i.type!="string")throw new Error}(n),l_e(n,e)}}function XH(e){return Object.keys(e).reduce((t,r)=>(t[r]=u_e((...n)=>e[r](...n)),t),{})}const c_e=({style:e,parentDom:t})=>{const r=Mt.createElement("div",{style:{position:"fixed",display:"block",opacity:1,borderStyle:"solid",borderWidth:"1px",borderColor:"transparent",zIndex:99999,...e}});return t&&t.ownerDocument!==document?YA.createPortal(r,t.ownerDocument.body):r};var vu=function(e,t){var r="Deprecation warning: ".concat(e," will be deprecated in future relases."),n=t.suggest,i=t.doc;n&&(r+=" Please use ".concat(n," instead.")),i&&(r+="(".concat(i,")")),console.warn(r)},YH=function(){return typeof window<"u"},h_e=function(){return YH()&&/Linux/i.test(window.navigator.userAgent)},d_e=function(){return YH()&&/Chrome/i.test(window.navigator.userAgent)},f_e=dh;(function(){try{var e=f_e(Object,"defineProperty");return e({},"",{}),e}catch{}})();var tb={exports:{}};tb.exports;(function(e,t){var r=va,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,a=o?o.allocUnsafe:void 0;function l(c,u){if(u)return c.slice();var h=c.length,d=a?a(h):new c.constructor(h);return c.copy(d),d}e.exports=l})(tb,tb.exports);tb.exports;var nO=ex,iO=nO?nO.prototype:void 0;iO&&iO.valueOf;var sO=g$;sO&&sO.isMap;var oO=g$;oO&&oO.isSet;const ZH=Mt.createContext(null),QH=({id:e,related:t=!1,children:r})=>Mt.createElement(ZH.Provider,{value:{id:e,related:t}},r);function aO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qr(e){for(var t=1;t=0||(u[l]=o[l]);return u}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Wp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=rb(e);if(t){var i=rb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(s,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wp(s)}(this,r)}}function e9(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,a,l,c=[],u=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(s=a.call(i)).done)&&(c.push(s.value),c.length!==n);u=!0);}catch(d){h=!0,o=d}finally{try{if(!u&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(h)throw o}}return c}}(e,t)||t9(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qH(e){var t=function(r,n){if(typeof r!="object"||r===null)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var s=i.call(r,"string");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(e);return typeof t=="symbol"?t:String(t)}var yn={UNDO:"HISTORY_UNDO",REDO:"HISTORY_REDO",THROTTLE:"HISTORY_THROTTLE",IGNORE:"HISTORY_IGNORE",MERGE:"HISTORY_MERGE",CLEAR:"HISTORY_CLEAR"},t_e=function(){function e(){Of(this,e),Nn(this,"timeline",[]),Nn(this,"pointer",-1)}return Rf(e,[{key:"add",value:function(t,r){t.length===0&&r.length===0||(this.pointer=this.pointer+1,this.timeline.length=this.pointer,this.timeline[this.pointer]={patches:t,inversePatches:r,timestamp:Date.now()})}},{key:"throttleAdd",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:500;if(t.length!==0||r.length!==0){if(this.timeline.length&&this.pointer>=0){var i=this.timeline[this.pointer],s=i.patches,o=i.inversePatches,l=i.timestamp;if(new Date().getTime()-l=0){var n=this.timeline[this.pointer],i=n.inversePatches;this.timeline[this.pointer]={timestamp:n.timestamp,patches:[].concat(ji(n.patches),ji(t)),inversePatches:[].concat(ji(r),ji(i))}}else this.add(t,r)}},{key:"clear",value:function(){this.timeline=[],this.pointer=-1}},{key:"canUndo",value:function(){return this.pointer>=0}},{key:"canRedo",value:function(){return this.pointer-1)return this.subscribers.splice(r,1)}}},{key:"notify",value:function(){this.subscribers.forEach(function(t){return t.collect()})}}]),e}(),i_e=function(){function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];Of(this,e),Nn(this,"collected",void 0),Nn(this,"collector",void 0),Nn(this,"onChange",void 0),Nn(this,"id",void 0),this.collector=t,this.onChange=r,n&&this.collect()}return Rf(e,[{key:"collect",value:function(){try{var t=this.collector();Hke(t,this.collected)||(this.collected=t,this.onChange&&this.onChange(this.collected))}catch(r){console.warn(r)}}}]),e}(),hg=function(e){var t=e.getBoundingClientRect(),r=t.x,n=t.y,i=t.top,s=t.left,o=t.bottom,l=t.right,a=t.width,c=t.height,u=window.getComputedStyle(e),h={left:parseInt(u.marginLeft),right:parseInt(u.marginRight),bottom:parseInt(u.marginBottom),top:parseInt(u.marginTop)},d={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight),bottom:parseInt(u.paddingBottom),top:parseInt(u.paddingTop)};return{x:r,y:n,top:i,left:s,bottom:o,right:l,width:a,height:c,outerWidth:Math.round(a+h.left+h.right),outerHeight:Math.round(c+h.top+h.bottom),margin:h,padding:d,inFlow:e.parentElement&&!!function(f){var p=getComputedStyle(f);if(!(u.overflow&&u.overflow!=="visible"||p.float!=="none"||p.display==="grid"||p.display==="flex"&&p["flex-direction"]!=="column")){switch(u.position){case"static":case"relative":break;default:return}switch(e.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(u.display){case"block":case"list-item":case"table":case"flex":case"grid":return!0}}}(e.parentElement)}};function s_e(e,t){const{subscribe:r,getState:n,actions:i,query:s}=e,o=H.useRef(!0),l=H.useRef(null),a=H.useRef(t);a.current=t;const c=H.useCallback(d=>({...d,actions:i,query:s}),[i,s]);o.current&&t&&(l.current=t(n(),s),o.current=!1);const[u,h]=H.useState(c(l.current));return H.useEffect(()=>{let d;return a.current&&(d=r(f=>a.current(f,s),f=>{h(c(f))})),()=>{d&&d()}},[c,s,r]),u}var Qd,KH=function(){return Vke(arguments.length>0&&arguments[0]!==void 0?arguments[0]:10)},o_e=function(){function e(){Of(this,e),Nn(this,"isEnabled",!0),Nn(this,"elementIdMap",new WeakMap),Nn(this,"registry",new Map)}return Rf(e,[{key:"getElementId",value:function(t){var r=this.elementIdMap.get(t);if(r)return r;var n=KH();return this.elementIdMap.set(t,n),n}},{key:"getConnectorId",value:function(t,r){var n=this.getElementId(t);return"".concat(r,"--").concat(n)}},{key:"register",value:function(t,r){var n=this,i=this.getByElement(t,r.name);if(i){if(Wke(r.required,i.required))return i;this.getByElement(t,r.name).disable()}var s=null,o=this.getConnectorId(t,r.name);return this.registry.set(o,{id:o,required:r.required,enable:function(){s&&s(),s=r.connector(t,r.required,r.options)},disable:function(){s&&s()},remove:function(){return n.remove(o)}}),this.isEnabled&&this.registry.get(o).enable(),this.registry.get(o)}},{key:"get",value:function(t){return this.registry.get(t)}},{key:"remove",value:function(t){var r=this.get(t);r&&(r.disable(),this.registry.delete(r.id))}},{key:"enable",value:function(){this.isEnabled=!0,this.registry.forEach(function(t){t.enable()})}},{key:"disable",value:function(){this.isEnabled=!1,this.registry.forEach(function(t){t.disable()})}},{key:"getByElement",value:function(t,r){return this.get(this.getConnectorId(t,r))}},{key:"removeByElement",value:function(t,r){return this.remove(this.getConnectorId(t,r))}},{key:"clear",value:function(){this.disable(),this.elementIdMap=new WeakMap,this.registry=new Map}}]),e}();(function(e){e[e.HandlerDisabled=0]="HandlerDisabled",e[e.HandlerEnabled=1]="HandlerEnabled"})(Qd||(Qd={}));var JH=function(){function e(t){Of(this,e),Nn(this,"options",void 0),Nn(this,"registry",new o_e),Nn(this,"subscribers",new Set),this.options=t}return Rf(e,[{key:"listen",value:function(t){var r=this;return this.subscribers.add(t),function(){return r.subscribers.delete(t)}}},{key:"disable",value:function(){this.onDisable&&this.onDisable(),this.registry.disable(),this.subscribers.forEach(function(t){t(Qd.HandlerDisabled)})}},{key:"enable",value:function(){this.onEnable&&this.onEnable(),this.registry.enable(),this.subscribers.forEach(function(t){t(Qd.HandlerEnabled)})}},{key:"cleanup",value:function(){this.disable(),this.subscribers.clear(),this.registry.clear()}},{key:"addCraftEventListener",value:function(t,r,n,i){var s=function(o){(function(l,a,c){l.craft||(l.craft={stopPropagation:function(){},blockedEvents:{}});for(var u=l.craft&&l.craft.blockedEvents[a]||[],h=0;h1?u-1:0),d=1;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var s,o=Ad(t);if(r){var l=Ad(this).constructor;s=Reflect.construct(o,arguments,l)}else s=o.apply(this,arguments);return function(a,c){if(c&&(typeof c=="object"||typeof c=="function"))return c;if(c!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $D(a)}(this,s)});function i(s,o){var l;return Of(this,i),Nn($D(l=n.call(this,o)),"derived",void 0),Nn($D(l),"unsubscribeParentHandlerListener",void 0),l.derived=s,l.options=o,l.unsubscribeParentHandlerListener=l.derived.listen(function(a){switch(a){case Qd.HandlerEnabled:return l.enable();case Qd.HandlerDisabled:return l.disable();default:return}}),l}return Rf(i,[{key:"inherit",value:function(s){return this.createProxyHandlers(this.derived,s)}},{key:"cleanup",value:function(){CT(Ad(i.prototype),"cleanup",this).call(this),this.unsubscribeParentHandlerListener()}}]),i}();function rO(e,t){t&&(typeof e=="function"?e(t):e.current=t)}function l_e(e,t){const r=e.ref;return Gr(typeof r!="string"),H.cloneElement(e,r?{ref:n=>{rO(r,n),rO(t,n)}}:{ref:t})}function u_e(e){return(t=null,...r)=>{if(!H.isValidElement(t)){if(!t)return;const i=t;return i&&e(i,...r),i}const n=t;return function(i){if(typeof i.type!="string")throw new Error}(n),l_e(n,e)}}function XH(e){return Object.keys(e).reduce((t,r)=>(t[r]=u_e((...n)=>e[r](...n)),t),{})}const c_e=({style:e,parentDom:t})=>{const r=Mt.createElement("div",{style:{position:"fixed",display:"block",opacity:1,borderStyle:"solid",borderWidth:"1px",borderColor:"transparent",zIndex:99999,...e}});return t&&t.ownerDocument!==document?YA.createPortal(r,t.ownerDocument.body):r};var vu=function(e,t){var r="Deprecation warning: ".concat(e," will be deprecated in future relases."),n=t.suggest,i=t.doc;n&&(r+=" Please use ".concat(n," instead.")),i&&(r+="(".concat(i,")")),console.warn(r)},YH=function(){return typeof window<"u"},h_e=function(){return YH()&&/Linux/i.test(window.navigator.userAgent)},d_e=function(){return YH()&&/Chrome/i.test(window.navigator.userAgent)},f_e=dh;(function(){try{var e=f_e(Object,"defineProperty");return e({},"",{}),e}catch{}})();var tb={exports:{}};tb.exports;(function(e,t){var r=va,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,o=s?r.Buffer:void 0,l=o?o.allocUnsafe:void 0;function a(c,u){if(u)return c.slice();var h=c.length,d=l?l(h):new c.constructor(h);return c.copy(d),d}e.exports=a})(tb,tb.exports);tb.exports;var nO=ex,iO=nO?nO.prototype:void 0;iO&&iO.valueOf;var sO=g$;sO&&sO.isMap;var oO=g$;oO&&oO.isSet;const ZH=Mt.createContext(null),QH=({id:e,related:t=!1,children:r})=>Mt.createElement(ZH.Provider,{value:{id:e,related:t}},r);function aO(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qr(e){for(var t=1;t=0||(u[a]=o[a]);return u}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Wp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x$(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var r,n=rb(e);if(t){var i=rb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return function(s,o){if(o&&(typeof o=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wp(s)}(this,r)}}function e9(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var s,o,l,a,c=[],u=!0,h=!1;try{if(l=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(s=l.call(i)).done)&&(c.push(s.value),c.length!==n);u=!0);}catch(d){h=!0,o=d}finally{try{if(!u&&i.return!=null&&(a=i.return(),Object(a)!==a))return}finally{if(h)throw o}}return c}}(e,t)||t9(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function dg(e){return function(t){if(Array.isArray(t))return _T(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||t9(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function t9(e,t){if(e){if(typeof e=="string")return _T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_T(e,t):void 0}}function _T(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{const{connectors:{connect:t,drag:r}}=ba();return typeof e.type=="string"?t(r(Mt.cloneElement(e))):e},y_e=()=>{const{type:e,props:t,nodes:r,hydrationTimestamp:n}=ax(i=>({type:i.data.type,props:i.data.props,nodes:i.data.nodes,hydrationTimestamp:i._hydrationTimestamp}));return H.useMemo(()=>{let i=t.children;r&&r.length>0&&(i=Mt.createElement(Mt.Fragment,null,r.map(o=>Mt.createElement(S$,{id:o,key:o}))));const s=Mt.createElement(e,t,i);return typeof e=="string"?Mt.createElement(g_e,{render:s}):s},[e,t,n,r])},v_e=({render:e})=>{const{hidden:t}=ax(n=>({hidden:n.data.hidden})),{onRender:r}=fh(n=>({onRender:n.options.onRender}));return t?null:Mt.createElement(r,{render:e||Mt.createElement(y_e,null)})},S$=({id:e,render:t})=>Mt.createElement(QH,{id:e},Mt.createElement(v_e,{render:t})),$T={is:"div",canvas:!1,custom:{},hidden:!1},b_e={is:"type",canvas:"isCanvas"};function Bf({id:e,children:t,...r}){const{is:n}={...$T,...r},{query:i,actions:s}=fh(),{node:o,inNodeContext:a}=ax(c=>({node:{id:c.id,data:c.data}})),[l]=H.useState(()=>{Gr(!!e);const{id:c,data:u}=o;if(a){let h;const d=u.linkedNodes&&u.linkedNodes[e]&&i.node(u.linkedNodes[e]).get();if(d&&d.data.type===n)h=d.id;else{const f=Mt.createElement(Bf,r,t),p=i.parseReactElement(f).toNodeTree();h=p.rootNodeId,s.history.ignore().addLinkedNodeFromTree(p,c,e)}return h}return null});return l?Mt.createElement(S$,{id:l}):null}const s9=()=>vu("",{suggest:""});function FT({...e}){return H.useEffect(()=>s9(),[]),Mt.createElement(Bf,{...e,canvas:!0})}const x_e=()=>{const{timestamp:e}=fh(t=>({timestamp:t.nodes[Ua]&&t.nodes[Ua]._hydrationTimestamp}));return e?Mt.createElement(S$,{id:Ua,key:e}):null},w_e=({children:e,json:t,data:r})=>{const{actions:n,query:i}=fh();t&&vu("",{suggest:""});const s=H.useRef(!1);if(!s.current){const o=r||t;if(o)n.history.ignore().deserialize(o);else if(e){const a=Mt.Children.only(e),l=i.parseReactElement(a).toNodeTree((c,u)=>(u===a&&(c.id=Ua),c));n.history.ignore().addNodeTree(l)}s.current=!0}return Mt.createElement(x_e,null)};var uO;(function(e){e[e.Any=0]="Any",e[e.Id=1]="Id",e[e.Obj=2]="Obj"})(uO||(uO={}));const FD=e=>{const{addLinkedNodeFromTree:t,setDOM:r,setNodeEvent:n,replaceNodes:i,reset:s,...o}=e;return o};function Ii(e){const{connectors:t,actions:r,query:n,store:i,...s}=fh(e),o=FD(r);return{connectors:t,actions:H.useMemo(()=>({...o,history:{...o.history,ignore:(...a)=>FD(o.history.ignore(...a)),throttle:(...a)=>FD(o.history.throttle(...a))}}),[o]),query:n,store:i,...s}}var o9=function(e){return Object.fromEntries?Object.fromEntries(e):e.reduce(function(t,r){var n=e9(r,2),i=n[0],s=n[1];return Qr(Qr({},t),{},Fn({},i,s))},{})},Oa=function(e,t,r){var n=Array.isArray(t)?t:[t],i=Qr({existOnly:!1,idOnly:!1},r||{}),s=n.filter(function(o){return!!o}).map(function(o){return typeof o=="string"?{node:e[o],exists:!!e[o]}:AT(o)!=="object"||i.idOnly?{node:null,exists:!1}:{node:o,exists:!!e[o.id]}});return i.existOnly&&Gr(s.filter(function(o){return!o.exists}).length===0),s},S_e=["history"],Uh=null,nb=function(e,t){if(typeof t=="string")return t;var r,n=function(i,s){var o=function(a){if(Uh&&Uh.resolver===a)return Uh.reversed;Uh={resolver:a,reversed:new Map};for(var l=0,c=Object.entries(a);ltypeof e=="string"?e:{resolvedName:nb(t,e)},PT=(e,t)=>{let{type:r,isCanvas:n,props:i}=e;return i=Object.keys(i).reduce((s,o)=>{const a=i[o];return a==null||typeof a=="function"||(s[o]=o==="children"&&typeof a!="string"?H.Children.map(a,l=>typeof l=="string"?l:PT(l,t)):typeof a.type=="function"?PT(a,t):a),s},{}),{type:D_e(r,t),isCanvas:!!n,props:i}},E_e=(e,t)=>{const{type:r,props:n,isCanvas:i,name:s,...o}=e;return{...PT({type:r,isCanvas:i,props:n},t),...o}};function IT(e,t){Gr(typeof t=="string");var r=e.nodes[t],n=function(i){return IT(e,i)};return{isCanvas:function(){return!!r.data.isCanvas},isRoot:function(){return r.id===Ua},isLinkedNode:function(){return r.data.parent&&n(r.data.parent).linkedNodes().includes(r.id)},isTopLevelNode:function(){return this.isRoot()||this.isLinkedNode()},isDeletable:function(){return!this.isTopLevelNode()},isParentOfTopLevelNodes:function(){return r.data.linkedNodes&&Object.keys(r.data.linkedNodes).length>0},isParentOfTopLevelCanvas:function(){return vu("query.node(id).isParentOfTopLevelCanvas",{suggest:"query.node(id).isParentOfTopLevelNodes"}),this.isParentOfTopLevelNodes()},isSelected:function(){return e.events.selected.has(t)},isHovered:function(){return e.events.hovered.has(t)},isDragged:function(){return e.events.dragged.has(t)},get:function(){return r},ancestors:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return function s(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,c=e.nodes[o];return c?(a.push(o),c.data.parent&&(i||!i&&l===0)&&(a=s(c.data.parent,a,l+1)),a):a}(r.data.parent)},descendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=arguments.length>1?arguments[1]:void 0;return function o(a){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(i||!i&&c===0)&&e.nodes[a]&&(s!=="childNodes"&&n(a).linkedNodes().forEach(function(u){l.push(u),l=o(u,l,c+1)}),s!=="linkedNodes"&&n(a).childNodes().forEach(function(u){l.push(u),l=o(u,l,c+1)})),l}(t)},linkedNodes:function(){return Object.values(r.data.linkedNodes||{})},childNodes:function(){return r.data.nodes||[]},isDraggable:function(i){try{var s=r;return Gr(!this.isTopLevelNode(),ZL),Gr(IT(e,s.data.parent).isCanvas(),YL),Gr(s.rules.canDrag(s,n),Qke),!0}catch(o){return i&&i(o),!1}},isDroppable:function(i,s){var o=Oa(e.nodes,i),a=r;try{Gr(this.isCanvas(),Yke),Gr(a.rules.canMoveIn(o.map(function(c){return c.node}),a,n),Jke);var l={};return o.forEach(function(c){var u=c.node,h=c.exists;if(Gr(u.rules.canDrop(a,u,n),Kke),h){Gr(!n(u.id).isTopLevelNode(),ZL);var d=n(u.id).descendants(!0);Gr(!d.includes(a.id)&&a.id!==u.id,Zke);var f=u.data.parent&&e.nodes[u.data.parent];Gr(f.data.isCanvas,YL),Gr(f||!f&&!e.nodes[u.id],qke),f.id!==a.id&&(l[f.id]||(l[f.id]=[]),l[f.id].push(u))}}),Object.keys(l).forEach(function(c){var u=e.nodes[c];Gr(u.rules.canMoveOut(l[c],u,n),Xke)}),!0}catch(c){return s&&s(c),!1}},toSerializedNode:function(){return E_e(r.data,e.options.resolver)},toNodeTree:function(i){var s=[t].concat(dg(this.descendants(!0,i))).reduce(function(o,a){return o[a]=n(a).get(),o},{});return{rootNodeId:t,nodes:s}},decendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return vu("query.node(id).decendants",{suggest:"query.node(id).descendants"}),this.descendants(i)},isTopLevelCanvas:function(){return!this.isRoot()&&!r.data.parent}}}function a9(e,t,r,n){for(var i={parent:e,index:0,where:"before"},s=0,o=0,a=0,l=0,c=0,u=0,h=0,d=t.length;ho||a&&c>=a||s&&f.left+f.outerWidth{let{type:n,props:i}=e;const s=((a,l)=>typeof a=="object"&&a.resolvedName?a.resolvedName==="Canvas"?FT:l[a.resolvedName]:typeof a=="string"?a:null)(n,t);if(!s)return;i=Object.keys(i).reduce((a,l)=>{const c=i[l];return a[l]=c==null?null:typeof c=="object"&&c.resolvedName?NT(c,t):l==="children"&&Array.isArray(c)?c.map(u=>typeof u=="string"?u:NT(u,t)):c,a},{}),r&&(i.key=r);const o={...Mt.createElement(s,{...i})};return{...o,name:nb(t,o.type)}},C_e=(e,t)=>{const{type:r,props:n,...i}=e;Gr(r!==void 0&&typeof r=="string"||r!==void 0&&r.resolvedName!==void 0,e_e.replace("%displayName%",e.displayName).replace("%availableComponents%",Object.keys(t).join(", ")));const{type:s,name:o,props:a}=NT(e,t),{parent:l,custom:c,displayName:u,isCanvas:h,nodes:d,hidden:f}=i;return{type:s,name:o,displayName:u||o,props:a,custom:c||{},isCanvas:!!h,hidden:!!f,parent:l,linkedNodes:i.linkedNodes||i._childCanvas||{},nodes:d||[]}},T_e=(e,t)=>{if(t.length<1)return{[e.id]:e};const r=t.map(({rootNodeId:i})=>i),n={...e,data:{...e.data,nodes:r}};return t.reduce((i,s)=>{const o=s.nodes[s.rootNodeId];return{...i,...s.nodes,[o.id]:{...o,data:{...o.data,parent:e.id}}}},{[e.id]:n})},A_e=(e,t)=>({rootNodeId:e.id,nodes:T_e(e,t)});function l9(e){const t=e&&e.options,r=()=>l9(e);return{getDropPlaceholder:(n,i,s,o=a=>e.nodes[a.id].dom)=>{const a=e.nodes[i],l=r().node(a.id).isCanvas()?a:e.nodes[a.data.parent];if(!l)return;const c=l.data.nodes||[],u=a9(l,c?c.reduce((f,p)=>{const g=o(e.nodes[p]);if(g){const y={id:p,...hg(g)};f.push(y)}return f},[]):[],s.x,s.y),h=c.length&&e.nodes[c[u.index]],d={placement:{...u,currentNode:h},error:null};return Oa(e.nodes,n).forEach(({node:f,exists:p})=>{p&&r().node(f.id).isDraggable(g=>d.error=g)}),r().node(l.id).isDroppable(n,f=>d.error=f),d},getOptions:()=>t,getNodes:()=>e.nodes,node:n=>IT(e,n),getSerializedNodes(){const n=Object.keys(e.nodes).map(i=>[i,this.node(i).toSerializedNode()]);return o9(n)},getEvent:n=>function(i,s){var o=i.events[s];return{contains:function(a){return o.has(a)},isEmpty:function(){return this.all().length===0},first:function(){return this.all()[0]},last:function(){var a=this.all();return a[a.length-1]},all:function(){return Array.from(o)},size:function(){return this.all().length},at:function(a){return this.all()[a]},raw:function(){return o}}}(e,n),serialize(){return JSON.stringify(this.getSerializedNodes())},parseReactElement:n=>({toNodeTree(i){let s=function(a,l){let c=a;return typeof c=="string"&&(c=Mt.createElement(H.Fragment,{},c)),cO({data:{type:c.type,props:{...c.props}}},u=>{l&&l(u,c)})}(n,(a,l)=>{const c=nb(e.options.resolver,a.data.type);a.data.displayName=a.data.displayName||c,a.data.name=c,i&&i(a,l)}),o=[];return n.props&&n.props.children&&(o=Mt.Children.toArray(n.props.children).reduce((a,l)=>(Mt.isValidElement(l)&&a.push(r().parseReactElement(l).toNodeTree(i)),a),[])),A_e(s,o)}}),parseSerializedNode:n=>({toNode(i){const s=C_e(n,e.options.resolver);Gr(s.type);const o=typeof i=="string"&&i;return o&&vu("query.parseSerializedNode(...).toNode(id)",{suggest:"query.parseSerializedNode(...).toNode(node => node.id = id)"}),r().parseFreshNode({...o?{id:o}:{},data:s}).toNode(!o&&i)}}),parseFreshNode:n=>({toNode:i=>cO(n,s=>{s.data.parent===jH&&(s.data.parent=Ua);const o=nb(e.options.resolver,s.data.type);Gr(o!==null),s.data.displayName=s.data.displayName||o,s.data.name=o,i&&i(s)})}),createNode(n,i){vu(`query.createNode(${n})`,{suggest:`query.parseReactElement(${n}).toNodeTree()`});const s=this.parseReactElement(n).toNodeTree(),o=s.nodes[s.rootNodeId];return i&&(i.id&&(o.id=i.id),i.data&&(o.data={...o.data,...i.data})),o},getState:()=>e}}var k_e=function(e){v$(r,JH);var t=x$(r);function r(){return sx(this,r),t.apply(this,arguments)}return ox(r,[{key:"handlers",value:function(){return{connect:function(n,i){},select:function(n,i){},hover:function(n,i){},drag:function(n,i){},drop:function(n,i){},create:function(n,i,s){}}}}]),r}();(function(e){v$(r,a_e);var t=x$(r);function r(){return sx(this,r),t.apply(this,arguments)}return ox(r)})();var hO=function(e){e.preventDefault()},MT=function(){function e(t,r){sx(this,e),Fn(this,"store",void 0),Fn(this,"dragTarget",void 0),Fn(this,"currentDropTargetId",void 0),Fn(this,"currentDropTargetCanvasAncestorId",void 0),Fn(this,"currentIndicator",null),Fn(this,"currentTargetId",void 0),Fn(this,"currentTargetChildDimensions",void 0),Fn(this,"dragError",void 0),Fn(this,"draggedNodes",void 0),Fn(this,"onScrollListener",void 0),this.store=t,this.dragTarget=r,this.currentDropTargetId=null,this.currentDropTargetCanvasAncestorId=null,this.currentTargetId=null,this.currentTargetChildDimensions=null,this.currentIndicator=null,this.dragError=null,this.draggedNodes=this.getDraggedNodes(),this.validateDraggedNodes(),this.onScrollListener=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollListener,!0),window.addEventListener("dragover",hO,!1)}return ox(e,[{key:"cleanup",value:function(){window.removeEventListener("scroll",this.onScrollListener,!0),window.removeEventListener("dragover",hO,!1)}},{key:"onScroll",value:function(t){var r=t.target,n=this.store.query.node(Ua).get();r instanceof Element&&n&&n.dom&&r.contains(n.dom)&&(this.currentTargetChildDimensions=null)}},{key:"getDraggedNodes",value:function(){return Oa(this.store.query.getNodes(),this.dragTarget.type==="new"?this.dragTarget.tree.nodes[this.dragTarget.tree.rootNodeId]:this.dragTarget.nodes)}},{key:"validateDraggedNodes",value:function(){var t=this;this.dragTarget.type!=="new"&&this.draggedNodes.forEach(function(r){r.exists&&t.store.query.node(r.node.id).isDraggable(function(n){t.dragError=n})})}},{key:"isNearBorders",value:function(t,r,n){return t.top+e.BORDER_OFFSET>n||t.bottom-e.BORDER_OFFSETr||t.right-e.BORDER_OFFSET2&&arguments[2]!==void 0&&arguments[2]){var r=t[0].getBoundingClientRect(),n=r.width,i=r.height,s=t[0].cloneNode(!0);return s.style.position="absolute",s.style.left="-100%",s.style.top="-100%",s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px"),s.style.pointerEvents="none",s.classList.add("drag-shadow"),document.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0),s}var o=document.createElement("div");return o.style.position="absolute",o.style.left="-100%",o.style.top="-100%",o.style.width="100%",o.style.height="100%",o.style.pointerEvents="none",o.classList.add("drag-shadow-container"),t.forEach(function(a){var l=a.getBoundingClientRect(),c=l.width,u=l.height,h=l.top,d=l.left,f=a.cloneNode(!0);f.style.position="absolute",f.style.left="".concat(d,"px"),f.style.top="".concat(h,"px"),f.style.width="".concat(c,"px"),f.style.height="".concat(u,"px"),f.classList.add("drag-shadow"),o.appendChild(f)}),document.body.appendChild(o),e.dataTransfer.setDragImage(o,e.clientX,e.clientY),o},u9=function(e){v$(r,k_e);var t=x$(r);function r(){var n;sx(this,r);for(var i=arguments.length,s=new Array(i),o=0;o1&&i.actions.setNodeEvent("selected",f=[o]),n.currentSelectedElementIds=f});return function(){a(),l()}},hover:function(s,o){var a=n.addCraftEventListener(s,"mouseover",function(l){l.craft.stopPropagation(),i.actions.setNodeEvent("hovered",o)});return n.options.removeHoverOnMouseleave&&n.addCraftEventListener(s,"mouseleave",function(l){l.craft.stopPropagation(),i.actions.setNodeEvent("hovered",null)}),function(){a()}},drop:function(s,o){var a=n.addCraftEventListener(s,"dragover",function(c){if(c.craft.stopPropagation(),c.preventDefault(),n.positioner){var u=n.positioner.computeIndicator(o,c.clientX,c.clientY);u&&i.actions.setIndicator(u)}}),l=n.addCraftEventListener(s,"dragenter",function(c){c.craft.stopPropagation(),c.preventDefault()});return function(){l(),a()}},drag:function(s,o){if(!i.query.node(o).isDraggable())return function(){};s.setAttribute("draggable","true");var a=n.addCraftEventListener(s,"dragstart",function(c){c.craft.stopPropagation();var u=i.query,h=i.actions,d=u.getEvent("selected").all(),f=n.options.isMultiSelectEnabled(c);n.currentSelectedElementIds.includes(o)||(d=f?[].concat(dg(d),[o]):[o],i.actions.setNodeEvent("selected",d)),h.setNodeEvent("dragged",d);var p=d.map(function(g){return u.node(g).get().dom});n.draggedElementShadow=dO(c,p,r.forceSingleDragShadow),n.dragTarget={type:"existing",nodes:d},n.positioner=new MT(n.options.store,n.dragTarget)}),l=n.addCraftEventListener(s,"dragend",function(c){c.craft.stopPropagation(),n.dropElement(function(u,h){u.type!=="new"&&i.actions.move(u.nodes,h.placement.parent.id,h.placement.index+(h.placement.where==="after"?1:0))})});return function(){s.setAttribute("draggable","false"),a(),l()}},create:function(s,o,a){s.setAttribute("draggable","true");var l=n.addCraftEventListener(s,"dragstart",function(u){var h;if(u.craft.stopPropagation(),typeof o=="function"){var d=o();h=Mt.isValidElement(d)?i.query.parseReactElement(d).toNodeTree():d}else h=i.query.parseReactElement(o).toNodeTree();n.draggedElementShadow=dO(u,[u.currentTarget],r.forceSingleDragShadow),n.dragTarget={type:"new",tree:h},n.positioner=new MT(n.options.store,n.dragTarget)}),c=n.addCraftEventListener(s,"dragend",function(u){u.craft.stopPropagation(),n.dropElement(function(h,d){h.type!=="existing"&&(i.actions.addNodeTree(h.tree,d.placement.parent.id,d.placement.index+(d.placement.where==="after"?1:0)),a&&wDe(a.onCreate)&&a.onCreate(h.tree))})});return function(){s.removeAttribute("draggable"),l(),c()}}}}},{key:"dropElement",value:function(n){var i=this.options.store;if(this.positioner){var s=this.draggedElementShadow,o=this.positioner.getIndicator();this.dragTarget&&o&&!o.error&&n(this.dragTarget,o),s&&(s.parentNode.removeChild(s),this.draggedElementShadow=null),this.dragTarget=null,i.actions.setIndicator(null),i.actions.setNodeEvent("dragged",null),this.positioner.cleanup(),this.positioner=null}}}]),r}();function __e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:2,i=0,s=0,o=0,a=0,l=e.where;return r?r.inFlow?(o=r.outerWidth,a=n,i=l==="before"?r.top:r.bottom,s=r.left):(o=n,a=r.outerHeight,i=r.top,s=l==="before"?r.left:r.left+r.outerWidth):t&&(i=t.top+t.padding.top,s=t.left+t.padding.left,o=t.outerWidth-t.padding.right-t.padding.left-t.margin.left-t.margin.right,a=n),{top:"".concat(i,"px"),left:"".concat(s,"px"),width:"".concat(o,"px"),height:"".concat(a,"px")}}Fn(u9,"forceSingleDragShadow",d_e()&&h_e());const $_e=()=>{const{indicator:e,indicatorOptions:t,enabled:r}=fh(i=>({indicator:i.indicator,indicatorOptions:i.options.indicator,enabled:i.options.enabled})),n=i9();return H.useEffect(()=>{n&&(r?n.enable():n.disable())},[r,n]),e?Mt.createElement(c_e,{style:{...__e(e.placement,hg(e.placement.parent.dom),e.placement.currentNode&&hg(e.placement.currentNode.dom),t.thickness),backgroundColor:e.error?t.error:t.success,transition:t.transition||"0.2s ease-in"},parentDom:e.placement.parent.dom}):null},F_e=({children:e})=>{const t=H.useContext(w$),r=H.useMemo(()=>t.query.getOptions().handlers(t),[t]);return r?Mt.createElement(n9.Provider,{value:r},Mt.createElement($_e,null),e):null},fO={nodes:{},events:{dragged:new Set,selected:new Set,hovered:new Set},indicator:null,options:{onNodesChange:()=>null,onRender:({render:e})=>e,onBeforeMoveEnd:()=>null,resolver:{},enabled:!0,indicator:{error:"red",success:"rgb(98, 196, 98)"},handlers:e=>new u9({store:e,removeHoverOnMouseleave:!1,isMultiSelectEnabled:t=>!!t.metaKey}),normalizeNodes:()=>{}}},P_e={methods:function(e,t){return Qr(Qr({},function(r,n){var i=function(a,l,c){if(function d(f,p){var g=a.nodes[f];typeof g.data.type!="string"&&Gr(r.options.resolver[g.data.name],HH.replace("%node_type%","".concat(g.data.type.name))),r.nodes[f]=Qr(Qr({},g),{},{data:Qr(Qr({},g.data),{},{parent:p})}),g.data.nodes.length>0&&(delete r.nodes[f].data.props.children,g.data.nodes.forEach(function(y){return d(y,g.id)})),Object.values(g.data.linkedNodes).forEach(function(y){return d(y,g.id)})}(a.rootNodeId,l),l||a.rootNodeId!==Ua){var u=s(l);if(c.type!=="child")u.data.linkedNodes[c.id]=a.rootNodeId;else{var h=c.index;h!=null?u.data.nodes.splice(h,0,a.rootNodeId):u.data.nodes.push(a.rootNodeId)}}},s=function(a){Gr(a);var l=r.nodes[a];return Gr(l),l},o=function a(l){var c=r.nodes[l],u=r.nodes[c.data.parent];if(c.data.nodes&&dg(c.data.nodes).forEach(function(f){return a(f)}),c.data.linkedNodes&&Object.values(c.data.linkedNodes).map(function(f){return a(f)}),u.data.nodes.includes(l)){var h=u.data.nodes;h.splice(h.indexOf(l),1)}else{var d=Object.keys(u.data.linkedNodes).find(function(f){return u.data.linkedNodes[f]===f});d&&delete u.data.linkedNodes[d]}(function(f,p){Object.keys(f.events).forEach(function(g){var y=f.events[g];y&&y.has&&y.has(p)&&(f.events[g]=new Set(Array.from(y).filter(function(b){return p!==b})))})})(r,l),delete r.nodes[l]};return{addLinkedNodeFromTree:function(a,l,c){var u=s(l).data.linkedNodes[c];u&&o(u),i(a,l,{type:"linked",id:c})},add:function(a,l,c){var u=[a];Array.isArray(a)&&(vu("actions.add(node: Node[])",{suggest:"actions.add(node: Node)"}),u=a),u.forEach(function(h){i({nodes:Fn({},h.id,h),rootNodeId:h.id},l,{type:"child",index:c})})},addNodeTree:function(a,l,c){i(a,l,{type:"child",index:c})},delete:function(a){Oa(r.nodes,a,{existOnly:!0,idOnly:!0}).forEach(function(l){var c=l.node;Gr(!n.node(c.id).isTopLevelNode()),o(c.id)})},deserialize:function(a){var l=typeof a=="string"?JSON.parse(a):a,c=Object.keys(l).map(function(u){var h=u;return u===jH&&(h=Ua),[h,n.parseSerializedNode(l[u]).toNode(function(d){return d.id=h})]});this.replaceNodes(o9(c))},move:function(a,l,c){var u=Oa(r.nodes,a,{existOnly:!0}),h=r.nodes[l],d=new Set;u.forEach(function(f,p){var g=f.node,y=g.id,b=g.data.parent;n.node(l).isDroppable([y],function(D){throw new Error(D)}),r.options.onBeforeMoveEnd(g,h,r.nodes[b]);var v=r.nodes[b].data.nodes;d.add(v);var E=v.indexOf(y);v[E]="$$",h.data.nodes.splice(c+p,0,y),r.nodes[y].data.parent=l}),d.forEach(function(f){var p=f.length;dg(f).reverse().forEach(function(g,y){g==="$$"&&f.splice(p-1-y,1)})})},replaceNodes:function(a){this.clearEvents(),r.nodes=a},clearEvents:function(){this.setNodeEvent("selected",null),this.setNodeEvent("hovered",null),this.setNodeEvent("dragged",null),this.setIndicator(null)},reset:function(){this.clearEvents(),this.replaceNodes({})},setOptions:function(a){a(r.options)},setNodeEvent:function(a,l){if(r.events[a].forEach(function(h){r.nodes[h]&&(r.nodes[h].events[a]=!1)}),r.events[a]=new Set,l){var c=Oa(r.nodes,l,{idOnly:!0,existOnly:!0}),u=new Set(c.map(function(h){return h.node.id}));u.forEach(function(h){r.nodes[h].events[a]=!0}),r.events[a]=u}},setCustom:function(a,l){Oa(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(c){return l(r.nodes[c.node.id].data.custom)})},setDOM:function(a,l){r.nodes[a]&&(r.nodes[a].dom=l)},setIndicator:function(a){a&&(!a.placement.parent.dom||a.placement.currentNode&&!a.placement.currentNode.dom)||(r.indicator=a)},setHidden:function(a,l){r.nodes[a].data.hidden=l},setProp:function(a,l){Oa(r.nodes,a,{idOnly:!0,existOnly:!0}).forEach(function(c){return l(r.nodes[c.node.id].data.props)})},selectNode:function(a){if(a){var l=Oa(r.nodes,a,{idOnly:!0,existOnly:!0});this.setNodeEvent("selected",l.map(function(c){return c.node.id}))}else this.setNodeEvent("selected",null);this.setNodeEvent("hovered",null)}}}(e,t)),{},{setState:function(r){var n=b$(this,S_e);r(e,n)}})},ignoreHistoryForActions:["setDOM","setNodeEvent","selectNode","clearEvents","setOptions","setIndicator"],normalizeHistory:e=>{Object.keys(e.events).forEach(t=>{Array.from(e.events[t]||[]).forEach(r=>{e.nodes[r]||e.events[t].delete(r)})}),Object.keys(e.nodes).forEach(t=>{const r=e.nodes[t];Object.keys(r.events).forEach(n=>{r.events[n]&&e.events[n]&&!e.events[n].has(r.id)&&(r.events[n]=!1)})})}},I_e=(e,t)=>r_e(P_e,{...fO,options:{...fO.options,...e}},l9,t),N_e=({children:e,...t})=>{t.resolver!==void 0&&Gr(typeof t.resolver=="object"&&!Array.isArray(t.resolver)&&t.resolver!==null);const r=H.useRef(t),n=I_e(r.current,(i,s,o,a,l)=>{if(!o)return;const{patches:c,...u}=o;for(let h=0;h2&&d[0]==="nodes"&&d[2]==="data";if([yn.IGNORE,yn.THROTTLE].includes(u.type)&&u.params&&(u.type=u.params[0]),["setState","deserialize"].includes(u.type)||f){l(p=>{i.options.normalizeNodes&&i.options.normalizeNodes(p,s,u,a)});break}}});return H.useEffect(()=>{n&&t.enabled!==void 0&&n.query.getOptions().enabled!==t.enabled&&n.actions.setOptions(i=>{i.enabled=t.enabled})},[n,t.enabled]),H.useEffect(()=>{n.subscribe(i=>({json:n.query.serialize()}),()=>{n.query.getOptions().onNodesChange(n.query)})},[n]),n?Mt.createElement(w$.Provider,{value:n},Mt.createElement(F_e,null,e)):null},M_e=({className:e,onIconPick:t,selectedIcon:r})=>{const{t:n}=mr(),[i,s]=H.useState(!1),[o,a]=H.useState("");return z.jsxs(z.Fragment,{children:[z.jsxs(Ot,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectIcon"),z.jsx(Ks,{placement:"left",children:n("playgroundSelectIcon")})]}),z.jsx(hf,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},withCloseButton:!0,drawerHeader:z.jsxs("div",{className:"flex gap-fix-3xl",children:[z.jsx("span",{className:"my-auto",children:n("playgroundSelectIcon")}),z.jsx(an,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:z.jsx("div",{className:"grid-cols-3 md:grid-cols-6 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:["none",...lZ].filter(l=>l.includes(o)).map(l=>z.jsx("button",{className:l==="none"?"h-full":"h-fit",onClick:()=>t(l),children:z.jsxs(ls,{"data-interactive":"elevation",className:`items-center ${l==="none"?" h-full":""}${l===r?" db-successful-bg-lvl-3":""}`,spacing:"small",children:[l!=="none"&&z.jsx(df,{icon:l}),z.jsx("span",{className:"break-all m-auto",children:l})]})},`icon-button-${l}`))})})]})};function li(e){this.content=e}li.prototype={constructor:li,find:function(e){for(var t=0;t>1}};li.from=function(e){if(e instanceof li)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new li(t)};function c9(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let i=e.child(n),s=t.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=c9(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function h9(e,t,r,n){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=e.child(--i),a=t.child(--s),l=o.nodeSize;if(o==a){r-=l,n-=l;continue}if(!o.sameMarkup(a))return{a:r,b:n};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;ct&&n(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,r-u),n,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,i){let s="",o=!0;return this.nodesBetween(t,r,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,r-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&n&&(o?o=!1:s+=n),s+=c},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);st)for(let s=0,o=0;ot&&((or)&&(a.isText?a=a.cut(Math.max(0,t-o),Math.min(a.text.length,r-o)):a=a.cut(Math.max(0,t-o-1),Math.min(a.content.size,r-o-1))),n.push(a),i+=a.nodeSize),o=l}return new qe(n,i)}cutByIndex(t,r){return t==r?qe.empty:t==0&&r==this.content.length?this:new qe(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[t]=r,new qe(i,s)}addToStart(t){return new qe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new qe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t||r>0?ov(n+1,o):ov(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return qe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new qe(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return qe.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=t.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-i.type.rank),r}};Br.none=[];class sb extends Error{}class ut{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=f9(this.content,t+this.openStart,r);return n&&new ut(n,this.openStart,this.openEnd)}removeBetween(t,r){return new ut(d9(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return ut.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ut(qe.fromJSON(t,r.content),n,i)}static maxOpen(t,r=!0){let n=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=t.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new ut(t,n,i)}}ut.empty=new ut(qe.empty,0,0);function d9(e,t,r){let{index:n,offset:i}=e.findIndex(t),s=e.maybeChild(n),{index:o,offset:a}=e.findIndex(r);if(i==t||s.isText){if(a!=r&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(n,s.copy(d9(s.content,t-i-1,r-i-1)))}function f9(e,t,r,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return n&&!n.canReplace(i,i,r)?null:e.cut(0,t).append(r).append(e.cut(t));let a=f9(o.content,t-s-1,r);return a&&e.replaceChild(i,o.copy(a))}function L_e(e,t,r){if(r.openStart>e.depth)throw new sb("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new sb("Inconsistent open depths");return p9(e,t,r,0)}function p9(e,t,r,n){let i=e.index(n),s=e.node(n);if(i==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function Dm(e,t,r,n){let i=(t||e).node(r),s=0,o=t?t.index(r):i.childCount;e&&(s=e.index(r),e.depth>r?s++:e.textOffset&&(bc(e.nodeAfter,n),s++));for(let a=s;ai&&OT(e,t,i+1),o=n.depth>i&&OT(r,n,i+1),a=[];return Dm(null,e,i,a),s&&o&&t.index(i)==r.index(i)?(m9(s,o),bc(xc(s,g9(e,t,r,n,i+1)),a)):(s&&bc(xc(s,ob(e,t,i+1)),a),Dm(t,r,i,a),o&&bc(xc(o,ob(r,n,i+1)),a)),Dm(n,null,i,a),new qe(a)}function ob(e,t,r){let n=[];if(Dm(null,e,r,n),e.depth>r){let i=OT(e,t,r+1);bc(xc(i,ob(e,t,r+1)),n)}return Dm(t,null,r,n),new qe(n)}function O_e(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let s=r-1;s>=0;s--)i=t.node(s).copy(qe.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}class fg{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=t.child(r);return n?t.child(r).cut(n):i}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new ab(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=t;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(n.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new fg(r,n,s)}static resolveCached(t,r){for(let i=0;it&&this.nodesBetween(t,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),y9(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=qe.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),a=o&&o.matchFragment(this.content,r);if(!a||!a.validEnd)return!1;for(let l=i;lr.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let i=qe.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,i,n)}};wc.prototype.text=void 0;class lb extends wc{constructor(t,r,n,i){if(super(t,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):y9(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new lb(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new lb(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function y9(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class Wc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new z_e(t,r);if(n.next==null)return Wc.empty;let i=v9(n);n.next&&n.err("Unexpected trailing text");let s=q_e(G_e(i));return K_e(s,n),s}matchType(t){for(let r=0;rc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(n.next[o].next);return s}).join(` -`)}}Wc.empty=new Wc(!0);class z_e{constructor(t,r){this.string=t,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function v9(e){let t=[];do t.push(j_e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function j_e(e){let t=[];do t.push(H_e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function H_e(e){let t=V_e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=U_e(e,t);else break;return t}function pO(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function U_e(e,t){let r=pO(e),n=r;return e.eat(",")&&(e.next!="}"?n=pO(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function W_e(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.groups.indexOf(t)>-1&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function V_e(e){if(e.eat("(")){let t=v9(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=W_e(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function G_e(e){let t=[[]];return i(s(e,0),r()),t;function r(){return t.push([])-1}function n(o,a,l){let c={term:l,to:a};return t[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=r())}else if(o.type=="star"){let l=r();return n(a,l),i(s(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=r();return i(s(o.expr,a),l),i(s(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c{e[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=t[n.join(",")]=new Wc(n.indexOf(e.length-1)>-1);for(let o=0;o-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[s]=new D9(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class J_e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class lx{constructor(t,r,n,i){this.name=t,this.rank=r,this.schema=n,this.spec=i,this.attrs=S9(i.attrs),this.excluded=null;let s=x9(this.attrs);this.instance=s?new Br(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Br(this,w9(this.attrs,t))}static compile(t,r){let n=Object.create(null),i=0;return t.forEach((s,o)=>n[s]=new lx(s,i++,r,o)),n}removeFromSet(t){for(var r=0;r-1}}class X_e{constructor(t){this.cached=Object.create(null);let r=this.spec={};for(let i in t)r[i]=t[i];r.nodes=li.from(t.nodes),r.marks=li.from(t.marks||{}),this.nodes=gO.compile(this.spec.nodes,this),this.marks=lx.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;s.contentMatch=n[o]||(n[o]=Wc.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=a=="_"?null:a?yO(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yO(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,n,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof gO){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,n,i)}text(t,r){let n=this.nodes.text;return new lb(n,n.defaultAttrs,t,Br.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return wc.fromJSON(this,t)}markFromJSON(t){return Br.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}}function yO(e,t){let r=[];for(let n=0;n-1)&&r.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}class ef{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let i=t.nodes[n.node];return i.contentMatch.matchType(i)})}parse(t,r={}){let n=new bO(this,r,!1);return n.addAll(t,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new bO(this,r,!0);return n.addAll(t,r.from,r.to),ut.maxOpen(n.finish())}matchTag(t,r,n){for(let i=n?this.tags.indexOf(n)+1:0;it.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=r))){if(o.getAttrs){let l=o.getAttrs(r);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(t){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=xO(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=xO(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new ef(t,ef.schemaRules(t)))}}const E9={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Y_e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},C9={ol:!0,ul:!0},ub=1,cb=2,Em=4;function vO(e,t,r){return t!=null?(t?ub:0)|(t==="full"?cb:0):e&&e.whitespace=="pre"?ub|cb:r&~Em}class av{constructor(t,r,n,i,s,o,a){this.type=t,this.attrs=r,this.marks=n,this.pendingMarks=i,this.solid=s,this.options=a,this.content=[],this.activeMarks=Br.none,this.stashMarks=[],this.match=o||(a&Em?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(qe.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(t.type))?(this.match=n,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ub)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=qe.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(qe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,n=this.pendingMarks;rthis.addAll(t)),o&&this.sync(a),this.needsBlock=l}else this.withStyleRules(t,()=>{this.addElementByRule(t,s,s.consuming===!1?i:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` -`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let r=Br.none,n=Br.none;for(let i=0;i{o.clearMark(a)&&(n=a.addToSet(n))}):r=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(r),o.consuming===!1)s=o;else break}return[r,n]}addElementByRule(t,r,n){let i,s,o;r.node?(s=this.parser.schema.nodes[r.node],s.isLeaf?this.insertNode(s.create(r.attrs))||this.leafFallback(t):i=this.enter(s,r.attrs||null,r.preserveWhitespace)):(o=this.parser.schema.marks[r.mark].create(r.attrs),this.addPendingMark(o));let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;typeof r.contentElement=="string"?l=t.querySelector(r.contentElement):typeof r.contentElement=="function"?l=r.contentElement(t):r.contentElement&&(l=r.contentElement),this.findAround(t,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(t,r,n){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,o=n==null?null:t.childNodes[n];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s);this.findAtPoint(t,i)}findPlace(t){let r,n;for(let i=this.open;i>=0;i--){let s=this.nodes[i],o=s.findWrapping(t);if(o&&(!r||r.length>o.length)&&(r=o,n=s,!o.length)||s.solid)break}if(!r)return!1;this.sync(n);for(let i=0;ithis.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)t+=n[i].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=r[a];if(c==""){if(a==r.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:n&&l>=s?n.node(l-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}addPendingMark(t){let r=r$e(t,this.top.pendingMarks);r&&this.top.stashMarks.push(r),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,r){for(let n=this.open;n>=0;n--){let i=this.nodes[n];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let o=i.popFromStashMark(t);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==r)break}}}function Z_e(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&C9.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function Q_e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function e$e(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r,n=[];for(;r=t.exec(e);)n.push(r[1],r[2].trim());return n}function xO(e){let t={};for(let r in e)t[r]=e[r];return t}function t$e(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let s=[],o=a=>{s.push(a);for(let l=0;l{if(s.length||o.marks.length){let a=0,l=0;for(;a=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(t,r,n={}){let i=this.marks[t.type.name];return i&&ea.renderSpec(MD(n),i(t,r))}static renderSpec(t,r,n=null){if(typeof r=="string")return{dom:t.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let i=r[0],s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let o,a=n?t.createElementNS(n,i):t.createElement(i),l=r[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let h=u.indexOf(" ");h>0?a.setAttributeNS(u.slice(0,h),u.slice(h+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:d,contentDOM:f}=ea.renderSpec(t,h,n);if(a.appendChild(d),f){if(o)throw new RangeError("Multiple content holes");o=f}}}return{dom:a,contentDOM:o}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ea(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=wO(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return wO(t.marks)}}function wO(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function MD(e){return e.document||window.document}const T9=65535,A9=Math.pow(2,16);function n$e(e,t){return e+t*A9}function SO(e){return e&T9}function i$e(e){return(e-(e&T9))/A9}const k9=1,_9=2,Hv=4,$9=8;class BT{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&$9)>0}get deletedBefore(){return(this.delInfo&(k9|Hv))>0}get deletedAfter(){return(this.delInfo&(_9|Hv))>0}get deletedAcross(){return(this.delInfo&Hv)>0}}class Cs{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&Cs.empty)return Cs.empty}recover(t){let r=0,n=SO(t);if(!this.inverted)for(let i=0;it)break;let c=this.ranges[a+s],u=this.ranges[a+o],h=l+c;if(t<=h){let d=c?t==l?-1:t==h?1:r:r,f=l+i+(d<0?0:u);if(n)return f;let p=t==(r<0?l:h)?null:n$e(a/3,t-l),g=t==l?_9:t==h?k9:Hv;return(r<0?t!=l:t!=h)&&(g|=$9),new BT(f,g,p)}i+=u-c}return n?t+i:new BT(t+i,0,null)}touches(t,r){let n=0,i=SO(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+s],u=l+c;if(t<=u&&a==i*3)return!0;n+=this.ranges[a+o]-c}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=t.getMirror(r);this.appendMap(t.maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let t=new Cm;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ns&&l!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return _n.fromReplace(t,this.from,this.to,s)}invert(){return new ta(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Gl(r.pos,n.pos,this.mark)}merge(t){return t instanceof Gl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Gl(r.from,r.to,t.markFromJSON(r.mark))}}Ni.jsonID("addMark",Gl);class ta extends Ni{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new ut(D$(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),r.openStart,r.openEnd);return _n.fromReplace(t,this.from,this.to,n)}invert(){return new Gl(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new ta(r.pos,n.pos,this.mark)}merge(t){return t instanceof ta&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ta(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ta(r.from,r.to,t.markFromJSON(r.mark))}}Ni.jsonID("removeMark",ta);class ql extends Ni{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return _n.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return _n.fromReplace(t,this.pos,this.pos+1,new ut(qe.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new Xn(r.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Xn(r.from,r.to,r.gapFrom,r.gapTo,ut.fromJSON(t,r.slice),r.insert,!!r.structure)}}Ni.jsonID("replaceAround",Xn);function zT(e,t,r){let n=e.resolve(t),i=r-t,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function s$e(e,t,r,n){let i=[],s=[],o,a;e.doc.nodesBetween(t,r,(l,c,u)=>{if(!l.isInline)return;let h=l.marks;if(!n.isInSet(h)&&u.type.allowsMarkType(n.type)){let d=Math.max(c,t),f=Math.min(c+l.nodeSize,r),p=n.addToSet(h);for(let g=0;ge.step(l)),s.forEach(l=>e.step(l))}function o$e(e,t,r,n){let i=[],s=0;e.doc.nodesBetween(t,r,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(n instanceof lx){let c=o.marks,u;for(;u=n.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,r);for(let u=0;ue.step(new ta(o.from,o.to,o.style)))}function a$e(e,t,r,n=r.contentMatch){let i=e.doc.nodeAt(t),s=[],o=t+1;for(let a=0;a=0;a--)e.step(s[a])}function l$e(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function zf(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let i=e.$from.node(n),s=e.$from.index(n),o=e.$to.indexAfter(n);if(nr;p--)g||n.index(p)>0?(g=!0,u=qe.from(n.node(p).copy(u)),h++):l--;let d=qe.empty,f=0;for(let p=s,g=!1;p>r;p--)g||i.after(p+1)=0;o--){if(n.size){let a=r[o].type.contentMatch.matchFragment(n);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=qe.from(r[o].type.create(r[o].attrs,n))}let i=t.start,s=t.end;e.step(new Xn(i,s,i,s,new ut(n,0,0),r.length,!0))}function f$e(e,t,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,r,(o,a)=>{if(o.isTextblock&&!o.hasMarkup(n,i)&&p$e(e.doc,e.mapping.slice(s).map(a),n)){e.clearIncompatible(e.mapping.slice(s).map(a,1),n);let l=e.mapping.slice(s),c=l.map(a,1),u=l.map(a+o.nodeSize,1);return e.step(new Xn(c,u,c+1,u-1,new ut(qe.from(n.create(i,null,o.marks)),0,0),1,!0)),!1}})}function p$e(e,t,r){let n=e.resolve(t),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function m$e(e,t,r,n,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new Xn(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new ut(qe.from(o),0,0),1,!0))}function kd(e,t,r=1,n){let i=e.resolve(t),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=r-2;c>s;c--,u--){let h=i.node(c),d=i.index(c);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(d,h.childCount),p=n&&n[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let g=n&&n[u]||h;if(!h.canReplace(d+1,h.childCount)||!g.type.validContent(f))return!1}let a=i.indexAfter(s),l=n&&n[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function g$e(e,t,r=1,n){let i=e.doc.resolve(t),s=qe.empty,o=qe.empty;for(let a=i.depth,l=i.depth-r,c=r-1;a>l;a--,c--){s=qe.from(i.node(a).copy(s));let u=n&&n[c];o=qe.from(u?u.type.create(u.attrs,o):i.node(a).copy(o))}e.step(new qn(t,t,new ut(s.append(o),r,r),!0))}function ph(e,t){let r=e.resolve(t),n=r.index();return P9(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function P9(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function ux(e,t,r=-1){let n=e.resolve(t);for(let i=n.depth;;i--){let s,o,a=n.index(i);if(i==n.depth?(s=n.nodeBefore,o=n.nodeAfter):r>0?(s=n.node(i+1),a++,o=n.node(i).maybeChild(a)):(s=n.node(i).maybeChild(a-1),o=n.node(i+1)),s&&!s.isTextblock&&P9(s,o)&&n.node(i).canReplace(a,a+1))return t;if(i==0)break;t=r<0?n.before(i):n.after(i)}}function y$e(e,t,r){let n=new qn(t-r,t+r,ut.empty,!0);e.step(n)}function v$e(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),c=n.node(o),u=!1;if(s==1)u=c.canReplace(l,l,i);else{let h=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=h&&c.canReplaceWith(l,l,h[0])}if(u)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function cx(e,t,r=t,n=ut.empty){if(t==r&&!n.size)return null;let i=e.resolve(t),s=e.resolve(r);return I9(i,s,n)?new qn(t,r,n):new x$e(i,s,n).fit()}function I9(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class x$e{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=qe.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=qe.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let s=this.placed,o=n.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new ut(s,o,a);return t>-1?new Xn(n.pos,t,this.$to.pos,this.$to.end(),l,r):l.size||n.pos!=this.$to.pos?new qn(n.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){t=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=OD(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,h=null;if(r==1&&(o?c.matchType(o.type)||(h=c.fillBefore(qe.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:h};if(r==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=OD(t,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ut(t,r+1,Math.max(n,i.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=OD(t,r);if(i.childCount<=1&&r>0){let s=t.size-r<=r+i.size;this.unplaced=new ut(Vp(t,r-1,1),r-1,s?r-1:n)}else this.unplaced=new ut(Vp(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let g=0;g1||l==0||g.content.size)&&(h=y,u.push(N9(g.mark(d.allowedMarks(g.marks)),c==1?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=Gp(this.placed,r,qe.from(u)),this.frontier[r].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=a;g1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;a--){let{match:l,type:c}=this.frontier[a],u=RD(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:r,fit:o,move:s?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Gp(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let i=t.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(n));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Gp(this.placed,this.depth,qe.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(qe.empty,!0);r.childCount&&(this.placed=Gp(this.placed,this.frontier.length,r))}}function Vp(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(Vp(e.firstChild.content,t-1,r)))}function Gp(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(Gp(e.lastChild.content,t-1,r)))}function OD(e,t){for(let r=0;r1&&(n=n.replaceChild(0,N9(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(qe.empty,!0)))),e.copy(n)}function RD(e,t,r,n,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!w$e(r,s.content,o)?a:null}function w$e(e,t,r){for(let n=r;n0;d--,f--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?a=d:i.before(d)==f&&o.splice(1,0,-d)}let l=o.indexOf(a),c=[],u=n.openStart;for(let d=n.content,f=0;;f++){let p=d.firstChild;if(c.push(p),f==n.openStart)break;d=p.content}for(let d=u-1;d>=0;d--){let f=c[d],p=S$e(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))u=d;else if(p||!f.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let f=(d+u+1)%(n.openStart+1),p=c[f];if(p)for(let g=0;g=0&&(e.replace(t,r,n),!(e.steps.length>h));d--){let f=o[d];f<0||(t=i.before(f),r=s.after(f))}}function M9(e,t,r,n,i){if(tn){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(qe.empty,!0))}return e}function E$e(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=v$e(e.doc,t,n.type);i!=null&&(t=r=i)}e.replaceRange(t,r,new ut(qe.from(n),0,0))}function C$e(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),s=L9(n,i);for(let o=0;o0&&(l||n.node(a-1).canReplace(n.index(a-1),i.indexAfter(a-1))))return e.delete(n.before(a),i.after(a))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o)return e.delete(n.before(o),r);e.delete(t,r)}function L9(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let s=e.start(i);if(st.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&r.push(i)}return r}class _d extends Ni{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return _n.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return _n.fromReplace(t,this.pos,this.pos+1,new ut(qe.from(i),0,r.isLeaf?0:1))}getMap(){return Cs.empty}invert(t){return new _d(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new _d(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new _d(r.pos,r.attr,r.value)}}Ni.jsonID("attr",_d);class pg extends Ni{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return _n.ok(n)}getMap(){return Cs.empty}invert(t){return new pg(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new pg(r.attr,r.value)}}Ni.jsonID("docAttr",pg);let rf=class extends Error{};rf=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};rf.prototype=Object.create(Error.prototype);rf.prototype.constructor=rf;rf.prototype.name="TransformError";class T$e{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Cm}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new rf(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=ut.empty){let i=cx(this.doc,t,r,n);return i&&this.step(i),this}replaceWith(t,r,n){return this.replace(t,r,new ut(qe.from(n),0,0))}delete(t,r){return this.replace(t,r,ut.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return D$e(this,t,r,n),this}replaceRangeWith(t,r,n){return E$e(this,t,r,n),this}deleteRange(t,r){return C$e(this,t,r),this}lift(t,r){return u$e(this,t,r),this}join(t,r=1){return y$e(this,t,r),this}wrap(t,r){return d$e(this,t,r),this}setBlockType(t,r=t,n,i=null){return f$e(this,t,r,n,i),this}setNodeMarkup(t,r,n=null,i){return m$e(this,t,r,n,i),this}setNodeAttribute(t,r,n){return this.step(new _d(t,r,n)),this}setDocAttribute(t,r){return this.step(new pg(t,r)),this}addNodeMark(t,r){return this.step(new ql(t,r)),this}removeNodeMark(t,r){if(!(r instanceof Br)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new tf(t,r)),this}split(t,r=1,n){return g$e(this,t,r,n),this}addMark(t,r,n){return s$e(this,t,r,n),this}removeMark(t,r,n){return o$e(this,t,r,n),this}clearIncompatible(t,r,n){return a$e(this,t,r,n),this}}const BD=Object.create(null);class ir{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new A$e(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r=0;s--){let o=r<0?Xh(t.node(0),t.node(s),t.before(s+1),t.index(s),r,n):Xh(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,r,n);if(o)return o}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new Mo(t.node(0))}static atStart(t){return Xh(t,t,0,0,1)||new Mo(t)}static atEnd(t){return Xh(t,t,t.content.size,t.childCount,-1)||new Mo(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=BD[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in BD)throw new RangeError("Duplicate use of selection JSON ID "+t);return BD[t]=r,r.prototype.jsonID=t,r}getBookmark(){return Qt.between(this.$anchor,this.$head).getBookmark()}}ir.prototype.visible=!0;class A$e{constructor(t,r){this.$from=t,this.$to=r}}let EO=!1;function CO(e){!EO&&!e.parent.inlineContent&&(EO=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Qt extends ir{constructor(t,r=t){CO(t),CO(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return ir.near(n);let i=t.resolve(r.map(this.anchor));return new Qt(i.parent.inlineContent?i:n,n)}replace(t,r=ut.empty){if(super.replace(t,r),r==ut.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof Qt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new hx(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Qt(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let i=t.resolve(r);return new this(i,n==r?i:t.resolve(n))}static between(t,r,n){let i=t.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=ir.findFrom(r,n,!0)||ir.findFrom(r,-n,!0);if(s)r=s.$head;else return ir.near(r,n)}return t.parent.inlineContent||(i==0?t=r:(t=(ir.findFrom(t,-n,!0)||ir.findFrom(t,n,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let a=t.child(o);if(a.isAtom){if(!s&&It.isSelectable(a))return It.create(e,r-(i<0?a.nodeSize:0))}else{let l=Xh(e,a,r+i,i<0?a.childCount:0,i,s);if(l)return l}r+=a.nodeSize*i}return null}function TO(e,t,r){let n=e.steps.length-1;if(n{o==null&&(o=u)}),e.setSelection(ir.near(e.doc.resolve(o),r))}const AO=1,lv=2,kO=4;class _$e extends T$e{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=lv,this}ensureMarks(t){return Br.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lv)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~lv,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Br.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let i=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(t,s)),this.selection.empty||this.setSelection(ir.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=kO,this}get scrolledIntoView(){return(this.updated&kO)>0}}function _O(e,t){return!t||!e?e:e.bind(t)}class qp{constructor(t,r,n){this.name=t,this.init=_O(r.init,n),this.apply=_O(r.apply,n)}}const $$e=[new qp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new qp("selection",{init(e,t){return e.selection||ir.atStart(t.doc)},apply(e){return e.selection}}),new qp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new qp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class zD{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=$$e.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new qp(n.key,n.spec.state,n))})}}class yd{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new zD(t.schema,t.plugins),s=new yd(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=wc.fromJSON(t.schema,r.doc);else if(o.name=="selection")s.selection=ir.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,a)){s[o.name]=c.fromJSON.call(l,t,r[a],s);return}}s[o.name]=o.init(t,s)}}),s}}function O9(e,t,r){for(let n in e){let i=e[n];i instanceof Function?i=i.bind(t):n=="handleDOMEvents"&&(i=O9(i,t,{})),r[n]=i}return r}class Mu{constructor(t){this.spec=t,this.props={},t.props&&O9(t.props,this,this.props),this.key=t.key?t.key.key:R9("plugin")}getState(t){return t[this.key]}}const jD=Object.create(null);function R9(e){return e in jD?e+"$"+ ++jD[e]:(jD[e]=0,e+"$")}class Kg{constructor(t="key"){this.key=R9(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const ji=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},mg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let $O=null;const Na=function(e,t,r){let n=$O||($O=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},Vc=function(e,t,r,n){return r&&(FO(e,t,r,n,-1)||FO(e,t,r,n,1))},F$e=/^(img|br|input|textarea|hr)$/i;function FO(e,t,r,n,i){for(;;){if(e==r&&t==n)return!0;if(t==(i<0?0:Yo(e))){let s=e.parentNode;if(!s||s.nodeType!=1||C$(e)||F$e.test(e.nodeName)||e.contentEditable=="false")return!1;t=ji(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Yo(e):0}else return!1}}function Yo(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function P$e(e,t,r){for(let n=t==0,i=t==Yo(e);n||i;){if(e==r)return!0;let s=ji(e);if(e=e.parentNode,!e)return!1;n=n&&s==0,i=i&&s==Yo(e)}}function C$(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const dx=function(e){return e.focusNode&&Vc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tc(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function I$e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function N$e(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:n.offset}}catch{}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:n.startOffset}}}const ma=typeof navigator<"u"?navigator:null,PO=typeof document<"u"?document:null,Lu=ma&&ma.userAgent||"",jT=/Edge\/(\d+)/.exec(Lu),B9=/MSIE \d/.exec(Lu),HT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Lu),ps=!!(B9||HT||jT),iu=B9?document.documentMode:HT?+HT[1]:jT?+jT[1]:0,Ro=!ps&&/gecko\/(\d+)/i.test(Lu);Ro&&+(/Firefox\/(\d+)/.exec(Lu)||[0,0])[1];const UT=!ps&&/Chrome\/(\d+)/.exec(Lu),Ai=!!UT,M$e=UT?+UT[1]:0,Vi=!ps&&!!ma&&/Apple Computer/.test(ma.vendor),nf=Vi&&(/Mobile\/\w+/.test(Lu)||!!ma&&ma.maxTouchPoints>2),Us=nf||(ma?/Mac/.test(ma.platform):!1),L$e=ma?/Win/.test(ma.platform):!1,Ao=/Android \d/.test(Lu),Jg=!!PO&&"webkitFontSmoothing"in PO.documentElement.style,O$e=Jg?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function R$e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Fa(e,t){return typeof e=="number"?e:e[t]}function B$e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function IO(e,t,r){let n=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=r||e.dom;o;o=mg(o)){if(o.nodeType!=1)continue;let a=o,l=a==s.body,c=l?R$e(s):B$e(a),u=0,h=0;if(t.topc.bottom-Fa(n,"bottom")&&(h=t.bottom-t.top>c.bottom-c.top?t.top+Fa(i,"top")-c.top:t.bottom-c.bottom+Fa(i,"bottom")),t.leftc.right-Fa(n,"right")&&(u=t.right-c.right+Fa(i,"right")),u||h)if(l)s.defaultView.scrollBy(u,h);else{let d=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),u&&(a.scrollLeft+=u);let p=a.scrollLeft-d,g=a.scrollTop-f;t={left:t.left-p,top:t.top-g,right:t.right-p,bottom:t.bottom-g}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function z$e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,i;for(let s=(t.left+t.right)/2,o=r+1;o=r-20){n=a,i=l.top;break}}return{refDOM:n,refTop:i,stack:z9(e.dom)}}function z9(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=mg(n));return t}function j$e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;j9(r,n==0?0:n-t)}function j9(e,t){for(let r=0;r=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let g=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!l&&p.left<=t.left&&p.right>=t.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!r&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=h+1)}}return!r&&l&&(r=l,i=c,n=0),r&&r.nodeType==3?U$e(r,i):!r||n&&r.nodeType==1?{node:e,offset:s}:H9(r,i)}function U$e(e,t){let r=e.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function T$(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function W$e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,i,s)}function G$e(e,t,r,n){let i=-1;for(let s=t,o=!1;s!=e.dom;){let a=e.docView.nearestDesc(s,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent&&!o||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&!o&&(o=!0,l.left>n.left||l.top>n.top?i=a.posBefore:(l.right-1?i:e.docView.posFromDOM(t,r,-1)}function U9(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&i++}let c;Jg&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(a=G$e(e,n,i,t))}a==null&&(a=V$e(e,o,t));let l=e.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function NO(e){return e.top=0&&i==n.nodeValue.length?(l--,u=1):r<0?l--:c++,kp(Il(Na(n,l,c),u),u<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==Yo(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return HD(l.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==Yo(n))){let l=n.childNodes[i-1],c=l.nodeType==3?Na(l,Yo(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return kp(Il(c,1),!1)}if(s==null&&i=0)}function kp(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function HD(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function V9(e,t,r){let n=e.state,i=e.root.activeElement;n!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),i!=e.dom&&i&&i.focus()}}function J$e(e,t,r){let n=t.selection,i=r=="up"?n.$from:n.$to;return V9(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=W9(e,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Na(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(r=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const X$e=/[\u0590-\u08ac]/;function Y$e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,a=e.domSelection();return!X$e.test(n.parent.textContent)||!a.modify?r=="left"||r=="backward"?s:o:V9(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:h}=e.domSelectionRange(),d=a.caretBidiLevel;a.modify("move",r,"character");let f=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:p,focusOffset:g}=e.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==g;try{a.collapse(u,h),l&&(l!=u||c!=h)&&a.extend&&a.extend(l,c)}catch{}return d!=null&&(a.caretBidiLevel=d),y})}let MO=null,LO=null,OO=!1;function Z$e(e,t,r){return MO==t&&LO==r?OO:(MO=t,LO=r,OO=r=="up"||r=="down"?J$e(e,t,r):Y$e(e,t,r))}const Zs=0,RO=1,cc=2,ga=3;class Xg{constructor(t,r,n,i){this.parent=t,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=Zs,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rji(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return s}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||o instanceof q9){i=t-s;break}s=a}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof G9&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?ji(s.dom)+1:0}}else{let s,o=!0;for(;s=n=u&&r<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,r,u);t=o;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=ji(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(c>r||a==this.children.length-1)){r=c;for(let u=a+1;uf&&or){let f=a;a=l,l=f}let d=document.createRange();d.setEnd(l.node,l.offset),d.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(d)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,i=0;i=n:tn){let a=n+s.border,l=o-s.border;if(t>=a&&r<=l){this.dirty=t==n||r==o?cc:RO,t==a&&r==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ga:s.markDirty(t-a,r-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?cc:ga}n=o}this.dirty=cc}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?cc:RO;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(t){return this.dirty==Zs&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Q$e extends Xg{constructor(t,r,n,i){super(t,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Gc extends Xg{constructor(t,r,n,i){super(t,[],n,i),this.mark=r}static create(t,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=ea.renderSpec(document,r.type.spec.toDOM(r,n))),new Gc(t,r,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&ga||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=ga&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=Zs){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=GT(s,0,t,n));for(let a=0;a{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),u=c&&c.dom,h=c&&c.contentDOM;if(r.isText){if(!u)u=document.createTextNode(r.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:h}=ea.renderSpec(document,r.type.spec.toDOM(r)));!h&&!r.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),r.type.spec.draggable&&(u.draggable=!0));let d=u;return u=X9(u,n,r),c?l=new e2e(t,r,n,i,u,h||null,d,c,s,o+1):r.isText?new fx(t,r,n,i,u,d,s):new su(t,r,n,i,u,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>qe.empty)}return t}matchesNode(t,r,n){return this.dirty==Zs&&t.eq(this.node)&&VT(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,i=r,s=t.composing?this.localCompositionInfo(t,r):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new r2e(this,o&&o.node,t);s2e(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?l.syncToMarks(c.spec.marks,n,t):c.type.side>=0&&!h&&l.syncToMarks(u==this.node.childCount?Br.none:this.node.child(u).marks,n,t),l.placeWidget(c,t,i)},(c,u,h,d)=>{l.syncToMarks(c.marks,n,t);let f;l.findNodeMatch(c,u,h,d)||a&&t.state.selection.from>i&&t.state.selection.to-1&&l.updateNodeAt(c,u,h,f,t)||l.updateNextNode(c,u,h,t,d,i)||l.addNode(c,u,h,t,i),i+=c.nodeSize}),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==cc)&&(o&&this.protectLocalComposition(t,o),K9(this.contentDOM,this.children,t),nf&&o2e(this.dom))}localCompositionInfo(t,r){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof Qt)||nr+this.node.content.size)return null;let s=t.domSelectionRange(),o=a2e(s.focusNode,s.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let a=o.nodeValue,l=l2e(this.node.content,a,n-r,i-r);return l<0?null:{node:o,pos:l,text:a}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new Q$e(this,s,r,i);t.input.compositionNodes.push(o),this.children=GT(this.children,n,n+i.length,t,o)}update(t,r,n,i){return this.dirty==ga||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,i),!0)}updateInner(t,r,n,i){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Zs}updateOuterDeco(t){if(VT(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=J9(this.dom,this.nodeDOM,WT(this.outerDeco,this.node,r),WT(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function BO(e,t,r,n,i){X9(n,t,e);let s=new su(void 0,e,t,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class fx extends su{constructor(t,r,n,i,s,o,a){super(t,r,n,i,s,null,o,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,i){return this.dirty==ga||this.dirty!=Zs&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Zs||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Zs,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let i=this.node.cut(t,r),s=document.createTextNode(i.text);return new fx(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=ga)}get domAtom(){return!1}}class q9 extends Xg{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Zs&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class e2e extends su{constructor(t,r,n,i,s,o,a,l,c,u){super(t,r,n,i,s,o,a,c,u),this.spec=l}update(t,r,n,i){if(this.dirty==ga)return!1;if(this.spec.update){let s=this.spec.update(t,r,n);return s&&this.updateInner(t,r,n,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,i){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function K9(e,t,r){let n=e.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,t.length);for(;i-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Gc.create(this.top,t[s],r,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(t,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,r,n))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(n){let c=r.children[n-1];if(c instanceof Gc)r=c,n=c.children.length;else{a=c,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function i2e(e,t){return e.type.side-t.type.side}function s2e(e,t,r,n){let i=t.locals(e),s=0;if(i.length==0){for(let c=0;cs;)a.push(i[o++]);let p=s+d.nodeSize;if(d.isText){let y=p;o!y.inline):a.slice();n(d,g,t.forChild(s,d),f),s=p}}function o2e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function a2e(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=Yo(e)}else if(e.nodeType==1&&t=r){if(s>=n&&l.slice(n-t.length-a,n-a)==t)return n-t.length;let c=a=0&&c+t.length+a>=r)return a+c;if(r==n&&l.length>=n+t.length-a&&l.slice(n-a,n-a+t.length)==t)return n}}return-1}function GT(e,t,r,n,i){let s=[];for(let o=0,a=0;o=r||u<=t?s.push(l):(cr&&s.push(l.slice(r-c,l.size,n)))}return s}function A$(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let i=e.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let a=n.resolve(o),l,c;if(dx(r)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&It.isSelectable(u)&&i.parent&&!(u.isInline&&P$e(r.focusNode,r.focusOffset,i.dom))){let h=i.posBefore;c=new It(o==h?a:n.resolve(h))}}else{let u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null;l=n.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(r.anchorNode!=n||r.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Y9(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function c2e(e){let t=e.domSelection(),r=document.createRange(),n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?r.setEnd(n.parentNode,ji(n)+1):r.setEnd(n,0),r.collapse(!1),t.removeAllRanges(),t.addRange(r),!i&&!e.state.selection.visible&&ps&&iu<=11&&(n.disabled=!0,n.disabled=!1)}function Z9(e,t){if(t instanceof It){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(WO(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else WO(e)}function WO(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function k$(e,t,r,n){return e.someProp("createSelectionBetween",i=>i(e,t,r))||Qt.between(t,r,n)}function VO(e){return e.editable&&!e.hasFocus()?!1:Q9(e)}function Q9(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function h2e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return Vc(t.node,t.offset,r.anchorNode,r.anchorOffset)}function qT(e,t){let{$anchor:r,$head:n}=e.selection,i=t>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&ir.findFrom(s,t)}function Ol(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function GO(e,t,r){let n=e.state.selection;if(n instanceof Qt)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return Ol(e,new Qt(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=qT(e.state,t);return i&&i instanceof It?Ol(e,i):!1}else if(!(Us&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(a))&&!o.contentDOM?It.isSelectable(s)?Ol(e,new It(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):Jg?Ol(e,new Qt(e.state.doc.resolve(t<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof It&&n.node.isInline)return Ol(e,new Qt(t>0?n.$to:n.$from));{let i=qT(e.state,t);return i?Ol(e,i):!1}}}function hb(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Am(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Vh(e,t){return t<0?d2e(e):f2e(e)}function d2e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i,s,o=!1;for(Ro&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let a=r.childNodes[n-1];if(Am(a,-1))i=r,s=--n;else if(a.nodeType==3)r=a,n=r.nodeValue.length;else break}}else{if(eU(r))break;{let a=r.previousSibling;for(;a&&Am(a,-1);)i=r.parentNode,s=ji(a),a=a.previousSibling;if(a)r=a,n=hb(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?KT(e,r,n):i&&KT(e,i,s)}function f2e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i=hb(r),s,o;for(;;)if(n{e.state==i&&Wa(e)},50)}function qO(e,t){let r=e.state.doc.resolve(t);if(!(Ai||L$e)&&r.parent.inlineContent){let i=e.coordsAtPos(t);if(t>r.start()){let s=e.coordsAtPos(t-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function KO(e,t,r){let n=e.state.selection;if(n instanceof Qt&&!n.empty||r.indexOf("s")>-1||Us&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=qT(e.state,t);if(o&&o instanceof It)return Ol(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,a=n instanceof Mo?ir.near(o,t):ir.findFrom(o,t);return a?Ol(e,a):!1}return!1}function JO(e,t){if(!(e.state.selection instanceof Qt))return!0;let{$head:r,$anchor:n,empty:i}=e.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),e.dispatch(o),!0}return!1}function XO(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function g2e(e){if(!Vi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;XO(e,n,"true"),setTimeout(()=>XO(e,n,"false"),20)}return!1}function y2e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function v2e(e,t){let r=t.keyCode,n=y2e(t);if(r==8||Us&&r==72&&n=="c")return JO(e,-1)||Vh(e,-1);if(r==46&&!t.shiftKey||Us&&r==68&&n=="c")return JO(e,1)||Vh(e,1);if(r==13||r==27)return!0;if(r==37||Us&&r==66&&n=="c"){let i=r==37?qO(e,e.state.selection.from)=="ltr"?-1:1:-1;return GO(e,i,n)||Vh(e,i)}else if(r==39||Us&&r==70&&n=="c"){let i=r==39?qO(e,e.state.selection.from)=="ltr"?1:-1:1;return GO(e,i,n)||Vh(e,i)}else{if(r==38||Us&&r==80&&n=="c")return KO(e,-1,n)||Vh(e,-1);if(r==40||Us&&r==78&&n=="c")return g2e(e)||KO(e,1,n)||Vh(e,1);if(n==(Us?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function tU(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let r=[],{content:n,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=e.someProp("clipboardSerializer")||ea.fromSchema(e.state.schema),a=aU(),l=a.createElement("div");l.appendChild(o.serializeFragment(n,{document:a}));let c=l.firstChild,u,h=0;for(;c&&c.nodeType==1&&(u=oU[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),h++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(r)}`);let d=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` - -`);return{dom:l,text:d}}function rU(e,t,r,n,i){let s=i.parent.type.spec.code,o,a;if(!r&&!t)return null;let l=t&&(n||s||!r);if(l){if(e.someProp("transformPastedText",d=>{t=d(t,s||n,e)}),s)return t?new ut(qe.from(e.state.schema.text(t.replace(/\r\n?/g,` -`))),0,0):ut.empty;let h=e.someProp("clipboardTextParser",d=>d(t,i,n,e));if(h)a=h;else{let d=i.marks(),{schema:f}=e.state,p=ea.fromSchema(f);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=o.appendChild(document.createElement("p"));g&&y.appendChild(p.serializeNode(f.text(g,d)))})}}else e.someProp("transformPastedHTML",h=>{r=h(r,e)}),o=w2e(r),Jg&&S2e(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||ef.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!b2e.test(d.parentNode.nodeName)?{ignore:!0}:null}})),u)a=D2e(YO(a,+u[1],+u[2]),u[4]);else if(a=ut.maxOpen(x2e(a.content,i),!0),a.openStart||a.openEnd){let h=0,d=0;for(let f=a.content.firstChild;h{a=h(a,e)}),a}const b2e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function x2e(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),s,o=[];if(e.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&s.length&&iU(l,s,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=sU(o[o.length-1],s.length));let u=nU(a,l);o.push(u),i=i.matchType(u.type),s=l}}),o)return qe.from(o)}return e}function nU(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,qe.from(e));return e}function iU(e,t,r,n,i){if(i1&&(s=0),i=r&&(a=t<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(qe.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(a))}function YO(e,t,r){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=aU().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),i;if((i=n&&oU[n[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"").reverse().join("")),r.innerHTML=e,i)for(let s=0;s=0;a-=2){let l=r.nodes[n[a]];if(!l||l.hasRequiredAttrs())break;i=qe.from(l.create(n[a+1],i)),s++,o++}return new ut(i,s,o)}const Gi={},qi={},E2e={touchstart:!0,touchmove:!0};class C2e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function T2e(e){for(let t in Gi){let r=Gi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{k2e(e,n)&&!_$(e,n)&&(e.editable||!(n.type in qi))&&r(e,n)},E2e[t]?{passive:!0}:void 0)}Vi&&e.dom.addEventListener("input",()=>null),XT(e)}function Kl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function A2e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function XT(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>_$(e,n))})}function _$(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function k2e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function _2e(e,t){!_$(e,t)&&Gi[t.type]&&(e.editable||!(t.type in qi))&&Gi[t.type](e,t)}qi.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!uU(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ao&&Ai&&r.keyCode==13)))if(r.keyCode!=229&&e.domObserver.forceFlush(),nf&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",i=>i(e,tc(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||v2e(e,r)?r.preventDefault():Kl(e,"key")};qi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};qi.keypress=(e,t)=>{let r=t;if(uU(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||Us&&r.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof Qt)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,n.$from.pos,n.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),r.preventDefault()}};function px(e){return{left:e.clientX,top:e.clientY}}function $2e(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function $$(e,t,r,n,i){if(n==-1)return!1;let s=e.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,a=>o>s.depth?a(e,r,s.nodeAfter,s.before(o),i,!0):a(e,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function $d(e,t,r){e.focused||e.focus();let n=e.state.tr.setSelection(t);r=="pointer"&&n.setMeta("pointer",!0),e.dispatch(n)}function F2e(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&It.isSelectable(n)?($d(e,new It(r),"pointer"),!0):!1}function P2e(e,t){if(t==-1)return!1;let r=e.state.selection,n,i;r instanceof It&&(n=r.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(It.isSelectable(a)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?($d(e,It.create(e.state.doc,i),"pointer"),!0):!1}function I2e(e,t,r,n,i){return $$(e,"handleClickOn",t,r,n)||e.someProp("handleClick",s=>s(e,t,n))||(i?P2e(e,r):F2e(e,r))}function N2e(e,t,r,n){return $$(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",i=>i(e,t,n))}function M2e(e,t,r,n){return $$(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",i=>i(e,t,n))||L2e(e,r,n)}function L2e(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?($d(e,Qt.create(n,0,n.content.size),"pointer"),!0):!1;let i=n.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)$d(e,Qt.create(n,a+1,a+1+o.content.size),"pointer");else if(It.isSelectable(o))$d(e,It.create(n,a),"pointer");else continue;return!0}}function F$(e){return db(e)}const lU=Us?"metaKey":"ctrlKey";Gi.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=F$(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&$2e(r,e.input.lastClick)&&!r[lU]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s};let o=e.posAtCoords(px(r));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new O2e(e,o,r,!!n)):(s=="doubleClick"?N2e:M2e)(e,o.pos,o.inside,r)?r.preventDefault():Kl(e,"pointer"))};class O2e{constructor(t,r,n,i){this.view=t,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[lU],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=t.state.doc.nodeAt(r.inside),o=r.inside;else{let u=t.state.doc.resolve(r.pos);s=u.parent,o=u.depth?u.before():0}const a=i?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof It&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ro&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Kl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Wa(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(px(t))),this.updateAllowDefault(t),this.allowDefault||!r?Kl(this.view,"pointer"):I2e(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Vi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ai&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?($d(this.view,ir.near(this.view.state.doc.resolve(r.pos)),"pointer"),t.preventDefault()):Kl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Kl(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Gi.touchstart=e=>{e.input.lastTouch=Date.now(),F$(e),Kl(e,"pointer")};Gi.touchmove=e=>{e.input.lastTouch=Date.now(),Kl(e,"pointer")};Gi.contextmenu=e=>F$(e);function uU(e,t){return e.composing?!0:Vi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const R2e=Ao?5e3:-1;qi.compositionstart=qi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),db(e,!0),e.markCursor=null;else if(db(e),Ro&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){e.domSelection().collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}cU(e,R2e)};qi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,cU(e,20))};function cU(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>db(e),t))}function hU(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=B2e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function B2e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function db(e,t=!1){if(!(Ao&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),hU(e),t||e.docView&&e.docView.dirty){let r=A$(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):e.updateState(e.state),!0}return!1}}function z2e(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const gg=ps&&iu<15||nf&&O$e<604;Gi.copy=qi.cut=(e,t)=>{let r=t,n=e.state.selection,i=r.type=="cut";if(n.empty)return;let s=gg?null:r.clipboardData,o=n.content(),{dom:a,text:l}=tU(e,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):z2e(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function j2e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function H2e(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?yg(e,n.value,null,i,t):yg(e,n.textContent,n.innerHTML,i,t)},50)}function yg(e,t,r,n,i){let s=rU(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,s||ut.empty)))return!0;if(!s)return!1;let o=j2e(s),a=o?e.state.tr.replaceSelectionWith(o,n):e.state.tr.replaceSelection(s);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function dU(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}qi.paste=(e,t)=>{let r=t;if(e.composing&&!Ao)return;let n=gg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&yg(e,dU(n),n.getData("text/html"),i,r)?r.preventDefault():H2e(e,r)};class fU{constructor(t,r,n){this.slice=t,this.move=r,this.node=n}}const pU=Us?"altKey":"ctrlKey";Gi.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(px(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof It?i.to-1:i.to))){if(n&&n.mightDrag)o=It.create(e.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let u=e.docView.nearestDesc(r.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&(o=It.create(e.state.doc,u.posBefore))}}let a=(o||e.state.selection).content(),{dom:l,text:c}=tU(e,a);r.dataTransfer.clearData(),r.dataTransfer.setData(gg?"Text":"text/html",l.innerHTML),r.dataTransfer.effectAllowed="copyMove",gg||r.dataTransfer.setData("text/plain",c),e.dragging=new fU(a,!r[pU],o)};Gi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};qi.dragover=qi.dragenter=(e,t)=>t.preventDefault();qi.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let i=e.posAtCoords(px(r));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e)}):o=rU(e,dU(r.dataTransfer),gg?null:r.dataTransfer.getData("text/html"),!1,s);let a=!!(n&&!r[pU]);if(e.someProp("handleDrop",p=>p(e,r,o||ut.empty,a))){r.preventDefault();return}if(!o)return;r.preventDefault();let l=o?b$e(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let c=e.state.tr;if(a){let{node:p}=n;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=c.doc;if(h?c.replaceRangeWith(u,u,o.content.firstChild):c.replaceRange(u,u,o),c.doc.eq(d))return;let f=c.doc.resolve(u);if(h&&It.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new It(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((g,y,b,v)=>p=v),c.setSelection(k$(e,f,c.doc.resolve(p)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Gi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Wa(e)},20))};Gi.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Gi.beforeinput=(e,t)=>{if(Ai&&Ao&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,tc(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in qi)Gi[e]=qi[e];function vg(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class fb{constructor(t,r){this.toDOM=t,this.spec=r||Sc,this.side=this.spec.side||0}map(t,r,n,i){let{pos:s,deleted:o}=t.mapResult(r.from+i,this.side<0?-1:1);return o?null:new Fo(s-n,s-n,this)}valid(){return!0}eq(t){return this==t||t instanceof fb&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&vg(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class ou{constructor(t,r){this.attrs=t,this.spec=r||Sc}map(t,r,n,i){let s=t.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=t.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new Fo(s,o,this)}valid(t,r){return r.from=t&&(!s||s(a.spec))&&n.push(a.copy(a.from+i,a.to+i))}for(let o=0;ot){let a=this.children[o]+1;this.children[o+2].findInner(t-a,r-a,n,i+a,s)}}map(t,r,n){return this==Di||t.maps.length==0?this:this.mapInner(t,r,0,0,n||Sc)}mapInner(t,r,n,i,s){let o;for(let a=0;a{let c=l+n,u;if(u=gU(r,a,c)){for(i||(i=this.children.slice());sa&&h.to=t){this.children[a]==t&&(n=this.children[a+2]);break}let s=t+1,o=s+r.content.size;for(let a=0;as&&l.type instanceof ou){let c=Math.max(s,l.from)-s,u=Math.min(o,l.to)-s;ci.map(t,r,Sc));return jl.from(n)}forChild(t,r){if(r.isLeaf)return Gn.empty;let n=[];for(let i=0;ir instanceof Gn)?t:t.reduce((r,n)=>r.concat(n instanceof Gn?n:n.members),[]))}}}function U2e(e,t,r,n,i,s,o){let a=e.slice();for(let c=0,u=s;c{let y=g-p-(f-d);for(let b=0;bv+u-h)continue;let E=a[b]+u-h;f>=E?a[b+1]=d<=E?-2:-1:d>=u&&y&&(a[b]+=y,a[b+1]+=y)}h+=y}),u=r.maps[c].map(u,-1)}let l=!1;for(let c=0;c=n.content.size){l=!0;continue}let d=r.map(e[c+1]+s,-1),f=d-i,{index:p,offset:g}=n.content.findIndex(h),y=n.maybeChild(p);if(y&&g==h&&g+y.nodeSize==f){let b=a[c+2].mapInner(r,y,u+1,e[c]+s+1,o);b!=Di?(a[c]=h,a[c+1]=f,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=W2e(a,e,t,r,i,s,o),u=pb(c,n,0,o);t=u.local;for(let h=0;hr&&o.to{let c=gU(e,a,l+r);if(c){s=!0;let u=pb(c,a,r+l+1,n);u!=Di&&i.push(l,l+a.nodeSize,u)}});let o=mU(s?yU(e):e,-r).sort(Dc);for(let a=0;a0;)t++;e.splice(t,0,r)}function WD(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=Di&&t.push(n)}),e.cursorWrapper&&t.push(Gn.create(e.state.doc,[e.cursorWrapper.deco])),jl.from(t)}const V2e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},G2e=ps&&iu<=11;class q2e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class K2e{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new q2e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),G2e&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,V2e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(VO(this.view)){if(this.suppressingSelectionUpdates)return Wa(this.view);if(ps&&iu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Vc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let r=new Set,n;for(let s=t.focusNode;s;s=mg(s))r.add(s);for(let s=t.anchorNode;s;s=mg(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&VO(t)&&!this.ignoreSelectionChange(n),s=-1,o=-1,a=!1,l=[];if(t.editable)for(let u=0;u1){let u=l.filter(h=>h.nodeName=="BR");if(u.length==2){let h=u[0],d=u[1];h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}}let c=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||i)&&(s>-1&&(t.docView.markDirty(s,o),J2e(t)),this.handleDOMChange(s,o,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Wa(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;ui;y--){let b=n.childNodes[y-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){s=y;break}if(!v||v.size)break}let h=e.state.doc,d=e.someProp("domParser")||ef.fromSchema(e.state.schema),f=h.resolve(o),p=null,g=d.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Z2e,context:f});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),p={anchor:y+o,head:b+o}}return{doc:g,sel:p,from:o,to:a}}function Z2e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Vi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Vi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Q2e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function eFe(e,t,r,n,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let $=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,I=A$(e,$);if(I&&!e.state.selection.eq(I)){if(Ai&&Ao&&e.input.lastKeyCode===13&&Date.now()-100L(e,tc(13,"Enter"))))return;let N=e.state.tr.setSelection(I);$=="pointer"?N.setMeta("pointer",!0):$=="key"&&N.scrollIntoView(),s&&N.setMeta("composition",s),e.dispatch(N)}return}let o=e.state.doc.resolve(t),a=o.sharedDepth(r);t=o.before(a+1),r=e.state.doc.resolve(r).after(a+1);let l=e.state.selection,c=Y2e(e,t,r),u=e.state.doc,h=u.slice(c.from,c.to),d,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ao)&&i.some($=>$.nodeType==1&&!Q2e.test($.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",$=>$(e,tc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(n&&l instanceof Qt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let $=rR(e,e.state.doc,c.sel);if($&&!$.eq(e.state.selection)){let I=e.state.tr.setSelection($);s&&I.setMeta("composition",s),e.dispatch(I)}}return}if(Ai&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let $=p.endB-p.start;c.sel={anchor:c.sel.anchor+$,head:c.sel.anchor+$}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),ps&&iu<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),b=u.resolve(p.start),v=g.sameParent(y)&&g.parent.inlineContent&&b.end()>=p.endA,E;if((nf&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!v&&g.pos$(e,tc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&rFe(u,p.start,p.endA,g,y)&&e.someProp("handleKeyDown",$=>$(e,tc(8,"Backspace")))){Ao&&Ai&&e.domObserver.suppressSelectionUpdates();return}Ai&&Ao&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),Ao&&!v&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function($){return $(e,tc(13,"Enter"))})},20));let D=p.start,C=p.endA,w,T,A;if(v){if(g.pos==y.pos)ps&&iu<=11&&g.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Wa(e),20)),w=e.state.tr.delete(D,C),T=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(A=tFe(g.parent.content.cut(g.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))w=e.state.tr,A.type=="add"?w.addMark(D,C,A.mark):w.removeMark(D,C,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let $=g.parent.textBetween(g.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",I=>I(e,D,C,$)))return;w=e.state.tr.insertText($,D,C)}}if(w||(w=e.state.tr.replace(D,C,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let $=rR(e,w.doc,c.sel);$&&!(Ai&&Ao&&e.composing&&$.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:k$(e,t.resolve(r.anchor),t.resolve(r.head))}function tFe(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,i=r,s=n,o,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ur||VD(o,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,i++,t=!1;if(r){let s=e.node(n).maybeChild(e.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function nFe(e,t,r,n,i){let s=e.findDiffStart(t,r);if(s==null)return null;let{a:o,b:a}=e.findDiffEnd(t,r+e.size,r+t.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));n-=o+l-s}if(o=o?s-n:0;s-=l,s&&s=a?s-n:0;s-=l,s&&s=56320&&t<=57343&&r>=55296&&r<=56319}class iFe{constructor(t,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new C2e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(lR),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=oR(this),sR(this),this.nodeViews=aR(this),this.docView=BO(this.state.doc,iR(this),WD(this),this.dom,this),this.domObserver=new K2e(this,(n,i,s,o)=>eFe(this,n,i,s,o)),this.domObserver.start(),T2e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&XT(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(lR),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){var n;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(hU(this),o=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=r.plugins;if(a||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=aR(this);oFe(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(a||r.handleDOMEvents!=this._props.handleDOMEvents)&&XT(this),this.editable=oR(this),sR(this);let l=WD(this),c=iR(this),u=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(t.doc,c,l);(h||!t.selection.eq(i.selection))&&(o=!0);let d=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&z$e(this);if(o){this.domObserver.stop();let f=h&&(ps||Ai)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&sFe(i.selection,t.selection);if(h){let p=Ai?this.trackWrites=this.domSelectionRange().focusNode:null;(s||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=BO(t.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&h2e(this))?Wa(this,f):(Z9(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&j$e(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof It){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&IO(this,r.getBoundingClientRect(),t)}else IO(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new fU(t.slice,t.move,i<0?void 0:It.create(this.state.doc,i))}someProp(t,r){let n=this._props&&this._props[t],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return q$e(this,t)}coordsAtPos(t,r=1){return W9(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let i=this.docView.posFromDOM(t,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,r){return Z$e(this,r||this.state,t)}pasteHTML(t,r){return yg(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return yg(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(A2e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],WD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return _2e(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Vi&&this.root.nodeType===11&&I$e(this.dom.ownerDocument)==this.dom?X2e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function iR(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[Fo.node(0,e.state.doc.content.size,t)]}function sR(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Fo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function oR(e){return!e.someProp("editable",t=>t(e.state)===!1)}function sFe(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function aR(e){let t=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n[i])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function oFe(e,t){let r=0,n=0;for(let i in e){if(e[i]!=t[i])return!0;r++}for(let i in t)n++;return r!=n}function lR(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var bu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},mb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},aFe=typeof navigator<"u"&&/Mac/.test(navigator.platform),lFe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ui=0;ui<10;ui++)bu[48+ui]=bu[96+ui]=String(ui);for(var ui=1;ui<=24;ui++)bu[ui+111]="F"+ui;for(var ui=65;ui<=90;ui++)bu[ui]=String.fromCharCode(ui+32),mb[ui]=String.fromCharCode(ui);for(var GD in bu)mb.hasOwnProperty(GD)||(mb[GD]=bu[GD]);function uFe(e){var t=aFe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||lFe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?mb:bu)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const cFe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function hFe(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let a=0;a127)&&(s=bu[n.keyCode])&&s!=i){let a=t[qD(s,n)];if(a&&a(r.state,r.dispatch,r))return!0}}return!1}}const mFe=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function vU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const gFe=(e,t,r)=>{let n=vU(e,r);if(!n)return!1;let i=N$(n);if(!i){let o=n.blockRange(),a=o&&zf(o);return a==null?!1:(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(!s.type.spec.isolating&&SU(e,i,t))return!0;if(n.parent.content.size==0&&(sf(s,"end")||It.isSelectable(s))){let o=cx(e.doc,n.before(),n.after(),ut.empty);if(o&&o.slice.size{let n=vU(e,r);if(!n)return!1;let i=N$(n);return i?bU(e,i,t):!1},vFe=(e,t,r)=>{let n=xU(e,r);if(!n)return!1;let i=M$(n);return i?bU(e,i,t):!1};function bU(e,t,r){let n=t.nodeBefore,i=n,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=t.nodeAfter,a=o,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=cx(e.doc,s,l,ut.empty);if(!c||c.from!=s||c instanceof qn&&c.slice.size>=l-s)return!1;if(r){let u=e.tr.step(c);u.setSelection(Qt.create(u.doc,s)),r(u.scrollIntoView())}return!0}function sf(e,t,r=!1){for(let n=e;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const bFe=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=N$(n)}let o=s&&s.nodeBefore;return!o||!It.isSelectable(o)?!1:(t&&t(e.tr.setSelection(It.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function N$(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function xU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=xU(e,r);if(!n)return!1;let i=M$(n);if(!i)return!1;let s=i.nodeAfter;if(SU(e,i,t))return!0;if(n.parent.content.size==0&&(sf(s,"start")||It.isSelectable(s))){let o=cx(e.doc,n.before(),n.after(),ut.empty);if(o&&o.slice.size{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let r=e.selection,n=r instanceof It,i;if(n){if(r.node.isTextblock||!ph(e.doc,r.from))return!1;i=r.from}else if(i=ux(e.doc,r.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);n&&s.setSelection(It.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},DFe=(e,t)=>{let r=e.selection,n;if(r instanceof It){if(r.node.isTextblock||!ph(e.doc,r.to))return!1;n=r.to}else if(n=ux(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},EFe=(e,t)=>{let{$from:r,$to:n}=e.selection,i=r.blockRange(n),s=i&&zf(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},CFe=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` -`).scrollIntoView()),!0)};function wU(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=wU(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let a=r.after(),l=e.tr.replaceWith(a,a,o.createAndFill());l.setSelection(ir.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},AFe=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof Mo||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=wU(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(kd(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&zf(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)},_Fe=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),t&&t(e.tr.setSelection(It.create(e.doc,i))),!0)};function $Fe(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s=t.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&t.parent.canReplace(s-1,s)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||ph(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function SU(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s,o;if(n.type.spec.isolating||i.type.spec.isolating)return!1;if($Fe(e,t,r))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(s=(o=n.contentMatchAt(n.childCount)).findWrapping(i.type))&&o.matchType(s[0]||i.type).validEnd){if(r){let h=t.pos+i.nodeSize,d=qe.empty;for(let g=s.length-1;g>=0;g--)d=qe.from(s[g].create(null,d));d=qe.from(n.copy(d));let f=e.tr.step(new Xn(t.pos-1,h,t.pos,h,new ut(d,1,0),s.length,!0)),p=h+2*s.length;ph(f.doc,p)&&f.join(p),r(f.scrollIntoView())}return!0}let l=ir.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&zf(c);if(u!=null&&u>=t.depth)return r&&r(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&sf(i,"start",!0)&&sf(n,"end")){let h=n,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let f=i,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(h.canReplace(h.childCount,h.childCount,f.content)){if(r){let g=qe.empty;for(let b=d.length-1;b>=0;b--)g=qe.from(d[b].copy(g));let y=e.tr.step(new Xn(t.pos-d.length,t.pos+i.nodeSize,t.pos+p,t.pos+i.nodeSize-p,new ut(g,d.length,0),0,!0));r(y.scrollIntoView())}return!0}}return!1}function DU(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(t.tr.setSelection(Qt.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const FFe=DU(-1),PFe=DU(1);function IFe(e,t=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),a=o&&F9(o,e,t);return a?(n&&n(r.tr.wrap(o,a).scrollIntoView()),!0):!1}}function uR(e,t=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let u=r.doc.resolve(c),h=u.index();i=u.parent.canReplaceWith(h,h+1,e)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&i.node(o.depth-1).type.compatibleContent(e)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let u=r.doc.resolve(o.start-2);l=new ab(u,u,o.depth),o.endIndex=0;u--)s=qe.from(r[u].type.create(r[u].attrs,s));e.step(new Xn(t.start-(n?2:0),t.end,t.start,t.end,new ut(s,0,0),r.length,!0));let o=0;for(let u=0;uo.childCount>0&&o.firstChild.type==e);return s?r?n.node(s.depth-1).type==e?OFe(t,r,e,s):RFe(t,r,s):!0:!1}}function OFe(e,t,r,n){let i=e.tr,s=n.end,o=n.$to.end(n.depth);sg;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let a=r.startIndex==0,l=r.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(a?0:1),u+1,o.content.append(l?qe.empty:qe.from(i))))return!1;let h=s.pos,d=h+o.nodeSize;return n.step(new Xn(h-(a?1:0),d+(l?1:0),h+1,d-1,new ut((a?qe.empty:qe.from(i.copy(qe.empty))).append(l?qe.empty:qe.from(i.copy(qe.empty))),a?0:1,l?0:1),a?0:1)),t(n.scrollIntoView()),!0}function BFe(e){return function(t,r){let{$from:n,$to:i}=t.selection,s=n.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=e)return!1;if(r){let c=l.lastChild&&l.lastChild.type==a.type,u=qe.from(c?e.create():null),h=new ut(qe.from(e.create(null,qe.from(a.type.create(null,u)))),c?3:1,0),d=s.start,f=s.end;r(t.tr.step(new Xn(d-(c?3:1),f,d,f,h,1,!0)).scrollIntoView())}return!0}}function mx(e){const{state:t,transaction:r}=e;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class gx{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const h=l(...u)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a=[],l=!!t,c=t||s.tr,u=()=>(!l&&r&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),a.every(d=>d===!0)),h={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...g)=>{const y=this.buildProps(c,r),b=f(...g)(y);return a.push(b),h}])),run:u};return h}createCan(t){const{rawCommands:r,state:n}=this,i=!1,s=t||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,a={tr:t,editor:i,view:o,state:mx({state:s,transaction:t}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(t,r),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class zFe{constructor(){this.callbacks={}}on(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),this}emit(t,...r){const n=this.callbacks[t];return n&&n.forEach(i=>i.apply(this,r)),this}off(t,r){const n=this.callbacks[t];return n&&(r?this.callbacks[t]=n.filter(i=>i!==r):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function bt(e,t,r){return e.config[t]===void 0&&e.parent?bt(e.parent,t,r):typeof e.config[t]=="function"?e.config[t].bind({...r,parent:e.parent?bt(e.parent,t,r):null}):e.config[t]}function yx(e){const t=e.filter(i=>i.type==="extension"),r=e.filter(i=>i.type==="node"),n=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:r,markExtensions:n}}function EU(e){const t=[],{nodeExtensions:r,markExtensions:n}=yx(e),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=bt(o,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(h=>{Object.entries(u.attributes).forEach(([d,f])=>{t.push({type:h,name:d,attribute:{...s,...f}})})})})}),i.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=bt(o,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,t.push({type:o.name,name:u,attribute:d})})}),t}function Yn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function mh(...e){return e.filter(t=>!!t).reduce((t,r)=>{const n={...t};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const a=s?s.split(" "):[],l=n[i]?n[i].split(" "):[],c=a.filter(u=>!l.includes(u));n[i]=[...l,...c].join(" ")}else i==="style"?n[i]=[n[i],s].join("; "):n[i]=s}),n},{})}function YT(e,t){return t.filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(e.attrs)||{}:{[r.name]:e.attrs[r.name]}).reduce((r,n)=>mh(r,n),{})}function CU(e){return typeof e=="function"}function nr(e,t=void 0,...r){return CU(e)?t?e.bind(t)(...r):e(...r):e}function jFe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function HFe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function cR(e,t){return e.style?e:{...e,getAttrs:r=>{const n=e.getAttrs?e.getAttrs(r):e.attrs;if(n===!1)return!1;const i=t.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(r):HFe(r.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...n,...i}}}}function hR(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>t==="attrs"&&jFe(r)?!1:r!=null))}function UFe(e,t){var r;const n=EU(e),{nodeExtensions:i,markExtensions:s}=yx(e),o=(r=i.find(c=>bt(c,"topNode")))===null||r===void 0?void 0:r.name,a=Object.fromEntries(i.map(c=>{const u=n.filter(b=>b.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:t},d=e.reduce((b,v)=>{const E=bt(v,"extendNodeSchema",h);return{...b,...E?E(c):{}}},{}),f=hR({...d,content:nr(bt(c,"content",h)),marks:nr(bt(c,"marks",h)),group:nr(bt(c,"group",h)),inline:nr(bt(c,"inline",h)),atom:nr(bt(c,"atom",h)),selectable:nr(bt(c,"selectable",h)),draggable:nr(bt(c,"draggable",h)),code:nr(bt(c,"code",h)),defining:nr(bt(c,"defining",h)),isolating:nr(bt(c,"isolating",h)),attrs:Object.fromEntries(u.map(b=>{var v;return[b.name,{default:(v=b==null?void 0:b.attribute)===null||v===void 0?void 0:v.default}]}))}),p=nr(bt(c,"parseHTML",h));p&&(f.parseDOM=p.map(b=>cR(b,u)));const g=bt(c,"renderHTML",h);g&&(f.toDOM=b=>g({node:b,HTMLAttributes:YT(b,u)}));const y=bt(c,"renderText",h);return y&&(f.toText=y),[c.name,f]})),l=Object.fromEntries(s.map(c=>{const u=n.filter(y=>y.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:t},d=e.reduce((y,b)=>{const v=bt(b,"extendMarkSchema",h);return{...y,...v?v(c):{}}},{}),f=hR({...d,inclusive:nr(bt(c,"inclusive",h)),excludes:nr(bt(c,"excludes",h)),group:nr(bt(c,"group",h)),spanning:nr(bt(c,"spanning",h)),code:nr(bt(c,"code",h)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),p=nr(bt(c,"parseHTML",h));p&&(f.parseDOM=p.map(y=>cR(y,u)));const g=bt(c,"renderHTML",h);return g&&(f.toDOM=y=>g({mark:y,HTMLAttributes:YT(y,u)})),[c.name,f]}));return new X_e({topNode:o,nodes:a,marks:l})}function KD(e,t){return t.nodes[e]||t.marks[e]||null}function dR(e,t){return Array.isArray(t)?t.some(r=>(typeof r=="string"?r:r.name)===e.name):t}const WFe=(e,t=500)=>{let r="";const n=e.parentOffset;return e.parent.nodesBetween(Math.max(0,n-t),n,(i,s,o,a)=>{var l,c;const u=((c=(l=i.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";r+=u.slice(0,Math.max(0,n-s))}),r};function L$(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class VFe{constructor(t){this.find=t.find,this.handler=t.handler}}const GFe=(e,t)=>{if(L$(t))return t.exec(e);const r=t(e);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=e,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function uv(e){var t;const{editor:r,from:n,to:i,text:s,rules:o,plugin:a}=e,{view:l}=r;if(l.composing)return!1;const c=l.state.doc.resolve(n);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(d=>d.type.spec.code))return!1;let u=!1;const h=WFe(c)+s;return o.forEach(d=>{if(u)return;const f=GFe(h,d.find);if(!f)return;const p=l.state.tr,g=mx({state:l.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:b,chain:v,can:E}=new gx({editor:r,state:g});d.handler({state:g,range:y,match:f,commands:b,chain:v,can:E})===null||!p.steps.length||(p.setMeta(a,{transform:p,from:n,to:i,text:s}),l.dispatch(p),u=!0)}),u}function qFe(e){const{editor:t,rules:r}=e,n=new Mu({state:{init(){return null},apply(i,s){const o=i.getMeta(n);if(o)return o;const a=i.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:c,text:u}=a,h=c+u.length;uv({editor:t,from:c,to:h,text:u,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return uv({editor:t,from:s,to:o,text:a,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&uv({editor:t,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?uv({editor:t,from:o.pos,to:o.pos,text:` -`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function KFe(e){return typeof e=="number"}class JFe{constructor(t){this.find=t.find,this.handler=t.handler}}const XFe=(e,t,r)=>{if(L$(t))return[...e.matchAll(t)];const n=t(e,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function YFe(e){const{editor:t,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:a}=e,{commands:l,chain:c,can:u}=new gx({editor:t,state:r}),h=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const g=Math.max(n,p),y=Math.min(i,p+f.content.size),b=f.textBetween(g-p,y-p,void 0,"");XFe(b,s.find,o).forEach(E=>{if(E.index===void 0)return;const D=g+E.index+1,C=D+E[0].length,w={from:r.tr.mapping.map(D),to:r.tr.mapping.map(C)},T=s.handler({state:r,range:w,match:E,commands:l,chain:c,can:u,pasteEvent:o,dropEvent:a});h.push(T)})}),h.every(f=>f!==null)}const ZFe=e=>{var t;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)===null||t===void 0||t.setData("text/html",e),r};function QFe(e){const{editor:t,rules:r}=e;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:u,from:h,to:d,rule:f,pasteEvt:p})=>{const g=u.tr,y=mx({state:u,transaction:g});if(!(!YFe({editor:t,state:y,from:Math.max(h-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:a})||!g.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g};return r.map(u=>new Mu({view(h){const d=f=>{var p;n=!((p=h.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?h.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(h,d)=>(s=n===h.dom.parentElement,a=d,!1),paste:(h,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(h,d,f)=>{const p=h[0],g=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),v=!!b;if(!g&&!y&&!v)return;if(v){const{from:C,text:w}=b,T=C+w.length,A=ZFe(w);return l({rule:u,state:f,from:C,to:{b:T},pasteEvt:A})}const E=d.doc.content.findDiffStart(f.doc.content),D=d.doc.content.findDiffEnd(f.doc.content);if(!(!KFe(E)||!D||E===D.b))return l({rule:u,state:f,from:E,to:D,pasteEvt:o})}}))}function ePe(e){const t=e.filter((r,n)=>e.indexOf(r)!==n);return[...new Set(t)]}class vd{constructor(t,r){this.splittableMarks=[],this.editor=r,this.extensions=vd.resolve(t),this.schema=UFe(this.extensions,r),this.setupExtensions()}static resolve(t){const r=vd.sort(vd.flatten(t)),n=ePe(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(t){return t.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=bt(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(t){return t.sort((n,i)=>{const s=bt(n,"priority")||100,o=bt(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:KD(r.name,this.schema)},i=bt(r,"addCommands",n);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,r=vd.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:t,type:KD(o.name,this.schema)},l=[],c=bt(o,"addKeyboardShortcuts",a);let u={};if(o.type==="mark"&&o.config.exitable&&(u.ArrowRight=()=>el.handleExit({editor:t,mark:o})),c){const g=Object.fromEntries(Object.entries(c()).map(([y,b])=>[y,()=>b({editor:t})]));u={...u,...g}}const h=fFe(u);l.push(h);const d=bt(o,"addInputRules",a);dR(o,t.options.enableInputRules)&&d&&n.push(...d());const f=bt(o,"addPasteRules",a);dR(o,t.options.enablePasteRules)&&f&&i.push(...f());const p=bt(o,"addProseMirrorPlugins",a);if(p){const g=p();l.push(...g)}return l}).flat();return[qFe({editor:t,rules:n}),...QFe({editor:t,rules:i}),...s]}get attributes(){return EU(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:r}=yx(this.extensions);return Object.fromEntries(r.filter(n=>!!bt(n,"addNodeView")).map(n=>{const i=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t,type:Yn(n.name,this.schema)},o=bt(n,"addNodeView",s);if(!o)return[];const a=(l,c,u,h)=>{const d=YT(l,i);return o()({editor:t,node:l,getPos:u,decorations:h,HTMLAttributes:d,extension:n})};return[n.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var r;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:KD(t.name,this.schema)};t.type==="mark"&&(!((r=nr(bt(t,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(t.name);const i=bt(t,"onBeforeCreate",n),s=bt(t,"onCreate",n),o=bt(t,"onUpdate",n),a=bt(t,"onSelectionUpdate",n),l=bt(t,"onTransaction",n),c=bt(t,"onFocus",n),u=bt(t,"onBlur",n),h=bt(t,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),h&&this.editor.on("destroy",h)})}}function tPe(e){return Object.prototype.toString.call(e).slice(8,-1)}function JD(e){return tPe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function vx(e,t){const r={...e};return JD(e)&&JD(t)&&Object.keys(t).forEach(n=>{JD(t[n])?n in e?r[n]=vx(e[n],t[n]):Object.assign(r,{[n]:t[n]}):Object.assign(r,{[n]:t[n]})}),r}class Qa{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Qa(t)}configure(t={}){const r=this.extend();return r.parent=this.parent,r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new Qa({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}}function TU(e,t,r){const{from:n,to:i}=t,{blockSeparator:s=` - -`,textSerializers:o={}}=r||{};let a="";return e.nodesBetween(n,i,(l,c,u,h)=>{var d;l.isBlock&&c>n&&(a+=s);const f=o==null?void 0:o[l.type.name];if(f)return u&&(a+=f({node:l,pos:c,parent:u,index:h,range:t})),!1;l.isText&&(a+=(d=l==null?void 0:l.text)===null||d===void 0?void 0:d.slice(Math.max(n,c)-c,i-c))}),a}function AU(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}const rPe=Qa.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Mu({key:new Kg("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:r}=e,{doc:n,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(u=>u.$from.pos)),a=Math.max(...s.map(u=>u.$to.pos)),l=AU(r);return TU(n,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),nPe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;e.isDestroyed||(t.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),iPe=(e=!1)=>({commands:t})=>t.setContent("",e),sPe=()=>({state:e,tr:t,dispatch:r})=>{const{selection:n}=t,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,h=c.resolve(u.map(l)),d=c.resolve(u.map(l+a.nodeSize)),f=h.blockRange(d);if(!f)return;const p=zf(f);if(a.type.isTextblock){const{defaultType:g}=h.parent.contentMatchAt(h.index());t.setNodeMarkup(f.start,g)}(p||p===0)&&t.lift(f,p)})}),!0},oPe=e=>t=>e(t),aPe=()=>({state:e,dispatch:t})=>AFe(e,t),lPe=(e,t)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(e.from,e.to);n.deleteRange(e.from,e.to);const o=n.mapping.map(t);return n.insert(o,s.content),n.setSelection(new Qt(n.doc.resolve(o-1))),!0},uPe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,n=r.$anchor.node();if(n.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(t){const a=i.before(s),l=i.after(s);e.delete(a,l).scrollIntoView()}return!0}return!1},cPe=e=>({tr:t,state:r,dispatch:n})=>{const i=Yn(e,r.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const l=s.before(o),c=s.after(o);t.delete(l,c).scrollIntoView()}return!0}return!1},hPe=e=>({tr:t,dispatch:r})=>{const{from:n,to:i}=e;return r&&t.delete(n,i),!0},dPe=()=>({state:e,dispatch:t})=>mFe(e,t),fPe=()=>({commands:e})=>e.keyboardShortcut("Enter"),pPe=()=>({state:e,dispatch:t})=>TFe(e,t);function gb(e,t,r={strict:!0}){const n=Object.keys(t);return n.length?n.every(i=>r.strict?t[i]===e[i]:L$(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function ZT(e,t,r={}){return e.find(n=>n.type===t&&gb(n.attrs,r))}function mPe(e,t,r={}){return!!ZT(e,t,r)}function O$(e,t,r={}){if(!e||!t)return;let n=e.parent.childAfter(e.parentOffset);if(e.parentOffset===n.offset&&n.offset!==0&&(n=e.parent.childBefore(e.parentOffset)),!n.node)return;const i=ZT([...n.node.marks],t,r);if(!i)return;let s=n.index,o=e.start()+n.offset,a=s+1,l=o+n.node.nodeSize;for(ZT([...n.node.marks],t,r);s>0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,o-=e.parent.child(s).nodeSize;for(;a({tr:r,state:n,dispatch:i})=>{const s=Ou(e,n.schema),{doc:o,selection:a}=r,{$from:l,from:c,to:u}=a;if(i){const h=O$(l,s,t);if(h&&h.from<=c&&h.to>=u){const d=Qt.create(o,h.from,h.to);r.setSelection(d)}}return!0},yPe=e=>t=>{const r=typeof e=="function"?e(t):e;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{R$()&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),t!=null&&t.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!kU(r.state.selection))return o(),!0;const a=_U(i.doc,e)||r.state.selection,l=r.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},bPe=(e,t)=>r=>e.every((n,i)=>t(n,{...r,index:i})),xPe=(e,t)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),$U=e=>{const t=e.childNodes;for(let r=t.length-1;r>=0;r-=1){const n=t[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?e.removeChild(n):n.nodeType===1&&$U(n)}return e};function fR(e){const t=`${e}`,r=new window.DOMParser().parseFromString(t,"text/html").body;return $U(r)}function yb(e,t,r){r={slice:!0,parseOptions:{},...r};const n=typeof e=="object"&&e!==null,i=typeof e=="string";if(n)try{return Array.isArray(e)&&e.length>0?qe.fromArray(e.map(o=>t.nodeFromJSON(o))):t.nodeFromJSON(e)}catch(s){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),yb("",t,r)}if(i){const s=ef.fromSchema(t);return r.slice?s.parseSlice(fR(e),r.parseOptions).content:s.parse(fR(e),r.parseOptions)}return yb("",t,r)}function wPe(e,t,r){const n=e.steps.length-1;if(n{o===0&&(o=u)}),e.setSelection(ir.near(e.doc.resolve(o),r))}const SPe=e=>e.toString().startsWith("<"),DPe=(e,t,r)=>({tr:n,dispatch:i,editor:s})=>{if(i){r={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};const o=yb(t,s.schema,{parseOptions:{preserveWhitespace:"full",...r.parseOptions}});if(o.toString()==="<>")return!0;let{from:a,to:l}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,u=!0;if((SPe(o)?o:[o]).forEach(f=>{f.check(),c=c?f.isText&&f.marks.length===0:!1,u=u?f.isBlock:!1}),a===l&&u){const{parent:f}=n.doc.resolve(a);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(a-=1,l+=1)}let d;c?(Array.isArray(t)?d=t.map(f=>f.text||"").join(""):typeof t=="object"&&t&&t.text?d=t.text:d=t,n.insertText(d,a,l)):(d=o,n.replaceWith(a,l,d)),r.updateSelection&&wPe(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:a,text:d}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:a,text:d})}return!0},EPe=()=>({state:e,dispatch:t})=>SFe(e,t),CPe=()=>({state:e,dispatch:t})=>DFe(e,t),TPe=()=>({state:e,dispatch:t})=>gFe(e,t),APe=()=>({state:e,dispatch:t})=>xFe(e,t),kPe=()=>({tr:e,state:t,dispatch:r})=>{try{const n=ux(t.doc,t.selection.$from.pos,-1);return n==null?!1:(e.join(n,2),r&&r(e),!0)}catch{return!1}},_Pe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=ux(e.doc,e.selection.$from.pos,1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},$Pe=()=>({state:e,dispatch:t})=>yFe(e,t),FPe=()=>({state:e,dispatch:t})=>vFe(e,t);function FU(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function PPe(e){const t=e.split(/-(?!$)/);let r=t[t.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let a=0;a({editor:t,view:r,tr:n,dispatch:i})=>{const s=PPe(e).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{r.someProp("handleKeyDown",c=>c(r,a))});return l==null||l.steps.forEach(c=>{const u=c.map(n.mapping);u&&i&&n.maybeStep(u)}),!0};function bg(e,t,r={}){const{from:n,to:i,empty:s}=e.selection,o=t?Yn(t,e.schema):null,a=[];e.doc.nodesBetween(n,i,(h,d)=>{if(h.isText)return;const f=Math.max(n,d),p=Math.min(i,d+h.nodeSize);a.push({node:h,from:f,to:p})});const l=i-n,c=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>gb(h.node.attrs,r,{strict:!1}));return s?!!c.length:c.reduce((h,d)=>h+d.to-d.from,0)>=l}const NPe=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return bg(r,i,t)?EFe(r,n):!1},MPe=()=>({state:e,dispatch:t})=>kFe(e,t),LPe=e=>({state:t,dispatch:r})=>{const n=Yn(e,t.schema);return LFe(n)(t,r)},OPe=()=>({state:e,dispatch:t})=>CFe(e,t);function bx(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function pR(e,t){const r=typeof t=="string"?[t]:t;return Object.keys(e).reduce((n,i)=>(r.includes(i)||(n[i]=e[i]),n),{})}const RPe=(e,t)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=bx(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=Yn(e,n.schema)),a==="mark"&&(o=Ou(e,n.schema)),i&&r.selection.ranges.forEach(l=>{n.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{s&&s===c.type&&r.setNodeMarkup(u,void 0,pR(c.attrs,t)),o&&c.marks.length&&c.marks.forEach(h=>{o===h.type&&r.addMark(u,u+c.nodeSize,o.create(pR(h.attrs,t)))})})}),!0):!1},BPe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),zPe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),jPe=()=>({state:e,dispatch:t})=>bFe(e,t),HPe=()=>({state:e,dispatch:t})=>wFe(e,t),UPe=()=>({state:e,dispatch:t})=>_Fe(e,t),WPe=()=>({state:e,dispatch:t})=>PFe(e,t),VPe=()=>({state:e,dispatch:t})=>FFe(e,t);function PU(e,t,r={}){return yb(e,t,{slice:!1,parseOptions:r})}const GPe=(e,t=!1,r={})=>({tr:n,editor:i,dispatch:s})=>{const{doc:o}=n,a=PU(e,i.schema,r);return s&&n.replaceWith(0,o.content.size,a).setMeta("preventUpdate",!t),!0};function B$(e,t){const r=Ou(t,e.schema),{from:n,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(n,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===r.name);return a?{...a.attrs}:{}}function qPe(e){for(let t=0;t0;r-=1){const n=e.node(r);if(t(n))return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:n}}}function z$(e){return t=>KPe(t.$from,e)}function JPe(e,t){const r=ea.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function XPe(e,t){const r={from:0,to:e.content.size};return TU(e,r,t)}function YPe(e,t){const r=Yn(t,e.schema),{from:n,to:i}=e.selection,s=[];e.doc.nodesBetween(n,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===r.name);return o?{...o.attrs}:{}}function ZPe(e,t){const r=bx(typeof t=="string"?t:t.name,e.schema);return r==="node"?YPe(e,t):r==="mark"?B$(e,t):{}}function IU(e,t,r){const n=[];return e===t?r.resolve(e).marks().forEach(i=>{const s=r.resolve(e-1),o=O$(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function Uv(e,t,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=e.find(s=>s.type===t&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function QT(e,t,r={}){const{empty:n,ranges:i}=e.selection,s=t?Ou(t,e.schema):null;if(n)return!!(e.storedMarks||e.selection.$from.marks()).filter(h=>s?s.name===h.type.name:!0).find(h=>gb(h.attrs,r,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:h,$to:d})=>{const f=h.pos,p=d.pos;e.doc.nodesBetween(f,p,(g,y)=>{if(!g.isText&&!g.marks.length)return;const b=Math.max(f,y),v=Math.min(p,y+g.nodeSize),E=v-b;o+=E,a.push(...g.marks.map(D=>({mark:D,from:b,to:v})))})}),o===0)return!1;const l=a.filter(h=>s?s.name===h.mark.type.name:!0).filter(h=>gb(h.mark.attrs,r,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),c=a.filter(h=>s?h.mark.type!==s&&h.mark.type.excludes(s):!0).reduce((h,d)=>h+d.to-d.from,0);return(l>0?l+c:l)>=o}function QPe(e,t,r={}){if(!t)return bg(e,null,r)||QT(e,null,r);const n=bx(t,e.schema);return n==="node"?bg(e,t,r):n==="mark"?QT(e,t,r):!1}function mR(e,t){const{nodeExtensions:r}=yx(t),n=r.find(o=>o.name===e);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=nr(bt(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function e3e(e){var t;const r=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),n=e.toJSON();return JSON.stringify(r)===JSON.stringify(n)}function t3e(e,t,r){var n;const{selection:i}=t;let s=null;if(kU(i)&&(s=i.$cursor),s){const a=(n=e.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(a)||!a.some(l=>l.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(r):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,h,d)=>{if(c)return!1;if(u.isInline){const f=!d||d.type.allowsMarkType(r),p=!!r.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(r));c=f&&p}return!c}),c})}const r3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:a}=s,l=Ou(e,n.schema);if(i)if(o){const c=B$(n,l);r.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;n.doc.nodesBetween(u,h,(d,f)=>{const p=Math.max(f,u),g=Math.min(f+d.nodeSize,h);d.marks.find(b=>b.type===l)?d.marks.forEach(b=>{l===b.type&&r.addMark(p,g,l.create({...b.attrs,...t}))}):r.addMark(p,g,l.create(t))})});return t3e(n,r,l)},n3e=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),i3e=(e,t={})=>({state:r,dispatch:n,chain:i})=>{const s=Yn(e,r.schema);return s.isTextblock?i().command(({commands:o})=>uR(s,t)(r)?!0:o.clearNodes()).command(({state:o})=>uR(s,t)(o,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},s3e=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,i=dc(e,0,n.content.size),s=It.create(n,i);t.setSelection(s)}return!0},o3e=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=Qt.atStart(n).from,a=Qt.atEnd(n).to,l=dc(i,o,a),c=dc(s,o,a),u=Qt.create(n,l,c);t.setSelection(u)}return!0},a3e=e=>({state:t,dispatch:r})=>{const n=Yn(e,t.schema);return BFe(n)(t,r)};function gR(e,t){const r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(r){const n=r.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(n)}}const l3e=({keepMarks:e=!0}={})=>({tr:t,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=t,{$from:a,$to:l}=s,c=i.extensionManager.attributes,u=Uv(c,a.node().type.name,a.node().attrs);if(s instanceof It&&s.node.isBlock)return!a.parentOffset||!kd(o,a.pos)?!1:(n&&(e&&gR(r,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(n){const h=l.parentOffset===l.parent.content.size;s instanceof Qt&&t.deleteSelection();const d=a.depth===0?void 0:qPe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let f=h&&d?[{type:d,attrs:u}]:void 0,p=kd(t.doc,t.mapping.map(a.pos),1,f);if(!f&&!p&&kd(t.doc,t.mapping.map(a.pos),1,d?[{type:d}]:void 0)&&(p=!0,f=d?[{type:d,attrs:u}]:void 0),p&&(t.split(t.mapping.map(a.pos),1,f),d&&!h&&!a.parentOffset&&a.parent.type!==d)){const g=t.mapping.map(a.before()),y=t.doc.resolve(g);a.node(-1).canReplaceWith(y.index(),y.index()+1,d)&&t.setNodeMarkup(t.mapping.map(a.before()),d)}e&&gR(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},u3e=e=>({tr:t,state:r,dispatch:n,editor:i})=>{var s;const o=Yn(e,r.schema),{$from:a,$to:l}=r.selection,c=r.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==o)return!1;const h=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==o||a.index(-2)!==a.node(-2).childCount-1)return!1;if(n){let y=qe.empty;const b=a.index(-1)?1:a.index(-2)?2:3;for(let T=a.depth-b;T>=a.depth-3;T-=1)y=qe.from(a.node(T).copy(y));const v=a.indexAfter(-1){if(w>-1)return!1;T.isTextblock&&T.content.size===0&&(w=A+1)}),w>-1&&t.setSelection(Qt.near(t.doc.resolve(w))),t.scrollIntoView()}return!0}const d=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,f=Uv(h,u.type.name,u.attrs),p=Uv(h,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const g=d?[{type:o,attrs:f},{type:d,attrs:p}]:[{type:o,attrs:f}];if(!kd(t.doc,a.pos,2))return!1;if(n){const{selection:y,storedMarks:b}=r,{splittableMarks:v}=i.extensionManager,E=b||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!E||!n)return!0;const D=E.filter(C=>v.includes(C.type.name));t.ensureMarks(D)}return!0},XD=(e,t)=>{const r=z$(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&ph(e.doc,r.pos)&&e.join(r.pos),!0},YD=(e,t)=>{const r=z$(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&ph(e.doc,n)&&e.join(n),!0},c3e=(e,t,r,n={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:h,splittableMarks:d}=i.extensionManager,f=Yn(e,o.schema),p=Yn(t,o.schema),{selection:g,storedMarks:y}=o,{$from:b,$to:v}=g,E=b.blockRange(v),D=y||g.$to.parentOffset&&g.$from.marks();if(!E)return!1;const C=z$(w=>mR(w.type.name,h))(g);if(E.depth>=1&&C&&E.depth-C.depth<=1){if(C.node.type===f)return c.liftListItem(p);if(mR(C.node.type.name,h)&&f.validContent(C.node.content)&&a)return l().command(()=>(s.setNodeMarkup(C.pos,f),!0)).command(()=>XD(s,f)).command(()=>YD(s,f)).run()}return!r||!D||!a?l().command(()=>u().wrapInList(f,n)?!0:c.clearNodes()).wrapInList(f,n).command(()=>XD(s,f)).command(()=>YD(s,f)).run():l().command(()=>{const w=u().wrapInList(f,n),T=D.filter(A=>d.includes(A.type.name));return s.ensureMarks(T),w?!0:c.clearNodes()}).wrapInList(f,n).command(()=>XD(s,f)).command(()=>YD(s,f)).run()},h3e=(e,t={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=Ou(e,n.schema);return QT(n,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},d3e=(e,t,r={})=>({state:n,commands:i})=>{const s=Yn(e,n.schema),o=Yn(t,n.schema);return bg(n,s,r)?i.setNode(o):i.setNode(s,r)},f3e=(e,t={})=>({state:r,commands:n})=>{const i=Yn(e,r.schema);return bg(r,i,t)?n.lift(i):n.wrapIn(i,t)},p3e=()=>({state:e,dispatch:t})=>{const r=e.plugins;for(let n=0;n=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},m3e=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,{empty:n,ranges:i}=r;return n||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},g3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:a}=r,l=Ou(e,n.schema),{$from:c,empty:u,ranges:h}=a;if(!i)return!0;if(u&&o){let{from:d,to:f}=a;const p=(s=c.marks().find(y=>y.type===l))===null||s===void 0?void 0:s.attrs,g=O$(c,l,p);g&&(d=g.from,f=g.to),r.removeMark(d,f,l)}else h.forEach(d=>{r.removeMark(d.$from.pos,d.$to.pos,l)});return r.removeStoredMark(l),!0},y3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const a=bx(typeof e=="string"?e:e.name,n.schema);return a?(a==="node"&&(s=Yn(e,n.schema)),a==="mark"&&(o=Ou(e,n.schema)),i&&r.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;n.doc.nodesBetween(c,u,(h,d)=>{s&&s===h.type&&r.setNodeMarkup(d,void 0,{...h.attrs,...t}),o&&h.marks.length&&h.marks.forEach(f=>{if(o===f.type){const p=Math.max(d,c),g=Math.min(d+h.nodeSize,u);r.addMark(p,g,o.create({...f.attrs,...t}))}})})}),!0):!1},v3e=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return IFe(i,t)(r,n)},b3e=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return NFe(i,t)(r,n)};var x3e=Object.freeze({__proto__:null,blur:nPe,clearContent:iPe,clearNodes:sPe,command:oPe,createParagraphNear:aPe,cut:lPe,deleteCurrentNode:uPe,deleteNode:cPe,deleteRange:hPe,deleteSelection:dPe,enter:fPe,exitCode:pPe,extendMarkRange:gPe,first:yPe,focus:vPe,forEach:bPe,insertContent:xPe,insertContentAt:DPe,joinUp:EPe,joinDown:CPe,joinBackward:TPe,joinForward:APe,joinItemBackward:kPe,joinItemForward:_Pe,joinTextblockBackward:$Pe,joinTextblockForward:FPe,keyboardShortcut:IPe,lift:NPe,liftEmptyBlock:MPe,liftListItem:LPe,newlineInCode:OPe,resetAttributes:RPe,scrollIntoView:BPe,selectAll:zPe,selectNodeBackward:jPe,selectNodeForward:HPe,selectParentNode:UPe,selectTextblockEnd:WPe,selectTextblockStart:VPe,setContent:GPe,setMark:r3e,setMeta:n3e,setNode:i3e,setNodeSelection:s3e,setTextSelection:o3e,sinkListItem:a3e,splitBlock:l3e,splitListItem:u3e,toggleList:c3e,toggleMark:h3e,toggleNode:d3e,toggleWrap:f3e,undoInputRule:p3e,unsetAllMarks:m3e,unsetMark:g3e,updateAttributes:y3e,wrapIn:v3e,wrapInList:b3e});const w3e=Qa.create({name:"commands",addCommands(){return{...x3e}}}),S3e=Qa.create({name:"editable",addProseMirrorPlugins(){return[new Mu({key:new Kg("editable"),props:{editable:()=>this.editor.options.editable}})]}}),D3e=Qa.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Mu({key:new Kg("focusEvents"),props:{handleDOMEvents:{focus:(t,r)=>{e.isFocused=!0;const n=e.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1},blur:(t,r)=>{e.isFocused=!1;const n=e.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1}}}})]}}),E3e=Qa.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:h}=l,{pos:d,parent:f}=h,p=h.parent.isTextblock&&d>0?a.doc.resolve(d-1):h,g=p.parent.type.spec.isolating,y=h.pos-h.parentOffset,b=g&&p.parent.childCount===1?y===h.pos:ir.atStart(c).from===d;return!u||!f.type.isTextblock||f.textContent.length||!b||b&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},s={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return R$()||FU()?s:i},addProseMirrorPlugins(){return[new Mu({key:new Kg("clearDocument"),appendTransaction:(e,t,r)=>{if(!(e.some(p=>p.docChanged)&&!t.doc.eq(r.doc)))return;const{empty:i,from:s,to:o}=t.selection,a=ir.atStart(t.doc).from,l=ir.atEnd(t.doc).to;if(i||!(s===a&&o===l)||!(r.doc.textBetween(0,r.doc.content.size," "," ").length===0))return;const h=r.tr,d=mx({state:r,transaction:h}),{commands:f}=new gx({editor:this.editor,state:d});if(f.clearNodes(),!!h.steps.length)return h}})]}}),C3e=Qa.create({name:"tabindex",addProseMirrorPlugins(){return[new Mu({key:new Kg("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class rc{constructor(t,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=r,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(t);return new rc(r,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new rc(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new rc(t,this.editor)}get children(){const t=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=this.pos+n+1,o=this.resolvedPos.doc.resolve(s);if(!i&&o.depth<=this.depth)return;const a=new rc(o,this.editor,i,i?r:null);i&&(a.actualDepth=this.depth+1),t.push(new rc(o,this.editor,i,i?r:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===t)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let a=0;a{n&&i.length>0||(o.node.type.name===t&&s.every(l=>r[l]===o.node.attrs[l])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,r,n))))}),i}setAttribute(t){const r=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,t).setTextSelection(r.from).run()}}const T3e=`.ProseMirror { +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function t9(e,t){if(e){if(typeof e=="string")return _T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_T(e,t):void 0}}function _T(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{const{connectors:{connect:t,drag:r}}=ba();return typeof e.type=="string"?t(r(Mt.cloneElement(e))):e},y_e=()=>{const{type:e,props:t,nodes:r,hydrationTimestamp:n}=ax(i=>({type:i.data.type,props:i.data.props,nodes:i.data.nodes,hydrationTimestamp:i._hydrationTimestamp}));return H.useMemo(()=>{let i=t.children;r&&r.length>0&&(i=Mt.createElement(Mt.Fragment,null,r.map(o=>Mt.createElement(S$,{id:o,key:o}))));const s=Mt.createElement(e,t,i);return typeof e=="string"?Mt.createElement(g_e,{render:s}):s},[e,t,n,r])},v_e=({render:e})=>{const{hidden:t}=ax(n=>({hidden:n.data.hidden})),{onRender:r}=fh(n=>({onRender:n.options.onRender}));return t?null:Mt.createElement(r,{render:e||Mt.createElement(y_e,null)})},S$=({id:e,render:t})=>Mt.createElement(QH,{id:e},Mt.createElement(v_e,{render:t})),$T={is:"div",canvas:!1,custom:{},hidden:!1},b_e={is:"type",canvas:"isCanvas"};function Bf({id:e,children:t,...r}){const{is:n}={...$T,...r},{query:i,actions:s}=fh(),{node:o,inNodeContext:l}=ax(c=>({node:{id:c.id,data:c.data}})),[a]=H.useState(()=>{Gr(!!e);const{id:c,data:u}=o;if(l){let h;const d=u.linkedNodes&&u.linkedNodes[e]&&i.node(u.linkedNodes[e]).get();if(d&&d.data.type===n)h=d.id;else{const f=Mt.createElement(Bf,r,t),p=i.parseReactElement(f).toNodeTree();h=p.rootNodeId,s.history.ignore().addLinkedNodeFromTree(p,c,e)}return h}return null});return a?Mt.createElement(S$,{id:a}):null}const s9=()=>vu("",{suggest:""});function FT({...e}){return H.useEffect(()=>s9(),[]),Mt.createElement(Bf,{...e,canvas:!0})}const x_e=()=>{const{timestamp:e}=fh(t=>({timestamp:t.nodes[Wa]&&t.nodes[Wa]._hydrationTimestamp}));return e?Mt.createElement(S$,{id:Wa,key:e}):null},w_e=({children:e,json:t,data:r})=>{const{actions:n,query:i}=fh();t&&vu("",{suggest:""});const s=H.useRef(!1);if(!s.current){const o=r||t;if(o)n.history.ignore().deserialize(o);else if(e){const l=Mt.Children.only(e),a=i.parseReactElement(l).toNodeTree((c,u)=>(u===l&&(c.id=Wa),c));n.history.ignore().addNodeTree(a)}s.current=!0}return Mt.createElement(x_e,null)};var uO;(function(e){e[e.Any=0]="Any",e[e.Id=1]="Id",e[e.Obj=2]="Obj"})(uO||(uO={}));const FD=e=>{const{addLinkedNodeFromTree:t,setDOM:r,setNodeEvent:n,replaceNodes:i,reset:s,...o}=e;return o};function Ii(e){const{connectors:t,actions:r,query:n,store:i,...s}=fh(e),o=FD(r);return{connectors:t,actions:H.useMemo(()=>({...o,history:{...o.history,ignore:(...l)=>FD(o.history.ignore(...l)),throttle:(...l)=>FD(o.history.throttle(...l))}}),[o]),query:n,store:i,...s}}var o9=function(e){return Object.fromEntries?Object.fromEntries(e):e.reduce(function(t,r){var n=e9(r,2),i=n[0],s=n[1];return Qr(Qr({},t),{},Fn({},i,s))},{})},Ra=function(e,t,r){var n=Array.isArray(t)?t:[t],i=Qr({existOnly:!1,idOnly:!1},r||{}),s=n.filter(function(o){return!!o}).map(function(o){return typeof o=="string"?{node:e[o],exists:!!e[o]}:AT(o)!=="object"||i.idOnly?{node:null,exists:!1}:{node:o,exists:!!e[o.id]}});return i.existOnly&&Gr(s.filter(function(o){return!o.exists}).length===0),s},S_e=["history"],Uh=null,nb=function(e,t){if(typeof t=="string")return t;var r,n=function(i,s){var o=function(l){if(Uh&&Uh.resolver===l)return Uh.reversed;Uh={resolver:l,reversed:new Map};for(var a=0,c=Object.entries(l);atypeof e=="string"?e:{resolvedName:nb(t,e)},PT=(e,t)=>{let{type:r,isCanvas:n,props:i}=e;return i=Object.keys(i).reduce((s,o)=>{const l=i[o];return l==null||typeof l=="function"||(s[o]=o==="children"&&typeof l!="string"?H.Children.map(l,a=>typeof a=="string"?a:PT(a,t)):typeof l.type=="function"?PT(l,t):l),s},{}),{type:D_e(r,t),isCanvas:!!n,props:i}},E_e=(e,t)=>{const{type:r,props:n,isCanvas:i,name:s,...o}=e;return{...PT({type:r,isCanvas:i,props:n},t),...o}};function IT(e,t){Gr(typeof t=="string");var r=e.nodes[t],n=function(i){return IT(e,i)};return{isCanvas:function(){return!!r.data.isCanvas},isRoot:function(){return r.id===Wa},isLinkedNode:function(){return r.data.parent&&n(r.data.parent).linkedNodes().includes(r.id)},isTopLevelNode:function(){return this.isRoot()||this.isLinkedNode()},isDeletable:function(){return!this.isTopLevelNode()},isParentOfTopLevelNodes:function(){return r.data.linkedNodes&&Object.keys(r.data.linkedNodes).length>0},isParentOfTopLevelCanvas:function(){return vu("query.node(id).isParentOfTopLevelCanvas",{suggest:"query.node(id).isParentOfTopLevelNodes"}),this.isParentOfTopLevelNodes()},isSelected:function(){return e.events.selected.has(t)},isHovered:function(){return e.events.hovered.has(t)},isDragged:function(){return e.events.dragged.has(t)},get:function(){return r},ancestors:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return function s(o){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,c=e.nodes[o];return c?(l.push(o),c.data.parent&&(i||!i&&a===0)&&(l=s(c.data.parent,l,a+1)),l):l}(r.data.parent)},descendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],s=arguments.length>1?arguments[1]:void 0;return function o(l){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return(i||!i&&c===0)&&e.nodes[l]&&(s!=="childNodes"&&n(l).linkedNodes().forEach(function(u){a.push(u),a=o(u,a,c+1)}),s!=="linkedNodes"&&n(l).childNodes().forEach(function(u){a.push(u),a=o(u,a,c+1)})),a}(t)},linkedNodes:function(){return Object.values(r.data.linkedNodes||{})},childNodes:function(){return r.data.nodes||[]},isDraggable:function(i){try{var s=r;return Gr(!this.isTopLevelNode(),ZL),Gr(IT(e,s.data.parent).isCanvas(),YL),Gr(s.rules.canDrag(s,n),Qke),!0}catch(o){return i&&i(o),!1}},isDroppable:function(i,s){var o=Ra(e.nodes,i),l=r;try{Gr(this.isCanvas(),Yke),Gr(l.rules.canMoveIn(o.map(function(c){return c.node}),l,n),Jke);var a={};return o.forEach(function(c){var u=c.node,h=c.exists;if(Gr(u.rules.canDrop(l,u,n),Kke),h){Gr(!n(u.id).isTopLevelNode(),ZL);var d=n(u.id).descendants(!0);Gr(!d.includes(l.id)&&l.id!==u.id,Zke);var f=u.data.parent&&e.nodes[u.data.parent];Gr(f.data.isCanvas,YL),Gr(f||!f&&!e.nodes[u.id],qke),f.id!==l.id&&(a[f.id]||(a[f.id]=[]),a[f.id].push(u))}}),Object.keys(a).forEach(function(c){var u=e.nodes[c];Gr(u.rules.canMoveOut(a[c],u,n),Xke)}),!0}catch(c){return s&&s(c),!1}},toSerializedNode:function(){return E_e(r.data,e.options.resolver)},toNodeTree:function(i){var s=[t].concat(dg(this.descendants(!0,i))).reduce(function(o,l){return o[l]=n(l).get(),o},{});return{rootNodeId:t,nodes:s}},decendants:function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return vu("query.node(id).decendants",{suggest:"query.node(id).descendants"}),this.descendants(i)},isTopLevelCanvas:function(){return!this.isRoot()&&!r.data.parent}}}function a9(e,t,r,n){for(var i={parent:e,index:0,where:"before"},s=0,o=0,l=0,a=0,c=0,u=0,h=0,d=t.length;ho||l&&c>=l||s&&f.left+f.outerWidth{let{type:n,props:i}=e;const s=((l,a)=>typeof l=="object"&&l.resolvedName?l.resolvedName==="Canvas"?FT:a[l.resolvedName]:typeof l=="string"?l:null)(n,t);if(!s)return;i=Object.keys(i).reduce((l,a)=>{const c=i[a];return l[a]=c==null?null:typeof c=="object"&&c.resolvedName?NT(c,t):a==="children"&&Array.isArray(c)?c.map(u=>typeof u=="string"?u:NT(u,t)):c,l},{}),r&&(i.key=r);const o={...Mt.createElement(s,{...i})};return{...o,name:nb(t,o.type)}},C_e=(e,t)=>{const{type:r,props:n,...i}=e;Gr(r!==void 0&&typeof r=="string"||r!==void 0&&r.resolvedName!==void 0,e_e.replace("%displayName%",e.displayName).replace("%availableComponents%",Object.keys(t).join(", ")));const{type:s,name:o,props:l}=NT(e,t),{parent:a,custom:c,displayName:u,isCanvas:h,nodes:d,hidden:f}=i;return{type:s,name:o,displayName:u||o,props:l,custom:c||{},isCanvas:!!h,hidden:!!f,parent:a,linkedNodes:i.linkedNodes||i._childCanvas||{},nodes:d||[]}},T_e=(e,t)=>{if(t.length<1)return{[e.id]:e};const r=t.map(({rootNodeId:i})=>i),n={...e,data:{...e.data,nodes:r}};return t.reduce((i,s)=>{const o=s.nodes[s.rootNodeId];return{...i,...s.nodes,[o.id]:{...o,data:{...o.data,parent:e.id}}}},{[e.id]:n})},A_e=(e,t)=>({rootNodeId:e.id,nodes:T_e(e,t)});function l9(e){const t=e&&e.options,r=()=>l9(e);return{getDropPlaceholder:(n,i,s,o=l=>e.nodes[l.id].dom)=>{const l=e.nodes[i],a=r().node(l.id).isCanvas()?l:e.nodes[l.data.parent];if(!a)return;const c=a.data.nodes||[],u=a9(a,c?c.reduce((f,p)=>{const g=o(e.nodes[p]);if(g){const y={id:p,...hg(g)};f.push(y)}return f},[]):[],s.x,s.y),h=c.length&&e.nodes[c[u.index]],d={placement:{...u,currentNode:h},error:null};return Ra(e.nodes,n).forEach(({node:f,exists:p})=>{p&&r().node(f.id).isDraggable(g=>d.error=g)}),r().node(a.id).isDroppable(n,f=>d.error=f),d},getOptions:()=>t,getNodes:()=>e.nodes,node:n=>IT(e,n),getSerializedNodes(){const n=Object.keys(e.nodes).map(i=>[i,this.node(i).toSerializedNode()]);return o9(n)},getEvent:n=>function(i,s){var o=i.events[s];return{contains:function(l){return o.has(l)},isEmpty:function(){return this.all().length===0},first:function(){return this.all()[0]},last:function(){var l=this.all();return l[l.length-1]},all:function(){return Array.from(o)},size:function(){return this.all().length},at:function(l){return this.all()[l]},raw:function(){return o}}}(e,n),serialize(){return JSON.stringify(this.getSerializedNodes())},parseReactElement:n=>({toNodeTree(i){let s=function(l,a){let c=l;return typeof c=="string"&&(c=Mt.createElement(H.Fragment,{},c)),cO({data:{type:c.type,props:{...c.props}}},u=>{a&&a(u,c)})}(n,(l,a)=>{const c=nb(e.options.resolver,l.data.type);l.data.displayName=l.data.displayName||c,l.data.name=c,i&&i(l,a)}),o=[];return n.props&&n.props.children&&(o=Mt.Children.toArray(n.props.children).reduce((l,a)=>(Mt.isValidElement(a)&&l.push(r().parseReactElement(a).toNodeTree(i)),l),[])),A_e(s,o)}}),parseSerializedNode:n=>({toNode(i){const s=C_e(n,e.options.resolver);Gr(s.type);const o=typeof i=="string"&&i;return o&&vu("query.parseSerializedNode(...).toNode(id)",{suggest:"query.parseSerializedNode(...).toNode(node => node.id = id)"}),r().parseFreshNode({...o?{id:o}:{},data:s}).toNode(!o&&i)}}),parseFreshNode:n=>({toNode:i=>cO(n,s=>{s.data.parent===zH&&(s.data.parent=Wa);const o=nb(e.options.resolver,s.data.type);Gr(o!==null),s.data.displayName=s.data.displayName||o,s.data.name=o,i&&i(s)})}),createNode(n,i){vu(`query.createNode(${n})`,{suggest:`query.parseReactElement(${n}).toNodeTree()`});const s=this.parseReactElement(n).toNodeTree(),o=s.nodes[s.rootNodeId];return i&&(i.id&&(o.id=i.id),i.data&&(o.data={...o.data,...i.data})),o},getState:()=>e}}var k_e=function(e){v$(r,JH);var t=x$(r);function r(){return sx(this,r),t.apply(this,arguments)}return ox(r,[{key:"handlers",value:function(){return{connect:function(n,i){},select:function(n,i){},hover:function(n,i){},drag:function(n,i){},drop:function(n,i){},create:function(n,i,s){}}}}]),r}();(function(e){v$(r,a_e);var t=x$(r);function r(){return sx(this,r),t.apply(this,arguments)}return ox(r)})();var hO=function(e){e.preventDefault()},MT=function(){function e(t,r){sx(this,e),Fn(this,"store",void 0),Fn(this,"dragTarget",void 0),Fn(this,"currentDropTargetId",void 0),Fn(this,"currentDropTargetCanvasAncestorId",void 0),Fn(this,"currentIndicator",null),Fn(this,"currentTargetId",void 0),Fn(this,"currentTargetChildDimensions",void 0),Fn(this,"dragError",void 0),Fn(this,"draggedNodes",void 0),Fn(this,"onScrollListener",void 0),this.store=t,this.dragTarget=r,this.currentDropTargetId=null,this.currentDropTargetCanvasAncestorId=null,this.currentTargetId=null,this.currentTargetChildDimensions=null,this.currentIndicator=null,this.dragError=null,this.draggedNodes=this.getDraggedNodes(),this.validateDraggedNodes(),this.onScrollListener=this.onScroll.bind(this),window.addEventListener("scroll",this.onScrollListener,!0),window.addEventListener("dragover",hO,!1)}return ox(e,[{key:"cleanup",value:function(){window.removeEventListener("scroll",this.onScrollListener,!0),window.removeEventListener("dragover",hO,!1)}},{key:"onScroll",value:function(t){var r=t.target,n=this.store.query.node(Wa).get();r instanceof Element&&n&&n.dom&&r.contains(n.dom)&&(this.currentTargetChildDimensions=null)}},{key:"getDraggedNodes",value:function(){return Ra(this.store.query.getNodes(),this.dragTarget.type==="new"?this.dragTarget.tree.nodes[this.dragTarget.tree.rootNodeId]:this.dragTarget.nodes)}},{key:"validateDraggedNodes",value:function(){var t=this;this.dragTarget.type!=="new"&&this.draggedNodes.forEach(function(r){r.exists&&t.store.query.node(r.node.id).isDraggable(function(n){t.dragError=n})})}},{key:"isNearBorders",value:function(t,r,n){return t.top+e.BORDER_OFFSET>n||t.bottom-e.BORDER_OFFSETr||t.right-e.BORDER_OFFSET2&&arguments[2]!==void 0&&arguments[2]){var r=t[0].getBoundingClientRect(),n=r.width,i=r.height,s=t[0].cloneNode(!0);return s.style.position="absolute",s.style.left="-100%",s.style.top="-100%",s.style.width="".concat(n,"px"),s.style.height="".concat(i,"px"),s.style.pointerEvents="none",s.classList.add("drag-shadow"),document.body.appendChild(s),e.dataTransfer.setDragImage(s,0,0),s}var o=document.createElement("div");return o.style.position="absolute",o.style.left="-100%",o.style.top="-100%",o.style.width="100%",o.style.height="100%",o.style.pointerEvents="none",o.classList.add("drag-shadow-container"),t.forEach(function(l){var a=l.getBoundingClientRect(),c=a.width,u=a.height,h=a.top,d=a.left,f=l.cloneNode(!0);f.style.position="absolute",f.style.left="".concat(d,"px"),f.style.top="".concat(h,"px"),f.style.width="".concat(c,"px"),f.style.height="".concat(u,"px"),f.classList.add("drag-shadow"),o.appendChild(f)}),document.body.appendChild(o),e.dataTransfer.setDragImage(o,e.clientX,e.clientY),o},u9=function(e){v$(r,k_e);var t=x$(r);function r(){var n;sx(this,r);for(var i=arguments.length,s=new Array(i),o=0;o1&&i.actions.setNodeEvent("selected",f=[o]),n.currentSelectedElementIds=f});return function(){l(),a()}},hover:function(s,o){var l=n.addCraftEventListener(s,"mouseover",function(a){a.craft.stopPropagation(),i.actions.setNodeEvent("hovered",o)});return n.options.removeHoverOnMouseleave&&n.addCraftEventListener(s,"mouseleave",function(a){a.craft.stopPropagation(),i.actions.setNodeEvent("hovered",null)}),function(){l()}},drop:function(s,o){var l=n.addCraftEventListener(s,"dragover",function(c){if(c.craft.stopPropagation(),c.preventDefault(),n.positioner){var u=n.positioner.computeIndicator(o,c.clientX,c.clientY);u&&i.actions.setIndicator(u)}}),a=n.addCraftEventListener(s,"dragenter",function(c){c.craft.stopPropagation(),c.preventDefault()});return function(){a(),l()}},drag:function(s,o){if(!i.query.node(o).isDraggable())return function(){};s.setAttribute("draggable","true");var l=n.addCraftEventListener(s,"dragstart",function(c){c.craft.stopPropagation();var u=i.query,h=i.actions,d=u.getEvent("selected").all(),f=n.options.isMultiSelectEnabled(c);n.currentSelectedElementIds.includes(o)||(d=f?[].concat(dg(d),[o]):[o],i.actions.setNodeEvent("selected",d)),h.setNodeEvent("dragged",d);var p=d.map(function(g){return u.node(g).get().dom});n.draggedElementShadow=dO(c,p,r.forceSingleDragShadow),n.dragTarget={type:"existing",nodes:d},n.positioner=new MT(n.options.store,n.dragTarget)}),a=n.addCraftEventListener(s,"dragend",function(c){c.craft.stopPropagation(),n.dropElement(function(u,h){u.type!=="new"&&i.actions.move(u.nodes,h.placement.parent.id,h.placement.index+(h.placement.where==="after"?1:0))})});return function(){s.setAttribute("draggable","false"),l(),a()}},create:function(s,o,l){s.setAttribute("draggable","true");var a=n.addCraftEventListener(s,"dragstart",function(u){var h;if(u.craft.stopPropagation(),typeof o=="function"){var d=o();h=Mt.isValidElement(d)?i.query.parseReactElement(d).toNodeTree():d}else h=i.query.parseReactElement(o).toNodeTree();n.draggedElementShadow=dO(u,[u.currentTarget],r.forceSingleDragShadow),n.dragTarget={type:"new",tree:h},n.positioner=new MT(n.options.store,n.dragTarget)}),c=n.addCraftEventListener(s,"dragend",function(u){u.craft.stopPropagation(),n.dropElement(function(h,d){h.type!=="existing"&&(i.actions.addNodeTree(h.tree,d.placement.parent.id,d.placement.index+(d.placement.where==="after"?1:0)),l&&wDe(l.onCreate)&&l.onCreate(h.tree))})});return function(){s.removeAttribute("draggable"),a(),c()}}}}},{key:"dropElement",value:function(n){var i=this.options.store;if(this.positioner){var s=this.draggedElementShadow,o=this.positioner.getIndicator();this.dragTarget&&o&&!o.error&&n(this.dragTarget,o),s&&(s.parentNode.removeChild(s),this.draggedElementShadow=null),this.dragTarget=null,i.actions.setIndicator(null),i.actions.setNodeEvent("dragged",null),this.positioner.cleanup(),this.positioner=null}}}]),r}();function __e(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:2,i=0,s=0,o=0,l=0,a=e.where;return r?r.inFlow?(o=r.outerWidth,l=n,i=a==="before"?r.top:r.bottom,s=r.left):(o=n,l=r.outerHeight,i=r.top,s=a==="before"?r.left:r.left+r.outerWidth):t&&(i=t.top+t.padding.top,s=t.left+t.padding.left,o=t.outerWidth-t.padding.right-t.padding.left-t.margin.left-t.margin.right,l=n),{top:"".concat(i,"px"),left:"".concat(s,"px"),width:"".concat(o,"px"),height:"".concat(l,"px")}}Fn(u9,"forceSingleDragShadow",d_e()&&h_e());const $_e=()=>{const{indicator:e,indicatorOptions:t,enabled:r}=fh(i=>({indicator:i.indicator,indicatorOptions:i.options.indicator,enabled:i.options.enabled})),n=i9();return H.useEffect(()=>{n&&(r?n.enable():n.disable())},[r,n]),e?Mt.createElement(c_e,{style:{...__e(e.placement,hg(e.placement.parent.dom),e.placement.currentNode&&hg(e.placement.currentNode.dom),t.thickness),backgroundColor:e.error?t.error:t.success,transition:t.transition||"0.2s ease-in"},parentDom:e.placement.parent.dom}):null},F_e=({children:e})=>{const t=H.useContext(w$),r=H.useMemo(()=>t.query.getOptions().handlers(t),[t]);return r?Mt.createElement(n9.Provider,{value:r},Mt.createElement($_e,null),e):null},fO={nodes:{},events:{dragged:new Set,selected:new Set,hovered:new Set},indicator:null,options:{onNodesChange:()=>null,onRender:({render:e})=>e,onBeforeMoveEnd:()=>null,resolver:{},enabled:!0,indicator:{error:"red",success:"rgb(98, 196, 98)"},handlers:e=>new u9({store:e,removeHoverOnMouseleave:!1,isMultiSelectEnabled:t=>!!t.metaKey}),normalizeNodes:()=>{}}},P_e={methods:function(e,t){return Qr(Qr({},function(r,n){var i=function(l,a,c){if(function d(f,p){var g=l.nodes[f];typeof g.data.type!="string"&&Gr(r.options.resolver[g.data.name],HH.replace("%node_type%","".concat(g.data.type.name))),r.nodes[f]=Qr(Qr({},g),{},{data:Qr(Qr({},g.data),{},{parent:p})}),g.data.nodes.length>0&&(delete r.nodes[f].data.props.children,g.data.nodes.forEach(function(y){return d(y,g.id)})),Object.values(g.data.linkedNodes).forEach(function(y){return d(y,g.id)})}(l.rootNodeId,a),a||l.rootNodeId!==Wa){var u=s(a);if(c.type!=="child")u.data.linkedNodes[c.id]=l.rootNodeId;else{var h=c.index;h!=null?u.data.nodes.splice(h,0,l.rootNodeId):u.data.nodes.push(l.rootNodeId)}}},s=function(l){Gr(l);var a=r.nodes[l];return Gr(a),a},o=function l(a){var c=r.nodes[a],u=r.nodes[c.data.parent];if(c.data.nodes&&dg(c.data.nodes).forEach(function(f){return l(f)}),c.data.linkedNodes&&Object.values(c.data.linkedNodes).map(function(f){return l(f)}),u.data.nodes.includes(a)){var h=u.data.nodes;h.splice(h.indexOf(a),1)}else{var d=Object.keys(u.data.linkedNodes).find(function(f){return u.data.linkedNodes[f]===f});d&&delete u.data.linkedNodes[d]}(function(f,p){Object.keys(f.events).forEach(function(g){var y=f.events[g];y&&y.has&&y.has(p)&&(f.events[g]=new Set(Array.from(y).filter(function(b){return p!==b})))})})(r,a),delete r.nodes[a]};return{addLinkedNodeFromTree:function(l,a,c){var u=s(a).data.linkedNodes[c];u&&o(u),i(l,a,{type:"linked",id:c})},add:function(l,a,c){var u=[l];Array.isArray(l)&&(vu("actions.add(node: Node[])",{suggest:"actions.add(node: Node)"}),u=l),u.forEach(function(h){i({nodes:Fn({},h.id,h),rootNodeId:h.id},a,{type:"child",index:c})})},addNodeTree:function(l,a,c){i(l,a,{type:"child",index:c})},delete:function(l){Ra(r.nodes,l,{existOnly:!0,idOnly:!0}).forEach(function(a){var c=a.node;Gr(!n.node(c.id).isTopLevelNode()),o(c.id)})},deserialize:function(l){var a=typeof l=="string"?JSON.parse(l):l,c=Object.keys(a).map(function(u){var h=u;return u===zH&&(h=Wa),[h,n.parseSerializedNode(a[u]).toNode(function(d){return d.id=h})]});this.replaceNodes(o9(c))},move:function(l,a,c){var u=Ra(r.nodes,l,{existOnly:!0}),h=r.nodes[a],d=new Set;u.forEach(function(f,p){var g=f.node,y=g.id,b=g.data.parent;n.node(a).isDroppable([y],function(D){throw new Error(D)}),r.options.onBeforeMoveEnd(g,h,r.nodes[b]);var v=r.nodes[b].data.nodes;d.add(v);var E=v.indexOf(y);v[E]="$$",h.data.nodes.splice(c+p,0,y),r.nodes[y].data.parent=a}),d.forEach(function(f){var p=f.length;dg(f).reverse().forEach(function(g,y){g==="$$"&&f.splice(p-1-y,1)})})},replaceNodes:function(l){this.clearEvents(),r.nodes=l},clearEvents:function(){this.setNodeEvent("selected",null),this.setNodeEvent("hovered",null),this.setNodeEvent("dragged",null),this.setIndicator(null)},reset:function(){this.clearEvents(),this.replaceNodes({})},setOptions:function(l){l(r.options)},setNodeEvent:function(l,a){if(r.events[l].forEach(function(h){r.nodes[h]&&(r.nodes[h].events[l]=!1)}),r.events[l]=new Set,a){var c=Ra(r.nodes,a,{idOnly:!0,existOnly:!0}),u=new Set(c.map(function(h){return h.node.id}));u.forEach(function(h){r.nodes[h].events[l]=!0}),r.events[l]=u}},setCustom:function(l,a){Ra(r.nodes,l,{idOnly:!0,existOnly:!0}).forEach(function(c){return a(r.nodes[c.node.id].data.custom)})},setDOM:function(l,a){r.nodes[l]&&(r.nodes[l].dom=a)},setIndicator:function(l){l&&(!l.placement.parent.dom||l.placement.currentNode&&!l.placement.currentNode.dom)||(r.indicator=l)},setHidden:function(l,a){r.nodes[l].data.hidden=a},setProp:function(l,a){Ra(r.nodes,l,{idOnly:!0,existOnly:!0}).forEach(function(c){return a(r.nodes[c.node.id].data.props)})},selectNode:function(l){if(l){var a=Ra(r.nodes,l,{idOnly:!0,existOnly:!0});this.setNodeEvent("selected",a.map(function(c){return c.node.id}))}else this.setNodeEvent("selected",null);this.setNodeEvent("hovered",null)}}}(e,t)),{},{setState:function(r){var n=b$(this,S_e);r(e,n)}})},ignoreHistoryForActions:["setDOM","setNodeEvent","selectNode","clearEvents","setOptions","setIndicator"],normalizeHistory:e=>{Object.keys(e.events).forEach(t=>{Array.from(e.events[t]||[]).forEach(r=>{e.nodes[r]||e.events[t].delete(r)})}),Object.keys(e.nodes).forEach(t=>{const r=e.nodes[t];Object.keys(r.events).forEach(n=>{r.events[n]&&e.events[n]&&!e.events[n].has(r.id)&&(r.events[n]=!1)})})}},I_e=(e,t)=>r_e(P_e,{...fO,options:{...fO.options,...e}},l9,t),N_e=({children:e,...t})=>{t.resolver!==void 0&&Gr(typeof t.resolver=="object"&&!Array.isArray(t.resolver)&&t.resolver!==null);const r=H.useRef(t),n=I_e(r.current,(i,s,o,l,a)=>{if(!o)return;const{patches:c,...u}=o;for(let h=0;h2&&d[0]==="nodes"&&d[2]==="data";if([yn.IGNORE,yn.THROTTLE].includes(u.type)&&u.params&&(u.type=u.params[0]),["setState","deserialize"].includes(u.type)||f){a(p=>{i.options.normalizeNodes&&i.options.normalizeNodes(p,s,u,l)});break}}});return H.useEffect(()=>{n&&t.enabled!==void 0&&n.query.getOptions().enabled!==t.enabled&&n.actions.setOptions(i=>{i.enabled=t.enabled})},[n,t.enabled]),H.useEffect(()=>{n.subscribe(i=>({json:n.query.serialize()}),()=>{n.query.getOptions().onNodesChange(n.query)})},[n]),n?Mt.createElement(w$.Provider,{value:n},Mt.createElement(F_e,null,e)):null},M_e=({className:e,onIconPick:t,selectedIcon:r})=>{const{t:n}=mr(),[i,s]=H.useState(!1),[o,l]=H.useState("");return B.jsxs(B.Fragment,{children:[B.jsxs(Ot,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectIcon"),B.jsx(Ks,{placement:"left",children:n("playgroundSelectIcon")})]}),B.jsx(hf,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},withCloseButton:!0,drawerHeader:B.jsxs("div",{className:"flex gap-fix-3xl",children:[B.jsx("span",{className:"my-auto",children:n("playgroundSelectIcon")}),B.jsx(an,{type:"search",variant:"floating",label:n("search"),value:o,onChange:a=>l(a.target.value)})]}),className:"select-icon-dialog",children:B.jsx("div",{className:"grid-cols-3 md:grid-cols-6 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:["none",...lZ].filter(a=>a.includes(o)).map(a=>B.jsx("button",{className:a==="none"?"h-full":"h-fit",onClick:()=>t(a),children:B.jsxs(ls,{"data-interactive":"elevation",className:`items-center ${a==="none"?" h-full":""}${a===r?" db-successful-bg-lvl-3":""}`,spacing:"small",children:[a!=="none"&&B.jsx(df,{icon:a}),B.jsx("span",{className:"break-all m-auto",children:a})]})},`icon-button-${a}`))})})]})};function li(e){this.content=e}li.prototype={constructor:li,find:function(e){for(var t=0;t>1}};li.from=function(e){if(e instanceof li)return e;var t=[];if(e)for(var r in e)t.push(r,e[r]);return new li(t)};function c9(e,t,r){for(let n=0;;n++){if(n==e.childCount||n==t.childCount)return e.childCount==t.childCount?null:r;let i=e.child(n),s=t.child(n);if(i==s){r+=i.nodeSize;continue}if(!i.sameMarkup(s))return r;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)r++;return r}if(i.content.size||s.content.size){let o=c9(i.content,s.content,r+1);if(o!=null)return o}r+=i.nodeSize}}function h9(e,t,r,n){for(let i=e.childCount,s=t.childCount;;){if(i==0||s==0)return i==s?null:{a:r,b:n};let o=e.child(--i),l=t.child(--s),a=o.nodeSize;if(o==l){r-=a,n-=a;continue}if(!o.sameMarkup(l))return{a:r,b:n};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;ct&&n(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,t-u),Math.min(a.content.size,r-u),n,i+u)}l=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,r,n,i){let s="",o=!0;return this.nodesBetween(t,r,(l,a)=>{let c=l.isText?l.text.slice(Math.max(t,a)-a,r-a):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&n&&(o?o=!1:s+=n),s+=c},0),s}append(t){if(!t.size)return this;if(!this.size)return t;let r=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(r.isText&&r.sameMarkup(n)&&(i[i.length-1]=r.withText(r.text+n.text),s=1);st)for(let s=0,o=0;ot&&((or)&&(l.isText?l=l.cut(Math.max(0,t-o),Math.min(l.text.length,r-o)):l=l.cut(Math.max(0,t-o-1),Math.min(l.content.size,r-o-1))),n.push(l),i+=l.nodeSize),o=a}return new qe(n,i)}cutByIndex(t,r){return t==r?qe.empty:t==0&&r==this.content.length?this:new qe(this.content.slice(t,r))}replaceChild(t,r){let n=this.content[t];if(n==r)return this;let i=this.content.slice(),s=this.size+r.nodeSize-n.nodeSize;return i[t]=r,new qe(i,s)}addToStart(t){return new qe([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new qe(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let r=0;rthis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t||r>0?ov(n+1,o):ov(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,r){if(!r)return qe.empty;if(!Array.isArray(r))throw new RangeError("Invalid input for Fragment.fromJSON");return new qe(r.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return qe.empty;let r,n=0;for(let i=0;ithis.type.rank&&(r||(r=t.slice(0,i)),r.push(this),n=!0),r&&r.push(s)}}return r||(r=t.slice()),n||r.push(this),r}removeFromSet(t){for(let r=0;rn.type.rank-i.type.rank),r}};Br.none=[];class sb extends Error{}class ut{constructor(t,r,n){this.content=t,this.openStart=r,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,r){let n=f9(this.content,t+this.openStart,r);return n&&new ut(n,this.openStart,this.openEnd)}removeBetween(t,r){return new ut(d9(this.content,t+this.openStart,r+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,r){if(!r)return ut.empty;let n=r.openStart||0,i=r.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ut(qe.fromJSON(t,r.content),n,i)}static maxOpen(t,r=!0){let n=0,i=0;for(let s=t.firstChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=t.lastChild;s&&!s.isLeaf&&(r||!s.type.spec.isolating);s=s.lastChild)i++;return new ut(t,n,i)}}ut.empty=new ut(qe.empty,0,0);function d9(e,t,r){let{index:n,offset:i}=e.findIndex(t),s=e.maybeChild(n),{index:o,offset:l}=e.findIndex(r);if(i==t||s.isText){if(l!=r&&!e.child(o).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(r))}if(n!=o)throw new RangeError("Removing non-flat range");return e.replaceChild(n,s.copy(d9(s.content,t-i-1,r-i-1)))}function f9(e,t,r,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i);if(s==t||o.isText)return n&&!n.canReplace(i,i,r)?null:e.cut(0,t).append(r).append(e.cut(t));let l=f9(o.content,t-s-1,r);return l&&e.replaceChild(i,o.copy(l))}function L_e(e,t,r){if(r.openStart>e.depth)throw new sb("Inserted content deeper than insertion position");if(e.depth-r.openStart!=t.depth-r.openEnd)throw new sb("Inconsistent open depths");return p9(e,t,r,0)}function p9(e,t,r,n){let i=e.index(n),s=e.node(n);if(i==t.index(n)&&n=0&&e.isText&&e.sameMarkup(t[r])?t[r]=e.withText(t[r].text+e.text):t.push(e)}function Dm(e,t,r,n){let i=(t||e).node(r),s=0,o=t?t.index(r):i.childCount;e&&(s=e.index(r),e.depth>r?s++:e.textOffset&&(bc(e.nodeAfter,n),s++));for(let l=s;li&&OT(e,t,i+1),o=n.depth>i&&OT(r,n,i+1),l=[];return Dm(null,e,i,l),s&&o&&t.index(i)==r.index(i)?(m9(s,o),bc(xc(s,g9(e,t,r,n,i+1)),l)):(s&&bc(xc(s,ob(e,t,i+1)),l),Dm(t,r,i,l),o&&bc(xc(o,ob(r,n,i+1)),l)),Dm(n,null,i,l),new qe(l)}function ob(e,t,r){let n=[];if(Dm(null,e,r,n),e.depth>r){let i=OT(e,t,r+1);bc(xc(i,ob(e,t,r+1)),n)}return Dm(t,null,r,n),new qe(n)}function O_e(e,t){let r=t.depth-e.openStart,i=t.node(r).copy(e.content);for(let s=r-1;s>=0;s--)i=t.node(s).copy(qe.from(i));return{start:i.resolveNoCache(e.openStart+r),end:i.resolveNoCache(i.content.size-e.openEnd-r)}}class fg{constructor(t,r,n){this.pos=t,this.path=r,this.parentOffset=n,this.depth=r.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,r=this.index(this.depth);if(r==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=t.child(r);return n?t.child(r).cut(n):i}get nodeBefore(){let t=this.index(this.depth),r=this.pos-this.path[this.path.length-1];return r?this.parent.child(t).cut(0,r):t==0?null:this.parent.child(t-1)}posAtIndex(t,r){r=this.resolveDepth(r);let n=this.path[r*3],i=r==0?0:this.path[r*3-1]+1;for(let s=0;s0;r--)if(this.start(r)<=t&&this.end(r)>=t)return r;return 0}blockRange(t=this,r){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!r||r(this.node(n))))return new ab(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&r<=t.content.size))throw new RangeError("Position "+r+" out of range");let n=[],i=0,s=r;for(let o=t;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(n.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new fg(r,n,s)}static resolveCached(t,r){for(let i=0;it&&this.nodesBetween(t,r,s=>(n.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),y9(this.marks,t)}contentMatchAt(t){let r=this.type.contentMatch.matchFragment(this.content,0,t);if(!r)throw new Error("Called contentMatchAt on a node with invalid content");return r}canReplace(t,r,n=qe.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),l=o&&o.matchFragment(this.content,r);if(!l||!l.validEnd)return!1;for(let a=i;ar.type.name)}`);this.content.forEach(r=>r.check())}toJSON(){let t={type:this.type.name};for(let r in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(r=>r.toJSON())),t}static fromJSON(t,r){if(!r)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(r.marks){if(!Array.isArray(r.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=r.marks.map(t.markFromJSON)}if(r.type=="text"){if(typeof r.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(r.text,n)}let i=qe.fromJSON(t,r.content);return t.nodeType(r.type).create(r.attrs,i,n)}};wc.prototype.text=void 0;class lb extends wc{constructor(t,r,n,i){if(super(t,r,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):y9(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,r){return this.text.slice(t,r)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new lb(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new lb(this.type,this.attrs,t,this.marks)}cut(t=0,r=this.text.length){return t==0&&r==this.text.length?this:this.withText(this.text.slice(t,r))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function y9(e,t){for(let r=e.length-1;r>=0;r--)t=e[r].type.name+"("+t+")";return t}class Wc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,r){let n=new j_e(t,r);if(n.next==null)return Wc.empty;let i=v9(n);n.next&&n.err("Unexpected trailing text");let s=q_e(G_e(i));return K_e(s,n),s}matchType(t){for(let r=0;rc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function r(n){t.push(n);for(let i=0;i{let s=i+(n.validEnd?"*":" ")+" ";for(let o=0;o"+t.indexOf(n.next[o].next);return s}).join(` +`)}}Wc.empty=new Wc(!0);class j_e{constructor(t,r){this.string=t,this.nodeTypes=r,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function v9(e){let t=[];do t.push(z_e(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function z_e(e){let t=[];do t.push(H_e(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function H_e(e){let t=V_e(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=U_e(e,t);else break;return t}function pO(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function U_e(e,t){let r=pO(e),n=r;return e.eat(",")&&(e.next!="}"?n=pO(e):n=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:r,max:n,expr:t}}function W_e(e,t){let r=e.nodeTypes,n=r[t];if(n)return[n];let i=[];for(let s in r){let o=r[s];o.groups.indexOf(t)>-1&&i.push(o)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function V_e(e){if(e.eat("(")){let t=v9(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=W_e(e,e.next).map(r=>(e.inline==null?e.inline=r.isInline:e.inline!=r.isInline&&e.err("Mixing inline and block content"),{type:"name",value:r}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function G_e(e){let t=[[]];return i(s(e,0),r()),t;function r(){return t.push([])-1}function n(o,l,a){let c={term:a,to:l};return t[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=r())}else if(o.type=="star"){let a=r();return n(l,a),i(s(o.expr,a),a),[n(a)]}else if(o.type=="plus"){let a=r();return i(s(o.expr,l),a),i(s(o.expr,a),a),[n(a)]}else{if(o.type=="opt")return[n(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c{e[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=t[n.join(",")]=new Wc(n.indexOf(e.length-1)>-1);for(let o=0;o-1}allowsMarks(t){if(this.markSet==null)return!0;for(let r=0;rn[s]=new D9(s,r,o));let i=r.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class J_e{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class lx{constructor(t,r,n,i){this.name=t,this.rank=r,this.schema=n,this.spec=i,this.attrs=S9(i.attrs),this.excluded=null;let s=x9(this.attrs);this.instance=s?new Br(this,s):null}create(t=null){return!t&&this.instance?this.instance:new Br(this,w9(this.attrs,t))}static compile(t,r){let n=Object.create(null),i=0;return t.forEach((s,o)=>n[s]=new lx(s,i++,r,o)),n}removeFromSet(t){for(var r=0;r-1}}class X_e{constructor(t){this.cached=Object.create(null);let r=this.spec={};for(let i in t)r[i]=t[i];r.nodes=li.from(t.nodes),r.marks=li.from(t.marks||{}),this.nodes=gO.compile(this.spec.nodes,this),this.marks=lx.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;s.contentMatch=n[o]||(n[o]=Wc.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=l=="_"?null:l?yO(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:yO(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,r=null,n,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof gO){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(r,n,i)}text(t,r){let n=this.nodes.text;return new lb(n,n.defaultAttrs,t,Br.setFrom(r))}mark(t,r){return typeof t=="string"&&(t=this.marks[t]),t.create(r)}nodeFromJSON(t){return wc.fromJSON(this,t)}markFromJSON(t){return Br.fromJSON(this,t)}nodeType(t){let r=this.nodes[t];if(!r)throw new RangeError("Unknown node type: "+t);return r}}function yO(e,t){let r=[];for(let n=0;n-1)&&r.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+t[n]+"'")}return r}class ef{constructor(t,r){this.schema=t,this.rules=r,this.tags=[],this.styles=[],r.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let i=t.nodes[n.node];return i.contentMatch.matchType(i)})}parse(t,r={}){let n=new bO(this,r,!1);return n.addAll(t,r.from,r.to),n.finish()}parseSlice(t,r={}){let n=new bO(this,r,!0);return n.addAll(t,r.from,r.to),ut.maxOpen(n.finish())}matchTag(t,r,n){for(let i=n?this.tags.indexOf(n)+1:0;it.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=r))){if(o.getAttrs){let a=o.getAttrs(r);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(t){let r=[];function n(i){let s=i.priority==null?50:i.priority,o=0;for(;o{n(o=xO(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in t.nodes){let s=t.nodes[i].spec.parseDOM;s&&s.forEach(o=>{n(o=xO(o)),o.node||o.ignore||o.mark||(o.node=i)})}return r}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new ef(t,ef.schemaRules(t)))}}const E9={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Y_e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},C9={ol:!0,ul:!0},ub=1,cb=2,Em=4;function vO(e,t,r){return t!=null?(t?ub:0)|(t==="full"?cb:0):e&&e.whitespace=="pre"?ub|cb:r&~Em}class av{constructor(t,r,n,i,s,o,l){this.type=t,this.attrs=r,this.marks=n,this.pendingMarks=i,this.solid=s,this.options=l,this.content=[],this.activeMarks=Br.none,this.stashMarks=[],this.match=o||(l&Em?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let r=this.type.contentMatch.fillBefore(qe.from(t));if(r)this.match=this.type.contentMatch.matchFragment(r);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(t.type))?(this.match=n,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&ub)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let r=qe.from(this.content);return!t&&this.match&&(r=r.append(this.match.fillBefore(qe.empty,!0))),this.type?this.type.create(this.attrs,r,this.marks):r}popFromStashMark(t){for(let r=this.stashMarks.length-1;r>=0;r--)if(t.eq(this.stashMarks[r]))return this.stashMarks.splice(r,1)[0]}applyPending(t){for(let r=0,n=this.pendingMarks;rthis.addAll(t)),o&&this.sync(l),this.needsBlock=a}else this.withStyleRules(t,()=>{this.addElementByRule(t,s,s.consuming===!1?i:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` +`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let r=Br.none,n=Br.none;for(let i=0;i{o.clearMark(l)&&(n=l.addToSet(n))}):r=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(r),o.consuming===!1)s=o;else break}return[r,n]}addElementByRule(t,r,n){let i,s,o;r.node?(s=this.parser.schema.nodes[r.node],s.isLeaf?this.insertNode(s.create(r.attrs))||this.leafFallback(t):i=this.enter(s,r.attrs||null,r.preserveWhitespace)):(o=this.parser.schema.marks[r.mark].create(r.attrs),this.addPendingMark(o));let l=this.top;if(s&&s.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(r.getContent)this.findInside(t),r.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=t;typeof r.contentElement=="string"?a=t.querySelector(r.contentElement):typeof r.contentElement=="function"?a=r.contentElement(t):r.contentElement&&(a=r.contentElement),this.findAround(t,a,!0),this.addAll(a)}i&&this.sync(l)&&this.open--,o&&this.removePendingMark(o,l)}addAll(t,r,n){let i=r||0;for(let s=r?t.childNodes[r]:t.firstChild,o=n==null?null:t.childNodes[n];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s);this.findAtPoint(t,i)}findPlace(t){let r,n;for(let i=this.open;i>=0;i--){let s=this.nodes[i],o=s.findWrapping(t);if(o&&(!r||r.length>o.length)&&(r=o,n=s,!o.length)||s.solid)break}if(!r)return!1;this.sync(n);for(let i=0;ithis.open){for(;r>this.open;r--)this.nodes[r-1].content.push(this.nodes[r].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let r=this.open;r>=0;r--)if(this.nodes[r]==t)return this.open=r,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let r=this.open;r>=0;r--){let n=this.nodes[r].content;for(let i=n.length-1;i>=0;i--)t+=n[i].nodeSize;r&&t++}return t}findAtPoint(t,r){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let r=t.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=r[l];if(c==""){if(l==r.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:n&&a>=s?n.node(a-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return o(r.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let r=t.depth;r>=0;r--){let n=t.node(r).contentMatchAt(t.indexAfter(r)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let r in this.parser.schema.nodes){let n=this.parser.schema.nodes[r];if(n.isTextblock&&n.defaultAttrs)return n}}addPendingMark(t){let r=r$e(t,this.top.pendingMarks);r&&this.top.stashMarks.push(r),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,r){for(let n=this.open;n>=0;n--){let i=this.nodes[n];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let o=i.popFromStashMark(t);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==r)break}}}function Z_e(e){for(let t=e.firstChild,r=null;t;t=t.nextSibling){let n=t.nodeType==1?t.nodeName.toLowerCase():null;n&&C9.hasOwnProperty(n)&&r?(r.appendChild(t),t=r):n=="li"?r=t:n&&(r=null)}}function Q_e(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function e$e(e){let t=/\s*([\w-]+)\s*:\s*([^;]+)/g,r,n=[];for(;r=t.exec(e);)n.push(r[1],r[2].trim());return n}function xO(e){let t={};for(let r in e)t[r]=e[r];return t}function t$e(e,t){let r=t.schema.nodes;for(let n in r){let i=r[n];if(!i.allowsMarkType(e))continue;let s=[],o=l=>{s.push(l);for(let a=0;a{if(s.length||o.marks.length){let l=0,a=0;for(;l=0;i--){let s=this.serializeMark(t.marks[i],t.isInline,r);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(t,r,n={}){let i=this.marks[t.type.name];return i&&ea.renderSpec(MD(n),i(t,r))}static renderSpec(t,r,n=null){if(typeof r=="string")return{dom:t.createTextNode(r)};if(r.nodeType!=null)return{dom:r};if(r.dom&&r.dom.nodeType!=null)return r;let i=r[0],s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let o,l=n?t.createElementNS(n,i):t.createElement(i),a=r[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let h=u.indexOf(" ");h>0?l.setAttributeNS(u.slice(0,h),u.slice(h+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:d,contentDOM:f}=ea.renderSpec(t,h,n);if(l.appendChild(d),f){if(o)throw new RangeError("Multiple content holes");o=f}}}return{dom:l,contentDOM:o}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ea(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let r=wO(t.nodes);return r.text||(r.text=n=>n.text),r}static marksFromSchema(t){return wO(t.marks)}}function wO(e){let t={};for(let r in e){let n=e[r].spec.toDOM;n&&(t[r]=n)}return t}function MD(e){return e.document||window.document}const T9=65535,A9=Math.pow(2,16);function n$e(e,t){return e+t*A9}function SO(e){return e&T9}function i$e(e){return(e-(e&T9))/A9}const k9=1,_9=2,Hv=4,$9=8;class BT{constructor(t,r,n){this.pos=t,this.delInfo=r,this.recover=n}get deleted(){return(this.delInfo&$9)>0}get deletedBefore(){return(this.delInfo&(k9|Hv))>0}get deletedAfter(){return(this.delInfo&(_9|Hv))>0}get deletedAcross(){return(this.delInfo&Hv)>0}}class Cs{constructor(t,r=!1){if(this.ranges=t,this.inverted=r,!t.length&&Cs.empty)return Cs.empty}recover(t){let r=0,n=SO(t);if(!this.inverted)for(let i=0;it)break;let c=this.ranges[l+s],u=this.ranges[l+o],h=a+c;if(t<=h){let d=c?t==a?-1:t==h?1:r:r,f=a+i+(d<0?0:u);if(n)return f;let p=t==(r<0?a:h)?null:n$e(l/3,t-a),g=t==a?_9:t==h?k9:Hv;return(r<0?t!=a:t!=h)&&(g|=$9),new BT(f,g,p)}i+=u-c}return n?t+i:new BT(t+i,0,null)}touches(t,r){let n=0,i=SO(r),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;lt)break;let c=this.ranges[l+s],u=a+c;if(t<=u&&l==i*3)return!0;n+=this.ranges[l+o]-c}return!1}forEach(t){let r=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,s=0;i=0;r--){let i=t.getMirror(r);this.appendMap(t.maps[r].invert(),i!=null&&i>r?n-i-1:void 0)}}invert(){let t=new Cm;return t.appendMappingInverted(this),t}map(t,r=1){if(this.mirror)return this._map(t,r,!0);for(let n=this.from;ns&&a!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),r.openStart,r.openEnd);return _n.fromReplace(t,this.from,this.to,s)}invert(){return new ta(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new Gl(r.pos,n.pos,this.mark)}merge(t){return t instanceof Gl&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Gl(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Gl(r.from,r.to,t.markFromJSON(r.mark))}}Ni.jsonID("addMark",Gl);class ta extends Ni{constructor(t,r,n){super(),this.from=t,this.to=r,this.mark=n}apply(t){let r=t.slice(this.from,this.to),n=new ut(D$(r.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),r.openStart,r.openEnd);return _n.fromReplace(t,this.from,this.to,n)}invert(){return new Gl(this.from,this.to,this.mark)}map(t){let r=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return r.deleted&&n.deleted||r.pos>=n.pos?null:new ta(r.pos,n.pos,this.mark)}merge(t){return t instanceof ta&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ta(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ta(r.from,r.to,t.markFromJSON(r.mark))}}Ni.jsonID("removeMark",ta);class ql extends Ni{constructor(t,r){super(),this.pos=t,this.mark=r}apply(t){let r=t.nodeAt(this.pos);if(!r)return _n.fail("No node at mark step's position");let n=r.type.create(r.attrs,null,this.mark.addToSet(r.marks));return _n.fromReplace(t,this.pos,this.pos+1,new ut(qe.from(n),0,r.isLeaf?0:1))}invert(t){let r=t.nodeAt(this.pos);if(r){let n=this.mark.addToSet(r.marks);if(n.length==r.marks.length){for(let i=0;in.pos?null:new Xn(r.pos,n.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,r){if(typeof r.from!="number"||typeof r.to!="number"||typeof r.gapFrom!="number"||typeof r.gapTo!="number"||typeof r.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Xn(r.from,r.to,r.gapFrom,r.gapTo,ut.fromJSON(t,r.slice),r.insert,!!r.structure)}}Ni.jsonID("replaceAround",Xn);function jT(e,t,r){let n=e.resolve(t),i=r-t,s=n.depth;for(;i>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,i--;if(i>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function s$e(e,t,r,n){let i=[],s=[],o,l;e.doc.nodesBetween(t,r,(a,c,u)=>{if(!a.isInline)return;let h=a.marks;if(!n.isInSet(h)&&u.type.allowsMarkType(n.type)){let d=Math.max(c,t),f=Math.min(c+a.nodeSize,r),p=n.addToSet(h);for(let g=0;ge.step(a)),s.forEach(a=>e.step(a))}function o$e(e,t,r,n){let i=[],s=0;e.doc.nodesBetween(t,r,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(n instanceof lx){let c=o.marks,u;for(;u=n.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else n?n.isInSet(o.marks)&&(a=[n]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,r);for(let u=0;ue.step(new ta(o.from,o.to,o.style)))}function a$e(e,t,r,n=r.contentMatch){let i=e.doc.nodeAt(t),s=[],o=t+1;for(let l=0;l=0;l--)e.step(s[l])}function l$e(e,t,r){return(t==0||e.canReplace(t,e.childCount))&&(r==e.childCount||e.canReplace(0,r))}function jf(e){let r=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let i=e.$from.node(n),s=e.$from.index(n),o=e.$to.indexAfter(n);if(nr;p--)g||n.index(p)>0?(g=!0,u=qe.from(n.node(p).copy(u)),h++):a--;let d=qe.empty,f=0;for(let p=s,g=!1;p>r;p--)g||i.after(p+1)=0;o--){if(n.size){let l=r[o].type.contentMatch.matchFragment(n);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=qe.from(r[o].type.create(r[o].attrs,n))}let i=t.start,s=t.end;e.step(new Xn(i,s,i,s,new ut(n,0,0),r.length,!0))}function f$e(e,t,r,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=e.steps.length;e.doc.nodesBetween(t,r,(o,l)=>{if(o.isTextblock&&!o.hasMarkup(n,i)&&p$e(e.doc,e.mapping.slice(s).map(l),n)){e.clearIncompatible(e.mapping.slice(s).map(l,1),n);let a=e.mapping.slice(s),c=a.map(l,1),u=a.map(l+o.nodeSize,1);return e.step(new Xn(c,u,c+1,u-1,new ut(qe.from(n.create(i,null,o.marks)),0,0),1,!0)),!1}})}function p$e(e,t,r){let n=e.resolve(t),i=n.index();return n.parent.canReplaceWith(i,i+1,r)}function m$e(e,t,r,n,i){let s=e.doc.nodeAt(t);if(!s)throw new RangeError("No node at given position");r||(r=s.type);let o=r.create(n,null,i||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,o);if(!r.validContent(s.content))throw new RangeError("Invalid content for node type "+r.name);e.step(new Xn(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new ut(qe.from(o),0,0),1,!0))}function kd(e,t,r=1,n){let i=e.resolve(t),s=i.depth-r,o=n&&n[n.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=r-2;c>s;c--,u--){let h=i.node(c),d=i.index(c);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(d,h.childCount),p=n&&n[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let g=n&&n[u]||h;if(!h.canReplace(d+1,h.childCount)||!g.type.validContent(f))return!1}let l=i.indexAfter(s),a=n&&n[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function g$e(e,t,r=1,n){let i=e.doc.resolve(t),s=qe.empty,o=qe.empty;for(let l=i.depth,a=i.depth-r,c=r-1;l>a;l--,c--){s=qe.from(i.node(l).copy(s));let u=n&&n[c];o=qe.from(u?u.type.create(u.attrs,o):i.node(l).copy(o))}e.step(new qn(t,t,new ut(s.append(o),r,r),!0))}function ph(e,t){let r=e.resolve(t),n=r.index();return P9(r.nodeBefore,r.nodeAfter)&&r.parent.canReplace(n,n+1)}function P9(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function ux(e,t,r=-1){let n=e.resolve(t);for(let i=n.depth;;i--){let s,o,l=n.index(i);if(i==n.depth?(s=n.nodeBefore,o=n.nodeAfter):r>0?(s=n.node(i+1),l++,o=n.node(i).maybeChild(l)):(s=n.node(i).maybeChild(l-1),o=n.node(i+1)),s&&!s.isTextblock&&P9(s,o)&&n.node(i).canReplace(l,l+1))return t;if(i==0)break;t=r<0?n.before(i):n.after(i)}}function y$e(e,t,r){let n=new qn(t-r,t+r,ut.empty,!0);e.step(n)}function v$e(e,t,r){let n=e.resolve(t);if(n.parent.canReplaceWith(n.index(),n.index(),r))return t;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let s=n.index(i);if(n.node(i).canReplaceWith(s,s,r))return n.before(i+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let s=n.indexAfter(i);if(n.node(i).canReplaceWith(s,s,r))return n.after(i+1);if(s=0;o--){let l=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,a=n.index(o)+(l>0?1:0),c=n.node(o),u=!1;if(s==1)u=c.canReplace(a,a,i);else{let h=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=h&&c.canReplaceWith(a,a,h[0])}if(u)return l==0?n.pos:l<0?n.before(o+1):n.after(o+1)}return null}function cx(e,t,r=t,n=ut.empty){if(t==r&&!n.size)return null;let i=e.resolve(t),s=e.resolve(r);return I9(i,s,n)?new qn(t,r,n):new x$e(i,s,n).fit()}function I9(e,t,r){return!r.openStart&&!r.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),r.content)}class x$e{constructor(t,r,n){this.$from=t,this.$to=r,this.unplaced=n,this.frontier=[],this.placed=qe.empty;for(let i=0;i<=t.depth;i++){let s=t.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=qe.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),r=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(t<0?this.$to:n.doc.resolve(t));if(!i)return null;let s=this.placed,o=n.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new ut(s,o,l);return t>-1?new Xn(n.pos,t,this.$to.pos,this.$to.end(),a,r):a.size||n.pos!=this.$to.pos?new qn(n.pos,i.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let r=this.unplaced.content,n=0,i=this.unplaced.openEnd;n1&&(i=0),s.type.spec.isolating&&i<=n){t=n;break}r=s.content}for(let r=1;r<=2;r++)for(let n=r==1?t:this.unplaced.openStart;n>=0;n--){let i,s=null;n?(s=OD(this.unplaced.content,n-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,h=null;if(r==1&&(o?c.matchType(o.type)||(h=c.fillBefore(qe.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:l,parent:s,inject:h};if(r==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=OD(t,r);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new ut(t,r+1,Math.max(n,i.size+r>=t.size-n?r+1:0)),!0)}dropNode(){let{content:t,openStart:r,openEnd:n}=this.unplaced,i=OD(t,r);if(i.childCount<=1&&r>0){let s=t.size-r<=r+i.size;this.unplaced=new ut(Vp(t,r-1,1),r-1,s?r-1:n)}else this.unplaced=new ut(Vp(t,r,1),r,n)}placeNodes({sliceDepth:t,frontierDepth:r,parent:n,inject:i,wrap:s}){for(;this.depth>r;)this.closeFrontierNode();if(s)for(let g=0;g1||a==0||g.content.size)&&(h=y,u.push(N9(g.mark(d.allowedMarks(g.marks)),c==1?a:0,c==l.childCount?f:-1)))}let p=c==l.childCount;p||(f=-1),this.placed=Gp(this.placed,r,qe.from(u)),this.frontier[r].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,y=l;g1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(t){e:for(let r=Math.min(this.depth,t.depth);r>=0;r--){let{match:n,type:i}=this.frontier[r],s=r=0;l--){let{match:a,type:c}=this.frontier[l],u=RD(t,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:r,fit:o,move:s?t.doc.resolve(t.after(r+1)):t}}}}close(t){let r=this.findCloseLevel(t);if(!r)return null;for(;this.depth>r.depth;)this.closeFrontierNode();r.fit.childCount&&(this.placed=Gp(this.placed,r.depth,r.fit)),t=r.move;for(let n=r.depth+1;n<=t.depth;n++){let i=t.node(n),s=i.type.contentMatch.fillBefore(i.content,!0,t.index(n));this.openFrontierNode(i.type,i.attrs,s)}return t}openFrontierNode(t,r=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Gp(this.placed,this.depth,qe.from(t.create(r,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let r=this.frontier.pop().match.fillBefore(qe.empty,!0);r.childCount&&(this.placed=Gp(this.placed,this.frontier.length,r))}}function Vp(e,t,r){return t==0?e.cutByIndex(r,e.childCount):e.replaceChild(0,e.firstChild.copy(Vp(e.firstChild.content,t-1,r)))}function Gp(e,t,r){return t==0?e.append(r):e.replaceChild(e.childCount-1,e.lastChild.copy(Gp(e.lastChild.content,t-1,r)))}function OD(e,t){for(let r=0;r1&&(n=n.replaceChild(0,N9(n.firstChild,t-1,n.childCount==1?r-1:0))),t>0&&(n=e.type.contentMatch.fillBefore(n).append(n),r<=0&&(n=n.append(e.type.contentMatch.matchFragment(n).fillBefore(qe.empty,!0)))),e.copy(n)}function RD(e,t,r,n,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!r.compatibleContent(s.type))return null;let l=n.fillBefore(s.content,!0,o);return l&&!w$e(r,s.content,o)?l:null}function w$e(e,t,r){for(let n=r;n0;d--,f--){let p=i.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?l=d:i.before(d)==f&&o.splice(1,0,-d)}let a=o.indexOf(l),c=[],u=n.openStart;for(let d=n.content,f=0;;f++){let p=d.firstChild;if(c.push(p),f==n.openStart)break;d=p.content}for(let d=u-1;d>=0;d--){let f=c[d],p=S$e(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(l)-1)))u=d;else if(p||!f.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let f=(d+u+1)%(n.openStart+1),p=c[f];if(p)for(let g=0;g=0&&(e.replace(t,r,n),!(e.steps.length>h));d--){let f=o[d];f<0||(t=i.before(f),r=s.after(f))}}function M9(e,t,r,n,i){if(tn){let s=i.contentMatchAt(0),o=s.fillBefore(e).append(e);e=o.append(s.matchFragment(o).fillBefore(qe.empty,!0))}return e}function E$e(e,t,r,n){if(!n.isInline&&t==r&&e.doc.resolve(t).parent.content.size){let i=v$e(e.doc,t,n.type);i!=null&&(t=r=i)}e.replaceRange(t,r,new ut(qe.from(n),0,0))}function C$e(e,t,r){let n=e.doc.resolve(t),i=e.doc.resolve(r),s=L9(n,i);for(let o=0;o0&&(a||n.node(l-1).canReplace(n.index(l-1),i.indexAfter(l-1))))return e.delete(n.before(l),i.after(l))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(t-n.start(o)==n.depth-o&&r>n.end(o)&&i.end(o)-r!=i.depth-o)return e.delete(n.before(o),r);e.delete(t,r)}function L9(e,t){let r=[],n=Math.min(e.depth,t.depth);for(let i=n;i>=0;i--){let s=e.start(i);if(st.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(s==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==s-1)&&r.push(i)}return r}class _d extends Ni{constructor(t,r,n){super(),this.pos=t,this.attr=r,this.value=n}apply(t){let r=t.nodeAt(this.pos);if(!r)return _n.fail("No node at attribute step's position");let n=Object.create(null);for(let s in r.attrs)n[s]=r.attrs[s];n[this.attr]=this.value;let i=r.type.create(n,null,r.marks);return _n.fromReplace(t,this.pos,this.pos+1,new ut(qe.from(i),0,r.isLeaf?0:1))}getMap(){return Cs.empty}invert(t){return new _d(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let r=t.mapResult(this.pos,1);return r.deletedAfter?null:new _d(r.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.pos!="number"||typeof r.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new _d(r.pos,r.attr,r.value)}}Ni.jsonID("attr",_d);class pg extends Ni{constructor(t,r){super(),this.attr=t,this.value=r}apply(t){let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let n=t.type.create(r,t.content,t.marks);return _n.ok(n)}getMap(){return Cs.empty}invert(t){return new pg(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,r){if(typeof r.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new pg(r.attr,r.value)}}Ni.jsonID("docAttr",pg);let rf=class extends Error{};rf=function e(t){let r=Error.call(this,t);return r.__proto__=e.prototype,r};rf.prototype=Object.create(Error.prototype);rf.prototype.constructor=rf;rf.prototype.name="TransformError";class T$e{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Cm}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let r=this.maybeStep(t);if(r.failed)throw new rf(r.failed);return this}maybeStep(t){let r=t.apply(this.doc);return r.failed||this.addStep(t,r.doc),r}get docChanged(){return this.steps.length>0}addStep(t,r){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=r}replace(t,r=t,n=ut.empty){let i=cx(this.doc,t,r,n);return i&&this.step(i),this}replaceWith(t,r,n){return this.replace(t,r,new ut(qe.from(n),0,0))}delete(t,r){return this.replace(t,r,ut.empty)}insert(t,r){return this.replaceWith(t,t,r)}replaceRange(t,r,n){return D$e(this,t,r,n),this}replaceRangeWith(t,r,n){return E$e(this,t,r,n),this}deleteRange(t,r){return C$e(this,t,r),this}lift(t,r){return u$e(this,t,r),this}join(t,r=1){return y$e(this,t,r),this}wrap(t,r){return d$e(this,t,r),this}setBlockType(t,r=t,n,i=null){return f$e(this,t,r,n,i),this}setNodeMarkup(t,r,n=null,i){return m$e(this,t,r,n,i),this}setNodeAttribute(t,r,n){return this.step(new _d(t,r,n)),this}setDocAttribute(t,r){return this.step(new pg(t,r)),this}addNodeMark(t,r){return this.step(new ql(t,r)),this}removeNodeMark(t,r){if(!(r instanceof Br)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(r=r.isInSet(n.marks),!r)return this}return this.step(new tf(t,r)),this}split(t,r=1,n){return g$e(this,t,r,n),this}addMark(t,r,n){return s$e(this,t,r,n),this}removeMark(t,r,n){return o$e(this,t,r,n),this}clearIncompatible(t,r,n){return a$e(this,t,r,n),this}}const BD=Object.create(null);class ir{constructor(t,r,n){this.$anchor=t,this.$head=r,this.ranges=n||[new A$e(t.min(r),t.max(r))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let r=0;r=0;s--){let o=r<0?Xh(t.node(0),t.node(s),t.before(s+1),t.index(s),r,n):Xh(t.node(0),t.node(s),t.after(s+1),t.index(s)+1,r,n);if(o)return o}return null}static near(t,r=1){return this.findFrom(t,r)||this.findFrom(t,-r)||new Mo(t.node(0))}static atStart(t){return Xh(t,t,0,0,1)||new Mo(t)}static atEnd(t){return Xh(t,t,t.content.size,t.childCount,-1)||new Mo(t)}static fromJSON(t,r){if(!r||!r.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=BD[r.type];if(!n)throw new RangeError(`No selection type ${r.type} defined`);return n.fromJSON(t,r)}static jsonID(t,r){if(t in BD)throw new RangeError("Duplicate use of selection JSON ID "+t);return BD[t]=r,r.prototype.jsonID=t,r}getBookmark(){return Qt.between(this.$anchor,this.$head).getBookmark()}}ir.prototype.visible=!0;class A$e{constructor(t,r){this.$from=t,this.$to=r}}let EO=!1;function CO(e){!EO&&!e.parent.inlineContent&&(EO=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Qt extends ir{constructor(t,r=t){CO(t),CO(r),super(t,r)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,r){let n=t.resolve(r.map(this.head));if(!n.parent.inlineContent)return ir.near(n);let i=t.resolve(r.map(this.anchor));return new Qt(i.parent.inlineContent?i:n,n)}replace(t,r=ut.empty){if(super.replace(t,r),r==ut.empty){let n=this.$from.marksAcross(this.$to);n&&t.ensureMarks(n)}}eq(t){return t instanceof Qt&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new hx(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,r){if(typeof r.anchor!="number"||typeof r.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Qt(t.resolve(r.anchor),t.resolve(r.head))}static create(t,r,n=r){let i=t.resolve(r);return new this(i,n==r?i:t.resolve(n))}static between(t,r,n){let i=t.pos-r.pos;if((!n||i)&&(n=i>=0?1:-1),!r.parent.inlineContent){let s=ir.findFrom(r,n,!0)||ir.findFrom(r,-n,!0);if(s)r=s.$head;else return ir.near(r,n)}return t.parent.inlineContent||(i==0?t=r:(t=(ir.findFrom(t,-n,!0)||ir.findFrom(t,n,!0)).$anchor,t.pos0?0:1);i>0?o=0;o+=i){let l=t.child(o);if(l.isAtom){if(!s&&It.isSelectable(l))return It.create(e,r-(i<0?l.nodeSize:0))}else{let a=Xh(e,l,r+i,i<0?l.childCount:0,i,s);if(a)return a}r+=l.nodeSize*i}return null}function TO(e,t,r){let n=e.steps.length-1;if(n{o==null&&(o=u)}),e.setSelection(ir.near(e.doc.resolve(o),r))}const AO=1,lv=2,kO=4;class _$e extends T$e{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=lv,this}ensureMarks(t){return Br.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&lv)>0}addStep(t,r){super.addStep(t,r),this.updated=this.updated&~lv,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,r=!0){let n=this.selection;return r&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Br.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,r,n){let i=this.doc.type.schema;if(r==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(n==null&&(n=r),n=n??r,!t)return this.deleteRange(r,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(r);s=n==r?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(r,n,i.text(t,s)),this.selection.empty||this.setSelection(ir.near(this.selection.$to)),this}}setMeta(t,r){return this.meta[typeof t=="string"?t:t.key]=r,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=kO,this}get scrolledIntoView(){return(this.updated&kO)>0}}function _O(e,t){return!t||!e?e:e.bind(t)}class qp{constructor(t,r,n){this.name=t,this.init=_O(r.init,n),this.apply=_O(r.apply,n)}}const $$e=[new qp("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new qp("selection",{init(e,t){return e.selection||ir.atStart(t.doc)},apply(e){return e.selection}}),new qp("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,r,n){return n.selection.$cursor?e.storedMarks:null}}),new qp("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class jD{constructor(t,r){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=$$e.slice(),r&&r.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new qp(n.key,n.spec.state,n))})}}class yd{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,r=-1){for(let n=0;nn.toJSON())),t&&typeof t=="object")for(let n in t){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[n],s=i.spec.state;s&&s.toJSON&&(r[n]=s.toJSON.call(i,this[i.key]))}return r}static fromJSON(t,r,n){if(!r)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new jD(t.schema,t.plugins),s=new yd(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=wc.fromJSON(t.schema,r.doc);else if(o.name=="selection")s.selection=ir.fromJSON(s.doc,r.selection);else if(o.name=="storedMarks")r.storedMarks&&(s.storedMarks=r.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let l in n){let a=n[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(r,l)){s[o.name]=c.fromJSON.call(a,t,r[l],s);return}}s[o.name]=o.init(t,s)}}),s}}function O9(e,t,r){for(let n in e){let i=e[n];i instanceof Function?i=i.bind(t):n=="handleDOMEvents"&&(i=O9(i,t,{})),r[n]=i}return r}class Mu{constructor(t){this.spec=t,this.props={},t.props&&O9(t.props,this,this.props),this.key=t.key?t.key.key:R9("plugin")}getState(t){return t[this.key]}}const zD=Object.create(null);function R9(e){return e in zD?e+"$"+ ++zD[e]:(zD[e]=0,e+"$")}class Kg{constructor(t="key"){this.key=R9(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const zi=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},mg=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let $O=null;const Ma=function(e,t,r){let n=$O||($O=document.createRange());return n.setEnd(e,r??e.nodeValue.length),n.setStart(e,t||0),n},Vc=function(e,t,r,n){return r&&(FO(e,t,r,n,-1)||FO(e,t,r,n,1))},F$e=/^(img|br|input|textarea|hr)$/i;function FO(e,t,r,n,i){for(;;){if(e==r&&t==n)return!0;if(t==(i<0?0:Yo(e))){let s=e.parentNode;if(!s||s.nodeType!=1||C$(e)||F$e.test(e.nodeName)||e.contentEditable=="false")return!1;t=zi(e)+(i<0?0:1),e=s}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?Yo(e):0}else return!1}}function Yo(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function P$e(e,t,r){for(let n=t==0,i=t==Yo(e);n||i;){if(e==r)return!0;let s=zi(e);if(e=e.parentNode,!e)return!1;n=n&&s==0,i=i&&s==Yo(e)}}function C$(e){let t;for(let r=e;r&&!(t=r.pmViewDesc);r=r.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const dx=function(e){return e.focusNode&&Vc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function tc(e,t){let r=document.createEvent("Event");return r.initEvent("keydown",!0,!0),r.keyCode=e,r.key=r.code=t,r}function I$e(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function N$e(e,t,r){if(e.caretPositionFromPoint)try{let n=e.caretPositionFromPoint(t,r);if(n)return{node:n.offsetNode,offset:n.offset}}catch{}if(e.caretRangeFromPoint){let n=e.caretRangeFromPoint(t,r);if(n)return{node:n.startContainer,offset:n.startOffset}}}const ma=typeof navigator<"u"?navigator:null,PO=typeof document<"u"?document:null,Lu=ma&&ma.userAgent||"",zT=/Edge\/(\d+)/.exec(Lu),B9=/MSIE \d/.exec(Lu),HT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Lu),ps=!!(B9||HT||zT),iu=B9?document.documentMode:HT?+HT[1]:zT?+zT[1]:0,Ro=!ps&&/gecko\/(\d+)/i.test(Lu);Ro&&+(/Firefox\/(\d+)/.exec(Lu)||[0,0])[1];const UT=!ps&&/Chrome\/(\d+)/.exec(Lu),Ai=!!UT,M$e=UT?+UT[1]:0,Vi=!ps&&!!ma&&/Apple Computer/.test(ma.vendor),nf=Vi&&(/Mobile\/\w+/.test(Lu)||!!ma&&ma.maxTouchPoints>2),Us=nf||(ma?/Mac/.test(ma.platform):!1),L$e=ma?/Win/.test(ma.platform):!1,Ao=/Android \d/.test(Lu),Jg=!!PO&&"webkitFontSmoothing"in PO.documentElement.style,O$e=Jg?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function R$e(e){return{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Pa(e,t){return typeof e=="number"?e:e[t]}function B$e(e){let t=e.getBoundingClientRect(),r=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*r,top:t.top,bottom:t.top+e.clientHeight*n}}function IO(e,t,r){let n=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let o=r||e.dom;o;o=mg(o)){if(o.nodeType!=1)continue;let l=o,a=l==s.body,c=a?R$e(s):B$e(l),u=0,h=0;if(t.topc.bottom-Pa(n,"bottom")&&(h=t.bottom-t.top>c.bottom-c.top?t.top+Pa(i,"top")-c.top:t.bottom-c.bottom+Pa(i,"bottom")),t.leftc.right-Pa(n,"right")&&(u=t.right-c.right+Pa(i,"right")),u||h)if(a)s.defaultView.scrollBy(u,h);else{let d=l.scrollLeft,f=l.scrollTop;h&&(l.scrollTop+=h),u&&(l.scrollLeft+=u);let p=l.scrollLeft-d,g=l.scrollTop-f;t={left:t.left-p,top:t.top-g,right:t.right-p,bottom:t.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function j$e(e){let t=e.dom.getBoundingClientRect(),r=Math.max(0,t.top),n,i;for(let s=(t.left+t.right)/2,o=r+1;o=r-20){n=l,i=a.top;break}}return{refDOM:n,refTop:i,stack:j9(e.dom)}}function j9(e){let t=[],r=e.ownerDocument;for(let n=e;n&&(t.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),e!=r);n=mg(n));return t}function z$e({refDOM:e,refTop:t,stack:r}){let n=e?e.getBoundingClientRect().top:0;z9(r,n==0?0:n-t)}function z9(e,t){for(let r=0;r=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let g=p.left>t.left?p.left-t.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!a&&p.left<=t.left&&p.right>=t.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!r&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(s=h+1)}}return!r&&a&&(r=a,i=c,n=0),r&&r.nodeType==3?U$e(r,i):!r||n&&r.nodeType==1?{node:e,offset:s}:H9(r,i)}function U$e(e,t){let r=e.nodeValue.length,n=document.createRange();for(let i=0;i=(s.left+s.right)/2?1:0)}}return{node:e,offset:0}}function T$(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function W$e(e,t){let r=e.parentNode;return r&&/^li$/i.test(r.nodeName)&&t.left(o.left+o.right)/2?1:-1}return e.docView.posFromDOM(n,i,s)}function G$e(e,t,r,n){let i=-1;for(let s=t,o=!1;s!=e.dom;){let l=e.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!o||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!o&&(o=!0,a.left>n.left||a.top>n.top?i=l.posBefore:(a.right-1?i:e.docView.posFromDOM(t,r,-1)}function U9(e,t,r){let n=e.childNodes.length;if(n&&r.topt.top&&i++}let c;Jg&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?l=e.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(l=G$e(e,n,i,t))}l==null&&(l=V$e(e,o,t));let a=e.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function NO(e){return e.top=0&&i==n.nodeValue.length?(a--,u=1):r<0?a--:c++,kp(Il(Ma(n,a,c),u),u<0)}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(s==null&&i&&(r<0||i==Yo(n))){let a=n.childNodes[i-1];if(a.nodeType==1)return HD(a.getBoundingClientRect(),!1)}if(s==null&&i=0)}if(s==null&&i&&(r<0||i==Yo(n))){let a=n.childNodes[i-1],c=a.nodeType==3?Ma(a,Yo(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return kp(Il(c,1),!1)}if(s==null&&i=0)}function kp(e,t){if(e.width==0)return e;let r=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:r,right:r}}function HD(e,t){if(e.height==0)return e;let r=t?e.top:e.bottom;return{top:r,bottom:r,left:e.left,right:e.right}}function V9(e,t,r){let n=e.state,i=e.root.activeElement;n!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return r()}finally{n!=t&&e.updateState(n),i!=e.dom&&i&&i.focus()}}function J$e(e,t,r){let n=t.selection,i=r=="up"?n.$from:n.$to;return V9(e,t,()=>{let{node:s}=e.docView.domFromPos(i.pos,r=="up"?-1:1);for(;;){let l=e.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=W9(e,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ma(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(r=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const X$e=/[\u0590-\u08ac]/;function Y$e(e,t,r){let{$head:n}=t.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,s=!i,o=i==n.parent.content.size,l=e.domSelection();return!X$e.test(n.parent.textContent)||!l.modify?r=="left"||r=="backward"?s:o:V9(e,t,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:h}=e.domSelectionRange(),d=l.caretBidiLevel;l.modify("move",r,"character");let f=n.depth?e.docView.domAfterPos(n.before()):e.dom,{focusNode:p,focusOffset:g}=e.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==g;try{l.collapse(u,h),a&&(a!=u||c!=h)&&l.extend&&l.extend(a,c)}catch{}return d!=null&&(l.caretBidiLevel=d),y})}let MO=null,LO=null,OO=!1;function Z$e(e,t,r){return MO==t&&LO==r?OO:(MO=t,LO=r,OO=r=="up"||r=="down"?J$e(e,t,r):Y$e(e,t,r))}const Zs=0,RO=1,cc=2,ga=3;class Xg{constructor(t,r,n,i){this.parent=t,this.children=r,this.dom=n,this.contentDOM=i,this.dirty=Zs,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,r,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let r=0;rzi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(r==0)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&r==t.childNodes.length)for(let s=t;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(t,r=!1){for(let n=!0,i=t;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!r||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))n=!1;else return s}}getDesc(t){let r=t.pmViewDesc;for(let n=r;n;n=n.parent)if(n==this)return r}posFromDOM(t,r,n){for(let i=t;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(t,r,n)}return-1}descAt(t){for(let r=0,n=0;rt||o instanceof q9){i=t-s;break}s=l}if(i)return this.children[n].domFromPos(i-this.children[n].border,r);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof G9&&s.side>=0;n--);if(r<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&r&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,r):{node:this.contentDOM,offset:s?zi(s.dom)+1:0}}else{let s,o=!0;for(;s=n=u&&r<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(t,r,u);t=o;for(let h=l;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=zi(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(c>r||l==this.children.length-1)){r=c;for(let u=l+1;uf&&or){let f=l;l=a,a=f}let d=document.createRange();d.setEnd(a.node,a.offset),d.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(d)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,r){for(let n=0,i=0;i=n:tn){let l=n+s.border,a=o-s.border;if(t>=l&&r<=a){this.dirty=t==n||r==o?cc:RO,t==l&&r==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=ga:s.markDirty(t-l,r-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?cc:ga}n=o}this.dirty=cc}markParentsDirty(){let t=1;for(let r=this.parent;r;r=r.parent,t++){let n=t==1?cc:RO;r.dirty{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!r.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(t,[],o,null),this.widget=r,this.widget=r,s=this}matchesWidget(t){return this.dirty==Zs&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let r=this.widget.spec.stopEvent;return r?r(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Q$e extends Xg{constructor(t,r,n,i){super(t,[],r,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(t,r){return t!=this.textDOM?this.posAtStart+(r?this.size:0):this.posAtStart+r}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Gc extends Xg{constructor(t,r,n,i){super(t,[],n,i),this.mark=r}static create(t,r,n,i){let s=i.nodeViews[r.type.name],o=s&&s(r,i,n);return(!o||!o.dom)&&(o=ea.renderSpec(document,r.type.spec.toDOM(r,n))),new Gc(t,r,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&ga||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=ga&&this.mark.eq(t)}markDirty(t,r){if(super.markDirty(t,r),this.dirty!=Zs){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty0&&(s=GT(s,0,t,n));for(let l=0;l{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},n,i),u=c&&c.dom,h=c&&c.contentDOM;if(r.isText){if(!u)u=document.createTextNode(r.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:h}=ea.renderSpec(document,r.type.spec.toDOM(r)));!h&&!r.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),r.type.spec.draggable&&(u.draggable=!0));let d=u;return u=X9(u,n,r),c?a=new e2e(t,r,n,i,u,h||null,d,c,s,o+1):r.isText?new fx(t,r,n,i,u,d,s):new su(t,r,n,i,u,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let r=this.children.length-1;r>=0;r--){let n=this.children[r];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>qe.empty)}return t}matchesNode(t,r,n){return this.dirty==Zs&&t.eq(this.node)&&VT(r,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,r){let n=this.node.inlineContent,i=r,s=t.composing?this.localCompositionInfo(t,r):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new r2e(this,o&&o.node,t);s2e(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?a.syncToMarks(c.spec.marks,n,t):c.type.side>=0&&!h&&a.syncToMarks(u==this.node.childCount?Br.none:this.node.child(u).marks,n,t),a.placeWidget(c,t,i)},(c,u,h,d)=>{a.syncToMarks(c.marks,n,t);let f;a.findNodeMatch(c,u,h,d)||l&&t.state.selection.from>i&&t.state.selection.to-1&&a.updateNodeAt(c,u,h,f,t)||a.updateNextNode(c,u,h,t,d,i)||a.addNode(c,u,h,t,i),i+=c.nodeSize}),a.syncToMarks([],n,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==cc)&&(o&&this.protectLocalComposition(t,o),K9(this.contentDOM,this.children,t),nf&&o2e(this.dom))}localCompositionInfo(t,r){let{from:n,to:i}=t.state.selection;if(!(t.state.selection instanceof Qt)||nr+this.node.content.size)return null;let s=t.domSelectionRange(),o=a2e(s.focusNode,s.focusOffset);if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let l=o.nodeValue,a=l2e(this.node.content,l,n-r,i-r);return a<0?null:{node:o,pos:a,text:l}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:r,pos:n,text:i}){if(this.getDesc(r))return;let s=r;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new Q$e(this,s,r,i);t.input.compositionNodes.push(o),this.children=GT(this.children,n,n+i.length,t,o)}update(t,r,n,i){return this.dirty==ga||!t.sameMarkup(this.node)?!1:(this.updateInner(t,r,n,i),!0)}updateInner(t,r,n,i){this.updateOuterDeco(r),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Zs}updateOuterDeco(t){if(VT(t,this.outerDeco))return;let r=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=J9(this.dom,this.nodeDOM,WT(this.outerDeco,this.node,r),WT(t,this.node,r)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function BO(e,t,r,n,i){X9(n,t,e);let s=new su(void 0,e,t,r,n,n,n,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class fx extends su{constructor(t,r,n,i,s,o,l){super(t,r,n,i,s,null,o,l,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,r,n,i){return this.dirty==ga||this.dirty!=Zs&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(r),(this.dirty!=Zs||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=Zs,!0)}inParent(){let t=this.parent.contentDOM;for(let r=this.nodeDOM;r;r=r.parentNode)if(r==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,r,n){return t==this.nodeDOM?this.posAtStart+Math.min(r,this.node.text.length):super.localPosFromDOM(t,r,n)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,r,n){let i=this.node.cut(t,r),s=document.createTextNode(i.text);return new fx(this.parent,i,this.outerDeco,this.innerDeco,s,s,n)}markDirty(t,r){super.markDirty(t,r),this.dom!=this.nodeDOM&&(t==0||r==this.nodeDOM.nodeValue.length)&&(this.dirty=ga)}get domAtom(){return!1}}class q9 extends Xg{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==Zs&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class e2e extends su{constructor(t,r,n,i,s,o,l,a,c,u){super(t,r,n,i,s,o,l,c,u),this.spec=a}update(t,r,n,i){if(this.dirty==ga)return!1;if(this.spec.update){let s=this.spec.update(t,r,n);return s&&this.updateInner(t,r,n,i),s}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,r,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,r,n,i){this.spec.setSelection?this.spec.setSelection(t,r,n):super.setSelection(t,r,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function K9(e,t,r){let n=e.firstChild,i=!1;for(let s=0;s>1,o=Math.min(s,t.length);for(;i-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Gc.create(this.top,t[s],r,n);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(t,r,n,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,r,n))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l0;){let l;for(;;)if(n){let c=r.children[n-1];if(c instanceof Gc)r=c,n=c.children.length;else{l=c,n--;break}}else{if(r==t)break e;n=r.parent.children.indexOf(r),r=r.parent}let a=l.node;if(a){if(a!=e.child(i-1))break;--i,s.set(l,i),o.push(l)}}return{index:i,matched:s,matches:o.reverse()}}function i2e(e,t){return e.type.side-t.type.side}function s2e(e,t,r,n){let i=t.locals(e),s=0;if(i.length==0){for(let c=0;cs;)l.push(i[o++]);let p=s+d.nodeSize;if(d.isText){let y=p;o!y.inline):l.slice();n(d,g,t.forChild(s,d),f),s=p}}function o2e(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function a2e(e,t){for(;;){if(e.nodeType==3)return e;if(e.nodeType==1&&t>0){if(e.childNodes.length>t&&e.childNodes[t].nodeType==3)return e.childNodes[t];e=e.childNodes[t-1],t=Yo(e)}else if(e.nodeType==1&&t=r){if(s>=n&&a.slice(n-t.length-l,n-l)==t)return n-t.length;let c=l=0&&c+t.length+l>=r)return l+c;if(r==n&&a.length>=n+t.length-l&&a.slice(n-l,n-l+t.length)==t)return n}}return-1}function GT(e,t,r,n,i){let s=[];for(let o=0,l=0;o=r||u<=t?s.push(a):(cr&&s.push(a.slice(r-c,a.size,n)))}return s}function A$(e,t=null){let r=e.domSelectionRange(),n=e.state.doc;if(!r.focusNode)return null;let i=e.docView.nearestDesc(r.focusNode),s=i&&i.size==0,o=e.docView.posFromDOM(r.focusNode,r.focusOffset,1);if(o<0)return null;let l=n.resolve(o),a,c;if(dx(r)){for(a=l;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&It.isSelectable(u)&&i.parent&&!(u.isInline&&P$e(r.focusNode,r.focusOffset,i.dom))){let h=i.posBefore;c=new It(o==h?l:n.resolve(h))}}else{let u=e.docView.posFromDOM(r.anchorNode,r.anchorOffset,1);if(u<0)return null;a=n.resolve(u)}if(!c){let u=t=="pointer"||e.state.selection.head{(r.anchorNode!=n||r.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!Y9(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function c2e(e){let t=e.domSelection(),r=document.createRange(),n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?r.setEnd(n.parentNode,zi(n)+1):r.setEnd(n,0),r.collapse(!1),t.removeAllRanges(),t.addRange(r),!i&&!e.state.selection.visible&&ps&&iu<=11&&(n.disabled=!0,n.disabled=!1)}function Z9(e,t){if(t instanceof It){let r=e.docView.descAt(t.from);r!=e.lastSelectedViewDesc&&(WO(e),r&&r.selectNode(),e.lastSelectedViewDesc=r)}else WO(e)}function WO(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function k$(e,t,r,n){return e.someProp("createSelectionBetween",i=>i(e,t,r))||Qt.between(t,r,n)}function VO(e){return e.editable&&!e.hasFocus()?!1:Q9(e)}function Q9(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function h2e(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),r=e.domSelectionRange();return Vc(t.node,t.offset,r.anchorNode,r.anchorOffset)}function qT(e,t){let{$anchor:r,$head:n}=e.selection,i=t>0?r.max(n):r.min(n),s=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return s&&ir.findFrom(s,t)}function Ol(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function GO(e,t,r){let n=e.state.selection;if(n instanceof Qt)if(r.indexOf("s")>-1){let{$head:i}=n,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=e.state.doc.resolve(i.pos+s.nodeSize*(t<0?-1:1));return Ol(e,new Qt(n.$anchor,o))}else if(n.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=qT(e.state,t);return i&&i instanceof It?Ol(e,i):!1}else if(!(Us&&r.indexOf("m")>-1)){let i=n.$head,s=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let l=t<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=e.docView.descAt(l))&&!o.contentDOM?It.isSelectable(s)?Ol(e,new It(t<0?e.state.doc.resolve(i.pos-s.nodeSize):i)):Jg?Ol(e,new Qt(e.state.doc.resolve(t<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof It&&n.node.isInline)return Ol(e,new Qt(t>0?n.$to:n.$from));{let i=qT(e.state,t);return i?Ol(e,i):!1}}}function hb(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Am(e,t){let r=e.pmViewDesc;return r&&r.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Vh(e,t){return t<0?d2e(e):f2e(e)}function d2e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i,s,o=!1;for(Ro&&r.nodeType==1&&n0){if(r.nodeType!=1)break;{let l=r.childNodes[n-1];if(Am(l,-1))i=r,s=--n;else if(l.nodeType==3)r=l,n=r.nodeValue.length;else break}}else{if(eU(r))break;{let l=r.previousSibling;for(;l&&Am(l,-1);)i=r.parentNode,s=zi(l),l=l.previousSibling;if(l)r=l,n=hb(r);else{if(r=r.parentNode,r==e.dom)break;n=0}}}o?KT(e,r,n):i&&KT(e,i,s)}function f2e(e){let t=e.domSelectionRange(),r=t.focusNode,n=t.focusOffset;if(!r)return;let i=hb(r),s,o;for(;;)if(n{e.state==i&&Va(e)},50)}function qO(e,t){let r=e.state.doc.resolve(t);if(!(Ai||L$e)&&r.parent.inlineContent){let i=e.coordsAtPos(t);if(t>r.start()){let s=e.coordsAtPos(t-1),o=(s.top+s.bottom)/2;if(o>i.top&&o1)return s.lefti.top&&o1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function KO(e,t,r){let n=e.state.selection;if(n instanceof Qt&&!n.empty||r.indexOf("s")>-1||Us&&r.indexOf("m")>-1)return!1;let{$from:i,$to:s}=n;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let o=qT(e.state,t);if(o&&o instanceof It)return Ol(e,o)}if(!i.parent.inlineContent){let o=t<0?i:s,l=n instanceof Mo?ir.near(o,t):ir.findFrom(o,t);return l?Ol(e,l):!1}return!1}function JO(e,t){if(!(e.state.selection instanceof Qt))return!0;let{$head:r,$anchor:n,empty:i}=e.state.selection;if(!r.sameParent(n))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let s=!r.textOffset&&(t<0?r.nodeBefore:r.nodeAfter);if(s&&!s.isText){let o=e.state.tr;return t<0?o.delete(r.pos-s.nodeSize,r.pos):o.delete(r.pos,r.pos+s.nodeSize),e.dispatch(o),!0}return!1}function XO(e,t,r){e.domObserver.stop(),t.contentEditable=r,e.domObserver.start()}function g2e(e){if(!Vi||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:r}=e.domSelectionRange();if(t&&t.nodeType==1&&r==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let n=t.firstChild;XO(e,n,"true"),setTimeout(()=>XO(e,n,"false"),20)}return!1}function y2e(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function v2e(e,t){let r=t.keyCode,n=y2e(t);if(r==8||Us&&r==72&&n=="c")return JO(e,-1)||Vh(e,-1);if(r==46&&!t.shiftKey||Us&&r==68&&n=="c")return JO(e,1)||Vh(e,1);if(r==13||r==27)return!0;if(r==37||Us&&r==66&&n=="c"){let i=r==37?qO(e,e.state.selection.from)=="ltr"?-1:1:-1;return GO(e,i,n)||Vh(e,i)}else if(r==39||Us&&r==70&&n=="c"){let i=r==39?qO(e,e.state.selection.from)=="ltr"?1:-1:1;return GO(e,i,n)||Vh(e,i)}else{if(r==38||Us&&r==80&&n=="c")return KO(e,-1,n)||Vh(e,-1);if(r==40||Us&&r==78&&n=="c")return g2e(e)||KO(e,1,n)||Vh(e,1);if(n==(Us?"m":"c")&&(r==66||r==73||r==89||r==90))return!0}return!1}function tU(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let r=[],{content:n,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,s--;let f=n.firstChild;r.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=e.someProp("clipboardSerializer")||ea.fromSchema(e.state.schema),l=aU(),a=l.createElement("div");a.appendChild(o.serializeFragment(n,{document:l}));let c=a.firstChild,u,h=0;for(;c&&c.nodeType==1&&(u=oU[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=l.createElement(u[f]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),h++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(r)}`);let d=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,` + +`);return{dom:a,text:d}}function rU(e,t,r,n,i){let s=i.parent.type.spec.code,o,l;if(!r&&!t)return null;let a=t&&(n||s||!r);if(a){if(e.someProp("transformPastedText",d=>{t=d(t,s||n,e)}),s)return t?new ut(qe.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0):ut.empty;let h=e.someProp("clipboardTextParser",d=>d(t,i,n,e));if(h)l=h;else{let d=i.marks(),{schema:f}=e.state,p=ea.fromSchema(f);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=o.appendChild(document.createElement("p"));g&&y.appendChild(p.serializeNode(f.text(g,d)))})}}else e.someProp("transformPastedHTML",h=>{r=h(r,e)}),o=w2e(r),Jg&&S2e(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||ef.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||u),context:i,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!b2e.test(d.parentNode.nodeName)?{ignore:!0}:null}})),u)l=D2e(YO(l,+u[1],+u[2]),u[4]);else if(l=ut.maxOpen(x2e(l.content,i),!0),l.openStart||l.openEnd){let h=0,d=0;for(let f=l.content.firstChild;h{l=h(l,e)}),l}const b2e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function x2e(e,t){if(e.childCount<2)return e;for(let r=t.depth;r>=0;r--){let i=t.node(r).contentMatchAt(t.index(r)),s,o=[];if(e.forEach(l=>{if(!o)return;let a=i.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&s.length&&iU(a,s,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=sU(o[o.length-1],s.length));let u=nU(l,a);o.push(u),i=i.matchType(u.type),s=a}}),o)return qe.from(o)}return e}function nU(e,t,r=0){for(let n=t.length-1;n>=r;n--)e=t[n].create(null,qe.from(e));return e}function iU(e,t,r,n,i){if(i1&&(s=0),i=r&&(l=t<0?o.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(qe.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(l))}function YO(e,t,r){return t]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let r=aU().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(e),i;if((i=n&&oU[n[1].toLowerCase()])&&(e=i.map(s=>"<"+s+">").join("")+e+i.map(s=>"").reverse().join("")),r.innerHTML=e,i)for(let s=0;s=0;l-=2){let a=r.nodes[n[l]];if(!a||a.hasRequiredAttrs())break;i=qe.from(a.create(n[l+1],i)),s++,o++}return new ut(i,s,o)}const Gi={},qi={},E2e={touchstart:!0,touchmove:!0};class C2e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function T2e(e){for(let t in Gi){let r=Gi[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=n=>{k2e(e,n)&&!_$(e,n)&&(e.editable||!(n.type in qi))&&r(e,n)},E2e[t]?{passive:!0}:void 0)}Vi&&e.dom.addEventListener("input",()=>null),XT(e)}function Kl(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function A2e(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function XT(e){e.someProp("handleDOMEvents",t=>{for(let r in t)e.input.eventHandlers[r]||e.dom.addEventListener(r,e.input.eventHandlers[r]=n=>_$(e,n))})}function _$(e,t){return e.someProp("handleDOMEvents",r=>{let n=r[t.type];return n?n(e,t)||t.defaultPrevented:!1})}function k2e(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let r=t.target;r!=e.dom;r=r.parentNode)if(!r||r.nodeType==11||r.pmViewDesc&&r.pmViewDesc.stopEvent(t))return!1;return!0}function _2e(e,t){!_$(e,t)&&Gi[t.type]&&(e.editable||!(t.type in qi))&&Gi[t.type](e,t)}qi.keydown=(e,t)=>{let r=t;if(e.input.shiftKey=r.keyCode==16||r.shiftKey,!uU(e,r)&&(e.input.lastKeyCode=r.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Ao&&Ai&&r.keyCode==13)))if(r.keyCode!=229&&e.domObserver.forceFlush(),nf&&r.keyCode==13&&!r.ctrlKey&&!r.altKey&&!r.metaKey){let n=Date.now();e.input.lastIOSEnter=n,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==n&&(e.someProp("handleKeyDown",i=>i(e,tc(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",n=>n(e,r))||v2e(e,r)?r.preventDefault():Kl(e,"key")};qi.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};qi.keypress=(e,t)=>{let r=t;if(uU(e,r)||!r.charCode||r.ctrlKey&&!r.altKey||Us&&r.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,r))){r.preventDefault();return}let n=e.state.selection;if(!(n instanceof Qt)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(r.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",s=>s(e,n.$from.pos,n.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),r.preventDefault()}};function px(e){return{left:e.clientX,top:e.clientY}}function $2e(e,t){let r=t.x-e.clientX,n=t.y-e.clientY;return r*r+n*n<100}function $$(e,t,r,n,i){if(n==-1)return!1;let s=e.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,l=>o>s.depth?l(e,r,s.nodeAfter,s.before(o),i,!0):l(e,r,s.node(o),s.before(o),i,!1)))return!0;return!1}function $d(e,t,r){e.focused||e.focus();let n=e.state.tr.setSelection(t);r=="pointer"&&n.setMeta("pointer",!0),e.dispatch(n)}function F2e(e,t){if(t==-1)return!1;let r=e.state.doc.resolve(t),n=r.nodeAfter;return n&&n.isAtom&&It.isSelectable(n)?($d(e,new It(r),"pointer"),!0):!1}function P2e(e,t){if(t==-1)return!1;let r=e.state.selection,n,i;r instanceof It&&(n=r.node);let s=e.state.doc.resolve(t);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(It.isSelectable(l)){n&&r.$from.depth>0&&o>=r.$from.depth&&s.before(r.$from.depth+1)==r.$from.pos?i=s.before(r.$from.depth):i=s.before(o);break}}return i!=null?($d(e,It.create(e.state.doc,i),"pointer"),!0):!1}function I2e(e,t,r,n,i){return $$(e,"handleClickOn",t,r,n)||e.someProp("handleClick",s=>s(e,t,n))||(i?P2e(e,r):F2e(e,r))}function N2e(e,t,r,n){return $$(e,"handleDoubleClickOn",t,r,n)||e.someProp("handleDoubleClick",i=>i(e,t,n))}function M2e(e,t,r,n){return $$(e,"handleTripleClickOn",t,r,n)||e.someProp("handleTripleClick",i=>i(e,t,n))||L2e(e,r,n)}function L2e(e,t,r){if(r.button!=0)return!1;let n=e.state.doc;if(t==-1)return n.inlineContent?($d(e,Qt.create(n,0,n.content.size),"pointer"),!0):!1;let i=n.resolve(t);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(o.inlineContent)$d(e,Qt.create(n,l+1,l+1+o.content.size),"pointer");else if(It.isSelectable(o))$d(e,It.create(n,l),"pointer");else continue;return!0}}function F$(e){return db(e)}const lU=Us?"metaKey":"ctrlKey";Gi.mousedown=(e,t)=>{let r=t;e.input.shiftKey=r.shiftKey;let n=F$(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&$2e(r,e.input.lastClick)&&!r[lU]&&(e.input.lastClick.type=="singleClick"?s="doubleClick":e.input.lastClick.type=="doubleClick"&&(s="tripleClick")),e.input.lastClick={time:i,x:r.clientX,y:r.clientY,type:s};let o=e.posAtCoords(px(r));o&&(s=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new O2e(e,o,r,!!n)):(s=="doubleClick"?N2e:M2e)(e,o.pos,o.inside,r)?r.preventDefault():Kl(e,"pointer"))};class O2e{constructor(t,r,n,i){this.view=t,this.pos=r,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[lU],this.allowDefault=n.shiftKey;let s,o;if(r.inside>-1)s=t.state.doc.nodeAt(r.inside),o=r.inside;else{let u=t.state.doc.resolve(r.pos);s=u.parent,o=u.depth?u.before():0}const l=i?null:n.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:c}=t.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof It&&c.from<=o&&c.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Ro&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Kl(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Va(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let r=this.pos;this.view.state.doc!=this.startDoc&&(r=this.view.posAtCoords(px(t))),this.updateAllowDefault(t),this.allowDefault||!r?Kl(this.view,"pointer"):I2e(this.view,r.pos,r.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Vi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ai&&!this.view.state.selection.visible&&Math.min(Math.abs(r.pos-this.view.state.selection.from),Math.abs(r.pos-this.view.state.selection.to))<=2)?($d(this.view,ir.near(this.view.state.doc.resolve(r.pos)),"pointer"),t.preventDefault()):Kl(this.view,"pointer")}move(t){this.updateAllowDefault(t),Kl(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Gi.touchstart=e=>{e.input.lastTouch=Date.now(),F$(e),Kl(e,"pointer")};Gi.touchmove=e=>{e.input.lastTouch=Date.now(),Kl(e,"pointer")};Gi.contextmenu=e=>F$(e);function uU(e,t){return e.composing?!0:Vi&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const R2e=Ao?5e3:-1;qi.compositionstart=qi.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,r=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!r.textOffset&&r.parentOffset&&r.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||r.marks(),db(e,!0),e.markCursor=null;else if(db(e),Ro&&t.selection.empty&&r.parentOffset&&!r.textOffset&&r.nodeBefore.marks.length){let n=e.domSelectionRange();for(let i=n.focusNode,s=n.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){e.domSelection().collapse(o,o.nodeValue.length);break}else i=o,s=-1}}e.input.composing=!0}cU(e,R2e)};qi.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,cU(e,20))};function cU(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>db(e),t))}function hU(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=B2e());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function B2e(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function db(e,t=!1){if(!(Ao&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),hU(e),t||e.docView&&e.docView.dirty){let r=A$(e);return r&&!r.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(r)):e.updateState(e.state),!0}return!1}}function j2e(e,t){if(!e.dom.parentNode)return;let r=e.dom.parentNode.appendChild(document.createElement("div"));r.appendChild(t),r.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{r.parentNode&&r.parentNode.removeChild(r),e.focus()},50)}const gg=ps&&iu<15||nf&&O$e<604;Gi.copy=qi.cut=(e,t)=>{let r=t,n=e.state.selection,i=r.type=="cut";if(n.empty)return;let s=gg?null:r.clipboardData,o=n.content(),{dom:l,text:a}=tU(e,o);s?(r.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):j2e(e,l),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function z2e(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function H2e(e,t){if(!e.dom.parentNode)return;let r=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,n=e.dom.parentNode.appendChild(document.createElement(r?"textarea":"div"));r||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),n.parentNode&&n.parentNode.removeChild(n),r?yg(e,n.value,null,i,t):yg(e,n.textContent,n.innerHTML,i,t)},50)}function yg(e,t,r,n,i){let s=rU(e,t,r,n,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,i,s||ut.empty)))return!0;if(!s)return!1;let o=z2e(s),l=o?e.state.tr.replaceSelectionWith(o,n):e.state.tr.replaceSelection(s);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function dU(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let r=e.getData("text/uri-list");return r?r.replace(/\r?\n/g," "):""}qi.paste=(e,t)=>{let r=t;if(e.composing&&!Ao)return;let n=gg?null:r.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;n&&yg(e,dU(n),n.getData("text/html"),i,r)?r.preventDefault():H2e(e,r)};class fU{constructor(t,r,n){this.slice=t,this.move=r,this.node=n}}const pU=Us?"altKey":"ctrlKey";Gi.dragstart=(e,t)=>{let r=t,n=e.input.mouseDown;if(n&&n.done(),!r.dataTransfer)return;let i=e.state.selection,s=i.empty?null:e.posAtCoords(px(r)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof It?i.to-1:i.to))){if(n&&n.mightDrag)o=It.create(e.state.doc,n.mightDrag.pos);else if(r.target&&r.target.nodeType==1){let u=e.docView.nearestDesc(r.target,!0);u&&u.node.type.spec.draggable&&u!=e.docView&&(o=It.create(e.state.doc,u.posBefore))}}let l=(o||e.state.selection).content(),{dom:a,text:c}=tU(e,l);r.dataTransfer.clearData(),r.dataTransfer.setData(gg?"Text":"text/html",a.innerHTML),r.dataTransfer.effectAllowed="copyMove",gg||r.dataTransfer.setData("text/plain",c),e.dragging=new fU(l,!r[pU],o)};Gi.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};qi.dragover=qi.dragenter=(e,t)=>t.preventDefault();qi.drop=(e,t)=>{let r=t,n=e.dragging;if(e.dragging=null,!r.dataTransfer)return;let i=e.posAtCoords(px(r));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",p=>{o=p(o,e)}):o=rU(e,dU(r.dataTransfer),gg?null:r.dataTransfer.getData("text/html"),!1,s);let l=!!(n&&!r[pU]);if(e.someProp("handleDrop",p=>p(e,r,o||ut.empty,l))){r.preventDefault();return}if(!o)return;r.preventDefault();let a=o?b$e(e.state.doc,s.pos,o):s.pos;a==null&&(a=s.pos);let c=e.state.tr;if(l){let{node:p}=n;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(a),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=c.doc;if(h?c.replaceRangeWith(u,u,o.content.firstChild):c.replaceRange(u,u,o),c.doc.eq(d))return;let f=c.doc.resolve(u);if(h&&It.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new It(f));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,y,b,v)=>p=v),c.setSelection(k$(e,f,c.doc.resolve(p)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Gi.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Va(e)},20))};Gi.blur=(e,t)=>{let r=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),r.relatedTarget&&e.dom.contains(r.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Gi.beforeinput=(e,t)=>{if(Ai&&Ao&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",s=>s(e,tc(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in qi)Gi[e]=qi[e];function vg(e,t){if(e==t)return!0;for(let r in e)if(e[r]!==t[r])return!1;for(let r in t)if(!(r in e))return!1;return!0}class fb{constructor(t,r){this.toDOM=t,this.spec=r||Sc,this.side=this.spec.side||0}map(t,r,n,i){let{pos:s,deleted:o}=t.mapResult(r.from+i,this.side<0?-1:1);return o?null:new Fo(s-n,s-n,this)}valid(){return!0}eq(t){return this==t||t instanceof fb&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&vg(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class ou{constructor(t,r){this.attrs=t,this.spec=r||Sc}map(t,r,n,i){let s=t.map(r.from+i,this.spec.inclusiveStart?-1:1)-n,o=t.map(r.to+i,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new Fo(s,o,this)}valid(t,r){return r.from=t&&(!s||s(l.spec))&&n.push(l.copy(l.from+i,l.to+i))}for(let o=0;ot){let l=this.children[o]+1;this.children[o+2].findInner(t-l,r-l,n,i+l,s)}}map(t,r,n){return this==Di||t.maps.length==0?this:this.mapInner(t,r,0,0,n||Sc)}mapInner(t,r,n,i,s){let o;for(let l=0;l{let c=a+n,u;if(u=gU(r,l,c)){for(i||(i=this.children.slice());sl&&h.to=t){this.children[l]==t&&(n=this.children[l+2]);break}let s=t+1,o=s+r.content.size;for(let l=0;ls&&a.type instanceof ou){let c=Math.max(s,a.from)-s,u=Math.min(o,a.to)-s;ci.map(t,r,Sc));return zl.from(n)}forChild(t,r){if(r.isLeaf)return Gn.empty;let n=[];for(let i=0;ir instanceof Gn)?t:t.reduce((r,n)=>r.concat(n instanceof Gn?n:n.members),[]))}}}function U2e(e,t,r,n,i,s,o){let l=e.slice();for(let c=0,u=s;c{let y=g-p-(f-d);for(let b=0;bv+u-h)continue;let E=l[b]+u-h;f>=E?l[b+1]=d<=E?-2:-1:d>=u&&y&&(l[b]+=y,l[b+1]+=y)}h+=y}),u=r.maps[c].map(u,-1)}let a=!1;for(let c=0;c=n.content.size){a=!0;continue}let d=r.map(e[c+1]+s,-1),f=d-i,{index:p,offset:g}=n.content.findIndex(h),y=n.maybeChild(p);if(y&&g==h&&g+y.nodeSize==f){let b=l[c+2].mapInner(r,y,u+1,e[c]+s+1,o);b!=Di?(l[c]=h,l[c+1]=f,l[c+2]=b):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=W2e(l,e,t,r,i,s,o),u=pb(c,n,0,o);t=u.local;for(let h=0;hr&&o.to{let c=gU(e,l,a+r);if(c){s=!0;let u=pb(c,l,r+a+1,n);u!=Di&&i.push(a,a+l.nodeSize,u)}});let o=mU(s?yU(e):e,-r).sort(Dc);for(let l=0;l0;)t++;e.splice(t,0,r)}function WD(e){let t=[];return e.someProp("decorations",r=>{let n=r(e.state);n&&n!=Di&&t.push(n)}),e.cursorWrapper&&t.push(Gn.create(e.state.doc,[e.cursorWrapper.deco])),zl.from(t)}const V2e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},G2e=ps&&iu<=11;class q2e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class K2e{constructor(t,r){this.view=t,this.handleDOMChange=r,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new q2e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;ii.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),G2e&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,V2e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let r=0;rthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(VO(this.view)){if(this.suppressingSelectionUpdates)return Va(this.view);if(ps&&iu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Vc(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let r=new Set,n;for(let s=t.focusNode;s;s=mg(s))r.add(s);for(let s=t.anchorNode;s;s=mg(s))if(r.has(s)){n=s;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let r=this.pendingRecords();r.length&&(this.queue=[]);let n=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&VO(t)&&!this.ignoreSelectionChange(n),s=-1,o=-1,l=!1,a=[];if(t.editable)for(let u=0;u1){let u=a.filter(h=>h.nodeName=="BR");if(u.length==2){let h=u[0],d=u[1];h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}}let c=null;s<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||i)&&(s>-1&&(t.docView.markDirty(s,o),J2e(t)),this.handleDOMChange(s,o,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Va(t),this.currentSelection.set(n))}registerMutation(t,r){if(r.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(n==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!n||n.ignoreMutation(t))return null;if(t.type=="childList"){for(let u=0;ui;y--){let b=n.childNodes[y-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){s=y;break}if(!v||v.size)break}let h=e.state.doc,d=e.someProp("domParser")||ef.fromSchema(e.state.schema),f=h.resolve(o),p=null,g=d.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Z2e,context:f});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),p={anchor:y+o,head:b+o}}return{doc:g,sel:p,from:o,to:l}}function Z2e(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Vi&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let r=document.createElement("div");return r.appendChild(document.createElement("li")),{skip:r}}else if(e.parentNode.lastChild==e||Vi&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Q2e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function eFe(e,t,r,n,i){let s=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let $=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,I=A$(e,$);if(I&&!e.state.selection.eq(I)){if(Ai&&Ao&&e.input.lastKeyCode===13&&Date.now()-100L(e,tc(13,"Enter"))))return;let N=e.state.tr.setSelection(I);$=="pointer"?N.setMeta("pointer",!0):$=="key"&&N.scrollIntoView(),s&&N.setMeta("composition",s),e.dispatch(N)}return}let o=e.state.doc.resolve(t),l=o.sharedDepth(r);t=o.before(l+1),r=e.state.doc.resolve(r).after(l+1);let a=e.state.selection,c=Y2e(e,t,r),u=e.state.doc,h=u.slice(c.from,c.to),d,f;e.input.lastKeyCode===8&&Date.now()-100Date.now()-225||Ao)&&i.some($=>$.nodeType==1&&!Q2e.test($.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",$=>$(e,tc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!p)if(n&&a instanceof Qt&&!a.empty&&a.$head.sameParent(a.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let $=rR(e,e.state.doc,c.sel);if($&&!$.eq(e.state.selection)){let I=e.state.tr.setSelection($);s&&I.setMeta("composition",s),e.dispatch(I)}}return}if(Ai&&e.cursorWrapper&&c.sel&&c.sel.anchor==e.cursorWrapper.deco.from&&c.sel.head==c.sel.anchor){let $=p.endB-p.start;c.sel={anchor:c.sel.anchor+$,head:c.sel.anchor+$}}e.input.domChangeCount++,e.state.selection.frome.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?p.start=e.state.selection.from:p.endA=e.state.selection.to-2&&e.state.selection.to<=c.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),ps&&iu<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let g=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),b=u.resolve(p.start),v=g.sameParent(y)&&g.parent.inlineContent&&b.end()>=p.endA,E;if((nf&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some($=>$.nodeName=="DIV"||$.nodeName=="P"))||!v&&g.pos$(e,tc(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>p.start&&rFe(u,p.start,p.endA,g,y)&&e.someProp("handleKeyDown",$=>$(e,tc(8,"Backspace")))){Ao&&Ai&&e.domObserver.suppressSelectionUpdates();return}Ai&&Ao&&p.endB==p.start&&(e.input.lastAndroidDelete=Date.now()),Ao&&!v&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function($){return $(e,tc(13,"Enter"))})},20));let D=p.start,C=p.endA,w,T,A;if(v){if(g.pos==y.pos)ps&&iu<=11&&g.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Va(e),20)),w=e.state.tr.delete(D,C),T=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(A=tFe(g.parent.content.cut(g.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))w=e.state.tr,A.type=="add"?w.addMark(D,C,A.mark):w.removeMark(D,C,A.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let $=g.parent.textBetween(g.parentOffset,y.parentOffset);if(e.someProp("handleTextInput",I=>I(e,D,C,$)))return;w=e.state.tr.insertText($,D,C)}}if(w||(w=e.state.tr.replace(D,C,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let $=rR(e,w.doc,c.sel);$&&!(Ai&&Ao&&e.composing&&$.empty&&(p.start!=p.endB||e.input.lastAndroidDeletet.content.size?null:k$(e,t.resolve(r.anchor),t.resolve(r.head))}function tFe(e,t){let r=e.firstChild.marks,n=t.firstChild.marks,i=r,s=n,o,l,a;for(let u=0;uu.mark(l.addToSet(u.marks));else if(i.length==0&&s.length==1)l=s[0],o="remove",a=u=>u.mark(l.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ur||VD(o,!0,!1)0&&(t||e.indexAfter(n)==e.node(n).childCount);)n--,i++,t=!1;if(r){let s=e.node(n).maybeChild(e.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function nFe(e,t,r,n,i){let s=e.findDiffStart(t,r);if(s==null)return null;let{a:o,b:l}=e.findDiffEnd(t,r+e.size,r+t.size);if(i=="end"){let a=Math.max(0,s-Math.min(o,l));n-=o+a-s}if(o=o?s-n:0;s-=a,s&&s=l?s-n:0;s-=a,s&&s=56320&&t<=57343&&r>=55296&&r<=56319}class iFe{constructor(t,r){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new C2e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=r,this.state=r.state,this.directPlugins=r.plugins||[],this.directPlugins.forEach(lR),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=oR(this),sR(this),this.nodeViews=aR(this),this.docView=BO(this.state.doc,iR(this),WD(this),this.dom,this),this.domObserver=new K2e(this,(n,i,s,o)=>eFe(this,n,i,s,o)),this.domObserver.start(),T2e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let r in t)this._props[r]=t[r];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&XT(this);let r=this._props;this._props=t,t.plugins&&(t.plugins.forEach(lR),this.directPlugins=t.plugins),this.updateStateInner(t.state,r)}setProps(t){let r={};for(let n in this._props)r[n]=this._props[n];r.state=this.state;for(let n in t)r[n]=t[n];this.update(r)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,r){var n;let i=this.state,s=!1,o=!1;t.storedMarks&&this.composing&&(hU(this),o=!0),this.state=t;let l=i.plugins!=t.plugins||this._props.plugins!=r.plugins;if(l||this._props.plugins!=r.plugins||this._props.nodeViews!=r.nodeViews){let f=aR(this);oFe(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(l||r.handleDOMEvents!=this._props.handleDOMEvents)&&XT(this),this.editable=oR(this),sR(this);let a=WD(this),c=iR(this),u=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(t.doc,c,a);(h||!t.selection.eq(i.selection))&&(o=!0);let d=u=="preserve"&&o&&this.dom.style.overflowAnchor==null&&j$e(this);if(o){this.domObserver.stop();let f=h&&(ps||Ai)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&sFe(i.selection,t.selection);if(h){let p=Ai?this.trackWrites=this.domSelectionRange().focusNode:null;(s||!this.docView.update(t.doc,c,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=BO(t.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&h2e(this))?Va(this,f):(Z9(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&z$e(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",r=>r(this)))if(this.state.selection instanceof It){let r=this.docView.domAfterPos(this.state.selection.from);r.nodeType==1&&IO(this,r.getBoundingClientRect(),t)}else IO(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let r=0;r0&&this.state.doc.nodeAt(s))==n.node&&(i=s)}this.dragging=new fU(t.slice,t.move,i<0?void 0:It.create(this.state.doc,i))}someProp(t,r){let n=this._props&&this._props[t],i;if(n!=null&&(i=r?r(n):n))return i;for(let o=0;or.ownerDocument.getSelection()),this._root=r}return t||document}updateRoot(){this._root=null}posAtCoords(t){return q$e(this,t)}coordsAtPos(t,r=1){return W9(this,t,r)}domAtPos(t,r=0){return this.docView.domFromPos(t,r)}nodeDOM(t){let r=this.docView.descAt(t);return r?r.nodeDOM:null}posAtDOM(t,r,n=-1){let i=this.docView.posFromDOM(t,r,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,r){return Z$e(this,r||this.state,t)}pasteHTML(t,r){return yg(this,"",t,!1,r||new ClipboardEvent("paste"))}pasteText(t,r){return yg(this,t,null,!0,r||new ClipboardEvent("paste"))}destroy(){this.docView&&(A2e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],WD(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return _2e(this,t)}dispatch(t){let r=this._props.dispatchTransaction;r?r.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return Vi&&this.root.nodeType===11&&I$e(this.dom.ownerDocument)==this.dom?X2e(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function iR(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",r=>{if(typeof r=="function"&&(r=r(e.state)),r)for(let n in r)n=="class"?t.class+=" "+r[n]:n=="style"?t.style=(t.style?t.style+";":"")+r[n]:!t[n]&&n!="contenteditable"&&n!="nodeName"&&(t[n]=String(r[n]))}),t.translate||(t.translate="no"),[Fo.node(0,e.state.doc.content.size,t)]}function sR(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Fo.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function oR(e){return!e.someProp("editable",t=>t(e.state)===!1)}function sFe(e,t){let r=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(r)!=t.$anchor.start(r)}function aR(e){let t=Object.create(null);function r(n){for(let i in n)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n[i])}return e.someProp("nodeViews",r),e.someProp("markViews",r),t}function oFe(e,t){let r=0,n=0;for(let i in e){if(e[i]!=t[i])return!0;r++}for(let i in t)n++;return r!=n}function lR(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var bu={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},mb={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},aFe=typeof navigator<"u"&&/Mac/.test(navigator.platform),lFe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ui=0;ui<10;ui++)bu[48+ui]=bu[96+ui]=String(ui);for(var ui=1;ui<=24;ui++)bu[ui+111]="F"+ui;for(var ui=65;ui<=90;ui++)bu[ui]=String.fromCharCode(ui+32),mb[ui]=String.fromCharCode(ui);for(var GD in bu)mb.hasOwnProperty(GD)||(mb[GD]=bu[GD]);function uFe(e){var t=aFe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||lFe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",r=!t&&e.key||(e.shiftKey?mb:bu)[e.keyCode]||e.key||"Unidentified";return r=="Esc"&&(r="Escape"),r=="Del"&&(r="Delete"),r=="Left"&&(r="ArrowLeft"),r=="Up"&&(r="ArrowUp"),r=="Right"&&(r="ArrowRight"),r=="Down"&&(r="ArrowDown"),r}const cFe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function hFe(e){let t=e.split(/-(?!$)/),r=t[t.length-1];r=="Space"&&(r=" ");let n,i,s,o;for(let l=0;l127)&&(s=bu[n.keyCode])&&s!=i){let l=t[qD(s,n)];if(l&&l(r.state,r.dispatch,r))return!0}}return!1}}const mFe=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function vU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("backward",e):r.parentOffset>0)?null:r}const gFe=(e,t,r)=>{let n=vU(e,r);if(!n)return!1;let i=N$(n);if(!i){let o=n.blockRange(),l=o&&jf(o);return l==null?!1:(t&&t(e.tr.lift(o,l).scrollIntoView()),!0)}let s=i.nodeBefore;if(!s.type.spec.isolating&&SU(e,i,t))return!0;if(n.parent.content.size==0&&(sf(s,"end")||It.isSelectable(s))){let o=cx(e.doc,n.before(),n.after(),ut.empty);if(o&&o.slice.size{let n=vU(e,r);if(!n)return!1;let i=N$(n);return i?bU(e,i,t):!1},vFe=(e,t,r)=>{let n=xU(e,r);if(!n)return!1;let i=M$(n);return i?bU(e,i,t):!1};function bU(e,t,r){let n=t.nodeBefore,i=n,s=t.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let o=t.nodeAfter,l=o,a=t.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let c=cx(e.doc,s,a,ut.empty);if(!c||c.from!=s||c instanceof qn&&c.slice.size>=a-s)return!1;if(r){let u=e.tr.step(c);u.setSelection(Qt.create(u.doc,s)),r(u.scrollIntoView())}return!0}function sf(e,t,r=!1){for(let n=e;n;n=t=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(r&&n.childCount!=1)return!1}return!1}const bFe=(e,t,r)=>{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("backward",e):n.parentOffset>0)return!1;s=N$(n)}let o=s&&s.nodeBefore;return!o||!It.isSelectable(o)?!1:(t&&t(e.tr.setSelection(It.create(e.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function N$(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function xU(e,t){let{$cursor:r}=e.selection;return!r||(t?!t.endOfTextblock("forward",e):r.parentOffset{let n=xU(e,r);if(!n)return!1;let i=M$(n);if(!i)return!1;let s=i.nodeAfter;if(SU(e,i,t))return!0;if(n.parent.content.size==0&&(sf(s,"start")||It.isSelectable(s))){let o=cx(e.doc,n.before(),n.after(),ut.empty);if(o&&o.slice.size{let{$head:n,empty:i}=e.selection,s=n;if(!i)return!1;if(n.parent.isTextblock){if(r?!r.endOfTextblock("forward",e):n.parentOffset=0;t--){let r=e.node(t);if(e.index(t)+1{let r=e.selection,n=r instanceof It,i;if(n){if(r.node.isTextblock||!ph(e.doc,r.from))return!1;i=r.from}else if(i=ux(e.doc,r.from,-1),i==null)return!1;if(t){let s=e.tr.join(i);n&&s.setSelection(It.create(s.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(s.scrollIntoView())}return!0},DFe=(e,t)=>{let r=e.selection,n;if(r instanceof It){if(r.node.isTextblock||!ph(e.doc,r.to))return!1;n=r.to}else if(n=ux(e.doc,r.to,1),n==null)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0},EFe=(e,t)=>{let{$from:r,$to:n}=e.selection,i=r.blockRange(n),s=i&&jf(i);return s==null?!1:(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},CFe=(e,t)=>{let{$head:r,$anchor:n}=e.selection;return!r.parent.type.spec.code||!r.sameParent(n)?!1:(t&&t(e.tr.insertText(` +`).scrollIntoView()),!0)};function wU(e){for(let t=0;t{let{$head:r,$anchor:n}=e.selection;if(!r.parent.type.spec.code||!r.sameParent(n))return!1;let i=r.node(-1),s=r.indexAfter(-1),o=wU(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(t){let l=r.after(),a=e.tr.replaceWith(l,l,o.createAndFill());a.setSelection(ir.near(a.doc.resolve(l),1)),t(a.scrollIntoView())}return!0},AFe=(e,t)=>{let r=e.selection,{$from:n,$to:i}=r;if(r instanceof Mo||n.parent.inlineContent||i.parent.inlineContent)return!1;let s=wU(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let o=(!n.parentOffset&&i.index(){let{$cursor:r}=e.selection;if(!r||r.parent.content.size)return!1;if(r.depth>1&&r.after()!=r.end(-1)){let s=r.before();if(kd(e.doc,s))return t&&t(e.tr.split(s).scrollIntoView()),!0}let n=r.blockRange(),i=n&&jf(n);return i==null?!1:(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)},_Fe=(e,t)=>{let{$from:r,to:n}=e.selection,i,s=r.sharedDepth(n);return s==0?!1:(i=r.before(s),t&&t(e.tr.setSelection(It.create(e.doc,i))),!0)};function $Fe(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s=t.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&t.parent.canReplace(s-1,s)?(r&&r(e.tr.delete(t.pos-n.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(s,s+1)||!(i.isTextblock||ph(e.doc,t.pos))?!1:(r&&r(e.tr.clearIncompatible(t.pos,n.type,n.contentMatchAt(n.childCount)).join(t.pos).scrollIntoView()),!0)}function SU(e,t,r){let n=t.nodeBefore,i=t.nodeAfter,s,o;if(n.type.spec.isolating||i.type.spec.isolating)return!1;if($Fe(e,t,r))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(s=(o=n.contentMatchAt(n.childCount)).findWrapping(i.type))&&o.matchType(s[0]||i.type).validEnd){if(r){let h=t.pos+i.nodeSize,d=qe.empty;for(let g=s.length-1;g>=0;g--)d=qe.from(s[g].create(null,d));d=qe.from(n.copy(d));let f=e.tr.step(new Xn(t.pos-1,h,t.pos,h,new ut(d,1,0),s.length,!0)),p=h+2*s.length;ph(f.doc,p)&&f.join(p),r(f.scrollIntoView())}return!0}let a=ir.findFrom(t,1),c=a&&a.$from.blockRange(a.$to),u=c&&jf(c);if(u!=null&&u>=t.depth)return r&&r(e.tr.lift(c,u).scrollIntoView()),!0;if(l&&sf(i,"start",!0)&&sf(n,"end")){let h=n,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let f=i,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(h.canReplace(h.childCount,h.childCount,f.content)){if(r){let g=qe.empty;for(let b=d.length-1;b>=0;b--)g=qe.from(d[b].copy(g));let y=e.tr.step(new Xn(t.pos-d.length,t.pos+i.nodeSize,t.pos+p,t.pos+i.nodeSize-p,new ut(g,d.length,0),0,!0));r(y.scrollIntoView())}return!0}}return!1}function DU(e){return function(t,r){let n=t.selection,i=e<0?n.$from:n.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(r&&r(t.tr.setSelection(Qt.create(t.doc,e<0?i.start(s):i.end(s)))),!0):!1}}const FFe=DU(-1),PFe=DU(1);function IFe(e,t=null){return function(r,n){let{$from:i,$to:s}=r.selection,o=i.blockRange(s),l=o&&F9(o,e,t);return l?(n&&n(r.tr.wrap(o,l).scrollIntoView()),!0):!1}}function uR(e,t=null){return function(r,n){let i=!1;for(let s=0;s{if(i)return!1;if(!(!a.isTextblock||a.hasMarkup(e,t)))if(a.type==e)i=!0;else{let u=r.doc.resolve(c),h=u.index();i=u.parent.canReplaceWith(h,h+1,e)}})}if(!i)return!1;if(n){let s=r.tr;for(let o=0;o=2&&i.node(o.depth-1).type.compatibleContent(e)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let u=r.doc.resolve(o.start-2);a=new ab(u,u,o.depth),o.endIndex=0;u--)s=qe.from(r[u].type.create(r[u].attrs,s));e.step(new Xn(t.start-(n?2:0),t.end,t.start,t.end,new ut(s,0,0),r.length,!0));let o=0;for(let u=0;uo.childCount>0&&o.firstChild.type==e);return s?r?n.node(s.depth-1).type==e?OFe(t,r,e,s):RFe(t,r,s):!0:!1}}function OFe(e,t,r,n){let i=e.tr,s=n.end,o=n.$to.end(n.depth);sg;p--)f-=i.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(r.start),o=s.nodeAfter;if(n.mapping.map(r.end)!=r.start+s.nodeAfter.nodeSize)return!1;let l=r.startIndex==0,a=r.endIndex==i.childCount,c=s.node(-1),u=s.index(-1);if(!c.canReplace(u+(l?0:1),u+1,o.content.append(a?qe.empty:qe.from(i))))return!1;let h=s.pos,d=h+o.nodeSize;return n.step(new Xn(h-(l?1:0),d+(a?1:0),h+1,d-1,new ut((l?qe.empty:qe.from(i.copy(qe.empty))).append(a?qe.empty:qe.from(i.copy(qe.empty))),l?0:1,a?0:1),l?0:1)),t(n.scrollIntoView()),!0}function BFe(e){return function(t,r){let{$from:n,$to:i}=t.selection,s=n.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=e)return!1;if(r){let c=a.lastChild&&a.lastChild.type==l.type,u=qe.from(c?e.create():null),h=new ut(qe.from(e.create(null,qe.from(l.type.create(null,u)))),c?3:1,0),d=s.start,f=s.end;r(t.tr.step(new Xn(d-(c?3:1),f,d,f,h,1,!0)).scrollIntoView())}return!0}}function mx(e){const{state:t,transaction:r}=e;let{selection:n}=r,{doc:i}=r,{storedMarks:s}=r;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return s},get selection(){return n},get doc(){return i},get tr(){return n=r.selection,i=r.doc,s=r.storedMarks,r}}}class gx{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:r,state:n}=this,{view:i}=r,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([l,a])=>[l,(...u)=>{const h=a(...u)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(s),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,l=[],a=!!t,c=t||s.tr,u=()=>(!a&&r&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),l.every(d=>d===!0)),h={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...g)=>{const y=this.buildProps(c,r),b=f(...g)(y);return l.push(b),h}])),run:u};return h}createCan(t){const{rawCommands:r,state:n}=this,i=!1,s=t||n.tr,o=this.buildProps(s,i);return{...Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...u)=>c(...u)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,i)}}buildProps(t,r=!0){const{rawCommands:n,editor:i,state:s}=this,{view:o}=i,l={tr:t,editor:i,view:o,state:mx({state:s,transaction:t}),dispatch:r?()=>{}:void 0,chain:()=>this.createChain(t,r),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,c])=>[a,(...u)=>c(...u)(l)]))}};return l}}class jFe{constructor(){this.callbacks={}}on(t,r){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(r),this}emit(t,...r){const n=this.callbacks[t];return n&&n.forEach(i=>i.apply(this,r)),this}off(t,r){const n=this.callbacks[t];return n&&(r?this.callbacks[t]=n.filter(i=>i!==r):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function bt(e,t,r){return e.config[t]===void 0&&e.parent?bt(e.parent,t,r):typeof e.config[t]=="function"?e.config[t].bind({...r,parent:e.parent?bt(e.parent,t,r):null}):e.config[t]}function yx(e){const t=e.filter(i=>i.type==="extension"),r=e.filter(i=>i.type==="node"),n=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:r,markExtensions:n}}function EU(e){const t=[],{nodeExtensions:r,markExtensions:n}=yx(e),i=[...r,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},a=bt(o,"addGlobalAttributes",l);if(!a)return;a().forEach(u=>{u.types.forEach(h=>{Object.entries(u.attributes).forEach(([d,f])=>{t.push({type:h,name:d,attribute:{...s,...f}})})})})}),i.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},a=bt(o,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([u,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,t.push({type:o.name,name:u,attribute:d})})}),t}function Yn(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function mh(...e){return e.filter(t=>!!t).reduce((t,r)=>{const n={...t};return Object.entries(r).forEach(([i,s])=>{if(!n[i]){n[i]=s;return}if(i==="class"){const l=s?s.split(" "):[],a=n[i]?n[i].split(" "):[],c=l.filter(u=>!a.includes(u));n[i]=[...a,...c].join(" ")}else i==="style"?n[i]=[n[i],s].join("; "):n[i]=s}),n},{})}function YT(e,t){return t.filter(r=>r.attribute.rendered).map(r=>r.attribute.renderHTML?r.attribute.renderHTML(e.attrs)||{}:{[r.name]:e.attrs[r.name]}).reduce((r,n)=>mh(r,n),{})}function CU(e){return typeof e=="function"}function nr(e,t=void 0,...r){return CU(e)?t?e.bind(t)(...r):e(...r):e}function zFe(e={}){return Object.keys(e).length===0&&e.constructor===Object}function HFe(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function cR(e,t){return e.style?e:{...e,getAttrs:r=>{const n=e.getAttrs?e.getAttrs(r):e.attrs;if(n===!1)return!1;const i=t.reduce((s,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(r):HFe(r.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...n,...i}}}}function hR(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>t==="attrs"&&zFe(r)?!1:r!=null))}function UFe(e,t){var r;const n=EU(e),{nodeExtensions:i,markExtensions:s}=yx(e),o=(r=i.find(c=>bt(c,"topNode")))===null||r===void 0?void 0:r.name,l=Object.fromEntries(i.map(c=>{const u=n.filter(b=>b.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:t},d=e.reduce((b,v)=>{const E=bt(v,"extendNodeSchema",h);return{...b,...E?E(c):{}}},{}),f=hR({...d,content:nr(bt(c,"content",h)),marks:nr(bt(c,"marks",h)),group:nr(bt(c,"group",h)),inline:nr(bt(c,"inline",h)),atom:nr(bt(c,"atom",h)),selectable:nr(bt(c,"selectable",h)),draggable:nr(bt(c,"draggable",h)),code:nr(bt(c,"code",h)),defining:nr(bt(c,"defining",h)),isolating:nr(bt(c,"isolating",h)),attrs:Object.fromEntries(u.map(b=>{var v;return[b.name,{default:(v=b==null?void 0:b.attribute)===null||v===void 0?void 0:v.default}]}))}),p=nr(bt(c,"parseHTML",h));p&&(f.parseDOM=p.map(b=>cR(b,u)));const g=bt(c,"renderHTML",h);g&&(f.toDOM=b=>g({node:b,HTMLAttributes:YT(b,u)}));const y=bt(c,"renderText",h);return y&&(f.toText=y),[c.name,f]})),a=Object.fromEntries(s.map(c=>{const u=n.filter(y=>y.type===c.name),h={name:c.name,options:c.options,storage:c.storage,editor:t},d=e.reduce((y,b)=>{const v=bt(b,"extendMarkSchema",h);return{...y,...v?v(c):{}}},{}),f=hR({...d,inclusive:nr(bt(c,"inclusive",h)),excludes:nr(bt(c,"excludes",h)),group:nr(bt(c,"group",h)),spanning:nr(bt(c,"spanning",h)),code:nr(bt(c,"code",h)),attrs:Object.fromEntries(u.map(y=>{var b;return[y.name,{default:(b=y==null?void 0:y.attribute)===null||b===void 0?void 0:b.default}]}))}),p=nr(bt(c,"parseHTML",h));p&&(f.parseDOM=p.map(y=>cR(y,u)));const g=bt(c,"renderHTML",h);return g&&(f.toDOM=y=>g({mark:y,HTMLAttributes:YT(y,u)})),[c.name,f]}));return new X_e({topNode:o,nodes:l,marks:a})}function KD(e,t){return t.nodes[e]||t.marks[e]||null}function dR(e,t){return Array.isArray(t)?t.some(r=>(typeof r=="string"?r:r.name)===e.name):t}const WFe=(e,t=500)=>{let r="";const n=e.parentOffset;return e.parent.nodesBetween(Math.max(0,n-t),n,(i,s,o,l)=>{var a,c;const u=((c=(a=i.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:i,pos:s,parent:o,index:l}))||i.textContent||"%leaf%";r+=u.slice(0,Math.max(0,n-s))}),r};function L$(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class VFe{constructor(t){this.find=t.find,this.handler=t.handler}}const GFe=(e,t)=>{if(L$(t))return t.exec(e);const r=t(e);if(!r)return null;const n=[r.text];return n.index=r.index,n.input=e,n.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(r.replaceWith)),n};function uv(e){var t;const{editor:r,from:n,to:i,text:s,rules:o,plugin:l}=e,{view:a}=r;if(a.composing)return!1;const c=a.state.doc.resolve(n);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(d=>d.type.spec.code))return!1;let u=!1;const h=WFe(c)+s;return o.forEach(d=>{if(u)return;const f=GFe(h,d.find);if(!f)return;const p=a.state.tr,g=mx({state:a.state,transaction:p}),y={from:n-(f[0].length-s.length),to:i},{commands:b,chain:v,can:E}=new gx({editor:r,state:g});d.handler({state:g,range:y,match:f,commands:b,chain:v,can:E})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:n,to:i,text:s}),a.dispatch(p),u=!0)}),u}function qFe(e){const{editor:t,rules:r}=e,n=new Mu({state:{init(){return null},apply(i,s){const o=i.getMeta(n);if(o)return o;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{const{from:c,text:u}=l,h=c+u.length;uv({editor:t,from:c,to:h,text:u,rules:r,plugin:n})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,l){return uv({editor:t,from:s,to:o,text:l,rules:r,plugin:n})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&uv({editor:t,from:s.pos,to:s.pos,text:"",rules:r,plugin:n})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?uv({editor:t,from:o.pos,to:o.pos,text:` +`,rules:r,plugin:n}):!1}},isInputRules:!0});return n}function KFe(e){return typeof e=="number"}class JFe{constructor(t){this.find=t.find,this.handler=t.handler}}const XFe=(e,t,r)=>{if(L$(t))return[...e.matchAll(t)];const n=t(e,r);return n?n.map(i=>{const s=[i.text];return s.index=i.index,s.input=e,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function YFe(e){const{editor:t,state:r,from:n,to:i,rule:s,pasteEvent:o,dropEvent:l}=e,{commands:a,chain:c,can:u}=new gx({editor:t,state:r}),h=[];return r.doc.nodesBetween(n,i,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const g=Math.max(n,p),y=Math.min(i,p+f.content.size),b=f.textBetween(g-p,y-p,void 0,"");XFe(b,s.find,o).forEach(E=>{if(E.index===void 0)return;const D=g+E.index+1,C=D+E[0].length,w={from:r.tr.mapping.map(D),to:r.tr.mapping.map(C)},T=s.handler({state:r,range:w,match:E,commands:a,chain:c,can:u,pasteEvent:o,dropEvent:l});h.push(T)})}),h.every(f=>f!==null)}const ZFe=e=>{var t;const r=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=r.clipboardData)===null||t===void 0||t.setData("text/html",e),r};function QFe(e){const{editor:t,rules:r}=e;let n=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l=typeof DragEvent<"u"?new DragEvent("drop"):null;const a=({state:u,from:h,to:d,rule:f,pasteEvt:p})=>{const g=u.tr,y=mx({state:u,transaction:g});if(!(!YFe({editor:t,state:y,from:Math.max(h-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:l})||!g.steps.length))return l=typeof DragEvent<"u"?new DragEvent("drop"):null,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g};return r.map(u=>new Mu({view(h){const d=f=>{var p;n=!((p=h.dom.parentElement)===null||p===void 0)&&p.contains(f.target)?h.dom.parentElement:null};return window.addEventListener("dragstart",d),{destroy(){window.removeEventListener("dragstart",d)}}},props:{handleDOMEvents:{drop:(h,d)=>(s=n===h.dom.parentElement,l=d,!1),paste:(h,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=d,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(h,d,f)=>{const p=h[0],g=p.getMeta("uiEvent")==="paste"&&!i,y=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),v=!!b;if(!g&&!y&&!v)return;if(v){const{from:C,text:w}=b,T=C+w.length,A=ZFe(w);return a({rule:u,state:f,from:C,to:{b:T},pasteEvt:A})}const E=d.doc.content.findDiffStart(f.doc.content),D=d.doc.content.findDiffEnd(f.doc.content);if(!(!KFe(E)||!D||E===D.b))return a({rule:u,state:f,from:E,to:D,pasteEvt:o})}}))}function ePe(e){const t=e.filter((r,n)=>e.indexOf(r)!==n);return[...new Set(t)]}class vd{constructor(t,r){this.splittableMarks=[],this.editor=r,this.extensions=vd.resolve(t),this.schema=UFe(this.extensions,r),this.setupExtensions()}static resolve(t){const r=vd.sort(vd.flatten(t)),n=ePe(r.map(i=>i.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),r}static flatten(t){return t.map(r=>{const n={name:r.name,options:r.options,storage:r.storage},i=bt(r,"addExtensions",n);return i?[r,...this.flatten(i())]:r}).flat(10)}static sort(t){return t.sort((n,i)=>{const s=bt(n,"priority")||100,o=bt(i,"priority")||100;return s>o?-1:s{const n={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:KD(r.name,this.schema)},i=bt(r,"addCommands",n);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,r=vd.sort([...this.extensions].reverse()),n=[],i=[],s=r.map(o=>{const l={name:o.name,options:o.options,storage:o.storage,editor:t,type:KD(o.name,this.schema)},a=[],c=bt(o,"addKeyboardShortcuts",l);let u={};if(o.type==="mark"&&o.config.exitable&&(u.ArrowRight=()=>tl.handleExit({editor:t,mark:o})),c){const g=Object.fromEntries(Object.entries(c()).map(([y,b])=>[y,()=>b({editor:t})]));u={...u,...g}}const h=fFe(u);a.push(h);const d=bt(o,"addInputRules",l);dR(o,t.options.enableInputRules)&&d&&n.push(...d());const f=bt(o,"addPasteRules",l);dR(o,t.options.enablePasteRules)&&f&&i.push(...f());const p=bt(o,"addProseMirrorPlugins",l);if(p){const g=p();a.push(...g)}return a}).flat();return[qFe({editor:t,rules:n}),...QFe({editor:t,rules:i}),...s]}get attributes(){return EU(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:r}=yx(this.extensions);return Object.fromEntries(r.filter(n=>!!bt(n,"addNodeView")).map(n=>{const i=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:t,type:Yn(n.name,this.schema)},o=bt(n,"addNodeView",s);if(!o)return[];const l=(a,c,u,h)=>{const d=YT(a,i);return o()({editor:t,node:a,getPos:u,decorations:h,HTMLAttributes:d,extension:n})};return[n.name,l]}))}setupExtensions(){this.extensions.forEach(t=>{var r;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:KD(t.name,this.schema)};t.type==="mark"&&(!((r=nr(bt(t,"keepOnSplit",n)))!==null&&r!==void 0)||r)&&this.splittableMarks.push(t.name);const i=bt(t,"onBeforeCreate",n),s=bt(t,"onCreate",n),o=bt(t,"onUpdate",n),l=bt(t,"onSelectionUpdate",n),a=bt(t,"onTransaction",n),c=bt(t,"onFocus",n),u=bt(t,"onBlur",n),h=bt(t,"onDestroy",n);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),h&&this.editor.on("destroy",h)})}}function tPe(e){return Object.prototype.toString.call(e).slice(8,-1)}function JD(e){return tPe(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function vx(e,t){const r={...e};return JD(e)&&JD(t)&&Object.keys(t).forEach(n=>{JD(t[n])?n in e?r[n]=vx(e[n],t[n]):Object.assign(r,{[n]:t[n]}):Object.assign(r,{[n]:t[n]})}),r}class el{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new el(t)}configure(t={}){const r=this.extend();return r.parent=this.parent,r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new el({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}}function TU(e,t,r){const{from:n,to:i}=t,{blockSeparator:s=` + +`,textSerializers:o={}}=r||{};let l="";return e.nodesBetween(n,i,(a,c,u,h)=>{var d;a.isBlock&&c>n&&(l+=s);const f=o==null?void 0:o[a.type.name];if(f)return u&&(l+=f({node:a,pos:c,parent:u,index:h,range:t})),!1;a.isText&&(l+=(d=a==null?void 0:a.text)===null||d===void 0?void 0:d.slice(Math.max(n,c)-c,i-c))}),l}function AU(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,r])=>[t,r.spec.toText]))}const rPe=el.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Mu({key:new Kg("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:r}=e,{doc:n,selection:i}=t,{ranges:s}=i,o=Math.min(...s.map(u=>u.$from.pos)),l=Math.max(...s.map(u=>u.$to.pos)),a=AU(r);return TU(n,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),nPe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var r;e.isDestroyed||(t.dom.blur(),(r=window==null?void 0:window.getSelection())===null||r===void 0||r.removeAllRanges())}),!0),iPe=(e=!1)=>({commands:t})=>t.setContent("",e),sPe=()=>({state:e,tr:t,dispatch:r})=>{const{selection:n}=t,{ranges:i}=n;return r&&i.forEach(({$from:s,$to:o})=>{e.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;const{doc:c,mapping:u}=t,h=c.resolve(u.map(a)),d=c.resolve(u.map(a+l.nodeSize)),f=h.blockRange(d);if(!f)return;const p=jf(f);if(l.type.isTextblock){const{defaultType:g}=h.parent.contentMatchAt(h.index());t.setNodeMarkup(f.start,g)}(p||p===0)&&t.lift(f,p)})}),!0},oPe=e=>t=>e(t),aPe=()=>({state:e,dispatch:t})=>AFe(e,t),lPe=(e,t)=>({editor:r,tr:n})=>{const{state:i}=r,s=i.doc.slice(e.from,e.to);n.deleteRange(e.from,e.to);const o=n.mapping.map(t);return n.insert(o,s.content),n.setSelection(new Qt(n.doc.resolve(o-1))),!0},uPe=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,n=r.$anchor.node();if(n.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===n.type){if(t){const l=i.before(s),a=i.after(s);e.delete(l,a).scrollIntoView()}return!0}return!1},cPe=e=>({tr:t,state:r,dispatch:n})=>{const i=Yn(e,r.schema),s=t.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(n){const a=s.before(o),c=s.after(o);t.delete(a,c).scrollIntoView()}return!0}return!1},hPe=e=>({tr:t,dispatch:r})=>{const{from:n,to:i}=e;return r&&t.delete(n,i),!0},dPe=()=>({state:e,dispatch:t})=>mFe(e,t),fPe=()=>({commands:e})=>e.keyboardShortcut("Enter"),pPe=()=>({state:e,dispatch:t})=>TFe(e,t);function gb(e,t,r={strict:!0}){const n=Object.keys(t);return n.length?n.every(i=>r.strict?t[i]===e[i]:L$(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function ZT(e,t,r={}){return e.find(n=>n.type===t&&gb(n.attrs,r))}function mPe(e,t,r={}){return!!ZT(e,t,r)}function O$(e,t,r={}){if(!e||!t)return;let n=e.parent.childAfter(e.parentOffset);if(e.parentOffset===n.offset&&n.offset!==0&&(n=e.parent.childBefore(e.parentOffset)),!n.node)return;const i=ZT([...n.node.marks],t,r);if(!i)return;let s=n.index,o=e.start()+n.offset,l=s+1,a=o+n.node.nodeSize;for(ZT([...n.node.marks],t,r);s>0&&i.isInSet(e.parent.child(s-1).marks);)s-=1,o-=e.parent.child(s).nodeSize;for(;l({tr:r,state:n,dispatch:i})=>{const s=Ou(e,n.schema),{doc:o,selection:l}=r,{$from:a,from:c,to:u}=l;if(i){const h=O$(a,s,t);if(h&&h.from<=c&&h.to>=u){const d=Qt.create(o,h.from,h.to);r.setSelection(d)}}return!0},yPe=e=>t=>{const r=typeof e=="function"?e(t):e;for(let n=0;n({editor:r,view:n,tr:i,dispatch:s})=>{t={scrollIntoView:!0,...t};const o=()=>{R$()&&n.dom.focus(),requestAnimationFrame(()=>{r.isDestroyed||(n.focus(),t!=null&&t.scrollIntoView&&r.commands.scrollIntoView())})};if(n.hasFocus()&&e===null||e===!1)return!0;if(s&&e===null&&!kU(r.state.selection))return o(),!0;const l=_U(i.doc,e)||r.state.selection,a=r.state.selection.eq(l);return s&&(a||i.setSelection(l),a&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},bPe=(e,t)=>r=>e.every((n,i)=>t(n,{...r,index:i})),xPe=(e,t)=>({tr:r,commands:n})=>n.insertContentAt({from:r.selection.from,to:r.selection.to},e,t),$U=e=>{const t=e.childNodes;for(let r=t.length-1;r>=0;r-=1){const n=t[r];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?e.removeChild(n):n.nodeType===1&&$U(n)}return e};function fR(e){const t=`${e}`,r=new window.DOMParser().parseFromString(t,"text/html").body;return $U(r)}function yb(e,t,r){r={slice:!0,parseOptions:{},...r};const n=typeof e=="object"&&e!==null,i=typeof e=="string";if(n)try{return Array.isArray(e)&&e.length>0?qe.fromArray(e.map(o=>t.nodeFromJSON(o))):t.nodeFromJSON(e)}catch(s){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",s),yb("",t,r)}if(i){const s=ef.fromSchema(t);return r.slice?s.parseSlice(fR(e),r.parseOptions).content:s.parse(fR(e),r.parseOptions)}return yb("",t,r)}function wPe(e,t,r){const n=e.steps.length-1;if(n{o===0&&(o=u)}),e.setSelection(ir.near(e.doc.resolve(o),r))}const SPe=e=>e.toString().startsWith("<"),DPe=(e,t,r)=>({tr:n,dispatch:i,editor:s})=>{if(i){r={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...r};const o=yb(t,s.schema,{parseOptions:{preserveWhitespace:"full",...r.parseOptions}});if(o.toString()==="<>")return!0;let{from:l,to:a}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},c=!0,u=!0;if((SPe(o)?o:[o]).forEach(f=>{f.check(),c=c?f.isText&&f.marks.length===0:!1,u=u?f.isBlock:!1}),l===a&&u){const{parent:f}=n.doc.resolve(l);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(l-=1,a+=1)}let d;c?(Array.isArray(t)?d=t.map(f=>f.text||"").join(""):typeof t=="object"&&t&&t.text?d=t.text:d=t,n.insertText(d,l,a)):(d=o,n.replaceWith(l,a,d)),r.updateSelection&&wPe(n,n.steps.length-1,-1),r.applyInputRules&&n.setMeta("applyInputRules",{from:l,text:d}),r.applyPasteRules&&n.setMeta("applyPasteRules",{from:l,text:d})}return!0},EPe=()=>({state:e,dispatch:t})=>SFe(e,t),CPe=()=>({state:e,dispatch:t})=>DFe(e,t),TPe=()=>({state:e,dispatch:t})=>gFe(e,t),APe=()=>({state:e,dispatch:t})=>xFe(e,t),kPe=()=>({tr:e,state:t,dispatch:r})=>{try{const n=ux(t.doc,t.selection.$from.pos,-1);return n==null?!1:(e.join(n,2),r&&r(e),!0)}catch{return!1}},_Pe=()=>({state:e,dispatch:t,tr:r})=>{try{const n=ux(e.doc,e.selection.$from.pos,1);return n==null?!1:(r.join(n,2),t&&t(r),!0)}catch{return!1}},$Pe=()=>({state:e,dispatch:t})=>yFe(e,t),FPe=()=>({state:e,dispatch:t})=>vFe(e,t);function FU(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function PPe(e){const t=e.split(/-(?!$)/);let r=t[t.length-1];r==="Space"&&(r=" ");let n,i,s,o;for(let l=0;l({editor:t,view:r,tr:n,dispatch:i})=>{const s=PPe(e).split(/-(?!$)/),o=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{r.someProp("handleKeyDown",c=>c(r,l))});return a==null||a.steps.forEach(c=>{const u=c.map(n.mapping);u&&i&&n.maybeStep(u)}),!0};function bg(e,t,r={}){const{from:n,to:i,empty:s}=e.selection,o=t?Yn(t,e.schema):null,l=[];e.doc.nodesBetween(n,i,(h,d)=>{if(h.isText)return;const f=Math.max(n,d),p=Math.min(i,d+h.nodeSize);l.push({node:h,from:f,to:p})});const a=i-n,c=l.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>gb(h.node.attrs,r,{strict:!1}));return s?!!c.length:c.reduce((h,d)=>h+d.to-d.from,0)>=a}const NPe=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return bg(r,i,t)?EFe(r,n):!1},MPe=()=>({state:e,dispatch:t})=>kFe(e,t),LPe=e=>({state:t,dispatch:r})=>{const n=Yn(e,t.schema);return LFe(n)(t,r)},OPe=()=>({state:e,dispatch:t})=>CFe(e,t);function bx(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function pR(e,t){const r=typeof t=="string"?[t]:t;return Object.keys(e).reduce((n,i)=>(r.includes(i)||(n[i]=e[i]),n),{})}const RPe=(e,t)=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const l=bx(typeof e=="string"?e:e.name,n.schema);return l?(l==="node"&&(s=Yn(e,n.schema)),l==="mark"&&(o=Ou(e,n.schema)),i&&r.selection.ranges.forEach(a=>{n.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,u)=>{s&&s===c.type&&r.setNodeMarkup(u,void 0,pR(c.attrs,t)),o&&c.marks.length&&c.marks.forEach(h=>{o===h.type&&r.addMark(u,u+c.nodeSize,o.create(pR(h.attrs,t)))})})}),!0):!1},BPe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),jPe=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),zPe=()=>({state:e,dispatch:t})=>bFe(e,t),HPe=()=>({state:e,dispatch:t})=>wFe(e,t),UPe=()=>({state:e,dispatch:t})=>_Fe(e,t),WPe=()=>({state:e,dispatch:t})=>PFe(e,t),VPe=()=>({state:e,dispatch:t})=>FFe(e,t);function PU(e,t,r={}){return yb(e,t,{slice:!1,parseOptions:r})}const GPe=(e,t=!1,r={})=>({tr:n,editor:i,dispatch:s})=>{const{doc:o}=n,l=PU(e,i.schema,r);return s&&n.replaceWith(0,o.content.size,l).setMeta("preventUpdate",!t),!0};function B$(e,t){const r=Ou(t,e.schema),{from:n,to:i,empty:s}=e.selection,o=[];s?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(n,i,a=>{o.push(...a.marks)});const l=o.find(a=>a.type.name===r.name);return l?{...l.attrs}:{}}function qPe(e){for(let t=0;t0;r-=1){const n=e.node(r);if(t(n))return{pos:r>0?e.before(r):0,start:e.start(r),depth:r,node:n}}}function j$(e){return t=>KPe(t.$from,e)}function JPe(e,t){const r=ea.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(r),i.innerHTML}function XPe(e,t){const r={from:0,to:e.content.size};return TU(e,r,t)}function YPe(e,t){const r=Yn(t,e.schema),{from:n,to:i}=e.selection,s=[];e.doc.nodesBetween(n,i,l=>{s.push(l)});const o=s.reverse().find(l=>l.type.name===r.name);return o?{...o.attrs}:{}}function ZPe(e,t){const r=bx(typeof t=="string"?t:t.name,e.schema);return r==="node"?YPe(e,t):r==="mark"?B$(e,t):{}}function IU(e,t,r){const n=[];return e===t?r.resolve(e).marks().forEach(i=>{const s=r.resolve(e-1),o=O$(s,i.type);o&&n.push({mark:i,...o})}):r.nodesBetween(e,t,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||n.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),n}function Uv(e,t,r){return Object.fromEntries(Object.entries(r).filter(([n])=>{const i=e.find(s=>s.type===t&&s.name===n);return i?i.attribute.keepOnSplit:!1}))}function QT(e,t,r={}){const{empty:n,ranges:i}=e.selection,s=t?Ou(t,e.schema):null;if(n)return!!(e.storedMarks||e.selection.$from.marks()).filter(h=>s?s.name===h.type.name:!0).find(h=>gb(h.attrs,r,{strict:!1}));let o=0;const l=[];if(i.forEach(({$from:h,$to:d})=>{const f=h.pos,p=d.pos;e.doc.nodesBetween(f,p,(g,y)=>{if(!g.isText&&!g.marks.length)return;const b=Math.max(f,y),v=Math.min(p,y+g.nodeSize),E=v-b;o+=E,l.push(...g.marks.map(D=>({mark:D,from:b,to:v})))})}),o===0)return!1;const a=l.filter(h=>s?s.name===h.mark.type.name:!0).filter(h=>gb(h.mark.attrs,r,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),c=l.filter(h=>s?h.mark.type!==s&&h.mark.type.excludes(s):!0).reduce((h,d)=>h+d.to-d.from,0);return(a>0?a+c:a)>=o}function QPe(e,t,r={}){if(!t)return bg(e,null,r)||QT(e,null,r);const n=bx(t,e.schema);return n==="node"?bg(e,t,r):n==="mark"?QT(e,t,r):!1}function mR(e,t){const{nodeExtensions:r}=yx(t),n=r.find(o=>o.name===e);if(!n)return!1;const i={name:n.name,options:n.options,storage:n.storage},s=nr(bt(n,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function e3e(e){var t;const r=(t=e.type.createAndFill())===null||t===void 0?void 0:t.toJSON(),n=e.toJSON();return JSON.stringify(r)===JSON.stringify(n)}function t3e(e,t,r){var n;const{selection:i}=t;let s=null;if(kU(i)&&(s=i.$cursor),s){const l=(n=e.storedMarks)!==null&&n!==void 0?n:s.marks();return!!r.isInSet(l)||!l.some(a=>a.type.excludes(r))}const{ranges:o}=i;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(r):!1;return e.doc.nodesBetween(l.pos,a.pos,(u,h,d)=>{if(c)return!1;if(u.isInline){const f=!d||d.type.allowsMarkType(r),p=!!r.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(r));c=f&&p}return!c}),c})}const r3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{const{selection:s}=r,{empty:o,ranges:l}=s,a=Ou(e,n.schema);if(i)if(o){const c=B$(n,a);r.addStoredMark(a.create({...c,...t}))}else l.forEach(c=>{const u=c.$from.pos,h=c.$to.pos;n.doc.nodesBetween(u,h,(d,f)=>{const p=Math.max(f,u),g=Math.min(f+d.nodeSize,h);d.marks.find(b=>b.type===a)?d.marks.forEach(b=>{a===b.type&&r.addMark(p,g,a.create({...b.attrs,...t}))}):r.addMark(p,g,a.create(t))})});return t3e(n,r,a)},n3e=(e,t)=>({tr:r})=>(r.setMeta(e,t),!0),i3e=(e,t={})=>({state:r,dispatch:n,chain:i})=>{const s=Yn(e,r.schema);return s.isTextblock?i().command(({commands:o})=>uR(s,t)(r)?!0:o.clearNodes()).command(({state:o})=>uR(s,t)(o,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},s3e=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,i=dc(e,0,n.content.size),s=It.create(n,i);t.setSelection(s)}return!0},o3e=e=>({tr:t,dispatch:r})=>{if(r){const{doc:n}=t,{from:i,to:s}=typeof e=="number"?{from:e,to:e}:e,o=Qt.atStart(n).from,l=Qt.atEnd(n).to,a=dc(i,o,l),c=dc(s,o,l),u=Qt.create(n,a,c);t.setSelection(u)}return!0},a3e=e=>({state:t,dispatch:r})=>{const n=Yn(e,t.schema);return BFe(n)(t,r)};function gR(e,t){const r=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(r){const n=r.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(n)}}const l3e=({keepMarks:e=!0}={})=>({tr:t,state:r,dispatch:n,editor:i})=>{const{selection:s,doc:o}=t,{$from:l,$to:a}=s,c=i.extensionManager.attributes,u=Uv(c,l.node().type.name,l.node().attrs);if(s instanceof It&&s.node.isBlock)return!l.parentOffset||!kd(o,l.pos)?!1:(n&&(e&&gR(r,i.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(n){const h=a.parentOffset===a.parent.content.size;s instanceof Qt&&t.deleteSelection();const d=l.depth===0?void 0:qPe(l.node(-1).contentMatchAt(l.indexAfter(-1)));let f=h&&d?[{type:d,attrs:u}]:void 0,p=kd(t.doc,t.mapping.map(l.pos),1,f);if(!f&&!p&&kd(t.doc,t.mapping.map(l.pos),1,d?[{type:d}]:void 0)&&(p=!0,f=d?[{type:d,attrs:u}]:void 0),p&&(t.split(t.mapping.map(l.pos),1,f),d&&!h&&!l.parentOffset&&l.parent.type!==d)){const g=t.mapping.map(l.before()),y=t.doc.resolve(g);l.node(-1).canReplaceWith(y.index(),y.index()+1,d)&&t.setNodeMarkup(t.mapping.map(l.before()),d)}e&&gR(r,i.extensionManager.splittableMarks),t.scrollIntoView()}return!0},u3e=e=>({tr:t,state:r,dispatch:n,editor:i})=>{var s;const o=Yn(e,r.schema),{$from:l,$to:a}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(a))return!1;const u=l.node(-1);if(u.type!==o)return!1;const h=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==o||l.index(-2)!==l.node(-2).childCount-1)return!1;if(n){let y=qe.empty;const b=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-b;T>=l.depth-3;T-=1)y=qe.from(l.node(T).copy(y));const v=l.indexAfter(-1){if(w>-1)return!1;T.isTextblock&&T.content.size===0&&(w=A+1)}),w>-1&&t.setSelection(Qt.near(t.doc.resolve(w))),t.scrollIntoView()}return!0}const d=a.pos===l.end()?u.contentMatchAt(0).defaultType:null,f=Uv(h,u.type.name,u.attrs),p=Uv(h,l.node().type.name,l.node().attrs);t.delete(l.pos,a.pos);const g=d?[{type:o,attrs:f},{type:d,attrs:p}]:[{type:o,attrs:f}];if(!kd(t.doc,l.pos,2))return!1;if(n){const{selection:y,storedMarks:b}=r,{splittableMarks:v}=i.extensionManager,E=b||y.$to.parentOffset&&y.$from.marks();if(t.split(l.pos,2,g).scrollIntoView(),!E||!n)return!0;const D=E.filter(C=>v.includes(C.type.name));t.ensureMarks(D)}return!0},XD=(e,t)=>{const r=j$(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(Math.max(0,r.pos-1)).before(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&ph(e.doc,r.pos)&&e.join(r.pos),!0},YD=(e,t)=>{const r=j$(o=>o.type===t)(e.selection);if(!r)return!0;const n=e.doc.resolve(r.start).after(r.depth);if(n===void 0)return!0;const i=e.doc.nodeAt(n);return r.node.type===(i==null?void 0:i.type)&&ph(e.doc,n)&&e.join(n),!0},c3e=(e,t,r,n={})=>({editor:i,tr:s,state:o,dispatch:l,chain:a,commands:c,can:u})=>{const{extensions:h,splittableMarks:d}=i.extensionManager,f=Yn(e,o.schema),p=Yn(t,o.schema),{selection:g,storedMarks:y}=o,{$from:b,$to:v}=g,E=b.blockRange(v),D=y||g.$to.parentOffset&&g.$from.marks();if(!E)return!1;const C=j$(w=>mR(w.type.name,h))(g);if(E.depth>=1&&C&&E.depth-C.depth<=1){if(C.node.type===f)return c.liftListItem(p);if(mR(C.node.type.name,h)&&f.validContent(C.node.content)&&l)return a().command(()=>(s.setNodeMarkup(C.pos,f),!0)).command(()=>XD(s,f)).command(()=>YD(s,f)).run()}return!r||!D||!l?a().command(()=>u().wrapInList(f,n)?!0:c.clearNodes()).wrapInList(f,n).command(()=>XD(s,f)).command(()=>YD(s,f)).run():a().command(()=>{const w=u().wrapInList(f,n),T=D.filter(A=>d.includes(A.type.name));return s.ensureMarks(T),w?!0:c.clearNodes()}).wrapInList(f,n).command(()=>XD(s,f)).command(()=>YD(s,f)).run()},h3e=(e,t={},r={})=>({state:n,commands:i})=>{const{extendEmptyMarkRange:s=!1}=r,o=Ou(e,n.schema);return QT(n,o,t)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,t)},d3e=(e,t,r={})=>({state:n,commands:i})=>{const s=Yn(e,n.schema),o=Yn(t,n.schema);return bg(n,s,r)?i.setNode(o):i.setNode(s,r)},f3e=(e,t={})=>({state:r,commands:n})=>{const i=Yn(e,r.schema);return bg(r,i,t)?n.lift(i):n.wrapIn(i,t)},p3e=()=>({state:e,dispatch:t})=>{const r=e.plugins;for(let n=0;n=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,e.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},m3e=()=>({tr:e,dispatch:t})=>{const{selection:r}=e,{empty:n,ranges:i}=r;return n||t&&i.forEach(s=>{e.removeMark(s.$from.pos,s.$to.pos)}),!0},g3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=t,{selection:l}=r,a=Ou(e,n.schema),{$from:c,empty:u,ranges:h}=l;if(!i)return!0;if(u&&o){let{from:d,to:f}=l;const p=(s=c.marks().find(y=>y.type===a))===null||s===void 0?void 0:s.attrs,g=O$(c,a,p);g&&(d=g.from,f=g.to),r.removeMark(d,f,a)}else h.forEach(d=>{r.removeMark(d.$from.pos,d.$to.pos,a)});return r.removeStoredMark(a),!0},y3e=(e,t={})=>({tr:r,state:n,dispatch:i})=>{let s=null,o=null;const l=bx(typeof e=="string"?e:e.name,n.schema);return l?(l==="node"&&(s=Yn(e,n.schema)),l==="mark"&&(o=Ou(e,n.schema)),i&&r.selection.ranges.forEach(a=>{const c=a.$from.pos,u=a.$to.pos;n.doc.nodesBetween(c,u,(h,d)=>{s&&s===h.type&&r.setNodeMarkup(d,void 0,{...h.attrs,...t}),o&&h.marks.length&&h.marks.forEach(f=>{if(o===f.type){const p=Math.max(d,c),g=Math.min(d+h.nodeSize,u);r.addMark(p,g,o.create({...f.attrs,...t}))}})})}),!0):!1},v3e=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return IFe(i,t)(r,n)},b3e=(e,t={})=>({state:r,dispatch:n})=>{const i=Yn(e,r.schema);return NFe(i,t)(r,n)};var x3e=Object.freeze({__proto__:null,blur:nPe,clearContent:iPe,clearNodes:sPe,command:oPe,createParagraphNear:aPe,cut:lPe,deleteCurrentNode:uPe,deleteNode:cPe,deleteRange:hPe,deleteSelection:dPe,enter:fPe,exitCode:pPe,extendMarkRange:gPe,first:yPe,focus:vPe,forEach:bPe,insertContent:xPe,insertContentAt:DPe,joinUp:EPe,joinDown:CPe,joinBackward:TPe,joinForward:APe,joinItemBackward:kPe,joinItemForward:_Pe,joinTextblockBackward:$Pe,joinTextblockForward:FPe,keyboardShortcut:IPe,lift:NPe,liftEmptyBlock:MPe,liftListItem:LPe,newlineInCode:OPe,resetAttributes:RPe,scrollIntoView:BPe,selectAll:jPe,selectNodeBackward:zPe,selectNodeForward:HPe,selectParentNode:UPe,selectTextblockEnd:WPe,selectTextblockStart:VPe,setContent:GPe,setMark:r3e,setMeta:n3e,setNode:i3e,setNodeSelection:s3e,setTextSelection:o3e,sinkListItem:a3e,splitBlock:l3e,splitListItem:u3e,toggleList:c3e,toggleMark:h3e,toggleNode:d3e,toggleWrap:f3e,undoInputRule:p3e,unsetAllMarks:m3e,unsetMark:g3e,updateAttributes:y3e,wrapIn:v3e,wrapInList:b3e});const w3e=el.create({name:"commands",addCommands(){return{...x3e}}}),S3e=el.create({name:"editable",addProseMirrorPlugins(){return[new Mu({key:new Kg("editable"),props:{editable:()=>this.editor.options.editable}})]}}),D3e=el.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Mu({key:new Kg("focusEvents"),props:{handleDOMEvents:{focus:(t,r)=>{e.isFocused=!0;const n=e.state.tr.setMeta("focus",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1},blur:(t,r)=>{e.isFocused=!1;const n=e.state.tr.setMeta("blur",{event:r}).setMeta("addToHistory",!1);return t.dispatch(n),!1}}}})]}}),E3e=el.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:u,$anchor:h}=a,{pos:d,parent:f}=h,p=h.parent.isTextblock&&d>0?l.doc.resolve(d-1):h,g=p.parent.type.spec.isolating,y=h.pos-h.parentOffset,b=g&&p.parent.childCount===1?y===h.pos:ir.atStart(c).from===d;return!u||!f.type.isTextblock||f.textContent.length||!b||b&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...n},s={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return R$()||FU()?s:i},addProseMirrorPlugins(){return[new Mu({key:new Kg("clearDocument"),appendTransaction:(e,t,r)=>{if(!(e.some(p=>p.docChanged)&&!t.doc.eq(r.doc)))return;const{empty:i,from:s,to:o}=t.selection,l=ir.atStart(t.doc).from,a=ir.atEnd(t.doc).to;if(i||!(s===l&&o===a)||!(r.doc.textBetween(0,r.doc.content.size," "," ").length===0))return;const h=r.tr,d=mx({state:r,transaction:h}),{commands:f}=new gx({editor:this.editor,state:d});if(f.clearNodes(),!!h.steps.length)return h}})]}}),C3e=el.create({name:"tabindex",addProseMirrorPlugins(){return[new Mu({key:new Kg("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class rc{constructor(t,r,n=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=r,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let r=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}r=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:r,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),r=this.resolvedPos.doc.resolve(t);return new rc(r,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new rc(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new rc(t,this.editor)}get children(){const t=[];return this.node.content.forEach((r,n)=>{const i=r.isBlock&&!r.isTextblock,s=this.pos+n+1,o=this.resolvedPos.doc.resolve(s);if(!i&&o.depth<=this.depth)return;const l=new rc(o,this.editor,i,i?r:null);i&&(l.actualDepth=this.depth+1),t.push(new rc(o,this.editor,i,i?r:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,r={}){let n=null,i=this.parent;for(;i&&!n;){if(i.node.type.name===t)if(Object.keys(r).length>0){const s=i.node.attrs,o=Object.keys(r);for(let l=0;l{n&&i.length>0||(o.node.type.name===t&&s.every(a=>r[a]===o.node.attrs[a])&&i.push(o),!(n&&i.length>0)&&(i=i.concat(o.querySelectorAll(t,r,n))))}),i}setAttribute(t){const r=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,t).setTextSelection(r.from).run()}}const T3e=`.ProseMirror { position: relative; } @@ -2103,10 +2103,10 @@ img.ProseMirror-separator { .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0 -}`;function A3e(e,t,r){const n=document.querySelector(`style[data-tiptap-style${r?`-${r}`:""}]`);if(n!==null)return n;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute(`data-tiptap-style${r?`-${r}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let k3e=class extends zFe{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=A3e(T3e,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,r=!0){this.setOptions({editable:t}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,r){const n=CU(r)?r(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});this.view.updateState(i)}unregisterPlugin(t){if(this.isDestroyed)return;const r=typeof t=="string"?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(r))});this.view.updateState(n)}createExtensionManager(){var t,r;const i=[...this.options.enableCoreExtensions?[S3e,rPe.configure({blockSeparator:(r=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),w3e,D3e,E3e,C3e]:[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new vd(i,this)}createCommandManager(){this.commandManager=new gx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=PU(this.options.content,this.schema,this.options.parseOptions),r=_U(t,this.options.autofocus);this.view=new iFe(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:yd.create({doc:t,selection:r||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const r=this.state.apply(t),n=!this.state.selection.eq(r.selection);this.view.updateState(r),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),s=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return ZPe(this.state,t)}isActive(t,r){const n=typeof t=="string"?t:null,i=typeof t=="string"?r:t;return QPe(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return JPe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:r=` +}`;function A3e(e,t,r){const n=document.querySelector(`style[data-tiptap-style${r?`-${r}`:""}]`);if(n!==null)return n;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute(`data-tiptap-style${r?`-${r}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let k3e=class extends jFe{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=A3e(T3e,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,r=!0){this.setOptions({editable:t}),r&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,r){const n=CU(r)?r(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});this.view.updateState(i)}unregisterPlugin(t){if(this.isDestroyed)return;const r=typeof t=="string"?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(r))});this.view.updateState(n)}createExtensionManager(){var t,r;const i=[...this.options.enableCoreExtensions?[S3e,rPe.configure({blockSeparator:(r=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||r===void 0?void 0:r.blockSeparator}),w3e,D3e,E3e,C3e]:[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new vd(i,this)}createCommandManager(){this.commandManager=new gx({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=PU(this.options.content,this.schema,this.options.parseOptions),r=_U(t,this.options.autofocus);this.view=new iFe(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:yd.create({doc:t,selection:r||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const r=this.capturedTransaction;return this.capturedTransaction=null,r}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(o=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(o)});return}const r=this.state.apply(t),n=!this.state.selection.eq(r.selection);this.view.updateState(r),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),s=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return ZPe(this.state,t)}isActive(t,r){const n=typeof t=="string"?t:null,i=typeof t=="string"?r:t;return QPe(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return JPe(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:r=` -`,textSerializers:n={}}=t||{};return XPe(this.state.doc,{blockSeparator:r,textSerializers:{...AU(this.schema),...n}})}get isEmpty(){return e3e(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,r))||null}$nodes(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,r))||null}$pos(t){const r=this.state.doc.resolve(t);return new rc(r,this)}get $doc(){return this.$pos(0)}};function xg(e){return new VFe({find:e.find,handler:({state:t,range:r,match:n})=>{const i=nr(e.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=t,o=n[n.length-1],a=n[0];if(o){const l=a.search(/\S/),c=r.from+a.indexOf(o),u=c+o.length;if(IU(r.from,r.to,t.doc).filter(f=>f.mark.type.excluded.find(g=>g===e.type&&g!==f.mark.type)).filter(f=>f.to>c).length)return null;ur.from&&s.delete(r.from+l,c);const d=r.from+l+o.length;s.addMark(r.from+l,d,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}class el{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new el(t)}configure(t={}){const r=this.extend();return r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new el({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:t,mark:r}){const{tr:n}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===r.name))return!1;const l=o.find(c=>(c==null?void 0:c.type.name)===r.name);return l&&n.removeStoredMark(l),n.insertText(" ",i.pos),t.view.dispatch(n),!0}return!1}}class of{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new of(t)}configure(t={}){const r=this.extend();return r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new of({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}}function wg(e){return new JFe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:i})=>{const s=nr(e.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=t,a=n[n.length-1],l=n[0];let c=r.to;if(a){const u=l.search(/\S/),h=r.from+l.indexOf(a),d=h+a.length;if(IU(r.from,r.to,t.doc).filter(p=>p.mark.type.excluded.find(y=>y===e.type&&y!==p.mark.type)).filter(p=>p.to>h).length)return null;dr.from&&o.delete(r.from+u,h),c=r.from+u+a.length,o.addMark(r.from+u,c,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}const _3e=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},$3e=({renderers:e})=>Mt.createElement(Mt.Fragment,null,Object.entries(e).map(([t,r])=>YA.createPortal(r.reactElement,r.element,t)));class F3e extends Mt.Component{constructor(t){super(t),this.editorContentRef=Mt.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;const r=this.editorContentRef.current;r.append(...t.options.element.childNodes),t.setOptions({element:r}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?Nb.flushSync(t):t()}setRenderer(t,r){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[t]:r}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>{const n={...r};return delete n[t],{renderers:n}})})}componentWillUnmount(){const{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;const r=document.createElement("div");r.append(...t.options.element.childNodes),t.setOptions({element:r})}render(){const{editor:t,innerRef:r,...n}=this.props;return Mt.createElement(Mt.Fragment,null,Mt.createElement("div",{ref:_3e(r,this.editorContentRef),...n}),Mt.createElement($3e,{renderers:this.state.renderers}))}}const P3e=H.forwardRef((e,t)=>{const r=Mt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Mt.createElement(F3e,{key:r,innerRef:t,...e})}),I3e=Mt.memo(P3e);class N3e extends k3e{constructor(){super(...arguments),this.contentComponent=null}}const M3e=(e={},t=[])=>{const r=H.useRef(null),[,n]=H.useState({}),{onBeforeCreate:i,onBlur:s,onCreate:o,onDestroy:a,onFocus:l,onSelectionUpdate:c,onTransaction:u,onUpdate:h}=e,d=H.useRef(i),f=H.useRef(s),p=H.useRef(o),g=H.useRef(a),y=H.useRef(l),b=H.useRef(c),v=H.useRef(u),E=H.useRef(h);return H.useEffect(()=>{r.current&&(i&&(r.current.off("beforeCreate",d.current),r.current.on("beforeCreate",i),d.current=i),s&&(r.current.off("blur",f.current),r.current.on("blur",s),f.current=s),o&&(r.current.off("create",p.current),r.current.on("create",o),p.current=o),a&&(r.current.off("destroy",g.current),r.current.on("destroy",a),g.current=a),l&&(r.current.off("focus",y.current),r.current.on("focus",l),y.current=l),c&&(r.current.off("selectionUpdate",b.current),r.current.on("selectionUpdate",c),b.current=c),u&&(r.current.off("transaction",v.current),r.current.on("transaction",u),v.current=u),h&&(r.current.off("update",E.current),r.current.on("update",h),E.current=h))},[i,s,o,a,l,c,u,h,r.current]),H.useEffect(()=>{let D=!0;const C=new N3e(e);return r.current=C,r.current.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{D&&n({})})})}),()=>{D=!1,C.destroy()}},t),r.current},L3e=H.createContext({editor:null});L3e.Consumer;const O3e=H.createContext({onDragStart:void 0}),R3e=()=>H.useContext(O3e);Mt.forwardRef((e,t)=>{const{onDragStart:r}=R3e(),n=e.as||"div";return Mt.createElement(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});const B3e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,z3e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,j3e=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,H3e=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,U3e=el.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xg({find:B3e,type:this.type}),xg({find:j3e,type:this.type})]},addPasteRules(){return[wg({find:z3e,type:this.type}),wg({find:H3e,type:this.type})]}}),W3e=of.create({name:"doc",topNode:!0,content:"block+"});/*! @license DOMPurify 3.1.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.4/LICENSE */const{entries:NU,setPrototypeOf:yR,isFrozen:V3e,getPrototypeOf:G3e,getOwnPropertyDescriptor:q3e}=Object;let{freeze:Ki,seal:lo,create:MU}=Object,{apply:eA,construct:tA}=typeof Reflect<"u"&&Reflect;Ki||(Ki=function(t){return t});lo||(lo=function(t){return t});eA||(eA=function(t,r,n){return t.apply(r,n)});tA||(tA=function(t,r){return new t(...r)});const cv=Ms(Array.prototype.forEach),vR=Ms(Array.prototype.pop),_p=Ms(Array.prototype.push),Wv=Ms(String.prototype.toLowerCase),ZD=Ms(String.prototype.toString),bR=Ms(String.prototype.match),$p=Ms(String.prototype.replace),K3e=Ms(String.prototype.indexOf),J3e=Ms(String.prototype.trim),xo=Ms(Object.prototype.hasOwnProperty),Oi=Ms(RegExp.prototype.test),Fp=X3e(TypeError);function xR(e){return typeof e=="number"&&isNaN(e)}function Ms(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:Wv;yR&&yR(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(V3e(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Y3e(e){for(let t=0;t/gm),rIe=lo(/\${[\w\W]*}/gm),nIe=lo(/^data-[\-\w.\u00B7-\uFFFF]/),iIe=lo(/^aria-[\-\w]+$/),LU=lo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sIe=lo(/^(?:\w+script|data):/i),oIe=lo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OU=lo(/^html$/i),aIe=lo(/^[a-z][.\w]*(-[.\w]+)+$/i);var CR=Object.freeze({__proto__:null,MUSTACHE_EXPR:eIe,ERB_EXPR:tIe,TMPLIT_EXPR:rIe,DATA_ATTR:nIe,ARIA_ATTR:iIe,IS_ALLOWED_URI:LU,IS_SCRIPT_OR_DATA:sIe,ATTR_WHITESPACE:oIe,DOCTYPE_NAME:OU,CUSTOM_ELEMENT:aIe});const Vu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lIe=function(){return typeof window>"u"?null:window},uIe=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function RU(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lIe();const t=rt=>RU(rt);if(t.version="3.1.4",t.removed=[],!e||!e.document||e.document.nodeType!==Vu.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=e,p=l.prototype,g=hv(p,"cloneNode"),y=hv(p,"nextSibling"),b=hv(p,"childNodes"),v=hv(p,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let E,D="";const{implementation:C,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:A}=r,{importNode:$}=n;let I={};t.isSupported=typeof NU=="function"&&typeof v=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:L,TMPLIT_EXPR:F,DATA_ATTR:P,ARIA_ATTR:_,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:B,CUSTOM_ELEMENT:R}=CR;let{IS_ALLOWED_URI:G}=CR,q=null;const ee=Yt({},[...wR,...QD,...eE,...tE,...SR]);let Y=null;const X=Yt({},[...DR,...rE,...ER,...dv]);let Q=Object.seal(MU(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,Z=null,de=!0,ke=!0,me=!1,Fe=!0,ze=!1,Xe=!0,$t=!1,Pt=!1,V=!1,Ee=!1,De=!1,oe=!1,ne=!0,ge=!1;const Ie="user-content-";let _e=!0,be=!1,Ne={},Ze=null;const ce=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Te=null;const Oe=Yt({},["audio","video","img","source","image","track"]);let Ye=null;const Dt=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),St="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",_t="http://www.w3.org/1999/xhtml";let yt=_t,Ft=!1,Rt=null;const sr=Yt({},[St,Nt,_t],ZD);let tn=null;const ys=["application/xhtml+xml","text/html"],Zn="text/html";let Er=null,Ln=null;const On=255,Qn=r.createElement("form"),ye=function(fe){return fe instanceof RegExp||fe instanceof Function},Se=function(){let fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ln&&Ln===fe)){if((!fe||typeof fe!="object")&&(fe={}),fe=Zu(fe),tn=ys.indexOf(fe.PARSER_MEDIA_TYPE)===-1?Zn:fe.PARSER_MEDIA_TYPE,Er=tn==="application/xhtml+xml"?ZD:Wv,q=xo(fe,"ALLOWED_TAGS")?Yt({},fe.ALLOWED_TAGS,Er):ee,Y=xo(fe,"ALLOWED_ATTR")?Yt({},fe.ALLOWED_ATTR,Er):X,Rt=xo(fe,"ALLOWED_NAMESPACES")?Yt({},fe.ALLOWED_NAMESPACES,ZD):sr,Ye=xo(fe,"ADD_URI_SAFE_ATTR")?Yt(Zu(Dt),fe.ADD_URI_SAFE_ATTR,Er):Dt,Te=xo(fe,"ADD_DATA_URI_TAGS")?Yt(Zu(Oe),fe.ADD_DATA_URI_TAGS,Er):Oe,Ze=xo(fe,"FORBID_CONTENTS")?Yt({},fe.FORBID_CONTENTS,Er):ce,te=xo(fe,"FORBID_TAGS")?Yt({},fe.FORBID_TAGS,Er):{},Z=xo(fe,"FORBID_ATTR")?Yt({},fe.FORBID_ATTR,Er):{},Ne=xo(fe,"USE_PROFILES")?fe.USE_PROFILES:!1,de=fe.ALLOW_ARIA_ATTR!==!1,ke=fe.ALLOW_DATA_ATTR!==!1,me=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=fe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ze=fe.SAFE_FOR_TEMPLATES||!1,Xe=fe.SAFE_FOR_XML!==!1,$t=fe.WHOLE_DOCUMENT||!1,Ee=fe.RETURN_DOM||!1,De=fe.RETURN_DOM_FRAGMENT||!1,oe=fe.RETURN_TRUSTED_TYPE||!1,V=fe.FORCE_BODY||!1,ne=fe.SANITIZE_DOM!==!1,ge=fe.SANITIZE_NAMED_PROPS||!1,_e=fe.KEEP_CONTENT!==!1,be=fe.IN_PLACE||!1,G=fe.ALLOWED_URI_REGEXP||LU,yt=fe.NAMESPACE||_t,Q=fe.CUSTOM_ELEMENT_HANDLING||{},fe.CUSTOM_ELEMENT_HANDLING&&ye(fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),fe.CUSTOM_ELEMENT_HANDLING&&ye(fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),fe.CUSTOM_ELEMENT_HANDLING&&typeof fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ze&&(ke=!1),De&&(Ee=!0),Ne&&(q=Yt({},SR),Y=[],Ne.html===!0&&(Yt(q,wR),Yt(Y,DR)),Ne.svg===!0&&(Yt(q,QD),Yt(Y,rE),Yt(Y,dv)),Ne.svgFilters===!0&&(Yt(q,eE),Yt(Y,rE),Yt(Y,dv)),Ne.mathMl===!0&&(Yt(q,tE),Yt(Y,ER),Yt(Y,dv))),fe.ADD_TAGS&&(q===ee&&(q=Zu(q)),Yt(q,fe.ADD_TAGS,Er)),fe.ADD_ATTR&&(Y===X&&(Y=Zu(Y)),Yt(Y,fe.ADD_ATTR,Er)),fe.ADD_URI_SAFE_ATTR&&Yt(Ye,fe.ADD_URI_SAFE_ATTR,Er),fe.FORBID_CONTENTS&&(Ze===ce&&(Ze=Zu(Ze)),Yt(Ze,fe.FORBID_CONTENTS,Er)),_e&&(q["#text"]=!0),$t&&Yt(q,["html","head","body"]),q.table&&(Yt(q,["tbody"]),delete te.tbody),fe.TRUSTED_TYPES_POLICY){if(typeof fe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof fe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=fe.TRUSTED_TYPES_POLICY,D=E.createHTML("")}else E===void 0&&(E=uIe(f,i)),E!==null&&typeof D=="string"&&(D=E.createHTML(""));Ki&&Ki(fe),Ln=fe}},Ae=Yt({},["mi","mo","mn","ms","mtext"]),Ue=Yt({},["foreignobject","annotation-xml"]),tt=Yt({},["title","style","font","a","script"]),Tt=Yt({},[...QD,...eE,...Z3e]),vt=Yt({},[...tE,...Q3e]),ot=function(fe){let Le=v(fe);(!Le||!Le.tagName)&&(Le={namespaceURI:yt,tagName:"template"});const it=Wv(fe.tagName),Qe=Wv(Le.tagName);return Rt[fe.namespaceURI]?fe.namespaceURI===Nt?Le.namespaceURI===_t?it==="svg":Le.namespaceURI===St?it==="svg"&&(Qe==="annotation-xml"||Ae[Qe]):!!Tt[it]:fe.namespaceURI===St?Le.namespaceURI===_t?it==="math":Le.namespaceURI===Nt?it==="math"&&Ue[Qe]:!!vt[it]:fe.namespaceURI===_t?Le.namespaceURI===Nt&&!Ue[Qe]||Le.namespaceURI===St&&!Ae[Qe]?!1:!vt[it]&&(tt[it]||!Tt[it]):!!(tn==="application/xhtml+xml"&&Rt[fe.namespaceURI]):!1},xt=function(fe){_p(t.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch{fe.remove()}},Ct=function(fe,Le){try{_p(t.removed,{attribute:Le.getAttributeNode(fe),from:Le})}catch{_p(t.removed,{attribute:null,from:Le})}if(Le.removeAttribute(fe),fe==="is"&&!Y[fe])if(Ee||De)try{xt(Le)}catch{}else try{Le.setAttribute(fe,"")}catch{}},Lr=function(fe){let Le=null,it=null;if(V)fe=""+fe;else{const Jt=bR(fe,/^[\r\n\t ]+/);it=Jt&&Jt[0]}tn==="application/xhtml+xml"&&yt===_t&&(fe=''+fe+"");const Qe=E?E.createHTML(fe):fe;if(yt===_t)try{Le=new d().parseFromString(Qe,tn)}catch{}if(!Le||!Le.documentElement){Le=C.createDocument(yt,"template",null);try{Le.documentElement.innerHTML=Ft?D:Qe}catch{}}const Bt=Le.body||Le.documentElement;return fe&&it&&Bt.insertBefore(r.createTextNode(it),Bt.childNodes[0]||null),yt===_t?A.call(Le,$t?"html":"body")[0]:$t?Le.documentElement:Bt},Or=function(fe){return w.call(fe.ownerDocument||fe,fe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ct=function(fe){return fe instanceof h&&(typeof fe.__depth<"u"&&typeof fe.__depth!="number"||typeof fe.__removalCount<"u"&&typeof fe.__removalCount!="number"||typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof u)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"||typeof fe.insertBefore!="function"||typeof fe.hasChildNodes!="function")},Kt=function(fe){return typeof a=="function"&&fe instanceof a},or=function(fe,Le,it){I[fe]&&cv(I[fe],Qe=>{Qe.call(t,Le,it,Ln)})},Mi=function(fe){let Le=null;if(or("beforeSanitizeElements",fe,null),ct(fe))return xt(fe),!0;const it=Er(fe.nodeName);if(or("uponSanitizeElement",fe,{tagName:it,allowedTags:q}),fe.hasChildNodes()&&!Kt(fe.firstElementChild)&&Oi(/<[/\w]/g,fe.innerHTML)&&Oi(/<[/\w]/g,fe.textContent)||fe.nodeType===Vu.progressingInstruction||Xe&&fe.nodeType===Vu.comment&&Oi(/<[/\w]/g,fe.data))return xt(fe),!0;if(!q[it]||te[it]){if(!te[it]&&$n(it)&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,it)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(it)))return!1;if(_e&&!Ze[it]){const Qe=v(fe)||fe.parentNode,Bt=b(fe)||fe.childNodes;if(Bt&&Qe){const Jt=Bt.length;for(let Gt=Jt-1;Gt>=0;--Gt){const Wr=g(Bt[Gt],!0);Wr.__removalCount=(fe.__removalCount||0)+1,Qe.insertBefore(Wr,y(fe))}}}return xt(fe),!0}return fe instanceof l&&!ot(fe)||(it==="noscript"||it==="noembed"||it==="noframes")&&Oi(/<\/no(script|embed|frames)/i,fe.innerHTML)?(xt(fe),!0):(ze&&fe.nodeType===Vu.text&&(Le=fe.textContent,cv([N,L,F],Qe=>{Le=$p(Le,Qe," ")}),fe.textContent!==Le&&(_p(t.removed,{element:fe.cloneNode()}),fe.textContent=Le)),or("afterSanitizeElements",fe,null),!1)},Tn=function(fe,Le,it){if(ne&&(Le==="id"||Le==="name")&&(it in r||it in Qn||it==="__depth"||it==="__removalCount"))return!1;if(!(ke&&!Z[Le]&&Oi(P,Le))){if(!(de&&Oi(_,Le))){if(!Y[Le]||Z[Le]){if(!($n(fe)&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,fe)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(fe))&&(Q.attributeNameCheck instanceof RegExp&&Oi(Q.attributeNameCheck,Le)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Le))||Le==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,it)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(it))))return!1}else if(!Ye[Le]){if(!Oi(G,$p(it,B,""))){if(!((Le==="src"||Le==="xlink:href"||Le==="href")&&fe!=="script"&&K3e(it,"data:")===0&&Te[fe])){if(!(me&&!Oi(M,$p(it,B,"")))){if(it)return!1}}}}}}return!0},$n=function(fe){return fe!=="annotation-xml"&&bR(fe,R)},Ur=function(fe){or("beforeSanitizeAttributes",fe,null);const{attributes:Le}=fe;if(!Le)return;const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};let Qe=Le.length;for(;Qe--;){const Bt=Le[Qe],{name:Jt,namespaceURI:Gt,value:Wr}=Bt,xi=Er(Jt);let jr=Jt==="value"?Wr:J3e(Wr);if(it.attrName=xi,it.attrValue=jr,it.keepAttr=!0,it.forceKeepAttr=void 0,or("uponSanitizeAttribute",fe,it),jr=it.attrValue,it.forceKeepAttr||(Ct(Jt,fe),!it.keepAttr))continue;if(!Fe&&Oi(/\/>/i,jr)){Ct(Jt,fe);continue}if(Xe&&Oi(/((--!?|])>)|<\/(style|title)/i,jr)){Ct(Jt,fe);continue}ze&&cv([N,L,F],Zi=>{jr=$p(jr,Zi," ")});const xa=Er(fe.nodeName);if(Tn(xa,xi,jr)){if(ge&&(xi==="id"||xi==="name")&&(Ct(Jt,fe),jr=Ie+jr),E&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Gt)switch(f.getAttributeType(xa,xi)){case"TrustedHTML":{jr=E.createHTML(jr);break}case"TrustedScriptURL":{jr=E.createScriptURL(jr);break}}try{Gt?fe.setAttributeNS(Gt,Jt,jr):fe.setAttribute(Jt,jr),ct(fe)?xt(fe):vR(t.removed)}catch{}}}or("afterSanitizeAttributes",fe,null)},ei=function rt(fe){let Le=null;const it=Or(fe);for(or("beforeSanitizeShadowDOM",fe,null);Le=it.nextNode();){if(or("uponSanitizeShadowNode",Le,null),Mi(Le))continue;const Qe=v(Le);Le.nodeType===Vu.element&&(Qe&&Qe.__depth?Le.__depth=(Le.__removalCount||0)+Qe.__depth+1:Le.__depth=1),(Le.__depth>=On||Le.__depth<0||xR(Le.__depth))&&xt(Le),Le.content instanceof s&&(Le.content.__depth=Le.__depth,rt(Le.content)),Ur(Le)}or("afterSanitizeShadowDOM",fe,null)};return t.sanitize=function(rt){let fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,it=null,Qe=null,Bt=null;if(Ft=!rt,Ft&&(rt=""),typeof rt!="string"&&!Kt(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw Fp("dirty is not a string, aborting")}else throw Fp("toString is not a function");if(!t.isSupported)return rt;if(Pt||Se(fe),t.removed=[],typeof rt=="string"&&(be=!1),be){if(rt.nodeName){const Wr=Er(rt.nodeName);if(!q[Wr]||te[Wr])throw Fp("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof a)Le=Lr(""),it=Le.ownerDocument.importNode(rt,!0),it.nodeType===Vu.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?Le=it:Le.appendChild(it);else{if(!Ee&&!ze&&!$t&&rt.indexOf("<")===-1)return E&&oe?E.createHTML(rt):rt;if(Le=Lr(rt),!Le)return Ee?null:oe?D:""}Le&&V&&xt(Le.firstChild);const Jt=Or(be?rt:Le);for(;Qe=Jt.nextNode();){if(Mi(Qe))continue;const Wr=v(Qe);Qe.nodeType===Vu.element&&(Wr&&Wr.__depth?Qe.__depth=(Qe.__removalCount||0)+Wr.__depth+1:Qe.__depth=1),(Qe.__depth>=On||Qe.__depth<0||xR(Qe.__depth))&&xt(Qe),Qe.content instanceof s&&(Qe.content.__depth=Qe.__depth,ei(Qe.content)),Ur(Qe)}if(be)return rt;if(Ee){if(De)for(Bt=T.call(Le.ownerDocument);Le.firstChild;)Bt.appendChild(Le.firstChild);else Bt=Le;return(Y.shadowroot||Y.shadowrootmode)&&(Bt=$.call(n,Bt,!0)),Bt}let Gt=$t?Le.outerHTML:Le.innerHTML;return $t&&q["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&Oi(OU,Le.ownerDocument.doctype.name)&&(Gt=" -`+Gt),ze&&cv([N,L,F],Wr=>{Gt=$p(Gt,Wr," ")}),E&&oe?E.createHTML(Gt):Gt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Se(rt),Pt=!0},t.clearConfig=function(){Ln=null,Pt=!1},t.isValidAttribute=function(rt,fe,Le){Ln||Se({});const it=Er(rt),Qe=Er(fe);return Tn(it,Qe,Le)},t.addHook=function(rt,fe){typeof fe=="function"&&(I[rt]=I[rt]||[],_p(I[rt],fe))},t.removeHook=function(rt){if(I[rt])return vR(I[rt])},t.removeHooks=function(rt){I[rt]&&(I[rt]=[])},t.removeAllHooks=function(){I={}},t}var cIe=RU();const hIe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,dIe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,fIe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,pIe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mIe=el.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xg({find:hIe,type:this.type}),xg({find:fIe,type:this.type})]},addPasteRules(){return[wg({find:dIe,type:this.type}),wg({find:pIe,type:this.type})]}}),gIe=of.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),yIe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,vIe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,bIe=el.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xg({find:yIe,type:this.type})]},addPasteRules(){return[wg({find:vIe,type:this.type})]}}),xIe=of.create({name:"text",group:"inline"}),wIe=el.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const r=B$(e,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),SIe=el.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),DIe=({editor:e})=>e?z.jsxs("ul",{className:"menu-bar",children:[z.jsx("li",{children:z.jsx(Ot,{variant:e.isActive("bold")?"filled":"ghost",onClick:()=>e.chain().focus().toggleBold().run(),disabled:!e.can().chain().focus().toggleBold().run(),type:"button",children:z.jsx("b",{children:"B"})})}),z.jsx("li",{children:z.jsx(Ot,{variant:e.isActive("italic")?"filled":"ghost",onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!e.can().chain().focus().toggleItalic().run(),type:"button",children:z.jsx("i",{children:"I"})})}),z.jsx("li",{children:z.jsx(Ot,{variant:e.isActive("underline")?"filled":"ghost",onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:!e.can().chain().focus().toggleUnderline().run(),type:"button",children:z.jsx("u",{children:"U"})})}),z.jsx("li",{children:z.jsx(Ot,{variant:e.isActive("strike")?"filled":"ghost",onClick:()=>e.chain().focus().toggleStrike().run(),disabled:!e.can().chain().focus().toggleStrike().run(),type:"button",children:z.jsx("s",{children:"S"})})})]}):null,EIe=({label:e,richTextValue:t,handleRichTextChange:r})=>{const n=M3e({extensions:[wIe,W3e,gIe,xIe,U3e,bIe,mIe,SIe],editorProps:{attributes:{class:"text-editor"}},content:t,injectCSS:!1,parseOptions:{preserveWhitespace:!1},onUpdate(i){const s=cIe.sanitize(i.editor.getHTML().replaceAll(" ",""));r(s==="

"?"":s)}});return H.useEffect(()=>{t==""&&(n==null||n.commands.setContent(t,!0))},[t]),z.jsxs("div",{className:"editor-container",children:[e&&z.jsx("label",{children:e}),z.jsxs("div",{className:"text-container",children:[z.jsx(I3e,{editor:n}),z.jsx(DIe,{editor:n})]})]})},CIe=({className:e,onColorPick:t,selectedColor:r})=>{const{t:n}=mr(),[i,s]=H.useState(!1),[o,a]=H.useState("");return z.jsxs(z.Fragment,{children:[z.jsxs(Ot,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectColor"),z.jsx(Ks,{placement:"left",children:n("playgroundSelectColor")})]}),z.jsx(hf,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},withCloseButton:!0,drawerHeader:z.jsxs("div",{className:"flex gap-fix-3xl",children:[z.jsx("span",{className:"my-auto",children:n("playgroundSelectColor")}),z.jsx(an,{type:"search",variant:"floating",label:n("search"),value:o,onChange:l=>a(l.target.value)})]}),className:"select-icon-dialog",children:z.jsx("div",{className:"grid-cols-3 md:grid-cols-5 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:[...JX,"none"].filter(l=>l.includes(o)).map(l=>z.jsx("button",{onClick:()=>t(l),children:z.jsxs(ls,{"data-interactive":"elevation",style:{backgroundColor:"var(--db-current-color-bg-enabled)"},className:`flex-row min-h-siz-lg gap-fix-md justify-between items-center db-${l}`,spacing:"small",children:[l,r===l&&z.jsx(df,{icon:"done",children:"Selected color"})]})},`color-button-${l}`))})})]})},gh=({settings:e})=>{const{t}=mr(),{actions:{setProp:r,setCustom:n,setHidden:i},props:s}=ba(a=>({props:a.data.props})),o=(a,l,c)=>{c==="custom"?n(u=>u[a]=l):c==="hidden"?i(l):r(u=>u[a]=l)};return s?z.jsx("div",{className:"flex flex-col gap-fix-md",children:e.filter(a=>!a.isHidden||!a.isHidden(s)).map(a=>{var l,c,u,h;return z.jsxs(H.Fragment,{children:[(a.type==="text"||a.type==="number")&&z.jsx(an,{type:a.type,min:a.type==="number"&&((l=a.numberOptions)==null?void 0:l.min)||void 0,max:a.type==="number"&&((c=a.numberOptions)==null?void 0:c.max)||void 0,step:a.type==="number"&&((u=a.numberOptions)==null?void 0:u.step)||void 0,dataList:a.dataList,label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="textarea"&&z.jsx(im,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType)}),a.type==="richtext"&&z.jsx(EIe,{label:t(a.key),richTextValue:s[a.key],handleRichTextChange:d=>o(a.key,d,a.changeType)}),a.type==="select"&&z.jsx(mc,{label:t(a.key),variant:"floating",defaultValue:s[a.key],onChange:d=>o(a.key,d.target.value,a.changeType),children:(h=a.selectOptions)==null?void 0:h.map(d=>z.jsx("option",{value:d.value,children:t(d.label||d.value||"")},`select-${a.key}-${d.label||d.value}`))}),a.type==="switch"&&z.jsx(MY,{label:t(a.key),checked:s[a.key],onChange:d=>o(a.key,d.target.checked,a.changeType)}),a.type==="icon"&&z.jsxs("div",{className:"flex gap-fix-md items-center",children:[z.jsxs("div",{className:"flex flex-col",children:[z.jsx(Mr,{size:"small",icon:"none",children:t(a.key)}),z.jsx("span",{children:s[a.key]})]}),z.jsx(df,{icon:s[a.key]}),z.jsx(M_e,{className:"ml-auto",selectedIcon:s[a.key],onIconPick:d=>{o(a.key,d,a.changeType)}})]}),a.type==="color"&&z.jsxs("div",{className:"flex gap-fix-md items-center",children:[z.jsxs("div",{className:`flex flex-col rounded p-fix-xs ${s[a.key]!=="none"?`db-${s[a.key]}`:""}`,children:[z.jsx(Mr,{size:"small",icon:"none",children:t(a.key)}),z.jsx("span",{children:s[a.key]})]}),z.jsx(CIe,{className:"ml-auto",selectedColor:s[a.key],onColorPick:d=>{o(a.key,d,a.changeType)}})]})]},`setting-${a.key}`)})}):z.jsx(Mr,{semantic:"warning",children:t("playgroundCopyError")})},yh=(e,t,r)=>`drag-container${e?" selected":""}${t?" hovered":""}${r?` ${r}`:""}`,TIe=(e,t)=>e.tope.left{const{previewContainer:r}=ds(),[n,i]=H.useState(),[s,o]=H.useState(!1),[a,l]=H.useState(!1);return H.useEffect(()=>{if(n&&r){const c=n.getBoundingClientRect();o(TIe(c,r)),l(AIe(c,r))}},[n,r]),z.jsx("span",{ref:c=>{c&&(t(c),i(c))},className:"drag-button flex py-fix-3xs pl-fix-3xs","data-icon-after":"dots_drag_and_drop","data-outside-y":s,"data-outside-x":a,children:e})},j$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=Ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return z.jsxs(Ot,{className:`${yh(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,z.jsx(vh,{componentName:s,drag:r})]})},kIe=()=>z.jsx(gh,{settings:[{key:"children",type:"text"},{key:"variant",type:"select",selectOptions:[{label:"outlined",value:"outlined"},{label:"brand",value:"brand"},{label:"filled",value:"filled"},{label:"ghost",value:"ghost"}]},{key:"disabled",type:"switch"},{key:"size",type:"select",selectOptions:[{label:"small",value:"small"},{label:"medium",value:"medium"}]},{key:"noText",type:"switch"},{key:"width",type:"select",selectOptions:[{label:"auto",value:"auto"},{label:"full",value:"full"}]},{key:"icon",type:"icon"}]});j$.craft={props:{variant:"outlined",children:"Test",size:"medium",disabled:!1,noText:!1,width:"auto",icon:"none"},related:{settings:kIe}};const Yg=({children:e,className:t})=>{const{connectors:{connect:r},id:n}=ba(),{selected:i}=Ii(s=>{const[o]=s.events.selected;return{selected:n===o}});return z.jsx("div",{className:`drop-container ${t||""}${i?" selected":""}`,ref:s=>{s&&r(s)},children:e})};Yg.craft={rules:{canMoveIn:e=>e.every(()=>!0),canDrag:()=>!1}};const H$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=Ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return z.jsxs(ls,{className:`${yh(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[z.jsx(Bf,{id:"card-children",is:Yg,canvas:!0,children:e.children}),z.jsx(vh,{componentName:s,drag:r})]})},_Ie=()=>z.jsx(gh,{settings:[{key:"spacing",type:"select",selectOptions:[{value:"none"},{value:"small"},{value:"medium"}]},{key:"elevationLevel",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"}]},{key:"behaviour",type:"select",selectOptions:[{value:"default"},{value:"interactive"}]}]});H$.craft={props:{spacing:"small",behaviour:"default",elevationLevel:"1"},related:{settings:_Ie}};const $Ie=({display:e,direction:t,gap:r,width:n,cells:i,padding:s,color:o})=>{let a="";return e==="grid"?(a+=" grid",t==="column"?a+=` grid-cols-${i||4}`:a+=` grid-rows-${i||4}`):(a+=" flex",t==="column"?a+=" flex-col":a+=" flex-row"),r&&r!=="none"&&(a+=` gap-fix-${r}`),n==="fit"?a+=" w-fit":a+=" w-full",s!=="none"&&(a+=` p-fix-${s}`),o&&o!=="none"&&(a+=` db-${o}`),a},U$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=Ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return z.jsxs("div",{className:`${yh(o,i,`${$Ie(e)}${e.className||""}`)}`,ref:a=>{a&&t(a)},children:[z.jsx(Bf,{id:"drop-container",is:Yg,canvas:!0,children:e.children}),z.jsx(vh,{componentName:s,drag:r})]})},FIe=()=>z.jsx(gh,{settings:[{key:"padding",type:"select",selectOptions:[{value:"none"},{value:"3xs"},{value:"2xs"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"},{value:"2xl"},{value:"3xl"}]},{key:"width",type:"select",selectOptions:[{value:"full"},{value:"fit"}]},{key:"display",type:"select",selectOptions:[{value:"flex"},{value:"grid"}]},{key:"direction",type:"select",selectOptions:[{value:"row"},{value:"column"}]},{key:"cells",type:"number",numberOptions:{min:1,max:8},isHidden:e=>(e==null?void 0:e.display)==="flex"},{key:"gap",type:"select",selectOptions:[{value:"none"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"}]},{key:"color",type:"color"}]});U$.craft={props:{display:"flex",direction:"row",gap:"md",width:"full",cells:4,padding:"none",color:"none"},related:{settings:FIe}};const W$=({text:e,className:t})=>{const{t:r}=mr(),{connectors:{connect:n,drag:i},id:s,hovered:o,name:a}=ba(c=>({name:c.data.custom.displayName||c.data.name,hovered:c.data.custom.hover})),{selected:l}=Ii(c=>{const[u]=c.events.selected;return{selected:s===u}});return z.jsxs("div",{className:`${yh(l,o,t)}`,"data-hint":e&&(e==null?void 0:e.length)>0?void 0:r("pgEditMe"),ref:c=>{c&&n(c)},children:[e&&z.jsx("div",{dangerouslySetInnerHTML:{__html:e||""}}),z.jsx(vh,{componentName:a,drag:i})]})},PIe=()=>z.jsx(gh,{settings:[{key:"text",type:"richtext"}]});W$.craft={props:{},related:{settings:PIe}};const BU=e=>z.jsx(Yg,{className:"w-full h-full flex flex-col",...e,children:e.children}),V$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=Ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return z.jsxs(hd,{className:`${yh(o,i,e.className)}`,ref:a=>{a&&t(a)},...e,children:[e.children,z.jsx(vh,{componentName:s,drag:r})]})},IIe=()=>z.jsx(gh,{settings:[{key:"href",type:"text"},{key:"children",type:"text"},{key:"content",type:"select",selectOptions:[{value:"internal"},{value:"external"}]},{key:"variant",type:"select",selectOptions:[{value:"adaptive"},{value:"brand"},{value:"inline"}]},{key:"size",type:"select",selectOptions:[{value:"medium"},{value:"small"}]}]});V$.craft={props:{children:"Link",content:"internal",variant:"adaptive",size:"medium"},related:{settings:IIe}};const zU=({create:e,open:t,onClose:r})=>{const{t:n}=mr(),{currentId:i,nodeTrees:s}=ds(f=>f),[o,a]=H.useState(""),[l,c]=H.useState(""),[u,h]=H.useState(),{actions:d}=Ii();return H.useEffect(()=>{if(t)if(e)a(""),c("");else{const f=s[i];f&&(a(i),c(f.name))}},[e,i,s,t]),H.useEffect(()=>{o.length===0?h(!0):h(e?!!s[o]||o.length===0||l.length===0:o===i&&l===s[i].name)},[e,i,o,l,s]),z.jsx(z.Fragment,{children:z.jsxs(hf,{backdrop:"weak",open:t,onClose:r,withCloseButton:!0,drawerHeader:n(e?"add":"pgEdit"),children:[z.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md",children:[z.jsx(an,{label:n("id"),placeholder:n("id"),variant:"floating",value:o,customValidity:o.length===0||e&&s[o]?"invalid":"no-validation",onChange:f=>a(f.target.value)}),z.jsx(aa,{margin:"none"}),z.jsx(an,{label:n("name"),placeholder:n("name"),variant:"floating",value:l,onChange:f=>c(f.target.value)})]}),z.jsxs("div",{className:"flex gap-fix-md absolute bottom-fix-xs inset-x-fix-lg",children:[!e&&z.jsx(Ot,{width:"full",disabled:Object.entries(s).length<2,onClick:()=>{const f={...s};delete f[i],ds.setState({nodeTrees:f,currentId:Object.keys(s)[0]}),r&&r()},children:n("delete")}),z.jsx(Ot,{width:"full",variant:"brand",disabled:u,onClick:()=>{const f={...s},p=o||Mn();e?(f[p]={isPage:!0,serializedJson:"",name:l||"Unknown"},d.deserialize('{"ROOT":{"type":{"resolvedName":"Root"},"isCanvas":true,"props":{"id":"canvas"},"displayName":"Root","custom":{"hover":false},"hidden":false,"nodes":[],"linkedNodes":{}}}')):(delete f[i],f[p]={...s[i],name:l||"Unknown"}),ds.setState({nodeTrees:f,currentId:p}),c(""),a(""),r&&r()},children:n(e?"add":"change")})]})]})})},NIe=(e,t,r,n)=>{const i=t.node(r).toNodeTree(),s={};Object.keys(i.nodes).forEach(l=>{s[l]=Mn()});const o=Object.entries(s).map(([l,c])=>{const u=t.node(l).toSerializedNode();u.parent&&(u.parent=s[u.parent]),u.nodes=u.nodes.map(d=>s[d]),u.linkedNodes=Object.entries(u.linkedNodes).reduce((d,[f,p])=>({...d,[f]:s[p]}),{});const h=t.parseSerializedNode(u).toNode();return h.id=c,h}),a=o.reduce((l,c)=>({...l,[c.id]:c}),{});e.addNodeTree({nodes:a,rootNodeId:o[0].id},n)},jU=({node:e})=>{const{selected:t,actions:r,allNodes:n,query:i}=Ii(f=>{const[p]=f.events.selected;let g;if(p){const y=f.nodes[p];g={id:p,data:y.data,settings:y.related&&y.related.settings}}return{selected:g,allNodes:f.nodes}}),[s,o]=H.useState(!1);if(!e)return null;const{id:a,data:l}=e;let c=[...l.nodes,...Object.values(l.linkedNodes)];if(c.length===1&&n[c[0]].data.name==="DropContainer"){const f=n[c[0]].data;c=[...f.nodes,...Object.values(f.linkedNodes)]}const h=l.custom.displayName||l.name,d=z.jsxs("div",{className:` - ${(t==null?void 0:t.id)===a?"db-informational-bg-lvl-3":""} +`,textSerializers:n={}}=t||{};return XPe(this.state.doc,{blockSeparator:r,textSerializers:{...AU(this.schema),...n}})}get isEmpty(){return e3e(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,r))||null}$nodes(t,r){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,r))||null}$pos(t){const r=this.state.doc.resolve(t);return new rc(r,this)}get $doc(){return this.$pos(0)}};function xg(e){return new VFe({find:e.find,handler:({state:t,range:r,match:n})=>{const i=nr(e.getAttributes,void 0,n);if(i===!1||i===null)return null;const{tr:s}=t,o=n[n.length-1],l=n[0];if(o){const a=l.search(/\S/),c=r.from+l.indexOf(o),u=c+o.length;if(IU(r.from,r.to,t.doc).filter(f=>f.mark.type.excluded.find(g=>g===e.type&&g!==f.mark.type)).filter(f=>f.to>c).length)return null;ur.from&&s.delete(r.from+a,c);const d=r.from+a+o.length;s.addMark(r.from+a,d,e.type.create(i||{})),s.removeStoredMark(e.type)}}})}class tl{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new tl(t)}configure(t={}){const r=this.extend();return r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new tl({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}static handleExit({editor:t,mark:r}){const{tr:n}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===r.name))return!1;const a=o.find(c=>(c==null?void 0:c.type.name)===r.name);return a&&n.removeStoredMark(a),n.insertText(" ",i.pos),t.view.dispatch(n),!0}return!1}}class of{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=nr(bt(this,"addOptions",{name:this.name}))),this.storage=nr(bt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new of(t)}configure(t={}){const r=this.extend();return r.options=vx(this.options,t),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}extend(t={}){const r=new of({...this.config,...t});return r.parent=this,this.child=r,r.name=t.name?t.name:r.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${r.name}".`),r.options=nr(bt(r,"addOptions",{name:r.name})),r.storage=nr(bt(r,"addStorage",{name:r.name,options:r.options})),r}}function wg(e){return new JFe({find:e.find,handler:({state:t,range:r,match:n,pasteEvent:i})=>{const s=nr(e.getAttributes,void 0,n,i);if(s===!1||s===null)return null;const{tr:o}=t,l=n[n.length-1],a=n[0];let c=r.to;if(l){const u=a.search(/\S/),h=r.from+a.indexOf(l),d=h+l.length;if(IU(r.from,r.to,t.doc).filter(p=>p.mark.type.excluded.find(y=>y===e.type&&y!==p.mark.type)).filter(p=>p.to>h).length)return null;dr.from&&o.delete(r.from+u,h),c=r.from+u+l.length,o.addMark(r.from+u,c,e.type.create(s||{})),o.removeStoredMark(e.type)}}})}const _3e=(...e)=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r&&(r.current=t)})},$3e=({renderers:e})=>Mt.createElement(Mt.Fragment,null,Object.entries(e).map(([t,r])=>YA.createPortal(r.reactElement,r.element,t)));class F3e extends Mt.Component{constructor(t){super(t),this.editorContentRef=Mt.createRef(),this.initialized=!1,this.state={renderers:{}}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){const{editor:t}=this.props;if(t&&t.options.element){if(t.contentComponent)return;const r=this.editorContentRef.current;r.append(...t.options.element.childNodes),t.setOptions({element:r}),t.contentComponent=this,t.createNodeViews(),this.initialized=!0}}maybeFlushSync(t){this.initialized?Nb.flushSync(t):t()}setRenderer(t,r){this.maybeFlushSync(()=>{this.setState(({renderers:n})=>({renderers:{...n,[t]:r}}))})}removeRenderer(t){this.maybeFlushSync(()=>{this.setState(({renderers:r})=>{const n={...r};return delete n[t],{renderers:n}})})}componentWillUnmount(){const{editor:t}=this.props;if(!t||(this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild))return;const r=document.createElement("div");r.append(...t.options.element.childNodes),t.setOptions({element:r})}render(){const{editor:t,innerRef:r,...n}=this.props;return Mt.createElement(Mt.Fragment,null,Mt.createElement("div",{ref:_3e(r,this.editorContentRef),...n}),Mt.createElement($3e,{renderers:this.state.renderers}))}}const P3e=H.forwardRef((e,t)=>{const r=Mt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return Mt.createElement(F3e,{key:r,innerRef:t,...e})}),I3e=Mt.memo(P3e);class N3e extends k3e{constructor(){super(...arguments),this.contentComponent=null}}const M3e=(e={},t=[])=>{const r=H.useRef(null),[,n]=H.useState({}),{onBeforeCreate:i,onBlur:s,onCreate:o,onDestroy:l,onFocus:a,onSelectionUpdate:c,onTransaction:u,onUpdate:h}=e,d=H.useRef(i),f=H.useRef(s),p=H.useRef(o),g=H.useRef(l),y=H.useRef(a),b=H.useRef(c),v=H.useRef(u),E=H.useRef(h);return H.useEffect(()=>{r.current&&(i&&(r.current.off("beforeCreate",d.current),r.current.on("beforeCreate",i),d.current=i),s&&(r.current.off("blur",f.current),r.current.on("blur",s),f.current=s),o&&(r.current.off("create",p.current),r.current.on("create",o),p.current=o),l&&(r.current.off("destroy",g.current),r.current.on("destroy",l),g.current=l),a&&(r.current.off("focus",y.current),r.current.on("focus",a),y.current=a),c&&(r.current.off("selectionUpdate",b.current),r.current.on("selectionUpdate",c),b.current=c),u&&(r.current.off("transaction",v.current),r.current.on("transaction",u),v.current=u),h&&(r.current.off("update",E.current),r.current.on("update",h),E.current=h))},[i,s,o,l,a,c,u,h,r.current]),H.useEffect(()=>{let D=!0;const C=new N3e(e);return r.current=C,r.current.on("transaction",()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{D&&n({})})})}),()=>{D=!1,C.destroy()}},t),r.current},L3e=H.createContext({editor:null});L3e.Consumer;const O3e=H.createContext({onDragStart:void 0}),R3e=()=>H.useContext(O3e);Mt.forwardRef((e,t)=>{const{onDragStart:r}=R3e(),n=e.as||"div";return Mt.createElement(n,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:r,style:{whiteSpace:"normal",...e.style}})});const B3e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,j3e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,z3e=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,H3e=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,U3e=tl.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[xg({find:B3e,type:this.type}),xg({find:z3e,type:this.type})]},addPasteRules(){return[wg({find:j3e,type:this.type}),wg({find:H3e,type:this.type})]}}),W3e=of.create({name:"doc",topNode:!0,content:"block+"});/*! @license DOMPurify 3.1.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.4/LICENSE */const{entries:NU,setPrototypeOf:yR,isFrozen:V3e,getPrototypeOf:G3e,getOwnPropertyDescriptor:q3e}=Object;let{freeze:Ki,seal:lo,create:MU}=Object,{apply:eA,construct:tA}=typeof Reflect<"u"&&Reflect;Ki||(Ki=function(t){return t});lo||(lo=function(t){return t});eA||(eA=function(t,r,n){return t.apply(r,n)});tA||(tA=function(t,r){return new t(...r)});const cv=Ms(Array.prototype.forEach),vR=Ms(Array.prototype.pop),_p=Ms(Array.prototype.push),Wv=Ms(String.prototype.toLowerCase),ZD=Ms(String.prototype.toString),bR=Ms(String.prototype.match),$p=Ms(String.prototype.replace),K3e=Ms(String.prototype.indexOf),J3e=Ms(String.prototype.trim),xo=Ms(Object.prototype.hasOwnProperty),Oi=Ms(RegExp.prototype.test),Fp=X3e(TypeError);function xR(e){return typeof e=="number"&&isNaN(e)}function Ms(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:Wv;yR&&yR(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const s=r(i);s!==i&&(V3e(t)||(t[n]=s),i=s)}e[i]=!0}return e}function Y3e(e){for(let t=0;t/gm),rIe=lo(/\${[\w\W]*}/gm),nIe=lo(/^data-[\-\w.\u00B7-\uFFFF]/),iIe=lo(/^aria-[\-\w]+$/),LU=lo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),sIe=lo(/^(?:\w+script|data):/i),oIe=lo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),OU=lo(/^html$/i),aIe=lo(/^[a-z][.\w]*(-[.\w]+)+$/i);var CR=Object.freeze({__proto__:null,MUSTACHE_EXPR:eIe,ERB_EXPR:tIe,TMPLIT_EXPR:rIe,DATA_ATTR:nIe,ARIA_ATTR:iIe,IS_ALLOWED_URI:LU,IS_SCRIPT_OR_DATA:sIe,ATTR_WHITESPACE:oIe,DOCTYPE_NAME:OU,CUSTOM_ELEMENT:aIe});const Vu={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},lIe=function(){return typeof window>"u"?null:window},uIe=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return t.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function RU(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lIe();const t=rt=>RU(rt);if(t.version="3.1.4",t.removed=[],!e||!e.document||e.document.nodeType!==Vu.document)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:l,Element:a,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=e,p=a.prototype,g=hv(p,"cloneNode"),y=hv(p,"nextSibling"),b=hv(p,"childNodes"),v=hv(p,"parentNode");if(typeof o=="function"){const rt=r.createElement("template");rt.content&&rt.content.ownerDocument&&(r=rt.content.ownerDocument)}let E,D="";const{implementation:C,createNodeIterator:w,createDocumentFragment:T,getElementsByTagName:A}=r,{importNode:$}=n;let I={};t.isSupported=typeof NU=="function"&&typeof v=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:L,TMPLIT_EXPR:F,DATA_ATTR:P,ARIA_ATTR:_,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:R}=CR;let{IS_ALLOWED_URI:G}=CR,q=null;const ee=Yt({},[...wR,...QD,...eE,...tE,...SR]);let Y=null;const X=Yt({},[...DR,...rE,...ER,...dv]);let Q=Object.seal(MU(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,Z=null,de=!0,ke=!0,me=!1,Fe=!0,je=!1,Xe=!0,$t=!1,Pt=!1,V=!1,Ee=!1,De=!1,oe=!1,ne=!0,ge=!1;const Ie="user-content-";let _e=!0,be=!1,Ne={},Ze=null;const ce=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Te=null;const Oe=Yt({},["audio","video","img","source","image","track"]);let Ye=null;const Dt=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),St="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",_t="http://www.w3.org/1999/xhtml";let yt=_t,Ft=!1,Rt=null;const sr=Yt({},[St,Nt,_t],ZD);let tn=null;const ys=["application/xhtml+xml","text/html"],Zn="text/html";let Er=null,Ln=null;const On=255,Qn=r.createElement("form"),ye=function(fe){return fe instanceof RegExp||fe instanceof Function},Se=function(){let fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ln&&Ln===fe)){if((!fe||typeof fe!="object")&&(fe={}),fe=Zu(fe),tn=ys.indexOf(fe.PARSER_MEDIA_TYPE)===-1?Zn:fe.PARSER_MEDIA_TYPE,Er=tn==="application/xhtml+xml"?ZD:Wv,q=xo(fe,"ALLOWED_TAGS")?Yt({},fe.ALLOWED_TAGS,Er):ee,Y=xo(fe,"ALLOWED_ATTR")?Yt({},fe.ALLOWED_ATTR,Er):X,Rt=xo(fe,"ALLOWED_NAMESPACES")?Yt({},fe.ALLOWED_NAMESPACES,ZD):sr,Ye=xo(fe,"ADD_URI_SAFE_ATTR")?Yt(Zu(Dt),fe.ADD_URI_SAFE_ATTR,Er):Dt,Te=xo(fe,"ADD_DATA_URI_TAGS")?Yt(Zu(Oe),fe.ADD_DATA_URI_TAGS,Er):Oe,Ze=xo(fe,"FORBID_CONTENTS")?Yt({},fe.FORBID_CONTENTS,Er):ce,te=xo(fe,"FORBID_TAGS")?Yt({},fe.FORBID_TAGS,Er):{},Z=xo(fe,"FORBID_ATTR")?Yt({},fe.FORBID_ATTR,Er):{},Ne=xo(fe,"USE_PROFILES")?fe.USE_PROFILES:!1,de=fe.ALLOW_ARIA_ATTR!==!1,ke=fe.ALLOW_DATA_ATTR!==!1,me=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=fe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,je=fe.SAFE_FOR_TEMPLATES||!1,Xe=fe.SAFE_FOR_XML!==!1,$t=fe.WHOLE_DOCUMENT||!1,Ee=fe.RETURN_DOM||!1,De=fe.RETURN_DOM_FRAGMENT||!1,oe=fe.RETURN_TRUSTED_TYPE||!1,V=fe.FORCE_BODY||!1,ne=fe.SANITIZE_DOM!==!1,ge=fe.SANITIZE_NAMED_PROPS||!1,_e=fe.KEEP_CONTENT!==!1,be=fe.IN_PLACE||!1,G=fe.ALLOWED_URI_REGEXP||LU,yt=fe.NAMESPACE||_t,Q=fe.CUSTOM_ELEMENT_HANDLING||{},fe.CUSTOM_ELEMENT_HANDLING&&ye(fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Q.tagNameCheck=fe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),fe.CUSTOM_ELEMENT_HANDLING&&ye(fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Q.attributeNameCheck=fe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),fe.CUSTOM_ELEMENT_HANDLING&&typeof fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Q.allowCustomizedBuiltInElements=fe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),je&&(ke=!1),De&&(Ee=!0),Ne&&(q=Yt({},SR),Y=[],Ne.html===!0&&(Yt(q,wR),Yt(Y,DR)),Ne.svg===!0&&(Yt(q,QD),Yt(Y,rE),Yt(Y,dv)),Ne.svgFilters===!0&&(Yt(q,eE),Yt(Y,rE),Yt(Y,dv)),Ne.mathMl===!0&&(Yt(q,tE),Yt(Y,ER),Yt(Y,dv))),fe.ADD_TAGS&&(q===ee&&(q=Zu(q)),Yt(q,fe.ADD_TAGS,Er)),fe.ADD_ATTR&&(Y===X&&(Y=Zu(Y)),Yt(Y,fe.ADD_ATTR,Er)),fe.ADD_URI_SAFE_ATTR&&Yt(Ye,fe.ADD_URI_SAFE_ATTR,Er),fe.FORBID_CONTENTS&&(Ze===ce&&(Ze=Zu(Ze)),Yt(Ze,fe.FORBID_CONTENTS,Er)),_e&&(q["#text"]=!0),$t&&Yt(q,["html","head","body"]),q.table&&(Yt(q,["tbody"]),delete te.tbody),fe.TRUSTED_TYPES_POLICY){if(typeof fe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof fe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=fe.TRUSTED_TYPES_POLICY,D=E.createHTML("")}else E===void 0&&(E=uIe(f,i)),E!==null&&typeof D=="string"&&(D=E.createHTML(""));Ki&&Ki(fe),Ln=fe}},Ae=Yt({},["mi","mo","mn","ms","mtext"]),Ue=Yt({},["foreignobject","annotation-xml"]),tt=Yt({},["title","style","font","a","script"]),Tt=Yt({},[...QD,...eE,...Z3e]),vt=Yt({},[...tE,...Q3e]),ot=function(fe){let Le=v(fe);(!Le||!Le.tagName)&&(Le={namespaceURI:yt,tagName:"template"});const it=Wv(fe.tagName),Qe=Wv(Le.tagName);return Rt[fe.namespaceURI]?fe.namespaceURI===Nt?Le.namespaceURI===_t?it==="svg":Le.namespaceURI===St?it==="svg"&&(Qe==="annotation-xml"||Ae[Qe]):!!Tt[it]:fe.namespaceURI===St?Le.namespaceURI===_t?it==="math":Le.namespaceURI===Nt?it==="math"&&Ue[Qe]:!!vt[it]:fe.namespaceURI===_t?Le.namespaceURI===Nt&&!Ue[Qe]||Le.namespaceURI===St&&!Ae[Qe]?!1:!vt[it]&&(tt[it]||!Tt[it]):!!(tn==="application/xhtml+xml"&&Rt[fe.namespaceURI]):!1},xt=function(fe){_p(t.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch{fe.remove()}},Ct=function(fe,Le){try{_p(t.removed,{attribute:Le.getAttributeNode(fe),from:Le})}catch{_p(t.removed,{attribute:null,from:Le})}if(Le.removeAttribute(fe),fe==="is"&&!Y[fe])if(Ee||De)try{xt(Le)}catch{}else try{Le.setAttribute(fe,"")}catch{}},Lr=function(fe){let Le=null,it=null;if(V)fe=""+fe;else{const Jt=bR(fe,/^[\r\n\t ]+/);it=Jt&&Jt[0]}tn==="application/xhtml+xml"&&yt===_t&&(fe=''+fe+"");const Qe=E?E.createHTML(fe):fe;if(yt===_t)try{Le=new d().parseFromString(Qe,tn)}catch{}if(!Le||!Le.documentElement){Le=C.createDocument(yt,"template",null);try{Le.documentElement.innerHTML=Ft?D:Qe}catch{}}const Bt=Le.body||Le.documentElement;return fe&&it&&Bt.insertBefore(r.createTextNode(it),Bt.childNodes[0]||null),yt===_t?A.call(Le,$t?"html":"body")[0]:$t?Le.documentElement:Bt},Or=function(fe){return w.call(fe.ownerDocument||fe,fe,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ct=function(fe){return fe instanceof h&&(typeof fe.__depth<"u"&&typeof fe.__depth!="number"||typeof fe.__removalCount<"u"&&typeof fe.__removalCount!="number"||typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof u)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"||typeof fe.insertBefore!="function"||typeof fe.hasChildNodes!="function")},Kt=function(fe){return typeof l=="function"&&fe instanceof l},or=function(fe,Le,it){I[fe]&&cv(I[fe],Qe=>{Qe.call(t,Le,it,Ln)})},Mi=function(fe){let Le=null;if(or("beforeSanitizeElements",fe,null),ct(fe))return xt(fe),!0;const it=Er(fe.nodeName);if(or("uponSanitizeElement",fe,{tagName:it,allowedTags:q}),fe.hasChildNodes()&&!Kt(fe.firstElementChild)&&Oi(/<[/\w]/g,fe.innerHTML)&&Oi(/<[/\w]/g,fe.textContent)||fe.nodeType===Vu.progressingInstruction||Xe&&fe.nodeType===Vu.comment&&Oi(/<[/\w]/g,fe.data))return xt(fe),!0;if(!q[it]||te[it]){if(!te[it]&&$n(it)&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,it)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(it)))return!1;if(_e&&!Ze[it]){const Qe=v(fe)||fe.parentNode,Bt=b(fe)||fe.childNodes;if(Bt&&Qe){const Jt=Bt.length;for(let Gt=Jt-1;Gt>=0;--Gt){const Wr=g(Bt[Gt],!0);Wr.__removalCount=(fe.__removalCount||0)+1,Qe.insertBefore(Wr,y(fe))}}}return xt(fe),!0}return fe instanceof a&&!ot(fe)||(it==="noscript"||it==="noembed"||it==="noframes")&&Oi(/<\/no(script|embed|frames)/i,fe.innerHTML)?(xt(fe),!0):(je&&fe.nodeType===Vu.text&&(Le=fe.textContent,cv([N,L,F],Qe=>{Le=$p(Le,Qe," ")}),fe.textContent!==Le&&(_p(t.removed,{element:fe.cloneNode()}),fe.textContent=Le)),or("afterSanitizeElements",fe,null),!1)},Tn=function(fe,Le,it){if(ne&&(Le==="id"||Le==="name")&&(it in r||it in Qn||it==="__depth"||it==="__removalCount"))return!1;if(!(ke&&!Z[Le]&&Oi(P,Le))){if(!(de&&Oi(_,Le))){if(!Y[Le]||Z[Le]){if(!($n(fe)&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,fe)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(fe))&&(Q.attributeNameCheck instanceof RegExp&&Oi(Q.attributeNameCheck,Le)||Q.attributeNameCheck instanceof Function&&Q.attributeNameCheck(Le))||Le==="is"&&Q.allowCustomizedBuiltInElements&&(Q.tagNameCheck instanceof RegExp&&Oi(Q.tagNameCheck,it)||Q.tagNameCheck instanceof Function&&Q.tagNameCheck(it))))return!1}else if(!Ye[Le]){if(!Oi(G,$p(it,j,""))){if(!((Le==="src"||Le==="xlink:href"||Le==="href")&&fe!=="script"&&K3e(it,"data:")===0&&Te[fe])){if(!(me&&!Oi(M,$p(it,j,"")))){if(it)return!1}}}}}}return!0},$n=function(fe){return fe!=="annotation-xml"&&bR(fe,R)},Ur=function(fe){or("beforeSanitizeAttributes",fe,null);const{attributes:Le}=fe;if(!Le)return;const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};let Qe=Le.length;for(;Qe--;){const Bt=Le[Qe],{name:Jt,namespaceURI:Gt,value:Wr}=Bt,xi=Er(Jt);let zr=Jt==="value"?Wr:J3e(Wr);if(it.attrName=xi,it.attrValue=zr,it.keepAttr=!0,it.forceKeepAttr=void 0,or("uponSanitizeAttribute",fe,it),zr=it.attrValue,it.forceKeepAttr||(Ct(Jt,fe),!it.keepAttr))continue;if(!Fe&&Oi(/\/>/i,zr)){Ct(Jt,fe);continue}if(Xe&&Oi(/((--!?|])>)|<\/(style|title)/i,zr)){Ct(Jt,fe);continue}je&&cv([N,L,F],Zi=>{zr=$p(zr,Zi," ")});const xa=Er(fe.nodeName);if(Tn(xa,xi,zr)){if(ge&&(xi==="id"||xi==="name")&&(Ct(Jt,fe),zr=Ie+zr),E&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Gt)switch(f.getAttributeType(xa,xi)){case"TrustedHTML":{zr=E.createHTML(zr);break}case"TrustedScriptURL":{zr=E.createScriptURL(zr);break}}try{Gt?fe.setAttributeNS(Gt,Jt,zr):fe.setAttribute(Jt,zr),ct(fe)?xt(fe):vR(t.removed)}catch{}}}or("afterSanitizeAttributes",fe,null)},ei=function rt(fe){let Le=null;const it=Or(fe);for(or("beforeSanitizeShadowDOM",fe,null);Le=it.nextNode();){if(or("uponSanitizeShadowNode",Le,null),Mi(Le))continue;const Qe=v(Le);Le.nodeType===Vu.element&&(Qe&&Qe.__depth?Le.__depth=(Le.__removalCount||0)+Qe.__depth+1:Le.__depth=1),(Le.__depth>=On||Le.__depth<0||xR(Le.__depth))&&xt(Le),Le.content instanceof s&&(Le.content.__depth=Le.__depth,rt(Le.content)),Ur(Le)}or("afterSanitizeShadowDOM",fe,null)};return t.sanitize=function(rt){let fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=null,it=null,Qe=null,Bt=null;if(Ft=!rt,Ft&&(rt=""),typeof rt!="string"&&!Kt(rt))if(typeof rt.toString=="function"){if(rt=rt.toString(),typeof rt!="string")throw Fp("dirty is not a string, aborting")}else throw Fp("toString is not a function");if(!t.isSupported)return rt;if(Pt||Se(fe),t.removed=[],typeof rt=="string"&&(be=!1),be){if(rt.nodeName){const Wr=Er(rt.nodeName);if(!q[Wr]||te[Wr])throw Fp("root node is forbidden and cannot be sanitized in-place")}}else if(rt instanceof l)Le=Lr(""),it=Le.ownerDocument.importNode(rt,!0),it.nodeType===Vu.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?Le=it:Le.appendChild(it);else{if(!Ee&&!je&&!$t&&rt.indexOf("<")===-1)return E&&oe?E.createHTML(rt):rt;if(Le=Lr(rt),!Le)return Ee?null:oe?D:""}Le&&V&&xt(Le.firstChild);const Jt=Or(be?rt:Le);for(;Qe=Jt.nextNode();){if(Mi(Qe))continue;const Wr=v(Qe);Qe.nodeType===Vu.element&&(Wr&&Wr.__depth?Qe.__depth=(Qe.__removalCount||0)+Wr.__depth+1:Qe.__depth=1),(Qe.__depth>=On||Qe.__depth<0||xR(Qe.__depth))&&xt(Qe),Qe.content instanceof s&&(Qe.content.__depth=Qe.__depth,ei(Qe.content)),Ur(Qe)}if(be)return rt;if(Ee){if(De)for(Bt=T.call(Le.ownerDocument);Le.firstChild;)Bt.appendChild(Le.firstChild);else Bt=Le;return(Y.shadowroot||Y.shadowrootmode)&&(Bt=$.call(n,Bt,!0)),Bt}let Gt=$t?Le.outerHTML:Le.innerHTML;return $t&&q["!doctype"]&&Le.ownerDocument&&Le.ownerDocument.doctype&&Le.ownerDocument.doctype.name&&Oi(OU,Le.ownerDocument.doctype.name)&&(Gt=" +`+Gt),je&&cv([N,L,F],Wr=>{Gt=$p(Gt,Wr," ")}),E&&oe?E.createHTML(Gt):Gt},t.setConfig=function(){let rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Se(rt),Pt=!0},t.clearConfig=function(){Ln=null,Pt=!1},t.isValidAttribute=function(rt,fe,Le){Ln||Se({});const it=Er(rt),Qe=Er(fe);return Tn(it,Qe,Le)},t.addHook=function(rt,fe){typeof fe=="function"&&(I[rt]=I[rt]||[],_p(I[rt],fe))},t.removeHook=function(rt){if(I[rt])return vR(I[rt])},t.removeHooks=function(rt){I[rt]&&(I[rt]=[])},t.removeAllHooks=function(){I={}},t}var cIe=RU();const hIe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,dIe=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,fIe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,pIe=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mIe=tl.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[xg({find:hIe,type:this.type}),xg({find:fIe,type:this.type})]},addPasteRules(){return[wg({find:dIe,type:this.type}),wg({find:pIe,type:this.type})]}}),gIe=of.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),yIe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,vIe=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,bIe=tl.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[xg({find:yIe,type:this.type})]},addPasteRules(){return[wg({find:vIe,type:this.type})]}}),xIe=of.create({name:"text",group:"inline"}),wIe=tl.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["span",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const r=B$(e,this.type);return Object.entries(r).some(([,i])=>!!i)?!0:t.unsetMark(this.name)}}}}),SIe=tl.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",mh(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),DIe=({editor:e})=>e?B.jsxs("ul",{className:"menu-bar",children:[B.jsx("li",{children:B.jsx(Ot,{variant:e.isActive("bold")?"filled":"ghost",onClick:()=>e.chain().focus().toggleBold().run(),disabled:!e.can().chain().focus().toggleBold().run(),type:"button",children:B.jsx("b",{children:"B"})})}),B.jsx("li",{children:B.jsx(Ot,{variant:e.isActive("italic")?"filled":"ghost",onClick:()=>e.chain().focus().toggleItalic().run(),disabled:!e.can().chain().focus().toggleItalic().run(),type:"button",children:B.jsx("i",{children:"I"})})}),B.jsx("li",{children:B.jsx(Ot,{variant:e.isActive("underline")?"filled":"ghost",onClick:()=>e.chain().focus().toggleUnderline().run(),disabled:!e.can().chain().focus().toggleUnderline().run(),type:"button",children:B.jsx("u",{children:"U"})})}),B.jsx("li",{children:B.jsx(Ot,{variant:e.isActive("strike")?"filled":"ghost",onClick:()=>e.chain().focus().toggleStrike().run(),disabled:!e.can().chain().focus().toggleStrike().run(),type:"button",children:B.jsx("s",{children:"S"})})})]}):null,EIe=({label:e,richTextValue:t,handleRichTextChange:r})=>{const n=M3e({extensions:[wIe,W3e,gIe,xIe,U3e,bIe,mIe,SIe],editorProps:{attributes:{class:"text-editor"}},content:t,injectCSS:!1,parseOptions:{preserveWhitespace:!1},onUpdate(i){const s=cIe.sanitize(i.editor.getHTML().replaceAll(" ",""));r(s==="

"?"":s)}});return H.useEffect(()=>{t==""&&(n==null||n.commands.setContent(t,!0))},[t]),B.jsxs("div",{className:"editor-container",children:[e&&B.jsx("label",{children:e}),B.jsxs("div",{className:"text-container",children:[B.jsx(I3e,{editor:n}),B.jsx(DIe,{editor:n})]})]})},CIe=({className:e,onColorPick:t,selectedColor:r})=>{const{t:n}=mr(),[i,s]=H.useState(!1),[o,l]=H.useState("");return B.jsxs(B.Fragment,{children:[B.jsxs(Ot,{className:e,icon:"magnifying_glass",noText:!0,onClick:()=>s(!0),children:[n("playgroundSelectColor"),B.jsx(Ks,{placement:"left",children:n("playgroundSelectColor")})]}),B.jsx(hf,{backdrop:"weak",direction:"up",open:i,onClose:()=>{s(!1)},withCloseButton:!0,drawerHeader:B.jsxs("div",{className:"flex gap-fix-3xl",children:[B.jsx("span",{className:"my-auto",children:n("playgroundSelectColor")}),B.jsx(an,{type:"search",variant:"floating",label:n("search"),value:o,onChange:a=>l(a.target.value)})]}),className:"select-icon-dialog",children:B.jsx("div",{className:"grid-cols-3 md:grid-cols-5 grid gap-fix-md p-fix-sm overflow-y-auto h-full",children:[...JX,"none"].filter(a=>a.includes(o)).map(a=>B.jsx("button",{onClick:()=>t(a),children:B.jsxs(ls,{"data-interactive":"elevation",style:{backgroundColor:"var(--db-current-color-bg-enabled)"},className:`flex-row min-h-siz-lg gap-fix-md justify-between items-center db-${a}`,spacing:"small",children:[a,r===a&&B.jsx(df,{icon:"done",children:"Selected color"})]})},`color-button-${a}`))})})]})},gh=({settings:e})=>{const{t}=mr(),{actions:{setProp:r,setCustom:n,setHidden:i},props:s}=ba(l=>({props:l.data.props})),o=(l,a,c)=>{c==="custom"?n(u=>u[l]=a):c==="hidden"?i(a):r(u=>u[l]=a)};return s?B.jsx("div",{className:"flex flex-col gap-fix-md",children:e.filter(l=>!l.isHidden||!l.isHidden(s)).map(l=>{var a,c,u,h;return B.jsxs(H.Fragment,{children:[(l.type==="text"||l.type==="number")&&B.jsx(an,{type:l.type,min:l.type==="number"&&((a=l.numberOptions)==null?void 0:a.min)||void 0,max:l.type==="number"&&((c=l.numberOptions)==null?void 0:c.max)||void 0,step:l.type==="number"&&((u=l.numberOptions)==null?void 0:u.step)||void 0,dataList:l.dataList,label:t(l.key),variant:"floating",defaultValue:s[l.key],onChange:d=>o(l.key,d.target.value,l.changeType)}),l.type==="textarea"&&B.jsx(im,{label:t(l.key),variant:"floating",defaultValue:s[l.key],onChange:d=>o(l.key,d.target.value,l.changeType)}),l.type==="richtext"&&B.jsx(EIe,{label:t(l.key),richTextValue:s[l.key],handleRichTextChange:d=>o(l.key,d,l.changeType)}),l.type==="select"&&B.jsx(mc,{label:t(l.key),variant:"floating",defaultValue:s[l.key],onChange:d=>o(l.key,d.target.value,l.changeType),children:(h=l.selectOptions)==null?void 0:h.map(d=>B.jsx("option",{value:d.value,children:t(d.label||d.value||"")},`select-${l.key}-${d.label||d.value}`))}),l.type==="switch"&&B.jsx(MY,{label:t(l.key),checked:s[l.key],onChange:d=>o(l.key,d.target.checked,l.changeType)}),l.type==="icon"&&B.jsxs("div",{className:"flex gap-fix-md items-center",children:[B.jsxs("div",{className:"flex flex-col",children:[B.jsx(Mr,{size:"small",icon:"none",children:t(l.key)}),B.jsx("span",{children:s[l.key]})]}),B.jsx(df,{icon:s[l.key]}),B.jsx(M_e,{className:"ml-auto",selectedIcon:s[l.key],onIconPick:d=>{o(l.key,d,l.changeType)}})]}),l.type==="color"&&B.jsxs("div",{className:"flex gap-fix-md items-center",children:[B.jsxs("div",{className:`flex flex-col rounded p-fix-xs ${s[l.key]!=="none"?`db-${s[l.key]}`:""}`,children:[B.jsx(Mr,{size:"small",icon:"none",children:t(l.key)}),B.jsx("span",{children:s[l.key]})]}),B.jsx(CIe,{className:"ml-auto",selectedColor:s[l.key],onColorPick:d=>{o(l.key,d,l.changeType)}})]})]},`setting-${l.key}`)})}):B.jsx(Mr,{semantic:"warning",children:t("playgroundCopyError")})},yh=(e,t,r)=>`drag-container${e?" selected":""}${t?" hovered":""}${r?` ${r}`:""}`,TIe=(e,t)=>e.tope.left{const{previewContainer:r}=ds(),[n,i]=H.useState(),[s,o]=H.useState(!1),[l,a]=H.useState(!1);return H.useEffect(()=>{if(n&&r){const c=n.getBoundingClientRect();o(TIe(c,r)),a(AIe(c,r))}},[n,r]),B.jsx("span",{ref:c=>{c&&(t(c),i(c))},className:"drag-button flex py-fix-3xs pl-fix-3xs","data-icon-after":"dots_drag_and_drop","data-outside-y":s,"data-outside-x":l,children:e})},z$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(l=>({name:l.data.custom.displayName||l.data.name,hovered:l.data.custom.hover})),{selected:o}=Ii(l=>{const[a]=l.events.selected;return{selected:n===a}});return B.jsxs(Ot,{className:`${yh(o,i,e.className)}`,ref:l=>{l&&t(l)},...e,children:[e.children,B.jsx(vh,{componentName:s,drag:r})]})},kIe=()=>B.jsx(gh,{settings:[{key:"children",type:"text"},{key:"variant",type:"select",selectOptions:[{label:"outlined",value:"outlined"},{label:"brand",value:"brand"},{label:"filled",value:"filled"},{label:"ghost",value:"ghost"}]},{key:"disabled",type:"switch"},{key:"size",type:"select",selectOptions:[{label:"small",value:"small"},{label:"medium",value:"medium"}]},{key:"noText",type:"switch"},{key:"width",type:"select",selectOptions:[{label:"auto",value:"auto"},{label:"full",value:"full"}]},{key:"icon",type:"icon"}]});z$.craft={props:{variant:"outlined",children:"Test",size:"medium",disabled:!1,noText:!1,width:"auto",icon:"none"},related:{settings:kIe}};const Yg=({children:e,className:t})=>{const{connectors:{connect:r},id:n}=ba(),{selected:i}=Ii(s=>{const[o]=s.events.selected;return{selected:n===o}});return B.jsx("div",{className:`drop-container ${t||""}${i?" selected":""}`,ref:s=>{s&&r(s)},children:e})};Yg.craft={rules:{canMoveIn:e=>e.every(()=>!0),canDrag:()=>!1}};const H$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(l=>({name:l.data.custom.displayName||l.data.name,hovered:l.data.custom.hover})),{selected:o}=Ii(l=>{const[a]=l.events.selected;return{selected:n===a}});return B.jsxs(ls,{className:`${yh(o,i,e.className)}`,ref:l=>{l&&t(l)},...e,children:[B.jsx(Bf,{id:"card-children",is:Yg,canvas:!0,children:e.children}),B.jsx(vh,{componentName:s,drag:r})]})},_Ie=()=>B.jsx(gh,{settings:[{key:"spacing",type:"select",selectOptions:[{value:"none"},{value:"small"},{value:"medium"}]},{key:"elevationLevel",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"}]},{key:"behaviour",type:"select",selectOptions:[{value:"default"},{value:"interactive"}]}]});H$.craft={props:{spacing:"small",behaviour:"default",elevationLevel:"1"},related:{settings:_Ie}};const $Ie=({display:e,direction:t,gap:r,width:n,cells:i,padding:s,color:o})=>{let l="";return e==="grid"?(l+=" grid",t==="column"?l+=` grid-cols-${i||4}`:l+=` grid-rows-${i||4}`):(l+=" flex",t==="column"?l+=" flex-col":l+=" flex-row"),r&&r!=="none"&&(l+=` gap-fix-${r}`),n==="fit"?l+=" w-fit":l+=" w-full",s!=="none"&&(l+=` p-fix-${s}`),o&&o!=="none"&&(l+=` db-${o}`),l},U$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(l=>({name:l.data.custom.displayName||l.data.name,hovered:l.data.custom.hover})),{selected:o}=Ii(l=>{const[a]=l.events.selected;return{selected:n===a}});return B.jsxs("div",{className:`${yh(o,i,`${$Ie(e)}${e.className||""}`)}`,ref:l=>{l&&t(l)},children:[B.jsx(Bf,{id:"drop-container",is:Yg,canvas:!0,children:e.children}),B.jsx(vh,{componentName:s,drag:r})]})},FIe=()=>B.jsx(gh,{settings:[{key:"padding",type:"select",selectOptions:[{value:"none"},{value:"3xs"},{value:"2xs"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"},{value:"2xl"},{value:"3xl"}]},{key:"width",type:"select",selectOptions:[{value:"full"},{value:"fit"}]},{key:"display",type:"select",selectOptions:[{value:"flex"},{value:"grid"}]},{key:"direction",type:"select",selectOptions:[{value:"row"},{value:"column"}]},{key:"cells",type:"number",numberOptions:{min:1,max:8},isHidden:e=>(e==null?void 0:e.display)==="flex"},{key:"gap",type:"select",selectOptions:[{value:"none"},{value:"xs"},{value:"sm"},{value:"md"},{value:"lg"},{value:"xl"}]},{key:"color",type:"color"}]});U$.craft={props:{display:"flex",direction:"row",gap:"md",width:"full",cells:4,padding:"none",color:"none"},related:{settings:FIe}};const W$=({text:e,className:t})=>{const{t:r}=mr(),{connectors:{connect:n,drag:i},id:s,hovered:o,name:l}=ba(c=>({name:c.data.custom.displayName||c.data.name,hovered:c.data.custom.hover})),{selected:a}=Ii(c=>{const[u]=c.events.selected;return{selected:s===u}});return B.jsxs("div",{className:`${yh(a,o,t)}`,"data-hint":e&&(e==null?void 0:e.length)>0?void 0:r("pgEditMe"),ref:c=>{c&&n(c)},children:[e&&B.jsx("div",{dangerouslySetInnerHTML:{__html:e||""}}),B.jsx(vh,{componentName:l,drag:i})]})},PIe=()=>B.jsx(gh,{settings:[{key:"text",type:"richtext"}]});W$.craft={props:{},related:{settings:PIe}};const BU=e=>B.jsx(Yg,{className:"w-full h-full flex flex-col",...e,children:e.children}),V$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(l=>({name:l.data.custom.displayName||l.data.name,hovered:l.data.custom.hover})),{selected:o}=Ii(l=>{const[a]=l.events.selected;return{selected:n===a}});return B.jsxs(hd,{className:`${yh(o,i,e.className)}`,ref:l=>{l&&t(l)},...e,children:[e.children,B.jsx(vh,{componentName:s,drag:r})]})},IIe=()=>B.jsx(gh,{settings:[{key:"href",type:"text"},{key:"children",type:"text"},{key:"content",type:"select",selectOptions:[{value:"internal"},{value:"external"}]},{key:"variant",type:"select",selectOptions:[{value:"adaptive"},{value:"brand"},{value:"inline"}]},{key:"size",type:"select",selectOptions:[{value:"medium"},{value:"small"}]}]});V$.craft={props:{children:"Link",content:"internal",variant:"adaptive",size:"medium"},related:{settings:IIe}};const jU=({create:e,open:t,onClose:r})=>{const{t:n}=mr(),{currentId:i,nodeTrees:s}=ds(f=>f),[o,l]=H.useState(""),[a,c]=H.useState(""),[u,h]=H.useState(),{actions:d}=Ii();return H.useEffect(()=>{if(t)if(e)l(""),c("");else{const f=s[i];f&&(l(i),c(f.name))}},[e,i,s,t]),H.useEffect(()=>{o.length===0?h(!0):h(e?!!s[o]||o.length===0||a.length===0:o===i&&a===s[i].name)},[e,i,o,a,s]),B.jsx(B.Fragment,{children:B.jsxs(hf,{backdrop:"weak",open:t,onClose:r,withCloseButton:!0,drawerHeader:n(e?"add":"pgEdit"),children:[B.jsxs("div",{className:"flex flex-col gap-fix-md py-fix-md",children:[B.jsx(an,{label:n("id"),placeholder:n("id"),variant:"floating",value:o,customValidity:o.length===0||e&&s[o]?"invalid":"no-validation",onChange:f=>l(f.target.value)}),B.jsx(aa,{margin:"none"}),B.jsx(an,{label:n("name"),placeholder:n("name"),variant:"floating",value:a,onChange:f=>c(f.target.value)})]}),B.jsxs("div",{className:"flex gap-fix-md absolute bottom-fix-xs inset-x-fix-lg",children:[!e&&B.jsx(Ot,{width:"full",disabled:Object.entries(s).length<2,onClick:()=>{const f={...s};delete f[i],ds.setState({nodeTrees:f,currentId:Object.keys(s)[0]}),r&&r()},children:n("delete")}),B.jsx(Ot,{width:"full",variant:"brand",disabled:u,onClick:()=>{const f={...s},p=o||Mn();e?(f[p]={isPage:!0,serializedJson:"",name:a||"Unknown"},d.deserialize('{"ROOT":{"type":{"resolvedName":"Root"},"isCanvas":true,"props":{"id":"canvas"},"displayName":"Root","custom":{"hover":false},"hidden":false,"nodes":[],"linkedNodes":{}}}')):(delete f[i],f[p]={...s[i],name:a||"Unknown"}),ds.setState({nodeTrees:f,currentId:p}),c(""),l(""),r&&r()},children:n(e?"add":"change")})]})]})})},NIe=(e,t,r,n)=>{const i=t.node(r).toNodeTree(),s={};Object.keys(i.nodes).forEach(a=>{s[a]=Mn()});const o=Object.entries(s).map(([a,c])=>{const u=t.node(a).toSerializedNode();u.parent&&(u.parent=s[u.parent]),u.nodes=u.nodes.map(d=>s[d]),u.linkedNodes=Object.entries(u.linkedNodes).reduce((d,[f,p])=>({...d,[f]:s[p]}),{});const h=t.parseSerializedNode(u).toNode();return h.id=c,h}),l=o.reduce((a,c)=>({...a,[c.id]:c}),{});e.addNodeTree({nodes:l,rootNodeId:o[0].id},n)},zU=({node:e})=>{const{selected:t,actions:r,allNodes:n,query:i}=Ii(f=>{const[p]=f.events.selected;let g;if(p){const y=f.nodes[p];g={id:p,data:y.data,settings:y.related&&y.related.settings}}return{selected:g,allNodes:f.nodes}}),[s,o]=H.useState(!1);if(!e)return null;const{id:l,data:a}=e;let c=[...a.nodes,...Object.values(a.linkedNodes)];if(c.length===1&&n[c[0]].data.name==="DropContainer"){const f=n[c[0]].data;c=[...f.nodes,...Object.values(f.linkedNodes)]}const h=a.custom.displayName||a.name,d=B.jsxs("div",{className:` + ${(t==null?void 0:t.id)===l?"db-informational-bg-lvl-3":""} tree-item - flex items-center justify-between w-full gap-fix-md`,role:"button",onClick:()=>{r.selectNode(a)},children:[c.length===0&&z.jsx(df,{className:"w-siz-md",icon:"intermediary_stop"}),z.jsx("span",{className:"break-all w-full",onMouseEnter:()=>r.setCustom(a,f=>{f.hover=!0}),onMouseLeave:()=>r.setCustom(a,f=>{f.hover=!1}),children:h}),z.jsxs("div",{className:"flex gap-fix-3xs",children:[a!=="ROOT"&&z.jsxs(Ot,{className:"min-w-siz-md",variant:"ghost",icon:"copy",noText:!0,onClick:()=>{l.parent&&NIe(r,i,a,l.parent)},children:["Copy ",h,"(",a,")"]}),z.jsxs(Ot,{className:"min-w-siz-md",variant:"ghost",icon:l.hidden?"visibility_off":"visibility",noText:!0,onClick:()=>{r.setHidden(a,!l.hidden)},children:["Hide ",h,"(",a,")"]})]})]});return c.length>0?z.jsxs("details",{open:s,children:[z.jsxs("summary",{onDoubleClick:()=>o(!s),onClick:f=>{f.preventDefault()},className:"flex items-center",children:[z.jsxs(Ot,{variant:"ghost",icon:s?"chevron_down":"chevron_right",noText:!0,onClick:()=>{o(!s)},children:["Open ",l.displayName,"(",a,")"]}),d]}),z.jsx("div",{className:"flex flex-col pl-fix-xs w-full",children:c.map(f=>z.jsx(H.Fragment,{children:z.jsx(jU,{node:n[f]})},`tree-item-${f}`))})]}):d},MIe=({className:e})=>{const{t}=mr(),{currentId:r,nodeTrees:n}=ds(a=>a),{nodes:i}=Ii(a=>({nodes:a.nodes})),[s,o]=H.useState(!1);return z.jsxs("div",{"data-density":"functional",className:`h-full${e?` ${e}`:""} grow-0 shrink-0 w-[320px] border-r overflow-hidden`,children:[n[r]&&z.jsxs("div",{className:"h-siz-md flex items-center justify-between p-fix-sm",children:[z.jsx("h6",{children:n[r].name}),z.jsx(Ot,{"data-tonality":"functional",noText:!0,icon:"edit",variant:"ghost",onClick:()=>o(!0),children:t("pgEdit")}),z.jsx(zU,{open:s,onClose:()=>o(!1)})]}),z.jsx("div",{"data-density":"functional",className:"flex flex-col p-fix-sm h-full overflow-auto",children:z.jsx(jU,{node:i.ROOT})})]})},LIe=({className:e})=>{const{t}=mr(),{currentId:r,nodeTrees:n,showBorders:i,showSpacings:s}=ds(u=>u),{actions:o,canUndo:a,canRedo:l,query:c}=Ii((u,h)=>{const[d]=u.events.selected;let f;return d&&(f={id:d,name:u.nodes[d].data.name,settings:u.nodes[d].related&&u.nodes[d].related.settings}),{selected:f,canUndo:h.history.canUndo(),canRedo:h.history.canRedo()}});return z.jsx("div",{"data-density":"functional",className:`flex h-siz-md db-neutral-bg-transparent-semi px-fix-sm ${e||""}`,children:z.jsxs("div",{className:"flex w-full justify-between m-auto",children:[z.jsxs("div",{className:"flex gap-fix-sm",children:[z.jsxs(Ot,{variant:"ghost",noText:!0,icon:"undo",disabled:!a,onClick:()=>{o.history.undo()},children:[t("playgroundUndo"),a&&z.jsx(Ks,{placement:"right",children:t("playgroundUndo")})]}),z.jsxs(Ot,{variant:"ghost",noText:!0,icon:"fast_forward_empty",disabled:!l,onClick:()=>{o.history.redo()},children:[t("playgroundRedo"),l&&z.jsx(Ks,{placement:"bottom",children:t("playgroundRedo")})]})]}),z.jsxs("div",{className:"flex gap-fix-sm",children:[z.jsx(q0,{noText:!0,variant:"ghost",label:"import",accept:"application/JSON",tooltip:"import",onUpload:u=>{try{const h=atob(u.split("base64,")[1]);o.deserialize(h)}catch(h){console.error(h)}}}),z.jsxs(Ot,{variant:"ghost",noText:!0,icon:"download",onClick:()=>{iwe({[n[r].name]:c.serialize()})},children:[t("export"),z.jsx(Ks,{placement:"bottom",children:t("export")})]}),z.jsxs(Ot,{variant:"ghost",noText:!0,icon:"resize",onClick:()=>{ds.setState({showSpacings:!s})},children:[t("playgroundShowSpacings"),z.jsx(Ks,{placement:"bottom",children:t("playgroundShowSpacings")})]}),z.jsxs(Ot,{variant:"ghost",noText:!0,icon:"grid_view",onClick:()=>{ds.setState({showBorders:!i})},children:[t("playgroundShowBorders"),z.jsx(Ks,{placement:"left",children:t("playgroundShowBorders")})]})]})]})})};var G$={exports:{}};G$.exports;(function(e){var t=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(l,c){if(!s[l]){s[l]={};for(var u=0;u>>8,u[h*2+1]=f%256}return u},decompressFromUint8Array:function(l){if(l==null)return a.decompress(l);for(var c=new Array(l.length/2),u=0,h=c.length;u>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++),f[y]=E++,b=String(g)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(h=0;h>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++)}for(d=2,h=0;h>1;for(;;)if(w=w<<1,T==c-1){C.push(u(w));break}else T++;return C.join("")},decompress:function(l){return l==null?"":l==""?null:a._decompress(l.length,32768,function(c){return l.charCodeAt(c)})},_decompress:function(l,c,u){var h=[],d=4,f=4,p=3,g="",y=[],b,v,E,D,C,w,T,A={val:u(0),position:c,index:1};for(b=0;b<3;b+=1)h[b]=b;for(E=0,C=Math.pow(2,2),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;switch(E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 2:return""}for(h[3]=T,v=T,y.push(T);;){if(A.index>l)return"";for(E=0,C=Math.pow(2,p),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;switch(T=E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,p),p++),h[T])g=h[T];else if(T===f)g=v+v.charAt(0);else return null;y.push(g),h[f++]=v+g.charAt(0),d--,v=g,d==0&&(d=Math.pow(2,p),p++)}}};return a}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(G$);var fv=G$.exports;const OIe=({className:e})=>{const t=H.useRef(null),{currentId:r,nodeTrees:n}=ds(),{query:i,actions:s}=Ii(),[o,a]=H.useState(),[l,c]=H.useState(0),[u,h]=H.useState(!1);H.useEffect(()=>{t.current&&ds.setState({previewContainer:t.current.getBoundingClientRect()})},[t]);const d=H.useCallback(()=>{const f=fv.compressToBase64(fv.compress(i.serialize())),p=n[r].serializedJson;f!==p&&r===o&&l===Object.keys(n).length&&ds.setState({nodeTrees:{...n,[r]:{...n[r],serializedJson:f}}})},[r,o,l,n,i]);return H.useEffect(()=>{const f=setTimeout(()=>{d(),h(!u)},2e3);return()=>clearTimeout(f)},[u,d]),H.useEffect(()=>{if(r&&n&&n[r]&&s){if(r!==o&&(l===0||l===Object.keys(n).length)){const f=n[r].serializedJson,p=f.length===0?void 0:fv.decompress(fv.decompressFromBase64(f));p&&s.deserialize(p)}a(r),c(Object.keys(n).length)}},[s,r,n,o,l]),z.jsx("div",{ref:t,className:`${e||""} p-fix-3xs h-full overflow-y-auto overflow-x-hidden`,children:z.jsx(w_e,{children:z.jsx(Bf,{id:"canvas",is:BU,canvas:!0})})})},RIe=()=>{const{selected:e,actions:t}=Ii(o=>{const[a]=o.events.selected;let l;if(a){const c=o.nodes[a];l={id:a,data:c.data,settings:c.related&&c.related.settings}}return{selected:l}}),[r,n]=H.useState(),[i,s]=H.useState();return H.useEffect(()=>{if(e&&e.data.name==="DropContainer"&&e.data.parent&&t){const o=e.data.parent;t.selectNode(o)}else e&&r!==e.id?(n(e.id),s(e.data.custom.displayName||e.data.name)):e||(s(""),n(void 0))},[r,e,t]),e?z.jsx("div",{className:"flex flex-col h-full overflow-y-auto",children:z.jsxs("div",{className:"flex flex-col p-fix-sm gap-fix-md h-full",children:[z.jsx(an,{variant:"floating",label:"Displayname",value:i,onChange:o=>{const a=o.target.value;s(a),t.setCustom(e.id,l=>{l.displayName=a})}}),e.settings?H.createElement(e.settings):z.jsx(Mr,{semantic:"warning",children:"No settings"}),z.jsx(Ot,{variant:"brand",icon:"bin",width:"full",disabled:!e||e.data.name==="Root",onClick:()=>{e&&t.delete(e.id)},children:"Delete"})]})}):null},BIe=H.forwardRef((e,t)=>e.size==="1"?z.jsx("h1",{ref:t,...e,children:e.children}):e.size==="2"?z.jsx("h2",{ref:t,...e,children:e.children}):e.size==="3"?z.jsx("h3",{ref:t,...e,children:e.children}):e.size==="5"?z.jsx("h5",{ref:t,...e,children:e.children}):e.size==="6"?z.jsx("h6",{ref:t,...e,children:e.children}):z.jsx("h4",{ref:t,...e,children:e.children})),q$=({headline:e,size:t,className:r,variant:n})=>{const{t:i}=mr(),{connectors:{connect:s,drag:o},id:a,hovered:l,name:c}=ba(h=>({name:h.data.custom.displayName||h.data.name,hovered:h.data.custom.hover})),{selected:u}=Ii(h=>{const[d]=h.events.selected;return{selected:a===d}});return z.jsxs(BIe,{className:`${yh(u,l,r)}`,"data-hint":e?void 0:i("pgEditMe"),"data-variant":n,ref:h=>{h&&s(h)},size:t,children:[e,z.jsx(vh,{componentName:c,drag:o})]})},zIe=()=>z.jsx(gh,{settings:[{key:"headline",type:"textarea"},{key:"size",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"}]},{key:"variant",type:"select",selectOptions:[{value:"black"},{value:"light"}]}]});q$.craft={props:{size:"4",variant:"black"},related:{settings:zIe}};const K$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(a=>({name:a.data.custom.displayName||a.data.name,hovered:a.data.custom.hover})),{selected:o}=Ii(a=>{const[l]=a.events.selected;return{selected:n===l}});return z.jsxs("div",{className:`db-divider text-[0] ${yh(o,i,e.className)}`,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,ref:a=>{a&&t(a)},children:["Divider",z.jsx(vh,{componentName:s,drag:r})]})},jIe=()=>z.jsx(gh,{settings:[{key:"emphasis",type:"select",selectOptions:[{value:"weak"},{value:"strong"}]},{key:"variant",type:"select",selectOptions:[{value:"horizontal"},{value:"vertical"}]},{key:"margin",type:"select",selectOptions:[{value:"auto"},{value:"none"}]}]});K$.craft={props:{emphasis:"weak",variant:"horizontal",margin:"auto"},related:{settings:jIe}};const HIe=[{headline:"general",components:[{name:"container",component:z.jsx(U$,{}),assetPath:"assets/components/flex.svg"},{name:"text",component:z.jsx(W$,{})},{name:"headline",component:z.jsx(q$,{})}]},{headline:"action",components:[{name:"button",component:z.jsx(j$,{children:"Test"}),assetPath:"assets/components/button.svg"},{name:"link",component:z.jsx(V$,{}),assetPath:"assets/components/link.svg"}]},{headline:"layout",components:[{name:"card",component:z.jsx(H$,{})},{name:"divider",component:z.jsx(K$,{}),assetPath:"assets/components/divider.svg"}]}],UIe=({component:e,assetPath:t,name:r})=>{const{connectors:n}=Ii();return z.jsx("div",{ref:i=>{i&&n.create(i,e)},children:z.jsxs(ls,{className:"items-center cursor-grab p-fix-xs",spacing:"small",children:[z.jsx("img",{className:"max-h-siz-md",alt:r,src:t||"assets/components/component.svg"}),z.jsx("span",{className:"break-all",children:r})]})})},WIe=()=>{const{t:e}=mr(),[t,r]=H.useState("");return z.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-md h-full overflow-y-auto","data-density":"functional",children:[z.jsx(an,{type:"search",variant:"floating",label:e("search"),placeholder:e("search"),onChange:n=>r(n.target.value)}),HIe.filter(({components:n})=>n.some(({name:i})=>e(i).includes(t))).map(({headline:n,components:i})=>z.jsxs(H.Fragment,{children:[z.jsx("h6",{children:e(n)}),z.jsx("div",{className:"grid grid-cols-2 gap-fix-sm",children:i.filter(({name:s})=>e(s).includes(t)).map(({name:s,component:o,assetPath:a})=>z.jsx(H.Fragment,{children:z.jsx(UIe,{name:e(s),component:o,assetPath:a})},`${n}-${s}`))})]},n))]})},VIe=({className:e})=>{const t=H.useRef(null),{t:r}=mr(),{selected:n}=Ii(i=>{const[s]=i.events.selected;let o;if(s){const a=i.nodes[s];o={id:s,data:a.data,settings:a.related&&a.related.settings}}return{selected:o}});return H.useEffect(()=>{t.current&&n&&t.current.click()},[n,t]),z.jsx("div",{"data-density":"functional",className:`border-l flex flex-col grow-0 shrink-0 w-[320px] overflow-hidden ${e||""}`,children:z.jsxs(p6,{alignment:"center",className:"h-full",width:"full",children:[z.jsxs(lk,{children:[z.jsx(x0,{children:r("components")}),z.jsx(x0,{disabled:!n,ref:t,children:r("customize")})]}),z.jsx(w0,{children:z.jsx(WIe,{})}),z.jsx(w0,{children:z.jsx(RIe,{})})]})})},GIe=()=>{const{t:e}=mr(),{currentId:t,nodeTrees:r}=ds(s=>s),[n,i]=H.useState(!1);return z.jsxs(z.Fragment,{children:[z.jsxs(f6,{children:[Object.entries(r).map(([s,o])=>z.jsx(cC,{active:s===t,children:z.jsx("a",{onClick:()=>ds.setState({currentId:s}),children:o.name})},s)),z.jsx(cC,{icon:"plus",children:z.jsx("a",{onClick:()=>{i(!0)},children:e("add")})})]}),z.jsx(zU,{create:!0,open:n,onClose:()=>i(!1)})]})},qIe=()=>{const{showBorders:e,showSpacings:t}=ds(n=>n),{t:r}=mr();return z.jsx(N_e,{indicator:{success:"var(--db-successful-contrast-high-enabled)",error:"var(--db-critical-contrast-high-enabled)"},resolver:{Button:j$,Card:H$,Container:U$,DropContainer:Yg,Text:W$,Root:BU,Link:V$,Headline:q$,Divider:K$},children:z.jsx(q1,{name:r("playground"),navigation:z.jsx(GIe,{}),children:z.jsxs("div",{className:`flex h-full w-full${e?" show-borders":""}${t?" show-spacings":""}`,children:[z.jsx(MIe,{}),z.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[z.jsx(LIe,{}),z.jsx(aa,{margin:"none"}),z.jsx(OIe,{})]}),z.jsx(VIe,{})]})})})},KIe=[{path:"/",element:z.jsx(rSe,{}),label:"landing"},{path:"/customization",element:z.jsx(Ewe,{}),label:"customization"},{path:"/editor",element:z.jsx(Nxe,{}),label:"editor"},{path:"/playground",element:z.jsx(qIe,{}),label:"playground"},{path:"/demo",element:z.jsx(o$,{}),label:"demo"}],JIe=zJ(tC([z.jsx(eC,{path:"/",element:z.jsx(Fie,{}),errorElement:z.jsx(Kie,{}),children:KIe.map(e=>z.jsx(eC,{path:e.path,element:e.element},`route-${e.path}`))})]),{basename:Yb});nE.createRoot(document.getElementById("root")).render(z.jsx(JJ,{router:JIe})); + flex items-center justify-between w-full gap-fix-md`,role:"button",onClick:()=>{r.selectNode(l)},children:[c.length===0&&B.jsx(df,{className:"w-siz-md",icon:"intermediary_stop"}),B.jsx("span",{className:"break-all w-full",onMouseEnter:()=>r.setCustom(l,f=>{f.hover=!0}),onMouseLeave:()=>r.setCustom(l,f=>{f.hover=!1}),children:h}),B.jsxs("div",{className:"flex gap-fix-3xs",children:[l!=="ROOT"&&B.jsxs(Ot,{className:"min-w-siz-md",variant:"ghost",icon:"copy",noText:!0,onClick:()=>{a.parent&&NIe(r,i,l,a.parent)},children:["Copy ",h,"(",l,")"]}),B.jsxs(Ot,{className:"min-w-siz-md",variant:"ghost",icon:a.hidden?"visibility_off":"visibility",noText:!0,onClick:()=>{r.setHidden(l,!a.hidden)},children:["Hide ",h,"(",l,")"]})]})]});return c.length>0?B.jsxs("details",{open:s,children:[B.jsxs("summary",{onDoubleClick:()=>o(!s),onClick:f=>{f.preventDefault()},className:"flex items-center",children:[B.jsxs(Ot,{variant:"ghost",icon:s?"chevron_down":"chevron_right",noText:!0,onClick:()=>{o(!s)},children:["Open ",a.displayName,"(",l,")"]}),d]}),B.jsx("div",{className:"flex flex-col pl-fix-xs w-full",children:c.map(f=>B.jsx(H.Fragment,{children:B.jsx(zU,{node:n[f]})},`tree-item-${f}`))})]}):d},MIe=({className:e})=>{const{t}=mr(),{currentId:r,nodeTrees:n}=ds(l=>l),{nodes:i}=Ii(l=>({nodes:l.nodes})),[s,o]=H.useState(!1);return B.jsxs("div",{"data-density":"functional",className:`h-full${e?` ${e}`:""} grow-0 shrink-0 w-[320px] border-r overflow-hidden`,children:[n[r]&&B.jsxs("div",{className:"h-siz-md flex items-center justify-between p-fix-sm",children:[B.jsx("h6",{children:n[r].name}),B.jsx(Ot,{"data-tonality":"functional",noText:!0,icon:"edit",variant:"ghost",onClick:()=>o(!0),children:t("pgEdit")}),B.jsx(jU,{open:s,onClose:()=>o(!1)})]}),B.jsx("div",{"data-density":"functional",className:"flex flex-col p-fix-sm h-full overflow-auto",children:B.jsx(zU,{node:i.ROOT})})]})},LIe=({className:e})=>{const{t}=mr(),{currentId:r,nodeTrees:n,showBorders:i,showSpacings:s}=ds(u=>u),{actions:o,canUndo:l,canRedo:a,query:c}=Ii((u,h)=>{const[d]=u.events.selected;let f;return d&&(f={id:d,name:u.nodes[d].data.name,settings:u.nodes[d].related&&u.nodes[d].related.settings}),{selected:f,canUndo:h.history.canUndo(),canRedo:h.history.canRedo()}});return B.jsx("div",{"data-density":"functional",className:`flex h-siz-md db-neutral-bg-transparent-semi px-fix-sm ${e||""}`,children:B.jsxs("div",{className:"flex w-full justify-between m-auto",children:[B.jsxs("div",{className:"flex gap-fix-sm",children:[B.jsxs(Ot,{variant:"ghost",noText:!0,icon:"undo",disabled:!l,onClick:()=>{o.history.undo()},children:[t("playgroundUndo"),l&&B.jsx(Ks,{placement:"right",children:t("playgroundUndo")})]}),B.jsxs(Ot,{variant:"ghost",noText:!0,icon:"fast_forward_empty",disabled:!a,onClick:()=>{o.history.redo()},children:[t("playgroundRedo"),a&&B.jsx(Ks,{placement:"bottom",children:t("playgroundRedo")})]})]}),B.jsxs("div",{className:"flex gap-fix-sm",children:[B.jsx(q0,{noText:!0,variant:"ghost",label:"import",accept:"application/JSON",tooltip:"import",onUpload:u=>{try{const h=atob(u.split("base64,")[1]);o.deserialize(h)}catch(h){console.error(h)}}}),B.jsxs(Ot,{variant:"ghost",noText:!0,icon:"download",onClick:()=>{iwe({[n[r].name]:c.serialize()})},children:[t("export"),B.jsx(Ks,{placement:"bottom",children:t("export")})]}),B.jsxs(Ot,{variant:"ghost",noText:!0,icon:"resize",onClick:()=>{ds.setState({showSpacings:!s})},children:[t("playgroundShowSpacings"),B.jsx(Ks,{placement:"bottom",children:t("playgroundShowSpacings")})]}),B.jsxs(Ot,{variant:"ghost",noText:!0,icon:"grid_view",onClick:()=>{ds.setState({showBorders:!i})},children:[t("playgroundShowBorders"),B.jsx(Ks,{placement:"left",children:t("playgroundShowBorders")})]})]})]})})};var G$={exports:{}};G$.exports;(function(e){var t=function(){var r=String.fromCharCode,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",s={};function o(a,c){if(!s[a]){s[a]={};for(var u=0;u>>8,u[h*2+1]=f%256}return u},decompressFromUint8Array:function(a){if(a==null)return l.decompress(a);for(var c=new Array(a.length/2),u=0,h=c.length;u>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++),f[y]=E++,b=String(g)}if(b!==""){if(Object.prototype.hasOwnProperty.call(p,b)){if(b.charCodeAt(0)<256){for(h=0;h>1}else{for(d=1,h=0;h>1}v--,v==0&&(v=Math.pow(2,D),D++),delete p[b]}else for(d=f[b],h=0;h>1;v--,v==0&&(v=Math.pow(2,D),D++)}for(d=2,h=0;h>1;for(;;)if(w=w<<1,T==c-1){C.push(u(w));break}else T++;return C.join("")},decompress:function(a){return a==null?"":a==""?null:l._decompress(a.length,32768,function(c){return a.charCodeAt(c)})},_decompress:function(a,c,u){var h=[],d=4,f=4,p=3,g="",y=[],b,v,E,D,C,w,T,A={val:u(0),position:c,index:1};for(b=0;b<3;b+=1)h[b]=b;for(E=0,C=Math.pow(2,2),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;switch(E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;T=r(E);break;case 2:return""}for(h[3]=T,v=T,y.push(T);;){if(A.index>a)return"";for(E=0,C=Math.pow(2,p),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;switch(T=E){case 0:for(E=0,C=Math.pow(2,8),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 1:for(E=0,C=Math.pow(2,16),w=1;w!=C;)D=A.val&A.position,A.position>>=1,A.position==0&&(A.position=c,A.val=u(A.index++)),E|=(D>0?1:0)*w,w<<=1;h[f++]=r(E),T=f-1,d--;break;case 2:return y.join("")}if(d==0&&(d=Math.pow(2,p),p++),h[T])g=h[T];else if(T===f)g=v+v.charAt(0);else return null;y.push(g),h[f++]=v+g.charAt(0),d--,v=g,d==0&&(d=Math.pow(2,p),p++)}}};return l}();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(G$);var fv=G$.exports;const OIe=({className:e})=>{const t=H.useRef(null),{currentId:r,nodeTrees:n}=ds(),{query:i,actions:s}=Ii(),[o,l]=H.useState(),[a,c]=H.useState(0),[u,h]=H.useState(!1);H.useEffect(()=>{t.current&&ds.setState({previewContainer:t.current.getBoundingClientRect()})},[t]);const d=H.useCallback(()=>{const f=fv.compressToBase64(fv.compress(i.serialize())),p=n[r].serializedJson;f!==p&&r===o&&a===Object.keys(n).length&&ds.setState({nodeTrees:{...n,[r]:{...n[r],serializedJson:f}}})},[r,o,a,n,i]);return H.useEffect(()=>{const f=setTimeout(()=>{d(),h(!u)},2e3);return()=>clearTimeout(f)},[u,d]),H.useEffect(()=>{if(r&&n&&n[r]&&s){if(r!==o&&(a===0||a===Object.keys(n).length)){const f=n[r].serializedJson,p=f.length===0?void 0:fv.decompress(fv.decompressFromBase64(f));p&&s.deserialize(p)}l(r),c(Object.keys(n).length)}},[s,r,n,o,a]),B.jsx("div",{ref:t,className:`${e||""} p-fix-3xs h-full overflow-y-auto overflow-x-hidden`,children:B.jsx(w_e,{children:B.jsx(Bf,{id:"canvas",is:BU,canvas:!0})})})},RIe=()=>{const{selected:e,actions:t}=Ii(o=>{const[l]=o.events.selected;let a;if(l){const c=o.nodes[l];a={id:l,data:c.data,settings:c.related&&c.related.settings}}return{selected:a}}),[r,n]=H.useState(),[i,s]=H.useState();return H.useEffect(()=>{if(e&&e.data.name==="DropContainer"&&e.data.parent&&t){const o=e.data.parent;t.selectNode(o)}else e&&r!==e.id?(n(e.id),s(e.data.custom.displayName||e.data.name)):e||(s(""),n(void 0))},[r,e,t]),e?B.jsx("div",{className:"flex flex-col h-full overflow-y-auto",children:B.jsxs("div",{className:"flex flex-col p-fix-sm gap-fix-md h-full",children:[B.jsx(an,{variant:"floating",label:"Displayname",value:i,onChange:o=>{const l=o.target.value;s(l),t.setCustom(e.id,a=>{a.displayName=l})}}),e.settings?H.createElement(e.settings):B.jsx(Mr,{semantic:"warning",children:"No settings"}),B.jsx(Ot,{variant:"brand",icon:"bin",width:"full",disabled:!e||e.data.name==="Root",onClick:()=>{e&&t.delete(e.id)},children:"Delete"})]})}):null},BIe=H.forwardRef((e,t)=>e.size==="1"?B.jsx("h1",{ref:t,...e,children:e.children}):e.size==="2"?B.jsx("h2",{ref:t,...e,children:e.children}):e.size==="3"?B.jsx("h3",{ref:t,...e,children:e.children}):e.size==="5"?B.jsx("h5",{ref:t,...e,children:e.children}):e.size==="6"?B.jsx("h6",{ref:t,...e,children:e.children}):B.jsx("h4",{ref:t,...e,children:e.children})),q$=({headline:e,size:t,className:r,variant:n})=>{const{t:i}=mr(),{connectors:{connect:s,drag:o},id:l,hovered:a,name:c}=ba(h=>({name:h.data.custom.displayName||h.data.name,hovered:h.data.custom.hover})),{selected:u}=Ii(h=>{const[d]=h.events.selected;return{selected:l===d}});return B.jsxs(BIe,{className:`${yh(u,a,r)}`,"data-hint":e?void 0:i("pgEditMe"),"data-variant":n,ref:h=>{h&&s(h)},size:t,children:[e,B.jsx(vh,{componentName:c,drag:o})]})},jIe=()=>B.jsx(gh,{settings:[{key:"headline",type:"textarea"},{key:"size",type:"select",selectOptions:[{value:"1"},{value:"2"},{value:"3"},{value:"4"},{value:"5"},{value:"6"}]},{key:"variant",type:"select",selectOptions:[{value:"black"},{value:"light"}]}]});q$.craft={props:{size:"4",variant:"black"},related:{settings:jIe}};const K$=e=>{const{connectors:{connect:t,drag:r},id:n,hovered:i,name:s}=ba(l=>({name:l.data.custom.displayName||l.data.name,hovered:l.data.custom.hover})),{selected:o}=Ii(l=>{const[a]=l.events.selected;return{selected:n===a}});return B.jsxs("div",{className:`db-divider text-[0] ${yh(o,i,e.className)}`,"data-margin":e.margin,"data-variant":e.variant,"data-emphasis":e.emphasis,ref:l=>{l&&t(l)},children:["Divider",B.jsx(vh,{componentName:s,drag:r})]})},zIe=()=>B.jsx(gh,{settings:[{key:"emphasis",type:"select",selectOptions:[{value:"weak"},{value:"strong"}]},{key:"variant",type:"select",selectOptions:[{value:"horizontal"},{value:"vertical"}]},{key:"margin",type:"select",selectOptions:[{value:"auto"},{value:"none"}]}]});K$.craft={props:{emphasis:"weak",variant:"horizontal",margin:"auto"},related:{settings:zIe}};const HIe=[{headline:"general",components:[{name:"container",component:B.jsx(U$,{}),assetPath:"assets/components/flex.svg"},{name:"text",component:B.jsx(W$,{})},{name:"headline",component:B.jsx(q$,{})}]},{headline:"action",components:[{name:"button",component:B.jsx(z$,{children:"Test"}),assetPath:"assets/components/button.svg"},{name:"link",component:B.jsx(V$,{}),assetPath:"assets/components/link.svg"}]},{headline:"layout",components:[{name:"card",component:B.jsx(H$,{})},{name:"divider",component:B.jsx(K$,{}),assetPath:"assets/components/divider.svg"}]}],UIe=({component:e,assetPath:t,name:r})=>{const{connectors:n}=Ii();return B.jsx("div",{ref:i=>{i&&n.create(i,e)},children:B.jsxs(ls,{className:"items-center cursor-grab p-fix-xs",spacing:"small",children:[B.jsx("img",{className:"max-h-siz-md",alt:r,src:t||"assets/components/component.svg"}),B.jsx("span",{className:"break-all",children:r})]})})},WIe=()=>{const{t:e}=mr(),[t,r]=H.useState("");return B.jsxs("div",{className:"flex flex-col gap-fix-md p-fix-md h-full overflow-y-auto","data-density":"functional",children:[B.jsx(an,{type:"search",variant:"floating",label:e("search"),placeholder:e("search"),onChange:n=>r(n.target.value)}),HIe.filter(({components:n})=>n.some(({name:i})=>e(i).includes(t))).map(({headline:n,components:i})=>B.jsxs(H.Fragment,{children:[B.jsx("h6",{children:e(n)}),B.jsx("div",{className:"grid grid-cols-2 gap-fix-sm",children:i.filter(({name:s})=>e(s).includes(t)).map(({name:s,component:o,assetPath:l})=>B.jsx(H.Fragment,{children:B.jsx(UIe,{name:e(s),component:o,assetPath:l})},`${n}-${s}`))})]},n))]})},VIe=({className:e})=>{const t=H.useRef(null),{t:r}=mr(),{selected:n}=Ii(i=>{const[s]=i.events.selected;let o;if(s){const l=i.nodes[s];o={id:s,data:l.data,settings:l.related&&l.related.settings}}return{selected:o}});return H.useEffect(()=>{t.current&&n&&t.current.click()},[n,t]),B.jsx("div",{"data-density":"functional",className:`border-l flex flex-col grow-0 shrink-0 w-[320px] overflow-hidden ${e||""}`,children:B.jsxs(p6,{alignment:"center",className:"h-full",width:"full",children:[B.jsxs(lk,{children:[B.jsx(x0,{children:r("components")}),B.jsx(x0,{disabled:!n,ref:t,children:r("customize")})]}),B.jsx(w0,{children:B.jsx(WIe,{})}),B.jsx(w0,{children:B.jsx(RIe,{})})]})})},GIe=()=>{const{t:e}=mr(),{currentId:t,nodeTrees:r}=ds(s=>s),[n,i]=H.useState(!1);return B.jsxs(B.Fragment,{children:[B.jsxs(f6,{children:[Object.entries(r).map(([s,o])=>B.jsx(cC,{active:s===t,children:B.jsx("a",{onClick:()=>ds.setState({currentId:s}),children:o.name})},s)),B.jsx(cC,{icon:"plus",children:B.jsx("a",{onClick:()=>{i(!0)},children:e("add")})})]}),B.jsx(jU,{create:!0,open:n,onClose:()=>i(!1)})]})},qIe=()=>{const{showBorders:e,showSpacings:t}=ds(n=>n),{t:r}=mr();return B.jsx(N_e,{indicator:{success:"var(--db-successful-contrast-high-enabled)",error:"var(--db-critical-contrast-high-enabled)"},resolver:{Button:z$,Card:H$,Container:U$,DropContainer:Yg,Text:W$,Root:BU,Link:V$,Headline:q$,Divider:K$},children:B.jsx(q1,{name:r("playground"),navigation:B.jsx(GIe,{}),children:B.jsxs("div",{className:`flex h-full w-full${e?" show-borders":""}${t?" show-spacings":""}`,children:[B.jsx(MIe,{}),B.jsxs("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[B.jsx(LIe,{}),B.jsx(aa,{margin:"none"}),B.jsx(OIe,{})]}),B.jsx(VIe,{})]})})})},KIe=[{path:"/",element:B.jsx(rSe,{}),label:"landing"},{path:"/customization",element:B.jsx(Ewe,{}),label:"customization"},{path:"/editor",element:B.jsx(Nxe,{}),label:"editor"},{path:"/playground",element:B.jsx(qIe,{}),label:"playground"},{path:"/demo",element:B.jsx(o$,{}),label:"demo"}],JIe=jJ(tC([B.jsx(eC,{path:"/",element:B.jsx(Fie,{}),errorElement:B.jsx(Kie,{}),children:KIe.map(e=>B.jsx(eC,{path:e.path,element:e.element},`route-${e.path}`))})]),{basename:Yb});nE.createRoot(document.getElementById("root")).render(B.jsx(JJ,{router:JIe})); diff --git a/main/customization.html b/main/customization.html index e5645e9e..a9e097b4 100644 --- a/main/customization.html +++ b/main/customization.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/demo.html b/main/demo.html index e5645e9e..a9e097b4 100644 --- a/main/demo.html +++ b/main/demo.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/index.html b/main/index.html index e5645e9e..a9e097b4 100644 --- a/main/index.html +++ b/main/index.html @@ -5,7 +5,7 @@ Theme Builder - + diff --git a/main/locales/de/translation.json b/main/locales/de/translation.json index 9933b6be..0228a253 100644 --- a/main/locales/de/translation.json +++ b/main/locales/de/translation.json @@ -1,10 +1,10 @@ { - "user": "Benutzer", "action": "Action", "active": "Aktiv", "adaptColor": "Farbe anpassen", "add": "Hinzufügen", "addColor": "Farbe hinzufügen", + "additional-colors": "Zusätzliche Farben", "alternativeBrandCheckbox": "Umgehung der automatischen Generierung", "alternativeBrandCritical": "Ihre eigene Markenfarbe hat nicht den erforderlichen Kontrast, Ihr Theme entspricht nicht den Anforderungen für Accessibility!", "alternativeBrandWarning": "Ihre Markenfarbe hat nicht den erforderlichen Kontrast, wir haben eine gültige Farbe aus der Palette ausgewählt.", @@ -16,7 +16,6 @@ "border-enabled": "Border", "border-weak-enabled": "Border Weak", "brand": "Marke", - "wrench": "Verwalten", "button": "Button", "card": "Card", "change": "Ändern", @@ -36,7 +35,6 @@ "customization": "Theme anpassen", "customize": "Anpassen", "dark": "Dark", - "folder_open": "Übersicht", "dbTheme": "Deutsche Bahn", "delete": "Löschen", "deleteColor": "Farbe löschen", @@ -53,6 +51,7 @@ "export": "Export", "exportDesc": "Exportiere Theme", "fastestConnection": "Schnellste Verbindungen anzeigen", + "folder_open": "Übersicht", "forgotPassword": "Passwort vergessen?", "formatCode": "Code formatieren", "from": "Von", @@ -83,7 +82,6 @@ "password": "Passwort", "pgEdit": "Bearbeiten", "pgEditMe": "Editiere mich in der Seitenleiste", - "toys": "Spiele", "playground": "Playground", "playgroundCopyError": "Die Komponente wurde kopiert, lade die Seite neu, um alle Einstellungen sehen zu können.", "playgroundRedo": "Letzte Aktion wiederherstellen", @@ -108,8 +106,11 @@ "to": " Nach", "today": "Heute", "token": "Token", + "toys": "Spiele", "transparency": "Transparenz", "tryIt": "Probiere unseren Playground", "uploadLogo": "Logo hochladen", - "username": "Benutzername" + "user": "Benutzer", + "username": "Benutzername", + "wrench": "Verwalten" } diff --git a/main/locales/en/translation.json b/main/locales/en/translation.json index c2d166cf..57c9d520 100644 --- a/main/locales/en/translation.json +++ b/main/locales/en/translation.json @@ -1,10 +1,10 @@ { - "user": "Account", "action": "Action", "active": "Active", "adaptColor": "Adapt color", "add": "Add", "addColor": "Add Color", + "additional-colors": "Additional Colors", "alternativeBrand": "Alternative: Brand", "alternativeBrandCheckbox": "Bypass auto-generation", "alternativeBrandCritical": "Your custom brand color doesn't have the required contrast, your theme won't be accessible!", @@ -27,7 +27,6 @@ "borderHeight": "Border height", "borderRadius": "Border Radius", "brand": "Brand", - "wrench": "Build", "button": "Button", "card": "Card", "change": "Change", @@ -53,7 +52,6 @@ "customization": "Customization", "customize": "Customize", "dark": "Dark", - "folder_open": "Dashboard", "dbTheme": "Deutsche Bahn", "delete": "Delete", "deleteColor": "Delete Color", @@ -71,6 +69,7 @@ "export": "Export", "exportDesc": "Export theme", "fastestConnection": "Show fastest connection", + "folder_open": "Dashboard", "forgotPassword": "Forgot password?", "formatCode": "Format code", "from": "From", @@ -119,7 +118,6 @@ "password": "Password", "pgEdit": "Edit", "pgEditMe": "Edit me in the sidebar", - "toys": "Toys", "playground": "Playground", "playgroundCopyError": "You copied a component, please reload the page to see the settings.", "playgroundRedo": "Redo last action", @@ -145,8 +143,11 @@ "to": "To", "today": "Today", "token": "Token", + "toys": "Toys", "transparency": "Transparency", "tryIt": "Try Our Playground", "uploadLogo": "Upload logo", - "username": "Username" + "user": "Account", + "username": "Username", + "wrench": "Build" } diff --git a/main/playground.html b/main/playground.html index e5645e9e..a9e097b4 100644 --- a/main/playground.html +++ b/main/playground.html @@ -5,7 +5,7 @@ Theme Builder - +